[antlr-interest] C generator is not generating @after actions
Jim Idle
jimi at temporal-wave.com
Wed Feb 4 17:23:42 PST 2009
Andy Grove wrote:
> Hi,
>
> Here's an extract from a grammar I am working with:
>
> statement
> @init { /* Empty */ }
> @after { sse.afterStatement(); }
> :
> /* rest omitted */
>
> When I generate Java code from this grammar, I see both the @init and
> @after action code generated. However, when I generate C code I see
> the @init but not the @after code.
>
> Is this feature not supported in the C target?
>
> Thanks,
>
> Andy.
>
@after is not supported in the C target. Use this:
statement
@declarations
@init { /* Empty */ }
: ( x | Y | x | g)
{
sse.afterStatement();
}
;
More information about the antlr-interest
mailing list