From a2bc36429548d8a68d58fd4a1d7b934f67518942 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Mon, 16 Dec 2013 20:44:37 +0100 Subject: Corrected parsing bug ; give unique identifiers to functions. --- src/parser.mly | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/parser.mly') diff --git a/src/parser.mly b/src/parser.mly index 0cf545d..2b50797 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -55,7 +55,6 @@ %left LT LE GT GE %left PLUS MINUS %left TIMES DIV MOD -%nonassoc LPAREN %start prog @@ -245,7 +244,6 @@ expression: expression_desc: | e1 = expression ASSIGN e2 = expression { EAssign(e1, e2) } | a = expression b = binop c = expression { EBinary(a, b, c) } -| a = expression LPAREN arg = separated_list(COMMA, expression) RPAREN { ECall(a, arg) } | NEW c = TIDENT LPAREN args = separated_list(COMMA, expression) RPAREN { ENew(c, args) } ; @@ -282,6 +280,7 @@ primary_desc: { EMember( { e_loc = $startpos, $endpos; e_desc = EUnary(Deref, a)} , b) } +| a = primary LPAREN arg = separated_list(COMMA, expression) RPAREN { ECall(a, arg) } | a = primary DOT b = IDENT { EMember(a, b) } ; -- cgit v1.2.3