Merge pull request #46 from Servostar/40-add-parser-rule-for-calling-functions
added parser rule for function calling
This commit is contained in:
commit
f8c888216a
|
@ -65,7 +65,6 @@
|
||||||
%%
|
%%
|
||||||
program: statementlist;
|
program: statementlist;
|
||||||
|
|
||||||
|
|
||||||
expr: ValFloat
|
expr: ValFloat
|
||||||
| ValInt
|
| ValInt
|
||||||
| ValMultistr
|
| ValMultistr
|
||||||
|
@ -73,6 +72,17 @@ expr: ValFloat
|
||||||
| Ident
|
| Ident
|
||||||
| operation;
|
| operation;
|
||||||
|
|
||||||
|
exprlist: expr ',' exprlist
|
||||||
|
| expr
|
||||||
|
| ;
|
||||||
|
|
||||||
|
paramlist: paramlist '(' exprlist ')'
|
||||||
|
| ;
|
||||||
|
|
||||||
|
funcall: Ident paramlist { DEBUG("Function call"); };
|
||||||
|
|
||||||
|
assign: Ident '=' expr { DEBUG("Assignment"); };
|
||||||
|
|
||||||
statementlist: statementlist statement
|
statementlist: statementlist statement
|
||||||
| ;
|
| ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue