Changes between Version 68 and Version 69 of IR2


Ignore:
Timestamp:
05/04/21 07:58:39 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v68 v69  
    4646  struct ID '{' decl* '}' ';'
    4747  | 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  ;
     50decl: type-param-list? qualifier* type-specifier declarator contract-clause* ';' ;
     51function-definition: type-param-list? qualifier* type-specifier declarator contract-clause* block ;
    5252qualifier:
    5353    '$input'  /* input variable; only for global decls */
     
    6868expression-list: expr (',' expr)* ;
    6969gotoStmt: 'goto' ID ;
     70type-param-list: '<' ID (',' ID)* '>' ;
    7071INT: ... /* integer constant */
    7172ID: ... /* identifier */
     
    121122{{{
    122123type-specifier:
    123     ID  /* typedef use */
     124    ID  /* typedef use or type parameter */
    124125  | '$int'  /* mathematical integers */
    125126  | '$bool'  /* boolean type ($true and $false, unrelated to integers) */
     
    171172    ';'  /* noop */
    172173  | 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 */
    175176  | '$wait' expr ';'  /* wait until p terminates */
    176177  | 'return' expr? ';'  /* return from function call */
     
    183184  | '$assume' expr ';'  /* assumption */
    184185  ;
     186type-arg-list: '<' type-list '>' ;
    185187
    186188}}}