e48b7deb53c56efbb14f5170c0c0387868400592
[nit.git] / src / parser / lexer.nit
1 # Lexer and its tokens.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 package lexer
4
5 intrude import parser_nodes
6
7 redef class Token
8 readable writable var _text: String
9
10 fun parser_index: Int is abstract
11
12 redef fun to_s: String do
13 return "'{_text}'"
14 end
15 end
16
17 redef class TEol
18 redef fun parser_index: Int
19 do
20 return 0
21 end
22
23 init init_tk(text: String, loc: Location)
24 do
25 _text = text
26 _location = loc
27 end
28 end
29
30 redef class TComment
31 redef fun parser_index: Int
32 do
33 return 1
34 end
35
36 init init_tk(text: String, loc: Location)
37 do
38 _text = text
39 _location = loc
40 end
41 end
42
43 redef class TKwpackage
44 redef fun parser_index: Int
45 do
46 return 2
47 end
48
49 init init_tk(loc: Location)
50 do
51 _text = once "package"
52 _location = loc
53 end
54 end
55
56 redef class TKwimport
57 redef fun parser_index: Int
58 do
59 return 3
60 end
61
62 init init_tk(loc: Location)
63 do
64 _text = once "import"
65 _location = loc
66 end
67 end
68
69 redef class TKwclass
70 redef fun parser_index: Int
71 do
72 return 4
73 end
74
75 init init_tk(loc: Location)
76 do
77 _text = once "class"
78 _location = loc
79 end
80 end
81
82 redef class TKwabstract
83 redef fun parser_index: Int
84 do
85 return 5
86 end
87
88 init init_tk(loc: Location)
89 do
90 _text = once "abstract"
91 _location = loc
92 end
93 end
94
95 redef class TKwinterface
96 redef fun parser_index: Int
97 do
98 return 6
99 end
100
101 init init_tk(loc: Location)
102 do
103 _text = once "interface"
104 _location = loc
105 end
106 end
107
108 redef class TKwuniversal
109 redef fun parser_index: Int
110 do
111 return 7
112 end
113
114 init init_tk(loc: Location)
115 do
116 _text = once "universal"
117 _location = loc
118 end
119 end
120
121 redef class TKwspecial
122 redef fun parser_index: Int
123 do
124 return 8
125 end
126
127 init init_tk(loc: Location)
128 do
129 _text = once "special"
130 _location = loc
131 end
132 end
133
134 redef class TKwend
135 redef fun parser_index: Int
136 do
137 return 9
138 end
139
140 init init_tk(loc: Location)
141 do
142 _text = once "end"
143 _location = loc
144 end
145 end
146
147 redef class TKwmeth
148 redef fun parser_index: Int
149 do
150 return 10
151 end
152
153 init init_tk(text: String, loc: Location)
154 do
155 _text = text
156 _location = loc
157 end
158 end
159
160 redef class TKwtype
161 redef fun parser_index: Int
162 do
163 return 11
164 end
165
166 init init_tk(loc: Location)
167 do
168 _text = once "type"
169 _location = loc
170 end
171 end
172
173 redef class TKwattr
174 redef fun parser_index: Int
175 do
176 return 12
177 end
178
179 init init_tk(loc: Location)
180 do
181 _text = once "attr"
182 _location = loc
183 end
184 end
185
186 redef class TKwinit
187 redef fun parser_index: Int
188 do
189 return 13
190 end
191
192 init init_tk(loc: Location)
193 do
194 _text = once "init"
195 _location = loc
196 end
197 end
198
199 redef class TKwredef
200 redef fun parser_index: Int
201 do
202 return 14
203 end
204
205 init init_tk(loc: Location)
206 do
207 _text = once "redef"
208 _location = loc
209 end
210 end
211
212 redef class TKwis
213 redef fun parser_index: Int
214 do
215 return 15
216 end
217
218 init init_tk(loc: Location)
219 do
220 _text = once "is"
221 _location = loc
222 end
223 end
224
225 redef class TKwdo
226 redef fun parser_index: Int
227 do
228 return 16
229 end
230
231 init init_tk(loc: Location)
232 do
233 _text = once "do"
234 _location = loc
235 end
236 end
237
238 redef class TKwreadable
239 redef fun parser_index: Int
240 do
241 return 17
242 end
243
244 init init_tk(loc: Location)
245 do
246 _text = once "readable"
247 _location = loc
248 end
249 end
250
251 redef class TKwwritable
252 redef fun parser_index: Int
253 do
254 return 18
255 end
256
257 init init_tk(loc: Location)
258 do
259 _text = once "writable"
260 _location = loc
261 end
262 end
263
264 redef class TKwvar
265 redef fun parser_index: Int
266 do
267 return 19
268 end
269
270 init init_tk(loc: Location)
271 do
272 _text = once "var"
273 _location = loc
274 end
275 end
276
277 redef class TKwintern
278 redef fun parser_index: Int
279 do
280 return 20
281 end
282
283 init init_tk(loc: Location)
284 do
285 _text = once "intern"
286 _location = loc
287 end
288 end
289
290 redef class TKwextern
291 redef fun parser_index: Int
292 do
293 return 21
294 end
295
296 init init_tk(loc: Location)
297 do
298 _text = once "extern"
299 _location = loc
300 end
301 end
302
303 redef class TKwprotected
304 redef fun parser_index: Int
305 do
306 return 22
307 end
308
309 init init_tk(loc: Location)
310 do
311 _text = once "protected"
312 _location = loc
313 end
314 end
315
316 redef class TKwprivate
317 redef fun parser_index: Int
318 do
319 return 23
320 end
321
322 init init_tk(loc: Location)
323 do
324 _text = once "private"
325 _location = loc
326 end
327 end
328
329 redef class TKwintrude
330 redef fun parser_index: Int
331 do
332 return 24
333 end
334
335 init init_tk(loc: Location)
336 do
337 _text = once "intrude"
338 _location = loc
339 end
340 end
341
342 redef class TKwif
343 redef fun parser_index: Int
344 do
345 return 25
346 end
347
348 init init_tk(loc: Location)
349 do
350 _text = once "if"
351 _location = loc
352 end
353 end
354
355 redef class TKwthen
356 redef fun parser_index: Int
357 do
358 return 26
359 end
360
361 init init_tk(loc: Location)
362 do
363 _text = once "then"
364 _location = loc
365 end
366 end
367
368 redef class TKwelse
369 redef fun parser_index: Int
370 do
371 return 27
372 end
373
374 init init_tk(loc: Location)
375 do
376 _text = once "else"
377 _location = loc
378 end
379 end
380
381 redef class TKwwhile
382 redef fun parser_index: Int
383 do
384 return 28
385 end
386
387 init init_tk(loc: Location)
388 do
389 _text = once "while"
390 _location = loc
391 end
392 end
393
394 redef class TKwfor
395 redef fun parser_index: Int
396 do
397 return 29
398 end
399
400 init init_tk(loc: Location)
401 do
402 _text = once "for"
403 _location = loc
404 end
405 end
406
407 redef class TKwin
408 redef fun parser_index: Int
409 do
410 return 30
411 end
412
413 init init_tk(loc: Location)
414 do
415 _text = once "in"
416 _location = loc
417 end
418 end
419
420 redef class TKwand
421 redef fun parser_index: Int
422 do
423 return 31
424 end
425
426 init init_tk(loc: Location)
427 do
428 _text = once "and"
429 _location = loc
430 end
431 end
432
433 redef class TKwor
434 redef fun parser_index: Int
435 do
436 return 32
437 end
438
439 init init_tk(loc: Location)
440 do
441 _text = once "or"
442 _location = loc
443 end
444 end
445
446 redef class TKwnot
447 redef fun parser_index: Int
448 do
449 return 33
450 end
451
452 init init_tk(loc: Location)
453 do
454 _text = once "not"
455 _location = loc
456 end
457 end
458
459 redef class TKwreturn
460 redef fun parser_index: Int
461 do
462 return 34
463 end
464
465 init init_tk(loc: Location)
466 do
467 _text = once "return"
468 _location = loc
469 end
470 end
471
472 redef class TKwcontinue
473 redef fun parser_index: Int
474 do
475 return 35
476 end
477
478 init init_tk(loc: Location)
479 do
480 _text = once "continue"
481 _location = loc
482 end
483 end
484
485 redef class TKwbreak
486 redef fun parser_index: Int
487 do
488 return 36
489 end
490
491 init init_tk(loc: Location)
492 do
493 _text = once "break"
494 _location = loc
495 end
496 end
497
498 redef class TKwabort
499 redef fun parser_index: Int
500 do
501 return 37
502 end
503
504 init init_tk(loc: Location)
505 do
506 _text = once "abort"
507 _location = loc
508 end
509 end
510
511 redef class TKwassert
512 redef fun parser_index: Int
513 do
514 return 38
515 end
516
517 init init_tk(loc: Location)
518 do
519 _text = once "assert"
520 _location = loc
521 end
522 end
523
524 redef class TKwnew
525 redef fun parser_index: Int
526 do
527 return 39
528 end
529
530 init init_tk(loc: Location)
531 do
532 _text = once "new"
533 _location = loc
534 end
535 end
536
537 redef class TKwisa
538 redef fun parser_index: Int
539 do
540 return 40
541 end
542
543 init init_tk(loc: Location)
544 do
545 _text = once "isa"
546 _location = loc
547 end
548 end
549
550 redef class TKwonce
551 redef fun parser_index: Int
552 do
553 return 41
554 end
555
556 init init_tk(loc: Location)
557 do
558 _text = once "once"
559 _location = loc
560 end
561 end
562
563 redef class TKwsuper
564 redef fun parser_index: Int
565 do
566 return 42
567 end
568
569 init init_tk(loc: Location)
570 do
571 _text = once "super"
572 _location = loc
573 end
574 end
575
576 redef class TKwself
577 redef fun parser_index: Int
578 do
579 return 43
580 end
581
582 init init_tk(loc: Location)
583 do
584 _text = once "self"
585 _location = loc
586 end
587 end
588
589 redef class TKwtrue
590 redef fun parser_index: Int
591 do
592 return 44
593 end
594
595 init init_tk(loc: Location)
596 do
597 _text = once "true"
598 _location = loc
599 end
600 end
601
602 redef class TKwfalse
603 redef fun parser_index: Int
604 do
605 return 45
606 end
607
608 init init_tk(loc: Location)
609 do
610 _text = once "false"
611 _location = loc
612 end
613 end
614
615 redef class TKwnull
616 redef fun parser_index: Int
617 do
618 return 46
619 end
620
621 init init_tk(loc: Location)
622 do
623 _text = once "null"
624 _location = loc
625 end
626 end
627
628 redef class TKwas
629 redef fun parser_index: Int
630 do
631 return 47
632 end
633
634 init init_tk(loc: Location)
635 do
636 _text = once "as"
637 _location = loc
638 end
639 end
640
641 redef class TKwwith
642 redef fun parser_index: Int
643 do
644 return 48
645 end
646
647 init init_tk(loc: Location)
648 do
649 _text = once "with"
650 _location = loc
651 end
652 end
653
654 redef class TKwnullable
655 redef fun parser_index: Int
656 do
657 return 49
658 end
659
660 init init_tk(loc: Location)
661 do
662 _text = once "nullable"
663 _location = loc
664 end
665 end
666
667 redef class TKwisset
668 redef fun parser_index: Int
669 do
670 return 50
671 end
672
673 init init_tk(loc: Location)
674 do
675 _text = once "isset"
676 _location = loc
677 end
678 end
679
680 redef class TOpar
681 redef fun parser_index: Int
682 do
683 return 51
684 end
685
686 init init_tk(loc: Location)
687 do
688 _text = once "("
689 _location = loc
690 end
691 end
692
693 redef class TCpar
694 redef fun parser_index: Int
695 do
696 return 52
697 end
698
699 init init_tk(loc: Location)
700 do
701 _text = once ")"
702 _location = loc
703 end
704 end
705
706 redef class TObra
707 redef fun parser_index: Int
708 do
709 return 53
710 end
711
712 init init_tk(loc: Location)
713 do
714 _text = once "["
715 _location = loc
716 end
717 end
718
719 redef class TCbra
720 redef fun parser_index: Int
721 do
722 return 54
723 end
724
725 init init_tk(loc: Location)
726 do
727 _text = once "]"
728 _location = loc
729 end
730 end
731
732 redef class TComma
733 redef fun parser_index: Int
734 do
735 return 55
736 end
737
738 init init_tk(loc: Location)
739 do
740 _text = once ","
741 _location = loc
742 end
743 end
744
745 redef class TColumn
746 redef fun parser_index: Int
747 do
748 return 56
749 end
750
751 init init_tk(loc: Location)
752 do
753 _text = once ":"
754 _location = loc
755 end
756 end
757
758 redef class TQuad
759 redef fun parser_index: Int
760 do
761 return 57
762 end
763
764 init init_tk(loc: Location)
765 do
766 _text = once "::"
767 _location = loc
768 end
769 end
770
771 redef class TAssign
772 redef fun parser_index: Int
773 do
774 return 58
775 end
776
777 init init_tk(loc: Location)
778 do
779 _text = once "="
780 _location = loc
781 end
782 end
783
784 redef class TPluseq
785 redef fun parser_index: Int
786 do
787 return 59
788 end
789
790 init init_tk(loc: Location)
791 do
792 _text = once "+="
793 _location = loc
794 end
795 end
796
797 redef class TMinuseq
798 redef fun parser_index: Int
799 do
800 return 60
801 end
802
803 init init_tk(loc: Location)
804 do
805 _text = once "-="
806 _location = loc
807 end
808 end
809
810 redef class TDotdotdot
811 redef fun parser_index: Int
812 do
813 return 61
814 end
815
816 init init_tk(loc: Location)
817 do
818 _text = once "..."
819 _location = loc
820 end
821 end
822
823 redef class TDotdot
824 redef fun parser_index: Int
825 do
826 return 62
827 end
828
829 init init_tk(loc: Location)
830 do
831 _text = once ".."
832 _location = loc
833 end
834 end
835
836 redef class TDot
837 redef fun parser_index: Int
838 do
839 return 63
840 end
841
842 init init_tk(loc: Location)
843 do
844 _text = once "."
845 _location = loc
846 end
847 end
848
849 redef class TPlus
850 redef fun parser_index: Int
851 do
852 return 64
853 end
854
855 init init_tk(loc: Location)
856 do
857 _text = once "+"
858 _location = loc
859 end
860 end
861
862 redef class TMinus
863 redef fun parser_index: Int
864 do
865 return 65
866 end
867
868 init init_tk(loc: Location)
869 do
870 _text = once "-"
871 _location = loc
872 end
873 end
874
875 redef class TStar
876 redef fun parser_index: Int
877 do
878 return 66
879 end
880
881 init init_tk(loc: Location)
882 do
883 _text = once "*"
884 _location = loc
885 end
886 end
887
888 redef class TSlash
889 redef fun parser_index: Int
890 do
891 return 67
892 end
893
894 init init_tk(loc: Location)
895 do
896 _text = once "/"
897 _location = loc
898 end
899 end
900
901 redef class TPercent
902 redef fun parser_index: Int
903 do
904 return 68
905 end
906
907 init init_tk(loc: Location)
908 do
909 _text = once "%"
910 _location = loc
911 end
912 end
913
914 redef class TEq
915 redef fun parser_index: Int
916 do
917 return 69
918 end
919
920 init init_tk(loc: Location)
921 do
922 _text = once "=="
923 _location = loc
924 end
925 end
926
927 redef class TNe
928 redef fun parser_index: Int
929 do
930 return 70
931 end
932
933 init init_tk(loc: Location)
934 do
935 _text = once "!="
936 _location = loc
937 end
938 end
939
940 redef class TLt
941 redef fun parser_index: Int
942 do
943 return 71
944 end
945
946 init init_tk(loc: Location)
947 do
948 _text = once "<"
949 _location = loc
950 end
951 end
952
953 redef class TLe
954 redef fun parser_index: Int
955 do
956 return 72
957 end
958
959 init init_tk(loc: Location)
960 do
961 _text = once "<="
962 _location = loc
963 end
964 end
965
966 redef class TGt
967 redef fun parser_index: Int
968 do
969 return 73
970 end
971
972 init init_tk(loc: Location)
973 do
974 _text = once ">"
975 _location = loc
976 end
977 end
978
979 redef class TGe
980 redef fun parser_index: Int
981 do
982 return 74
983 end
984
985 init init_tk(loc: Location)
986 do
987 _text = once ">="
988 _location = loc
989 end
990 end
991
992 redef class TStarship
993 redef fun parser_index: Int
994 do
995 return 75
996 end
997
998 init init_tk(loc: Location)
999 do
1000 _text = once "<=>"
1001 _location = loc
1002 end
1003 end
1004
1005 redef class TClassid
1006 redef fun parser_index: Int
1007 do
1008 return 76
1009 end
1010
1011 init init_tk(text: String, loc: Location)
1012 do
1013 _text = text
1014 _location = loc
1015 end
1016 end
1017
1018 redef class TId
1019 redef fun parser_index: Int
1020 do
1021 return 77
1022 end
1023
1024 init init_tk(text: String, loc: Location)
1025 do
1026 _text = text
1027 _location = loc
1028 end
1029 end
1030
1031 redef class TAttrid
1032 redef fun parser_index: Int
1033 do
1034 return 78
1035 end
1036
1037 init init_tk(text: String, loc: Location)
1038 do
1039 _text = text
1040 _location = loc
1041 end
1042 end
1043
1044 redef class TNumber
1045 redef fun parser_index: Int
1046 do
1047 return 79
1048 end
1049
1050 init init_tk(text: String, loc: Location)
1051 do
1052 _text = text
1053 _location = loc
1054 end
1055 end
1056
1057 redef class TFloat
1058 redef fun parser_index: Int
1059 do
1060 return 80
1061 end
1062
1063 init init_tk(text: String, loc: Location)
1064 do
1065 _text = text
1066 _location = loc
1067 end
1068 end
1069
1070 redef class TChar
1071 redef fun parser_index: Int
1072 do
1073 return 81
1074 end
1075
1076 init init_tk(text: String, loc: Location)
1077 do
1078 _text = text
1079 _location = loc
1080 end
1081 end
1082
1083 redef class TString
1084 redef fun parser_index: Int
1085 do
1086 return 82
1087 end
1088
1089 init init_tk(text: String, loc: Location)
1090 do
1091 _text = text
1092 _location = loc
1093 end
1094 end
1095
1096 redef class TStartString
1097 redef fun parser_index: Int
1098 do
1099 return 83
1100 end
1101
1102 init init_tk(text: String, loc: Location)
1103 do
1104 _text = text
1105 _location = loc
1106 end
1107 end
1108
1109 redef class TMidString
1110 redef fun parser_index: Int
1111 do
1112 return 84
1113 end
1114
1115 init init_tk(text: String, loc: Location)
1116 do
1117 _text = text
1118 _location = loc
1119 end
1120 end
1121
1122 redef class TEndString
1123 redef fun parser_index: Int
1124 do
1125 return 85
1126 end
1127
1128 init init_tk(text: String, loc: Location)
1129 do
1130 _text = text
1131 _location = loc
1132 end
1133 end
1134
1135
1136 redef class EOF
1137 redef fun parser_index: Int
1138 do
1139 return 86
1140 end
1141
1142 init(loc: Location)
1143 do
1144 _text = ""
1145 _location = loc
1146 end
1147 end
1148
1149 redef class AError
1150 readable writable var _message: String
1151
1152 init init_error(message: String, loc: Location)
1153 do
1154 init(loc)
1155 _message = message
1156 end
1157 end
1158
1159
1160 # The lexer extract NIT tokens from an input stream.
1161 # It is better user with the Parser
1162 class Lexer
1163 # Last peeked token
1164 var _token: nullable Token
1165
1166 # Lexer current state
1167 var _state: Int = 0
1168
1169 # Name of the stream (as given to tokens)
1170 readable var _filename: String
1171
1172 # Input stream where character are read
1173 var _stream: IStream
1174
1175 # Pushback buffer to store unread character
1176 var _stream_buf: Buffer
1177
1178 # Number of character stored in the pushback buffer
1179 var _stream_pos: Int
1180
1181 # Current line number in the input stream
1182 var _line: Int = 0
1183
1184 # Current column in the input stream
1185 var _pos: Int = 0
1186
1187 # Was the last character a cariage-return?
1188 var _cr: Bool = false
1189
1190 # If the end of stream?
1191 var _eof: Bool = false
1192
1193 # Current working text read from the input stream
1194 var _text: Buffer
1195
1196 # Constante state values
1197 private fun state_initial: Int do return 0 end
1198
1199 # Create a new lexer for a stream (and a name)
1200 init(stream: IStream, fname: String)
1201 do
1202 _filename = fname
1203 _text = new Buffer
1204 _stream = stream
1205 _stream_pos = -1
1206 _stream_buf = new Buffer
1207 build_goto_table
1208 build_accept_table
1209 end
1210
1211 # Give the next token (but do not consume it)
1212 fun peek: Token
1213 do
1214 while _token == null do
1215 _token = get_token
1216 end
1217 return _token.as(not null)
1218 end
1219
1220 # Give and consume the next token
1221 fun next: Token
1222 do
1223 var result = _token
1224 while result == null do
1225 result = get_token
1226 end
1227 _token = null
1228 return result.as(not null)
1229 end
1230
1231 # Get a token, or null if it is discarded
1232 private fun get_token: nullable Token
1233 do
1234 var dfa_state = 0
1235
1236 var start_pos = _pos
1237 var start_line = _line
1238
1239 var accept_state = -1
1240 var accept_token = -1
1241 var accept_length = -1
1242 var accept_pos = -1
1243 var accept_line = -1
1244
1245 var goto_table = _goto_table[_state]
1246 var accept = _accept_table[_state]
1247 var text = _text
1248 text.clear
1249
1250 while true do
1251 var c = get_char
1252
1253 if c != -1 then
1254 var cr = _cr
1255 var line = _line
1256 var pos = _pos
1257 if c == 10 then
1258 if cr then
1259 cr = false
1260 else
1261 line = line + 1
1262 pos = 0
1263 end
1264 else if c == 13 then
1265 line = line + 1
1266 pos = 0
1267 cr = true
1268 else
1269 pos = pos + 1
1270 cr = false
1271 end
1272
1273 text.add(c.ascii)
1274
1275 var first_loop = true # aka until
1276 while dfa_state < -1 or first_loop do
1277 var old_state = dfa_state
1278 if dfa_state < -1 then
1279 old_state = -2 - dfa_state
1280 end
1281
1282 dfa_state = -1
1283
1284 var tmp0 = goto_table[old_state]
1285 var low = 0
1286 var high = tmp0.length - 1
1287
1288 if high >= 0 then
1289 var tmp1 = tmp0.intern_items
1290 while low <= high do
1291 var middle = (low + high) / 2
1292 var tmp2 = tmp1[middle].intern_items
1293
1294 if c < tmp2[0] then
1295 high = middle - 1
1296 else if c > tmp2[1] then
1297 low = middle + 1
1298 else
1299 dfa_state = tmp2[2]
1300 low = high + 1 # aka break
1301 end
1302 end
1303 end
1304 first_loop = false # aka until
1305 end
1306
1307 _cr = cr
1308 _line = line
1309 _pos = pos
1310 else
1311 dfa_state = -1
1312 end
1313
1314 if dfa_state >= 0 then
1315 if accept[dfa_state] != -1 then
1316 accept_state = dfa_state
1317 accept_token = accept[dfa_state]
1318 accept_length = text.length
1319 accept_pos = _pos
1320 accept_line = _line
1321 end
1322 else
1323 if accept_state != -1 then
1324 if accept_token == 0 then
1325 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1326 push_back(accept_length)
1327 _pos = accept_pos
1328 _line = accept_line
1329 return null
1330 end
1331 if accept_token == 1 then
1332 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1333 var token_text = text.substring(0, accept_length)
1334 var token = new TEol.init_tk(token_text, location)
1335 push_back(accept_length)
1336 _pos = accept_pos
1337 _line = accept_line
1338 return token
1339 end
1340 if accept_token == 2 then
1341 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1342 var token_text = text.substring(0, accept_length)
1343 var token = new TComment.init_tk(token_text, location)
1344 push_back(accept_length)
1345 _pos = accept_pos
1346 _line = accept_line
1347 return token
1348 end
1349 if accept_token == 3 then
1350 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1351 var token = new TKwpackage.init_tk(location)
1352 push_back(accept_length)
1353 _pos = accept_pos
1354 _line = accept_line
1355 return token
1356 end
1357 if accept_token == 4 then
1358 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1359 var token = new TKwimport.init_tk(location)
1360 push_back(accept_length)
1361 _pos = accept_pos
1362 _line = accept_line
1363 return token
1364 end
1365 if accept_token == 5 then
1366 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1367 var token = new TKwclass.init_tk(location)
1368 push_back(accept_length)
1369 _pos = accept_pos
1370 _line = accept_line
1371 return token
1372 end
1373 if accept_token == 6 then
1374 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1375 var token = new TKwabstract.init_tk(location)
1376 push_back(accept_length)
1377 _pos = accept_pos
1378 _line = accept_line
1379 return token
1380 end
1381 if accept_token == 7 then
1382 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1383 var token = new TKwinterface.init_tk(location)
1384 push_back(accept_length)
1385 _pos = accept_pos
1386 _line = accept_line
1387 return token
1388 end
1389 if accept_token == 8 then
1390 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1391 var token = new TKwuniversal.init_tk(location)
1392 push_back(accept_length)
1393 _pos = accept_pos
1394 _line = accept_line
1395 return token
1396 end
1397 if accept_token == 9 then
1398 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1399 var token = new TKwspecial.init_tk(location)
1400 push_back(accept_length)
1401 _pos = accept_pos
1402 _line = accept_line
1403 return token
1404 end
1405 if accept_token == 10 then
1406 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1407 var token = new TKwend.init_tk(location)
1408 push_back(accept_length)
1409 _pos = accept_pos
1410 _line = accept_line
1411 return token
1412 end
1413 if accept_token == 11 then
1414 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1415 var token_text = text.substring(0, accept_length)
1416 var token = new TKwmeth.init_tk(token_text, location)
1417 push_back(accept_length)
1418 _pos = accept_pos
1419 _line = accept_line
1420 return token
1421 end
1422 if accept_token == 12 then
1423 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1424 var token = new TKwtype.init_tk(location)
1425 push_back(accept_length)
1426 _pos = accept_pos
1427 _line = accept_line
1428 return token
1429 end
1430 if accept_token == 13 then
1431 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1432 var token = new TKwattr.init_tk(location)
1433 push_back(accept_length)
1434 _pos = accept_pos
1435 _line = accept_line
1436 return token
1437 end
1438 if accept_token == 14 then
1439 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1440 var token = new TKwinit.init_tk(location)
1441 push_back(accept_length)
1442 _pos = accept_pos
1443 _line = accept_line
1444 return token
1445 end
1446 if accept_token == 15 then
1447 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1448 var token = new TKwredef.init_tk(location)
1449 push_back(accept_length)
1450 _pos = accept_pos
1451 _line = accept_line
1452 return token
1453 end
1454 if accept_token == 16 then
1455 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1456 var token = new TKwis.init_tk(location)
1457 push_back(accept_length)
1458 _pos = accept_pos
1459 _line = accept_line
1460 return token
1461 end
1462 if accept_token == 17 then
1463 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1464 var token = new TKwdo.init_tk(location)
1465 push_back(accept_length)
1466 _pos = accept_pos
1467 _line = accept_line
1468 return token
1469 end
1470 if accept_token == 18 then
1471 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1472 var token = new TKwreadable.init_tk(location)
1473 push_back(accept_length)
1474 _pos = accept_pos
1475 _line = accept_line
1476 return token
1477 end
1478 if accept_token == 19 then
1479 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1480 var token = new TKwwritable.init_tk(location)
1481 push_back(accept_length)
1482 _pos = accept_pos
1483 _line = accept_line
1484 return token
1485 end
1486 if accept_token == 20 then
1487 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1488 var token = new TKwvar.init_tk(location)
1489 push_back(accept_length)
1490 _pos = accept_pos
1491 _line = accept_line
1492 return token
1493 end
1494 if accept_token == 21 then
1495 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1496 var token = new TKwintern.init_tk(location)
1497 push_back(accept_length)
1498 _pos = accept_pos
1499 _line = accept_line
1500 return token
1501 end
1502 if accept_token == 22 then
1503 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1504 var token = new TKwextern.init_tk(location)
1505 push_back(accept_length)
1506 _pos = accept_pos
1507 _line = accept_line
1508 return token
1509 end
1510 if accept_token == 23 then
1511 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1512 var token = new TKwprotected.init_tk(location)
1513 push_back(accept_length)
1514 _pos = accept_pos
1515 _line = accept_line
1516 return token
1517 end
1518 if accept_token == 24 then
1519 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1520 var token = new TKwprivate.init_tk(location)
1521 push_back(accept_length)
1522 _pos = accept_pos
1523 _line = accept_line
1524 return token
1525 end
1526 if accept_token == 25 then
1527 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1528 var token = new TKwintrude.init_tk(location)
1529 push_back(accept_length)
1530 _pos = accept_pos
1531 _line = accept_line
1532 return token
1533 end
1534 if accept_token == 26 then
1535 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1536 var token = new TKwif.init_tk(location)
1537 push_back(accept_length)
1538 _pos = accept_pos
1539 _line = accept_line
1540 return token
1541 end
1542 if accept_token == 27 then
1543 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1544 var token = new TKwthen.init_tk(location)
1545 push_back(accept_length)
1546 _pos = accept_pos
1547 _line = accept_line
1548 return token
1549 end
1550 if accept_token == 28 then
1551 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1552 var token = new TKwelse.init_tk(location)
1553 push_back(accept_length)
1554 _pos = accept_pos
1555 _line = accept_line
1556 return token
1557 end
1558 if accept_token == 29 then
1559 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1560 var token = new TKwwhile.init_tk(location)
1561 push_back(accept_length)
1562 _pos = accept_pos
1563 _line = accept_line
1564 return token
1565 end
1566 if accept_token == 30 then
1567 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1568 var token = new TKwfor.init_tk(location)
1569 push_back(accept_length)
1570 _pos = accept_pos
1571 _line = accept_line
1572 return token
1573 end
1574 if accept_token == 31 then
1575 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1576 var token = new TKwin.init_tk(location)
1577 push_back(accept_length)
1578 _pos = accept_pos
1579 _line = accept_line
1580 return token
1581 end
1582 if accept_token == 32 then
1583 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1584 var token = new TKwand.init_tk(location)
1585 push_back(accept_length)
1586 _pos = accept_pos
1587 _line = accept_line
1588 return token
1589 end
1590 if accept_token == 33 then
1591 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1592 var token = new TKwor.init_tk(location)
1593 push_back(accept_length)
1594 _pos = accept_pos
1595 _line = accept_line
1596 return token
1597 end
1598 if accept_token == 34 then
1599 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1600 var token = new TKwnot.init_tk(location)
1601 push_back(accept_length)
1602 _pos = accept_pos
1603 _line = accept_line
1604 return token
1605 end
1606 if accept_token == 35 then
1607 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1608 var token = new TKwreturn.init_tk(location)
1609 push_back(accept_length)
1610 _pos = accept_pos
1611 _line = accept_line
1612 return token
1613 end
1614 if accept_token == 36 then
1615 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1616 var token = new TKwcontinue.init_tk(location)
1617 push_back(accept_length)
1618 _pos = accept_pos
1619 _line = accept_line
1620 return token
1621 end
1622 if accept_token == 37 then
1623 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1624 var token = new TKwbreak.init_tk(location)
1625 push_back(accept_length)
1626 _pos = accept_pos
1627 _line = accept_line
1628 return token
1629 end
1630 if accept_token == 38 then
1631 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1632 var token = new TKwabort.init_tk(location)
1633 push_back(accept_length)
1634 _pos = accept_pos
1635 _line = accept_line
1636 return token
1637 end
1638 if accept_token == 39 then
1639 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1640 var token = new TKwassert.init_tk(location)
1641 push_back(accept_length)
1642 _pos = accept_pos
1643 _line = accept_line
1644 return token
1645 end
1646 if accept_token == 40 then
1647 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1648 var token = new TKwnew.init_tk(location)
1649 push_back(accept_length)
1650 _pos = accept_pos
1651 _line = accept_line
1652 return token
1653 end
1654 if accept_token == 41 then
1655 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1656 var token = new TKwisa.init_tk(location)
1657 push_back(accept_length)
1658 _pos = accept_pos
1659 _line = accept_line
1660 return token
1661 end
1662 if accept_token == 42 then
1663 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1664 var token = new TKwonce.init_tk(location)
1665 push_back(accept_length)
1666 _pos = accept_pos
1667 _line = accept_line
1668 return token
1669 end
1670 if accept_token == 43 then
1671 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1672 var token = new TKwsuper.init_tk(location)
1673 push_back(accept_length)
1674 _pos = accept_pos
1675 _line = accept_line
1676 return token
1677 end
1678 if accept_token == 44 then
1679 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1680 var token = new TKwself.init_tk(location)
1681 push_back(accept_length)
1682 _pos = accept_pos
1683 _line = accept_line
1684 return token
1685 end
1686 if accept_token == 45 then
1687 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1688 var token = new TKwtrue.init_tk(location)
1689 push_back(accept_length)
1690 _pos = accept_pos
1691 _line = accept_line
1692 return token
1693 end
1694 if accept_token == 46 then
1695 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1696 var token = new TKwfalse.init_tk(location)
1697 push_back(accept_length)
1698 _pos = accept_pos
1699 _line = accept_line
1700 return token
1701 end
1702 if accept_token == 47 then
1703 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1704 var token = new TKwnull.init_tk(location)
1705 push_back(accept_length)
1706 _pos = accept_pos
1707 _line = accept_line
1708 return token
1709 end
1710 if accept_token == 48 then
1711 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1712 var token = new TKwas.init_tk(location)
1713 push_back(accept_length)
1714 _pos = accept_pos
1715 _line = accept_line
1716 return token
1717 end
1718 if accept_token == 49 then
1719 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1720 var token = new TKwwith.init_tk(location)
1721 push_back(accept_length)
1722 _pos = accept_pos
1723 _line = accept_line
1724 return token
1725 end
1726 if accept_token == 50 then
1727 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1728 var token = new TKwnullable.init_tk(location)
1729 push_back(accept_length)
1730 _pos = accept_pos
1731 _line = accept_line
1732 return token
1733 end
1734 if accept_token == 51 then
1735 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1736 var token = new TKwisset.init_tk(location)
1737 push_back(accept_length)
1738 _pos = accept_pos
1739 _line = accept_line
1740 return token
1741 end
1742 if accept_token == 52 then
1743 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1744 var token = new TOpar.init_tk(location)
1745 push_back(accept_length)
1746 _pos = accept_pos
1747 _line = accept_line
1748 return token
1749 end
1750 if accept_token == 53 then
1751 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1752 var token = new TCpar.init_tk(location)
1753 push_back(accept_length)
1754 _pos = accept_pos
1755 _line = accept_line
1756 return token
1757 end
1758 if accept_token == 54 then
1759 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1760 var token = new TObra.init_tk(location)
1761 push_back(accept_length)
1762 _pos = accept_pos
1763 _line = accept_line
1764 return token
1765 end
1766 if accept_token == 55 then
1767 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1768 var token = new TCbra.init_tk(location)
1769 push_back(accept_length)
1770 _pos = accept_pos
1771 _line = accept_line
1772 return token
1773 end
1774 if accept_token == 56 then
1775 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1776 var token = new TComma.init_tk(location)
1777 push_back(accept_length)
1778 _pos = accept_pos
1779 _line = accept_line
1780 return token
1781 end
1782 if accept_token == 57 then
1783 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1784 var token = new TColumn.init_tk(location)
1785 push_back(accept_length)
1786 _pos = accept_pos
1787 _line = accept_line
1788 return token
1789 end
1790 if accept_token == 58 then
1791 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1792 var token = new TQuad.init_tk(location)
1793 push_back(accept_length)
1794 _pos = accept_pos
1795 _line = accept_line
1796 return token
1797 end
1798 if accept_token == 59 then
1799 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1800 var token = new TAssign.init_tk(location)
1801 push_back(accept_length)
1802 _pos = accept_pos
1803 _line = accept_line
1804 return token
1805 end
1806 if accept_token == 60 then
1807 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1808 var token = new TPluseq.init_tk(location)
1809 push_back(accept_length)
1810 _pos = accept_pos
1811 _line = accept_line
1812 return token
1813 end
1814 if accept_token == 61 then
1815 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1816 var token = new TMinuseq.init_tk(location)
1817 push_back(accept_length)
1818 _pos = accept_pos
1819 _line = accept_line
1820 return token
1821 end
1822 if accept_token == 62 then
1823 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1824 var token = new TDotdotdot.init_tk(location)
1825 push_back(accept_length)
1826 _pos = accept_pos
1827 _line = accept_line
1828 return token
1829 end
1830 if accept_token == 63 then
1831 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1832 var token = new TDotdot.init_tk(location)
1833 push_back(accept_length)
1834 _pos = accept_pos
1835 _line = accept_line
1836 return token
1837 end
1838 if accept_token == 64 then
1839 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1840 var token = new TDot.init_tk(location)
1841 push_back(accept_length)
1842 _pos = accept_pos
1843 _line = accept_line
1844 return token
1845 end
1846 if accept_token == 65 then
1847 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1848 var token = new TPlus.init_tk(location)
1849 push_back(accept_length)
1850 _pos = accept_pos
1851 _line = accept_line
1852 return token
1853 end
1854 if accept_token == 66 then
1855 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1856 var token = new TMinus.init_tk(location)
1857 push_back(accept_length)
1858 _pos = accept_pos
1859 _line = accept_line
1860 return token
1861 end
1862 if accept_token == 67 then
1863 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1864 var token = new TStar.init_tk(location)
1865 push_back(accept_length)
1866 _pos = accept_pos
1867 _line = accept_line
1868 return token
1869 end
1870 if accept_token == 68 then
1871 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1872 var token = new TSlash.init_tk(location)
1873 push_back(accept_length)
1874 _pos = accept_pos
1875 _line = accept_line
1876 return token
1877 end
1878 if accept_token == 69 then
1879 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1880 var token = new TPercent.init_tk(location)
1881 push_back(accept_length)
1882 _pos = accept_pos
1883 _line = accept_line
1884 return token
1885 end
1886 if accept_token == 70 then
1887 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1888 var token = new TEq.init_tk(location)
1889 push_back(accept_length)
1890 _pos = accept_pos
1891 _line = accept_line
1892 return token
1893 end
1894 if accept_token == 71 then
1895 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1896 var token = new TNe.init_tk(location)
1897 push_back(accept_length)
1898 _pos = accept_pos
1899 _line = accept_line
1900 return token
1901 end
1902 if accept_token == 72 then
1903 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1904 var token = new TLt.init_tk(location)
1905 push_back(accept_length)
1906 _pos = accept_pos
1907 _line = accept_line
1908 return token
1909 end
1910 if accept_token == 73 then
1911 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1912 var token = new TLe.init_tk(location)
1913 push_back(accept_length)
1914 _pos = accept_pos
1915 _line = accept_line
1916 return token
1917 end
1918 if accept_token == 74 then
1919 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1920 var token = new TGt.init_tk(location)
1921 push_back(accept_length)
1922 _pos = accept_pos
1923 _line = accept_line
1924 return token
1925 end
1926 if accept_token == 75 then
1927 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1928 var token = new TGe.init_tk(location)
1929 push_back(accept_length)
1930 _pos = accept_pos
1931 _line = accept_line
1932 return token
1933 end
1934 if accept_token == 76 then
1935 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1936 var token = new TStarship.init_tk(location)
1937 push_back(accept_length)
1938 _pos = accept_pos
1939 _line = accept_line
1940 return token
1941 end
1942 if accept_token == 77 then
1943 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1944 var token_text = text.substring(0, accept_length)
1945 var token = new TClassid.init_tk(token_text, location)
1946 push_back(accept_length)
1947 _pos = accept_pos
1948 _line = accept_line
1949 return token
1950 end
1951 if accept_token == 78 then
1952 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1953 var token_text = text.substring(0, accept_length)
1954 var token = new TId.init_tk(token_text, location)
1955 push_back(accept_length)
1956 _pos = accept_pos
1957 _line = accept_line
1958 return token
1959 end
1960 if accept_token == 79 then
1961 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1962 var token_text = text.substring(0, accept_length)
1963 var token = new TAttrid.init_tk(token_text, location)
1964 push_back(accept_length)
1965 _pos = accept_pos
1966 _line = accept_line
1967 return token
1968 end
1969 if accept_token == 80 then
1970 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1971 var token_text = text.substring(0, accept_length)
1972 var token = new TNumber.init_tk(token_text, location)
1973 push_back(accept_length)
1974 _pos = accept_pos
1975 _line = accept_line
1976 return token
1977 end
1978 if accept_token == 81 then
1979 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1980 var token_text = text.substring(0, accept_length)
1981 var token = new TFloat.init_tk(token_text, location)
1982 push_back(accept_length)
1983 _pos = accept_pos
1984 _line = accept_line
1985 return token
1986 end
1987 if accept_token == 82 then
1988 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1989 var token_text = text.substring(0, accept_length)
1990 var token = new TChar.init_tk(token_text, location)
1991 push_back(accept_length)
1992 _pos = accept_pos
1993 _line = accept_line
1994 return token
1995 end
1996 if accept_token == 83 then
1997 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1998 var token_text = text.substring(0, accept_length)
1999 var token = new TString.init_tk(token_text, location)
2000 push_back(accept_length)
2001 _pos = accept_pos
2002 _line = accept_line
2003 return token
2004 end
2005 if accept_token == 84 then
2006 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2007 var token_text = text.substring(0, accept_length)
2008 var token = new TStartString.init_tk(token_text, location)
2009 push_back(accept_length)
2010 _pos = accept_pos
2011 _line = accept_line
2012 return token
2013 end
2014 if accept_token == 85 then
2015 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2016 var token_text = text.substring(0, accept_length)
2017 var token = new TMidString.init_tk(token_text, location)
2018 push_back(accept_length)
2019 _pos = accept_pos
2020 _line = accept_line
2021 return token
2022 end
2023 if accept_token == 86 then
2024 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2025 var token_text = text.substring(0, accept_length)
2026 var token = new TEndString.init_tk(token_text, location)
2027 push_back(accept_length)
2028 _pos = accept_pos
2029 _line = accept_line
2030 return token
2031 end
2032 else
2033 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2034 if text.length > 0 then
2035 var token = new AError.init_error("Unknown token: {text}", location)
2036 return token
2037 else
2038 var token = new EOF(location)
2039 return token
2040 end
2041 end
2042 end
2043 end
2044 return null
2045 end
2046
2047 # Read the next character.
2048 # The character is read from the stream of from the pushback buffer.
2049 private fun get_char: Int
2050 do
2051 if _eof then
2052 return -1
2053 end
2054
2055 var result: Int
2056
2057 var sp = _stream_pos
2058 if sp >= 0 then
2059 var res = _stream_buf[_stream_pos]
2060 _stream_pos = sp - 1
2061 result = res.ascii
2062 else
2063 result = _stream.read_char
2064 end
2065
2066 if result == -1 then
2067 _eof = true
2068 end
2069
2070 return result
2071 end
2072
2073 # Unread some characters.
2074 # Unread characters are stored in the pushback buffer.
2075 private fun push_back(accept_length: Int)
2076 do
2077 var length = _text.length
2078 var i = length - 1
2079 while i >= accept_length do
2080 _eof = false
2081 _stream_pos = _stream_pos + 1
2082 _stream_buf[_stream_pos] = _text[i]
2083 i = i - 1
2084 end
2085 end
2086
2087 var _goto_table: Array[Array[Array[Array[Int]]]]
2088 private fun build_goto_table
2089 do
2090 _goto_table = once [
2091 [
2092 [
2093 [9, 9, 1] ,
2094 [10, 10, 2] ,
2095 [13, 13, 3] ,
2096 [32, 32, 4] ,
2097 [33, 33, 5] ,
2098 [34, 34, 6] ,
2099 [35, 35, 7] ,
2100 [37, 37, 8] ,
2101 [39, 39, 9] ,
2102 [40, 40, 10] ,
2103 [41, 41, 11] ,
2104 [42, 42, 12] ,
2105 [43, 43, 13] ,
2106 [44, 44, 14] ,
2107 [45, 45, 15] ,
2108 [46, 46, 16] ,
2109 [47, 47, 17] ,
2110 [48, 57, 18] ,
2111 [58, 58, 19] ,
2112 [60, 60, 20] ,
2113 [61, 61, 21] ,
2114 [62, 62, 22] ,
2115 [65, 90, 23] ,
2116 [91, 91, 24] ,
2117 [93, 93, 25] ,
2118 [95, 95, 26] ,
2119 [97, 97, 27] ,
2120 [98, 98, 28] ,
2121 [99, 99, 29] ,
2122 [100, 100, 30] ,
2123 [101, 101, 31] ,
2124 [102, 102, 32] ,
2125 [103, 104, 33] ,
2126 [105, 105, 34] ,
2127 [106, 108, 33] ,
2128 [109, 109, 35] ,
2129 [110, 110, 36] ,
2130 [111, 111, 37] ,
2131 [112, 112, 38] ,
2132 [113, 113, 33] ,
2133 [114, 114, 39] ,
2134 [115, 115, 40] ,
2135 [116, 116, 41] ,
2136 [117, 117, 42] ,
2137 [118, 118, 43] ,
2138 [119, 119, 44] ,
2139 [120, 122, 33] ,
2140 [125, 125, 45]
2141 ] ,
2142 [
2143 [9, 9, 1] ,
2144 [32, 32, 4]
2145 ] ,
2146 nil_array ,
2147 [
2148 [10, 10, 46]
2149 ] ,
2150 [
2151 [9, 32, -3]
2152 ] ,
2153 [
2154 [61, 61, 47]
2155 ] ,
2156 [
2157 [0, 9, 48] ,
2158 [11, 12, 48] ,
2159 [14, 33, 48] ,
2160 [34, 34, 49] ,
2161 [35, 91, 48] ,
2162 [92, 92, 50] ,
2163 [93, 122, 48] ,
2164 [123, 123, 51] ,
2165 [124, 255, 48]
2166 ] ,
2167 [
2168 [0, 9, 52] ,
2169 [10, 10, 53] ,
2170 [11, 12, 52] ,
2171 [13, 13, 54] ,
2172 [14, 255, 52]
2173 ] ,
2174 nil_array ,
2175 [
2176 [0, 9, 55] ,
2177 [11, 12, 55] ,
2178 [14, 38, 55] ,
2179 [39, 39, 56] ,
2180 [40, 255, 55]
2181 ] ,
2182 nil_array ,
2183 nil_array ,
2184 nil_array ,
2185 [
2186 [61, 61, 57]
2187 ] ,
2188 nil_array ,
2189 [
2190 [61, 61, 58]
2191 ] ,
2192 [
2193 [46, 46, 59] ,
2194 [48, 57, 60]
2195 ] ,
2196 nil_array ,
2197 [
2198 [46, 46, 61] ,
2199 [48, 57, 18]
2200 ] ,
2201 [
2202 [58, 58, 62]
2203 ] ,
2204 [
2205 [61, 61, 63]
2206 ] ,
2207 [
2208 [61, 61, 64]
2209 ] ,
2210 [
2211 [61, 61, 65]
2212 ] ,
2213 [
2214 [48, 57, 66] ,
2215 [65, 90, 67] ,
2216 [95, 95, 68] ,
2217 [97, 122, 69]
2218 ] ,
2219 nil_array ,
2220 nil_array ,
2221 [
2222 [97, 122, 70]
2223 ] ,
2224 [
2225 [48, 57, 71] ,
2226 [65, 90, 72] ,
2227 [95, 95, 73] ,
2228 [97, 97, 74] ,
2229 [98, 98, 75] ,
2230 [99, 109, 74] ,
2231 [110, 110, 76] ,
2232 [111, 114, 74] ,
2233 [115, 115, 77] ,
2234 [116, 116, 78] ,
2235 [117, 122, 74]
2236 ] ,
2237 [
2238 [48, 95, -29] ,
2239 [97, 113, 74] ,
2240 [114, 114, 79] ,
2241 [115, 122, 74]
2242 ] ,
2243 [
2244 [48, 95, -29] ,
2245 [97, 107, 74] ,
2246 [108, 108, 80] ,
2247 [109, 110, 74] ,
2248 [111, 111, 81] ,
2249 [112, 122, 74]
2250 ] ,
2251 [
2252 [48, 95, -29] ,
2253 [97, 110, 74] ,
2254 [111, 111, 82] ,
2255 [112, 122, 74]
2256 ] ,
2257 [
2258 [48, 107, -31] ,
2259 [108, 108, 83] ,
2260 [109, 109, 74] ,
2261 [110, 110, 84] ,
2262 [111, 119, 74] ,
2263 [120, 120, 85] ,
2264 [121, 122, 74]
2265 ] ,
2266 [
2267 [48, 95, -29] ,
2268 [97, 97, 86] ,
2269 [98, 110, 74] ,
2270 [111, 111, 87] ,
2271 [112, 116, 74] ,
2272 [117, 117, 88] ,
2273 [118, 122, 74]
2274 ] ,
2275 [
2276 [48, 95, -29] ,
2277 [97, 122, 74]
2278 ] ,
2279 [
2280 [48, 95, -29] ,
2281 [97, 101, 74] ,
2282 [102, 102, 89] ,
2283 [103, 108, 74] ,
2284 [109, 109, 90] ,
2285 [110, 110, 91] ,
2286 [111, 114, 74] ,
2287 [115, 115, 92] ,
2288 [116, 122, 74]
2289 ] ,
2290 [
2291 [48, 95, -29] ,
2292 [97, 100, 74] ,
2293 [101, 101, 93] ,
2294 [102, 122, 74]
2295 ] ,
2296 [
2297 [48, 100, -37] ,
2298 [101, 101, 94] ,
2299 [102, 110, 74] ,
2300 [111, 111, 95] ,
2301 [112, 116, 74] ,
2302 [117, 117, 96] ,
2303 [118, 122, 74]
2304 ] ,
2305 [
2306 [48, 95, -29] ,
2307 [97, 109, 74] ,
2308 [110, 110, 97] ,
2309 [111, 113, 74] ,
2310 [114, 114, 98] ,
2311 [115, 122, 74]
2312 ] ,
2313 [
2314 [48, 95, -29] ,
2315 [97, 97, 99] ,
2316 [98, 113, 74] ,
2317 [114, 114, 100] ,
2318 [115, 122, 74]
2319 ] ,
2320 [
2321 [48, 100, -37] ,
2322 [101, 101, 101] ,
2323 [102, 122, 74]
2324 ] ,
2325 [
2326 [48, 100, -37] ,
2327 [101, 101, 102] ,
2328 [102, 111, 74] ,
2329 [112, 112, 103] ,
2330 [113, 116, 74] ,
2331 [117, 117, 104] ,
2332 [118, 122, 74]
2333 ] ,
2334 [
2335 [48, 95, -29] ,
2336 [97, 103, 74] ,
2337 [104, 104, 105] ,
2338 [105, 113, 74] ,
2339 [114, 114, 106] ,
2340 [115, 120, 74] ,
2341 [121, 121, 107] ,
2342 [122, 122, 74]
2343 ] ,
2344 [
2345 [48, 109, -39] ,
2346 [110, 110, 108] ,
2347 [111, 122, 74]
2348 ] ,
2349 [
2350 [48, 95, -29] ,
2351 [97, 97, 109] ,
2352 [98, 122, 74]
2353 ] ,
2354 [
2355 [48, 103, -43] ,
2356 [104, 104, 110] ,
2357 [105, 105, 111] ,
2358 [106, 113, 74] ,
2359 [114, 114, 112] ,
2360 [115, 122, 74]
2361 ] ,
2362 [
2363 [0, 9, 113] ,
2364 [11, 12, 113] ,
2365 [14, 33, 113] ,
2366 [34, 34, 114] ,
2367 [35, 91, 113] ,
2368 [92, 92, 115] ,
2369 [93, 122, 113] ,
2370 [123, 123, 116] ,
2371 [124, 255, 113]
2372 ] ,
2373 nil_array ,
2374 nil_array ,
2375 [
2376 [0, 255, -8]
2377 ] ,
2378 nil_array ,
2379 [
2380 [0, 9, 117] ,
2381 [11, 12, 117] ,
2382 [14, 255, 117]
2383 ] ,
2384 nil_array ,
2385 [
2386 [0, 255, -9]
2387 ] ,
2388 nil_array ,
2389 [
2390 [10, 10, 118]
2391 ] ,
2392 [
2393 [0, 255, -11]
2394 ] ,
2395 nil_array ,
2396 nil_array ,
2397 nil_array ,
2398 [
2399 [46, 46, 119]
2400 ] ,
2401 [
2402 [48, 57, 60]
2403 ] ,
2404 [
2405 [48, 57, 60]
2406 ] ,
2407 nil_array ,
2408 [
2409 [62, 62, 120]
2410 ] ,
2411 nil_array ,
2412 nil_array ,
2413 [
2414 [48, 122, -25]
2415 ] ,
2416 [
2417 [48, 122, -25]
2418 ] ,
2419 [
2420 [48, 122, -25]
2421 ] ,
2422 [
2423 [48, 122, -25]
2424 ] ,
2425 [
2426 [48, 57, 121] ,
2427 [65, 90, 122] ,
2428 [95, 95, 123] ,
2429 [97, 122, 124]
2430 ] ,
2431 [
2432 [48, 122, -35]
2433 ] ,
2434 [
2435 [48, 122, -35]
2436 ] ,
2437 [
2438 [48, 122, -35]
2439 ] ,
2440 [
2441 [48, 122, -35]
2442 ] ,
2443 [
2444 [48, 110, -32] ,
2445 [111, 111, 125] ,
2446 [112, 114, 74] ,
2447 [115, 115, 126] ,
2448 [116, 122, 74]
2449 ] ,
2450 [
2451 [48, 95, -29] ,
2452 [97, 99, 74] ,
2453 [100, 100, 127] ,
2454 [101, 122, 74]
2455 ] ,
2456 [
2457 [48, 95, -29] ,
2458 [97, 114, 74] ,
2459 [115, 115, 128] ,
2460 [116, 122, 74]
2461 ] ,
2462 [
2463 [48, 95, -29] ,
2464 [97, 115, 74] ,
2465 [116, 116, 129] ,
2466 [117, 122, 74]
2467 ] ,
2468 [
2469 [48, 100, -37] ,
2470 [101, 101, 130] ,
2471 [102, 122, 74]
2472 ] ,
2473 [
2474 [48, 95, -29] ,
2475 [97, 97, 131] ,
2476 [98, 122, 74]
2477 ] ,
2478 [
2479 [48, 109, -39] ,
2480 [110, 110, 132] ,
2481 [111, 122, 74]
2482 ] ,
2483 [
2484 [48, 122, -35]
2485 ] ,
2486 [
2487 [48, 114, -79] ,
2488 [115, 115, 133] ,
2489 [116, 122, 74]
2490 ] ,
2491 [
2492 [48, 99, -78] ,
2493 [100, 100, 134] ,
2494 [101, 122, 74]
2495 ] ,
2496 [
2497 [48, 115, -80] ,
2498 [116, 116, 135] ,
2499 [117, 122, 74]
2500 ] ,
2501 [
2502 [48, 107, -31] ,
2503 [108, 108, 136] ,
2504 [109, 122, 74]
2505 ] ,
2506 [
2507 [48, 113, -30] ,
2508 [114, 114, 137] ,
2509 [115, 122, 74]
2510 ] ,
2511 [
2512 [48, 109, -39] ,
2513 [110, 110, 138] ,
2514 [111, 122, 74]
2515 ] ,
2516 [
2517 [48, 122, -35]
2518 ] ,
2519 [
2520 [48, 95, -29] ,
2521 [97, 111, 74] ,
2522 [112, 112, 139] ,
2523 [113, 122, 74]
2524 ] ,
2525 [
2526 [48, 95, -29] ,
2527 [97, 104, 74] ,
2528 [105, 105, 140] ,
2529 [106, 115, 74] ,
2530 [116, 116, 141] ,
2531 [117, 122, 74]
2532 ] ,
2533 [
2534 [48, 95, -29] ,
2535 [97, 97, 142] ,
2536 [98, 114, 74] ,
2537 [115, 115, 143] ,
2538 [116, 122, 74]
2539 ] ,
2540 [
2541 [48, 115, -80] ,
2542 [116, 116, 144] ,
2543 [117, 122, 74]
2544 ] ,
2545 [
2546 [48, 95, -29] ,
2547 [97, 118, 74] ,
2548 [119, 119, 145] ,
2549 [120, 122, 74]
2550 ] ,
2551 [
2552 [48, 115, -80] ,
2553 [116, 116, 146] ,
2554 [117, 122, 74]
2555 ] ,
2556 [
2557 [48, 107, -31] ,
2558 [108, 108, 147] ,
2559 [109, 122, 74]
2560 ] ,
2561 [
2562 [48, 95, -29] ,
2563 [97, 98, 74] ,
2564 [99, 99, 148] ,
2565 [100, 122, 74]
2566 ] ,
2567 [
2568 [48, 122, -35]
2569 ] ,
2570 [
2571 [48, 98, -99] ,
2572 [99, 99, 149] ,
2573 [100, 122, 74]
2574 ] ,
2575 [
2576 [48, 104, -93] ,
2577 [105, 105, 150] ,
2578 [106, 110, 74] ,
2579 [111, 111, 151] ,
2580 [112, 122, 74]
2581 ] ,
2582 [
2583 [48, 95, -29] ,
2584 [97, 97, 152] ,
2585 [98, 99, 74] ,
2586 [100, 100, 153] ,
2587 [101, 115, 74] ,
2588 [116, 116, 154] ,
2589 [117, 122, 74]
2590 ] ,
2591 [
2592 [48, 107, -31] ,
2593 [108, 108, 155] ,
2594 [109, 122, 74]
2595 ] ,
2596 [
2597 [48, 100, -37] ,
2598 [101, 101, 156] ,
2599 [102, 122, 74]
2600 ] ,
2601 [
2602 [48, 111, -92] ,
2603 [112, 112, 157] ,
2604 [113, 122, 74]
2605 ] ,
2606 [
2607 [48, 100, -37] ,
2608 [101, 101, 158] ,
2609 [102, 122, 74]
2610 ] ,
2611 [
2612 [48, 95, -29] ,
2613 [97, 116, 74] ,
2614 [117, 117, 159] ,
2615 [118, 122, 74]
2616 ] ,
2617 [
2618 [48, 111, -92] ,
2619 [112, 112, 160] ,
2620 [113, 122, 74]
2621 ] ,
2622 [
2623 [48, 104, -93] ,
2624 [105, 105, 161] ,
2625 [106, 122, 74]
2626 ] ,
2627 [
2628 [48, 113, -30] ,
2629 [114, 114, 162] ,
2630 [115, 122, 74]
2631 ] ,
2632 [
2633 [48, 104, -93] ,
2634 [105, 105, 163] ,
2635 [106, 122, 74]
2636 ] ,
2637 [
2638 [48, 115, -80] ,
2639 [116, 116, 164] ,
2640 [117, 122, 74]
2641 ] ,
2642 [
2643 [48, 104, -93] ,
2644 [105, 105, 165] ,
2645 [106, 122, 74]
2646 ] ,
2647 [
2648 [0, 255, -47]
2649 ] ,
2650 nil_array ,
2651 [
2652 [0, 9, 166] ,
2653 [11, 12, 166] ,
2654 [14, 255, 166]
2655 ] ,
2656 nil_array ,
2657 [
2658 [0, 255, -8]
2659 ] ,
2660 nil_array ,
2661 nil_array ,
2662 nil_array ,
2663 [
2664 [48, 122, -72]
2665 ] ,
2666 [
2667 [48, 122, -72]
2668 ] ,
2669 [
2670 [48, 122, -72]
2671 ] ,
2672 [
2673 [48, 122, -72]
2674 ] ,
2675 [
2676 [48, 113, -30] ,
2677 [114, 114, 167] ,
2678 [115, 122, 74]
2679 ] ,
2680 [
2681 [48, 115, -80] ,
2682 [116, 116, 168] ,
2683 [117, 122, 74]
2684 ] ,
2685 [
2686 [48, 122, -35]
2687 ] ,
2688 [
2689 [48, 100, -37] ,
2690 [101, 101, 169] ,
2691 [102, 122, 74]
2692 ] ,
2693 [
2694 [48, 113, -30] ,
2695 [114, 114, 170] ,
2696 [115, 122, 74]
2697 ] ,
2698 [
2699 [48, 95, -29] ,
2700 [97, 97, 171] ,
2701 [98, 122, 74]
2702 ] ,
2703 [
2704 [48, 114, -79] ,
2705 [115, 115, 172] ,
2706 [116, 122, 74]
2707 ] ,
2708 [
2709 [48, 115, -80] ,
2710 [116, 116, 173] ,
2711 [117, 122, 74]
2712 ] ,
2713 [
2714 [48, 100, -37] ,
2715 [101, 101, 174] ,
2716 [102, 122, 74]
2717 ] ,
2718 [
2719 [48, 122, -35]
2720 ] ,
2721 [
2722 [48, 100, -37] ,
2723 [101, 101, 175] ,
2724 [102, 122, 74]
2725 ] ,
2726 [
2727 [48, 114, -79] ,
2728 [115, 115, 176] ,
2729 [116, 122, 74]
2730 ] ,
2731 [
2732 [48, 122, -35]
2733 ] ,
2734 [
2735 [48, 122, -35]
2736 ] ,
2737 [
2738 [48, 110, -32] ,
2739 [111, 111, 177] ,
2740 [112, 122, 74]
2741 ] ,
2742 [
2743 [48, 115, -80] ,
2744 [116, 116, 178] ,
2745 [117, 122, 74]
2746 ] ,
2747 [
2748 [48, 100, -37] ,
2749 [101, 101, 179] ,
2750 [102, 113, 74] ,
2751 [114, 114, 180] ,
2752 [115, 122, 74]
2753 ] ,
2754 [
2755 [48, 122, -35]
2756 ] ,
2757 [
2758 [48, 100, -37] ,
2759 [101, 101, 181] ,
2760 [102, 122, 74]
2761 ] ,
2762 [
2763 [48, 103, -43] ,
2764 [104, 104, 182] ,
2765 [105, 122, 74]
2766 ] ,
2767 [
2768 [48, 122, -35]
2769 ] ,
2770 [
2771 [48, 122, -35]
2772 ] ,
2773 [
2774 [48, 107, -31] ,
2775 [108, 108, 183] ,
2776 [109, 122, 74]
2777 ] ,
2778 [
2779 [48, 100, -37] ,
2780 [101, 101, 184] ,
2781 [102, 122, 74]
2782 ] ,
2783 [
2784 [48, 95, -29] ,
2785 [97, 106, 74] ,
2786 [107, 107, 185] ,
2787 [108, 122, 74]
2788 ] ,
2789 [
2790 [48, 95, -29] ,
2791 [97, 117, 74] ,
2792 [118, 118, 186] ,
2793 [119, 122, 74]
2794 ] ,
2795 [
2796 [48, 115, -80] ,
2797 [116, 116, 187] ,
2798 [117, 122, 74]
2799 ] ,
2800 [
2801 [48, 99, -78] ,
2802 [100, 100, 188] ,
2803 [101, 122, 74]
2804 ] ,
2805 [
2806 [48, 100, -37] ,
2807 [101, 101, 189] ,
2808 [102, 122, 74]
2809 ] ,
2810 [
2811 [48, 116, -108] ,
2812 [117, 117, 190] ,
2813 [118, 122, 74]
2814 ] ,
2815 [
2816 [48, 101, -36] ,
2817 [102, 102, 191] ,
2818 [103, 122, 74]
2819 ] ,
2820 [
2821 [48, 98, -99] ,
2822 [99, 99, 192] ,
2823 [100, 122, 74]
2824 ] ,
2825 [
2826 [48, 100, -37] ,
2827 [101, 101, 193] ,
2828 [102, 122, 74]
2829 ] ,
2830 [
2831 [48, 109, -39] ,
2832 [110, 110, 194] ,
2833 [111, 122, 74]
2834 ] ,
2835 [
2836 [48, 100, -37] ,
2837 [101, 101, 195] ,
2838 [102, 122, 74]
2839 ] ,
2840 [
2841 [48, 100, -37] ,
2842 [101, 101, 196] ,
2843 [102, 122, 74]
2844 ] ,
2845 [
2846 [48, 117, -152] ,
2847 [118, 118, 197] ,
2848 [119, 122, 74]
2849 ] ,
2850 [
2851 [48, 122, -35]
2852 ] ,
2853 [
2854 [48, 107, -31] ,
2855 [108, 108, 198] ,
2856 [109, 122, 74]
2857 ] ,
2858 [
2859 [48, 103, -43] ,
2860 [104, 104, 199] ,
2861 [105, 122, 74]
2862 ] ,
2863 [
2864 [48, 115, -80] ,
2865 [116, 116, 200] ,
2866 [117, 122, 74]
2867 ] ,
2868 [
2869 [0, 255, -47]
2870 ] ,
2871 [
2872 [48, 115, -80] ,
2873 [116, 116, 201] ,
2874 [117, 122, 74]
2875 ] ,
2876 [
2877 [48, 113, -30] ,
2878 [114, 114, 202] ,
2879 [115, 122, 74]
2880 ] ,
2881 [
2882 [48, 113, -30] ,
2883 [114, 114, 203] ,
2884 [115, 122, 74]
2885 ] ,
2886 [
2887 [48, 122, -35]
2888 ] ,
2889 [
2890 [48, 106, -151] ,
2891 [107, 107, 204] ,
2892 [108, 122, 74]
2893 ] ,
2894 [
2895 [48, 114, -79] ,
2896 [115, 115, 205] ,
2897 [116, 122, 74]
2898 ] ,
2899 [
2900 [48, 104, -93] ,
2901 [105, 105, 206] ,
2902 [106, 122, 74]
2903 ] ,
2904 [
2905 [48, 122, -35]
2906 ] ,
2907 [
2908 [48, 113, -30] ,
2909 [114, 114, 207] ,
2910 [115, 122, 74]
2911 ] ,
2912 [
2913 [48, 100, -37] ,
2914 [101, 101, 208] ,
2915 [102, 122, 74]
2916 ] ,
2917 [
2918 [48, 113, -30] ,
2919 [114, 114, 209] ,
2920 [115, 122, 74]
2921 ] ,
2922 [
2923 [48, 122, -35]
2924 ] ,
2925 [
2926 [48, 113, -30] ,
2927 [114, 114, 210] ,
2928 [115, 122, 74]
2929 ] ,
2930 [
2931 [48, 116, -108] ,
2932 [117, 117, 211] ,
2933 [118, 122, 74]
2934 ] ,
2935 [
2936 [48, 115, -80] ,
2937 [116, 116, 212] ,
2938 [117, 122, 74]
2939 ] ,
2940 [
2941 [48, 122, -35]
2942 ] ,
2943 [
2944 [48, 95, -29] ,
2945 [97, 97, 213] ,
2946 [98, 122, 74]
2947 ] ,
2948 [
2949 [48, 122, -35]
2950 ] ,
2951 [
2952 [48, 95, -29] ,
2953 [97, 97, 214] ,
2954 [98, 122, 74]
2955 ] ,
2956 [
2957 [48, 95, -29] ,
2958 [97, 97, 215] ,
2959 [98, 122, 74]
2960 ] ,
2961 [
2962 [48, 100, -37] ,
2963 [101, 101, 216] ,
2964 [102, 122, 74]
2965 ] ,
2966 [
2967 [48, 95, -29] ,
2968 [97, 97, 217] ,
2969 [98, 122, 74]
2970 ] ,
2971 [
2972 [48, 101, -36] ,
2973 [102, 102, 218] ,
2974 [103, 122, 74]
2975 ] ,
2976 [
2977 [48, 113, -30] ,
2978 [114, 114, 219] ,
2979 [115, 122, 74]
2980 ] ,
2981 [
2982 [48, 122, -35]
2983 ] ,
2984 [
2985 [48, 104, -93] ,
2986 [105, 105, 220] ,
2987 [106, 122, 74]
2988 ] ,
2989 [
2990 [48, 113, -30] ,
2991 [114, 114, 221] ,
2992 [115, 122, 74]
2993 ] ,
2994 [
2995 [48, 122, -35]
2996 ] ,
2997 [
2998 [48, 122, -35]
2999 ] ,
3000 [
3001 [48, 122, -35]
3002 ] ,
3003 [
3004 [48, 100, -37] ,
3005 [101, 101, 222] ,
3006 [102, 122, 74]
3007 ] ,
3008 [
3009 [48, 100, -37] ,
3010 [101, 101, 223] ,
3011 [102, 122, 74]
3012 ] ,
3013 [
3014 [48, 122, -35]
3015 ] ,
3016 [
3017 [48, 95, -29] ,
3018 [97, 97, 224] ,
3019 [98, 122, 74]
3020 ] ,
3021 [
3022 [48, 122, -35]
3023 ] ,
3024 [
3025 [48, 95, -29] ,
3026 [97, 97, 225] ,
3027 [98, 122, 74]
3028 ] ,
3029 [
3030 [48, 115, -80] ,
3031 [116, 116, 226] ,
3032 [117, 122, 74]
3033 ] ,
3034 [
3035 [48, 122, -35]
3036 ] ,
3037 [
3038 [48, 122, -35]
3039 ] ,
3040 [
3041 [48, 109, -39] ,
3042 [110, 110, 227] ,
3043 [111, 122, 74]
3044 ] ,
3045 [
3046 [48, 109, -39] ,
3047 [110, 110, 228] ,
3048 [111, 122, 74]
3049 ] ,
3050 [
3051 [48, 122, -35]
3052 ] ,
3053 [
3054 [48, 115, -80] ,
3055 [116, 116, 229] ,
3056 [117, 122, 74]
3057 ] ,
3058 [
3059 [48, 101, -36] ,
3060 [102, 102, 230] ,
3061 [103, 109, 74] ,
3062 [110, 110, 231] ,
3063 [111, 122, 74]
3064 ] ,
3065 [
3066 [48, 99, -78] ,
3067 [100, 100, 232] ,
3068 [101, 122, 74]
3069 ] ,
3070 [
3071 [48, 122, -35]
3072 ] ,
3073 [
3074 [48, 97, -29] ,
3075 [98, 98, 233] ,
3076 [99, 122, 74]
3077 ] ,
3078 [
3079 [48, 95, -29] ,
3080 [97, 102, 74] ,
3081 [103, 103, 234] ,
3082 [104, 122, 74]
3083 ] ,
3084 [
3085 [48, 115, -80] ,
3086 [116, 116, 235] ,
3087 [117, 122, 74]
3088 ] ,
3089 [
3090 [48, 98, -99] ,
3091 [99, 99, 236] ,
3092 [100, 122, 74]
3093 ] ,
3094 [
3095 [48, 97, -29] ,
3096 [98, 98, 237] ,
3097 [99, 122, 74]
3098 ] ,
3099 [
3100 [48, 122, -35]
3101 ] ,
3102 [
3103 [48, 109, -39] ,
3104 [110, 110, 238] ,
3105 [111, 122, 74]
3106 ] ,
3107 [
3108 [48, 95, -29] ,
3109 [97, 97, 239] ,
3110 [98, 122, 74]
3111 ] ,
3112 [
3113 [48, 122, -35]
3114 ] ,
3115 [
3116 [48, 113, -30] ,
3117 [114, 114, 240] ,
3118 [115, 122, 74]
3119 ] ,
3120 [
3121 [48, 122, -35]
3122 ] ,
3123 [
3124 [48, 97, -29] ,
3125 [98, 98, 241] ,
3126 [99, 122, 74]
3127 ] ,
3128 [
3129 [48, 98, -99] ,
3130 [99, 99, 242] ,
3131 [100, 122, 74]
3132 ] ,
3133 [
3134 [48, 122, -35]
3135 ] ,
3136 [
3137 [48, 116, -108] ,
3138 [117, 117, 243] ,
3139 [118, 122, 74]
3140 ] ,
3141 [
3142 [48, 122, -35]
3143 ] ,
3144 [
3145 [48, 122, -35]
3146 ] ,
3147 [
3148 [48, 95, -29] ,
3149 [97, 97, 244] ,
3150 [98, 122, 74]
3151 ] ,
3152 [
3153 [48, 122, -35]
3154 ] ,
3155 [
3156 [48, 100, -37] ,
3157 [101, 101, 245] ,
3158 [102, 122, 74]
3159 ] ,
3160 [
3161 [48, 107, -31] ,
3162 [108, 108, 246] ,
3163 [109, 122, 74]
3164 ] ,
3165 [
3166 [48, 100, -37] ,
3167 [101, 101, 247] ,
3168 [102, 122, 74]
3169 ] ,
3170 [
3171 [48, 100, -37] ,
3172 [101, 101, 248] ,
3173 [102, 122, 74]
3174 ] ,
3175 [
3176 [48, 115, -80] ,
3177 [116, 116, 249] ,
3178 [117, 122, 74]
3179 ] ,
3180 [
3181 [48, 107, -31] ,
3182 [108, 108, 250] ,
3183 [109, 122, 74]
3184 ] ,
3185 [
3186 [48, 122, -35]
3187 ] ,
3188 [
3189 [48, 107, -31] ,
3190 [108, 108, 251] ,
3191 [109, 122, 74]
3192 ] ,
3193 [
3194 [48, 114, -79] ,
3195 [115, 115, 252] ,
3196 [116, 122, 74]
3197 ] ,
3198 [
3199 [48, 107, -31] ,
3200 [108, 108, 253] ,
3201 [109, 122, 74]
3202 ] ,
3203 [
3204 [48, 115, -80] ,
3205 [116, 116, 254] ,
3206 [117, 122, 74]
3207 ] ,
3208 [
3209 [48, 100, -37] ,
3210 [101, 101, 255] ,
3211 [102, 122, 74]
3212 ] ,
3213 [
3214 [48, 98, -99] ,
3215 [99, 99, 256] ,
3216 [100, 122, 74]
3217 ] ,
3218 [
3219 [48, 122, -35]
3220 ] ,
3221 [
3222 [48, 100, -37] ,
3223 [101, 101, 257] ,
3224 [102, 122, 74]
3225 ] ,
3226 [
3227 [48, 122, -35]
3228 ] ,
3229 [
3230 [48, 122, -35]
3231 ] ,
3232 [
3233 [48, 100, -37] ,
3234 [101, 101, 258] ,
3235 [102, 122, 74]
3236 ] ,
3237 [
3238 [48, 100, -37] ,
3239 [101, 101, 259] ,
3240 [102, 122, 74]
3241 ] ,
3242 [
3243 [48, 122, -35]
3244 ] ,
3245 [
3246 [48, 95, -29] ,
3247 [97, 97, 260] ,
3248 [98, 122, 74]
3249 ] ,
3250 [
3251 [48, 100, -37] ,
3252 [101, 101, 261] ,
3253 [102, 122, 74]
3254 ] ,
3255 [
3256 [48, 122, -35]
3257 ] ,
3258 [
3259 [48, 122, -35]
3260 ] ,
3261 [
3262 [48, 100, -37] ,
3263 [101, 101, 262] ,
3264 [102, 122, 74]
3265 ] ,
3266 [
3267 [48, 122, -35]
3268 ] ,
3269 [
3270 [48, 99, -78] ,
3271 [100, 100, 263] ,
3272 [101, 122, 74]
3273 ] ,
3274 [
3275 [48, 122, -35]
3276 ] ,
3277 [
3278 [48, 107, -31] ,
3279 [108, 108, 264] ,
3280 [109, 122, 74]
3281 ] ,
3282 [
3283 [48, 122, -35]
3284 ] ,
3285 [
3286 [48, 122, -35]
3287 ] ,
3288 [
3289 [48, 122, -35]
3290 ] ,
3291 [
3292 [48, 122, -35]
3293 ]
3294 ]
3295 ]
3296 end
3297
3298 private fun nil_array: Array[Array[Int]]
3299 do
3300 return once new Array[Array[Int]]
3301 end
3302
3303 var _accept_table: Array[Array[Int]]
3304 private fun build_accept_table do
3305 _accept_table = once [
3306 [
3307 -1 , 0 , 1 , 1 , 0 , -1 , -1 , -1 , 69 , -1 , 52 , 53 , 67 , 65 , 56 , 66 , 64 , 68 , 80 , 57 , 72 , 59 , 74 , 77 , 54 , 55 , -1 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , -1 , 1 , 71 , -1 , 83 , -1 , 84 , -1 , 2 , 2 , -1 , 82 , 60 , 61 , 63 , 81 , -1 , 58 , 73 , 70 , 75 , 77 , 77 , 77 , 77 , 79 , 78 , 78 , 78 , 78 , 78 , 78 , 48 , 78 , 78 , 78 , 78 , 17 , 78 , 78 , 78 , 78 , 78 , 78 , 26 , 78 , 31 , 16 , 78 , 78 , 78 , 78 , 78 , 33 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , -1 , 86 , -1 , 85 , -1 , 2 , 62 , 76 , 79 , 79 , 79 , 79 , 78 , 78 , 32 , 78 , 78 , 78 , 78 , 78 , 78 , 10 , 78 , 78 , 30 , 11 , 78 , 78 , 78 , 41 , 78 , 78 , 40 , 34 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 78 , 20 , 78 , 78 , 78 , -1 , 78 , 78 , 78 , 13 , 78 , 78 , 78 , 28 , 78 , 78 , 78 , 14 , 78 , 78 , 78 , 11 , 47 , 42 , 78 , 78 , 78 , 78 , 78 , 78 , 44 , 78 , 78 , 27 , 45 , 12 , 78 , 78 , 49 , 78 , 38 , 78 , 78 , 37 , 5 , 78 , 78 , 46 , 78 , 78 , 78 , 51 , 78 , 78 , 78 , 78 , 78 , 15 , 78 , 78 , 43 , 78 , 29 , 78 , 78 , 39 , 78 , 22 , 4 , 78 , 21 , 78 , 78 , 78 , 78 , 78 , 78 , 35 , 78 , 78 , 78 , 78 , 78 , 78 , 25 , 78 , 3 , 24 , 78 , 78 , 9 , 78 , 78 , 6 , 36 , 78 , 50 , 78 , 18 , 78 , 19 , 7 , 23 , 8
3308
3309 ]
3310 ]
3311 end
3312 end
3313