Changes between Version 12 and Version 13 of CIVLite


Ignore:
Timestamp:
09/22/23 19:18:44 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CIVLite

    v12 v13  
    2525typedvar: type ID
    2626paramdecl: 'param' typedvar ('=' constant)? ';'
    27 vardecl: 'var' typedvar ';'
     27vardecl: typedvar ';'
    2828formallist: typedvar (',' typedvar)*
    29 function: 'fun' type ID '(' formallist? ')' '{' (typedvar ';')* labelnode* '}'
     29function: type ID '(' formallist? ')' '{' (typedvar ';')* labelnode* '}'
    3030labelnode: (ID ':')? node
    3131node: transition ('or' transition)* // multiple transitions may depart a node
     
    5959Array example:
    6060{{{
    61 fun int[][] %zero2d(int %n, int %m) {
     61int[][] %zero2d(int %n, int %m) {
    6262  int[][] %a;
    6363  %a = array(int[], %n, array(int, %m, 0));
     
    6868Example:
    6969{{{
    70 fun void %thread(int %tid) {
     70void %thread(int %tid) {
    7171  print "Hello from thread ", %tid, "\n";
    7272}
    73 fun void %main() {
     73void %main() {
    7474  proc %p1;
    7575  proc %p2;
     
    8787int %s1 = 0;
    8888
    89 fun void t0() {
     89void t0() {
    9090  print "t0 is before the barrier\n";
    9191  %s0 = 1;
     
    9494}
    9595
    96 fun void t1() {
     96void t1() {
    9797  print "t1 is before the barrier\n";
    9898  %s0 -> %s0 = 0;
     
    101101}
    102102
    103 fun void main() {
     103void main() {
    104104  proc %p0;
    105105  proc %p1;