[antlr-interest] Any way to specify superclasses for the lexer and parser in a combined grammar?
David-Sarah Hopwood
david-sarah at jacaranda.org
Tue Sep 8 13:00:15 PDT 2009
Jim Idle wrote:
> Further than this though I always suggest that in production you use separate
> lexer and parser grammars and use superclasses for any support methods or
> overrides such as displayRecognitionError. Keep all the code that you can out of
> the .g file.
I'd like to put support code in superclasses, but would prefer not to
separate the lexer and parser grammars. Is there any way to do that (without
changing the Java target templates)?
<http://www.antlr.org/jira/browse/ANTLR-375> seems relevant, but it is
shown as not fixed.
--
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
More information about the antlr-interest
mailing list