Changes between Version 72 and Version 73 of IR2


Ignore:
Timestamp:
05/04/21 20:41:55 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v72 v73  
    139139    ID  /* variable being declared */
    140140  | direct-declarator '[' expr? ']'  /* array of ... */
    141   | direct-declarator  '(' type-list? ')'  /* function consuming ... and returning ... */
     141  | direct-declarator  '(' parameter-type-list? ')'  /* function consuming ... and returning ... */
    142142  | '(' declarator ')'
    143143  ;
    144144type-name: ... /* same as declarator but without the ID */
    145145type-list: type-name (',' type-name)* ;
    146 
     146parameter-type-list: type-specifier declarator (type-specifier declarator)* ;
    147147}}}
    148148
     
    242242Work in progress...
    243243
     244{{{
     245$int $round($real x); // round to nearest integer
     246$int $floor($real x); // greatest integer less than or equal to
     247$int ceil($real x); // least integer greater than or equal to
     248$float<e,f> $roundf($real x, $int e, $int f);  // PROBLEM this is not a parameterized type
     249
     250}}}
     251
     252
    244253* `round(e,t)`: returns value in numerical type `t` that is "closest" to the given value `e`
    245254 * add argument for rounding mode?