On Nov 1, 2008, at 2:25 PM, Ben Gillis wrote:

> ...but, this is the exact-same rules, same order in the grammar  
> file; just a subset of the grammar where these same rules do display  
> the synpred.
> Why ANTLR needs to backtrack in one and not the other I'm not clear  
> on.

  different grammars have different lookahead requirements.

a : A | B ; is LL(1)

a : A B | A C ; is LL(2)

a : A+ B | A+ C; is LL(*)

a : e '.' | e ';' ; // requires backtracking
e : '(' e ')' | INT ;

Change e to

e : INT ;

and you don't need backtracking anymore

> (So, back to the Definitive Guide on b/t'ing for clues will help?)

yep. ;)

Ter

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