[antlr-interest] Nondeterminism and syntantic/semantic predicates info
Monty Zukowski
monty at codetransform.com
Wed Aug 4 15:38:37 PDT 2004
On Aug 4, 2004, at 1:26 PM, Joan Pujol wrote:
> And it is possible that ANTLR is not enough intelligent and give me
> nondeterminism warnings when the gramar is well determined?
Some nondeterminisms are acceptable, for instance the if/else
ambiguity. It truly is non-deterministic. However, the code that
ANTLR generates handles it the way you would expect. Being
nondeterministic means that ANTLR can't predict which alternative to
choose because of overlapping lookahead sets.
You could give Ter's PhD Thesis a read (on antlr.org,) it sure gives a
lot of detail on lookahead computations.
Inspecting the code is the best bet. If you can tell that it will do
the right thing then you can ignore the warning.
Monty
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list