[antlr-interest] Actions and non-LL(*) rules ??

Marcin Rzeźnicki marcin.rzeznicki at gmail.com
Sun May 2 14:43:05 PDT 2010


Good day to all of you
I have just encountered weird issue and I can't think of any way to
resolve my problem.
First, I prepared my grammar - free of any actions - and compiled a
parser without an issue. Next, I started adding actions - being
halfway done I compiled parser again to debug/check some things. It
compiled without any error or complaint about non-LL(*) rules, mind
you - just few ambiguities which I chose to live with as they were
minor issue at that point. After adding few more actions, input
parameters, results from production etc I tried to compile grammar
again and I was surprised by ANTLR tool complaining about non-LL(*)
alts here and there. I did not change the "structure" of the grammar,
just added actions etc. Now, I am lost. I know this question may sound
a bit vague, but I cannot confine this problem to anything. Does
anyone know whether (and why) adding actions/input parameters to
grammar's productions may confuse ANTLR to report non-LL(*)
alternatives on previously well-defined LL(*) grammar? Thanks for any
hints
PS. I am not giving examples because the whole grammar is quite large
and probably messy. Thus, I am just looking for some general hints.
-- 
Greetings
Marcin Rzeźnicki


More information about the antlr-interest mailing list