David-Sarah Hopwood wrote:
[...]
> The default of not enabling backtracking is the right default, since the
> ambiguity warnings are more conservative and more likely to help in
> finding grammar errors. (To me this is more important than the loss
> of efficiency that can result from backtracking.) In this case, the
> left-factoring suggested by Jim Idle is a better solution than enabling
> backtracking, even though the latter would handle this particular
> grammar automatically...

... if the expr rule were changed to (expr1 | expr2) EOF, which is
needed anyway to reflect the intent of a finite language.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/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