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.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mem/slicc/parser.py b/src/mem/slicc/parser.py
index 07c067f68..0cbe9ea63 100644
--- a/src/mem/slicc/parser.py
+++ b/src/mem/slicc/parser.py
@@ -669,13 +669,15 @@ class SLICC(Grammar):
def p_expr__member_method_call(self, p):
"aexpr : aexpr DOT ident '(' exprs ')'"
- p[0] = ast.MemberMethodCallExprAST(self, p[1],
- ast.FuncCallExprAST(self, p[3], p[5]))
+ p[0] = ast.MemberMethodCallExprAST(self, p[1], p[3], p[5])
+
+ def p_expr__member_method_call_lookup(self, p):
+ "aexpr : aexpr '[' exprs ']'"
+ p[0] = ast.MemberMethodCallExprAST(self, p[1], "lookup", p[3])
def p_expr__class_method_call(self, p):
"aexpr : type DOUBLE_COLON ident '(' exprs ')'"
- p[0] = ast.ClassMethodCallExprAST(self, p[1],
- ast.FuncCallExprAST(self, p[3], p[5]))
+ p[0] = ast.ClassMethodCallExprAST(self, p[1], p[3], p[5])
def p_expr__aexpr(self, p):
"expr : aexpr"