1 /* UtilParserTokenManager.java */
2 /* Generated By:JavaCC: Do not edit this line. UtilParserTokenManager.java */
3 package edu.uci.eecs.utilParser;
4 import edu.uci.eecs.specExtraction.FunctionHeader;
5 import edu.uci.eecs.specExtraction.QualifiedName;
6 import edu.uci.eecs.specExtraction.VariableDeclaration;
7 //import edu.uci.eecs.specExtraction.WrongAnnotationException;
9 import java.io.FileInputStream;
10 import java.io.FileNotFoundException;
11 import java.io.InputStream;
12 import java.io.ByteArrayInputStream;
14 import java.util.ArrayList;
17 @SuppressWarnings("unused")public class UtilParserTokenManager implements UtilParserConstants {
20 public java.io.PrintStream debugStream = System.out;
21 /** Set debug output. */
22 public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
23 private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){
27 if ((active0 & 0x8000000L) != 0L)
29 if ((active0 & 0x20000L) != 0L)
31 if ((active0 & 0x3fc0L) != 0L)
38 if ((active0 & 0x3fc0L) != 0L)
40 if (jjmatchedPos != 1)
49 if ((active0 & 0x1fc0L) != 0L)
55 if ((active0 & 0x2000L) != 0L)
59 if ((active0 & 0x1fc0L) != 0L)
67 if ((active0 & 0x1e80L) != 0L)
73 if ((active0 & 0x140L) != 0L)
77 if ((active0 & 0x600L) != 0L)
83 if ((active0 & 0x1880L) != 0L)
87 if ((active0 & 0x600L) != 0L)
98 private final int jjStartNfa_0(int pos, long active0, long active1){
99 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
101 private int jjStopAtPos(int pos, int kind)
103 jjmatchedKind = kind;
107 private int jjMoveStringLiteralDfa0_0(){
112 return jjMoveStringLiteralDfa1_0(0x10L);
115 return jjMoveStringLiteralDfa1_0(0x400000000000L);
117 return jjStartNfaWithStates_0(0, 17, 85);
119 return jjStopAtPos(0, 28);
122 return jjMoveStringLiteralDfa1_0(0x1000000000000000L);
125 return jjMoveStringLiteralDfa1_0(0x8000800000000000L);
127 return jjStopAtPos(0, 21);
129 return jjStopAtPos(0, 22);
132 return jjMoveStringLiteralDfa1_0(0x400000000000000L);
135 return jjMoveStringLiteralDfa1_0(0x100001000000000L);
137 return jjStopAtPos(0, 26);
140 return jjMoveStringLiteralDfa1_0(0x200004002000000L);
142 return jjStartNfaWithStates_0(0, 27, 24);
145 return jjMoveStringLiteralDfa1_0(0x800000000000000L);
148 return jjMoveStringLiteralDfa1_0(0x10000000000000L);
150 return jjStopAtPos(0, 64);
153 return jjMoveStringLiteralDfa1_0(0x20100000000000L);
156 return jjMoveStringLiteralDfa1_0(0x200000000000L);
159 return jjMoveStringLiteralDfa1_0(0xc0080000000000L);
161 return jjStopAtPos(0, 50);
163 return jjStopAtPos(0, 18);
165 return jjStopAtPos(0, 40);
167 return jjStopAtPos(0, 19);
170 return jjMoveStringLiteralDfa1_0(0x2000000000000000L);
172 return jjMoveStringLiteralDfa1_0(0x140L);
174 return jjMoveStringLiteralDfa1_0(0x2000L);
176 return jjMoveStringLiteralDfa1_0(0x800L);
178 return jjMoveStringLiteralDfa1_0(0x1080L);
180 return jjMoveStringLiteralDfa1_0(0x400L);
182 return jjMoveStringLiteralDfa1_0(0x200L);
184 return jjStopAtPos(0, 23);
187 return jjMoveStringLiteralDfa1_0(0x4001000000000000L);
189 return jjStopAtPos(0, 24);
191 return jjStopAtPos(0, 30);
193 return jjMoveNfa_0(0, 0);
196 private int jjMoveStringLiteralDfa1_0(long active0){
197 try { curChar = input_stream.readChar(); }
198 catch(java.io.IOException e) {
199 jjStopStringLiteralDfa_0(0, active0, 0L);
205 if ((active0 & 0x10L) != 0L)
206 return jjStopAtPos(1, 4);
209 if ((active0 & 0x800000000000L) != 0L)
210 return jjStopAtPos(1, 47);
213 if ((active0 & 0x1000000000L) != 0L)
214 return jjStopAtPos(1, 36);
217 if ((active0 & 0x4000000000L) != 0L)
218 return jjStopAtPos(1, 38);
221 if ((active0 & 0x10000000000000L) != 0L)
222 return jjStopAtPos(1, 52);
225 if ((active0 & 0x20000000000000L) != 0L)
226 return jjStopAtPos(1, 53);
229 if ((active0 & 0x80000000000L) != 0L)
230 return jjStopAtPos(1, 43);
231 else if ((active0 & 0x100000000000L) != 0L)
232 return jjStopAtPos(1, 44);
233 else if ((active0 & 0x200000000000L) != 0L)
234 return jjStopAtPos(1, 45);
235 else if ((active0 & 0x400000000000L) != 0L)
236 return jjStopAtPos(1, 46);
237 else if ((active0 & 0x100000000000000L) != 0L)
238 return jjStopAtPos(1, 56);
239 else if ((active0 & 0x200000000000000L) != 0L)
240 return jjStopAtPos(1, 57);
241 else if ((active0 & 0x400000000000000L) != 0L)
242 return jjStopAtPos(1, 58);
243 else if ((active0 & 0x800000000000000L) != 0L)
244 return jjStopAtPos(1, 59);
245 else if ((active0 & 0x1000000000000000L) != 0L)
246 return jjStopAtPos(1, 60);
247 else if ((active0 & 0x2000000000000000L) != 0L)
248 return jjStopAtPos(1, 61);
249 else if ((active0 & 0x4000000000000000L) != 0L)
250 return jjStopAtPos(1, 62);
251 else if ((active0 & 0x8000000000000000L) != 0L)
252 return jjStopAtPos(1, 63);
255 if ((active0 & 0x2000000L) != 0L)
256 return jjStopAtPos(1, 25);
257 else if ((active0 & 0x40000000000000L) != 0L)
262 return jjMoveStringLiteralDfa2_0(active0, 0x80000000000000L);
264 return jjMoveStringLiteralDfa2_0(active0, 0x400L);
266 return jjMoveStringLiteralDfa2_0(active0, 0x100L);
268 return jjMoveStringLiteralDfa2_0(active0, 0xa00L);
270 return jjMoveStringLiteralDfa2_0(active0, 0x2040L);
272 return jjMoveStringLiteralDfa2_0(active0, 0x1080L);
274 if ((active0 & 0x1000000000000L) != 0L)
275 return jjStopAtPos(1, 48);
280 return jjStartNfa_0(0, active0, 0L);
282 private int jjMoveStringLiteralDfa2_0(long old0, long active0){
283 if (((active0 &= old0)) == 0L)
284 return jjStartNfa_0(0, old0, 0L);
285 try { curChar = input_stream.readChar(); }
286 catch(java.io.IOException e) {
287 jjStopStringLiteralDfa_0(1, active0, 0L);
293 if ((active0 & 0x80000000000000L) != 0L)
294 return jjStopAtPos(2, 55);
297 return jjMoveStringLiteralDfa3_0(active0, 0x1100L);
299 return jjMoveStringLiteralDfa3_0(active0, 0x800L);
301 return jjMoveStringLiteralDfa3_0(active0, 0x400L);
303 return jjMoveStringLiteralDfa3_0(active0, 0x40L);
305 if ((active0 & 0x2000L) != 0L)
306 return jjStartNfaWithStates_0(2, 13, 1);
307 return jjMoveStringLiteralDfa3_0(active0, 0x80L);
309 return jjMoveStringLiteralDfa3_0(active0, 0x200L);
313 return jjStartNfa_0(1, active0, 0L);
315 private int jjMoveStringLiteralDfa3_0(long old0, long active0){
316 if (((active0 &= old0)) == 0L)
317 return jjStartNfa_0(1, old0, 0L);
318 try { curChar = input_stream.readChar(); }
319 catch(java.io.IOException e) {
320 jjStopStringLiteralDfa_0(2, active0, 0L);
326 return jjMoveStringLiteralDfa4_0(active0, 0xa00L);
328 return jjMoveStringLiteralDfa4_0(active0, 0x400L);
330 return jjMoveStringLiteralDfa4_0(active0, 0x140L);
332 return jjMoveStringLiteralDfa4_0(active0, 0x1000L);
334 return jjMoveStringLiteralDfa4_0(active0, 0x80L);
338 return jjStartNfa_0(2, active0, 0L);
340 private int jjMoveStringLiteralDfa4_0(long old0, long active0){
341 if (((active0 &= old0)) == 0L)
342 return jjStartNfa_0(2, old0, 0L);
343 try { curChar = input_stream.readChar(); }
344 catch(java.io.IOException e) {
345 jjStopStringLiteralDfa_0(3, active0, 0L);
351 return jjMoveStringLiteralDfa5_0(active0, 0x80L);
353 return jjMoveStringLiteralDfa5_0(active0, 0x200L);
355 return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
357 return jjMoveStringLiteralDfa5_0(active0, 0x400L);
359 return jjMoveStringLiteralDfa5_0(active0, 0x800L);
361 if ((active0 & 0x100L) != 0L)
362 return jjStartNfaWithStates_0(4, 8, 1);
365 if ((active0 & 0x40L) != 0L)
366 return jjStartNfaWithStates_0(4, 6, 1);
371 return jjStartNfa_0(3, active0, 0L);
373 private int jjMoveStringLiteralDfa5_0(long old0, long active0){
374 if (((active0 &= old0)) == 0L)
375 return jjStartNfa_0(3, old0, 0L);
376 try { curChar = input_stream.readChar(); }
377 catch(java.io.IOException e) {
378 jjStopStringLiteralDfa_0(4, active0, 0L);
384 return jjMoveStringLiteralDfa6_0(active0, 0x400L);
386 if ((active0 & 0x1000L) != 0L)
387 return jjStartNfaWithStates_0(5, 12, 1);
390 if ((active0 & 0x800L) != 0L)
391 return jjStartNfaWithStates_0(5, 11, 1);
394 return jjMoveStringLiteralDfa6_0(active0, 0x200L);
396 if ((active0 & 0x80L) != 0L)
397 return jjStartNfaWithStates_0(5, 7, 1);
402 return jjStartNfa_0(4, active0, 0L);
404 private int jjMoveStringLiteralDfa6_0(long old0, long active0){
405 if (((active0 &= old0)) == 0L)
406 return jjStartNfa_0(4, old0, 0L);
407 try { curChar = input_stream.readChar(); }
408 catch(java.io.IOException e) {
409 jjStopStringLiteralDfa_0(5, active0, 0L);
415 return jjMoveStringLiteralDfa7_0(active0, 0x200L);
417 return jjMoveStringLiteralDfa7_0(active0, 0x400L);
421 return jjStartNfa_0(5, active0, 0L);
423 private int jjMoveStringLiteralDfa7_0(long old0, long active0){
424 if (((active0 &= old0)) == 0L)
425 return jjStartNfa_0(5, old0, 0L);
426 try { curChar = input_stream.readChar(); }
427 catch(java.io.IOException e) {
428 jjStopStringLiteralDfa_0(6, active0, 0L);
434 if ((active0 & 0x200L) != 0L)
435 return jjStartNfaWithStates_0(7, 9, 1);
438 if ((active0 & 0x400L) != 0L)
439 return jjStartNfaWithStates_0(7, 10, 1);
444 return jjStartNfa_0(6, active0, 0L);
446 private int jjStartNfaWithStates_0(int pos, int kind, int state)
448 jjmatchedKind = kind;
450 try { curChar = input_stream.readChar(); }
451 catch(java.io.IOException e) { return pos + 1; }
452 return jjMoveNfa_0(state, pos + 1);
454 static final long[] jjbitVec0 = {
455 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
457 static final long[] jjbitVec2 = {
458 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
460 private int jjMoveNfa_0(int startState, int curPos)
465 jjstateSet[0] = startState;
466 int kind = 0x7fffffff;
469 if (++jjround == 0x7fffffff)
473 long l = 1L << curChar;
476 switch(jjstateSet[--i])
479 if ((0x3ff000000000000L & l) != 0L)
480 { jjCheckNAddStates(0, 6); }
481 else if (curChar == 35)
482 { jjCheckNAddStates(7, 10); }
483 else if (curChar == 46)
485 else if (curChar == 39)
486 { jjAddStates(11, 12); }
487 else if (curChar == 34)
488 { jjCheckNAddStates(13, 15); }
489 if ((0x3fe000000000000L & l) != 0L)
493 { jjCheckNAddTwoStates(21, 22); }
495 else if (curChar == 48)
499 { jjCheckNAddStates(16, 20); }
503 if ((0xfffffffffffffbffL & l) != 0L)
509 if ((0x100000200L & l) != 0L)
510 { jjCheckNAddTwoStates(66, 67); }
511 if ((0x100000200L & l) != 0L)
512 { jjCheckNAddTwoStates(45, 65); }
515 if ((0x3ff000000000000L & l) == 0L)
519 jjstateSet[jjnewStateCnt++] = 1;
523 { jjCheckNAddStates(13, 15); }
526 if ((0xfffffffbffffdbffL & l) != 0L)
527 { jjCheckNAddStates(13, 15); }
530 if ((0x8400000000L & l) != 0L)
531 { jjCheckNAddStates(13, 15); }
534 if (curChar == 34 && kind > 65)
538 if ((0xff000000000000L & l) != 0L)
539 { jjCheckNAddStates(21, 24); }
542 if ((0xff000000000000L & l) != 0L)
543 { jjCheckNAddStates(13, 15); }
546 if ((0xf000000000000L & l) != 0L)
547 jjstateSet[jjnewStateCnt++] = 10;
550 if ((0xff000000000000L & l) != 0L)
555 { jjAddStates(11, 12); }
558 if ((0xffffff7fffffdbffL & l) != 0L)
562 if (curChar == 39 && kind > 66)
566 if ((0x8400000000L & l) != 0L)
570 if ((0xff000000000000L & l) != 0L)
571 { jjCheckNAddTwoStates(17, 13); }
574 if ((0xff000000000000L & l) != 0L)
578 if ((0xf000000000000L & l) != 0L)
579 jjstateSet[jjnewStateCnt++] = 19;
582 if ((0xff000000000000L & l) != 0L)
586 if ((0x3fe000000000000L & l) == 0L)
590 { jjCheckNAddTwoStates(21, 22); }
593 if ((0x3ff000000000000L & l) == 0L)
597 { jjCheckNAddTwoStates(21, 22); }
604 if ((0x3ff000000000000L & l) == 0L)
608 { jjCheckNAddStates(25, 27); }
611 if ((0x280000000000L & l) != 0L)
615 if ((0x3ff000000000000L & l) == 0L)
619 { jjCheckNAddTwoStates(27, 28); }
622 if ((0x3ff000000000000L & l) != 0L)
623 { jjCheckNAddStates(0, 6); }
626 if ((0x3ff000000000000L & l) != 0L)
627 { jjCheckNAddStates(28, 30); }
630 if ((0x280000000000L & l) != 0L)
634 if ((0x3ff000000000000L & l) != 0L)
635 { jjCheckNAddTwoStates(33, 28); }
638 if ((0x3ff000000000000L & l) != 0L)
639 { jjCheckNAddTwoStates(34, 35); }
642 if ((0x280000000000L & l) != 0L)
646 if ((0x3ff000000000000L & l) == 0L)
650 { jjCheckNAddTwoStates(37, 28); }
653 if ((0x3ff000000000000L & l) != 0L)
654 { jjCheckNAddTwoStates(38, 39); }
661 { jjCheckNAddStates(31, 33); }
664 if ((0x3ff000000000000L & l) == 0L)
668 { jjCheckNAddStates(31, 33); }
671 if ((0x280000000000L & l) != 0L)
675 if ((0x3ff000000000000L & l) == 0L)
679 { jjCheckNAddTwoStates(43, 28); }
683 { jjCheckNAddStates(7, 10); }
686 if ((0x100000200L & l) != 0L)
687 { jjCheckNAddTwoStates(45, 65); }
690 if ((0x100000200L & l) != 0L)
691 { jjAddStates(34, 36); }
695 { jjCheckNAddStates(37, 39); }
698 if ((0xfffffffbffffdbffL & l) != 0L)
699 { jjCheckNAddStates(37, 39); }
702 if ((0x8400000000L & l) != 0L)
703 { jjCheckNAddStates(37, 39); }
706 if (curChar == 34 && kind > 78)
710 if ((0xff000000000000L & l) != 0L)
711 { jjCheckNAddStates(40, 43); }
714 if ((0xff000000000000L & l) != 0L)
715 { jjCheckNAddStates(37, 39); }
718 if ((0xf000000000000L & l) != 0L)
719 jjstateSet[jjnewStateCnt++] = 56;
722 if ((0xff000000000000L & l) != 0L)
731 { jjCheckNAddTwoStates(58, 59); }
734 if (curChar == 62 && kind > 78)
738 if ((0x100000200L & l) != 0L)
739 { jjCheckNAddTwoStates(66, 67); }
742 if ((0xfffffffffffffbffL & l) == 0L)
753 { jjCheckNAddStates(16, 20); }
756 if ((0x3ff000000000000L & l) == 0L)
760 { jjCheckNAddTwoStates(70, 22); }
763 if ((0xff000000000000L & l) == 0L)
767 { jjCheckNAddTwoStates(71, 22); }
770 if ((0x3ff000000000000L & l) != 0L)
771 { jjAddStates(44, 45); }
778 if ((0x3ff000000000000L & l) != 0L)
779 { jjCheckNAddTwoStates(75, 76); }
782 if ((0x280000000000L & l) != 0L)
786 if ((0x3ff000000000000L & l) == 0L)
790 { jjCheckNAddTwoStates(78, 28); }
793 if ((0x3ff000000000000L & l) != 0L)
794 { jjCheckNAddStates(46, 48); }
801 if ((0x280000000000L & l) != 0L)
805 if ((0x3ff000000000000L & l) == 0L)
809 { jjCheckNAddTwoStates(84, 28); }
813 } while(i != startsAt);
815 else if (curChar < 128)
817 long l = 1L << (curChar & 077);
820 switch(jjstateSet[--i])
824 if ((0x7fffffe87fffffeL & l) == 0L)
835 jjstateSet[jjnewStateCnt++] = 64;
838 if ((0xffffffffefffffffL & l) != 0L)
839 { jjCheckNAddStates(13, 15); }
843 { jjAddStates(49, 51); }
846 if ((0x14404410000000L & l) != 0L)
847 { jjCheckNAddStates(13, 15); }
850 if ((0xffffffffefffffffL & l) != 0L)
855 { jjAddStates(52, 54); }
858 if ((0x14404410000000L & l) != 0L)
862 if ((0x100000001000L & l) != 0L && kind > 67)
866 if ((0x2000000020L & l) != 0L)
867 { jjAddStates(55, 56); }
870 if ((0x5000000050L & l) != 0L && kind > 71)
874 if ((0x2000000020L & l) != 0L)
875 { jjAddStates(57, 58); }
878 if ((0x2000000020L & l) != 0L)
879 { jjAddStates(59, 60); }
882 if ((0x2000000020L & l) != 0L)
883 { jjAddStates(61, 62); }
887 jjstateSet[jjnewStateCnt++] = 47;
890 if ((0xffffffffefffffffL & l) != 0L)
891 { jjCheckNAddStates(37, 39); }
895 { jjAddStates(63, 65); }
898 if ((0x14404410000000L & l) != 0L)
899 { jjCheckNAddStates(37, 39); }
902 if ((0x7fffffe07fffffeL & l) != 0L)
903 { jjAddStates(66, 67); }
907 jjstateSet[jjnewStateCnt++] = 46;
911 jjstateSet[jjnewStateCnt++] = 60;
915 jjstateSet[jjnewStateCnt++] = 61;
919 jjstateSet[jjnewStateCnt++] = 62;
923 jjstateSet[jjnewStateCnt++] = 63;
927 jjstateSet[jjnewStateCnt++] = 64;
935 if ((0x100000001000000L & l) != 0L)
939 if ((0x7e0000007eL & l) == 0L)
943 { jjCheckNAddTwoStates(70, 22); }
946 if ((0x100000001000000L & l) != 0L)
947 { jjCheckNAddTwoStates(73, 74); }
950 if ((0x7e0000007eL & l) != 0L)
951 { jjCheckNAddTwoStates(73, 74); }
954 if ((0x7e0000007eL & l) != 0L)
955 { jjAddStates(68, 69); }
958 if ((0x1000000010000L & l) != 0L)
959 { jjAddStates(70, 71); }
962 if ((0x100000001000000L & l) != 0L)
966 if ((0x7e0000007eL & l) != 0L)
967 { jjCheckNAddStates(46, 48); }
970 if ((0x1000000010000L & l) != 0L)
971 { jjAddStates(72, 73); }
975 } while(i != startsAt);
979 int hiByte = (curChar >> 8);
980 int i1 = hiByte >> 6;
981 long l1 = 1L << (hiByte & 077);
982 int i2 = (curChar & 0xff) >> 6;
983 long l2 = 1L << (curChar & 077);
986 switch(jjstateSet[--i])
990 if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
997 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
998 { jjAddStates(13, 15); }
1001 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1002 jjstateSet[jjnewStateCnt++] = 13;
1005 if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1006 { jjAddStates(37, 39); }
1008 default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
1010 } while(i != startsAt);
1012 if (kind != 0x7fffffff)
1014 jjmatchedKind = kind;
1015 jjmatchedPos = curPos;
1019 if ((i = jjnewStateCnt) == (startsAt = 85 - (jjnewStateCnt = startsAt)))
1021 try { curChar = input_stream.readChar(); }
1022 catch(java.io.IOException e) { return curPos; }
1025 static final int[] jjnextStates = {
1026 30, 31, 28, 34, 35, 38, 39, 45, 65, 66, 67, 12, 14, 3, 4, 6,
1027 69, 71, 22, 72, 79, 3, 4, 8, 6, 24, 25, 28, 30, 31, 28, 40,
1028 41, 28, 47, 48, 57, 49, 50, 52, 49, 50, 54, 52, 73, 74, 80, 81,
1029 82, 5, 7, 9, 15, 16, 18, 26, 27, 32, 33, 36, 37, 42, 43, 51,
1030 53, 55, 58, 59, 75, 76, 77, 78, 83, 84,
1032 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
1037 return ((jjbitVec2[i2] & l2) != 0L);
1039 if ((jjbitVec0[i1] & l1) != 0L)
1045 /** Token literal values. */
1046 public static final String[] jjstrLiteralImages = {
1047 "", null, null, null, null, null, "\143\157\156\163\164",
1048 "\163\164\162\165\143\164", "\143\154\141\163\163", "\165\156\163\151\147\156\145\144",
1049 "\164\145\155\160\154\141\164\145", "\151\156\154\151\156\145", "\163\164\141\164\151\143", "\146\157\162", null,
1050 null, null, "\43", "\133", "\135", "\75", "\50", "\51", "\173", "\175", "\55\76",
1051 "\54", "\56", "\44", "\52", "\176", "\41", "\46", "\174", "\45", "\53", "\53\53",
1052 "\55", "\55\55", "\57", "\134", "\74", "\76", "\76\75", "\74\75", "\75\75", "\41\75",
1053 "\46\46", "\174\174", "\136", "\77", "\72", "\72\72", "\74\74", "\76\76", "\76\76\76",
1054 "\53\75", "\55\75", "\52\75", "\57\75", "\45\75", "\136\75", "\174\75", "\46\75", "\73",
1055 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1057 protected Token jjFillToken()
1060 final String curTokenImage;
1061 final int beginLine;
1063 final int beginColumn;
1064 final int endColumn;
1065 String im = jjstrLiteralImages[jjmatchedKind];
1066 curTokenImage = (im == null) ? input_stream.GetImage() : im;
1067 beginLine = input_stream.getBeginLine();
1068 beginColumn = input_stream.getBeginColumn();
1069 endLine = input_stream.getEndLine();
1070 endColumn = input_stream.getEndColumn();
1071 t = Token.newToken(jjmatchedKind, curTokenImage);
1073 t.beginLine = beginLine;
1074 t.endLine = endLine;
1075 t.beginColumn = beginColumn;
1076 t.endColumn = endColumn;
1081 int curLexState = 0;
1082 int defaultLexState = 0;
1088 /** Get the next Token. */
1089 public Token getNextToken()
1099 curChar = input_stream.BeginToken();
1101 catch(java.io.IOException e)
1105 matchedToken = jjFillToken();
1106 return matchedToken;
1109 try { input_stream.backup(0);
1110 while (curChar <= 32 && (0x100000600L & (1L << curChar)) != 0L)
1111 curChar = input_stream.BeginToken();
1113 catch (java.io.IOException e1) { continue EOFLoop; }
1114 jjmatchedKind = 0x7fffffff;
1116 curPos = jjMoveStringLiteralDfa0_0();
1117 if (jjmatchedKind != 0x7fffffff)
1119 if (jjmatchedPos + 1 < curPos)
1120 input_stream.backup(curPos - jjmatchedPos - 1);
1121 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1123 matchedToken = jjFillToken();
1124 return matchedToken;
1131 int error_line = input_stream.getEndLine();
1132 int error_column = input_stream.getEndColumn();
1133 String error_after = null;
1134 boolean EOFSeen = false;
1135 try { input_stream.readChar(); input_stream.backup(1); }
1136 catch (java.io.IOException e1) {
1138 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1139 if (curChar == '\n' || curChar == '\r') {
1147 input_stream.backup(1);
1148 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1150 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1154 private void jjCheckNAdd(int state)
1156 if (jjrounds[state] != jjround)
1158 jjstateSet[jjnewStateCnt++] = state;
1159 jjrounds[state] = jjround;
1162 private void jjAddStates(int start, int end)
1165 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
1166 } while (start++ != end);
1168 private void jjCheckNAddTwoStates(int state1, int state2)
1170 jjCheckNAdd(state1);
1171 jjCheckNAdd(state2);
1174 private void jjCheckNAddStates(int start, int end)
1177 jjCheckNAdd(jjnextStates[start]);
1178 } while (start++ != end);
1182 public UtilParserTokenManager(JavaCharStream stream){
1184 if (JavaCharStream.staticFlag)
1185 throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1187 input_stream = stream;
1191 public UtilParserTokenManager (JavaCharStream stream, int lexState){
1196 /** Reinitialise parser. */
1197 public void ReInit(JavaCharStream stream)
1199 jjmatchedPos = jjnewStateCnt = 0;
1200 curLexState = defaultLexState;
1201 input_stream = stream;
1205 private void ReInitRounds()
1208 jjround = 0x80000001;
1209 for (i = 85; i-- > 0;)
1210 jjrounds[i] = 0x80000000;
1213 /** Reinitialise parser. */
1214 public void ReInit(JavaCharStream stream, int lexState)
1220 /** Switch to specified lex state. */
1221 public void SwitchTo(int lexState)
1223 if (lexState >= 1 || lexState < 0)
1224 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1226 curLexState = lexState;
1229 /** Lexer state names. */
1230 public static final String[] lexStateNames = {
1233 static final long[] jjtoToken = {
1234 0xffffffffffff3fc1L, 0xc08fL,
1236 static final long[] jjtoSkip = {
1239 protected JavaCharStream input_stream;
1241 private final int[] jjrounds = new int[85];
1242 private final int[] jjstateSet = new int[2 * 85];
1245 protected char curChar;