Changes between Version 15 and Version 16 of IR2


Ignore:
Timestamp:
04/26/21 12:57:38 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v15 v16  
    1717decl: type-qualifier? type-specifier declarator ';' ;
    1818type-qualifier: '$input' | '$output' ;
    19 type-specifier:
    20     ID
    21   | '$int'
    22   | '$bool'
    23   | '$char'
    24   | '$int'
    25   | '$real'
    26   | '$float' '<' INT ',' INT '>'
    27   | '$herbrand' '<' type-name '>'
    28   | '$proc'
    29   | '$bundle'
    30   | '$heap'
    31   | '$range'
    32   | '$domain'
    33   | '$mem'
    34   | 'enum' ID
    35   | 'struct' ID
    36   | 'union' ID
    37   | 'void'
    38   | '$seq' '<' type-name '>'
    39   | '$set' '<' type-name '>'
    40   | '$map' '<' type-name ',' type-name '>'
    41   | '$rel' '<' type-list '>'
    42   ;
     19
    4320declarator: '*'* ID ('[' ']' | '(' type-list? ')')* ;
    4421type-name: type-specifier '*'* ('[' ']' | '(' type-list? ')')* ;
     
    6138          | 'ensures' expr ';'
    6239          ...
     40}}}
     41
     42=== Types ===
     43{{{
     44type-specifier:
     45    ID.          /* typedef use */
     46  | '$int'      /* mathematical integers */
     47  | '$bool'   /* boolean type ($true and $false, unrelated to integers) */
     48  | '$char'  /* character type (Unicode characters, unrelated to integers) */
     49  | '$real'   /*  mathematical reals */
     50  | '$float' '<' INT ',' INT '>'   /*  IEEE floating-point numbers e=significand bits, f=exponent bits */
     51  | '$herbrand' '<' type-name '>'   /*  Herbrand type of non-Herbrand numeric type T */
     52  | '$proc'   /* process type */
     53  | '$bundle'   /* bundle type for sequence of any type (same as seq<T>?) */
     54  | '$heap'      /*  heap type, for dynamic allocation */
     55  | '$range'     /*  regular sequence of integers */
     56  | '$domain'  /*  tuple of ranges */
     57  | '$mem'      /* */
     58  | 'enum' ID  /* */
     59  | 'struct' ID  /* */
     60  | 'union' ID  /* */
     61  | 'void'   /* */
     62  | '$seq' '<' type-name '>'  /* */
     63  | '$set' '<' type-name '>'  /* */
     64  | '$map' '<' type-name ',' type-name '>'  /* */
     65  | '$rel' '<' type-list '>'  /* */
     66  ;
    6367}}}
    6468