208209210211212213214215216217218
case PLUS: jj_consume_token(PLUS); rightChild = TermLvl2(); node = new ASTNode('+'); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; case MINUS: jj_consume_token(MINUS); rightChild = TermLvl2();
215216217218219220221222223224225
break; case MINUS: jj_consume_token(MINUS); rightChild = TermLvl2(); node = new ASTNode('-'); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; case BOOLEAN_LOGIC: t = jj_consume_token(BOOLEAN_LOGIC);
216217218219220221222223224225226
case MINUS: jj_consume_token(MINUS); rightChild = TermLvl2(); node = new ASTNode('-'); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; case BOOLEAN_LOGIC: t = jj_consume_token(BOOLEAN_LOGIC); rightChild = TermLvl2();
236237238239240241242243244245246
else if (s.equalsIgnoreCase("xor")) { type = ASTNode.Type.LOGICAL_XOR; } node = new ASTNode(type); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; case COMPARISON: t = jj_consume_token(COMPARISON);
237238239240241242243244245246247
{ type = ASTNode.Type.LOGICAL_XOR; } node = new ASTNode(type); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; case COMPARISON: t = jj_consume_token(COMPARISON); rightChild = TermLvl2();
269270271272273274275276277278279
else if (s.equalsIgnoreCase("<=")) { type = ASTNode.Type.RELATIONAL_LEQ; } node = new ASTNode(type); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; default: jj_la1[7] = jj_gen;
270271272273274275276277278279280
{ type = ASTNode.Type.RELATIONAL_LEQ; } node = new ASTNode(type); node.addChild(leftChild); node.addChild(rightChild); leftChild = node; break; default: jj_la1[7] = jj_gen; jj_consume_token(-1);
424425426427428429430431432433434
return node; case MINUS: jj_consume_token(MINUS); node = Primary(); ASTNode uiMinus = new ASTNode('-'); uiMinus.addChild(node); return uiMinus; case NOT: jj_consume_token(NOT); node = TermLvl1(); ASTNode not = new ASTNode(Type.LOGICAL_NOT);
430431432433434435436437438439440
return uiMinus; case NOT: jj_consume_token(NOT); node = TermLvl1(); ASTNode not = new ASTNode(Type.LOGICAL_NOT); not.addChild(node); return not; case LOG: jj_consume_token(LOG); child = Primary(); node = new ASTNode(Type.FUNCTION_LN);