[antlr-interest] ... my error rose a syntactic predicate problem in tree parsers
Anthony Brenelière
abreneliere at telys.com
Thu Feb 20 08:42:58 PST 2003
Yes, the syntactic predicate was only needed when i had that
non-determinism error.
So i added a syntactic predicate because i had the set rule that was
identified with the token R_ENT instead of the token R_SET.
But yes, a tree should be done in a way with no needed syntactic
predicate.
Cheers,
Anthony
> I avoid syntactic predicates in my tree parser by rearranging my tree
and
> using imaginary node types when appropriate. You should not need a
rule
> like this:
> entOrSet
> : ( R_ENT )=> entity
> | ( R_SET )=> set
> ;
>
> This should work fine:
>
> entOrSet
> : entity
> | set
> ;
>
> Monty
>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list