[antlr-interest] Position of Action Blocks in Combination with Rewrites

Gavin Lambert antlr at mirality.co.nz
Sun Oct 5 12:34:11 PDT 2008


At 07:39 6/10/2008, Randall R Schulz wrote:
 >I just discovered that in parser rules with both a rewrite 
clause
 >_and_ an action block, the action block must _precede_ the 
rewrite
 >clause or the generated Java code is malformed and will not 
compile.
[...]
 >I don't know if this is a bug or not, but I thought I'd report 
it.

I don't believe it is a bug.  Code blocks within a rewrite clause 
are assumed to be an expression to be inserted into the rewrite 
tree, IIRC.

(I keep forgetting about that, though.)



More information about the antlr-interest mailing list