Changes between Version 22 and Version 23 of CIVLite
- Timestamp:
- 06/01/24 11:54:20 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CIVLite
v22 v23 45 45 exprlst: expr (',' expr)* 46 46 lval: ID | lval '[' expr ']' 47 48 expr: lval | constant | string | '(' expr ')' | expr '+' expr 49 | ... // + - * / mod - == != >= > < <= && || ! ... 47 binop: 'add' | 'sub' | 'mul' | 'div' | 'mod' | 'eq' | 'neq' | 'lt' | 'lte' | 'and' | 'or' 48 unop: 'neg' | 'not' 49 expr: lval | constant | string 50 | unop '(' expr ')' 51 | binop '(' expr ',' expr ')' 50 52 | 'ite' '(' expr ',' expr ',' expr ')' 51 53 | '(' type ')' 'array' '(' expr ',' expr ')' // (T[])array(length, value) … … 129 131 void %main() { 130 132 choose { 131 %x>0-> noop;133 lt(0,%x) -> noop; 132 134 else -> noop goto @L1; 133 135 } … … 144 146 == Source Information == 145 147 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.,148 Source information goes in a separate meta-data file. The tokens correspond 1-1 with the tokens in the code source file. Example: 147 149 148 150 Code: … … 154 156 Tokens are: 155 157 156 line 1: `%x` `[` `%i` `]` `=` `17` `;` 157 line2: `%y` `=` `0` `;` 158 `%x` `[` `%i` `]` `=` `17` `;` `%y` `=` `0` `;` 158 159 159 Meta-data file :160 Meta-data file looks something like this: 160 161 {{{ 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 162 1:345 1:346 1:347 1:348 1:349 1:440 1:441 1:442 1:443 1:444 1:445 163 163 }}} 164 164 165 The structure 1 .345.0 indicates "file #1, line 345, token #0".165 The structure 1:345 indicates "file 1, token 345".
