[antlr-interest] Predicate and problem with generated code
fridi
fridi70 at gmx.de
Thu Feb 11 12:35:05 PST 2010
Ok, I fixed the problem, my "b" was out of scope in that class and I
fixed it using a member.
But I still have a problem if the else-part is missing...
fridi schrieb:
> Hi,
>
> i have a parser rule for an if-else
>
> rule
> :
> IF^ expression 'then'! actionSequence ('else'! actionSequence)? 'endif'!
> ;
>
> The treewalker rule is
>
> ifElse
> :
> ^(
> IF b=expression
> (
> {b}?=> actionSequence .
> | . actionSequence
> )
> )
> ;
>
> The problem now is that the generated code for DFA1 and there the method
> specialStateTransition() does not know about my variable b
> Any ideas?
>
> Thanks in advance,
> fridi
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
More information about the antlr-interest
mailing list