[antlr-interest] failed predicate problem
YINGAnnie
yimm8369 at hotmail.com
Sun Mar 15 19:36:07 PDT 2009
Hello everyone,
There is my tree grammar, what I want to do is when $memberExpression.text.equals("Math.abs"), run the template of mathabs.
callExpression
: ^(CALL_EXPRESSION memberExpression indexSuffix * propertyReferenceSuffix* argumentSuffix*)
{$memberExpression.text.equals("Math.abs")}? ->mathabs(x={$argumentSuffix.text})
;
When memberExpression is not equal to "Math.abs", everytime the parser goes to callExpression, the error of
F:\Treegrammar.g: node from after line 4:28 rule callExpression failed predicate: {$memberExpression.text.equals("Math.abs")}? occur.
Does that an error, or I can just ignor that.
The even weird error is that when the memberExpression is equal to "Math.abs", and the template of mathabs do run, however , the failed predicate error is still there.
any idea?
Annie
_________________________________________________________________
MSN 表情魔法书,改变你的对话时代!
http://im.live.cn/emoticons/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090316/20e67806/attachment.html
More information about the antlr-interest
mailing list