[antlr-interest] reusing parser/lexer

Cristian Târşoagă cristian.tarsoaga at gmail.com
Thu Feb 2 03:53:11 PST 2012


Hi everybody,

I have a simple question: is it possible to reuse both a lexer and a parser
into some other grammar file?
I know that lexer rules can be accessed in a different grammar file by
using tokenVocab option

What happens if I have not just lexer but also parser rules that are common
to multiple grammars?
Putting all rules in one file is not feasible, it would become a too
large/complex file.


Thanks,
Chris


More information about the antlr-interest mailing list