[antlr-interest] Re: Please make ANTLR check for missing/redefined tokens

Greg Lindholm glindholm at yahoo.com
Mon Jun 24 07:50:08 PDT 2002

Ya I sorta have the same issue; I exportVocab from the lexer, and
importVocab in the parser.  As I'm developing the parser I need to
periodically check the ParserTokenTypes for surprises.  (If I mis-type
a token name or forget something in the lexer it shows up in the
ParserTokenTypes as a new token type.)

It would be nice it you could tell Antlr that all the legal tokens are
from the importVocab or the Tokens section and warn me if you find any


--- lgcraymer <lgc at mail1.jpl.nasa.gov> wrote:
> Brian--
> Try putting the lexer and parser in separate files with the 
> "exportVocab" option set in the lexer and "importVocab" option set in
> the parser to refer to the same vocabulary.  Then process the two .g 
> files, being careful to process the lexer .g file first to generate 
> the <vocab>.txt file.
> Does this help?  It should statically associate the parser grammar 
> with the lexer.
> --Loring

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup


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

More information about the antlr-interest mailing list