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

Alexandre Porcelli porcelli at uol.com.br
Mon Apr 23 07:20:15 PDT 2007


Hi All,

  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."

  I could solve this problem (transforming all the 5 rules in just
one). Is this a bug? (attached the grammars).

PS: I'm using the latest version (antlr-04-21-2007.17)...

Best Regards,
Alexandre Porcelli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProblemCobolGrammar.g
Type: application/octet-stream
Size: 7404 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070423/1e84239a/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FixedCobolGrammar.g
Type: application/octet-stream
Size: 4502 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070423/1e84239a/attachment-0003.obj 


More information about the antlr-interest mailing list