|
@ -1343,7 +1343,7 @@ oop everyExternalDeclaration(oop s) |
|
|
return s; |
|
|
return s; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
oop ensure(oop s, int id) |
|
|
|
|
|
|
|
|
oop ensure(int id, oop s) |
|
|
{ |
|
|
{ |
|
|
if (is(Map, s)) { |
|
|
if (is(Map, s)) { |
|
|
oop protoSymbol = map_get(s, __proto___symbol); |
|
|
oop protoSymbol = map_get(s, __proto___symbol); |
|
@ -1380,7 +1380,12 @@ error = EOL* < (!EOL .)* EOL* (!EOL .)* > &{ error(yytext), 1 } |
|
|
idOpt = id | {$$=newNullObject()} |
|
|
idOpt = id | {$$=newNullObject()} |
|
|
|
|
|
|
|
|
id = <ID> { $$= new_C_id(yytext) } - |
|
|
id = <ID> { $$= new_C_id(yytext) } - |
|
|
| META_AT META_LPAREN m:meta_exp META_RPAREN { $$= ensure(eval(globals,m), t_C_id) } - |
|
|
|
|
|
|
|
|
| m:metaId { $$= ensure(t_C_id, eval(globals,m)) } - |
|
|
|
|
|
| m:mmetaId { $$= m } - |
|
|
|
|
|
|
|
|
|
|
|
metaId = META_AT META_LPAREN m:meta_exp META_RPAREN { $$= m} |
|
|
|
|
|
|
|
|
|
|
|
mmetaId = META_AT META_AT META_LPAREN m:meta_exp META_RPAREN { $$= m} |
|
|
|
|
|
|
|
|
ID = <NAME> &{ !is_C_keyword(yytext) } |
|
|
ID = <NAME> &{ !is_C_keyword(yytext) } |
|
|
|
|
|
|
|
@ -1495,9 +1500,10 @@ hexadecimalEscapeSequence = '\\x' hexadecimalDigit+ |
|
|
|
|
|
|
|
|
# 6.4.5 |
|
|
# 6.4.5 |
|
|
|
|
|
|
|
|
stringLiteral = { listBegin(); } |
|
|
|
|
|
( s:stringLiteralPart { listAppend(s) } |
|
|
|
|
|
)+ { $$= new_C_stringLiteral(listEnd()) } |
|
|
|
|
|
|
|
|
stringLiteral = { listBegin(); } |
|
|
|
|
|
( s:stringLiteralPart { listAppend(s) } |
|
|
|
|
|
| META_AT META_AT META_LPAREN m:meta_exp META_RPAREN { listAppend(m) } |
|
|
|
|
|
)+ { $$= new_C_stringLiteral(listEnd()) } |
|
|
|
|
|
|
|
|
stringLiteralPart = < '"' sCharSequence '"' > { $$= new_C_string(yytext) } - |
|
|
stringLiteralPart = < '"' sCharSequence '"' > { $$= new_C_string(yytext) } - |
|
|
| < 'L''"' sCharSequence '"' > { $$= new_C_string(yytext) } - |
|
|
| < 'L''"' sCharSequence '"' > { $$= new_C_string(yytext) } - |
|
@ -1803,7 +1809,7 @@ declarator = # An attribute specifier list may appear immediately before a de |
|
|
) { $$= d } |
|
|
) { $$= d } |
|
|
|
|
|
|
|
|
directDeclarator = ( l:LPAREN d:declarator r:RPAREN { d= new_C_subexpr(l, d, r) } |
|
|
directDeclarator = ( l:LPAREN d:declarator r:RPAREN { d= new_C_subexpr(l, d, r) } |
|
|
| &( <ID> @{ declarationId(yytext) } ) |
|
|
|
|
|
|
|
|
| &( <ID> @{ declarationId(yytext) } | metaId | mmetaId ) # fix me for meta typedef |
|
|
d:id |
|
|
d:id |
|
|
) |
|
|
) |
|
|
( @{ C_scopeBegin() } |
|
|
( @{ C_scopeBegin() } |
|
@ -4054,6 +4060,10 @@ void outputNode(oop node) |
|
|
outputNode(map_get(node, expression_symbol)); |
|
|
outputNode(map_get(node, expression_symbol)); |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
|
|
|
if (proto_number < t_C_declaration) { |
|
|
|
|
|
outputNode(eval(globals, node)); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
printf("I cannot print a node with proto_number %i\n", proto_number); |
|
|
printf("I cannot print a node with proto_number %i\n", proto_number); |
|
|
exit(0); |
|
|
exit(0); |
|
|
} |
|
|
} |
|
|