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.io.CharArrayReader;
9 import java.util.Hashtable;
10 import java.io.StringReader;
11 import java.text.MessageFormat;
12 import net.sourceforge.phpeclipse.actions.PHPStartApacheAction;
13 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
14 import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo;
16 public class PHPParserTokenManager implements PHPParserConstants
18 public static java.io.PrintStream debugStream = System.out;
19 public static void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
20 static private final int jjStopAtPos(int pos, int kind)
26 static private final int jjMoveStringLiteralDfa0_0()
31 return jjMoveStringLiteralDfa1_0(0x6L, 0x0L);
33 return jjMoveStringLiteralDfa1_0(0x0L, 0x1L);
38 static private final int jjMoveStringLiteralDfa1_0(long active0, long active2)
40 try { curChar = input_stream.readChar(); }
41 catch(java.io.IOException e) {
47 if ((active2 & 0x1L) != 0L)
48 return jjStopAtPos(1, 128);
51 if ((active0 & 0x4L) != 0L)
56 return jjMoveStringLiteralDfa2_0(active0, 0x2L, active2, 0L);
62 static private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old2, long active2)
64 if (((active0 &= old0) | (active2 &= old2)) == 0L)
66 try { curChar = input_stream.readChar(); }
67 catch(java.io.IOException e) {
74 return jjMoveStringLiteralDfa3_0(active0, 0x2L);
79 static private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
81 if (((active0 &= old0)) == 0L)
83 try { curChar = input_stream.readChar(); }
84 catch(java.io.IOException e) {
91 return jjMoveStringLiteralDfa4_0(active0, 0x2L);
96 static private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
98 if (((active0 &= old0)) == 0L)
100 try { curChar = input_stream.readChar(); }
101 catch(java.io.IOException e) {
108 if ((active0 & 0x2L) != 0L)
109 return jjStopAtPos(4, 1);
116 static private final int jjMoveStringLiteralDfa0_4()
121 return jjMoveStringLiteralDfa1_4(0x8000L);
126 static private final int jjMoveStringLiteralDfa1_4(long active0)
128 try { curChar = input_stream.readChar(); }
129 catch(java.io.IOException e) {
135 if ((active0 & 0x8000L) != 0L)
136 return jjStopAtPos(1, 15);
143 static private final int jjMoveStringLiteralDfa0_2()
145 return jjMoveNfa_2(0, 0);
147 static private final void jjCheckNAdd(int state)
149 if (jjrounds[state] != jjround)
151 jjstateSet[jjnewStateCnt++] = state;
152 jjrounds[state] = jjround;
155 static private final void jjAddStates(int start, int end)
158 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
159 } while (start++ != end);
161 static private final void jjCheckNAddTwoStates(int state1, int state2)
166 static private final void jjCheckNAddStates(int start, int end)
169 jjCheckNAdd(jjnextStates[start]);
170 } while (start++ != end);
172 static private final void jjCheckNAddStates(int start)
174 jjCheckNAdd(jjnextStates[start]);
175 jjCheckNAdd(jjnextStates[start + 1]);
177 static private final int jjMoveNfa_2(int startState, int curPos)
183 jjstateSet[0] = startState;
184 int j, kind = 0x7fffffff;
187 if (++jjround == 0x7fffffff)
191 long l = 1L << curChar;
194 switch(jjstateSet[--i])
197 if ((0x2400L & l) != 0L)
202 else if (curChar == 63)
203 jjstateSet[jjnewStateCnt++] = 3;
205 jjstateSet[jjnewStateCnt++] = 1;
208 if (curChar == 10 && kind > 13)
213 jjstateSet[jjnewStateCnt++] = 1;
221 jjstateSet[jjnewStateCnt++] = 3;
225 } while(i != startsAt);
227 else if (curChar < 128)
229 long l = 1L << (curChar & 077);
232 switch(jjstateSet[--i])
236 } while(i != startsAt);
240 int i2 = (curChar & 0xff) >> 6;
241 long l2 = 1L << (curChar & 077);
244 switch(jjstateSet[--i])
248 } while(i != startsAt);
250 if (kind != 0x7fffffff)
252 jjmatchedKind = kind;
253 jjmatchedPos = curPos;
257 if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt)))
259 try { curChar = input_stream.readChar(); }
260 catch(java.io.IOException e) { return curPos; }
263 private static final int jjStopStringLiteralDfa_1(int pos, long active0, long active1)
268 if ((active0 & 0xfffffff8fffe0000L) != 0L || (active1 & 0x1L) != 0L)
273 if ((active0 & 0x1400L) != 0L || (active1 & 0x40080000000000L) != 0L)
275 if ((active1 & 0x2000000L) != 0L)
277 if ((active1 & 0x400000000800000L) != 0L)
281 if ((active0 & 0x1000L) != 0L)
283 if ((active0 & 0x8800010000100000L) != 0L)
285 if ((active0 & 0x77fffef8ffee0000L) != 0L || (active1 & 0x1L) != 0L)
287 if (jjmatchedPos != 1)
296 if ((active0 & 0x6000280000080000L) != 0L || (active1 & 0x1L) != 0L)
298 if ((active0 & 0x1fffd6f8ffe60000L) != 0L)
300 if (jjmatchedPos != 2)
309 if ((active0 & 0x58f386e8fd860000L) != 0L)
311 if (jjmatchedPos != 3)
318 if ((active0 & 0x70c501002600000L) != 0L)
322 if ((active0 & 0x1011042801820000L) != 0L)
324 if ((active0 & 0x4ae282c0fc240000L) != 0L)
332 if ((active0 & 0x8c28000c0200000L) != 0L)
334 if ((active0 & 0x422002c03c040000L) != 0L)
342 if ((active0 & 0x420002803c000000L) != 0L)
344 if ((active0 & 0x20004000040000L) != 0L)
346 if (jjmatchedPos != 6)
355 if ((active0 & 0x30000000L) != 0L)
361 if ((active0 & 0x20004000040000L) != 0L)
365 if ((active0 & 0x30000000L) != 0L)
373 if ((active0 & 0x30000000L) != 0L)
381 if ((active0 & 0x30000000L) != 0L)
392 private static final int jjStartNfa_1(int pos, long active0, long active1)
394 return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1);
396 static private final int jjStartNfaWithStates_1(int pos, int kind, int state)
398 jjmatchedKind = kind;
400 try { curChar = input_stream.readChar(); }
401 catch(java.io.IOException e) { return pos + 1; }
402 return jjMoveNfa_1(state, pos + 1);
404 static private final int jjMoveStringLiteralDfa0_1()
410 return jjMoveStringLiteralDfa1_1(0x0L, 0x800000000L);
412 return jjStartNfaWithStates_1(0, 89, 16);
415 return jjMoveStringLiteralDfa1_1(0x0L, 0x800000000000000L);
418 return jjMoveStringLiteralDfa1_1(0x0L, 0x80002000000000L);
420 return jjStopAtPos(0, 79);
422 return jjStopAtPos(0, 80);
425 return jjMoveStringLiteralDfa1_1(0x0L, 0x20000000000000L);
428 return jjMoveStringLiteralDfa1_1(0x0L, 0x8004000000000L);
430 return jjStopAtPos(0, 86);
433 return jjMoveStringLiteralDfa1_1(0x100000000L, 0x10008000000000L);
436 return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000000000L);
439 return jjMoveStringLiteralDfa1_1(0x1400L, 0x40000000000000L);
442 return jjMoveStringLiteralDfa1_1(0x200000000L, 0x0L);
444 return jjStopAtPos(0, 85);
447 return jjMoveStringLiteralDfa1_1(0x0L, 0x1001000200000000L);
450 return jjMoveStringLiteralDfa1_1(0x400000000L, 0x100000000L);
453 return jjMoveStringLiteralDfa1_1(0x0L, 0x6006000400000000L);
456 return jjMoveStringLiteralDfa1_1(0x10L, 0x0L);
458 return jjStopAtPos(0, 88);
460 return jjStopAtPos(0, 83);
462 return jjStopAtPos(0, 84);
465 return jjMoveStringLiteralDfa1_1(0x0L, 0x200000000000000L);
468 return jjMoveStringLiteralDfa1_1(0x800000L, 0x1L);
471 return jjMoveStringLiteralDfa1_1(0x300000800000000L, 0x0L);
474 return jjMoveStringLiteralDfa1_1(0x7000020000L, 0x0L);
477 return jjMoveStringLiteralDfa1_1(0x800018000000000L, 0x0L);
480 return jjMoveStringLiteralDfa1_1(0x20020002600000L, 0x0L);
483 return jjMoveStringLiteralDfa1_1(0x10000c0000040000L, 0x0L);
486 return jjMoveStringLiteralDfa1_1(0x100040000000L, 0x0L);
489 return jjMoveStringLiteralDfa1_1(0x6000000014100000L, 0x0L);
492 return jjMoveStringLiteralDfa1_1(0x600000000000L, 0x0L);
495 return jjMoveStringLiteralDfa1_1(0x8080000000000000L, 0x0L);
498 return jjMoveStringLiteralDfa1_1(0x1000000L, 0x0L);
501 return jjMoveStringLiteralDfa1_1(0x400800028000000L, 0x0L);
504 return jjMoveStringLiteralDfa1_1(0x43000080000000L, 0x0L);
507 return jjMoveStringLiteralDfa1_1(0xc000000000000L, 0x0L);
510 return jjMoveStringLiteralDfa1_1(0x80000L, 0x0L);
513 return jjMoveStringLiteralDfa1_1(0x10000000000000L, 0x0L);
515 return jjStopAtPos(0, 81);
518 return jjMoveStringLiteralDfa1_1(0x0L, 0x100001000000000L);
520 return jjStopAtPos(0, 82);
522 return jjMoveNfa_1(3, 0);
525 static private final int jjMoveStringLiteralDfa1_1(long active0, long active1)
527 try { curChar = input_stream.readChar(); }
528 catch(java.io.IOException e) {
529 jjStopStringLiteralDfa_1(0, active0, active1);
535 if ((active1 & 0x2000000000L) != 0L)
536 return jjStopAtPos(1, 101);
539 if ((active0 & 0x1000L) != 0L)
540 return jjStartNfaWithStates_1(1, 12, 0);
543 if ((active1 & 0x4000000000L) != 0L)
544 return jjStopAtPos(1, 102);
547 if ((active1 & 0x8000000000L) != 0L)
548 return jjStopAtPos(1, 103);
551 if ((active0 & 0x400L) != 0L)
552 return jjStopAtPos(1, 10);
555 if ((active0 & 0x200000000L) != 0L)
556 return jjStopAtPos(1, 33);
559 if ((active1 & 0x1000000000000L) != 0L)
564 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x1000000000000000L);
566 if ((active1 & 0x100000000L) != 0L)
567 return jjStopAtPos(1, 96);
568 else if ((active1 & 0x200000000L) != 0L)
569 return jjStopAtPos(1, 97);
570 else if ((active1 & 0x400000000L) != 0L)
571 return jjStopAtPos(1, 98);
572 else if ((active1 & 0x800000000L) != 0L)
573 return jjStopAtPos(1, 99);
574 else if ((active1 & 0x8000000000000L) != 0L)
575 return jjStopAtPos(1, 115);
576 else if ((active1 & 0x10000000000000L) != 0L)
577 return jjStopAtPos(1, 116);
578 else if ((active1 & 0x20000000000000L) != 0L)
579 return jjStopAtPos(1, 117);
580 else if ((active1 & 0x40000000000000L) != 0L)
581 return jjStopAtPos(1, 118);
582 else if ((active1 & 0x80000000000000L) != 0L)
583 return jjStopAtPos(1, 119);
584 else if ((active1 & 0x100000000000000L) != 0L)
585 return jjStopAtPos(1, 120);
586 else if ((active1 & 0x200000000000000L) != 0L)
587 return jjStopAtPos(1, 121);
588 else if ((active1 & 0x400000000000000L) != 0L)
589 return jjStopAtPos(1, 122);
590 else if ((active1 & 0x800000000000000L) != 0L)
591 return jjStopAtPos(1, 123);
594 if ((active0 & 0x10L) != 0L)
595 return jjStopAtPos(1, 4);
596 else if ((active0 & 0x100000000L) != 0L)
597 return jjStopAtPos(1, 32);
598 else if ((active0 & 0x400000000L) != 0L)
599 return jjStopAtPos(1, 34);
600 else if ((active1 & 0x2000000000000L) != 0L)
605 return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x6004000000000000L);
608 return jjMoveStringLiteralDfa2_1(active0, 0x41000080000L, active1, 0L);
611 return jjMoveStringLiteralDfa2_1(active0, 0x80000000000000L, active1, 0L);
614 return jjMoveStringLiteralDfa2_1(active0, 0x2000000L, active1, 0L);
617 return jjMoveStringLiteralDfa2_1(active0, 0x400a08028000000L, active1, 0L);
620 if ((active0 & 0x100000L) != 0L)
621 return jjStartNfaWithStates_1(1, 20, 14);
625 return jjMoveStringLiteralDfa2_1(active0, 0x14000000000000L, active1, 0L);
628 return jjMoveStringLiteralDfa2_1(active0, 0x1000000040620000L, active1, 0L);
631 return jjMoveStringLiteralDfa2_1(active0, 0x6020000014000000L, active1, 0x1L);
634 if ((active0 & 0x10000000000L) != 0L)
639 return jjMoveStringLiteralDfa2_1(active0, 0xb00186000000000L, active1, 0L);
642 if ((active0 & 0x8000000000000000L) != 0L)
643 return jjStartNfaWithStates_1(1, 63, 14);
644 return jjMoveStringLiteralDfa2_1(active0, 0x8000801800000L, active1, 0L);
647 return jjMoveStringLiteralDfa2_1(active0, 0x40000080000000L, active1, 0L);
650 return jjMoveStringLiteralDfa2_1(active0, 0x1400000040000L, active1, 0L);
653 return jjMoveStringLiteralDfa2_1(active0, 0x2000000000000L, active1, 0L);
656 return jjMoveStringLiteralDfa2_1(active0, 0x20000000000L, active1, 0L);
658 if ((active1 & 0x1000000000L) != 0L)
659 return jjStopAtPos(1, 100);
664 return jjStartNfa_1(0, active0, active1);
666 static private final int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1)
668 if (((active0 &= old0) | (active1 &= old1)) == 0L)
669 return jjStartNfa_1(0, old0, old1);
670 try { curChar = input_stream.readChar(); }
671 catch(java.io.IOException e) {
672 jjStopStringLiteralDfa_1(1, active0, active1);
678 if ((active1 & 0x1000000000000000L) != 0L)
679 return jjStopAtPos(2, 124);
680 else if ((active1 & 0x2000000000000000L) != 0L)
681 return jjStopAtPos(2, 125);
684 if ((active1 & 0x4000000000000L) != 0L)
689 return jjMoveStringLiteralDfa3_1(active0, 0L, active1, 0x4000000000000000L);
692 return jjMoveStringLiteralDfa3_1(active0, 0x400000080020000L, active1, 0L);
695 return jjMoveStringLiteralDfa3_1(active0, 0x14000000L, active1, 0L);
698 if ((active1 & 0x1L) != 0L)
699 return jjStartNfaWithStates_1(2, 64, 14);
700 return jjMoveStringLiteralDfa3_1(active0, 0x20000000000000L, active1, 0L);
703 return jjMoveStringLiteralDfa3_1(active0, 0x800000000L, active1, 0L);
706 return jjMoveStringLiteralDfa3_1(active0, 0x8000000000L, active1, 0L);
709 return jjMoveStringLiteralDfa3_1(active0, 0x2000000L, active1, 0L);
712 return jjMoveStringLiteralDfa3_1(active0, 0x16000001000000L, active1, 0L);
715 return jjMoveStringLiteralDfa3_1(active0, 0x80000000000000L, active1, 0L);
718 return jjMoveStringLiteralDfa3_1(active0, 0x440000000000L, active1, 0L);
721 return jjMoveStringLiteralDfa3_1(active0, 0x6000040000L, active1, 0L);
724 return jjMoveStringLiteralDfa3_1(active0, 0x1300000040000000L, active1, 0L);
727 return jjMoveStringLiteralDfa3_1(active0, 0x1000000000000L, active1, 0L);
730 return jjMoveStringLiteralDfa3_1(active0, 0x28000000L, active1, 0L);
733 if ((active0 & 0x80000L) != 0L)
734 return jjStartNfaWithStates_1(2, 19, 14);
735 else if ((active0 & 0x80000000000L) != 0L)
736 return jjStartNfaWithStates_1(2, 43, 14);
737 return jjMoveStringLiteralDfa3_1(active0, 0x40000000800000L, active1, 0L);
740 return jjMoveStringLiteralDfa3_1(active0, 0x1000600000L, active1, 0L);
743 if ((active0 & 0x2000000000000000L) != 0L)
748 return jjMoveStringLiteralDfa3_1(active0, 0x4000920000000000L, active1, 0L);
751 return jjMoveStringLiteralDfa3_1(active0, 0x808000000000000L, active1, 0L);
754 if ((active0 & 0x200000000000L) != 0L)
755 return jjStartNfaWithStates_1(2, 45, 14);
760 return jjStartNfa_1(1, active0, active1);
762 static private final int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1)
764 if (((active0 &= old0) | (active1 &= old1)) == 0L)
765 return jjStartNfa_1(1, old0, old1);
766 try { curChar = input_stream.readChar(); }
767 catch(java.io.IOException e) {
768 jjStopStringLiteralDfa_1(2, active0, active1);
774 if ((active1 & 0x4000000000000000L) != 0L)
775 return jjStopAtPos(3, 126);
779 return jjMoveStringLiteralDfa4_1(active0, 0x1000008800800000L, active1, 0L);
782 return jjMoveStringLiteralDfa4_1(active0, 0x800000040000000L, active1, 0L);
785 return jjMoveStringLiteralDfa4_1(active0, 0x40000L, active1, 0L);
788 if ((active0 & 0x400000L) != 0L)
793 else if ((active0 & 0x1000000000L) != 0L)
794 return jjStartNfaWithStates_1(3, 36, 14);
795 else if ((active0 & 0x8000000000000L) != 0L)
796 return jjStartNfaWithStates_1(3, 51, 14);
797 return jjMoveStringLiteralDfa4_1(active0, 0x4081020000200000L, active1, 0L);
800 return jjMoveStringLiteralDfa4_1(active0, 0x40000000000000L, active1, 0L);
803 if ((active0 & 0x400000000000L) != 0L)
804 return jjStartNfaWithStates_1(3, 46, 14);
805 else if ((active0 & 0x100000000000000L) != 0L)
810 else if ((active0 & 0x400000000000000L) != 0L)
811 return jjStartNfaWithStates_1(3, 58, 14);
812 return jjMoveStringLiteralDfa4_1(active0, 0x210000014000000L, active1, 0L);
815 return jjMoveStringLiteralDfa4_1(active0, 0x1000000L, active1, 0L);
818 if ((active0 & 0x2000000L) != 0L)
819 return jjStartNfaWithStates_1(3, 25, 14);
820 else if ((active0 & 0x100000000000L) != 0L)
821 return jjStartNfaWithStates_1(3, 44, 14);
825 if ((active0 & 0x4000000000000L) != 0L)
826 return jjStartNfaWithStates_1(3, 50, 14);
827 return jjMoveStringLiteralDfa4_1(active0, 0x42000020000L, active1, 0L);
830 return jjMoveStringLiteralDfa4_1(active0, 0x2004080000000L, active1, 0L);
833 return jjMoveStringLiteralDfa4_1(active0, 0x800028000000L, active1, 0L);
836 return jjMoveStringLiteralDfa4_1(active0, 0x20000000000000L, active1, 0L);
840 return jjStartNfa_1(2, active0, active1);
842 static private final int jjMoveStringLiteralDfa4_1(long old0, long active0, long old1, long active1)
844 if (((active0 &= old0) | (active1 &= old1)) == 0L)
845 return jjStartNfa_1(2, old0, old1);
846 try { curChar = input_stream.readChar(); }
847 catch(java.io.IOException e) {
848 jjStopStringLiteralDfa_1(3, active0, 0L);
855 return jjMoveStringLiteralDfa5_1(active0, 0x40000000L);
858 return jjMoveStringLiteralDfa5_1(active0, 0x82000000000000L);
861 if ((active0 & 0x40000000000L) != 0L)
862 return jjStartNfaWithStates_1(4, 42, 14);
863 else if ((active0 & 0x10000000000000L) != 0L)
864 return jjStartNfaWithStates_1(4, 52, 14);
865 return jjMoveStringLiteralDfa5_1(active0, 0x200000000000000L);
868 return jjMoveStringLiteralDfa5_1(active0, 0x4000000000000000L);
871 return jjMoveStringLiteralDfa5_1(active0, 0x20000000000000L);
874 return jjMoveStringLiteralDfa5_1(active0, 0x40a8200000L);
877 if ((active0 & 0x800000000L) != 0L)
878 return jjStartNfaWithStates_1(4, 35, 14);
882 return jjMoveStringLiteralDfa5_1(active0, 0x800000000000000L);
885 return jjMoveStringLiteralDfa5_1(active0, 0x40020000000000L);
888 if ((active0 & 0x1000000000000L) != 0L)
889 return jjStartNfaWithStates_1(4, 48, 14);
890 return jjMoveStringLiteralDfa5_1(active0, 0x800000000000L);
893 if ((active0 & 0x20000L) != 0L)
894 return jjStartNfaWithStates_1(4, 17, 14);
898 if ((active0 & 0x1000000L) != 0L)
899 return jjStartNfaWithStates_1(4, 24, 14);
900 else if ((active0 & 0x2000000000L) != 0L)
901 return jjStartNfaWithStates_1(4, 37, 14);
902 else if ((active0 & 0x1000000000000000L) != 0L)
903 return jjStartNfaWithStates_1(4, 60, 14);
904 return jjMoveStringLiteralDfa5_1(active0, 0x40000L);
907 return jjMoveStringLiteralDfa5_1(active0, 0x8014000000L);
910 if ((active0 & 0x800000L) != 0L)
911 return jjStartNfaWithStates_1(4, 23, 14);
916 return jjStartNfa_1(3, active0, 0L);
918 static private final int jjMoveStringLiteralDfa5_1(long old0, long active0)
920 if (((active0 &= old0)) == 0L)
921 return jjStartNfa_1(3, old0, 0L);
922 try { curChar = input_stream.readChar(); }
923 catch(java.io.IOException e) {
924 jjStopStringLiteralDfa_1(4, active0, 0L);
931 return jjMoveStringLiteralDfa6_1(active0, 0x200000000000000L);
934 if ((active0 & 0x80000000L) != 0L)
935 return jjStartNfaWithStates_1(5, 31, 14);
939 return jjMoveStringLiteralDfa6_1(active0, 0x20014000000L);
942 if ((active0 & 0x800000000000000L) != 0L)
943 return jjStartNfaWithStates_1(5, 59, 14);
944 return jjMoveStringLiteralDfa6_1(active0, 0x4000000000000000L);
947 if ((active0 & 0x200000L) != 0L)
948 return jjStartNfaWithStates_1(5, 21, 14);
952 if ((active0 & 0x40000000000000L) != 0L)
953 return jjStartNfaWithStates_1(5, 54, 14);
957 if ((active0 & 0x2000000000000L) != 0L)
958 return jjStartNfaWithStates_1(5, 49, 14);
962 return jjMoveStringLiteralDfa6_1(active0, 0x20000000040000L);
965 if ((active0 & 0x40000000L) != 0L)
966 return jjStartNfaWithStates_1(5, 30, 14);
967 return jjMoveStringLiteralDfa6_1(active0, 0x8000000000L);
970 if ((active0 & 0x800000000000L) != 0L)
971 return jjStartNfaWithStates_1(5, 47, 14);
972 return jjMoveStringLiteralDfa6_1(active0, 0x4000000000L);
975 return jjMoveStringLiteralDfa6_1(active0, 0x28000000L);
978 if ((active0 & 0x80000000000000L) != 0L)
979 return jjStartNfaWithStates_1(5, 55, 14);
984 return jjStartNfa_1(4, active0, 0L);
986 static private final int jjMoveStringLiteralDfa6_1(long old0, long active0)
988 if (((active0 &= old0)) == 0L)
989 return jjStartNfa_1(4, old0, 0L);
990 try { curChar = input_stream.readChar(); }
991 catch(java.io.IOException e) {
992 jjStopStringLiteralDfa_1(5, active0, 0L);
999 if ((active0 & 0x4000000L) != 0L)
1004 else if ((active0 & 0x8000000L) != 0L)
1009 return jjMoveStringLiteralDfa7_1(active0, 0x30000000L);
1012 return jjMoveStringLiteralDfa7_1(active0, 0x20000000000000L);
1015 if ((active0 & 0x200000000000000L) != 0L)
1016 return jjStartNfaWithStates_1(6, 57, 14);
1020 return jjMoveStringLiteralDfa7_1(active0, 0x40000L);
1023 if ((active0 & 0x4000000000000000L) != 0L)
1024 return jjStartNfaWithStates_1(6, 62, 14);
1028 if ((active0 & 0x20000000000L) != 0L)
1029 return jjStartNfaWithStates_1(6, 41, 14);
1033 if ((active0 & 0x8000000000L) != 0L)
1034 return jjStartNfaWithStates_1(6, 39, 14);
1038 return jjMoveStringLiteralDfa7_1(active0, 0x4000000000L);
1042 return jjStartNfa_1(5, active0, 0L);
1044 static private final int jjMoveStringLiteralDfa7_1(long old0, long active0)
1046 if (((active0 &= old0)) == 0L)
1047 return jjStartNfa_1(5, old0, 0L);
1048 try { curChar = input_stream.readChar(); }
1049 catch(java.io.IOException e) {
1050 jjStopStringLiteralDfa_1(6, active0, 0L);
1056 return jjMoveStringLiteralDfa8_1(active0, 0x30000000L);
1059 if ((active0 & 0x4000000000L) != 0L)
1060 return jjStartNfaWithStates_1(7, 38, 14);
1061 else if ((active0 & 0x20000000000000L) != 0L)
1062 return jjStartNfaWithStates_1(7, 53, 14);
1066 if ((active0 & 0x40000L) != 0L)
1067 return jjStartNfaWithStates_1(7, 18, 14);
1072 return jjStartNfa_1(6, active0, 0L);
1074 static private final int jjMoveStringLiteralDfa8_1(long old0, long active0)
1076 if (((active0 &= old0)) == 0L)
1077 return jjStartNfa_1(6, old0, 0L);
1078 try { curChar = input_stream.readChar(); }
1079 catch(java.io.IOException e) {
1080 jjStopStringLiteralDfa_1(7, active0, 0L);
1087 return jjMoveStringLiteralDfa9_1(active0, 0x30000000L);
1091 return jjStartNfa_1(7, active0, 0L);
1093 static private final int jjMoveStringLiteralDfa9_1(long old0, long active0)
1095 if (((active0 &= old0)) == 0L)
1096 return jjStartNfa_1(7, old0, 0L);
1097 try { curChar = input_stream.readChar(); }
1098 catch(java.io.IOException e) {
1099 jjStopStringLiteralDfa_1(8, active0, 0L);
1106 return jjMoveStringLiteralDfa10_1(active0, 0x30000000L);
1110 return jjStartNfa_1(8, active0, 0L);
1112 static private final int jjMoveStringLiteralDfa10_1(long old0, long active0)
1114 if (((active0 &= old0)) == 0L)
1115 return jjStartNfa_1(8, old0, 0L);
1116 try { curChar = input_stream.readChar(); }
1117 catch(java.io.IOException e) {
1118 jjStopStringLiteralDfa_1(9, active0, 0L);
1125 return jjMoveStringLiteralDfa11_1(active0, 0x30000000L);
1129 return jjStartNfa_1(9, active0, 0L);
1131 static private final int jjMoveStringLiteralDfa11_1(long old0, long active0)
1133 if (((active0 &= old0)) == 0L)
1134 return jjStartNfa_1(9, old0, 0L);
1135 try { curChar = input_stream.readChar(); }
1136 catch(java.io.IOException e) {
1137 jjStopStringLiteralDfa_1(10, active0, 0L);
1144 if ((active0 & 0x10000000L) != 0L)
1145 return jjStartNfaWithStates_1(11, 28, 14);
1146 else if ((active0 & 0x20000000L) != 0L)
1147 return jjStartNfaWithStates_1(11, 29, 14);
1152 return jjStartNfa_1(10, active0, 0L);
1154 static final long[] jjbitVec0 = {
1155 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
1157 static private final int jjMoveNfa_1(int startState, int curPos)
1163 jjstateSet[0] = startState;
1164 int j, kind = 0x7fffffff;
1167 if (++jjround == 0x7fffffff)
1171 long l = 1L << curChar;
1174 switch(jjstateSet[--i])
1177 if ((0x3ff000000000000L & l) != 0L)
1178 jjCheckNAddStates(0, 6);
1179 else if (curChar == 39)
1180 jjCheckNAddStates(7, 10);
1181 else if (curChar == 34)
1182 jjCheckNAddStates(11, 16);
1183 else if (curChar == 36)
1184 jjstateSet[jjnewStateCnt++] = 16;
1185 else if (curChar == 46)
1187 else if (curChar == 47)
1188 jjstateSet[jjnewStateCnt++] = 2;
1189 if ((0x3fe000000000000L & l) != 0L)
1193 jjCheckNAddTwoStates(5, 6);
1195 else if (curChar == 48)
1199 jjCheckNAddStates(17, 19);
1204 jjstateSet[jjnewStateCnt++] = 1;
1207 if ((0xffff7fffffffffffL & l) != 0L && kind > 11)
1212 jjstateSet[jjnewStateCnt++] = 0;
1215 if ((0x3fe000000000000L & l) == 0L)
1219 jjCheckNAddTwoStates(5, 6);
1222 if ((0x3ff000000000000L & l) == 0L)
1226 jjCheckNAddTwoStates(5, 6);
1233 if ((0x3ff000000000000L & l) == 0L)
1237 jjCheckNAddStates(20, 22);
1240 if ((0x280000000000L & l) != 0L)
1244 if ((0x3ff000000000000L & l) == 0L)
1248 jjCheckNAddTwoStates(11, 12);
1251 if ((0x3ff000000000000L & l) == 0L)
1255 jjstateSet[jjnewStateCnt++] = 14;
1259 jjstateSet[jjnewStateCnt++] = 16;
1262 if ((0x3ff000000000000L & l) == 0L)
1266 jjstateSet[jjnewStateCnt++] = 17;
1269 if ((0x3ff000000000000L & l) != 0L)
1270 jjCheckNAddStates(0, 6);
1273 if ((0x3ff000000000000L & l) != 0L)
1274 jjCheckNAddTwoStates(19, 20);
1281 jjCheckNAddStates(23, 25);
1284 if ((0x3ff000000000000L & l) == 0L)
1288 jjCheckNAddStates(23, 25);
1291 if ((0x280000000000L & l) != 0L)
1295 if ((0x3ff000000000000L & l) == 0L)
1299 jjCheckNAddTwoStates(24, 12);
1302 if ((0x3ff000000000000L & l) != 0L)
1303 jjCheckNAddTwoStates(25, 26);
1306 if ((0x280000000000L & l) != 0L)
1310 if ((0x3ff000000000000L & l) == 0L)
1314 jjCheckNAddTwoStates(28, 12);
1317 if ((0x3ff000000000000L & l) != 0L)
1318 jjCheckNAddStates(26, 28);
1321 if ((0x280000000000L & l) != 0L)
1325 if ((0x3ff000000000000L & l) != 0L)
1326 jjCheckNAddTwoStates(32, 12);
1333 jjCheckNAddStates(17, 19);
1336 if ((0x3ff000000000000L & l) == 0L)
1340 jjCheckNAddTwoStates(35, 6);
1343 if ((0xff000000000000L & l) == 0L)
1347 jjCheckNAddTwoStates(36, 6);
1351 jjCheckNAddStates(11, 16);
1354 if ((0xfffffffbffffffffL & l) != 0L)
1355 jjCheckNAddStates(29, 31);
1359 jjCheckNAddStates(29, 31);
1362 if (curChar == 34 && kind > 71)
1366 if ((0xfffffffbffffffffL & l) != 0L)
1367 jjCheckNAddStates(32, 34);
1371 jjCheckNAddStates(32, 34);
1374 if (curChar == 34 && kind > 72)
1379 jjCheckNAddStates(7, 10);
1382 if ((0xffffff7fffffffffL & l) != 0L)
1383 jjCheckNAddTwoStates(47, 48);
1386 if (curChar == 39 && kind > 71)
1390 if ((0xffffff7fffffffffL & l) != 0L)
1391 jjCheckNAddTwoStates(49, 50);
1394 if (curChar == 39 && kind > 73)
1398 jjAddStates(35, 36);
1401 jjAddStates(37, 38);
1405 } while(i != startsAt);
1407 else if (curChar < 128)
1409 long l = 1L << (curChar & 077);
1412 switch(jjstateSet[--i])
1415 if ((0x7fffffe87fffffeL & l) != 0L)
1421 else if (curChar == 96)
1422 jjCheckNAddStates(39, 42);
1429 if ((0x100000001000L & l) != 0L && kind > 65)
1433 if ((0x2000000020L & l) != 0L)
1434 jjAddStates(43, 44);
1437 if ((0x5000000050L & l) != 0L && kind > 69)
1442 if ((0x7fffffe87fffffeL & l) == 0L)
1450 if ((0x7fffffe87fffffeL & l) == 0L)
1457 if ((0x2000000020L & l) != 0L)
1458 jjAddStates(45, 46);
1461 if ((0x2000000020L & l) != 0L)
1462 jjAddStates(47, 48);
1465 if ((0x2000000020L & l) != 0L)
1466 jjAddStates(49, 50);
1469 if ((0x100000001000000L & l) != 0L)
1473 if ((0x7e0000007eL & l) == 0L)
1477 jjCheckNAddTwoStates(35, 6);
1480 jjAddStates(29, 31);
1484 jjstateSet[jjnewStateCnt++] = 39;
1487 jjAddStates(32, 34);
1491 jjstateSet[jjnewStateCnt++] = 43;
1494 jjAddStates(51, 52);
1497 jjAddStates(53, 54);
1501 jjCheckNAddStates(39, 42);
1504 if ((0xfffffffeffffffffL & l) != 0L)
1505 jjCheckNAddTwoStates(52, 53);
1508 if (curChar == 96 && kind > 71)
1512 if ((0xfffffffeffffffffL & l) != 0L)
1513 jjCheckNAddTwoStates(54, 55);
1516 if (curChar == 96 && kind > 74)
1521 } while(i != startsAt);
1525 int i2 = (curChar & 0xff) >> 6;
1526 long l2 = 1L << (curChar & 077);
1529 switch(jjstateSet[--i])
1532 if ((jjbitVec0[i2] & l2) != 0L && kind > 11)
1536 if ((jjbitVec0[i2] & l2) != 0L)
1537 jjAddStates(29, 31);
1540 if ((jjbitVec0[i2] & l2) != 0L)
1541 jjAddStates(32, 34);
1544 if ((jjbitVec0[i2] & l2) != 0L)
1545 jjAddStates(51, 52);
1548 if ((jjbitVec0[i2] & l2) != 0L)
1549 jjAddStates(53, 54);
1552 if ((jjbitVec0[i2] & l2) != 0L)
1553 jjAddStates(35, 36);
1556 if ((jjbitVec0[i2] & l2) != 0L)
1557 jjAddStates(37, 38);
1561 } while(i != startsAt);
1563 if (kind != 0x7fffffff)
1565 jjmatchedKind = kind;
1566 jjmatchedPos = curPos;
1570 if ((i = jjnewStateCnt) == (startsAt = 56 - (jjnewStateCnt = startsAt)))
1572 try { curChar = input_stream.readChar(); }
1573 catch(java.io.IOException e) { return curPos; }
1576 static private final int jjMoveStringLiteralDfa0_3()
1581 return jjMoveStringLiteralDfa1_3(0x4000L);
1586 static private final int jjMoveStringLiteralDfa1_3(long active0)
1588 try { curChar = input_stream.readChar(); }
1589 catch(java.io.IOException e) {
1595 if ((active0 & 0x4000L) != 0L)
1596 return jjStopAtPos(1, 14);
1603 static final int[] jjnextStates = {
1604 19, 20, 25, 26, 29, 30, 12, 47, 48, 49, 50, 38, 40, 41, 42, 44,
1605 45, 34, 36, 6, 8, 9, 12, 21, 22, 12, 29, 30, 12, 38, 40, 41,
1606 42, 44, 45, 52, 53, 54, 55, 52, 53, 54, 55, 10, 11, 23, 24, 27,
1607 28, 31, 32, 47, 48, 49, 50,
1609 public static final String[] jjstrLiteralImages = {
1610 "", null, "\74\77", null, null, null, null, null, null, null, null, null, null,
1611 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1612 null, null, null, null, null, "\55\76", "\72\72", "\75\76", null, null, null, null,
1613 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1614 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1615 null, null, null, null, null, null, null, null, null, null, null, null, "\50",
1616 "\51", "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\44", "\75",
1617 "\76", "\74", "\41", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75",
1618 "\174\174", "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174",
1619 "\136", "\45", "\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75",
1620 "\57\75", "\46\75", "\174\75", "\136\75", "\56\75", "\45\75", "\74\74\75", "\76\76\75",
1621 "\76\76\76\75", null, "\77\76", };
1622 public static final String[] lexStateNames = {
1625 "IN_SINGLE_LINE_COMMENT",
1626 "IN_FORMAL_COMMENT",
1627 "IN_MULTI_LINE_COMMENT",
1629 public static final int[] jjnewLexState = {
1630 -1, 1, 1, -1, 0, -1, -1, -1, -1, -1, 2, 3, 4, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1631 -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,
1632 -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,
1633 -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,
1634 -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,
1637 static final long[] jjtoToken = {
1638 0xfffffffffffe0007L, 0xffffffffffff8fa3L, 0x1L,
1640 static final long[] jjtoSkip = {
1641 0xe3f8L, 0x0L, 0x0L,
1643 static final long[] jjtoSpecial = {
1644 0xe010L, 0x0L, 0x0L,
1646 static final long[] jjtoMore = {
1647 0x11c00L, 0x0L, 0x0L,
1649 static private SimpleCharStream input_stream;
1650 static private final int[] jjrounds = new int[56];
1651 static private final int[] jjstateSet = new int[112];
1652 static StringBuffer image;
1653 static int jjimageLen;
1654 static int lengthOfMatch;
1655 static protected char curChar;
1656 public PHPParserTokenManager(SimpleCharStream stream)
1658 if (input_stream != null)
1659 throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);
1660 input_stream = stream;
1662 public PHPParserTokenManager(SimpleCharStream stream, int lexState)
1667 static public void ReInit(SimpleCharStream stream)
1669 jjmatchedPos = jjnewStateCnt = 0;
1670 curLexState = defaultLexState;
1671 input_stream = stream;
1674 static private final void ReInitRounds()
1677 jjround = 0x80000001;
1678 for (i = 56; i-- > 0;)
1679 jjrounds[i] = 0x80000000;
1681 static public void ReInit(SimpleCharStream stream, int lexState)
1686 static public void SwitchTo(int lexState)
1688 if (lexState >= 5 || lexState < 0)
1689 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1691 curLexState = lexState;
1694 static private final Token jjFillToken()
1696 Token t = Token.newToken(jjmatchedKind);
1697 t.kind = jjmatchedKind;
1698 String im = jjstrLiteralImages[jjmatchedKind];
1699 t.image = (im == null) ? input_stream.GetImage() : im;
1700 t.beginLine = input_stream.getBeginLine();
1701 t.beginColumn = input_stream.getBeginColumn();
1702 t.endLine = input_stream.getEndLine();
1703 t.endColumn = input_stream.getEndColumn();
1707 static int curLexState = 0;
1708 static int defaultLexState = 0;
1709 static int jjnewStateCnt;
1711 static int jjmatchedPos;
1712 static int jjmatchedKind;
1714 public static final Token getNextToken()
1717 Token specialToken = null;
1726 curChar = input_stream.BeginToken();
1728 catch(java.io.IOException e)
1731 matchedToken = jjFillToken();
1732 matchedToken.specialToken = specialToken;
1733 return matchedToken;
1743 jjmatchedKind = 0x7fffffff;
1745 curPos = jjMoveStringLiteralDfa0_0();
1746 if (jjmatchedPos == 0 && jjmatchedKind > 3)
1752 try { input_stream.backup(0);
1753 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
1754 curChar = input_stream.BeginToken();
1756 catch (java.io.IOException e1) { continue EOFLoop; }
1757 jjmatchedKind = 0x7fffffff;
1759 curPos = jjMoveStringLiteralDfa0_1();
1762 jjmatchedKind = 0x7fffffff;
1764 curPos = jjMoveStringLiteralDfa0_2();
1765 if (jjmatchedPos == 0 && jjmatchedKind > 16)
1771 jjmatchedKind = 0x7fffffff;
1773 curPos = jjMoveStringLiteralDfa0_3();
1774 if (jjmatchedPos == 0 && jjmatchedKind > 16)
1780 jjmatchedKind = 0x7fffffff;
1782 curPos = jjMoveStringLiteralDfa0_4();
1783 if (jjmatchedPos == 0 && jjmatchedKind > 16)
1789 if (jjmatchedKind != 0x7fffffff)
1791 if (jjmatchedPos + 1 < curPos)
1792 input_stream.backup(curPos - jjmatchedPos - 1);
1793 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1795 matchedToken = jjFillToken();
1796 matchedToken.specialToken = specialToken;
1797 if (jjnewLexState[jjmatchedKind] != -1)
1798 curLexState = jjnewLexState[jjmatchedKind];
1799 return matchedToken;
1801 else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1803 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1805 matchedToken = jjFillToken();
1806 if (specialToken == null)
1807 specialToken = matchedToken;
1810 matchedToken.specialToken = specialToken;
1811 specialToken = (specialToken.next = matchedToken);
1813 SkipLexicalActions(matchedToken);
1816 SkipLexicalActions(null);
1817 if (jjnewLexState[jjmatchedKind] != -1)
1818 curLexState = jjnewLexState[jjmatchedKind];
1821 MoreLexicalActions();
1822 if (jjnewLexState[jjmatchedKind] != -1)
1823 curLexState = jjnewLexState[jjmatchedKind];
1825 jjmatchedKind = 0x7fffffff;
1827 curChar = input_stream.readChar();
1830 catch (java.io.IOException e1) { }
1832 int error_line = input_stream.getEndLine();
1833 int error_column = input_stream.getEndColumn();
1834 String error_after = null;
1835 boolean EOFSeen = false;
1836 try { input_stream.readChar(); input_stream.backup(1); }
1837 catch (java.io.IOException e1) {
1839 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1840 if (curChar == '\n' || curChar == '\r') {
1848 input_stream.backup(1);
1849 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1851 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1856 static final void SkipLexicalActions(Token matchedToken)
1858 switch(jjmatchedKind)
1864 static final void MoreLexicalActions()
1866 jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
1867 switch(jjmatchedKind)
1871 image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen)));
1873 image.append(new String(input_stream.GetSuffix(jjimageLen)));
1875 input_stream.backup(1);