[antlr-interest] Help Needed with multiple alternatives

Alexander Gängel alexander at gaengel.de
Mon Feb 25 06:50:54 PST 2008


I still have this Problem but I think I search in the wrong spot.

can somebody explain me which rule makes the Problem?




Thanks
Alexander

Alexander Gängel schrieb:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080225/b1ec7a53/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: firstalternative.png
Type: image/png
Size: 14368 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080225/b1ec7a53/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: secondalternative.png
Type: image/png
Size: 21185 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080225/b1ec7a53/attachment-0003.png 


More information about the antlr-interest mailing list