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, 14);
1226 else if (curChar == 34)
1227 jjCheckNAddStates(15, 20);
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(21, 23);
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(24, 26);
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(27, 29);
1329 if ((0x3ff000000000000L & l) == 0L)
1333 jjCheckNAddStates(27, 29);
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(30, 32);
1366 if ((0x280000000000L & l) != 0L)
1370 if ((0x3ff000000000000L & l) != 0L)
1371 jjCheckNAddTwoStates(32, 12);
1378 jjCheckNAddStates(21, 23);
1381 if ((0x3ff000000000000L & l) == 0L)
1385 jjCheckNAddTwoStates(35, 6);
1388 if ((0xff000000000000L & l) == 0L)
1392 jjCheckNAddTwoStates(36, 6);
1396 jjCheckNAddStates(15, 20);
1399 if ((0xfffffffbffffffffL & l) != 0L)
1400 jjCheckNAddStates(33, 35);
1404 jjCheckNAddStates(33, 35);
1407 if (curChar == 34 && kind > 70)
1411 if ((0xfffffffbffffffffL & l) != 0L)
1412 jjCheckNAddStates(36, 38);
1416 jjCheckNAddStates(36, 38);
1419 if (curChar == 34 && kind > 71)
1424 jjCheckNAddStates(9, 14);
1427 if ((0xffffff7fffffffffL & l) != 0L)
1428 jjCheckNAddStates(39, 41);
1432 jjCheckNAddStates(39, 41);
1435 if (curChar == 39 && kind > 70)
1439 if ((0xffffff7fffffffffL & l) != 0L)
1440 jjCheckNAddStates(42, 44);
1444 jjCheckNAddStates(42, 44);
1447 if (curChar == 39 && kind > 72)
1451 jjAddStates(45, 47);
1454 jjAddStates(48, 50);
1458 } while(i != startsAt);
1460 else if (curChar < 128)
1462 long l = 1L << (curChar & 077);
1465 switch(jjstateSet[--i])
1468 if ((0x7fffffe87fffffeL & l) != 0L)
1474 else if (curChar == 96)
1475 jjCheckNAddStates(51, 56);
1482 if ((0x100000001000L & l) != 0L && kind > 64)
1486 if ((0x2000000020L & l) != 0L)
1487 jjAddStates(57, 58);
1490 if ((0x5000000050L & l) != 0L && kind > 68)
1495 if ((0x7fffffe87fffffeL & l) == 0L)
1503 if ((0x7fffffe87fffffeL & l) == 0L)
1510 if ((0x2000000020L & l) != 0L)
1511 jjAddStates(59, 60);
1514 if ((0x2000000020L & l) != 0L)
1515 jjAddStates(61, 62);
1518 if ((0x2000000020L & l) != 0L)
1519 jjAddStates(63, 64);
1522 if ((0x100000001000000L & l) != 0L)
1526 if ((0x7e0000007eL & l) == 0L)
1530 jjCheckNAddTwoStates(35, 6);
1533 jjAddStates(33, 35);
1537 jjstateSet[jjnewStateCnt++] = 39;
1540 jjAddStates(36, 38);
1544 jjstateSet[jjnewStateCnt++] = 43;
1547 jjAddStates(39, 41);
1551 jjstateSet[jjnewStateCnt++] = 48;
1554 jjAddStates(42, 44);
1558 jjstateSet[jjnewStateCnt++] = 52;
1562 jjCheckNAddStates(51, 56);
1565 if ((0xfffffffeffffffffL & l) != 0L)
1566 jjCheckNAddStates(45, 47);
1570 jjCheckNAddStates(45, 47);
1574 jjstateSet[jjnewStateCnt++] = 57;
1577 if (curChar == 96 && kind > 70)
1581 if ((0xfffffffeffffffffL & l) != 0L)
1582 jjCheckNAddStates(48, 50);
1586 jjCheckNAddStates(48, 50);
1590 jjstateSet[jjnewStateCnt++] = 61;
1593 if (curChar == 96 && kind > 73)
1598 } while(i != startsAt);
1602 int i2 = (curChar & 0xff) >> 6;
1603 long l2 = 1L << (curChar & 077);
1606 switch(jjstateSet[--i])
1609 if ((jjbitVec0[i2] & l2) != 0L && kind > 10)
1613 if ((jjbitVec0[i2] & l2) != 0L)
1614 jjAddStates(33, 35);
1617 if ((jjbitVec0[i2] & l2) != 0L)
1618 jjAddStates(36, 38);
1621 if ((jjbitVec0[i2] & l2) != 0L)
1622 jjAddStates(39, 41);
1625 if ((jjbitVec0[i2] & l2) != 0L)
1626 jjAddStates(42, 44);
1629 if ((jjbitVec0[i2] & l2) != 0L)
1630 jjAddStates(45, 47);
1633 if ((jjbitVec0[i2] & l2) != 0L)
1634 jjAddStates(48, 50);
1638 } while(i != startsAt);
1640 if (kind != 0x7fffffff)
1642 jjmatchedKind = kind;
1643 jjmatchedPos = curPos;
1647 if ((i = jjnewStateCnt) == (startsAt = 64 - (jjnewStateCnt = startsAt)))
1649 try { curChar = input_stream.readChar(); }
1650 catch(java.io.IOException e) { return curPos; }
1653 static private final int jjMoveStringLiteralDfa0_3()
1658 return jjMoveStringLiteralDfa1_3(0x2000L);
1663 static private final int jjMoveStringLiteralDfa1_3(long active0)
1665 try { curChar = input_stream.readChar(); }
1666 catch(java.io.IOException e) {
1672 if ((active0 & 0x2000L) != 0L)
1673 return jjStopAtPos(1, 13);
1680 static final int[] jjnextStates = {
1681 4, 5, 19, 20, 25, 26, 29, 30, 12, 47, 49, 50, 51, 53, 54, 38,
1682 40, 41, 42, 44, 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30,
1683 12, 38, 40, 41, 42, 44, 45, 47, 49, 50, 51, 53, 54, 56, 58, 59,
1684 60, 62, 63, 56, 58, 59, 60, 62, 63, 10, 11, 23, 24, 27, 28, 31,
1687 public static final String[] jjstrLiteralImages = {
1688 "", null, "\77\76", null, null, null, null, null, null, null, null, null, null,
1689 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1690 null, null, null, null, "\55\76", "\72\72", "\75\76", null, null, null, null, null,
1691 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1692 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1693 null, null, null, null, null, null, null, null, null, null, null, "\50", "\51",
1694 "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\44", "\75", "\76",
1695 "\74", "\41", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174",
1696 "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45",
1697 "\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75",
1698 "\174\75", "\136\75", "\56\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", null,
1700 public static final String[] lexStateNames = {
1703 "IN_SINGLE_LINE_COMMENT",
1704 "IN_FORMAL_COMMENT",
1705 "IN_MULTI_LINE_COMMENT",
1707 public static final int[] jjnewLexState = {
1708 -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,
1709 -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,
1710 -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,
1711 -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,
1712 -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,
1715 static final long[] jjtoToken = {
1716 0xffffffffffff0007L, 0xffffffffffffc7d1L, 0x0L,
1718 static final long[] jjtoSkip = {
1719 0x71f8L, 0x0L, 0x0L,
1721 static final long[] jjtoSpecial = {
1722 0x7000L, 0x0L, 0x0L,
1724 static final long[] jjtoMore = {
1725 0x8e00L, 0x0L, 0x0L,
1727 static protected SimpleCharStream input_stream;
1728 static private final int[] jjrounds = new int[64];
1729 static private final int[] jjstateSet = new int[128];
1730 static StringBuffer image;
1731 static int jjimageLen;
1732 static int lengthOfMatch;
1733 static protected char curChar;
1734 public PHPParserTokenManager(SimpleCharStream stream)
1736 if (input_stream != null)
1737 throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
1738 input_stream = stream;
1740 public PHPParserTokenManager(SimpleCharStream stream, int lexState)
1745 static public void ReInit(SimpleCharStream stream)
1747 jjmatchedPos = jjnewStateCnt = 0;
1748 curLexState = defaultLexState;
1749 input_stream = stream;
1752 static private final void ReInitRounds()
1755 jjround = 0x80000001;
1756 for (i = 64; i-- > 0;)
1757 jjrounds[i] = 0x80000000;
1759 static public void ReInit(SimpleCharStream stream, int lexState)
1764 static public void SwitchTo(int lexState)
1766 if (lexState >= 5 || lexState < 0)
1767 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1769 curLexState = lexState;
1772 static protected Token jjFillToken()
1774 Token t = Token.newToken(jjmatchedKind);
1775 t.kind = jjmatchedKind;
1776 String im = jjstrLiteralImages[jjmatchedKind];
1777 t.image = (im == null) ? input_stream.GetImage() : im;
1778 t.beginLine = input_stream.getBeginLine();
1779 t.beginColumn = input_stream.getBeginColumn();
1780 t.endLine = input_stream.getEndLine();
1781 t.endColumn = input_stream.getEndColumn();
1785 static int curLexState = 0;
1786 static int defaultLexState = 0;
1787 static int jjnewStateCnt;
1789 static int jjmatchedPos;
1790 static int jjmatchedKind;
1792 public static Token getNextToken()
1795 Token specialToken = null;
1804 curChar = input_stream.BeginToken();
1806 catch(java.io.IOException e)
1809 matchedToken = jjFillToken();
1810 matchedToken.specialToken = specialToken;
1811 return matchedToken;
1821 jjmatchedKind = 0x7fffffff;
1823 curPos = jjMoveStringLiteralDfa0_0();
1824 if (jjmatchedPos == 0 && jjmatchedKind > 3)
1830 try { input_stream.backup(0);
1831 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
1832 curChar = input_stream.BeginToken();
1834 catch (java.io.IOException e1) { continue EOFLoop; }
1835 jjmatchedKind = 0x7fffffff;
1837 curPos = jjMoveStringLiteralDfa0_1();
1840 jjmatchedKind = 0x7fffffff;
1842 curPos = jjMoveStringLiteralDfa0_2();
1843 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1849 jjmatchedKind = 0x7fffffff;
1851 curPos = jjMoveStringLiteralDfa0_3();
1852 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1858 jjmatchedKind = 0x7fffffff;
1860 curPos = jjMoveStringLiteralDfa0_4();
1861 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1867 if (jjmatchedKind != 0x7fffffff)
1869 if (jjmatchedPos + 1 < curPos)
1870 input_stream.backup(curPos - jjmatchedPos - 1);
1871 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1873 matchedToken = jjFillToken();
1874 matchedToken.specialToken = specialToken;
1875 if (jjnewLexState[jjmatchedKind] != -1)
1876 curLexState = jjnewLexState[jjmatchedKind];
1877 return matchedToken;
1879 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1881 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1883 matchedToken = jjFillToken();
1884 if (specialToken == null)
1885 specialToken = matchedToken;
1888 matchedToken.specialToken = specialToken;
1889 specialToken = (specialToken.next = matchedToken);
1891 SkipLexicalActions(matchedToken);
1894 SkipLexicalActions(null);
1895 if (jjnewLexState[jjmatchedKind] != -1)
1896 curLexState = jjnewLexState[jjmatchedKind];
1899 MoreLexicalActions();
1900 if (jjnewLexState[jjmatchedKind] != -1)
1901 curLexState = jjnewLexState[jjmatchedKind];
1903 jjmatchedKind = 0x7fffffff;
1905 curChar = input_stream.readChar();
1908 catch (java.io.IOException e1) { }
1910 int error_line = input_stream.getEndLine();
1911 int error_column = input_stream.getEndColumn();
1912 String error_after = null;
1913 boolean EOFSeen = false;
1914 try { input_stream.readChar(); input_stream.backup(1); }
1915 catch (java.io.IOException e1) {
1917 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1918 if (curChar == '\n' || curChar == '\r') {
1926 input_stream.backup(1);
1927 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1929 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1934 static void SkipLexicalActions(Token matchedToken)
1936 switch(jjmatchedKind)
1942 static void MoreLexicalActions()
1944 jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1945 switch(jjmatchedKind)
1949 image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen)));
1951 image.append(new String(input_stream.GetSuffix(jjimageLen)));
1953 input_stream.backup(1);