Changes between Version 68 and Version 69 of IR2
- Timestamp:
- 05/04/21 07:58:39 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v68 v69 46 46 struct ID '{' decl* '}' ';' 47 47 | union ID '{' decl* '}' ';' 48 | 'typedef' type-specifier declarator ';'49 ; 50 decl: qualifier* type-specifier declarator contract-clause* ';' ;51 function-definition: qualifier* type-specifier declarator contract-clause* block ;48 | type-param-list? 'typedef' type-specifier declarator ';' 49 ; 50 decl: type-param-list? qualifier* type-specifier declarator contract-clause* ';' ; 51 function-definition: type-param-list? qualifier* type-specifier declarator contract-clause* block ; 52 52 qualifier: 53 53 '$input' /* input variable; only for global decls */ … … 68 68 expression-list: expr (',' expr)* ; 69 69 gotoStmt: 'goto' ID ; 70 type-param-list: '<' ID (',' ID)* '>' ; 70 71 INT: ... /* integer constant */ 71 72 ID: ... /* identifier */ … … 121 122 {{{ 122 123 type-specifier: 123 ID /* typedef use */124 ID /* typedef use or type parameter */ 124 125 | '$int' /* mathematical integers */ 125 126 | '$bool' /* boolean type ($true and $false, unrelated to integers) */ … … 171 172 ';' /* noop */ 172 173 | lvalue '=' expr ';' /* assignment */ 173 | expr '(' arg-list? ')' ';' /* function call */174 | (lvalue '=')? '$spawn' expr '(' expression-list? ')' ';' /* process creation */174 | expr type-arg-list? '(' arg-list? ')' ';' /* function call */ 175 | (lvalue '=')? '$spawn' expr type-arg-list? '(' expression-list? ')' ';' /* process creation */ 175 176 | '$wait' expr ';' /* wait until p terminates */ 176 177 | 'return' expr? ';' /* return from function call */ … … 183 184 | '$assume' expr ';' /* assumption */ 184 185 ; 186 type-arg-list: '<' type-list '>' ; 185 187 186 188 }}}
