|
@ -1293,7 +1293,7 @@ typedef enum { |
|
|
C = 1, |
|
|
C = 1, |
|
|
} language; |
|
|
} language; |
|
|
|
|
|
|
|
|
language lang = C, printLang = C; |
|
|
|
|
|
|
|
|
language printLang = C; |
|
|
|
|
|
|
|
|
int getProtoNumber(oop obj) { |
|
|
int getProtoNumber(oop obj) { |
|
|
return get(map_get(map_get(obj, __proto___symbol), __name___symbol), Symbol, prototype); |
|
|
return get(map_get(map_get(obj, __proto___symbol), __name___symbol), Symbol, prototype); |
|
@ -1445,9 +1445,8 @@ sCharSequence = ( escapeSequence | !EOL [^\"\\] )* #" |
|
|
|
|
|
|
|
|
primaryExpression = stringLiteral | constant | id |
|
|
primaryExpression = stringLiteral | constant | id |
|
|
| META_AT ( META_LCB x:mstmts { $$ = eval(globals, x) } |
|
|
| META_AT ( META_LCB x:mstmts { $$ = eval(globals, x) } |
|
|
| META_OPERATORS META_LPAREN x:mexp { $$ = eval(globals, x) } |
|
|
|
|
|
| META_LPAREN x:mexp { $$ = eval(globals, x) } |
|
|
|
|
|
| META_COMMA x:mcomma { $$ = eval(globals, x) } |
|
|
|
|
|
|
|
|
| META_OPERATORS META_LPAREN x:mvalue { $$ = eval(globals, x) } |
|
|
|
|
|
| x:mvalue { $$ = eval(globals, x) } |
|
|
) |
|
|
) |
|
|
| l:LPAREN x:expression r:RPAREN { $$= new_C_subexpr(l, x, r) } |
|
|
| l:LPAREN x:expression r:RPAREN { $$= new_C_subexpr(l, x, r) } |
|
|
| l:LPAREN x:compoundStatement r:RPAREN &{gnu} { $$= new_C_subexpr(l, x, r) } |
|
|
| l:LPAREN x:compoundStatement r:RPAREN &{gnu} { $$= new_C_subexpr(l, x, r) } |
|
@ -2158,22 +2157,18 @@ _FLOAT128 = '_Float128' !IDREST &{gnu} { $$= newToken("_Float1 |
|
|
# the semicolon has to be explicit with no space eaten afterwards to prevent the |
|
|
# the semicolon has to be explicit with no space eaten afterwards to prevent the |
|
|
# input buffer from moving past it before redirecting input from the imported file |
|
|
# input buffer from moving past it before redirecting input from the imported file |
|
|
|
|
|
|
|
|
metaCatch = META_AT @{ lang= META } ( META_OPERATORS META_LPAREN m:mexp { eval(globals, m) } |
|
|
|
|
|
| META_LPAREN m:mexp { eval(globals, m) } |
|
|
|
|
|
| META_LCB m:mstmts |
|
|
|
|
|
| META_IMPORT s:META_STRING ";" { inputStackPush(get(s, String, value)) } |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
metaCatch = META_AT ( META_OPERATORS META_LPAREN m:mvalue { eval(globals, m) } |
|
|
|
|
|
| META_LPAREN m:mvalue { eval(globals, m) } |
|
|
|
|
|
| META_LCB m:mstmts |
|
|
|
|
|
| META_IMPORT s:META_STRING ";" { inputStackPush(get(s, String, value)) } |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
mexp = @{ lang = META } s:meta_exp META_RPAREN @{ lang = C } { $$= s } |
|
|
|
|
|
| @{ lang = C } &{ 0 } |
|
|
|
|
|
|
|
|
|
|
|
mcomma = @{ lang = META } s:meta_exp @{ lang = C } { $$= s } |
|
|
|
|
|
| @{ lang = C } &{ 0 } |
|
|
|
|
|
|
|
|
mvalue = i:META_IDENT { $$ = newGetVariable(i) } |
|
|
|
|
|
| META_LPAREN ( i:meta_block | i:meta_exp ) META_RPAREN { $$ = i } |
|
|
|
|
|
|
|
|
mstmts = @{ lang = META } -- ( s:meta_stmt { eval(globals, s) })* META_RCB { lang = C } |
|
|
|
|
|
| @{ lang = C } &{ 0 } |
|
|
|
|
|
|
|
|
mstmts = ( s:meta_stmt { eval(globals, s) })* META_RCB |
|
|
|
|
|
| &{ 0 } |
|
|
|
|
|
|
|
|
meta_stmt = s:meta_block { $$ = s } |
|
|
meta_stmt = s:meta_block { $$ = s } |
|
|
| META_SEMICOLON { $$ = null } |
|
|
| META_SEMICOLON { $$ = null } |
|
|