[antlr-interest] Why does antlr not know alternative?

James Ladd james_ladd at hotmail.com
Mon Jan 9 17:05:38 PST 2012



Hi Gavin,

Using a syntactic predicate didn't fix the issue for me.
It also has the added down side of not being able to use ANTLRWorks to explore.

A. Is it possible to increase the lookahead for just one lexical token?
B. Would it be better to move NUMBER into a parse rule and then use something like
     { if input.LT(1).getText().equals(??) } to manually consume the rest of NUMBER?

Rgs, James.
 		 	   		  


More information about the antlr-interest mailing list