[antlr-interest] Semantic predicates
naveen.chwl at googlemail.com
Sun Oct 18 11:45:04 PDT 2009
Yes, I alluded to that in another thread, "How to make a syntactic predicate
exit a rule completely". I am a beginner in this area, but I think that what
you said is true of syntactic predicates as well. I think it would make
ANTLR more powerful, if this feature existed (of not matching a rule if all
or the only predicate(s) fail in it), but as Jim pointed out, there could be
problems such as bad development practices. If you do use predicates,
it would seem more intuitive to work that way.
2009/10/17 David-Sarah Hopwood david-sarah at jacaranda.org
> I think we have to interpret this as an ANTLR bug, not the grammar writer
> being confused. Conceptually, a gated semantic predicate with a single
> alternative has a clear meaning: if the predicate fails then it should be
> equivalent to a rule that never matches. It would be very strange for it
> to mean anything else.
> David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest