summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-05-25 19:26:26 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-05-25 19:26:26 -0700
commitad02a59f89139a75dfcfaa7a79498e54f7ce7e5d (patch)
tree20e7c9631422c35f2764754ab64d46717aaa1b95 /src
parenta13d5af274a1847eaad649af226e643e86a3322d (diff)
downloadgem5-ad02a59f89139a75dfcfaa7a79498e54f7ce7e5d.tar.xz
Make the lexer and parser use objects and not the last lexer and parser generated.
--HG-- extra : convert_revision : e751969973599cde711f9d4de0dc4772dda651ed
Diffstat (limited to 'src')
-rwxr-xr-xsrc/arch/isa_parser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index 4c8d0706d..57d58cc9d 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -194,7 +194,7 @@ def t_error(t):
t.skip(1)
# Build the lexer
-lex.lex()
+lexer = lex.lex()
#####################################################################
#
@@ -729,7 +729,7 @@ def p_error(t):
# END OF GRAMMAR RULES
#
# Now build the parser.
-yacc.yacc()
+parser = yacc.yacc()
#####################################################################
@@ -1881,7 +1881,8 @@ def parse_isa_desc(isa_desc_file, output_dir):
fileNameStack.push((isa_desc_file, 0))
# Parse it.
- (isa_name, namespace, global_code, namespace_code) = yacc.parse(isa_desc)
+ (isa_name, namespace, global_code, namespace_code) = \
+ parser.parse(isa_desc, lexer=lexer)
# grab the last three path components of isa_desc_file to put in
# the output