0001: /* Generated By:JavaCC: Do not edit this line. ELParserTokenManager.java */
0002: package org.jbpm.jpdl.el.parser;
0003:
0004: public class ELParserTokenManager implements ELParserConstants {
0005: public java.io.PrintStream debugStream = System.out;
0006:
0007: public void setDebugStream(java.io.PrintStream ds) {
0008: debugStream = ds;
0009: }
0010:
0011: private final int jjStopStringLiteralDfa_0(int pos, long active0) {
0012: switch (pos) {
0013: case 0:
0014: if ((active0 & 0x4L) != 0L) {
0015: jjmatchedKind = 1;
0016: return 2;
0017: }
0018: return -1;
0019: default:
0020: return -1;
0021: }
0022: }
0023:
0024: private final int jjStartNfa_0(int pos, long active0) {
0025: return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0),
0026: pos + 1);
0027: }
0028:
0029: private final int jjStopAtPos(int pos, int kind) {
0030: jjmatchedKind = kind;
0031: jjmatchedPos = pos;
0032: return pos + 1;
0033: }
0034:
0035: /*
0036: private final int jjStartNfaWithStates_0(int pos, int kind, int state)
0037: {
0038: jjmatchedKind = kind;
0039: jjmatchedPos = pos;
0040: try { curChar = input_stream.readChar(); }
0041: catch(java.io.IOException e) { return pos + 1; }
0042: return jjMoveNfa_0(state, pos + 1);
0043: }
0044: */
0045: private final int jjMoveStringLiteralDfa0_0() {
0046: switch (curChar) {
0047: case 36:
0048: return jjMoveStringLiteralDfa1_0(0x4L);
0049: default:
0050: return jjMoveNfa_0(1, 0);
0051: }
0052: }
0053:
0054: private final int jjMoveStringLiteralDfa1_0(long active0) {
0055: try {
0056: curChar = input_stream.readChar();
0057: } catch (java.io.IOException e) {
0058: jjStopStringLiteralDfa_0(0, active0);
0059: return 1;
0060: }
0061: switch (curChar) {
0062: case 123:
0063: if ((active0 & 0x4L) != 0L)
0064: return jjStopAtPos(1, 2);
0065: break;
0066: default:
0067: break;
0068: }
0069: return jjStartNfa_0(0, active0);
0070: }
0071:
0072: private final void jjCheckNAdd(int state) {
0073: if (jjrounds[state] != jjround) {
0074: jjstateSet[jjnewStateCnt++] = state;
0075: jjrounds[state] = jjround;
0076: }
0077: }
0078:
0079: private final void jjAddStates(int start, int end) {
0080: do {
0081: jjstateSet[jjnewStateCnt++] = jjnextStates[start];
0082: } while (start++ != end);
0083: }
0084:
0085: private final void jjCheckNAddTwoStates(int state1, int state2) {
0086: jjCheckNAdd(state1);
0087: jjCheckNAdd(state2);
0088: }
0089:
0090: private final void jjCheckNAddStates(int start, int end) {
0091: do {
0092: jjCheckNAdd(jjnextStates[start]);
0093: } while (start++ != end);
0094: }
0095:
0096: /*
0097: private final void jjCheckNAddStates(int start)
0098: {
0099: jjCheckNAdd(jjnextStates[start]);
0100: jjCheckNAdd(jjnextStates[start + 1]);
0101: }
0102: */
0103: static final long[] jjbitVec0 = { 0xfffffffffffffffeL,
0104: 0xffffffffffffffffL, 0xffffffffffffffffL,
0105: 0xffffffffffffffffL };
0106: static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL,
0107: 0xffffffffffffffffL };
0108:
0109: private final int jjMoveNfa_0(int startState, int curPos) {
0110: // int[] nextStates;
0111: int startsAt = 0;
0112: jjnewStateCnt = 3;
0113: int i = 1;
0114: jjstateSet[0] = startState;
0115: int kind = 0x7fffffff;
0116: for (;;) {
0117: if (++jjround == 0x7fffffff)
0118: ReInitRounds();
0119: if (curChar < 64) {
0120: long l = 1L << curChar;
0121: MatchLoop: do {
0122: switch (jjstateSet[--i]) {
0123: case 1:
0124: if ((0xffffffefffffffffL & l) != 0L) {
0125: if (kind > 1)
0126: kind = 1;
0127: jjCheckNAdd(0);
0128: } else if (curChar == 36) {
0129: if (kind > 1)
0130: kind = 1;
0131: jjCheckNAdd(2);
0132: }
0133: break;
0134: case 0:
0135: if ((0xffffffefffffffffL & l) == 0L)
0136: break;
0137: if (kind > 1)
0138: kind = 1;
0139: jjCheckNAdd(0);
0140: break;
0141: case 2:
0142: if ((0xffffffefffffffffL & l) == 0L)
0143: break;
0144: if (kind > 1)
0145: kind = 1;
0146: jjCheckNAdd(2);
0147: break;
0148: default:
0149: break;
0150: }
0151: } while (i != startsAt);
0152: } else if (curChar < 128) {
0153: long l = 1L << (curChar & 077);
0154: MatchLoop: do {
0155: switch (jjstateSet[--i]) {
0156: case 1:
0157: case 0:
0158: if (kind > 1)
0159: kind = 1;
0160: jjCheckNAdd(0);
0161: break;
0162: case 2:
0163: if ((0xf7ffffffffffffffL & l) == 0L)
0164: break;
0165: if (kind > 1)
0166: kind = 1;
0167: jjstateSet[jjnewStateCnt++] = 2;
0168: break;
0169: default:
0170: break;
0171: }
0172: } while (i != startsAt);
0173: } else {
0174: int hiByte = (int) (curChar >> 8);
0175: int i1 = hiByte >> 6;
0176: long l1 = 1L << (hiByte & 077);
0177: int i2 = (curChar & 0xff) >> 6;
0178: long l2 = 1L << (curChar & 077);
0179: MatchLoop: do {
0180: switch (jjstateSet[--i]) {
0181: case 1:
0182: case 0:
0183: if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
0184: break;
0185: if (kind > 1)
0186: kind = 1;
0187: jjCheckNAdd(0);
0188: break;
0189: case 2:
0190: if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
0191: break;
0192: if (kind > 1)
0193: kind = 1;
0194: jjstateSet[jjnewStateCnt++] = 2;
0195: break;
0196: default:
0197: break;
0198: }
0199: } while (i != startsAt);
0200: }
0201: if (kind != 0x7fffffff) {
0202: jjmatchedKind = kind;
0203: jjmatchedPos = curPos;
0204: kind = 0x7fffffff;
0205: }
0206: ++curPos;
0207: if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
0208: return curPos;
0209: try {
0210: curChar = input_stream.readChar();
0211: } catch (java.io.IOException e) {
0212: return curPos;
0213: }
0214: }
0215: }
0216:
0217: private final int jjStopStringLiteralDfa_1(int pos, long active0) {
0218: switch (pos) {
0219: case 0:
0220: if ((active0 & 0x10000L) != 0L)
0221: return 1;
0222: if ((active0 & 0x1568015547000L) != 0L) {
0223: jjmatchedKind = 50;
0224: return 6;
0225: }
0226: return -1;
0227: case 1:
0228: if ((active0 & 0x400015540000L) != 0L)
0229: return 6;
0230: if ((active0 & 0x1168000007000L) != 0L) {
0231: jjmatchedKind = 50;
0232: jjmatchedPos = 1;
0233: return 6;
0234: }
0235: return -1;
0236: case 2:
0237: if ((active0 & 0x168000000000L) != 0L)
0238: return 6;
0239: if ((active0 & 0x1000000007000L) != 0L) {
0240: jjmatchedKind = 50;
0241: jjmatchedPos = 2;
0242: return 6;
0243: }
0244: return -1;
0245: case 3:
0246: if ((active0 & 0x1000000002000L) != 0L) {
0247: jjmatchedKind = 50;
0248: jjmatchedPos = 3;
0249: return 6;
0250: }
0251: if ((active0 & 0x5000L) != 0L)
0252: return 6;
0253: return -1;
0254: default:
0255: return -1;
0256: }
0257: }
0258:
0259: private final int jjStartNfa_1(int pos, long active0) {
0260: return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0),
0261: pos + 1);
0262: }
0263:
0264: private final int jjStartNfaWithStates_1(int pos, int kind,
0265: int state) {
0266: jjmatchedKind = kind;
0267: jjmatchedPos = pos;
0268: try {
0269: curChar = input_stream.readChar();
0270: } catch (java.io.IOException e) {
0271: return pos + 1;
0272: }
0273: return jjMoveNfa_1(state, pos + 1);
0274: }
0275:
0276: private final int jjMoveStringLiteralDfa0_1() {
0277: switch (curChar) {
0278: case 33:
0279: jjmatchedKind = 43;
0280: return jjMoveStringLiteralDfa1_1(0x8000000L);
0281: case 37:
0282: return jjStopAtPos(0, 40);
0283: case 38:
0284: return jjMoveStringLiteralDfa1_1(0x200000000000L);
0285: case 40:
0286: return jjStopAtPos(0, 29);
0287: case 41:
0288: return jjStopAtPos(0, 30);
0289: case 42:
0290: return jjStopAtPos(0, 37);
0291: case 43:
0292: return jjStopAtPos(0, 35);
0293: case 44:
0294: return jjStopAtPos(0, 31);
0295: case 45:
0296: return jjStopAtPos(0, 36);
0297: case 46:
0298: return jjStartNfaWithStates_1(0, 16, 1);
0299: case 47:
0300: return jjStopAtPos(0, 38);
0301: case 58:
0302: return jjStopAtPos(0, 32);
0303: case 60:
0304: jjmatchedKind = 19;
0305: return jjMoveStringLiteralDfa1_1(0x800000L);
0306: case 61:
0307: return jjMoveStringLiteralDfa1_1(0x200000L);
0308: case 62:
0309: jjmatchedKind = 17;
0310: return jjMoveStringLiteralDfa1_1(0x2000000L);
0311: case 63:
0312: return jjStopAtPos(0, 49);
0313: case 91:
0314: return jjStopAtPos(0, 33);
0315: case 93:
0316: return jjStopAtPos(0, 34);
0317: case 97:
0318: return jjMoveStringLiteralDfa1_1(0x100000000000L);
0319: case 100:
0320: return jjMoveStringLiteralDfa1_1(0x8000000000L);
0321: case 101:
0322: return jjMoveStringLiteralDfa1_1(0x1000000400000L);
0323: case 102:
0324: return jjMoveStringLiteralDfa1_1(0x2000L);
0325: case 103:
0326: return jjMoveStringLiteralDfa1_1(0x4040000L);
0327: case 108:
0328: return jjMoveStringLiteralDfa1_1(0x1100000L);
0329: case 109:
0330: return jjMoveStringLiteralDfa1_1(0x20000000000L);
0331: case 110:
0332: return jjMoveStringLiteralDfa1_1(0x40010004000L);
0333: case 111:
0334: return jjMoveStringLiteralDfa1_1(0x400000000000L);
0335: case 116:
0336: return jjMoveStringLiteralDfa1_1(0x1000L);
0337: case 124:
0338: return jjMoveStringLiteralDfa1_1(0x800000000000L);
0339: case 125:
0340: return jjStopAtPos(0, 15);
0341: default:
0342: return jjMoveNfa_1(0, 0);
0343: }
0344: }
0345:
0346: private final int jjMoveStringLiteralDfa1_1(long active0) {
0347: try {
0348: curChar = input_stream.readChar();
0349: } catch (java.io.IOException e) {
0350: jjStopStringLiteralDfa_1(0, active0);
0351: return 1;
0352: }
0353: switch (curChar) {
0354: case 38:
0355: if ((active0 & 0x200000000000L) != 0L)
0356: return jjStopAtPos(1, 45);
0357: break;
0358: case 61:
0359: if ((active0 & 0x200000L) != 0L)
0360: return jjStopAtPos(1, 21);
0361: else if ((active0 & 0x800000L) != 0L)
0362: return jjStopAtPos(1, 23);
0363: else if ((active0 & 0x2000000L) != 0L)
0364: return jjStopAtPos(1, 25);
0365: else if ((active0 & 0x8000000L) != 0L)
0366: return jjStopAtPos(1, 27);
0367: break;
0368: case 97:
0369: return jjMoveStringLiteralDfa2_1(active0, 0x2000L);
0370: case 101:
0371: if ((active0 & 0x1000000L) != 0L)
0372: return jjStartNfaWithStates_1(1, 24, 6);
0373: else if ((active0 & 0x4000000L) != 0L)
0374: return jjStartNfaWithStates_1(1, 26, 6);
0375: else if ((active0 & 0x10000000L) != 0L)
0376: return jjStartNfaWithStates_1(1, 28, 6);
0377: break;
0378: case 105:
0379: return jjMoveStringLiteralDfa2_1(active0, 0x8000000000L);
0380: case 109:
0381: return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000L);
0382: case 110:
0383: return jjMoveStringLiteralDfa2_1(active0, 0x100000000000L);
0384: case 111:
0385: return jjMoveStringLiteralDfa2_1(active0, 0x60000000000L);
0386: case 113:
0387: if ((active0 & 0x400000L) != 0L)
0388: return jjStartNfaWithStates_1(1, 22, 6);
0389: break;
0390: case 114:
0391: if ((active0 & 0x400000000000L) != 0L)
0392: return jjStartNfaWithStates_1(1, 46, 6);
0393: return jjMoveStringLiteralDfa2_1(active0, 0x1000L);
0394: case 116:
0395: if ((active0 & 0x40000L) != 0L)
0396: return jjStartNfaWithStates_1(1, 18, 6);
0397: else if ((active0 & 0x100000L) != 0L)
0398: return jjStartNfaWithStates_1(1, 20, 6);
0399: break;
0400: case 117:
0401: return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
0402: case 124:
0403: if ((active0 & 0x800000000000L) != 0L)
0404: return jjStopAtPos(1, 47);
0405: break;
0406: default:
0407: break;
0408: }
0409: return jjStartNfa_1(0, active0);
0410: }
0411:
0412: private final int jjMoveStringLiteralDfa2_1(long old0, long active0) {
0413: if (((active0 &= old0)) == 0L)
0414: return jjStartNfa_1(0, old0);
0415: try {
0416: curChar = input_stream.readChar();
0417: } catch (java.io.IOException e) {
0418: jjStopStringLiteralDfa_1(1, active0);
0419: return 2;
0420: }
0421: switch (curChar) {
0422: case 100:
0423: if ((active0 & 0x20000000000L) != 0L)
0424: return jjStartNfaWithStates_1(2, 41, 6);
0425: else if ((active0 & 0x100000000000L) != 0L)
0426: return jjStartNfaWithStates_1(2, 44, 6);
0427: break;
0428: case 108:
0429: return jjMoveStringLiteralDfa3_1(active0, 0x6000L);
0430: case 112:
0431: return jjMoveStringLiteralDfa3_1(active0, 0x1000000000000L);
0432: case 116:
0433: if ((active0 & 0x40000000000L) != 0L)
0434: return jjStartNfaWithStates_1(2, 42, 6);
0435: break;
0436: case 117:
0437: return jjMoveStringLiteralDfa3_1(active0, 0x1000L);
0438: case 118:
0439: if ((active0 & 0x8000000000L) != 0L)
0440: return jjStartNfaWithStates_1(2, 39, 6);
0441: break;
0442: default:
0443: break;
0444: }
0445: return jjStartNfa_1(1, active0);
0446: }
0447:
0448: private final int jjMoveStringLiteralDfa3_1(long old0, long active0) {
0449: if (((active0 &= old0)) == 0L)
0450: return jjStartNfa_1(1, old0);
0451: try {
0452: curChar = input_stream.readChar();
0453: } catch (java.io.IOException e) {
0454: jjStopStringLiteralDfa_1(2, active0);
0455: return 3;
0456: }
0457: switch (curChar) {
0458: case 101:
0459: if ((active0 & 0x1000L) != 0L)
0460: return jjStartNfaWithStates_1(3, 12, 6);
0461: break;
0462: case 108:
0463: if ((active0 & 0x4000L) != 0L)
0464: return jjStartNfaWithStates_1(3, 14, 6);
0465: break;
0466: case 115:
0467: return jjMoveStringLiteralDfa4_1(active0, 0x2000L);
0468: case 116:
0469: return jjMoveStringLiteralDfa4_1(active0, 0x1000000000000L);
0470: default:
0471: break;
0472: }
0473: return jjStartNfa_1(2, active0);
0474: }
0475:
0476: private final int jjMoveStringLiteralDfa4_1(long old0, long active0) {
0477: if (((active0 &= old0)) == 0L)
0478: return jjStartNfa_1(2, old0);
0479: try {
0480: curChar = input_stream.readChar();
0481: } catch (java.io.IOException e) {
0482: jjStopStringLiteralDfa_1(3, active0);
0483: return 4;
0484: }
0485: switch (curChar) {
0486: case 101:
0487: if ((active0 & 0x2000L) != 0L)
0488: return jjStartNfaWithStates_1(4, 13, 6);
0489: break;
0490: case 121:
0491: if ((active0 & 0x1000000000000L) != 0L)
0492: return jjStartNfaWithStates_1(4, 48, 6);
0493: break;
0494: default:
0495: break;
0496: }
0497: return jjStartNfa_1(3, active0);
0498: }
0499:
0500: static final long[] jjbitVec3 = { 0x1ff00000fffffffeL,
0501: 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L };
0502: static final long[] jjbitVec4 = { 0x0L, 0x0L, 0x0L,
0503: 0xff7fffffff7fffffL };
0504: static final long[] jjbitVec5 = { 0x0L, 0xffffffffffffffffL,
0505: 0xffffffffffffffffL, 0xffffffffffffffffL };
0506: static final long[] jjbitVec6 = { 0xffffffffffffffffL,
0507: 0xffffffffffffffffL, 0xffffL, 0x0L };
0508: static final long[] jjbitVec7 = { 0xffffffffffffffffL,
0509: 0xffffffffffffffffL, 0x0L, 0x0L };
0510: static final long[] jjbitVec8 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L };
0511:
0512: private final int jjMoveNfa_1(int startState, int curPos) {
0513: // int[] nextStates;
0514: int startsAt = 0;
0515: jjnewStateCnt = 35;
0516: int i = 1;
0517: jjstateSet[0] = startState;
0518: int kind = 0x7fffffff;
0519: for (;;) {
0520: if (++jjround == 0x7fffffff)
0521: ReInitRounds();
0522: if (curChar < 64) {
0523: long l = 1L << curChar;
0524: MatchLoop: do {
0525: switch (jjstateSet[--i]) {
0526: case 0:
0527: if ((0x3ff000000000000L & l) != 0L) {
0528: if (kind > 7)
0529: kind = 7;
0530: jjCheckNAddStates(0, 4);
0531: } else if ((0x1800000000L & l) != 0L) {
0532: if (kind > 50)
0533: kind = 50;
0534: jjCheckNAdd(6);
0535: } else if (curChar == 39)
0536: jjCheckNAddStates(5, 9);
0537: else if (curChar == 34)
0538: jjCheckNAddStates(10, 14);
0539: else if (curChar == 46)
0540: jjCheckNAdd(1);
0541: break;
0542: case 1:
0543: if ((0x3ff000000000000L & l) == 0L)
0544: break;
0545: if (kind > 8)
0546: kind = 8;
0547: jjCheckNAddTwoStates(1, 2);
0548: break;
0549: case 3:
0550: if ((0x280000000000L & l) != 0L)
0551: jjCheckNAdd(4);
0552: break;
0553: case 4:
0554: if ((0x3ff000000000000L & l) == 0L)
0555: break;
0556: if (kind > 8)
0557: kind = 8;
0558: jjCheckNAdd(4);
0559: break;
0560: case 5:
0561: if ((0x1800000000L & l) == 0L)
0562: break;
0563: if (kind > 50)
0564: kind = 50;
0565: jjCheckNAdd(6);
0566: break;
0567: case 6:
0568: if ((0x3ff001000000000L & l) == 0L)
0569: break;
0570: if (kind > 50)
0571: kind = 50;
0572: jjCheckNAdd(6);
0573: break;
0574: case 7:
0575: if ((0x3ff000000000000L & l) == 0L)
0576: break;
0577: if (kind > 7)
0578: kind = 7;
0579: jjCheckNAddStates(0, 4);
0580: break;
0581: case 8:
0582: if ((0x3ff000000000000L & l) == 0L)
0583: break;
0584: if (kind > 7)
0585: kind = 7;
0586: jjCheckNAdd(8);
0587: break;
0588: case 9:
0589: if ((0x3ff000000000000L & l) != 0L)
0590: jjCheckNAddTwoStates(9, 10);
0591: break;
0592: case 10:
0593: if (curChar != 46)
0594: break;
0595: if (kind > 8)
0596: kind = 8;
0597: jjCheckNAddTwoStates(11, 12);
0598: break;
0599: case 11:
0600: if ((0x3ff000000000000L & l) == 0L)
0601: break;
0602: if (kind > 8)
0603: kind = 8;
0604: jjCheckNAddTwoStates(11, 12);
0605: break;
0606: case 13:
0607: if ((0x280000000000L & l) != 0L)
0608: jjCheckNAdd(14);
0609: break;
0610: case 14:
0611: if ((0x3ff000000000000L & l) == 0L)
0612: break;
0613: if (kind > 8)
0614: kind = 8;
0615: jjCheckNAdd(14);
0616: break;
0617: case 15:
0618: if ((0x3ff000000000000L & l) != 0L)
0619: jjCheckNAddTwoStates(15, 16);
0620: break;
0621: case 17:
0622: if ((0x280000000000L & l) != 0L)
0623: jjCheckNAdd(18);
0624: break;
0625: case 18:
0626: if ((0x3ff000000000000L & l) == 0L)
0627: break;
0628: if (kind > 8)
0629: kind = 8;
0630: jjCheckNAdd(18);
0631: break;
0632: case 19:
0633: if (curChar == 34)
0634: jjCheckNAddStates(10, 14);
0635: break;
0636: case 20:
0637: if ((0xfffffffbffffffffL & l) != 0L)
0638: jjCheckNAddStates(15, 17);
0639: break;
0640: case 22:
0641: if (curChar == 34)
0642: jjCheckNAddStates(15, 17);
0643: break;
0644: case 23:
0645: if (curChar == 34 && kind > 10)
0646: kind = 10;
0647: break;
0648: case 24:
0649: if ((0xfffffffbffffffffL & l) != 0L)
0650: jjCheckNAddTwoStates(24, 25);
0651: break;
0652: case 26:
0653: if ((0xfffffffbffffffffL & l) != 0L
0654: && kind > 11)
0655: kind = 11;
0656: break;
0657: case 27:
0658: if (curChar == 39)
0659: jjCheckNAddStates(5, 9);
0660: break;
0661: case 28:
0662: if ((0xffffff7fffffffffL & l) != 0L)
0663: jjCheckNAddStates(18, 20);
0664: break;
0665: case 30:
0666: if (curChar == 39)
0667: jjCheckNAddStates(18, 20);
0668: break;
0669: case 31:
0670: if (curChar == 39 && kind > 10)
0671: kind = 10;
0672: break;
0673: case 32:
0674: if ((0xffffff7fffffffffL & l) != 0L)
0675: jjCheckNAddTwoStates(32, 33);
0676: break;
0677: case 34:
0678: if ((0xffffff7fffffffffL & l) != 0L
0679: && kind > 11)
0680: kind = 11;
0681: break;
0682: default:
0683: break;
0684: }
0685: } while (i != startsAt);
0686: } else if (curChar < 128) {
0687: long l = 1L << (curChar & 077);
0688: MatchLoop: do {
0689: switch (jjstateSet[--i]) {
0690: case 0:
0691: case 6:
0692: if ((0x7fffffe87fffffeL & l) == 0L)
0693: break;
0694: if (kind > 50)
0695: kind = 50;
0696: jjCheckNAdd(6);
0697: break;
0698: case 2:
0699: if ((0x2000000020L & l) != 0L)
0700: jjAddStates(21, 22);
0701: break;
0702: case 12:
0703: if ((0x2000000020L & l) != 0L)
0704: jjAddStates(23, 24);
0705: break;
0706: case 16:
0707: if ((0x2000000020L & l) != 0L)
0708: jjAddStates(25, 26);
0709: break;
0710: case 20:
0711: if ((0xffffffffefffffffL & l) != 0L)
0712: jjCheckNAddStates(15, 17);
0713: break;
0714: case 21:
0715: if (curChar == 92)
0716: jjstateSet[jjnewStateCnt++] = 22;
0717: break;
0718: case 22:
0719: if (curChar == 92)
0720: jjCheckNAddStates(15, 17);
0721: break;
0722: case 24:
0723: if ((0xffffffffefffffffL & l) != 0L)
0724: jjAddStates(27, 28);
0725: break;
0726: case 25:
0727: if (curChar == 92)
0728: jjstateSet[jjnewStateCnt++] = 26;
0729: break;
0730: case 26:
0731: case 34:
0732: if ((0xffffffffefffffffL & l) != 0L
0733: && kind > 11)
0734: kind = 11;
0735: break;
0736: case 28:
0737: if ((0xffffffffefffffffL & l) != 0L)
0738: jjCheckNAddStates(18, 20);
0739: break;
0740: case 29:
0741: if (curChar == 92)
0742: jjstateSet[jjnewStateCnt++] = 30;
0743: break;
0744: case 30:
0745: if (curChar == 92)
0746: jjCheckNAddStates(18, 20);
0747: break;
0748: case 32:
0749: if ((0xffffffffefffffffL & l) != 0L)
0750: jjAddStates(29, 30);
0751: break;
0752: case 33:
0753: if (curChar == 92)
0754: jjstateSet[jjnewStateCnt++] = 34;
0755: break;
0756: default:
0757: break;
0758: }
0759: } while (i != startsAt);
0760: } else {
0761: int hiByte = (int) (curChar >> 8);
0762: int i1 = hiByte >> 6;
0763: long l1 = 1L << (hiByte & 077);
0764: int i2 = (curChar & 0xff) >> 6;
0765: long l2 = 1L << (curChar & 077);
0766: MatchLoop: do {
0767: switch (jjstateSet[--i]) {
0768: case 0:
0769: case 6:
0770: if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
0771: break;
0772: if (kind > 50)
0773: kind = 50;
0774: jjCheckNAdd(6);
0775: break;
0776: case 20:
0777: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
0778: jjAddStates(15, 17);
0779: break;
0780: case 24:
0781: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
0782: jjAddStates(27, 28);
0783: break;
0784: case 26:
0785: case 34:
0786: if (jjCanMove_0(hiByte, i1, i2, l1, l2)
0787: && kind > 11)
0788: kind = 11;
0789: break;
0790: case 28:
0791: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
0792: jjAddStates(18, 20);
0793: break;
0794: case 32:
0795: if (jjCanMove_0(hiByte, i1, i2, l1, l2))
0796: jjAddStates(29, 30);
0797: break;
0798: default:
0799: break;
0800: }
0801: } while (i != startsAt);
0802: }
0803: if (kind != 0x7fffffff) {
0804: jjmatchedKind = kind;
0805: jjmatchedPos = curPos;
0806: kind = 0x7fffffff;
0807: }
0808: ++curPos;
0809: if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
0810: return curPos;
0811: try {
0812: curChar = input_stream.readChar();
0813: } catch (java.io.IOException e) {
0814: return curPos;
0815: }
0816: }
0817: }
0818:
0819: static final int[] jjnextStates = { 8, 9, 10, 15, 16, 28, 29, 31,
0820: 32, 33, 20, 21, 23, 24, 25, 20, 21, 23, 28, 29, 31, 3, 4,
0821: 13, 14, 17, 18, 24, 25, 32, 33, };
0822:
0823: private static final boolean jjCanMove_0(int hiByte, int i1,
0824: int i2, long l1, long l2) {
0825: switch (hiByte) {
0826: case 0:
0827: return ((jjbitVec2[i2] & l2) != 0L);
0828: default:
0829: if ((jjbitVec0[i1] & l1) != 0L)
0830: return true;
0831: return false;
0832: }
0833: }
0834:
0835: private static final boolean jjCanMove_1(int hiByte, int i1,
0836: int i2, long l1, long l2) {
0837: switch (hiByte) {
0838: case 0:
0839: return ((jjbitVec4[i2] & l2) != 0L);
0840: case 48:
0841: return ((jjbitVec5[i2] & l2) != 0L);
0842: case 49:
0843: return ((jjbitVec6[i2] & l2) != 0L);
0844: case 51:
0845: return ((jjbitVec7[i2] & l2) != 0L);
0846: case 61:
0847: return ((jjbitVec8[i2] & l2) != 0L);
0848: default:
0849: if ((jjbitVec3[i1] & l1) != 0L)
0850: return true;
0851: return false;
0852: }
0853: }
0854:
0855: public static final String[] jjstrLiteralImages = { "", null,
0856: "\44\173", null, null, null, null, null, null, null, null,
0857: null, "\164\162\165\145", "\146\141\154\163\145",
0858: "\156\165\154\154", "\175", "\56", "\76", "\147\164",
0859: "\74", "\154\164", "\75\75", "\145\161", "\74\75",
0860: "\154\145", "\76\75", "\147\145", "\41\75", "\156\145",
0861: "\50", "\51", "\54", "\72", "\133", "\135", "\53", "\55",
0862: "\52", "\57", "\144\151\166", "\45", "\155\157\144",
0863: "\156\157\164", "\41", "\141\156\144", "\46\46",
0864: "\157\162", "\174\174", "\145\155\160\164\171", "\77",
0865: null, null, null, null, null, };
0866: public static final String[] lexStateNames = { "DEFAULT",
0867: "IN_EXPRESSION", };
0868: public static final int[] jjnewLexState = { -1, -1, 1, -1, -1, -1,
0869: -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1,
0870: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0871: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0872: -1, -1, -1, -1, };
0873: static final long[] jjtoToken = { 0x47fffffffffd87L, };
0874: static final long[] jjtoSkip = { 0x78L, };
0875: private SimpleCharStream input_stream;
0876: private final int[] jjrounds = new int[35];
0877: private final int[] jjstateSet = new int[70];
0878: protected char curChar;
0879:
0880: public ELParserTokenManager(SimpleCharStream stream) {
0881: if (SimpleCharStream.staticFlag)
0882: throw new Error(
0883: "ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
0884: input_stream = stream;
0885: }
0886:
0887: public ELParserTokenManager(SimpleCharStream stream, int lexState) {
0888: this (stream);
0889: SwitchTo(lexState);
0890: }
0891:
0892: public void ReInit(SimpleCharStream stream) {
0893: jjmatchedPos = jjnewStateCnt = 0;
0894: curLexState = defaultLexState;
0895: input_stream = stream;
0896: ReInitRounds();
0897: }
0898:
0899: private final void ReInitRounds() {
0900: int i;
0901: jjround = 0x80000001;
0902: for (i = 35; i-- > 0;)
0903: jjrounds[i] = 0x80000000;
0904: }
0905:
0906: public void ReInit(SimpleCharStream stream, int lexState) {
0907: ReInit(stream);
0908: SwitchTo(lexState);
0909: }
0910:
0911: public void SwitchTo(int lexState) {
0912: if (lexState >= 2 || lexState < 0)
0913: throw new ELTokenMgrError(
0914: "Error: Ignoring invalid lexical state : "
0915: + lexState + ". State unchanged.",
0916: ELTokenMgrError.INVALID_LEXICAL_STATE);
0917: else
0918: curLexState = lexState;
0919: }
0920:
0921: private final ELToken jjFillToken() {
0922: ELToken t = ELToken.newToken(jjmatchedKind);
0923: t.kind = jjmatchedKind;
0924: String im = jjstrLiteralImages[jjmatchedKind];
0925: t.image = (im == null) ? input_stream.GetImage() : im;
0926: t.beginLine = input_stream.getBeginLine();
0927: t.beginColumn = input_stream.getBeginColumn();
0928: t.endLine = input_stream.getEndLine();
0929: t.endColumn = input_stream.getEndColumn();
0930: return t;
0931: }
0932:
0933: int curLexState = 0;
0934: int defaultLexState = 0;
0935: int jjnewStateCnt;
0936: int jjround;
0937: int jjmatchedPos;
0938: int jjmatchedKind;
0939:
0940: public final ELToken getNextToken() {
0941: // int kind;
0942: // ELToken specialToken = null;
0943: ELToken matchedToken;
0944: int curPos = 0;
0945:
0946: EOFLoop: for (;;) {
0947: try {
0948: curChar = input_stream.BeginToken();
0949: } catch (java.io.IOException e) {
0950: jjmatchedKind = 0;
0951: matchedToken = jjFillToken();
0952: return matchedToken;
0953: }
0954:
0955: switch (curLexState) {
0956: case 0:
0957: jjmatchedKind = 0x7fffffff;
0958: jjmatchedPos = 0;
0959: curPos = jjMoveStringLiteralDfa0_0();
0960: break;
0961: case 1:
0962: try {
0963: input_stream.backup(0);
0964: while (curChar <= 32
0965: && (0x100002600L & (1L << curChar)) != 0L)
0966: curChar = input_stream.BeginToken();
0967: } catch (java.io.IOException e1) {
0968: continue EOFLoop;
0969: }
0970: jjmatchedKind = 0x7fffffff;
0971: jjmatchedPos = 0;
0972: curPos = jjMoveStringLiteralDfa0_1();
0973: if (jjmatchedPos == 0 && jjmatchedKind > 54) {
0974: jjmatchedKind = 54;
0975: }
0976: break;
0977: }
0978: if (jjmatchedKind != 0x7fffffff) {
0979: if (jjmatchedPos + 1 < curPos)
0980: input_stream.backup(curPos - jjmatchedPos - 1);
0981: if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
0982: matchedToken = jjFillToken();
0983: if (jjnewLexState[jjmatchedKind] != -1)
0984: curLexState = jjnewLexState[jjmatchedKind];
0985: return matchedToken;
0986: } else {
0987: if (jjnewLexState[jjmatchedKind] != -1)
0988: curLexState = jjnewLexState[jjmatchedKind];
0989: continue EOFLoop;
0990: }
0991: }
0992: int error_line = input_stream.getEndLine();
0993: int error_column = input_stream.getEndColumn();
0994: String error_after = null;
0995: boolean EOFSeen = false;
0996: try {
0997: input_stream.readChar();
0998: input_stream.backup(1);
0999: } catch (java.io.IOException e1) {
1000: EOFSeen = true;
1001: error_after = curPos <= 1 ? "" : input_stream
1002: .GetImage();
1003: if (curChar == '\n' || curChar == '\r') {
1004: error_line++;
1005: error_column = 0;
1006: } else
1007: error_column++;
1008: }
1009: if (!EOFSeen) {
1010: input_stream.backup(1);
1011: error_after = curPos <= 1 ? "" : input_stream
1012: .GetImage();
1013: }
1014: throw new ELTokenMgrError(EOFSeen, curLexState, error_line,
1015: error_column, error_after, curChar,
1016: ELTokenMgrError.LEXICAL_ERROR);
1017: }
1018: }
1019:
1020: }
|