You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by fr...@apache.org on 2001/11/29 14:06:27 UTC

cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser BasicSQLParserTokenManager.java BasicSQLParserConstants.java BasicSQLParser.java

froehlich    01/11/29 05:06:27

  Added:       apps/db/src/java/org/apache/avalon/db/basic/parser
                        BasicSQLParserTokenManager.java
                        BasicSQLParserConstants.java BasicSQLParser.java
  Log:
  first successful compile of the sql parser, yippie ;-)
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParserTokenManager.java
  
  Index: BasicSQLParserTokenManager.java
  ===================================================================
  /* Generated By:JavaCC: Do not edit this line. BasicSQLParserTokenManager.java */
  package org.apache.avalon.db.basic.parser;
  import org.apache.avalon.db.server.sql.AbstractSQLParser;
  import org.apache.avalon.db.server.sql.ParseException;
  import org.apache.avalon.db.server.sql.SimpleCharStream;
  import org.apache.avalon.db.server.sql.Token;
  import org.apache.avalon.db.server.sql.TokenMgrError;
  import org.apache.avalon.db.server.AbstractRequestHandler;
  import org.apache.avalon.db.server.stdhandlers.PingHandler;
  import org.apache.avalon.db.server.stdhandlers.CatalogHandler;
  import org.apache.avalon.db.server.stdhandlers.EstablishConnectionHandler;
  import org.apache.avalon.db.transport.Request;
  import org.apache.avalon.db.basic.handlers.BasicCloseResultSetHandler;
  import org.apache.avalon.db.actions.Action;
  import org.apache.avalon.db.actions.ActionException;
  import java.util.ArrayList;
  
  public class BasicSQLParserTokenManager implements BasicSQLParserConstants
  {
    public static  java.io.PrintStream debugStream = System.out;
    public static  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
  static private final int jjStopAtPos(int pos, int kind)
  {
     jjmatchedKind = kind;
     jjmatchedPos = pos;
     return pos + 1;
  }
  static private final int jjMoveStringLiteralDfa0_0()
  {
     switch(curChar)
     {
        case 9:
           jjmatchedKind = 4;
           return jjMoveNfa_0(5, 0);
        case 10:
           jjmatchedKind = 2;
           return jjMoveNfa_0(5, 0);
        case 13:
           jjmatchedKind = 3;
           return jjMoveNfa_0(5, 0);
        case 32:
           jjmatchedKind = 1;
           return jjMoveNfa_0(5, 0);
        case 59:
           jjmatchedKind = 52;
           return jjMoveNfa_0(5, 0);
        case 60:
           jjmatchedKind = 45;
           return jjMoveStringLiteralDfa1_0(0x800000000000L);
        case 61:
           jjmatchedKind = 43;
           return jjMoveNfa_0(5, 0);
        case 62:
           jjmatchedKind = 44;
           return jjMoveStringLiteralDfa1_0(0x400000000000L);
        case 65:
           return jjMoveStringLiteralDfa1_0(0x16000000L);
        case 66:
           return jjMoveStringLiteralDfa1_0(0x8000008000L);
        case 67:
           return jjMoveStringLiteralDfa1_0(0x201800000L);
        case 68:
           return jjMoveStringLiteralDfa1_0(0x40040606000L);
        case 70:
           return jjMoveStringLiteralDfa1_0(0x20000000L);
        case 71:
           return jjMoveStringLiteralDfa1_0(0x10000100000L);
        case 72:
           return jjMoveStringLiteralDfa1_0(0x4000000000L);
        case 73:
           return jjMoveStringLiteralDfa1_0(0x1080081000L);
        case 76:
           return jjMoveStringLiteralDfa1_0(0x1000000000000L);
        case 79:
           return jjMoveStringLiteralDfa1_0(0x20000000000L);
        case 82:
           return jjMoveStringLiteralDfa1_0(0x40800L);
        case 83:
           return jjMoveStringLiteralDfa1_0(0x8020400L);
        case 84:
           return jjMoveStringLiteralDfa1_0(0x800000300L);
        case 85:
           return jjMoveStringLiteralDfa1_0(0x10000L);
        case 86:
           return jjMoveStringLiteralDfa1_0(0x2100000080L);
        case 87:
           return jjMoveStringLiteralDfa1_0(0x400000000L);
        case 97:
           return jjMoveStringLiteralDfa1_0(0x16000000L);
        case 98:
           return jjMoveStringLiteralDfa1_0(0x8000008000L);
        case 99:
           return jjMoveStringLiteralDfa1_0(0x201800000L);
        case 100:
           return jjMoveStringLiteralDfa1_0(0x40040606000L);
        case 102:
           return jjMoveStringLiteralDfa1_0(0x20000000L);
        case 103:
           return jjMoveStringLiteralDfa1_0(0x10000100000L);
        case 104:
           return jjMoveStringLiteralDfa1_0(0x4000000000L);
        case 105:
           return jjMoveStringLiteralDfa1_0(0x1080081000L);
        case 108:
           return jjMoveStringLiteralDfa1_0(0x1000000000000L);
        case 111:
           return jjMoveStringLiteralDfa1_0(0x20000000000L);
        case 114:
           return jjMoveStringLiteralDfa1_0(0x40800L);
        case 115:
           return jjMoveStringLiteralDfa1_0(0x8020400L);
        case 116:
           return jjMoveStringLiteralDfa1_0(0x800000300L);
        case 117:
           return jjMoveStringLiteralDfa1_0(0x10000L);
        case 118:
           return jjMoveStringLiteralDfa1_0(0x2100000080L);
        case 119:
           return jjMoveStringLiteralDfa1_0(0x400000000L);
        default :
           return jjMoveNfa_0(5, 0);
     }
  }
  static private final int jjMoveStringLiteralDfa1_0(long active0)
  {
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 0);
     }
     switch(curChar)
     {
        case 61:
           if ((active0 & 0x400000000000L) != 0L)
           {
              jjmatchedKind = 46;
              jjmatchedPos = 1;
           }
           else if ((active0 & 0x800000000000L) != 0L)
           {
              jjmatchedKind = 47;
              jjmatchedPos = 1;
           }
           break;
        case 65:
           return jjMoveStringLiteralDfa2_0(active0, 0x6800004080L);
        case 69:
           return jjMoveStringLiteralDfa2_0(active0, 0x8048422800L);
        case 72:
           return jjMoveStringLiteralDfa2_0(active0, 0x400000000L);
        case 73:
           return jjMoveStringLiteralDfa2_0(active0, 0x1040100008300L);
        case 76:
           return jjMoveStringLiteralDfa2_0(active0, 0x2000000L);
        case 77:
           return jjMoveStringLiteralDfa2_0(active0, 0x400L);
        case 78:
           return jjMoveStringLiteralDfa2_0(active0, 0x1080081000L);
        case 79:
           return jjMoveStringLiteralDfa2_0(active0, 0x201040000L);
        case 80:
           return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
        case 82:
           return jjMoveStringLiteralDfa2_0(active0, 0x30020b00000L);
        case 83:
           if ((active0 & 0x4000000L) != 0L)
           {
              jjmatchedKind = 26;
              jjmatchedPos = 1;
           }
           return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
        case 97:
           return jjMoveStringLiteralDfa2_0(active0, 0x6800004080L);
        case 101:
           return jjMoveStringLiteralDfa2_0(active0, 0x8048422800L);
        case 104:
           return jjMoveStringLiteralDfa2_0(active0, 0x400000000L);
        case 105:
           return jjMoveStringLiteralDfa2_0(active0, 0x1040100008300L);
        case 108:
           return jjMoveStringLiteralDfa2_0(active0, 0x2000000L);
        case 109:
           return jjMoveStringLiteralDfa2_0(active0, 0x400L);
        case 110:
           return jjMoveStringLiteralDfa2_0(active0, 0x1080081000L);
        case 111:
           return jjMoveStringLiteralDfa2_0(active0, 0x201040000L);
        case 112:
           return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
        case 114:
           return jjMoveStringLiteralDfa2_0(active0, 0x30020b00000L);
        case 115:
           if ((active0 & 0x4000000L) != 0L)
           {
              jjmatchedKind = 26;
              jjmatchedPos = 1;
           }
           return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
        default :
           break;
     }
     return jjMoveNfa_0(5, 1);
  }
  static private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 1);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 1);
     }
     switch(curChar)
     {
        case 65:
           return jjMoveStringLiteralDfa3_0(active0, 0x100c00L);
        case 66:
           return jjMoveStringLiteralDfa3_0(active0, 0x800000000L);
        case 67:
           if ((active0 & 0x10000000L) != 0L)
           {
              jjmatchedKind = 28;
              jjmatchedPos = 2;
           }
           return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
        case 68:
           return jjMoveStringLiteralDfa3_0(active0, 0x21000010000L);
        case 69:
           return jjMoveStringLiteralDfa3_0(active0, 0x500800000L);
        case 71:
           return jjMoveStringLiteralDfa3_0(active0, 0x8000L);
        case 75:
           return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L);
        case 76:
           return jjMoveStringLiteralDfa3_0(active0, 0x2000460000L);
        case 77:
           return jjMoveStringLiteralDfa3_0(active0, 0x1000300L);
        case 79:
           return jjMoveStringLiteralDfa3_0(active0, 0x10020200000L);
        case 82:
           return jjMoveStringLiteralDfa3_0(active0, 0x80L);
        case 83:
           return jjMoveStringLiteralDfa3_0(active0, 0x40040080000L);
        case 84:
           if ((active0 & 0x8000000L) != 0L)
           {
              jjmatchedKind = 27;
              jjmatchedPos = 2;
           }
           return jjMoveStringLiteralDfa3_0(active0, 0x8082005000L);
        case 85:
           return jjMoveStringLiteralDfa3_0(active0, 0x200000000L);
        case 86:
           return jjMoveStringLiteralDfa3_0(active0, 0x4000000000L);
        case 97:
           return jjMoveStringLiteralDfa3_0(active0, 0x100c00L);
        case 98:
           return jjMoveStringLiteralDfa3_0(active0, 0x800000000L);
        case 99:
           if ((active0 & 0x10000000L) != 0L)
           {
              jjmatchedKind = 28;
              jjmatchedPos = 2;
           }
           return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
        case 100:
           return jjMoveStringLiteralDfa3_0(active0, 0x21000010000L);
        case 101:
           return jjMoveStringLiteralDfa3_0(active0, 0x500800000L);
        case 103:
           return jjMoveStringLiteralDfa3_0(active0, 0x8000L);
        case 107:
           return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L);
        case 108:
           return jjMoveStringLiteralDfa3_0(active0, 0x2000460000L);
        case 109:
           return jjMoveStringLiteralDfa3_0(active0, 0x1000300L);
        case 111:
           return jjMoveStringLiteralDfa3_0(active0, 0x10020200000L);
        case 114:
           return jjMoveStringLiteralDfa3_0(active0, 0x80L);
        case 115:
           return jjMoveStringLiteralDfa3_0(active0, 0x40040080000L);
        case 116:
           if ((active0 & 0x8000000L) != 0L)
           {
              jjmatchedKind = 27;
              jjmatchedPos = 2;
           }
           return jjMoveStringLiteralDfa3_0(active0, 0x8082005000L);
        case 117:
           return jjMoveStringLiteralDfa3_0(active0, 0x200000000L);
        case 118:
           return jjMoveStringLiteralDfa3_0(active0, 0x4000000000L);
        default :
           break;
     }
     return jjMoveNfa_0(5, 2);
  }
  static private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 2);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 2);
     }
     switch(curChar)
     {
        case 65:
           return jjMoveStringLiteralDfa4_0(active0, 0x810000L);
        case 67:
           if ((active0 & 0x40000000L) != 0L)
           {
              jjmatchedKind = 30;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x80L);
        case 69:
           if ((active0 & 0x200L) != 0L)
           {
              jjmatchedKind = 9;
              jjmatchedPos = 3;
           }
           else if ((active0 & 0x4000L) != 0L)
           {
              jjmatchedKind = 14;
              jjmatchedPos = 3;
           }
           else if ((active0 & 0x1000000000000L) != 0L)
           {
              jjmatchedKind = 48;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x210024a1100L);
        case 73:
           return jjMoveStringLiteralDfa4_0(active0, 0x400000a000L);
        case 76:
           if ((active0 & 0x800L) != 0L)
           {
              jjmatchedKind = 11;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x800040400L);
        case 77:
           if ((active0 & 0x20000000L) != 0L)
           {
              jjmatchedKind = 29;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x1000000L);
        case 78:
           return jjMoveStringLiteralDfa4_0(active0, 0x200100000L);
        case 79:
           if ((active0 & 0x80000000L) != 0L)
           {
              jjmatchedKind = 31;
              jjmatchedPos = 3;
           }
           break;
        case 80:
           if ((active0 & 0x200000L) != 0L)
           {
              jjmatchedKind = 21;
              jjmatchedPos = 3;
           }
           break;
        case 82:
           return jjMoveStringLiteralDfa4_0(active0, 0x400000000L);
        case 84:
           return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
        case 85:
           return jjMoveStringLiteralDfa4_0(active0, 0x12000000000L);
        case 87:
           if ((active0 & 0x100000000L) != 0L)
           {
              jjmatchedKind = 32;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x8000000000L);
        case 97:
           return jjMoveStringLiteralDfa4_0(active0, 0x810000L);
        case 99:
           if ((active0 & 0x40000000L) != 0L)
           {
              jjmatchedKind = 30;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x80L);
        case 101:
           if ((active0 & 0x200L) != 0L)
           {
              jjmatchedKind = 9;
              jjmatchedPos = 3;
           }
           else if ((active0 & 0x4000L) != 0L)
           {
              jjmatchedKind = 14;
              jjmatchedPos = 3;
           }
           else if ((active0 & 0x1000000000000L) != 0L)
           {
              jjmatchedKind = 48;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x210024a1100L);
        case 105:
           return jjMoveStringLiteralDfa4_0(active0, 0x400000a000L);
        case 108:
           if ((active0 & 0x800L) != 0L)
           {
              jjmatchedKind = 11;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x800040400L);
        case 109:
           if ((active0 & 0x20000000L) != 0L)
           {
              jjmatchedKind = 29;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x1000000L);
        case 110:
           return jjMoveStringLiteralDfa4_0(active0, 0x200100000L);
        case 111:
           if ((active0 & 0x80000000L) != 0L)
           {
              jjmatchedKind = 31;
              jjmatchedPos = 3;
           }
           break;
        case 112:
           if ((active0 & 0x200000L) != 0L)
           {
              jjmatchedKind = 21;
              jjmatchedPos = 3;
           }
           break;
        case 114:
           return jjMoveStringLiteralDfa4_0(active0, 0x400000000L);
        case 116:
           return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
        case 117:
           return jjMoveStringLiteralDfa4_0(active0, 0x12000000000L);
        case 119:
           if ((active0 & 0x100000000L) != 0L)
           {
              jjmatchedKind = 32;
              jjmatchedPos = 3;
           }
           return jjMoveStringLiteralDfa4_0(active0, 0x8000000000L);
        default :
           break;
     }
     return jjMoveNfa_0(5, 3);
  }
  static private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 3);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 3);
     }
     switch(curChar)
     {
        case 66:
           return jjMoveStringLiteralDfa5_0(active0, 0x40000L);
        case 67:
           return jjMoveStringLiteralDfa5_0(active0, 0x20000L);
        case 69:
           if ((active0 & 0x400000000L) != 0L)
           {
              jjmatchedKind = 34;
              jjmatchedPos = 4;
           }
           else if ((active0 & 0x800000000L) != 0L)
           {
              jjmatchedKind = 35;
              jjmatchedPos = 4;
           }
           return jjMoveStringLiteralDfa5_0(active0, 0xa000000000L);
        case 71:
           return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
        case 72:
           return jjMoveStringLiteralDfa5_0(active0, 0x80L);
        case 73:
           return jjMoveStringLiteralDfa5_0(active0, 0x40001000000L);
        case 76:
           return jjMoveStringLiteralDfa5_0(active0, 0x400L);
        case 77:
           return jjMoveStringLiteralDfa5_0(active0, 0x2000L);
        case 78:
           return jjMoveStringLiteralDfa5_0(active0, 0x4000008000L);
        case 80:
           return jjMoveStringLiteralDfa5_0(active0, 0x10000000000L);
        case 82:
           if ((active0 & 0x2000000L) != 0L)
           {
              jjmatchedKind = 25;
              jjmatchedPos = 4;
           }
           return jjMoveStringLiteralDfa5_0(active0, 0x20000080000L);
        case 83:
           return jjMoveStringLiteralDfa5_0(active0, 0x100L);
        case 84:
           if ((active0 & 0x100000L) != 0L)
           {
              jjmatchedKind = 20;
              jjmatchedPos = 4;
           }
           else if ((active0 & 0x200000000L) != 0L)
           {
              jjmatchedKind = 33;
              jjmatchedPos = 4;
           }
           return jjMoveStringLiteralDfa5_0(active0, 0xc10000L);
        case 88:
           if ((active0 & 0x1000000000L) != 0L)
           {
              jjmatchedKind = 36;
              jjmatchedPos = 4;
           }
           break;
        case 98:
           return jjMoveStringLiteralDfa5_0(active0, 0x40000L);
        case 99:
           return jjMoveStringLiteralDfa5_0(active0, 0x20000L);
        case 101:
           if ((active0 & 0x400000000L) != 0L)
           {
              jjmatchedKind = 34;
              jjmatchedPos = 4;
           }
           else if ((active0 & 0x800000000L) != 0L)
           {
              jjmatchedKind = 35;
              jjmatchedPos = 4;
           }
           return jjMoveStringLiteralDfa5_0(active0, 0xa000000000L);
        case 103:
           return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
        case 104:
           return jjMoveStringLiteralDfa5_0(active0, 0x80L);
        case 105:
           return jjMoveStringLiteralDfa5_0(active0, 0x40001000000L);
        case 108:
           return jjMoveStringLiteralDfa5_0(active0, 0x400L);
        case 109:
           return jjMoveStringLiteralDfa5_0(active0, 0x2000L);
        case 110:
           return jjMoveStringLiteralDfa5_0(active0, 0x4000008000L);
        case 112:
           return jjMoveStringLiteralDfa5_0(active0, 0x10000000000L);
        case 114:
           if ((active0 & 0x2000000L) != 0L)
           {
              jjmatchedKind = 25;
              jjmatchedPos = 4;
           }
           return jjMoveStringLiteralDfa5_0(active0, 0x20000080000L);
        case 115:
           return jjMoveStringLiteralDfa5_0(active0, 0x100L);
        case 116:
           if ((active0 & 0x100000L) != 0L)
           {
              jjmatchedKind = 20;
              jjmatchedPos = 4;
           }
           else if ((active0 & 0x200000000L) != 0L)
           {
              jjmatchedKind = 33;
              jjmatchedPos = 4;
           }
           return jjMoveStringLiteralDfa5_0(active0, 0xc10000L);
        case 120:
           if ((active0 & 0x1000000000L) != 0L)
           {
              jjmatchedKind = 36;
              jjmatchedPos = 4;
           }
           break;
        default :
           break;
     }
     return jjMoveNfa_0(5, 4);
  }
  static private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 4);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 4);
     }
     switch(curChar)
     {
        case 32:
           return jjMoveStringLiteralDfa6_0(active0, 0x30000000000L);
        case 65:
           return jjMoveStringLiteralDfa6_0(active0, 0x42080L);
        case 69:
           if ((active0 & 0x10000L) != 0L)
           {
              jjmatchedKind = 16;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x400000L) != 0L)
           {
              jjmatchedKind = 22;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x800000L) != 0L)
           {
              jjmatchedKind = 23;
              jjmatchedPos = 5;
           }
           return jjMoveStringLiteralDfa6_0(active0, 0x8000001000L);
        case 71:
           if ((active0 & 0x4000000000L) != 0L)
           {
              jjmatchedKind = 38;
              jjmatchedPos = 5;
           }
           break;
        case 73:
           return jjMoveStringLiteralDfa6_0(active0, 0x400L);
        case 78:
           return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
        case 83:
           if ((active0 & 0x2000000000L) != 0L)
           {
              jjmatchedKind = 37;
              jjmatchedPos = 5;
           }
           break;
        case 84:
           if ((active0 & 0x8000L) != 0L)
           {
              jjmatchedKind = 15;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x20000L) != 0L)
           {
              jjmatchedKind = 17;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x80000L) != 0L)
           {
              jjmatchedKind = 19;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x1000000L) != 0L)
           {
              jjmatchedKind = 24;
              jjmatchedPos = 5;
           }
           return jjMoveStringLiteralDfa6_0(active0, 0x100L);
        case 97:
           return jjMoveStringLiteralDfa6_0(active0, 0x42080L);
        case 101:
           if ((active0 & 0x10000L) != 0L)
           {
              jjmatchedKind = 16;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x400000L) != 0L)
           {
              jjmatchedKind = 22;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x800000L) != 0L)
           {
              jjmatchedKind = 23;
              jjmatchedPos = 5;
           }
           return jjMoveStringLiteralDfa6_0(active0, 0x8000001000L);
        case 103:
           if ((active0 & 0x4000000000L) != 0L)
           {
              jjmatchedKind = 38;
              jjmatchedPos = 5;
           }
           break;
        case 105:
           return jjMoveStringLiteralDfa6_0(active0, 0x400L);
        case 110:
           return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
        case 115:
           if ((active0 & 0x2000000000L) != 0L)
           {
              jjmatchedKind = 37;
              jjmatchedPos = 5;
           }
           break;
        case 116:
           if ((active0 & 0x8000L) != 0L)
           {
              jjmatchedKind = 15;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x20000L) != 0L)
           {
              jjmatchedKind = 17;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x80000L) != 0L)
           {
              jjmatchedKind = 19;
              jjmatchedPos = 5;
           }
           else if ((active0 & 0x1000000L) != 0L)
           {
              jjmatchedKind = 24;
              jjmatchedPos = 5;
           }
           return jjMoveStringLiteralDfa6_0(active0, 0x100L);
        default :
           break;
     }
     return jjMoveNfa_0(5, 5);
  }
  static private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 5);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 5);
     }
     switch(curChar)
     {
        case 65:
           return jjMoveStringLiteralDfa7_0(active0, 0x100L);
        case 66:
           return jjMoveStringLiteralDfa7_0(active0, 0x30000000000L);
        case 67:
           return jjMoveStringLiteralDfa7_0(active0, 0x40000040000L);
        case 76:
           if ((active0 & 0x2000L) != 0L)
           {
              jjmatchedKind = 13;
              jjmatchedPos = 6;
           }
           break;
        case 78:
           if ((active0 & 0x8000000000L) != 0L)
           {
              jjmatchedKind = 39;
              jjmatchedPos = 6;
           }
           return jjMoveStringLiteralDfa7_0(active0, 0x400L);
        case 82:
           if ((active0 & 0x80L) != 0L)
           {
              jjmatchedKind = 7;
              jjmatchedPos = 6;
           }
           else if ((active0 & 0x1000L) != 0L)
           {
              jjmatchedKind = 12;
              jjmatchedPos = 6;
           }
           break;
        case 97:
           return jjMoveStringLiteralDfa7_0(active0, 0x100L);
        case 98:
           return jjMoveStringLiteralDfa7_0(active0, 0x30000000000L);
        case 99:
           return jjMoveStringLiteralDfa7_0(active0, 0x40000040000L);
        case 108:
           if ((active0 & 0x2000L) != 0L)
           {
              jjmatchedKind = 13;
              jjmatchedPos = 6;
           }
           break;
        case 110:
           if ((active0 & 0x8000000000L) != 0L)
           {
              jjmatchedKind = 39;
              jjmatchedPos = 6;
           }
           return jjMoveStringLiteralDfa7_0(active0, 0x400L);
        case 114:
           if ((active0 & 0x80L) != 0L)
           {
              jjmatchedKind = 7;
              jjmatchedPos = 6;
           }
           else if ((active0 & 0x1000L) != 0L)
           {
              jjmatchedKind = 12;
              jjmatchedPos = 6;
           }
           break;
        default :
           break;
     }
     return jjMoveNfa_0(5, 6);
  }
  static private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 6);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 6);
     }
     switch(curChar)
     {
        case 75:
           if ((active0 & 0x40000L) != 0L)
           {
              jjmatchedKind = 18;
              jjmatchedPos = 7;
           }
           break;
        case 77:
           return jjMoveStringLiteralDfa8_0(active0, 0x100L);
        case 84:
           if ((active0 & 0x400L) != 0L)
           {
              jjmatchedKind = 10;
              jjmatchedPos = 7;
           }
           else if ((active0 & 0x40000000000L) != 0L)
           {
              jjmatchedKind = 42;
              jjmatchedPos = 7;
           }
           break;
        case 89:
           if ((active0 & 0x10000000000L) != 0L)
           {
              jjmatchedKind = 40;
              jjmatchedPos = 7;
           }
           else if ((active0 & 0x20000000000L) != 0L)
           {
              jjmatchedKind = 41;
              jjmatchedPos = 7;
           }
           break;
        case 107:
           if ((active0 & 0x40000L) != 0L)
           {
              jjmatchedKind = 18;
              jjmatchedPos = 7;
           }
           break;
        case 109:
           return jjMoveStringLiteralDfa8_0(active0, 0x100L);
        case 116:
           if ((active0 & 0x400L) != 0L)
           {
              jjmatchedKind = 10;
              jjmatchedPos = 7;
           }
           else if ((active0 & 0x40000000000L) != 0L)
           {
              jjmatchedKind = 42;
              jjmatchedPos = 7;
           }
           break;
        case 121:
           if ((active0 & 0x10000000000L) != 0L)
           {
              jjmatchedKind = 40;
              jjmatchedPos = 7;
           }
           else if ((active0 & 0x20000000000L) != 0L)
           {
              jjmatchedKind = 41;
              jjmatchedPos = 7;
           }
           break;
        default :
           break;
     }
     return jjMoveNfa_0(5, 7);
  }
  static private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
  {
     if (((active0 &= old0)) == 0L)
        return jjMoveNfa_0(5, 7);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) {
     return jjMoveNfa_0(5, 7);
     }
     switch(curChar)
     {
        case 80:
           if ((active0 & 0x100L) != 0L)
           {
              jjmatchedKind = 8;
              jjmatchedPos = 8;
           }
           break;
        case 112:
           if ((active0 & 0x100L) != 0L)
           {
              jjmatchedKind = 8;
              jjmatchedPos = 8;
           }
           break;
        default :
           break;
     }
     return jjMoveNfa_0(5, 8);
  }
  static private final void jjCheckNAdd(int state)
  {
     if (jjrounds[state] != jjround)
     {
        jjstateSet[jjnewStateCnt++] = state;
        jjrounds[state] = jjround;
     }
  }
  static private final void jjAddStates(int start, int end)
  {
     do {
        jjstateSet[jjnewStateCnt++] = jjnextStates[start];
     } while (start++ != end);
  }
  static private final void jjCheckNAddTwoStates(int state1, int state2)
  {
     jjCheckNAdd(state1);
     jjCheckNAdd(state2);
  }
  static private final void jjCheckNAddStates(int start, int end)
  {
     do {
        jjCheckNAdd(jjnextStates[start]);
     } while (start++ != end);
  }
  static private final void jjCheckNAddStates(int start)
  {
     jjCheckNAdd(jjnextStates[start]);
     jjCheckNAdd(jjnextStates[start + 1]);
  }
  static final long[] jjbitVec0 = {
     0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
  };
  static private final int jjMoveNfa_0(int startState, int curPos)
  {
     int strKind = jjmatchedKind;
     int strPos = jjmatchedPos;
     int seenUpto;
     input_stream.backup(seenUpto = curPos + 1);
     try { curChar = input_stream.readChar(); }
     catch(java.io.IOException e) { throw new Error("Internal Error"); }
     curPos = 0;
     int[] nextStates;
     int startsAt = 0;
     jjnewStateCnt = 15;
     int i = 1;
     jjstateSet[0] = startState;
     int j, kind = 0x7fffffff;
     for (;;)
     {
        if (++jjround == 0x7fffffff)
           ReInitRounds();
        if (curChar < 64)
        {
           long l = 1L << curChar;
           MatchLoop: do
           {
              switch(jjstateSet[--i])
              {
                 case 5:
                    if (curChar == 47)
                       jjstateSet[jjnewStateCnt++] = 6;
                    else if (curChar == 45)
                       jjstateSet[jjnewStateCnt++] = 0;
                    break;
                 case 0:
                    if (curChar == 45)
                       jjCheckNAddStates(0, 2);
                    break;
                 case 1:
                    if ((0xffffffffffffdbffL & l) != 0L)
                       jjCheckNAddStates(0, 2);
                    break;
                 case 2:
                    if ((0x2400L & l) != 0L && kind > 5)
                       kind = 5;
                    break;
                 case 3:
                    if (curChar == 10 && kind > 5)
                       kind = 5;
                    break;
                 case 4:
                    if (curChar == 13)
                       jjstateSet[jjnewStateCnt++] = 3;
                    break;
                 case 6:
                    if (curChar == 42)
                       jjCheckNAddTwoStates(7, 8);
                    break;
                 case 7:
                    if ((0xfffffbffffffffffL & l) != 0L)
                       jjCheckNAddTwoStates(7, 8);
                    break;
                 case 8:
                    if (curChar == 42)
                       jjCheckNAddStates(3, 5);
                    break;
                 case 9:
                    if ((0xffff7bffffffffffL & l) != 0L)
                       jjCheckNAddTwoStates(10, 8);
                    break;
                 case 10:
                    if ((0xfffffbffffffffffL & l) != 0L)
                       jjCheckNAddTwoStates(10, 8);
                    break;
                 case 11:
                    if (curChar == 47 && kind > 6)
                       kind = 6;
                    break;
                 case 12:
                    if (curChar == 47)
                       jjstateSet[jjnewStateCnt++] = 6;
                    break;
                 case 14:
                    if ((0x3ff000000000000L & l) == 0L)
                       break;
                    if (kind > 49)
                       kind = 49;
                    jjstateSet[jjnewStateCnt++] = 14;
                    break;
                 default : break;
              }
           } while(i != startsAt);
        }
        else if (curChar < 128)
        {
           long l = 1L << (curChar & 077);
           MatchLoop: do
           {
              switch(jjstateSet[--i])
              {
                 case 5:
                 case 14:
                    if ((0x7fffffe87fffffeL & l) == 0L)
                       break;
                    if (kind > 49)
                       kind = 49;
                    jjCheckNAdd(14);
                    break;
                 case 1:
                    jjAddStates(0, 2);
                    break;
                 case 7:
                    jjCheckNAddTwoStates(7, 8);
                    break;
                 case 9:
                 case 10:
                    jjCheckNAddTwoStates(10, 8);
                    break;
                 default : break;
              }
           } while(i != startsAt);
        }
        else
        {
           int i2 = (curChar & 0xff) >> 6;
           long l2 = 1L << (curChar & 077);
           MatchLoop: do
           {
              switch(jjstateSet[--i])
              {
                 case 1:
                    if ((jjbitVec0[i2] & l2) != 0L)
                       jjAddStates(0, 2);
                    break;
                 case 7:
                    if ((jjbitVec0[i2] & l2) != 0L)
                       jjCheckNAddTwoStates(7, 8);
                    break;
                 case 9:
                 case 10:
                    if ((jjbitVec0[i2] & l2) != 0L)
                       jjCheckNAddTwoStates(10, 8);
                    break;
                 default : break;
              }
           } while(i != startsAt);
        }
        if (kind != 0x7fffffff)
        {
           jjmatchedKind = kind;
           jjmatchedPos = curPos;
           kind = 0x7fffffff;
        }
        ++curPos;
        if ((i = jjnewStateCnt) == (startsAt = 15 - (jjnewStateCnt = startsAt)))
           break;
        try { curChar = input_stream.readChar(); }
        catch(java.io.IOException e) { break; }
     }
     if (jjmatchedPos > strPos)
        return curPos;
  
     int toRet = Math.max(curPos, seenUpto);
  
     if (curPos < toRet)
        for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; )
           try { curChar = input_stream.readChar(); }
           catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); }
  
     if (jjmatchedPos < strPos)
     {
        jjmatchedKind = strKind;
        jjmatchedPos = strPos;
     }
     else if (jjmatchedPos == strPos && jjmatchedKind > strKind)
        jjmatchedKind = strKind;
  
     return toRet;
  }
  static final int[] jjnextStates = {
     1, 2, 4, 8, 9, 11, 
  };
  public static final String[] jjstrLiteralImages = {
  "", null, null, null, null, null, null, null, null, null, null, null, null, 
  null, null, null, null, null, null, null, null, null, null, null, null, null, null, 
  null, null, null, null, null, null, null, null, null, null, null, null, null, null, 
  null, null, "\75", "\76", "\74", "\76\75", "\74\75", null, null, null, null, "\73", };
  public static final String[] lexStateNames = {
     "DEFAULT", 
  };
  static final long[] jjtoToken = {
     0x13ffffffffff81L, 
  };
  static final long[] jjtoSkip = {
     0x7eL, 
  };
  static private SimpleCharStream input_stream;
  static private final int[] jjrounds = new int[15];
  static private final int[] jjstateSet = new int[30];
  static protected char curChar;
  public BasicSQLParserTokenManager(SimpleCharStream stream)
  {
     if (input_stream != null)
        throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
     input_stream = stream;
  }
  public BasicSQLParserTokenManager(SimpleCharStream stream, int lexState)
  {
     this(stream);
     SwitchTo(lexState);
  }
  static public void ReInit(SimpleCharStream stream)
  {
     jjmatchedPos = jjnewStateCnt = 0;
     curLexState = defaultLexState;
     input_stream = stream;
     ReInitRounds();
  }
  static private final void ReInitRounds()
  {
     int i;
     jjround = 0x80000001;
     for (i = 15; i-- > 0;)
        jjrounds[i] = 0x80000000;
  }
  static public void ReInit(SimpleCharStream stream, int lexState)
  {
     ReInit(stream);
     SwitchTo(lexState);
  }
  static public void SwitchTo(int lexState)
  {
     if (lexState >= 1 || lexState < 0)
        throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
     else
        curLexState = lexState;
  }
  
  static private final Token jjFillToken()
  {
     Token t = Token.newToken(jjmatchedKind);
     t.kind = jjmatchedKind;
     String im = jjstrLiteralImages[jjmatchedKind];
     t.image = (im == null) ? input_stream.GetImage() : im;
     t.beginLine = input_stream.getBeginLine();
     t.beginColumn = input_stream.getBeginColumn();
     t.endLine = input_stream.getEndLine();
     t.endColumn = input_stream.getEndColumn();
     return t;
  }
  
  static int curLexState = 0;
  static int defaultLexState = 0;
  static int jjnewStateCnt;
  static int jjround;
  static int jjmatchedPos;
  static int jjmatchedKind;
  
  public static final Token getNextToken() 
  {
    int kind;
    Token specialToken = null;
    Token matchedToken;
    int curPos = 0;
  
    EOFLoop :
    for (;;)
    {   
     try   
     {     
        curChar = input_stream.BeginToken();
     }     
     catch(java.io.IOException e)
     {        
        jjmatchedKind = 0;
        matchedToken = jjFillToken();
        return matchedToken;
     }
  
     jjmatchedKind = 0x7fffffff;
     jjmatchedPos = 0;
     curPos = jjMoveStringLiteralDfa0_0();
     if (jjmatchedKind != 0x7fffffff)
     {
        if (jjmatchedPos + 1 < curPos)
           input_stream.backup(curPos - jjmatchedPos - 1);
        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
        {
           matchedToken = jjFillToken();
           return matchedToken;
        }
        else
        {
           continue EOFLoop;
        }
     }
     int error_line = input_stream.getEndLine();
     int error_column = input_stream.getEndColumn();
     String error_after = null;
     boolean EOFSeen = false;
     try { input_stream.readChar(); input_stream.backup(1); }
     catch (java.io.IOException e1) {
        EOFSeen = true;
        error_after = curPos <= 1 ? "" : input_stream.GetImage();
        if (curChar == '\n' || curChar == '\r') {
           error_line++;
           error_column = 0;
        }
        else
           error_column++;
     }
     if (!EOFSeen) {
        input_stream.backup(1);
        error_after = curPos <= 1 ? "" : input_stream.GetImage();
     }
     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
    }
  }
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParserConstants.java
  
  Index: BasicSQLParserConstants.java
  ===================================================================
  /* Generated By:JavaCC: Do not edit this line. BasicSQLParserConstants.java */
  package org.apache.avalon.db.basic.parser;
  
  public interface BasicSQLParserConstants {
  
    int EOF = 0;
    int COMMENT_LINE = 5;
    int COMMENT_BLOCK = 6;
    int VARCHAR = 7;
    int TIMESTAMP = 8;
    int TIME = 9;
    int SMALLINT = 10;
    int REAL = 11;
    int INTEGER = 12;
    int DECIMAL = 13;
    int DATE = 14;
    int BIGINT = 15;
    int UPDATE = 16;
    int SELECT = 17;
    int ROLLBACK = 18;
    int INSERT = 19;
    int GRANT = 20;
    int DROP = 21;
    int DELETE = 22;
    int CREATE = 23;
    int COMMIT = 24;
    int ALTER = 25;
    int AS = 26;
    int SET = 27;
    int ASC = 28;
    int FROM = 29;
    int DESC = 30;
    int INTO = 31;
    int VIEW = 32;
    int COUNT = 33;
    int WHERE = 34;
    int TABLE = 35;
    int INDEX = 36;
    int VALUES = 37;
    int HAVING = 38;
    int BETWEEN = 39;
    int GROUPBY = 40;
    int ORDERBY = 41;
    int DISTINCT = 42;
    int EQUAL = 43;
    int GREATERTHAN = 44;
    int SMALLERTHAN = 45;
    int GREATERTHANOREQUAL = 46;
    int SMALLERTHANOREQUAL = 47;
    int LIKE = 48;
    int IDENTIFIER = 49;
    int LETTER = 50;
    int DIGIT = 51;
  
    int DEFAULT = 0;
  
    String[] tokenImage = {
      "<EOF>",
      "\" \"",
      "\"\\n\"",
      "\"\\r\"",
      "\"\\t\"",
      "<COMMENT_LINE>",
      "<COMMENT_BLOCK>",
      "\"varchar\"",
      "\"timestamp\"",
      "\"time\"",
      "\"smallint\"",
      "\"real\"",
      "\"integer\"",
      "\"decimal\"",
      "\"date\"",
      "\"bigint\"",
      "\"update\"",
      "\"select\"",
      "\"rollback\"",
      "\"insert\"",
      "\"grant\"",
      "\"drop\"",
      "\"delete\"",
      "\"create\"",
      "\"commit\"",
      "\"alter\"",
      "\"as\"",
      "\"set\"",
      "\"asc\"",
      "\"from\"",
      "\"desc\"",
      "\"into\"",
      "\"view\"",
      "\"count\"",
      "\"where\"",
      "\"table\"",
      "\"index\"",
      "\"values\"",
      "\"having\"",
      "\"between\"",
      "\"group by\"",
      "\"order by\"",
      "\"distinct\"",
      "\"=\"",
      "\">\"",
      "\"<\"",
      "\">=\"",
      "\"<=\"",
      "\"like\"",
      "<IDENTIFIER>",
      "<LETTER>",
      "<DIGIT>",
      "\";\"",
    };
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParser.java
  
  Index: BasicSQLParser.java
  ===================================================================
  /* Generated By:JavaCC: Do not edit this line. BasicSQLParser.java */
  package org.apache.avalon.db.basic.parser;
  
  import org.apache.avalon.db.server.sql.AbstractSQLParser;
  import org.apache.avalon.db.server.sql.ParseException;
  import org.apache.avalon.db.server.sql.SimpleCharStream;
  import org.apache.avalon.db.server.sql.Token;
  import org.apache.avalon.db.server.sql.TokenMgrError;
  import org.apache.avalon.db.server.AbstractRequestHandler;
  import org.apache.avalon.db.server.stdhandlers.PingHandler;
  import org.apache.avalon.db.server.stdhandlers.CatalogHandler;
  import org.apache.avalon.db.server.stdhandlers.EstablishConnectionHandler;
  import org.apache.avalon.db.transport.Request;
  import org.apache.avalon.db.basic.handlers.BasicCloseResultSetHandler;
  import org.apache.avalon.db.actions.Action;
  import org.apache.avalon.db.actions.ActionException;
  
  import java.util.ArrayList;
  
  /**
   * Class BasicSQLParser
   *
   * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
   */
  public class BasicSQLParser extends AbstractSQLParser implements BasicSQLParserConstants {
  
      protected void getCustomRequestHandlers(AbstractRequestHandler[] handlers) {
      }
  
      public void initializeAction(Action action) throws ActionException {
          action.setDatabasePersistor(mDatabasePersistor);
          setupLogger(action);
          action.initialize();
      }
  
      public static void main(String args[]) {
          BasicSQLParser parser = new BasicSQLParser(System.in);
          try {
              parser.Test((String)args[0]);
          } catch(ParseException pe) {
              pe.printStackTrace();
          }
      }
  
  /**
   * Test Method for command line input
   */
    static final public void Test(String sql) throws ParseException {
      parseSQLString(sql);
      jj_consume_token(52);
    }
  
    static final public String parseSQLString(String sql) throws ParseException {
      String stm;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case SELECT:
        stm = Select(sql);
        break;
      case UPDATE:
        stm = Update(sql);
        break;
      default:
        jj_la1[0] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      jj_consume_token(52);
        {if (true) return stm;}
      throw new Error("Missing return statement in function");
    }
  
    static final public String Select(String sql) throws ParseException {
      String stm;
      Token token;
      ArrayList columns = new ArrayList();
      jj_consume_token(SELECT);
      getColumns(columns);
      token = jj_consume_token(SELECT);
              stm = token.image;
      jj_consume_token(FROM);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 0:
        Where();
        break;
      default:
        jj_la1[1] = jj_gen;
        ;
      }
        {if (true) return stm;}
      throw new Error("Missing return statement in function");
    }
  
    static final public String Update(String sql) throws ParseException {
       String stm;
       Token token;
      jj_consume_token(UPDATE);
      token = jj_consume_token(UPDATE);
              stm = token.image;
        {if (true) return stm;}
      throw new Error("Missing return statement in function");
    }
  
    static final public void Rollback(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Insert(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Grant(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Drop(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Delete(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Commit(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Alter(String sql) throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void Where() throws ParseException {
      jj_consume_token(0);
    }
  
    static final public void getColumns(ArrayList list) throws ParseException {
      String col;
      col = getSingleColumn();
                                list.add(col);
    }
  
    static final public String getSingleColumn() throws ParseException {
      String col;
      Token column;
      column = jj_consume_token(IDENTIFIER);
              col = column.image;
              System.out.println("column=" + col);
        {if (true) return col;}
      throw new Error("Missing return statement in function");
    }
  
    static private boolean jj_initialized_once = false;
    static public BasicSQLParserTokenManager token_source;
    static SimpleCharStream jj_input_stream;
    static public Token token, jj_nt;
    static private int jj_ntk;
    static private int jj_gen;
    static final private int[] jj_la1 = new int[2];
    static final private int[] jj_la1_0 = {0x30000,0x1,};
    static final private int[] jj_la1_1 = {0x0,0x0,};
  
    public BasicSQLParser(java.io.InputStream stream) {
      if (jj_initialized_once) {
        System.out.println("ERROR: Second call to constructor of static parser.  You must");
        System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");
        System.out.println("       during parser generation.");
        throw new Error();
      }
      jj_initialized_once = true;
      jj_input_stream = new SimpleCharStream(stream, 1, 1);
      token_source = new BasicSQLParserTokenManager(jj_input_stream);
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 2; i++) jj_la1[i] = -1;
    }
  
    static public void ReInit(java.io.InputStream 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 < 2; i++) jj_la1[i] = -1;
    }
  
    public BasicSQLParser(java.io.Reader stream) {
      if (jj_initialized_once) {
        System.out.println("ERROR: Second call to constructor of static parser.  You must");
        System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");
        System.out.println("       during parser generation.");
        throw new Error();
      }
      jj_initialized_once = true;
      jj_input_stream = new SimpleCharStream(stream, 1, 1);
      token_source = new BasicSQLParserTokenManager(jj_input_stream);
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 2; i++) jj_la1[i] = -1;
    }
  
    static 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 < 2; i++) jj_la1[i] = -1;
    }
  
    public BasicSQLParser(BasicSQLParserTokenManager tm) {
      if (jj_initialized_once) {
        System.out.println("ERROR: Second call to constructor of static parser.  You must");
        System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");
        System.out.println("       during parser generation.");
        throw new Error();
      }
      jj_initialized_once = true;
      token_source = tm;
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 2; i++) jj_la1[i] = -1;
    }
  
    public void ReInit(BasicSQLParserTokenManager tm) {
      token_source = tm;
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 2; i++) jj_la1[i] = -1;
    }
  
    static 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++;
        return token;
      }
      token = oldToken;
      jj_kind = kind;
      throw generateParseException();
    }
  
    static 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;
    }
  
    static final public Token getToken(int index) {
      Token t = token;
      for (int i = 0; i < index; i++) {
        if (t.next != null) t = t.next;
        else t = t.next = token_source.getNextToken();
      }
      return t;
    }
  
    static 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);
    }
  
    static private java.util.Vector jj_expentries = new java.util.Vector();
    static private int[] jj_expentry;
    static private int jj_kind = -1;
  
    static final public ParseException generateParseException() {
      jj_expentries.removeAllElements();
      boolean[] la1tokens = new boolean[53];
      for (int i = 0; i < 53; i++) {
        la1tokens[i] = false;
      }
      if (jj_kind >= 0) {
        la1tokens[jj_kind] = true;
        jj_kind = -1;
      }
      for (int i = 0; i < 2; 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;
            }
          }
        }
      }
      for (int i = 0; i < 53; i++) {
        if (la1tokens[i]) {
          jj_expentry = new int[1];
          jj_expentry[0] = i;
          jj_expentries.addElement(jj_expentry);
        }
      }
      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);
    }
  
    static final public void enable_tracing() {
    }
  
    static final public void disable_tracing() {
    }
  
  }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>