Changes between Version 12 and Version 13 of CIVLite
- Timestamp:
- 09/22/23 19:18:44 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CIVLite
v12 v13 25 25 typedvar: type ID 26 26 paramdecl: 'param' typedvar ('=' constant)? ';' 27 vardecl: 'var'typedvar ';'27 vardecl: typedvar ';' 28 28 formallist: typedvar (',' typedvar)* 29 function: 'fun'type ID '(' formallist? ')' '{' (typedvar ';')* labelnode* '}'29 function: type ID '(' formallist? ')' '{' (typedvar ';')* labelnode* '}' 30 30 labelnode: (ID ':')? node 31 31 node: transition ('or' transition)* // multiple transitions may depart a node … … 59 59 Array example: 60 60 {{{ 61 funint[][] %zero2d(int %n, int %m) {61 int[][] %zero2d(int %n, int %m) { 62 62 int[][] %a; 63 63 %a = array(int[], %n, array(int, %m, 0)); … … 68 68 Example: 69 69 {{{ 70 funvoid %thread(int %tid) {70 void %thread(int %tid) { 71 71 print "Hello from thread ", %tid, "\n"; 72 72 } 73 funvoid %main() {73 void %main() { 74 74 proc %p1; 75 75 proc %p2; … … 87 87 int %s1 = 0; 88 88 89 funvoid t0() {89 void t0() { 90 90 print "t0 is before the barrier\n"; 91 91 %s0 = 1; … … 94 94 } 95 95 96 funvoid t1() {96 void t1() { 97 97 print "t1 is before the barrier\n"; 98 98 %s0 -> %s0 = 0; … … 101 101 } 102 102 103 funvoid main() {103 void main() { 104 104 proc %p0; 105 105 proc %p1;
