[antlr-interest] C generator is not generating @after actions
Gavin Lambert
antlr at mirality.co.nz
Thu Feb 5 01:53:23 PST 2009
At 14:23 5/02/2009, Jim Idle wrote:
>@after is not supported in the C target. Use this:
>
>statement
>@init { /* Empty */ }
>: ( x | Y | x | g)
> {
> sse.afterStatement();
> }
>;
Isn't that semantically different? I thought the point of @after
is that it's like "finally" code -- it gets executed regardless of
success/failure/explosions. Whereas an inline block at the end of
the rule would only get executed on a successful match.
(Although parser rules should usually not fail anyway, so it may
be a moot point.)
More information about the antlr-interest
mailing list