[antlr-interest] Parser/Lexer rules final in generated code / manually implemented rules

Oliver Zeigermann oliver.zeigermann at gmail.com
Wed Dec 3 03:45:43 PST 2008


Folks!

Any idea why parser and lexer rules are final in generated code? If it
is for performance I doubt it does any significant speed up.

Anyway, how do I manually implement a certain lexer or parser rule? I
though of subclassing and overriding the specific rule. Which does not
work because of the final modifier.

Any chance to achieve this? Especially, when thinking of first and
follow computation for prediction code? Maybe one could specify this
manually?

Any hints welcome.

Cheers

Oliver


More information about the antlr-interest mailing list