[antlr-interest] Problem with Lexer.. may be a bug

Gavin Lambert antlr at mirality.co.nz
Tue Apr 24 04:05:33 PDT 2007


At 02:20 24/04/2007, Alexandre Porcelli wrote:
 >  I have a problem with my lex rules... I have 5 similar 
rules...
 >when I try to use all of then.. i got the following error 
message:
 >
 >"ANTLR could not analyze this decision in rule Tokens; often 
this
 >is because of recursive rule references visible from the left 
edge
 >of alternatives.  ANTLR will re-analyze the decision with a 
fixed
 >lookahead of k=1.  Consider using "options {k=1;}" for that
 >decision and possibly adding a syntactic predicate."

Well, I'm not sure why it'd generate that particular message (it 
doesn't for me), but the grammars you attached appear to declare 
and use COMMENTED_TEXT without actually defining it, which is 
illegal.



More information about the antlr-interest mailing list