0001: /* Generated By:JavaCC: Do not edit this line. JDOQLParserTokenManager.java */
0002: package com.versant.core.jdo.query;
0003:
0004: import com.versant.core.util.CharBuf;
0005: import com.versant.core.util.IntArray;
0006: import java.util.ArrayList;
0007:
0008: public class JDOQLParserTokenManager implements JDOQLParserConstants {
0009: public java.io.PrintStream debugStream = System.out;
0010:
0011: public void setDebugStream(java.io.PrintStream ds) {
0012: debugStream = ds;
0013: }
0014:
0015: private final int jjStopStringLiteralDfa_0(int pos, long active0,
0016: long active1) {
0017: switch (pos) {
0018: case 0:
0019: if ((active0 & 0x4000000L) != 0L) {
0020: jjmatchedKind = 42;
0021: return 24;
0022: }
0023: if ((active0 & 0x807bfffe00L) != 0L) {
0024: jjmatchedKind = 42;
0025: return 36;
0026: }
0027: if ((active1 & 0x8L) != 0L)
0028: return 53;
0029: if ((active0 & 0x20000000000000L) != 0L)
0030: return 4;
0031: if ((active0 & 0x80000000L) != 0L) {
0032: jjmatchedKind = 42;
0033: return 20;
0034: }
0035: return -1;
0036: case 1:
0037: if ((active0 & 0x100400L) != 0L)
0038: return 36;
0039: if ((active0 & 0x80ffeffa00L) != 0L) {
0040: if (jjmatchedPos != 1) {
0041: jjmatchedKind = 42;
0042: jjmatchedPos = 1;
0043: }
0044: return 36;
0045: }
0046: return -1;
0047: case 2:
0048: if ((active0 & 0x1009c000L) != 0L)
0049: return 36;
0050: if ((active0 & 0x80efe63e00L) != 0L) {
0051: jjmatchedKind = 42;
0052: jjmatchedPos = 2;
0053: return 36;
0054: }
0055: return -1;
0056: case 3:
0057: if ((active0 & 0x80a0c00000L) != 0L)
0058: return 36;
0059: if ((active0 & 0x4f263e00L) != 0L) {
0060: jjmatchedKind = 42;
0061: jjmatchedPos = 3;
0062: return 36;
0063: }
0064: return -1;
0065: case 4:
0066: if ((active0 & 0x44061000L) != 0L)
0067: return 36;
0068: if ((active0 & 0xb202e00L) != 0L) {
0069: if (jjmatchedPos != 4) {
0070: jjmatchedKind = 42;
0071: jjmatchedPos = 4;
0072: }
0073: return 36;
0074: }
0075: return -1;
0076: case 5:
0077: if ((active0 & 0xa002000L) != 0L)
0078: return 36;
0079: if ((active0 & 0x1200e00L) != 0L) {
0080: jjmatchedKind = 42;
0081: jjmatchedPos = 5;
0082: return 36;
0083: }
0084: return -1;
0085: case 6:
0086: if ((active0 & 0x200000L) != 0L)
0087: return 36;
0088: if ((active0 & 0x1000e00L) != 0L) {
0089: jjmatchedKind = 42;
0090: jjmatchedPos = 6;
0091: return 36;
0092: }
0093: return -1;
0094: case 7:
0095: if ((active0 & 0xa00L) != 0L)
0096: return 36;
0097: if ((active0 & 0x1000400L) != 0L) {
0098: jjmatchedKind = 42;
0099: jjmatchedPos = 7;
0100: return 36;
0101: }
0102: return -1;
0103: case 8:
0104: if ((active0 & 0x400L) != 0L)
0105: return 36;
0106: if ((active0 & 0x1000000L) != 0L) {
0107: jjmatchedKind = 42;
0108: jjmatchedPos = 8;
0109: return 36;
0110: }
0111: return -1;
0112: default:
0113: return -1;
0114: }
0115: }
0116:
0117: private final int jjStartNfa_0(int pos, long active0, long active1) {
0118: return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0,
0119: active1), pos + 1);
0120: }
0121:
0122: private final int jjStopAtPos(int pos, int kind) {
0123: jjmatchedKind = kind;
0124: jjmatchedPos = pos;
0125: return pos + 1;
0126: }
0127:
0128: private final int jjStartNfaWithStates_0(int pos, int kind,
0129: int state) {
0130: jjmatchedKind = kind;
0131: jjmatchedPos = pos;
0132: try {
0133: curChar = input_stream.readChar();
0134: } catch (java.io.IOException e) {
0135: return pos + 1;
0136: }
0137: return jjMoveNfa_0(state, pos + 1);
0138: }
0139:
0140: private final int jjMoveStringLiteralDfa0_0() {
0141: switch (curChar) {
0142: case 33:
0143: jjmatchedKind = 56;
0144: return jjMoveStringLiteralDfa1_0(0x2000000000000000L);
0145: case 38:
0146: jjmatchedKind = 68;
0147: return jjMoveStringLiteralDfa1_0(0x8000000000000000L);
0148: case 40:
0149: return jjStopAtPos(0, 45);
0150: case 41:
0151: return jjStopAtPos(0, 46);
0152: case 42:
0153: return jjStopAtPos(0, 66);
0154: case 43:
0155: return jjStopAtPos(0, 64);
0156: case 44:
0157: return jjStopAtPos(0, 52);
0158: case 45:
0159: return jjStopAtPos(0, 65);
0160: case 46:
0161: return jjStartNfaWithStates_0(0, 53, 4);
0162: case 47:
0163: return jjStartNfaWithStates_0(0, 67, 53);
0164: case 59:
0165: return jjStopAtPos(0, 51);
0166: case 60:
0167: jjmatchedKind = 55;
0168: return jjMoveStringLiteralDfa1_0(0x800000000000000L);
0169: case 61:
0170: return jjMoveStringLiteralDfa1_0(0x400000000000000L);
0171: case 62:
0172: jjmatchedKind = 54;
0173: return jjMoveStringLiteralDfa1_0(0x1000000000000000L);
0174: case 91:
0175: return jjStopAtPos(0, 49);
0176: case 93:
0177: return jjStopAtPos(0, 50);
0178: case 97:
0179: return jjMoveStringLiteralDfa1_0(0x110600L);
0180: case 98:
0181: return jjMoveStringLiteralDfa1_0(0x600000L);
0182: case 99:
0183: return jjMoveStringLiteralDfa1_0(0x860000L);
0184: case 100:
0185: return jjMoveStringLiteralDfa1_0(0x3000800L);
0186: case 102:
0187: return jjMoveStringLiteralDfa1_0(0x4000000L);
0188: case 103:
0189: return jjMoveStringLiteralDfa1_0(0x1000L);
0190: case 104:
0191: return jjMoveStringLiteralDfa1_0(0x2000L);
0192: case 105:
0193: return jjMoveStringLiteralDfa1_0(0x18000000L);
0194: case 108:
0195: return jjMoveStringLiteralDfa1_0(0x20000000L);
0196: case 109:
0197: return jjMoveStringLiteralDfa1_0(0xc000L);
0198: case 110:
0199: return jjMoveStringLiteralDfa1_0(0x8000000000L);
0200: case 115:
0201: return jjMoveStringLiteralDfa1_0(0x40080000L);
0202: case 116:
0203: return jjMoveStringLiteralDfa1_0(0x80000000L);
0204: case 123:
0205: return jjStopAtPos(0, 47);
0206: case 124:
0207: jjmatchedKind = 69;
0208: return jjMoveStringLiteralDfa1_0(0x4000000000000000L);
0209: case 125:
0210: return jjStopAtPos(0, 48);
0211: case 126:
0212: return jjStopAtPos(0, 57);
0213: default:
0214: return jjMoveNfa_0(0, 0);
0215: }
0216: }
0217:
0218: private final int jjMoveStringLiteralDfa1_0(long active0) {
0219: try {
0220: curChar = input_stream.readChar();
0221: } catch (java.io.IOException e) {
0222: jjStopStringLiteralDfa_0(0, active0, 0L);
0223: return 1;
0224: }
0225: switch (curChar) {
0226: case 38:
0227: if ((active0 & 0x8000000000000000L) != 0L)
0228: return jjStopAtPos(1, 63);
0229: break;
0230: case 61:
0231: if ((active0 & 0x400000000000000L) != 0L)
0232: return jjStopAtPos(1, 58);
0233: else if ((active0 & 0x800000000000000L) != 0L)
0234: return jjStopAtPos(1, 59);
0235: else if ((active0 & 0x1000000000000000L) != 0L)
0236: return jjStopAtPos(1, 60);
0237: else if ((active0 & 0x2000000000000000L) != 0L)
0238: return jjStopAtPos(1, 61);
0239: break;
0240: case 97:
0241: return jjMoveStringLiteralDfa2_0(active0, 0x6000L);
0242: case 98:
0243: return jjMoveStringLiteralDfa2_0(active0, 0x200L);
0244: case 101:
0245: return jjMoveStringLiteralDfa2_0(active0, 0x1000000L);
0246: case 104:
0247: return jjMoveStringLiteralDfa2_0(active0, 0xc0800000L);
0248: case 105:
0249: return jjMoveStringLiteralDfa2_0(active0, 0x8800L);
0250: case 108:
0251: return jjMoveStringLiteralDfa2_0(active0, 0x4000000L);
0252: case 109:
0253: return jjMoveStringLiteralDfa2_0(active0, 0x8000000L);
0254: case 110:
0255: return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
0256: case 111:
0257: return jjMoveStringLiteralDfa2_0(active0, 0x22260000L);
0258: case 114:
0259: return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
0260: case 115:
0261: if ((active0 & 0x100000L) != 0L) {
0262: jjmatchedKind = 20;
0263: jjmatchedPos = 1;
0264: }
0265: return jjMoveStringLiteralDfa2_0(active0, 0x400L);
0266: case 117:
0267: return jjMoveStringLiteralDfa2_0(active0, 0x8000080000L);
0268: case 118:
0269: return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
0270: case 121:
0271: return jjMoveStringLiteralDfa2_0(active0, 0x400000L);
0272: case 124:
0273: if ((active0 & 0x4000000000000000L) != 0L)
0274: return jjStopAtPos(1, 62);
0275: break;
0276: default:
0277: break;
0278: }
0279: return jjStartNfa_0(0, active0, 0L);
0280: }
0281:
0282: private final int jjMoveStringLiteralDfa2_0(long old0, long active0) {
0283: if (((active0 &= old0)) == 0L)
0284: return jjStartNfa_0(0, old0, 0L);
0285: try {
0286: curChar = input_stream.readChar();
0287: } catch (java.io.IOException e) {
0288: jjStopStringLiteralDfa_0(1, active0, 0L);
0289: return 2;
0290: }
0291: switch (curChar) {
0292: case 97:
0293: return jjMoveStringLiteralDfa3_0(active0, 0x800000L);
0294: case 99:
0295: return jjMoveStringLiteralDfa3_0(active0, 0x400L);
0296: case 103:
0297: if ((active0 & 0x10000L) != 0L)
0298: return jjStartNfaWithStates_0(2, 16, 36);
0299: break;
0300: case 105:
0301: return jjMoveStringLiteralDfa3_0(active0, 0x80000000L);
0302: case 108:
0303: return jjMoveStringLiteralDfa3_0(active0, 0x8000000000L);
0304: case 109:
0305: if ((active0 & 0x80000L) != 0L)
0306: return jjStartNfaWithStates_0(2, 19, 36);
0307: break;
0308: case 110:
0309: if ((active0 & 0x8000L) != 0L)
0310: return jjStartNfaWithStates_0(2, 15, 36);
0311: return jjMoveStringLiteralDfa3_0(active0, 0x20000000L);
0312: case 111:
0313: return jjMoveStringLiteralDfa3_0(active0, 0x44201000L);
0314: case 112:
0315: return jjMoveStringLiteralDfa3_0(active0, 0x8000000L);
0316: case 115:
0317: return jjMoveStringLiteralDfa3_0(active0, 0x1000a00L);
0318: case 116:
0319: if ((active0 & 0x10000000L) != 0L)
0320: return jjStartNfaWithStates_0(2, 28, 36);
0321: return jjMoveStringLiteralDfa3_0(active0, 0x400000L);
0322: case 117:
0323: return jjMoveStringLiteralDfa3_0(active0, 0x2060000L);
0324: case 118:
0325: return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
0326: case 120:
0327: if ((active0 & 0x4000L) != 0L)
0328: return jjStartNfaWithStates_0(2, 14, 36);
0329: break;
0330: default:
0331: break;
0332: }
0333: return jjStartNfa_0(1, active0, 0L);
0334: }
0335:
0336: private final int jjMoveStringLiteralDfa3_0(long old0, long active0) {
0337: if (((active0 &= old0)) == 0L)
0338: return jjStartNfa_0(1, old0, 0L);
0339: try {
0340: curChar = input_stream.readChar();
0341: } catch (java.io.IOException e) {
0342: jjStopStringLiteralDfa_0(2, active0, 0L);
0343: return 3;
0344: }
0345: switch (curChar) {
0346: case 97:
0347: return jjMoveStringLiteralDfa4_0(active0, 0x4000000L);
0348: case 98:
0349: return jjMoveStringLiteralDfa4_0(active0, 0x2000000L);
0350: case 99:
0351: return jjMoveStringLiteralDfa4_0(active0, 0x1000000L);
0352: case 101:
0353: if ((active0 & 0x400000L) != 0L)
0354: return jjStartNfaWithStates_0(3, 22, 36);
0355: return jjMoveStringLiteralDfa4_0(active0, 0x400L);
0356: case 103:
0357: if ((active0 & 0x20000000L) != 0L)
0358: return jjStartNfaWithStates_0(3, 29, 36);
0359: break;
0360: case 105:
0361: return jjMoveStringLiteralDfa4_0(active0, 0x2000L);
0362: case 108:
0363: if ((active0 & 0x8000000000L) != 0L)
0364: return jjStartNfaWithStates_0(3, 39, 36);
0365: return jjMoveStringLiteralDfa4_0(active0, 0x200000L);
0366: case 110:
0367: return jjMoveStringLiteralDfa4_0(active0, 0x60000L);
0368: case 111:
0369: return jjMoveStringLiteralDfa4_0(active0, 0x8000000L);
0370: case 114:
0371: if ((active0 & 0x800000L) != 0L)
0372: return jjStartNfaWithStates_0(3, 23, 36);
0373: return jjMoveStringLiteralDfa4_0(active0, 0x40000000L);
0374: case 115:
0375: if ((active0 & 0x80000000L) != 0L)
0376: return jjStartNfaWithStates_0(3, 31, 36);
0377: break;
0378: case 116:
0379: return jjMoveStringLiteralDfa4_0(active0, 0xa00L);
0380: case 117:
0381: return jjMoveStringLiteralDfa4_0(active0, 0x1000L);
0382: default:
0383: break;
0384: }
0385: return jjStartNfa_0(2, active0, 0L);
0386: }
0387:
0388: private final int jjMoveStringLiteralDfa4_0(long old0, long active0) {
0389: if (((active0 &= old0)) == 0L)
0390: return jjStartNfa_0(2, old0, 0L);
0391: try {
0392: curChar = input_stream.readChar();
0393: } catch (java.io.IOException e) {
0394: jjStopStringLiteralDfa_0(3, active0, 0L);
0395: return 4;
0396: }
0397: switch (curChar) {
0398: case 101:
0399: return jjMoveStringLiteralDfa5_0(active0, 0x1200000L);
0400: case 105:
0401: return jjMoveStringLiteralDfa5_0(active0, 0x800L);
0402: case 108:
0403: return jjMoveStringLiteralDfa5_0(active0, 0x2000000L);
0404: case 110:
0405: return jjMoveStringLiteralDfa5_0(active0, 0x2400L);
0406: case 112:
0407: if ((active0 & 0x1000L) != 0L)
0408: return jjStartNfaWithStates_0(4, 12, 36);
0409: break;
0410: case 114:
0411: return jjMoveStringLiteralDfa5_0(active0, 0x8000200L);
0412: case 116:
0413: if ((active0 & 0x40000L) != 0L) {
0414: jjmatchedKind = 18;
0415: jjmatchedPos = 4;
0416: } else if ((active0 & 0x4000000L) != 0L)
0417: return jjStartNfaWithStates_0(4, 26, 36);
0418: else if ((active0 & 0x40000000L) != 0L)
0419: return jjStartNfaWithStates_0(4, 30, 36);
0420: return jjMoveStringLiteralDfa5_0(active0, 0x20000L);
0421: default:
0422: break;
0423: }
0424: return jjStartNfa_0(3, active0, 0L);
0425: }
0426:
0427: private final int jjMoveStringLiteralDfa5_0(long old0, long active0) {
0428: if (((active0 &= old0)) == 0L)
0429: return jjStartNfa_0(3, old0, 0L);
0430: try {
0431: curChar = input_stream.readChar();
0432: } catch (java.io.IOException e) {
0433: jjStopStringLiteralDfa_0(4, active0, 0L);
0434: return 5;
0435: }
0436: switch (curChar) {
0437: case 40:
0438: return jjMoveStringLiteralDfa6_0(active0, 0x20000L);
0439: case 97:
0440: return jjMoveStringLiteralDfa6_0(active0, 0x200200L);
0441: case 100:
0442: return jjMoveStringLiteralDfa6_0(active0, 0x400L);
0443: case 101:
0444: if ((active0 & 0x2000000L) != 0L)
0445: return jjStartNfaWithStates_0(5, 25, 36);
0446: break;
0447: case 103:
0448: if ((active0 & 0x2000L) != 0L)
0449: return jjStartNfaWithStates_0(5, 13, 36);
0450: break;
0451: case 110:
0452: return jjMoveStringLiteralDfa6_0(active0, 0x1000800L);
0453: case 116:
0454: if ((active0 & 0x8000000L) != 0L)
0455: return jjStartNfaWithStates_0(5, 27, 36);
0456: break;
0457: default:
0458: break;
0459: }
0460: return jjStartNfa_0(4, active0, 0L);
0461: }
0462:
0463: private final int jjMoveStringLiteralDfa6_0(long old0, long active0) {
0464: if (((active0 &= old0)) == 0L)
0465: return jjStartNfa_0(4, old0, 0L);
0466: try {
0467: curChar = input_stream.readChar();
0468: } catch (java.io.IOException e) {
0469: jjStopStringLiteralDfa_0(5, active0, 0L);
0470: return 6;
0471: }
0472: switch (curChar) {
0473: case 42:
0474: return jjMoveStringLiteralDfa7_0(active0, 0x20000L);
0475: case 99:
0476: return jjMoveStringLiteralDfa7_0(active0, 0xa00L);
0477: case 100:
0478: return jjMoveStringLiteralDfa7_0(active0, 0x1000000L);
0479: case 105:
0480: return jjMoveStringLiteralDfa7_0(active0, 0x400L);
0481: case 110:
0482: if ((active0 & 0x200000L) != 0L)
0483: return jjStartNfaWithStates_0(6, 21, 36);
0484: break;
0485: default:
0486: break;
0487: }
0488: return jjStartNfa_0(5, active0, 0L);
0489: }
0490:
0491: private final int jjMoveStringLiteralDfa7_0(long old0, long active0) {
0492: if (((active0 &= old0)) == 0L)
0493: return jjStartNfa_0(5, old0, 0L);
0494: try {
0495: curChar = input_stream.readChar();
0496: } catch (java.io.IOException e) {
0497: jjStopStringLiteralDfa_0(6, active0, 0L);
0498: return 7;
0499: }
0500: switch (curChar) {
0501: case 41:
0502: if ((active0 & 0x20000L) != 0L)
0503: return jjStopAtPos(7, 17);
0504: break;
0505: case 105:
0506: return jjMoveStringLiteralDfa8_0(active0, 0x1000000L);
0507: case 110:
0508: return jjMoveStringLiteralDfa8_0(active0, 0x400L);
0509: case 116:
0510: if ((active0 & 0x200L) != 0L)
0511: return jjStartNfaWithStates_0(7, 9, 36);
0512: else if ((active0 & 0x800L) != 0L)
0513: return jjStartNfaWithStates_0(7, 11, 36);
0514: break;
0515: default:
0516: break;
0517: }
0518: return jjStartNfa_0(6, active0, 0L);
0519: }
0520:
0521: private final int jjMoveStringLiteralDfa8_0(long old0, long active0) {
0522: if (((active0 &= old0)) == 0L)
0523: return jjStartNfa_0(6, old0, 0L);
0524: try {
0525: curChar = input_stream.readChar();
0526: } catch (java.io.IOException e) {
0527: jjStopStringLiteralDfa_0(7, active0, 0L);
0528: return 8;
0529: }
0530: switch (curChar) {
0531: case 103:
0532: if ((active0 & 0x400L) != 0L)
0533: return jjStartNfaWithStates_0(8, 10, 36);
0534: break;
0535: case 110:
0536: return jjMoveStringLiteralDfa9_0(active0, 0x1000000L);
0537: default:
0538: break;
0539: }
0540: return jjStartNfa_0(7, active0, 0L);
0541: }
0542:
0543: private final int jjMoveStringLiteralDfa9_0(long old0, long active0) {
0544: if (((active0 &= old0)) == 0L)
0545: return jjStartNfa_0(7, old0, 0L);
0546: try {
0547: curChar = input_stream.readChar();
0548: } catch (java.io.IOException e) {
0549: jjStopStringLiteralDfa_0(8, active0, 0L);
0550: return 9;
0551: }
0552: switch (curChar) {
0553: case 103:
0554: if ((active0 & 0x1000000L) != 0L)
0555: return jjStartNfaWithStates_0(9, 24, 36);
0556: break;
0557: default:
0558: break;
0559: }
0560: return jjStartNfa_0(8, active0, 0L);
0561: }
0562:
0563: private final void jjCheckNAdd(int state) {
0564: if (jjrounds[state] != jjround) {
0565: jjstateSet[jjnewStateCnt++] = state;
0566: jjrounds[state] = jjround;
0567: }
0568: }
0569:
0570: private final void jjAddStates(int start, int end) {
0571: do {
0572: jjstateSet[jjnewStateCnt++] = jjnextStates[start];
0573: } while (start++ != end);
0574: }
0575:
0576: private final void jjCheckNAddTwoStates(int state1, int state2) {
0577: jjCheckNAdd(state1);
0578: jjCheckNAdd(state2);
0579: }
0580:
0581: private final void jjCheckNAddStates(int start, int end) {
0582: do {
0583: jjCheckNAdd(jjnextStates[start]);
0584: } while (start++ != end);
0585: }
0586:
0587: private final void jjCheckNAddStates(int start) {
0588: jjCheckNAdd(jjnextStates[start]);
0589: jjCheckNAdd(jjnextStates[start + 1]);
0590: }
0591:
0592: static final long[] jjbitVec0 = { 0xfffffffffffffffeL,
0593: 0xffffffffffffffffL, 0xffffffffffffffffL,
0594: 0xffffffffffffffffL };
0595: static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL,
0596: 0xffffffffffffffffL };
0597:
0598: private final int jjMoveNfa_0(int startState, int curPos) {
0599: int[] nextStates;
0600: int startsAt = 0;
0601: jjnewStateCnt = 76;
0602: int i = 1;
0603: jjstateSet[0] = startState;
0604: int j, kind = 0x7fffffff;
0605: for (;;) {
0606: if (++jjround == 0x7fffffff)
0607: ReInitRounds();
0608: if (curChar < 64) {
0609: long l = 1L << curChar;
0610: MatchLoop: do {
0611: switch (jjstateSet[--i]) {
0612: case 53:
0613: if (curChar == 42)
0614: jjCheckNAddTwoStates(66, 67);
0615: else if (curChar == 47)
0616: jjCheckNAddStates(0, 2);
0617: if (curChar == 42)
0618: jjstateSet[jjnewStateCnt++] = 58;
0619: break;
0620: case 24:
0621: case 36:
0622: if ((0x3ff000000000000L & l) == 0L)
0623: break;
0624: if (kind > 42)
0625: kind = 42;
0626: jjCheckNAdd(36);
0627: break;
0628: case 20:
0629: if ((0x3ff000000000000L & l) == 0L)
0630: break;
0631: if (kind > 42)
0632: kind = 42;
0633: jjCheckNAdd(36);
0634: break;
0635: case 0:
0636: if ((0x3ff000000000000L & l) != 0L)
0637: jjCheckNAddStates(3, 9);
0638: else if (curChar == 47)
0639: jjAddStates(10, 12);
0640: else if (curChar == 34)
0641: jjCheckNAddStates(13, 15);
0642: else if (curChar == 39)
0643: jjCheckNAddStates(16, 18);
0644: else if (curChar == 46)
0645: jjCheckNAdd(4);
0646: if ((0x3fe000000000000L & l) != 0L) {
0647: if (kind > 32)
0648: kind = 32;
0649: jjCheckNAddTwoStates(1, 2);
0650: } else if (curChar == 48) {
0651: if (kind > 32)
0652: kind = 32;
0653: jjCheckNAddStates(19, 22);
0654: }
0655: break;
0656: case 1:
0657: if ((0x3ff000000000000L & l) == 0L)
0658: break;
0659: if (kind > 32)
0660: kind = 32;
0661: jjCheckNAddTwoStates(1, 2);
0662: break;
0663: case 3:
0664: if (curChar == 46)
0665: jjCheckNAdd(4);
0666: break;
0667: case 4:
0668: if ((0x3ff000000000000L & l) == 0L)
0669: break;
0670: if (kind > 36)
0671: kind = 36;
0672: jjCheckNAddStates(23, 25);
0673: break;
0674: case 6:
0675: if ((0x280000000000L & l) != 0L)
0676: jjCheckNAdd(7);
0677: break;
0678: case 7:
0679: if ((0x3ff000000000000L & l) == 0L)
0680: break;
0681: if (kind > 36)
0682: kind = 36;
0683: jjCheckNAddTwoStates(7, 8);
0684: break;
0685: case 9:
0686: if (curChar == 39)
0687: jjCheckNAddStates(16, 18);
0688: break;
0689: case 10:
0690: if ((0xffffff7fffffdbffL & l) != 0L)
0691: jjCheckNAddStates(16, 18);
0692: break;
0693: case 12:
0694: if ((0x8400000000L & l) != 0L)
0695: jjCheckNAddStates(16, 18);
0696: break;
0697: case 13:
0698: if (curChar == 39 && kind > 38)
0699: kind = 38;
0700: break;
0701: case 14:
0702: if ((0xff000000000000L & l) != 0L)
0703: jjCheckNAddStates(26, 29);
0704: break;
0705: case 15:
0706: if ((0xff000000000000L & l) != 0L)
0707: jjCheckNAddStates(16, 18);
0708: break;
0709: case 16:
0710: if ((0xf000000000000L & l) != 0L)
0711: jjstateSet[jjnewStateCnt++] = 17;
0712: break;
0713: case 17:
0714: if ((0xff000000000000L & l) != 0L)
0715: jjCheckNAdd(15);
0716: break;
0717: case 26:
0718: if (curChar == 34)
0719: jjCheckNAddStates(13, 15);
0720: break;
0721: case 27:
0722: if ((0xfffffffbffffdbffL & l) != 0L)
0723: jjCheckNAddStates(13, 15);
0724: break;
0725: case 29:
0726: if ((0x8400000000L & l) != 0L)
0727: jjCheckNAddStates(13, 15);
0728: break;
0729: case 30:
0730: if (curChar == 34 && kind > 41)
0731: kind = 41;
0732: break;
0733: case 31:
0734: if ((0xff000000000000L & l) != 0L)
0735: jjCheckNAddStates(30, 33);
0736: break;
0737: case 32:
0738: if ((0xff000000000000L & l) != 0L)
0739: jjCheckNAddStates(13, 15);
0740: break;
0741: case 33:
0742: if ((0xf000000000000L & l) != 0L)
0743: jjstateSet[jjnewStateCnt++] = 34;
0744: break;
0745: case 34:
0746: if ((0xff000000000000L & l) != 0L)
0747: jjCheckNAdd(32);
0748: break;
0749: case 37:
0750: if ((0x3ff000000000000L & l) != 0L)
0751: jjCheckNAddStates(3, 9);
0752: break;
0753: case 38:
0754: if ((0x3ff000000000000L & l) != 0L)
0755: jjCheckNAddTwoStates(38, 39);
0756: break;
0757: case 39:
0758: if (curChar != 46)
0759: break;
0760: if (kind > 36)
0761: kind = 36;
0762: jjCheckNAddStates(34, 36);
0763: break;
0764: case 40:
0765: if ((0x3ff000000000000L & l) == 0L)
0766: break;
0767: if (kind > 36)
0768: kind = 36;
0769: jjCheckNAddStates(34, 36);
0770: break;
0771: case 42:
0772: if ((0x280000000000L & l) != 0L)
0773: jjCheckNAdd(43);
0774: break;
0775: case 43:
0776: if ((0x3ff000000000000L & l) == 0L)
0777: break;
0778: if (kind > 36)
0779: kind = 36;
0780: jjCheckNAddTwoStates(43, 8);
0781: break;
0782: case 44:
0783: if ((0x3ff000000000000L & l) != 0L)
0784: jjCheckNAddTwoStates(44, 45);
0785: break;
0786: case 46:
0787: if ((0x280000000000L & l) != 0L)
0788: jjCheckNAdd(47);
0789: break;
0790: case 47:
0791: if ((0x3ff000000000000L & l) == 0L)
0792: break;
0793: if (kind > 36)
0794: kind = 36;
0795: jjCheckNAddTwoStates(47, 8);
0796: break;
0797: case 48:
0798: if ((0x3ff000000000000L & l) != 0L)
0799: jjCheckNAddStates(37, 39);
0800: break;
0801: case 50:
0802: if ((0x280000000000L & l) != 0L)
0803: jjCheckNAdd(51);
0804: break;
0805: case 51:
0806: if ((0x3ff000000000000L & l) != 0L)
0807: jjCheckNAddTwoStates(51, 8);
0808: break;
0809: case 52:
0810: if (curChar == 47)
0811: jjAddStates(10, 12);
0812: break;
0813: case 54:
0814: if ((0xffffffffffffdbffL & l) != 0L)
0815: jjCheckNAddStates(0, 2);
0816: break;
0817: case 55:
0818: if ((0x2400L & l) != 0L && kind > 6)
0819: kind = 6;
0820: break;
0821: case 56:
0822: if (curChar == 10 && kind > 6)
0823: kind = 6;
0824: break;
0825: case 57:
0826: if (curChar == 13)
0827: jjstateSet[jjnewStateCnt++] = 56;
0828: break;
0829: case 58:
0830: if (curChar == 42)
0831: jjCheckNAddTwoStates(59, 60);
0832: break;
0833: case 59:
0834: if ((0xfffffbffffffffffL & l) != 0L)
0835: jjCheckNAddTwoStates(59, 60);
0836: break;
0837: case 60:
0838: if (curChar == 42)
0839: jjCheckNAddStates(40, 42);
0840: break;
0841: case 61:
0842: if ((0xffff7bffffffffffL & l) != 0L)
0843: jjCheckNAddTwoStates(62, 60);
0844: break;
0845: case 62:
0846: if ((0xfffffbffffffffffL & l) != 0L)
0847: jjCheckNAddTwoStates(62, 60);
0848: break;
0849: case 63:
0850: if (curChar == 47 && kind > 7)
0851: kind = 7;
0852: break;
0853: case 64:
0854: if (curChar == 42)
0855: jjstateSet[jjnewStateCnt++] = 58;
0856: break;
0857: case 65:
0858: if (curChar == 42)
0859: jjCheckNAddTwoStates(66, 67);
0860: break;
0861: case 66:
0862: if ((0xfffffbffffffffffL & l) != 0L)
0863: jjCheckNAddTwoStates(66, 67);
0864: break;
0865: case 67:
0866: if (curChar == 42)
0867: jjCheckNAddStates(43, 45);
0868: break;
0869: case 68:
0870: if ((0xffff7bffffffffffL & l) != 0L)
0871: jjCheckNAddTwoStates(69, 67);
0872: break;
0873: case 69:
0874: if ((0xfffffbffffffffffL & l) != 0L)
0875: jjCheckNAddTwoStates(69, 67);
0876: break;
0877: case 70:
0878: if (curChar == 47 && kind > 8)
0879: kind = 8;
0880: break;
0881: case 71:
0882: if (curChar != 48)
0883: break;
0884: if (kind > 32)
0885: kind = 32;
0886: jjCheckNAddStates(19, 22);
0887: break;
0888: case 73:
0889: if ((0x3ff000000000000L & l) == 0L)
0890: break;
0891: if (kind > 32)
0892: kind = 32;
0893: jjCheckNAddTwoStates(73, 2);
0894: break;
0895: case 74:
0896: if ((0xff000000000000L & l) == 0L)
0897: break;
0898: if (kind > 32)
0899: kind = 32;
0900: jjCheckNAddTwoStates(74, 2);
0901: break;
0902: case 75:
0903: if ((0xff000000000000L & l) == 0L)
0904: break;
0905: if (kind > 35)
0906: kind = 35;
0907: jjCheckNAdd(75);
0908: break;
0909: default:
0910: break;
0911: }
0912: } while (i != startsAt);
0913: } else if (curChar < 128) {
0914: long l = 1L << (curChar & 077);
0915: MatchLoop: do {
0916: switch (jjstateSet[--i]) {
0917: case 24:
0918: if ((0x7fffffe87fffffeL & l) != 0L) {
0919: if (kind > 42)
0920: kind = 42;
0921: jjCheckNAdd(36);
0922: }
0923: if (curChar == 97)
0924: jjstateSet[jjnewStateCnt++] = 23;
0925: break;
0926: case 20:
0927: if ((0x7fffffe87fffffeL & l) != 0L) {
0928: if (kind > 42)
0929: kind = 42;
0930: jjCheckNAdd(36);
0931: }
0932: if (curChar == 114)
0933: jjstateSet[jjnewStateCnt++] = 19;
0934: break;
0935: case 0:
0936: if ((0x7fffffe87fffffeL & l) != 0L) {
0937: if (kind > 42)
0938: kind = 42;
0939: jjCheckNAdd(36);
0940: }
0941: if (curChar == 102)
0942: jjstateSet[jjnewStateCnt++] = 24;
0943: else if (curChar == 116)
0944: jjstateSet[jjnewStateCnt++] = 20;
0945: break;
0946: case 2:
0947: if ((0x100000001000L & l) != 0L && kind > 32)
0948: kind = 32;
0949: break;
0950: case 5:
0951: if ((0x2000000020L & l) != 0L)
0952: jjAddStates(46, 47);
0953: break;
0954: case 8:
0955: if ((0x5000000050L & l) != 0L && kind > 36)
0956: kind = 36;
0957: break;
0958: case 10:
0959: if ((0xffffffffefffffffL & l) != 0L)
0960: jjCheckNAddStates(16, 18);
0961: break;
0962: case 11:
0963: if (curChar == 92)
0964: jjAddStates(48, 50);
0965: break;
0966: case 12:
0967: if ((0x14404410000000L & l) != 0L)
0968: jjCheckNAddStates(16, 18);
0969: break;
0970: case 18:
0971: if (curChar == 101 && kind > 40)
0972: kind = 40;
0973: break;
0974: case 19:
0975: if (curChar == 117)
0976: jjCheckNAdd(18);
0977: break;
0978: case 21:
0979: if (curChar == 116)
0980: jjstateSet[jjnewStateCnt++] = 20;
0981: break;
0982: case 22:
0983: if (curChar == 115)
0984: jjCheckNAdd(18);
0985: break;
0986: case 23:
0987: if (curChar == 108)
0988: jjstateSet[jjnewStateCnt++] = 22;
0989: break;
0990: case 25:
0991: if (curChar == 102)
0992: jjstateSet[jjnewStateCnt++] = 24;
0993: break;
0994: case 27:
0995: if ((0xffffffffefffffffL & l) != 0L)
0996: jjCheckNAddStates(13, 15);
0997: break;
0998: case 28:
0999: if (curChar == 92)
1000: jjAddStates(51, 53);
1001: break;
1002: case 29:
1003: if ((0x14404410000000L & l) != 0L)
1004: jjCheckNAddStates(13, 15);
1005: break;
1006: case 35:
1007: if ((0x7fffffe87fffffeL & l) == 0L)
1008: break;
1009: if (kind > 42)
1010: kind = 42;
1011: jjCheckNAdd(36);
1012: break;
1013: case 36:
1014: if ((0x7fffffe87fffffeL & l) == 0L)
1015: break;
1016: if (kind > 42)
1017: kind = 42;
1018: jjCheckNAdd(36);
1019: break;
1020: case 41:
1021: if ((0x2000000020L & l) != 0L)
1022: jjAddStates(54, 55);
1023: break;
1024: case 45:
1025: if ((0x2000000020L & l) != 0L)
1026: jjAddStates(56, 57);
1027: break;
1028: case 49:
1029: if ((0x2000000020L & l) != 0L)
1030: jjAddStates(58, 59);
1031: break;
1032: case 54:
1033: jjAddStates(0, 2);
1034: break;
1035: case 59:
1036: jjCheckNAddTwoStates(59, 60);
1037: break;
1038: case 61:
1039: case 62:
1040: jjCheckNAddTwoStates(62, 60);
1041: break;
1042: case 66:
1043: jjCheckNAddTwoStates(66, 67);
1044: break;
1045: case 68:
1046: case 69:
1047: jjCheckNAddTwoStates(69, 67);
1048: break;
1049: case 72:
1050: if ((0x100000001000000L & l) != 0L)
1051: jjCheckNAdd(73);
1052: break;
1053: case 73:
1054: if ((0x7e0000007eL & l) == 0L)
1055: break;
1056: if (kind > 32)
1057: kind = 32;
1058: jjCheckNAddTwoStates(73, 2);
1059: break;
1060: default:
1061: break;
1062: }
1063: } while (i != startsAt);
1064: } else {
1065: int hiByte = (int) (curChar >> 8);
1066: int i1 = hiByte >> 6;
1067: long l1 = 1L << (hiByte & 077);
1068: int i2 = (curChar & 0xff) >> 6;
1069: long l2 = 1L << (curChar & 077);
1070: MatchLoop: do {
1071: switch (jjstateSet[--i]) {
1072: case 10:
1073: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1074: jjAddStates(16, 18);
1075: break;
1076: case 27:
1077: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1078: jjAddStates(13, 15);
1079: break;
1080: case 54:
1081: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1082: jjAddStates(0, 2);
1083: break;
1084: case 59:
1085: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1086: jjCheckNAddTwoStates(59, 60);
1087: break;
1088: case 61:
1089: case 62:
1090: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1091: jjCheckNAddTwoStates(62, 60);
1092: break;
1093: case 66:
1094: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1095: jjCheckNAddTwoStates(66, 67);
1096: break;
1097: case 68:
1098: case 69:
1099: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1100: jjCheckNAddTwoStates(69, 67);
1101: break;
1102: default:
1103: break;
1104: }
1105: } while (i != startsAt);
1106: }
1107: if (kind != 0x7fffffff) {
1108: jjmatchedKind = kind;
1109: jjmatchedPos = curPos;
1110: kind = 0x7fffffff;
1111: }
1112: ++curPos;
1113: if ((i = jjnewStateCnt) == (startsAt = 76 - (jjnewStateCnt = startsAt)))
1114: return curPos;
1115: try {
1116: curChar = input_stream.readChar();
1117: } catch (java.io.IOException e) {
1118: return curPos;
1119: }
1120: }
1121: }
1122:
1123: static final int[] jjnextStates = { 54, 55, 57, 38, 39, 44, 45, 48,
1124: 49, 8, 53, 64, 65, 27, 28, 30, 10, 11, 13, 72, 74, 2, 75,
1125: 4, 5, 8, 10, 11, 15, 13, 27, 28, 32, 30, 40, 41, 8, 48, 49,
1126: 8, 60, 61, 63, 67, 68, 70, 6, 7, 12, 14, 16, 29, 31, 33,
1127: 42, 43, 46, 47, 50, 51, };
1128:
1129: private static final boolean jjCanMove_0(int hiByte, int i1,
1130: int i2, long l1, long l2) {
1131: switch (hiByte) {
1132: case 0:
1133: return ((jjbitVec2[i2] & l2) != 0L);
1134: default:
1135: if ((jjbitVec0[i1] & l1) != 0L)
1136: return true;
1137: return false;
1138: }
1139: }
1140:
1141: public static final String[] jjstrLiteralImages = { "", null, null,
1142: null, null, null, null, null, null,
1143: "\141\142\163\164\162\141\143\164",
1144: "\141\163\143\145\156\144\151\156\147",
1145: "\144\151\163\164\151\156\143\164", "\147\162\157\165\160",
1146: "\150\141\166\151\156\147", "\155\141\170", "\155\151\156",
1147: "\141\166\147", "\143\157\165\156\164\50\52\51",
1148: "\143\157\165\156\164", "\163\165\155", "\141\163",
1149: "\142\157\157\154\145\141\156", "\142\171\164\145",
1150: "\143\150\141\162",
1151: "\144\145\163\143\145\156\144\151\156\147",
1152: "\144\157\165\142\154\145", "\146\154\157\141\164",
1153: "\151\155\160\157\162\164", "\151\156\164",
1154: "\154\157\156\147", "\163\150\157\162\164",
1155: "\164\150\151\163", null, null, null, null, null, null,
1156: null, "\156\165\154\154", null, null, null, null, null,
1157: "\50", "\51", "\173", "\175", "\133", "\135", "\73", "\54",
1158: "\56", "\76", "\74", "\41", "\176", "\75\75", "\74\75",
1159: "\76\75", "\41\75", "\174\174", "\46\46", "\53", "\55",
1160: "\52", "\57", "\46", "\174", };
1161: public static final String[] lexStateNames = { "DEFAULT", };
1162: static final long[] jjtoToken = { 0xffffe7d9fffffe01L, 0x3fL, };
1163: static final long[] jjtoSkip = { 0x1feL, 0x0L, };
1164: static final long[] jjtoSpecial = { 0x1c0L, 0x0L, };
1165: protected JavaCharStream input_stream;
1166: private final int[] jjrounds = new int[76];
1167: private final int[] jjstateSet = new int[152];
1168: protected char curChar;
1169:
1170: public JDOQLParserTokenManager(JavaCharStream stream) {
1171: if (JavaCharStream.staticFlag)
1172: throw new Error(
1173: "ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1174: input_stream = stream;
1175: }
1176:
1177: public JDOQLParserTokenManager(JavaCharStream stream, int lexState) {
1178: this (stream);
1179: SwitchTo(lexState);
1180: }
1181:
1182: public void ReInit(JavaCharStream stream) {
1183: jjmatchedPos = jjnewStateCnt = 0;
1184: curLexState = defaultLexState;
1185: input_stream = stream;
1186: ReInitRounds();
1187: }
1188:
1189: private final void ReInitRounds() {
1190: int i;
1191: jjround = 0x80000001;
1192: for (i = 76; i-- > 0;)
1193: jjrounds[i] = 0x80000000;
1194: }
1195:
1196: public void ReInit(JavaCharStream stream, int lexState) {
1197: ReInit(stream);
1198: SwitchTo(lexState);
1199: }
1200:
1201: public void SwitchTo(int lexState) {
1202: if (lexState >= 1 || lexState < 0)
1203: throw new TokenMgrError(
1204: "Error: Ignoring invalid lexical state : "
1205: + lexState + ". State unchanged.",
1206: TokenMgrError.INVALID_LEXICAL_STATE);
1207: else
1208: curLexState = lexState;
1209: }
1210:
1211: protected Token jjFillToken() {
1212: Token t = Token.newToken(jjmatchedKind);
1213: t.kind = jjmatchedKind;
1214: String im = jjstrLiteralImages[jjmatchedKind];
1215: t.image = (im == null) ? input_stream.GetImage() : im;
1216: t.beginLine = input_stream.getBeginLine();
1217: t.beginColumn = input_stream.getBeginColumn();
1218: t.endLine = input_stream.getEndLine();
1219: t.endColumn = input_stream.getEndColumn();
1220: return t;
1221: }
1222:
1223: int curLexState = 0;
1224: int defaultLexState = 0;
1225: int jjnewStateCnt;
1226: int jjround;
1227: int jjmatchedPos;
1228: int jjmatchedKind;
1229:
1230: public Token getNextToken() {
1231: int kind;
1232: Token specialToken = null;
1233: Token matchedToken;
1234: int curPos = 0;
1235:
1236: EOFLoop: for (;;) {
1237: try {
1238: curChar = input_stream.BeginToken();
1239: } catch (java.io.IOException e) {
1240: jjmatchedKind = 0;
1241: matchedToken = jjFillToken();
1242: matchedToken.specialToken = specialToken;
1243: return matchedToken;
1244: }
1245:
1246: try {
1247: input_stream.backup(0);
1248: while (curChar <= 32
1249: && (0x100003600L & (1L << curChar)) != 0L)
1250: curChar = input_stream.BeginToken();
1251: } catch (java.io.IOException e1) {
1252: continue EOFLoop;
1253: }
1254: jjmatchedKind = 0x7fffffff;
1255: jjmatchedPos = 0;
1256: curPos = jjMoveStringLiteralDfa0_0();
1257: if (jjmatchedKind != 0x7fffffff) {
1258: if (jjmatchedPos + 1 < curPos)
1259: input_stream.backup(curPos - jjmatchedPos - 1);
1260: if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
1261: matchedToken = jjFillToken();
1262: matchedToken.specialToken = specialToken;
1263: return matchedToken;
1264: } else {
1265: if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
1266: matchedToken = jjFillToken();
1267: if (specialToken == null)
1268: specialToken = matchedToken;
1269: else {
1270: matchedToken.specialToken = specialToken;
1271: specialToken = (specialToken.next = matchedToken);
1272: }
1273: }
1274: continue EOFLoop;
1275: }
1276: }
1277: int error_line = input_stream.getEndLine();
1278: int error_column = input_stream.getEndColumn();
1279: String error_after = null;
1280: boolean EOFSeen = false;
1281: try {
1282: input_stream.readChar();
1283: input_stream.backup(1);
1284: } catch (java.io.IOException e1) {
1285: EOFSeen = true;
1286: error_after = curPos <= 1 ? "" : input_stream
1287: .GetImage();
1288: if (curChar == '\n' || curChar == '\r') {
1289: error_line++;
1290: error_column = 0;
1291: } else
1292: error_column++;
1293: }
1294: if (!EOFSeen) {
1295: input_stream.backup(1);
1296: error_after = curPos <= 1 ? "" : input_stream
1297: .GetImage();
1298: }
1299: throw new TokenMgrError(EOFSeen, curLexState, error_line,
1300: error_column, error_after, curChar,
1301: TokenMgrError.LEXICAL_ERROR);
1302: }
1303: }
1304:
1305: }
|