[antlr-interest] Problem with fatal error on recursive rules.

troy runkel trunkel at gmail.com
Mon Jun 18 10:38:36 PDT 2007


Greetings,

I'm working on a T-SQL grammar and have run into a problem that I'm
unsure how to resolve.  I've attached a subset of the grammar that
demonstrates the problem.  Below is a copy of the error message that
I'm getting.  I understand why I'm getting the warnings, but not
what's causing the fatal error.  Any help you could offer would be
greatly appreciated.  Thanks.

Troy Runkel

ANTLR Parser Generator  Version 3.0 (May 17, 2007)  1989-2007
error(211): TSQL.g:20:23: [fatal] rule alter_procedure has non-LL(*)
decision due to recursive rule invocations reachable from alts 1,2.
Resolve by left-factoring or using syntactic predicates or using
backtrack=true option.
warning(200): TSQL.g:20:23: Decision can match input such as "'ALTER'"
using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): TSQL.g:20:23: Decision can match input such as "'BEGIN'"
using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TSQL.g
Type: application/octet-stream
Size: 547 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070618/0015a123/attachment.obj 


More information about the antlr-interest mailing list