[antlr-interest] Help Needed with multiple alternatives

Alexander Gängel alexander at gaengel.de
Sun Feb 24 14:08:00 PST 2008


I found the problem but still have no working solution.

I tried to get around it by using scoping and Semantic Predicates.

so I set a scope with a boolean man variable and wanted to make a 
decision like {$exp::name}=> ... | so that the rule chooses the first 
alternative when $exp::name is set true and the other solution if it is 
false.

Is this possible, cause right now it's not working, but there may be 
some other error still in the rule.

Alexander

Alexander Gängel schrieb:
> I just can't get my grammar to work without having a multiple 
> alternatives problem.
>
> I have some nested expression rules to get the precedence of the 
> different operations.
>
> The problem occures since I added the letexpression  rule to exp_direct
>
> I hope someone can give me a hint how to solve this.
>
> Thanks Alexander


More information about the antlr-interest mailing list