At 23:48 26/11/2008, chain one wrote:
>Could someone tell me what the difference is between the 
>following two rules?
>
>stat
>options{backtrack=true}
>: declaration
>| expression
>;
>
>stat
>:(declaration)=> declaration
>| expression
>;

As I understand it, the former could end up behaving identically 
to the latter if ANTLR determines that there's any possibility of 
ambiguity between declaration and expression.  Otherwise the 
former is identical to the latter without the use of the synpred 
(or itself without the option).

The latter on the other hand will always try to pre-evaluate 
declaration.


I could be wrong, though.


List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to