1 /* Generated By:JavaCC: Do not edit this line. PHPParserTokenManager.java */
3 import org.eclipse.core.resources.IFile;
4 import org.eclipse.core.resources.IMarker;
5 import org.eclipse.core.runtime.CoreException;
6 import org.eclipse.ui.texteditor.MarkerUtilities;
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import java.util.Hashtable;
9 import java.io.StringReader;
10 import java.text.MessageFormat;
11 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
12 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
13 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
14 import net.sourceforge.phpdt.internal.compiler.parser.PHPSegmentWithChildren;
15 import net.sourceforge.phpdt.internal.compiler.parser.PHPFunctionDeclaration;
16 import net.sourceforge.phpdt.internal.compiler.parser.PHPClassDeclaration;
17 import net.sourceforge.phpdt.internal.compiler.parser.PHPVarDeclaration;
18 import net.sourceforge.phpdt.internal.compiler.parser.PHPReqIncDeclaration;
20 public class PHPParserTokenManager implements PHPParserConstants
22 public static java.io.PrintStream debugStream = System.out;
23 public static void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
24 private static final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2)
32 private static final int jjStartNfa_0(int pos, long active0, long active1, long active2)
34 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1);
36 static private final int jjStopAtPos(int pos, int kind)
42 static private final int jjStartNfaWithStates_0(int pos, int kind, int state)
46 try { curChar = input_stream.readChar(); }
47 catch(java.io.IOException e) { return pos + 1; }
48 return jjMoveNfa_0(state, pos + 1);
50 static private final int jjMoveStringLiteralDfa0_0()
55 return jjMoveStringLiteralDfa1_0(0x8000000000000000L);
57 return jjMoveNfa_0(0, 0);
60 static private final int jjMoveStringLiteralDfa1_0(long active1)
62 try { curChar = input_stream.readChar(); }
63 catch(java.io.IOException e) {
64 jjStopStringLiteralDfa_0(0, 0L, active1, 0L);
70 if ((active1 & 0x8000000000000000L) != 0L)
71 return jjStopAtPos(1, 127);
76 return jjStartNfa_0(0, 0L, active1, 0L);
78 static private final void jjCheckNAdd(int state)
80 if (jjrounds[state] != jjround)
82 jjstateSet[jjnewStateCnt++] = state;
83 jjrounds[state] = jjround;
86 static private final void jjAddStates(int start, int end)
89 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
90 } while (start++ != end);
92 static private final void jjCheckNAddTwoStates(int state1, int state2)
97 static private final void jjCheckNAddStates(int start, int end)
100 jjCheckNAdd(jjnextStates[start]);
101 } while (start++ != end);
103 static private final void jjCheckNAddStates(int start)
105 jjCheckNAdd(jjnextStates[start]);
106 jjCheckNAdd(jjnextStates[start + 1]);
108 static private final int jjMoveNfa_0(int startState, int curPos)
114 jjstateSet[0] = startState;
115 int j, kind = 0x7fffffff;
118 if (++jjround == 0x7fffffff)
122 long l = 1L << curChar;
125 switch(jjstateSet[--i])
133 jjstateSet[jjnewStateCnt++] = 3;
136 if (curChar == 63 && kind > 1)
141 } while(i != startsAt);
143 else if (curChar < 128)
145 long l = 1L << (curChar & 077);
148 switch(jjstateSet[--i])
151 if ((0x1000000010000L & l) != 0L && kind > 1)
155 if ((0x10000000100L & l) != 0L)
156 jjstateSet[jjnewStateCnt++] = 1;
159 if ((0x1000000010000L & l) != 0L)
160 jjstateSet[jjnewStateCnt++] = 2;
164 } while(i != startsAt);
168 int i2 = (curChar & 0xff) >> 6;
169 long l2 = 1L << (curChar & 077);
172 switch(jjstateSet[--i])
176 } while(i != startsAt);
178 if (kind != 0x7fffffff)
180 jjmatchedKind = kind;
181 jjmatchedPos = curPos;
185 if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt)))
187 try { curChar = input_stream.readChar(); }
188 catch(java.io.IOException e) { return curPos; }
191 static private final int jjMoveStringLiteralDfa0_4()
196 return jjMoveStringLiteralDfa1_4(0x4000L);
201 static private final int jjMoveStringLiteralDfa1_4(long active0)
203 try { curChar = input_stream.readChar(); }
204 catch(java.io.IOException e) {
210 if ((active0 & 0x4000L) != 0L)
211 return jjStopAtPos(1, 14);
218 static private final int jjMoveStringLiteralDfa0_2()
220 return jjMoveNfa_2(0, 0);
222 static private final int jjMoveNfa_2(int startState, int curPos)
228 jjstateSet[0] = startState;
229 int j, kind = 0x7fffffff;
232 if (++jjround == 0x7fffffff)
236 long l = 1L << curChar;
239 switch(jjstateSet[--i])
242 if ((0x2400L & l) != 0L)
247 else if (curChar == 63)
248 jjstateSet[jjnewStateCnt++] = 3;
250 jjstateSet[jjnewStateCnt++] = 1;
253 if (curChar == 10 && kind > 12)
258 jjstateSet[jjnewStateCnt++] = 1;
266 jjstateSet[jjnewStateCnt++] = 3;
270 } while(i != startsAt);
272 else if (curChar < 128)
274 long l = 1L << (curChar & 077);
277 switch(jjstateSet[--i])
281 } while(i != startsAt);
285 int i2 = (curChar & 0xff) >> 6;
286 long l2 = 1L << (curChar & 077);
289 switch(jjstateSet[--i])
293 } while(i != startsAt);
295 if (kind != 0x7fffffff)
297 jjmatchedKind = kind;
298 jjmatchedPos = curPos;
302 if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt)))
304 try { curChar = input_stream.readChar(); }
305 catch(java.io.IOException e) { return curPos; }
308 private static final int jjStopStringLiteralDfa_1(int pos, long active0, long active1)
313 if ((active0 & 0xfffffffc7fff0000L) != 0L)
318 if ((active0 & 0xa00L) != 0L || (active1 & 0x20040000000000L) != 0L)
320 if ((active1 & 0x1000000L) != 0L)
322 if ((active1 & 0x200000000400000L) != 0L)
326 if ((active0 & 0x800L) != 0L)
328 if ((active0 & 0x4400008000080000L) != 0L)
330 if ((active0 & 0xbbffff7c7ff70000L) != 0L)
332 if (jjmatchedPos != 1)
341 if ((active0 & 0xb000140000040000L) != 0L)
343 if ((active0 & 0xfffeb7c7ff30000L) != 0L)
345 if (jjmatchedPos != 2)
354 if ((active0 & 0x2c79c3747ec30000L) != 0L)
356 if (jjmatchedPos != 3)
363 if ((active0 & 0x386280801300000L) != 0L)
367 if ((active0 & 0x808821400c10000L) != 0L)
369 if ((active0 & 0x257141607e120000L) != 0L)
377 if ((active0 & 0x461400060100000L) != 0L)
379 if ((active0 & 0x211001601e020000L) != 0L)
387 if ((active0 & 0x210001401e000000L) != 0L)
389 if ((active0 & 0x10002000020000L) != 0L)
391 if (jjmatchedPos != 6)
400 if ((active0 & 0x10002000020000L) != 0L)
402 if ((active0 & 0x18000000L) != 0L)
410 if ((active0 & 0x18000000L) != 0L)
418 if ((active0 & 0x18000000L) != 0L)
426 if ((active0 & 0x18000000L) != 0L)
437 private static final int jjStartNfa_1(int pos, long active0, long active1)
439 return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1);
441 static private final int jjStartNfaWithStates_1(int pos, int kind, int state)
443 jjmatchedKind = kind;
445 try { curChar = input_stream.readChar(); }
446 catch(java.io.IOException e) { return pos + 1; }
447 return jjMoveNfa_1(state, pos + 1);
449 static private final int jjMoveStringLiteralDfa0_1()
455 return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000L);
457 return jjStartNfaWithStates_1(0, 88, 16);
460 return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000000000L);
463 return jjMoveStringLiteralDfa1_1(0x0L, 0x40001000000000L);
465 return jjStopAtPos(0, 78);
467 return jjStopAtPos(0, 79);
470 return jjMoveStringLiteralDfa1_1(0x0L, 0x10000000000000L);
473 return jjMoveStringLiteralDfa1_1(0x0L, 0x4002000000000L);
475 return jjStopAtPos(0, 85);
478 return jjMoveStringLiteralDfa1_1(0x80000000L, 0x8004000000000L);
481 return jjMoveStringLiteralDfa1_1(0x0L, 0x200000000000000L);
484 return jjMoveStringLiteralDfa1_1(0xa00L, 0x20000000000000L);
487 return jjMoveStringLiteralDfa1_1(0x100000000L, 0x0L);
489 return jjStopAtPos(0, 84);
492 return jjMoveStringLiteralDfa1_1(0x0L, 0x800800100000000L);
495 return jjMoveStringLiteralDfa1_1(0x200000000L, 0x80000000L);
498 return jjMoveStringLiteralDfa1_1(0x0L, 0x3003000200000000L);
501 return jjMoveStringLiteralDfa1_1(0x4L, 0x0L);
503 return jjStopAtPos(0, 87);
505 return jjStopAtPos(0, 82);
507 return jjStopAtPos(0, 83);
510 return jjMoveStringLiteralDfa1_1(0x0L, 0x100000000000000L);
513 return jjMoveStringLiteralDfa1_1(0x8000000000400000L, 0x0L);
516 return jjMoveStringLiteralDfa1_1(0x180000400000000L, 0x0L);
519 return jjMoveStringLiteralDfa1_1(0x3800010000L, 0x0L);
522 return jjMoveStringLiteralDfa1_1(0x40000c000000000L, 0x0L);
525 return jjMoveStringLiteralDfa1_1(0x10010001300000L, 0x0L);
528 return jjMoveStringLiteralDfa1_1(0x800060000020000L, 0x0L);
531 return jjMoveStringLiteralDfa1_1(0x80020000000L, 0x0L);
534 return jjMoveStringLiteralDfa1_1(0x300000000a080000L, 0x0L);
537 return jjMoveStringLiteralDfa1_1(0x300000000000L, 0x0L);
540 return jjMoveStringLiteralDfa1_1(0x4040000000000000L, 0x0L);
543 return jjMoveStringLiteralDfa1_1(0x800000L, 0x0L);
546 return jjMoveStringLiteralDfa1_1(0x200400014000000L, 0x0L);
549 return jjMoveStringLiteralDfa1_1(0x21800040000000L, 0x0L);
552 return jjMoveStringLiteralDfa1_1(0x6000000000000L, 0x0L);
555 return jjMoveStringLiteralDfa1_1(0x40000L, 0x0L);
558 return jjMoveStringLiteralDfa1_1(0x8000000000000L, 0x0L);
560 return jjStopAtPos(0, 80);
563 return jjMoveStringLiteralDfa1_1(0x0L, 0x80000800000000L);
565 return jjStopAtPos(0, 81);
567 return jjMoveNfa_1(3, 0);
570 static private final int jjMoveStringLiteralDfa1_1(long active0, long active1)
572 try { curChar = input_stream.readChar(); }
573 catch(java.io.IOException e) {
574 jjStopStringLiteralDfa_1(0, active0, active1);
580 if ((active1 & 0x1000000000L) != 0L)
581 return jjStopAtPos(1, 100);
584 if ((active0 & 0x800L) != 0L)
585 return jjStartNfaWithStates_1(1, 11, 0);
588 if ((active1 & 0x2000000000L) != 0L)
589 return jjStopAtPos(1, 101);
592 if ((active1 & 0x4000000000L) != 0L)
593 return jjStopAtPos(1, 102);
596 if ((active0 & 0x200L) != 0L)
597 return jjStopAtPos(1, 9);
600 if ((active0 & 0x100000000L) != 0L)
601 return jjStopAtPos(1, 32);
604 if ((active1 & 0x800000000000L) != 0L)
609 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x800000000000000L);
611 if ((active1 & 0x80000000L) != 0L)
612 return jjStopAtPos(1, 95);
613 else if ((active1 & 0x100000000L) != 0L)
614 return jjStopAtPos(1, 96);
615 else if ((active1 & 0x200000000L) != 0L)
616 return jjStopAtPos(1, 97);
617 else if ((active1 & 0x400000000L) != 0L)
618 return jjStopAtPos(1, 98);
619 else if ((active1 & 0x4000000000000L) != 0L)
620 return jjStopAtPos(1, 114);
621 else if ((active1 & 0x8000000000000L) != 0L)
622 return jjStopAtPos(1, 115);
623 else if ((active1 & 0x10000000000000L) != 0L)
624 return jjStopAtPos(1, 116);
625 else if ((active1 & 0x20000000000000L) != 0L)
626 return jjStopAtPos(1, 117);
627 else if ((active1 & 0x40000000000000L) != 0L)
628 return jjStopAtPos(1, 118);
629 else if ((active1 & 0x80000000000000L) != 0L)
630 return jjStopAtPos(1, 119);
631 else if ((active1 & 0x100000000000000L) != 0L)
632 return jjStopAtPos(1, 120);
633 else if ((active1 & 0x200000000000000L) != 0L)
634 return jjStopAtPos(1, 121);
635 else if ((active1 & 0x400000000000000L) != 0L)
636 return jjStopAtPos(1, 122);
639 if ((active0 & 0x4L) != 0L)
640 return jjStopAtPos(1, 2);
641 else if ((active0 & 0x80000000L) != 0L)
642 return jjStopAtPos(1, 31);
643 else if ((active0 & 0x200000000L) != 0L)
644 return jjStopAtPos(1, 33);
645 else if ((active1 & 0x1000000000000L) != 0L)
650 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x3002000000000000L);
653 return jjMoveStringLiteralDfa2_1(active0, 0x20800040000L, active1, 0L);
656 return jjMoveStringLiteralDfa2_1(active0, 0x40000000000000L, active1, 0L);
659 return jjMoveStringLiteralDfa2_1(active0, 0x1000000L, active1, 0L);
662 return jjMoveStringLiteralDfa2_1(active0, 0x200504014000000L, active1, 0L);
665 if ((active0 & 0x80000L) != 0L)
666 return jjStartNfaWithStates_1(1, 19, 14);
670 return jjMoveStringLiteralDfa2_1(active0, 0xa000000000000L, active1, 0L);
673 return jjMoveStringLiteralDfa2_1(active0, 0x800000020310000L, active1, 0L);
676 return jjMoveStringLiteralDfa2_1(active0, 0xb01000000a000000L, active1, 0L);
679 if ((active0 & 0x8000000000L) != 0L)
684 return jjMoveStringLiteralDfa2_1(active0, 0x5800c3000000000L, active1, 0L);
687 if ((active0 & 0x4000000000000000L) != 0L)
688 return jjStartNfaWithStates_1(1, 62, 14);
689 return jjMoveStringLiteralDfa2_1(active0, 0x4000400c00000L, active1, 0L);
692 return jjMoveStringLiteralDfa2_1(active0, 0x20000040000000L, active1, 0L);
695 return jjMoveStringLiteralDfa2_1(active0, 0xa00000020000L, active1, 0L);
698 return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000L, active1, 0L);
701 return jjMoveStringLiteralDfa2_1(active0, 0x10000000000L, active1, 0L);
703 if ((active1 & 0x800000000L) != 0L)
704 return jjStopAtPos(1, 99);
709 return jjStartNfa_1(0, active0, active1);
711 static private final int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1)
713 if (((active0 &= old0) | (active1 &= old1)) == 0L)
714 return jjStartNfa_1(0, old0, old1);
715 try { curChar = input_stream.readChar(); }
716 catch(java.io.IOException e) {
717 jjStopStringLiteralDfa_1(1, active0, active1);
723 if ((active1 & 0x800000000000000L) != 0L)
724 return jjStopAtPos(2, 123);
725 else if ((active1 & 0x1000000000000000L) != 0L)
726 return jjStopAtPos(2, 124);
729 if ((active1 & 0x2000000000000L) != 0L)
734 return jjMoveStringLiteralDfa3_1(active0, 0L, active1, 0x2000000000000000L);
737 return jjMoveStringLiteralDfa3_1(active0, 0x200000040010000L, active1, 0L);
740 return jjMoveStringLiteralDfa3_1(active0, 0xa000000L, active1, 0L);
743 if ((active0 & 0x8000000000000000L) != 0L)
744 return jjStartNfaWithStates_1(2, 63, 14);
745 return jjMoveStringLiteralDfa3_1(active0, 0x10000000000000L, active1, 0L);
748 return jjMoveStringLiteralDfa3_1(active0, 0x400000000L, active1, 0L);
751 return jjMoveStringLiteralDfa3_1(active0, 0x4000000000L, active1, 0L);
754 return jjMoveStringLiteralDfa3_1(active0, 0x1000000L, active1, 0L);
757 return jjMoveStringLiteralDfa3_1(active0, 0xb000000800000L, active1, 0L);
760 return jjMoveStringLiteralDfa3_1(active0, 0x40000000000000L, active1, 0L);
763 return jjMoveStringLiteralDfa3_1(active0, 0x220000000000L, active1, 0L);
766 return jjMoveStringLiteralDfa3_1(active0, 0x3000020000L, active1, 0L);
769 return jjMoveStringLiteralDfa3_1(active0, 0x980000020000000L, active1, 0L);
772 return jjMoveStringLiteralDfa3_1(active0, 0x800000000000L, active1, 0L);
775 return jjMoveStringLiteralDfa3_1(active0, 0x14000000L, active1, 0L);
778 if ((active0 & 0x40000L) != 0L)
779 return jjStartNfaWithStates_1(2, 18, 14);
780 else if ((active0 & 0x40000000000L) != 0L)
781 return jjStartNfaWithStates_1(2, 42, 14);
782 return jjMoveStringLiteralDfa3_1(active0, 0x20000000400000L, active1, 0L);
785 return jjMoveStringLiteralDfa3_1(active0, 0x800300000L, active1, 0L);
788 if ((active0 & 0x1000000000000000L) != 0L)
793 return jjMoveStringLiteralDfa3_1(active0, 0x2000490000000000L, active1, 0L);
796 return jjMoveStringLiteralDfa3_1(active0, 0x404000000000000L, active1, 0L);
799 if ((active0 & 0x100000000000L) != 0L)
800 return jjStartNfaWithStates_1(2, 44, 14);
805 return jjStartNfa_1(1, active0, active1);
807 static private final int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1)
809 if (((active0 &= old0) | (active1 &= old1)) == 0L)
810 return jjStartNfa_1(1, old0, old1);
811 try { curChar = input_stream.readChar(); }
812 catch(java.io.IOException e) {
813 jjStopStringLiteralDfa_1(2, active0, active1);
819 if ((active1 & 0x2000000000000000L) != 0L)
820 return jjStopAtPos(3, 125);
824 return jjMoveStringLiteralDfa4_1(active0, 0x800004400400000L, active1, 0L);
827 return jjMoveStringLiteralDfa4_1(active0, 0x400000020000000L, active1, 0L);
830 return jjMoveStringLiteralDfa4_1(active0, 0x20000L, active1, 0L);
833 if ((active0 & 0x200000L) != 0L)
838 else if ((active0 & 0x800000000L) != 0L)
839 return jjStartNfaWithStates_1(3, 35, 14);
840 else if ((active0 & 0x4000000000000L) != 0L)
841 return jjStartNfaWithStates_1(3, 50, 14);
842 return jjMoveStringLiteralDfa4_1(active0, 0x2040810000100000L, active1, 0L);
845 return jjMoveStringLiteralDfa4_1(active0, 0x20000000000000L, active1, 0L);
848 if ((active0 & 0x200000000000L) != 0L)
849 return jjStartNfaWithStates_1(3, 45, 14);
850 else if ((active0 & 0x80000000000000L) != 0L)
855 else if ((active0 & 0x200000000000000L) != 0L)
856 return jjStartNfaWithStates_1(3, 57, 14);
857 return jjMoveStringLiteralDfa4_1(active0, 0x10800000a000000L, active1, 0L);
860 return jjMoveStringLiteralDfa4_1(active0, 0x800000L, active1, 0L);
863 if ((active0 & 0x1000000L) != 0L)
864 return jjStartNfaWithStates_1(3, 24, 14);
865 else if ((active0 & 0x80000000000L) != 0L)
866 return jjStartNfaWithStates_1(3, 43, 14);
870 if ((active0 & 0x2000000000000L) != 0L)
871 return jjStartNfaWithStates_1(3, 49, 14);
872 return jjMoveStringLiteralDfa4_1(active0, 0x21000010000L, active1, 0L);
875 return jjMoveStringLiteralDfa4_1(active0, 0x1002040000000L, active1, 0L);
878 return jjMoveStringLiteralDfa4_1(active0, 0x400014000000L, active1, 0L);
881 return jjMoveStringLiteralDfa4_1(active0, 0x10000000000000L, active1, 0L);
885 return jjStartNfa_1(2, active0, active1);
887 static private final int jjMoveStringLiteralDfa4_1(long old0, long active0, long old1, long active1)
889 if (((active0 &= old0) | (active1 &= old1)) == 0L)
890 return jjStartNfa_1(2, old0, old1);
891 try { curChar = input_stream.readChar(); }
892 catch(java.io.IOException e) {
893 jjStopStringLiteralDfa_1(3, active0, 0L);
900 return jjMoveStringLiteralDfa5_1(active0, 0x20000000L);
903 return jjMoveStringLiteralDfa5_1(active0, 0x41000000000000L);
906 if ((active0 & 0x20000000000L) != 0L)
907 return jjStartNfaWithStates_1(4, 41, 14);
908 else if ((active0 & 0x8000000000000L) != 0L)
909 return jjStartNfaWithStates_1(4, 51, 14);
910 return jjMoveStringLiteralDfa5_1(active0, 0x100000000000000L);
913 return jjMoveStringLiteralDfa5_1(active0, 0x2000000000000000L);
916 return jjMoveStringLiteralDfa5_1(active0, 0x10000000000000L);
919 return jjMoveStringLiteralDfa5_1(active0, 0x2054100000L);
922 if ((active0 & 0x400000000L) != 0L)
923 return jjStartNfaWithStates_1(4, 34, 14);
927 return jjMoveStringLiteralDfa5_1(active0, 0x400000000000000L);
930 return jjMoveStringLiteralDfa5_1(active0, 0x20010000000000L);
933 if ((active0 & 0x800000000000L) != 0L)
934 return jjStartNfaWithStates_1(4, 47, 14);
935 return jjMoveStringLiteralDfa5_1(active0, 0x400000000000L);
938 if ((active0 & 0x10000L) != 0L)
939 return jjStartNfaWithStates_1(4, 16, 14);
943 if ((active0 & 0x800000L) != 0L)
944 return jjStartNfaWithStates_1(4, 23, 14);
945 else if ((active0 & 0x1000000000L) != 0L)
946 return jjStartNfaWithStates_1(4, 36, 14);
947 else if ((active0 & 0x800000000000000L) != 0L)
948 return jjStartNfaWithStates_1(4, 59, 14);
949 return jjMoveStringLiteralDfa5_1(active0, 0x20000L);
952 return jjMoveStringLiteralDfa5_1(active0, 0x400a000000L);
955 if ((active0 & 0x400000L) != 0L)
956 return jjStartNfaWithStates_1(4, 22, 14);
961 return jjStartNfa_1(3, active0, 0L);
963 static private final int jjMoveStringLiteralDfa5_1(long old0, long active0)
965 if (((active0 &= old0)) == 0L)
966 return jjStartNfa_1(3, old0, 0L);
967 try { curChar = input_stream.readChar(); }
968 catch(java.io.IOException e) {
969 jjStopStringLiteralDfa_1(4, active0, 0L);
976 return jjMoveStringLiteralDfa6_1(active0, 0x100000000000000L);
979 if ((active0 & 0x40000000L) != 0L)
980 return jjStartNfaWithStates_1(5, 30, 14);
984 return jjMoveStringLiteralDfa6_1(active0, 0x1000a000000L);
987 if ((active0 & 0x400000000000000L) != 0L)
988 return jjStartNfaWithStates_1(5, 58, 14);
989 return jjMoveStringLiteralDfa6_1(active0, 0x2000000000000000L);
992 if ((active0 & 0x100000L) != 0L)
993 return jjStartNfaWithStates_1(5, 20, 14);
997 if ((active0 & 0x20000000000000L) != 0L)
998 return jjStartNfaWithStates_1(5, 53, 14);
1002 if ((active0 & 0x1000000000000L) != 0L)
1003 return jjStartNfaWithStates_1(5, 48, 14);
1007 return jjMoveStringLiteralDfa6_1(active0, 0x10000000020000L);
1010 if ((active0 & 0x20000000L) != 0L)
1011 return jjStartNfaWithStates_1(5, 29, 14);
1012 return jjMoveStringLiteralDfa6_1(active0, 0x4000000000L);
1015 if ((active0 & 0x400000000000L) != 0L)
1016 return jjStartNfaWithStates_1(5, 46, 14);
1017 return jjMoveStringLiteralDfa6_1(active0, 0x2000000000L);
1020 return jjMoveStringLiteralDfa6_1(active0, 0x14000000L);
1023 if ((active0 & 0x40000000000000L) != 0L)
1024 return jjStartNfaWithStates_1(5, 54, 14);
1029 return jjStartNfa_1(4, active0, 0L);
1031 static private final int jjMoveStringLiteralDfa6_1(long old0, long active0)
1033 if (((active0 &= old0)) == 0L)
1034 return jjStartNfa_1(4, old0, 0L);
1035 try { curChar = input_stream.readChar(); }
1036 catch(java.io.IOException e) {
1037 jjStopStringLiteralDfa_1(5, active0, 0L);
1044 if ((active0 & 0x2000000L) != 0L)
1049 else if ((active0 & 0x4000000L) != 0L)
1054 return jjMoveStringLiteralDfa7_1(active0, 0x18000000L);
1057 return jjMoveStringLiteralDfa7_1(active0, 0x10000000000000L);
1060 if ((active0 & 0x100000000000000L) != 0L)
1061 return jjStartNfaWithStates_1(6, 56, 14);
1065 return jjMoveStringLiteralDfa7_1(active0, 0x20000L);
1068 if ((active0 & 0x2000000000000000L) != 0L)
1069 return jjStartNfaWithStates_1(6, 61, 14);
1073 if ((active0 & 0x10000000000L) != 0L)
1074 return jjStartNfaWithStates_1(6, 40, 14);
1078 if ((active0 & 0x4000000000L) != 0L)
1079 return jjStartNfaWithStates_1(6, 38, 14);
1083 return jjMoveStringLiteralDfa7_1(active0, 0x2000000000L);
1087 return jjStartNfa_1(5, active0, 0L);
1089 static private final int jjMoveStringLiteralDfa7_1(long old0, long active0)
1091 if (((active0 &= old0)) == 0L)
1092 return jjStartNfa_1(5, old0, 0L);
1093 try { curChar = input_stream.readChar(); }
1094 catch(java.io.IOException e) {
1095 jjStopStringLiteralDfa_1(6, active0, 0L);
1101 return jjMoveStringLiteralDfa8_1(active0, 0x18000000L);
1104 if ((active0 & 0x2000000000L) != 0L)
1105 return jjStartNfaWithStates_1(7, 37, 14);
1106 else if ((active0 & 0x10000000000000L) != 0L)
1107 return jjStartNfaWithStates_1(7, 52, 14);
1111 if ((active0 & 0x20000L) != 0L)
1112 return jjStartNfaWithStates_1(7, 17, 14);
1117 return jjStartNfa_1(6, active0, 0L);
1119 static private final int jjMoveStringLiteralDfa8_1(long old0, long active0)
1121 if (((active0 &= old0)) == 0L)
1122 return jjStartNfa_1(6, old0, 0L);
1123 try { curChar = input_stream.readChar(); }
1124 catch(java.io.IOException e) {
1125 jjStopStringLiteralDfa_1(7, active0, 0L);
1132 return jjMoveStringLiteralDfa9_1(active0, 0x18000000L);
1136 return jjStartNfa_1(7, active0, 0L);
1138 static private final int jjMoveStringLiteralDfa9_1(long old0, long active0)
1140 if (((active0 &= old0)) == 0L)
1141 return jjStartNfa_1(7, old0, 0L);
1142 try { curChar = input_stream.readChar(); }
1143 catch(java.io.IOException e) {
1144 jjStopStringLiteralDfa_1(8, active0, 0L);
1151 return jjMoveStringLiteralDfa10_1(active0, 0x18000000L);
1155 return jjStartNfa_1(8, active0, 0L);
1157 static private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
1159 if (((active0 &= old0)) == 0L)
1160 return jjStartNfa_1(8, old0, 0L);
1161 try { curChar = input_stream.readChar(); }
1162 catch(java.io.IOException e) {
1163 jjStopStringLiteralDfa_1(9, active0, 0L);
1170 return jjMoveStringLiteralDfa11_1(active0, 0x18000000L);
1174 return jjStartNfa_1(9, active0, 0L);
1176 static private final int jjMoveStringLiteralDfa11_1(long old0, long active0)
1178 if (((active0 &= old0)) == 0L)
1179 return jjStartNfa_1(9, old0, 0L);
1180 try { curChar = input_stream.readChar(); }
1181 catch(java.io.IOException e) {
1182 jjStopStringLiteralDfa_1(10, active0, 0L);
1189 if ((active0 & 0x8000000L) != 0L)
1190 return jjStartNfaWithStates_1(11, 27, 14);
1191 else if ((active0 & 0x10000000L) != 0L)
1192 return jjStartNfaWithStates_1(11, 28, 14);
1197 return jjStartNfa_1(10, active0, 0L);
1199 static final long[] jjbitVec0 = {
1200 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
1202 static private final int jjMoveNfa_1(int startState, int curPos)
1208 jjstateSet[0] = startState;
1209 int j, kind = 0x7fffffff;
1212 if (++jjround == 0x7fffffff)
1216 long l = 1L << curChar;
1219 switch(jjstateSet[--i])
1222 if ((0x3ff000000000000L & l) != 0L)
1223 jjCheckNAddStates(2, 8);
1224 else if (curChar == 39)
1225 jjCheckNAddStates(9, 12);
1226 else if (curChar == 34)
1227 jjCheckNAddStates(13, 18);
1228 else if (curChar == 36)
1229 jjstateSet[jjnewStateCnt++] = 16;
1230 else if (curChar == 46)
1232 else if (curChar == 47)
1233 jjstateSet[jjnewStateCnt++] = 2;
1234 if ((0x3fe000000000000L & l) != 0L)
1238 jjCheckNAddTwoStates(5, 6);
1240 else if (curChar == 48)
1244 jjCheckNAddStates(19, 21);
1249 jjstateSet[jjnewStateCnt++] = 1;
1252 if ((0xffff7fffffffffffL & l) != 0L && kind > 10)
1257 jjstateSet[jjnewStateCnt++] = 0;
1260 if ((0x3fe000000000000L & l) == 0L)
1264 jjCheckNAddTwoStates(5, 6);
1267 if ((0x3ff000000000000L & l) == 0L)
1271 jjCheckNAddTwoStates(5, 6);
1278 if ((0x3ff000000000000L & l) == 0L)
1282 jjCheckNAddStates(22, 24);
1285 if ((0x280000000000L & l) != 0L)
1289 if ((0x3ff000000000000L & l) == 0L)
1293 jjCheckNAddTwoStates(11, 12);
1296 if ((0x3ff000000000000L & l) == 0L)
1300 jjstateSet[jjnewStateCnt++] = 14;
1304 jjstateSet[jjnewStateCnt++] = 16;
1307 if ((0x3ff000000000000L & l) == 0L)
1311 jjstateSet[jjnewStateCnt++] = 17;
1314 if ((0x3ff000000000000L & l) != 0L)
1315 jjCheckNAddStates(2, 8);
1318 if ((0x3ff000000000000L & l) != 0L)
1319 jjCheckNAddTwoStates(19, 20);
1326 jjCheckNAddStates(25, 27);
1329 if ((0x3ff000000000000L & l) == 0L)
1333 jjCheckNAddStates(25, 27);
1336 if ((0x280000000000L & l) != 0L)
1340 if ((0x3ff000000000000L & l) == 0L)
1344 jjCheckNAddTwoStates(24, 12);
1347 if ((0x3ff000000000000L & l) != 0L)
1348 jjCheckNAddTwoStates(25, 26);
1351 if ((0x280000000000L & l) != 0L)
1355 if ((0x3ff000000000000L & l) == 0L)
1359 jjCheckNAddTwoStates(28, 12);
1362 if ((0x3ff000000000000L & l) != 0L)
1363 jjCheckNAddStates(28, 30);
1366 if ((0x280000000000L & l) != 0L)
1370 if ((0x3ff000000000000L & l) != 0L)
1371 jjCheckNAddTwoStates(32, 12);
1378 jjCheckNAddStates(19, 21);
1381 if ((0x3ff000000000000L & l) == 0L)
1385 jjCheckNAddTwoStates(35, 6);
1388 if ((0xff000000000000L & l) == 0L)
1392 jjCheckNAddTwoStates(36, 6);
1396 jjCheckNAddStates(13, 18);
1399 if ((0xfffffffbffffffffL & l) != 0L)
1400 jjCheckNAddStates(31, 33);
1404 jjCheckNAddStates(31, 33);
1407 if (curChar == 34 && kind > 70)
1411 if ((0xfffffffbffffffffL & l) != 0L)
1412 jjCheckNAddStates(34, 36);
1416 jjCheckNAddStates(34, 36);
1419 if (curChar == 34 && kind > 71)
1424 jjCheckNAddStates(9, 12);
1427 if ((0xffffff7fffffffffL & l) != 0L)
1428 jjCheckNAddTwoStates(47, 48);
1431 if (curChar == 39 && kind > 70)
1435 if ((0xffffff7fffffffffL & l) != 0L)
1436 jjCheckNAddTwoStates(49, 50);
1439 if (curChar == 39 && kind > 72)
1443 jjAddStates(37, 38);
1446 jjAddStates(39, 40);
1450 } while(i != startsAt);
1452 else if (curChar < 128)
1454 long l = 1L << (curChar & 077);
1457 switch(jjstateSet[--i])
1460 if ((0x7fffffe87fffffeL & l) != 0L)
1466 else if (curChar == 96)
1467 jjCheckNAddStates(41, 44);
1474 if ((0x100000001000L & l) != 0L && kind > 64)
1478 if ((0x2000000020L & l) != 0L)
1479 jjAddStates(45, 46);
1482 if ((0x5000000050L & l) != 0L && kind > 68)
1487 if ((0x7fffffe87fffffeL & l) == 0L)
1495 if ((0x7fffffe87fffffeL & l) == 0L)
1502 if ((0x2000000020L & l) != 0L)
1503 jjAddStates(47, 48);
1506 if ((0x2000000020L & l) != 0L)
1507 jjAddStates(49, 50);
1510 if ((0x2000000020L & l) != 0L)
1511 jjAddStates(51, 52);
1514 if ((0x100000001000000L & l) != 0L)
1518 if ((0x7e0000007eL & l) == 0L)
1522 jjCheckNAddTwoStates(35, 6);
1525 jjAddStates(31, 33);
1529 jjstateSet[jjnewStateCnt++] = 39;
1532 jjAddStates(34, 36);
1536 jjstateSet[jjnewStateCnt++] = 43;
1539 jjAddStates(53, 54);
1542 jjAddStates(55, 56);
1546 jjCheckNAddStates(41, 44);
1549 if ((0xfffffffeffffffffL & l) != 0L)
1550 jjCheckNAddTwoStates(52, 53);
1553 if (curChar == 96 && kind > 70)
1557 if ((0xfffffffeffffffffL & l) != 0L)
1558 jjCheckNAddTwoStates(54, 55);
1561 if (curChar == 96 && kind > 73)
1566 } while(i != startsAt);
1570 int i2 = (curChar & 0xff) >> 6;
1571 long l2 = 1L << (curChar & 077);
1574 switch(jjstateSet[--i])
1577 if ((jjbitVec0[i2] & l2) != 0L && kind > 10)
1581 if ((jjbitVec0[i2] & l2) != 0L)
1582 jjAddStates(31, 33);
1585 if ((jjbitVec0[i2] & l2) != 0L)
1586 jjAddStates(34, 36);
1589 if ((jjbitVec0[i2] & l2) != 0L)
1590 jjAddStates(53, 54);
1593 if ((jjbitVec0[i2] & l2) != 0L)
1594 jjAddStates(55, 56);
1597 if ((jjbitVec0[i2] & l2) != 0L)
1598 jjAddStates(37, 38);
1601 if ((jjbitVec0[i2] & l2) != 0L)
1602 jjAddStates(39, 40);
1606 } while(i != startsAt);
1608 if (kind != 0x7fffffff)
1610 jjmatchedKind = kind;
1611 jjmatchedPos = curPos;
1615 if ((i = jjnewStateCnt) == (startsAt = 56 - (jjnewStateCnt = startsAt)))
1617 try { curChar = input_stream.readChar(); }
1618 catch(java.io.IOException e) { return curPos; }
1621 static private final int jjMoveStringLiteralDfa0_3()
1626 return jjMoveStringLiteralDfa1_3(0x2000L);
1631 static private final int jjMoveStringLiteralDfa1_3(long active0)
1633 try { curChar = input_stream.readChar(); }
1634 catch(java.io.IOException e) {
1640 if ((active0 & 0x2000L) != 0L)
1641 return jjStopAtPos(1, 13);
1648 static final int[] jjnextStates = {
1649 4, 5, 19, 20, 25, 26, 29, 30, 12, 47, 48, 49, 50, 38, 40, 41,
1650 42, 44, 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30, 12, 38,
1651 40, 41, 42, 44, 45, 52, 53, 54, 55, 52, 53, 54, 55, 10, 11, 23,
1652 24, 27, 28, 31, 32, 47, 48, 49, 50,
1654 public static final String[] jjstrLiteralImages = {
1655 "", null, "\77\76", null, null, null, null, null, null, null, null, null, null,
1656 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1657 null, null, null, null, "\55\76", "\72\72", "\75\76", null, null, null, null, null,
1658 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1659 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1660 null, null, null, null, null, null, null, null, null, null, null, "\50", "\51",
1661 "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\44", "\75", "\76",
1662 "\74", "\41", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174",
1663 "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45",
1664 "\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75",
1665 "\174\75", "\136\75", "\56\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", null,
1667 public static final String[] lexStateNames = {
1670 "IN_SINGLE_LINE_COMMENT",
1671 "IN_FORMAL_COMMENT",
1672 "IN_MULTI_LINE_COMMENT",
1674 public static final int[] jjnewLexState = {
1675 -1, 1, 0, -1, -1, -1, -1, -1, -1, 2, 3, 4, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1679 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1682 static final long[] jjtoToken = {
1683 0xffffffffffff0007L, 0xffffffffffffc7d1L, 0x0L,
1685 static final long[] jjtoSkip = {
1686 0x71f8L, 0x0L, 0x0L,
1688 static final long[] jjtoSpecial = {
1689 0x7000L, 0x0L, 0x0L,
1691 static final long[] jjtoMore = {
1692 0x8e00L, 0x0L, 0x0L,
1694 static protected SimpleCharStream input_stream;
1695 static private final int[] jjrounds = new int[56];
1696 static private final int[] jjstateSet = new int[112];
1697 static StringBuffer image;
1698 static int jjimageLen;
1699 static int lengthOfMatch;
1700 static protected char curChar;
1701 public PHPParserTokenManager(SimpleCharStream stream)
1703 if (input_stream != null)
1704 throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
1705 input_stream = stream;
1707 public PHPParserTokenManager(SimpleCharStream stream, int lexState)
1712 static public void ReInit(SimpleCharStream stream)
1714 jjmatchedPos = jjnewStateCnt = 0;
1715 curLexState = defaultLexState;
1716 input_stream = stream;
1719 static private final void ReInitRounds()
1722 jjround = 0x80000001;
1723 for (i = 56; i-- > 0;)
1724 jjrounds[i] = 0x80000000;
1726 static public void ReInit(SimpleCharStream stream, int lexState)
1731 static public void SwitchTo(int lexState)
1733 if (lexState >= 5 || lexState < 0)
1734 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1736 curLexState = lexState;
1739 static protected Token jjFillToken()
1741 Token t = Token.newToken(jjmatchedKind);
1742 t.kind = jjmatchedKind;
1743 String im = jjstrLiteralImages[jjmatchedKind];
1744 t.image = (im == null) ? input_stream.GetImage() : im;
1745 t.beginLine = input_stream.getBeginLine();
1746 t.beginColumn = input_stream.getBeginColumn();
1747 t.endLine = input_stream.getEndLine();
1748 t.endColumn = input_stream.getEndColumn();
1752 static int curLexState = 0;
1753 static int defaultLexState = 0;
1754 static int jjnewStateCnt;
1756 static int jjmatchedPos;
1757 static int jjmatchedKind;
1759 public static Token getNextToken()
1762 Token specialToken = null;
1771 curChar = input_stream.BeginToken();
1773 catch(java.io.IOException e)
1776 matchedToken = jjFillToken();
1777 matchedToken.specialToken = specialToken;
1778 return matchedToken;
1788 jjmatchedKind = 0x7fffffff;
1790 curPos = jjMoveStringLiteralDfa0_0();
1791 if (jjmatchedPos == 0 && jjmatchedKind > 3)
1797 try { input_stream.backup(0);
1798 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
1799 curChar = input_stream.BeginToken();
1801 catch (java.io.IOException e1) { continue EOFLoop; }
1802 jjmatchedKind = 0x7fffffff;
1804 curPos = jjMoveStringLiteralDfa0_1();
1807 jjmatchedKind = 0x7fffffff;
1809 curPos = jjMoveStringLiteralDfa0_2();
1810 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1816 jjmatchedKind = 0x7fffffff;
1818 curPos = jjMoveStringLiteralDfa0_3();
1819 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1825 jjmatchedKind = 0x7fffffff;
1827 curPos = jjMoveStringLiteralDfa0_4();
1828 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1834 if (jjmatchedKind != 0x7fffffff)
1836 if (jjmatchedPos + 1 < curPos)
1837 input_stream.backup(curPos - jjmatchedPos - 1);
1838 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1840 matchedToken = jjFillToken();
1841 matchedToken.specialToken = specialToken;
1842 if (jjnewLexState[jjmatchedKind] != -1)
1843 curLexState = jjnewLexState[jjmatchedKind];
1844 return matchedToken;
1846 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1848 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1850 matchedToken = jjFillToken();
1851 if (specialToken == null)
1852 specialToken = matchedToken;
1855 matchedToken.specialToken = specialToken;
1856 specialToken = (specialToken.next = matchedToken);
1858 SkipLexicalActions(matchedToken);
1861 SkipLexicalActions(null);
1862 if (jjnewLexState[jjmatchedKind] != -1)
1863 curLexState = jjnewLexState[jjmatchedKind];
1866 MoreLexicalActions();
1867 if (jjnewLexState[jjmatchedKind] != -1)
1868 curLexState = jjnewLexState[jjmatchedKind];
1870 jjmatchedKind = 0x7fffffff;
1872 curChar = input_stream.readChar();
1875 catch (java.io.IOException e1) { }
1877 int error_line = input_stream.getEndLine();
1878 int error_column = input_stream.getEndColumn();
1879 String error_after = null;
1880 boolean EOFSeen = false;
1881 try { input_stream.readChar(); input_stream.backup(1); }
1882 catch (java.io.IOException e1) {
1884 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1885 if (curChar == '\n' || curChar == '\r') {
1893 input_stream.backup(1);
1894 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1896 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1901 static void SkipLexicalActions(Token matchedToken)
1903 switch(jjmatchedKind)
1909 static void MoreLexicalActions()
1911 jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1912 switch(jjmatchedKind)
1916 image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen)));
1918 image.append(new String(input_stream.GetSuffix(jjimageLen)));
1920 input_stream.backup(1);