content: /* AgExpressionParser.java */
  /* Generated By:JJTree&JavaCC: Do not edit this line. AgExpressionParser.java */
  package io.agrest.exp.parser;
  
  // note: Parser doesn't use this import, but it's shared with the TokenManager
  import java.math.BigDecimal;
  import java.math.BigInteger;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  import io.agrest.AgException;
  
  /**
    * Parser of AgRest Expressions.
    *
    * @since 5.0
    */
  @SuppressWarnings("all")
  public class AgExpressionParser/*@bgen(jjtree)*/implements AgExpressionParserTreeConstants, AgExpressionParserConstants {/*@bgen(jjtree)*/
    protected JJTAgExpressionParserState jjtree = new JJTAgExpressionParserState();
      public static SimpleNode parse(String expressionString) {
          try {
              AgExpressionParser parser = new AgExpressionParser(expressionString);
              return parser.expression();
          } catch (ParseException e) {
              throw AgException.badRequest(e, e.getMessage());
          }
          catch (TokenMgrException e) {
              throw AgException.badRequest(e, e.getMessage());
          }
      }
  
    final public SimpleNode expression() throws ParseException {
      orCondition();
      jj_consume_token(0);
  return (SimpleNode) jjtree.rootNode();
  }
  
    final public void orCondition() throws ParseException {
  ExpOr jjtn001 = new ExpOr(JJTOR);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        andCondition();
        label_1:
        while (true) {
          switch (jj_nt.kind) {
          case 1:{
            ;
            break;
            }
          default:
            jj_la1[0] = jj_gen;
            break label_1;
          }
          jj_consume_token(1);
          andCondition();
        }
      } catch (Throwable jjte001) {
  if (jjtc001) {
              jjtree.clearNodeScope(jjtn001);
              jjtc001 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte001 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte001;}
            }
            if (jjte001 instanceof ParseException) {
              {if (true) throw (ParseException)jjte001;}
            }
            {if (true) throw (Error)jjte001;}
      } finally {
  if (jjtc001) {
              jjtree.closeNodeScope(jjtn001, jjtree.nodeArity() > 1);
            }
      }
  }
  
    final public void andCondition() throws ParseException {
  ExpAnd jjtn001 = new ExpAnd(JJTAND);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        notCondition();
        label_2:
        while (true) {
          switch (jj_nt.kind) {
          case 2:{
            ;
            break;
            }
          default:
            jj_la1[1] = jj_gen;
            break label_2;
          }
          jj_consume_token(2);
          notCondition();
        }
      } catch (Throwable jjte001) {
  if (jjtc001) {
              jjtree.clearNodeScope(jjtn001);
              jjtc001 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte001 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte001;}
            }
            if (jjte001 instanceof ParseException) {
              {if (true) throw (ParseException)jjte001;}
            }
            {if (true) throw (Error)jjte001;}
      } finally {
  if (jjtc001) {
              jjtree.closeNodeScope(jjtn001, jjtree.nodeArity() > 1);
            }
      }
  }
  
    final public void notCondition() throws ParseException {
      if (jj_2_1(2147483647)) {
        notExists();
      } else {
        switch (jj_nt.kind) {
        case 3:
        case 4:{
          switch (jj_nt.kind) {
          case 3:{
            jj_consume_token(3);
            break;
            }
          case 4:{
            jj_consume_token(4);
            break;
            }
          default:
            jj_la1[2] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
  ExpNot jjtn001 = new ExpNot(JJTNOT);
                                    boolean jjtc001 = true;
                                    jjtree.openNodeScope(jjtn001);
          try {
            simpleCondition();
          } catch (Throwable jjte001) {
  if (jjtc001) {
                                      jjtree.clearNodeScope(jjtn001);
                                      jjtc001 = false;
                                    } else {
                                      jjtree.popNode();
                                    }
                                    if (jjte001 instanceof RuntimeException) {
                                      {if (true) throw (RuntimeException)jjte001;}
                                    }
                                    if (jjte001 instanceof ParseException) {
                                      {if (true) throw (ParseException)jjte001;}
                                    }
                                    {if (true) throw (Error)jjte001;}
          } finally {
  if (jjtc001) {
                                      jjtree.closeNodeScope(jjtn001,  1);
                                    }
          }
          break;
          }
        case 18:
        case 27:
        case 28:
        case 31:
        case NULL:
        case TRUE:
        case FALSE:
        case CONCAT:
        case SUBSTRING:
        case TRIM:
        case LOWER:
        case UPPER:
        case LENGTH:
        case LOCATE:
        case ABS:
        case SQRT:
        case MOD:
        case CURRENT_DATE:
        case CURRENT_TIME:
        case CURRENT_TIMESTAMP:
        case YEAR:
        case MONTH:
        case WEEK:
        case DAY_OF_YEAR:
        case DAY:
        case DAY_OF_MONTH:
        case DAY_OF_WEEK:
        case HOUR:
        case MINUTE:
        case SECOND:
        case NAMED_PARAMETER:
        case PROPERTY_PATH:
        case SINGLE_QUOTED_STRING:
        case DOUBLE_QUOTED_STRING:
        case INT_LITERAL:
        case FLOAT_LITERAL:{
          simpleCondition();
          break;
          }
        default:
          jj_la1[3] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void simpleCondition() throws ParseException {// variable arity for the Like nodes
      int arity = 2;
      switch (jj_nt.kind) {
      case TRUE:{
  ExpTrue jjtn001 = new ExpTrue(JJTTRUE);
              boolean jjtc001 = true;
              jjtree.openNodeScope(jjtn001);
        try {
          jj_consume_token(TRUE);
        } finally {
  if (jjtc001) {
                jjtree.closeNodeScope(jjtn001, true);
              }
        }
        break;
        }
      case FALSE:{
  ExpFalse jjtn002 = new ExpFalse(JJTFALSE);
              boolean jjtc002 = true;
              jjtree.openNodeScope(jjtn002);
        try {
          jj_consume_token(FALSE);
        } finally {
  if (jjtc002) {
                jjtree.closeNodeScope(jjtn002, true);
              }
        }
        break;
        }
      case 18:
      case 27:
      case 28:
      case 31:
      case NULL:
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      case CURRENT_DATE:
      case CURRENT_TIME:
      case CURRENT_TIMESTAMP:
      case YEAR:
      case MONTH:
      case WEEK:
      case DAY_OF_YEAR:
      case DAY:
      case DAY_OF_MONTH:
      case DAY_OF_WEEK:
      case HOUR:
      case MINUTE:
      case SECOND:
      case NAMED_PARAMETER:
      case PROPERTY_PATH:
      case SINGLE_QUOTED_STRING:
      case DOUBLE_QUOTED_STRING:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        conditionExpression();
        switch (jj_nt.kind) {
        case 3:
        case 4:
        case 6:
        case 7:
        case 8:
        case 9:
        case 10:
        case 11:
        case 12:
        case 13:
        case 14:
        case 16:
        case 17:
        case 20:{
          switch (jj_nt.kind) {
          case 6:
          case 7:{
            switch (jj_nt.kind) {
            case 6:{
              jj_consume_token(6);
              break;
              }
            case 7:{
              jj_consume_token(7);
              break;
              }
            default:
              jj_la1[4] = jj_gen;
              jj_consume_token(-1);
              throw new ParseException();
            }
  ExpEqual jjtn003 = new ExpEqual(JJTEQUAL);
                            boolean jjtc003 = true;
                            jjtree.openNodeScope(jjtn003);
            try {
              scalarExpression();
            } catch (Throwable jjte003) {
  if (jjtc003) {
                              jjtree.clearNodeScope(jjtn003);
                              jjtc003 = false;
                            } else {
                              jjtree.popNode();
                            }
                            if (jjte003 instanceof RuntimeException) {
                              {if (true) throw (RuntimeException)jjte003;}
                            }
                            if (jjte003 instanceof ParseException) {
                              {if (true) throw (ParseException)jjte003;}
                            }
                            {if (true) throw (Error)jjte003;}
            } finally {
  if (jjtc003) {
                              jjtree.closeNodeScope(jjtn003,  2);
                            }
            }
            break;
            }
          case 8:
          case 9:{
            switch (jj_nt.kind) {
            case 8:{
              jj_consume_token(8);
              break;
              }
            case 9:{
              jj_consume_token(9);
              break;
              }
            default:
              jj_la1[5] = jj_gen;
              jj_consume_token(-1);
              throw new ParseException();
            }
  ExpNotEqual jjtn004 = new ExpNotEqual(JJTNOTEQUAL);
                             boolean jjtc004 = true;
                             jjtree.openNodeScope(jjtn004);
            try {
              scalarExpression();
            } catch (Throwable jjte004) {
  if (jjtc004) {
                               jjtree.clearNodeScope(jjtn004);
                               jjtc004 = false;
                             } else {
                               jjtree.popNode();
                             }
                             if (jjte004 instanceof RuntimeException) {
                               {if (true) throw (RuntimeException)jjte004;}
                             }
                             if (jjte004 instanceof ParseException) {
                               {if (true) throw (ParseException)jjte004;}
                             }
                             {if (true) throw (Error)jjte004;}
            } finally {
  if (jjtc004) {
                               jjtree.closeNodeScope(jjtn004,  2);
                             }
            }
            break;
            }
          case 10:{
            jj_consume_token(10);
  ExpLessOrEqual jjtn005 = new ExpLessOrEqual(JJTLESSOREQUAL);
                   boolean jjtc005 = true;
                   jjtree.openNodeScope(jjtn005);
            try {
              scalarExpression();
            } catch (Throwable jjte005) {
  if (jjtc005) {
                     jjtree.clearNodeScope(jjtn005);
                     jjtc005 = false;
                   } else {
                     jjtree.popNode();
                   }
                   if (jjte005 instanceof RuntimeException) {
                     {if (true) throw (RuntimeException)jjte005;}
                   }
                   if (jjte005 instanceof ParseException) {
                     {if (true) throw (ParseException)jjte005;}
                   }
                   {if (true) throw (Error)jjte005;}
            } finally {
  if (jjtc005) {
                     jjtree.closeNodeScope(jjtn005,  2);
                   }
            }
            break;
            }
          case 11:{
            jj_consume_token(11);
  ExpLess jjtn006 = new ExpLess(JJTLESS);
                  boolean jjtc006 = true;
                  jjtree.openNodeScope(jjtn006);
            try {
              scalarExpression();
            } catch (Throwable jjte006) {
  if (jjtc006) {
                    jjtree.clearNodeScope(jjtn006);
                    jjtc006 = false;
                  } else {
                    jjtree.popNode();
                  }
                  if (jjte006 instanceof RuntimeException) {
                    {if (true) throw (RuntimeException)jjte006;}
                  }
                  if (jjte006 instanceof ParseException) {
                    {if (true) throw (ParseException)jjte006;}
                  }
                  {if (true) throw (Error)jjte006;}
            } finally {
  if (jjtc006) {
                    jjtree.closeNodeScope(jjtn006,  2);
                  }
            }
            break;
            }
          case 12:{
            jj_consume_token(12);
  ExpGreater jjtn007 = new ExpGreater(JJTGREATER);
                   boolean jjtc007 = true;
                   jjtree.openNodeScope(jjtn007);
            try {
              scalarExpression();
            } catch (Throwable jjte007) {
  if (jjtc007) {
                     jjtree.clearNodeScope(jjtn007);
                     jjtc007 = false;
                   } else {
                     jjtree.popNode();
                   }
                   if (jjte007 instanceof RuntimeException) {
                     {if (true) throw (RuntimeException)jjte007;}
                   }
                   if (jjte007 instanceof ParseException) {
                     {if (true) throw (ParseException)jjte007;}
                   }
                   {if (true) throw (Error)jjte007;}
            } finally {
  if (jjtc007) {
                     jjtree.closeNodeScope(jjtn007,  2);
                   }
            }
            break;
            }
          case 13:{
            jj_consume_token(13);
  ExpGreaterOrEqual jjtn008 = new ExpGreaterOrEqual(JJTGREATEROREQUAL);
                   boolean jjtc008 = true;
                   jjtree.openNodeScope(jjtn008);
            try {
              scalarExpression();
            } catch (Throwable jjte008) {
  if (jjtc008) {
                     jjtree.clearNodeScope(jjtn008);
                     jjtc008 = false;
                   } else {
                     jjtree.popNode();
                   }
                   if (jjte008 instanceof RuntimeException) {
                     {if (true) throw (RuntimeException)jjte008;}
                   }
                   if (jjte008 instanceof ParseException) {
                     {if (true) throw (ParseException)jjte008;}
                   }
                   {if (true) throw (Error)jjte008;}
            } finally {
  if (jjtc008) {
                     jjtree.closeNodeScope(jjtn008,  2);
                   }
            }
            break;
            }
          case 14:{
            jj_consume_token(14);
            scalarExpression();
  ExpLike jjtn009 = new ExpLike(JJTLIKE);
                                        boolean jjtc009 = true;
                                        jjtree.openNodeScope(jjtn009);
            try {
              switch (jj_nt.kind) {
              case 15:{
                jj_consume_token(15);
                stringLiteral();
  arity = 3;
                break;
                }
              default:
                jj_la1[6] = jj_gen;
                ;
              }
            } catch (Throwable jjte009) {
  if (jjtc009) {
                                          jjtree.clearNodeScope(jjtn009);
                                          jjtc009 = false;
                                        } else {
                                          jjtree.popNode();
                                        }
                                        if (jjte009 instanceof RuntimeException) {
                                          {if (true) throw (RuntimeException)jjte009;}
                                        }
                                        if (jjte009 instanceof ParseException) {
                                          {if (true) throw (ParseException)jjte009;}
                                        }
                                        {if (true) throw (Error)jjte009;}
            } finally {
  if (jjtc009) {
                                          jjtree.closeNodeScope(jjtn009,  arity);
                                        }
            }
            break;
            }
          case 16:{
            jj_consume_token(16);
            scalarExpression();
  ExpLikeIgnoreCase jjtn010 = new ExpLikeIgnoreCase(JJTLIKEIGNORECASE);
                                                   boolean jjtc010 = true;
                                                   jjtree.openNodeScope(jjtn010);
            try {
              switch (jj_nt.kind) {
              case 15:{
                jj_consume_token(15);
                stringLiteral();
  arity = 3;
                break;
                }
              default:
                jj_la1[7] = jj_gen;
                ;
              }
            } catch (Throwable jjte010) {
  if (jjtc010) {
                                                     jjtree.clearNodeScope(jjtn010);
                                                     jjtc010 = false;
                                                   } else {
                                                     jjtree.popNode();
                                                   }
                                                   if (jjte010 instanceof RuntimeException) {
                                                     {if (true) throw (RuntimeException)jjte010;}
                                                   }
                                                   if (jjte010 instanceof ParseException) {
                                                     {if (true) throw (ParseException)jjte010;}
                                                   }
                                                   {if (true) throw (Error)jjte010;}
            } finally {
  if (jjtc010) {
                                                     jjtree.closeNodeScope(jjtn010,  arity);
                                                   }
            }
            break;
            }
          case 17:{
            jj_consume_token(17);
  ExpIn jjtn011 = new ExpIn(JJTIN);
                   boolean jjtc011 = true;
                   jjtree.openNodeScope(jjtn011);
            try {
              switch (jj_nt.kind) {
              case NAMED_PARAMETER:{
                namedParameter();
                break;
                }
              case 18:{
                jj_consume_token(18);
                scalarCommaList();
                jj_consume_token(19);
                break;
                }
              default:
                jj_la1[8] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
              }
            } catch (Throwable jjte011) {
  if (jjtc011) {
                     jjtree.clearNodeScope(jjtn011);
                     jjtc011 = false;
                   } else {
                     jjtree.popNode();
                   }
                   if (jjte011 instanceof RuntimeException) {
                     {if (true) throw (RuntimeException)jjte011;}
                   }
                   if (jjte011 instanceof ParseException) {
                     {if (true) throw (ParseException)jjte011;}
                   }
                   {if (true) throw (Error)jjte011;}
            } finally {
  if (jjtc011) {
                     jjtree.closeNodeScope(jjtn011,  2);
                   }
            }
            break;
            }
          case 20:{
            jj_consume_token(20);
            scalarExpression();
            jj_consume_token(2);
  ExpBetween jjtn012 = new ExpBetween(JJTBETWEEN);
                                                  boolean jjtc012 = true;
                                                  jjtree.openNodeScope(jjtn012);
            try {
              scalarExpression();
            } catch (Throwable jjte012) {
  if (jjtc012) {
                                                    jjtree.clearNodeScope(jjtn012);
                                                    jjtc012 = false;
                                                  } else {
                                                    jjtree.popNode();
                                                  }
                                                  if (jjte012 instanceof RuntimeException) {
                                                    {if (true) throw (RuntimeException)jjte012;}
                                                  }
                                                  if (jjte012 instanceof ParseException) {
                                                    {if (true) throw (ParseException)jjte012;}
                                                  }
                                                  {if (true) throw (Error)jjte012;}
            } finally {
  if (jjtc012) {
                                                    jjtree.closeNodeScope(jjtn012,  3);
                                                  }
            }
            break;
            }
          case 3:
          case 4:{
            simpleNotCondition();
            break;
            }
          default:
            jj_la1[9] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
          break;
          }
        default:
          jj_la1[10] = jj_gen;
          ;
        }
        break;
        }
      default:
        jj_la1[11] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void notExists() throws ParseException {
      switch (jj_nt.kind) {
      case 3:
      case 4:{
        switch (jj_nt.kind) {
        case 3:{
          jj_consume_token(3);
          break;
          }
        case 4:{
          jj_consume_token(4);
          break;
          }
        default:
          jj_la1[12] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
  ExpNotExists jjtn001 = new ExpNotExists(JJTNOTEXISTS);
                            boolean jjtc001 = true;
                            jjtree.openNodeScope(jjtn001);
        try {
          exists();
        } catch (Throwable jjte001) {
  if (jjtc001) {
                              jjtree.clearNodeScope(jjtn001);
                              jjtc001 = false;
                            } else {
                              jjtree.popNode();
                            }
                            if (jjte001 instanceof RuntimeException) {
                              {if (true) throw (RuntimeException)jjte001;}
                            }
                            if (jjte001 instanceof ParseException) {
                              {if (true) throw (ParseException)jjte001;}
                            }
                            {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                              jjtree.closeNodeScope(jjtn001,  1);
                            }
        }
        break;
        }
      case 5:{
  ExpExists jjtn002 = new ExpExists(JJTEXISTS);
            boolean jjtc002 = true;
            jjtree.openNodeScope(jjtn002);
        try {
          exists();
        } catch (Throwable jjte002) {
  if (jjtc002) {
              jjtree.clearNodeScope(jjtn002);
              jjtc002 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte002 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte002;}
            }
            if (jjte002 instanceof ParseException) {
              {if (true) throw (ParseException)jjte002;}
            }
            {if (true) throw (Error)jjte002;}
        } finally {
  if (jjtc002) {
              jjtree.closeNodeScope(jjtn002,  1);
            }
        }
        break;
        }
      default:
        jj_la1[13] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void exists() throws ParseException {
      jj_consume_token(5);
      pathExpression();
  }
  
    final public void simpleNotCondition() throws ParseException {// variable arity for the Like nodes
      int arity = 2;
      switch (jj_nt.kind) {
      case 3:{
        jj_consume_token(3);
        break;
        }
      case 4:{
        jj_consume_token(4);
        break;
        }
      default:
        jj_la1[14] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      switch (jj_nt.kind) {
      case 14:{
        jj_consume_token(14);
        scalarExpression();
  ExpNotLike jjtn001 = new ExpNotLike(JJTNOTLIKE);
                                              boolean jjtc001 = true;
                                              jjtree.openNodeScope(jjtn001);
        try {
          switch (jj_nt.kind) {
          case 15:{
            jj_consume_token(15);
            stringLiteral();
  arity=3;
            break;
            }
          default:
            jj_la1[15] = jj_gen;
            ;
          }
        } catch (Throwable jjte001) {
  if (jjtc001) {
                                                jjtree.clearNodeScope(jjtn001);
                                                jjtc001 = false;
                                              } else {
                                                jjtree.popNode();
                                              }
                                              if (jjte001 instanceof RuntimeException) {
                                                {if (true) throw (RuntimeException)jjte001;}
                                              }
                                              if (jjte001 instanceof ParseException) {
                                                {if (true) throw (ParseException)jjte001;}
                                              }
                                              {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                                                jjtree.closeNodeScope(jjtn001,  arity);
                                              }
        }
        break;
        }
      case 16:{
        jj_consume_token(16);
        scalarExpression();
  ExpNotLikeIgnoreCase jjtn002 = new ExpNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE);
                                                     boolean jjtc002 = true;
                                                     jjtree.openNodeScope(jjtn002);
        try {
          switch (jj_nt.kind) {
          case 15:{
            jj_consume_token(15);
            stringLiteral();
  arity=3;
            break;
            }
          default:
            jj_la1[16] = jj_gen;
            ;
          }
        } catch (Throwable jjte002) {
  if (jjtc002) {
                                                       jjtree.clearNodeScope(jjtn002);
                                                       jjtc002 = false;
                                                     } else {
                                                       jjtree.popNode();
                                                     }
                                                     if (jjte002 instanceof RuntimeException) {
                                                       {if (true) throw (RuntimeException)jjte002;}
                                                     }
                                                     if (jjte002 instanceof ParseException) {
                                                       {if (true) throw (ParseException)jjte002;}
                                                     }
                                                     {if (true) throw (Error)jjte002;}
        } finally {
  if (jjtc002) {
                                                       jjtree.closeNodeScope(jjtn002,  arity);
                                                     }
        }
        break;
        }
      case 17:{
        jj_consume_token(17);
  ExpNotIn jjtn003 = new ExpNotIn(JJTNOTIN);
                         boolean jjtc003 = true;
                         jjtree.openNodeScope(jjtn003);
        try {
          switch (jj_nt.kind) {
          case NAMED_PARAMETER:{
            namedParameter();
            break;
            }
          case 18:{
            jj_consume_token(18);
            scalarCommaList();
            jj_consume_token(19);
            break;
            }
          default:
            jj_la1[17] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        } catch (Throwable jjte003) {
  if (jjtc003) {
                           jjtree.clearNodeScope(jjtn003);
                           jjtc003 = false;
                         } else {
                           jjtree.popNode();
                         }
                         if (jjte003 instanceof RuntimeException) {
                           {if (true) throw (RuntimeException)jjte003;}
                         }
                         if (jjte003 instanceof ParseException) {
                           {if (true) throw (ParseException)jjte003;}
                         }
                         {if (true) throw (Error)jjte003;}
        } finally {
  if (jjtc003) {
                           jjtree.closeNodeScope(jjtn003,  2);
                         }
        }
        break;
        }
      case 20:{
        jj_consume_token(20);
        scalarExpression();
        jj_consume_token(2);
  ExpNotBetween jjtn004 = new ExpNotBetween(JJTNOTBETWEEN);
                                                        boolean jjtc004 = true;
                                                        jjtree.openNodeScope(jjtn004);
        try {
          scalarExpression();
        } catch (Throwable jjte004) {
  if (jjtc004) {
                                                          jjtree.clearNodeScope(jjtn004);
                                                          jjtc004 = false;
                                                        } else {
                                                          jjtree.popNode();
                                                        }
                                                        if (jjte004 instanceof RuntimeException) {
                                                          {if (true) throw (RuntimeException)jjte004;}
                                                        }
                                                        if (jjte004 instanceof ParseException) {
                                                          {if (true) throw (ParseException)jjte004;}
                                                        }
                                                        {if (true) throw (Error)jjte004;}
        } finally {
  if (jjtc004) {
                                                          jjtree.closeNodeScope(jjtn004,  3);
                                                        }
        }
        break;
        }
      default:
        jj_la1[18] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void scalarCommaList() throws ParseException {
  ExpScalarList jjtn001 = new ExpScalarList(JJTSCALARLIST);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        scalarConstExpression();
        label_3:
        while (true) {
          switch (jj_nt.kind) {
          case 21:{
            ;
            break;
            }
          default:
            jj_la1[19] = jj_gen;
            break label_3;
          }
          jj_consume_token(21);
          scalarConstExpression();
        }
      } catch (Throwable jjte001) {
  if (jjtc001) {
              jjtree.clearNodeScope(jjtn001);
              jjtc001 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte001 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte001;}
            }
            if (jjte001 instanceof ParseException) {
              {if (true) throw (ParseException)jjte001;}
            }
            {if (true) throw (Error)jjte001;}
      } finally {
  if (jjtc001) {
              jjtree.closeNodeScope(jjtn001, true);
            }
      }
  }
  
    final public void conditionExpression() throws ParseException {
      if (jj_2_2(2147483647)) {
        stringExpression();
      } else if (jj_2_3(2147483647)) {
        dateTimeFunction();
      } else {
        switch (jj_nt.kind) {
        case NULL:{
  ExpScalar jjtn001 = new ExpScalar(JJTSCALAR);
                    boolean jjtc001 = true;
                    jjtree.openNodeScope(jjtn001);
          try {
            jj_consume_token(NULL);
          } finally {
  if (jjtc001) {
                      jjtree.closeNodeScope(jjtn001,  0);
                    }
          }
          break;
          }
        case 18:
        case 27:
        case 28:
        case 31:
        case CONCAT:
        case SUBSTRING:
        case TRIM:
        case LOWER:
        case UPPER:
        case LENGTH:
        case LOCATE:
        case ABS:
        case SQRT:
        case MOD:
        case CURRENT_DATE:
        case CURRENT_TIME:
        case CURRENT_TIMESTAMP:
        case YEAR:
        case MONTH:
        case WEEK:
        case DAY_OF_YEAR:
        case DAY:
        case DAY_OF_MONTH:
        case DAY_OF_WEEK:
        case HOUR:
        case MINUTE:
        case SECOND:
        case NAMED_PARAMETER:
        case PROPERTY_PATH:
        case INT_LITERAL:
        case FLOAT_LITERAL:{
          numericExpression();
          break;
          }
        default:
          jj_la1[20] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void stringParameter() throws ParseException {
      if (jj_2_4(2147483647)) {
        stringExpression();
      } else {
        switch (jj_nt.kind) {
        case CONCAT:
        case SUBSTRING:
        case TRIM:
        case LOWER:
        case UPPER:
        case LENGTH:
        case LOCATE:
        case ABS:
        case SQRT:
        case MOD:
        case CURRENT_DATE:
        case CURRENT_TIME:
        case CURRENT_TIMESTAMP:
        case YEAR:
        case MONTH:
        case WEEK:
        case DAY_OF_YEAR:
        case DAY:
        case DAY_OF_MONTH:
        case DAY_OF_WEEK:
        case HOUR:
        case MINUTE:
        case SECOND:
        case PROPERTY_PATH:{
          pathExpression();
          break;
          }
        default:
          jj_la1[21] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void stringLiteral() throws ParseException {
      switch (jj_nt.kind) {
      case SINGLE_QUOTED_STRING:{
        jj_consume_token(SINGLE_QUOTED_STRING);
  ExpScalar jjtn001 = new ExpScalar(JJTSCALAR);
        boolean jjtc001 = true;
        jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
        jjtc001 = false;
  jjtn001.jjtSetValue(token_source.literalValue);
          jjtn001.syncScalarImage("'" + token_source.literalValue + "'");
        } finally {
  if (jjtc001) {
          jjtree.closeNodeScope(jjtn001,  0);
        }
        }
        break;
        }
      case DOUBLE_QUOTED_STRING:{
        jj_consume_token(DOUBLE_QUOTED_STRING);
  ExpScalar jjtn002 = new ExpScalar(JJTSCALAR);
        boolean jjtc002 = true;
        jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
        jjtc002 = false;
  jjtn002.jjtSetValue(token_source.literalValue);
          jjtn002.syncScalarImage("\"" + token_source.literalValue + "\"");
        } finally {
  if (jjtc002) {
          jjtree.closeNodeScope(jjtn002,  0);
        }
        }
        break;
        }
      default:
        jj_la1[22] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void stringExpression() throws ParseException {
      switch (jj_nt.kind) {
      case SINGLE_QUOTED_STRING:
      case DOUBLE_QUOTED_STRING:{
        stringLiteral();
        break;
        }
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:{
        functionsReturningStrings();
        break;
        }
      default:
        jj_la1[23] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void scalarExpression() throws ParseException {
      switch (jj_nt.kind) {
      case 18:
      case 27:
      case 28:
      case 31:
      case NULL:
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      case CURRENT_DATE:
      case CURRENT_TIME:
      case CURRENT_TIMESTAMP:
      case YEAR:
      case MONTH:
      case WEEK:
      case DAY_OF_YEAR:
      case DAY:
      case DAY_OF_MONTH:
      case DAY_OF_WEEK:
      case HOUR:
      case MINUTE:
      case SECOND:
      case NAMED_PARAMETER:
      case PROPERTY_PATH:
      case SINGLE_QUOTED_STRING:
      case DOUBLE_QUOTED_STRING:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        conditionExpression();
        break;
        }
      case TRUE:{
        jj_consume_token(TRUE);
  ExpScalar jjtn001 = new ExpScalar(JJTSCALAR);
                     boolean jjtc001 = true;
                     jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                     jjtc001 = false;
  jjtn001.jjtSetValue(true);
        } finally {
  if (jjtc001) {
                       jjtree.closeNodeScope(jjtn001,  0);
                     }
        }
        break;
        }
      case FALSE:{
        jj_consume_token(FALSE);
  ExpScalar jjtn002 = new ExpScalar(JJTSCALAR);
                      boolean jjtc002 = true;
                      jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                      jjtc002 = false;
  jjtn002.jjtSetValue(false);
        } finally {
  if (jjtc002) {
                        jjtree.closeNodeScope(jjtn002,  0);
                      }
        }
        break;
        }
      default:
        jj_la1[24] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void scalarConstExpression() throws ParseException {
      switch (jj_nt.kind) {
      case SINGLE_QUOTED_STRING:{
        jj_consume_token(SINGLE_QUOTED_STRING);
  ExpScalar jjtn001 = new ExpScalar(JJTSCALAR);
                                     boolean jjtc001 = true;
                                     jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                                     jjtc001 = false;
  jjtn001.jjtSetValue(token_source.literalValue);
        } finally {
  if (jjtc001) {
                                       jjtree.closeNodeScope(jjtn001,  0);
                                     }
        }
        break;
        }
      case DOUBLE_QUOTED_STRING:{
        jj_consume_token(DOUBLE_QUOTED_STRING);
  ExpScalar jjtn002 = new ExpScalar(JJTSCALAR);
                                     boolean jjtc002 = true;
                                     jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                                     jjtc002 = false;
  jjtn002.jjtSetValue(token_source.literalValue);
        } finally {
  if (jjtc002) {
                                       jjtree.closeNodeScope(jjtn002,  0);
                                     }
        }
        break;
        }
      case NAMED_PARAMETER:{
        namedParameter();
        break;
        }
      case INT_LITERAL:{
        intLiteral();
        break;
        }
      case FLOAT_LITERAL:{
        floatLiteral();
        break;
        }
      case TRUE:{
        jj_consume_token(TRUE);
  ExpScalar jjtn003 = new ExpScalar(JJTSCALAR);
                      boolean jjtc003 = true;
                      jjtree.openNodeScope(jjtn003);
        try {
  jjtree.closeNodeScope(jjtn003,  0);
                      jjtc003 = false;
  jjtn003.jjtSetValue(true);
        } finally {
  if (jjtc003) {
                        jjtree.closeNodeScope(jjtn003,  0);
                      }
        }
        break;
        }
      case FALSE:{
        jj_consume_token(FALSE);
  ExpScalar jjtn004 = new ExpScalar(JJTSCALAR);
                      boolean jjtc004 = true;
                      jjtree.openNodeScope(jjtn004);
        try {
  jjtree.closeNodeScope(jjtn004,  0);
                      jjtc004 = false;
  jjtn004.jjtSetValue(false);
        } finally {
  if (jjtc004) {
                        jjtree.closeNodeScope(jjtn004,  0);
                      }
        }
        break;
        }
      default:
        jj_la1[25] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void numericExpression() throws ParseException {
      bitwiseOr();
  }
  
    final public void bitwiseOr() throws ParseException {
      bitwiseXor();
      label_4:
      while (true) {
        switch (jj_nt.kind) {
        case 22:{
          ;
          break;
          }
        default:
          jj_la1[26] = jj_gen;
          break label_4;
        }
        jj_consume_token(22);
  ExpBitwiseOr jjtn001 = new ExpBitwiseOr(JJTBITWISEOR);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
        try {
          bitwiseXor();
        } catch (Throwable jjte001) {
  if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte001 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte001;}
                }
                if (jjte001 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte001;}
                }
                {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  2);
                }
        }
      }
  }
  
    final public void bitwiseXor() throws ParseException {
      bitwiseAnd();
      label_5:
      while (true) {
        switch (jj_nt.kind) {
        case 23:{
          ;
          break;
          }
        default:
          jj_la1[27] = jj_gen;
          break label_5;
        }
        jj_consume_token(23);
  ExpBitwiseXor jjtn001 = new ExpBitwiseXor(JJTBITWISEXOR);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
        try {
          bitwiseAnd();
        } catch (Throwable jjte001) {
  if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte001 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte001;}
                }
                if (jjte001 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte001;}
                }
                {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  2);
                }
        }
      }
  }
  
    final public void bitwiseAnd() throws ParseException {
      bitwiseShift();
      label_6:
      while (true) {
        switch (jj_nt.kind) {
        case 24:{
          ;
          break;
          }
        default:
          jj_la1[28] = jj_gen;
          break label_6;
        }
        jj_consume_token(24);
  ExpBitwiseAnd jjtn001 = new ExpBitwiseAnd(JJTBITWISEAND);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
        try {
          bitwiseShift();
        } catch (Throwable jjte001) {
  if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte001 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte001;}
                }
                if (jjte001 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte001;}
                }
                {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  2);
                }
        }
      }
  }
  
    final public void bitwiseShift() throws ParseException {
      arithmeticExp();
      label_7:
      while (true) {
        switch (jj_nt.kind) {
        case 25:
        case 26:{
          ;
          break;
          }
        default:
          jj_la1[29] = jj_gen;
          break label_7;
        }
        switch (jj_nt.kind) {
        case 25:{
          jj_consume_token(25);
  ExpBitwiseLeftShift jjtn001 = new ExpBitwiseLeftShift(JJTBITWISELEFTSHIFT);
                 boolean jjtc001 = true;
                 jjtree.openNodeScope(jjtn001);
          try {
            arithmeticExp();
          } catch (Throwable jjte001) {
  if (jjtc001) {
                   jjtree.clearNodeScope(jjtn001);
                   jjtc001 = false;
                 } else {
                   jjtree.popNode();
                 }
                 if (jjte001 instanceof RuntimeException) {
                   {if (true) throw (RuntimeException)jjte001;}
                 }
                 if (jjte001 instanceof ParseException) {
                   {if (true) throw (ParseException)jjte001;}
                 }
                 {if (true) throw (Error)jjte001;}
          } finally {
  if (jjtc001) {
                   jjtree.closeNodeScope(jjtn001,  2);
                 }
          }
          break;
          }
        case 26:{
          jj_consume_token(26);
  ExpBitwiseRightShift jjtn002 = new ExpBitwiseRightShift(JJTBITWISERIGHTSHIFT);
                 boolean jjtc002 = true;
                 jjtree.openNodeScope(jjtn002);
          try {
            arithmeticExp();
          } catch (Throwable jjte002) {
  if (jjtc002) {
                   jjtree.clearNodeScope(jjtn002);
                   jjtc002 = false;
                 } else {
                   jjtree.popNode();
                 }
                 if (jjte002 instanceof RuntimeException) {
                   {if (true) throw (RuntimeException)jjte002;}
                 }
                 if (jjte002 instanceof ParseException) {
                   {if (true) throw (ParseException)jjte002;}
                 }
                 {if (true) throw (Error)jjte002;}
          } finally {
  if (jjtc002) {
                   jjtree.closeNodeScope(jjtn002,  2);
                 }
          }
          break;
          }
        default:
          jj_la1[30] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void arithmeticExp() throws ParseException {
      multiplySubtractExp();
      label_8:
      while (true) {
        switch (jj_nt.kind) {
        case 27:
        case 28:{
          ;
          break;
          }
        default:
          jj_la1[31] = jj_gen;
          break label_8;
        }
        switch (jj_nt.kind) {
        case 27:{
          jj_consume_token(27);
  ExpAdd jjtn001 = new ExpAdd(JJTADD);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
          try {
            multiplySubtractExp();
          } catch (Throwable jjte001) {
  if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte001 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte001;}
                }
                if (jjte001 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte001;}
                }
                {if (true) throw (Error)jjte001;}
          } finally {
  if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  2);
                }
          }
          break;
          }
        case 28:{
          jj_consume_token(28);
  ExpSubtract jjtn002 = new ExpSubtract(JJTSUBTRACT);
                boolean jjtc002 = true;
                jjtree.openNodeScope(jjtn002);
          try {
            multiplySubtractExp();
          } catch (Throwable jjte002) {
  if (jjtc002) {
                  jjtree.clearNodeScope(jjtn002);
                  jjtc002 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte002 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte002;}
                }
                if (jjte002 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte002;}
                }
                {if (true) throw (Error)jjte002;}
          } finally {
  if (jjtc002) {
                  jjtree.closeNodeScope(jjtn002,  2);
                }
          }
          break;
          }
        default:
          jj_la1[32] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void multiplySubtractExp() throws ParseException {
      numericTermExt();
      label_9:
      while (true) {
        switch (jj_nt.kind) {
        case 29:
        case 30:{
          ;
          break;
          }
        default:
          jj_la1[33] = jj_gen;
          break label_9;
        }
        switch (jj_nt.kind) {
        case 29:{
          jj_consume_token(29);
  ExpMultiply jjtn001 = new ExpMultiply(JJTMULTIPLY);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
          try {
            numericTermExt();
          } catch (Throwable jjte001) {
  if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte001 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte001;}
                }
                if (jjte001 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte001;}
                }
                {if (true) throw (Error)jjte001;}
          } finally {
  if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  2);
                }
          }
          break;
          }
        case 30:{
          jj_consume_token(30);
  ExpDivide jjtn002 = new ExpDivide(JJTDIVIDE);
                boolean jjtc002 = true;
                jjtree.openNodeScope(jjtn002);
          try {
            numericTermExt();
          } catch (Throwable jjte002) {
  if (jjtc002) {
                  jjtree.clearNodeScope(jjtn002);
                  jjtc002 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte002 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte002;}
                }
                if (jjte002 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte002;}
                }
                {if (true) throw (Error)jjte002;}
          } finally {
  if (jjtc002) {
                  jjtree.closeNodeScope(jjtn002,  2);
                }
          }
          break;
          }
        default:
          jj_la1[34] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void numericTermExt() throws ParseException {
      switch (jj_nt.kind) {
      case 18:
      case 27:
      case 28:
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      case CURRENT_DATE:
      case CURRENT_TIME:
      case CURRENT_TIMESTAMP:
      case YEAR:
      case MONTH:
      case WEEK:
      case DAY_OF_YEAR:
      case DAY:
      case DAY_OF_MONTH:
      case DAY_OF_WEEK:
      case HOUR:
      case MINUTE:
      case SECOND:
      case NAMED_PARAMETER:
      case PROPERTY_PATH:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        numericTerm();
        break;
        }
      case 31:{
        jj_consume_token(31);
  ExpBitwiseNot jjtn001 = new ExpBitwiseNot(JJTBITWISENOT);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
        try {
          numericTerm();
        } catch (Throwable jjte001) {
  if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
                  jjtree.popNode();
                }
                if (jjte001 instanceof RuntimeException) {
                  {if (true) throw (RuntimeException)jjte001;}
                }
                if (jjte001 instanceof ParseException) {
                  {if (true) throw (ParseException)jjte001;}
                }
                {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  1);
                }
        }
        break;
        }
      default:
        jj_la1[35] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void numericTerm() throws ParseException {
      switch (jj_nt.kind) {
      case 18:
      case 27:
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      case CURRENT_DATE:
      case CURRENT_TIME:
      case CURRENT_TIMESTAMP:
      case YEAR:
      case MONTH:
      case WEEK:
      case DAY_OF_YEAR:
      case DAY:
      case DAY_OF_MONTH:
      case DAY_OF_WEEK:
      case HOUR:
      case MINUTE:
      case SECOND:
      case NAMED_PARAMETER:
      case PROPERTY_PATH:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        switch (jj_nt.kind) {
        case 27:{
          jj_consume_token(27);
          break;
          }
        default:
          jj_la1[36] = jj_gen;
          ;
        }
        numericPrimary();
        break;
        }
      case 28:{
        jj_consume_token(28);
  ExpNegate jjtn001 = new ExpNegate(JJTNEGATE);
                 boolean jjtc001 = true;
                 jjtree.openNodeScope(jjtn001);
        try {
          numericTerm();
        } catch (Throwable jjte001) {
  if (jjtc001) {
                   jjtree.clearNodeScope(jjtn001);
                   jjtc001 = false;
                 } else {
                   jjtree.popNode();
                 }
                 if (jjte001 instanceof RuntimeException) {
                   {if (true) throw (RuntimeException)jjte001;}
                 }
                 if (jjte001 instanceof ParseException) {
                   {if (true) throw (ParseException)jjte001;}
                 }
                 {if (true) throw (Error)jjte001;}
        } finally {
  if (jjtc001) {
                   jjtree.closeNodeScope(jjtn001,  1);
                 }
        }
        break;
        }
      default:
        jj_la1[37] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void numericPrimary() throws ParseException {
      switch (jj_nt.kind) {
      case 18:{
        jj_consume_token(18);
        orCondition();
        jj_consume_token(19);
        break;
        }
      case INT_LITERAL:{
        intLiteral();
        break;
        }
      case FLOAT_LITERAL:{
        floatLiteral();
        break;
        }
      case NAMED_PARAMETER:{
        namedParameter();
        break;
        }
      default:
        jj_la1[38] = jj_gen;
        if (jj_2_5(2147483647)) {
          functionsReturningNumerics();
        } else {
          switch (jj_nt.kind) {
          case CONCAT:
          case SUBSTRING:
          case TRIM:
          case LOWER:
          case UPPER:
          case LENGTH:
          case LOCATE:
          case ABS:
          case SQRT:
          case MOD:
          case CURRENT_DATE:
          case CURRENT_TIME:
          case CURRENT_TIMESTAMP:
          case YEAR:
          case MONTH:
          case WEEK:
          case DAY_OF_YEAR:
          case DAY:
          case DAY_OF_MONTH:
          case DAY_OF_WEEK:
          case HOUR:
          case MINUTE:
          case SECOND:
          case PROPERTY_PATH:{
            pathExpression();
            break;
            }
          default:
            jj_la1[39] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        }
      }
  }
  
    final public void intLiteral() throws ParseException {/*@bgen(jjtree) #Scalar( 0) */
    ExpScalar jjtn000 = new ExpScalar(JJTSCALAR);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(INT_LITERAL);
  jjtree.closeNodeScope(jjtn000,  0);
                      jjtc000 = false;
  jjtn000.jjtSetValue(token_source.literalValue);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000,  0);
        }
      }
  }
  
    final public void floatLiteral() throws ParseException {/*@bgen(jjtree) #Scalar( 0) */
    ExpScalar jjtn000 = new ExpScalar(JJTSCALAR);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(FLOAT_LITERAL);
  jjtree.closeNodeScope(jjtn000,  0);
                       jjtc000 = false;
  jjtn000.jjtSetValue(token_source.literalValue);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000,  0);
        }
      }
  }
  
    final public void functionsReturningStrings() throws ParseException {
      switch (jj_nt.kind) {
      case CONCAT:{
        concat();
        break;
        }
      case SUBSTRING:{
        substring();
        break;
        }
      case TRIM:{
        trim();
        break;
        }
      case LOWER:{
        lower();
        break;
        }
      case UPPER:{
        upper();
        break;
        }
      default:
        jj_la1[40] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void concat() throws ParseException {/*@bgen(jjtree) Concat */
    ExpConcat jjtn000 = new ExpConcat(JJTCONCAT);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CONCAT);
        jj_consume_token(18);
        stringParameter();
        label_10:
        while (true) {
          switch (jj_nt.kind) {
          case 21:{
            ;
            break;
            }
          default:
            jj_la1[41] = jj_gen;
            break label_10;
          }
          jj_consume_token(21);
          stringParameter();
        }
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void substring() throws ParseException {/*@bgen(jjtree) Substring */
    ExpSubstring jjtn000 = new ExpSubstring(JJTSUBSTRING);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(SUBSTRING);
        jj_consume_token(18);
        stringParameter();
        jj_consume_token(21);
        numericExpression();
        switch (jj_nt.kind) {
        case 21:{
          jj_consume_token(21);
          numericExpression();
          break;
          }
        default:
          jj_la1[42] = jj_gen;
          ;
        }
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void trim() throws ParseException {/*@bgen(jjtree) Trim */
    ExpTrim jjtn000 = new ExpTrim(JJTTRIM);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(TRIM);
        jj_consume_token(18);
        stringParameter();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void lower() throws ParseException {/*@bgen(jjtree) Lower */
    ExpLower jjtn000 = new ExpLower(JJTLOWER);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(LOWER);
        jj_consume_token(18);
        stringParameter();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void upper() throws ParseException {/*@bgen(jjtree) Upper */
    ExpUpper jjtn000 = new ExpUpper(JJTUPPER);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(UPPER);
        jj_consume_token(18);
        stringParameter();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void functionsReturningNumerics() throws ParseException {
      switch (jj_nt.kind) {
      case LENGTH:{
        length();
        break;
        }
      case LOCATE:{
        locate();
        break;
        }
      case ABS:{
        abs();
        break;
        }
      case SQRT:{
        sqrt();
        break;
        }
      case MOD:{
        mod();
        break;
        }
      case YEAR:
      case MONTH:
      case WEEK:
      case DAY_OF_YEAR:
      case DAY:
      case DAY_OF_MONTH:
      case DAY_OF_WEEK:
      case HOUR:
      case MINUTE:
      case SECOND:{
        dateTimeExtractingFunction();
        break;
        }
      default:
        jj_la1[43] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void length() throws ParseException {/*@bgen(jjtree) Length */
    ExpLength jjtn000 = new ExpLength(JJTLENGTH);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(LENGTH);
        jj_consume_token(18);
        stringParameter();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void locate() throws ParseException {/*@bgen(jjtree) Locate */
    ExpLocate jjtn000 = new ExpLocate(JJTLOCATE);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(LOCATE);
        jj_consume_token(18);
        stringParameter();
        jj_consume_token(21);
        stringParameter();
        switch (jj_nt.kind) {
        case 21:{
          jj_consume_token(21);
          numericExpression();
          break;
          }
        default:
          jj_la1[44] = jj_gen;
          ;
        }
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void abs() throws ParseException {/*@bgen(jjtree) Abs */
    ExpAbs jjtn000 = new ExpAbs(JJTABS);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(ABS);
        jj_consume_token(18);
        numericExpression();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void sqrt() throws ParseException {/*@bgen(jjtree) Sqrt */
    ExpSqrt jjtn000 = new ExpSqrt(JJTSQRT);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(SQRT);
        jj_consume_token(18);
        numericExpression();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void mod() throws ParseException {/*@bgen(jjtree) Mod */
    ExpMod jjtn000 = new ExpMod(JJTMOD);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(MOD);
        jj_consume_token(18);
        numericExpression();
        jj_consume_token(21);
        numericExpression();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
              jjtree.clearNodeScope(jjtn000);
              jjtc000 = false;
            } else {
              jjtree.popNode();
            }
            if (jjte000 instanceof RuntimeException) {
              {if (true) throw (RuntimeException)jjte000;}
            }
            if (jjte000 instanceof ParseException) {
              {if (true) throw (ParseException)jjte000;}
            }
            {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
              jjtree.closeNodeScope(jjtn000, true);
            }
      }
  }
  
    final public void dateTimeFunction() throws ParseException {
      switch (jj_nt.kind) {
      case CURRENT_DATE:{
        currentDate();
        break;
        }
      case CURRENT_TIME:{
        currentTime();
        break;
        }
      case CURRENT_TIMESTAMP:{
        currentTimestamp();
        break;
        }
      default:
        jj_la1[45] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void currentDate() throws ParseException {/*@bgen(jjtree) CurrentDate */
    ExpCurrentDate jjtn000 = new ExpCurrentDate(JJTCURRENTDATE);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CURRENT_DATE);
        jj_consume_token(18);
        jj_consume_token(19);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
    final public void currentTime() throws ParseException {/*@bgen(jjtree) CurrentTime */
    ExpCurrentTime jjtn000 = new ExpCurrentTime(JJTCURRENTTIME);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CURRENT_TIME);
        jj_consume_token(18);
        jj_consume_token(19);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
    final public void currentTimestamp() throws ParseException {/*@bgen(jjtree) CurrentTimestamp */
    ExpCurrentTimestamp jjtn000 = new ExpCurrentTimestamp(JJTCURRENTTIMESTAMP);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CURRENT_TIMESTAMP);
        jj_consume_token(18);
        jj_consume_token(19);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
  /* Date/time parts extracting function */
    final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jjtree) #Extract( 1) */
      ExpExtract jjtn000 = new ExpExtract(JJTEXTRACT);
      boolean jjtc000 = true;
      jjtree.openNodeScope(jjtn000);Token t;
      try {
        t = dateTimePartFuncName();
  jjtn000.jjtSetValue(t.image);
        jj_consume_token(18);
        pathExpression();
        jj_consume_token(19);
      } catch (Throwable jjte000) {
  if (jjtc000) {
          jjtree.clearNodeScope(jjtn000);
          jjtc000 = false;
        } else {
          jjtree.popNode();
        }
        if (jjte000 instanceof RuntimeException) {
          {if (true) throw (RuntimeException)jjte000;}
        }
        if (jjte000 instanceof ParseException) {
          {if (true) throw (ParseException)jjte000;}
        }
        {if (true) throw (Error)jjte000;}
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000,  1);
        }
      }
  }
  
    final public Token stringFuncName() throws ParseException {Token t;
      switch (jj_nt.kind) {
      case CONCAT:{
        t = jj_consume_token(CONCAT);
        break;
        }
      case SUBSTRING:{
        t = jj_consume_token(SUBSTRING);
        break;
        }
      case TRIM:{
        t = jj_consume_token(TRIM);
        break;
        }
      case LOWER:{
        t = jj_consume_token(LOWER);
        break;
        }
      case UPPER:{
        t = jj_consume_token(UPPER);
        break;
        }
      default:
        jj_la1[46] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  return t;
  }
  
    final public Token numericFuncName() throws ParseException {Token t;
      switch (jj_nt.kind) {
      case LENGTH:{
        t = jj_consume_token(LENGTH);
        break;
        }
      case LOCATE:{
        t = jj_consume_token(LOCATE);
        break;
        }
      case ABS:{
        t = jj_consume_token(ABS);
        break;
        }
      case SQRT:{
        t = jj_consume_token(SQRT);
        break;
        }
      case MOD:{
        t = jj_consume_token(MOD);
        break;
        }
      default:
        jj_la1[47] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  return t;
  }
  
    final public Token datetimeFuncName() throws ParseException {Token t;
      switch (jj_nt.kind) {
      case CURRENT_DATE:{
        t = jj_consume_token(CURRENT_DATE);
        break;
        }
      case CURRENT_TIME:{
        t = jj_consume_token(CURRENT_TIME);
        break;
        }
      case CURRENT_TIMESTAMP:{
        t = jj_consume_token(CURRENT_TIMESTAMP);
        break;
        }
      default:
        jj_la1[48] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  return t;
  }
  
    final public Token dateTimePartFuncName() throws ParseException {Token t;
      switch (jj_nt.kind) {
      case YEAR:{
        t = jj_consume_token(YEAR);
        break;
        }
      case MONTH:{
        t = jj_consume_token(MONTH);
        break;
        }
      case WEEK:{
        t = jj_consume_token(WEEK);
        break;
        }
      case DAY_OF_YEAR:{
        t = jj_consume_token(DAY_OF_YEAR);
        break;
        }
      case DAY:{
        t = jj_consume_token(DAY);
        break;
        }
      case DAY_OF_MONTH:{
        t = jj_consume_token(DAY_OF_MONTH);
        break;
        }
      case DAY_OF_WEEK:{
        t = jj_consume_token(DAY_OF_WEEK);
        break;
        }
      case HOUR:{
        t = jj_consume_token(HOUR);
        break;
        }
      case MINUTE:{
        t = jj_consume_token(MINUTE);
        break;
        }
      case SECOND:{
        t = jj_consume_token(SECOND);
        break;
        }
      default:
        jj_la1[49] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  return t;
  }
  
    final public void namedParameter() throws ParseException {Token t;
      t = jj_consume_token(NAMED_PARAMETER);
  ExpNamedParameter jjtn001 = new ExpNamedParameter(JJTNAMEDPARAMETER);
                              boolean jjtc001 = true;
                              jjtree.openNodeScope(jjtn001);
      try {
  jjtree.closeNodeScope(jjtn001,  0);
                              jjtc001 = false;
  jjtn001.jjtSetValue(t.image.substring(1));
      } finally {
  if (jjtc001) {
                                jjtree.closeNodeScope(jjtn001,  0);
                              }
      }
  }
  
    final public void pathExpression() throws ParseException {Token t;
      switch (jj_nt.kind) {
      case PROPERTY_PATH:{
        t = jj_consume_token(PROPERTY_PATH);
        break;
        }
      case YEAR:
      case MONTH:
      case WEEK:
      case DAY_OF_YEAR:
      case DAY:
      case DAY_OF_MONTH:
      case DAY_OF_WEEK:
      case HOUR:
      case MINUTE:
      case SECOND:{
        t = dateTimePartFuncName();
        break;
        }
      case CURRENT_DATE:
      case CURRENT_TIME:
      case CURRENT_TIMESTAMP:{
        t = datetimeFuncName();
        break;
        }
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:{
        t = stringFuncName();
        break;
        }
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:{
        t = numericFuncName();
        break;
        }
      default:
        jj_la1[50] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  ExpPath jjtn001 = new ExpPath(JJTPATH);
         boolean jjtc001 = true;
         jjtree.openNodeScope(jjtn001);
      try {
  jjtree.closeNodeScope(jjtn001,  0);
         jjtc001 = false;
  jjtn001.jjtSetValue(t.image);
      } finally {
  if (jjtc001) {
           jjtree.closeNodeScope(jjtn001,  0);
         }
      }
  }
  
    private boolean jj_2_1(int xla)
   {
      jj_la = xla; jj_lastpos = jj_scanpos = token;
      try { return (!jj_3_1()); }
      catch(LookaheadSuccess ls) { return true; }
      finally { jj_save(0, xla); }
    }
  
    private boolean jj_2_2(int xla)
   {
      jj_la = xla; jj_lastpos = jj_scanpos = token;
      try { return (!jj_3_2()); }
      catch(LookaheadSuccess ls) { return true; }
      finally { jj_save(1, xla); }
    }
  
    private boolean jj_2_3(int xla)
   {
      jj_la = xla; jj_lastpos = jj_scanpos = token;
      try { return (!jj_3_3()); }
      catch(LookaheadSuccess ls) { return true; }
      finally { jj_save(2, xla); }
    }
  
    private boolean jj_2_4(int xla)
   {
      jj_la = xla; jj_lastpos = jj_scanpos = token;
      try { return (!jj_3_4()); }
      catch(LookaheadSuccess ls) { return true; }
      finally { jj_save(3, xla); }
    }
  
    private boolean jj_2_5(int xla)
   {
      jj_la = xla; jj_lastpos = jj_scanpos = token;
      try { return (!jj_3_5()); }
      catch(LookaheadSuccess ls) { return true; }
      finally { jj_save(4, xla); }
    }
  
    private boolean jj_3_5()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_3R_null_323_22_15()) {
      jj_scanpos = xsp;
      if (jj_3R_null_323_47_16()) return true;
      }
      if (jj_scan_token(18)) return true;
      return false;
    }
  
    private boolean jj_3_1()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_3R_null_93_22_11()) jj_scanpos = xsp;
      if (jj_scan_token(5)) return true;
      return false;
    }
  
    private boolean jj_3R_dateTimePartFuncName_471_5_18()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_scan_token(52)) {
      jj_scanpos = xsp;
      if (jj_scan_token(53)) {
      jj_scanpos = xsp;
      if (jj_scan_token(54)) {
      jj_scanpos = xsp;
      if (jj_scan_token(55)) {
      jj_scanpos = xsp;
      if (jj_scan_token(56)) {
      jj_scanpos = xsp;
      if (jj_scan_token(57)) {
      jj_scanpos = xsp;
      if (jj_scan_token(58)) {
      jj_scanpos = xsp;
      if (jj_scan_token(59)) {
      jj_scanpos = xsp;
      if (jj_scan_token(60)) {
      jj_scanpos = xsp;
      if (jj_scan_token(61)) return true;
      }
      }
      }
      }
      }
      }
      }
      }
      }
      return false;
    }
  
    private boolean jj_3R_numericFuncName_447_5_19()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_scan_token(44)) {
      jj_scanpos = xsp;
      if (jj_scan_token(45)) {
      jj_scanpos = xsp;
      if (jj_scan_token(46)) {
      jj_scanpos = xsp;
      if (jj_scan_token(47)) {
      jj_scanpos = xsp;
      if (jj_scan_token(48)) return true;
      }
      }
      }
      }
      return false;
    }
  
    private boolean jj_3_3()
   {
      if (jj_3R_datetimeFuncName_460_5_13()) return true;
      if (jj_scan_token(18)) return true;
      return false;
    }
  
    private boolean jj_3_2()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_3R_null_175_20_12()) {
      jj_scanpos = xsp;
      if (jj_scan_token(72)) {
      jj_scanpos = xsp;
      if (jj_scan_token(75)) return true;
      }
      }
      return false;
    }
  
    private boolean jj_3R_null_175_20_12()
   {
      if (jj_3R_stringFuncName_434_5_17()) return true;
      if (jj_scan_token(18)) return true;
      return false;
    }
  
    private boolean jj_3R_datetimeFuncName_460_5_13()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_scan_token(49)) {
      jj_scanpos = xsp;
      if (jj_scan_token(50)) {
      jj_scanpos = xsp;
      if (jj_scan_token(51)) return true;
      }
      }
      return false;
    }
  
    private boolean jj_3R_stringFuncName_434_5_17()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_scan_token(39)) {
      jj_scanpos = xsp;
      if (jj_scan_token(40)) {
      jj_scanpos = xsp;
      if (jj_scan_token(41)) {
      jj_scanpos = xsp;
      if (jj_scan_token(42)) {
      jj_scanpos = xsp;
      if (jj_scan_token(43)) return true;
      }
      }
      }
      }
      return false;
    }
  
    private boolean jj_3R_null_323_47_16()
   {
      if (jj_3R_numericFuncName_447_5_19()) return true;
      return false;
    }
  
    private boolean jj_3R_null_188_20_14()
   {
      if (jj_3R_stringFuncName_434_5_17()) return true;
      if (jj_scan_token(18)) return true;
      return false;
    }
  
    private boolean jj_3_4()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_3R_null_188_20_14()) {
      jj_scanpos = xsp;
      if (jj_scan_token(72)) {
      jj_scanpos = xsp;
      if (jj_scan_token(75)) return true;
      }
      }
      return false;
    }
  
    private boolean jj_3R_null_323_22_15()
   {
      if (jj_3R_dateTimePartFuncName_471_5_18()) return true;
      return false;
    }
  
    private boolean jj_3R_null_93_22_11()
   {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_scan_token(3)) {
      jj_scanpos = xsp;
      if (jj_scan_token(4)) return true;
      }
      return false;
    }
  
    /** Generated Token Manager. */
    public AgExpressionParserTokenManager token_source;
    JavaCharStream jj_input_stream;
    /** Current token. */
    public Token token;
    /** Next token. */
    public Token jj_nt;
    private Token jj_scanpos, jj_lastpos;
    private int jj_la;
    private int jj_gen;
    final private int[] jj_la1 = new int[51];
    static private int[] jj_la1_0;
    static private int[] jj_la1_1;
    static private int[] jj_la1_2;
    static {
  	   jj_la1_init_0();
  	   jj_la1_init_1();
  	   jj_la1_init_2();
  	}
  	private static void jj_la1_init_0() {
  	   jj_la1_0 = new int[] {0x2,0x4,0x18,0x98040018,0xc0,0x300,0x8000,0x8000,0x40000,0x137fd8,0x137fd8,0x98040000,0x18,0x38,0x18,0x8000,0x8000,0x40000,0x134000,0x200000,0x98040000,0x0,0x0,0x0,0x98040000,0x0,0x400000,0x800000,0x1000000,0x6000000,0x6000000,0x18000000,0x18000000,0x60000000,0x60000000,0x98040000,0x8000000,0x18040000,0x40000,0x0,0x0,0x200000,0x200000,0x0,0x200000,0x0,0x0,0x0,0x0,0x0,0x0,};
  	}
  	private static void jj_la1_init_1() {
  	   jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffff0,0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0xfffffff0,0x0,0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0xffffff90,0xbfffff80,0x0,0xf80,0xfffffff0,0x40000060,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffff80,0x0,0xffffff80,0x40000000,0xbfffff80,0xf80,0x0,0x0,0x3ff1f000,0x0,0xe0000,0xf80,0x1f000,0xe0000,0x3ff00000,0xbfffff80,};
  	}
  	private static void jj_la1_init_2() {
  	   jj_la1_2 = new int[] {0x0,0x0,0x0,0x3900,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3900,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x900,0x900,0x3900,0x3900,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x3000,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
  	}
    final private JJCalls[] jj_2_rtns = new JJCalls[5];
    private boolean jj_rescan = false;
    private int jj_gc = 0;
  
    /** Constructor. */
    public AgExpressionParser(Provider stream) {
  	 jj_input_stream = new JavaCharStream(stream, 1, 1);
  	 token_source = new AgExpressionParserTokenManager(jj_input_stream);
  	 token = new Token();
  	 token.next = jj_nt = token_source.getNextToken();
  	 jj_gen = 0;
  	 for (int i = 0; i < 51; i++) jj_la1[i] = -1;
  	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Constructor. */
    public AgExpressionParser(String dsl) throws ParseException, TokenMgrException {
  	   this(new StringProvider(dsl));
    }
  
    public void ReInit(String s) {
  	  ReInit(new StringProvider(s));
    }
    /** Reinitialise. */
    public void ReInit(Provider stream) {
  	if (jj_input_stream == null) {
  	   jj_input_stream = new JavaCharStream(stream, 1, 1);
  	} else {
  	   jj_input_stream.ReInit(stream, 1, 1);
  	}
  	if (token_source == null) {
   token_source = new AgExpressionParserTokenManager(jj_input_stream);
  	}
  
  	 token_source.ReInit(jj_input_stream);
  	 token = new Token();
  	 token.next = jj_nt = token_source.getNextToken();
  	 jjtree.reset();
  	 jj_gen = 0;
  	 for (int i = 0; i < 51; i++) jj_la1[i] = -1;
  	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Constructor with generated Token Manager. */
    public AgExpressionParser(AgExpressionParserTokenManager tm) {
  	 token_source = tm;
  	 token = new Token();
  	 token.next = jj_nt = token_source.getNextToken();
  	 jj_gen = 0;
  	 for (int i = 0; i < 51; i++) jj_la1[i] = -1;
  	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Reinitialise. */
    public void ReInit(AgExpressionParserTokenManager tm) {
  	 token_source = tm;
  	 token = new Token();
  	 token.next = jj_nt = token_source.getNextToken();
  	 jjtree.reset();
  	 jj_gen = 0;
  	 for (int i = 0; i < 51; i++) jj_la1[i] = -1;
  	 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    private Token jj_consume_token(int kind) throws ParseException {
  	 Token oldToken = token;
  	 if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
  	 else jj_nt = jj_nt.next = token_source.getNextToken();
  	 if (token.kind == kind) {
  	   jj_gen++;
  	   if (++jj_gc > 100) {
  		 jj_gc = 0;
  		 for (int i = 0; i < jj_2_rtns.length; i++) {
  		   JJCalls c = jj_2_rtns[i];
  		   while (c != null) {
  			 if (c.gen < jj_gen) c.first = null;
  			 c = c.next;
  		   }
  		 }
  	   }
  	   return token;
  	 }
  	 jj_nt = token;
  	 token = oldToken;
  	 jj_kind = kind;
  	 throw generateParseException();
    }
  
    @SuppressWarnings("serial")
    static private final class LookaheadSuccess extends java.lang.RuntimeException {
      @Override
      public Throwable fillInStackTrace() {
        return this;
      }
    }
    static private final LookaheadSuccess jj_ls = new LookaheadSuccess();
    private boolean jj_scan_token(int kind) {
  	 if (jj_scanpos == jj_lastpos) {
  	   jj_la--;
  	   if (jj_scanpos.next == null) {
  		 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
  	   } else {
  		 jj_lastpos = jj_scanpos = jj_scanpos.next;
  	   }
  	 } else {
  	   jj_scanpos = jj_scanpos.next;
  	 }
  	 if (jj_rescan) {
  	   int i = 0; Token tok = token;
  	   while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
  	   if (tok != null) jj_add_error_token(kind, i);
  	 }
  	 if (jj_scanpos.kind != kind) return true;
  	 if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
  	 return false;
    }
  
  
  /** Get the next Token. */
    final public Token getNextToken() {
  	 if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
  	 else jj_nt = jj_nt.next = token_source.getNextToken();
  	 jj_gen++;
  	 return token;
    }
  
  /** Get the specific Token. */
    final public Token getToken(int index) {
  	 Token t = token;
  	 for (int i = 0; i < index; i++) {
  	   if (t.next != null) t = t.next;
  	   else t = t.next = token_source.getNextToken();
  	 }
  	 return t;
    }
  
    private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
    private int[] jj_expentry;
    private int jj_kind = -1;
    private int[] jj_lasttokens = new int[100];
    private int jj_endpos;
  
    private void jj_add_error_token(int kind, int pos) {
  	 if (pos >= 100) {
  		return;
  	 }
  
  	 if (pos == jj_endpos + 1) {
  	   jj_lasttokens[jj_endpos++] = kind;
  	 } else if (jj_endpos != 0) {
  	   jj_expentry = new int[jj_endpos];
  
  	   for (int i = 0; i < jj_endpos; i++) {
  		 jj_expentry[i] = jj_lasttokens[i];
  	   }
  
  	   for (int[] oldentry : jj_expentries) {
  		 if (oldentry.length == jj_expentry.length) {
  		   boolean isMatched = true;
  
  		   for (int i = 0; i < jj_expentry.length; i++) {
  			 if (oldentry[i] != jj_expentry[i]) {
  			   isMatched = false;
  			   break;
  			 }
  
  		   }
  		   if (isMatched) {
  			 jj_expentries.add(jj_expentry);
  			 break;
  		   }
  		 }
  	   }
  
  	   if (pos != 0) {
  		 jj_lasttokens[(jj_endpos = pos) - 1] = kind;
  	   }
  	 }
    }
  
    /** Generate ParseException. */
    public ParseException generateParseException() {
  	 jj_expentries.clear();
  	 boolean[] la1tokens = new boolean[89];
  	 if (jj_kind >= 0) {
  	   la1tokens[jj_kind] = true;
  	   jj_kind = -1;
  	 }
  	 for (int i = 0; i < 51; i++) {
  	   if (jj_la1[i] == jj_gen) {
  		 for (int j = 0; j < 32; j++) {
  		   if ((jj_la1_0[i] & (1<<j)) != 0) {
  			 la1tokens[j] = true;
  		   }
  		   if ((jj_la1_1[i] & (1<<j)) != 0) {
  			 la1tokens[32+j] = true;
  		   }
  		   if ((jj_la1_2[i] & (1<<j)) != 0) {
  			 la1tokens[64+j] = true;
  		   }
  		 }
  	   }
  	 }
  	 for (int i = 0; i < 89; i++) {
  	   if (la1tokens[i]) {
  		 jj_expentry = new int[1];
  		 jj_expentry[0] = i;
  		 jj_expentries.add(jj_expentry);
  	   }
  	 }
  	 jj_endpos = 0;
  	 jj_rescan_token();
  	 jj_add_error_token(0, 0);
  	 int[][] exptokseq = new int[jj_expentries.size()][];
  	 for (int i = 0; i < jj_expentries.size(); i++) {
  	   exptokseq[i] = jj_expentries.get(i);
  	 }
  	 return new ParseException(token, exptokseq, tokenImage, token_source == null ? null : AgExpressionParserTokenManager.lexStateNames[token_source.curLexState]);
    }
  
    private boolean trace_enabled;
  
  /** Trace enabled. */
    final public boolean trace_enabled() {
  	 return trace_enabled;
    }
  
    /** Enable tracing. */
    final public void enable_tracing() {
    }
  
    /** Disable tracing. */
    final public void disable_tracing() {
    }
  
    private void jj_rescan_token() {
  	 jj_rescan = true;
  	 for (int i = 0; i < 5; i++) {
  	   try {
  		 JJCalls p = jj_2_rtns[i];
  
  		 do {
  		   if (p.gen > jj_gen) {
  			 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
  			 switch (i) {
  			   case 0: jj_3_1(); break;
  			   case 1: jj_3_2(); break;
  			   case 2: jj_3_3(); break;
  			   case 3: jj_3_4(); break;
  			   case 4: jj_3_5(); break;
  			 }
  		   }
  		   p = p.next;
  		 } while (p != null);
  
  		 } catch(LookaheadSuccess ls) { }
  	 }
  	 jj_rescan = false;
    }
  
    private void jj_save(int index, int xla) {
  	 JJCalls p = jj_2_rtns[index];
  	 while (p.gen > jj_gen) {
  	   if (p.next == null) { p = p.next = new JJCalls(); break; }
  	   p = p.next;
  	 }
  
  	 p.gen = jj_gen + xla - jj_la; 
  	 p.first = token;
  	 p.arg = xla;
    }
  
    static final class JJCalls {
  	 int gen;
  	 Token first;
  	 int arg;
  	 JJCalls next;
    }
  
  }
  