Merge branch 'parser-devel' into add-parser-rule-for-modules-import
This commit is contained in:
commit
743f8899f4
|
@ -73,11 +73,10 @@ expr: ValFloat
|
||||||
| operation;
|
| operation;
|
||||||
|
|
||||||
exprlist: expr ',' exprlist
|
exprlist: expr ',' exprlist
|
||||||
| expr
|
| expr;
|
||||||
| ;
|
|
||||||
|
|
||||||
paramlist: paramlist '(' exprlist ')'
|
paramlist: '(' exprlist ')' paramlist
|
||||||
| ;
|
| '(' exprlist ')';
|
||||||
|
|
||||||
funcall: Ident paramlist { DEBUG("Function call"); };
|
funcall: Ident paramlist { DEBUG("Function call"); };
|
||||||
|
|
||||||
|
@ -85,47 +84,54 @@ assign: Ident '=' expr { DEBUG("Assignment"); };
|
||||||
|
|
||||||
moduleimport: KeyImport ValStr { DEBUG("Module-Import"); };
|
moduleimport: KeyImport ValStr { DEBUG("Module-Import"); };
|
||||||
|
|
||||||
statementlist: statementlist statement
|
statementlist: statement statementlist
|
||||||
| ;
|
| statement;
|
||||||
|
|
||||||
statement: assign
|
statement: assign
|
||||||
| decl
|
| decl
|
||||||
| definition
|
| definition
|
||||||
| branch;
|
| branch
|
||||||
|
| funcall;
|
||||||
|
|
||||||
branchif: KeyIf expr '{' statementlist '}' { DEBUG("if"); };
|
branchif: KeyIf expr '{' statementlist '}' { DEBUG("if"); };
|
||||||
branchelse: KeyElse '{' statementlist '}' { DEBUG("if-else"); };
|
branchelse: KeyElse '{' statementlist '}' { DEBUG("if-else"); };
|
||||||
branchelseif: KeyElse KeyIf expr '{' statementlist '}' { DEBUG("else-if"); };
|
branchelseif: KeyElse KeyIf expr '{' statementlist '}' { DEBUG("else-if"); };
|
||||||
|
|
||||||
branchelseifs: branchelseifs branchelseif
|
branchelseifs: branchelseifs branchelseif
|
||||||
| ;
|
| branchelseif;
|
||||||
|
|
||||||
branch: branchif branchelseifs
|
branch: branchif branchelseifs
|
||||||
| branchif branchelseifs branchelse;
|
| branchif branchelseifs branchelse;
|
||||||
|
|
||||||
identlist: Ident ',' identlist
|
identlist: Ident ',' identlist
|
||||||
| Ident
|
| Ident;
|
||||||
| ;
|
|
||||||
|
|
||||||
decl: type ':' identlist { DEBUG("Declaration"); };
|
decl: type ':' identlist;
|
||||||
|
|
||||||
definition: decl '=' expr { DEBUG("Definition"); };
|
definition: decl '=' expr { DEBUG("Definition"); };
|
||||||
|
|
||||||
assign: Ident '=' expr { DEBUG("Assignment"); };
|
assign: Ident '=' expr { DEBUG("Assignment"); };
|
||||||
|
|
||||||
sign: KeySigned
|
sign: KeySigned
|
||||||
| KeyUnsigned
|
| KeyUnsigned;
|
||||||
| ;
|
|
||||||
|
|
||||||
scale: scale KeyShort
|
scale: scale KeyShort
|
||||||
| scale KeyHalf
|
| scale KeyHalf
|
||||||
| scale KeyLong
|
| scale KeyLong
|
||||||
| scale KeyDouble
|
| scale KeyDouble
|
||||||
| ;
|
| KeyShort
|
||||||
|
| KeyHalf
|
||||||
|
| KeyLong
|
||||||
|
| KeyDouble;
|
||||||
|
|
||||||
type: sign scale Ident
|
typekind: Ident
|
||||||
| sign scale KeyInt
|
| KeyInt
|
||||||
| sign scale KeyFloat;
|
| KeyFloat;
|
||||||
|
|
||||||
|
type: typekind
|
||||||
|
| scale typekind
|
||||||
|
| sign typekind
|
||||||
|
| sign scale typekind;
|
||||||
|
|
||||||
operation: oparith
|
operation: oparith
|
||||||
| oplogic
|
| oplogic
|
||||||
|
|
Loading…
Reference in New Issue