Changes between Version 4 and Version 5 of CIVLite


Ignore:
Timestamp:
09/21/23 11:28:14 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CIVLite

    v4 v5  
    1313
    1414There is a global scope and a local scope for each function.  That's it.
     15
     16No need to "declare" a function before it is used.   There is no notion of a function declaration.
     17
     18print?
    1519
    1620Grammar:
     
    5963assertion: 'assert' expr ';'
    6064
     65alloc: 'alloc' expr '[' expr ']' ';'
     66
    6167exprlist: expr (',' expr)*
    6268
     
    6874program: paramdecl* vardecl* function*
    6975
     76Example:
     77
     78int[][] %a;
     79fun void %f(int %n, int %m) {
     80  alloc %a, %n;
     81  alloc %a[0], %m;
     82
     83  free %a;
     84}
    7085
    7186}}}
     87