00001
00002 package plp.imperative2.parser;
00003 import plp.expressions1.util.*;
00004 import plp.expressions2.expression.*;
00005 import plp.imperative1.command.*;
00006 import plp.imperative1.declaration.*;
00007 import plp.imperative1.memory.*;
00008 import plp.imperative2.*;
00009 import plp.imperative2.command.*;
00010 import plp.imperative2.declaration.*;
00011 import plp.imperative2.memory.*;
00012 import java.util.*;
00013
00014 public class Imp2ParserTokenManager implements Imp2ParserConstants
00015 {
00016 public static java.io.PrintStream debugStream = System.out;
00017 public static void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
00018 private static final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
00019 {
00020 switch (pos)
00021 {
00022 case 0:
00023 if ((active1 & 0x1L) != 0L)
00024 return 19;
00025 if ((active0 & 0x1ffffe00L) != 0L)
00026 {
00027 jjmatchedKind = 34;
00028 return 13;
00029 }
00030 return -1;
00031 case 1:
00032 if ((active0 & 0x1fdbfa00L) != 0L)
00033 {
00034 jjmatchedKind = 34;
00035 jjmatchedPos = 1;
00036 return 13;
00037 }
00038 if ((active0 & 0x240400L) != 0L)
00039 return 13;
00040 return -1;
00041 case 2:
00042 if ((active0 & 0x1bdb7000L) != 0L)
00043 {
00044 jjmatchedKind = 34;
00045 jjmatchedPos = 2;
00046 return 13;
00047 }
00048 if ((active0 & 0x4008a00L) != 0L)
00049 return 13;
00050 return -1;
00051 case 3:
00052 if ((active0 & 0x3c92000L) != 0L)
00053 return 13;
00054 if ((active0 & 0x18125000L) != 0L)
00055 {
00056 jjmatchedKind = 34;
00057 jjmatchedPos = 3;
00058 return 13;
00059 }
00060 return -1;
00061 case 4:
00062 if ((active0 & 0x18001000L) != 0L)
00063 {
00064 jjmatchedKind = 34;
00065 jjmatchedPos = 4;
00066 return 13;
00067 }
00068 if ((active0 & 0x124000L) != 0L)
00069 return 13;
00070 return -1;
00071 case 5:
00072 if ((active0 & 0x8000000L) != 0L)
00073 {
00074 jjmatchedKind = 34;
00075 jjmatchedPos = 5;
00076 return 13;
00077 }
00078 if ((active0 & 0x10001000L) != 0L)
00079 return 13;
00080 return -1;
00081 default :
00082 return -1;
00083 }
00084 }
00085 private static final int jjStartNfa_0(int pos, long active0, long active1)
00086 {
00087 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
00088 }
00089 static private final int jjStopAtPos(int pos, int kind)
00090 {
00091 jjmatchedKind = kind;
00092 jjmatchedPos = pos;
00093 return pos + 1;
00094 }
00095 static private final int jjStartNfaWithStates_0(int pos, int kind, int state)
00096 {
00097 jjmatchedKind = kind;
00098 jjmatchedPos = pos;
00099 try { curChar = input_stream.readChar(); }
00100 catch(java.io.IOException e) { return pos + 1; }
00101 return jjMoveNfa_0(state, pos + 1);
00102 }
00103 static private final int jjMoveStringLiteralDfa0_0()
00104 {
00105 switch(curChar)
00106 {
00107 case 33:
00108 jjmatchedKind = 50;
00109 return jjMoveStringLiteralDfa1_0(0x200000000000000L);
00110 case 37:
00111 return jjStopAtPos(0, 68);
00112 case 38:
00113 jjmatchedKind = 65;
00114 return jjMoveStringLiteralDfa1_0(0x800000000000000L);
00115 case 40:
00116 return jjStopAtPos(0, 37);
00117 case 41:
00118 return jjStopAtPos(0, 38);
00119 case 42:
00120 return jjStopAtPos(0, 63);
00121 case 43:
00122 jjmatchedKind = 61;
00123 return jjMoveStringLiteralDfa1_0(0x1000000000000000L);
00124 case 44:
00125 return jjStopAtPos(0, 44);
00126 case 45:
00127 return jjStopAtPos(0, 62);
00128 case 46:
00129 return jjStopAtPos(0, 45);
00130 case 47:
00131 return jjStartNfaWithStates_0(0, 64, 19);
00132 case 58:
00133 jjmatchedKind = 53;
00134 return jjMoveStringLiteralDfa1_0(0x400000000000L);
00135 case 59:
00136 return jjStopAtPos(0, 43);
00137 case 60:
00138 jjmatchedKind = 49;
00139 return jjMoveStringLiteralDfa1_0(0x80000000000000L);
00140 case 61:
00141 jjmatchedKind = 47;
00142 return jjMoveStringLiteralDfa1_0(0x40000000000000L);
00143 case 62:
00144 jjmatchedKind = 48;
00145 return jjMoveStringLiteralDfa1_0(0x100000000000000L);
00146 case 63:
00147 return jjStopAtPos(0, 52);
00148 case 91:
00149 return jjStopAtPos(0, 41);
00150 case 93:
00151 return jjStopAtPos(0, 42);
00152 case 94:
00153 return jjStopAtPos(0, 67);
00154 case 97:
00155 return jjMoveStringLiteralDfa1_0(0x200L);
00156 case 98:
00157 return jjMoveStringLiteralDfa1_0(0x8000000L);
00158 case 99:
00159 return jjMoveStringLiteralDfa1_0(0x2000000L);
00160 case 100:
00161 return jjMoveStringLiteralDfa1_0(0x40000L);
00162 case 101:
00163 return jjMoveStringLiteralDfa1_0(0x800000L);
00164 case 102:
00165 return jjMoveStringLiteralDfa1_0(0x4000L);
00166 case 105:
00167 return jjMoveStringLiteralDfa1_0(0x4200000L);
00168 case 108:
00169 return jjMoveStringLiteralDfa1_0(0x1000L);
00170 case 110:
00171 return jjMoveStringLiteralDfa1_0(0x800L);
00172 case 111:
00173 return jjMoveStringLiteralDfa1_0(0x400L);
00174 case 112:
00175 return jjMoveStringLiteralDfa1_0(0x1000000L);
00176 case 114:
00177 return jjMoveStringLiteralDfa1_0(0x80000L);
00178 case 115:
00179 return jjMoveStringLiteralDfa1_0(0x10010000L);
00180 case 116:
00181 return jjMoveStringLiteralDfa1_0(0x402000L);
00182 case 118:
00183 return jjMoveStringLiteralDfa1_0(0x8000L);
00184 case 119:
00185 return jjMoveStringLiteralDfa1_0(0x120000L);
00186 case 123:
00187 return jjStopAtPos(0, 39);
00188 case 124:
00189 jjmatchedKind = 66;
00190 return jjMoveStringLiteralDfa1_0(0x400000000000000L);
00191 case 125:
00192 return jjStopAtPos(0, 40);
00193 case 126:
00194 return jjStopAtPos(0, 51);
00195 default :
00196 return jjMoveNfa_0(0, 0);
00197 }
00198 }
00199 static private final int jjMoveStringLiteralDfa1_0(long active0)
00200 {
00201 try { curChar = input_stream.readChar(); }
00202 catch(java.io.IOException e) {
00203 jjStopStringLiteralDfa_0(0, active0, 0L);
00204 return 1;
00205 }
00206 switch(curChar)
00207 {
00208 case 38:
00209 if ((active0 & 0x800000000000000L) != 0L)
00210 return jjStopAtPos(1, 59);
00211 break;
00212 case 43:
00213 if ((active0 & 0x1000000000000000L) != 0L)
00214 return jjStopAtPos(1, 60);
00215 break;
00216 case 61:
00217 if ((active0 & 0x400000000000L) != 0L)
00218 return jjStopAtPos(1, 46);
00219 else if ((active0 & 0x40000000000000L) != 0L)
00220 return jjStopAtPos(1, 54);
00221 else if ((active0 & 0x80000000000000L) != 0L)
00222 return jjStopAtPos(1, 55);
00223 else if ((active0 & 0x100000000000000L) != 0L)
00224 return jjStopAtPos(1, 56);
00225 else if ((active0 & 0x200000000000000L) != 0L)
00226 return jjStopAtPos(1, 57);
00227 break;
00228 case 97:
00229 return jjMoveStringLiteralDfa2_0(active0, 0x200c000L);
00230 case 101:
00231 return jjMoveStringLiteralDfa2_0(active0, 0x81000L);
00232 case 102:
00233 if ((active0 & 0x200000L) != 0L)
00234 return jjStartNfaWithStates_0(1, 21, 13);
00235 break;
00236 case 104:
00237 return jjMoveStringLiteralDfa2_0(active0, 0x420000L);
00238 case 107:
00239 return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
00240 case 108:
00241 return jjMoveStringLiteralDfa2_0(active0, 0x800000L);
00242 case 110:
00243 return jjMoveStringLiteralDfa2_0(active0, 0x4000200L);
00244 case 111:
00245 if ((active0 & 0x40000L) != 0L)
00246 return jjStartNfaWithStates_0(1, 18, 13);
00247 return jjMoveStringLiteralDfa2_0(active0, 0x8000800L);
00248 case 114:
00249 if ((active0 & 0x400L) != 0L)
00250 return jjStartNfaWithStates_0(1, 10, 13);
00251 return jjMoveStringLiteralDfa2_0(active0, 0x1102000L);
00252 case 116:
00253 return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
00254 case 124:
00255 if ((active0 & 0x400000000000000L) != 0L)
00256 return jjStopAtPos(1, 58);
00257 break;
00258 default :
00259 break;
00260 }
00261 return jjStartNfa_0(0, active0, 0L);
00262 }
00263 static private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
00264 {
00265 if (((active0 &= old0)) == 0L)
00266 return jjStartNfa_0(0, old0, 0L);
00267 try { curChar = input_stream.readChar(); }
00268 catch(java.io.IOException e) {
00269 jjStopStringLiteralDfa_0(1, active0, 0L);
00270 return 2;
00271 }
00272 switch(curChar)
00273 {
00274 case 97:
00275 return jjMoveStringLiteralDfa3_0(active0, 0x80000L);
00276 case 100:
00277 if ((active0 & 0x200L) != 0L)
00278 return jjStartNfaWithStates_0(2, 9, 13);
00279 break;
00280 case 101:
00281 return jjMoveStringLiteralDfa3_0(active0, 0x400000L);
00282 case 105:
00283 return jjMoveStringLiteralDfa3_0(active0, 0x130000L);
00284 case 108:
00285 return jjMoveStringLiteralDfa3_0(active0, 0x2004000L);
00286 case 110:
00287 return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
00288 case 111:
00289 return jjMoveStringLiteralDfa3_0(active0, 0x9000000L);
00290 case 114:
00291 if ((active0 & 0x8000L) != 0L)
00292 return jjStartNfaWithStates_0(2, 15, 13);
00293 return jjMoveStringLiteralDfa3_0(active0, 0x10000000L);
00294 case 115:
00295 return jjMoveStringLiteralDfa3_0(active0, 0x800000L);
00296 case 116:
00297 if ((active0 & 0x800L) != 0L)
00298 return jjStartNfaWithStates_0(2, 11, 13);
00299 else if ((active0 & 0x4000000L) != 0L)
00300 return jjStartNfaWithStates_0(2, 26, 13);
00301 break;
00302 case 117:
00303 return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
00304 default :
00305 break;
00306 }
00307 return jjStartNfa_0(1, active0, 0L);
00308 }
00309 static private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
00310 {
00311 if (((active0 &= old0)) == 0L)
00312 return jjStartNfa_0(1, old0, 0L);
00313 try { curChar = input_stream.readChar(); }
00314 catch(java.io.IOException e) {
00315 jjStopStringLiteralDfa_0(2, active0, 0L);
00316 return 3;
00317 }
00318 switch(curChar)
00319 {
00320 case 99:
00321 if ((active0 & 0x1000000L) != 0L)
00322 return jjStartNfaWithStates_0(3, 24, 13);
00323 break;
00324 case 100:
00325 if ((active0 & 0x80000L) != 0L)
00326 return jjStartNfaWithStates_0(3, 19, 13);
00327 break;
00328 case 101:
00329 if ((active0 & 0x2000L) != 0L)
00330 return jjStartNfaWithStates_0(3, 13, 13);
00331 else if ((active0 & 0x800000L) != 0L)
00332 return jjStartNfaWithStates_0(3, 23, 13);
00333 break;
00334 case 103:
00335 return jjMoveStringLiteralDfa4_0(active0, 0x1000L);
00336 case 105:
00337 return jjMoveStringLiteralDfa4_0(active0, 0x10000000L);
00338 case 108:
00339 if ((active0 & 0x2000000L) != 0L)
00340 return jjStartNfaWithStates_0(3, 25, 13);
00341 return jjMoveStringLiteralDfa4_0(active0, 0x8020000L);
00342 case 110:
00343 if ((active0 & 0x400000L) != 0L)
00344 return jjStartNfaWithStates_0(3, 22, 13);
00345 break;
00346 case 112:
00347 if ((active0 & 0x10000L) != 0L)
00348 return jjStartNfaWithStates_0(3, 16, 13);
00349 break;
00350 case 115:
00351 return jjMoveStringLiteralDfa4_0(active0, 0x4000L);
00352 case 116:
00353 return jjMoveStringLiteralDfa4_0(active0, 0x100000L);
00354 default :
00355 break;
00356 }
00357 return jjStartNfa_0(2, active0, 0L);
00358 }
00359 static private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
00360 {
00361 if (((active0 &= old0)) == 0L)
00362 return jjStartNfa_0(2, old0, 0L);
00363 try { curChar = input_stream.readChar(); }
00364 catch(java.io.IOException e) {
00365 jjStopStringLiteralDfa_0(3, active0, 0L);
00366 return 4;
00367 }
00368 switch(curChar)
00369 {
00370 case 101:
00371 if ((active0 & 0x4000L) != 0L)
00372 return jjStartNfaWithStates_0(4, 14, 13);
00373 else if ((active0 & 0x20000L) != 0L)
00374 return jjStartNfaWithStates_0(4, 17, 13);
00375 else if ((active0 & 0x100000L) != 0L)
00376 return jjStartNfaWithStates_0(4, 20, 13);
00377 return jjMoveStringLiteralDfa5_0(active0, 0x8000000L);
00378 case 110:
00379 return jjMoveStringLiteralDfa5_0(active0, 0x10000000L);
00380 case 116:
00381 return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
00382 default :
00383 break;
00384 }
00385 return jjStartNfa_0(3, active0, 0L);
00386 }
00387 static private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
00388 {
00389 if (((active0 &= old0)) == 0L)
00390 return jjStartNfa_0(3, old0, 0L);
00391 try { curChar = input_stream.readChar(); }
00392 catch(java.io.IOException e) {
00393 jjStopStringLiteralDfa_0(4, active0, 0L);
00394 return 5;
00395 }
00396 switch(curChar)
00397 {
00398 case 97:
00399 return jjMoveStringLiteralDfa6_0(active0, 0x8000000L);
00400 case 103:
00401 if ((active0 & 0x10000000L) != 0L)
00402 return jjStartNfaWithStates_0(5, 28, 13);
00403 break;
00404 case 104:
00405 if ((active0 & 0x1000L) != 0L)
00406 return jjStartNfaWithStates_0(5, 12, 13);
00407 break;
00408 default :
00409 break;
00410 }
00411 return jjStartNfa_0(4, active0, 0L);
00412 }
00413 static private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
00414 {
00415 if (((active0 &= old0)) == 0L)
00416 return jjStartNfa_0(4, old0, 0L);
00417 try { curChar = input_stream.readChar(); }
00418 catch(java.io.IOException e) {
00419 jjStopStringLiteralDfa_0(5, active0, 0L);
00420 return 6;
00421 }
00422 switch(curChar)
00423 {
00424 case 110:
00425 if ((active0 & 0x8000000L) != 0L)
00426 return jjStartNfaWithStates_0(6, 27, 13);
00427 break;
00428 default :
00429 break;
00430 }
00431 return jjStartNfa_0(5, active0, 0L);
00432 }
00433 static private final void jjCheckNAdd(int state)
00434 {
00435 if (jjrounds[state] != jjround)
00436 {
00437 jjstateSet[jjnewStateCnt++] = state;
00438 jjrounds[state] = jjround;
00439 }
00440 }
00441 static private final void jjAddStates(int start, int end)
00442 {
00443 do {
00444 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
00445 } while (start++ != end);
00446 }
00447 static private final void jjCheckNAddTwoStates(int state1, int state2)
00448 {
00449 jjCheckNAdd(state1);
00450 jjCheckNAdd(state2);
00451 }
00452 static private final void jjCheckNAddStates(int start, int end)
00453 {
00454 do {
00455 jjCheckNAdd(jjnextStates[start]);
00456 } while (start++ != end);
00457 }
00458 static private final void jjCheckNAddStates(int start)
00459 {
00460 jjCheckNAdd(jjnextStates[start]);
00461 jjCheckNAdd(jjnextStates[start + 1]);
00462 }
00463 static final long[] jjbitVec0 = {
00464 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
00465 };
00466 static final long[] jjbitVec2 = {
00467 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
00468 };
00469 static final long[] jjbitVec3 = {
00470 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
00471 };
00472 static final long[] jjbitVec4 = {
00473 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
00474 };
00475 static final long[] jjbitVec5 = {
00476 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
00477 };
00478 static final long[] jjbitVec6 = {
00479 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
00480 };
00481 static final long[] jjbitVec7 = {
00482 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
00483 };
00484 static final long[] jjbitVec8 = {
00485 0x3fffffffffffL, 0x0L, 0x0L, 0x0L
00486 };
00487 static private final int jjMoveNfa_0(int startState, int curPos)
00488 {
00489 int[] nextStates;
00490 int startsAt = 0;
00491 jjnewStateCnt = 37;
00492 int i = 1;
00493 jjstateSet[0] = startState;
00494 int j, kind = 0x7fffffff;
00495 for (;;)
00496 {
00497 if (++jjround == 0x7fffffff)
00498 ReInitRounds();
00499 if (curChar < 64)
00500 {
00501 long l = 1L << curChar;
00502 MatchLoop: do
00503 {
00504 switch(jjstateSet[--i])
00505 {
00506 case 19:
00507 if (curChar == 42)
00508 jjCheckNAddTwoStates(32, 33);
00509 else if (curChar == 47)
00510 jjCheckNAddStates(0, 2);
00511 if (curChar == 42)
00512 jjstateSet[jjnewStateCnt++] = 24;
00513 break;
00514 case 0:
00515 if ((0x3fe000000000000L & l) != 0L)
00516 {
00517 if (kind > 29)
00518 kind = 29;
00519 jjCheckNAddTwoStates(1, 2);
00520 }
00521 else if (curChar == 47)
00522 jjAddStates(3, 5);
00523 else if (curChar == 48)
00524 {
00525 if (kind > 29)
00526 kind = 29;
00527 jjCheckNAddStates(6, 8);
00528 }
00529 else if (curChar == 36)
00530 {
00531 if (kind > 34)
00532 kind = 34;
00533 jjCheckNAdd(13);
00534 }
00535 else if (curChar == 34)
00536 jjCheckNAddStates(9, 11);
00537 break;
00538 case 1:
00539 if ((0x3ff000000000000L & l) == 0L)
00540 break;
00541 if (kind > 29)
00542 kind = 29;
00543 jjCheckNAddTwoStates(1, 2);
00544 break;
00545 case 3:
00546 if (curChar == 34)
00547 jjCheckNAddStates(9, 11);
00548 break;
00549 case 4:
00550 if ((0xfffffffbffffdbffL & l) != 0L)
00551 jjCheckNAddStates(9, 11);
00552 break;
00553 case 6:
00554 if ((0x8400000000L & l) != 0L)
00555 jjCheckNAddStates(9, 11);
00556 break;
00557 case 7:
00558 if (curChar == 34 && kind > 33)
00559 kind = 33;
00560 break;
00561 case 8:
00562 if ((0xff000000000000L & l) != 0L)
00563 jjCheckNAddStates(12, 15);
00564 break;
00565 case 9:
00566 if ((0xff000000000000L & l) != 0L)
00567 jjCheckNAddStates(9, 11);
00568 break;
00569 case 10:
00570 if ((0xf000000000000L & l) != 0L)
00571 jjstateSet[jjnewStateCnt++] = 11;
00572 break;
00573 case 11:
00574 if ((0xff000000000000L & l) != 0L)
00575 jjCheckNAdd(9);
00576 break;
00577 case 12:
00578 if (curChar != 36)
00579 break;
00580 if (kind > 34)
00581 kind = 34;
00582 jjCheckNAdd(13);
00583 break;
00584 case 13:
00585 if ((0x3ff001000000000L & l) == 0L)
00586 break;
00587 if (kind > 34)
00588 kind = 34;
00589 jjCheckNAdd(13);
00590 break;
00591 case 14:
00592 if (curChar != 48)
00593 break;
00594 if (kind > 29)
00595 kind = 29;
00596 jjCheckNAddStates(6, 8);
00597 break;
00598 case 16:
00599 if ((0x3ff000000000000L & l) == 0L)
00600 break;
00601 if (kind > 29)
00602 kind = 29;
00603 jjCheckNAddTwoStates(16, 2);
00604 break;
00605 case 17:
00606 if ((0xff000000000000L & l) == 0L)
00607 break;
00608 if (kind > 29)
00609 kind = 29;
00610 jjCheckNAddTwoStates(17, 2);
00611 break;
00612 case 18:
00613 if (curChar == 47)
00614 jjAddStates(3, 5);
00615 break;
00616 case 20:
00617 if ((0xffffffffffffdbffL & l) != 0L)
00618 jjCheckNAddStates(0, 2);
00619 break;
00620 case 21:
00621 if ((0x2400L & l) != 0L && kind > 6)
00622 kind = 6;
00623 break;
00624 case 22:
00625 if (curChar == 10 && kind > 6)
00626 kind = 6;
00627 break;
00628 case 23:
00629 if (curChar == 13)
00630 jjstateSet[jjnewStateCnt++] = 22;
00631 break;
00632 case 24:
00633 if (curChar == 42)
00634 jjCheckNAddTwoStates(25, 26);
00635 break;
00636 case 25:
00637 if ((0xfffffbffffffffffL & l) != 0L)
00638 jjCheckNAddTwoStates(25, 26);
00639 break;
00640 case 26:
00641 if (curChar == 42)
00642 jjCheckNAddStates(16, 18);
00643 break;
00644 case 27:
00645 if ((0xffff7bffffffffffL & l) != 0L)
00646 jjCheckNAddTwoStates(28, 26);
00647 break;
00648 case 28:
00649 if ((0xfffffbffffffffffL & l) != 0L)
00650 jjCheckNAddTwoStates(28, 26);
00651 break;
00652 case 29:
00653 if (curChar == 47 && kind > 7)
00654 kind = 7;
00655 break;
00656 case 30:
00657 if (curChar == 42)
00658 jjstateSet[jjnewStateCnt++] = 24;
00659 break;
00660 case 31:
00661 if (curChar == 42)
00662 jjCheckNAddTwoStates(32, 33);
00663 break;
00664 case 32:
00665 if ((0xfffffbffffffffffL & l) != 0L)
00666 jjCheckNAddTwoStates(32, 33);
00667 break;
00668 case 33:
00669 if (curChar == 42)
00670 jjCheckNAddStates(19, 21);
00671 break;
00672 case 34:
00673 if ((0xffff7bffffffffffL & l) != 0L)
00674 jjCheckNAddTwoStates(35, 33);
00675 break;
00676 case 35:
00677 if ((0xfffffbffffffffffL & l) != 0L)
00678 jjCheckNAddTwoStates(35, 33);
00679 break;
00680 case 36:
00681 if (curChar == 47 && kind > 8)
00682 kind = 8;
00683 break;
00684 default : break;
00685 }
00686 } while(i != startsAt);
00687 }
00688 else if (curChar < 128)
00689 {
00690 long l = 1L << (curChar & 077);
00691 MatchLoop: do
00692 {
00693 switch(jjstateSet[--i])
00694 {
00695 case 0:
00696 case 13:
00697 if ((0x7fffffe87fffffeL & l) == 0L)
00698 break;
00699 if (kind > 34)
00700 kind = 34;
00701 jjCheckNAdd(13);
00702 break;
00703 case 2:
00704 if ((0x100000001000L & l) != 0L && kind > 29)
00705 kind = 29;
00706 break;
00707 case 4:
00708 if ((0xffffffffefffffffL & l) != 0L)
00709 jjCheckNAddStates(9, 11);
00710 break;
00711 case 5:
00712 if (curChar == 92)
00713 jjAddStates(22, 24);
00714 break;
00715 case 6:
00716 if ((0x14404410000000L & l) != 0L)
00717 jjCheckNAddStates(9, 11);
00718 break;
00719 case 15:
00720 if ((0x100000001000000L & l) != 0L)
00721 jjCheckNAdd(16);
00722 break;
00723 case 16:
00724 if ((0x7e0000007eL & l) == 0L)
00725 break;
00726 if (kind > 29)
00727 kind = 29;
00728 jjCheckNAddTwoStates(16, 2);
00729 break;
00730 case 20:
00731 jjAddStates(0, 2);
00732 break;
00733 case 25:
00734 jjCheckNAddTwoStates(25, 26);
00735 break;
00736 case 27:
00737 case 28:
00738 jjCheckNAddTwoStates(28, 26);
00739 break;
00740 case 32:
00741 jjCheckNAddTwoStates(32, 33);
00742 break;
00743 case 34:
00744 case 35:
00745 jjCheckNAddTwoStates(35, 33);
00746 break;
00747 default : break;
00748 }
00749 } while(i != startsAt);
00750 }
00751 else
00752 {
00753 int hiByte = (int)(curChar >> 8);
00754 int i1 = hiByte >> 6;
00755 long l1 = 1L << (hiByte & 077);
00756 int i2 = (curChar & 0xff) >> 6;
00757 long l2 = 1L << (curChar & 077);
00758 MatchLoop: do
00759 {
00760 switch(jjstateSet[--i])
00761 {
00762 case 0:
00763 case 13:
00764 if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
00765 break;
00766 if (kind > 34)
00767 kind = 34;
00768 jjCheckNAdd(13);
00769 break;
00770 case 4:
00771 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00772 jjAddStates(9, 11);
00773 break;
00774 case 20:
00775 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00776 jjAddStates(0, 2);
00777 break;
00778 case 25:
00779 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00780 jjCheckNAddTwoStates(25, 26);
00781 break;
00782 case 27:
00783 case 28:
00784 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00785 jjCheckNAddTwoStates(28, 26);
00786 break;
00787 case 32:
00788 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00789 jjCheckNAddTwoStates(32, 33);
00790 break;
00791 case 34:
00792 case 35:
00793 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
00794 jjCheckNAddTwoStates(35, 33);
00795 break;
00796 default : break;
00797 }
00798 } while(i != startsAt);
00799 }
00800 if (kind != 0x7fffffff)
00801 {
00802 jjmatchedKind = kind;
00803 jjmatchedPos = curPos;
00804 kind = 0x7fffffff;
00805 }
00806 ++curPos;
00807 if ((i = jjnewStateCnt) == (startsAt = 37 - (jjnewStateCnt = startsAt)))
00808 return curPos;
00809 try { curChar = input_stream.readChar(); }
00810 catch(java.io.IOException e) { return curPos; }
00811 }
00812 }
00813 static final int[] jjnextStates = {
00814 20, 21, 23, 19, 30, 31, 15, 17, 2, 4, 5, 7, 4, 5, 9, 7,
00815 26, 27, 29, 33, 34, 36, 6, 8, 10,
00816 };
00817 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
00818 {
00819 switch(hiByte)
00820 {
00821 case 0:
00822 return ((jjbitVec2[i2] & l2) != 0L);
00823 default :
00824 if ((jjbitVec0[i1] & l1) != 0L)
00825 return true;
00826 return false;
00827 }
00828 }
00829 private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
00830 {
00831 switch(hiByte)
00832 {
00833 case 0:
00834 return ((jjbitVec4[i2] & l2) != 0L);
00835 case 48:
00836 return ((jjbitVec5[i2] & l2) != 0L);
00837 case 49:
00838 return ((jjbitVec6[i2] & l2) != 0L);
00839 case 51:
00840 return ((jjbitVec7[i2] & l2) != 0L);
00841 case 61:
00842 return ((jjbitVec8[i2] & l2) != 0L);
00843 default :
00844 if ((jjbitVec3[i1] & l1) != 0L)
00845 return true;
00846 return false;
00847 }
00848 }
00849 public static final String[] jjstrLiteralImages = {
00850 "", null, null, null, null, null, null, null, null, "\141\156\144",
00851 "\157\162", "\156\157\164", "\154\145\156\147\164\150", "\164\162\165\145",
00852 "\146\141\154\163\145", "\166\141\162", "\163\153\151\160", "\167\150\151\154\145", "\144\157",
00853 "\162\145\141\144", "\167\162\151\164\145", "\151\146", "\164\150\145\156", "\145\154\163\145",
00854 "\160\162\157\143", "\143\141\154\154", "\151\156\164", "\142\157\157\154\145\141\156",
00855 "\163\164\162\151\156\147", null, null, null, null, null, null, null, null, "\50", "\51", "\173", "\175",
00856 "\133", "\135", "\73", "\54", "\56", "\72\75", "\75", "\76", "\74", "\41", "\176",
00857 "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", "\53\53",
00858 "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", };
00859 public static final String[] lexStateNames = {
00860 "DEFAULT",
00861 };
00862 static final long[] jjtoToken = {
00863 0xffffffe63ffffe01L, 0x1fL,
00864 };
00865 static final long[] jjtoSkip = {
00866 0x1feL, 0x0L,
00867 };
00868 static final long[] jjtoSpecial = {
00869 0x1c0L, 0x0L,
00870 };
00871 static protected JavaCharStream input_stream;
00872 static private final int[] jjrounds = new int[37];
00873 static private final int[] jjstateSet = new int[74];
00874 static protected char curChar;
00875 public Imp2ParserTokenManager(JavaCharStream stream){
00876 if (input_stream != null)
00877 throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
00878 input_stream = stream;
00879 }
00880 public Imp2ParserTokenManager(JavaCharStream stream, int lexState){
00881 this(stream);
00882 SwitchTo(lexState);
00883 }
00884 static public void ReInit(JavaCharStream stream)
00885 {
00886 jjmatchedPos = jjnewStateCnt = 0;
00887 curLexState = defaultLexState;
00888 input_stream = stream;
00889 ReInitRounds();
00890 }
00891 static private final void ReInitRounds()
00892 {
00893 int i;
00894 jjround = 0x80000001;
00895 for (i = 37; i-- > 0;)
00896 jjrounds[i] = 0x80000000;
00897 }
00898 static public void ReInit(JavaCharStream stream, int lexState)
00899 {
00900 ReInit(stream);
00901 SwitchTo(lexState);
00902 }
00903 static public void SwitchTo(int lexState)
00904 {
00905 if (lexState >= 1 || lexState < 0)
00906 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
00907 else
00908 curLexState = lexState;
00909 }
00910
00911 static protected Token jjFillToken()
00912 {
00913 Token t = Token.newToken(jjmatchedKind);
00914 t.kind = jjmatchedKind;
00915 String im = jjstrLiteralImages[jjmatchedKind];
00916 t.image = (im == null) ? input_stream.GetImage() : im;
00917 t.beginLine = input_stream.getBeginLine();
00918 t.beginColumn = input_stream.getBeginColumn();
00919 t.endLine = input_stream.getEndLine();
00920 t.endColumn = input_stream.getEndColumn();
00921 return t;
00922 }
00923
00924 static int curLexState = 0;
00925 static int defaultLexState = 0;
00926 static int jjnewStateCnt;
00927 static int jjround;
00928 static int jjmatchedPos;
00929 static int jjmatchedKind;
00930
00931 public static Token getNextToken()
00932 {
00933 int kind;
00934 Token specialToken = null;
00935 Token matchedToken;
00936 int curPos = 0;
00937
00938 EOFLoop :
00939 for (;;)
00940 {
00941 try
00942 {
00943 curChar = input_stream.BeginToken();
00944 }
00945 catch(java.io.IOException e)
00946 {
00947 jjmatchedKind = 0;
00948 matchedToken = jjFillToken();
00949 matchedToken.specialToken = specialToken;
00950 return matchedToken;
00951 }
00952
00953 try { input_stream.backup(0);
00954 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
00955 curChar = input_stream.BeginToken();
00956 }
00957 catch (java.io.IOException e1) { continue EOFLoop; }
00958 jjmatchedKind = 0x7fffffff;
00959 jjmatchedPos = 0;
00960 curPos = jjMoveStringLiteralDfa0_0();
00961 if (jjmatchedKind != 0x7fffffff)
00962 {
00963 if (jjmatchedPos + 1 < curPos)
00964 input_stream.backup(curPos - jjmatchedPos - 1);
00965 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
00966 {
00967 matchedToken = jjFillToken();
00968 matchedToken.specialToken = specialToken;
00969 return matchedToken;
00970 }
00971 else
00972 {
00973 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
00974 {
00975 matchedToken = jjFillToken();
00976 if (specialToken == null)
00977 specialToken = matchedToken;
00978 else
00979 {
00980 matchedToken.specialToken = specialToken;
00981 specialToken = (specialToken.next = matchedToken);
00982 }
00983 }
00984 continue EOFLoop;
00985 }
00986 }
00987 int error_line = input_stream.getEndLine();
00988 int error_column = input_stream.getEndColumn();
00989 String error_after = null;
00990 boolean EOFSeen = false;
00991 try { input_stream.readChar(); input_stream.backup(1); }
00992 catch (java.io.IOException e1) {
00993 EOFSeen = true;
00994 error_after = curPos <= 1 ? "" : input_stream.GetImage();
00995 if (curChar == '\n' || curChar == '\r') {
00996 error_line++;
00997 error_column = 0;
00998 }
00999 else
01000 error_column++;
01001 }
01002 if (!EOFSeen) {
01003 input_stream.backup(1);
01004 error_after = curPos <= 1 ? "" : input_stream.GetImage();
01005 }
01006 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
01007 }
01008 }
01009
01010 }