/* Generated By:JavaCC: Do not edit this line. JoSQLParser.java */
package org.josql.parser;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import org.josql.Query;

import org.josql.internal.OrderBy;
import org.josql.internal.Limit;
import org.josql.internal.Utilities;
import org.josql.internal.ColumnReference;

import org.josql.expressions.*;

/**
 * The parser generated by JavaCC
 */
public class JoSQLParser implements JoSQLParserConstants {

  final public BindVariable BindVariable() throws ParseException {
  Token t = null;
  BindVariable result = new BindVariable ();
  String prefix = "";
  String acc = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 48:
      jj_consume_token(48);
      t = KeywordName();
                            result.setName (t.image);
      break;
    case 49:
      jj_consume_token(49);
      t = jj_consume_token(S_IDENTIFIER);
                              prefix = "_";  result.setName (prefix + t.image);
      break;
    case 50:
      jj_consume_token(50);
          result.setAnonymous (true);
      break;
    default:
      jj_la1[0] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 51:
      jj_consume_token(51);
      acc = Name();
                        result.setAccessor (acc);
      break;
    default:
      jj_la1[1] = jj_gen;
      ;
    }
      {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public SaveValue SaveValue() throws ParseException {
  Token t = null;
  SaveValue result = new SaveValue ();
  String v = null;
  String acc = null;
    jj_consume_token(52);
    t = KeywordName();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 51:
      jj_consume_token(51);
      acc = Name();
                                              result.setAccessor (acc);
      break;
    default:
      jj_la1[2] = jj_gen;
      ;
    }
      result.setName (t.image);

      {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public void parseQuery(Query q) throws ParseException {
    Query(q);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 53:
      jj_consume_token(53);
      break;
    default:
      jj_la1[3] = jj_gen;
      ;
    }
    jj_consume_token(0);
  }

  final public String Name() throws ParseException {
  StringBuffer v = new StringBuffer ();
  Token val = null;
    // Is in form... name.name.name
       val = KeywordName();
                          v.append (val.image);
    label_1:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 51:
        ;
        break;
      default:
        jj_la1[4] = jj_gen;
        break label_1;
      }
      jj_consume_token(51);
          v.append (".");
      val = KeywordName();
                          v.append (val.image);
    }
     {if (true) return v.toString ();}
    throw new Error("Missing return statement in function");
  }

  final public Token KeywordName() throws ParseException {
  Token t = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
      t = jj_consume_token(K_AS);
      break;
    case K_BY:
      t = jj_consume_token(K_BY);
      break;
    case K_IS:
      t = jj_consume_token(K_IS);
      break;
    case K_IN:
      t = jj_consume_token(K_IN);
      break;
    case K_OR:
      t = jj_consume_token(K_OR);
      break;
    case K_ON:
      t = jj_consume_token(K_ON);
      break;
    case K_ALL:
      t = jj_consume_token(K_ALL);
      break;
    case K_AND:
      t = jj_consume_token(K_AND);
      break;
    case K_NOT:
      t = jj_consume_token(K_NOT);
      break;
    case K_ASC:
      t = jj_consume_token(K_ASC);
      break;
    case K_DESC:
      t = jj_consume_token(K_DESC);
      break;
    case K_LIKE:
      t = jj_consume_token(K_LIKE);
      break;
    case K_INLIKE:
      t = jj_consume_token(K_INLIKE);
      break;
    case K_WHERE:
      t = jj_consume_token(K_WHERE);
      break;
    case K_GROUP:
      t = jj_consume_token(K_GROUP);
      break;
    case K_LIMIT:
      t = jj_consume_token(K_LIMIT);
      break;
    case K_ORDER:
      t = jj_consume_token(K_ORDER);
      break;
    case K_SELECT:
      t = jj_consume_token(K_SELECT);
      break;
    case K_DISTINCT:
      t = jj_consume_token(K_DISTINCT);
      break;
    case K_NEW:
      t = jj_consume_token(K_NEW);
      break;
    case K_TRUE:
      t = jj_consume_token(K_TRUE);
      break;
    case K_FALSE:
      t = jj_consume_token(K_FALSE);
      break;
    case K_HAVING:
      t = jj_consume_token(K_HAVING);
      break;
    case K_BETWEEN:
      t = jj_consume_token(K_BETWEEN);
      break;
    case K_USE:
      t = jj_consume_token(K_USE);
      break;
    case K_EXECUTE:
      t = jj_consume_token(K_EXECUTE);
      break;
    case K_RESULTS:
      t = jj_consume_token(K_RESULTS);
      break;
    case K_WHERE_RESULTS:
      t = jj_consume_token(K_WHERE_RESULTS);
      break;
    case K_HAVING_RESULTS:
      t = jj_consume_token(K_HAVING_RESULTS);
      break;
    case K_GROUP_BY_RESULTS:
      t = jj_consume_token(K_GROUP_BY_RESULTS);
      break;
    case S_IDENTIFIER:
      t = jj_consume_token(S_IDENTIFIER);
      break;
    default:
      jj_la1[5] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  {if (true) return t;}
    throw new Error("Missing return statement in function");
  }

