summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-16 20:44:37 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-16 20:44:37 +0100
commita2bc36429548d8a68d58fd4a1d7b934f67518942 (patch)
treed1ba1c65662a1c983660f066914d2931b04e25ad /src/parser.mly
parent6aaebab9f21e934bcda4bd360ff0b0e4fe3f1178 (diff)
downloadLPC-Projet-a2bc36429548d8a68d58fd4a1d7b934f67518942.tar.gz
LPC-Projet-a2bc36429548d8a68d58fd4a1d7b934f67518942.zip
Corrected parsing bug ; give unique identifiers to functions.
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly3
1 files changed, 1 insertions, 2 deletions
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 <Ast.program> 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) }
;