content: /* ExpressionParser.java */
  /* Generated By:JJTree&JavaCC: Do not edit this line. ExpressionParser.java */
  /*****************************************************************
   *   Licensed to the Apache Software Foundation (ASF) under one
   *  or more contributor license agreements.  See the NOTICE file
   *  distributed with this work for additional information
   *  regarding copyright ownership.  The ASF licenses this file
   *  to you under the Apache License, Version 2.0 (the
   *  "License"); you may not use this file except in compliance
   *  with the License.  You may obtain a copy of the License at
   *
   *    https://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing,
   *  software distributed under the License is distributed on an
   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   *  KIND, either express or implied.  See the License for the
   *  specific language governing permissions and limitations
   *  under the License.
   ****************************************************************/
  
  
  package org.apache.cayenne.exp.parser;
  
  import java.math.BigDecimal;
  import java.math.BigInteger;
  import org.apache.cayenne.exp.Expression;
  
  /**
    * Parser of Cayenne Expressions. 
    *
    * @since 1.1
    */
  public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeConstants, ExpressionParserConstants {/*@bgen(jjtree)*/
    protected JJTExpressionParserState jjtree = new JJTExpressionParserState();
  
    final public Expression expression() throws ParseException {
      orCondition();
      jj_consume_token(0);
  {if ("" != null) return (Expression) jjtree.rootNode();}
      throw new Error("Missing return statement in function");
  }
  
    final public void orCondition() throws ParseException {
      andCondition();
      label_1:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 1:{
          ;
          break;
          }
        default:
          jj_la1[0] = jj_gen;
          break label_1;
        }
        jj_consume_token(1);
  ASTOr jjtn001 = new ASTOr(JJTOR);
                                  boolean jjtc001 = true;
                                  jjtree.openNodeScope(jjtn001);
        try {
          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,  2);
                                  }
        }
      }
  }
  
    final public void andCondition() throws ParseException {
      notCondition();
      label_2:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 2:{
          ;
          break;
          }
        default:
          jj_la1[1] = jj_gen;
          break label_2;
        }
        jj_consume_token(2);
  ASTAnd jjtn001 = new ASTAnd(JJTAND);
                                   boolean jjtc001 = true;
                                   jjtree.openNodeScope(jjtn001);
        try {
          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,  2);
                                   }
        }
      }
  }
  
    final public void notCondition() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case NOT_EXISTS:{
        jj_consume_token(NOT_EXISTS);
  ASTNotExists jjtn001 = new ASTNotExists(JJTNOTEXISTS);
                         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 EXISTS:{
        jj_consume_token(EXISTS);
  ASTExists jjtn002 = new ASTExists(JJTEXISTS);
                         boolean jjtc002 = true;
                         jjtree.openNodeScope(jjtn002);
        try {
          simpleCondition();
        } 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;
        }
      case 3:
      case 4:{
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        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();
        }
  ASTNot jjtn003 = new ASTNot(JJTNOT);
                                    boolean jjtc003 = true;
                                    jjtree.openNodeScope(jjtn003);
        try {
          simpleCondition();
        } 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,  1);
                                    }
        }
        break;
        }
      case 16:
      case 25:
      case 26:
      case 28:
      case NULL:
      case TRUE:
      case FALSE:
      case AVG:
      case MIN:
      case MAX:
      case SUM:
      case COUNT:
      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 FUNCTION:
      case OPERATOR:
      case AGGREGATE:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      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 {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case TRUE:{
  ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
              boolean jjtc001 = true;
              jjtree.openNodeScope(jjtn001);
        try {
          jj_consume_token(TRUE);
        } finally {
  if (jjtc001) {
                jjtree.closeNodeScope(jjtn001, true);
              }
        }
        break;
        }
      case FALSE:{
  ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
              boolean jjtc002 = true;
              jjtree.openNodeScope(jjtn002);
        try {
          jj_consume_token(FALSE);
        } finally {
  if (jjtc002) {
                jjtree.closeNodeScope(jjtn002, true);
              }
        }
        break;
        }
      case 16:
      case 25:
      case 26:
      case 28:
      case NULL:
      case AVG:
      case MIN:
      case MAX:
      case SUM:
      case COUNT:
      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 FUNCTION:
      case OPERATOR:
      case AGGREGATE:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      case PROPERTY_PATH:
      case SINGLE_QUOTED_STRING:
      case DOUBLE_QUOTED_STRING:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        conditionExpression();
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 10:
        case 11:
        case 12:
        case 13:
        case 14:
        case 15:
        case 18:{
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 5:
          case 6:{
            switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
            case 5:{
              jj_consume_token(5);
              break;
              }
            case 6:{
              jj_consume_token(6);
              break;
              }
            default:
              jj_la1[4] = jj_gen;
              jj_consume_token(-1);
              throw new ParseException();
            }
  ASTEqual jjtn003 = new ASTEqual(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 7:
          case 8:{
            switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
            case 7:{
              jj_consume_token(7);
              break;
              }
            case 8:{
              jj_consume_token(8);
              break;
              }
            default:
              jj_la1[5] = jj_gen;
              jj_consume_token(-1);
              throw new ParseException();
            }
  ASTNotEqual jjtn004 = new ASTNotEqual(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 9:{
            jj_consume_token(9);
  ASTLessOrEqual jjtn005 = new ASTLessOrEqual(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 10:{
            jj_consume_token(10);
  ASTLess jjtn006 = new ASTLess(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 11:{
            jj_consume_token(11);
  ASTGreater jjtn007 = new ASTGreater(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 12:{
            jj_consume_token(12);
  ASTGreaterOrEqual jjtn008 = new ASTGreaterOrEqual(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 13:{
            jj_consume_token(13);
  ASTLike jjtn009 = new ASTLike(JJTLIKE);
                     boolean jjtc009 = true;
                     jjtree.openNodeScope(jjtn009);
            try {
              scalarExpression();
            } 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,  2);
                     }
            }
            break;
            }
          case 14:{
            jj_consume_token(14);
  ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
                                boolean jjtc010 = true;
                                jjtree.openNodeScope(jjtn010);
            try {
              scalarExpression();
            } 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,  2);
                                }
            }
            break;
            }
          case 15:{
            jj_consume_token(15);
  ASTIn jjtn011 = new ASTIn(JJTIN);
                   boolean jjtc011 = true;
                   jjtree.openNodeScope(jjtn011);
            try {
              switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
              case 70:{
                namedParameter();
                break;
                }
              case 16:{
                jj_consume_token(16);
                scalarCommaList();
                jj_consume_token(17);
                break;
                }
              default:
                jj_la1[6] = 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 18:{
            jj_consume_token(18);
            scalarExpression();
            jj_consume_token(2);
  ASTBetween jjtn012 = new ASTBetween(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[7] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
          break;
          }
        default:
          jj_la1[8] = jj_gen;
          ;
        }
        break;
        }
      default:
        jj_la1[9] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void simpleNotCondition() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 3:{
        jj_consume_token(3);
        break;
        }
      case 4:{
        jj_consume_token(4);
        break;
        }
      default:
        jj_la1[10] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 13:{
        jj_consume_token(13);
  ASTNotLike jjtn001 = new ASTNotLike(JJTNOTLIKE);
                           boolean jjtc001 = true;
                           jjtree.openNodeScope(jjtn001);
        try {
          scalarExpression();
        } 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 14:{
        jj_consume_token(14);
  ASTNotLikeIgnoreCase jjtn002 = new ASTNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE);
                                  boolean jjtc002 = true;
                                  jjtree.openNodeScope(jjtn002);
        try {
          scalarExpression();
        } 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;
        }
      case 15:{
        jj_consume_token(15);
  ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
                         boolean jjtc003 = true;
                         jjtree.openNodeScope(jjtn003);
        try {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 70:{
            namedParameter();
            break;
            }
          case 16:{
            jj_consume_token(16);
            scalarCommaList();
            jj_consume_token(17);
            break;
            }
          default:
            jj_la1[11] = 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 18:{
        jj_consume_token(18);
        scalarExpression();
        jj_consume_token(2);
  ASTNotBetween jjtn004 = new ASTNotBetween(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[12] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void scalarCommaList() throws ParseException {
  ASTList jjtn001 = new ASTList(JJTLIST);
            boolean jjtc001 = true;
            jjtree.openNodeScope(jjtn001);
      try {
        scalarConstExpression();
        label_3:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 19:{
            ;
            break;
            }
          default:
            jj_la1[13] = jj_gen;
            break label_3;
          }
          jj_consume_token(19);
          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 {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:
      case 25:
      case 26:
      case 28:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      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 FUNCTION:
      case OPERATOR:
      case AGGREGATE:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      case PROPERTY_PATH:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        numericExpression();
        break;
        }
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:
      case SINGLE_QUOTED_STRING:
      case DOUBLE_QUOTED_STRING:{
        stringExpression();
        break;
        }
      case NULL:{
  ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                    boolean jjtc001 = true;
                    jjtree.openNodeScope(jjtn001);
        try {
          jj_consume_token(NULL);
        } finally {
  if (jjtc001) {
                      jjtree.closeNodeScope(jjtn001,  0);
                    }
        }
        break;
        }
      case AVG:
      case MIN:
      case MAX:
      case SUM:
      case COUNT:{
        aggregateExpression();
        break;
        }
      case CURRENT_DATE:
      case CURRENT_TIME:
      case CURRENT_TIMESTAMP:{
        dateTimeFunction();
        break;
        }
      default:
        jj_la1[14] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void stringParameter() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 71:
      case 72:
      case 73:
      case 74:
      case PROPERTY_PATH:{
        pathExpression();
        break;
        }
      case CONCAT:
      case SUBSTRING:
      case TRIM:
      case LOWER:
      case UPPER:
      case SINGLE_QUOTED_STRING:
      case DOUBLE_QUOTED_STRING:{
        stringExpression();
        break;
        }
      case FUNCTION:{
        customFunction();
        break;
        }
      case OPERATOR:{
        customOperator();
        break;
        }
      case AGGREGATE:{
        customAggregate();
        break;
        }
      default:
        jj_la1[15] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void stringLiteral() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case SINGLE_QUOTED_STRING:{
        jj_consume_token(SINGLE_QUOTED_STRING);
  ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                               boolean jjtc001 = true;
                               jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                               jjtc001 = false;
  jjtn001.setValue(token_source.literalValue);
        } finally {
  if (jjtc001) {
                                 jjtree.closeNodeScope(jjtn001,  0);
                               }
        }
        break;
        }
      case DOUBLE_QUOTED_STRING:{
        jj_consume_token(DOUBLE_QUOTED_STRING);
  ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                               boolean jjtc002 = true;
                               jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                               jjtc002 = false;
  jjtn002.setValue(token_source.literalValue);
        } finally {
  if (jjtc002) {
                                 jjtree.closeNodeScope(jjtn002,  0);
                               }
        }
        break;
        }
      default:
        jj_la1[16] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void stringExpression() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      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[17] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void scalarExpression() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:
      case 25:
      case 26:
      case 28:
      case NULL:
      case AVG:
      case MIN:
      case MAX:
      case SUM:
      case COUNT:
      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 FUNCTION:
      case OPERATOR:
      case AGGREGATE:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      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);
  ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                     boolean jjtc001 = true;
                     jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                     jjtc001 = false;
  jjtn001.setValue(true);
        } finally {
  if (jjtc001) {
                       jjtree.closeNodeScope(jjtn001,  0);
                     }
        }
        break;
        }
      case FALSE:{
        jj_consume_token(FALSE);
  ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                      boolean jjtc002 = true;
                      jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                      jjtc002 = false;
  jjtn002.setValue(false);
        } finally {
  if (jjtc002) {
                        jjtree.closeNodeScope(jjtn002,  0);
                      }
        }
        break;
        }
      default:
        jj_la1[18] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void scalarConstExpression() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case SINGLE_QUOTED_STRING:{
        jj_consume_token(SINGLE_QUOTED_STRING);
  ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                                     boolean jjtc001 = true;
                                     jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                                     jjtc001 = false;
  jjtn001.setValue(token_source.literalValue);
        } finally {
  if (jjtc001) {
                                       jjtree.closeNodeScope(jjtn001,  0);
                                     }
        }
        break;
        }
      case DOUBLE_QUOTED_STRING:{
        jj_consume_token(DOUBLE_QUOTED_STRING);
  ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                                     boolean jjtc002 = true;
                                     jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                                     jjtc002 = false;
  jjtn002.setValue(token_source.literalValue);
        } finally {
  if (jjtc002) {
                                       jjtree.closeNodeScope(jjtn002,  0);
                                     }
        }
        break;
        }
      case 70:{
        namedParameter();
        break;
        }
      case INT_LITERAL:{
        jj_consume_token(INT_LITERAL);
  ASTScalar jjtn003 = new ASTScalar(JJTSCALAR);
                              boolean jjtc003 = true;
                              jjtree.openNodeScope(jjtn003);
        try {
  jjtree.closeNodeScope(jjtn003,  0);
                              jjtc003 = false;
  jjtn003.setValue(token_source.literalValue);
        } finally {
  if (jjtc003) {
                                jjtree.closeNodeScope(jjtn003,  0);
                              }
        }
        break;
        }
      case FLOAT_LITERAL:{
        jj_consume_token(FLOAT_LITERAL);
  ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
                              boolean jjtc004 = true;
                              jjtree.openNodeScope(jjtn004);
        try {
  jjtree.closeNodeScope(jjtn004,  0);
                              jjtc004 = false;
  jjtn004.setValue(token_source.literalValue);
        } finally {
  if (jjtc004) {
                                jjtree.closeNodeScope(jjtn004,  0);
                              }
        }
        break;
        }
      case TRUE:{
        jj_consume_token(TRUE);
  ASTScalar jjtn005 = new ASTScalar(JJTSCALAR);
                      boolean jjtc005 = true;
                      jjtree.openNodeScope(jjtn005);
        try {
  jjtree.closeNodeScope(jjtn005,  0);
                      jjtc005 = false;
  jjtn005.setValue(true);
        } finally {
  if (jjtc005) {
                        jjtree.closeNodeScope(jjtn005,  0);
                      }
        }
        break;
        }
      case FALSE:{
        jj_consume_token(FALSE);
  ASTScalar jjtn006 = new ASTScalar(JJTSCALAR);
                      boolean jjtc006 = true;
                      jjtree.openNodeScope(jjtn006);
        try {
  jjtree.closeNodeScope(jjtn006,  0);
                      jjtc006 = false;
  jjtn006.setValue(false);
        } finally {
  if (jjtc006) {
                        jjtree.closeNodeScope(jjtn006,  0);
                      }
        }
        break;
        }
      default:
        jj_la1[19] = 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_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 20:{
          ;
          break;
          }
        default:
          jj_la1[20] = jj_gen;
          break label_4;
        }
        jj_consume_token(20);
  ASTBitwiseOr jjtn001 = new ASTBitwiseOr(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_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 21:{
          ;
          break;
          }
        default:
          jj_la1[21] = jj_gen;
          break label_5;
        }
        jj_consume_token(21);
  ASTBitwiseXor jjtn001 = new ASTBitwiseXor(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_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 22:{
          ;
          break;
          }
        default:
          jj_la1[22] = jj_gen;
          break label_6;
        }
        jj_consume_token(22);
  ASTBitwiseAnd jjtn001 = new ASTBitwiseAnd(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_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 23:
        case 24:{
          ;
          break;
          }
        default:
          jj_la1[23] = jj_gen;
          break label_7;
        }
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 23:{
          jj_consume_token(23);
  ASTBitwiseLeftShift jjtn001 = new ASTBitwiseLeftShift(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 24:{
          jj_consume_token(24);
  ASTBitwiseRightShift jjtn002 = new ASTBitwiseRightShift(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[24] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void arithmeticExp() throws ParseException {
      multiplySubtractExp();
      label_8:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 25:
        case 26:{
          ;
          break;
          }
        default:
          jj_la1[25] = jj_gen;
          break label_8;
        }
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 25:{
          jj_consume_token(25);
  ASTAdd jjtn001 = new ASTAdd(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 26:{
          jj_consume_token(26);
  ASTSubtract jjtn002 = new ASTSubtract(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[26] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void multiplySubtractExp() throws ParseException {
      numericTermExt();
      label_9:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 27:
        case ASTERISK:{
          ;
          break;
          }
        default:
          jj_la1[27] = jj_gen;
          break label_9;
        }
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case ASTERISK:{
          jj_consume_token(ASTERISK);
  ASTMultiply jjtn001 = new ASTMultiply(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 27:{
          jj_consume_token(27);
  ASTDivide jjtn002 = new ASTDivide(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[28] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
  }
  
    final public void numericTermExt() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:
      case 25:
      case 26:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      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 FUNCTION:
      case OPERATOR:
      case AGGREGATE:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      case PROPERTY_PATH:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        numericTerm();
        break;
        }
      case 28:{
        jj_consume_token(28);
  ASTBitwiseNot jjtn001 = new ASTBitwiseNot(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[29] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void numericTerm() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:
      case 25:
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      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 FUNCTION:
      case OPERATOR:
      case AGGREGATE:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      case PROPERTY_PATH:
      case INT_LITERAL:
      case FLOAT_LITERAL:{
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 25:{
          jj_consume_token(25);
          break;
          }
        default:
          jj_la1[30] = jj_gen;
          ;
        }
        numericPrimary();
        break;
        }
      case 26:{
        jj_consume_token(26);
  ASTNegate jjtn001 = new ASTNegate(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[31] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void numericPrimary() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case 16:{
        jj_consume_token(16);
        orCondition();
        jj_consume_token(17);
        break;
        }
      case INT_LITERAL:{
        jj_consume_token(INT_LITERAL);
  ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                             boolean jjtc001 = true;
                             jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                             jjtc001 = false;
  jjtn001.setValue(token_source.literalValue);
        } finally {
  if (jjtc001) {
                               jjtree.closeNodeScope(jjtn001,  0);
                             }
        }
        break;
        }
      case FLOAT_LITERAL:{
        jj_consume_token(FLOAT_LITERAL);
  ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                              boolean jjtc002 = true;
                              jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                              jjtc002 = false;
  jjtn002.setValue(token_source.literalValue);
        } finally {
  if (jjtc002) {
                                jjtree.closeNodeScope(jjtn002,  0);
                              }
        }
        break;
        }
      case 70:{
        namedParameter();
        break;
        }
      case LENGTH:
      case LOCATE:
      case ABS:
      case SQRT:
      case MOD:
      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:{
        functionsReturningNumerics();
        break;
        }
      case 71:
      case 72:
      case 73:
      case 74:
      case PROPERTY_PATH:{
        pathExpression();
        break;
        }
      case FUNCTION:{
        customFunction();
        break;
        }
      case OPERATOR:{
        customOperator();
        break;
        }
      case AGGREGATE:{
        customAggregate();
        break;
        }
      default:
        jj_la1[32] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void functionsReturningStrings() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case CONCAT:{
        concat();
        break;
        }
      case SUBSTRING:{
        substring();
        break;
        }
      case TRIM:{
        trim();
        break;
        }
      case LOWER:{
        lower();
        break;
        }
      case UPPER:{
        upper();
        break;
        }
      default:
        jj_la1[33] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void customFunction() throws ParseException {/*@bgen(jjtree) CustomFunction */
    ASTCustomFunction jjtn000 = new ASTCustomFunction(JJTCUSTOMFUNCTION);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(FUNCTION);
        jj_consume_token(16);
        stringLiteral();
        label_10:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 19:{
            ;
            break;
            }
          default:
            jj_la1[34] = jj_gen;
            break label_10;
          }
          jj_consume_token(19);
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case CONCAT:
          case SUBSTRING:
          case TRIM:
          case LOWER:
          case UPPER:
          case SINGLE_QUOTED_STRING:
          case DOUBLE_QUOTED_STRING:{
            stringExpression();
            break;
            }
          case 16:
          case 25:
          case 26:
          case 28:
          case LENGTH:
          case LOCATE:
          case ABS:
          case SQRT:
          case MOD:
          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 FUNCTION:
          case OPERATOR:
          case AGGREGATE:
          case 70:
          case 71:
          case 72:
          case 73:
          case 74:
          case PROPERTY_PATH:
          case INT_LITERAL:
          case FLOAT_LITERAL:{
            numericExpression();
            break;
            }
          default:
            jj_la1[35] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        }
        jj_consume_token(17);
      } 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 customOperator() throws ParseException {/*@bgen(jjtree) CustomOperator */
    ASTCustomOperator jjtn000 = new ASTCustomOperator(JJTCUSTOMOPERATOR);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(OPERATOR);
        jj_consume_token(16);
        stringLiteral();
        label_11:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 19:{
            ;
            break;
            }
          default:
            jj_la1[36] = jj_gen;
            break label_11;
          }
          jj_consume_token(19);
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case CONCAT:
          case SUBSTRING:
          case TRIM:
          case LOWER:
          case UPPER:
          case SINGLE_QUOTED_STRING:
          case DOUBLE_QUOTED_STRING:{
            stringExpression();
            break;
            }
          case 16:
          case 25:
          case 26:
          case 28:
          case LENGTH:
          case LOCATE:
          case ABS:
          case SQRT:
          case MOD:
          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 FUNCTION:
          case OPERATOR:
          case AGGREGATE:
          case 70:
          case 71:
          case 72:
          case 73:
          case 74:
          case PROPERTY_PATH:
          case INT_LITERAL:
          case FLOAT_LITERAL:{
            numericExpression();
            break;
            }
          default:
            jj_la1[37] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        }
        jj_consume_token(17);
      } 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 customAggregate() throws ParseException {/*@bgen(jjtree) CustomAggregate */
    ASTCustomAggregate jjtn000 = new ASTCustomAggregate(JJTCUSTOMAGGREGATE);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(AGGREGATE);
        jj_consume_token(16);
        stringLiteral();
        label_12:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 19:{
            ;
            break;
            }
          default:
            jj_la1[38] = jj_gen;
            break label_12;
          }
          jj_consume_token(19);
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case CONCAT:
          case SUBSTRING:
          case TRIM:
          case LOWER:
          case UPPER:
          case SINGLE_QUOTED_STRING:
          case DOUBLE_QUOTED_STRING:{
            stringExpression();
            break;
            }
          case 16:
          case 25:
          case 26:
          case 28:
          case LENGTH:
          case LOCATE:
          case ABS:
          case SQRT:
          case MOD:
          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 FUNCTION:
          case OPERATOR:
          case AGGREGATE:
          case 70:
          case 71:
          case 72:
          case 73:
          case 74:
          case PROPERTY_PATH:
          case INT_LITERAL:
          case FLOAT_LITERAL:{
            numericExpression();
            break;
            }
          default:
            jj_la1[39] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
          }
        }
        jj_consume_token(17);
      } 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 concat() throws ParseException {/*@bgen(jjtree) Concat */
    ASTConcat jjtn000 = new ASTConcat(JJTCONCAT);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CONCAT);
        jj_consume_token(16);
        stringParameter();
        label_13:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
          case 19:{
            ;
            break;
            }
          default:
            jj_la1[40] = jj_gen;
            break label_13;
          }
          jj_consume_token(19);
          stringParameter();
        }
        jj_consume_token(17);
      } 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 */
    ASTSubstring jjtn000 = new ASTSubstring(JJTSUBSTRING);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(SUBSTRING);
        jj_consume_token(16);
        stringParameter();
        jj_consume_token(19);
        numericExpression();
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 19:{
          jj_consume_token(19);
          numericExpression();
          break;
          }
        default:
          jj_la1[41] = jj_gen;
          ;
        }
        jj_consume_token(17);
      } 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 */
    ASTTrim jjtn000 = new ASTTrim(JJTTRIM);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(TRIM);
        jj_consume_token(16);
        stringParameter();
        jj_consume_token(17);
      } 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 */
    ASTLower jjtn000 = new ASTLower(JJTLOWER);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(LOWER);
        jj_consume_token(16);
        stringParameter();
        jj_consume_token(17);
      } 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 */
    ASTUpper jjtn000 = new ASTUpper(JJTUPPER);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(UPPER);
        jj_consume_token(16);
        stringParameter();
        jj_consume_token(17);
      } 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_ntk==-1)?jj_ntk_f():jj_ntk) {
      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[42] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void length() throws ParseException {/*@bgen(jjtree) Length */
    ASTLength jjtn000 = new ASTLength(JJTLENGTH);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(LENGTH);
        jj_consume_token(16);
        stringParameter();
        jj_consume_token(17);
      } 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 */
    ASTLocate jjtn000 = new ASTLocate(JJTLOCATE);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(LOCATE);
        jj_consume_token(16);
        stringParameter();
        jj_consume_token(19);
        stringParameter();
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case 19:{
          jj_consume_token(19);
          numericExpression();
          break;
          }
        default:
          jj_la1[43] = jj_gen;
          ;
        }
        jj_consume_token(17);
      } 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 */
    ASTAbs jjtn000 = new ASTAbs(JJTABS);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(ABS);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(17);
      } 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 */
    ASTSqrt jjtn000 = new ASTSqrt(JJTSQRT);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(SQRT);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(17);
      } 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 */
    ASTMod jjtn000 = new ASTMod(JJTMOD);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(MOD);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(19);
        numericExpression();
        jj_consume_token(17);
      } 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 aggregateExpression() throws ParseException {
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case AVG:{
        avg();
        break;
        }
      case MAX:{
        max();
        break;
        }
      case MIN:{
        min();
        break;
        }
      case SUM:{
        sum();
        break;
        }
      case COUNT:{
        count();
        break;
        }
      default:
        jj_la1[44] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void asterisk() throws ParseException {/*@bgen(jjtree) Asterisk */
    ASTAsterisk jjtn000 = new ASTAsterisk(JJTASTERISK);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(ASTERISK);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
    final public void count() throws ParseException {/*@bgen(jjtree) Count */
    ASTCount jjtn000 = new ASTCount(JJTCOUNT);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(COUNT);
        jj_consume_token(16);
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        case ASTERISK:{
          asterisk();
          break;
          }
        case 71:
        case 72:
        case 73:
        case 74:
        case PROPERTY_PATH:{
          pathExpression();
          break;
          }
        case DISTINCT:{
          distinct();
          break;
          }
        default:
          jj_la1[45] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
        jj_consume_token(17);
      } 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 avg() throws ParseException {/*@bgen(jjtree) Avg */
    ASTAvg jjtn000 = new ASTAvg(JJTAVG);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(AVG);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(17);
      } 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 max() throws ParseException {/*@bgen(jjtree) Max */
    ASTMax jjtn000 = new ASTMax(JJTMAX);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(MAX);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(17);
      } 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 min() throws ParseException {/*@bgen(jjtree) Min */
    ASTMin jjtn000 = new ASTMin(JJTMIN);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(MIN);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(17);
      } 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 sum() throws ParseException {/*@bgen(jjtree) Sum */
    ASTSum jjtn000 = new ASTSum(JJTSUM);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(SUM);
        jj_consume_token(16);
        numericExpression();
        jj_consume_token(17);
      } 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_ntk==-1)?jj_ntk_f():jj_ntk) {
      case CURRENT_DATE:{
        currentDate();
        break;
        }
      case CURRENT_TIME:{
        currentTime();
        break;
        }
      case CURRENT_TIMESTAMP:{
        currentTimestamp();
        break;
        }
      default:
        jj_la1[46] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
    final public void currentDate() throws ParseException {/*@bgen(jjtree) CurrentDate */
    ASTCurrentDate jjtn000 = new ASTCurrentDate(JJTCURRENTDATE);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CURRENT_DATE);
        jj_consume_token(16);
        jj_consume_token(17);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
    final public void currentTime() throws ParseException {/*@bgen(jjtree) CurrentTime */
    ASTCurrentTime jjtn000 = new ASTCurrentTime(JJTCURRENTTIME);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CURRENT_TIME);
        jj_consume_token(16);
        jj_consume_token(17);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
    final public void currentTimestamp() throws ParseException {/*@bgen(jjtree) CurrentTimestamp */
    ASTCurrentTimestamp jjtn000 = new ASTCurrentTimestamp(JJTCURRENTTIMESTAMP);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(CURRENT_TIMESTAMP);
        jj_consume_token(16);
        jj_consume_token(17);
      } finally {
  if (jjtc000) {
          jjtree.closeNodeScope(jjtn000, true);
        }
      }
  }
  
  /* Date/time parts extracting function */
    final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jjtree) #Extract( 1) */
      ASTExtract jjtn000 = new ASTExtract(JJTEXTRACT);
      boolean jjtc000 = true;
      jjtree.openNodeScope(jjtn000);Token t;
      try {
        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
        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[47] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
  jjtn000.setPartToken(t.image);
        jj_consume_token(16);
        pathExpression();
        jj_consume_token(17);
      } 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 void distinct() throws ParseException {/*@bgen(jjtree) Distinct */
    ASTDistinct jjtn000 = new ASTDistinct(JJTDISTINCT);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
      try {
        jj_consume_token(DISTINCT);
        jj_consume_token(16);
        pathExpression();
        jj_consume_token(17);
      } 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 namedParameter() throws ParseException {Token t;
      jj_consume_token(70);
      t = jj_consume_token(PROPERTY_PATH);
  ASTNamedParameter jjtn001 = new ASTNamedParameter(JJTNAMEDPARAMETER);
                                    boolean jjtc001 = true;
                                    jjtree.openNodeScope(jjtn001);
      try {
  jjtree.closeNodeScope(jjtn001,  0);
                                    jjtc001 = false;
  jjtn001.setValue(t.image);
      } finally {
  if (jjtc001) {
                                      jjtree.closeNodeScope(jjtn001,  0);
                                    }
      }
  }
  
    final public void pathExpression() throws ParseException {Token t;
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case PROPERTY_PATH:{
        t = jj_consume_token(PROPERTY_PATH);
  ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
                                     boolean jjtc001 = true;
                                     jjtree.openNodeScope(jjtn001);
        try {
  jjtree.closeNodeScope(jjtn001,  0);
                                     jjtc001 = false;
  ExpressionUtils.parsePath(jjtn001, t.image);
        } finally {
  if (jjtc001) {
                                       jjtree.closeNodeScope(jjtn001,  0);
                                     }
        }
        break;
        }
      case 71:{
        jj_consume_token(71);
        t = pathToken();
  ASTObjPath jjtn002 = new ASTObjPath(JJTOBJPATH);
                                 boolean jjtc002 = true;
                                 jjtree.openNodeScope(jjtn002);
        try {
  jjtree.closeNodeScope(jjtn002,  0);
                                 jjtc002 = false;
  ExpressionUtils.parsePath(jjtn002, t.image);
        } finally {
  if (jjtc002) {
                                   jjtree.closeNodeScope(jjtn002,  0);
                                 }
        }
        break;
        }
      case 72:{
        jj_consume_token(72);
        t = pathToken();
  ASTDbPath jjtn003 = new ASTDbPath(JJTDBPATH);
                                 boolean jjtc003 = true;
                                 jjtree.openNodeScope(jjtn003);
        try {
  jjtree.closeNodeScope(jjtn003,  0);
                                 jjtc003 = false;
  ExpressionUtils.parsePath(jjtn003, t.image);
        } finally {
  if (jjtc003) {
                                   jjtree.closeNodeScope(jjtn003,  0);
                                 }
        }
        break;
        }
      case 73:{
        jj_consume_token(73);
        t = pathToken();
  ASTEnum jjtn004 = new ASTEnum(JJTENUM);
                                 boolean jjtc004 = true;
                                 jjtree.openNodeScope(jjtn004);
        try {
  jjtree.closeNodeScope(jjtn004,  0);
                                 jjtc004 = false;
  jjtn004.setEnumValue(t.image);
        } finally {
  if (jjtc004) {
                                   jjtree.closeNodeScope(jjtn004,  0);
                                 }
        }
        break;
        }
      case 74:{
        jj_consume_token(74);
        t = pathToken();
  ASTDbIdPath jjtn005 = new ASTDbIdPath(JJTDBIDPATH);
                                 boolean jjtc005 = true;
                                 jjtree.openNodeScope(jjtn005);
        try {
  jjtree.closeNodeScope(jjtn005,  0);
                                 jjtc005 = false;
  ExpressionUtils.parsePath(jjtn005, t.image);
        } finally {
  if (jjtc005) {
                                   jjtree.closeNodeScope(jjtn005,  0);
                                 }
        }
        break;
        }
      default:
        jj_la1[48] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  }
  
  // this rule returns single token that could be used as a path definition
    final public Token pathToken() throws ParseException {Token t ;
      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
      case PROPERTY_PATH:{
        t = jj_consume_token(PROPERTY_PATH);
        break;
        }
      case AVG:{
        t = jj_consume_token(AVG);
        break;
        }
      case MIN:{
        t = jj_consume_token(MIN);
        break;
        }
      case MAX:{
        t = jj_consume_token(MAX);
        break;
        }
      case SUM:{
        t = jj_consume_token(SUM);
        break;
        }
      case COUNT:{
        t = jj_consume_token(COUNT);
        break;
        }
      case DISTINCT:{
        t = jj_consume_token(DISTINCT);
        break;
        }
      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;
        }
      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;
        }
      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;
        }
      case YEAR:{
        t = jj_consume_token(YEAR);
        break;
        }
      case MONTH:{
        t = jj_consume_token(MONTH);
        break;
        }
      case DAY:{
        t = jj_consume_token(DAY);
        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;
        }
      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 DAY_OF_YEAR:{
        t = jj_consume_token(DAY_OF_YEAR);
        break;
        }
      default:
        jj_la1[49] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
  {if ("" != null) return t;}
      throw new Error("Missing return statement in function");
  }
  
    /** Generated Token Manager. */
    public ExpressionParserTokenManager token_source;
    JavaCharStream jj_input_stream;
    /** Current token. */
    public Token token;
    /** Next token. */
    public Token jj_nt;
    private int jj_ntk;
    private int jj_gen;
    final private int[] jj_la1 = new int[50];
    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,0x16010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x16010000,0x18,0x10000,0x4e000,0x80000,0x16010000,0x0,0x0,0x0,0x16010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x8000000,0x8000000,0x16010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x16010000,0x80000,0x16010000,0x80000,0x16010000,0x80000,0x80000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,};
  	}
  	private static void jj_la1_init_1() {
  	   jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0x0,0xfffff1fe,0x0,0x0,0x0,0x0,0xfffff1f2,0x1f000,0x0,0x1f000,0xfffff1fe,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe3e0000,0x0,0xfe3e0000,0xfe3e0000,0x1f000,0x0,0xfe3ff000,0x0,0xfe3ff000,0x0,0xfe3ff000,0x0,0x0,0xfe3e0000,0x0,0x1f0,0x200,0x1c00000,0xfe000000,0x0,0xf7fff3f0,};
  	}
  	private static void jj_la1_init_2() {
  	   jj_la1_2 = new int[] {0x0,0x0,0x0,0x72017ff,0x0,0x0,0x40,0x0,0x0,0x72017ff,0x0,0x40,0x0,0x0,0x72017ff,0x12017b8,0x1200000,0x1200000,0x72017ff,0x7200040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x800,0x60017ff,0x0,0x60017ff,0x60017ff,0x0,0x0,0x72017ff,0x0,0x72017ff,0x0,0x72017ff,0x0,0x0,0x7,0x0,0x0,0x1f80,0x0,0x7,0x1780,0x1007,};
  	}
  
    /** Constructor with InputStream. */
    public ExpressionParser(java.io.InputStream stream) {
  	  this(stream, null);
    }
    /** Constructor with InputStream and supplied encoding */
    public ExpressionParser(java.io.InputStream stream, String encoding) {
  	 try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
  	 token_source = new ExpressionParserTokenManager(jj_input_stream);
  	 token = new Token();
  	 jj_ntk = -1;
  	 jj_gen = 0;
  	 for (int i = 0; i < 50; i++) jj_la1[i] = -1;
    }
  
    /** Reinitialise. */
    public void ReInit(java.io.InputStream stream) {
  	  ReInit(stream, null);
    }
    /** Reinitialise. */
    public void ReInit(java.io.InputStream stream, String encoding) {
  	 try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
  	 token_source.ReInit(jj_input_stream);
  	 token = new Token();
  	 jj_ntk = -1;
  	 jjtree.reset();
  	 jj_gen = 0;
  	 for (int i = 0; i < 50; i++) jj_la1[i] = -1;
    }
  
    /** Constructor. */
    public ExpressionParser(java.io.Reader stream) {
  	 jj_input_stream = new JavaCharStream(stream, 1, 1);
  	 token_source = new ExpressionParserTokenManager(jj_input_stream);
  	 token = new Token();
  	 jj_ntk = -1;
  	 jj_gen = 0;
  	 for (int i = 0; i < 50; i++) jj_la1[i] = -1;
    }
  
    /** Reinitialise. */
    public void ReInit(java.io.Reader 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 ExpressionParserTokenManager(jj_input_stream);
  	}
  
  	 token_source.ReInit(jj_input_stream);
  	 token = new Token();
  	 jj_ntk = -1;
  	 jjtree.reset();
  	 jj_gen = 0;
  	 for (int i = 0; i < 50; i++) jj_la1[i] = -1;
    }
  
    /** Constructor with generated Token Manager. */
    public ExpressionParser(ExpressionParserTokenManager tm) {
  	 token_source = tm;
  	 token = new Token();
  	 jj_ntk = -1;
  	 jj_gen = 0;
  	 for (int i = 0; i < 50; i++) jj_la1[i] = -1;
    }
  
    /** Reinitialise. */
    public void ReInit(ExpressionParserTokenManager tm) {
  	 token_source = tm;
  	 token = new Token();
  	 jj_ntk = -1;
  	 jjtree.reset();
  	 jj_gen = 0;
  	 for (int i = 0; i < 50; i++) jj_la1[i] = -1;
    }
  
    private Token jj_consume_token(int kind) throws ParseException {
  	 Token oldToken;
  	 if ((oldToken = token).next != null) token = token.next;
  	 else token = token.next = token_source.getNextToken();
  	 jj_ntk = -1;
  	 if (token.kind == kind) {
  	   jj_gen++;
  	   return token;
  	 }
  	 token = oldToken;
  	 jj_kind = kind;
  	 throw generateParseException();
    }
  
  
  /** Get the next Token. */
    final public Token getNextToken() {
  	 if (token.next != null) token = token.next;
  	 else token = token.next = token_source.getNextToken();
  	 jj_ntk = -1;
  	 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 int jj_ntk_f() {
  	 if ((jj_nt=token.next) == null)
  	   return (jj_ntk = (token.next=token_source.getNextToken()).kind);
  	 else
  	   return (jj_ntk = jj_nt.kind);
    }
  
    private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
    private int[] jj_expentry;
    private int jj_kind = -1;
  
    /** Generate ParseException. */
    public ParseException generateParseException() {
  	 jj_expentries.clear();
  	 boolean[] la1tokens = new boolean[95];
  	 if (jj_kind >= 0) {
  	   la1tokens[jj_kind] = true;
  	   jj_kind = -1;
  	 }
  	 for (int i = 0; i < 50; 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 < 95; i++) {
  	   if (la1tokens[i]) {
  		 jj_expentry = new int[1];
  		 jj_expentry[0] = i;
  		 jj_expentries.add(jj_expentry);
  	   }
  	 }
  	 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);
    }
  
    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() {
    }
  
  }
  