[antlr-interest] [v3] parser rules are final

Wincent Colaiuta win at wincent.com
Fri Jun 8 02:07:33 PDT 2007


El 8/6/2007, a las 10:22, Sven Efftinge escribió:

> 2nd Question:
> Is there a way to say Antlr not to add the final keyword?

ANTLR's output is generated using StringTemplate. If you dare, you  
could try tweaking the Java template to tailor the output as you  
desire, then rebuilding ANTLR. I believe this is the template that  
you'd need to modify:

<http://fisheye2.cenqua.com/browse/antlr/src/org/antlr/codegen/ 
templates/Java/Java.stg?r=3682>

But I imagine it's a non-trivial task, and any change to the template  
could have unanticipated ripple effects, so is not to be taken  
lightly...

Cheers,
Wincent



More information about the antlr-interest mailing list