fix infix application
This commit is contained in:
parent
a702759618
commit
556f637cf6
1 changed files with 3 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
%left LPAREN
|
%left LPAREN
|
||||||
%left let1
|
%left let1
|
||||||
|
|
||||||
|
|
||||||
%left FUN
|
%left FUN
|
||||||
%left STRING
|
%left STRING
|
||||||
%left INT CID CHAR WHILE
|
%left INT CID CHAR WHILE
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
%left SLASH STAR
|
%left SLASH STAR
|
||||||
|
|
||||||
%left fun1
|
%left fun1
|
||||||
|
%left app1
|
||||||
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
@ -343,7 +345,7 @@ expression:
|
||||||
Fun(FunctionDefinition(p, e))
|
Fun(FunctionDefinition(p, e))
|
||||||
}
|
}
|
||||||
/* Application */
|
/* Application */
|
||||||
| e1=located(expression) e2=located(expression) {
|
| e1=located(expression) e2=located(expression) %prec app1 {
|
||||||
Apply(e1, e2)
|
Apply(e1, e2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue