summaryrefslogtreecommitdiff
path: root/src/mem/slicc/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/slicc/parser.py')
-rw-r--r--src/mem/slicc/parser.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mem/slicc/parser.py b/src/mem/slicc/parser.py
index 96e029ecf..aa96ceef1 100644
--- a/src/mem/slicc/parser.py
+++ b/src/mem/slicc/parser.py
@@ -258,8 +258,12 @@ class SLICC(Grammar):
filename = os.path.join(self.base_dir, p[2])
p[0] = self.parse_file(filename)
- def p_decl__machine(self, p):
- "decl : MACHINE '(' ident pairs ')' ':' params '{' decls '}'"
+ def p_decl__machine0(self, p):
+ "decl : MACHINE '(' idents ')' ':' params '{' decls '}'"
+ p[0] = ast.MachineAST(self, p[3], [], p[7], p[9])
+
+ def p_decl__machine1(self, p):
+ "decl : MACHINE '(' idents pairs ')' ':' params '{' decls '}'"
p[0] = ast.MachineAST(self, p[3], p[4], p[7], p[9])
def p_decl__action(self, p):