1 using System;
2 using System.Lex;
3 using IntermediateCodeTokens;
4
5
6
7 public class IntermediateCodeLexer : System.Lex.Lexer
8 {
9 public IntermediateCodeLexer(const ustring& content_, const string& fileName_, int fileIndex_) :
10 base(content_, fileName_, fileIndex_)
11 {
12 SetKeywordMap(IntermediateCodeKeywords.GetKeywordMap());
13 IntermediateCodeClassMap.Init();
14 }
15 public IntermediateCodeLexer(const uchar* start_, const uchar* end_, const string& fileName_, int fileIndex_) :
16 base(start_, end_, fileName_, fileIndex_)
17 {
18 SetKeywordMap(IntermediateCodeKeywords.GetKeywordMap());
19 IntermediateCodeClassMap.Init();
20 }
21 public override int NextState(int state, uchar c)
22 {
23 int i = IntermediateCodeClassMap.GetClass(c);
24 switch (state)
25 {
26 case 0:
27 {
28 switch (i)
29 {
30 case 0: case 1: case 5: case 6:
31 {
32 return 1;
33 }
34 case 2:
35 {
36 return 2;
37 }
38 case 3: case 7: case 8: case 9: case 15:
39 {
40 return 3;
41 }
42 case 10:
43 {
44 return 4;
45 }
46 case 11:
47 {
48 return 5;
49 }
50 case 12:
51 {
52 return 6;
53 }
54 case 13:
55 {
56 return 7;
57 }
58 case 14:
59 {
60 return 8;
61 }
62 case 17:
63 {
64 return 9;
65 }
66 case 18: case 19:
67 {
68 return 10;
69 }
70 case 20: case 22: case 23: case 24:
71 {
72 return 11;
73 }
74 case 21:
75 {
76 return 12;
77 }
78 case 25:
79 {
80 return 13;
81 }
82 case 26:
83 {
84 return 14;
85 }
86 case 27:
87 {
88 return 15;
89 }
90 case 28:
91 {
92 return 16;
93 }
94 case 29:
95 {
96 return 17;
97 }
98 case 30:
99 {
100 return 18;
101 }
102 case 31:
103 {
104 return 19;
105 }
106 case 32:
107 {
108 return 20;
109 }
110 case 33:
111 {
112 return 21;
113 }
114 case 34:
115 {
116 return 22;
117 }
118 case 35:
119 {
120 return 23;
121 }
122 default:
123 {
124 return -1;
125 }
126 }
127 return -1;
128 }
129 case 23:
130 {
131 System.Lex.Lexeme prevMatch = token.match;
132 token.match = lexeme;
133 int tokenId = GetTokenId(20);
134 if (tokenId == CONTINUE_TOKEN)
135 {
136 token.id = CONTINUE_TOKEN;
137 return -1;
138 }
139 else
140 {
141 if (tokenId != INVALID_TOKEN)
142 {
143 token.id = tokenId;
144 }
145 else
146 {
147 token.match = prevMatch;
148 }
149 }
150 return -1;
151 }
152 case 22:
153 {
154 System.Lex.Lexeme prevMatch = token.match;
155 token.match = lexeme;
156 int tokenId = GetTokenId(17);
157 if (tokenId == CONTINUE_TOKEN)
158 {
159 token.id = CONTINUE_TOKEN;
160 return -1;
161 }
162 else
163 {
164 if (tokenId != INVALID_TOKEN)
165 {
166 token.id = tokenId;
167 }
168 else
169 {
170 token.match = prevMatch;
171 }
172 }
173 return -1;
174 }
175 case 21:
176 {
177 System.Lex.Lexeme prevMatch = token.match;
178 token.match = lexeme;
179 int tokenId = GetTokenId(16);
180 if (tokenId == CONTINUE_TOKEN)
181 {
182 token.id = CONTINUE_TOKEN;
183 return -1;
184 }
185 else
186 {
187 if (tokenId != INVALID_TOKEN)
188 {
189 token.id = tokenId;
190 }
191 else
192 {
193 token.match = prevMatch;
194 }
195 }
196 return -1;
197 }
198 case 20:
199 {
200 System.Lex.Lexeme prevMatch = token.match;
201 token.match = lexeme;
202 int tokenId = GetTokenId(15);
203 if (tokenId == CONTINUE_TOKEN)
204 {
205 token.id = CONTINUE_TOKEN;
206 return -1;
207 }
208 else
209 {
210 if (tokenId != INVALID_TOKEN)
211 {
212 token.id = tokenId;
213 }
214 else
215 {
216 token.match = prevMatch;
217 }
218 }
219 return -1;
220 }
221 case 19:
222 {
223 System.Lex.Lexeme prevMatch = token.match;
224 token.match = lexeme;
225 int tokenId = GetTokenId(14);
226 if (tokenId == CONTINUE_TOKEN)
227 {
228 token.id = CONTINUE_TOKEN;
229 return -1;
230 }
231 else
232 {
233 if (tokenId != INVALID_TOKEN)
234 {
235 token.id = tokenId;
236 }
237 else
238 {
239 token.match = prevMatch;
240 }
241 }
242 return -1;
243 }
244 case 18:
245 {
246 System.Lex.Lexeme prevMatch = token.match;
247 token.match = lexeme;
248 int tokenId = GetTokenId(13);
249 if (tokenId == CONTINUE_TOKEN)
250 {
251 token.id = CONTINUE_TOKEN;
252 return -1;
253 }
254 else
255 {
256 if (tokenId != INVALID_TOKEN)
257 {
258 token.id = tokenId;
259 }
260 else
261 {
262 token.match = prevMatch;
263 }
264 }
265 return -1;
266 }
267 case 17:
268 {
269 System.Lex.Lexeme prevMatch = token.match;
270 token.match = lexeme;
271 int tokenId = GetTokenId(12);
272 if (tokenId == CONTINUE_TOKEN)
273 {
274 token.id = CONTINUE_TOKEN;
275 return -1;
276 }
277 else
278 {
279 if (tokenId != INVALID_TOKEN)
280 {
281 token.id = tokenId;
282 }
283 else
284 {
285 token.match = prevMatch;
286 }
287 }
288 return -1;
289 }
290 case 16:
291 {
292 System.Lex.Lexeme prevMatch = token.match;
293 token.match = lexeme;
294 int tokenId = GetTokenId(11);
295 if (tokenId == CONTINUE_TOKEN)
296 {
297 token.id = CONTINUE_TOKEN;
298 return -1;
299 }
300 else
301 {
302 if (tokenId != INVALID_TOKEN)
303 {
304 token.id = tokenId;
305 }
306 else
307 {
308 token.match = prevMatch;
309 }
310 }
311 return -1;
312 }
313 case 15:
314 {
315 System.Lex.Lexeme prevMatch = token.match;
316 token.match = lexeme;
317 int tokenId = GetTokenId(10);
318 if (tokenId == CONTINUE_TOKEN)
319 {
320 token.id = CONTINUE_TOKEN;
321 return -1;
322 }
323 else
324 {
325 if (tokenId != INVALID_TOKEN)
326 {
327 token.id = tokenId;
328 }
329 else
330 {
331 token.match = prevMatch;
332 }
333 }
334 return -1;
335 }
336 case 14:
337 {
338 System.Lex.Lexeme prevMatch = token.match;
339 token.match = lexeme;
340 int tokenId = GetTokenId(9);
341 if (tokenId == CONTINUE_TOKEN)
342 {
343 token.id = CONTINUE_TOKEN;
344 return -1;
345 }
346 else
347 {
348 if (tokenId != INVALID_TOKEN)
349 {
350 token.id = tokenId;
351 }
352 else
353 {
354 token.match = prevMatch;
355 }
356 }
357 return -1;
358 }
359 case 13:
360 {
361 System.Lex.Lexeme prevMatch = token.match;
362 token.match = lexeme;
363 int tokenId = GetTokenId(5);
364 if (tokenId == CONTINUE_TOKEN)
365 {
366 token.id = CONTINUE_TOKEN;
367 return -1;
368 }
369 else
370 {
371 if (tokenId != INVALID_TOKEN)
372 {
373 token.id = tokenId;
374 }
375 else
376 {
377 token.match = prevMatch;
378 }
379 }
380 switch (i)
381 {
382 case 25:
383 {
384 return 13;
385 }
386 case 17:
387 {
388 return 24;
389 }
390 case 20: case 21: case 22:
391 {
392 return 25;
393 }
394 case 23: case 24:
395 {
396 return 26;
397 }
398 default:
399 {
400 return -1;
401 }
402 }
403 return -1;
404 }
405 case 26:
406 {
407 System.Lex.Lexeme prevMatch = token.match;
408 token.match = lexeme;
409 int tokenId = GetTokenId(6);
410 if (tokenId == CONTINUE_TOKEN)
411 {
412 token.id = CONTINUE_TOKEN;
413 return -1;
414 }
415 else
416 {
417 if (tokenId != INVALID_TOKEN)
418 {
419 token.id = tokenId;
420 }
421 else
422 {
423 token.match = prevMatch;
424 }
425 }
426 switch (i)
427 {
428 case 20: case 21: case 22: case 23: case 24:
429 {
430 return 25;
431 }
432 case 18: case 19:
433 {
434 return 27;
435 }
436 case 25:
437 {
438 return 28;
439 }
440 default:
441 {
442 return -1;
443 }
444 }
445 return -1;
446 }
447 case 28:
448 {
449 System.Lex.Lexeme prevMatch = token.match;
450 token.match = lexeme;
451 int tokenId = GetTokenId(5);
452 if (tokenId == CONTINUE_TOKEN)
453 {
454 token.id = CONTINUE_TOKEN;
455 return -1;
456 }
457 else
458 {
459 if (tokenId != INVALID_TOKEN)
460 {
461 token.id = tokenId;
462 }
463 else
464 {
465 token.match = prevMatch;
466 }
467 }
468 switch (i)
469 {
470 case 20: case 21: case 22: case 23: case 24:
471 {
472 return 25;
473 }
474 case 25:
475 {
476 return 28;
477 }
478 default:
479 {
480 return -1;
481 }
482 }
483 return -1;
484 }
485 case 27:
486 {
487 switch (i)
488 {
489 case 25:
490 {
491 return 29;
492 }
493 default:
494 {
495 return -1;
496 }
497 }
498 return -1;
499 }
500 case 29:
501 {
502 System.Lex.Lexeme prevMatch = token.match;
503 token.match = lexeme;
504 int tokenId = GetTokenId(5);
505 if (tokenId == CONTINUE_TOKEN)
506 {
507 token.id = CONTINUE_TOKEN;
508 return -1;
509 }
510 else
511 {
512 if (tokenId != INVALID_TOKEN)
513 {
514 token.id = tokenId;
515 }
516 else
517 {
518 token.match = prevMatch;
519 }
520 }
521 switch (i)
522 {
523 case 25:
524 {
525 return 29;
526 }
527 default:
528 {
529 return -1;
530 }
531 }
532 return -1;
533 }
534 case 25:
535 {
536 System.Lex.Lexeme prevMatch = token.match;
537 token.match = lexeme;
538 int tokenId = GetTokenId(6);
539 if (tokenId == CONTINUE_TOKEN)
540 {
541 token.id = CONTINUE_TOKEN;
542 return -1;
543 }
544 else
545 {
546 if (tokenId != INVALID_TOKEN)
547 {
548 token.id = tokenId;
549 }
550 else
551 {
552 token.match = prevMatch;
553 }
554 }
555 switch (i)
556 {
557 case 20: case 21: case 22: case 23: case 24: case 25:
558 {
559 return 25;
560 }
561 default:
562 {
563 return -1;
564 }
565 }
566 return -1;
567 }
568 case 24:
569 {
570 System.Lex.Lexeme prevMatch = token.match;
571 token.match = lexeme;
572 int tokenId = GetTokenId(5);
573 if (tokenId == CONTINUE_TOKEN)
574 {
575 token.id = CONTINUE_TOKEN;
576 return -1;
577 }
578 else
579 {
580 if (tokenId != INVALID_TOKEN)
581 {
582 token.id = tokenId;
583 }
584 else
585 {
586 token.match = prevMatch;
587 }
588 }
589 switch (i)
590 {
591 case 23: case 24:
592 {
593 return 30;
594 }
595 case 25:
596 {
597 return 31;
598 }
599 default:
600 {
601 return -1;
602 }
603 }
604 return -1;
605 }
606 case 31:
607 {
608 System.Lex.Lexeme prevMatch = token.match;
609 token.match = lexeme;
610 int tokenId = GetTokenId(5);
611 if (tokenId == CONTINUE_TOKEN)
612 {
613 token.id = CONTINUE_TOKEN;
614 return -1;
615 }
616 else
617 {
618 if (tokenId != INVALID_TOKEN)
619 {
620 token.id = tokenId;
621 }
622 else
623 {
624 token.match = prevMatch;
625 }
626 }
627 switch (i)
628 {
629 case 23: case 24:
630 {
631 return 30;
632 }
633 case 25:
634 {
635 return 31;
636 }
637 default:
638 {
639 return -1;
640 }
641 }
642 return -1;
643 }
644 case 30:
645 {
646 switch (i)
647 {
648 case 18: case 19:
649 {
650 return 27;
651 }
652 case 25:
653 {
654 return 29;
655 }
656 default:
657 {
658 return -1;
659 }
660 }
661 return -1;
662 }
663 case 12:
664 {
665 System.Lex.Lexeme prevMatch = token.match;
666 token.match = lexeme;
667 int tokenId = GetTokenId(2);
668 if (tokenId == CONTINUE_TOKEN)
669 {
670 token.id = CONTINUE_TOKEN;
671 return -1;
672 }
673 else
674 {
675 if (tokenId != INVALID_TOKEN)
676 {
677 token.id = tokenId;
678 }
679 else
680 {
681 token.match = prevMatch;
682 }
683 }
684 switch (i)
685 {
686 case 3: case 4: case 8: case 9: case 15:
687 {
688 return 32;
689 }
690 case 7:
691 {
692 return 33;
693 }
694 case 12:
695 {
696 return 34;
697 }
698 case 13:
699 {
700 return 35;
701 }
702 case 20: case 21: case 22: case 23: case 24: case 25:
703 {
704 return 36;
705 }
706 default:
707 {
708 return -1;
709 }
710 }
711 return -1;
712 }
713 case 36:
714 {
715 System.Lex.Lexeme prevMatch = token.match;
716 token.match = lexeme;
717 int tokenId = GetTokenId(2);
718 if (tokenId == CONTINUE_TOKEN)
719 {
720 token.id = CONTINUE_TOKEN;
721 return -1;
722 }
723 else
724 {
725 if (tokenId != INVALID_TOKEN)
726 {
727 token.id = tokenId;
728 }
729 else
730 {
731 token.match = prevMatch;
732 }
733 }
734 switch (i)
735 {
736 case 3: case 4: case 7: case 8: case 9: case 15:
737 {
738 return 32;
739 }
740 case 12:
741 {
742 return 34;
743 }
744 case 13:
745 {
746 return 35;
747 }
748 case 20: case 21: case 22: case 23: case 24: case 25:
749 {
750 return 36;
751 }
752 default:
753 {
754 return -1;
755 }
756 }
757 return -1;
758 }
759 case 35:
760 {
761 System.Lex.Lexeme prevMatch = token.match;
762 token.match = lexeme;
763 int tokenId = GetTokenId(2);
764 if (tokenId == CONTINUE_TOKEN)
765 {
766 token.id = CONTINUE_TOKEN;
767 return -1;
768 }
769 else
770 {
771 if (tokenId != INVALID_TOKEN)
772 {
773 token.id = tokenId;
774 }
775 else
776 {
777 token.match = prevMatch;
778 }
779 }
780 switch (i)
781 {
782 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
783 {
784 return 32;
785 }
786 case 12:
787 {
788 return 34;
789 }
790 case 13:
791 {
792 return 35;
793 }
794 default:
795 {
796 return -1;
797 }
798 }
799 return -1;
800 }
801 case 34:
802 {
803 System.Lex.Lexeme prevMatch = token.match;
804 token.match = lexeme;
805 int tokenId = GetTokenId(2);
806 if (tokenId == CONTINUE_TOKEN)
807 {
808 token.id = CONTINUE_TOKEN;
809 return -1;
810 }
811 else
812 {
813 if (tokenId != INVALID_TOKEN)
814 {
815 token.id = tokenId;
816 }
817 else
818 {
819 token.match = prevMatch;
820 }
821 }
822 switch (i)
823 {
824 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
825 {
826 return 32;
827 }
828 case 12:
829 {
830 return 34;
831 }
832 case 13:
833 {
834 return 35;
835 }
836 default:
837 {
838 return -1;
839 }
840 }
841 return -1;
842 }
843 case 33:
844 {
845 System.Lex.Lexeme prevMatch = token.match;
846 token.match = lexeme;
847 int tokenId = GetTokenId(2);
848 if (tokenId == CONTINUE_TOKEN)
849 {
850 token.id = CONTINUE_TOKEN;
851 return -1;
852 }
853 else
854 {
855 if (tokenId != INVALID_TOKEN)
856 {
857 token.id = tokenId;
858 }
859 else
860 {
861 token.match = prevMatch;
862 }
863 }
864 switch (i)
865 {
866 case 3: case 4: case 7: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
867 {
868 return 32;
869 }
870 case 12:
871 {
872 return 34;
873 }
874 case 13:
875 {
876 return 35;
877 }
878 case 8:
879 {
880 return 37;
881 }
882 default:
883 {
884 return -1;
885 }
886 }
887 return -1;
888 }
889 case 37:
890 {
891 System.Lex.Lexeme prevMatch = token.match;
892 token.match = lexeme;
893 int tokenId = GetTokenId(2);
894 if (tokenId == CONTINUE_TOKEN)
895 {
896 token.id = CONTINUE_TOKEN;
897 return -1;
898 }
899 else
900 {
901 if (tokenId != INVALID_TOKEN)
902 {
903 token.id = tokenId;
904 }
905 else
906 {
907 token.match = prevMatch;
908 }
909 }
910 switch (i)
911 {
912 case 3: case 4: case 7: case 8: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
913 {
914 return 32;
915 }
916 case 12:
917 {
918 return 34;
919 }
920 case 13:
921 {
922 return 35;
923 }
924 case 9:
925 {
926 return 38;
927 }
928 default:
929 {
930 return -1;
931 }
932 }
933 return -1;
934 }
935 case 38:
936 {
937 System.Lex.Lexeme prevMatch = token.match;
938 token.match = lexeme;
939 int tokenId = GetTokenId(2);
940 if (tokenId == CONTINUE_TOKEN)
941 {
942 token.id = CONTINUE_TOKEN;
943 return -1;
944 }
945 else
946 {
947 if (tokenId != INVALID_TOKEN)
948 {
949 token.id = tokenId;
950 }
951 else
952 {
953 token.match = prevMatch;
954 }
955 }
956 switch (i)
957 {
958 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 23: case 24: case 25:
959 {
960 return 32;
961 }
962 case 12:
963 {
964 return 34;
965 }
966 case 13:
967 {
968 return 35;
969 }
970 case 22:
971 {
972 return 39;
973 }
974 default:
975 {
976 return -1;
977 }
978 }
979 return -1;
980 }
981 case 39:
982 {
983 System.Lex.Lexeme prevMatch = token.match;
984 token.match = lexeme;
985 int tokenId = GetTokenId(2);
986 if (tokenId == CONTINUE_TOKEN)
987 {
988 token.id = CONTINUE_TOKEN;
989 return -1;
990 }
991 else
992 {
993 if (tokenId != INVALID_TOKEN)
994 {
995 token.id = tokenId;
996 }
997 else
998 {
999 token.match = prevMatch;
1000 }
1001 }
1002 switch (i)
1003 {
1004 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
1005 {
1006 return 32;
1007 }
1008 case 12:
1009 {
1010 return 34;
1011 }
1012 case 13:
1013 {
1014 return 35;
1015 }
1016 case 10:
1017 {
1018 return 40;
1019 }
1020 default:
1021 {
1022 return -1;
1023 }
1024 }
1025 return -1;
1026 }
1027 case 40:
1028 {
1029 switch (i)
1030 {
1031 case 20: case 21: case 22: case 23: case 24: case 25:
1032 {
1033 return 41;
1034 }
1035 default:
1036 {
1037 return -1;
1038 }
1039 }
1040 return -1;
1041 }
1042 case 41:
1043 {
1044 switch (i)
1045 {
1046 case 20: case 21: case 22: case 23: case 24: case 25:
1047 {
1048 return 41;
1049 }
1050 case 11:
1051 {
1052 return 42;
1053 }
1054 default:
1055 {
1056 return -1;
1057 }
1058 }
1059 return -1;
1060 }
1061 case 42:
1062 {
1063 System.Lex.Lexeme prevMatch = token.match;
1064 token.match = lexeme;
1065 int tokenId = GetTokenId(1);
1066 if (tokenId == CONTINUE_TOKEN)
1067 {
1068 token.id = CONTINUE_TOKEN;
1069 return -1;
1070 }
1071 else
1072 {
1073 if (tokenId != INVALID_TOKEN)
1074 {
1075 token.id = tokenId;
1076 }
1077 else
1078 {
1079 token.match = prevMatch;
1080 }
1081 }
1082 return -1;
1083 }
1084 case 32:
1085 {
1086 System.Lex.Lexeme prevMatch = token.match;
1087 token.match = lexeme;
1088 int tokenId = GetTokenId(2);
1089 if (tokenId == CONTINUE_TOKEN)
1090 {
1091 token.id = CONTINUE_TOKEN;
1092 return -1;
1093 }
1094 else
1095 {
1096 if (tokenId != INVALID_TOKEN)
1097 {
1098 token.id = tokenId;
1099 }
1100 else
1101 {
1102 token.match = prevMatch;
1103 }
1104 }
1105 switch (i)
1106 {
1107 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
1108 {
1109 return 32;
1110 }
1111 case 12:
1112 {
1113 return 34;
1114 }
1115 case 13:
1116 {
1117 return 35;
1118 }
1119 default:
1120 {
1121 return -1;
1122 }
1123 }
1124 return -1;
1125 }
1126 case 11:
1127 {
1128 System.Lex.Lexeme prevMatch = token.match;
1129 token.match = lexeme;
1130 int tokenId = GetTokenId(2);
1131 if (tokenId == CONTINUE_TOKEN)
1132 {
1133 token.id = CONTINUE_TOKEN;
1134 return -1;
1135 }
1136 else
1137 {
1138 if (tokenId != INVALID_TOKEN)
1139 {
1140 token.id = tokenId;
1141 }
1142 else
1143 {
1144 token.match = prevMatch;
1145 }
1146 }
1147 switch (i)
1148 {
1149 case 3: case 4: case 7: case 8: case 9: case 15:
1150 {
1151 return 32;
1152 }
1153 case 12:
1154 {
1155 return 34;
1156 }
1157 case 13:
1158 {
1159 return 35;
1160 }
1161 case 20: case 21: case 22: case 23: case 24: case 25:
1162 {
1163 return 36;
1164 }
1165 default:
1166 {
1167 return -1;
1168 }
1169 }
1170 return -1;
1171 }
1172 case 10:
1173 {
1174 switch (i)
1175 {
1176 case 17:
1177 {
1178 return 9;
1179 }
1180 case 25:
1181 {
1182 return 43;
1183 }
1184 default:
1185 {
1186 return -1;
1187 }
1188 }
1189 return -1;
1190 }
1191 case 43:
1192 {
1193 System.Lex.Lexeme prevMatch = token.match;
1194 token.match = lexeme;
1195 int tokenId = GetTokenId(5);
1196 if (tokenId == CONTINUE_TOKEN)
1197 {
1198 token.id = CONTINUE_TOKEN;
1199 return -1;
1200 }
1201 else
1202 {
1203 if (tokenId != INVALID_TOKEN)
1204 {
1205 token.id = tokenId;
1206 }
1207 else
1208 {
1209 token.match = prevMatch;
1210 }
1211 }
1212 switch (i)
1213 {
1214 case 17:
1215 {
1216 return 24;
1217 }
1218 case 23: case 24:
1219 {
1220 return 30;
1221 }
1222 case 25:
1223 {
1224 return 43;
1225 }
1226 default:
1227 {
1228 return -1;
1229 }
1230 }
1231 return -1;
1232 }
1233 case 9:
1234 {
1235 switch (i)
1236 {
1237 case 25:
1238 {
1239 return 31;
1240 }
1241 default:
1242 {
1243 return -1;
1244 }
1245 }
1246 return -1;
1247 }
1248 case 8:
1249 {
1250 System.Lex.Lexeme prevMatch = token.match;
1251 token.match = lexeme;
1252 int tokenId = GetTokenId(19);
1253 if (tokenId == CONTINUE_TOKEN)
1254 {
1255 token.id = CONTINUE_TOKEN;
1256 return -1;
1257 }
1258 else
1259 {
1260 if (tokenId != INVALID_TOKEN)
1261 {
1262 token.id = tokenId;
1263 }
1264 else
1265 {
1266 token.match = prevMatch;
1267 }
1268 }
1269 switch (i)
1270 {
1271 case 15:
1272 {
1273 return 44;
1274 }
1275 default:
1276 {
1277 return -1;
1278 }
1279 }
1280 return -1;
1281 }
1282 case 44:
1283 {
1284 switch (i)
1285 {
1286 case 25:
1287 {
1288 return 45;
1289 }
1290 default:
1291 {
1292 return -1;
1293 }
1294 }
1295 return -1;
1296 }
1297 case 45:
1298 {
1299 System.Lex.Lexeme prevMatch = token.match;
1300 token.match = lexeme;
1301 int tokenId = GetTokenId(3);
1302 if (tokenId == CONTINUE_TOKEN)
1303 {
1304 token.id = CONTINUE_TOKEN;
1305 return -1;
1306 }
1307 else
1308 {
1309 if (tokenId != INVALID_TOKEN)
1310 {
1311 token.id = tokenId;
1312 }
1313 else
1314 {
1315 token.match = prevMatch;
1316 }
1317 }
1318 switch (i)
1319 {
1320 case 25:
1321 {
1322 return 45;
1323 }
1324 default:
1325 {
1326 return -1;
1327 }
1328 }
1329 return -1;
1330 }
1331 case 7:
1332 {
1333 System.Lex.Lexeme prevMatch = token.match;
1334 token.match = lexeme;
1335 int tokenId = GetTokenId(18);
1336 if (tokenId == CONTINUE_TOKEN)
1337 {
1338 token.id = CONTINUE_TOKEN;
1339 return -1;
1340 }
1341 else
1342 {
1343 if (tokenId != INVALID_TOKEN)
1344 {
1345 token.id = tokenId;
1346 }
1347 else
1348 {
1349 token.match = prevMatch;
1350 }
1351 }
1352 return -1;
1353 }
1354 case 6:
1355 {
1356 System.Lex.Lexeme prevMatch = token.match;
1357 token.match = lexeme;
1358 int tokenId = GetTokenId(2);
1359 if (tokenId == CONTINUE_TOKEN)
1360 {
1361 token.id = CONTINUE_TOKEN;
1362 return -1;
1363 }
1364 else
1365 {
1366 if (tokenId != INVALID_TOKEN)
1367 {
1368 token.id = tokenId;
1369 }
1370 else
1371 {
1372 token.match = prevMatch;
1373 }
1374 }
1375 switch (i)
1376 {
1377 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
1378 {
1379 return 32;
1380 }
1381 case 12:
1382 {
1383 return 34;
1384 }
1385 case 13:
1386 {
1387 return 35;
1388 }
1389 default:
1390 {
1391 return -1;
1392 }
1393 }
1394 return -1;
1395 }
1396 case 5:
1397 {
1398 System.Lex.Lexeme prevMatch = token.match;
1399 token.match = lexeme;
1400 int tokenId = GetTokenId(8);
1401 if (tokenId == CONTINUE_TOKEN)
1402 {
1403 token.id = CONTINUE_TOKEN;
1404 return -1;
1405 }
1406 else
1407 {
1408 if (tokenId != INVALID_TOKEN)
1409 {
1410 token.id = tokenId;
1411 }
1412 else
1413 {
1414 token.match = prevMatch;
1415 }
1416 }
1417 return -1;
1418 }
1419 case 4:
1420 {
1421 System.Lex.Lexeme prevMatch = token.match;
1422 token.match = lexeme;
1423 int tokenId = GetTokenId(7);
1424 if (tokenId == CONTINUE_TOKEN)
1425 {
1426 token.id = CONTINUE_TOKEN;
1427 return -1;
1428 }
1429 else
1430 {
1431 if (tokenId != INVALID_TOKEN)
1432 {
1433 token.id = tokenId;
1434 }
1435 else
1436 {
1437 token.match = prevMatch;
1438 }
1439 }
1440 return -1;
1441 }
1442 case 3:
1443 {
1444 System.Lex.Lexeme prevMatch = token.match;
1445 token.match = lexeme;
1446 int tokenId = GetTokenId(2);
1447 if (tokenId == CONTINUE_TOKEN)
1448 {
1449 token.id = CONTINUE_TOKEN;
1450 return -1;
1451 }
1452 else
1453 {
1454 if (tokenId != INVALID_TOKEN)
1455 {
1456 token.id = tokenId;
1457 }
1458 else
1459 {
1460 token.match = prevMatch;
1461 }
1462 }
1463 switch (i)
1464 {
1465 case 3: case 4: case 7: case 8: case 9: case 15: case 20: case 21: case 22: case 23: case 24: case 25:
1466 {
1467 return 32;
1468 }
1469 case 12:
1470 {
1471 return 34;
1472 }
1473 case 13:
1474 {
1475 return 35;
1476 }
1477 default:
1478 {
1479 return -1;
1480 }
1481 }
1482 return -1;
1483 }
1484 case 2:
1485 {
1486 switch (i)
1487 {
1488 case 2:
1489 {
1490 return 46;
1491 }
1492 case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35:
1493 {
1494 return 47;
1495 }
1496 default:
1497 {
1498 return -1;
1499 }
1500 }
1501 return -1;
1502 }
1503 case 47:
1504 {
1505 switch (i)
1506 {
1507 case 2:
1508 {
1509 return 46;
1510 }
1511 case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35:
1512 {
1513 return 47;
1514 }
1515 default:
1516 {
1517 return -1;
1518 }
1519 }
1520 return -1;
1521 }
1522 case 46:
1523 {
1524 System.Lex.Lexeme prevMatch = token.match;
1525 token.match = lexeme;
1526 int tokenId = GetTokenId(4);
1527 if (tokenId == CONTINUE_TOKEN)
1528 {
1529 token.id = CONTINUE_TOKEN;
1530 return -1;
1531 }
1532 else
1533 {
1534 if (tokenId != INVALID_TOKEN)
1535 {
1536 token.id = tokenId;
1537 }
1538 else
1539 {
1540 token.match = prevMatch;
1541 }
1542 }
1543 return -1;
1544 }
1545 case 1:
1546 {
1547 System.Lex.Lexeme prevMatch = token.match;
1548 token.match = lexeme;
1549 int tokenId = GetTokenId(0);
1550 if (tokenId == CONTINUE_TOKEN)
1551 {
1552 token.id = CONTINUE_TOKEN;
1553 return -1;
1554 }
1555 else
1556 {
1557 if (tokenId != INVALID_TOKEN)
1558 {
1559 token.id = tokenId;
1560 }
1561 else
1562 {
1563 token.match = prevMatch;
1564 }
1565 }
1566 switch (i)
1567 {
1568 case 0: case 1: case 5: case 6:
1569 {
1570 return 1;
1571 }
1572 default:
1573 {
1574 return -1;
1575 }
1576 }
1577 return -1;
1578 }
1579 }
1580 return -1;
1581 }
1582 private int GetTokenId(int statementIndex)
1583 {
1584 switch (statementIndex)
1585 {
1586 case 0:
1587 {
1588 Retract();
1589 break;
1590 }
1591 case 1:
1592 {
1593 Retract();
1594 return CLSID;
1595 break;
1596 }
1597 case 2:
1598 {
1599 Retract();
1600 int kw = GetKeywordToken(token.match);
1601 if (kw == INVALID_TOKEN) return ID;
1602 else return kw;
1603 break;
1604 }
1605 case 3:
1606 {
1607 Retract();
1608 return TYPEID;
1609 break;
1610 }
1611 case 4:
1612 {
1613 Retract();
1614 return STRING;
1615 break;
1616 }
1617 case 5:
1618 {
1619 Retract();
1620 return NUMBER;
1621 break;
1622 }
1623 case 6:
1624 {
1625 Retract();
1626 return HEXNUM;
1627 break;
1628 }
1629 case 7:
1630 {
1631 Retract();
1632 return LPAREN;
1633 break;
1634 }
1635 case 8:
1636 {
1637 Retract();
1638 return RPAREN;
1639 break;
1640 }
1641 case 9:
1642 {
1643 Retract();
1644 return COMMA;
1645 break;
1646 }
1647 case 10:
1648 {
1649 Retract();
1650 return LBRACE;
1651 break;
1652 }
1653 case 11:
1654 {
1655 Retract();
1656 return RBRACE;
1657 break;
1658 }
1659 case 12:
1660 {
1661 Retract();
1662 return AST;
1663 break;
1664 }
1665 case 13:
1666 {
1667 Retract();
1668 return COLON;
1669 break;
1670 }
1671 case 14:
1672 {
1673 Retract();
1674 return SEMICOLON;
1675 break;
1676 }
1677 case 15:
1678 {
1679 Retract();
1680 return LBRACKET;
1681 break;
1682 }
1683 case 16:
1684 {
1685 Retract();
1686 return RBRACKET;
1687 break;
1688 }
1689 case 17:
1690 {
1691 Retract();
1692 return ASSIGN;
1693 break;
1694 }
1695 case 18:
1696 {
1697 Retract();
1698 return AT;
1699 break;
1700 }
1701 case 19:
1702 {
1703 Retract();
1704 return DOLLAR;
1705 break;
1706 }
1707 case 20:
1708 {
1709 Retract();
1710 return EXCLAMATION;
1711 break;
1712 }
1713 }
1714 return CONTINUE_TOKEN;
1715 }
1716 }