[antlr-interest] semantic predicate
Alexey Demakov
demakov at ispras.ru
Mon May 30 23:57:50 PDT 2005
No, rule will not be called when semantic predicate is in alternative
from where rule is called. Semantic predicate in rule have no effect
on call, but is additional state check.
So, rule will not be called in this situation:
another_rule:
{ false }? rule
| ANOTHER_TOKEN
;
Try to look at ANTLR generated code.
Regards,
Alexey
-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com
----- Original Message -----
From: Lloyd Dupont
To: antlr-interest at antlr.org
Sent: Tuesday, May 31, 2005 10:39 AM
Subject: [antlr-interest] semantic predicate
do they work?
normaly a rule (or subrule) like
rule: { false }? SOME_TOKEN;
should never be called!
unfortunately, if I added it I have plenty of error messages!
kind of puzzled...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050531/61b59699/attachment.html
More information about the antlr-interest
mailing list