[antlr-interest] Lexer inheritance

Paul J. Lucas dude at darkfigure.org
Fri Oct 18 10:20:29 PDT 2002


So, even though one can inherit grammars, there's no mention of the ability to inherit lexers.  If I have several lexers implementing what otherwise would be done with lexical states, I'd like to have a "base" lexer that is able to return tokens like string literals, comments, etc.  Apparantly, if I have multiple lexers, I have to repeat the pattern rules for common items in every lexer.

Is there an easier way?  If not, why not?

- Paul


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list