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.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mem/slicc/parser.py b/src/mem/slicc/parser.py
index 10dd99ece..1ce8bf1bd 100644
--- a/src/mem/slicc/parser.py
+++ b/src/mem/slicc/parser.py
@@ -278,7 +278,7 @@ class SLICC(Grammar):
p[0] = ast.OutPortDeclAST(self, p[3], p[5], p[7], p[8])
def p_decl__trans0(self, p):
- "decl : TRANS '(' idents ',' idents ',' ident ')' idents"
+ "decl : TRANS '(' idents ',' idents ',' ident_or_star ')' idents"
p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], p[7], p[9])
def p_decl__trans1(self, p):
@@ -286,7 +286,7 @@ class SLICC(Grammar):
p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], None, p[7])
def p_decl__trans2(self, p):
- "decl : TRANS '(' idents ',' idents ',' ident ')' idents idents"
+ "decl : TRANS '(' idents ',' idents ',' ident_or_star ')' idents idents"
p[0] = ast.TransitionDeclAST(self, p[9], p[3], p[5], p[7], p[10])
def p_decl__trans3(self, p):
@@ -506,6 +506,11 @@ class SLICC(Grammar):
"ident : IDENT"
p[0] = p[1]
+ def p_ident_or_star(self, p):
+ """ident_or_star : ident
+ | STAR"""
+ p[0] = p[1]
+
# Pair and pair lists
def p_pairs__list(self, p):
"pairs : ',' pairsx"