2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 /* Generated By:JavaCC: Do not edit this line. QueryParserTokenManager.java */
22 using Analyzer = Mono.Lucene.Net.Analysis.Analyzer;
23 using CachingTokenFilter = Mono.Lucene.Net.Analysis.CachingTokenFilter;
24 using TokenStream = Mono.Lucene.Net.Analysis.TokenStream;
25 using PositionIncrementAttribute = Mono.Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
26 using TermAttribute = Mono.Lucene.Net.Analysis.Tokenattributes.TermAttribute;
27 using DateField = Mono.Lucene.Net.Documents.DateField;
28 using DateTools = Mono.Lucene.Net.Documents.DateTools;
29 using Term = Mono.Lucene.Net.Index.Term;
30 using Parameter = Mono.Lucene.Net.Util.Parameter;
31 using BooleanClause = Mono.Lucene.Net.Search.BooleanClause;
32 using BooleanQuery = Mono.Lucene.Net.Search.BooleanQuery;
33 using FuzzyQuery = Mono.Lucene.Net.Search.FuzzyQuery;
34 using MatchAllDocsQuery = Mono.Lucene.Net.Search.MatchAllDocsQuery;
35 using MultiPhraseQuery = Mono.Lucene.Net.Search.MultiPhraseQuery;
36 using MultiTermQuery = Mono.Lucene.Net.Search.MultiTermQuery;
37 using PhraseQuery = Mono.Lucene.Net.Search.PhraseQuery;
38 using PrefixQuery = Mono.Lucene.Net.Search.PrefixQuery;
39 using Query = Mono.Lucene.Net.Search.Query;
40 using TermQuery = Mono.Lucene.Net.Search.TermQuery;
41 using TermRangeQuery = Mono.Lucene.Net.Search.TermRangeQuery;
42 using WildcardQuery = Mono.Lucene.Net.Search.WildcardQuery;
43 using Version = Mono.Lucene.Net.Util.Version;
45 namespace Mono.Lucene.Net.QueryParsers
48 /// <summary>Token Manager. </summary>
49 public class QueryParserTokenManager : QueryParserConstants
51 private void InitBlock()
53 System.IO.StreamWriter temp_writer;
54 temp_writer = new System.IO.StreamWriter(System.Console.OpenStandardOutput(), System.Console.Out.Encoding);
55 temp_writer.AutoFlush = true;
56 debugStream = temp_writer;
59 /// <summary>Debug output. </summary>
60 public System.IO.StreamWriter debugStream;
61 /// <summary>Set debug output. </summary>
62 public virtual void SetDebugStream(System.IO.StreamWriter ds)
66 private int JjStopStringLiteralDfa_3(int pos, long active0)
76 private int JjStartNfa_3(int pos, long active0)
78 return JjMoveNfa_3(JjStopStringLiteralDfa_3(pos, active0), pos + 1);
80 private int JjStopAtPos(int pos, int kind)
86 private int JjMoveStringLiteralDfa0_3()
92 return JjStopAtPos(0, 13);
95 return JjStopAtPos(0, 14);
98 return JjStartNfaWithStates_3(0, 16, 36);
101 return JjStopAtPos(0, 11);
104 return JjStopAtPos(0, 12);
107 return JjStopAtPos(0, 15);
110 return JjStopAtPos(0, 23);
113 return JjStopAtPos(0, 17);
116 return JjStopAtPos(0, 24);
119 return JjMoveNfa_3(0, 0);
123 private int JjStartNfaWithStates_3(int pos, int kind, int state)
125 jjmatchedKind = kind;
129 curChar = input_stream.ReadChar();
131 catch (System.IO.IOException e)
135 return JjMoveNfa_3(state, pos + 1);
137 internal static readonly ulong[] jjbitVec0 = new ulong[]{0x1L, 0x0L, 0x0L, 0x0L};
138 internal static readonly ulong[] jjbitVec1 = new ulong[]{0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
139 internal static readonly ulong[] jjbitVec3 = new ulong[]{0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL};
140 internal static readonly ulong[] jjbitVec4 = new ulong[]{0xfffefffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
141 private int JjMoveNfa_3(int startState, int curPos)
146 jjstateSet[0] = startState;
147 int kind = 0x7fffffff;
150 if (++jjround == 0x7fffffff)
154 ulong l = (ulong) (1L << (int) curChar);
157 switch (jjstateSet[--i])
162 if ((0xfbfffcf8ffffd9ffL & l) == (ulong) 0L)
166 JjCheckNAddTwoStates(25, 26);
170 if ((0xfbffd4f8ffffd9ffL & l) != (ulong) 0L)
174 JjCheckNAddTwoStates(25, 26);
176 else if ((0x100002600L & l) != 0L)
181 else if (curChar == 34)
182 JjCheckNAddStates(0, 2);
183 else if (curChar == 33)
188 if ((0x7bffd0f8ffffd9ffL & l) != 0L)
192 JjCheckNAddStates(3, 7);
194 else if (curChar == 42)
200 jjstateSet[jjnewStateCnt++] = 4;
204 if (curChar == 38 && kind > 8)
210 jjstateSet[jjnewStateCnt++] = 4;
214 if (curChar == 33 && kind > 10)
220 JjCheckNAddStates(0, 2);
224 if ((0xfffffffbffffffffL & l) != (ulong) 0L)
225 JjCheckNAddStates(0, 2);
229 JjCheckNAddStates(0, 2);
233 if (curChar == 34 && kind > 18)
238 if ((0x3ff000000000000L & l) == 0L)
251 if ((0x3ff000000000000L & l) == 0L)
259 if (curChar == 42 && kind > 21)
264 if ((0xfbffd4f8ffffd9ffL & l) == (ulong) 0L)
268 JjCheckNAddTwoStates(25, 26);
274 JjCheckNAddTwoStates(25, 26);
278 if ((0x7bffd0f8ffffd9ffL & l) == 0L)
282 JjCheckNAddStates(3, 7);
286 if ((0x7bfff8f8ffffd9ffL & l) == 0L)
290 JjCheckNAddTwoStates(29, 30);
296 JjCheckNAddTwoStates(29, 30);
300 if ((0x7bfff8f8ffffd9ffL & l) != 0L)
301 JjCheckNAddStates(10, 12);
305 JjCheckNAddStates(10, 12);
312 while (i != startsAt);
314 else if (curChar < 128)
316 ulong l = (ulong) (1L << (curChar & 63));
319 switch (jjstateSet[--i])
323 if ((0x97ffffff87ffffffL & l) != (ulong) 0L)
327 JjCheckNAddTwoStates(25, 26);
329 else if (curChar == 92)
330 JjCheckNAddTwoStates(27, 27);
334 if ((0x97ffffff87ffffffL & l) != (ulong) 0L)
338 JjCheckNAddStates(3, 7);
340 else if (curChar == 92)
341 JjCheckNAddStates(13, 15);
342 else if (curChar == 126)
346 jjstateSet[jjnewStateCnt++] = 20;
348 if ((0x97ffffff87ffffffL & l) != (ulong) 0L)
352 JjCheckNAddTwoStates(25, 26);
355 jjstateSet[jjnewStateCnt++] = 11;
356 else if (curChar == 124)
357 jjstateSet[jjnewStateCnt++] = 8;
358 else if (curChar == 79)
359 jjstateSet[jjnewStateCnt++] = 6;
360 else if (curChar == 65)
361 jjstateSet[jjnewStateCnt++] = 2;
365 if (curChar == 68 && kind > 8)
371 jjstateSet[jjnewStateCnt++] = 1;
376 jjstateSet[jjnewStateCnt++] = 2;
380 if (curChar == 82 && kind > 9)
386 jjstateSet[jjnewStateCnt++] = 6;
390 if (curChar == 124 && kind > 9)
396 jjstateSet[jjnewStateCnt++] = 8;
400 if (curChar == 84 && kind > 10)
406 jjstateSet[jjnewStateCnt++] = 10;
411 jjstateSet[jjnewStateCnt++] = 11;
415 if ((0xffffffffefffffffL & l) != (ulong) 0L)
416 JjCheckNAddStates(0, 2);
421 jjstateSet[jjnewStateCnt++] = 17;
425 JjCheckNAddStates(0, 2);
433 jjstateSet[jjnewStateCnt++] = 20;
437 if ((0x97ffffff87ffffffL & l) == (ulong) 0L)
441 JjCheckNAddTwoStates(25, 26);
445 if ((0x97ffffff87ffffffL & l) == (ulong) 0L)
449 JjCheckNAddTwoStates(25, 26);
454 JjCheckNAddTwoStates(27, 27);
460 JjCheckNAddTwoStates(25, 26);
464 if ((0x97ffffff87ffffffL & l) == (ulong) 0L)
468 JjCheckNAddStates(3, 7);
472 if ((0x97ffffff87ffffffL & l) == (ulong) 0L)
476 JjCheckNAddTwoStates(29, 30);
481 JjCheckNAddTwoStates(31, 31);
487 JjCheckNAddTwoStates(29, 30);
491 if ((0x97ffffff87ffffffL & l) != (ulong) 0L)
492 JjCheckNAddStates(10, 12);
497 JjCheckNAddTwoStates(34, 34);
501 JjCheckNAddStates(10, 12);
506 JjCheckNAddStates(13, 15);
513 while (i != startsAt);
517 int hiByte = (int) (curChar >> 8);
518 int i1 = hiByte >> 6;
519 ulong l1 = (ulong) (1L << (hiByte & 63));
520 int i2 = (curChar & 0xff) >> 6;
521 ulong l2 = (ulong) (1L << (curChar & 63));
524 switch (jjstateSet[--i])
529 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
533 JjCheckNAddTwoStates(25, 26);
537 if (JjCanMove_0(hiByte, i1, i2, l1, l2))
542 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
546 JjCheckNAddTwoStates(25, 26);
548 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
552 JjCheckNAddStates(3, 7);
558 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
559 JjCheckNAddStates(0, 2);
563 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
567 JjCheckNAddTwoStates(25, 26);
571 if (!JjCanMove_1(hiByte, i1, i2, l1, l2))
575 JjCheckNAddTwoStates(25, 26);
579 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
583 JjCheckNAddStates(3, 7);
587 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
591 JjCheckNAddTwoStates(29, 30);
595 if (!JjCanMove_1(hiByte, i1, i2, l1, l2))
599 JjCheckNAddTwoStates(29, 30);
603 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
604 JjCheckNAddStates(10, 12);
608 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
609 JjCheckNAddStates(10, 12);
616 while (i != startsAt);
618 if (kind != 0x7fffffff)
620 jjmatchedKind = kind;
621 jjmatchedPos = curPos;
625 if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
629 curChar = input_stream.ReadChar();
631 catch (System.IO.IOException e)
637 private int JjStopStringLiteralDfa_1(int pos, long active0)
643 if ((active0 & 0x40000000L) != 0L)
655 private int JjStartNfa_1(int pos, long active0)
657 return JjMoveNfa_1(JjStopStringLiteralDfa_1(pos, active0), pos + 1);
659 private int JjMoveStringLiteralDfa0_1()
665 return JjMoveStringLiteralDfa1_1(0x40000000L);
668 return JjStopAtPos(0, 31);
671 return JjMoveNfa_1(0, 0);
675 private int JjMoveStringLiteralDfa1_1(long active0)
679 curChar = input_stream.ReadChar();
681 catch (System.IO.IOException e)
683 JjStopStringLiteralDfa_1(0, active0);
690 if ((active0 & 0x40000000L) != 0L)
691 return JjStartNfaWithStates_1(1, 30, 6);
698 return JjStartNfa_1(0, active0);
700 private int JjStartNfaWithStates_1(int pos, int kind, int state)
702 jjmatchedKind = kind;
706 curChar = input_stream.ReadChar();
708 catch (System.IO.IOException e)
712 return JjMoveNfa_1(state, pos + 1);
714 private int JjMoveNfa_1(int startState, int curPos)
719 jjstateSet[0] = startState;
720 int kind = 0x7fffffff;
723 if (++jjround == 0x7fffffff)
727 ulong l = (ulong) (1L << (int) curChar);
730 switch (jjstateSet[--i])
734 if ((0xfffffffeffffffffL & l) != (ulong) 0L)
740 if ((0x100002600L & l) != 0L)
745 else if (curChar == 34)
746 JjCheckNAddTwoStates(2, 4);
751 JjCheckNAddTwoStates(2, 4);
755 if ((0xfffffffbffffffffL & l) != (ulong) 0L)
756 JjCheckNAddStates(16, 18);
761 JjCheckNAddStates(16, 18);
765 if (curChar == 34 && kind > 32)
770 if ((0xfffffffeffffffffL & l) == (ulong) 0L)
781 while (i != startsAt);
783 else if (curChar < 128)
785 ulong l = (ulong) (1L << (curChar & 63));
788 switch (jjstateSet[--i])
793 if ((0xdfffffffffffffffL & l) == (ulong) 0L)
806 jjstateSet[jjnewStateCnt++] = 3;
813 while (i != startsAt);
817 int hiByte = (int) (curChar >> 8);
818 int i1 = hiByte >> 6;
819 ulong l1 = (ulong) (1L << (hiByte & 63));
820 int i2 = (curChar & 0xff) >> 6;
821 ulong l2 = (ulong) (1L << (curChar & 63));
824 switch (jjstateSet[--i])
828 if (JjCanMove_0(hiByte, i1, i2, l1, l2))
833 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
842 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
847 if (!JjCanMove_1(hiByte, i1, i2, l1, l2))
858 while (i != startsAt);
860 if (kind != 0x7fffffff)
862 jjmatchedKind = kind;
863 jjmatchedPos = curPos;
867 if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
871 curChar = input_stream.ReadChar();
873 catch (System.IO.IOException e)
879 private int JjMoveStringLiteralDfa0_0()
881 return JjMoveNfa_0(0, 0);
883 private int JjMoveNfa_0(int startState, int curPos)
888 jjstateSet[0] = startState;
889 int kind = 0x7fffffff;
892 if (++jjround == 0x7fffffff)
896 ulong l = (ulong) (1L << (int) curChar);
899 switch (jjstateSet[--i])
903 if ((0x3ff000000000000L & l) == 0L)
916 if ((0x3ff000000000000L & l) == 0L)
927 while (i != startsAt);
929 else if (curChar < 128)
931 ulong l = (ulong) (1L << (curChar & 63));
934 switch (jjstateSet[--i])
941 while (i != startsAt);
945 int hiByte = (int) (curChar >> 8);
946 int i1 = hiByte >> 6;
947 long l1 = 1L << (hiByte & 63);
948 int i2 = (curChar & 0xff) >> 6;
949 long l2 = 1L << (curChar & 63);
952 switch (jjstateSet[--i])
959 while (i != startsAt);
961 if (kind != 0x7fffffff)
963 jjmatchedKind = kind;
964 jjmatchedPos = curPos;
968 if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
972 curChar = input_stream.ReadChar();
974 catch (System.IO.IOException e)
980 private int JjStopStringLiteralDfa_2(int pos, long active0)
986 if ((active0 & 0x4000000L) != 0L)
998 private int JjStartNfa_2(int pos, long active0)
1000 return JjMoveNfa_2(JjStopStringLiteralDfa_2(pos, active0), pos + 1);
1002 private int JjMoveStringLiteralDfa0_2()
1008 return JjMoveStringLiteralDfa1_2(0x4000000L);
1011 return JjStopAtPos(0, 27);
1014 return JjMoveNfa_2(0, 0);
1018 private int JjMoveStringLiteralDfa1_2(long active0)
1022 curChar = input_stream.ReadChar();
1024 catch (System.IO.IOException e)
1026 JjStopStringLiteralDfa_2(0, active0);
1033 if ((active0 & 0x4000000L) != 0L)
1034 return JjStartNfaWithStates_2(1, 26, 6);
1041 return JjStartNfa_2(0, active0);
1043 private int JjStartNfaWithStates_2(int pos, int kind, int state)
1045 jjmatchedKind = kind;
1049 curChar = input_stream.ReadChar();
1051 catch (System.IO.IOException e)
1055 return JjMoveNfa_2(state, pos + 1);
1057 private int JjMoveNfa_2(int startState, int curPos)
1062 jjstateSet[0] = startState;
1063 int kind = 0x7fffffff;
1066 if (++jjround == 0x7fffffff)
1070 ulong l = (ulong) (1L << (int) curChar);
1073 switch (jjstateSet[--i])
1077 if ((0xfffffffeffffffffL & l) != (ulong) 0L)
1083 if ((0x100002600L & l) != 0L)
1088 else if (curChar == 34)
1089 JjCheckNAddTwoStates(2, 4);
1094 JjCheckNAddTwoStates(2, 4);
1098 if ((0xfffffffbffffffffL & l) != (ulong) 0L)
1099 JjCheckNAddStates(16, 18);
1104 JjCheckNAddStates(16, 18);
1108 if (curChar == 34 && kind > 28)
1113 if ((0xfffffffeffffffffL & l) == (ulong) 0L)
1124 while (i != startsAt);
1126 else if (curChar < 128)
1128 ulong l = (ulong) (1L << (curChar & 63));
1131 switch (jjstateSet[--i])
1136 if ((0xffffffffdfffffffL & l) == (ulong) 0L)
1144 JjAddStates(16, 18);
1149 jjstateSet[jjnewStateCnt++] = 3;
1156 while (i != startsAt);
1160 int hiByte = (int) (curChar >> 8);
1161 int i1 = hiByte >> 6;
1162 ulong l1 = (ulong) (1L << (hiByte & 63));
1163 int i2 = (curChar & 0xff) >> 6;
1164 ulong l2 = (ulong) (1L << (curChar & 63));
1167 switch (jjstateSet[--i])
1171 if (JjCanMove_0(hiByte, i1, i2, l1, l2))
1176 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
1185 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
1186 JjAddStates(16, 18);
1190 if (!JjCanMove_1(hiByte, i1, i2, l1, l2))
1201 while (i != startsAt);
1203 if (kind != 0x7fffffff)
1205 jjmatchedKind = kind;
1206 jjmatchedPos = curPos;
1210 if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
1214 curChar = input_stream.ReadChar();
1216 catch (System.IO.IOException e)
1222 internal static readonly int[] jjnextStates = new int[]{15, 16, 18, 29, 32, 23, 33, 30, 20, 21, 32, 23, 33, 31, 34, 27, 2, 4, 5, 0, 1};
1223 private static bool JjCanMove_0(int hiByte, int i1, int i2, ulong l1, ulong l2)
1229 return ((jjbitVec0[i2] & l2) != (ulong) 0L);
1236 private static bool JjCanMove_1(int hiByte, int i1, int i2, ulong l1, ulong l2)
1242 return ((jjbitVec3[i2] & l2) != (ulong) 0L);
1245 if ((jjbitVec1[i1] & l1) != (ulong) 0L)
1251 private static bool JjCanMove_2(int hiByte, int i1, int i2, ulong l1, ulong l2)
1257 return ((jjbitVec3[i2] & l2) != (ulong) 0L);
1260 return ((jjbitVec1[i2] & l2) != (ulong) 0L);
1263 if ((jjbitVec4[i1] & l1) != (ulong) 0L)
1270 /// <summary>Token literal values. </summary>
1271 public static readonly System.String[] jjstrLiteralImages = new System.String[]{"", null, null, null, null, null, null, null, null, null, null, "\x002B", "\x002D", "\x0028", "\x0029", "\x003A", "\x002A", "\x005E", null, null, null, null, null, "\x005B", "\x007B", null, "\x0054\x004F", "\x005D", null, null, "\x0054\x004F", "\x007D", null, null};
1273 /// <summary>Lexer state names. </summary>
1274 public static readonly System.String[] lexStateNames = new System.String[]{"Boost", "RangeEx", "RangeIn", "DEFAULT"};
1276 /// <summary>Lex State array. </summary>
1277 public static readonly int[] jjnewLexState = new int[]{- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, 0, - 1, - 1, - 1, - 1, - 1, 2, 1, 3, - 1, 3, - 1, - 1, - 1, 3, - 1, - 1};
1278 internal static readonly ulong[] jjtoToken = new ulong[]{0x3ffffff01L};
1279 internal static readonly long[] jjtoSkip = new long[]{0x80L};
1280 protected internal CharStream input_stream;
1281 private uint[] jjrounds = new uint[36];
1282 private int[] jjstateSet = new int[72];
1283 protected internal char curChar;
1284 /// <summary>Constructor. </summary>
1285 public QueryParserTokenManager(CharStream stream)
1288 input_stream = stream;
1291 /// <summary>Constructor. </summary>
1292 public QueryParserTokenManager(CharStream stream, int lexState):this(stream)
1297 /// <summary>Reinitialise parser. </summary>
1298 public virtual void ReInit(CharStream stream)
1300 jjmatchedPos = jjnewStateCnt = 0;
1301 curLexState = defaultLexState;
1302 input_stream = stream;
1305 private void ReInitRounds()
1308 jjround = 0x80000001;
1309 for (i = 36; i-- > 0; )
1310 jjrounds[i] = 0x80000000;
1313 /// <summary>Reinitialise parser. </summary>
1314 public virtual void ReInit(CharStream stream, int lexState)
1320 /// <summary>Switch to specified lex state. </summary>
1321 public virtual void SwitchTo(int lexState)
1323 if (lexState >= 4 || lexState < 0)
1324 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1326 curLexState = lexState;
1329 protected internal virtual Token JjFillToken()
1332 System.String curTokenImage;
1337 System.String im = jjstrLiteralImages[jjmatchedKind];
1338 curTokenImage = (im == null)?input_stream.GetImage():im;
1339 beginLine = input_stream.GetBeginLine();
1340 beginColumn = input_stream.GetBeginColumn();
1341 endLine = input_stream.GetEndLine();
1342 endColumn = input_stream.GetEndColumn();
1343 t = Token.NewToken(jjmatchedKind, curTokenImage);
1345 t.beginLine = beginLine;
1346 t.endLine = endLine;
1347 t.beginColumn = beginColumn;
1348 t.endColumn = endColumn;
1353 internal int curLexState = 3;
1354 internal int defaultLexState = 3;
1355 internal int jjnewStateCnt;
1356 internal uint jjround;
1357 internal int jjmatchedPos;
1358 internal int jjmatchedKind;
1360 /// <summary>Get the next Token. </summary>
1361 public virtual Token GetNextToken()
1370 curChar = input_stream.BeginToken();
1372 catch (System.IO.IOException e)
1375 matchedToken = JjFillToken();
1376 return matchedToken;
1379 switch (curLexState)
1383 jjmatchedKind = 0x7fffffff;
1385 curPos = JjMoveStringLiteralDfa0_0();
1389 jjmatchedKind = 0x7fffffff;
1391 curPos = JjMoveStringLiteralDfa0_1();
1395 jjmatchedKind = 0x7fffffff;
1397 curPos = JjMoveStringLiteralDfa0_2();
1401 jjmatchedKind = 0x7fffffff;
1403 curPos = JjMoveStringLiteralDfa0_3();
1406 if (jjmatchedKind != 0x7fffffff)
1408 if (jjmatchedPos + 1 < curPos)
1409 input_stream.Backup(curPos - jjmatchedPos - 1);
1410 if ((jjtoToken[jjmatchedKind >> 6] & ((ulong) 1L << (jjmatchedKind & 63))) != (ulong) 0L)
1412 matchedToken = JjFillToken();
1413 if (jjnewLexState[jjmatchedKind] != - 1)
1414 curLexState = jjnewLexState[jjmatchedKind];
1415 return matchedToken;
1419 if (jjnewLexState[jjmatchedKind] != - 1)
1420 curLexState = jjnewLexState[jjmatchedKind];
1424 int error_line = input_stream.GetEndLine();
1425 int error_column = input_stream.GetEndColumn();
1426 System.String error_after = null;
1427 bool EOFSeen = false;
1430 input_stream.ReadChar(); input_stream.Backup(1);
1432 catch (System.IO.IOException e1)
1435 error_after = curPos <= 1?"":input_stream.GetImage();
1436 if (curChar == '\n' || curChar == '\r')
1446 input_stream.Backup(1);
1447 error_after = curPos <= 1?"":input_stream.GetImage();
1449 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1455 private void JjCheckNAdd(int state)
1457 if (jjrounds[state] != jjround)
1459 jjstateSet[jjnewStateCnt++] = state;
1460 jjrounds[state] = jjround;
1463 private void JjAddStates(int start, int end)
1467 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
1469 while (start++ != end);
1471 private void JjCheckNAddTwoStates(int state1, int state2)
1473 JjCheckNAdd(state1);
1474 JjCheckNAdd(state2);
1477 private void JjCheckNAddStates(int start, int end)
1481 JjCheckNAdd(jjnextStates[start]);
1483 while (start++ != end);