[antlr-interest] Is tokenVocab an Option for Parser Grammars?

Jim Idle jimi at temporal-wave.com
Mon Aug 11 10:17:43 PDT 2008


On Sun, 2008-08-10 at 15:11 -0700, titech at metaorb.com wrote:

> I retested with the simple grammar files below.  The combined grammar works fine, but the separate parse file causes an error regarding the literals (error text below).  Do separate parse files require that all literals have associated lexer rules?


Yeah - you can't use literals in the parser unless you are using a
combined grammar. My advice to you is not to use literals in the parser,
at least not when starting out, as it can greatly confuse you as to
where the literals are being matched (it is always in the lexer).

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080811/09442256/attachment.html 


More information about the antlr-interest mailing list