|
@ -1005,7 +1005,7 @@ oop listEnd(void) |
|
|
return list; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
oop List_addLast(oop list, oop obj) { |
|
|
|
|
|
|
|
|
void List_addLast(oop list, oop obj) { |
|
|
assert(list); |
|
|
assert(list); |
|
|
map_append(list, obj); |
|
|
map_append(list, obj); |
|
|
} |
|
|
} |
|
@ -1317,9 +1317,9 @@ declaration = @{ C_declarationBegin() } |
|
|
declarationSpecifiers = @{ int specified= 0 } { listBegin() } |
|
|
declarationSpecifiers = @{ int specified= 0 } { listBegin() } |
|
|
( s:storageClassSpecifier { listAppend(s) } |
|
|
( s:storageClassSpecifier { listAppend(s) } |
|
|
| s:typeSpecifier @{ specified++ } { listAppend(s) } |
|
|
| s:typeSpecifier @{ specified++ } { listAppend(s) } |
|
|
#| | s:typedefName &{ !specified++ } { listAppend(s) } |
|
|
|
|
|
#| | s:typeQualifier { listAppend(s) } |
|
|
|
|
|
#| | s:functionSpecifier { listAppend(s) } |
|
|
|
|
|
|
|
|
| s:typedefName &{ !specified++ } { listAppend(s) } |
|
|
|
|
|
| s:typeQualifier { listAppend(s) } |
|
|
|
|
|
| s:functionSpecifier { listAppend(s) } |
|
|
)+ { $$= listEnd() } |
|
|
)+ { $$= listEnd() } |
|
|
| &{gnu} { $$= listEmpty() } |
|
|
| &{gnu} { $$= listEmpty() } |
|
|
|
|
|
|
|
@ -1623,7 +1623,7 @@ externalDeclaration = { yylval = newComment(yytext); } |
|
|
| ( SEMI &{gnu} |
|
|
| ( SEMI &{gnu} |
|
|
| c:constant { yylval = c; } #################| TODO |
|
|
| c:constant { yylval = c; } #################| TODO |
|
|
| declaration |
|
|
| declaration |
|
|
#| | functionDefinition |
|
|
|
|
|
|
|
|
| functionDefinition |
|
|
#| | meta |
|
|
#| | meta |
|
|
| &. &{ errmsg= "declaration expected" } error |
|
|
| &. &{ errmsg= "declaration expected" } error |
|
|
) { yylval= $$; } |
|
|
) { yylval= $$; } |
|
|