1. /* Generated By:JJTree&JavaCC: Do not edit this line. ParserTokenManager.java */
  2. package org.apache.commons.jexl.parser;
  3. public class ParserTokenManager implements ParserConstants
  4. {
  5. public java.io.PrintStream debugStream = System.out;
  6. public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
  7. private final int jjStopStringLiteralDfa_0(int pos, long active0)
  8. {
  9. switch (pos)
  10. {
  11. case 0:
  12. if ((active0 & 0x3ef285550a4800L) != 0L)
  13. {
  14. jjmatchedKind = 58;
  15. return 5;
  16. }
  17. return -1;
  18. case 1:
  19. if ((active0 & 0x1cf28000084800L) != 0L)
  20. {
  21. jjmatchedKind = 58;
  22. jjmatchedPos = 1;
  23. return 5;
  24. }
  25. if ((active0 & 0x22000555020000L) != 0L)
  26. return 5;
  27. return -1;
  28. case 2:
  29. if ((active0 & 0x1ce00000004800L) != 0L)
  30. {
  31. jjmatchedKind = 58;
  32. jjmatchedPos = 2;
  33. return 5;
  34. }
  35. if ((active0 & 0x128000080000L) != 0L)
  36. return 5;
  37. return -1;
  38. case 3:
  39. if ((active0 & 0x18800000000800L) != 0L)
  40. {
  41. jjmatchedKind = 58;
  42. jjmatchedPos = 3;
  43. return 5;
  44. }
  45. if ((active0 & 0x4600000004000L) != 0L)
  46. return 5;
  47. return -1;
  48. case 4:
  49. if ((active0 & 0x10000000000000L) != 0L)
  50. {
  51. jjmatchedKind = 58;
  52. jjmatchedPos = 4;
  53. return 5;
  54. }
  55. if ((active0 & 0x8800000000800L) != 0L)
  56. return 5;
  57. return -1;
  58. case 5:
  59. if ((active0 & 0x10000000000000L) != 0L)
  60. {
  61. jjmatchedKind = 58;
  62. jjmatchedPos = 5;
  63. return 5;
  64. }
  65. return -1;
  66. default :
  67. return -1;
  68. }
  69. }
  70. private final int jjStartNfa_0(int pos, long active0)
  71. {
  72. return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
  73. }
  74. private final int jjStopAtPos(int pos, int kind)
  75. {
  76. jjmatchedKind = kind;
  77. jjmatchedPos = pos;
  78. return pos + 1;
  79. }
  80. private final int jjStartNfaWithStates_0(int pos, int kind, int state)
  81. {
  82. jjmatchedKind = kind;
  83. jjmatchedPos = pos;
  84. try { curChar = input_stream.readChar(); }
  85. catch(java.io.IOException e) { return pos + 1; }
  86. return jjMoveNfa_0(state, pos + 1);
  87. }
  88. private final int jjMoveStringLiteralDfa0_0()
  89. {
  90. switch(curChar)
  91. {
  92. case 33:
  93. jjmatchedKind = 43;
  94. return jjMoveStringLiteralDfa1_0(0x2000000L);
  95. case 37:
  96. return jjStopAtPos(0, 40);
  97. case 38:
  98. jjmatchedKind = 22;
  99. return jjMoveStringLiteralDfa1_0(0x40000L);
  100. case 40:
  101. return jjStopAtPos(0, 12);
  102. case 41:
  103. return jjStopAtPos(0, 13);
  104. case 42:
  105. return jjStopAtPos(0, 37);
  106. case 43:
  107. return jjStopAtPos(0, 35);
  108. case 44:
  109. return jjStopAtPos(0, 54);
  110. case 45:
  111. return jjStopAtPos(0, 36);
  112. case 46:
  113. return jjStopAtPos(0, 57);
  114. case 47:
  115. return jjStopAtPos(0, 38);
  116. case 59:
  117. return jjStopAtPos(0, 48);
  118. case 60:
  119. jjmatchedKind = 27;
  120. return jjMoveStringLiteralDfa1_0(0x80000000L);
  121. case 61:
  122. jjmatchedKind = 15;
  123. return jjMoveStringLiteralDfa1_0(0x800000L);
  124. case 62:
  125. jjmatchedKind = 29;
  126. return jjMoveStringLiteralDfa1_0(0x200000000L);
  127. case 91:
  128. return jjStopAtPos(0, 55);
  129. case 93:
  130. return jjStopAtPos(0, 56);
  131. case 94:
  132. return jjStopAtPos(0, 21);
  133. case 97:
  134. return jjMoveStringLiteralDfa1_0(0x80000L);
  135. case 100:
  136. return jjMoveStringLiteralDfa1_0(0x8000000000L);
  137. case 101:
  138. return jjMoveStringLiteralDfa1_0(0x4000001000800L);
  139. case 102:
  140. return jjMoveStringLiteralDfa1_0(0x10800000000000L);
  141. case 103:
  142. return jjMoveStringLiteralDfa1_0(0x440000000L);
  143. case 105:
  144. return jjMoveStringLiteralDfa1_0(0x22000000000000L);
  145. case 108:
  146. return jjMoveStringLiteralDfa1_0(0x110000000L);
  147. case 109:
  148. return jjMoveStringLiteralDfa1_0(0x20000000000L);
  149. case 110:
  150. return jjMoveStringLiteralDfa1_0(0x300004000000L);
  151. case 111:
  152. return jjMoveStringLiteralDfa1_0(0x20000L);
  153. case 115:
  154. return jjMoveStringLiteralDfa1_0(0x4000L);
  155. case 116:
  156. return jjMoveStringLiteralDfa1_0(0x400000000000L);
  157. case 119:
  158. return jjMoveStringLiteralDfa1_0(0x8000000000000L);
  159. case 123:
  160. return jjStopAtPos(0, 9);
  161. case 124:
  162. jjmatchedKind = 20;
  163. return jjMoveStringLiteralDfa1_0(0x10000L);
  164. case 125:
  165. return jjStopAtPos(0, 10);
  166. case 126:
  167. return jjStopAtPos(0, 42);
  168. default :
  169. return jjMoveNfa_0(3, 0);
  170. }
  171. }
  172. private final int jjMoveStringLiteralDfa1_0(long active0)
  173. {
  174. try { curChar = input_stream.readChar(); }
  175. catch(java.io.IOException e) {
  176. jjStopStringLiteralDfa_0(0, active0);
  177. return 1;
  178. }
  179. switch(curChar)
  180. {
  181. case 38:
  182. if ((active0 & 0x40000L) != 0L)
  183. return jjStopAtPos(1, 18);
  184. break;
  185. case 61:
  186. if ((active0 & 0x800000L) != 0L)
  187. return jjStopAtPos(1, 23);
  188. else if ((active0 & 0x2000000L) != 0L)
  189. return jjStopAtPos(1, 25);
  190. else if ((active0 & 0x80000000L) != 0L)
  191. return jjStopAtPos(1, 31);
  192. else if ((active0 & 0x200000000L) != 0L)
  193. return jjStopAtPos(1, 33);
  194. break;
  195. case 97:
  196. return jjMoveStringLiteralDfa2_0(active0, 0x800000000000L);
  197. case 101:
  198. if ((active0 & 0x4000000L) != 0L)
  199. return jjStartNfaWithStates_0(1, 26, 5);
  200. else if ((active0 & 0x100000000L) != 0L)
  201. return jjStartNfaWithStates_0(1, 32, 5);
  202. else if ((active0 & 0x400000000L) != 0L)
  203. return jjStartNfaWithStates_0(1, 34, 5);
  204. break;
  205. case 102:
  206. if ((active0 & 0x2000000000000L) != 0L)
  207. return jjStartNfaWithStates_0(1, 49, 5);
  208. break;
  209. case 104:
  210. return jjMoveStringLiteralDfa2_0(active0, 0x8000000000000L);
  211. case 105:
  212. return jjMoveStringLiteralDfa2_0(active0, 0x8000004000L);
  213. case 108:
  214. return jjMoveStringLiteralDfa2_0(active0, 0x4000000000000L);
  215. case 109:
  216. return jjMoveStringLiteralDfa2_0(active0, 0x800L);
  217. case 110:
  218. if ((active0 & 0x20000000000000L) != 0L)
  219. return jjStartNfaWithStates_0(1, 53, 5);
  220. return jjMoveStringLiteralDfa2_0(active0, 0x80000L);
  221. case 111:
  222. return jjMoveStringLiteralDfa2_0(active0, 0x10120000000000L);
  223. case 113:
  224. if ((active0 & 0x1000000L) != 0L)
  225. return jjStartNfaWithStates_0(1, 24, 5);
  226. break;
  227. case 114:
  228. if ((active0 & 0x20000L) != 0L)
  229. return jjStartNfaWithStates_0(1, 17, 5);
  230. return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L);
  231. case 116:
  232. if ((active0 & 0x10000000L) != 0L)
  233. return jjStartNfaWithStates_0(1, 28, 5);
  234. else if ((active0 & 0x40000000L) != 0L)
  235. return jjStartNfaWithStates_0(1, 30, 5);
  236. break;
  237. case 117:
  238. return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L);
  239. case 124:
  240. if ((active0 & 0x10000L) != 0L)
  241. return jjStopAtPos(1, 16);
  242. break;
  243. default :
  244. break;
  245. }
  246. return jjStartNfa_0(0, active0);
  247. }
  248. private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
  249. {
  250. if (((active0 &= old0)) == 0L)
  251. return jjStartNfa_0(0, old0);
  252. try { curChar = input_stream.readChar(); }
  253. catch(java.io.IOException e) {
  254. jjStopStringLiteralDfa_0(1, active0);
  255. return 2;
  256. }
  257. switch(curChar)
  258. {
  259. case 100:
  260. if ((active0 & 0x80000L) != 0L)
  261. return jjStartNfaWithStates_0(2, 19, 5);
  262. else if ((active0 & 0x20000000000L) != 0L)
  263. return jjStartNfaWithStates_0(2, 41, 5);
  264. break;
  265. case 105:
  266. return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000L);
  267. case 108:
  268. return jjMoveStringLiteralDfa3_0(active0, 0xa00000000000L);
  269. case 112:
  270. return jjMoveStringLiteralDfa3_0(active0, 0x800L);
  271. case 114:
  272. return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L);
  273. case 115:
  274. return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L);
  275. case 116:
  276. if ((active0 & 0x100000000000L) != 0L)
  277. return jjStartNfaWithStates_0(2, 44, 5);
  278. break;
  279. case 117:
  280. return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L);
  281. case 118:
  282. if ((active0 & 0x8000000000L) != 0L)
  283. return jjStartNfaWithStates_0(2, 39, 5);
  284. break;
  285. case 122:
  286. return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
  287. default :
  288. break;
  289. }
  290. return jjStartNfa_0(1, active0);
  291. }
  292. private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
  293. {
  294. if (((active0 &= old0)) == 0L)
  295. return jjStartNfa_0(1, old0);
  296. try { curChar = input_stream.readChar(); }
  297. catch(java.io.IOException e) {
  298. jjStopStringLiteralDfa_0(2, active0);
  299. return 3;
  300. }
  301. switch(curChar)
  302. {
  303. case 101:
  304. if ((active0 & 0x4000L) != 0L)
  305. return jjStartNfaWithStates_0(3, 14, 5);
  306. else if ((active0 & 0x400000000000L) != 0L)
  307. return jjStartNfaWithStates_0(3, 46, 5);
  308. else if ((active0 & 0x4000000000000L) != 0L)
  309. return jjStartNfaWithStates_0(3, 50, 5);
  310. return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L);
  311. case 108:
  312. if ((active0 & 0x200000000000L) != 0L)
  313. return jjStartNfaWithStates_0(3, 45, 5);
  314. return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L);
  315. case 115:
  316. return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L);
  317. case 116:
  318. return jjMoveStringLiteralDfa4_0(active0, 0x800L);
  319. default :
  320. break;
  321. }
  322. return jjStartNfa_0(2, active0);
  323. }
  324. private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
  325. {
  326. if (((active0 &= old0)) == 0L)
  327. return jjStartNfa_0(2, old0);
  328. try { curChar = input_stream.readChar(); }
  329. catch(java.io.IOException e) {
  330. jjStopStringLiteralDfa_0(3, active0);
  331. return 4;
  332. }
  333. switch(curChar)
  334. {
  335. case 97:
  336. return jjMoveStringLiteralDfa5_0(active0, 0x10000000000000L);
  337. case 101:
  338. if ((active0 & 0x800000000000L) != 0L)
  339. return jjStartNfaWithStates_0(4, 47, 5);
  340. else if ((active0 & 0x8000000000000L) != 0L)
  341. return jjStartNfaWithStates_0(4, 51, 5);
  342. break;
  343. case 121:
  344. if ((active0 & 0x800L) != 0L)
  345. return jjStartNfaWithStates_0(4, 11, 5);
  346. break;
  347. default :
  348. break;
  349. }
  350. return jjStartNfa_0(3, active0);
  351. }
  352. private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
  353. {
  354. if (((active0 &= old0)) == 0L)
  355. return jjStartNfa_0(3, old0);
  356. try { curChar = input_stream.readChar(); }
  357. catch(java.io.IOException e) {
  358. jjStopStringLiteralDfa_0(4, active0);
  359. return 5;
  360. }
  361. switch(curChar)
  362. {
  363. case 99:
  364. return jjMoveStringLiteralDfa6_0(active0, 0x10000000000000L);
  365. default :
  366. break;
  367. }
  368. return jjStartNfa_0(4, active0);
  369. }
  370. private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
  371. {
  372. if (((active0 &= old0)) == 0L)
  373. return jjStartNfa_0(4, old0);
  374. try { curChar = input_stream.readChar(); }
  375. catch(java.io.IOException e) {
  376. jjStopStringLiteralDfa_0(5, active0);
  377. return 6;
  378. }
  379. switch(curChar)
  380. {
  381. case 104:
  382. if ((active0 & 0x10000000000000L) != 0L)
  383. return jjStartNfaWithStates_0(6, 52, 5);
  384. break;
  385. default :
  386. break;
  387. }
  388. return jjStartNfa_0(5, active0);
  389. }
  390. private final void jjCheckNAdd(int state)
  391. {
  392. if (jjrounds[state] != jjround)
  393. {
  394. jjstateSet[jjnewStateCnt++] = state;
  395. jjrounds[state] = jjround;
  396. }
  397. }
  398. private final void jjAddStates(int start, int end)
  399. {
  400. do {
  401. jjstateSet[jjnewStateCnt++] = jjnextStates[start];
  402. } while (start++ != end);
  403. }
  404. private final void jjCheckNAddTwoStates(int state1, int state2)
  405. {
  406. jjCheckNAdd(state1);
  407. jjCheckNAdd(state2);
  408. }
  409. private final void jjCheckNAddStates(int start, int end)
  410. {
  411. do {
  412. jjCheckNAdd(jjnextStates[start]);
  413. } while (start++ != end);
  414. }
  415. private final void jjCheckNAddStates(int start)
  416. {
  417. jjCheckNAdd(jjnextStates[start]);
  418. jjCheckNAdd(jjnextStates[start + 1]);
  419. }
  420. static final long[] jjbitVec0 = {
  421. 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
  422. };
  423. private final int jjMoveNfa_0(int startState, int curPos)
  424. {
  425. int[] nextStates;
  426. int startsAt = 0;
  427. jjnewStateCnt = 17;
  428. int i = 1;
  429. jjstateSet[0] = startState;
  430. int j, kind = 0x7fffffff;
  431. for (;;)
  432. {
  433. if (++jjround == 0x7fffffff)
  434. ReInitRounds();
  435. if (curChar < 64)
  436. {
  437. long l = 1L << curChar;
  438. MatchLoop: do
  439. {
  440. switch(jjstateSet[--i])
  441. {
  442. case 3:
  443. if ((0x3ff000000000000L & l) != 0L)
  444. {
  445. if (kind > 7)
  446. kind = 7;
  447. jjCheckNAddStates(0, 2);
  448. }
  449. else if (curChar == 39)
  450. jjCheckNAddTwoStates(10, 11);
  451. else if (curChar == 34)
  452. jjCheckNAddTwoStates(7, 8);
  453. else if (curChar == 36)
  454. {
  455. if (kind > 58)
  456. kind = 58;
  457. jjCheckNAdd(5);
  458. }
  459. else if (curChar == 35)
  460. jjstateSet[jjnewStateCnt++] = 0;
  461. break;
  462. case 0:
  463. if (curChar == 35)
  464. jjCheckNAddTwoStates(1, 2);
  465. break;
  466. case 1:
  467. if ((0xfffffffbffffdbffL & l) != 0L)
  468. jjCheckNAddTwoStates(1, 2);
  469. break;
  470. case 2:
  471. if ((0x2400L & l) != 0L)
  472. kind = 1;
  473. break;
  474. case 4:
  475. if (curChar != 36)
  476. break;
  477. if (kind > 58)
  478. kind = 58;
  479. jjCheckNAdd(5);
  480. break;
  481. case 5:
  482. if ((0x3ff001000000000L & l) == 0L)
  483. break;
  484. if (kind > 58)
  485. kind = 58;
  486. jjCheckNAdd(5);
  487. break;
  488. case 6:
  489. if (curChar == 34)
  490. jjCheckNAddTwoStates(7, 8);
  491. break;
  492. case 7:
  493. if ((0xfffffffbffffdbffL & l) != 0L)
  494. jjCheckNAddTwoStates(7, 8);
  495. break;
  496. case 8:
  497. if (curChar == 34 && kind > 61)
  498. kind = 61;
  499. break;
  500. case 9:
  501. if (curChar == 39)
  502. jjCheckNAddTwoStates(10, 11);
  503. break;
  504. case 10:
  505. if ((0xffffff7fffffdbffL & l) != 0L)
  506. jjCheckNAddTwoStates(10, 11);
  507. break;
  508. case 11:
  509. if (curChar == 39 && kind > 61)
  510. kind = 61;
  511. break;
  512. case 12:
  513. if ((0x3ff000000000000L & l) == 0L)
  514. break;
  515. if (kind > 7)
  516. kind = 7;
  517. jjCheckNAddStates(0, 2);
  518. break;
  519. case 13:
  520. if ((0x3ff000000000000L & l) == 0L)
  521. break;
  522. if (kind > 7)
  523. kind = 7;
  524. jjCheckNAdd(13);
  525. break;
  526. case 14:
  527. if ((0x3ff000000000000L & l) != 0L)
  528. jjCheckNAddTwoStates(14, 15);
  529. break;
  530. case 15:
  531. if (curChar == 46)
  532. jjCheckNAdd(16);
  533. break;
  534. case 16:
  535. if ((0x3ff000000000000L & l) == 0L)
  536. break;
  537. if (kind > 8)
  538. kind = 8;
  539. jjCheckNAdd(16);
  540. break;
  541. default : break;
  542. }
  543. } while(i != startsAt);
  544. }
  545. else if (curChar < 128)
  546. {
  547. long l = 1L << (curChar & 077);
  548. MatchLoop: do
  549. {
  550. switch(jjstateSet[--i])
  551. {
  552. case 3:
  553. case 5:
  554. if ((0x7fffffe87fffffeL & l) == 0L)
  555. break;
  556. if (kind > 58)
  557. kind = 58;
  558. jjCheckNAdd(5);
  559. break;
  560. case 1:
  561. jjAddStates(3, 4);
  562. break;
  563. case 7:
  564. jjAddStates(5, 6);
  565. break;
  566. case 10:
  567. jjAddStates(7, 8);
  568. break;
  569. default : break;
  570. }
  571. } while(i != startsAt);
  572. }
  573. else
  574. {
  575. int i2 = (curChar & 0xff) >> 6;
  576. long l2 = 1L << (curChar & 077);
  577. MatchLoop: do
  578. {
  579. switch(jjstateSet[--i])
  580. {
  581. case 1:
  582. if ((jjbitVec0[i2] & l2) != 0L)
  583. jjAddStates(3, 4);
  584. break;
  585. case 7:
  586. if ((jjbitVec0[i2] & l2) != 0L)
  587. jjAddStates(5, 6);
  588. break;
  589. case 10:
  590. if ((jjbitVec0[i2] & l2) != 0L)
  591. jjAddStates(7, 8);
  592. break;
  593. default : break;
  594. }
  595. } while(i != startsAt);
  596. }
  597. if (kind != 0x7fffffff)
  598. {
  599. jjmatchedKind = kind;
  600. jjmatchedPos = curPos;
  601. kind = 0x7fffffff;
  602. }
  603. ++curPos;
  604. if ((i = jjnewStateCnt) == (startsAt = 17 - (jjnewStateCnt = startsAt)))
  605. return curPos;
  606. try { curChar = input_stream.readChar(); }
  607. catch(java.io.IOException e) { return curPos; }
  608. }
  609. }
  610. static final int[] jjnextStates = {
  611. 13, 14, 15, 1, 2, 7, 8, 10, 11,
  612. };
  613. public static final String[] jjstrLiteralImages = {
  614. "", null, null, null, null, null, null, null, null, "\173", "\175",
  615. "\145\155\160\164\171", "\50", "\51", "\163\151\172\145", "\75", "\174\174", "\157\162", "\46\46",
  616. "\141\156\144", "\174", "\136", "\46", "\75\75", "\145\161", "\41\75", "\156\145", "\74",
  617. "\154\164", "\76", "\147\164", "\74\75", "\154\145", "\76\75", "\147\145", "\53", "\55",
  618. "\52", "\57", "\144\151\166", "\45", "\155\157\144", "\176", "\41", "\156\157\164",
  619. "\156\165\154\154", "\164\162\165\145", "\146\141\154\163\145", "\73", "\151\146",
  620. "\145\154\163\145", "\167\150\151\154\145", "\146\157\162\145\141\143\150", "\151\156", "\54",
  621. "\133", "\135", "\56", null, null, null, null, };
  622. public static final String[] lexStateNames = {
  623. "DEFAULT",
  624. };
  625. static final long[] jjtoToken = {
  626. 0x27ffffffffffff81L,
  627. };
  628. static final long[] jjtoSkip = {
  629. 0x7eL,
  630. };
  631. private SimpleCharStream input_stream;
  632. private final int[] jjrounds = new int[17];
  633. private final int[] jjstateSet = new int[34];
  634. protected char curChar;
  635. public ParserTokenManager(SimpleCharStream stream)
  636. {
  637. if (SimpleCharStream.staticFlag)
  638. throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
  639. input_stream = stream;
  640. }
  641. public ParserTokenManager(SimpleCharStream stream, int lexState)
  642. {
  643. this(stream);
  644. SwitchTo(lexState);
  645. }
  646. public void ReInit(SimpleCharStream stream)
  647. {
  648. jjmatchedPos = jjnewStateCnt = 0;
  649. curLexState = defaultLexState;
  650. input_stream = stream;
  651. ReInitRounds();
  652. }
  653. private final void ReInitRounds()
  654. {
  655. int i;
  656. jjround = 0x80000001;
  657. for (i = 17; i-- > 0;)
  658. jjrounds[i] = 0x80000000;
  659. }
  660. public void ReInit(SimpleCharStream stream, int lexState)
  661. {
  662. ReInit(stream);
  663. SwitchTo(lexState);
  664. }
  665. public void SwitchTo(int lexState)
  666. {
  667. if (lexState >= 1 || lexState < 0)
  668. throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
  669. else
  670. curLexState = lexState;
  671. }
  672. private final Token jjFillToken()
  673. {
  674. Token t = Token.newToken(jjmatchedKind);
  675. t.kind = jjmatchedKind;
  676. String im = jjstrLiteralImages[jjmatchedKind];
  677. t.image = (im == null) ? input_stream.GetImage() : im;
  678. t.beginLine = input_stream.getBeginLine();
  679. t.beginColumn = input_stream.getBeginColumn();
  680. t.endLine = input_stream.getEndLine();
  681. t.endColumn = input_stream.getEndColumn();
  682. return t;
  683. }
  684. int curLexState = 0;
  685. int defaultLexState = 0;
  686. int jjnewStateCnt;
  687. int jjround;
  688. int jjmatchedPos;
  689. int jjmatchedKind;
  690. public final Token getNextToken()
  691. {
  692. int kind;
  693. Token specialToken = null;
  694. Token matchedToken;
  695. int curPos = 0;
  696. EOFLoop :
  697. for (;;)
  698. {
  699. try
  700. {
  701. curChar = input_stream.BeginToken();
  702. }
  703. catch(java.io.IOException e)
  704. {
  705. jjmatchedKind = 0;
  706. matchedToken = jjFillToken();
  707. return matchedToken;
  708. }
  709. try { input_stream.backup(0);
  710. while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
  711. curChar = input_stream.BeginToken();
  712. }
  713. catch (java.io.IOException e1) { continue EOFLoop; }
  714. jjmatchedKind = 0x7fffffff;
  715. jjmatchedPos = 0;
  716. curPos = jjMoveStringLiteralDfa0_0();
  717. if (jjmatchedKind != 0x7fffffff)
  718. {
  719. if (jjmatchedPos + 1 < curPos)
  720. input_stream.backup(curPos - jjmatchedPos - 1);
  721. if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
  722. {
  723. matchedToken = jjFillToken();
  724. return matchedToken;
  725. }
  726. else
  727. {
  728. continue EOFLoop;
  729. }
  730. }
  731. int error_line = input_stream.getEndLine();
  732. int error_column = input_stream.getEndColumn();
  733. String error_after = null;
  734. boolean EOFSeen = false;
  735. try { input_stream.readChar(); input_stream.backup(1); }
  736. catch (java.io.IOException e1) {
  737. EOFSeen = true;
  738. error_after = curPos <= 1 ? "" : input_stream.GetImage();
  739. if (curChar == '\n' || curChar == '\r') {
  740. error_line++;
  741. error_column = 0;
  742. }
  743. else
  744. error_column++;
  745. }
  746. if (!EOFSeen) {
  747. input_stream.backup(1);
  748. error_after = curPos <= 1 ? "" : input_stream.GetImage();
  749. }
  750. throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
  751. }
  752. }
  753. }