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;
18 public class PHPParserTokenManager implements PHPParserConstants
20 public static java.io.PrintStream debugStream = System.out;
21 public static void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
22 private static final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2)
30 private static final int jjStartNfa_0(int pos, long active0, long active1, long active2)
32 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1);
34 static private final int jjStopAtPos(int pos, int kind)
40 static private final int jjStartNfaWithStates_0(int pos, int kind, int state)
44 try { curChar = input_stream.readChar(); }
45 catch(java.io.IOException e) { return pos + 1; }
46 return jjMoveNfa_0(state, pos + 1);
48 static private final int jjMoveStringLiteralDfa0_0()
53 return jjMoveStringLiteralDfa1_0(0x8000000000000000L);
55 return jjMoveNfa_0(0, 0);
58 static private final int jjMoveStringLiteralDfa1_0(long active1)
60 try { curChar = input_stream.readChar(); }
61 catch(java.io.IOException e) {
62 jjStopStringLiteralDfa_0(0, 0L, active1, 0L);
68 if ((active1 & 0x8000000000000000L) != 0L)
69 return jjStopAtPos(1, 127);
74 return jjStartNfa_0(0, 0L, active1, 0L);
76 static private final void jjCheckNAdd(int state)
78 if (jjrounds[state] != jjround)
80 jjstateSet[jjnewStateCnt++] = state;
81 jjrounds[state] = jjround;
84 static private final void jjAddStates(int start, int end)
87 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
88 } while (start++ != end);
90 static private final void jjCheckNAddTwoStates(int state1, int state2)
95 static private final void jjCheckNAddStates(int start, int end)
98 jjCheckNAdd(jjnextStates[start]);
99 } while (start++ != end);
101 static private final void jjCheckNAddStates(int start)
103 jjCheckNAdd(jjnextStates[start]);
104 jjCheckNAdd(jjnextStates[start + 1]);
106 static private final int jjMoveNfa_0(int startState, int curPos)
112 jjstateSet[0] = startState;
113 int j, kind = 0x7fffffff;
116 if (++jjround == 0x7fffffff)
120 long l = 1L << curChar;
123 switch(jjstateSet[--i])
131 jjstateSet[jjnewStateCnt++] = 3;
134 if (curChar == 63 && kind > 1)
139 } while(i != startsAt);
141 else if (curChar < 128)
143 long l = 1L << (curChar & 077);
146 switch(jjstateSet[--i])
149 if ((0x1000000010000L & l) != 0L && kind > 1)
153 if ((0x10000000100L & l) != 0L)
154 jjstateSet[jjnewStateCnt++] = 1;
157 if ((0x1000000010000L & l) != 0L)
158 jjstateSet[jjnewStateCnt++] = 2;
162 } while(i != startsAt);
166 int i2 = (curChar & 0xff) >> 6;
167 long l2 = 1L << (curChar & 077);
170 switch(jjstateSet[--i])
174 } while(i != startsAt);
176 if (kind != 0x7fffffff)
178 jjmatchedKind = kind;
179 jjmatchedPos = curPos;
183 if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt)))
185 try { curChar = input_stream.readChar(); }
186 catch(java.io.IOException e) { return curPos; }
189 static private final int jjMoveStringLiteralDfa0_4()
194 return jjMoveStringLiteralDfa1_4(0x4000L);
199 static private final int jjMoveStringLiteralDfa1_4(long active0)
201 try { curChar = input_stream.readChar(); }
202 catch(java.io.IOException e) {
208 if ((active0 & 0x4000L) != 0L)
209 return jjStopAtPos(1, 14);
216 static private final int jjMoveStringLiteralDfa0_2()
218 return jjMoveNfa_2(0, 0);
220 static private final int jjMoveNfa_2(int startState, int curPos)
226 jjstateSet[0] = startState;
227 int j, kind = 0x7fffffff;
230 if (++jjround == 0x7fffffff)
234 long l = 1L << curChar;
237 switch(jjstateSet[--i])
240 if ((0x2400L & l) != 0L)
245 else if (curChar == 63)
246 jjstateSet[jjnewStateCnt++] = 3;
248 jjstateSet[jjnewStateCnt++] = 1;
251 if (curChar == 10 && kind > 12)
256 jjstateSet[jjnewStateCnt++] = 1;
264 jjstateSet[jjnewStateCnt++] = 3;
268 } while(i != startsAt);
270 else if (curChar < 128)
272 long l = 1L << (curChar & 077);
275 switch(jjstateSet[--i])
279 } while(i != startsAt);
283 int i2 = (curChar & 0xff) >> 6;
284 long l2 = 1L << (curChar & 077);
287 switch(jjstateSet[--i])
291 } while(i != startsAt);
293 if (kind != 0x7fffffff)
295 jjmatchedKind = kind;
296 jjmatchedPos = curPos;
300 if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt)))
302 try { curChar = input_stream.readChar(); }
303 catch(java.io.IOException e) { return curPos; }
306 private static final int jjStopStringLiteralDfa_1(int pos, long active0, long active1)
311 if ((active0 & 0xfffffffc7fff0000L) != 0L)
316 if ((active0 & 0xa00L) != 0L || (active1 & 0x20040000000000L) != 0L)
318 if ((active1 & 0x1000000L) != 0L)
320 if ((active1 & 0x200000000400000L) != 0L)
324 if ((active0 & 0x800L) != 0L)
326 if ((active0 & 0x4400008000080000L) != 0L)
328 if ((active0 & 0xbbffff7c7ff70000L) != 0L)
330 if (jjmatchedPos != 1)
339 if ((active0 & 0xb000140000040000L) != 0L)
341 if ((active0 & 0xfffeb7c7ff30000L) != 0L)
343 if (jjmatchedPos != 2)
352 if ((active0 & 0x2c79c3747ec30000L) != 0L)
354 if (jjmatchedPos != 3)
361 if ((active0 & 0x386280801300000L) != 0L)
365 if ((active0 & 0x808821400c10000L) != 0L)
367 if ((active0 & 0x257141607e120000L) != 0L)
375 if ((active0 & 0x461400060100000L) != 0L)
377 if ((active0 & 0x211001601e020000L) != 0L)
385 if ((active0 & 0x210001401e000000L) != 0L)
387 if ((active0 & 0x10002000020000L) != 0L)
389 if (jjmatchedPos != 6)
398 if ((active0 & 0x10002000020000L) != 0L)
400 if ((active0 & 0x18000000L) != 0L)
408 if ((active0 & 0x18000000L) != 0L)
416 if ((active0 & 0x18000000L) != 0L)
424 if ((active0 & 0x18000000L) != 0L)
435 private static final int jjStartNfa_1(int pos, long active0, long active1)
437 return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1);
439 static private final int jjStartNfaWithStates_1(int pos, int kind, int state)
441 jjmatchedKind = kind;
443 try { curChar = input_stream.readChar(); }
444 catch(java.io.IOException e) { return pos + 1; }
445 return jjMoveNfa_1(state, pos + 1);
447 static private final int jjMoveStringLiteralDfa0_1()
453 return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000L);
455 return jjStartNfaWithStates_1(0, 88, 16);
458 return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000000000L);
461 return jjMoveStringLiteralDfa1_1(0x0L, 0x40001000000000L);
463 return jjStopAtPos(0, 78);
465 return jjStopAtPos(0, 79);
468 return jjMoveStringLiteralDfa1_1(0x0L, 0x10000000000000L);
471 return jjMoveStringLiteralDfa1_1(0x0L, 0x4002000000000L);
473 return jjStopAtPos(0, 85);
476 return jjMoveStringLiteralDfa1_1(0x80000000L, 0x8004000000000L);
479 return jjMoveStringLiteralDfa1_1(0x0L, 0x200000000000000L);
482 return jjMoveStringLiteralDfa1_1(0xa00L, 0x20000000000000L);
485 return jjMoveStringLiteralDfa1_1(0x100000000L, 0x0L);
487 return jjStopAtPos(0, 84);
490 return jjMoveStringLiteralDfa1_1(0x0L, 0x800800100000000L);
493 return jjMoveStringLiteralDfa1_1(0x200000000L, 0x80000000L);
496 return jjMoveStringLiteralDfa1_1(0x0L, 0x3003000200000000L);
499 return jjMoveStringLiteralDfa1_1(0x4L, 0x0L);
501 return jjStopAtPos(0, 87);
503 return jjStopAtPos(0, 82);
505 return jjStopAtPos(0, 83);
508 return jjMoveStringLiteralDfa1_1(0x0L, 0x100000000000000L);
511 return jjMoveStringLiteralDfa1_1(0x8000000000400000L, 0x0L);
514 return jjMoveStringLiteralDfa1_1(0x180000400000000L, 0x0L);
517 return jjMoveStringLiteralDfa1_1(0x3800010000L, 0x0L);
520 return jjMoveStringLiteralDfa1_1(0x40000c000000000L, 0x0L);
523 return jjMoveStringLiteralDfa1_1(0x10010001300000L, 0x0L);
526 return jjMoveStringLiteralDfa1_1(0x800060000020000L, 0x0L);
529 return jjMoveStringLiteralDfa1_1(0x80020000000L, 0x0L);
532 return jjMoveStringLiteralDfa1_1(0x300000000a080000L, 0x0L);
535 return jjMoveStringLiteralDfa1_1(0x300000000000L, 0x0L);
538 return jjMoveStringLiteralDfa1_1(0x4040000000000000L, 0x0L);
541 return jjMoveStringLiteralDfa1_1(0x800000L, 0x0L);
544 return jjMoveStringLiteralDfa1_1(0x200400014000000L, 0x0L);
547 return jjMoveStringLiteralDfa1_1(0x21800040000000L, 0x0L);
550 return jjMoveStringLiteralDfa1_1(0x6000000000000L, 0x0L);
553 return jjMoveStringLiteralDfa1_1(0x40000L, 0x0L);
556 return jjMoveStringLiteralDfa1_1(0x8000000000000L, 0x0L);
558 return jjStopAtPos(0, 80);
561 return jjMoveStringLiteralDfa1_1(0x0L, 0x80000800000000L);
563 return jjStopAtPos(0, 81);
565 return jjMoveNfa_1(3, 0);
568 static private final int jjMoveStringLiteralDfa1_1(long active0, long active1)
570 try { curChar = input_stream.readChar(); }
571 catch(java.io.IOException e) {
572 jjStopStringLiteralDfa_1(0, active0, active1);
578 if ((active1 & 0x1000000000L) != 0L)
579 return jjStopAtPos(1, 100);
582 if ((active0 & 0x800L) != 0L)
583 return jjStartNfaWithStates_1(1, 11, 0);
586 if ((active1 & 0x2000000000L) != 0L)
587 return jjStopAtPos(1, 101);
590 if ((active1 & 0x4000000000L) != 0L)
591 return jjStopAtPos(1, 102);
594 if ((active0 & 0x200L) != 0L)
595 return jjStopAtPos(1, 9);
598 if ((active0 & 0x100000000L) != 0L)
599 return jjStopAtPos(1, 32);
602 if ((active1 & 0x800000000000L) != 0L)
607 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x800000000000000L);
609 if ((active1 & 0x80000000L) != 0L)
610 return jjStopAtPos(1, 95);
611 else if ((active1 & 0x100000000L) != 0L)
612 return jjStopAtPos(1, 96);
613 else if ((active1 & 0x200000000L) != 0L)
614 return jjStopAtPos(1, 97);
615 else if ((active1 & 0x400000000L) != 0L)
616 return jjStopAtPos(1, 98);
617 else if ((active1 & 0x4000000000000L) != 0L)
618 return jjStopAtPos(1, 114);
619 else if ((active1 & 0x8000000000000L) != 0L)
620 return jjStopAtPos(1, 115);
621 else if ((active1 & 0x10000000000000L) != 0L)
622 return jjStopAtPos(1, 116);
623 else if ((active1 & 0x20000000000000L) != 0L)
624 return jjStopAtPos(1, 117);
625 else if ((active1 & 0x40000000000000L) != 0L)
626 return jjStopAtPos(1, 118);
627 else if ((active1 & 0x80000000000000L) != 0L)
628 return jjStopAtPos(1, 119);
629 else if ((active1 & 0x100000000000000L) != 0L)
630 return jjStopAtPos(1, 120);
631 else if ((active1 & 0x200000000000000L) != 0L)
632 return jjStopAtPos(1, 121);
633 else if ((active1 & 0x400000000000000L) != 0L)
634 return jjStopAtPos(1, 122);
637 if ((active0 & 0x4L) != 0L)
638 return jjStopAtPos(1, 2);
639 else if ((active0 & 0x80000000L) != 0L)
640 return jjStopAtPos(1, 31);
641 else if ((active0 & 0x200000000L) != 0L)
642 return jjStopAtPos(1, 33);
643 else if ((active1 & 0x1000000000000L) != 0L)
648 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x3002000000000000L);
651 return jjMoveStringLiteralDfa2_1(active0, 0x20800040000L, active1, 0L);
654 return jjMoveStringLiteralDfa2_1(active0, 0x40000000000000L, active1, 0L);
657 return jjMoveStringLiteralDfa2_1(active0, 0x1000000L, active1, 0L);
660 return jjMoveStringLiteralDfa2_1(active0, 0x200504014000000L, active1, 0L);
663 if ((active0 & 0x80000L) != 0L)
664 return jjStartNfaWithStates_1(1, 19, 14);
668 return jjMoveStringLiteralDfa2_1(active0, 0xa000000000000L, active1, 0L);
671 return jjMoveStringLiteralDfa2_1(active0, 0x800000020310000L, active1, 0L);
674 return jjMoveStringLiteralDfa2_1(active0, 0xb01000000a000000L, active1, 0L);
677 if ((active0 & 0x8000000000L) != 0L)
682 return jjMoveStringLiteralDfa2_1(active0, 0x5800c3000000000L, active1, 0L);
685 if ((active0 & 0x4000000000000000L) != 0L)
686 return jjStartNfaWithStates_1(1, 62, 14);
687 return jjMoveStringLiteralDfa2_1(active0, 0x4000400c00000L, active1, 0L);
690 return jjMoveStringLiteralDfa2_1(active0, 0x20000040000000L, active1, 0L);
693 return jjMoveStringLiteralDfa2_1(active0, 0xa00000020000L, active1, 0L);
696 return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000L, active1, 0L);
699 return jjMoveStringLiteralDfa2_1(active0, 0x10000000000L, active1, 0L);
701 if ((active1 & 0x800000000L) != 0L)
702 return jjStopAtPos(1, 99);
707 return jjStartNfa_1(0, active0, active1);
709 static private final int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1)
711 if (((active0 &= old0) | (active1 &= old1)) == 0L)
712 return jjStartNfa_1(0, old0, old1);
713 try { curChar = input_stream.readChar(); }
714 catch(java.io.IOException e) {
715 jjStopStringLiteralDfa_1(1, active0, active1);
721 if ((active1 & 0x800000000000000L) != 0L)
722 return jjStopAtPos(2, 123);
723 else if ((active1 & 0x1000000000000000L) != 0L)
724 return jjStopAtPos(2, 124);
727 if ((active1 & 0x2000000000000L) != 0L)
732 return jjMoveStringLiteralDfa3_1(active0, 0L, active1, 0x2000000000000000L);
735 return jjMoveStringLiteralDfa3_1(active0, 0x200000040010000L, active1, 0L);
738 return jjMoveStringLiteralDfa3_1(active0, 0xa000000L, active1, 0L);
741 if ((active0 & 0x8000000000000000L) != 0L)
742 return jjStartNfaWithStates_1(2, 63, 14);
743 return jjMoveStringLiteralDfa3_1(active0, 0x10000000000000L, active1, 0L);
746 return jjMoveStringLiteralDfa3_1(active0, 0x400000000L, active1, 0L);
749 return jjMoveStringLiteralDfa3_1(active0, 0x4000000000L, active1, 0L);
752 return jjMoveStringLiteralDfa3_1(active0, 0x1000000L, active1, 0L);
755 return jjMoveStringLiteralDfa3_1(active0, 0xb000000800000L, active1, 0L);
758 return jjMoveStringLiteralDfa3_1(active0, 0x40000000000000L, active1, 0L);
761 return jjMoveStringLiteralDfa3_1(active0, 0x220000000000L, active1, 0L);
764 return jjMoveStringLiteralDfa3_1(active0, 0x3000020000L, active1, 0L);
767 return jjMoveStringLiteralDfa3_1(active0, 0x980000020000000L, active1, 0L);
770 return jjMoveStringLiteralDfa3_1(active0, 0x800000000000L, active1, 0L);
773 return jjMoveStringLiteralDfa3_1(active0, 0x14000000L, active1, 0L);
776 if ((active0 & 0x40000L) != 0L)
777 return jjStartNfaWithStates_1(2, 18, 14);
778 else if ((active0 & 0x40000000000L) != 0L)
779 return jjStartNfaWithStates_1(2, 42, 14);
780 return jjMoveStringLiteralDfa3_1(active0, 0x20000000400000L, active1, 0L);
783 return jjMoveStringLiteralDfa3_1(active0, 0x800300000L, active1, 0L);
786 if ((active0 & 0x1000000000000000L) != 0L)
791 return jjMoveStringLiteralDfa3_1(active0, 0x2000490000000000L, active1, 0L);
794 return jjMoveStringLiteralDfa3_1(active0, 0x404000000000000L, active1, 0L);
797 if ((active0 & 0x100000000000L) != 0L)
798 return jjStartNfaWithStates_1(2, 44, 14);
803 return jjStartNfa_1(1, active0, active1);
805 static private final int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1)
807 if (((active0 &= old0) | (active1 &= old1)) == 0L)
808 return jjStartNfa_1(1, old0, old1);
809 try { curChar = input_stream.readChar(); }
810 catch(java.io.IOException e) {
811 jjStopStringLiteralDfa_1(2, active0, active1);
817 if ((active1 & 0x2000000000000000L) != 0L)
818 return jjStopAtPos(3, 125);
822 return jjMoveStringLiteralDfa4_1(active0, 0x800004400400000L, active1, 0L);
825 return jjMoveStringLiteralDfa4_1(active0, 0x400000020000000L, active1, 0L);
828 return jjMoveStringLiteralDfa4_1(active0, 0x20000L, active1, 0L);
831 if ((active0 & 0x200000L) != 0L)
836 else if ((active0 & 0x800000000L) != 0L)
837 return jjStartNfaWithStates_1(3, 35, 14);
838 else if ((active0 & 0x4000000000000L) != 0L)
839 return jjStartNfaWithStates_1(3, 50, 14);
840 return jjMoveStringLiteralDfa4_1(active0, 0x2040810000100000L, active1, 0L);
843 return jjMoveStringLiteralDfa4_1(active0, 0x20000000000000L, active1, 0L);
846 if ((active0 & 0x200000000000L) != 0L)
847 return jjStartNfaWithStates_1(3, 45, 14);
848 else if ((active0 & 0x80000000000000L) != 0L)
853 else if ((active0 & 0x200000000000000L) != 0L)
854 return jjStartNfaWithStates_1(3, 57, 14);
855 return jjMoveStringLiteralDfa4_1(active0, 0x10800000a000000L, active1, 0L);
858 return jjMoveStringLiteralDfa4_1(active0, 0x800000L, active1, 0L);
861 if ((active0 & 0x1000000L) != 0L)
862 return jjStartNfaWithStates_1(3, 24, 14);
863 else if ((active0 & 0x80000000000L) != 0L)
864 return jjStartNfaWithStates_1(3, 43, 14);
868 if ((active0 & 0x2000000000000L) != 0L)
869 return jjStartNfaWithStates_1(3, 49, 14);
870 return jjMoveStringLiteralDfa4_1(active0, 0x21000010000L, active1, 0L);
873 return jjMoveStringLiteralDfa4_1(active0, 0x1002040000000L, active1, 0L);
876 return jjMoveStringLiteralDfa4_1(active0, 0x400014000000L, active1, 0L);
879 return jjMoveStringLiteralDfa4_1(active0, 0x10000000000000L, active1, 0L);
883 return jjStartNfa_1(2, active0, active1);
885 static private final int jjMoveStringLiteralDfa4_1(long old0, long active0, long old1, long active1)
887 if (((active0 &= old0) | (active1 &= old1)) == 0L)
888 return jjStartNfa_1(2, old0, old1);
889 try { curChar = input_stream.readChar(); }
890 catch(java.io.IOException e) {
891 jjStopStringLiteralDfa_1(3, active0, 0L);
898 return jjMoveStringLiteralDfa5_1(active0, 0x20000000L);
901 return jjMoveStringLiteralDfa5_1(active0, 0x41000000000000L);
904 if ((active0 & 0x20000000000L) != 0L)
905 return jjStartNfaWithStates_1(4, 41, 14);
906 else if ((active0 & 0x8000000000000L) != 0L)
907 return jjStartNfaWithStates_1(4, 51, 14);
908 return jjMoveStringLiteralDfa5_1(active0, 0x100000000000000L);
911 return jjMoveStringLiteralDfa5_1(active0, 0x2000000000000000L);
914 return jjMoveStringLiteralDfa5_1(active0, 0x10000000000000L);
917 return jjMoveStringLiteralDfa5_1(active0, 0x2054100000L);
920 if ((active0 & 0x400000000L) != 0L)
921 return jjStartNfaWithStates_1(4, 34, 14);
925 return jjMoveStringLiteralDfa5_1(active0, 0x400000000000000L);
928 return jjMoveStringLiteralDfa5_1(active0, 0x20010000000000L);
931 if ((active0 & 0x800000000000L) != 0L)
932 return jjStartNfaWithStates_1(4, 47, 14);
933 return jjMoveStringLiteralDfa5_1(active0, 0x400000000000L);
936 if ((active0 & 0x10000L) != 0L)
937 return jjStartNfaWithStates_1(4, 16, 14);
941 if ((active0 & 0x800000L) != 0L)
942 return jjStartNfaWithStates_1(4, 23, 14);
943 else if ((active0 & 0x1000000000L) != 0L)
944 return jjStartNfaWithStates_1(4, 36, 14);
945 else if ((active0 & 0x800000000000000L) != 0L)
946 return jjStartNfaWithStates_1(4, 59, 14);
947 return jjMoveStringLiteralDfa5_1(active0, 0x20000L);
950 return jjMoveStringLiteralDfa5_1(active0, 0x400a000000L);
953 if ((active0 & 0x400000L) != 0L)
954 return jjStartNfaWithStates_1(4, 22, 14);
959 return jjStartNfa_1(3, active0, 0L);
961 static private final int jjMoveStringLiteralDfa5_1(long old0, long active0)
963 if (((active0 &= old0)) == 0L)
964 return jjStartNfa_1(3, old0, 0L);
965 try { curChar = input_stream.readChar(); }
966 catch(java.io.IOException e) {
967 jjStopStringLiteralDfa_1(4, active0, 0L);
974 return jjMoveStringLiteralDfa6_1(active0, 0x100000000000000L);
977 if ((active0 & 0x40000000L) != 0L)
978 return jjStartNfaWithStates_1(5, 30, 14);
982 return jjMoveStringLiteralDfa6_1(active0, 0x1000a000000L);
985 if ((active0 & 0x400000000000000L) != 0L)
986 return jjStartNfaWithStates_1(5, 58, 14);
987 return jjMoveStringLiteralDfa6_1(active0, 0x2000000000000000L);
990 if ((active0 & 0x100000L) != 0L)
991 return jjStartNfaWithStates_1(5, 20, 14);
995 if ((active0 & 0x20000000000000L) != 0L)
996 return jjStartNfaWithStates_1(5, 53, 14);
1000 if ((active0 & 0x1000000000000L) != 0L)
1001 return jjStartNfaWithStates_1(5, 48, 14);
1005 return jjMoveStringLiteralDfa6_1(active0, 0x10000000020000L);
1008 if ((active0 & 0x20000000L) != 0L)
1009 return jjStartNfaWithStates_1(5, 29, 14);
1010 return jjMoveStringLiteralDfa6_1(active0, 0x4000000000L);
1013 if ((active0 & 0x400000000000L) != 0L)
1014 return jjStartNfaWithStates_1(5, 46, 14);
1015 return jjMoveStringLiteralDfa6_1(active0, 0x2000000000L);
1018 return jjMoveStringLiteralDfa6_1(active0, 0x14000000L);
1021 if ((active0 & 0x40000000000000L) != 0L)
1022 return jjStartNfaWithStates_1(5, 54, 14);
1027 return jjStartNfa_1(4, active0, 0L);
1029 static private final int jjMoveStringLiteralDfa6_1(long old0, long active0)
1031 if (((active0 &= old0)) == 0L)
1032 return jjStartNfa_1(4, old0, 0L);
1033 try { curChar = input_stream.readChar(); }
1034 catch(java.io.IOException e) {
1035 jjStopStringLiteralDfa_1(5, active0, 0L);
1042 if ((active0 & 0x2000000L) != 0L)
1047 else if ((active0 & 0x4000000L) != 0L)
1052 return jjMoveStringLiteralDfa7_1(active0, 0x18000000L);
1055 return jjMoveStringLiteralDfa7_1(active0, 0x10000000000000L);
1058 if ((active0 & 0x100000000000000L) != 0L)
1059 return jjStartNfaWithStates_1(6, 56, 14);
1063 return jjMoveStringLiteralDfa7_1(active0, 0x20000L);
1066 if ((active0 & 0x2000000000000000L) != 0L)
1067 return jjStartNfaWithStates_1(6, 61, 14);
1071 if ((active0 & 0x10000000000L) != 0L)
1072 return jjStartNfaWithStates_1(6, 40, 14);
1076 if ((active0 & 0x4000000000L) != 0L)
1077 return jjStartNfaWithStates_1(6, 38, 14);
1081 return jjMoveStringLiteralDfa7_1(active0, 0x2000000000L);
1085 return jjStartNfa_1(5, active0, 0L);
1087 static private final int jjMoveStringLiteralDfa7_1(long old0, long active0)
1089 if (((active0 &= old0)) == 0L)
1090 return jjStartNfa_1(5, old0, 0L);
1091 try { curChar = input_stream.readChar(); }
1092 catch(java.io.IOException e) {
1093 jjStopStringLiteralDfa_1(6, active0, 0L);
1099 return jjMoveStringLiteralDfa8_1(active0, 0x18000000L);
1102 if ((active0 & 0x2000000000L) != 0L)
1103 return jjStartNfaWithStates_1(7, 37, 14);
1104 else if ((active0 & 0x10000000000000L) != 0L)
1105 return jjStartNfaWithStates_1(7, 52, 14);
1109 if ((active0 & 0x20000L) != 0L)
1110 return jjStartNfaWithStates_1(7, 17, 14);
1115 return jjStartNfa_1(6, active0, 0L);
1117 static private final int jjMoveStringLiteralDfa8_1(long old0, long active0)
1119 if (((active0 &= old0)) == 0L)
1120 return jjStartNfa_1(6, old0, 0L);
1121 try { curChar = input_stream.readChar(); }
1122 catch(java.io.IOException e) {
1123 jjStopStringLiteralDfa_1(7, active0, 0L);
1130 return jjMoveStringLiteralDfa9_1(active0, 0x18000000L);
1134 return jjStartNfa_1(7, active0, 0L);
1136 static private final int jjMoveStringLiteralDfa9_1(long old0, long active0)
1138 if (((active0 &= old0)) == 0L)
1139 return jjStartNfa_1(7, old0, 0L);
1140 try { curChar = input_stream.readChar(); }
1141 catch(java.io.IOException e) {
1142 jjStopStringLiteralDfa_1(8, active0, 0L);
1149 return jjMoveStringLiteralDfa10_1(active0, 0x18000000L);
1153 return jjStartNfa_1(8, active0, 0L);
1155 static private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
1157 if (((active0 &= old0)) == 0L)
1158 return jjStartNfa_1(8, old0, 0L);
1159 try { curChar = input_stream.readChar(); }
1160 catch(java.io.IOException e) {
1161 jjStopStringLiteralDfa_1(9, active0, 0L);
1168 return jjMoveStringLiteralDfa11_1(active0, 0x18000000L);
1172 return jjStartNfa_1(9, active0, 0L);
1174 static private final int jjMoveStringLiteralDfa11_1(long old0, long active0)
1176 if (((active0 &= old0)) == 0L)
1177 return jjStartNfa_1(9, old0, 0L);
1178 try { curChar = input_stream.readChar(); }
1179 catch(java.io.IOException e) {
1180 jjStopStringLiteralDfa_1(10, active0, 0L);
1187 if ((active0 & 0x8000000L) != 0L)
1188 return jjStartNfaWithStates_1(11, 27, 14);
1189 else if ((active0 & 0x10000000L) != 0L)
1190 return jjStartNfaWithStates_1(11, 28, 14);
1195 return jjStartNfa_1(10, active0, 0L);
1197 static final long[] jjbitVec0 = {
1198 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
1200 static private final int jjMoveNfa_1(int startState, int curPos)
1206 jjstateSet[0] = startState;
1207 int j, kind = 0x7fffffff;
1210 if (++jjround == 0x7fffffff)
1214 long l = 1L << curChar;
1217 switch(jjstateSet[--i])
1220 if ((0x3ff000000000000L & l) != 0L)
1221 jjCheckNAddStates(2, 8);
1222 else if (curChar == 39)
1223 jjCheckNAddStates(9, 12);
1224 else if (curChar == 34)
1225 jjCheckNAddStates(13, 18);
1226 else if (curChar == 36)
1227 jjstateSet[jjnewStateCnt++] = 16;
1228 else if (curChar == 46)
1230 else if (curChar == 47)
1231 jjstateSet[jjnewStateCnt++] = 2;
1232 if ((0x3fe000000000000L & l) != 0L)
1236 jjCheckNAddTwoStates(5, 6);
1238 else if (curChar == 48)
1242 jjCheckNAddStates(19, 21);
1247 jjstateSet[jjnewStateCnt++] = 1;
1250 if ((0xffff7fffffffffffL & l) != 0L && kind > 10)
1255 jjstateSet[jjnewStateCnt++] = 0;
1258 if ((0x3fe000000000000L & l) == 0L)
1262 jjCheckNAddTwoStates(5, 6);
1265 if ((0x3ff000000000000L & l) == 0L)
1269 jjCheckNAddTwoStates(5, 6);
1276 if ((0x3ff000000000000L & l) == 0L)
1280 jjCheckNAddStates(22, 24);
1283 if ((0x280000000000L & l) != 0L)
1287 if ((0x3ff000000000000L & l) == 0L)
1291 jjCheckNAddTwoStates(11, 12);
1294 if ((0x3ff000000000000L & l) == 0L)
1298 jjstateSet[jjnewStateCnt++] = 14;
1302 jjstateSet[jjnewStateCnt++] = 16;
1305 if ((0x3ff000000000000L & l) == 0L)
1309 jjstateSet[jjnewStateCnt++] = 17;
1312 if ((0x3ff000000000000L & l) != 0L)
1313 jjCheckNAddStates(2, 8);
1316 if ((0x3ff000000000000L & l) != 0L)
1317 jjCheckNAddTwoStates(19, 20);
1324 jjCheckNAddStates(25, 27);
1327 if ((0x3ff000000000000L & l) == 0L)
1331 jjCheckNAddStates(25, 27);
1334 if ((0x280000000000L & l) != 0L)
1338 if ((0x3ff000000000000L & l) == 0L)
1342 jjCheckNAddTwoStates(24, 12);
1345 if ((0x3ff000000000000L & l) != 0L)
1346 jjCheckNAddTwoStates(25, 26);
1349 if ((0x280000000000L & l) != 0L)
1353 if ((0x3ff000000000000L & l) == 0L)
1357 jjCheckNAddTwoStates(28, 12);
1360 if ((0x3ff000000000000L & l) != 0L)
1361 jjCheckNAddStates(28, 30);
1364 if ((0x280000000000L & l) != 0L)
1368 if ((0x3ff000000000000L & l) != 0L)
1369 jjCheckNAddTwoStates(32, 12);
1376 jjCheckNAddStates(19, 21);
1379 if ((0x3ff000000000000L & l) == 0L)
1383 jjCheckNAddTwoStates(35, 6);
1386 if ((0xff000000000000L & l) == 0L)
1390 jjCheckNAddTwoStates(36, 6);
1394 jjCheckNAddStates(13, 18);
1397 if ((0xfffffffbffffffffL & l) != 0L)
1398 jjCheckNAddStates(31, 33);
1402 jjCheckNAddStates(31, 33);
1405 if (curChar == 34 && kind > 70)
1409 if ((0xfffffffbffffffffL & l) != 0L)
1410 jjCheckNAddStates(34, 36);
1414 jjCheckNAddStates(34, 36);
1417 if (curChar == 34 && kind > 71)
1422 jjCheckNAddStates(9, 12);
1425 if ((0xffffff7fffffffffL & l) != 0L)
1426 jjCheckNAddTwoStates(47, 48);
1429 if (curChar == 39 && kind > 70)
1433 if ((0xffffff7fffffffffL & l) != 0L)
1434 jjCheckNAddTwoStates(49, 50);
1437 if (curChar == 39 && kind > 72)
1441 jjAddStates(37, 38);
1444 jjAddStates(39, 40);
1448 } while(i != startsAt);
1450 else if (curChar < 128)
1452 long l = 1L << (curChar & 077);
1455 switch(jjstateSet[--i])
1458 if ((0x7fffffe87fffffeL & l) != 0L)
1464 else if (curChar == 96)
1465 jjCheckNAddStates(41, 44);
1472 if ((0x100000001000L & l) != 0L && kind > 64)
1476 if ((0x2000000020L & l) != 0L)
1477 jjAddStates(45, 46);
1480 if ((0x5000000050L & l) != 0L && kind > 68)
1485 if ((0x7fffffe87fffffeL & l) == 0L)
1493 if ((0x7fffffe87fffffeL & l) == 0L)
1500 if ((0x2000000020L & l) != 0L)
1501 jjAddStates(47, 48);
1504 if ((0x2000000020L & l) != 0L)
1505 jjAddStates(49, 50);
1508 if ((0x2000000020L & l) != 0L)
1509 jjAddStates(51, 52);
1512 if ((0x100000001000000L & l) != 0L)
1516 if ((0x7e0000007eL & l) == 0L)
1520 jjCheckNAddTwoStates(35, 6);
1523 jjAddStates(31, 33);
1527 jjstateSet[jjnewStateCnt++] = 39;
1530 jjAddStates(34, 36);
1534 jjstateSet[jjnewStateCnt++] = 43;
1537 jjAddStates(53, 54);
1540 jjAddStates(55, 56);
1544 jjCheckNAddStates(41, 44);
1547 if ((0xfffffffeffffffffL & l) != 0L)
1548 jjCheckNAddTwoStates(52, 53);
1551 if (curChar == 96 && kind > 70)
1555 if ((0xfffffffeffffffffL & l) != 0L)
1556 jjCheckNAddTwoStates(54, 55);
1559 if (curChar == 96 && kind > 73)
1564 } while(i != startsAt);
1568 int i2 = (curChar & 0xff) >> 6;
1569 long l2 = 1L << (curChar & 077);
1572 switch(jjstateSet[--i])
1575 if ((jjbitVec0[i2] & l2) != 0L && kind > 10)
1579 if ((jjbitVec0[i2] & l2) != 0L)
1580 jjAddStates(31, 33);
1583 if ((jjbitVec0[i2] & l2) != 0L)
1584 jjAddStates(34, 36);
1587 if ((jjbitVec0[i2] & l2) != 0L)
1588 jjAddStates(53, 54);
1591 if ((jjbitVec0[i2] & l2) != 0L)
1592 jjAddStates(55, 56);
1595 if ((jjbitVec0[i2] & l2) != 0L)
1596 jjAddStates(37, 38);
1599 if ((jjbitVec0[i2] & l2) != 0L)
1600 jjAddStates(39, 40);
1604 } while(i != startsAt);
1606 if (kind != 0x7fffffff)
1608 jjmatchedKind = kind;
1609 jjmatchedPos = curPos;
1613 if ((i = jjnewStateCnt) == (startsAt = 56 - (jjnewStateCnt = startsAt)))
1615 try { curChar = input_stream.readChar(); }
1616 catch(java.io.IOException e) { return curPos; }
1619 static private final int jjMoveStringLiteralDfa0_3()
1624 return jjMoveStringLiteralDfa1_3(0x2000L);
1629 static private final int jjMoveStringLiteralDfa1_3(long active0)
1631 try { curChar = input_stream.readChar(); }
1632 catch(java.io.IOException e) {
1638 if ((active0 & 0x2000L) != 0L)
1639 return jjStopAtPos(1, 13);
1646 static final int[] jjnextStates = {
1647 4, 5, 19, 20, 25, 26, 29, 30, 12, 47, 48, 49, 50, 38, 40, 41,
1648 42, 44, 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30, 12, 38,
1649 40, 41, 42, 44, 45, 52, 53, 54, 55, 52, 53, 54, 55, 10, 11, 23,
1650 24, 27, 28, 31, 32, 47, 48, 49, 50,
1652 public static final String[] jjstrLiteralImages = {
1653 "", null, "\77\76", null, null, null, null, null, null, null, null, null, null,
1654 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1655 null, null, null, null, "\55\76", "\72\72", "\75\76", 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, null, null, null, null, null, null, null, null, null, null,
1658 null, null, null, null, null, null, null, null, null, null, null, "\50", "\51",
1659 "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\44", "\75", "\76",
1660 "\74", "\41", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174",
1661 "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45",
1662 "\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75",
1663 "\174\75", "\136\75", "\56\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", null,
1665 public static final String[] lexStateNames = {
1668 "IN_SINGLE_LINE_COMMENT",
1669 "IN_FORMAL_COMMENT",
1670 "IN_MULTI_LINE_COMMENT",
1672 public static final int[] jjnewLexState = {
1673 -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,
1674 -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,
1675 -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,
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,
1680 static final long[] jjtoToken = {
1681 0xffffffffffff0007L, 0xffffffffffffc7d1L, 0x0L,
1683 static final long[] jjtoSkip = {
1684 0x71f8L, 0x0L, 0x0L,
1686 static final long[] jjtoSpecial = {
1687 0x7000L, 0x0L, 0x0L,
1689 static final long[] jjtoMore = {
1690 0x8e00L, 0x0L, 0x0L,
1692 static private SimpleCharStream input_stream;
1693 static private final int[] jjrounds = new int[56];
1694 static private final int[] jjstateSet = new int[112];
1695 static StringBuffer image;
1696 static int jjimageLen;
1697 static int lengthOfMatch;
1698 static protected char curChar;
1699 public PHPParserTokenManager(SimpleCharStream stream)
1701 if (input_stream != null)
1702 throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
1703 input_stream = stream;
1705 public PHPParserTokenManager(SimpleCharStream stream, int lexState)
1710 static public void ReInit(SimpleCharStream stream)
1712 jjmatchedPos = jjnewStateCnt = 0;
1713 curLexState = defaultLexState;
1714 input_stream = stream;
1717 static private final void ReInitRounds()
1720 jjround = 0x80000001;
1721 for (i = 56; i-- > 0;)
1722 jjrounds[i] = 0x80000000;
1724 static public void ReInit(SimpleCharStream stream, int lexState)
1729 static public void SwitchTo(int lexState)
1731 if (lexState >= 5 || lexState < 0)
1732 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1734 curLexState = lexState;
1737 static private final Token jjFillToken()
1739 Token t = Token.newToken(jjmatchedKind);
1740 t.kind = jjmatchedKind;
1741 String im = jjstrLiteralImages[jjmatchedKind];
1742 t.image = (im == null) ? input_stream.GetImage() : im;
1743 t.beginLine = input_stream.getBeginLine();
1744 t.beginColumn = input_stream.getBeginColumn();
1745 t.endLine = input_stream.getEndLine();
1746 t.endColumn = input_stream.getEndColumn();
1750 static int curLexState = 0;
1751 static int defaultLexState = 0;
1752 static int jjnewStateCnt;
1754 static int jjmatchedPos;
1755 static int jjmatchedKind;
1757 public static final Token getNextToken()
1760 Token specialToken = null;
1769 curChar = input_stream.BeginToken();
1771 catch(java.io.IOException e)
1774 matchedToken = jjFillToken();
1775 matchedToken.specialToken = specialToken;
1776 return matchedToken;
1786 jjmatchedKind = 0x7fffffff;
1788 curPos = jjMoveStringLiteralDfa0_0();
1789 if (jjmatchedPos == 0 && jjmatchedKind > 3)
1795 try { input_stream.backup(0);
1796 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
1797 curChar = input_stream.BeginToken();
1799 catch (java.io.IOException e1) { continue EOFLoop; }
1800 jjmatchedKind = 0x7fffffff;
1802 curPos = jjMoveStringLiteralDfa0_1();
1805 jjmatchedKind = 0x7fffffff;
1807 curPos = jjMoveStringLiteralDfa0_2();
1808 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1814 jjmatchedKind = 0x7fffffff;
1816 curPos = jjMoveStringLiteralDfa0_3();
1817 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1823 jjmatchedKind = 0x7fffffff;
1825 curPos = jjMoveStringLiteralDfa0_4();
1826 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1832 if (jjmatchedKind != 0x7fffffff)
1834 if (jjmatchedPos + 1 < curPos)
1835 input_stream.backup(curPos - jjmatchedPos - 1);
1836 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1838 matchedToken = jjFillToken();
1839 matchedToken.specialToken = specialToken;
1840 if (jjnewLexState[jjmatchedKind] != -1)
1841 curLexState = jjnewLexState[jjmatchedKind];
1842 return matchedToken;
1844 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1846 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1848 matchedToken = jjFillToken();
1849 if (specialToken == null)
1850 specialToken = matchedToken;
1853 matchedToken.specialToken = specialToken;
1854 specialToken = (specialToken.next = matchedToken);
1856 SkipLexicalActions(matchedToken);
1859 SkipLexicalActions(null);
1860 if (jjnewLexState[jjmatchedKind] != -1)
1861 curLexState = jjnewLexState[jjmatchedKind];
1864 MoreLexicalActions();
1865 if (jjnewLexState[jjmatchedKind] != -1)
1866 curLexState = jjnewLexState[jjmatchedKind];
1868 jjmatchedKind = 0x7fffffff;
1870 curChar = input_stream.readChar();
1873 catch (java.io.IOException e1) { }
1875 int error_line = input_stream.getEndLine();
1876 int error_column = input_stream.getEndColumn();
1877 String error_after = null;
1878 boolean EOFSeen = false;
1879 try { input_stream.readChar(); input_stream.backup(1); }
1880 catch (java.io.IOException e1) {
1882 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1883 if (curChar == '\n' || curChar == '\r') {
1891 input_stream.backup(1);
1892 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1894 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1899 static final void SkipLexicalActions(Token matchedToken)
1901 switch(jjmatchedKind)
1907 static final void MoreLexicalActions()
1909 jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1910 switch(jjmatchedKind)
1914 image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen)));
1916 image.append(new String(input_stream.GetSuffix(jjimageLen)));
1918 input_stream.backup(1);