Thumbnail file hits. Based on a patch from D Bera
[beagle.git] / beagled / Lucene.Net / Analysis / Standard / StandardTokenizerTokenManager.cs
blob53b9ce6b4240e34fb5c7eacb13daa0f066a4e03f
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.
16 /* Generated By:JavaCC: Do not edit this line. StandardTokenizerTokenManager.java */
17 using System;
18 namespace Lucene.Net.Analysis.Standard
21 public class StandardTokenizerTokenManager : StandardTokenizerConstants
23 private void InitBlock()
25 System.IO.StreamWriter temp_writer;
26 temp_writer = new System.IO.StreamWriter(System.Console.OpenStandardOutput(), System.Console.Out.Encoding);
27 temp_writer.AutoFlush = true;
28 debugStream = temp_writer;
30 public System.IO.StreamWriter debugStream;
31 public virtual void SetDebugStream(System.IO.StreamWriter ds)
33 debugStream = ds;
35 private int JjMoveStringLiteralDfa0_0()
37 return JjMoveNfa_0(0, 0);
39 private void JjCheckNAdd(int state)
41 if (jjrounds[state] != jjround)
43 jjstateSet[jjnewStateCnt++] = state;
44 jjrounds[state] = jjround;
47 private void JjAddStates(int start, int end)
49 do
51 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
53 while (start++ != end);
55 private void JjCheckNAddTwoStates(int state1, int state2)
57 JjCheckNAdd(state1);
58 JjCheckNAdd(state2);
60 private void JjCheckNAddStates(int start, int end)
62 do
64 JjCheckNAdd(jjnextStates[start]);
66 while (start++ != end);
68 private void JjCheckNAddStates(int start)
70 JjCheckNAdd(jjnextStates[start]);
71 JjCheckNAdd(jjnextStates[start + 1]);
73 internal static readonly ulong[] jjbitVec0 = new ulong[]{0x1ff0000000000000L, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L};
74 internal static readonly ulong[] jjbitVec2 = new ulong[]{0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
75 internal static readonly ulong[] jjbitVec3 = new ulong[]{0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L};
76 internal static readonly ulong[] jjbitVec4 = new ulong[]{0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L};
77 internal static readonly ulong[] jjbitVec5 = new ulong[]{0x3fffffffffffL, 0x0L, 0x0L, 0x0L};
78 internal static readonly ulong[] jjbitVec6 = new ulong[]{0x1600L, 0x0L, 0x0L, 0x0L};
79 internal static readonly ulong[] jjbitVec7 = new ulong[]{0x0L, 0xffc000000000L, 0x0L, 0xffc000000000L};
80 internal static readonly ulong[] jjbitVec8 = new ulong[]{0x0L, 0x3ff00000000L, 0x0L, 0x3ff000000000000L};
81 internal static readonly ulong[] jjbitVec9 = new ulong[]{0x0L, 0xffc000000000L, 0x0L, 0xff8000000000L};
82 internal static readonly ulong[] jjbitVec10 = new ulong[]{0x0L, 0xffc000000000L, 0x0L, 0x0L};
83 internal static readonly ulong[] jjbitVec11 = new ulong[]{0x0L, 0x3ff0000L, 0x0L, 0x3ff0000L};
84 internal static readonly ulong[] jjbitVec12 = new ulong[]{0x0L, 0x3ffL, 0x0L, 0x0L};
85 internal static readonly ulong[] jjbitVec13 = new ulong[]{0xfffffffeL, 0x0L, 0x0L, 0x0L};
86 internal static readonly ulong[] jjbitVec14 = new ulong[]{0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL};
87 private int JjMoveNfa_0(int startState, int curPos)
89 int startsAt = 0;
90 jjnewStateCnt = 73;
91 int ii = 1;
92 jjstateSet[0] = startState;
93 int kind = 0x7fffffff;
94 for (; ; )
96 if (++jjround == 0x7fffffff)
97 ReInitRounds();
98 if (curChar < 64)
100 ulong l = ((ulong) 1L) << curChar;
103 switch (jjstateSet[--ii])
106 case 0:
107 if ((0x3ff000000000000L & l) != (ulong) 0L)
109 if (kind > 1)
110 kind = 1;
111 JjCheckNAddStates(0, 17);
113 if ((0x3ff000000000000L & l) != (ulong) 0L)
114 JjCheckNAddStates(18, 23);
115 break;
117 case 1:
118 if ((0x3ff000000000000L & l) != (ulong) 0L)
119 JjCheckNAddStates(18, 23);
120 break;
122 case 2:
123 case 39:
124 if ((0x3ff000000000000L & l) != (ulong) 0L)
125 JjCheckNAddTwoStates(2, 3);
126 break;
128 case 3:
129 if ((0xf00000000000L & l) != (ulong) 0L)
130 JjCheckNAdd(4);
131 break;
133 case 4:
134 if ((0x3ff000000000000L & l) == (ulong) 0L)
135 break;
136 if (kind > 7)
137 kind = 7;
138 JjCheckNAdd(4);
139 break;
141 case 5:
142 case 48:
143 if ((0x3ff000000000000L & l) != (ulong) 0L)
144 JjCheckNAddTwoStates(5, 6);
145 break;
147 case 6:
148 if ((0xf00000000000L & l) != (ulong) 0L)
149 JjCheckNAdd(7);
150 break;
152 case 7:
153 if ((0x3ff000000000000L & l) != (ulong) 0L)
154 JjCheckNAddTwoStates(7, 8);
155 break;
157 case 8:
158 if ((0xf00000000000L & l) != (ulong) 0L)
159 JjCheckNAddTwoStates(9, 10);
160 break;
162 case 9:
163 if ((0x3ff000000000000L & l) != (ulong) 0L)
164 JjCheckNAddTwoStates(9, 10);
165 break;
167 case 10:
168 case 11:
169 if ((0x3ff000000000000L & l) == (ulong) 0L)
170 break;
171 if (kind > 7)
172 kind = 7;
173 JjCheckNAddTwoStates(6, 11);
174 break;
176 case 12:
177 case 61:
178 if ((0x3ff000000000000L & l) != (ulong) 0L)
179 JjCheckNAddTwoStates(12, 13);
180 break;
182 case 13:
183 if ((0xf00000000000L & l) != (ulong) 0L)
184 JjCheckNAdd(14);
185 break;
187 case 14:
188 if ((0x3ff000000000000L & l) != (ulong) 0L)
189 JjCheckNAddTwoStates(14, 15);
190 break;
192 case 15:
193 if ((0xf00000000000L & l) != (ulong) 0L)
194 JjCheckNAddTwoStates(16, 17);
195 break;
197 case 16:
198 if ((0x3ff000000000000L & l) != (ulong) 0L)
199 JjCheckNAddTwoStates(16, 17);
200 break;
202 case 17:
203 case 18:
204 if ((0x3ff000000000000L & l) != (ulong) 0L)
205 JjCheckNAddTwoStates(18, 19);
206 break;
208 case 19:
209 if ((0xf00000000000L & l) != (ulong) 0L)
210 JjCheckNAdd(20);
211 break;
213 case 20:
214 if ((0x3ff000000000000L & l) == (ulong) 0L)
215 break;
216 if (kind > 7)
217 kind = 7;
218 JjCheckNAddTwoStates(15, 20);
219 break;
221 case 21:
222 if ((0x3ff000000000000L & l) == (ulong) 0L)
223 break;
224 if (kind > 1)
225 kind = 1;
226 JjCheckNAddStates(0, 17);
227 break;
229 case 22:
230 if ((0x3ff000000000000L & l) == (ulong) 0L)
231 break;
232 if (kind > 1)
233 kind = 1;
234 JjCheckNAdd(22);
235 break;
237 case 23:
238 if ((0x3ff000000000000L & l) != (ulong) 0L)
239 JjCheckNAddStates(24, 26);
240 break;
242 case 24:
243 if ((0x600000000000L & l) != (ulong) 0L)
244 JjCheckNAdd(25);
245 break;
247 case 25:
248 if ((0x3ff000000000000L & l) != (ulong) 0L)
249 JjCheckNAddStates(27, 29);
250 break;
252 case 27:
253 if ((0x3ff000000000000L & l) != (ulong) 0L)
254 JjCheckNAddTwoStates(27, 28);
255 break;
257 case 28:
258 if ((0x600000000000L & l) != (ulong) 0L)
259 JjCheckNAdd(29);
260 break;
262 case 29:
263 if ((0x3ff000000000000L & l) == (ulong) 0L)
264 break;
265 if (kind > 5)
266 kind = 5;
267 JjCheckNAddTwoStates(28, 29);
268 break;
270 case 30:
271 if ((0x3ff000000000000L & l) != (ulong) 0L)
272 JjCheckNAddTwoStates(30, 31);
273 break;
275 case 31:
276 if (curChar == 46)
277 JjCheckNAdd(32);
278 break;
280 case 32:
281 if ((0x3ff000000000000L & l) == (ulong) 0L)
282 break;
283 if (kind > 6)
284 kind = 6;
285 JjCheckNAddTwoStates(31, 32);
286 break;
288 case 33:
289 if ((0x3ff000000000000L & l) != (ulong) 0L)
290 JjCheckNAddTwoStates(33, 34);
291 break;
293 case 34:
294 if ((0xf00000000000L & l) != (ulong) 0L)
295 JjCheckNAddTwoStates(35, 36);
296 break;
298 case 35:
299 if ((0x3ff000000000000L & l) != (ulong) 0L)
300 JjCheckNAddTwoStates(35, 36);
301 break;
303 case 36:
304 case 37:
305 if ((0x3ff000000000000L & l) == (ulong) 0L)
306 break;
307 if (kind > 7)
308 kind = 7;
309 JjCheckNAdd(37);
310 break;
312 case 38:
313 if ((0x3ff000000000000L & l) != (ulong) 0L)
314 JjCheckNAddTwoStates(38, 39);
315 break;
317 case 40:
318 if ((0x3ff000000000000L & l) != (ulong) 0L)
319 JjCheckNAddTwoStates(40, 41);
320 break;
322 case 41:
323 if ((0xf00000000000L & l) != (ulong) 0L)
324 JjCheckNAddTwoStates(42, 43);
325 break;
327 case 42:
328 if ((0x3ff000000000000L & l) != (ulong) 0L)
329 JjCheckNAddTwoStates(42, 43);
330 break;
332 case 43:
333 case 44:
334 if ((0x3ff000000000000L & l) != (ulong) 0L)
335 JjCheckNAddTwoStates(44, 45);
336 break;
338 case 45:
339 if ((0xf00000000000L & l) != (ulong) 0L)
340 JjCheckNAdd(46);
341 break;
343 case 46:
344 if ((0x3ff000000000000L & l) == (ulong) 0L)
345 break;
346 if (kind > 7)
347 kind = 7;
348 JjCheckNAddTwoStates(41, 46);
349 break;
351 case 47:
352 if ((0x3ff000000000000L & l) != (ulong) 0L)
353 JjCheckNAddTwoStates(47, 48);
354 break;
356 case 49:
357 if ((0x3ff000000000000L & l) != (ulong) 0L)
358 JjCheckNAddTwoStates(49, 50);
359 break;
361 case 50:
362 if ((0xf00000000000L & l) != (ulong) 0L)
363 JjCheckNAddTwoStates(51, 52);
364 break;
366 case 51:
367 if ((0x3ff000000000000L & l) != (ulong) 0L)
368 JjCheckNAddTwoStates(51, 52);
369 break;
371 case 52:
372 case 53:
373 if ((0x3ff000000000000L & l) != (ulong) 0L)
374 JjCheckNAddTwoStates(53, 54);
375 break;
377 case 54:
378 if ((0xf00000000000L & l) != (ulong) 0L)
379 JjCheckNAdd(55);
380 break;
382 case 55:
383 if ((0x3ff000000000000L & l) != (ulong) 0L)
384 JjCheckNAddTwoStates(55, 56);
385 break;
387 case 56:
388 if ((0xf00000000000L & l) != (ulong) 0L)
389 JjCheckNAddTwoStates(57, 58);
390 break;
392 case 57:
393 if ((0x3ff000000000000L & l) != (ulong) 0L)
394 JjCheckNAddTwoStates(57, 58);
395 break;
397 case 58:
398 case 59:
399 if ((0x3ff000000000000L & l) == (ulong) 0L)
400 break;
401 if (kind > 7)
402 kind = 7;
403 JjCheckNAddTwoStates(54, 59);
404 break;
406 case 60:
407 if ((0x3ff000000000000L & l) != (ulong) 0L)
408 JjCheckNAddTwoStates(60, 61);
409 break;
411 case 64:
412 if (curChar == 39)
413 jjstateSet[jjnewStateCnt++] = 65;
414 break;
416 case 67:
417 if (curChar == 46)
418 JjCheckNAdd(68);
419 break;
421 case 69:
422 if (curChar != 46)
423 break;
424 if (kind > 3)
425 kind = 3;
426 JjCheckNAdd(68);
427 break;
429 case 71:
430 if (curChar == 38)
431 jjstateSet[jjnewStateCnt++] = 72;
432 break;
434 default: break;
438 while (ii != startsAt);
440 else if (curChar < 128)
442 ulong l = ((ulong) 1L) << (curChar & 63);
445 switch (jjstateSet[--ii])
448 case 0:
449 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
450 JjCheckNAddStates(30, 35);
451 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
453 if (kind > 1)
454 kind = 1;
455 JjCheckNAddStates(0, 17);
457 break;
459 case 2:
460 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
461 JjAddStates(36, 37);
462 break;
464 case 3:
465 if (curChar == 95)
466 JjCheckNAdd(4);
467 break;
469 case 4:
470 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
471 break;
472 if (kind > 7)
473 kind = 7;
474 JjCheckNAdd(4);
475 break;
477 case 5:
478 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
479 JjCheckNAddTwoStates(5, 6);
480 break;
482 case 6:
483 if (curChar == 95)
484 JjCheckNAdd(7);
485 break;
487 case 7:
488 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
489 JjCheckNAddTwoStates(7, 8);
490 break;
492 case 8:
493 if (curChar == 95)
494 JjCheckNAddTwoStates(9, 10);
495 break;
497 case 9:
498 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
499 JjCheckNAddTwoStates(9, 10);
500 break;
502 case 11:
503 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
504 break;
505 if (kind > 7)
506 kind = 7;
507 JjCheckNAddTwoStates(6, 11);
508 break;
510 case 12:
511 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
512 JjAddStates(38, 39);
513 break;
515 case 13:
516 if (curChar == 95)
517 JjCheckNAdd(14);
518 break;
520 case 14:
521 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
522 JjCheckNAddTwoStates(14, 15);
523 break;
525 case 15:
526 if (curChar == 95)
527 JjCheckNAddTwoStates(16, 17);
528 break;
530 case 16:
531 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
532 JjCheckNAddTwoStates(16, 17);
533 break;
535 case 18:
536 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
537 JjAddStates(40, 41);
538 break;
540 case 19:
541 if (curChar == 95)
542 JjCheckNAdd(20);
543 break;
545 case 20:
546 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
547 break;
548 if (kind > 7)
549 kind = 7;
550 JjCheckNAddTwoStates(15, 20);
551 break;
553 case 21:
554 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
555 break;
556 if (kind > 1)
557 kind = 1;
558 JjCheckNAddStates(0, 17);
559 break;
561 case 22:
562 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
563 break;
564 if (kind > 1)
565 kind = 1;
566 JjCheckNAdd(22);
567 break;
569 case 23:
570 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
571 JjCheckNAddStates(24, 26);
572 break;
574 case 24:
575 if (curChar == 95)
576 JjCheckNAdd(25);
577 break;
579 case 25:
580 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
581 JjCheckNAddStates(27, 29);
582 break;
584 case 26:
585 if (curChar == 64)
586 JjCheckNAdd(27);
587 break;
589 case 27:
590 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
591 JjCheckNAddTwoStates(27, 28);
592 break;
594 case 29:
595 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
596 break;
597 if (kind > 5)
598 kind = 5;
599 JjCheckNAddTwoStates(28, 29);
600 break;
602 case 30:
603 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
604 JjCheckNAddTwoStates(30, 31);
605 break;
607 case 32:
608 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
609 break;
610 if (kind > 6)
611 kind = 6;
612 JjCheckNAddTwoStates(31, 32);
613 break;
615 case 33:
616 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
617 JjCheckNAddTwoStates(33, 34);
618 break;
620 case 34:
621 if (curChar == 95)
622 JjCheckNAddTwoStates(35, 36);
623 break;
625 case 35:
626 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
627 JjCheckNAddTwoStates(35, 36);
628 break;
630 case 37:
631 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
632 break;
633 if (kind > 7)
634 kind = 7;
635 jjstateSet[jjnewStateCnt++] = 37;
636 break;
638 case 38:
639 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
640 JjCheckNAddTwoStates(38, 39);
641 break;
643 case 40:
644 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
645 JjCheckNAddTwoStates(40, 41);
646 break;
648 case 41:
649 if (curChar == 95)
650 JjCheckNAddTwoStates(42, 43);
651 break;
653 case 42:
654 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
655 JjCheckNAddTwoStates(42, 43);
656 break;
658 case 44:
659 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
660 JjAddStates(42, 43);
661 break;
663 case 45:
664 if (curChar == 95)
665 JjCheckNAdd(46);
666 break;
668 case 46:
669 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
670 break;
671 if (kind > 7)
672 kind = 7;
673 JjCheckNAddTwoStates(41, 46);
674 break;
676 case 47:
677 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
678 JjCheckNAddTwoStates(47, 48);
679 break;
681 case 49:
682 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
683 JjCheckNAddTwoStates(49, 50);
684 break;
686 case 50:
687 if (curChar == 95)
688 JjCheckNAddTwoStates(51, 52);
689 break;
691 case 51:
692 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
693 JjCheckNAddTwoStates(51, 52);
694 break;
696 case 53:
697 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
698 JjCheckNAddTwoStates(53, 54);
699 break;
701 case 54:
702 if (curChar == 95)
703 JjCheckNAdd(55);
704 break;
706 case 55:
707 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
708 JjCheckNAddTwoStates(55, 56);
709 break;
711 case 56:
712 if (curChar == 95)
713 JjCheckNAddTwoStates(57, 58);
714 break;
716 case 57:
717 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
718 JjCheckNAddTwoStates(57, 58);
719 break;
721 case 59:
722 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
723 break;
724 if (kind > 7)
725 kind = 7;
726 JjCheckNAddTwoStates(54, 59);
727 break;
729 case 60:
730 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
731 JjCheckNAddTwoStates(60, 61);
732 break;
734 case 62:
735 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
736 JjCheckNAddStates(30, 35);
737 break;
739 case 63:
740 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
741 JjCheckNAddTwoStates(63, 64);
742 break;
744 case 65:
745 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
746 break;
747 if (kind > 2)
748 kind = 2;
749 JjCheckNAddTwoStates(64, 65);
750 break;
752 case 66:
753 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
754 JjCheckNAddTwoStates(66, 67);
755 break;
757 case 68:
758 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
759 JjAddStates(44, 45);
760 break;
762 case 70:
763 if ((0x7fffffe07fffffeL & l) != (ulong) 0L)
764 JjCheckNAddTwoStates(70, 71);
765 break;
767 case 71:
768 if (curChar == 64)
769 JjCheckNAdd(72);
770 break;
772 case 72:
773 if ((0x7fffffe07fffffeL & l) == (ulong) 0L)
774 break;
775 if (kind > 4)
776 kind = 4;
777 JjCheckNAdd(72);
778 break;
780 default: break;
784 while (ii != startsAt);
786 else
788 int hiByte = (int) (curChar >> 8);
789 int i1 = hiByte >> 6;
790 ulong l1 = ((ulong) 1L) << (hiByte & 63);
791 int i2 = (curChar & 0xff) >> 6;
792 ulong l2 = ((ulong) 1L) << (curChar & 63);
795 switch (jjstateSet[--ii])
798 case 0:
799 if (jjCanMove_0(hiByte, i1, i2, (ulong) l1, (ulong) l2))
801 if (kind > 12)
802 kind = 12;
804 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
805 JjCheckNAddStates(18, 23);
806 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
808 if (kind > 1)
809 kind = 1;
810 JjCheckNAddStates(0, 17);
812 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
813 JjCheckNAddStates(30, 35);
814 break;
816 case 1:
817 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
818 JjCheckNAddStates(18, 23);
819 break;
821 case 2:
822 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
823 JjCheckNAddTwoStates(2, 3);
824 break;
826 case 4:
827 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
828 break;
829 if (kind > 7)
830 kind = 7;
831 jjstateSet[jjnewStateCnt++] = 4;
832 break;
834 case 5:
835 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
836 JjCheckNAddTwoStates(5, 6);
837 break;
839 case 7:
840 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
841 JjAddStates(46, 47);
842 break;
844 case 9:
845 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
846 JjAddStates(48, 49);
847 break;
849 case 10:
850 if (!jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
851 break;
852 if (kind > 7)
853 kind = 7;
854 JjCheckNAddTwoStates(6, 11);
855 break;
857 case 11:
858 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
859 break;
860 if (kind > 7)
861 kind = 7;
862 JjCheckNAddTwoStates(6, 11);
863 break;
865 case 12:
866 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
867 JjCheckNAddTwoStates(12, 13);
868 break;
870 case 14:
871 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
872 JjCheckNAddTwoStates(14, 15);
873 break;
875 case 16:
876 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
877 JjAddStates(50, 51);
878 break;
880 case 17:
881 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
882 JjCheckNAddTwoStates(18, 19);
883 break;
885 case 18:
886 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
887 JjCheckNAddTwoStates(18, 19);
888 break;
890 case 20:
891 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
892 break;
893 if (kind > 7)
894 kind = 7;
895 JjCheckNAddTwoStates(15, 20);
896 break;
898 case 21:
899 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
900 break;
901 if (kind > 1)
902 kind = 1;
903 JjCheckNAddStates(0, 17);
904 break;
906 case 22:
907 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
908 break;
909 if (kind > 1)
910 kind = 1;
911 JjCheckNAdd(22);
912 break;
914 case 23:
915 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
916 JjCheckNAddStates(24, 26);
917 break;
919 case 25:
920 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
921 JjCheckNAddStates(27, 29);
922 break;
924 case 27:
925 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
926 JjCheckNAddTwoStates(27, 28);
927 break;
929 case 29:
930 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
931 break;
932 if (kind > 5)
933 kind = 5;
934 JjCheckNAddTwoStates(28, 29);
935 break;
937 case 30:
938 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
939 JjCheckNAddTwoStates(30, 31);
940 break;
942 case 32:
943 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
944 break;
945 if (kind > 6)
946 kind = 6;
947 JjCheckNAddTwoStates(31, 32);
948 break;
950 case 33:
951 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
952 JjCheckNAddTwoStates(33, 34);
953 break;
955 case 35:
956 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
957 JjAddStates(52, 53);
958 break;
960 case 36:
961 if (!jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
962 break;
963 if (kind > 7)
964 kind = 7;
965 JjCheckNAdd(37);
966 break;
968 case 37:
969 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
970 break;
971 if (kind > 7)
972 kind = 7;
973 JjCheckNAdd(37);
974 break;
976 case 38:
977 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
978 JjCheckNAddTwoStates(38, 39);
979 break;
981 case 39:
982 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
983 JjCheckNAddTwoStates(2, 3);
984 break;
986 case 40:
987 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
988 JjCheckNAddTwoStates(40, 41);
989 break;
991 case 42:
992 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
993 JjAddStates(54, 55);
994 break;
996 case 43:
997 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
998 JjCheckNAddTwoStates(44, 45);
999 break;
1001 case 44:
1002 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1003 JjCheckNAddTwoStates(44, 45);
1004 break;
1006 case 46:
1007 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1008 break;
1009 if (kind > 7)
1010 kind = 7;
1011 JjCheckNAddTwoStates(41, 46);
1012 break;
1014 case 47:
1015 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1016 JjCheckNAddTwoStates(47, 48);
1017 break;
1019 case 48:
1020 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1021 JjCheckNAddTwoStates(5, 6);
1022 break;
1024 case 49:
1025 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1026 JjCheckNAddTwoStates(49, 50);
1027 break;
1029 case 51:
1030 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1031 JjAddStates(56, 57);
1032 break;
1034 case 52:
1035 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1036 JjCheckNAddTwoStates(53, 54);
1037 break;
1039 case 53:
1040 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1041 JjCheckNAddTwoStates(53, 54);
1042 break;
1044 case 55:
1045 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1046 JjAddStates(58, 59);
1047 break;
1049 case 57:
1050 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1051 JjAddStates(60, 61);
1052 break;
1054 case 58:
1055 if (!jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1056 break;
1057 if (kind > 7)
1058 kind = 7;
1059 JjCheckNAddTwoStates(54, 59);
1060 break;
1062 case 59:
1063 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1064 break;
1065 if (kind > 7)
1066 kind = 7;
1067 JjCheckNAddTwoStates(54, 59);
1068 break;
1070 case 60:
1071 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1072 JjCheckNAddTwoStates(60, 61);
1073 break;
1075 case 61:
1076 if (jjCanMove_1(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1077 JjCheckNAddTwoStates(12, 13);
1078 break;
1080 case 62:
1081 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1082 JjCheckNAddStates(30, 35);
1083 break;
1085 case 63:
1086 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1087 JjCheckNAddTwoStates(63, 64);
1088 break;
1090 case 65:
1091 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1092 break;
1093 if (kind > 2)
1094 kind = 2;
1095 JjCheckNAddTwoStates(64, 65);
1096 break;
1098 case 66:
1099 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1100 JjCheckNAddTwoStates(66, 67);
1101 break;
1103 case 68:
1104 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1105 JjAddStates(44, 45);
1106 break;
1108 case 70:
1109 if (jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1110 JjCheckNAddTwoStates(70, 71);
1111 break;
1113 case 72:
1114 if (!jjCanMove_2(hiByte, i1, i2, (ulong) l1, (ulong) l2))
1115 break;
1116 if (kind > 4)
1117 kind = 4;
1118 jjstateSet[jjnewStateCnt++] = 72;
1119 break;
1121 default: break;
1125 while (ii != startsAt);
1127 if (kind != 0x7fffffff)
1129 jjmatchedKind = kind;
1130 jjmatchedPos = curPos;
1131 kind = 0x7fffffff;
1133 ++curPos;
1134 if ((ii = jjnewStateCnt) == (startsAt = 73 - (jjnewStateCnt = startsAt)))
1135 return curPos;
1138 curChar = input_stream.ReadChar();
1140 catch (System.IO.IOException)
1142 return curPos;
1146 internal static readonly int[] jjnextStates = new int[]{22, 23, 24, 26, 30, 31, 33, 34, 38, 39, 40, 41, 47, 48, 49, 50, 60, 61, 2, 3, 5, 6, 12, 13, 23, 24, 26, 24, 25, 26, 63, 64, 66, 67, 70, 71, 2, 3, 12, 13, 18, 19, 44, 45, 68, 69, 7, 8, 9, 10, 16, 17, 35, 36, 42, 43, 51, 52, 55, 56, 57, 58};
1147 private static bool jjCanMove_0(int hiByte, int i1, int i2, ulong l1, ulong l2)
1149 switch (hiByte)
1152 case 48:
1153 return ((jjbitVec2[i2] & l2) != (ulong) 0L);
1155 case 49:
1156 return ((jjbitVec3[i2] & l2) != (ulong) 0L);
1158 case 51:
1159 return ((jjbitVec4[i2] & l2) != (ulong) 0L);
1161 case 61:
1162 return ((jjbitVec5[i2] & l2) != (ulong) 0L);
1164 default:
1165 if ((jjbitVec0[i1] & l1) != (ulong) 0L)
1166 return true;
1167 return false;
1171 private static bool jjCanMove_1(int hiByte, int i1, int i2, ulong l1, ulong l2)
1173 switch (hiByte)
1176 case 6:
1177 return ((jjbitVec8[i2] & l2) != (ulong) 0L);
1179 case 11:
1180 return ((jjbitVec9[i2] & l2) != (ulong) 0L);
1182 case 13:
1183 return ((jjbitVec10[i2] & l2) != (ulong) 0L);
1185 case 14:
1186 return ((jjbitVec11[i2] & l2) != (ulong) 0L);
1188 case 16:
1189 return ((jjbitVec12[i2] & l2) != (ulong) 0L);
1191 default:
1192 if ((jjbitVec6[i1] & l1) != (ulong) 0L)
1193 if ((jjbitVec7[i2] & l2) == (ulong) 0L)
1194 return false;
1195 else
1196 return true;
1197 return false;
1201 private static bool jjCanMove_2(int hiByte, int i1, int i2, ulong l1, ulong l2)
1203 switch (hiByte)
1206 case 0:
1207 return ((jjbitVec14[i2] & l2) != (ulong) 0L);
1209 default:
1210 if ((jjbitVec13[i1] & l1) != (ulong) 0L)
1211 return true;
1212 return false;
1216 public static readonly System.String[] jjstrLiteralImages = new System.String[]{"", null, null, null, null, null, null, null, null, null, null, null, null, null, null};
1217 public static readonly System.String[] lexStateNames = new System.String[]{"DEFAULT"};
1218 internal static readonly long[] jjtoToken = new long[]{0x10ffL};
1219 internal static readonly long[] jjtoSkip = new long[]{0x4000L};
1220 protected internal CharStream input_stream;
1221 private uint[] jjrounds = new uint[73];
1222 private int[] jjstateSet = new int[146];
1223 protected internal char curChar;
1224 public StandardTokenizerTokenManager(CharStream stream)
1226 InitBlock();
1227 input_stream = stream;
1229 public StandardTokenizerTokenManager(CharStream stream, int lexState):this(stream)
1231 SwitchTo(lexState);
1233 public virtual void ReInit(CharStream stream)
1235 jjmatchedPos = jjnewStateCnt = 0;
1236 curLexState = defaultLexState;
1237 input_stream = stream;
1238 ReInitRounds();
1240 private void ReInitRounds()
1242 int i;
1243 jjround = 0x80000001;
1244 for (i = 73; i-- > 0; )
1245 jjrounds[i] = 0x80000000;
1247 public virtual void ReInit(CharStream stream, int lexState)
1249 ReInit(stream);
1250 SwitchTo(lexState);
1252 public virtual void SwitchTo(int lexState)
1254 if (lexState >= 1 || lexState < 0)
1255 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1256 else
1257 curLexState = lexState;
1260 protected internal virtual Token JjFillToken()
1262 Token t = Token.NewToken(jjmatchedKind);
1263 t.kind = jjmatchedKind;
1264 System.String im = jjstrLiteralImages[jjmatchedKind];
1265 t.image = (im == null)?input_stream.GetImage():im;
1266 t.beginLine = input_stream.GetBeginLine();
1267 t.beginColumn = input_stream.GetBeginColumn();
1268 t.endLine = input_stream.GetEndLine();
1269 t.endColumn = input_stream.GetEndColumn();
1270 return t;
1273 internal int curLexState = 0;
1274 internal int defaultLexState = 0;
1275 internal int jjnewStateCnt;
1276 internal uint jjround;
1277 internal int jjmatchedPos;
1278 internal int jjmatchedKind;
1280 public virtual Token GetNextToken()
1282 Token matchedToken;
1283 int curPos = 0;
1285 for (; ; )
1289 curChar = input_stream.BeginToken();
1291 catch (System.IO.IOException)
1293 jjmatchedKind = 0;
1294 matchedToken = JjFillToken();
1295 return matchedToken;
1298 jjmatchedKind = 0x7fffffff;
1299 jjmatchedPos = 0;
1300 curPos = JjMoveStringLiteralDfa0_0();
1301 if (jjmatchedPos == 0 && jjmatchedKind > 14)
1303 jjmatchedKind = 14;
1305 if (jjmatchedKind != 0x7fffffff)
1307 if (jjmatchedPos + 1 < curPos)
1308 input_stream.Backup(curPos - jjmatchedPos - 1);
1309 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 63))) != 0L)
1311 matchedToken = JjFillToken();
1312 return matchedToken;
1314 else
1316 goto EOFLoop;
1319 int error_line = input_stream.GetEndLine();
1320 int error_column = input_stream.GetEndColumn();
1321 System.String error_after = null;
1322 bool EOFSeen = false;
1325 input_stream.ReadChar(); input_stream.Backup(1);
1327 catch (System.IO.IOException)
1329 EOFSeen = true;
1330 error_after = curPos <= 1?"":input_stream.GetImage();
1331 if (curChar == '\n' || curChar == '\r')
1333 error_line++;
1334 error_column = 0;
1336 else
1337 error_column++;
1339 if (!EOFSeen)
1341 input_stream.Backup(1);
1342 error_after = curPos <= 1?"":input_stream.GetImage();
1344 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1346 EOFLoop: ;