final public Expression NotExpression() throws ParseException {Token t; Expression exp, result = null; ArrayList nots = new ArrayList(); label_2: while (true) { t = jj_consume_token(EXCLAM); nots.add(t); switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case EXCLAM:{ ; break; } default: jj_la1[4] = jj_gen; break label_2; } } exp = PrimaryExpression(); for (int i = 0; i < nots.size(); i++) { result = new NotExpression(exp); Token tok = (Token) nots.get(nots.size() -i -1); result.setLocation(template, tok, exp); exp = result; } {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression Parenthesis() throws ParseException {Expression exp, result; Token start, end; start = jj_consume_token(OPEN_PAREN); exp = Expression(); end = jj_consume_token(CLOSE_PAREN); result = new ParentheticalExpression(exp); result.setLocation(template, start, end); {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression AndExpression() throws ParseException {Expression lhs, rhs, result; lhs = EqualityExpression(); result = lhs; label_5: while (true) { if (jj_2_6(2147483647)) { ; } else { break label_5; } jj_consume_token(AND); rhs = EqualityExpression(); booleanLiteralOnly(lhs); booleanLiteralOnly(rhs); result = new AndExpression(lhs, rhs); result.setLocation(template, lhs, rhs); lhs = result; } {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression OrExpression() throws ParseException {Expression lhs, rhs, result; lhs = AndExpression(); result = lhs; label_6: while (true) { if (jj_2_7(2147483647)) { ; } else { break label_6; } jj_consume_token(OR); rhs = AndExpression(); booleanLiteralOnly(lhs); booleanLiteralOnly(rhs); result = new OrExpression(lhs, rhs); result.setLocation(template, lhs, rhs); lhs = result; } {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression UnaryPlusMinusExpression() throws ParseException {Expression exp, result; boolean isMinus = false; Token t; switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case PLUS:{ t = jj_consume_token(PLUS); break; } case MINUS:{ t = jj_consume_token(MINUS); isMinus = true; break; } default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } exp = PrimaryExpression(); result = new UnaryPlusMinusExpression(exp, isMinus); result.setLocation(template, t, exp); {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression BooleanLiteral() throws ParseException {Token t; Expression result; switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case FALSE:{ t = jj_consume_token(FALSE); result = new BooleanLiteral(false); break; } case TRUE:{ t = jj_consume_token(TRUE); result = new BooleanLiteral(true); break; } default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } result.setLocation(template, t, t); {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression NumberLiteral() throws ParseException {Token op = null, t; switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case INTEGER:{ t = jj_consume_token(INTEGER); break; } case DECIMAL:{ t = jj_consume_token(DECIMAL); break; } default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } String s = t.image; Expression result = new NumberLiteral(pCfg.getArithmeticEngine().toNumber(s)); Token startToken = (op != null) ? op : t; result.setLocation(template, startToken, t); {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
result = new ArithmeticExpression(lhs, rhs, ArithmeticExpression.TYPE_SUBSTRACTION); result.setLocation(template, lhs, rhs); lhs = result;
numberLiteralOnly(rhs); result = new ArithmeticExpression(lhs, rhs, operation); result.setLocation(template, lhs, rhs); lhs = result;
notListLiteral(rhs, "string"); result = new ComparisonExpression(lhs, rhs, t.image); result.setLocation(template, lhs, rhs); } else {
notStringLiteral(rhs, "number"); result = new ComparisonExpression(lhs, rhs, t.image); result.setLocation(template, lhs, rhs); } else {
final public Expression Parenthesis() throws ParseException {Expression exp, result; Token start, end; start = jj_consume_token(OPEN_PAREN); exp = Expression(); end = jj_consume_token(CLOSE_PAREN); result = new ParentheticalExpression(exp); result.setLocation(template, start, end); {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression Parenthesis() throws ParseException {Expression exp, result; Token start, end; start = jj_consume_token(OPEN_PAREN); exp = Expression(); end = jj_consume_token(CLOSE_PAREN); result = new ParentheticalExpression(exp); result.setLocation(template, start, end); {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression Parenthesis() throws ParseException { Expression exp, result; Token start, end; start = jj_consume_token(OPEN_PAREN); exp = Expression(); end = jj_consume_token(CLOSE_PAREN); result = new ParentheticalExpression(exp); result.setLocation(template, start, end); {if (true) return result;} throw new Error("Missing return statement in function"); }
final public Expression OrExpression() throws ParseException {Expression lhs, rhs, result; lhs = AndExpression(); result = lhs; label_6: while (true) { if (jj_2_7(2147483647)) { ; } else { break label_6; } jj_consume_token(OR); rhs = AndExpression(); booleanLiteralOnly(lhs); booleanLiteralOnly(rhs); result = new OrExpression(lhs, rhs); result.setLocation(template, lhs, rhs); lhs = result; } {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression AndExpression() throws ParseException {Expression lhs, rhs, result; lhs = EqualityExpression(); result = lhs; label_5: while (true) { if (jj_2_6(2147483647)) { ; } else { break label_5; } jj_consume_token(AND); rhs = EqualityExpression(); booleanLiteralOnly(lhs); booleanLiteralOnly(rhs); result = new AndExpression(lhs, rhs); result.setLocation(template, lhs, rhs); lhs = result; } {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression AndExpression() throws ParseException {Expression lhs, rhs, result; lhs = EqualityExpression(); result = lhs; label_5: while (true) { if (jj_2_6(2147483647)) { ; } else { break label_5; } jj_consume_token(AND); rhs = EqualityExpression(); booleanLiteralOnly(lhs); booleanLiteralOnly(rhs); result = new AndExpression(lhs, rhs); result.setLocation(template, lhs, rhs); lhs = result; } {if ("" != null) return result;} throw new Error("Missing return statement in function"); }
final public Expression UnaryPlusMinusExpression() throws ParseException { Expression exp, result; boolean isMinus = false; Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: t = jj_consume_token(PLUS); break; case MINUS: t = jj_consume_token(MINUS); isMinus = true; break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } exp = PrimaryExpression(); result = new UnaryPlusMinusExpression(exp, isMinus); result.setLocation(template, t, exp); {if (true) return result;} throw new Error("Missing return statement in function"); }
final public Expression BooleanLiteral() throws ParseException { Token t; Expression result; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: t = jj_consume_token(FALSE); result = new BooleanLiteral(false); break; case TRUE: t = jj_consume_token(TRUE); result = new BooleanLiteral(true); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } result.setLocation(template, t, t); {if (true) return result;} throw new Error("Missing return statement in function"); }
final public Expression NumberLiteral() throws ParseException { Token op = null, t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER: t = jj_consume_token(INTEGER); break; case DECIMAL: t = jj_consume_token(DECIMAL); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } String s = t.image; Expression result = new NumberLiteral(template.getArithmeticEngine().toNumber(s)); Token startToken = (op != null) ? op : t; result.setLocation(template, startToken, t); {if (true) return result;} throw new Error("Missing return statement in function"); }