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