Changes between Version 22 and Version 23 of CIVLite


Ignore:
Timestamp:
06/01/24 11:54:20 (2 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CIVLite

    v22 v23  
    4545exprlst: expr (',' expr)*
    4646lval: ID | lval '[' expr ']'
    47 
    48 expr: lval | constant | string |  '(' expr ')' | expr '+' expr
    49   | ... // + - * / mod  - == != >= > < <= && || ! ...
     47binop: 'add' | 'sub' | 'mul' | 'div' | 'mod' | 'eq' | 'neq' | 'lt' | 'lte' | 'and' | 'or'
     48unop: 'neg' | 'not'
     49expr: lval | constant | string
     50  | unop '(' expr ')'
     51  | binop '(' expr ',' expr ')'
    5052  | 'ite' '(' expr ',' expr ',' expr ')'
    5153  | '(' type ')' 'array' '(' expr ',' expr ')' // (T[])array(length, value)
     
    129131void %main() {
    130132  choose {
    131     %x>0 -> noop;
     133    lt(0,%x) -> noop;
    132134    else -> noop goto @L1;
    133135  }
     
    144146== Source Information ==
    145147
    146 Source information goes in a separate meta-data file.   The lines and tokens correspond 1-1 with entires in the code file.  The entries in the code file specify source info.  E.g.,
     148Source information goes in a separate meta-data file.   The tokens correspond 1-1 with the tokens in the code source file. Example:
    147149
    148150Code:
     
    154156Tokens are:
    155157
    156 line 1: `%x`  `[`  `%i`  `]`  `=`  `17`  `;`
    157 line2: `%y`  `=`  `0`  `;`
     158`%x`  `[`  `%i`  `]`  `=`  `17`  `;` `%y`  `=`  `0`  `;`
    158159
    159 Meta-data file:
     160Meta-data file looks something like this:
    160161{{{
    161 1.345.0  1.345.1  1.345.2  1.345.3  1.345.4  1.345.5  1.345.6
    162 2.17.4  2.17.5  3.543.6  2.17.6
     1621:345  1:346  1:347  1:348  1:349  1:440  1:441 1:442 1:443  1:444  1:445
    163163}}} 
    164164
    165 The structure 1.345.0 indicates "file #1, line 345, token #0".
     165The structure 1:345 indicates "file 1, token 345".