[antlr-interest] Semantic predicate hoisting - How to turn off? (somewhat urgent)

Panayiotis panayk at gmail.com
Tue May 29 12:16:02 PDT 2007


Hi!

In ANTLR 3 is the new semantic predicate hoisting feature turned on by 
default?
I believe it is, because I'm getting javac errors like:

[21:47:11] \tmp\antlrworks\pclParser.java:4225: cannot find symbol
[21:47:11] symbol  : variable f
[21:47:11] location: class pclParser
[21:47:11]                         if ( 
(((evalPredicate(we,"$we.is_l_value")&&evalPredicate(f,"$f.is_l_value"))||evalPredicate(we,"$we.is_l_value"))) 
) {

when in fact "$we.is_l_value" and "$f.is_l_value" never appear in the 
same rule. Either that or am I doing something fundamentally wrong :-) .
There were literally dozens of similar errors that disappeared as soon 
as I added the option "k=1;". Is there a similar option to disable 
predicate hoisting and any other advanced features ANTLR may have 
enabled by default?

I need to get this working within the week, so I'll greatly appreciate 
any help you can offer me!


More information about the antlr-interest mailing list