/*
String MultiName():
{

  StringBuffer v = new StringBuffer ();
  Token val = null;
  
}
{

  // Is in form... name[name.name]
  val = Name()
  [ "[" [ <K_KEY> | <K_VALUE> ] val = PrimaryExpression() "]" { v.append (val.image); } ]
  {

     return v.toString ();

  }

} 
*/
  final public String RelObjectName() throws ParseException {
        Token tk = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
      tk = KeywordName();
      break;
    case S_CHAR_LITERAL:
      tk = jj_consume_token(S_CHAR_LITERAL);
      break;
    case S_CHAR_LITERAL2:
      tk = jj_consume_token(S_CHAR_LITERAL2);
      break;
    default:
      jj_la1[6] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
      {if (true) return tk.image;}
    throw new Error("Missing return statement in function");
  }

  final public void Query(Query q) throws ParseException {
        List cols = null;
        List fromItems = null;
        List joins = null;
        Expression where = null;
        List orderBys = null;
        List groupOrderBys = null;
        List groupBys = null;
        Expression having = null;
        Limit limit = null;
        Limit grpLimit = null;
        Expression from = null;
        Map execute = null;
        boolean distinct = false;
    jj_consume_token(K_SELECT);
    if (jj_2_1(2)) {
      jj_consume_token(K_DISTINCT);
                                              q.setWantDistinctResults (true);
    } else {
      ;
    }
    cols = SelectItemsList(q);
    from = From();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_WHERE:
      where = WhereClause();
      break;
    default:
      jj_la1[7] = jj_gen;
      ;
    }
    if (jj_2_2(2)) {
      groupBys = GroupBys();
    } else {
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_HAVING:
      having = Having();
      break;
    default:
      jj_la1[8] = jj_gen;
      ;
    }
    if (jj_2_3(2147483647)) {
      groupOrderBys = GroupOrderBys();
    } else {
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_ORDER:
      orderBys = OrderBys();
      break;
    default:
      jj_la1[9] = jj_gen;
      ;
    }
    if (jj_2_4(2147483647)) {
      grpLimit = GroupLimit();
    } else {
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_LIMIT:
      limit = Limit();
      break;
    default:
      jj_la1[10] = jj_gen;
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_EXECUTE:
      execute = ExecuteOn();
      break;
    default:
      jj_la1[11] = jj_gen;
      ;
    }
      // We set all the values since they are all dependent on the class 
      // being available.
      q.setFrom (from);
      q.setColumns (cols);
      q.setWhere (where);
      q.setHaving (having);
      q.setGroupByOrderColumns (groupOrderBys);
      q.setOrderByColumns (orderBys);
      q.setGroupByColumns (groupBys);
      q.setGroupByLimit (grpLimit);
      q.setLimit (limit);
      q.setExecuteOnFunctions (execute);
  }

  final public Map ExecuteOn() throws ParseException {
   Map et = new HashMap ();
    label_2:
    while (true) {
      jj_consume_token(K_EXECUTE);
      jj_consume_token(K_ON);
      et = ExecuteOnType(et);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_EXECUTE:
        ;
        break;
      default:
        jj_la1[12] = jj_gen;
        break label_2;
      }
    }
      {if (true) return et;}
    throw new Error("Missing return statement in function");
  }

  final public Map ExecuteOnType(Map execOn) throws ParseException {
   List el = null;
   String type = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_ALL:
      jj_consume_token(K_ALL);
              type = Query.ALL;
      break;
    case K_RESULTS:
      jj_consume_token(K_RESULTS);
                  type = Query.RESULTS;
      break;
    case K_WHERE_RESULTS:
      jj_consume_token(K_WHERE_RESULTS);
                        type = Query.RESULTS;
      break;
    case K_HAVING_RESULTS:
      jj_consume_token(K_HAVING_RESULTS);
                         type = Query.HAVING_RESULTS;
      break;
    case K_GROUP_BY_RESULTS:
      jj_consume_token(K_GROUP_BY_RESULTS);
                           type = Query.GROUP_BY_RESULTS;
      break;
    default:
      jj_la1[13] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    el = AliasedSQLExpressionList();
      List fs = (List) execOn.get (type);

      if (fs != null)
      {

         fs.addAll (el);

      } else {

         execOn.put (type,
                     el);

      }
      {if (true) return execOn;}
    throw new Error("Missing return statement in function");
  }

  final public List SelectItemsList(Query q) throws ParseException {
        List selectItemsList = new ArrayList();
        SelectItemExpression si = null;
    si = SelectItem(q);
                         if (si != null) { selectItemsList.add (si); }
    label_3:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[14] = jj_gen;
        break label_3;
      }
      jj_consume_token(54);
      si = SelectItem(q);
                                                                                                   if (si != null) { selectItemsList.add (si); }
    }
      {if (true) return selectItemsList;}
    throw new Error("Missing return statement in function");
  }

  final public List FunctionList() throws ParseException {
        List fList = new ArrayList();
        AliasedFunction f = null;
        String alias = null;
    f = AliasedFunction();
                            fList.add (f);
    label_4:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[15] = jj_gen;
        break label_4;
      }
      jj_consume_token(54);
      f = AliasedFunction();
                                                                          fList.add (f);
    }
      {if (true) return fList;}
    throw new Error("Missing return statement in function");
  }

  final public AliasedFunction AliasedFunction() throws ParseException {
   AliasedFunction af = new AliasedFunction ();
   String alias = null;
   Function f = null;
    f = Function();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
    case S_CHAR_LITERAL:
    case S_CHAR_LITERAL2:
      alias = Alias();
      break;
    default:
      jj_la1[16] = jj_gen;
      ;
    }
      af.setAlias (alias);
      af.setExpression (f);

      {if (true) return af;}
    throw new Error("Missing return statement in function");
  }

  final public SelectItemExpression SelectItem(Query q) throws ParseException {
        String alias = null;
        SelectItemExpression csei = null;
        Expression expression = null;
        boolean addItemsFromColl = false;
        Token addItemType = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 55:
      jj_consume_token(55);
            q.setWantObjects (true); {if (true) return null;}
      break;
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_NULL:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
    case S_CHAR_LITERAL:
    case S_CHAR_LITERAL2:
    case S_DOUBLE:
    case S_INTEGER:
    case 48:
    case 49:
    case 50:
    case 52:
    case 56:
    case 58:
    case 70:
    case 71:
      if (jj_2_5(2)) {
        jj_consume_token(56);
        jj_consume_token(55);
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case 54:
          jj_consume_token(54);
          addItemType = KeywordName();
          break;
        default:
          jj_la1[17] = jj_gen;
          ;
        }
        jj_consume_token(57);
                                                                     addItemsFromColl = true;
      } else {
        ;
      }
      expression = ExpressionList();
                                                                                                                                  csei = new SelectItemExpression (); csei.setExpression (expression);
      if (jj_2_6(2)) {
        alias = Alias();
                                        csei.setAlias (alias);
      } else {
        ;
      }
      break;
    default:
      jj_la1[18] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
            if (addItemsFromColl)
            {

               csei.setAddItemsType (java.util.Collection.class);

               if (addItemType != null)
               {

                  csei.setAddMapType (addItemType.image);
                  csei.setAddItemsType (java.util.Map.class);

               }

            }

            {if (true) return csei;}
    throw new Error("Missing return statement in function");
  }

  final public NewObjectExpression NewObjectExpression() throws ParseException {
   String setterName = null;
   String className = null;
   List conArgs = null;
   Expression expression = null;

   NewObjectExpression noe = new NewObjectExpression ();
    jj_consume_token(K_NEW);
            noe = new NewObjectExpression ();
    className = Name();
                                                                     noe.setClassName (className);
    jj_consume_token(58);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_NULL:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
    case S_CHAR_LITERAL:
    case S_CHAR_LITERAL2:
    case S_DOUBLE:
    case S_INTEGER:
    case 48:
    case 49:
    case 50:
    case 52:
    case 56:
    case 58:
    case 70:
    case 71:
      conArgs = SQLExpressionList();
                                                                                                                                           noe.setConstructorArgs (conArgs);
      break;
    default:
      jj_la1[19] = jj_gen;
      ;
    }
    jj_consume_token(59);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 60:
      jj_consume_token(60);
      expression = ExpressionList();
      jj_consume_token(K_INTO);
      setterName = Name();
                                                                     noe.addIntoExpression (expression, setterName);
      label_5:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case 54:
          ;
          break;
        default:
          jj_la1[20] = jj_gen;
          break label_5;
        }
        jj_consume_token(54);
        expression = ExpressionList();
        jj_consume_token(K_INTO);
        setterName = Name();
                                                                         noe.addIntoExpression (expression, setterName);
      }
      jj_consume_token(61);
      break;
    default:
      jj_la1[21] = jj_gen;
      ;
    }
      {if (true) return noe;}
    throw new Error("Missing return statement in function");
  }

  final public String Alias() throws ParseException {
  String retval = null;
    if (jj_2_7(2)) {
      jj_consume_token(K_AS);
    } else {
      ;
    }
    retval = RelObjectName();
     {if (true) return retval;}
    throw new Error("Missing return statement in function");
  }

  final public Expression From() throws ParseException {
   String cn = null;
   Expression from = null;
    jj_consume_token(K_FROM);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 48:
    case 49:
    case 50:
      from = BindVariable();
      break;
    case 52:
      from = SaveValue();
      break;
    default:
      jj_la1[23] = jj_gen;
      if (jj_2_8(3)) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case K_NULL:
          jj_consume_token(K_NULL);
                  cn = "null";
          break;
        case K_AS:
        case K_BY:
        case K_IS:
        case K_IN:
        case K_OR:
        case K_ON:
        case K_ALL:
        case K_AND:
        case K_NOT:
        case K_ASC:
        case K_DESC:
        case K_LIKE:
        case K_INLIKE:
        case K_WHERE:
        case K_GROUP:
        case K_LIMIT:
        case K_ORDER:
        case K_SELECT:
        case K_HAVING:
        case K_BETWEEN:
        case K_DISTINCT:
        case K_USE:
        case K_TRUE:
        case K_FALSE:
        case K_EXECUTE:
        case K_RESULTS:
        case K_WHERE_RESULTS:
        case K_HAVING_RESULTS:
        case K_GROUP_BY_RESULTS:
        case K_NEW:
        case S_IDENTIFIER:
          cn = Name();
          break;
        default:
          jj_la1[22] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
       ConstantExpression ce = new ConstantExpression (); from = ce; ce.setValue (cn);
      } else if (jj_2_9(3)) {
        from = Function();
      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
      {if (true) return from;}
    throw new Error("Missing return statement in function");
  }

  final public Expression WhereClause() throws ParseException {
        Expression retval = null;
    jj_consume_token(K_WHERE);
    retval = ExpressionList();
      {if (true) return retval;}
    throw new Error("Missing return statement in function");
  }

  final public List GroupBys() throws ParseException {
        List groupBys = new ArrayList();
        OrderBy ob = null;
    jj_consume_token(K_GROUP);
    jj_consume_token(K_BY);
    ob = OrderBy();
                                      groupBys.add (ob);
    label_6:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[24] = jj_gen;
        break label_6;
      }
      jj_consume_token(54);
      ob = OrderBy();
                              groupBys.add (ob);
    }
        {if (true) return groupBys;}
    throw new Error("Missing return statement in function");
  }

  final public Expression Having() throws ParseException {
        Expression having = null;
    jj_consume_token(K_HAVING);
    having = ExpressionList();
                {if (true) return having;}
    throw new Error("Missing return statement in function");
  }

  final public List OrderBys() throws ParseException {
   List orderBys = new ArrayList ();
   OrderBy ob = null;
    jj_consume_token(K_ORDER);
    jj_consume_token(K_BY);
    ob = OrderBy();
                                      orderBys.add (ob);
    label_7:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[25] = jj_gen;
        break label_7;
      }
      jj_consume_token(54);
      ob = OrderBy();
                              orderBys.add (ob);
    }
        {if (true) return orderBys;}
    throw new Error("Missing return statement in function");
  }

  final public List GroupOrderBys() throws ParseException {
   List orderBys = new ArrayList ();
   OrderBy ob = null;
    jj_consume_token(K_GROUP);
    jj_consume_token(K_BY);
    jj_consume_token(K_ORDER);
    ob = OrderBy();
                                                orderBys.add (ob);
    label_8:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[26] = jj_gen;
        break label_8;
      }
      jj_consume_token(54);
      ob = OrderBy();
                              orderBys.add (ob);
    }
        {if (true) return orderBys;}
    throw new Error("Missing return statement in function");
  }

  final public OrderBy OrderBy() throws ParseException {
   OrderBy oe = new OrderBy ();
   String acc = null;
   Token ci = null;
   int cInt = -1;
   Expression exp = null;
    if (jj_2_10(2)) {
      ci = jj_consume_token(S_INTEGER);
                                     cInt = Integer.parseInt (ci.image); oe.setIndex (cInt);
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_AS:
      case K_BY:
      case K_IS:
      case K_IN:
      case K_OR:
      case K_ON:
      case K_ALL:
      case K_AND:
      case K_NOT:
      case K_ASC:
      case K_DESC:
      case K_NULL:
      case K_LIKE:
      case K_INLIKE:
      case K_WHERE:
      case K_GROUP:
      case K_LIMIT:
      case K_ORDER:
      case K_SELECT:
      case K_HAVING:
      case K_BETWEEN:
      case K_DISTINCT:
      case K_USE:
      case K_TRUE:
      case K_FALSE:
      case K_EXECUTE:
      case K_RESULTS:
      case K_WHERE_RESULTS:
      case K_HAVING_RESULTS:
      case K_GROUP_BY_RESULTS:
      case K_NEW:
      case S_IDENTIFIER:
      case S_CHAR_LITERAL:
      case S_CHAR_LITERAL2:
      case S_DOUBLE:
      case S_INTEGER:
      case 48:
      case 49:
      case 50:
      case 52:
      case 56:
      case 58:
      case 70:
      case 71:
        exp = ExpressionList();
                             oe.setExpression (exp);
        break;
      default:
        jj_la1[27] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_ASC:
    case K_DESC:
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_ASC:
        jj_consume_token(K_ASC);
               oe.setType (OrderBy.ASC);
        break;
      case K_DESC:
        jj_consume_token(K_DESC);
                                                        oe.setType (OrderBy.DESC);
        break;
      default:
        jj_la1[28] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      break;
    default:
      jj_la1[29] = jj_gen;
      ;
    }
      {if (true) return oe;}
    throw new Error("Missing return statement in function");
  }

  final public Limit Limit() throws ParseException {
        Limit limit = new Limit ();
        Token token = null;
        Expression start = null;
        Expression rows = null;
    jj_consume_token(K_LIMIT);
    if (jj_2_11(2)) {
      start = SimpleExpression();
      jj_consume_token(54);
    } else {
      ;
    }
    rows = SimpleExpression();
      if ((start != null)
          &&
          (!(start instanceof ValueExpression))
         )
      {

         {if (true) throw new ParseException ("Only expressions that return a numeric value are supported as the start value for the LIMIT part of the query.");}

      }

      if (!(rows instanceof ValueExpression))
      {

         {if (true) throw new ParseException ("Only expressions that return a numeric value are supported as the rows value for the LIMIT part of the query.");}

      }

      limit.setStart ((ValueExpression) start);
      limit.setRowsCount ((ValueExpression) rows);

      {if (true) return limit;}
    throw new Error("Missing return statement in function");
  }

  final public Limit GroupLimit() throws ParseException {
        Limit limit = new Limit ();
        Token token = null;
        Expression start = null;
        Expression rows = null;
    jj_consume_token(K_GROUP);
    jj_consume_token(K_BY);
    jj_consume_token(K_LIMIT);
    if (jj_2_12(2)) {
      start = SimpleExpression();
      jj_consume_token(54);
    } else {
      ;
    }
    rows = SimpleExpression();
      if ((start != null)
          &&
          (!(start instanceof ValueExpression))
         )
      {

         {if (true) throw new ParseException ("Only expressions that return a numeric value are supported as the start value for the LIMIT part of the query.");}

      }

      if (!(rows instanceof ValueExpression))
      {

         {if (true) throw new ParseException ("Only expressions that return a numeric value are supported as the rows value for the LIMIT part of the query.");}

      }

      limit.setStart ((ValueExpression) start);
      limit.setRowsCount ((ValueExpression) rows);

      {if (true) return limit;}
    throw new Error("Missing return statement in function");
  }

  final public ColumnReference ColumnReference() throws ParseException {
        ColumnReference retval = new ColumnReference ();
        String name = null;
        int index = -1;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
      name = Name();
                         retval.setName (name);
      break;
    case S_INTEGER:
      index = ColumnIndex();
                                   retval.setIndex (index);
      break;
    default:
      jj_la1[30] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
          {if (true) return retval;}
    throw new Error("Missing return statement in function");
  }

  final public int ColumnIndex() throws ParseException {
   Token index = null;
    index = jj_consume_token(S_INTEGER);
           {if (true) return Integer.parseInt(index.image);}
    throw new Error("Missing return statement in function");
  }

  final public Expression ExpressionList() throws ParseException {
   ExpressionList el = null;
   Expression expr = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_NULL:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
    case S_CHAR_LITERAL:
    case S_CHAR_LITERAL2:
    case S_DOUBLE:
    case S_INTEGER:
    case 48:
    case 49:
    case 50:
    case 52:
    case 58:
    case 70:
    case 71:
      expr = OrExpression();
                            {if (true) return expr;}
      break;
    case 56:
      jj_consume_token(56);
      expr = ExpressionList();
                                  el = new ExpressionList (); el.addExpression (expr);
      label_9:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case 54:
          ;
          break;
        default:
          jj_la1[31] = jj_gen;
          break label_9;
        }
        jj_consume_token(54);
        expr = ExpressionList();
                                    el.addExpression (expr);
      }
      jj_consume_token(57);
        {if (true) return el;}
      break;
    default:
      jj_la1[32] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    throw new Error("Missing return statement in function");
  }

  final public Expression OrExpression() throws ParseException {
        Expression left;
        Expression right;
        Expression result;
    left = AndExpression();
                                  result = left;
    label_10:
    while (true) {
      if (jj_2_13(2147483647)) {
        ;
      } else {
        break label_10;
      }
      jj_consume_token(K_OR);
      right = ExpressionList();
                                result = new AndOrExpression ();
                                BinaryExpression be = (BinaryExpression) result;
                                be.setLeft (left);
                                be.setRight (right);
    }
                {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression AndExpression() throws ParseException {
        Expression left;
        Expression right;
        Expression result;
    left = Condition();
                             result = left;
    label_11:
    while (true) {
      if (jj_2_14(2147483647)) {
        ;
      } else {
        break label_11;
      }
      jj_consume_token(K_AND);
      right = ExpressionList();
                        result = new AndOrExpression ();

                        AndOrExpression aoe = (AndOrExpression) result;
                        aoe.setLeft (left);
                        aoe.setRight (right);
                        aoe.setAnd (true);
    }
          {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression Condition() throws ParseException {
        Expression result;
    if (jj_2_15(2147483647)) {
      result = SQLCondition();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_AS:
      case K_BY:
      case K_IS:
      case K_IN:
      case K_OR:
      case K_ON:
      case K_ALL:
      case K_AND:
      case K_NOT:
      case K_ASC:
      case K_DESC:
      case K_NULL:
      case K_LIKE:
      case K_INLIKE:
      case K_WHERE:
      case K_GROUP:
      case K_LIMIT:
      case K_ORDER:
      case K_SELECT:
      case K_HAVING:
      case K_BETWEEN:
      case K_DISTINCT:
      case K_USE:
      case K_TRUE:
      case K_FALSE:
      case K_EXECUTE:
      case K_RESULTS:
      case K_WHERE_RESULTS:
      case K_HAVING_RESULTS:
      case K_GROUP_BY_RESULTS:
      case K_NEW:
      case S_IDENTIFIER:
      case S_CHAR_LITERAL:
      case S_CHAR_LITERAL2:
      case S_DOUBLE:
      case S_INTEGER:
      case 48:
      case 49:
      case 50:
      case 52:
      case 58:
      case 70:
      case 71:
        result = RegularCondition();
        break;
      default:
        jj_la1[33] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
          {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression RegularCondition() throws ParseException {
        Expression result = null;
        Expression left = null;
        Expression right = null;
        boolean ignoreCase = false;
    left = SimpleExpression();
                                    result = left;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 62:
    case 63:
    case 64:
    case 65:
    case 66:
    case 67:
    case 68:
    case 69:
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 62:
        jj_consume_token(62);
                 ignoreCase = true;
        break;
      default:
        jj_la1[34] = jj_gen;
        ;
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 63:
        jj_consume_token(63);
                 result = new GTLTExpression (); GTLTExpression lt = (GTLTExpression) result; lt.setIgnoreCase (ignoreCase); lt.setType (Utilities.GT);
        break;
      case 64:
        jj_consume_token(64);
                   result = new GTLTExpression (); lt = (GTLTExpression) result; lt.setIgnoreCase (ignoreCase); lt.setType (Utilities.LT);
        break;
      case 65:
        jj_consume_token(65);
                   result = new EqualsExpression (); EqualsExpression ee = (EqualsExpression) result; ee.setIgnoreCase (ignoreCase);
        break;
      case 66:
        jj_consume_token(66);
                    result = new GTLTExpression (); lt = (GTLTExpression) result; lt.setIgnoreCase (ignoreCase); lt.setType (Utilities.GTE);
        break;
      case 67:
        jj_consume_token(67);
                    result = new GTLTExpression (); lt = (GTLTExpression) result; lt.setIgnoreCase (ignoreCase); lt.setType (Utilities.LTE);
        break;
      case 68:
      case 69:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case 68:
          jj_consume_token(68);
          break;
        case 69:
          jj_consume_token(69);
          break;
        default:
          jj_la1[35] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
                             result = new EqualsExpression (); ee = (EqualsExpression) result; ee.setNot (true); ee.setIgnoreCase (ignoreCase);
        break;
      default:
        jj_la1[36] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      right = SimpleExpression();
          BinaryExpression be = (BinaryExpression) result;
          be.setLeft (left);
          be.setRight (right);
      break;
    default:
      jj_la1[37] = jj_gen;
      ;
    }
       {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression SQLCondition() throws ParseException {
        Expression result;
    if (jj_2_16(2147483647)) {
      result = InExpression();
    } else if (jj_2_17(2147483647)) {
      result = BetweenExpression();
    } else if (jj_2_18(2147483647)) {
      result = IsNullExpression();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_AS:
      case K_BY:
      case K_IS:
      case K_IN:
      case K_OR:
      case K_ON:
      case K_ALL:
      case K_AND:
      case K_NOT:
      case K_ASC:
      case K_DESC:
      case K_NULL:
      case K_LIKE:
      case K_INLIKE:
      case K_WHERE:
      case K_GROUP:
      case K_LIMIT:
      case K_ORDER:
      case K_SELECT:
      case K_HAVING:
      case K_BETWEEN:
      case K_DISTINCT:
      case K_USE:
      case K_TRUE:
      case K_FALSE:
      case K_EXECUTE:
      case K_RESULTS:
      case K_WHERE_RESULTS:
      case K_HAVING_RESULTS:
      case K_GROUP_BY_RESULTS:
      case K_NEW:
      case S_IDENTIFIER:
      case S_CHAR_LITERAL:
      case S_CHAR_LITERAL2:
      case S_DOUBLE:
      case S_INTEGER:
      case 48:
      case 49:
      case 50:
      case 52:
      case 58:
      case 70:
      case 71:
        result = LikeExpression();
        break;
      default:
        jj_la1[38] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
          {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public InExpression InExpression() throws ParseException {
        InExpression result = new InExpression();
        List items = null;
        Expression left = null;
    left = SimpleExpression();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_NOT:
      jj_consume_token(K_NOT);
               result.setNot(true);
      break;
    default:
      jj_la1[39] = jj_gen;
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 62:
      jj_consume_token(62);
                                                result.setIgnoreCase (true);
      break;
    default:
      jj_la1[40] = jj_gen;
      ;
    }
    jj_consume_token(K_IN);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 62:
      jj_consume_token(62);
                                                                                                result.setIgnoreCase (true);
      break;
    default:
      jj_la1[41] = jj_gen;
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_LIKE:
      jj_consume_token(K_LIKE);
                                                                                                                                              result.setDoLike (true);
      break;
    default:
      jj_la1[42] = jj_gen;
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_ALL:
      jj_consume_token(K_ALL);
                                                                                                                                                                                        result.setAll (true);
      break;
    default:
      jj_la1[43] = jj_gen;
      ;
    }
    jj_consume_token(58);
    items = SQLExpressionList();
    jj_consume_token(59);
           if (!(left instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The left-hand side of an [NOT] IN clause must be a value expression.");}

           }

           result.setLeft ((ValueExpression) left);

           for (int i = 0; i < items.size (); i++)
           {

              if (!(items.get (i) instanceof ValueExpression))
              {

                 {if (true) throw new ParseException ("Item: " + (i + 1) + " from the [NOT] IN clause is NOT a value expression, is: \"" + items.get (i).toString () + "\"");}

              }

           }

           result.setItems (items);
           {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public BetweenExpression BetweenExpression() throws ParseException {
        BetweenExpression result = new BetweenExpression ();
        Expression left = null;
        Expression start = null;
        Expression end = null;
    left = SimpleExpression();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_NOT:
      jj_consume_token(K_NOT);
                       result.setNot(true);
      break;
    default:
      jj_la1[44] = jj_gen;
      ;
    }
    jj_consume_token(K_BETWEEN);
    start = SimpleExpression();
    jj_consume_token(K_AND);
    end = SimpleExpression();
           if (!(left instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The left-hand side of an [NOT] BETWEEN clause must be a value expression, is: \"" + left + "\"");}

           }

           if (!(start instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The START value of an [NOT] BETWEEN clause must be a value expression, is: \"" + start + "\"");}

           }

           if (!(end instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The END value of an [NOT] BETWEEN clause must be a value expression, is: \"" + end + "\"");}

           }

                result.setLeft ((ValueExpression) left);
                result.setStart ((ValueExpression) start);
                result.setEnd ((ValueExpression) end);
                {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public LikeExpression LikeExpression() throws ParseException {
        LikeExpression result = new LikeExpression ();
        Expression left = null;
        Expression right = null;
    left = SimpleExpression();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_NOT:
      jj_consume_token(K_NOT);
               result.setNot (true);
      break;
    default:
      jj_la1[45] = jj_gen;
      ;
    }
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 62:
      jj_consume_token(62);
                                                 result.setIgnoreCase (true);
      break;
    default:
      jj_la1[46] = jj_gen;
      ;
    }
    jj_consume_token(K_LIKE);
    right = SimpleExpression();
                result.setLeft (left);
                result.setRight (right);
                {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public IsNullExpression IsNullExpression() throws ParseException {
        IsNullExpression result = new IsNullExpression ();
        Expression left = null;
    left = SimpleExpression();
    jj_consume_token(K_IS);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_NOT:
      jj_consume_token(K_NOT);
                      result.setNot (true);
      break;
    default:
      jj_la1[47] = jj_gen;
      ;
    }
    jj_consume_token(K_NULL);
                result.setLeft (left);
                {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public List SQLExpressionList() throws ParseException {
        List expressions = new ArrayList();
        Expression expr = null;
        ExpressionList eList = null;
        List exprList = null;
    expr = ExpressionList();
                              expressions.add(expr);
    label_12:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[48] = jj_gen;
        break label_12;
      }
      jj_consume_token(54);
      expr = ExpressionList();
                                                                                      expressions.add(expr);
    }
                {if (true) return expressions;}
    throw new Error("Missing return statement in function");
  }

  final public List AliasedSQLExpressionList() throws ParseException {
        List expressions = new ArrayList();
        AliasedExpression aexp = null;
        Expression expr = null;
        String alias = null;
    expr = ExpressionList();
                              aexp = new AliasedExpression (); aexp.setExpression (expr); expressions.add (aexp);
    if (jj_2_19(2)) {
      alias = Alias();
                                                                                                                                                     aexp.setAlias (alias);
    } else {
      ;
    }
    label_13:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 54:
        ;
        break;
      default:
        jj_la1[49] = jj_gen;
        break label_13;
      }
      jj_consume_token(54);
      expr = ExpressionList();
                                                                                                                                                                                                               aexp = new AliasedExpression (); aexp.setExpression (expr); expressions.add (aexp);
      if (jj_2_20(2)) {
        alias = Alias();
                                                                                                                                                                                                                                                                                                                                      aexp.setAlias (alias);
      } else {
        ;
      }
    }
                {if (true) return expressions;}
    throw new Error("Missing return statement in function");
  }

  final public Expression SimpleExpression() throws ParseException {
        Expression result = null;
    if (jj_2_21(3)) {
      result = AdditiveExpression();
    } else if (jj_2_22(3)) {
      result = MultiplicativeExpression();
    } else if (jj_2_23(3)) {
      result = PrimaryExpression();
    } else {
      jj_consume_token(-1);
      throw new ParseException();
    }
        {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression AdditiveExpression() throws ParseException {
        Expression result = null;
        Expression left = null;
        Expression right = null;
        int type = -1;
    left = MultiplicativeExpression();
                                         result = left;
    label_14:
    while (true) {
      if (jj_2_24(2)) {
        ;
      } else {
        break label_14;
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 70:
        jj_consume_token(70);
                            type = ArithmeticExpression.ADDITION;
        break;
      case 71:
        jj_consume_token(71);
                            type = ArithmeticExpression.SUBTRACT;
        break;
      default:
        jj_la1[50] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      right = AdditiveExpression();
           if (!(left instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The left-hand side of an arithmetic expresion (+, -, *, / or %) must be a value expression.");}

           }

           if (!(right instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The right-hand side of an arithmetic expresion (+, -, *, / or %) must be a value expression.");}

           }

                  ArithmeticExpression ae = new ArithmeticExpression ();
                  ae.setLeft ((ValueExpression) left);
                  ae.setRight ((ValueExpression) right);
                  result = ae;
                  ae.setType (type);
    }
      {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression MultiplicativeExpression() throws ParseException {
        Expression result = null;
        Expression left = null;
        Expression right = null;
        int type = -1;
    left = PrimaryExpression();
                                  result = left;
    label_15:
    while (true) {
      if (jj_2_25(2)) {
        ;
      } else {
        break label_15;
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 55:
        jj_consume_token(55);
                            type = ArithmeticExpression.MULTIPLY;
        break;
      case 72:
        jj_consume_token(72);
                             type = ArithmeticExpression.DIVIDE;
        break;
      case 73:
        jj_consume_token(73);
                             type = ArithmeticExpression.MODULUS;
        break;
      default:
        jj_la1[51] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      right = AdditiveExpression();
           if (!(left instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The left-hand side of an arithmetic expresion (+, -, *, / or %) must be a value expression.");}

           }

           if (!(right instanceof ValueExpression))
           {

              {if (true) throw new ParseException ("The right-hand side of an arithmetic expresion (+, -, *, / or %) must be a value expression.");}

           }

                  ArithmeticExpression ae = new ArithmeticExpression ();
                  ae.setLeft ((ValueExpression) left);
                  ae.setRight ((ValueExpression) right);
                  result = ae;
                  ae.setType (type);
    }
      {if (true) return result;}
    throw new Error("Missing return statement in function");
  }

  final public Expression PrimaryExpression() throws ParseException {
        Expression retval = null;
        Token token = null;
        boolean isInverse = false;
        String tmp = "";
        String accName = null;
    if (jj_2_26(2)) {
      retval = NewObjectExpression();
    } else if (jj_2_27(2)) {
      retval = SubQueryExpression();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_NULL:
        jj_consume_token(K_NULL);
                     retval = new ConstantExpression (); ConstantExpression ce = (ConstantExpression) retval; ce.setValue (null);
        break;
      default:
        jj_la1[62] = jj_gen;
        if (jj_2_28(2)) {
          jj_consume_token(K_TRUE);
                                  retval = new BooleanExpression (); BooleanExpression be = (BooleanExpression) retval; be.setValue (Boolean.TRUE);
        } else if (jj_2_29(2)) {
          jj_consume_token(K_FALSE);
                                   retval = new BooleanExpression (); BooleanExpression be = (BooleanExpression) retval; be.setValue (Boolean.FALSE);
        } else {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case 48:
          case 49:
          case 50:
            retval = BindVariable();
            break;
          case 52:
            retval = SaveValue();
            break;
          default:
            jj_la1[63] = jj_gen;
            if (jj_2_30(2147483647)) {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case 70:
              case 71:
                switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                case 70:
                  jj_consume_token(70);
                  break;
                case 71:
                  jj_consume_token(71);
                                                              isInverse = true;
                  break;
                default:
                  jj_la1[52] = jj_gen;
                  jj_consume_token(-1);
                  throw new ParseException();
                }
                break;
              default:
                jj_la1[53] = jj_gen;
                ;
              }
              retval = Function();
            } else if (jj_2_31(2147483647)) {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case 70:
              case 71:
                switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                case 70:
                  jj_consume_token(70);
                  break;
                case 71:
                  jj_consume_token(71);
                                                                    tmp = "-";
                  break;
                default:
                  jj_la1[54] = jj_gen;
                  jj_consume_token(-1);
                  throw new ParseException();
                }
                break;
              default:
                jj_la1[55] = jj_gen;
                ;
              }
              token = jj_consume_token(S_DOUBLE);
                                                                                                      retval = new ConstantExpression (); ce = (ConstantExpression) retval; ce.setValue (new Double (tmp+token.image));
            } else if (jj_2_32(2147483647)) {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case 70:
              case 71:
                switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                case 70:
                  jj_consume_token(70);
                  break;
                case 71:
                  jj_consume_token(71);
                                                                            tmp = "-";
                  break;
                default:
                  jj_la1[56] = jj_gen;
                  jj_consume_token(-1);
                  throw new ParseException();
                }
                break;
              default:
                jj_la1[57] = jj_gen;
                ;
              }
              token = jj_consume_token(S_INTEGER);
                                                                                                               retval = new ConstantExpression (); ce = (ConstantExpression) retval; ce.setValue (new Double (tmp+token.image));
            } else if (jj_2_33(2)) {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case 70:
              case 71:
                switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                case 70:
                  jj_consume_token(70);
                  break;
                case 71:
                  jj_consume_token(71);
                                      isInverse = true;
                  break;
                default:
                  jj_la1[58] = jj_gen;
                  jj_consume_token(-1);
                  throw new ParseException();
                }
                break;
              default:
                jj_la1[59] = jj_gen;
                ;
              }
              accName = Name();
                                                                             retval= new Accessor (); Accessor a = (Accessor) retval; a.setAccessor (accName);
            } else if (jj_2_34(2)) {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case 70:
              case 71:
                switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                case 70:
                  jj_consume_token(70);
                  break;
                case 71:
                  jj_consume_token(71);
                                     isInverse = true;
                  break;
                default:
                  jj_la1[60] = jj_gen;
                  jj_consume_token(-1);
                  throw new ParseException();
                }
                break;
              default:
                jj_la1[61] = jj_gen;
                ;
              }
              jj_consume_token(58);
              retval = ExpressionList();
              jj_consume_token(59);
                                                                                               retval.setBracketed (true);
            } else {
              switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
              case S_CHAR_LITERAL:
                token = jj_consume_token(S_CHAR_LITERAL);
                                   retval = new ConstantExpression (); ce = (ConstantExpression) retval; ce.setValue (token.image.substring (1,token.image.length () - 1));
                break;
              case S_CHAR_LITERAL2:
                token = jj_consume_token(S_CHAR_LITERAL2);
                                    retval = new ConstantExpression (); ce = (ConstantExpression) retval; ce.setValue (token.image.substring (1,token.image.length () - 1));
                break;
              default:
                jj_la1[64] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
              }
            }
          }
        }
      }
    }
        {if (true) return retval;}
    throw new Error("Missing return statement in function");
  }

  final public Function Function() throws ParseException {
        Function retval = new Function ();
        String funcName = null;
        String tmp = null;
        List params = null;
        String acc = null;
    funcName = Name();
    jj_consume_token(58);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_AS:
    case K_BY:
    case K_IS:
    case K_IN:
    case K_OR:
    case K_ON:
    case K_ALL:
    case K_AND:
    case K_NOT:
    case K_ASC:
    case K_DESC:
    case K_NULL:
    case K_LIKE:
    case K_INLIKE:
    case K_WHERE:
    case K_GROUP:
    case K_LIMIT:
    case K_ORDER:
    case K_SELECT:
    case K_HAVING:
    case K_BETWEEN:
    case K_DISTINCT:
    case K_USE:
    case K_TRUE:
    case K_FALSE:
    case K_EXECUTE:
    case K_RESULTS:
    case K_WHERE_RESULTS:
    case K_HAVING_RESULTS:
    case K_GROUP_BY_RESULTS:
    case K_NEW:
    case S_IDENTIFIER:
    case S_CHAR_LITERAL:
    case S_CHAR_LITERAL2:
    case S_DOUBLE:
    case S_INTEGER:
    case 48:
    case 49:
    case 50:
    case 52:
    case 56:
    case 58:
    case 70:
    case 71:
      params = SQLExpressionList();
      break;
    default:
      jj_la1[65] = jj_gen;
      ;
    }
    jj_consume_token(59);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 51:
      jj_consume_token(51);
      acc = Name();
      break;
    default:
      jj_la1[66] = jj_gen;
      ;
    }
            retval.setParameters (params);
            retval.setName (funcName);
            retval.setAccessor (acc);
            {if (true) return retval;}
    throw new Error("Missing return statement in function");
  }

  final public SubQueryExpression SubQueryExpression() throws ParseException {
    Query q = new Query ();
    SubQueryExpression exp = new SubQueryExpression (q);
    String acc = null;
    jj_consume_token(58);
    Query(q);
    jj_consume_token(59);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 51:
      jj_consume_token(51);
      acc = Name();
                                          exp.setAccessor (acc);
      break;
    default:
      jj_la1[67] = jj_gen;
      ;
    }
      {if (true) return exp;}
    throw new Error("Missing return statement in function");
  }

  final private boolean jj_2_1(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_1(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(0, xla); }
  }

  final private boolean jj_2_2(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_2(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(1, xla); }
  }

  final private boolean jj_2_3(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_3(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(2, xla); }
  }

  final private boolean jj_2_4(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_4(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(3, xla); }
  }

  final private boolean jj_2_5(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_5(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(4, xla); }
  }

  final private boolean jj_2_6(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_6(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(5, xla); }
  }

  final private boolean jj_2_7(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_7(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(6, xla); }
  }

  final private boolean jj_2_8(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_8(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(7, xla); }
  }

  final private boolean jj_2_9(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_9(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(8, xla); }
  }

  final private boolean jj_2_10(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_10(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(9, xla); }
  }

  final private boolean jj_2_11(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_11(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(10, xla); }
  }

  final private boolean jj_2_12(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_12(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(11, xla); }
  }

  final private boolean jj_2_13(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_13(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(12, xla); }
  }

  final private boolean jj_2_14(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_14(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(13, xla); }
  }

  final private boolean jj_2_15(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_15(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(14, xla); }
  }

  final private boolean jj_2_16(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_16(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(15, xla); }
  }

  final private boolean jj_2_17(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_17(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(16, xla); }
  }

  final private boolean jj_2_18(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_18(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(17, xla); }
  }

  final private boolean jj_2_19(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_19(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(18, xla); }
  }

  final private boolean jj_2_20(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_20(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(19, xla); }
  }

  final private boolean jj_2_21(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_21(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(20, xla); }
  }

  final private boolean jj_2_22(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_22(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(21, xla); }
  }

  final private boolean jj_2_23(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_23(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(22, xla); }
  }

  final private boolean jj_2_24(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_24(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(23, xla); }
  }

  final private boolean jj_2_25(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_25(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(24, xla); }
  }

  final private boolean jj_2_26(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_26(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(25, xla); }
  }

  final private boolean jj_2_27(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_27(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(26, xla); }
  }

  final private boolean jj_2_28(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_28(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(27, xla); }
  }

  final private boolean jj_2_29(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_29(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(28, xla); }
  }

  final private boolean jj_2_30(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_30(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(29, xla); }
  }

  final private boolean jj_2_31(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_31(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(30, xla); }
  }

  final private boolean jj_2_32(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_32(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(31, xla); }
  }

  final private boolean jj_2_33(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_33(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(32, xla); }
  }

  final private boolean jj_2_34(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_34(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(33, xla); }
  }

  final private boolean jj_3R_65() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_85()) jj_scanpos = xsp;
    if (jj_scan_token(S_DOUBLE)) return true;
    return false;
  }

  final private boolean jj_3R_149() {
    if (jj_scan_token(K_GROUP_BY_RESULTS)) return true;
    return false;
  }

  final private boolean jj_3R_148() {
    if (jj_scan_token(K_HAVING_RESULTS)) return true;
    return false;
  }

  final private boolean jj_3R_63() {
    if (jj_3R_83()) return true;
    return false;
  }

  final private boolean jj_3R_62() {
    if (jj_3R_82()) return true;
    return false;
  }

  final private boolean jj_3R_147() {
    if (jj_scan_token(K_WHERE_RESULTS)) return true;
    return false;
  }

  final private boolean jj_3_29() {
    if (jj_scan_token(K_FALSE)) return true;
    return false;
  }

  final private boolean jj_3_28() {
    if (jj_scan_token(K_TRUE)) return true;
    return false;
  }

  final private boolean jj_3R_146() {
    if (jj_scan_token(K_RESULTS)) return true;
    return false;
  }

  final private boolean jj_3R_61() {
    if (jj_scan_token(K_NULL)) return true;
    return false;
  }

  final private boolean jj_3_27() {
    if (jj_3R_37()) return true;
    return false;
  }

  final private boolean jj_3R_145() {
    if (jj_scan_token(K_ALL)) return true;
    return false;
  }

  final private boolean jj_3R_136() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_145()) {
    jj_scanpos = xsp;
    if (jj_3R_146()) {
    jj_scanpos = xsp;
    if (jj_3R_147()) {
    jj_scanpos = xsp;
    if (jj_3R_148()) {
    jj_scanpos = xsp;
    if (jj_3R_149()) return true;
    }
    }
    }
    }
    if (jj_3R_150()) return true;
    return false;
  }

  final private boolean jj_3_26() {
    if (jj_3R_36()) return true;
    return false;
  }

  final private boolean jj_3R_101() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3R_76() {
    if (jj_scan_token(56)) return true;
    if (jj_3R_44()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_101()) { jj_scanpos = xsp; break; }
    }
    if (jj_scan_token(57)) return true;
    return false;
  }

  final private boolean jj_3R_44() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_75()) {
    jj_scanpos = xsp;
    if (jj_3R_76()) return true;
    }
    return false;
  }

  final private boolean jj_3R_75() {
    if (jj_3R_87()) return true;
    return false;
  }

  final private boolean jj_3R_30() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_26()) {
    jj_scanpos = xsp;
    if (jj_3_27()) {
    jj_scanpos = xsp;
    if (jj_3R_61()) {
    jj_scanpos = xsp;
    if (jj_3_28()) {
    jj_scanpos = xsp;
    if (jj_3_29()) {
    jj_scanpos = xsp;
    if (jj_3R_62()) {
    jj_scanpos = xsp;
    if (jj_3R_63()) {
    jj_scanpos = xsp;
    if (jj_3R_64()) {
    jj_scanpos = xsp;
    if (jj_3R_65()) {
    jj_scanpos = xsp;
    if (jj_3R_66()) {
    jj_scanpos = xsp;
    if (jj_3_33()) {
    jj_scanpos = xsp;
    if (jj_3_34()) {
    jj_scanpos = xsp;
    if (jj_3R_67()) {
    jj_scanpos = xsp;
    if (jj_3R_68()) return true;
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    return false;
  }

  final private boolean jj_3_19() {
    if (jj_3R_19()) return true;
    return false;
  }

  final private boolean jj_3R_134() {
    if (jj_scan_token(K_EXECUTE)) return true;
    if (jj_scan_token(K_ON)) return true;
    if (jj_3R_136()) return true;
    return false;
  }

  final private boolean jj_3R_131() {
    Token xsp;
    if (jj_3R_134()) return true;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_134()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_35() {
    if (jj_scan_token(73)) return true;
    return false;
  }

  final private boolean jj_3R_34() {
    if (jj_scan_token(72)) return true;
    return false;
  }

  final private boolean jj_3R_33() {
    if (jj_scan_token(55)) return true;
    return false;
  }

  final private boolean jj_3_4() {
    if (jj_3R_18()) return true;
    return false;
  }

  final private boolean jj_3_3() {
    if (jj_3R_17()) return true;
    return false;
  }

  final private boolean jj_3_1() {
    if (jj_scan_token(K_DISTINCT)) return true;
    return false;
  }

  final private boolean jj_3R_123() {
    if (jj_3R_131()) return true;
    return false;
  }

  final private boolean jj_3R_122() {
    if (jj_3R_130()) return true;
    return false;
  }

  final private boolean jj_3_12() {
    if (jj_3R_23()) return true;
    if (jj_scan_token(54)) return true;
    return false;
  }

  final private boolean jj_3R_121() {
    if (jj_3R_18()) return true;
    return false;
  }

  final private boolean jj_3_25() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_33()) {
    jj_scanpos = xsp;
    if (jj_3R_34()) {
    jj_scanpos = xsp;
    if (jj_3R_35()) return true;
    }
    }
    if (jj_3R_28()) return true;
    return false;
  }

  final private boolean jj_3R_120() {
    if (jj_3R_129()) return true;
    return false;
  }

  final private boolean jj_3R_119() {
    if (jj_3R_17()) return true;
    return false;
  }

  final private boolean jj_3R_118() {
    if (jj_3R_128()) return true;
    return false;
  }

  final private boolean jj_3_2() {
    if (jj_3R_16()) return true;
    return false;
  }

  final private boolean jj_3R_117() {
    if (jj_3R_127()) return true;
    return false;
  }

  final private boolean jj_3R_29() {
    if (jj_3R_30()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3_25()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_69() {
    if (jj_scan_token(K_SELECT)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_1()) jj_scanpos = xsp;
    if (jj_3R_102()) return true;
    if (jj_3R_116()) return true;
    xsp = jj_scanpos;
    if (jj_3R_117()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3_2()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_118()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_119()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_120()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_121()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_122()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_123()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_18() {
    if (jj_scan_token(K_GROUP)) return true;
    if (jj_scan_token(K_BY)) return true;
    if (jj_scan_token(K_LIMIT)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_12()) jj_scanpos = xsp;
    if (jj_3R_23()) return true;
    return false;
  }

  final private boolean jj_3R_32() {
    if (jj_scan_token(71)) return true;
    return false;
  }

  final private boolean jj_3R_31() {
    if (jj_scan_token(70)) return true;
    return false;
  }

  final private boolean jj_3R_79() {
    if (jj_3R_72()) return true;
    return false;
  }

  final private boolean jj_3R_47() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_79()) {
    jj_scanpos = xsp;
    if (jj_scan_token(41)) {
    jj_scanpos = xsp;
    if (jj_scan_token(42)) return true;
    }
    }
    return false;
  }

  final private boolean jj_3R_89() {
    if (jj_scan_token(K_DESC)) return true;
    return false;
  }

  final private boolean jj_3R_57() {
    if (jj_scan_token(K_ALL)) return true;
    return false;
  }

  final private boolean jj_3_24() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_31()) {
    jj_scanpos = xsp;
    if (jj_3R_32()) return true;
    }
    if (jj_3R_28()) return true;
    return false;
  }

  final private boolean jj_3R_81() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3R_28() {
    if (jj_3R_29()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3_24()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3_11() {
    if (jj_3R_23()) return true;
    if (jj_scan_token(54)) return true;
    return false;
  }

  final private boolean jj_3_23() {
    if (jj_3R_30()) return true;
    return false;
  }

  final private boolean jj_3R_130() {
    if (jj_scan_token(K_LIMIT)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_11()) jj_scanpos = xsp;
    if (jj_3R_23()) return true;
    return false;
  }

  final private boolean jj_3_22() {
    if (jj_3R_29()) return true;
    return false;
  }

  final private boolean jj_3_21() {
    if (jj_3R_28()) return true;
    return false;
  }

  final private boolean jj_3R_23() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_21()) {
    jj_scanpos = xsp;
    if (jj_3_22()) {
    jj_scanpos = xsp;
    if (jj_3_23()) return true;
    }
    }
    return false;
  }

  final private boolean jj_3R_78() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_88()) {
    jj_scanpos = xsp;
    if (jj_3R_89()) return true;
    }
    return false;
  }

  final private boolean jj_3R_88() {
    if (jj_scan_token(K_ASC)) return true;
    return false;
  }

  final private boolean jj_3R_150() {
    if (jj_3R_44()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_19()) jj_scanpos = xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_151()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_77() {
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3_10() {
    if (jj_scan_token(S_INTEGER)) return true;
    return false;
  }

  final private boolean jj_3R_45() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_10()) {
    jj_scanpos = xsp;
    if (jj_3R_77()) return true;
    }
    xsp = jj_scanpos;
    if (jj_3R_78()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_56() {
    if (jj_scan_token(K_LIKE)) return true;
    return false;
  }

  final private boolean jj_3R_91() {
    if (jj_scan_token(62)) return true;
    return false;
  }

  final private boolean jj_3R_46() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_45()) return true;
    return false;
  }

  final private boolean jj_3R_58() {
    if (jj_3R_44()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_81()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_108() {
    if (jj_3R_58()) return true;
    return false;
  }

  final private boolean jj_3R_17() {
    if (jj_scan_token(K_GROUP)) return true;
    if (jj_scan_token(K_BY)) return true;
    if (jj_scan_token(K_ORDER)) return true;
    if (jj_3R_45()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_46()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_72() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(5)) {
    jj_scanpos = xsp;
    if (jj_scan_token(6)) {
    jj_scanpos = xsp;
    if (jj_scan_token(7)) {
    jj_scanpos = xsp;
    if (jj_scan_token(8)) {
    jj_scanpos = xsp;
    if (jj_scan_token(9)) {
    jj_scanpos = xsp;
    if (jj_scan_token(10)) {
    jj_scanpos = xsp;
    if (jj_scan_token(11)) {
    jj_scanpos = xsp;
    if (jj_scan_token(12)) {
    jj_scanpos = xsp;
    if (jj_scan_token(13)) {
    jj_scanpos = xsp;
    if (jj_scan_token(14)) {
    jj_scanpos = xsp;
    if (jj_scan_token(15)) {
    jj_scanpos = xsp;
    if (jj_scan_token(17)) {
    jj_scanpos = xsp;
    if (jj_scan_token(18)) {
    jj_scanpos = xsp;
    if (jj_scan_token(20)) {
    jj_scanpos = xsp;
    if (jj_scan_token(21)) {
    jj_scanpos = xsp;
    if (jj_scan_token(22)) {
    jj_scanpos = xsp;
    if (jj_scan_token(23)) {
    jj_scanpos = xsp;
    if (jj_scan_token(24)) {
    jj_scanpos = xsp;
    if (jj_scan_token(27)) {
    jj_scanpos = xsp;
    if (jj_scan_token(36)) {
    jj_scanpos = xsp;
    if (jj_scan_token(29)) {
    jj_scanpos = xsp;
    if (jj_scan_token(30)) {
    jj_scanpos = xsp;
    if (jj_scan_token(25)) {
    jj_scanpos = xsp;
    if (jj_scan_token(26)) {
    jj_scanpos = xsp;
    if (jj_scan_token(28)) {
    jj_scanpos = xsp;
    if (jj_scan_token(31)) {
    jj_scanpos = xsp;
    if (jj_scan_token(32)) {
    jj_scanpos = xsp;
    if (jj_scan_token(33)) {
    jj_scanpos = xsp;
    if (jj_scan_token(34)) {
    jj_scanpos = xsp;
    if (jj_scan_token(35)) {
    jj_scanpos = xsp;
    if (jj_scan_token(38)) return true;
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    return false;
  }

  final private boolean jj_3R_60() {
    if (jj_scan_token(K_NOT)) return true;
    return false;
  }

  final private boolean jj_3R_133() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_45()) return true;
    return false;
  }

  final private boolean jj_3R_27() {
    if (jj_3R_23()) return true;
    if (jj_scan_token(K_IS)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_60()) jj_scanpos = xsp;
    if (jj_scan_token(K_NULL)) return true;
    return false;
  }

  final private boolean jj_3R_129() {
    if (jj_scan_token(K_ORDER)) return true;
    if (jj_scan_token(K_BY)) return true;
    if (jj_3R_45()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_133()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_73() {
    if (jj_scan_token(51)) return true;
    if (jj_3R_72()) return true;
    return false;
  }

  final private boolean jj_3R_42() {
    if (jj_3R_72()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_73()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_55() {
    if (jj_scan_token(62)) return true;
    return false;
  }

  final private boolean jj_3R_128() {
    if (jj_scan_token(K_HAVING)) return true;
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3R_96() {
    if (jj_scan_token(51)) return true;
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3R_80() {
    if (jj_3R_23()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_90()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_91()) jj_scanpos = xsp;
    if (jj_scan_token(K_LIKE)) return true;
    if (jj_3R_23()) return true;
    return false;
  }

  final private boolean jj_3R_90() {
    if (jj_scan_token(K_NOT)) return true;
    return false;
  }

  final private boolean jj_3R_132() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_45()) return true;
    return false;
  }

  final private boolean jj_3R_16() {
    if (jj_scan_token(K_GROUP)) return true;
    if (jj_scan_token(K_BY)) return true;
    if (jj_3R_45()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_132()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_127() {
    if (jj_scan_token(K_WHERE)) return true;
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3R_83() {
    if (jj_scan_token(52)) return true;
    if (jj_3R_72()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_96()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3_9() {
    if (jj_3R_22()) return true;
    return false;
  }

  final private boolean jj_3R_59() {
    if (jj_scan_token(K_NOT)) return true;
    return false;
  }

  final private boolean jj_3R_21() {
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3R_95() {
    if (jj_scan_token(51)) return true;
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3R_20() {
    if (jj_scan_token(K_NULL)) return true;
    return false;
  }

  final private boolean jj_3R_94() {
    if (jj_scan_token(50)) return true;
    return false;
  }

  final private boolean jj_3R_26() {
    if (jj_3R_23()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_59()) jj_scanpos = xsp;
    if (jj_scan_token(K_BETWEEN)) return true;
    if (jj_3R_23()) return true;
    if (jj_scan_token(K_AND)) return true;
    if (jj_3R_23()) return true;
    return false;
  }

  final private boolean jj_3_8() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_20()) {
    jj_scanpos = xsp;
    if (jj_3R_21()) return true;
    }
    return false;
  }

  final private boolean jj_3R_93() {
    if (jj_scan_token(49)) return true;
    if (jj_scan_token(S_IDENTIFIER)) return true;
    return false;
  }

  final private boolean jj_3R_126() {
    if (jj_3R_83()) return true;
    return false;
  }

  final private boolean jj_3R_92() {
    if (jj_scan_token(48)) return true;
    if (jj_3R_72()) return true;
    return false;
  }

  final private boolean jj_3_20() {
    if (jj_3R_19()) return true;
    return false;
  }

  final private boolean jj_3R_125() {
    if (jj_3R_82()) return true;
    return false;
  }

  final private boolean jj_3R_82() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_92()) {
    jj_scanpos = xsp;
    if (jj_3R_93()) {
    jj_scanpos = xsp;
    if (jj_3R_94()) return true;
    }
    }
    xsp = jj_scanpos;
    if (jj_3R_95()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_54() {
    if (jj_scan_token(62)) return true;
    return false;
  }

  final private boolean jj_3R_116() {
    if (jj_scan_token(K_FROM)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_125()) {
    jj_scanpos = xsp;
    if (jj_3R_126()) {
    jj_scanpos = xsp;
    if (jj_3_8()) {
    jj_scanpos = xsp;
    if (jj_3_9()) return true;
    }
    }
    }
    return false;
  }

  final private boolean jj_3_7() {
    if (jj_scan_token(K_AS)) return true;
    return false;
  }

  final private boolean jj_3R_19() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_7()) jj_scanpos = xsp;
    if (jj_3R_47()) return true;
    return false;
  }

  final private boolean jj_3R_115() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_44()) return true;
    if (jj_scan_token(K_INTO)) return true;
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3R_109() {
    if (jj_scan_token(60)) return true;
    if (jj_3R_44()) return true;
    if (jj_scan_token(K_INTO)) return true;
    if (jj_3R_42()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_115()) { jj_scanpos = xsp; break; }
    }
    if (jj_scan_token(61)) return true;
    return false;
  }

  final private boolean jj_3R_36() {
    if (jj_scan_token(K_NEW)) return true;
    if (jj_3R_42()) return true;
    if (jj_scan_token(58)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_108()) jj_scanpos = xsp;
    if (jj_scan_token(59)) return true;
    xsp = jj_scanpos;
    if (jj_3R_109()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_25() {
    if (jj_3R_23()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_53()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_54()) jj_scanpos = xsp;
    if (jj_scan_token(K_IN)) return true;
    xsp = jj_scanpos;
    if (jj_3R_55()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_56()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_57()) jj_scanpos = xsp;
    if (jj_scan_token(58)) return true;
    if (jj_3R_58()) return true;
    if (jj_scan_token(59)) return true;
    return false;
  }

  final private boolean jj_3_18() {
    if (jj_3R_27()) return true;
    return false;
  }

  final private boolean jj_3_17() {
    if (jj_3R_26()) return true;
    return false;
  }

  final private boolean jj_3R_53() {
    if (jj_scan_token(K_NOT)) return true;
    return false;
  }

  final private boolean jj_3_16() {
    if (jj_3R_25()) return true;
    return false;
  }

  final private boolean jj_3R_144() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_72()) return true;
    return false;
  }

  final private boolean jj_3R_52() {
    if (jj_3R_80()) return true;
    return false;
  }

  final private boolean jj_3R_51() {
    if (jj_3R_27()) return true;
    return false;
  }

  final private boolean jj_3R_50() {
    if (jj_3R_26()) return true;
    return false;
  }

  final private boolean jj_3R_49() {
    if (jj_3R_25()) return true;
    return false;
  }

  final private boolean jj_3R_24() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_49()) {
    jj_scanpos = xsp;
    if (jj_3R_50()) {
    jj_scanpos = xsp;
    if (jj_3R_51()) {
    jj_scanpos = xsp;
    if (jj_3R_52()) return true;
    }
    }
    }
    return false;
  }

  final private boolean jj_3R_124() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_105()) return true;
    return false;
  }

  final private boolean jj_3_6() {
    if (jj_3R_19()) return true;
    return false;
  }

  final private boolean jj_3_5() {
    if (jj_scan_token(56)) return true;
    if (jj_scan_token(55)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_144()) jj_scanpos = xsp;
    if (jj_scan_token(57)) return true;
    return false;
  }

  final private boolean jj_3R_143() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(68)) {
    jj_scanpos = xsp;
    if (jj_scan_token(69)) return true;
    }
    return false;
  }

  final private boolean jj_3R_142() {
    if (jj_scan_token(67)) return true;
    return false;
  }

  final private boolean jj_3R_113() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_5()) jj_scanpos = xsp;
    if (jj_3R_44()) return true;
    xsp = jj_scanpos;
    if (jj_3_6()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_141() {
    if (jj_scan_token(66)) return true;
    return false;
  }

  final private boolean jj_3R_140() {
    if (jj_scan_token(65)) return true;
    return false;
  }

  final private boolean jj_3R_139() {
    if (jj_scan_token(64)) return true;
    return false;
  }

  final private boolean jj_3R_112() {
    if (jj_scan_token(55)) return true;
    return false;
  }

  final private boolean jj_3R_138() {
    if (jj_scan_token(63)) return true;
    return false;
  }

  final private boolean jj_3R_105() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_112()) {
    jj_scanpos = xsp;
    if (jj_3R_113()) return true;
    }
    return false;
  }

  final private boolean jj_3R_137() {
    if (jj_scan_token(62)) return true;
    return false;
  }

  final private boolean jj_3R_135() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_137()) jj_scanpos = xsp;
    xsp = jj_scanpos;
    if (jj_3R_138()) {
    jj_scanpos = xsp;
    if (jj_3R_139()) {
    jj_scanpos = xsp;
    if (jj_3R_140()) {
    jj_scanpos = xsp;
    if (jj_3R_141()) {
    jj_scanpos = xsp;
    if (jj_3R_142()) {
    jj_scanpos = xsp;
    if (jj_3R_143()) return true;
    }
    }
    }
    }
    }
    if (jj_3R_23()) return true;
    return false;
  }

  final private boolean jj_3R_114() {
    if (jj_3R_23()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_135()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3_15() {
    if (jj_3R_24()) return true;
    return false;
  }

  final private boolean jj_3R_110() {
    if (jj_scan_token(51)) return true;
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3R_107() {
    if (jj_3R_114()) return true;
    return false;
  }

  final private boolean jj_3R_99() {
    if (jj_scan_token(71)) return true;
    return false;
  }

  final private boolean jj_3R_106() {
    if (jj_3R_24()) return true;
    return false;
  }

  final private boolean jj_3R_103() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_106()) {
    jj_scanpos = xsp;
    if (jj_3R_107()) return true;
    }
    return false;
  }

  final private boolean jj_3R_86() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_3R_99()) return true;
    }
    return false;
  }

  final private boolean jj_3_14() {
    if (jj_scan_token(K_AND)) return true;
    return false;
  }

  final private boolean jj_3R_98() {
    if (jj_scan_token(71)) return true;
    return false;
  }

  final private boolean jj_3R_85() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_3R_98()) return true;
    }
    return false;
  }

  final private boolean jj_3R_97() {
    if (jj_scan_token(71)) return true;
    return false;
  }

  final private boolean jj_3R_111() {
    if (jj_scan_token(K_AND)) return true;
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3R_37() {
    if (jj_scan_token(58)) return true;
    if (jj_3R_69()) return true;
    if (jj_scan_token(59)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_110()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_151() {
    if (jj_scan_token(54)) return true;
    if (jj_3R_44()) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3_20()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_84() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_3R_97()) return true;
    }
    return false;
  }

  final private boolean jj_3R_102() {
    if (jj_3R_105()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_124()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_100() {
    if (jj_3R_103()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_111()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3R_48() {
    if (jj_3R_58()) return true;
    return false;
  }

  final private boolean jj_3R_74() {
    if (jj_scan_token(71)) return true;
    return false;
  }

  final private boolean jj_3R_70() {
    if (jj_scan_token(51)) return true;
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3_13() {
    if (jj_scan_token(K_OR)) return true;
    return false;
  }

  final private boolean jj_3R_71() {
    if (jj_scan_token(71)) return true;
    return false;
  }

  final private boolean jj_3R_43() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_3R_74()) return true;
    }
    return false;
  }

  final private boolean jj_3R_22() {
    if (jj_3R_42()) return true;
    if (jj_scan_token(58)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_48()) jj_scanpos = xsp;
    if (jj_scan_token(59)) return true;
    xsp = jj_scanpos;
    if (jj_3R_70()) jj_scanpos = xsp;
    return false;
  }

  final private boolean jj_3R_41() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_3R_71()) return true;
    }
    return false;
  }

  final private boolean jj_3R_104() {
    if (jj_scan_token(K_OR)) return true;
    if (jj_3R_44()) return true;
    return false;
  }

  final private boolean jj_3R_40() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_scan_token(71)) return true;
    }
    return false;
  }

  final private boolean jj_3R_39() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_scan_token(71)) return true;
    }
    return false;
  }

  final private boolean jj_3R_38() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(70)) {
    jj_scanpos = xsp;
    if (jj_scan_token(71)) return true;
    }
    return false;
  }

  final private boolean jj_3R_68() {
    if (jj_scan_token(S_CHAR_LITERAL2)) return true;
    return false;
  }

  final private boolean jj_3_32() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_40()) jj_scanpos = xsp;
    if (jj_scan_token(S_INTEGER)) return true;
    return false;
  }

  final private boolean jj_3R_67() {
    if (jj_scan_token(S_CHAR_LITERAL)) return true;
    return false;
  }

  final private boolean jj_3_30() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_38()) jj_scanpos = xsp;
    if (jj_3R_22()) return true;
    return false;
  }

  final private boolean jj_3_31() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_39()) jj_scanpos = xsp;
    if (jj_scan_token(S_DOUBLE)) return true;
    return false;
  }

  final private boolean jj_3_34() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_43()) jj_scanpos = xsp;
    if (jj_scan_token(58)) return true;
    if (jj_3R_44()) return true;
    if (jj_scan_token(59)) return true;
    return false;
  }

  final private boolean jj_3R_87() {
    if (jj_3R_100()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
      if (jj_3R_104()) { jj_scanpos = xsp; break; }
    }
    return false;
  }

  final private boolean jj_3_33() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_41()) jj_scanpos = xsp;
    if (jj_3R_42()) return true;
    return false;
  }

  final private boolean jj_3R_66() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_86()) jj_scanpos = xsp;
    if (jj_scan_token(S_INTEGER)) return true;
    return false;
  }

  final private boolean jj_3R_64() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_84()) jj_scanpos = xsp;
    if (jj_3R_22()) return true;
    return false;
  }

  public JoSQLParserTokenManager token_source;
  JavaCharStream jj_input_stream;
  public Token token, jj_nt;
  private int jj_ntk;
  private Token jj_scanpos, jj_lastpos;
  private int jj_la;
  public boolean lookingAhead = false;
  private boolean jj_semLA;
  private int jj_gen;
  final private int[] jj_la1 = new int[68];
  static private int[] jj_la1_0;
  static private int[] jj_la1_1;
  static private int[] jj_la1_2;
  static {
      jj_la1_0();
      jj_la1_1();
      jj_la1_2();
   }
   private static void jj_la1_0() {
      jj_la1_0 = new int[] {0x0,0x0,0x0,0x0,0x0,0xfff6ffe0,0xfff6ffe0,0x100000,0x2000000,0x800000,0x400000,0x80000000,0x80000000,0x800,0x0,0x0,0xfff6ffe0,0x0,0xfff7ffe0,0xfff7ffe0,0x0,0x0,0xfff7ffe0,0x0,0x0,0x0,0x0,0xfff7ffe0,0xc000,0xc000,0xfff6ffe0,0x0,0xfff7ffe0,0xfff7ffe0,0x0,0x0,0x0,0x0,0xfff7ffe0,0x2000,0x0,0x0,0x20000,0x800,0x2000,0x2000,0x0,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0xfff7ffe0,0x0,0x0,};
   }
   private static void jj_la1_1() {
      jj_la1_1 = new int[] {0x70000,0x80000,0x80000,0x200000,0x80000,0x5f,0x65f,0x0,0x0,0x0,0x0,0x0,0x0,0xf,0x400000,0x400000,0x65f,0x400000,0x5971e5f,0x5171e5f,0x400000,0x10000000,0x5f,0x170000,0x400000,0x400000,0x400000,0x5171e5f,0x0,0x0,0x105f,0x400000,0x5171e5f,0x4171e5f,0x40000000,0x0,0x80000000,0xc0000000,0x4171e5f,0x0,0x40000000,0x40000000,0x0,0x0,0x0,0x0,0x40000000,0x0,0x400000,0x400000,0x0,0x800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x170000,0x600,0x5171e5f,0x80000,0x80000,};
   }
   private static void jj_la1_2() {
      jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0x0,0x30,0x3f,0x3f,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x300,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0x0,0x0,};
   }
  final private JJCalls[] jj_2_rtns = new JJCalls[34];
  private boolean jj_rescan = false;
  private int jj_gc = 0;

  public JoSQLParser(java.io.InputStream stream) {
     this(stream, null);
  }
  public JoSQLParser(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 JoSQLParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  public void ReInit(java.io.InputStream stream) {
     ReInit(stream, null);
  }
  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;
    jj_gen = 0;
    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  public JoSQLParser(java.io.Reader stream) {
    jj_input_stream = new JavaCharStream(stream, 1, 1);
    token_source = new JoSQLParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  public void ReInit(java.io.Reader stream) {
    jj_input_stream.ReInit(stream, 1, 1);
    token_source.ReInit(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  public JoSQLParser(JoSQLParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  public void ReInit(JoSQLParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
  }

  final 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++;
      if (++jj_gc > 100) {
        jj_gc = 0;
        for (int i = 0; i < jj_2_rtns.length; i++) {
          JJCalls c = jj_2_rtns[i];
          while (c != null) {
            if (c.gen < jj_gen) c.first = null;
            c = c.next;
          }
        }
      }
      return token;
    }
    token = oldToken;
    jj_kind = kind;
    throw generateParseException();
  }

  static private final class LookaheadSuccess extends java.lang.Error { }
  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
  final private boolean jj_scan_token(int kind) {
    if (jj_scanpos == jj_lastpos) {
      jj_la--;
      if (jj_scanpos.next == null) {
        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
      } else {
        jj_lastpos = jj_scanpos = jj_scanpos.next;
      }
    } else {
      jj_scanpos = jj_scanpos.next;
    }
    if (jj_rescan) {
      int i = 0; Token tok = token;
      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
      if (tok != null) jj_add_error_token(kind, i);
    }
    if (jj_scanpos.kind != kind) return true;
    if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
    return false;
  }

  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;
  }

  final public Token getToken(int index) {
    Token t = lookingAhead ? jj_scanpos : token;
    for (int i = 0; i < index; i++) {
      if (t.next != null) t = t.next;
      else t = t.next = token_source.getNextToken();
    }
    return t;
  }

  final private int jj_ntk() {
    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.Vector jj_expentries = new java.util.Vector();
  private int[] jj_expentry;
  private int jj_kind = -1;
  private int[] jj_lasttokens = new int[100];
  private int jj_endpos;

  private void jj_add_error_token(int kind, int pos) {
    if (pos >= 100) return;
    if (pos == jj_endpos + 1) {
      jj_lasttokens[jj_endpos++] = kind;
    } else if (jj_endpos != 0) {
      jj_expentry = new int[jj_endpos];
      for (int i = 0; i < jj_endpos; i++) {
        jj_expentry[i] = jj_lasttokens[i];
      }
      boolean exists = false;
      for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
        int[] oldentry = (int[])(e.nextElement());
        if (oldentry.length == jj_expentry.length) {
          exists = true;
          for (int i = 0; i < jj_expentry.length; i++) {
            if (oldentry[i] != jj_expentry[i]) {
              exists = false;
              break;
            }
          }
          if (exists) break;
        }
      }
      if (!exists) jj_expentries.addElement(jj_expentry);
      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
    }
  }

  public ParseException generateParseException() {
    jj_expentries.removeAllElements();
    boolean[] la1tokens = new boolean[74];
    for (int i = 0; i < 74; i++) {
      la1tokens[i] = false;
    }
    if (jj_kind >= 0) {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 68; 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 < 74; i++) {
      if (la1tokens[i]) {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.addElement(jj_expentry);
      }
    }
    jj_endpos = 0;
    jj_rescan_token();
    jj_add_error_token(0, 0);
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = (int[])jj_expentries.elementAt(i);
    }
    return new ParseException(token, exptokseq, tokenImage);
  }

  final public void enable_tracing() {
  }

  final public void disable_tracing() {
  }

  final private void jj_rescan_token() {
    jj_rescan = true;
    for (int i = 0; i < 34; i++) {
    try {
      JJCalls p = jj_2_rtns[i];
      do {
        if (p.gen > jj_gen) {
          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
          switch (i) {
            case 0: jj_3_1(); break;
            case 1: jj_3_2(); break;
            case 2: jj_3_3(); break;
            case 3: jj_3_4(); break;
            case 4: jj_3_5(); break;
            case 5: jj_3_6(); break;
            case 6: jj_3_7(); break;
            case 7: jj_3_8(); break;
            case 8: jj_3_9(); break;
            case 9: jj_3_10(); break;
            case 10: jj_3_11(); break;
            case 11: jj_3_12(); break;
            case 12: jj_3_13(); break;
            case 13: jj_3_14(); break;
            case 14: jj_3_15(); break;
            case 15: jj_3_16(); break;
            case 16: jj_3_17(); break;
            case 17: jj_3_18(); break;
            case 18: jj_3_19(); break;
            case 19: jj_3_20(); break;
            case 20: jj_3_21(); break;
            case 21: jj_3_22(); break;
            case 22: jj_3_23(); break;
            case 23: jj_3_24(); break;
            case 24: jj_3_25(); break;
            case 25: jj_3_26(); break;
            case 26: jj_3_27(); break;
            case 27: jj_3_28(); break;
            case 28: jj_3_29(); break;
            case 29: jj_3_30(); break;
            case 30: jj_3_31(); break;
            case 31: jj_3_32(); break;
            case 32: jj_3_33(); break;
            case 33: jj_3_34(); break;
          }
        }
        p = p.next;
      } while (p != null);
      } catch(LookaheadSuccess ls) { }
    }
    jj_rescan = false;
  }

  final private void jj_save(int index, int xla) {
    JJCalls p = jj_2_rtns[index];
    while (p.gen > jj_gen) {
      if (p.next == null) { p = p.next = new JJCalls(); break; }
      p = p.next;
    }
    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
  }

  static final class JJCalls {
    int gen;
    Token first;
    int arg;
    JJCalls next;
  }

}
