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(0x2L);
57 return jjMoveNfa_0(0, 0);
60 static private final int jjMoveStringLiteralDfa1_0(long active2)
62 try { curChar = input_stream.readChar(); }
63 catch(java.io.IOException e) {
64 jjStopStringLiteralDfa_0(0, 0L, 0L, active2);
70 if ((active2 & 0x2L) != 0L)
71 return jjStopAtPos(1, 129);
76 return jjStartNfa_0(0, 0L, 0L, active2);
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, long active2)
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, long active2)
439 return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1, active2), 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, 0x2000000400000000L);
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, 0x4000000080000000L);
498 return jjMoveStringLiteralDfa1_1(0x0L, 0x1003000200000000L);
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 jjMoveStringLiteralDfa1_1(0x0L, 0x8000000000000000L);
569 return jjMoveNfa_1(3, 0);
572 static private final int jjMoveStringLiteralDfa1_1(long active0, long active1)
574 try { curChar = input_stream.readChar(); }
575 catch(java.io.IOException e) {
576 jjStopStringLiteralDfa_1(0, active0, active1, 0L);
582 if ((active1 & 0x1000000000L) != 0L)
583 return jjStopAtPos(1, 100);
586 if ((active0 & 0x800L) != 0L)
587 return jjStartNfaWithStates_1(1, 11, 0);
590 if ((active1 & 0x2000000000L) != 0L)
591 return jjStopAtPos(1, 101);
594 if ((active1 & 0x4000000000L) != 0L)
595 return jjStopAtPos(1, 102);
598 if ((active0 & 0x200L) != 0L)
599 return jjStopAtPos(1, 9);
602 if ((active0 & 0x100000000L) != 0L)
603 return jjStopAtPos(1, 32);
606 if ((active1 & 0x800000000000L) != 0L)
611 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x800000000000000L);
613 if ((active1 & 0x80000000L) != 0L)
618 else if ((active1 & 0x100000000L) != 0L)
619 return jjStopAtPos(1, 96);
620 else if ((active1 & 0x200000000L) != 0L)
621 return jjStopAtPos(1, 97);
622 else if ((active1 & 0x400000000L) != 0L)
627 else if ((active1 & 0x4000000000000L) != 0L)
628 return jjStopAtPos(1, 114);
629 else if ((active1 & 0x8000000000000L) != 0L)
630 return jjStopAtPos(1, 115);
631 else if ((active1 & 0x10000000000000L) != 0L)
632 return jjStopAtPos(1, 116);
633 else if ((active1 & 0x20000000000000L) != 0L)
634 return jjStopAtPos(1, 117);
635 else if ((active1 & 0x40000000000000L) != 0L)
636 return jjStopAtPos(1, 118);
637 else if ((active1 & 0x80000000000000L) != 0L)
638 return jjStopAtPos(1, 119);
639 else if ((active1 & 0x100000000000000L) != 0L)
640 return jjStopAtPos(1, 120);
641 else if ((active1 & 0x200000000000000L) != 0L)
642 return jjStopAtPos(1, 121);
643 else if ((active1 & 0x400000000000000L) != 0L)
644 return jjStopAtPos(1, 122);
645 else if ((active1 & 0x8000000000000000L) != 0L)
646 return jjStopAtPos(1, 127);
647 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x6000000000000000L);
649 if ((active0 & 0x4L) != 0L)
650 return jjStopAtPos(1, 2);
651 else if ((active0 & 0x80000000L) != 0L)
652 return jjStopAtPos(1, 31);
653 else if ((active0 & 0x200000000L) != 0L)
654 return jjStopAtPos(1, 33);
655 else if ((active1 & 0x1000000000000L) != 0L)
660 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x1002000000000000L);
663 return jjMoveStringLiteralDfa2_1(active0, 0x20800040000L, active1, 0L);
666 return jjMoveStringLiteralDfa2_1(active0, 0x40000000000000L, active1, 0L);
669 return jjMoveStringLiteralDfa2_1(active0, 0x1000000L, active1, 0L);
672 return jjMoveStringLiteralDfa2_1(active0, 0x200504014000000L, active1, 0L);
675 if ((active0 & 0x80000L) != 0L)
676 return jjStartNfaWithStates_1(1, 19, 14);
680 return jjMoveStringLiteralDfa2_1(active0, 0xa000000000000L, active1, 0L);
683 return jjMoveStringLiteralDfa2_1(active0, 0x800000020310000L, active1, 0L);
686 return jjMoveStringLiteralDfa2_1(active0, 0xb01000000a000000L, active1, 0L);
689 if ((active0 & 0x8000000000L) != 0L)
694 return jjMoveStringLiteralDfa2_1(active0, 0x5800c3000000000L, active1, 0L);
697 if ((active0 & 0x4000000000000000L) != 0L)
698 return jjStartNfaWithStates_1(1, 62, 14);
699 return jjMoveStringLiteralDfa2_1(active0, 0x4000400c00000L, active1, 0L);
702 return jjMoveStringLiteralDfa2_1(active0, 0x20000040000000L, active1, 0L);
705 return jjMoveStringLiteralDfa2_1(active0, 0xa00000020000L, active1, 0L);
708 return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000L, active1, 0L);
711 return jjMoveStringLiteralDfa2_1(active0, 0x10000000000L, active1, 0L);
713 if ((active1 & 0x800000000L) != 0L)
714 return jjStopAtPos(1, 99);
719 return jjStartNfa_1(0, active0, active1, 0L);
721 static private final int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1)
723 if (((active0 &= old0) | (active1 &= old1)) == 0L)
724 return jjStartNfa_1(0, old0, old1, 0L);
725 try { curChar = input_stream.readChar(); }
726 catch(java.io.IOException e) {
727 jjStopStringLiteralDfa_1(1, active0, active1, 0L);
733 if ((active1 & 0x800000000000000L) != 0L)
734 return jjStopAtPos(2, 123);
735 else if ((active1 & 0x1000000000000000L) != 0L)
736 return jjStopAtPos(2, 124);
737 else if ((active1 & 0x2000000000000000L) != 0L)
738 return jjStopAtPos(2, 125);
739 else if ((active1 & 0x4000000000000000L) != 0L)
740 return jjStopAtPos(2, 126);
743 if ((active1 & 0x2000000000000L) != 0L)
744 return jjStopAtPos(2, 113);
748 return jjMoveStringLiteralDfa3_1(active0, 0x200000040010000L, active1, 0L);
751 return jjMoveStringLiteralDfa3_1(active0, 0xa000000L, active1, 0L);
754 if ((active0 & 0x8000000000000000L) != 0L)
755 return jjStartNfaWithStates_1(2, 63, 14);
756 return jjMoveStringLiteralDfa3_1(active0, 0x10000000000000L, active1, 0L);
759 return jjMoveStringLiteralDfa3_1(active0, 0x400000000L, active1, 0L);
762 return jjMoveStringLiteralDfa3_1(active0, 0x4000000000L, active1, 0L);
765 return jjMoveStringLiteralDfa3_1(active0, 0x1000000L, active1, 0L);
768 return jjMoveStringLiteralDfa3_1(active0, 0xb000000800000L, active1, 0L);
771 return jjMoveStringLiteralDfa3_1(active0, 0x40000000000000L, active1, 0L);
774 return jjMoveStringLiteralDfa3_1(active0, 0x220000000000L, active1, 0L);
777 return jjMoveStringLiteralDfa3_1(active0, 0x3000020000L, active1, 0L);
780 return jjMoveStringLiteralDfa3_1(active0, 0x980000020000000L, active1, 0L);
783 return jjMoveStringLiteralDfa3_1(active0, 0x800000000000L, active1, 0L);
786 return jjMoveStringLiteralDfa3_1(active0, 0x14000000L, active1, 0L);
789 if ((active0 & 0x40000L) != 0L)
790 return jjStartNfaWithStates_1(2, 18, 14);
791 else if ((active0 & 0x40000000000L) != 0L)
792 return jjStartNfaWithStates_1(2, 42, 14);
793 return jjMoveStringLiteralDfa3_1(active0, 0x20000000400000L, active1, 0L);
796 return jjMoveStringLiteralDfa3_1(active0, 0x800300000L, active1, 0L);
799 if ((active0 & 0x1000000000000000L) != 0L)
804 return jjMoveStringLiteralDfa3_1(active0, 0x2000490000000000L, active1, 0L);
807 return jjMoveStringLiteralDfa3_1(active0, 0x404000000000000L, active1, 0L);
810 if ((active0 & 0x100000000000L) != 0L)
811 return jjStartNfaWithStates_1(2, 44, 14);
816 return jjStartNfa_1(1, active0, active1, 0L);
818 static private final int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1)
820 if (((active0 &= old0) | (active1 &= old1)) == 0L)
821 return jjStartNfa_1(1, old0, old1, 0L);
822 try { curChar = input_stream.readChar(); }
823 catch(java.io.IOException e) {
824 jjStopStringLiteralDfa_1(2, active0, 0L, 0L);
831 return jjMoveStringLiteralDfa4_1(active0, 0x800004400400000L);
834 return jjMoveStringLiteralDfa4_1(active0, 0x400000020000000L);
837 return jjMoveStringLiteralDfa4_1(active0, 0x20000L);
840 if ((active0 & 0x200000L) != 0L)
845 else if ((active0 & 0x800000000L) != 0L)
846 return jjStartNfaWithStates_1(3, 35, 14);
847 else if ((active0 & 0x4000000000000L) != 0L)
848 return jjStartNfaWithStates_1(3, 50, 14);
849 return jjMoveStringLiteralDfa4_1(active0, 0x2040810000100000L);
852 return jjMoveStringLiteralDfa4_1(active0, 0x20000000000000L);
855 if ((active0 & 0x200000000000L) != 0L)
856 return jjStartNfaWithStates_1(3, 45, 14);
857 else if ((active0 & 0x80000000000000L) != 0L)
862 else if ((active0 & 0x200000000000000L) != 0L)
863 return jjStartNfaWithStates_1(3, 57, 14);
864 return jjMoveStringLiteralDfa4_1(active0, 0x10800000a000000L);
867 return jjMoveStringLiteralDfa4_1(active0, 0x800000L);
870 if ((active0 & 0x1000000L) != 0L)
871 return jjStartNfaWithStates_1(3, 24, 14);
872 else if ((active0 & 0x80000000000L) != 0L)
873 return jjStartNfaWithStates_1(3, 43, 14);
877 if ((active0 & 0x2000000000000L) != 0L)
878 return jjStartNfaWithStates_1(3, 49, 14);
879 return jjMoveStringLiteralDfa4_1(active0, 0x21000010000L);
882 return jjMoveStringLiteralDfa4_1(active0, 0x1002040000000L);
885 return jjMoveStringLiteralDfa4_1(active0, 0x400014000000L);
888 return jjMoveStringLiteralDfa4_1(active0, 0x10000000000000L);
892 return jjStartNfa_1(2, active0, 0L, 0L);
894 static private final int jjMoveStringLiteralDfa4_1(long old0, long active0)
896 if (((active0 &= old0)) == 0L)
897 return jjStartNfa_1(2, old0, 0L, 0L);
898 try { curChar = input_stream.readChar(); }
899 catch(java.io.IOException e) {
900 jjStopStringLiteralDfa_1(3, active0, 0L, 0L);
907 return jjMoveStringLiteralDfa5_1(active0, 0x20000000L);
910 return jjMoveStringLiteralDfa5_1(active0, 0x41000000000000L);
913 if ((active0 & 0x20000000000L) != 0L)
914 return jjStartNfaWithStates_1(4, 41, 14);
915 else if ((active0 & 0x8000000000000L) != 0L)
916 return jjStartNfaWithStates_1(4, 51, 14);
917 return jjMoveStringLiteralDfa5_1(active0, 0x100000000000000L);
920 return jjMoveStringLiteralDfa5_1(active0, 0x2000000000000000L);
923 return jjMoveStringLiteralDfa5_1(active0, 0x10000000000000L);
926 return jjMoveStringLiteralDfa5_1(active0, 0x2054100000L);
929 if ((active0 & 0x400000000L) != 0L)
930 return jjStartNfaWithStates_1(4, 34, 14);
934 return jjMoveStringLiteralDfa5_1(active0, 0x400000000000000L);
937 return jjMoveStringLiteralDfa5_1(active0, 0x20010000000000L);
940 if ((active0 & 0x800000000000L) != 0L)
941 return jjStartNfaWithStates_1(4, 47, 14);
942 return jjMoveStringLiteralDfa5_1(active0, 0x400000000000L);
945 if ((active0 & 0x10000L) != 0L)
946 return jjStartNfaWithStates_1(4, 16, 14);
950 if ((active0 & 0x800000L) != 0L)
951 return jjStartNfaWithStates_1(4, 23, 14);
952 else if ((active0 & 0x1000000000L) != 0L)
953 return jjStartNfaWithStates_1(4, 36, 14);
954 else if ((active0 & 0x800000000000000L) != 0L)
955 return jjStartNfaWithStates_1(4, 59, 14);
956 return jjMoveStringLiteralDfa5_1(active0, 0x20000L);
959 return jjMoveStringLiteralDfa5_1(active0, 0x400a000000L);
962 if ((active0 & 0x400000L) != 0L)
963 return jjStartNfaWithStates_1(4, 22, 14);
968 return jjStartNfa_1(3, active0, 0L, 0L);
970 static private final int jjMoveStringLiteralDfa5_1(long old0, long active0)
972 if (((active0 &= old0)) == 0L)
973 return jjStartNfa_1(3, old0, 0L, 0L);
974 try { curChar = input_stream.readChar(); }
975 catch(java.io.IOException e) {
976 jjStopStringLiteralDfa_1(4, active0, 0L, 0L);
983 return jjMoveStringLiteralDfa6_1(active0, 0x100000000000000L);
986 if ((active0 & 0x40000000L) != 0L)
987 return jjStartNfaWithStates_1(5, 30, 14);
991 return jjMoveStringLiteralDfa6_1(active0, 0x1000a000000L);
994 if ((active0 & 0x400000000000000L) != 0L)
995 return jjStartNfaWithStates_1(5, 58, 14);
996 return jjMoveStringLiteralDfa6_1(active0, 0x2000000000000000L);
999 if ((active0 & 0x100000L) != 0L)
1000 return jjStartNfaWithStates_1(5, 20, 14);
1004 if ((active0 & 0x20000000000000L) != 0L)
1005 return jjStartNfaWithStates_1(5, 53, 14);
1009 if ((active0 & 0x1000000000000L) != 0L)
1010 return jjStartNfaWithStates_1(5, 48, 14);
1014 return jjMoveStringLiteralDfa6_1(active0, 0x10000000020000L);
1017 if ((active0 & 0x20000000L) != 0L)
1018 return jjStartNfaWithStates_1(5, 29, 14);
1019 return jjMoveStringLiteralDfa6_1(active0, 0x4000000000L);
1022 if ((active0 & 0x400000000000L) != 0L)
1023 return jjStartNfaWithStates_1(5, 46, 14);
1024 return jjMoveStringLiteralDfa6_1(active0, 0x2000000000L);
1027 return jjMoveStringLiteralDfa6_1(active0, 0x14000000L);
1030 if ((active0 & 0x40000000000000L) != 0L)
1031 return jjStartNfaWithStates_1(5, 54, 14);
1036 return jjStartNfa_1(4, active0, 0L, 0L);
1038 static private final int jjMoveStringLiteralDfa6_1(long old0, long active0)
1040 if (((active0 &= old0)) == 0L)
1041 return jjStartNfa_1(4, old0, 0L, 0L);
1042 try { curChar = input_stream.readChar(); }
1043 catch(java.io.IOException e) {
1044 jjStopStringLiteralDfa_1(5, active0, 0L, 0L);
1051 if ((active0 & 0x2000000L) != 0L)
1056 else if ((active0 & 0x4000000L) != 0L)
1061 return jjMoveStringLiteralDfa7_1(active0, 0x18000000L);
1064 return jjMoveStringLiteralDfa7_1(active0, 0x10000000000000L);
1067 if ((active0 & 0x100000000000000L) != 0L)
1068 return jjStartNfaWithStates_1(6, 56, 14);
1072 return jjMoveStringLiteralDfa7_1(active0, 0x20000L);
1075 if ((active0 & 0x2000000000000000L) != 0L)
1076 return jjStartNfaWithStates_1(6, 61, 14);
1080 if ((active0 & 0x10000000000L) != 0L)
1081 return jjStartNfaWithStates_1(6, 40, 14);
1085 if ((active0 & 0x4000000000L) != 0L)
1086 return jjStartNfaWithStates_1(6, 38, 14);
1090 return jjMoveStringLiteralDfa7_1(active0, 0x2000000000L);
1094 return jjStartNfa_1(5, active0, 0L, 0L);
1096 static private final int jjMoveStringLiteralDfa7_1(long old0, long active0)
1098 if (((active0 &= old0)) == 0L)
1099 return jjStartNfa_1(5, old0, 0L, 0L);
1100 try { curChar = input_stream.readChar(); }
1101 catch(java.io.IOException e) {
1102 jjStopStringLiteralDfa_1(6, active0, 0L, 0L);
1108 return jjMoveStringLiteralDfa8_1(active0, 0x18000000L);
1111 if ((active0 & 0x2000000000L) != 0L)
1112 return jjStartNfaWithStates_1(7, 37, 14);
1113 else if ((active0 & 0x10000000000000L) != 0L)
1114 return jjStartNfaWithStates_1(7, 52, 14);
1118 if ((active0 & 0x20000L) != 0L)
1119 return jjStartNfaWithStates_1(7, 17, 14);
1124 return jjStartNfa_1(6, active0, 0L, 0L);
1126 static private final int jjMoveStringLiteralDfa8_1(long old0, long active0)
1128 if (((active0 &= old0)) == 0L)
1129 return jjStartNfa_1(6, old0, 0L, 0L);
1130 try { curChar = input_stream.readChar(); }
1131 catch(java.io.IOException e) {
1132 jjStopStringLiteralDfa_1(7, active0, 0L, 0L);
1139 return jjMoveStringLiteralDfa9_1(active0, 0x18000000L);
1143 return jjStartNfa_1(7, active0, 0L, 0L);
1145 static private final int jjMoveStringLiteralDfa9_1(long old0, long active0)
1147 if (((active0 &= old0)) == 0L)
1148 return jjStartNfa_1(7, old0, 0L, 0L);
1149 try { curChar = input_stream.readChar(); }
1150 catch(java.io.IOException e) {
1151 jjStopStringLiteralDfa_1(8, active0, 0L, 0L);
1158 return jjMoveStringLiteralDfa10_1(active0, 0x18000000L);
1162 return jjStartNfa_1(8, active0, 0L, 0L);
1164 static private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
1166 if (((active0 &= old0)) == 0L)
1167 return jjStartNfa_1(8, old0, 0L, 0L);
1168 try { curChar = input_stream.readChar(); }
1169 catch(java.io.IOException e) {
1170 jjStopStringLiteralDfa_1(9, active0, 0L, 0L);
1177 return jjMoveStringLiteralDfa11_1(active0, 0x18000000L);
1181 return jjStartNfa_1(9, active0, 0L, 0L);
1183 static private final int jjMoveStringLiteralDfa11_1(long old0, long active0)
1185 if (((active0 &= old0)) == 0L)
1186 return jjStartNfa_1(9, old0, 0L, 0L);
1187 try { curChar = input_stream.readChar(); }
1188 catch(java.io.IOException e) {
1189 jjStopStringLiteralDfa_1(10, active0, 0L, 0L);
1196 if ((active0 & 0x8000000L) != 0L)
1197 return jjStartNfaWithStates_1(11, 27, 14);
1198 else if ((active0 & 0x10000000L) != 0L)
1199 return jjStartNfaWithStates_1(11, 28, 14);
1204 return jjStartNfa_1(10, active0, 0L, 0L);
1206 static final long[] jjbitVec0 = {
1207 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
1209 static private final int jjMoveNfa_1(int startState, int curPos)
1215 jjstateSet[0] = startState;
1216 int j, kind = 0x7fffffff;
1219 if (++jjround == 0x7fffffff)
1223 long l = 1L << curChar;
1226 switch(jjstateSet[--i])
1229 if ((0x3ff000000000000L & l) != 0L)
1230 jjCheckNAddStates(2, 8);
1231 else if (curChar == 39)
1232 jjCheckNAddStates(9, 14);
1233 else if (curChar == 34)
1234 jjCheckNAddStates(15, 20);
1235 else if (curChar == 36)
1236 jjstateSet[jjnewStateCnt++] = 16;
1237 else if (curChar == 46)
1239 else if (curChar == 47)
1240 jjstateSet[jjnewStateCnt++] = 2;
1241 if ((0x3fe000000000000L & l) != 0L)
1245 jjCheckNAddTwoStates(5, 6);
1247 else if (curChar == 48)
1251 jjCheckNAddStates(21, 23);
1256 jjstateSet[jjnewStateCnt++] = 1;
1259 if ((0xffff7fffffffffffL & l) != 0L && kind > 10)
1264 jjstateSet[jjnewStateCnt++] = 0;
1267 if ((0x3fe000000000000L & l) == 0L)
1271 jjCheckNAddTwoStates(5, 6);
1274 if ((0x3ff000000000000L & l) == 0L)
1278 jjCheckNAddTwoStates(5, 6);
1285 if ((0x3ff000000000000L & l) == 0L)
1289 jjCheckNAddStates(24, 26);
1292 if ((0x280000000000L & l) != 0L)
1296 if ((0x3ff000000000000L & l) == 0L)
1300 jjCheckNAddTwoStates(11, 12);
1303 if ((0x3ff000000000000L & l) == 0L)
1307 jjstateSet[jjnewStateCnt++] = 14;
1311 jjstateSet[jjnewStateCnt++] = 16;
1314 if ((0x3ff000000000000L & l) == 0L)
1318 jjstateSet[jjnewStateCnt++] = 17;
1321 if ((0x3ff000000000000L & l) != 0L)
1322 jjCheckNAddStates(2, 8);
1325 if ((0x3ff000000000000L & l) != 0L)
1326 jjCheckNAddTwoStates(19, 20);
1333 jjCheckNAddStates(27, 29);
1336 if ((0x3ff000000000000L & l) == 0L)
1340 jjCheckNAddStates(27, 29);
1343 if ((0x280000000000L & l) != 0L)
1347 if ((0x3ff000000000000L & l) == 0L)
1351 jjCheckNAddTwoStates(24, 12);
1354 if ((0x3ff000000000000L & l) != 0L)
1355 jjCheckNAddTwoStates(25, 26);
1358 if ((0x280000000000L & l) != 0L)
1362 if ((0x3ff000000000000L & l) == 0L)
1366 jjCheckNAddTwoStates(28, 12);
1369 if ((0x3ff000000000000L & l) != 0L)
1370 jjCheckNAddStates(30, 32);
1373 if ((0x280000000000L & l) != 0L)
1377 if ((0x3ff000000000000L & l) != 0L)
1378 jjCheckNAddTwoStates(32, 12);
1385 jjCheckNAddStates(21, 23);
1388 if ((0x3ff000000000000L & l) == 0L)
1392 jjCheckNAddTwoStates(35, 6);
1395 if ((0xff000000000000L & l) == 0L)
1399 jjCheckNAddTwoStates(36, 6);
1403 jjCheckNAddStates(15, 20);
1406 if ((0xfffffffbffffffffL & l) != 0L)
1407 jjCheckNAddStates(33, 35);
1411 jjCheckNAddStates(33, 35);
1414 if (curChar == 34 && kind > 70)
1418 if ((0xfffffffbffffffffL & l) != 0L)
1419 jjCheckNAddStates(36, 38);
1423 jjCheckNAddStates(36, 38);
1426 if (curChar == 34 && kind > 71)
1431 jjCheckNAddStates(9, 14);
1434 if ((0xffffff7fffffffffL & l) != 0L)
1435 jjCheckNAddStates(39, 41);
1439 jjCheckNAddStates(39, 41);
1442 if (curChar == 39 && kind > 70)
1446 if ((0xffffff7fffffffffL & l) != 0L)
1447 jjCheckNAddStates(42, 44);
1451 jjCheckNAddStates(42, 44);
1454 if (curChar == 39 && kind > 72)
1458 jjAddStates(45, 47);
1461 jjAddStates(48, 50);
1465 } while(i != startsAt);
1467 else if (curChar < 128)
1469 long l = 1L << (curChar & 077);
1472 switch(jjstateSet[--i])
1475 if ((0x87fffffe87fffffeL & l) != 0L)
1481 else if (curChar == 96)
1482 jjCheckNAddStates(51, 56);
1489 if ((0x100000001000L & l) != 0L && kind > 64)
1493 if ((0x2000000020L & l) != 0L)
1494 jjAddStates(57, 58);
1497 if ((0x5000000050L & l) != 0L && kind > 68)
1502 if ((0x87fffffe87fffffeL & l) == 0L)
1510 if ((0x87fffffe87fffffeL & l) == 0L)
1517 if ((0x2000000020L & l) != 0L)
1518 jjAddStates(59, 60);
1521 if ((0x2000000020L & l) != 0L)
1522 jjAddStates(61, 62);
1525 if ((0x2000000020L & l) != 0L)
1526 jjAddStates(63, 64);
1529 if ((0x100000001000000L & l) != 0L)
1533 if ((0x7e0000007eL & l) == 0L)
1537 jjCheckNAddTwoStates(35, 6);
1540 jjAddStates(33, 35);
1544 jjstateSet[jjnewStateCnt++] = 39;
1547 jjAddStates(36, 38);
1551 jjstateSet[jjnewStateCnt++] = 43;
1554 jjAddStates(39, 41);
1558 jjstateSet[jjnewStateCnt++] = 48;
1561 jjAddStates(42, 44);
1565 jjstateSet[jjnewStateCnt++] = 52;
1569 jjCheckNAddStates(51, 56);
1572 if ((0xfffffffeffffffffL & l) != 0L)
1573 jjCheckNAddStates(45, 47);
1577 jjCheckNAddStates(45, 47);
1581 jjstateSet[jjnewStateCnt++] = 57;
1584 if (curChar == 96 && kind > 70)
1588 if ((0xfffffffeffffffffL & l) != 0L)
1589 jjCheckNAddStates(48, 50);
1593 jjCheckNAddStates(48, 50);
1597 jjstateSet[jjnewStateCnt++] = 61;
1600 if (curChar == 96 && kind > 73)
1605 } while(i != startsAt);
1609 int i2 = (curChar & 0xff) >> 6;
1610 long l2 = 1L << (curChar & 077);
1613 switch(jjstateSet[--i])
1617 if ((jjbitVec0[i2] & l2) == 0L)
1624 if ((jjbitVec0[i2] & l2) != 0L && kind > 10)
1629 if ((jjbitVec0[i2] & l2) == 0L)
1636 if ((jjbitVec0[i2] & l2) != 0L)
1637 jjAddStates(33, 35);
1640 if ((jjbitVec0[i2] & l2) != 0L)
1641 jjAddStates(36, 38);
1644 if ((jjbitVec0[i2] & l2) != 0L)
1645 jjAddStates(39, 41);
1648 if ((jjbitVec0[i2] & l2) != 0L)
1649 jjAddStates(42, 44);
1652 if ((jjbitVec0[i2] & l2) != 0L)
1653 jjAddStates(45, 47);
1656 if ((jjbitVec0[i2] & l2) != 0L)
1657 jjAddStates(48, 50);
1661 } while(i != startsAt);
1663 if (kind != 0x7fffffff)
1665 jjmatchedKind = kind;
1666 jjmatchedPos = curPos;
1670 if ((i = jjnewStateCnt) == (startsAt = 64 - (jjnewStateCnt = startsAt)))
1672 try { curChar = input_stream.readChar(); }
1673 catch(java.io.IOException e) { return curPos; }
1676 static private final int jjMoveStringLiteralDfa0_3()
1681 return jjMoveStringLiteralDfa1_3(0x2000L);
1686 static private final int jjMoveStringLiteralDfa1_3(long active0)
1688 try { curChar = input_stream.readChar(); }
1689 catch(java.io.IOException e) {
1695 if ((active0 & 0x2000L) != 0L)
1696 return jjStopAtPos(1, 13);
1703 static final int[] jjnextStates = {
1704 4, 5, 19, 20, 25, 26, 29, 30, 12, 47, 49, 50, 51, 53, 54, 38,
1705 40, 41, 42, 44, 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30,
1706 12, 38, 40, 41, 42, 44, 45, 47, 49, 50, 51, 53, 54, 56, 58, 59,
1707 60, 62, 63, 56, 58, 59, 60, 62, 63, 10, 11, 23, 24, 27, 28, 31,
1710 public static final String[] jjstrLiteralImages = {
1711 "", null, "\77\76", null, null, null, null, null, null, null, null, null, null,
1712 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1713 null, null, null, null, "\55\76", "\72\72", "\75\76", null, null, null, null, null,
1714 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1715 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1716 null, null, null, null, null, null, null, null, null, null, null, "\50", "\51",
1717 "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\44", "\75", "\76",
1718 "\74", "\41", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174",
1719 "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45",
1720 "\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75",
1721 "\174\75", "\136\75", "\56\75", "\45\75", "\74\74\75", "\76\76\75", "\41\75\75",
1722 "\75\75\75", "\176\75", null, "\77\76", };
1723 public static final String[] lexStateNames = {
1726 "IN_SINGLE_LINE_COMMENT",
1727 "IN_FORMAL_COMMENT",
1728 "IN_MULTI_LINE_COMMENT",
1730 public static final int[] jjnewLexState = {
1731 -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,
1732 -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,
1733 -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,
1734 -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,
1735 -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,
1738 static final long[] jjtoToken = {
1739 0xffffffffffff0007L, 0xffffffffffffc7d1L, 0x3L,
1741 static final long[] jjtoSkip = {
1742 0x71f8L, 0x0L, 0x0L,
1744 static final long[] jjtoSpecial = {
1745 0x7000L, 0x0L, 0x0L,
1747 static final long[] jjtoMore = {
1748 0x8e00L, 0x0L, 0x0L,
1750 static protected SimpleCharStream input_stream;
1751 static private final int[] jjrounds = new int[64];
1752 static private final int[] jjstateSet = new int[128];
1753 static StringBuffer image;
1754 static int jjimageLen;
1755 static int lengthOfMatch;
1756 static protected char curChar;
1757 public PHPParserTokenManager(SimpleCharStream stream)
1759 if (input_stream != null)
1760 throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
1761 input_stream = stream;
1763 public PHPParserTokenManager(SimpleCharStream stream, int lexState)
1768 static public void ReInit(SimpleCharStream stream)
1770 jjmatchedPos = jjnewStateCnt = 0;
1771 curLexState = defaultLexState;
1772 input_stream = stream;
1775 static private final void ReInitRounds()
1778 jjround = 0x80000001;
1779 for (i = 64; i-- > 0;)
1780 jjrounds[i] = 0x80000000;
1782 static public void ReInit(SimpleCharStream stream, int lexState)
1787 static public void SwitchTo(int lexState)
1789 if (lexState >= 5 || lexState < 0)
1790 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1792 curLexState = lexState;
1795 static protected Token jjFillToken()
1797 Token t = Token.newToken(jjmatchedKind);
1798 t.kind = jjmatchedKind;
1799 String im = jjstrLiteralImages[jjmatchedKind];
1800 t.image = (im == null) ? input_stream.GetImage() : im;
1801 t.beginLine = input_stream.getBeginLine();
1802 t.beginColumn = input_stream.getBeginColumn();
1803 t.endLine = input_stream.getEndLine();
1804 t.endColumn = input_stream.getEndColumn();
1808 static int curLexState = 0;
1809 static int defaultLexState = 0;
1810 static int jjnewStateCnt;
1812 static int jjmatchedPos;
1813 static int jjmatchedKind;
1815 public static Token getNextToken()
1818 Token specialToken = null;
1827 curChar = input_stream.BeginToken();
1829 catch(java.io.IOException e)
1832 matchedToken = jjFillToken();
1833 matchedToken.specialToken = specialToken;
1834 return matchedToken;
1844 jjmatchedKind = 0x7fffffff;
1846 curPos = jjMoveStringLiteralDfa0_0();
1847 if (jjmatchedPos == 0 && jjmatchedKind > 3)
1853 try { input_stream.backup(0);
1854 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
1855 curChar = input_stream.BeginToken();
1857 catch (java.io.IOException e1) { continue EOFLoop; }
1858 jjmatchedKind = 0x7fffffff;
1860 curPos = jjMoveStringLiteralDfa0_1();
1863 jjmatchedKind = 0x7fffffff;
1865 curPos = jjMoveStringLiteralDfa0_2();
1866 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1872 jjmatchedKind = 0x7fffffff;
1874 curPos = jjMoveStringLiteralDfa0_3();
1875 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1881 jjmatchedKind = 0x7fffffff;
1883 curPos = jjMoveStringLiteralDfa0_4();
1884 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1890 if (jjmatchedKind != 0x7fffffff)
1892 if (jjmatchedPos + 1 < curPos)
1893 input_stream.backup(curPos - jjmatchedPos - 1);
1894 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1896 matchedToken = jjFillToken();
1897 matchedToken.specialToken = specialToken;
1898 if (jjnewLexState[jjmatchedKind] != -1)
1899 curLexState = jjnewLexState[jjmatchedKind];
1900 return matchedToken;
1902 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1904 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1906 matchedToken = jjFillToken();
1907 if (specialToken == null)
1908 specialToken = matchedToken;
1911 matchedToken.specialToken = specialToken;
1912 specialToken = (specialToken.next = matchedToken);
1914 SkipLexicalActions(matchedToken);
1917 SkipLexicalActions(null);
1918 if (jjnewLexState[jjmatchedKind] != -1)
1919 curLexState = jjnewLexState[jjmatchedKind];
1922 MoreLexicalActions();
1923 if (jjnewLexState[jjmatchedKind] != -1)
1924 curLexState = jjnewLexState[jjmatchedKind];
1926 jjmatchedKind = 0x7fffffff;
1928 curChar = input_stream.readChar();
1931 catch (java.io.IOException e1) { }
1933 int error_line = input_stream.getEndLine();
1934 int error_column = input_stream.getEndColumn();
1935 String error_after = null;
1936 boolean EOFSeen = false;
1937 try { input_stream.readChar(); input_stream.backup(1); }
1938 catch (java.io.IOException e1) {
1940 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1941 if (curChar == '\n' || curChar == '\r') {
1949 input_stream.backup(1);
1950 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1952 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1957 static void SkipLexicalActions(Token matchedToken)
1959 switch(jjmatchedKind)
1965 static void MoreLexicalActions()
1967 jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1968 switch(jjmatchedKind)
1972 image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen)));
1974 image.append(new String(input_stream.GetSuffix(jjimageLen)));
1976 input_stream.backup(1);