syntax: add 'loop' construction
[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(loc: Location)
154 do
155 _text = once "fun"
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 TKwinit
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 "init"
182 _location = loc
183 end
184 end
185
186 redef class TKwredef
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 "redef"
195 _location = loc
196 end
197 end
198
199 redef class TKwis
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 "is"
208 _location = loc
209 end
210 end
211
212 redef class TKwdo
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 "do"
221 _location = loc
222 end
223 end
224
225 redef class TKwreadable
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 "readable"
234 _location = loc
235 end
236 end
237
238 redef class TKwwritable
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 "writable"
247 _location = loc
248 end
249 end
250
251 redef class TKwvar
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 "var"
260 _location = loc
261 end
262 end
263
264 redef class TKwintern
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 "intern"
273 _location = loc
274 end
275 end
276
277 redef class TKwextern
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 "extern"
286 _location = loc
287 end
288 end
289
290 redef class TKwprotected
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 "protected"
299 _location = loc
300 end
301 end
302
303 redef class TKwprivate
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 "private"
312 _location = loc
313 end
314 end
315
316 redef class TKwintrude
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 "intrude"
325 _location = loc
326 end
327 end
328
329 redef class TKwif
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 "if"
338 _location = loc
339 end
340 end
341
342 redef class TKwthen
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 "then"
351 _location = loc
352 end
353 end
354
355 redef class TKwelse
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 "else"
364 _location = loc
365 end
366 end
367
368 redef class TKwwhile
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 "while"
377 _location = loc
378 end
379 end
380
381 redef class TKwloop
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 "loop"
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 TKwnullable
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 "nullable"
650 _location = loc
651 end
652 end
653
654 redef class TKwisset
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 "isset"
663 _location = loc
664 end
665 end
666
667 redef class TKwlabel
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 "label"
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 TBang
1006 redef fun parser_index: Int
1007 do
1008 return 76
1009 end
1010
1011 init init_tk(loc: Location)
1012 do
1013 _text = once "!"
1014 _location = loc
1015 end
1016 end
1017
1018 redef class TClassid
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 TId
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 TAttrid
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 TNumber
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 TFloat
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 TChar
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 TString
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 TStartString
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 TMidString
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 redef class TEndString
1136 redef fun parser_index: Int
1137 do
1138 return 86
1139 end
1140
1141 init init_tk(text: String, loc: Location)
1142 do
1143 _text = text
1144 _location = loc
1145 end
1146 end
1147
1148
1149 redef class EOF
1150 redef fun parser_index: Int
1151 do
1152 return 87
1153 end
1154
1155 init(loc: Location)
1156 do
1157 _text = ""
1158 _location = loc
1159 end
1160 end
1161
1162 redef class AError
1163 readable writable var _message: String
1164
1165 init init_error(message: String, loc: Location)
1166 do
1167 init(loc)
1168 _message = message
1169 end
1170 end
1171
1172
1173 # The lexer extract NIT tokens from an input stream.
1174 # It is better user with the Parser
1175 class Lexer
1176 # Last peeked token
1177 var _token: nullable Token
1178
1179 # Lexer current state
1180 var _state: Int = 0
1181
1182 # Name of the stream (as given to tokens)
1183 readable var _filename: String
1184
1185 # Input stream where character are read
1186 var _stream: IStream
1187
1188 # Pushback buffer to store unread character
1189 var _stream_buf: Buffer
1190
1191 # Number of character stored in the pushback buffer
1192 var _stream_pos: Int
1193
1194 # Current line number in the input stream
1195 var _line: Int = 0
1196
1197 # Current column in the input stream
1198 var _pos: Int = 0
1199
1200 # Was the last character a cariage-return?
1201 var _cr: Bool = false
1202
1203 # If the end of stream?
1204 var _eof: Bool = false
1205
1206 # Current working text read from the input stream
1207 var _text: Buffer
1208
1209 # Constante state values
1210 private fun state_initial: Int do return 0 end
1211
1212 # Create a new lexer for a stream (and a name)
1213 init(stream: IStream, fname: String)
1214 do
1215 _filename = fname
1216 _text = new Buffer
1217 _stream = stream
1218 _stream_pos = -1
1219 _stream_buf = new Buffer
1220 build_goto_table
1221 build_accept_table
1222 end
1223
1224 # Give the next token (but do not consume it)
1225 fun peek: Token
1226 do
1227 while _token == null do
1228 _token = get_token
1229 end
1230 return _token.as(not null)
1231 end
1232
1233 # Give and consume the next token
1234 fun next: Token
1235 do
1236 var result = _token
1237 while result == null do
1238 result = get_token
1239 end
1240 _token = null
1241 return result.as(not null)
1242 end
1243
1244 # Get a token, or null if it is discarded
1245 private fun get_token: nullable Token
1246 do
1247 var dfa_state = 0
1248
1249 var start_pos = _pos
1250 var start_line = _line
1251
1252 var accept_state = -1
1253 var accept_token = -1
1254 var accept_length = -1
1255 var accept_pos = -1
1256 var accept_line = -1
1257
1258 var goto_table = _goto_table[_state]
1259 var accept = _accept_table[_state]
1260 var text = _text
1261 text.clear
1262
1263 while true do
1264 var c = get_char
1265
1266 if c != -1 then
1267 var cr = _cr
1268 var line = _line
1269 var pos = _pos
1270 if c == 10 then
1271 if cr then
1272 cr = false
1273 else
1274 line = line + 1
1275 pos = 0
1276 end
1277 else if c == 13 then
1278 line = line + 1
1279 pos = 0
1280 cr = true
1281 else
1282 pos = pos + 1
1283 cr = false
1284 end
1285
1286 text.add(c.ascii)
1287
1288 var first_loop = true # aka until
1289 while dfa_state < -1 or first_loop do
1290 var old_state = dfa_state
1291 if dfa_state < -1 then
1292 old_state = -2 - dfa_state
1293 end
1294
1295 dfa_state = -1
1296
1297 var tmp0 = goto_table[old_state]
1298 var low = 0
1299 var high = tmp0.length - 1
1300
1301 if high >= 0 then
1302 var tmp1 = tmp0.intern_items
1303 while low <= high do
1304 var middle = (low + high) / 2
1305 var tmp2 = tmp1[middle].intern_items
1306
1307 if c < tmp2[0] then
1308 high = middle - 1
1309 else if c > tmp2[1] then
1310 low = middle + 1
1311 else
1312 dfa_state = tmp2[2]
1313 low = high + 1 # aka break
1314 end
1315 end
1316 end
1317 first_loop = false # aka until
1318 end
1319
1320 _cr = cr
1321 _line = line
1322 _pos = pos
1323 else
1324 dfa_state = -1
1325 end
1326
1327 if dfa_state >= 0 then
1328 if accept[dfa_state] != -1 then
1329 accept_state = dfa_state
1330 accept_token = accept[dfa_state]
1331 accept_length = text.length
1332 accept_pos = _pos
1333 accept_line = _line
1334 end
1335 else
1336 if accept_state != -1 then
1337 if accept_token == 0 then
1338 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1339 push_back(accept_length)
1340 _pos = accept_pos
1341 _line = accept_line
1342 return null
1343 end
1344 if accept_token == 1 then
1345 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1346 var token_text = text.substring(0, accept_length)
1347 var token = new TEol.init_tk(token_text, location)
1348 push_back(accept_length)
1349 _pos = accept_pos
1350 _line = accept_line
1351 return token
1352 end
1353 if accept_token == 2 then
1354 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1355 var token_text = text.substring(0, accept_length)
1356 var token = new TComment.init_tk(token_text, location)
1357 push_back(accept_length)
1358 _pos = accept_pos
1359 _line = accept_line
1360 return token
1361 end
1362 if accept_token == 3 then
1363 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1364 var token = new TKwpackage.init_tk(location)
1365 push_back(accept_length)
1366 _pos = accept_pos
1367 _line = accept_line
1368 return token
1369 end
1370 if accept_token == 4 then
1371 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1372 var token = new TKwimport.init_tk(location)
1373 push_back(accept_length)
1374 _pos = accept_pos
1375 _line = accept_line
1376 return token
1377 end
1378 if accept_token == 5 then
1379 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1380 var token = new TKwclass.init_tk(location)
1381 push_back(accept_length)
1382 _pos = accept_pos
1383 _line = accept_line
1384 return token
1385 end
1386 if accept_token == 6 then
1387 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1388 var token = new TKwabstract.init_tk(location)
1389 push_back(accept_length)
1390 _pos = accept_pos
1391 _line = accept_line
1392 return token
1393 end
1394 if accept_token == 7 then
1395 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1396 var token = new TKwinterface.init_tk(location)
1397 push_back(accept_length)
1398 _pos = accept_pos
1399 _line = accept_line
1400 return token
1401 end
1402 if accept_token == 8 then
1403 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1404 var token = new TKwuniversal.init_tk(location)
1405 push_back(accept_length)
1406 _pos = accept_pos
1407 _line = accept_line
1408 return token
1409 end
1410 if accept_token == 9 then
1411 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1412 var token = new TKwspecial.init_tk(location)
1413 push_back(accept_length)
1414 _pos = accept_pos
1415 _line = accept_line
1416 return token
1417 end
1418 if accept_token == 10 then
1419 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1420 var token = new TKwend.init_tk(location)
1421 push_back(accept_length)
1422 _pos = accept_pos
1423 _line = accept_line
1424 return token
1425 end
1426 if accept_token == 11 then
1427 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1428 var token = new TKwmeth.init_tk(location)
1429 push_back(accept_length)
1430 _pos = accept_pos
1431 _line = accept_line
1432 return token
1433 end
1434 if accept_token == 12 then
1435 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1436 var token = new TKwtype.init_tk(location)
1437 push_back(accept_length)
1438 _pos = accept_pos
1439 _line = accept_line
1440 return token
1441 end
1442 if accept_token == 13 then
1443 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1444 var token = new TKwinit.init_tk(location)
1445 push_back(accept_length)
1446 _pos = accept_pos
1447 _line = accept_line
1448 return token
1449 end
1450 if accept_token == 14 then
1451 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1452 var token = new TKwredef.init_tk(location)
1453 push_back(accept_length)
1454 _pos = accept_pos
1455 _line = accept_line
1456 return token
1457 end
1458 if accept_token == 15 then
1459 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1460 var token = new TKwis.init_tk(location)
1461 push_back(accept_length)
1462 _pos = accept_pos
1463 _line = accept_line
1464 return token
1465 end
1466 if accept_token == 16 then
1467 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1468 var token = new TKwdo.init_tk(location)
1469 push_back(accept_length)
1470 _pos = accept_pos
1471 _line = accept_line
1472 return token
1473 end
1474 if accept_token == 17 then
1475 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1476 var token = new TKwreadable.init_tk(location)
1477 push_back(accept_length)
1478 _pos = accept_pos
1479 _line = accept_line
1480 return token
1481 end
1482 if accept_token == 18 then
1483 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1484 var token = new TKwwritable.init_tk(location)
1485 push_back(accept_length)
1486 _pos = accept_pos
1487 _line = accept_line
1488 return token
1489 end
1490 if accept_token == 19 then
1491 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1492 var token = new TKwvar.init_tk(location)
1493 push_back(accept_length)
1494 _pos = accept_pos
1495 _line = accept_line
1496 return token
1497 end
1498 if accept_token == 20 then
1499 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1500 var token = new TKwintern.init_tk(location)
1501 push_back(accept_length)
1502 _pos = accept_pos
1503 _line = accept_line
1504 return token
1505 end
1506 if accept_token == 21 then
1507 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1508 var token = new TKwextern.init_tk(location)
1509 push_back(accept_length)
1510 _pos = accept_pos
1511 _line = accept_line
1512 return token
1513 end
1514 if accept_token == 22 then
1515 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1516 var token = new TKwprotected.init_tk(location)
1517 push_back(accept_length)
1518 _pos = accept_pos
1519 _line = accept_line
1520 return token
1521 end
1522 if accept_token == 23 then
1523 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1524 var token = new TKwprivate.init_tk(location)
1525 push_back(accept_length)
1526 _pos = accept_pos
1527 _line = accept_line
1528 return token
1529 end
1530 if accept_token == 24 then
1531 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1532 var token = new TKwintrude.init_tk(location)
1533 push_back(accept_length)
1534 _pos = accept_pos
1535 _line = accept_line
1536 return token
1537 end
1538 if accept_token == 25 then
1539 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1540 var token = new TKwif.init_tk(location)
1541 push_back(accept_length)
1542 _pos = accept_pos
1543 _line = accept_line
1544 return token
1545 end
1546 if accept_token == 26 then
1547 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1548 var token = new TKwthen.init_tk(location)
1549 push_back(accept_length)
1550 _pos = accept_pos
1551 _line = accept_line
1552 return token
1553 end
1554 if accept_token == 27 then
1555 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1556 var token = new TKwelse.init_tk(location)
1557 push_back(accept_length)
1558 _pos = accept_pos
1559 _line = accept_line
1560 return token
1561 end
1562 if accept_token == 28 then
1563 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1564 var token = new TKwwhile.init_tk(location)
1565 push_back(accept_length)
1566 _pos = accept_pos
1567 _line = accept_line
1568 return token
1569 end
1570 if accept_token == 29 then
1571 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1572 var token = new TKwloop.init_tk(location)
1573 push_back(accept_length)
1574 _pos = accept_pos
1575 _line = accept_line
1576 return token
1577 end
1578 if accept_token == 30 then
1579 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1580 var token = new TKwfor.init_tk(location)
1581 push_back(accept_length)
1582 _pos = accept_pos
1583 _line = accept_line
1584 return token
1585 end
1586 if accept_token == 31 then
1587 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1588 var token = new TKwin.init_tk(location)
1589 push_back(accept_length)
1590 _pos = accept_pos
1591 _line = accept_line
1592 return token
1593 end
1594 if accept_token == 32 then
1595 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1596 var token = new TKwand.init_tk(location)
1597 push_back(accept_length)
1598 _pos = accept_pos
1599 _line = accept_line
1600 return token
1601 end
1602 if accept_token == 33 then
1603 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1604 var token = new TKwor.init_tk(location)
1605 push_back(accept_length)
1606 _pos = accept_pos
1607 _line = accept_line
1608 return token
1609 end
1610 if accept_token == 34 then
1611 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1612 var token = new TKwnot.init_tk(location)
1613 push_back(accept_length)
1614 _pos = accept_pos
1615 _line = accept_line
1616 return token
1617 end
1618 if accept_token == 35 then
1619 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1620 var token = new TKwreturn.init_tk(location)
1621 push_back(accept_length)
1622 _pos = accept_pos
1623 _line = accept_line
1624 return token
1625 end
1626 if accept_token == 36 then
1627 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1628 var token = new TKwcontinue.init_tk(location)
1629 push_back(accept_length)
1630 _pos = accept_pos
1631 _line = accept_line
1632 return token
1633 end
1634 if accept_token == 37 then
1635 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1636 var token = new TKwbreak.init_tk(location)
1637 push_back(accept_length)
1638 _pos = accept_pos
1639 _line = accept_line
1640 return token
1641 end
1642 if accept_token == 38 then
1643 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1644 var token = new TKwabort.init_tk(location)
1645 push_back(accept_length)
1646 _pos = accept_pos
1647 _line = accept_line
1648 return token
1649 end
1650 if accept_token == 39 then
1651 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1652 var token = new TKwassert.init_tk(location)
1653 push_back(accept_length)
1654 _pos = accept_pos
1655 _line = accept_line
1656 return token
1657 end
1658 if accept_token == 40 then
1659 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1660 var token = new TKwnew.init_tk(location)
1661 push_back(accept_length)
1662 _pos = accept_pos
1663 _line = accept_line
1664 return token
1665 end
1666 if accept_token == 41 then
1667 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1668 var token = new TKwisa.init_tk(location)
1669 push_back(accept_length)
1670 _pos = accept_pos
1671 _line = accept_line
1672 return token
1673 end
1674 if accept_token == 42 then
1675 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1676 var token = new TKwonce.init_tk(location)
1677 push_back(accept_length)
1678 _pos = accept_pos
1679 _line = accept_line
1680 return token
1681 end
1682 if accept_token == 43 then
1683 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1684 var token = new TKwsuper.init_tk(location)
1685 push_back(accept_length)
1686 _pos = accept_pos
1687 _line = accept_line
1688 return token
1689 end
1690 if accept_token == 44 then
1691 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1692 var token = new TKwself.init_tk(location)
1693 push_back(accept_length)
1694 _pos = accept_pos
1695 _line = accept_line
1696 return token
1697 end
1698 if accept_token == 45 then
1699 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1700 var token = new TKwtrue.init_tk(location)
1701 push_back(accept_length)
1702 _pos = accept_pos
1703 _line = accept_line
1704 return token
1705 end
1706 if accept_token == 46 then
1707 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1708 var token = new TKwfalse.init_tk(location)
1709 push_back(accept_length)
1710 _pos = accept_pos
1711 _line = accept_line
1712 return token
1713 end
1714 if accept_token == 47 then
1715 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1716 var token = new TKwnull.init_tk(location)
1717 push_back(accept_length)
1718 _pos = accept_pos
1719 _line = accept_line
1720 return token
1721 end
1722 if accept_token == 48 then
1723 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1724 var token = new TKwas.init_tk(location)
1725 push_back(accept_length)
1726 _pos = accept_pos
1727 _line = accept_line
1728 return token
1729 end
1730 if accept_token == 49 then
1731 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1732 var token = new TKwnullable.init_tk(location)
1733 push_back(accept_length)
1734 _pos = accept_pos
1735 _line = accept_line
1736 return token
1737 end
1738 if accept_token == 50 then
1739 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1740 var token = new TKwisset.init_tk(location)
1741 push_back(accept_length)
1742 _pos = accept_pos
1743 _line = accept_line
1744 return token
1745 end
1746 if accept_token == 51 then
1747 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1748 var token = new TKwlabel.init_tk(location)
1749 push_back(accept_length)
1750 _pos = accept_pos
1751 _line = accept_line
1752 return token
1753 end
1754 if accept_token == 52 then
1755 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1756 var token = new TOpar.init_tk(location)
1757 push_back(accept_length)
1758 _pos = accept_pos
1759 _line = accept_line
1760 return token
1761 end
1762 if accept_token == 53 then
1763 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1764 var token = new TCpar.init_tk(location)
1765 push_back(accept_length)
1766 _pos = accept_pos
1767 _line = accept_line
1768 return token
1769 end
1770 if accept_token == 54 then
1771 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1772 var token = new TObra.init_tk(location)
1773 push_back(accept_length)
1774 _pos = accept_pos
1775 _line = accept_line
1776 return token
1777 end
1778 if accept_token == 55 then
1779 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1780 var token = new TCbra.init_tk(location)
1781 push_back(accept_length)
1782 _pos = accept_pos
1783 _line = accept_line
1784 return token
1785 end
1786 if accept_token == 56 then
1787 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1788 var token = new TComma.init_tk(location)
1789 push_back(accept_length)
1790 _pos = accept_pos
1791 _line = accept_line
1792 return token
1793 end
1794 if accept_token == 57 then
1795 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1796 var token = new TColumn.init_tk(location)
1797 push_back(accept_length)
1798 _pos = accept_pos
1799 _line = accept_line
1800 return token
1801 end
1802 if accept_token == 58 then
1803 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1804 var token = new TQuad.init_tk(location)
1805 push_back(accept_length)
1806 _pos = accept_pos
1807 _line = accept_line
1808 return token
1809 end
1810 if accept_token == 59 then
1811 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1812 var token = new TAssign.init_tk(location)
1813 push_back(accept_length)
1814 _pos = accept_pos
1815 _line = accept_line
1816 return token
1817 end
1818 if accept_token == 60 then
1819 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1820 var token = new TPluseq.init_tk(location)
1821 push_back(accept_length)
1822 _pos = accept_pos
1823 _line = accept_line
1824 return token
1825 end
1826 if accept_token == 61 then
1827 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1828 var token = new TMinuseq.init_tk(location)
1829 push_back(accept_length)
1830 _pos = accept_pos
1831 _line = accept_line
1832 return token
1833 end
1834 if accept_token == 62 then
1835 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1836 var token = new TDotdotdot.init_tk(location)
1837 push_back(accept_length)
1838 _pos = accept_pos
1839 _line = accept_line
1840 return token
1841 end
1842 if accept_token == 63 then
1843 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1844 var token = new TDotdot.init_tk(location)
1845 push_back(accept_length)
1846 _pos = accept_pos
1847 _line = accept_line
1848 return token
1849 end
1850 if accept_token == 64 then
1851 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1852 var token = new TDot.init_tk(location)
1853 push_back(accept_length)
1854 _pos = accept_pos
1855 _line = accept_line
1856 return token
1857 end
1858 if accept_token == 65 then
1859 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1860 var token = new TPlus.init_tk(location)
1861 push_back(accept_length)
1862 _pos = accept_pos
1863 _line = accept_line
1864 return token
1865 end
1866 if accept_token == 66 then
1867 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1868 var token = new TMinus.init_tk(location)
1869 push_back(accept_length)
1870 _pos = accept_pos
1871 _line = accept_line
1872 return token
1873 end
1874 if accept_token == 67 then
1875 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1876 var token = new TStar.init_tk(location)
1877 push_back(accept_length)
1878 _pos = accept_pos
1879 _line = accept_line
1880 return token
1881 end
1882 if accept_token == 68 then
1883 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1884 var token = new TSlash.init_tk(location)
1885 push_back(accept_length)
1886 _pos = accept_pos
1887 _line = accept_line
1888 return token
1889 end
1890 if accept_token == 69 then
1891 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1892 var token = new TPercent.init_tk(location)
1893 push_back(accept_length)
1894 _pos = accept_pos
1895 _line = accept_line
1896 return token
1897 end
1898 if accept_token == 70 then
1899 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1900 var token = new TEq.init_tk(location)
1901 push_back(accept_length)
1902 _pos = accept_pos
1903 _line = accept_line
1904 return token
1905 end
1906 if accept_token == 71 then
1907 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1908 var token = new TNe.init_tk(location)
1909 push_back(accept_length)
1910 _pos = accept_pos
1911 _line = accept_line
1912 return token
1913 end
1914 if accept_token == 72 then
1915 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1916 var token = new TLt.init_tk(location)
1917 push_back(accept_length)
1918 _pos = accept_pos
1919 _line = accept_line
1920 return token
1921 end
1922 if accept_token == 73 then
1923 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1924 var token = new TLe.init_tk(location)
1925 push_back(accept_length)
1926 _pos = accept_pos
1927 _line = accept_line
1928 return token
1929 end
1930 if accept_token == 74 then
1931 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1932 var token = new TGt.init_tk(location)
1933 push_back(accept_length)
1934 _pos = accept_pos
1935 _line = accept_line
1936 return token
1937 end
1938 if accept_token == 75 then
1939 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1940 var token = new TGe.init_tk(location)
1941 push_back(accept_length)
1942 _pos = accept_pos
1943 _line = accept_line
1944 return token
1945 end
1946 if accept_token == 76 then
1947 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1948 var token = new TStarship.init_tk(location)
1949 push_back(accept_length)
1950 _pos = accept_pos
1951 _line = accept_line
1952 return token
1953 end
1954 if accept_token == 77 then
1955 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1956 var token = new TBang.init_tk(location)
1957 push_back(accept_length)
1958 _pos = accept_pos
1959 _line = accept_line
1960 return token
1961 end
1962 if accept_token == 78 then
1963 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1964 var token_text = text.substring(0, accept_length)
1965 var token = new TClassid.init_tk(token_text, location)
1966 push_back(accept_length)
1967 _pos = accept_pos
1968 _line = accept_line
1969 return token
1970 end
1971 if accept_token == 79 then
1972 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1973 var token_text = text.substring(0, accept_length)
1974 var token = new TId.init_tk(token_text, location)
1975 push_back(accept_length)
1976 _pos = accept_pos
1977 _line = accept_line
1978 return token
1979 end
1980 if accept_token == 80 then
1981 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1982 var token_text = text.substring(0, accept_length)
1983 var token = new TAttrid.init_tk(token_text, location)
1984 push_back(accept_length)
1985 _pos = accept_pos
1986 _line = accept_line
1987 return token
1988 end
1989 if accept_token == 81 then
1990 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
1991 var token_text = text.substring(0, accept_length)
1992 var token = new TNumber.init_tk(token_text, location)
1993 push_back(accept_length)
1994 _pos = accept_pos
1995 _line = accept_line
1996 return token
1997 end
1998 if accept_token == 82 then
1999 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2000 var token_text = text.substring(0, accept_length)
2001 var token = new TFloat.init_tk(token_text, location)
2002 push_back(accept_length)
2003 _pos = accept_pos
2004 _line = accept_line
2005 return token
2006 end
2007 if accept_token == 83 then
2008 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2009 var token_text = text.substring(0, accept_length)
2010 var token = new TChar.init_tk(token_text, location)
2011 push_back(accept_length)
2012 _pos = accept_pos
2013 _line = accept_line
2014 return token
2015 end
2016 if accept_token == 84 then
2017 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2018 var token_text = text.substring(0, accept_length)
2019 var token = new TString.init_tk(token_text, location)
2020 push_back(accept_length)
2021 _pos = accept_pos
2022 _line = accept_line
2023 return token
2024 end
2025 if accept_token == 85 then
2026 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2027 var token_text = text.substring(0, accept_length)
2028 var token = new TStartString.init_tk(token_text, location)
2029 push_back(accept_length)
2030 _pos = accept_pos
2031 _line = accept_line
2032 return token
2033 end
2034 if accept_token == 86 then
2035 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2036 var token_text = text.substring(0, accept_length)
2037 var token = new TMidString.init_tk(token_text, location)
2038 push_back(accept_length)
2039 _pos = accept_pos
2040 _line = accept_line
2041 return token
2042 end
2043 if accept_token == 87 then
2044 var location = new Location(_filename, start_line + 1, accept_line + 1, start_pos + 1, accept_pos)
2045 var token_text = text.substring(0, accept_length)
2046 var token = new TEndString.init_tk(token_text, location)
2047 push_back(accept_length)
2048 _pos = accept_pos
2049 _line = accept_line
2050 return token
2051 end
2052 else
2053 var location = new Location(_filename, start_line + 1, start_line + 1, start_pos + 1, start_pos + 1)
2054 if text.length > 0 then
2055 var token = new AError.init_error("Syntax error: unknown token {text}.", location)
2056 return token
2057 else
2058 var token = new EOF(location)
2059 return token
2060 end
2061 end
2062 end
2063 end
2064 return null
2065 end
2066
2067 # Read the next character.
2068 # The character is read from the stream of from the pushback buffer.
2069 private fun get_char: Int
2070 do
2071 if _eof then
2072 return -1
2073 end
2074
2075 var result: Int
2076
2077 var sp = _stream_pos
2078 if sp >= 0 then
2079 var res = _stream_buf[_stream_pos]
2080 _stream_pos = sp - 1
2081 result = res.ascii
2082 else
2083 result = _stream.read_char
2084 end
2085
2086 if result == -1 then
2087 _eof = true
2088 end
2089
2090 return result
2091 end
2092
2093 # Unread some characters.
2094 # Unread characters are stored in the pushback buffer.
2095 private fun push_back(accept_length: Int)
2096 do
2097 var length = _text.length
2098 var i = length - 1
2099 while i >= accept_length do
2100 _eof = false
2101 _stream_pos = _stream_pos + 1
2102 _stream_buf[_stream_pos] = _text[i]
2103 i = i - 1
2104 end
2105 end
2106
2107 var _goto_table: Array[Array[Array[Array[Int]]]]
2108 private fun build_goto_table
2109 do
2110 _goto_table = once [
2111 [
2112 [
2113 [9, 9, 1],
2114 [10, 10, 2],
2115 [13, 13, 3],
2116 [32, 32, 4],
2117 [33, 33, 5],
2118 [34, 34, 6],
2119 [35, 35, 7],
2120 [37, 37, 8],
2121 [39, 39, 9],
2122 [40, 40, 10],
2123 [41, 41, 11],
2124 [42, 42, 12],
2125 [43, 43, 13],
2126 [44, 44, 14],
2127 [45, 45, 15],
2128 [46, 46, 16],
2129 [47, 47, 17],
2130 [48, 57, 18],
2131 [58, 58, 19],
2132 [60, 60, 20],
2133 [61, 61, 21],
2134 [62, 62, 22],
2135 [65, 90, 23],
2136 [91, 91, 24],
2137 [93, 93, 25],
2138 [95, 95, 26],
2139 [97, 97, 27],
2140 [98, 98, 28],
2141 [99, 99, 29],
2142 [100, 100, 30],
2143 [101, 101, 31],
2144 [102, 102, 32],
2145 [103, 104, 33],
2146 [105, 105, 34],
2147 [106, 107, 33],
2148 [108, 108, 35],
2149 [109, 109, 33],
2150 [110, 110, 36],
2151 [111, 111, 37],
2152 [112, 112, 38],
2153 [113, 113, 33],
2154 [114, 114, 39],
2155 [115, 115, 40],
2156 [116, 116, 41],
2157 [117, 117, 42],
2158 [118, 118, 43],
2159 [119, 119, 44],
2160 [120, 122, 33],
2161 [125, 125, 45]
2162 ],
2163 [
2164 [9, 9, 1],
2165 [32, 32, 4]
2166 ],
2167 nil_array,
2168 [
2169 [10, 10, 46]
2170 ],
2171 [
2172 [9, 32, -3]
2173 ],
2174 [
2175 [61, 61, 47]
2176 ],
2177 [
2178 [0, 9, 48],
2179 [11, 12, 48],
2180 [14, 33, 48],
2181 [34, 34, 49],
2182 [35, 91, 48],
2183 [92, 92, 50],
2184 [93, 122, 48],
2185 [123, 123, 51],
2186 [124, 255, 48]
2187 ],
2188 [
2189 [0, 9, 52],
2190 [10, 10, 53],
2191 [11, 12, 52],
2192 [13, 13, 54],
2193 [14, 255, 52]
2194 ],
2195 nil_array,
2196 [
2197 [0, 9, 55],
2198 [11, 12, 55],
2199 [14, 38, 55],
2200 [39, 39, 56],
2201 [40, 255, 55]
2202 ],
2203 nil_array,
2204 nil_array,
2205 nil_array,
2206 [
2207 [61, 61, 57]
2208 ],
2209 nil_array,
2210 [
2211 [61, 61, 58]
2212 ],
2213 [
2214 [46, 46, 59],
2215 [48, 57, 60]
2216 ],
2217 nil_array,
2218 [
2219 [46, 46, 61],
2220 [48, 57, 18]
2221 ],
2222 [
2223 [58, 58, 62]
2224 ],
2225 [
2226 [61, 61, 63]
2227 ],
2228 [
2229 [61, 61, 64]
2230 ],
2231 [
2232 [61, 61, 65]
2233 ],
2234 [
2235 [48, 57, 66],
2236 [65, 90, 67],
2237 [95, 95, 68],
2238 [97, 122, 69]
2239 ],
2240 nil_array,
2241 nil_array,
2242 [
2243 [97, 122, 70]
2244 ],
2245 [
2246 [48, 57, 71],
2247 [65, 90, 72],
2248 [95, 95, 73],
2249 [97, 97, 74],
2250 [98, 98, 75],
2251 [99, 109, 74],
2252 [110, 110, 76],
2253 [111, 114, 74],
2254 [115, 115, 77],
2255 [116, 122, 74]
2256 ],
2257 [
2258 [48, 95, -29],
2259 [97, 113, 74],
2260 [114, 114, 78],
2261 [115, 122, 74]
2262 ],
2263 [
2264 [48, 95, -29],
2265 [97, 107, 74],
2266 [108, 108, 79],
2267 [109, 110, 74],
2268 [111, 111, 80],
2269 [112, 122, 74]
2270 ],
2271 [
2272 [48, 95, -29],
2273 [97, 110, 74],
2274 [111, 111, 81],
2275 [112, 122, 74]
2276 ],
2277 [
2278 [48, 107, -31],
2279 [108, 108, 82],
2280 [109, 109, 74],
2281 [110, 110, 83],
2282 [111, 119, 74],
2283 [120, 120, 84],
2284 [121, 122, 74]
2285 ],
2286 [
2287 [48, 95, -29],
2288 [97, 97, 85],
2289 [98, 110, 74],
2290 [111, 111, 86],
2291 [112, 116, 74],
2292 [117, 117, 87],
2293 [118, 122, 74]
2294 ],
2295 [
2296 [48, 95, -29],
2297 [97, 122, 74]
2298 ],
2299 [
2300 [48, 95, -29],
2301 [97, 101, 74],
2302 [102, 102, 88],
2303 [103, 108, 74],
2304 [109, 109, 89],
2305 [110, 110, 90],
2306 [111, 114, 74],
2307 [115, 115, 91],
2308 [116, 122, 74]
2309 ],
2310 [
2311 [48, 95, -29],
2312 [97, 97, 92],
2313 [98, 110, 74],
2314 [111, 111, 93],
2315 [112, 122, 74]
2316 ],
2317 [
2318 [48, 95, -29],
2319 [97, 100, 74],
2320 [101, 101, 94],
2321 [102, 110, 74],
2322 [111, 111, 95],
2323 [112, 116, 74],
2324 [117, 117, 96],
2325 [118, 122, 74]
2326 ],
2327 [
2328 [48, 95, -29],
2329 [97, 109, 74],
2330 [110, 110, 97],
2331 [111, 113, 74],
2332 [114, 114, 98],
2333 [115, 122, 74]
2334 ],
2335 [
2336 [48, 95, -29],
2337 [97, 97, 99],
2338 [98, 113, 74],
2339 [114, 114, 100],
2340 [115, 122, 74]
2341 ],
2342 [
2343 [48, 100, -38],
2344 [101, 101, 101],
2345 [102, 122, 74]
2346 ],
2347 [
2348 [48, 100, -38],
2349 [101, 101, 102],
2350 [102, 111, 74],
2351 [112, 112, 103],
2352 [113, 116, 74],
2353 [117, 117, 104],
2354 [118, 122, 74]
2355 ],
2356 [
2357 [48, 95, -29],
2358 [97, 103, 74],
2359 [104, 104, 105],
2360 [105, 113, 74],
2361 [114, 114, 106],
2362 [115, 120, 74],
2363 [121, 121, 107],
2364 [122, 122, 74]
2365 ],
2366 [
2367 [48, 109, -39],
2368 [110, 110, 108],
2369 [111, 122, 74]
2370 ],
2371 [
2372 [48, 95, -29],
2373 [97, 97, 109],
2374 [98, 122, 74]
2375 ],
2376 [
2377 [48, 103, -43],
2378 [104, 104, 110],
2379 [105, 113, 74],
2380 [114, 114, 111],
2381 [115, 122, 74]
2382 ],
2383 [
2384 [0, 9, 112],
2385 [11, 12, 112],
2386 [14, 33, 112],
2387 [34, 34, 113],
2388 [35, 91, 112],
2389 [92, 92, 114],
2390 [93, 122, 112],
2391 [123, 123, 115],
2392 [124, 255, 112]
2393 ],
2394 nil_array,
2395 nil_array,
2396 [
2397 [0, 255, -8]
2398 ],
2399 nil_array,
2400 [
2401 [0, 9, 116],
2402 [11, 12, 116],
2403 [14, 255, 116]
2404 ],
2405 nil_array,
2406 [
2407 [0, 255, -9]
2408 ],
2409 nil_array,
2410 [
2411 [10, 10, 117]
2412 ],
2413 [
2414 [0, 255, -11]
2415 ],
2416 nil_array,
2417 nil_array,
2418 nil_array,
2419 [
2420 [46, 46, 118]
2421 ],
2422 [
2423 [48, 57, 60]
2424 ],
2425 [
2426 [48, 57, 60]
2427 ],
2428 nil_array,
2429 [
2430 [62, 62, 119]
2431 ],
2432 nil_array,
2433 nil_array,
2434 [
2435 [48, 122, -25]
2436 ],
2437 [
2438 [48, 122, -25]
2439 ],
2440 [
2441 [48, 122, -25]
2442 ],
2443 [
2444 [48, 122, -25]
2445 ],
2446 [
2447 [48, 57, 120],
2448 [65, 90, 121],
2449 [95, 95, 122],
2450 [97, 122, 123]
2451 ],
2452 [
2453 [48, 122, -35]
2454 ],
2455 [
2456 [48, 122, -35]
2457 ],
2458 [
2459 [48, 122, -35]
2460 ],
2461 [
2462 [48, 122, -35]
2463 ],
2464 [
2465 [48, 110, -32],
2466 [111, 111, 124],
2467 [112, 114, 74],
2468 [115, 115, 125],
2469 [116, 122, 74]
2470 ],
2471 [
2472 [48, 95, -29],
2473 [97, 99, 74],
2474 [100, 100, 126],
2475 [101, 122, 74]
2476 ],
2477 [
2478 [48, 95, -29],
2479 [97, 114, 74],
2480 [115, 115, 127],
2481 [116, 122, 74]
2482 ],
2483 [
2484 [48, 100, -38],
2485 [101, 101, 128],
2486 [102, 122, 74]
2487 ],
2488 [
2489 [48, 95, -29],
2490 [97, 97, 129],
2491 [98, 122, 74]
2492 ],
2493 [
2494 [48, 109, -39],
2495 [110, 110, 130],
2496 [111, 122, 74]
2497 ],
2498 [
2499 [48, 122, -35]
2500 ],
2501 [
2502 [48, 114, -79],
2503 [115, 115, 131],
2504 [116, 122, 74]
2505 ],
2506 [
2507 [48, 99, -78],
2508 [100, 100, 132],
2509 [101, 122, 74]
2510 ],
2511 [
2512 [48, 95, -29],
2513 [97, 115, 74],
2514 [116, 116, 133],
2515 [117, 122, 74]
2516 ],
2517 [
2518 [48, 107, -31],
2519 [108, 108, 134],
2520 [109, 122, 74]
2521 ],
2522 [
2523 [48, 113, -30],
2524 [114, 114, 135],
2525 [115, 122, 74]
2526 ],
2527 [
2528 [48, 109, -39],
2529 [110, 110, 136],
2530 [111, 122, 74]
2531 ],
2532 [
2533 [48, 122, -35]
2534 ],
2535 [
2536 [48, 95, -29],
2537 [97, 111, 74],
2538 [112, 112, 137],
2539 [113, 122, 74]
2540 ],
2541 [
2542 [48, 95, -29],
2543 [97, 104, 74],
2544 [105, 105, 138],
2545 [106, 115, 74],
2546 [116, 116, 139],
2547 [117, 122, 74]
2548 ],
2549 [
2550 [48, 95, -29],
2551 [97, 97, 140],
2552 [98, 114, 74],
2553 [115, 115, 141],
2554 [116, 122, 74]
2555 ],
2556 [
2557 [48, 97, -29],
2558 [98, 98, 142],
2559 [99, 122, 74]
2560 ],
2561 [
2562 [48, 110, -32],
2563 [111, 111, 143],
2564 [112, 122, 74]
2565 ],
2566 [
2567 [48, 95, -29],
2568 [97, 118, 74],
2569 [119, 119, 144],
2570 [120, 122, 74]
2571 ],
2572 [
2573 [48, 115, -86],
2574 [116, 116, 145],
2575 [117, 122, 74]
2576 ],
2577 [
2578 [48, 107, -31],
2579 [108, 108, 146],
2580 [109, 122, 74]
2581 ],
2582 [
2583 [48, 95, -29],
2584 [97, 98, 74],
2585 [99, 99, 147],
2586 [100, 122, 74]
2587 ],
2588 [
2589 [48, 122, -35]
2590 ],
2591 [
2592 [48, 98, -99],
2593 [99, 99, 148],
2594 [100, 122, 74]
2595 ],
2596 [
2597 [48, 104, -92],
2598 [105, 105, 149],
2599 [106, 110, 74],
2600 [111, 111, 150],
2601 [112, 122, 74]
2602 ],
2603 [
2604 [48, 95, -29],
2605 [97, 97, 151],
2606 [98, 99, 74],
2607 [100, 100, 152],
2608 [101, 115, 74],
2609 [116, 116, 153],
2610 [117, 122, 74]
2611 ],
2612 [
2613 [48, 107, -31],
2614 [108, 108, 154],
2615 [109, 122, 74]
2616 ],
2617 [
2618 [48, 100, -38],
2619 [101, 101, 155],
2620 [102, 122, 74]
2621 ],
2622 [
2623 [48, 111, -91],
2624 [112, 112, 156],
2625 [113, 122, 74]
2626 ],
2627 [
2628 [48, 100, -38],
2629 [101, 101, 157],
2630 [102, 122, 74]
2631 ],
2632 [
2633 [48, 95, -29],
2634 [97, 116, 74],
2635 [117, 117, 158],
2636 [118, 122, 74]
2637 ],
2638 [
2639 [48, 111, -91],
2640 [112, 112, 159],
2641 [113, 122, 74]
2642 ],
2643 [
2644 [48, 104, -92],
2645 [105, 105, 160],
2646 [106, 122, 74]
2647 ],
2648 [
2649 [48, 113, -30],
2650 [114, 114, 161],
2651 [115, 122, 74]
2652 ],
2653 [
2654 [48, 104, -92],
2655 [105, 105, 162],
2656 [106, 122, 74]
2657 ],
2658 [
2659 [48, 104, -92],
2660 [105, 105, 163],
2661 [106, 122, 74]
2662 ],
2663 [
2664 [0, 255, -47]
2665 ],
2666 nil_array,
2667 [
2668 [0, 9, 164],
2669 [11, 12, 164],
2670 [14, 255, 164]
2671 ],
2672 nil_array,
2673 [
2674 [0, 255, -8]
2675 ],
2676 nil_array,
2677 nil_array,
2678 nil_array,
2679 [
2680 [48, 122, -72]
2681 ],
2682 [
2683 [48, 122, -72]
2684 ],
2685 [
2686 [48, 122, -72]
2687 ],
2688 [
2689 [48, 122, -72]
2690 ],
2691 [
2692 [48, 113, -30],
2693 [114, 114, 165],
2694 [115, 122, 74]
2695 ],
2696 [
2697 [48, 115, -86],
2698 [116, 116, 166],
2699 [117, 122, 74]
2700 ],
2701 [
2702 [48, 122, -35]
2703 ],
2704 [
2705 [48, 100, -38],
2706 [101, 101, 167],
2707 [102, 122, 74]
2708 ],
2709 [
2710 [48, 95, -29],
2711 [97, 97, 168],
2712 [98, 122, 74]
2713 ],
2714 [
2715 [48, 114, -79],
2716 [115, 115, 169],
2717 [116, 122, 74]
2718 ],
2719 [
2720 [48, 115, -86],
2721 [116, 116, 170],
2722 [117, 122, 74]
2723 ],
2724 [
2725 [48, 100, -38],
2726 [101, 101, 171],
2727 [102, 122, 74]
2728 ],
2729 [
2730 [48, 122, -35]
2731 ],
2732 [
2733 [48, 100, -38],
2734 [101, 101, 172],
2735 [102, 122, 74]
2736 ],
2737 [
2738 [48, 114, -79],
2739 [115, 115, 173],
2740 [116, 122, 74]
2741 ],
2742 [
2743 [48, 122, -35]
2744 ],
2745 [
2746 [48, 122, -35]
2747 ],
2748 [
2749 [48, 110, -32],
2750 [111, 111, 174],
2751 [112, 122, 74]
2752 ],
2753 [
2754 [48, 115, -86],
2755 [116, 116, 175],
2756 [117, 122, 74]
2757 ],
2758 [
2759 [48, 100, -38],
2760 [101, 101, 176],
2761 [102, 113, 74],
2762 [114, 114, 177],
2763 [115, 122, 74]
2764 ],
2765 [
2766 [48, 122, -35]
2767 ],
2768 [
2769 [48, 100, -38],
2770 [101, 101, 178],
2771 [102, 122, 74]
2772 ],
2773 [
2774 [48, 100, -38],
2775 [101, 101, 179],
2776 [102, 122, 74]
2777 ],
2778 [
2779 [48, 111, -91],
2780 [112, 112, 180],
2781 [113, 122, 74]
2782 ],
2783 [
2784 [48, 122, -35]
2785 ],
2786 [
2787 [48, 122, -35]
2788 ],
2789 [
2790 [48, 107, -31],
2791 [108, 108, 181],
2792 [109, 122, 74]
2793 ],
2794 [
2795 [48, 100, -38],
2796 [101, 101, 182],
2797 [102, 122, 74]
2798 ],
2799 [
2800 [48, 95, -29],
2801 [97, 106, 74],
2802 [107, 107, 183],
2803 [108, 122, 74]
2804 ],
2805 [
2806 [48, 95, -29],
2807 [97, 117, 74],
2808 [118, 118, 184],
2809 [119, 122, 74]
2810 ],
2811 [
2812 [48, 115, -86],
2813 [116, 116, 185],
2814 [117, 122, 74]
2815 ],
2816 [
2817 [48, 99, -78],
2818 [100, 100, 186],
2819 [101, 122, 74]
2820 ],
2821 [
2822 [48, 100, -38],
2823 [101, 101, 187],
2824 [102, 122, 74]
2825 ],
2826 [
2827 [48, 116, -108],
2828 [117, 117, 188],
2829 [118, 122, 74]
2830 ],
2831 [
2832 [48, 101, -36],
2833 [102, 102, 189],
2834 [103, 122, 74]
2835 ],
2836 [
2837 [48, 98, -99],
2838 [99, 99, 190],
2839 [100, 122, 74]
2840 ],
2841 [
2842 [48, 100, -38],
2843 [101, 101, 191],
2844 [102, 122, 74]
2845 ],
2846 [
2847 [48, 109, -39],
2848 [110, 110, 192],
2849 [111, 122, 74]
2850 ],
2851 [
2852 [48, 100, -38],
2853 [101, 101, 193],
2854 [102, 122, 74]
2855 ],
2856 [
2857 [48, 100, -38],
2858 [101, 101, 194],
2859 [102, 122, 74]
2860 ],
2861 [
2862 [48, 117, -151],
2863 [118, 118, 195],
2864 [119, 122, 74]
2865 ],
2866 [
2867 [48, 122, -35]
2868 ],
2869 [
2870 [48, 107, -31],
2871 [108, 108, 196],
2872 [109, 122, 74]
2873 ],
2874 [
2875 [48, 115, -86],
2876 [116, 116, 197],
2877 [117, 122, 74]
2878 ],
2879 [
2880 [0, 255, -47]
2881 ],
2882 [
2883 [48, 115, -86],
2884 [116, 116, 198],
2885 [117, 122, 74]
2886 ],
2887 [
2888 [48, 113, -30],
2889 [114, 114, 199],
2890 [115, 122, 74]
2891 ],
2892 [
2893 [48, 113, -30],
2894 [114, 114, 200],
2895 [115, 122, 74]
2896 ],
2897 [
2898 [48, 106, -150],
2899 [107, 107, 201],
2900 [108, 122, 74]
2901 ],
2902 [
2903 [48, 114, -79],
2904 [115, 115, 202],
2905 [116, 122, 74]
2906 ],
2907 [
2908 [48, 104, -92],
2909 [105, 105, 203],
2910 [106, 122, 74]
2911 ],
2912 [
2913 [48, 122, -35]
2914 ],
2915 [
2916 [48, 113, -30],
2917 [114, 114, 204],
2918 [115, 122, 74]
2919 ],
2920 [
2921 [48, 100, -38],
2922 [101, 101, 205],
2923 [102, 122, 74]
2924 ],
2925 [
2926 [48, 113, -30],
2927 [114, 114, 206],
2928 [115, 122, 74]
2929 ],
2930 [
2931 [48, 122, -35]
2932 ],
2933 [
2934 [48, 113, -30],
2935 [114, 114, 207],
2936 [115, 122, 74]
2937 ],
2938 [
2939 [48, 116, -108],
2940 [117, 117, 208],
2941 [118, 122, 74]
2942 ],
2943 [
2944 [48, 115, -86],
2945 [116, 116, 209],
2946 [117, 122, 74]
2947 ],
2948 [
2949 [48, 107, -31],
2950 [108, 108, 210],
2951 [109, 122, 74]
2952 ],
2953 [
2954 [48, 122, -35]
2955 ],
2956 [
2957 [48, 95, -29],
2958 [97, 97, 211],
2959 [98, 122, 74]
2960 ],
2961 [
2962 [48, 122, -35]
2963 ],
2964 [
2965 [48, 95, -29],
2966 [97, 97, 212],
2967 [98, 122, 74]
2968 ],
2969 [
2970 [48, 95, -29],
2971 [97, 97, 213],
2972 [98, 122, 74]
2973 ],
2974 [
2975 [48, 100, -38],
2976 [101, 101, 214],
2977 [102, 122, 74]
2978 ],
2979 [
2980 [48, 95, -29],
2981 [97, 97, 215],
2982 [98, 122, 74]
2983 ],
2984 [
2985 [48, 101, -36],
2986 [102, 102, 216],
2987 [103, 122, 74]
2988 ],
2989 [
2990 [48, 113, -30],
2991 [114, 114, 217],
2992 [115, 122, 74]
2993 ],
2994 [
2995 [48, 122, -35]
2996 ],
2997 [
2998 [48, 104, -92],
2999 [105, 105, 218],
3000 [106, 122, 74]
3001 ],
3002 [
3003 [48, 113, -30],
3004 [114, 114, 219],
3005 [115, 122, 74]
3006 ],
3007 [
3008 [48, 122, -35]
3009 ],
3010 [
3011 [48, 122, -35]
3012 ],
3013 [
3014 [48, 122, -35]
3015 ],
3016 [
3017 [48, 100, -38],
3018 [101, 101, 220],
3019 [102, 122, 74]
3020 ],
3021 [
3022 [48, 100, -38],
3023 [101, 101, 221],
3024 [102, 122, 74]
3025 ],
3026 [
3027 [48, 95, -29],
3028 [97, 97, 222],
3029 [98, 122, 74]
3030 ],
3031 [
3032 [48, 122, -35]
3033 ],
3034 [
3035 [48, 95, -29],
3036 [97, 97, 223],
3037 [98, 122, 74]
3038 ],
3039 [
3040 [48, 115, -86],
3041 [116, 116, 224],
3042 [117, 122, 74]
3043 ],
3044 [
3045 [48, 122, -35]
3046 ],
3047 [
3048 [48, 122, -35]
3049 ],
3050 [
3051 [48, 109, -39],
3052 [110, 110, 225],
3053 [111, 122, 74]
3054 ],
3055 [
3056 [48, 109, -39],
3057 [110, 110, 226],
3058 [111, 122, 74]
3059 ],
3060 [
3061 [48, 122, -35]
3062 ],
3063 [
3064 [48, 115, -86],
3065 [116, 116, 227],
3066 [117, 122, 74]
3067 ],
3068 [
3069 [48, 101, -36],
3070 [102, 102, 228],
3071 [103, 109, 74],
3072 [110, 110, 229],
3073 [111, 122, 74]
3074 ],
3075 [
3076 [48, 99, -78],
3077 [100, 100, 230],
3078 [101, 122, 74]
3079 ],
3080 [
3081 [48, 122, -35]
3082 ],
3083 [
3084 [48, 122, -35]
3085 ],
3086 [
3087 [48, 97, -29],
3088 [98, 98, 231],
3089 [99, 122, 74]
3090 ],
3091 [
3092 [48, 95, -29],
3093 [97, 102, 74],
3094 [103, 103, 232],
3095 [104, 122, 74]
3096 ],
3097 [
3098 [48, 115, -86],
3099 [116, 116, 233],
3100 [117, 122, 74]
3101 ],
3102 [
3103 [48, 98, -99],
3104 [99, 99, 234],
3105 [100, 122, 74]
3106 ],
3107 [
3108 [48, 97, -29],
3109 [98, 98, 235],
3110 [99, 122, 74]
3111 ],
3112 [
3113 [48, 122, -35]
3114 ],
3115 [
3116 [48, 109, -39],
3117 [110, 110, 236],
3118 [111, 122, 74]
3119 ],
3120 [
3121 [48, 95, -29],
3122 [97, 97, 237],
3123 [98, 122, 74]
3124 ],
3125 [
3126 [48, 122, -35]
3127 ],
3128 [
3129 [48, 113, -30],
3130 [114, 114, 238],
3131 [115, 122, 74]
3132 ],
3133 [
3134 [48, 122, -35]
3135 ],
3136 [
3137 [48, 97, -29],
3138 [98, 98, 239],
3139 [99, 122, 74]
3140 ],
3141 [
3142 [48, 98, -99],
3143 [99, 99, 240],
3144 [100, 122, 74]
3145 ],
3146 [
3147 [48, 122, -35]
3148 ],
3149 [
3150 [48, 116, -108],
3151 [117, 117, 241],
3152 [118, 122, 74]
3153 ],
3154 [
3155 [48, 122, -35]
3156 ],
3157 [
3158 [48, 122, -35]
3159 ],
3160 [
3161 [48, 95, -29],
3162 [97, 97, 242],
3163 [98, 122, 74]
3164 ],
3165 [
3166 [48, 122, -35]
3167 ],
3168 [
3169 [48, 100, -38],
3170 [101, 101, 243],
3171 [102, 122, 74]
3172 ],
3173 [
3174 [48, 107, -31],
3175 [108, 108, 244],
3176 [109, 122, 74]
3177 ],
3178 [
3179 [48, 100, -38],
3180 [101, 101, 245],
3181 [102, 122, 74]
3182 ],
3183 [
3184 [48, 100, -38],
3185 [101, 101, 246],
3186 [102, 122, 74]
3187 ],
3188 [
3189 [48, 115, -86],
3190 [116, 116, 247],
3191 [117, 122, 74]
3192 ],
3193 [
3194 [48, 107, -31],
3195 [108, 108, 248],
3196 [109, 122, 74]
3197 ],
3198 [
3199 [48, 122, -35]
3200 ],
3201 [
3202 [48, 107, -31],
3203 [108, 108, 249],
3204 [109, 122, 74]
3205 ],
3206 [
3207 [48, 114, -79],
3208 [115, 115, 250],
3209 [116, 122, 74]
3210 ],
3211 [
3212 [48, 107, -31],
3213 [108, 108, 251],
3214 [109, 122, 74]
3215 ],
3216 [
3217 [48, 115, -86],
3218 [116, 116, 252],
3219 [117, 122, 74]
3220 ],
3221 [
3222 [48, 100, -38],
3223 [101, 101, 253],
3224 [102, 122, 74]
3225 ],
3226 [
3227 [48, 98, -99],
3228 [99, 99, 254],
3229 [100, 122, 74]
3230 ],
3231 [
3232 [48, 122, -35]
3233 ],
3234 [
3235 [48, 100, -38],
3236 [101, 101, 255],
3237 [102, 122, 74]
3238 ],
3239 [
3240 [48, 122, -35]
3241 ],
3242 [
3243 [48, 122, -35]
3244 ],
3245 [
3246 [48, 100, -38],
3247 [101, 101, 256],
3248 [102, 122, 74]
3249 ],
3250 [
3251 [48, 100, -38],
3252 [101, 101, 257],
3253 [102, 122, 74]
3254 ],
3255 [
3256 [48, 122, -35]
3257 ],
3258 [
3259 [48, 95, -29],
3260 [97, 97, 258],
3261 [98, 122, 74]
3262 ],
3263 [
3264 [48, 100, -38],
3265 [101, 101, 259],
3266 [102, 122, 74]
3267 ],
3268 [
3269 [48, 122, -35]
3270 ],
3271 [
3272 [48, 122, -35]
3273 ],
3274 [
3275 [48, 100, -38],
3276 [101, 101, 260],
3277 [102, 122, 74]
3278 ],
3279 [
3280 [48, 122, -35]
3281 ],
3282 [
3283 [48, 99, -78],
3284 [100, 100, 261],
3285 [101, 122, 74]
3286 ],
3287 [
3288 [48, 122, -35]
3289 ],
3290 [
3291 [48, 107, -31],
3292 [108, 108, 262],
3293 [109, 122, 74]
3294 ],
3295 [
3296 [48, 122, -35]
3297 ],
3298 [
3299 [48, 122, -35]
3300 ],
3301 [
3302 [48, 122, -35]
3303 ],
3304 [
3305 [48, 122, -35]
3306 ]
3307 ]
3308 ]
3309 end
3310
3311 private fun nil_array: Array[Array[Int]]
3312 do
3313 return once new Array[Array[Int]]
3314 end
3315
3316 var _accept_table: Array[Array[Int]]
3317 private fun build_accept_table do
3318 _accept_table = once [
3319 [
3320 -1,0,1,1,0,77,-1,-1,69,-1,52,53,67,65,56,66,64,68,81,57,72,59,74,78,54,55,-1,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,1,71,-1,84,-1,85,-1,2,2,-1,83,60,61,63,82,-1,58,73,70,75,78,78,78,78,80,79,79,79,79,79,79,48,79,79,79,16,79,79,79,79,79,79,25,79,31,15,79,79,79,79,79,79,33,79,79,79,79,79,79,79,79,79,79,79,79,79,-1,87,-1,86,-1,2,62,76,80,80,80,80,79,79,32,79,79,79,79,79,10,79,79,30,11,79,79,79,41,79,79,79,40,34,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,19,79,79,-1,79,79,79,79,79,79,27,79,79,79,13,79,79,79,79,29,47,42,79,79,79,79,79,79,44,79,79,26,45,12,79,79,79,38,79,79,37,5,79,79,46,79,79,79,50,51,79,79,79,79,79,14,79,79,43,79,28,79,79,39,79,21,4,79,20,79,79,79,79,79,79,35,79,79,79,79,79,79,24,79,3,23,79,79,9,79,79,6,36,79,49,79,17,79,18,7,22,8
3321
3322 ]
3323 ]
3324 end
3325 end
3326