[antlr-interest] Re: Syntatic predicates...
lgc at mail1.jpl.nasa.gov
Mon May 17 13:07:04 PDT 2004
--- In antlr-interest at yahoogroups.com, Tom Verbeure <hombre at g...> wrote:
> Hello All,
> What would prevent me to generously spread around syntatic predicates
> to resolve non-determinisms in my grammar? I've noticed that adding
> them can magically solve a lot problems.
Nothing--I've found that synpreds help in bringing a grammar up. Once
you have it working, you can go back and carefully refactor to
eliminate many of them.
> rule1 : ruleA
> | ruleB;
> can give me loads of trouble, while
> rule1: (ruleA) => ruleA
> | ruleB;
> doesn't. I understand that there may be performance issues or that it
Bingo! Also maintainability to some extent.
> may be considered impure to do this if there are other ways to solve
> it. In addition, it may encourage me not to investigate the core
> reason for nondeterministic rules. (Can a syntatic predicate hide real
> But are there other fundamental disadvantages with this that I should
> be aware of?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest