Changes between Version 13 and Version 14 of IR2


Ignore:
Timestamp:
04/19/21 21:06:42 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v13 v14  
    1111block: '{' typedef* vardecl* fundef* statement* '}' ;
    1212statement: block | basicStmt ;
    13 basicStmt:  (ID ':')? (simpleStmt | chooseStmt | gotoStmt) ;
     13basicStmt:  (ID ':')? (simpleStmt | chooseStmt)| gotoStmt? ;
    1414gotoStmt: 'goto' ID ;
    15 simpleStmt: (guardedStmt | primitiveStmt) gotoStmt? ;
    16 guardedStmt: 'when' expr 'do' primitiveStmt ;
    17 chooseStmt: 'begin choose' simpleStmt+ 'end choose' ;
    18 typedef: 'type' ID '=' typeName ';' ;
    19 vardecl: 'var' varopts? ID ':' typeName ';' ;
    20 varopts: '[' varopt+ ']' ;
    21 varopt: 'input' | 'output' ;
    22 fundef:  'fun' funopts? ID '(' paramlist ')' (':' typeName)? conclause* block ;
    23 funopts: '[' funopt+ ']' ;
     15simpleStmt: guardedStmt | primitiveStmt ;
     16guardedStmt: '$when' '(' expr ')' primitiveStmt ;
     17chooseStmt: '$choose' '{' (simpleStmt gotoStmt?)+ '}' ;
     18typedef: 'typedef' decl;
     19fundef:  (same as C)
    2420conclause : 'assigns' expr ';'
    2521          | 'requires' expr ';'