Hi all,
I'm trying to use the += in the following rule, but I'm not sure if my
use of it is correct.
Does anyone have any thoughts?
I'm trying to convert:
rule != "working" and mental_state == "distressed"
into:
rule != "working" && mental_state == "distressed"
Obviously, this snippet of grammar doesn't cover the expressions
(andExpr) on either side of the "and", but I hope it gives you a flavour
of what I'm trying to achieve.
orExpr
: a=andExpr (OR b+=andExpr)* -> template(a={$a.text}, bf={$b})
"<a><bf; separator=\" && \">"
;
Regards,
Tim.
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.