Changes between Version 4 and Version 5 of CIVLite
- Timestamp:
- 09/21/23 11:28:14 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CIVLite
v4 v5 13 13 14 14 There is a global scope and a local scope for each function. That's it. 15 16 No need to "declare" a function before it is used. There is no notion of a function declaration. 17 18 print? 15 19 16 20 Grammar: … … 59 63 assertion: 'assert' expr ';' 60 64 65 alloc: 'alloc' expr '[' expr ']' ';' 66 61 67 exprlist: expr (',' expr)* 62 68 … … 68 74 program: paramdecl* vardecl* function* 69 75 76 Example: 77 78 int[][] %a; 79 fun void %f(int %n, int %m) { 80 alloc %a, %n; 81 alloc %a[0], %m; 82 83 free %a; 84 } 70 85 71 86 }}} 87
