cvsimport
[beagle.git] / beagled / Lucene.Net / Analysis / Standard / StandardTokenizerTokenManager.cs
blob20a953bd66544ef3045e7868ea191623a07ef222
1 /*
2 * Copyright 2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 /* Generated By:JavaCC: Do not edit this line. StandardTokenizerTokenManager.java */
18 using System;
20 namespace Lucene.Net.Analysis.Standard
23 public class StandardTokenizerTokenManager : StandardTokenizerConstants
25 /// <summary>By default, closes the input Reader. </summary>
26 public void Close()
28 input_stream.Done();
31 private void InitBlock()
34 private int JjMoveStringLiteralDfa0_0()
36 return JjMoveNfa_0(0, 0);
38 private void JjCheckNAdd(int state)
40 if (jjrounds[state] != jjround)
42 jjstateSet[jjnewStateCnt++] = state;
43 jjrounds[state] = jjround;
46 private void JjAddStates(int start, int end)
48 do
50 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
52 while (start++ != end);
54 private void JjCheckNAddTwoStates(int state1, int state2)
56 JjCheckNAdd(state1);
57 JjCheckNAdd(state2);
59 private void JjCheckNAddStates(int start, int end)
61 do
63 JjCheckNAdd(jjnextStates[start]);
65 while (start++ != end);
67 private void JjCheckNAddStates(int start)
69 JjCheckNAdd(jjnextStates[start]);
70 JjCheckNAdd(jjnextStates[start + 1]);
72 internal static readonly ulong[] jjbitVec0 = new ulong[]{0x1ff0000000000000L, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L};
73 internal static readonly ulong[] jjbitVec2 = new ulong[]{0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
74 internal static readonly ulong[] jjbitVec3 = new ulong[]{0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L};
75 internal static readonly ulong[] jjbitVec4 = new ulong[]{0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L};
76 internal static readonly ulong[] jjbitVec5 = new ulong[]{0x3fffffffffffL, 0x0L, 0x0L, 0x0L};
77 internal static readonly ulong[] jjbitVec6 = new ulong[]{0x0L, 0x0L, 0xfffff00000000000L, 0x7fffffL};
78 internal static readonly ulong[] jjbitVec7 = new ulong[]{0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3ffffffffffffffL};
79 internal static readonly ulong[] jjbitVec8 = new ulong[]{0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffL, 0x0L};
80 internal static readonly ulong[] jjbitVec9 = new ulong[]{0xfffffffeL, 0x0L, 0x0L, 0x0L};
81 internal static readonly ulong[] jjbitVec10 = new ulong[]{0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL};
82 internal static readonly ulong[] jjbitVec11 = new ulong[]{0x1600L, 0x0L, 0x0L, 0x0L};
83 internal static readonly ulong[] jjbitVec12 = new ulong[]{0x0L, 0xffc000000000L, 0x0L, 0xffc000000000L};
84 internal static readonly ulong[] jjbitVec13 = new ulong[]{0x0L, 0x3ff00000000L, 0x0L, 0x3ff000000000000L};
85 internal static readonly ulong[] jjbitVec14 = new ulong[]{0x0L, 0xffc000000000L, 0x0L, 0xff8000000000L};
86 internal static readonly ulong[] jjbitVec15 = new ulong[]{0x0L, 0xffc000000000L, 0x0L, 0x0L};
87 internal static readonly ulong[] jjbitVec16 = new ulong[]{0x0L, 0x3ff0000L, 0x0L, 0x3ff0000L};
88 internal static readonly ulong[] jjbitVec17 = new ulong[]{0x0L, 0x3ffL, 0x0L, 0x0L};
89 internal static readonly ulong[] jjbitVec18 = new ulong[]{0xfffffffeL, 0x0L, 0xfffff00000000000L, 0x7fffffL};
90 private int JjMoveNfa_0(int startState, int curPos)
92 int[] nextStates;
93 int startsAt = 0;
94 jjnewStateCnt = 75;
95 int i = 1;
96 jjstateSet[0] = startState;
97 int j, kind = 0x7fffffff;
98 for (; ; )
100 if (++jjround == 0x7fffffff)
101 ReInitRounds();
102 if (curChar < 64)
104 ulong l = ((ulong) 1L) << curChar;
105 MatchLoop:
108 switch (jjstateSet[--i])
111 case 0:
112 if ((0x3ff000000000000L & l) != (ulong) 0L)
114 if (kind > 1)
115 kind = 1;
116 JjCheckNAddStates(0, 11);
118 if ((0x3ff000000000000L & l) != (ulong) 0L)
119 JjCheckNAddStates(12, 17);
120 if ((0x3ff000000000000L & l) != (ulong) 0L)
121 JjCheckNAddStates(18, 23);
122 break;
124 case 2:
125 if ((0x3ff000000000000L & l) != (ulong) 0L)
126 JjCheckNAddStates(18, 23);
127 break;
129 case 3:
130 if ((0x3ff000000000000L & l) != (ulong) 0L)
131 JjCheckNAddTwoStates(3, 4);
132 break;
134 case 4:
135 case 5:
136 if ((0x3ff000000000000L & l) != (ulong) 0L)
137 JjCheckNAddTwoStates(5, 6);
138 break;
140 case 6:
141 if ((0xf00000000000L & l) != (ulong) 0L)
142 JjCheckNAdd(7);
143 break;
145 case 7:
146 if ((0x3ff000000000000L & l) == (ulong) 0L)
147 break;
148 if (kind > 7)
149 kind = 7;
150 JjCheckNAdd(7);
151 break;
153 case 8:
154 if ((0x3ff000000000000L & l) != (ulong) 0L)
155 JjCheckNAddTwoStates(8, 9);
156 break;
158 case 9:
159 case 10:
160 if ((0x3ff000000000000L & l) != (ulong) 0L)
161 JjCheckNAddTwoStates(10, 11);
162 break;
164 case 11:
165 if ((0xf00000000000L & l) != (ulong) 0L)
166 JjCheckNAdd(12);
167 break;
169 case 12:
170 if ((0x3ff000000000000L & l) != (ulong) 0L)
171 JjCheckNAddTwoStates(12, 13);
172 break;
174 case 13:
175 if ((0xf00000000000L & l) != (ulong) 0L)
176 JjCheckNAddTwoStates(14, 15);
177 break;
179 case 14:
180 if ((0x3ff000000000000L & l) != (ulong) 0L)
181 JjCheckNAddTwoStates(14, 15);
182 break;
184 case 15:
185 case 16:
186 if ((0x3ff000000000000L & l) == (ulong) 0L)
187 break;
188 if (kind > 7)
189 kind = 7;
190 JjCheckNAddTwoStates(11, 16);
191 break;
193 case 17:
194 if ((0x3ff000000000000L & l) != (ulong) 0L)
195 JjCheckNAddTwoStates(17, 18);
196 break;
198 case 18:
199 case 19:
200 if ((0x3ff000000000000L & l) != (ulong) 0L)
201 JjCheckNAddTwoStates(19, 20);
202 break;
204 case 20:
205 if ((0xf00000000000L & l) != (ulong) 0L)
206 JjCheckNAdd(21);
207 break;
209 case 21:
210 if ((0x3ff000000000000L & l) != (ulong) 0L)
211 JjCheckNAddTwoStates(21, 22);
212 break;
214 case 22:
215 if ((0xf00000000000L & l) != (ulong) 0L)
216 JjCheckNAddTwoStates(23, 24);
217 break;
219 case 23:
220 if ((0x3ff000000000000L & l) != (ulong) 0L)
221 JjCheckNAddTwoStates(23, 24);
222 break;
224 case 24:
225 case 25:
226 if ((0x3ff000000000000L & l) != (ulong) 0L)
227 JjCheckNAddTwoStates(25, 26);
228 break;
230 case 26:
231 if ((0xf00000000000L & l) != (ulong) 0L)
232 JjCheckNAdd(27);
233 break;
235 case 27:
236 if ((0x3ff000000000000L & l) == (ulong) 0L)
237 break;
238 if (kind > 7)
239 kind = 7;
240 JjCheckNAddTwoStates(22, 27);
241 break;
243 case 28:
244 if ((0x3ff000000000000L & l) != (ulong) 0L)
245 JjCheckNAddStates(12, 17);
246 break;
248 case 29:
249 if ((0x3ff000000000000L & l) == (ulong) 0L)
250 break;
251 if (kind > 1)
252 kind = 1;
253 JjCheckNAddStates(0, 11);
254 break;
256 case 30:
257 if ((0x3ff000000000000L & l) == (ulong) 0L)
258 break;
259 if (kind > 1)
260 kind = 1;
261 JjCheckNAdd(30);
262 break;
264 case 31:
265 if ((0x3ff000000000000L & l) != (ulong) 0L)
266 JjCheckNAddStates(24, 26);
267 break;
269 case 32:
270 if ((0x600000000000L & l) != (ulong) 0L)
271 JjCheckNAdd(33);
272 break;
274 case 33:
275 if ((0x3ff000000000000L & l) != (ulong) 0L)
276 JjCheckNAddStates(27, 29);
277 break;
279 case 35:
280 if ((0x3ff000000000000L & l) != (ulong) 0L)
281 JjCheckNAddTwoStates(35, 36);
282 break;
284 case 36:
285 if ((0x600000000000L & l) != (ulong) 0L)
286 JjCheckNAdd(37);
287 break;
289 case 37:
290 if ((0x3ff000000000000L & l) == (ulong) 0L)
291 break;
292 if (kind > 5)
293 kind = 5;
294 JjCheckNAddTwoStates(36, 37);
295 break;
297 case 38:
298 if ((0x3ff000000000000L & l) != (ulong) 0L)
299 JjCheckNAddTwoStates(38, 39);
300 break;
302 case 39:
303 if (curChar == 46)
304 JjCheckNAdd(40);
305 break;
307 case 40:
308 if ((0x3ff000000000000L & l) == (ulong) 0L)
309 break;
310 if (kind > 6)
311 kind = 6;
312 JjCheckNAddTwoStates(39, 40);
313 break;
315 case 41:
316 if ((0x3ff000000000000L & l) != (ulong) 0L)
317 JjCheckNAddTwoStates(41, 42);
318 break;
320 case 42:
321 if ((0xf00000000000L & l) != (ulong) 0L)
322 JjCheckNAddTwoStates(43, 44);
323 break;
325 case 43:
326 if ((0x3ff000000000000L & l) != (ulong) 0L)
327 JjCheckNAddTwoStates(43, 44);
328 break;
330 case 44:
331 case 45:
332 if ((0x3ff000000000000L & l) == (ulong) 0L)
333 break;
334 if (kind > 7)
335 kind = 7;
336 JjCheckNAdd(45);
337 break;
339 case 46:
340 if ((0x3ff000000000000L & l) != (ulong) 0L)
341 JjCheckNAddTwoStates(46, 47);
342 break;
344 case 47:
345 if ((0xf00000000000L & l) != (ulong) 0L)
346 JjCheckNAddTwoStates(48, 49);
347 break;
349 case 48:
350 if ((0x3ff000000000000L & l) != (ulong) 0L)
351 JjCheckNAddTwoStates(48, 49);
352 break;
354 case 49:
355 case 50:
356 if ((0x3ff000000000000L & l) != (ulong) 0L)
357 JjCheckNAddTwoStates(50, 51);
358 break;
360 case 51:
361 if ((0xf00000000000L & l) != (ulong) 0L)
362 JjCheckNAdd(52);
363 break;
365 case 52:
366 if ((0x3ff000000000000L & l) == (ulong) 0L)
367 break;
368 if (kind > 7)
369 kind = 7;
370 JjCheckNAddTwoStates(47, 52);
371 break;
373 case 53:
374 if ((0x3ff000000000000L & l) != (ulong) 0L)
375 JjCheckNAddTwoStates(53, 54);
376 break;
378 case 54:
379 if ((0xf00000000000L & l) != (ulong) 0L)
380 JjCheckNAddTwoStates(55, 56);
381 break;
383 case 55:
384 if ((0x3ff000000000000L & l) != (ulong) 0L)
385 JjCheckNAddTwoStates(55, 56);
386 break;
388 case 56:
389 case 57:
390 if ((0x3ff000000000000L & l) != (ulong) 0L)
391 JjCheckNAddTwoStates(57, 58);
392 break;
394 case 58:
395 if ((0xf00000000000L & l) != (ulong) 0L)
396 JjCheckNAdd(59);
397 break;
399 case 59:
400 if ((0x3ff000000000000L & l) != (ulong) 0L)
401 JjCheckNAddTwoStates(59, 60);
402 break;
404 case 60:
405 if ((0xf00000000000L & l) != (ulong) 0L)
406 JjCheckNAddTwoStates(61, 62);
407 break;
409 case 61:
410 if ((0x3ff000000000000L & l) != (ulong) 0L)
411 JjCheckNAddTwoStates(61, 62);
412 break;
414 case 62:
415 case 63:
416 if ((0x3ff000000000000L & l) == (ulong) 0L)
417 break;
418 if (kind > 7)
419 kind = 7;
420 JjCheckNAddTwoStates(58, 63);
421 break;
423 case 66:
424 if (curChar == 39)
425 jjstateSet[jjnewStateCnt++] = 67;
426 break;
428 case 69:
429 if (curChar == 46)
430 JjCheckNAdd(70);
431 break;
433 case 71:
434 if (curChar != 46)
435 break;
436 if (kind > 3)
437 kind = 3;
438 JjCheckNAdd(70);
439 break;
441 case 73:
442 if (curChar == 38)
443 jjstateSet[jjnewStateCnt++] = 74;
444 break;
446 default: break;
450 while (i != startsAt);
452 else if (curChar < 128)
454 ulong l = ((ulong) 1L) << (curChar & 63);
455 MatchLoop1:
458 switch (jjstateSet[--i])
461 case 0:
462 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
463 JjCheckNAddStates(30, 35);
464 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
466 if (kind > 1)
467 kind = 1;
468 JjCheckNAddStates(0, 11);
470 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
471 JjCheckNAddStates(18, 23);
472 break;
474 case 2:
475 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
476 JjCheckNAddStates(18, 23);
477 break;
479 case 3:
480 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
481 JjCheckNAddTwoStates(3, 4);
482 break;
484 case 5:
485 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
486 JjAddStates(36, 37);
487 break;
489 case 6:
490 if (curChar == 95)
491 JjCheckNAdd(7);
492 break;
494 case 7:
495 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
496 break;
497 if (kind > 7)
498 kind = 7;
499 JjCheckNAdd(7);
500 break;
502 case 8:
503 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
504 JjCheckNAddTwoStates(8, 9);
505 break;
507 case 10:
508 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
509 JjCheckNAddTwoStates(10, 11);
510 break;
512 case 11:
513 if (curChar == 95)
514 JjCheckNAdd(12);
515 break;
517 case 12:
518 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
519 JjCheckNAddTwoStates(12, 13);
520 break;
522 case 13:
523 if (curChar == 95)
524 JjCheckNAddTwoStates(14, 15);
525 break;
527 case 14:
528 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
529 JjCheckNAddTwoStates(14, 15);
530 break;
532 case 16:
533 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
534 break;
535 if (kind > 7)
536 kind = 7;
537 JjCheckNAddTwoStates(11, 16);
538 break;
540 case 17:
541 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
542 JjCheckNAddTwoStates(17, 18);
543 break;
545 case 19:
546 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
547 JjAddStates(38, 39);
548 break;
550 case 20:
551 if (curChar == 95)
552 JjCheckNAdd(21);
553 break;
555 case 21:
556 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
557 JjCheckNAddTwoStates(21, 22);
558 break;
560 case 22:
561 if (curChar == 95)
562 JjCheckNAddTwoStates(23, 24);
563 break;
565 case 23:
566 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
567 JjCheckNAddTwoStates(23, 24);
568 break;
570 case 25:
571 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
572 JjAddStates(40, 41);
573 break;
575 case 26:
576 if (curChar == 95)
577 JjCheckNAdd(27);
578 break;
580 case 27:
581 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
582 break;
583 if (kind > 7)
584 kind = 7;
585 JjCheckNAddTwoStates(22, 27);
586 break;
588 case 29:
589 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
590 break;
591 if (kind > 1)
592 kind = 1;
593 JjCheckNAddStates(0, 11);
594 break;
596 case 30:
597 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
598 break;
599 if (kind > 1)
600 kind = 1;
601 JjCheckNAdd(30);
602 break;
604 case 31:
605 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
606 JjCheckNAddStates(24, 26);
607 break;
609 case 32:
610 if (curChar == 95)
611 JjCheckNAdd(33);
612 break;
614 case 33:
615 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
616 JjCheckNAddStates(27, 29);
617 break;
619 case 34:
620 if (curChar == 64)
621 JjCheckNAdd(35);
622 break;
624 case 35:
625 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
626 JjCheckNAddTwoStates(35, 36);
627 break;
629 case 37:
630 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
631 break;
632 if (kind > 5)
633 kind = 5;
634 JjCheckNAddTwoStates(36, 37);
635 break;
637 case 38:
638 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
639 JjCheckNAddTwoStates(38, 39);
640 break;
642 case 40:
643 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
644 break;
645 if (kind > 6)
646 kind = 6;
647 JjCheckNAddTwoStates(39, 40);
648 break;
650 case 41:
651 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
652 JjCheckNAddTwoStates(41, 42);
653 break;
655 case 42:
656 if (curChar == 95)
657 JjCheckNAddTwoStates(43, 44);
658 break;
660 case 43:
661 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
662 JjCheckNAddTwoStates(43, 44);
663 break;
665 case 45:
666 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
667 break;
668 if (kind > 7)
669 kind = 7;
670 jjstateSet[jjnewStateCnt++] = 45;
671 break;
673 case 46:
674 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
675 JjCheckNAddTwoStates(46, 47);
676 break;
678 case 47:
679 if (curChar == 95)
680 JjCheckNAddTwoStates(48, 49);
681 break;
683 case 48:
684 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
685 JjCheckNAddTwoStates(48, 49);
686 break;
688 case 50:
689 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
690 JjAddStates(42, 43);
691 break;
693 case 51:
694 if (curChar == 95)
695 JjCheckNAdd(52);
696 break;
698 case 52:
699 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
700 break;
701 if (kind > 7)
702 kind = 7;
703 JjCheckNAddTwoStates(47, 52);
704 break;
706 case 53:
707 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
708 JjCheckNAddTwoStates(53, 54);
709 break;
711 case 54:
712 if (curChar == 95)
713 JjCheckNAddTwoStates(55, 56);
714 break;
716 case 55:
717 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
718 JjCheckNAddTwoStates(55, 56);
719 break;
721 case 57:
722 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
723 JjCheckNAddTwoStates(57, 58);
724 break;
726 case 58:
727 if (curChar == 95)
728 JjCheckNAdd(59);
729 break;
731 case 59:
732 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
733 JjCheckNAddTwoStates(59, 60);
734 break;
736 case 60:
737 if (curChar == 95)
738 JjCheckNAddTwoStates(61, 62);
739 break;
741 case 61:
742 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
743 JjCheckNAddTwoStates(61, 62);
744 break;
746 case 63:
747 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
748 break;
749 if (kind > 7)
750 kind = 7;
751 JjCheckNAddTwoStates(58, 63);
752 break;
754 case 64:
755 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
756 JjCheckNAddStates(30, 35);
757 break;
759 case 65:
760 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
761 JjCheckNAddTwoStates(65, 66);
762 break;
764 case 67:
765 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
766 break;
767 if (kind > 2)
768 kind = 2;
769 JjCheckNAddTwoStates(66, 67);
770 break;
772 case 68:
773 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
774 JjCheckNAddTwoStates(68, 69);
775 break;
777 case 70:
778 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
779 JjAddStates(44, 45);
780 break;
782 case 72:
783 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
784 JjCheckNAddTwoStates(72, 73);
785 break;
787 case 73:
788 if (curChar == 64)
789 JjCheckNAdd(74);
790 break;
792 case 74:
793 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
794 break;
795 if (kind > 4)
796 kind = 4;
797 JjCheckNAdd(74);
798 break;
800 default: break;
804 while (i != startsAt);
806 else
808 int hiByte = (int) (curChar >> 8);
809 int i1 = hiByte >> 6;
810 ulong l1 = ((ulong) 1L) << (hiByte & 63);
811 int i2 = (curChar & 0xff) >> 6;
812 ulong l2 = ((ulong) 1L) << (curChar & 63);
813 MatchLoop1:
816 switch (jjstateSet[--i])
819 case 0:
820 if (JjCanMove_0(hiByte, i1, i2, l1, l2))
822 if (kind > 12)
823 kind = 12;
825 if (JjCanMove_1(hiByte, i1, i2, l1, l2))
827 if (kind > 13)
828 kind = 13;
830 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
831 JjCheckNAddStates(18, 23);
832 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
833 JjCheckNAddStates(12, 17);
834 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
836 if (kind > 1)
837 kind = 1;
838 JjCheckNAddStates(0, 11);
840 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
841 JjCheckNAddStates(30, 35);
842 break;
844 case 1:
845 if (JjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 13)
846 kind = 13;
847 break;
849 case 2:
850 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
851 JjCheckNAddStates(18, 23);
852 break;
854 case 3:
855 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
856 JjCheckNAddTwoStates(3, 4);
857 break;
859 case 4:
860 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
861 JjCheckNAddTwoStates(5, 6);
862 break;
864 case 5:
865 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
866 JjCheckNAddTwoStates(5, 6);
867 break;
869 case 7:
870 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
871 break;
872 if (kind > 7)
873 kind = 7;
874 jjstateSet[jjnewStateCnt++] = 7;
875 break;
877 case 8:
878 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
879 JjCheckNAddTwoStates(8, 9);
880 break;
882 case 9:
883 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
884 JjCheckNAddTwoStates(10, 11);
885 break;
887 case 10:
888 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
889 JjCheckNAddTwoStates(10, 11);
890 break;
892 case 12:
893 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
894 JjAddStates(46, 47);
895 break;
897 case 14:
898 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
899 JjAddStates(48, 49);
900 break;
902 case 15:
903 if (!JjCanMove_3(hiByte, i1, i2, l1, l2))
904 break;
905 if (kind > 7)
906 kind = 7;
907 JjCheckNAddTwoStates(11, 16);
908 break;
910 case 16:
911 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
912 break;
913 if (kind > 7)
914 kind = 7;
915 JjCheckNAddTwoStates(11, 16);
916 break;
918 case 17:
919 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
920 JjCheckNAddTwoStates(17, 18);
921 break;
923 case 18:
924 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
925 JjCheckNAddTwoStates(19, 20);
926 break;
928 case 19:
929 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
930 JjCheckNAddTwoStates(19, 20);
931 break;
933 case 21:
934 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
935 JjCheckNAddTwoStates(21, 22);
936 break;
938 case 23:
939 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
940 JjAddStates(50, 51);
941 break;
943 case 24:
944 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
945 JjCheckNAddTwoStates(25, 26);
946 break;
948 case 25:
949 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
950 JjCheckNAddTwoStates(25, 26);
951 break;
953 case 27:
954 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
955 break;
956 if (kind > 7)
957 kind = 7;
958 JjCheckNAddTwoStates(22, 27);
959 break;
961 case 28:
962 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
963 JjCheckNAddStates(12, 17);
964 break;
966 case 29:
967 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
968 break;
969 if (kind > 1)
970 kind = 1;
971 JjCheckNAddStates(0, 11);
972 break;
974 case 30:
975 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
976 break;
977 if (kind > 1)
978 kind = 1;
979 JjCheckNAdd(30);
980 break;
982 case 31:
983 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
984 JjCheckNAddStates(24, 26);
985 break;
987 case 33:
988 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
989 JjCheckNAddStates(27, 29);
990 break;
992 case 35:
993 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
994 JjCheckNAddTwoStates(35, 36);
995 break;
997 case 37:
998 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
999 break;
1000 if (kind > 5)
1001 kind = 5;
1002 JjCheckNAddTwoStates(36, 37);
1003 break;
1005 case 38:
1006 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
1007 JjCheckNAddTwoStates(38, 39);
1008 break;
1010 case 40:
1011 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
1012 break;
1013 if (kind > 6)
1014 kind = 6;
1015 JjCheckNAddTwoStates(39, 40);
1016 break;
1018 case 41:
1019 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
1020 JjCheckNAddTwoStates(41, 42);
1021 break;
1023 case 43:
1024 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1025 JjAddStates(52, 53);
1026 break;
1028 case 44:
1029 if (!JjCanMove_3(hiByte, i1, i2, l1, l2))
1030 break;
1031 if (kind > 7)
1032 kind = 7;
1033 JjCheckNAdd(45);
1034 break;
1036 case 45:
1037 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
1038 break;
1039 if (kind > 7)
1040 kind = 7;
1041 JjCheckNAdd(45);
1042 break;
1044 case 46:
1045 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
1046 JjCheckNAddTwoStates(46, 47);
1047 break;
1049 case 48:
1050 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1051 JjAddStates(54, 55);
1052 break;
1054 case 49:
1055 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
1056 JjCheckNAddTwoStates(50, 51);
1057 break;
1059 case 50:
1060 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1061 JjCheckNAddTwoStates(50, 51);
1062 break;
1064 case 52:
1065 if (!JjCanMove_4(hiByte, i1, i2, l1, l2))
1066 break;
1067 if (kind > 7)
1068 kind = 7;
1069 JjCheckNAddTwoStates(47, 52);
1070 break;
1072 case 53:
1073 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
1074 JjCheckNAddTwoStates(53, 54);
1075 break;
1077 case 55:
1078 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1079 JjAddStates(56, 57);
1080 break;
1082 case 56:
1083 if (JjCanMove_3(hiByte, i1, i2, l1, l2))
1084 JjCheckNAddTwoStates(57, 58);
1085 break;
1087 case 57:
1088 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1089 JjCheckNAddTwoStates(57, 58);
1090 break;
1092 case 59:
1093 if (JjCanMove_4(hiByte, i1, i2, l1, l2))
1094 JjAddStates(58, 59);
1095 break;
1097 case 61:
1098 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1099 JjAddStates(60, 61);
1100 break;
1102 case 62:
1103 if (!JjCanMove_3(hiByte, i1, i2, l1, l2))
1104 break;
1105 if (kind > 7)
1106 kind = 7;
1107 JjCheckNAddTwoStates(58, 63);
1108 break;
1110 case 63:
1111 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
1112 break;
1113 if (kind > 7)
1114 kind = 7;
1115 JjCheckNAddTwoStates(58, 63);
1116 break;
1118 case 64:
1119 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1120 JjCheckNAddStates(30, 35);
1121 break;
1123 case 65:
1124 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1125 JjCheckNAddTwoStates(65, 66);
1126 break;
1128 case 67:
1129 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
1130 break;
1131 if (kind > 2)
1132 kind = 2;
1133 JjCheckNAddTwoStates(66, 67);
1134 break;
1136 case 68:
1137 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1138 JjCheckNAddTwoStates(68, 69);
1139 break;
1141 case 70:
1142 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1143 JjAddStates(44, 45);
1144 break;
1146 case 72:
1147 if (JjCanMove_2(hiByte, i1, i2, l1, l2))
1148 JjCheckNAddTwoStates(72, 73);
1149 break;
1151 case 74:
1152 if (!JjCanMove_2(hiByte, i1, i2, l1, l2))
1153 break;
1154 if (kind > 4)
1155 kind = 4;
1156 jjstateSet[jjnewStateCnt++] = 74;
1157 break;
1159 default: break;
1163 while (i != startsAt);
1165 if (kind != 0x7fffffff)
1167 jjmatchedKind = kind;
1168 jjmatchedPos = curPos;
1169 kind = 0x7fffffff;
1171 ++curPos;
1172 if ((i = jjnewStateCnt) == (startsAt = 75 - (jjnewStateCnt = startsAt)))
1173 return curPos;
1174 int ret = input_stream.ReadChar();
1175 if (ret != -1)
1176 curChar = (char) ret;
1177 else
1178 return curPos;
1181 internal static readonly int[] jjnextStates = new int[]{30, 31, 32, 34, 38, 39, 41, 42, 46, 47, 53, 54, 5, 6, 10, 11, 19, 20, 3, 4, 8, 9, 17, 18, 31, 32, 34, 32, 33, 34, 65, 66, 68, 69, 72, 73, 5, 6, 19, 20, 25, 26, 50, 51, 70, 71, 12, 13, 14, 15, 23, 24, 43, 44, 48, 49, 55, 56, 59, 60, 61, 62};
1182 private static bool JjCanMove_0(int hiByte, int i1, int i2, ulong l1, ulong l2)
1184 switch (hiByte)
1187 case 48:
1188 return ((jjbitVec2[i2] & l2) != (ulong) 0L);
1190 case 49:
1191 return ((jjbitVec3[i2] & l2) != (ulong) 0L);
1193 case 51:
1194 return ((jjbitVec4[i2] & l2) != (ulong) 0L);
1196 case 61:
1197 return ((jjbitVec5[i2] & l2) != (ulong) 0L);
1199 default:
1200 if ((jjbitVec0[i1] & l1) != (ulong) 0L)
1201 return true;
1202 return false;
1206 private static bool JjCanMove_1(int hiByte, int i1, int i2, ulong l1, ulong l2)
1208 switch (hiByte)
1211 case 17:
1212 return ((jjbitVec7[i2] & l2) != (ulong) 0L);
1214 case 215:
1215 return ((jjbitVec8[i2] & l2) != (ulong) 0L);
1217 default:
1218 if ((jjbitVec6[i1] & l1) != (ulong) 0L)
1219 return true;
1220 return false;
1224 private static bool JjCanMove_2(int hiByte, int i1, int i2, ulong l1, ulong l2)
1226 switch (hiByte)
1229 case 0:
1230 return ((jjbitVec10[i2] & l2) != (ulong) 0L);
1232 default:
1233 if ((jjbitVec9[i1] & l1) != (ulong) 0L)
1234 return true;
1235 return false;
1239 private static bool JjCanMove_3(int hiByte, int i1, int i2, ulong l1, ulong l2)
1241 switch (hiByte)
1244 case 6:
1245 return ((jjbitVec13[i2] & l2) != (ulong) 0L);
1247 case 11:
1248 return ((jjbitVec14[i2] & l2) != (ulong) 0L);
1250 case 13:
1251 return ((jjbitVec15[i2] & l2) != (ulong) 0L);
1253 case 14:
1254 return ((jjbitVec16[i2] & l2) != (ulong) 0L);
1256 case 16:
1257 return ((jjbitVec17[i2] & l2) != (ulong) 0L);
1259 default:
1260 if ((jjbitVec11[i1] & l1) != (ulong) 0L)
1261 if ((jjbitVec12[i2] & l2) == (ulong) 0L)
1262 return false;
1263 else
1264 return true;
1265 return false;
1269 private static bool JjCanMove_4(int hiByte, int i1, int i2, ulong l1, ulong l2)
1271 switch (hiByte)
1274 case 0:
1275 return ((jjbitVec10[i2] & l2) != (ulong) 0L);
1277 case 215:
1278 return ((jjbitVec8[i2] & l2) != (ulong) 0L);
1280 default:
1281 if ((jjbitVec18[i1] & l1) != (ulong) 0L)
1282 return true;
1283 return false;
1287 public static readonly System.String[] jjstrLiteralImages = new System.String[]{"", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null};
1288 public static readonly System.String[] lexStateNames = new System.String[]{"DEFAULT"};
1289 internal static readonly long[] jjtoToken = new long[]{0x30ffL};
1290 internal static readonly long[] jjtoSkip = new long[]{0x8000L};
1291 protected internal CharStream input_stream;
1292 private uint[] jjrounds = new uint[75];
1293 private int[] jjstateSet = new int[150];
1294 protected internal char curChar;
1295 public StandardTokenizerTokenManager(CharStream stream)
1297 InitBlock();
1298 input_stream = stream;
1300 public StandardTokenizerTokenManager(CharStream stream, int lexState) : this(stream)
1302 SwitchTo(lexState);
1304 public virtual void ReInit(CharStream stream)
1306 jjmatchedPos = jjnewStateCnt = 0;
1307 curLexState = defaultLexState;
1308 input_stream = stream;
1309 ReInitRounds();
1311 private void ReInitRounds()
1313 int i;
1314 jjround = 0x80000001;
1315 for (i = 75; i-- > 0; )
1316 jjrounds[i] = 0x80000000;
1318 public virtual void ReInit(CharStream stream, int lexState)
1320 ReInit(stream);
1321 SwitchTo(lexState);
1323 public virtual void SwitchTo(int lexState)
1325 if (lexState >= 1 || lexState < 0)
1326 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1327 else
1328 curLexState = lexState;
1331 protected internal virtual Token JjFillToken()
1333 Token t = Token.NewToken(jjmatchedKind);
1334 t.kind = jjmatchedKind;
1335 System.String im = jjstrLiteralImages[jjmatchedKind];
1336 t.image = (im == null) ? input_stream.GetImage() : im;
1337 t.beginLine = input_stream.GetBeginLine();
1338 t.beginColumn = input_stream.GetBeginColumn();
1339 t.endLine = input_stream.GetEndLine();
1340 t.endColumn = input_stream.GetEndColumn();
1341 return t;
1344 internal int curLexState = 0;
1345 internal int defaultLexState = 0;
1346 internal int jjnewStateCnt;
1347 internal uint jjround;
1348 internal int jjmatchedPos;
1349 internal int jjmatchedKind;
1351 public virtual Token GetNextToken()
1353 int kind;
1354 Token specialToken = null;
1355 Token matchedToken;
1356 int curPos = 0;
1358 for (; ; )
1361 int ret = input_stream.BeginToken();
1362 if (ret != -1)
1363 curChar = (char) ret;
1364 else
1366 jjmatchedKind = 0;
1367 matchedToken = JjFillToken();
1368 return matchedToken;
1371 jjmatchedKind = 0x7fffffff;
1372 jjmatchedPos = 0;
1373 curPos = JjMoveStringLiteralDfa0_0();
1374 if (jjmatchedPos == 0 && jjmatchedKind > 15)
1376 jjmatchedKind = 15;
1378 if (jjmatchedKind != 0x7fffffff)
1380 if (jjmatchedPos + 1 < curPos)
1381 input_stream.Backup(curPos - jjmatchedPos - 1);
1382 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 63))) != 0L)
1384 matchedToken = JjFillToken();
1385 return matchedToken;
1387 else
1389 goto EOFLoop;
1392 int error_line = input_stream.GetEndLine();
1393 int error_column = input_stream.GetEndColumn();
1394 System.String error_after = null;
1395 bool EOFSeen = false;
1396 if (input_stream.ReadChar() == -1)
1398 EOFSeen = true;
1399 error_after = curPos <= 1?"":input_stream.GetImage();
1400 if (curChar == '\n' || curChar == '\r')
1402 error_line++;
1403 error_column = 0;
1405 else
1406 error_column++;
1408 else
1409 input_stream.Backup(1);
1411 if (!EOFSeen)
1413 input_stream.Backup(1);
1414 error_after = curPos <= 1?"":input_stream.GetImage();
1416 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1418 EOFLoop: ;