[antlr-interest] Avoiding the generation of final methods

Andreas Meyer andreas.meyer at smartshift.de
Thu Apr 16 08:11:52 PDT 2009


Patrick Schönbach schrieb:
> Hi all,
>
> usually, AntLR generates final methods for each rule. However, 
> sometimes, one would like to subclass the parser. Is there a way to 
> generate non-final methods?
>
> Regards,
> Patrick
>
>   

Maybe there is a better method, but from what I have learned, there are 
"string templates" for each language target. So basically, you could get 
the ANTLR source code, copy/edit the java-target, such that the keyword 
"final" is missing. If that fits your needs.

Best,
Andreas


More information about the antlr-interest mailing list