[antlr-interest] Avoiding the generation of final methods

Sam Barnett-Cormack s.barnett-cormack at lancaster.ac.uk
Thu Apr 16 08:29:31 PDT 2009


Patrick Schönbach wrote:
> 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?

Why do you want the parse methods to be non-final? You can subclass the 
lexer/parser as long as the *class* isn't final. You just can't override 
the final methods, and it's probably not a great idea to be overriding 
the actual parse methods themselves.

Sam



More information about the antlr-interest mailing list