[antlr-interest] Parser grammar using tokens not in the tokenVocab= file

Stevenson, Todd (GE Healthcare) Todd.T.Stevenson at ge.com
Thu Apr 29 08:52:28 PDT 2010


I am writing a language with the parser and lexer in separate files. By
using the tokenVocab= directive, I would think that all the tokens used
by the parser must be defined in the lexer.  However, antlr returns no
errors when I reference a token in the parser grammar that is not
defined in the lexer grammar.   Is this correct behavior is do I have
something configured incorrectly?
 
thanks.
 
 


More information about the antlr-interest mailing list