terminal SUB;
terminal MULT;
terminal DIV;
+ terminal SUM;
terminal NOT;
terminal LT;
terminal EQ;
terminal NE;
-
terminal FORALL;
terminal IN;
terminal INTEST;
;
expr ::=
-
- ID:var
+
+ SUM OPENPAREN ID:set DOT ID:relation CLOSEPAREN
+ {:
+ debugMessage(PRODSTRING);
+ ParseNode expr = new ParseNode("sumexpr", parser.curLine(3));
+ expr.addChild("dot").addChild("set", parser.curLine(3)).addChild(set);
+ expr.getChild("dot").addChild("relation", parser.curLine(1)).addChild(relation);
+ RESULT = expr;
+ :}
+
+ | ID:var
{:
debugMessage(PRODSTRING);
ParseNode expr = new ParseNode("expr", parser.curLine(1));
debugMessage(PRODSTRING);
RESULT = (new ParseNode("literal", parser.curLine(1))).addChild("decimal").addChild(dec).getRoot();
:}
+
+ | SUB DECIMAL:dec
+ {:
+ debugMessage(PRODSTRING);
+ RESULT = (new ParseNode("literal", parser.curLine(1))).addChild("decimal").addChild("-"+dec).getRoot();
+ :}
| STRING:str
{: