comparison tests/agcl/oldagsrc/good/pgg24a.cpp @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 /*
2 AnaGram Syntax Analyzer.
3 Copyright (c) Jerome T. Holland, 1989, 1990, 1991, 1992
4 All Rights Reserved.
5 */
6 #include HEADERS
7 #include STDLIB
8 #include STDIO
9 #include STRING
10 #include DATA
11 #include TREES
12 #include STK
13 #include CTYPE
14 #include ASSERT
15 #include PGG
16 #include MYALLOC
17 #include UT
18
19 /*
20 * AnaGram, A System for Syntax Directed Programming
21 * File generated by: ...
22 *
23 * AnaGram Parsing Engine
24 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
25 *
26 * This software is provided 'as-is', without any express or implied
27 * warranty. In no event will the authors be held liable for any damages
28 * arising from the use of this software.
29 *
30 * Permission is granted to anyone to use this software for any purpose,
31 * including commercial applications, and to alter it and redistribute it
32 * freely, subject to the following restrictions:
33 *
34 * 1. The origin of this software must not be misrepresented; you must not
35 * claim that you wrote the original software. If you use this software
36 * in a product, an acknowledgment in the product documentation would be
37 * appreciated but is not required.
38 * 2. Altered source versions must be plainly marked as such, and must not be
39 * misrepresented as being the original software.
40 * 3. This notice may not be removed or altered from any source distribution.
41 */
42
43 #ifndef PGG24A_H
44 #include "pgg24a.h"
45 #endif
46
47 #ifndef PGG24A_H
48 #error Mismatched header file
49 #endif
50
51 #include <ctype.h>
52 #include <stdio.h>
53
54 #define RULE_CONTEXT (&((PCB).cs[(PCB).ssx]))
55 #define ERROR_CONTEXT ((PCB).cs[(PCB).error_frame_ssx])
56 #define CONTEXT ((PCB).cs[(PCB).ssx])
57
58
59 #define CHANGE_REDUCTION(x) pgg_change_reduction(pgg_##x##_token)
60 int pgg_change_reduction(pgg_token_type);
61
62 #define TOKEN_NAMES pgg_token_names
63 const char *const pgg_token_names[243] = {
64 "syntax definition",
65 "",
66 "\"->\"",
67 "",
68 "",
69 "",
70 "",
71 "','",
72 "",
73 "",
74 "",
75 "\"...\"",
76 "",
77 "'='",
78 "",
79 "'!'",
80 "",
81 "'{'",
82 "",
83 "'['",
84 "",
85 "'('",
86 "",
87 "'-'",
88 "",
89 "'+'",
90 "",
91 "']'",
92 "",
93 "'}'",
94 "",
95 "')'",
96 "",
97 "single quote",
98 "",
99 "'~'",
100 "",
101 "'|'",
102 "syntax definition",
103 "",
104 "",
105 "",
106 "",
107 "statement",
108 "",
109 "",
110 "eof",
111 "production",
112 "",
113 "left hand side",
114 "right hand side",
115 "",
116 "",
117 "",
118 "definition",
119 "embedded c",
120 "configuration section",
121 "token name list",
122 "type definition",
123 "",
124 "name",
125 "'$'",
126 "",
127 "",
128 "vp rule spec",
129 "",
130 "",
131 "reduction procedure",
132 "vp rules",
133 "grammar rule",
134 "",
135 "rule element",
136 "parameter name",
137 "",
138 "c expression",
139 "';'",
140 "type name",
141 "",
142 "",
143 "",
144 "\"::\"",
145 "",
146 "",
147 "",
148 "",
149 "template field head",
150 "'>'",
151 "'<'",
152 "",
153 "",
154 "'*'",
155 "",
156 "",
157 "letter",
158 "",
159 "",
160 "\"enum\"",
161 "blank char",
162 "c comment",
163 "continuation",
164 "comment",
165 "",
166 "carriage return",
167 "",
168 "newline",
169 "",
170 "vertical space",
171 "\"//\"",
172 "",
173 "",
174 "",
175 "character",
176 "signed number",
177 "'^'",
178 "",
179 "quoted character",
180 "char const",
181 "",
182 "",
183 "",
184 "decimal number",
185 "'0'",
186 "octal number",
187 "\"0x\"",
188 "\"0X\"",
189 "",
190 "hex number",
191 "",
192 "",
193 "",
194 "hex digit",
195 "",
196 "token",
197 "mid rule action",
198 "",
199 "virtual production",
200 "",
201 "",
202 "'&'",
203 "",
204 "",
205 "escape sequence",
206 "octal escape",
207 "",
208 "hex escape",
209 "character range",
210 "\"..\"",
211 "enum definition",
212 "enum statement",
213 "keyword string",
214 "keyword string head",
215 "string",
216 "double quote",
217 "",
218 "",
219 "",
220 "string char",
221 "simple string char",
222 "\"\\\\a\"",
223 "\"\\\\b\"",
224 "\"\\\\f\"",
225 "\"\\\\n\"",
226 "\"\\\\r\"",
227 "\"\\\\t\"",
228 "\"\\\\v\"",
229 "\"\\\\\\\\\"",
230 "\"\\\\?\"",
231 "\"\\\\\\'\"",
232 "\"\\\\\\\"\"",
233 "",
234 "backslash",
235 "",
236 "\"\\\\x\"",
237 "any digit",
238 "nonoctal digit",
239 "':'",
240 "",
241 "",
242 "configuration parameters",
243 "configuration parameter list",
244 "",
245 "configuration parameter",
246 "attribute statement",
247 "keyword kluge",
248 "\"distinguish\"",
249 "\"left\"",
250 "token list",
251 "\"right\"",
252 "\"nonassoc\"",
253 "\"sticky\"",
254 "\"subgrammar\"",
255 "\"hidden\"",
256 "",
257 "",
258 "\"disregard\"",
259 "\"lexeme\"",
260 "\"reserve\"",
261 "\"keywords\"",
262 "\"rename\"",
263 "\"macro\"",
264 "macro name",
265 "",
266 "tokens",
267 "'\\?'",
268 "\"}...\"",
269 "\"]...\"",
270 "\"?...\"",
271 "\"}/...\"",
272 "\"]/...\"",
273 "embedded c head",
274 "",
275 "",
276 "",
277 "",
278 "c code first",
279 "",
280 "",
281 "c character constant",
282 "c string constant",
283 "",
284 "simple c char",
285 "",
286 "",
287 "",
288 "",
289 "\"\\\\\\n\"",
290 "",
291 "\"*/\"",
292 "\"/*\"",
293 "",
294 "c literal elem",
295 "",
296 "",
297 "",
298 "",
299 "",
300 "",
301 "",
302 "",
303 "",
304 "",
305 "",
306 "",
307
308 };
309
310
311 /* Line -, pgg24a.syn */
312 int null_warning(int n) {
313 extern void warning_here(const char *,...);
314 if (n == 0) warning_here("Null character in keyword string");
315 return n;
316 }
317 /* Line -, pgg24a.syn */
318 pgg_pcb_type pgcb;
319 #define PCB pgcb
320
321 #define PARSER_STACK_OVERFLOW parse_stack_overflow()
322 #define SYNTAX_ERROR log_syntax_error()
323 #define GET_CONTEXT CONTEXT.y = PCB.line, CONTEXT.x = PCB.column;
324
325 #define REDUCTION_TOKEN_ERROR reduction_token_error()
326
327 int save_case_sensitive;
328
329 void reduction_token_error(void) {
330 assert(0);
331 }
332
333 extern tsd *rename_macro_list;
334
335 extern int parse_abort_flag;
336 void log_error_location(int, int);
337 void log_error(void);
338 void show_error(void);
339
340 void parse_stack_overflow(void) {
341 int eline = PCB.line, ecol = PCB.column;
342 reset_stk();
343 log_error_location(ecol,eline);
344 ass("Nesting too deep");
345 log_error();
346 sss("Syntax Analysis aborted");
347 show_error();
348 parse_abort_flag = 1;
349 PCB.exit_flag = AG_SEMANTIC_ERROR_CODE;
350 }
351
352 extern string_dict *cast_dict;
353 extern int character_seen;
354 extern int enum_base;
355 extern unsigned char *input_base;
356 extern int nest_comments;
357 extern int precedence_level;
358 extern int syntax_error_flag;
359 extern int case_sensitive;
360 extern int n_statements;
361
362 void log_error_location(int,int);
363 void log_error_here(void);
364 void log_error(void);
365
366 //node make_or_node(node,node);
367 //node make_and_node(node,node);
368 //node make_minus_node(node,node);
369 //node make_tilde_node(node);
370 //node ss1(int);
371 //node ss2(void);
372 CharSetExpression *ss2(void);
373 //node ss3(void);
374
375 void acs(int);
376 void aws(int);
377 void atkn(unsigned);
378 void copyoff(void);
379 void copyon(void);
380 //void definition_1(node);
381 void definition_1(CharSetExpression *);
382 void definition_2(int);
383 void definition_3(int);
384 //int form_element_1(node);
385 int form_element_1(CharSetExpression *);
386 int form_spec_2(int, int);
387 int form1(void);
388 int form2(void);
389 void gp2(void);
390 void gp3(void);
391 void gp4(int);
392 void gp5(int);
393 int head_list_1(int);
394 int head_list_2(int);
395 static int head_list_3(int);
396 void ics(void);
397 //int identify_node(node);
398 int identify_node(CharSetExpression *);
399 //void init_reserve(int);
400 void iws(void);
401 int mid_line(int);
402 int new_cast_spec_1(void);
403 int new_cast_spec_2(void);
404 //void new_reserve(void);
405 int null_warning(int);
406 /* void pf2(int, int, int); */
407 void pf2x(int, int);
408 int pr3(int);
409 int pr4(int);
410 int proc_spec_4(int);
411 int proc_spec_5(void);
412 void production(int);
413 void range(int, int);
414 void scs(int);
415 static void set_prec(int,int);
416 /*
417 void suppress(void);
418 void suppress_all(void);
419 void suppress_except(void);
420 void suppress_initial(void);
421 */
422 void sws(int);
423 void tp4(int);
424 int vp_form3(int);
425 int vp_s(void);
426 int vp_1(void);
427 int vp_2(void);
428 int vp_3(void);
429 int vp_4(void);
430 int vp_5(int);
431 int vp_6(int);
432 int vp_7(int);
433 int vp_8(int);
434 int vp_8a(int);
435 int vp_9(void);
436 int vp_10(void);
437
438 /*
439 static int reserve(int pt) {
440 int key = map_token_number[vp_s()].key;
441 map_key_word[key].reserve = pt;
442 return pt;
443 }
444 */
445
446 /*
447 static void anomalous(void) {
448 map_token_number[vp_s()].anomalous = 1;
449 }
450 */
451
452 int *disregard_list = NULL;
453 int n_disregard_list = 0;
454
455 static void disregard(int tn) {
456 iws();
457 if (n_disregard_list) {
458 int *p = disregard_list;
459 while (n_disregard_list--) aws(*p++);
460 free(disregard_list);
461 }
462 xws(tn);
463 disregard_list = build_list();
464 n_disregard_list = fis();
465 }
466
467 extern tsd *syntax_errors;
468
469 static void log_syntax_error(void) {
470 int eline = PCB.line, ecol = PCB.column;
471 int flag = PCB.error_frame_token == pgg_c_comment_token ||
472 PCB.error_frame_token == pgg_embedded_c_token;
473
474 reset_stk();
475 if (flag && PCB.token_number == pgg_eof_token) {
476 eline = ERROR_CONTEXT.y;
477 ecol = ERROR_CONTEXT.x;
478 }
479 log_error_location(ecol,eline);
480 apprintf("%s in %s",
481 PCB.error_message,pgg_token_names[PCB.error_frame_token]);
482 log_error();
483 syntax_error_flag++;
484 if (syntax_errors->nt < 50) return;
485 sss("Too many syntax errors, parse aborted");
486 log_error();
487 PCB.exit_flag = AG_SYNTAX_ERROR_CODE;
488 }
489
490 static int head_list_3(int type) {
491 int i, n = tis();
492 for (i = 0; i < n; i ++) {
493 int tn = list_base[i];
494 token_number_map *tp = &map_token_number[tn];
495 int ptt = tp->value_type;
496 if (ptt && ptt != type) {
497 log_error_here();
498 apprintf("Type Redefinition of T%03d: ", tn);
499 atkn(tn);
500 log_error();
501 }
502 tp->value_type = type;
503 if (ptt == 0 && tp->rp_arg && type == void_token_type) {
504 log_error_here();
505 apprintf("Void token, %s, used as parameter",
506 dict_str(tkn_dict,tp->token_name));
507 log_error();
508 }
509 }
510 return type;
511 }
512
513 static void set_prec(int left, int right){
514 int n = tis();
515 precedence_level++;
516 while (n--) {
517 int k = list_base[n];
518 token_number_map *tp = &map_token_number[k];
519 tp->left_associative = left;
520 tp->right_associative = right;
521 tp->precedence_level = precedence_level;
522 }
523 rws();
524 }
525
526 static void set_sticky(void){
527 int n = tis();
528 while (n--) {
529 int k = list_base[n];
530 token_number_map *tp = &map_token_number[k];
531 tp->sticky = 1;
532 }
533 rws();
534 }
535
536 static void set_subgrammar(void){
537 int n = tis();
538 while (n--) {
539 int k = list_base[n];
540 token_number_map *tp = &map_token_number[k];
541 tp->subgrammar = 1;
542 }
543 rws();
544 }
545
546 void set_hidden(void) {
547 int *lb = list_base;
548 int n = tis();
549 while (n--) map_token_number[*lb++].fine_structure = 1;
550 rws();
551 }
552
553 void set_lexeme(void) {
554 int n = tis();
555 while (n--) {
556 token_number_map *tp = &map_token_number[list_base[n]];
557 /* tp->lexeme = tp->subgrammar = 1; */
558 tp->lexeme = 1;
559 }
560 rws();
561 }
562
563 void set_reserved_words(void) {
564 int n = tis();
565 while (n--) {
566 token_number_map *tp = &map_token_number[list_base[n]];
567 tp->reserved_word = 1;
568 }
569 rws();
570 }
571
572 void parse(void) {
573 pgcb.pointer = input_base;
574 pgg();
575 }
576
577 #ifndef CONVERT_CASE
578 #define CONVERT_CASE(c) (c)
579 #endif
580 #ifndef TAB_SPACING
581 #define TAB_SPACING 8
582 #endif
583
584 static void ag_rp_1(void) {
585 /* Line -, pgg24a.syn */
586 n_statements++;
587 }
588
589 static void ag_rp_2(void) {
590 /* Line -, pgg24a.syn */
591 n_statements++;
592 }
593
594 static void ag_rp_3(int t) {
595 /* Line -, pgg24a.syn */
596 production(t);
597 }
598
599 static void ag_rp_4(void) {
600 /* Line -, pgg24a.syn */
601 n_statements++;
602 }
603
604 static void ag_rp_5(int t) {
605 /* Line -, pgg24a.syn */
606 production(t);
607 }
608
609 static void ag_rp_6(void) {
610 /* Line -, pgg24a.syn */
611 n_statements++;
612 }
613
614 static int ag_rp_7(int type) {
615 /* Line -, pgg24a.syn */
616 return iws(),type;
617 }
618
619 static int ag_rp_8(int type) {
620 /* Line -, pgg24a.syn */
621 return concat_list(),type;
622 }
623
624 static int ag_rp_9(void) {
625 /* Line -, pgg24a.syn */
626 return n_statements++, 0;
627 }
628
629 static int ag_rp_10(int d) {
630 /* Line -, pgg24a.syn */
631 return n_statements++, head_list_3(d);
632 }
633
634 static void ag_rp_11(int x) {
635 /* Line -, pgg24a.syn */
636 sws(head_list_2(x));
637 }
638
639 static void ag_rp_12(int x) {
640 /* Line -, pgg24a.syn */
641 aws(head_list_2(x));
642 }
643
644 static int ag_rp_13(void) {
645 /* Line -, pgg24a.syn */
646 return 0;
647 }
648
649 static int ag_rp_14(void) {
650 /* Line -, pgg24a.syn */
651 return 1;
652 }
653
654 static int ag_rp_15(void) {
655 /* Line -, pgg24a.syn */
656 return ids(cast_dict),fis();
657 }
658
659 static void ag_rp_16(int n) {
660 /* Line -, pgg24a.syn */
661 sws(n);
662 }
663
664 static void ag_rp_17(int n) {
665 /* Line -, pgg24a.syn */
666 aws(n);
667 }
668
669 static void ag_rp_18(int pn) {
670 /* Line -, pgg24a.syn */
671 sws((iws(),vp_form3(pn)));
672 }
673
674 static int ag_rp_19(int s) {
675 /* Line -, pgg24a.syn */
676 return vp_form3(s);
677 }
678
679 static void ag_rp_20(int n) {
680 /* Line -, pgg24a.syn */
681 sws(form_spec_2(form1(),n));
682 }
683
684 static void ag_rp_21(int n) {
685 /* Line -, pgg24a.syn */
686 sws(n);
687 }
688
689 static void ag_rp_22(int n) {
690 /* Line -, pgg24a.syn */
691 aws(n);
692 }
693
694 static int ag_rp_23(int s) {
695 /* Line -, pgg24a.syn */
696 return form_spec_2(form2(),s);
697 }
698
699 static void ag_rp_24(int e, int p) {
700 /* Line -, pgg24a.syn */
701 iws(),pf2x(e,p);
702 }
703
704 static void ag_rp_25(int e, int p) {
705 /* Line -, pgg24a.syn */
706 pf2x(e,p);
707 }
708
709 static int ag_rp_26(void) {
710 /* Line -, pgg24a.syn */
711 return 0;
712 }
713
714 static int ag_rp_27(void) {
715 /* Line -, pgg24a.syn */
716 return proc_spec_4(0);
717 }
718
719 static int ag_rp_28(void) {
720 /* Line -, pgg24a.syn */
721 return proc_spec_4(1);
722 }
723
724 static void ag_rp_29(void) {
725 /* Line -, pgg24a.syn */
726 concat_string();
727 }
728
729 static void ag_rp_30(void) {
730 /* Line -, pgg24a.syn */
731 sss("::");
732 }
733
734 static void ag_rp_31(void) {
735 /* Line -, pgg24a.syn */
736 concat_string();
737 }
738
739 static void ag_rp_32(void) {
740 /* Line -, pgg24a.syn */
741 ass("::");
742 }
743
744 static void ag_rp_33(void) {
745 /* Line -, pgg24a.syn */
746 concat_string();
747 }
748
749 static void ag_rp_34(void) {
750 /* Line -, pgg24a.syn */
751 concat_string();
752 }
753
754 static void ag_rp_35(void) {
755 /* Line -, pgg24a.syn */
756 acs('>'), concat_string();
757 }
758
759 static void ag_rp_36(void) {
760 /* Line -, pgg24a.syn */
761 acs('<');
762 }
763
764 static void ag_rp_37(void) {
765 /* Line -, pgg24a.syn */
766 acs(','), concat_string();
767 }
768
769 static void ag_rp_38(void) {
770 /* Line -, pgg24a.syn */
771 scs('(');
772 }
773
774 static void ag_rp_39(void) {
775 /* Line -, pgg24a.syn */
776 concat_string(), acs(')');
777 }
778
779 static void ag_rp_40(void) {
780 /* Line -, pgg24a.syn */
781 sss(" *");
782 }
783
784 static void ag_rp_41(void) {
785 /* Line -, pgg24a.syn */
786 concat_string();
787 }
788
789 static void ag_rp_42(void) {
790 /* Line -, pgg24a.syn */
791 concat_string();
792 }
793
794 static void ag_rp_43(int c) {
795 /* Line -, pgg24a.syn */
796 scs(c);
797 }
798
799 static void ag_rp_44(int c) {
800 /* Line -, pgg24a.syn */
801 acs(c);
802 }
803
804 static void ag_rp_45(int c) {
805 /* Line -, pgg24a.syn */
806 acs(' '), acs(c);
807 }
808
809 static void ag_rp_46(int c) {
810 /* Line -, pgg24a.syn */
811 sss("enum "), acs(c);
812 }
813
814 static void ag_rp_47(int c) {
815 /* Line -, pgg24a.syn */
816 acs(c);
817 }
818
819 static void ag_rp_48(int c) {
820 /* Line -, pgg24a.syn */
821 acs(' '), acs(c);
822 }
823
824 static int ag_rp_49(int x) {
825 /* Line -, pgg24a.syn */
826 return x & 0x1f;
827 }
828
829 static int ag_rp_50(int c) {
830 /* Line -, pgg24a.syn */
831 return (character_seen=1),c;
832 }
833
834 static int ag_rp_51(int s, int n) {
835 /* Line -, pgg24a.syn */
836 return s*n;
837 }
838
839 static int ag_rp_52(void) {
840 /* Line -, pgg24a.syn */
841 return 1;
842 }
843
844 static int ag_rp_53(void) {
845 /* Line -, pgg24a.syn */
846 return -1;
847 }
848
849 static int ag_rp_54(int n) {
850 /* Line -, pgg24a.syn */
851 return n;
852 }
853
854 static int ag_rp_55(int n) {
855 /* Line -, pgg24a.syn */
856 return n;
857 }
858
859 static int ag_rp_56(int d) {
860 /* Line -, pgg24a.syn */
861 return d - '0';
862 }
863
864 static int ag_rp_57(int n, int d) {
865 /* Line -, pgg24a.syn */
866 return 10*n + d - '0';
867 }
868
869 static int ag_rp_58(void) {
870 /* Line -, pgg24a.syn */
871 return 0;
872 }
873
874 static int ag_rp_59(int n, int d) {
875 /* Line -, pgg24a.syn */
876 return 8*n + d - '0';
877 }
878
879 static int ag_rp_60(int d) {
880 /* Line -, pgg24a.syn */
881 return d;
882 }
883
884 static int ag_rp_61(int n, int d) {
885 /* Line -, pgg24a.syn */
886 return 16*n + d;
887 }
888
889 static int ag_rp_62(int d) {
890 /* Line -, pgg24a.syn */
891 return d-'0';
892 }
893
894 static int ag_rp_63(int d) {
895 /* Line -, pgg24a.syn */
896 return (d&7)+9;
897 }
898
899 static int ag_rp_64(int p) {
900 /* Line -, pgg24a.syn */
901 return vp_8a(p);
902 }
903
904 static int ag_rp_65(CharSetExpression * n) {
905 /* Line -, pgg24a.syn */
906 return form_element_1(n);
907 }
908
909 static CharSetExpression * ag_rp_66(CharSetExpression * u, CharSetExpression * i) {
910 /* Line -, pgg24a.syn */
911 return new CharSetUnion(u,i);
912 }
913
914 static CharSetExpression * ag_rp_67(CharSetExpression * u, CharSetExpression * i) {
915 /* Line -, pgg24a.syn */
916 return new CharSetDifference(u,i);
917 }
918
919 static CharSetExpression * ag_rp_68(CharSetExpression * i, CharSetExpression * n) {
920 /* Line -, pgg24a.syn */
921 return new CharSetIntersection(i,n);
922 }
923
924 static CharSetExpression * ag_rp_69(CharSetExpression * n) {
925 /* Line -, pgg24a.syn */
926 return new CharSetComplement(n);
927 }
928
929 static int ag_rp_70(int c) {
930 /* Line -, pgg24a.syn */
931 return case_sensitive ? (c) : toupper(c);
932 }
933
934 static CharSetExpression * ag_rp_71(int c) {
935 /* Line -, pgg24a.syn */
936 return new IndividualCode(c);
937 }
938
939 static CharSetExpression * ag_rp_72(int c) {
940 /* Line -, pgg24a.syn */
941 return new IndividualChar(c);
942 }
943
944 static CharSetExpression * ag_rp_73(void) {
945 /* Line -, pgg24a.syn */
946 return ss2();
947 }
948
949 static CharSetExpression * ag_rp_74(CharSetExpression * x) {
950 /* Line -, pgg24a.syn */
951 return x;
952 }
953
954 static CharSetExpression * ag_rp_75(int l, int r) {
955 /* Line -, pgg24a.syn */
956 return (character_seen=1),new CharRange(l,r);
957 }
958
959 static CharSetExpression * ag_rp_76(int l, int r) {
960 /* Line -, pgg24a.syn */
961 return new CodeRange(l,r);
962 }
963
964 static void ag_rp_77(CharSetExpression * n) {
965 /* Line -, pgg24a.syn */
966 definition_1(n);
967 }
968
969 static void ag_rp_78(int p) {
970 /* Line -, pgg24a.syn */
971 definition_2(p);
972 }
973
974 static void ag_rp_79(int p) {
975 /* Line -, pgg24a.syn */
976 definition_2(vp_8a(p));
977 }
978
979 static void ag_rp_80(void) {
980 /* Line -, pgg24a.syn */
981 definition_3(enum_base++);
982 }
983
984 static void ag_rp_81(int n) {
985 /* Line -, pgg24a.syn */
986 definition_3(enum_base = n), enum_base++;
987 }
988
989 static void ag_rp_82(int n) {
990 /* Line -, pgg24a.syn */
991 definition_3(enum_base = n), enum_base++;
992 }
993
994 static void ag_rp_83(void) {
995 /* Line -, pgg24a.syn */
996 ics();
997 }
998
999 static int ag_rp_84(int n) {
1000 /* Line -, pgg24a.syn */
1001 return null_warning(n);
1002 }
1003
1004 static int ag_rp_85(void) {
1005 /* Line -, pgg24a.syn */
1006 return '\a';
1007 }
1008
1009 static int ag_rp_86(void) {
1010 /* Line -, pgg24a.syn */
1011 return '\b';
1012 }
1013
1014 static int ag_rp_87(void) {
1015 /* Line -, pgg24a.syn */
1016 return '\f';
1017 }
1018
1019 static int ag_rp_88(void) {
1020 /* Line -, pgg24a.syn */
1021 return '\n';
1022 }
1023
1024 static int ag_rp_89(void) {
1025 /* Line -, pgg24a.syn */
1026 return '\r';
1027 }
1028
1029 static int ag_rp_90(void) {
1030 /* Line -, pgg24a.syn */
1031 return '\t';
1032 }
1033
1034 static int ag_rp_91(void) {
1035 /* Line -, pgg24a.syn */
1036 return '\v';
1037 }
1038
1039 static int ag_rp_92(void) {
1040 /* Line -, pgg24a.syn */
1041 return '\\';
1042 }
1043
1044 static int ag_rp_93(void) {
1045 /* Line -, pgg24a.syn */
1046 return '\?';
1047 }
1048
1049 static int ag_rp_94(void) {
1050 /* Line -, pgg24a.syn */
1051 return '\'';
1052 }
1053
1054 static int ag_rp_95(void) {
1055 /* Line -, pgg24a.syn */
1056 return '"';
1057 }
1058
1059 static int ag_rp_96(int n) {
1060 /* Line -, pgg24a.syn */
1061 return n&7;
1062 }
1063
1064 static int ag_rp_97(int n, int d) {
1065 /* Line -, pgg24a.syn */
1066 return n*8 + (d&7);
1067 }
1068
1069 static int ag_rp_98(int n, int d) {
1070 /* Line -, pgg24a.syn */
1071 return n*8 + (d&7);
1072 }
1073
1074 static int ag_rp_99(int x) {
1075 /* Line -, pgg24a.syn */
1076 return x;
1077 }
1078
1079 static void ag_rp_100(int c) {
1080 /* Line -, pgg24a.syn */
1081 acs(c);
1082 }
1083
1084 static void ag_rp_101(int c) {
1085 /* Line -, pgg24a.syn */
1086 acs(c);
1087 }
1088
1089 static void ag_rp_102(int c) {
1090 /* Line -, pgg24a.syn */
1091 acs(c);
1092 }
1093
1094 static void ag_rp_103(int c) {
1095 /* Line -, pgg24a.syn */
1096 acs(c);
1097 }
1098
1099 static void ag_rp_104(int c) {
1100 /* Line -, pgg24a.syn */
1101 acs(c);
1102 }
1103
1104 static void ag_rp_105(int c) {
1105 /* Line -, pgg24a.syn */
1106 acs(null_warning(c));
1107 }
1108
1109 static void ag_rp_106(int c) {
1110 /* Line -, pgg24a.syn */
1111 acs(null_warning(c));
1112 }
1113
1114 static void ag_rp_107(int c) {
1115 /* Line -, pgg24a.syn */
1116 acs(null_warning(c));
1117 }
1118
1119 static void ag_rp_108(int c) {
1120 /* Line -, pgg24a.syn */
1121 acs(null_warning(c));
1122 }
1123
1124 static int ag_rp_109(void) {
1125 /* Line -, pgg24a.syn */
1126 return 0;
1127 }
1128
1129 static int ag_rp_110(void) {
1130 /* Line -, pgg24a.syn */
1131 return ids(cvar_dict),fis();
1132 }
1133
1134 static void ag_rp_111(int c) {
1135 /* Line -, pgg24a.syn */
1136 scs(c);
1137 }
1138
1139 static void ag_rp_112(int c) {
1140 /* Line -, pgg24a.syn */
1141 acs(c);
1142 }
1143
1144 static void ag_rp_113(void) {
1145 /* Line -, pgg24a.syn */
1146 gp4(1);
1147 }
1148
1149 static void ag_rp_114(void) {
1150 /* Line -, pgg24a.syn */
1151 gp4(0);
1152 }
1153
1154 static void ag_rp_115(void) {
1155 /* Line -, pgg24a.syn */
1156 gp2();
1157 }
1158
1159 static void ag_rp_116(void) {
1160 /* Line -, pgg24a.syn */
1161 gp3();
1162 }
1163
1164 static void ag_rp_117(void) {
1165 /* Line -, pgg24a.syn */
1166 gp3();
1167 }
1168
1169 static void ag_rp_118(int n) {
1170 /* Line -, pgg24a.syn */
1171 gp5(n);
1172 }
1173
1174 static void ag_rp_119(void) {
1175 /* Line -, pgg24a.syn */
1176 concat_string(), gp4(1);
1177 }
1178
1179 static void ag_rp_120(void) {
1180 /* Line -, pgg24a.syn */
1181 sss("distinguish_");
1182 }
1183
1184 static void ag_rp_121(void) {
1185 /* Line -, pgg24a.syn */
1186 set_prec(1,0);
1187 }
1188
1189 static void ag_rp_122(void) {
1190 /* Line -, pgg24a.syn */
1191 set_prec(0,1);
1192 }
1193
1194 static void ag_rp_123(void) {
1195 /* Line -, pgg24a.syn */
1196 set_prec(0,0);
1197 }
1198
1199 static void ag_rp_124(void) {
1200 /* Line -, pgg24a.syn */
1201 set_sticky();
1202 }
1203
1204 static void ag_rp_125(void) {
1205 /* Line -, pgg24a.syn */
1206 set_subgrammar();
1207 }
1208
1209 static void ag_rp_126(void) {
1210 /* Line -, pgg24a.syn */
1211 set_hidden();
1212 }
1213
1214 static void ag_rp_127(int t) {
1215 /* Line -, pgg24a.syn */
1216 disregard(t);
1217 }
1218
1219 static void ag_rp_128(void) {
1220 /* Line -, pgg24a.syn */
1221 set_lexeme();
1222 }
1223
1224 static void ag_rp_129(void) {
1225 /* Line -, pgg24a.syn */
1226 set_reserved_words();
1227 }
1228
1229 static void ag_rp_130(int oldName, int newName) {
1230 /* Line -, pgg24a.syn */
1231 at(rename_macro_list,oldName,newName);
1232 }
1233
1234 static int ag_rp_131(void) {
1235 /* Line -, pgg24a.syn */
1236 return (PCB).pointer-input_base-1;
1237 }
1238
1239 static void ag_rp_132(CharSetExpression * n) {
1240 /* Line -, pgg24a.syn */
1241 distinguishSets.push(identify_node(n));
1242 }
1243
1244 static void ag_rp_133(CharSetExpression * n) {
1245 /* Line -, pgg24a.syn */
1246 distinguishSets.push(identify_node(n));
1247 }
1248
1249 static void ag_rp_134(int t) {
1250 /* Line -, pgg24a.syn */
1251 sws(t);
1252 }
1253
1254 static void ag_rp_135(int t) {
1255 /* Line -, pgg24a.syn */
1256 aws(t);
1257 }
1258
1259 static int ag_rp_136(void) {
1260 /* Line -, pgg24a.syn */
1261 return vp_s();
1262 }
1263
1264 static int ag_rp_137(void) {
1265 /* Line -, pgg24a.syn */
1266 return vp_5(vp_s());
1267 }
1268
1269 static int ag_rp_138(void) {
1270 /* Line -, pgg24a.syn */
1271 return vp_1();
1272 }
1273
1274 static int ag_rp_139(void) {
1275 /* Line -, pgg24a.syn */
1276 return vp_2();
1277 }
1278
1279 static int ag_rp_140(void) {
1280 /* Line -, pgg24a.syn */
1281 return vp_3();
1282 }
1283
1284 static int ag_rp_141(void) {
1285 /* Line -, pgg24a.syn */
1286 return vp_4();
1287 }
1288
1289 static int ag_rp_142(CharSetExpression * n) {
1290 /* Line -, pgg24a.syn */
1291 return vp_5(form_element_1(n));
1292 }
1293
1294 static int ag_rp_143(CharSetExpression * n) {
1295 /* Line -, pgg24a.syn */
1296 return vp_6(form_element_1(n));
1297 }
1298
1299 static int ag_rp_144(CharSetExpression * n) {
1300 /* Line -, pgg24a.syn */
1301 return vp_7(form_element_1(n));
1302 }
1303
1304 static int ag_rp_145(void) {
1305 /* Line -, pgg24a.syn */
1306 return vp_9();
1307 }
1308
1309 static int ag_rp_146(void) {
1310 /* Line -, pgg24a.syn */
1311 return vp_10();
1312 }
1313
1314 static int ag_rp_147(void) {
1315 /* Line -, pgg24a.syn */
1316 return mid_line(proc_spec_4(0));
1317 }
1318
1319 static int ag_rp_148(void) {
1320 /* Line -, pgg24a.syn */
1321 return mid_line(proc_spec_4(1));
1322 }
1323
1324 static void ag_rp_149(void) {
1325 /* Line -, pgg24a.syn */
1326 copyon();
1327 }
1328
1329 static void ag_rp_150(void) {
1330 /* Line -, pgg24a.syn */
1331 copyoff();
1332 }
1333
1334 static void ag_rp_151(void) {
1335 /* Line -, pgg24a.syn */
1336 copyoff();
1337 }
1338
1339 static void ag_rp_152(void) {
1340 /* Line -, pgg24a.syn */
1341 copyon();
1342 }
1343
1344 static void ag_rp_153(void) {
1345 /* Line -, pgg24a.syn */
1346 copyoff();
1347 }
1348
1349 static void ag_rp_154(void) {
1350 /* Line -, pgg24a.syn */
1351 if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token;
1352 }
1353
1354
1355 #define READ_COUNTS
1356 #define WRITE_COUNTS
1357 #undef V
1358 #define V(i,t) (*t (&(PCB).vs[(PCB).ssx + i]))
1359 #undef VS
1360 #define VS(i) (PCB).vs[(PCB).ssx + i]
1361
1362 #ifndef GET_CONTEXT
1363 #define GET_CONTEXT CONTEXT = (PCB).input_context
1364 #endif
1365
1366 typedef enum {
1367 ag_action_1,
1368 ag_action_2,
1369 ag_action_3,
1370 ag_action_4,
1371 ag_action_5,
1372 ag_action_6,
1373 ag_action_7,
1374 ag_action_8,
1375 ag_action_9,
1376 ag_action_10,
1377 ag_action_11,
1378 ag_action_12
1379 } ag_parser_action;
1380
1381
1382 #ifndef NULL_VALUE_INITIALIZER
1383 #define NULL_VALUE_INITIALIZER = { 0 }
1384 #endif
1385
1386 static pgg_vs_type const ag_null_value NULL_VALUE_INITIALIZER;
1387
1388 static const unsigned char ag_rpx[] = {
1389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0,
1390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6,
1391 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 14, 15, 16,
1392 0, 17, 18, 0, 0, 0, 19, 20, 21, 0, 22, 23, 24, 25, 0, 26, 27, 28,
1393 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 39,
1394 40, 0, 41, 0, 42, 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, 0, 0, 0,
1395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1396 49, 50, 51, 0, 0, 52, 53, 0, 54, 0, 0, 55, 56, 57, 58, 59, 60, 61,
1397 62, 63, 0, 64, 65, 0, 0, 66, 67, 0, 68, 0, 69, 70, 0, 0, 0, 0,
1398 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 0, 0, 0, 0, 0,
1399 0, 83, 0, 0, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1400 98, 0, 0, 99,100,101,102,103,104,105,106,107,108,109,110,111,112, 0,
1401 0, 0, 0, 0, 0, 0,113,114,115,116,117,118, 0,119,120,121,122,123,
1402 124,125,126, 0, 0,127,128,129,130,131, 0, 0, 0, 0, 0,132,133, 0,
1403 134,135,136,137,138,139,140,141,142,143,144,145,146,147,148, 0, 0, 0,
1404 0, 0, 0,149,150,151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1405 0,152,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154
1406 };
1407
1408 static const unsigned char ag_key_itt[] = {
1409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
1411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1415 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1416 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1419 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1420 0
1421 };
1422
1423 static const unsigned short ag_key_pt[] = {
1424 0, 11, 0,146,0
1425 };
1426
1427 static const unsigned char ag_key_ch[] = {
1428 0, 42, 47,255, 47,255, 42, 47,255, 46,255, 46,255, 42, 47,255, 88,120,
1429 255, 46, 47,255,114,116,255,115,255,105,255,102,120,255,101,255,110,115,
1430 255,101,105,255,116,117,255, 46, 47,255, 45, 46, 47, 48, 58, 63, 93,100,
1431 101,104,108,110,114,115,125,255, 47,255, 42, 47,255,114,116,255,115,255,
1432 105,255,102,120,255,101,255,110,115,255,101,105,255,116,117,255, 47,100,
1433 101,104,108,110,114,115,255, 42, 47,255, 88,120,255, 47, 48, 58,255, 42,
1434 47,255, 46, 47,255, 46, 47,255, 45, 46, 47, 58, 63, 93,125,255, 58,255,
1435 45, 47,255, 42, 47,255, 88,120,255, 47, 48, 58, 92,125,255, 47,255, 47,
1436 58,255,114,116,255,115,255,105,255,102,120,255,101,255,110,115,255,101,
1437 105,255,116,117,255, 47,100,101,104,108,110,114,115,255, 42, 47,255, 88,
1438 120,255, 47, 48, 58, 92,255, 88,120,255, 48,255, 42, 47,255, 45, 47,255,
1439 42, 47,255, 88,120,255, 47, 48,255, 88,120,255, 47, 48,255, 88,120,255,
1440 47, 48, 58, 92,125,255, 47, 58,255,114,116,255,115,255,105,255,102,120,
1441 255,101,255,110,115,255,101,105,255,116,117,255,100,101,104,108,110,114,
1442 115,255, 42, 47,255, 46, 47,255, 46, 47,255, 47, 93,125,255, 42, 47,255,
1443 47, 92,255, 92,255, 42, 47,255, 88,120,255, 47, 48,125,255, 34, 39, 63,
1444 92, 97, 98,102,110,114,116,118,120,255, 92,255, 88,120,255, 48,125,255,
1445 46, 47,255, 46, 47,255, 47, 93,125,255, 46,255, 46,255, 46, 47,255, 46,
1446 47,255, 46, 47, 63, 93,125,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,
1447 125,255, 46, 47, 63,255, 46, 47,255, 46, 47,255, 93,125,255, 46, 47,255,
1448 93,255, 46, 47,255,125,255,125,255, 46,255, 46,255, 42, 47,255, 46, 47,
1449 255, 46, 47,255, 46, 47, 63, 93,125,255, 47,107,255, 47,109,255, 88,120,
1450 255, 47, 48,255, 88,120,255, 48, 58,255, 47, 92,255, 42, 47,255, 46, 47,
1451 255, 46, 47,255, 46, 47, 63, 93,125,255
1452 };
1453
1454 static const unsigned char ag_key_act[] = {
1455 0,0,0,4,2,4,3,3,4,5,4,6,4,0,0,4,0,0,4,3,3,4,3,3,4,2,4,2,4,3,3,4,2,4,3,
1456 3,4,2,3,4,3,3,4,3,3,4,3,2,2,2,3,3,2,2,3,3,2,3,2,2,2,4,3,4,0,0,4,3,3,4,
1457 2,4,2,4,3,3,4,2,4,3,3,4,2,3,4,3,3,4,2,2,3,3,2,3,2,2,4,0,0,4,0,0,4,2,2,
1458 3,4,0,0,4,3,3,4,3,3,4,3,7,2,3,3,2,2,4,3,4,3,3,4,0,0,4,0,0,4,2,2,3,3,3,
1459 4,3,4,3,3,4,3,3,4,2,4,2,4,3,3,4,2,4,3,3,4,2,3,4,3,3,4,3,2,3,3,2,3,2,2,
1460 4,0,0,4,0,0,4,2,2,3,3,4,0,0,4,2,4,0,0,4,3,2,4,0,0,4,0,0,4,2,2,4,0,0,4,
1461 3,2,4,0,0,4,3,2,3,3,3,4,3,3,4,3,3,4,2,4,2,4,3,3,4,2,4,3,3,4,2,3,4,3,3,
1462 4,2,3,3,2,3,2,2,4,0,0,4,3,3,4,3,3,4,2,2,2,4,0,0,4,2,3,4,3,4,0,0,4,0,0,
1463 4,2,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,4,2,3,4,3,3,4,3,3,4,3,2,2,
1464 4,5,4,6,4,3,3,4,3,3,4,2,3,3,2,2,4,3,3,4,3,3,4,7,3,3,2,2,4,7,3,3,4,3,3,
1465 4,3,3,4,2,2,4,3,3,4,2,4,3,3,4,2,4,3,4,5,4,6,4,0,0,4,3,3,4,3,3,4,2,2,3,
1466 2,2,4,3,3,4,3,3,4,0,0,4,3,2,4,0,0,4,2,3,4,3,3,4,0,0,4,3,3,4,3,3,4,7,2,
1467 3,2,2,4
1468 };
1469
1470 static const unsigned char ag_key_parm[] = {
1471 0,228,107, 0, 0, 0,227,228, 0, 0, 0, 2, 0,228,107, 0,124,123,
1472 0,205,208, 0,194,184, 0, 0, 0, 0, 0,185,195, 0, 0, 0,198,196,
1473 0, 0,187, 0,189,190, 0,204,207, 0, 2, 0, 0, 0, 80,206, 0, 0,
1474 96,191, 0,188, 0, 0, 0, 0,107, 0,228,107, 0,194,184, 0, 0, 0,
1475 0, 0,185,195, 0, 0, 0,198,196, 0, 0,187, 0,189,190, 0, 0, 0,
1476 96,191, 0,188, 0, 0, 0,228,107, 0,124,123, 0, 0, 0, 80, 0,228,
1477 107, 0,205,208, 0,204,207, 0, 2, 0, 0, 80,206, 0, 0, 0, 80, 0,
1478 2,107, 0,228,107, 0,124,123, 0, 0, 0, 80,225,204, 0,228, 0,107,
1479 80, 0,194,184, 0, 0, 0, 0, 0,185,195, 0, 0, 0,198,196, 0, 0,
1480 187, 0,189,190, 0,107, 0, 96,191, 0,188, 0, 0, 0,228,107, 0,124,
1481 123, 0, 0, 0, 80,225, 0,124,123, 0, 0, 0,228,107, 0, 2, 0, 0,
1482 228,107, 0,124,123, 0, 0, 0, 0,124,123, 0,107, 0, 0,124,123, 0,
1483 228, 0, 80,225,204, 0,228, 80, 0,194,184, 0, 0, 0, 0, 0,185,195,
1484 0, 0, 0,198,196, 0, 0,187, 0,189,190, 0, 0, 96,191, 0,188, 0,
1485 0, 0,228,107, 0,205,208, 0,204,207, 0, 0, 0, 0, 0,228,107, 0,
1486 0,225, 0,225, 0,228,107, 0,124,123, 0, 0, 0,204, 0,168,167,166,
1487 165,158,159,160,161,162,163,164,172, 0, 0, 0,124,123, 0, 0,204, 0,
1488 205,208, 0,204,207, 0,107, 0, 0, 0, 0, 0, 2, 0,205,208, 0,204,
1489 207, 0, 0,107,206, 0, 0, 0,205,208, 0,204,207, 0, 0,107,206, 0,
1490 0, 0, 0,107,206, 0,205,208, 0,204,207, 0, 0, 0, 0,205,208, 0,
1491 0, 0,204,207, 0, 0, 0,204, 0, 0, 0, 2, 0,228,107, 0,205,208,
1492 0,204,207, 0, 0, 0,206, 0, 0, 0,228,197, 0,228,199, 0,124,123,
1493 0,228, 0, 0,124,123, 0, 0, 80, 0,228,225, 0,228,107, 0,205,208,
1494 0,204,207, 0, 0, 0,206, 0, 0, 0
1495 };
1496
1497 static const unsigned short ag_key_jmp[] = {
1498 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0,
1499 0, 12, 15, 0, 19, 25, 0, 22, 0, 25, 0, 43, 45, 0, 29, 0, 57, 61,
1500 0, 34, 66, 0, 70, 75, 0, 84, 87, 0, 4, 11, 13, 16, 6, 8, 19, 27,
1501 33, 37, 32, 49, 37, 40, 43, 0, 91, 0, 0, 0, 0, 93, 99, 0, 67, 0,
1502 70, 0,117,119, 0, 74, 0,131,135, 0, 79,140, 0,144,149, 0, 64, 72,
1503 107,111, 77,123, 82, 85, 0, 0, 0, 0, 0, 0, 0, 97,100,158, 0, 0,
1504 0, 0,171,174, 0,178,181, 0,160,162,107,165,167,110,113, 0,185, 0,
1505 187,189, 0, 0, 0, 0, 0, 0, 0,129,132,191,193,195, 0,199, 0,201,
1506 203, 0,207,213, 0,146, 0,149, 0,231,233, 0,153, 0,245,249, 0,158,
1507 254, 0,258,263, 0,205,151,221,225,156,237,161,164, 0, 0, 0, 0, 0,
1508 0, 0,176,179,272,274, 0, 0, 0, 0,187, 0, 0, 0, 0,276,192, 0,
1509 0, 0, 0, 0, 0, 0,198,201, 0, 0, 0, 0,278,207, 0, 0, 0, 0,
1510 280,213,282,284,286, 0,290,292, 0,294,300, 0,225, 0,228, 0,318,320,
1511 0,232, 0,332,336, 0,237,341, 0,345,350, 0,230,308,312,235,324,240,
1512 243, 0, 0, 0, 0,359,362, 0,366,369, 0,254,257,260, 0, 0, 0, 0,
1513 267,373, 0,375, 0, 0, 0, 0, 0, 0, 0,275,278,377, 0, 0, 0, 0,
1514 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,285, 0, 0, 0, 0,300,381, 0,
1515 387,390, 0,394,397, 0,385,306,309, 0, 0, 0,316, 0,407,410, 0,414,
1516 417, 0,318,401,403,320,323, 0,430,433, 0,437,440, 0,421,424,426,332,
1517 335, 0,444,447,449, 0,453,456, 0,460,463, 0,348,351, 0,467,470, 0,
1518 357, 0,474,477, 0,362, 0,481, 0, 0, 0,369, 0, 0, 0, 0,489,492,
1519 0,496,499, 0,371,373,485,376,379, 0,503,505, 0,513,515, 0, 0, 0,
1520 0,520,394, 0, 0, 0, 0,400,522, 0,524,526, 0, 0, 0, 0,535,538,
1521 0,542,545, 0,528,409,531,412,415, 0
1522 };
1523
1524 static const unsigned short ag_key_index[] = {
1525 4, 6, 46, 62, 0, 0, 0, 88, 0, 0, 0, 0, 0,103, 4,116,124, 88,
1526 4,126, 0,126,126, 62, 62, 0, 0, 0, 0, 0,135, 0, 4,116,141,143,
1527 0,167, 0, 0, 0, 0, 0, 0, 4, 0,182,190,195,126,126,204, 0,204,
1528 210, 4,195, 62, 62,216,141,141, 0,222,124, 62, 4,246,263, 0, 0, 0,
1529 0, 0, 4,263,270,273,204,281,298,190,303,312,204,204,190, 0,298,204,
1530 190,326,190,338,344,338,190,312, 62,273, 62,204,190, 62,216, 0,141, 4,
1531 62, 0, 62, 0,141,141,141,141,141, 62, 62,141,141,141,141,141,141, 4,
1532 0,141, 0, 62, 62, 0, 0, 0, 4,273, 0, 0, 0,298,298,298,298,298,
1533 354,360,365,367,367,263, 0,382,382,382,382, 0, 0,204,204,263,263,263,
1534 190,190,312, 4, 0, 0, 0,222, 4,388,391,388,141,397, 0, 0,190, 0,
1535 4, 0,141,403, 88, 0, 4, 0, 0,406,263,298,263,263,263,190,263,263,
1536 382,382,298,418,418,190,190,338,338, 0,263,141,141,141,190, 62, 62, 0,
1537 0, 0,263,141,141, 62,190,190,141,190,298, 62,141, 0, 62
1538 };
1539
1540 static const unsigned char ag_key_ends[] = {
1541 47,0, 42,0, 62,0, 58,0, 46,46,46,0, 46,46,0, 46,46,46,0,
1542 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0,
1543 105,100,100,101,110,0, 116,0, 101,109,101,0,
1544 111,110,97,115,115,111,99,0, 97,109,101,0, 101,114,118,101,0,
1545 103,104,116,0, 105,99,107,121,0, 98,103,114,97,109,109,97,114,0,
1546 46,46,0, 46,46,46,0, 47,0, 101,103,97,114,100,0,
1547 105,110,103,117,105,115,104,0, 110,117,109,0, 105,100,100,101,110,0,
1548 116,0, 101,109,101,0, 111,110,97,115,115,111,99,0, 97,109,101,0,
1549 101,114,118,101,0, 103,104,116,0, 105,99,107,121,0,
1550 98,103,114,97,109,109,97,114,0, 58,0, 62,0, 46,46,0, 58,0,
1551 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 58,0,
1552 62,0, 47,0, 58,0, 10,0, 46,46,46,0, 42,0, 47,0, 58,0, 47,0,
1553 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0,
1554 105,100,100,101,110,0, 116,0, 101,109,101,0,
1555 111,110,97,115,115,111,99,0, 97,109,101,0, 101,114,118,101,0,
1556 103,104,116,0, 105,99,107,121,0, 98,103,114,97,109,109,97,114,0,
1557 58,0, 10,0, 62,0, 47,0, 42,0, 58,0, 10,0, 46,46,46,0, 42,0,
1558 58,0, 101,103,97,114,100,0, 105,110,103,117,105,115,104,0,
1559 110,117,109,0, 105,100,100,101,110,0, 116,0, 101,109,101,0,
1560 111,110,97,115,115,111,99,0, 97,109,101,0, 101,114,118,101,0,
1561 103,104,116,0, 105,99,107,121,0, 98,103,114,97,109,109,97,114,0,
1562 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 10,0, 10,0,
1563 46,46,46,0, 46,46,46,0, 47,0, 46,46,0, 46,46,46,0, 46,46,0,
1564 46,46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0,
1565 46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0,
1566 46,46,0, 46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0,
1567 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0,
1568 46,46,46,0, 46,46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0,
1569 46,46,0, 46,46,46,0, 42,0, 101,121,119,111,114,100,115,0, 42,0,
1570 97,99,114,111,0, 42,0, 58,0, 42,0, 10,0, 46,46,0, 46,46,46,0,
1571 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0,
1572 };
1573
1574 #define AG_TCV(x) ag_tcv[(x)]
1575
1576 static const unsigned char ag_tcv[] = {
1577 46,241,241,241,241,241,241,241,241, 97,104,106,106,102,241,241,241,241,
1578 241,241,241,241,241,241,241,241, 46,241,241,241,241,241, 97, 15,152,242,
1579 61,242,138, 33, 21, 31, 90, 25, 7, 23,242,242,121,239,239,239,239,239,
1580 239,239,240,240,175, 75, 87, 13, 86,203,242,131,131,131,131,131,131,238,
1581 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
1582 238, 19,170, 27,113,238,242,131,131,131,131,131,131,238,238,238,238,238,
1583 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, 17, 37, 29,
1584 35,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1585 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1586 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1587 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1588 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1589 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1590 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
1591 241,241,241,241
1592 };
1593
1594 #ifndef SYNTAX_ERROR
1595 #define SYNTAX_ERROR fprintf(stderr,"%s, line %d, column %d\n", \
1596 (PCB).error_message, (PCB).line, (PCB).column)
1597 #endif
1598
1599 #ifndef FIRST_LINE
1600 #define FIRST_LINE 1
1601 #endif
1602
1603 #ifndef FIRST_COLUMN
1604 #define FIRST_COLUMN 1
1605 #endif
1606
1607 #ifndef PARSER_STACK_OVERFLOW
1608 #define PARSER_STACK_OVERFLOW {fprintf(stderr, \
1609 "\nParser stack overflow, line %d, column %d\n",\
1610 (PCB).line, (PCB).column);}
1611 #endif
1612
1613 #ifndef REDUCTION_TOKEN_ERROR
1614 #define REDUCTION_TOKEN_ERROR {fprintf(stderr, \
1615 "\nReduction token error, line %d, column %d\n", \
1616 (PCB).line, (PCB).column);}
1617 #endif
1618
1619
1620 #ifndef INPUT_CODE
1621 #define INPUT_CODE(T) (T)
1622 #endif
1623
1624 typedef enum
1625 {ag_accept_key, ag_set_key, ag_jmp_key, ag_end_key, ag_no_match_key,
1626 ag_cf_accept_key, ag_cf_set_key, ag_cf_end_key} key_words;
1627
1628 static void ag_get_key_word(int ag_k) {
1629 int ag_save = (int) ((PCB).la_ptr - (PCB).pointer);
1630 const unsigned char *ag_p;
1631 int ag_ch;
1632 while (1) {
1633 switch (ag_key_act[ag_k]) {
1634 case ag_cf_end_key: {
1635 const unsigned char *sp = ag_key_ends + ag_key_jmp[ag_k];
1636 do {
1637 if ((ag_ch = *sp++) == 0) {
1638 int ag_k1 = ag_key_parm[ag_k];
1639 int ag_k2 = ag_key_pt[ag_k1];
1640 if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) goto ag_fail;
1641 (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1 + 1];
1642 return;
1643 }
1644 } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch);
1645 goto ag_fail;
1646 }
1647 case ag_end_key: {
1648 const unsigned char *sp = ag_key_ends + ag_key_jmp[ag_k];
1649 do {
1650 if ((ag_ch = *sp++) == 0) {
1651 (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k];
1652 return;
1653 }
1654 } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch);
1655 }
1656 case ag_no_match_key:
1657 ag_fail:
1658 (PCB).la_ptr = (PCB).pointer + ag_save;
1659 return;
1660 case ag_cf_set_key: {
1661 int ag_k1 = ag_key_parm[ag_k];
1662 int ag_k2 = ag_key_pt[ag_k1];
1663 ag_k = ag_key_jmp[ag_k];
1664 if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) break;
1665 ag_save = (int) ((PCB).la_ptr - (PCB).pointer);
1666 (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1+1];
1667 break;
1668 }
1669 case ag_set_key:
1670 ag_save = (int) ((PCB).la_ptr - (PCB).pointer);
1671 (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k];
1672 case ag_jmp_key:
1673 ag_k = ag_key_jmp[ag_k];
1674 break;
1675 case ag_accept_key:
1676 (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k];
1677 return;
1678 case ag_cf_accept_key: {
1679 int ag_k1 = ag_key_parm[ag_k];
1680 int ag_k2 = ag_key_pt[ag_k1];
1681 if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)])
1682 (PCB).la_ptr = (PCB).pointer + ag_save;
1683 else (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1+1];
1684 return;
1685 }
1686 }
1687 ag_ch = CONVERT_CASE(*(PCB).la_ptr++);
1688 ag_p = &ag_key_ch[ag_k];
1689 if (ag_ch <= 255) while (*ag_p < ag_ch) ag_p++;
1690 if (ag_ch > 255 || *ag_p != ag_ch) {
1691 (PCB).la_ptr = (PCB).pointer + ag_save;
1692 return;
1693 }
1694 ag_k = (int) (ag_p - ag_key_ch);
1695 }
1696 }
1697
1698
1699 #ifndef AG_NEWLINE
1700 #define AG_NEWLINE 10
1701 #endif
1702
1703 #ifndef AG_RETURN
1704 #define AG_RETURN 13
1705 #endif
1706
1707 #ifndef AG_FORMFEED
1708 #define AG_FORMFEED 12
1709 #endif
1710
1711 #ifndef AG_TABCHAR
1712 #define AG_TABCHAR 9
1713 #endif
1714
1715 static void ag_track(void) {
1716 int ag_k = (int) ((PCB).la_ptr - (PCB).pointer);
1717 while (ag_k--) {
1718 switch (*(PCB).pointer++) {
1719 case AG_NEWLINE:
1720 (PCB).column = 1, (PCB).line++;
1721 case AG_RETURN:
1722 case AG_FORMFEED:
1723 break;
1724 case AG_TABCHAR:
1725 (PCB).column += (TAB_SPACING) - ((PCB).column - 1) % (TAB_SPACING);
1726 break;
1727 default:
1728 (PCB).column++;
1729 }
1730 }
1731 }
1732
1733
1734 static void ag_prot(void) {
1735 int ag_k;
1736 ag_k = 128 - ++(PCB).btsx;
1737 if (ag_k <= (PCB).ssx) {
1738 (PCB).exit_flag = AG_STACK_ERROR_CODE;
1739 PARSER_STACK_OVERFLOW;
1740 return;
1741 }
1742 (PCB).bts[(PCB).btsx] = (PCB).sn;
1743 (PCB).bts[ag_k] = (PCB).ssx;
1744 (PCB).vs[ag_k] = (PCB).vs[(PCB).ssx];
1745 (PCB).ss[ag_k] = (PCB).ss[(PCB).ssx];
1746 (PCB).cs[ag_k] = (PCB).cs[(PCB).ssx];
1747 }
1748
1749 static void ag_undo(void) {
1750 if ((PCB).drt == -1) return;
1751 while ((PCB).btsx) {
1752 int ag_k = 128 - (PCB).btsx;
1753 (PCB).sn = (PCB).bts[(PCB).btsx--];
1754 (PCB).ssx = (PCB).bts[ag_k];
1755 (PCB).vs[(PCB).ssx] = (PCB).vs[ag_k];
1756 (PCB).ss[(PCB).ssx] = (PCB).ss[ag_k];
1757 (PCB).cs[(PCB).ssx] = (PCB).cs[ag_k];
1758 }
1759 (PCB).token_number = (pgg_token_type) (PCB).drt;
1760 (PCB).ssx = (PCB).dssx;
1761 (PCB).sn = (PCB).dsn;
1762 (PCB).drt = -1;
1763 }
1764
1765
1766
1767 static const int ag_rtt[] = {
1768 98,226, 0
1769 };
1770
1771 static const unsigned char ag_tstt[] = {
1772 238,228,131,107,104,102,97,46,21,19,17,0,3,4,5,38,98,226,
1773 242,241,240,239,238,228,227,203,175,170,152,138,131,121,113,106,104,102,97,
1774 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,98,226,
1775 228,97,0,3,98,226,
1776 238,131,107,104,102,46,21,19,17,0,39,40,100,103,
1777 242,241,240,239,238,203,175,170,152,138,131,121,113,106,104,102,97,90,87,86,
1778 75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,109,110,
1779 104,0,
1780 104,102,0,103,
1781 238,228,198,196,195,194,191,190,189,188,187,185,184,131,107,106,104,102,97,
1782 96,46,35,27,21,19,17,0,3,98,100,103,105,226,
1783 238,131,46,21,19,17,0,20,41,42,45,47,48,49,54,55,56,57,58,59,60,92,209,
1784 242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61,
1785 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,
1786 104,0,
1787 104,102,0,103,
1788 104,0,
1789 240,239,238,228,131,124,123,121,113,107,104,102,97,90,80,35,33,25,23,21,0,3,
1790 4,8,9,98,99,100,101,103,226,
1791 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97,
1792 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,103,211,212,213,
1793 240,239,238,228,208,207,206,205,204,203,175,138,131,121,107,104,102,97,90,
1794 87,86,80,61,46,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,98,226,
1795 238,131,80,0,60,62,76,92,
1796 238,228,198,196,195,194,191,190,189,188,187,185,184,131,107,104,102,97,96,
1797 35,27,0,3,4,5,98,178,226,
1798 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,97,90,87,86,
1799 75,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,98,100,210,214,217,218,
1800 226,
1801 61,13,0,12,
1802 238,131,0,57,59,60,92,
1803 7,0,6,
1804 2,0,1,50,
1805 107,104,102,0,39,100,103,
1806 107,104,102,0,39,100,103,
1807 238,131,46,21,19,17,0,20,41,43,44,47,48,49,54,55,56,57,58,59,60,92,209,
1808 46,0,
1809 104,0,
1810 104,0,
1811 104,102,0,101,103,
1812 242,241,240,239,238,228,225,204,203,175,170,152,138,131,124,123,121,113,107,
1813 106,104,102,97,90,87,86,80,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,
1814 0,3,98,99,100,101,103,226,
1815 104,0,
1816 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97,
1817 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,103,211,
1818 240,239,238,228,131,121,97,0,3,98,226,
1819 238,228,131,97,0,81,
1820 107,104,102,90,87,86,80,31,27,21,7,0,77,78,85,
1821 31,0,
1822 238,198,196,195,194,191,190,189,188,187,185,184,131,107,104,102,96,35,27,0,
1823 39,40,100,103,
1824 27,0,26,
1825 242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61,
1826 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,232,233,234,
1827 242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61,
1828 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,235,236,237,
1829 152,0,
1830 33,0,
1831 104,102,0,103,
1832 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97,
1833 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,215,
1834 29,0,28,
1835 242,241,240,239,238,228,225,203,175,170,152,138,131,124,123,121,113,107,106,
1836 104,102,97,90,87,86,80,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,
1837 9,98,99,100,101,103,226,
1838 240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20,
1839 22,24,34,60,92,111,112,115,117,119,133,134,135,136,137,139,145,149,150,
1840 228,107,104,102,97,46,7,2,0,3,4,5,98,226,
1841 61,0,
1842 7,0,6,
1843 240,239,238,228,152,131,124,123,121,113,107,104,102,97,35,33,29,25,23,21,19,
1844 17,15,0,3,4,8,9,98,99,100,101,103,226,
1845 238,131,0,59,60,92,
1846 240,239,238,228,152,131,124,123,121,113,107,104,102,97,46,37,35,33,25,23,21,
1847 19,17,15,13,0,3,4,5,98,226,
1848 240,239,238,152,131,124,123,121,113,107,104,102,46,37,35,33,25,23,21,19,17,
1849 15,13,0,12,14,16,18,20,22,24,34,53,60,67,69,70,71,73,92,111,112,115,117,
1850 119,132,133,134,135,136,137,139,145,149,150,
1851 238,228,131,107,106,104,102,97,46,21,19,17,0,3,98,100,103,105,226,
1852 238,228,131,107,106,104,102,97,46,37,21,19,17,2,0,1,3,36,50,51,52,98,100,
1853 103,105,226,
1854 107,104,102,46,0,39,100,103,
1855 107,104,102,46,0,39,100,103,
1856 228,97,0,3,4,98,226,
1857 238,228,131,97,0,3,4,5,98,226,
1858 238,228,131,97,0,82,
1859 90,21,0,20,79,83,84,88,89,91,
1860 238,228,131,97,80,0,3,4,5,98,226,
1861 238,131,80,0,60,62,76,92,
1862 107,104,102,90,86,31,27,21,7,0,
1863 238,228,131,107,104,102,97,0,3,4,8,9,98,99,100,101,103,226,
1864 238,198,196,195,194,191,190,189,188,187,185,184,131,96,35,27,0,34,60,92,95,
1865 148,179,180,181,182,183,192,
1866 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
1867 242,241,240,239,238,203,175,170,152,138,131,121,113,106,104,102,97,90,87,86,
1868 75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,231,
1869 242,241,240,239,238,203,175,170,138,131,121,113,106,97,90,87,86,75,61,37,35,
1870 33,31,29,27,25,23,21,19,17,15,13,7,0,232,
1871 242,241,240,239,238,203,175,170,152,138,131,121,113,106,104,102,97,90,87,86,
1872 75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,231,
1873 242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61,
1874 37,35,31,29,27,25,23,21,19,17,15,13,7,0,235,
1875 104,0,
1876 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97,
1877 90,87,86,75,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,98,100,217,218,
1878 219,226,
1879 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
1880 242,241,240,239,238,228,225,203,175,170,152,138,131,121,113,107,106,104,102,
1881 97,90,87,86,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,9,98,99,
1882 100,101,103,226,
1883 242,241,240,239,238,225,203,175,170,152,138,131,121,113,106,90,87,86,61,37,
1884 35,33,31,27,25,23,21,19,17,15,13,7,0,55,74,209,221,
1885 240,239,238,228,152,131,124,123,121,113,107,104,102,97,35,33,25,23,21,19,17,
1886 15,0,3,4,8,9,98,99,100,101,103,226,
1887 240,239,238,228,204,152,131,124,123,121,113,107,104,102,97,37,35,33,29,25,
1888 23,21,19,17,15,13,0,3,4,8,9,98,99,100,101,103,226,
1889 242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159,
1890 158,138,131,121,113,106,97,90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,
1891 17,15,13,7,0,141,142,143,144,151,153,154,155,156,169,171,
1892 240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20,
1893 22,24,34,60,63,64,69,71,73,92,111,112,115,117,119,132,133,134,135,136,
1894 137,139,145,149,150,
1895 240,239,238,204,152,131,124,123,121,113,37,35,33,29,25,23,21,19,17,15,13,0,
1896 12,14,16,18,20,22,24,34,60,63,64,66,67,68,69,71,73,92,111,112,115,117,
1897 119,132,133,134,135,136,137,139,145,149,150,
1898 203,0,
1899 240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9,
1900 98,99,100,101,103,226,
1901 240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9,
1902 98,99,100,101,103,226,
1903 240,239,124,123,121,0,118,120,125,
1904 242,240,239,238,203,175,170,152,138,131,121,113,90,87,86,75,61,37,35,33,31,
1905 29,27,25,23,21,19,17,15,13,7,0,
1906 242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159,
1907 158,152,138,131,121,113,106,97,90,87,86,75,61,37,35,31,29,27,25,23,21,
1908 19,17,15,13,7,0,116,141,142,143,144,169,171,
1909 240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9,
1910 98,99,100,101,103,226,
1911 240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112,
1912 115,117,119,134,136,137,139,145,
1913 146,0,
1914 240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112,
1915 115,117,119,137,139,145,
1916 138,0,
1917 206,203,25,23,11,0,10,22,24,
1918 206,203,25,23,11,0,10,22,24,
1919 240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20,
1920 22,24,34,60,71,92,111,112,115,117,119,132,133,134,135,136,137,139,145,
1921 149,150,
1922 208,207,205,204,175,107,104,102,46,37,29,27,13,7,0,72,
1923 107,104,102,46,37,13,7,0,6,12,67,
1924 242,241,240,239,238,225,203,175,170,152,138,131,121,113,106,90,87,86,61,37,
1925 35,33,31,27,25,23,21,19,17,15,13,7,0,55,74,209,221,
1926 37,0,36,51,
1927 240,239,238,228,152,131,124,123,121,113,107,104,102,97,35,33,25,23,21,19,17,
1928 15,0,3,4,8,9,98,99,100,101,103,226,
1929 240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20,
1930 22,24,34,60,69,70,71,73,92,111,112,115,117,119,132,133,134,135,136,137,
1931 139,145,149,150,
1932 37,0,36,51,
1933 228,97,0,3,98,226,
1934 238,131,0,60,92,
1935 238,228,131,97,0,3,4,5,98,226,
1936 238,228,131,107,104,102,97,90,86,31,27,21,7,0,3,4,5,98,226,
1937 238,131,0,60,92,
1938 90,21,0,20,79,83,84,88,89,91,
1939 90,21,0,20,84,88,89,91,
1940 86,7,0,
1941 228,97,0,3,4,98,226,
1942 228,97,0,3,4,98,226,
1943 228,97,0,3,4,98,226,
1944 228,97,0,3,4,98,186,226,
1945 228,97,0,3,4,98,226,
1946 107,104,102,29,7,0,6,99,100,101,103,193,201,
1947 107,104,102,29,7,0,6,99,100,101,103,193,201,
1948 228,97,0,3,4,98,186,226,
1949 228,97,0,3,4,98,186,226,
1950 228,97,0,3,4,98,186,226,
1951 228,97,0,3,4,98,186,226,
1952 228,97,0,3,4,98,186,226,
1953 228,97,0,3,4,98,186,226,
1954 228,107,104,102,97,0,3,4,8,98,99,100,101,103,226,
1955 238,131,0,60,92,
1956 240,239,238,228,131,121,97,13,0,3,4,5,98,226,
1957 238,131,0,60,92,
1958 13,0,12,
1959 107,104,102,27,0,39,40,100,103,
1960 152,0,
1961 33,0,
1962 104,102,0,103,
1963 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97,
1964 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,215,
1965 242,241,240,239,238,225,203,175,170,152,138,131,121,113,106,90,87,86,61,37,
1966 35,33,31,27,25,23,21,19,15,13,7,0,217,218,222,223,
1967 75,0,
1968 239,121,0,
1969 240,239,131,121,0,126,130,
1970 239,121,0,
1971 239,121,0,
1972 240,131,0,
1973 240,239,131,121,0,
1974 242,241,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159,158,152,
1975 138,113,106,97,90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,
1976 0,141,142,143,144,156,169,171,
1977 208,207,205,204,37,29,27,13,7,0,6,12,67,
1978 208,205,37,27,0,26,36,65,
1979 207,37,0,36,65,
1980 37,0,36,65,
1981 204,29,0,28,
1982 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
1983 240,239,131,121,0,126,130,
1984 239,228,208,207,206,205,204,203,175,146,138,121,107,104,102,97,46,37,31,29,
1985 27,25,23,13,11,7,0,122,
1986 240,239,121,0,
1987 228,208,207,206,205,204,203,175,146,138,107,104,102,97,46,37,31,29,27,25,23,
1988 13,11,7,0,3,4,5,98,226,
1989 228,208,207,206,205,204,203,175,146,138,107,104,102,97,46,37,31,29,27,25,23,
1990 13,11,7,0,3,4,5,98,226,
1991 33,23,0,32,
1992 31,25,23,0,22,24,30,
1993 240,239,228,124,123,121,113,107,104,102,97,25,23,0,3,4,8,9,98,99,100,101,
1994 103,226,
1995 240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9,
1996 98,99,100,101,103,226,
1997 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
1998 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
1999 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2000 240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112,
2001 115,117,119,136,137,139,145,
2002 240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112,
2003 115,117,119,136,137,139,145,
2004 208,207,205,204,175,107,104,102,46,37,29,27,13,7,0,72,
2005 238,228,131,107,104,102,97,0,3,4,8,9,98,99,100,101,103,226,
2006 75,0,
2007 238,131,0,60,92,
2008 31,0,30,
2009 238,228,131,97,80,0,3,4,5,98,226,
2010 228,107,104,102,97,90,86,31,27,21,7,0,3,4,5,98,226,
2011 228,197,97,0,3,98,226,
2012 228,199,97,0,3,98,226,
2013 228,197,97,0,3,98,226,
2014 228,97,17,0,3,16,98,226,
2015 240,239,238,228,152,131,124,123,121,113,97,35,33,25,23,21,19,17,0,3,16,18,
2016 20,22,24,34,60,92,98,111,112,115,117,119,132,134,135,136,137,139,145,
2017 149,150,226,
2018 29,0,28,
2019 238,131,0,60,92,147,
2020 240,239,238,131,124,123,121,113,35,33,29,25,23,21,0,20,22,24,34,60,92,111,
2021 112,115,117,119,134,136,137,139,145,
2022 17,0,16,
2023 240,239,238,228,131,121,107,104,102,97,17,0,3,98,99,100,101,103,226,
2024 13,0,12,
2025 240,239,238,228,131,121,97,0,3,98,226,
2026 240,239,238,152,131,124,123,121,80,25,23,0,22,24,60,62,76,92,112,117,119,
2027 149,150,
2028 238,228,198,196,195,194,191,190,189,188,187,185,184,131,107,106,104,102,97,
2029 96,35,27,0,3,34,60,92,95,98,100,103,105,148,181,182,183,192,226,
2030 104,0,
2031 242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97,
2032 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,98,100,217,
2033 218,219,226,
2034 152,0,
2035 33,0,
2036 242,241,240,239,238,228,225,203,175,170,152,138,131,121,113,106,97,90,87,86,
2037 61,37,35,33,31,27,25,23,21,19,15,13,7,0,3,98,217,218,223,226,
2038 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2039 240,239,131,121,0,130,
2040 228,208,207,205,204,203,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2041 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2042 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2043 240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20,
2044 22,24,34,60,64,69,71,73,92,111,112,115,117,119,132,133,134,135,136,137,
2045 139,145,149,150,
2046 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2047 228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226,
2048 240,239,131,121,0,130,
2049 239,121,0,
2050 242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159,
2051 158,152,138,131,121,113,106,97,90,87,86,75,61,37,35,31,29,27,25,23,21,
2052 19,17,15,13,7,0,116,141,142,143,144,169,171,
2053 228,208,207,206,205,204,203,175,138,107,104,102,97,46,37,31,29,27,25,23,13,
2054 11,7,0,3,4,5,98,226,
2055 228,208,207,206,205,204,203,175,138,107,104,102,97,86,46,37,31,29,27,25,23,
2056 13,11,7,0,3,4,5,98,226,
2057 240,239,124,123,121,113,25,23,0,22,24,111,112,117,119,
2058 240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112,
2059 115,117,119,137,139,145,
2060 138,0,
2061 138,0,
2062 238,131,0,176,177,
2063 228,208,207,205,204,107,104,102,97,46,37,29,27,0,3,4,5,98,226,
2064 228,97,0,3,4,98,226,
2065 228,97,0,3,4,98,226,
2066 228,97,0,3,4,98,186,226,
2067 240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,0,16,18,20,22,24,
2068 34,60,92,111,112,115,117,119,132,134,135,136,137,139,145,149,150,202,
2069 13,0,12,
2070 25,23,0,22,24,
2071 238,131,0,60,92,147,
2072 152,0,149,150,
2073 33,0,32,
2074 240,239,238,228,208,207,205,204,131,121,107,104,102,97,46,37,29,27,13,7,0,3,
2075 4,5,98,226,
2076 228,97,17,0,3,16,98,226,
2077 238,228,131,97,0,3,98,200,226,
2078 107,104,102,29,7,0,6,99,100,101,103,193,201,
2079 240,239,124,123,121,113,33,25,23,0,22,24,111,112,115,117,119,
2080 240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112,
2081 115,117,119,134,136,137,139,145,
2082 240,239,238,228,131,121,97,0,3,4,98,226,
2083 240,239,238,152,131,124,123,121,113,35,33,29,25,23,21,19,17,0,16,18,20,22,
2084 24,34,60,92,111,112,115,117,119,132,134,135,136,137,139,145,149,150,
2085 242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159,
2086 158,152,138,131,121,113,106,97,90,87,86,75,61,37,35,31,29,27,25,23,21,
2087 19,17,15,13,7,0,116,141,142,143,144,169,171,
2088 25,23,0,22,24,
2089 238,228,131,97,0,3,98,200,226,
2090 33,0,32,
2091 240,239,238,131,121,0,
2092
2093 };
2094
2095
2096 static unsigned const char ag_astt[3969] = {
2097 5,1,5,8,8,8,1,5,5,5,5,7,1,1,1,0,1,1,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,
2098 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,2,1,1,9,5,3,3,1,8,8,1,8,1,5,8,8,8,
2099 7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2100 1,1,1,1,7,1,3,3,7,8,1,7,1,5,1,5,5,5,5,5,5,5,5,5,5,5,5,1,9,8,1,9,5,5,5,5,5,
2101 5,5,7,3,3,1,1,3,1,2,2,8,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,9,9,9,9,9,
2102 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,3,7,8,1,7,1,3,
2103 7,5,5,5,1,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,5,5,5,
2104 5,5,5,5,5,5,5,5,5,5,5,8,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,1,1,2,
2105 10,10,10,1,5,5,5,5,5,5,5,5,10,10,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
2106 7,1,1,3,1,1,2,2,1,7,1,1,1,1,5,1,5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,1,5,5,5,7,1,
2107 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,
2108 1,1,1,7,1,1,1,1,1,1,1,1,1,4,1,2,2,7,1,2,1,1,1,4,1,1,4,1,3,1,8,1,7,1,1,1,1,
2109 8,1,7,1,1,1,2,2,5,1,1,1,7,1,3,3,3,1,1,1,1,1,1,1,1,2,1,1,1,3,7,3,7,1,7,8,1,
2110 7,3,1,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,5,1,5,8,1,9,5,5,5,5,5,5,5,5,5,5,5,
2111 5,5,5,5,5,5,5,5,7,3,3,3,1,3,1,1,3,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8,1,5,
2112 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,3,2,2,2,1,2,2,9,5,3,3,1,4,4,4,4,7,
2113 1,5,5,5,8,1,5,1,5,5,8,5,7,1,1,1,1,7,8,8,8,8,8,8,8,8,8,8,8,8,8,1,8,1,8,8,5,
2114 7,1,1,1,1,1,7,3,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2115 1,1,1,1,1,7,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,
2116 1,1,1,1,1,1,7,1,1,3,3,7,3,7,8,1,7,1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
2117 8,8,8,8,8,8,8,8,8,5,8,8,8,8,8,8,8,8,8,7,1,1,7,3,5,5,5,5,5,1,5,5,5,5,5,5,5,
2118 5,5,5,5,1,5,8,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,1,2,2,1,2,1,2,1,
2119 1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1,1,2,2,1,2,1,1,1,2,1,2,2,1,2,1,
2120 1,1,1,1,1,1,5,5,5,1,5,5,5,7,1,1,2,1,1,1,4,1,4,1,5,5,5,1,5,5,5,5,5,5,1,8,1,
2121 1,5,5,5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,2,2,7,2,1,1,5,5,5,1,5,5,5,5,5,5,
2122 5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,7,1,1,3,1,1,5,5,2,2,2,5,5,5,1,4,4,4,4,4,1,1,
2123 1,1,1,1,1,1,1,7,1,1,1,1,1,2,2,1,1,2,2,1,2,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,
2124 1,1,4,1,4,1,9,8,1,9,4,4,4,4,7,3,3,1,1,3,1,4,1,4,1,9,8,1,9,4,1,4,4,4,1,7,1,
2125 3,1,2,1,1,3,1,1,3,1,1,8,1,4,7,1,1,1,1,8,1,4,7,1,1,1,1,1,5,1,1,1,1,8,1,8,1,
2126 7,1,1,1,1,1,4,4,4,4,7,1,1,1,7,2,2,1,2,1,1,1,5,1,5,1,5,7,1,1,2,1,1,2,2,1,7,
2127 1,1,1,1,5,5,5,5,5,5,5,5,5,7,5,1,5,1,8,1,1,7,1,1,2,2,1,2,1,2,1,1,2,1,1,1,1,
2128 1,1,1,1,1,1,1,2,1,1,5,7,1,1,1,1,1,1,3,1,1,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,
2129 5,5,7,1,1,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
2130 3,3,3,3,3,3,3,7,3,9,9,9,9,9,9,9,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
2131 9,9,9,9,9,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
2132 3,3,3,3,3,3,7,3,9,9,9,9,9,9,9,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
2133 9,9,9,9,5,3,3,7,9,9,9,9,9,1,9,9,9,1,9,9,9,9,1,9,9,9,9,9,9,9,9,9,9,9,1,9,9,
2134 9,9,9,9,1,9,9,9,4,3,1,1,1,3,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,
2135 5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,1,5,8,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
2136 7,1,1,2,2,1,2,1,2,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
2137 4,4,1,4,4,4,7,2,1,1,1,5,5,5,1,5,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,5,7,1,1,3,
2138 3,1,3,1,3,1,1,5,5,5,1,5,5,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,5,5,5,5,7,1,1,3,
2139 3,1,3,1,3,1,1,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2140 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,7,2,2,2,2,1,1,1,1,2,1,1,5,5,2,2,2,5,5,5,1,1,
2141 1,1,1,1,1,1,1,7,1,1,1,1,2,2,1,2,1,2,1,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,1,
2142 5,5,2,4,2,2,5,5,5,1,4,1,1,4,1,1,1,1,1,1,1,7,1,1,1,1,1,2,2,1,2,1,2,1,2,1,1,
2143 1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,1,1,4,5,5,5,1,5,5,5,5,5,1,8,1,1,5,5,5,5,
2144 5,7,1,1,3,3,1,3,1,3,1,1,5,5,5,1,5,5,5,5,5,1,8,1,1,5,5,5,5,5,7,1,1,3,3,1,3,
2145 1,3,1,1,2,2,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2146 1,1,1,1,1,1,1,7,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2147 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,7,1,1,1,1,1,1,1,5,5,5,1,5,5,5,5,5,1,8,1,1,
2148 5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,
2149 1,2,1,2,1,1,1,1,1,1,4,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,2,1,2,2,
2150 2,2,1,5,1,1,1,1,1,4,2,1,1,1,1,1,1,1,4,2,1,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,
2151 1,1,7,1,1,1,1,2,2,1,2,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,1,4,4,4,4,1,4,4,4,4,
2152 4,4,4,4,4,7,2,4,4,4,4,4,1,1,7,3,1,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
2153 4,4,4,4,4,4,4,4,4,1,4,4,4,7,2,1,1,1,1,5,1,3,5,5,5,1,5,5,5,5,5,5,1,8,1,1,5,
2154 5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,
2155 1,1,1,2,2,1,2,1,2,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,1,1,5,1,3,1,9,5,3,3,1,
2156 2,2,7,2,1,8,1,8,1,7,1,1,1,1,1,5,1,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,5,
2157 2,1,1,1,7,2,1,1,1,1,1,1,1,1,5,2,2,1,1,2,1,1,7,1,1,7,1,1,1,1,1,1,7,1,1,1,1,
2158 1,1,7,1,1,1,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,1,1,8,1,8,1,7,1,1,1,1,1,3,1,1,8,
2159 1,8,1,7,1,1,1,1,1,3,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,
2160 7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,8,1,1,7,1,1,1,1,1,1,1,1,1,
2161 2,2,7,2,1,10,10,10,1,10,10,1,8,7,1,1,1,1,1,2,2,7,2,1,1,4,1,1,8,1,5,7,1,3,1,
2162 1,3,7,3,7,8,1,7,1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
2163 8,8,8,8,8,8,8,8,8,8,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2164 1,1,1,1,1,1,7,1,1,1,1,1,7,2,2,7,2,2,2,2,7,1,2,2,2,5,2,2,5,2,2,5,10,10,10,
2165 10,5,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2166 2,2,2,2,2,2,2,7,2,2,2,2,2,1,1,4,4,4,4,4,4,4,1,1,7,3,1,2,1,1,1,1,7,2,1,3,1,
2167 1,5,1,3,1,5,1,3,1,1,7,2,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,2,
2168 2,7,1,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,1,10,10,10,5,
2169 1,5,5,5,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,7,1,1,2,1,1,1,5,5,5,5,5,5,
2170 5,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,7,1,1,2,1,1,1,1,7,2,1,1,1,7,1,1,2,8,8,1,
2171 8,8,8,8,1,8,1,1,8,8,7,1,1,1,1,1,1,1,1,1,1,8,8,8,1,8,8,8,8,8,1,8,1,1,8,8,8,
2172 8,8,7,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,1,5,
2173 5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,
2174 1,1,2,1,1,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,2,1,2,1,1,1,1,5,5,2,
2175 2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,2,1,2,1,1,1,1,4,4,4,4,1,4,4,4,4,4,4,
2176 4,4,4,7,2,8,1,8,1,8,1,1,7,1,1,1,1,1,1,1,1,1,1,1,7,2,2,7,2,1,1,7,2,5,1,5,1,
2177 5,7,1,1,2,1,1,1,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,1,1,9,4,3,3,1,1,1,9,7,3,3,
2178 1,1,1,9,7,3,3,1,1,9,1,7,3,1,3,1,5,5,2,1,2,2,5,5,5,1,9,1,1,1,1,1,1,1,7,3,1,
2179 1,1,2,2,1,2,1,3,1,1,2,1,2,2,1,2,1,1,1,1,1,1,1,1,7,3,2,2,5,1,1,3,5,5,2,2,5,
2180 5,5,1,1,1,5,1,1,1,7,1,2,2,1,2,1,1,1,2,1,2,1,1,1,1,1,1,7,1,2,2,2,1,2,2,1,8,
2181 1,9,5,7,3,3,3,1,3,1,1,1,7,1,2,2,2,1,2,2,9,5,3,3,1,5,5,2,2,2,5,5,5,1,1,1,7,
2182 2,2,1,2,1,1,2,1,2,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,9,8,1,9,1,1,5,7,3,1,1,
2183 1,1,3,1,1,3,1,3,3,1,1,1,3,7,9,9,9,9,9,1,9,9,9,1,9,9,9,9,1,9,9,9,9,9,9,9,9,
2184 9,9,9,1,9,3,9,9,9,9,9,1,9,9,9,7,3,1,1,1,3,1,3,7,3,7,9,9,9,9,9,1,9,9,9,9,1,
2185 9,9,9,9,9,9,9,9,9,9,9,9,1,9,9,9,9,9,9,9,9,9,4,3,3,1,1,3,1,1,5,5,5,5,5,5,5,
2186 5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,2,2,4,2,1,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,
2187 7,1,1,3,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,1,5,5,5,5,5,5,5,5,
2188 1,5,5,5,5,5,5,7,1,1,2,1,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1,1,2,2,
2189 1,2,2,1,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,
2190 5,7,1,1,2,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,2,2,4,2,10,
2191 10,4,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2192 2,2,2,2,2,2,2,2,2,2,7,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,
2193 5,5,5,5,7,1,1,3,1,1,1,5,5,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,7,1,1,
2194 3,1,1,5,5,5,5,5,1,1,1,7,2,2,2,2,1,2,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,
2195 1,1,1,2,1,2,2,2,2,1,4,1,4,2,2,7,2,1,1,5,5,5,5,5,5,5,1,5,5,5,5,7,1,1,2,1,1,
2196 1,1,7,1,1,1,1,1,1,7,1,1,1,1,1,1,7,1,1,1,2,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,
2197 1,7,1,1,1,2,2,1,2,1,1,1,2,1,2,2,1,2,1,1,1,1,1,1,1,1,4,1,1,1,4,1,1,2,2,7,1,
2198 1,3,2,7,2,1,1,7,2,10,10,10,1,5,5,5,5,10,10,5,5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,
2199 1,9,1,7,3,1,3,1,2,1,2,9,7,3,3,1,1,1,8,1,8,1,7,1,1,1,1,1,3,1,5,5,5,5,5,1,1,
2200 1,1,7,2,2,2,2,2,1,2,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,2,1,2,1,1,
2201 1,1,1,9,9,9,1,9,9,1,7,1,1,1,1,5,5,2,2,2,5,5,5,1,1,1,5,1,1,1,1,1,7,1,1,1,2,
2202 2,1,2,1,1,1,2,1,2,2,1,2,1,1,1,1,1,1,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,
2203 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,7,1,1,1,1,1,1,1,1,1,4,
2204 1,1,2,1,2,9,7,3,3,1,1,1,7,2,9,9,9,9,9,4
2205 };
2206
2207
2208 static const unsigned short ag_pstt[] = {
2209 3,1,3,3,3,3,2,3,3,3,3,0,2,2,3,0,2,1,
2210 300,300,300,300,300,1,298,300,300,300,300,300,300,300,300,300,300,300,300,
2211 300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,
2212 300,1,301,1,
2213 1,2,4,2,2,1,
2214 8,8,4,5,5,23,8,8,8,3,7,8,6,5,
2215 9,9,9,9,9,9,9,9,9,9,9,9,9,9,122,122,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
2216 4,9,124,
2217 117,5,
2218 10,10,6,10,
2219 24,1,24,24,24,24,24,24,24,24,24,24,24,24,4,119,12,12,118,24,24,24,24,24,24,
2220 24,7,118,118,11,12,118,1,
2221 95,95,26,13,17,14,8,16,25,25,26,24,23,22,23,23,23,21,20,48,19,15,18,
2222 121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
2223 121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,123,
2224 116,10,
2225 27,27,11,27,
2226 114,12,
2227 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,13,30,30,14,14,30,14,29,14,28,1,
2228 271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,31,31,271,
2229 271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
2230 14,31,32,32,273,
2231 96,96,96,1,3,3,3,3,3,3,3,3,96,96,3,3,3,33,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
2232 15,33,33,101,33,1,
2233 95,95,34,16,35,36,35,15,
2234 3,1,3,3,3,3,3,3,3,3,3,3,3,3,37,37,37,2,3,3,3,17,2,2,37,2,38,1,
2235 44,44,44,44,44,1,44,44,44,39,44,44,44,44,4,44,44,44,44,44,44,44,44,44,40,44,
2236 274,44,44,44,44,44,44,44,44,18,44,43,45,44,42,41,1,
2237 48,46,50,47,
2238 95,95,20,50,48,49,15,
2239 51,46,52,
2240 53,36,54,37,
2241 4,5,5,23,55,6,5,
2242 4,5,5,24,56,6,5,
2243 95,95,27,13,17,14,25,16,26,30,30,58,57,22,57,57,57,21,20,48,19,15,18,
2244 31,26,
2245 115,27,
2246 59,28,
2247 28,28,29,107,28,
2248 104,104,104,104,104,1,104,104,104,104,104,104,104,104,104,104,104,104,4,104,
2249 28,28,2,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
2250 104,104,104,30,2,2,105,29,105,28,1,
2251 268,31,
2252 272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,31,31,272,
2253 272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
2254 32,31,270,
2255 97,97,97,1,97,97,2,4,2,2,1,
2256 78,78,78,78,34,60,
2257 72,72,72,62,63,72,61,72,72,62,72,35,65,62,64,
2258 66,36,
2259 67,67,67,67,67,67,67,67,67,67,67,67,67,4,5,5,67,67,23,37,7,67,6,5,
2260 68,38,216,
2261 70,70,70,70,70,70,70,69,307,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
2262 70,70,70,70,70,70,70,70,70,39,70,70,309,
2263 72,72,72,72,72,72,72,71,72,72,72,72,72,72,72,72,72,72,72,72,72,72,315,72,72,
2264 72,72,72,72,72,72,72,72,72,40,72,72,317,
2265 280,41,
2266 279,42,
2267 73,73,43,73,
2268 74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
2269 74,74,74,281,74,74,74,74,74,74,74,74,74,44,74,
2270 75,45,267,
2271 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,6,6,4,6,28,28,30,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
2272 6,6,6,6,46,30,30,10,10,30,10,29,10,28,1,
2273 129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,47,77,82,81,90,132,
2274 131,92,165,15,91,91,164,86,131,171,94,170,93,93,93,93,83,80,
2275 1,3,3,3,2,3,3,3,48,2,2,51,2,1,
2276 48,50,
2277 51,47,52,
2278 6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,6,51,30,30,8,8,30,8,29,8,28,
2279 1,
2280 95,95,52,49,49,15,
2281 3,3,3,1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,53,2,2,5,2,1,
2282 129,129,95,181,95,129,129,129,87,69,69,69,69,69,89,88,84,85,13,78,79,76,46,
2283 54,99,77,82,81,90,132,131,92,100,165,61,98,62,97,96,15,91,91,164,86,131,
2284 97,147,95,97,93,93,93,93,83,80,
2285 33,1,33,4,119,12,12,118,33,33,33,33,55,118,118,11,12,118,1,
2286 32,1,32,4,119,12,12,118,32,101,32,32,32,53,56,54,118,102,38,103,103,118,11,
2287 12,118,1,
2288 4,5,5,35,57,55,6,5,
2289 4,5,5,34,58,56,6,5,
2290 1,104,111,104,104,104,1,
2291 105,1,105,2,60,2,2,105,2,1,
2292 80,80,80,80,61,106,
2293 107,13,62,88,76,110,76,109,108,110,
2294 3,1,3,2,3,63,2,2,86,2,1,
2295 95,95,34,64,35,111,35,15,
2296 73,73,73,75,73,73,73,75,73,65,
2297 6,1,6,4,28,28,30,66,30,30,52,52,30,52,29,52,28,1,
2298 95,113,114,115,116,119,120,121,122,123,124,112,95,125,89,217,67,128,129,15,
2299 127,117,130,219,130,130,126,118,
2300 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,68,2,2,17,2,1,
2301 304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
2302 304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,69,
2303 304,
2304 306,306,306,306,306,306,306,69,306,306,306,306,306,306,306,306,306,306,306,
2305 306,306,306,306,306,306,306,306,306,306,306,306,306,306,308,306,
2306 312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
2307 312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,71,
2308 312,
2309 314,314,314,314,314,314,314,71,314,314,314,314,314,314,314,314,314,314,314,
2310 314,314,314,314,314,314,314,314,314,314,314,314,314,314,316,314,
2311 278,73,
2312 282,282,282,282,282,1,282,282,282,39,282,282,282,282,4,282,282,282,282,282,
2313 282,282,282,282,282,282,40,282,282,282,282,282,282,134,282,282,282,275,
2314 282,133,132,131,282,1,
2315 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,75,2,2,18,2,1,
2316 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,4,6,28,28,30,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
2317 6,76,30,30,11,11,30,11,29,11,28,1,
2318 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
2319 289,289,289,289,289,289,289,289,289,14,289,289,289,77,265,136,18,135,
2320 6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,78,30,30,13,13,30,13,29,13,
2321 28,1,
2322 6,6,6,1,6,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,6,6,6,79,30,30,12,12,30,12,
2323 29,12,28,1,
2324 202,202,203,203,202,202,202,138,137,195,194,193,192,191,190,189,188,187,186,
2325 185,202,203,203,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
2326 202,202,202,202,202,202,202,202,80,202,207,184,209,143,142,141,143,202,
2327 140,139,
2328 129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,81,77,82,81,90,132,
2329 131,92,165,145,53,144,97,96,15,91,91,164,86,131,97,147,95,97,93,93,93,
2330 93,83,80,
2331 129,129,95,69,181,95,129,129,129,87,69,89,88,69,84,85,13,78,79,76,46,82,99,
2332 77,82,81,90,132,131,92,165,146,53,147,56,148,144,97,96,15,91,91,164,86,
2333 131,97,147,95,97,93,93,93,93,83,80,
2334 149,254,
2335 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,84,30,30,16,16,30,16,29,16,28,1,
2336 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,85,30,30,15,15,30,15,29,15,28,1,
2337 138,138,150,150,151,86,153,152,150,
2338 154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
2339 154,154,154,154,154,154,154,154,154,154,154,154,87,
2340 157,157,157,157,157,157,157,138,137,195,194,193,192,191,190,189,188,187,186,
2341 185,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
2342 157,157,157,157,157,157,157,157,88,155,155,155,155,155,140,139,
2343 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,89,30,30,21,21,30,21,29,21,28,1,
2344 129,129,95,95,129,129,129,87,89,88,84,85,13,90,90,132,131,92,165,15,91,91,
2345 164,86,131,156,93,93,93,93,
2346 157,163,
2347 129,129,95,95,129,129,129,87,89,88,84,85,13,92,90,132,131,92,165,15,91,91,
2348 164,86,131,156,156,156,
2349 158,150,
2350 160,161,84,85,159,169,262,162,163,
2351 160,161,84,85,159,148,262,162,163,
2352 129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,96,77,82,81,90,132,
2353 131,92,165,164,15,91,91,164,86,131,164,147,95,164,93,93,93,93,83,80,
2354 211,211,211,211,165,211,211,211,211,211,211,211,211,211,97,66,
2355 69,69,69,69,69,46,51,98,68,99,65,
2356 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
2357 289,289,289,289,289,289,289,289,289,14,289,289,289,99,70,166,18,135,
2358 101,42,102,63,
2359 6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,101,30,30,22,22,30,22,29,22,
2360 28,1,
2361 129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,102,77,82,81,90,
2362 132,131,92,165,98,64,97,96,15,91,91,164,86,131,97,147,95,97,93,93,93,93,
2363 83,80,
2364 101,41,102,40,
2365 1,2,112,2,2,1,
2366 95,95,105,79,15,
2367 167,1,167,2,106,2,2,167,2,1,
2368 3,1,3,3,3,3,2,3,3,3,3,3,3,107,2,2,90,2,1,
2369 95,95,91,92,15,
2370 107,13,109,88,168,110,168,109,108,110,
2371 107,13,82,88,84,109,108,94,
2372 170,169,111,
2373 1,171,112,171,171,171,1,
2374 1,172,113,172,172,172,1,
2375 1,173,114,173,173,173,1,
2376 1,174,115,174,174,174,240,1,
2377 1,175,116,175,175,175,1,
2378 4,28,28,176,51,117,177,176,29,176,28,238,176,
2379 4,28,28,176,51,118,178,176,29,176,28,237,176,
2380 1,174,119,174,174,174,236,1,
2381 1,174,120,174,174,174,235,1,
2382 1,174,121,174,174,174,234,1,
2383 1,174,122,174,174,174,233,1,
2384 1,174,123,174,174,174,232,1,
2385 1,174,124,174,174,174,231,1,
2386 1,4,28,28,180,125,180,180,179,180,179,29,179,28,1,
2387 95,95,126,229,15,
2388 99,99,99,1,99,99,182,181,127,182,182,181,182,1,
2389 95,95,128,223,15,
2390 46,222,183,
2391 4,5,5,23,130,184,218,6,5,
2392 288,131,
2393 287,132,
2394 185,185,133,185,
2395 186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
2396 186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
2397 186,134,186,
2398 189,189,189,189,189,189,189,189,189,39,189,189,189,189,189,189,189,189,189,
2399 189,189,40,189,189,189,189,189,189,189,189,189,135,188,187,189,189,
2400 190,136,
2401 196,196,137,
2402 144,144,145,144,138,191,142,
2403 198,198,200,
2404 197,197,199,
2405 206,206,179,
2406 205,205,205,205,178,
2407 204,204,204,204,204,138,137,195,194,193,192,191,190,189,188,187,186,185,192,
2408 204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
2409 204,204,204,204,204,143,204,208,184,210,204,140,139,
2410 69,69,69,69,69,69,69,46,51,144,68,99,60,
2411 193,194,101,68,145,258,195,54,
2412 196,101,59,195,54,
2413 101,58,195,57,
2414 197,75,148,256,
2415 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,149,2,2,255,2,1,
2416 144,144,145,144,150,198,142,
2417 140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
2418 140,140,140,140,140,140,140,151,199,
2419 139,139,139,133,
2420 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,153,2,2,128,2,1,
2421 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,154,2,2,126,2,1,
2422 201,200,155,127,
2423 202,84,85,156,162,163,166,
2424 203,203,1,203,203,203,203,4,28,28,30,203,203,157,30,30,203,203,30,203,29,
2425 203,28,1,
2426 204,204,204,1,204,204,204,204,204,4,28,28,30,204,204,204,204,204,158,30,30,
2427 204,204,30,204,29,204,28,1,
2428 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,159,2,2,9,2,1,
2429 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,160,2,2,261,2,1,
2430 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,161,2,2,260,2,1,
2431 129,129,95,95,129,129,129,87,89,88,84,85,13,162,90,132,131,92,165,15,91,91,
2432 164,86,131,205,205,205,205,
2433 129,129,95,95,129,129,129,87,89,88,84,85,13,163,90,132,131,92,165,15,91,91,
2434 164,86,131,206,206,206,206,
2435 211,211,211,211,165,211,211,211,211,211,211,211,211,211,164,67,
2436 207,1,207,4,28,28,30,165,30,30,207,207,30,207,29,207,28,1,
2437 208,166,
2438 95,95,167,81,15,
2439 202,168,89,
2440 3,1,3,2,3,169,2,2,87,2,1,
2441 1,3,3,3,2,3,3,3,3,3,3,170,2,2,85,2,1,
2442 1,209,2,230,2,2,1,
2443 1,210,2,172,2,2,1,
2444 1,211,2,173,2,2,1,
2445 1,2,79,174,2,212,2,1,
2446 129,129,95,1,181,95,129,129,129,87,2,89,88,84,85,13,78,79,175,2,82,81,90,
2447 132,131,92,165,15,2,91,91,164,86,131,239,95,239,93,93,93,93,83,80,1,
2448 75,176,248,
2449 95,95,246,213,15,176,
2450 129,129,95,95,129,129,129,87,89,88,246,84,85,13,178,90,132,131,92,165,15,91,
2451 91,164,86,131,214,93,93,93,93,
2452 79,179,215,
2453 98,98,98,1,98,98,4,28,28,2,104,180,2,2,105,29,105,28,1,
2454 46,181,216,
2455 100,100,100,1,100,100,2,4,2,2,1,
2456 129,129,95,181,95,129,129,129,34,84,85,183,132,131,35,224,35,15,227,86,131,
2457 225,80,
2458 95,1,113,114,115,116,119,120,121,122,123,124,112,95,4,119,12,12,118,125,89,
2459 24,184,118,128,129,15,127,118,11,12,118,117,221,221,126,118,1,
2460 286,185,
2461 282,282,282,282,282,1,282,282,282,39,282,282,282,282,4,282,282,282,282,282,
2462 282,282,282,282,282,282,40,282,284,282,282,282,282,282,134,282,282,282,
2463 186,282,133,132,131,282,1,
2464 297,187,
2465 296,188,
2466 292,292,292,292,292,1,292,292,292,292,39,292,292,292,292,292,293,292,292,
2467 292,292,292,292,40,292,292,292,292,292,292,292,292,292,290,293,293,188,
2468 187,292,1,
2469 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,190,2,2,266,2,1,
2470 144,144,145,144,201,143,
2471 1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,192,2,2,177,2,1,
2472 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,193,2,2,264,2,1,
2473 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,194,2,2,259,2,1,
2474 129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,195,77,82,81,90,
2475 132,131,92,165,55,144,97,96,15,91,91,164,86,131,97,147,95,97,93,93,93,
2476 93,83,80,
2477 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,196,2,2,263,2,1,
2478 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,197,2,2,257,2,1,
2479 144,144,145,144,137,143,
2480 141,141,134,
2481 157,157,157,157,157,157,157,138,137,195,194,193,192,191,190,189,188,187,186,
2482 185,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
2483 157,157,157,157,157,157,157,157,200,217,217,217,217,217,140,139,
2484 1,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,201,2,2,20,2,1,
2485 1,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,202,2,2,19,2,1,
2486 129,129,129,129,129,87,84,85,203,132,131,168,168,86,131,
2487 129,129,95,95,129,129,129,87,89,88,84,85,13,204,90,132,131,92,165,15,91,91,
2488 164,86,131,154,154,154,
2489 158,152,
2490 158,151,
2491 213,213,207,212,218,
2492 1,3,3,3,3,3,3,3,2,3,3,3,3,208,2,2,71,2,1,
2493 1,219,209,219,219,219,1,
2494 1,220,210,220,220,220,1,
2495 1,174,211,174,174,174,241,1,
2496 129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,212,82,81,90,132,131,
2497 92,165,15,91,91,164,86,131,252,95,252,93,93,93,93,83,80,221,
2498 46,172,222,
2499 84,85,250,162,163,
2500 95,95,215,213,15,175,
2501 181,216,226,80,
2502 201,217,167,
2503 214,214,214,1,3,3,3,3,214,214,3,3,3,2,3,3,3,3,3,3,218,2,2,215,2,1,
2504 1,2,79,219,2,223,2,1,
2505 243,1,243,2,220,2,2,224,1,
2506 4,28,28,176,51,221,225,176,29,176,28,251,176,
2507 129,129,129,129,129,87,226,84,85,222,132,131,173,173,174,86,131,
2508 129,129,95,95,129,129,129,87,89,88,84,85,13,223,90,132,131,92,165,15,91,91,
2509 164,86,131,227,93,93,93,93,
2510 244,244,244,1,244,244,228,224,228,228,228,1,
2511 129,129,95,181,95,129,129,129,87,89,88,246,84,85,13,78,79,225,82,81,90,132,
2512 131,92,165,15,91,91,164,86,131,253,95,253,93,93,93,93,83,80,
2513 157,157,157,157,157,157,157,138,137,195,194,193,192,191,190,189,188,187,186,
2514 185,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
2515 157,157,157,157,157,157,157,157,226,229,229,229,229,229,140,139,
2516 84,85,249,162,163,
2517 243,1,243,2,228,2,2,230,1,
2518 201,229,127,
2519 244,244,244,244,244,242,
2520
2521 };
2522
2523
2524 static const unsigned short ag_sbt[] = {
2525 0, 18, 59, 65, 79, 118, 120, 124, 157, 180, 215, 217, 221, 223,
2526 254, 296, 337, 345, 373, 416, 420, 427, 430, 434, 441, 448, 471, 473,
2527 475, 477, 482, 532, 534, 574, 585, 591, 606, 608, 632, 635, 673, 711,
2528 713, 715, 719, 759, 762, 813, 854, 868, 870, 873, 907, 913, 944, 999,
2529 1018,1044,1052,1060,1067,1077,1083,1093,1104,1112,1122,1140,1168,1190,
2530 1228,1263,1301,1336,1338,1382,1404,1452,1489,1522,1559,1616,1663,1718,
2531 1720,1749,1778,1787,1819,1872,1901,1931,1933,1961,1963,1972,1981,2024,
2532 2040,2051,2088,2092,2125,2171,2175,2181,2186,2196,2215,2220,2230,2238,
2533 2241,2248,2255,2262,2270,2277,2290,2303,2311,2319,2327,2335,2343,2351,
2534 2366,2371,2385,2390,2393,2402,2404,2406,2410,2450,2486,2488,2491,2498,
2535 2501,2504,2507,2512,2562,2575,2583,2588,2592,2596,2618,2625,2653,2657,
2536 2687,2717,2721,2728,2752,2781,2803,2825,2847,2876,2905,2921,2939,2941,
2537 2946,2949,2960,2977,2984,2991,2998,3006,3050,3053,3059,3090,3093,3112,
2538 3115,3126,3149,3187,3189,3234,3236,3238,3278,3300,3306,3329,3351,3373,
2539 3419,3441,3463,3469,3472,3525,3554,3584,3599,3627,3629,3631,3636,3655,
2540 3662,3669,3677,3717,3720,3725,3731,3735,3738,3764,3772,3781,3794,3811,
2541 3841,3853,3893,3946,3951,3960,3963,3969
2542 };
2543
2544
2545 static const unsigned short ag_sbe[] = {
2546 11, 56, 61, 74, 115, 119, 122, 150, 163, 214, 216, 219, 222, 243,
2547 291, 331, 340, 366, 408, 418, 422, 428, 431, 437, 444, 454, 472, 474,
2548 476, 479, 524, 533, 571, 581, 589, 602, 607, 627, 633, 669, 707, 712,
2549 714, 717, 757, 760, 802, 830, 862, 869, 871, 896, 909, 938, 967,1011,
2550 1032,1048,1056,1062,1071,1081,1085,1098,1107,1121,1129,1156,1184,1226,
2551 1261,1299,1334,1337,1375,1398,1441,1484,1511,1548,1604,1633,1684,1719,
2552 1738,1767,1783,1818,1864,1890,1914,1932,1946,1962,1968,1977,1998,2038,
2553 2047,2083,2089,2114,2142,2172,2177,2183,2190,2209,2217,2222,2232,2240,
2554 2243,2250,2257,2264,2272,2282,2295,2305,2313,2321,2329,2337,2345,2356,
2555 2368,2379,2387,2391,2397,2403,2405,2408,2448,2481,2487,2490,2495,2500,
2556 2503,2506,2511,2554,2571,2579,2585,2589,2594,2612,2622,2651,2656,2681,
2557 2711,2719,2724,2741,2770,2797,2819,2841,2860,2889,2919,2928,2940,2943,
2558 2947,2954,2971,2980,2987,2994,3001,3024,3051,3055,3073,3091,3104,3113,
2559 3122,3137,3171,3188,3227,3235,3237,3271,3294,3304,3323,3345,3367,3390,
2560 3435,3457,3467,3471,3517,3548,3578,3592,3612,3628,3630,3633,3649,3657,
2561 3664,3671,3693,3718,3722,3727,3732,3736,3758,3767,3776,3786,3803,3824,
2562 3848,3870,3938,3948,3955,3961,3968,3969
2563 };
2564
2565
2566 static const unsigned char ag_fl[] = {
2567 1,1,2,0,1,2,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,2,0,1,0,2,4,2,2,1,
2568 1,1,2,3,1,2,3,2,1,1,1,1,2,1,3,1,3,4,1,2,2,1,2,1,1,2,1,1,2,2,2,2,3,2,0,
2569 2,4,1,2,0,1,3,1,0,4,0,5,1,1,2,4,2,4,1,3,2,1,2,1,2,1,2,3,3,2,3,2,1,1,1,
2570 2,1,2,1,0,1,2,3,1,2,3,3,2,2,2,1,2,0,1,2,1,3,3,3,0,1,1,1,1,2,1,1,2,1,2,
2571 0,2,1,2,1,1,1,1,1,1,1,3,3,1,4,1,2,1,1,1,1,1,1,1,1,1,3,5,4,3,3,3,1,3,3,
2572 4,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1,1,2,1,1,2,2,2,1,2,1,
2573 2,0,3,1,2,2,3,0,2,3,1,3,1,2,3,3,4,3,1,2,2,2,2,2,2,2,2,2,2,3,2,4,7,1,2,
2574 0,1,1,2,6,3,4,1,3,1,3,3,4,3,4,3,3,2,4,4,2,4,3,2,1,2,0,1,2,0,2,1,1,3,2,
2575 2,0,2,1,3,1,3,2,2,0,2,1,2,2,1,1,2,2,2,1,2,2,1,1,2,1,2,0,1,2,1,1,2,1,2,
2576 0,1,2,1
2577 };
2578
2579 static const unsigned char ag_ptt[] = {
2580 0, 4, 4, 5, 5, 1, 9, 9, 6, 10, 12, 14, 16, 18, 20, 22, 24, 26,
2581 28, 30, 32, 34, 36, 40, 40, 42, 42, 44, 44, 45, 45, 38, 41, 41, 43, 43,
2582 47, 47, 47, 52, 52, 47, 50, 48, 48, 48, 49, 49, 57, 57, 59, 59, 58, 63,
2583 63, 65, 66, 66, 68, 68, 64, 53, 53, 53, 51, 70, 69, 69, 73, 67, 67, 67,
2584 62, 62, 78, 78, 62, 76, 81, 76, 82, 76, 79, 79, 79, 77, 85, 85, 88, 84,
2585 89, 91, 91, 83, 83, 92, 92, 92, 95, 95, 95, 60, 3, 3, 8, 8, 8, 99,
2586 99,103,103,101,101,105,105,105, 39, 39, 39, 39,109,109,110,110,100,111,
2587 111,115,112,119,119,117,117,118,118,125,125,118,120,120,122,122,126,126,
2588 130,130, 71, 71,132,132,134,134,134,136,136,137,137,116,116,116,116,116,
2589 139,139,139,139,139,145,145, 54, 54, 54,147,147,147,148,148,149,151,151,
2590 151,150,156,156,156,141,141,141,141,141,141,141,141,141,141,141,169,171,
2591 143,142,142,144,153,153,153,153,153,154,154,155,155, 72, 72,177,177,176,
2592 56,180,180,178,179,179,181,181,181,181,181,181,181,181,183,182,182,182,
2593 182,182,182,182,182,182,182,182,182,200,200,201,201,201,193,192,192,186,
2594 202,202,135,135,135,135,135,135,135,135,135,135,135,133,133, 55,211,212,
2595 212,213,213,209,210,210,214,214,214,214,214,215,215,219,219,219,219,219,
2596 219,221, 74,222,222,222,223,223,223,223, 98,226,226, 98,232,232,232,233,
2597 233,234,234,218,235,235,235,236,236,237,237,217,231
2598 };
2599
2600 static const unsigned char *ag_valid(int ag_k) {
2601 const unsigned char *ag_tp = &ag_tstt[ag_sbt[(PCB).sn+1]];
2602 while (*--ag_tp != (unsigned char) ag_k) if (*ag_tp == 0) return NULL;
2603 return ag_tp;
2604 }
2605
2606 int pgg_change_reduction(pgg_token_type ag_k) {
2607 if (!ag_valid(ag_k)) return 0;
2608 (PCB).reduction_token = ag_k;
2609 return 1;
2610 }
2611
2612 static void ag_default(const int *ag_tp) {
2613 (PCB).ag_dsn = (PCB).sn;
2614 (PCB).ag_dtl = ag_tp;
2615 while (!ag_valid((pgg_token_type) *ag_tp)) ag_tp++;
2616 (PCB).reduction_token = (pgg_token_type) *ag_tp;
2617 }
2618
2619
2620
2621 static void ag_ra(void)
2622 {
2623 switch(ag_rpx[(PCB).ag_ap]) {
2624 case 1: ag_rp_1(); break;
2625 case 2: ag_rp_2(); break;
2626 case 3: ag_rp_3(V(0,(int *))); break;
2627 case 4: ag_rp_4(); break;
2628 case 5: ag_rp_5(V(0,(int *))); break;
2629 case 6: ag_rp_6(); break;
2630 case 7: V(0,(int *)) = ag_rp_7(V(0,(int *))); break;
2631 case 8: V(0,(int *)) = ag_rp_8(V(0,(int *))); break;
2632 case 9: V(0,(int *)) = ag_rp_9(); break;
2633 case 10: V(0,(int *)) = ag_rp_10(V(0,(int *))); break;
2634 case 11: ag_rp_11(V(0,(int *))); break;
2635 case 12: ag_rp_12(V(2,(int *))); break;
2636 case 13: V(0,(int *)) = ag_rp_13(); break;
2637 case 14: V(0,(int *)) = ag_rp_14(); break;
2638 case 15: V(0,(int *)) = ag_rp_15(); break;
2639 case 16: ag_rp_16(V(0,(int *))); break;
2640 case 17: ag_rp_17(V(1,(int *))); break;
2641 case 18: ag_rp_18(V(0,(int *))); break;
2642 case 19: V(0,(int *)) = ag_rp_19(V(1,(int *))); break;
2643 case 20: ag_rp_20(V(0,(int *))); break;
2644 case 21: ag_rp_21(V(0,(int *))); break;
2645 case 22: ag_rp_22(V(1,(int *))); break;
2646 case 23: V(0,(int *)) = ag_rp_23(V(1,(int *))); break;
2647 case 24: ag_rp_24(V(0,(int *)), V(1,(int *))); break;
2648 case 25: ag_rp_25(V(1,(int *)), V(2,(int *))); break;
2649 case 26: V(0,(int *)) = ag_rp_26(); break;
2650 case 27: V(0,(int *)) = ag_rp_27(); break;
2651 case 28: V(0,(int *)) = ag_rp_28(); break;
2652 case 29: ag_rp_29(); break;
2653 case 30: ag_rp_30(); break;
2654 case 31: ag_rp_31(); break;
2655 case 32: ag_rp_32(); break;
2656 case 33: ag_rp_33(); break;
2657 case 34: ag_rp_34(); break;
2658 case 35: ag_rp_35(); break;
2659 case 36: ag_rp_36(); break;
2660 case 37: ag_rp_37(); break;
2661 case 38: ag_rp_38(); break;
2662 case 39: ag_rp_39(); break;
2663 case 40: ag_rp_40(); break;
2664 case 41: ag_rp_41(); break;
2665 case 42: ag_rp_42(); break;
2666 case 43: ag_rp_43(V(0,(int *))); break;
2667 case 44: ag_rp_44(V(1,(int *))); break;
2668 case 45: ag_rp_45(V(2,(int *))); break;
2669 case 46: ag_rp_46(V(2,(int *))); break;
2670 case 47: ag_rp_47(V(1,(int *))); break;
2671 case 48: ag_rp_48(V(2,(int *))); break;
2672 case 49: V(0,(int *)) = ag_rp_49(V(1,(int *))); break;
2673 case 50: V(0,(int *)) = ag_rp_50(V(1,(int *))); break;
2674 case 51: V(0,(int *)) = ag_rp_51(V(0,(int *)), V(1,(int *))); break;
2675 case 52: V(0,(int *)) = ag_rp_52(); break;
2676 case 53: V(0,(int *)) = ag_rp_53(); break;
2677 case 54: V(0,(int *)) = ag_rp_54(V(1,(int *))); break;
2678 case 55: V(0,(int *)) = ag_rp_55(V(1,(int *))); break;
2679 case 56: V(0,(int *)) = ag_rp_56(V(0,(int *))); break;
2680 case 57: V(0,(int *)) = ag_rp_57(V(0,(int *)), V(1,(int *))); break;
2681 case 58: V(0,(int *)) = ag_rp_58(); break;
2682 case 59: V(0,(int *)) = ag_rp_59(V(0,(int *)), V(1,(int *))); break;
2683 case 60: V(0,(int *)) = ag_rp_60(V(0,(int *))); break;
2684 case 61: V(0,(int *)) = ag_rp_61(V(0,(int *)), V(1,(int *))); break;
2685 case 62: V(0,(int *)) = ag_rp_62(V(0,(int *))); break;
2686 case 63: V(0,(int *)) = ag_rp_63(V(0,(int *))); break;
2687 case 64: V(0,(int *)) = ag_rp_64(V(0,(int *))); break;
2688 case 65: V(0,(int *)) = ag_rp_65(V(0,(CharSetExpression * *))); break;
2689 case 66: V(0,(CharSetExpression * *)) = ag_rp_66(V(0,(CharSetExpression * *)), V(2,(CharSetExpression * *))); break;
2690 case 67: V(0,(CharSetExpression * *)) = ag_rp_67(V(0,(CharSetExpression * *)), V(2,(CharSetExpression * *))); break;
2691 case 68: V(0,(CharSetExpression * *)) = ag_rp_68(V(0,(CharSetExpression * *)), V(3,(CharSetExpression * *))); break;
2692 case 69: V(0,(CharSetExpression * *)) = ag_rp_69(V(1,(CharSetExpression * *))); break;
2693 case 70: V(0,(int *)) = ag_rp_70(V(0,(int *))); break;
2694 case 71: V(0,(CharSetExpression * *)) = ag_rp_71(V(0,(int *))); break;
2695 case 72: V(0,(CharSetExpression * *)) = ag_rp_72(V(0,(int *))); break;
2696 case 73: V(0,(CharSetExpression * *)) = ag_rp_73(); break;
2697 case 74: V(0,(CharSetExpression * *)) = ag_rp_74(V(1,(CharSetExpression * *))); break;
2698 case 75: V(0,(CharSetExpression * *)) = ag_rp_75(V(1,(int *)), V(3,(int *))); break;
2699 case 76: V(0,(CharSetExpression * *)) = ag_rp_76(V(0,(int *)), V(3,(int *))); break;
2700 case 77: ag_rp_77(V(2,(CharSetExpression * *))); break;
2701 case 78: ag_rp_78(V(2,(int *))); break;
2702 case 79: ag_rp_79(V(2,(int *))); break;
2703 case 80: ag_rp_80(); break;
2704 case 81: ag_rp_81(V(2,(int *))); break;
2705 case 82: ag_rp_82(V(2,(int *))); break;
2706 case 83: ag_rp_83(); break;
2707 case 84: V(0,(int *)) = ag_rp_84(V(0,(int *))); break;
2708 case 85: V(0,(int *)) = ag_rp_85(); break;
2709 case 86: V(0,(int *)) = ag_rp_86(); break;
2710 case 87: V(0,(int *)) = ag_rp_87(); break;
2711 case 88: V(0,(int *)) = ag_rp_88(); break;
2712 case 89: V(0,(int *)) = ag_rp_89(); break;
2713 case 90: V(0,(int *)) = ag_rp_90(); break;
2714 case 91: V(0,(int *)) = ag_rp_91(); break;
2715 case 92: V(0,(int *)) = ag_rp_92(); break;
2716 case 93: V(0,(int *)) = ag_rp_93(); break;
2717 case 94: V(0,(int *)) = ag_rp_94(); break;
2718 case 95: V(0,(int *)) = ag_rp_95(); break;
2719 case 96: V(0,(int *)) = ag_rp_96(V(1,(int *))); break;
2720 case 97: V(0,(int *)) = ag_rp_97(V(0,(int *)), V(1,(int *))); break;
2721 case 98: V(0,(int *)) = ag_rp_98(V(0,(int *)), V(1,(int *))); break;
2722 case 99: V(0,(int *)) = ag_rp_99(V(1,(int *))); break;
2723 case 100: ag_rp_100(V(0,(int *))); break;
2724 case 101: ag_rp_101(V(0,(int *))); break;
2725 case 102: ag_rp_102(V(1,(int *))); break;
2726 case 103: ag_rp_103(V(1,(int *))); break;
2727 case 104: ag_rp_104(V(1,(int *))); break;
2728 case 105: ag_rp_105(V(0,(int *))); break;
2729 case 106: ag_rp_106(V(1,(int *))); break;
2730 case 107: ag_rp_107(V(0,(int *))); break;
2731 case 108: ag_rp_108(V(1,(int *))); break;
2732 case 109: V(0,(int *)) = ag_rp_109(); break;
2733 case 110: V(0,(int *)) = ag_rp_110(); break;
2734 case 111: ag_rp_111(V(0,(int *))); break;
2735 case 112: ag_rp_112(V(1,(int *))); break;
2736 case 113: ag_rp_113(); break;
2737 case 114: ag_rp_114(); break;
2738 case 115: ag_rp_115(); break;
2739 case 116: ag_rp_116(); break;
2740 case 117: ag_rp_117(); break;
2741 case 118: ag_rp_118(V(2,(int *))); break;
2742 case 119: ag_rp_119(); break;
2743 case 120: ag_rp_120(); break;
2744 case 121: ag_rp_121(); break;
2745 case 122: ag_rp_122(); break;
2746 case 123: ag_rp_123(); break;
2747 case 124: ag_rp_124(); break;
2748 case 125: ag_rp_125(); break;
2749 case 126: ag_rp_126(); break;
2750 case 127: ag_rp_127(V(2,(int *))); break;
2751 case 128: ag_rp_128(); break;
2752 case 129: ag_rp_129(); break;
2753 case 130: ag_rp_130(V(4,(int *)), V(6,(int *))); break;
2754 case 131: V(0,(int *)) = ag_rp_131(); break;
2755 case 132: ag_rp_132(V(5,(CharSetExpression * *))); break;
2756 case 133: ag_rp_133(V(2,(CharSetExpression * *))); break;
2757 case 134: ag_rp_134(V(0,(int *))); break;
2758 case 135: ag_rp_135(V(2,(int *))); break;
2759 case 136: V(0,(int *)) = ag_rp_136(); break;
2760 case 137: V(0,(int *)) = ag_rp_137(); break;
2761 case 138: V(0,(int *)) = ag_rp_138(); break;
2762 case 139: V(0,(int *)) = ag_rp_139(); break;
2763 case 140: V(0,(int *)) = ag_rp_140(); break;
2764 case 141: V(0,(int *)) = ag_rp_141(); break;
2765 case 142: V(0,(int *)) = ag_rp_142(V(0,(CharSetExpression * *))); break;
2766 case 143: V(0,(int *)) = ag_rp_143(V(0,(CharSetExpression * *))); break;
2767 case 144: V(0,(int *)) = ag_rp_144(V(0,(CharSetExpression * *))); break;
2768 case 145: V(0,(int *)) = ag_rp_145(); break;
2769 case 146: V(0,(int *)) = ag_rp_146(); break;
2770 case 147: V(0,(int *)) = ag_rp_147(); break;
2771 case 148: V(0,(int *)) = ag_rp_148(); break;
2772 case 149: ag_rp_149(); break;
2773 case 150: ag_rp_150(); break;
2774 case 151: ag_rp_151(); break;
2775 case 152: ag_rp_152(); break;
2776 case 153: ag_rp_153(); break;
2777 case 154: ag_default(&ag_rtt[0]); ag_rp_154(); break;
2778 }
2779 (PCB).la_ptr = (PCB).pointer;
2780 }
2781
2782
2783 static const unsigned char ag_ctn[] = {
2784 0,0, 98,1, 0,0, 0,0,100,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,
2785 0,0, 0,0,209,1, 60,1, 58,1, 56,1, 55,1, 0,0, 49,1, 57,1, 47,1, 0,0,
2786 0,0, 0,0, 0,0, 0,0, 0,0, 99,1, 0,0, 0,0, 0,0, 0,0, 76,1, 0,0,
2787 58,2,178,1, 56,2,218,1,217,1,214,1,214,1,214,1, 0,0, 55,2, 0,0, 54,2,
2788 0,0, 0,0, 57,1, 0,0, 57,2, 50,1, 50,1, 0,0, 0,0, 0,0, 0,0, 0,0,
2789 76,2, 76,2, 0,0, 85,1, 0,0, 0,0, 58,3,178,2, 0,0, 0,0, 0,0, 0,0,
2790 0,0,214,2, 0,0, 0,0,133,1,133,1,135,1, 0,0,149,1,135,1,135,1,135,1,
2791 0,0, 0,0,112,1,111,1, 0,0, 0,0, 0,0,145,1, 0,0, 0,0,135,1,135,1,
2792 69,1, 69,1, 0,0, 67,1, 0,0, 0,0, 0,0, 0,0, 0,0, 76,3, 76,3, 0,0,
2793 0,0, 0,0, 0,0, 0,0,181,1,182,1,182,1,182,1,182,1,182,1,182,1,182,1,
2794 182,1,182,1,182,1,182,1,182,1,181,1,181,1,181,1,181,1,181,1, 0,0, 0,0,
2795 0,0, 0,0, 0,0, 74,1,133,2,142,1,144,1, 0,0,142,1,151,1,151,1,151,1,
2796 64,1, 0,0, 68,1, 68,1,135,2,135,2, 0,0, 0,0,120,1,112,2,111,2, 0,0,
2797 0,0,145,2, 0,0, 0,0,135,2,135,2, 0,0, 0,0, 69,2, 72,1, 67,2, 76,4,
2798 0,0, 85,3, 0,0, 0,0, 0,0, 0,0,186,1, 0,0, 0,0,148,2,182,2,148,2,
2799 0,0,181,2, 0,0,181,2, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,133,3,126,1,
2800 149,3,135,3,135,3, 0,0,135,3,135,3,126,1,122,1,145,3, 0,0, 0,0,145,3,
2801 0,0, 0,0, 0,0, 72,2, 67,3,182,3,182,3,182,3,186,2,147,1, 0,0,148,3,
2802 181,3,145,4, 0,0, 0,0, 0,0,202,1,147,2,182,5,200,1,202,2,115,1, 0,0,
2803 0,0,115,2,200,1
2804 };
2805
2806 #ifndef MISSING_FORMAT
2807 #define MISSING_FORMAT "Missing %s"
2808 #endif
2809 #ifndef UNEXPECTED_FORMAT
2810 #define UNEXPECTED_FORMAT "Unexpected %s"
2811 #endif
2812 #ifndef UNNAMED_TOKEN
2813 #define UNNAMED_TOKEN "input"
2814 #endif
2815
2816
2817 static void ag_diagnose(void) {
2818 int ag_snd = (PCB).sn;
2819 int ag_k = ag_sbt[ag_snd];
2820
2821 if (*TOKEN_NAMES[ag_tstt[ag_k]] && ag_astt[ag_k + 1] == ag_action_8) {
2822 sprintf((PCB).ag_msg, MISSING_FORMAT, TOKEN_NAMES[ag_tstt[ag_k]]);
2823 }
2824 else if (ag_astt[ag_sbe[(PCB).sn]] == ag_action_8
2825 && (ag_k = (int) ag_sbe[(PCB).sn] + 1) == (int) ag_sbt[(PCB).sn+1] - 1
2826 && *TOKEN_NAMES[ag_tstt[ag_k]]) {
2827 sprintf((PCB).ag_msg, MISSING_FORMAT, TOKEN_NAMES[ag_tstt[ag_k]]);
2828 }
2829 else if ((PCB).token_number && *TOKEN_NAMES[(PCB).token_number]) {
2830 sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, TOKEN_NAMES[(PCB).token_number]);
2831 }
2832 else if (isprint(INPUT_CODE((*(PCB).pointer))) && INPUT_CODE((*(PCB).pointer)) != '\\') {
2833 char buf[20];
2834 sprintf(buf, "\'%c\'", (char) INPUT_CODE((*(PCB).pointer)));
2835 sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, buf);
2836 }
2837 else sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, UNNAMED_TOKEN);
2838 (PCB).error_message = (PCB).ag_msg;
2839
2840
2841 {
2842 int ag_sx, ag_t;
2843
2844 ag_sx = (PCB).ssx;
2845 (PCB).ss[ag_sx] = (PCB).sn;
2846 do {
2847 while (ag_sx && ag_ctn[2*(ag_snd = (PCB).ss[ag_sx])] == 0) ag_sx--;
2848 if (ag_sx) {
2849 ag_t = ag_ctn[2*ag_snd];
2850 ag_sx -= ag_ctn[2*ag_snd +1];
2851 ag_snd = (PCB).ss[ag_sx];
2852 }
2853 else {
2854 ag_snd = 0;
2855 ag_t = ag_ptt[0];
2856 }
2857 } while (ag_sx && *TOKEN_NAMES[ag_t]==0);
2858 if (*TOKEN_NAMES[ag_t] == 0) ag_t = 0;
2859 (PCB).error_frame_ssx = ag_sx;
2860 (PCB).error_frame_token = (pgg_token_type) ag_t;
2861 }
2862
2863
2864 }
2865 static int ag_action_1_r_proc(void);
2866 static int ag_action_2_r_proc(void);
2867 static int ag_action_3_r_proc(void);
2868 static int ag_action_4_r_proc(void);
2869 static int ag_action_1_s_proc(void);
2870 static int ag_action_3_s_proc(void);
2871 static int ag_action_1_proc(void);
2872 static int ag_action_2_proc(void);
2873 static int ag_action_3_proc(void);
2874 static int ag_action_4_proc(void);
2875 static int ag_action_5_proc(void);
2876 static int ag_action_6_proc(void);
2877 static int ag_action_7_proc(void);
2878 static int ag_action_8_proc(void);
2879 static int ag_action_9_proc(void);
2880 static int ag_action_10_proc(void);
2881 static int ag_action_11_proc(void);
2882 static int ag_action_8_proc(void);
2883
2884
2885 static int (*const ag_r_procs_scan[])(void) = {
2886 ag_action_1_r_proc,
2887 ag_action_2_r_proc,
2888 ag_action_3_r_proc,
2889 ag_action_4_r_proc
2890 };
2891
2892 static int (*const ag_s_procs_scan[])(void) = {
2893 ag_action_1_s_proc,
2894 ag_action_2_r_proc,
2895 ag_action_3_s_proc,
2896 ag_action_4_r_proc
2897 };
2898
2899 static int (*const ag_gt_procs_scan[])(void) = {
2900 ag_action_1_proc,
2901 ag_action_2_proc,
2902 ag_action_3_proc,
2903 ag_action_4_proc,
2904 ag_action_5_proc,
2905 ag_action_6_proc,
2906 ag_action_7_proc,
2907 ag_action_8_proc,
2908 ag_action_9_proc,
2909 ag_action_10_proc,
2910 ag_action_11_proc,
2911 ag_action_8_proc
2912 };
2913
2914
2915 static int ag_rns(int ag_t, int *ag_sx, int ag_snd) {
2916 while (1) {
2917 int ag_act, ag_k = ag_sbt[ag_snd], ag_lim = ag_sbt[ag_snd+1];
2918 int ag_p;
2919
2920 while (ag_k < ag_lim && ag_tstt[ag_k] != ag_t) ag_k++;
2921 if (ag_k == ag_lim) break;
2922 ag_act = ag_astt[ag_k];
2923 ag_p = ag_pstt[ag_k];
2924 if (ag_act == ag_action_2) return ag_p;
2925 if (ag_act == ag_action_10 || ag_act == ag_action_11) {
2926 (*ag_sx)--;
2927 return ag_snd;
2928 }
2929 if (ag_act != ag_action_3 &&
2930 ag_act != ag_action_4) break;
2931 *ag_sx -= (ag_fl[ag_p] - 1);
2932 ag_snd = (PCB).ss[*ag_sx];
2933 ag_t = ag_ptt[ag_p];
2934 }
2935 return 0;
2936 }
2937
2938 static int ag_jns(int ag_t) {
2939 int ag_k;
2940
2941 ag_k = ag_sbt[(PCB).sn];
2942 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++;
2943 while (1) {
2944 int ag_p = ag_pstt[ag_k];
2945 int ag_sd;
2946
2947 switch (ag_astt[ag_k]) {
2948 case ag_action_2:
2949 GET_CONTEXT;
2950 (PCB).ss[(PCB).ssx] = (PCB).sn;
2951 return ag_p;
2952 case ag_action_10:
2953 case ag_action_11:
2954 return (PCB).ss[(PCB).ssx--];
2955 case ag_action_9:
2956 GET_CONTEXT;
2957 (PCB).ss[(PCB).ssx] = (PCB).sn;
2958 (PCB).ssx++;
2959 (PCB).sn = ag_p;
2960 ag_k = ag_sbt[(PCB).sn];
2961 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++;
2962 continue;
2963 case ag_action_3:
2964 case ag_action_4:
2965 ag_sd = ag_fl[ag_p] - 1;
2966 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
2967 else GET_CONTEXT;
2968 (PCB).ss[(PCB).ssx] = (PCB).sn;
2969 ag_t = ag_ptt[ag_p];
2970 ag_k = ag_sbt[(PCB).sn+1];
2971 while (ag_tstt[--ag_k] != ag_t);
2972 continue;
2973 case ag_action_5:
2974 case ag_action_6:
2975 if (ag_fl[ag_p]) break;
2976 (PCB).sn = ag_rns(ag_ptt[ag_p],&(PCB).ssx, (PCB).sn);
2977 (PCB).ss[++(PCB).ssx] = (PCB).sn;
2978 ag_k = ag_sbt[(PCB).sn];
2979 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++;
2980 continue;
2981 }
2982 break;
2983 }
2984 return 0;
2985 }
2986
2987
2988 static int ag_atx(int ag_t, int *ag_sx, int ag_snd) {
2989 int ag_k, ag_f;
2990 int ag_save_btsx = (PCB).btsx;
2991 int ag_flag = 1;
2992
2993 while (1) {
2994 int ag_a;
2995
2996 (PCB).bts[128 - ++(PCB).btsx] = *ag_sx;
2997 (PCB).ss[128 - (PCB).btsx] = (PCB).ss[*ag_sx];
2998 (PCB).ss[*ag_sx] = ag_snd;
2999 ag_k = ag_sbt[ag_snd];
3000 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++;
3001 ag_a = ag_astt[ag_k];
3002 if (ag_a == ag_action_2 ||
3003 ag_a == ag_action_3 ||
3004 ag_a == ag_action_10 ||
3005 ag_a == ag_action_11 ||
3006 ag_a == ag_action_1 ||
3007 ag_a == ag_action_4) break;
3008 if ((ag_a == ag_action_5 ||
3009 ag_a == ag_action_6) &&
3010 (ag_k = ag_fl[ag_f = ag_pstt[ag_k]]) == 0) {
3011 ag_snd = ag_rns(ag_ptt[ag_f],ag_sx, (PCB).ss[*ag_sx]);
3012 (*ag_sx)++;
3013 continue;
3014 }
3015 if (ag_a == ag_action_9) {
3016 ag_snd = ag_pstt[ag_k];
3017 (*ag_sx)++;
3018 continue;
3019 }
3020 ag_flag = 0;
3021 break;
3022 }
3023 while ((PCB).btsx > ag_save_btsx) {
3024 *ag_sx = (PCB).bts[128 - (PCB).btsx];
3025 (PCB).ss[*ag_sx] = (PCB).ss[128 - (PCB).btsx--];
3026 }
3027 return ag_flag;
3028 }
3029
3030
3031 static int ag_tst_tkn(void) {
3032 int ag_rk, ag_sx, ag_snd = (PCB).sn;
3033
3034 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr));
3035 (PCB).la_ptr++;
3036 if (ag_key_index[(PCB).sn]) {
3037 unsigned ag_k = ag_key_index[(PCB).sn];
3038 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer));
3039 if (ag_ch <= 255) {
3040 while (ag_key_ch[ag_k] < ag_ch) ag_k++;
3041 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k);
3042 }
3043 }
3044 for (ag_rk = 0; ag_rk < (PCB).ag_lrss; ag_rk += 2) {
3045 ag_sx = (PCB).ag_rss[ag_rk];
3046 if (ag_sx > (PCB).ssx || ag_sx > (PCB).ag_min_depth) continue;
3047 (PCB).sn = (PCB).ag_rss[ag_rk + 1];
3048 if (ag_atx((PCB).token_number, &ag_sx, (PCB).sn)) break;
3049 }
3050 (PCB).sn = ag_snd;
3051 return ag_rk;
3052 }
3053
3054 static void ag_set_error_procs(void);
3055
3056 static void ag_auto_resynch(void) {
3057 int ag_sx, ag_rk;
3058 int ag_rk1, ag_rk2, ag_tk1;
3059 (PCB).ss[(PCB).ssx] = (PCB).sn;
3060 if ((PCB).ag_error_depth && (PCB).ag_min_depth >= (PCB).ag_error_depth) {
3061 (PCB).ssx = (PCB).ag_error_depth;
3062 (PCB).sn = (PCB).ss[(PCB).ssx];
3063 }
3064 else {
3065 ag_diagnose();
3066 SYNTAX_ERROR;
3067 if ((PCB).exit_flag != AG_RUNNING_CODE) return;
3068 (PCB).ag_error_depth = (PCB).ag_min_depth = 0;
3069 (PCB).ag_lrss = 0;
3070 (PCB).ss[ag_sx = (PCB).ssx] = (PCB).sn;
3071 (PCB).ag_min_depth = (PCB).ag_rss[(PCB).ag_lrss++] = ag_sx;
3072 (PCB).ag_rss[(PCB).ag_lrss++] = (PCB).sn;
3073 while (ag_sx && (PCB).ag_lrss < 2*128) {
3074 int ag_t = 0, ag_x, ag_s, ag_sxs = ag_sx;
3075
3076 while (ag_sx && (ag_t = ag_ctn[2*(PCB).sn]) == 0) (PCB).sn = (PCB).ss[--ag_sx];
3077 if (ag_t) (PCB).sn = (PCB).ss[ag_sx -= ag_ctn[2*(PCB).sn +1]];
3078 else {
3079 if (ag_sx == 0) (PCB).sn = 0;
3080 ag_t = ag_ptt[0];
3081 }
3082 if ((ag_s = ag_rns(ag_t, &ag_sx, (PCB).sn)) == 0) break;
3083 for (ag_x = 0; ag_x < (PCB).ag_lrss; ag_x += 2)
3084 if ((PCB).ag_rss[ag_x] == ag_sx + 1 && (PCB).ag_rss[ag_x+1] == ag_s) break;
3085 if (ag_x == (PCB).ag_lrss) {
3086 (PCB).ag_rss[(PCB).ag_lrss++] = ++ag_sx;
3087 (PCB).ag_rss[(PCB).ag_lrss++] = (PCB).sn = ag_s;
3088 }
3089 else if (ag_sx >= ag_sxs) ag_sx--;
3090 }
3091 ag_set_error_procs();
3092 }
3093 (PCB).la_ptr = (PCB).pointer;
3094 if ((PCB).ssx > (PCB).ag_min_depth) (PCB).ag_min_depth = (PCB).ssx;
3095 while (1) {
3096 ag_rk1 = ag_tst_tkn();
3097 if ((PCB).token_number == 46)
3098 {(PCB).exit_flag = AG_SYNTAX_ERROR_CODE; return;}
3099 if (ag_rk1 < (PCB).ag_lrss) break;
3100 {(PCB).la_ptr = (PCB).pointer + 1; ag_track();}
3101 }
3102 ag_tk1 = (PCB).token_number;
3103 ag_track();
3104 ag_rk2 = ag_tst_tkn();
3105 if (ag_rk2 < ag_rk1) {ag_rk = ag_rk2; ag_track();}
3106 else {ag_rk = ag_rk1; (PCB).token_number = (pgg_token_type) ag_tk1; (PCB).la_ptr = (PCB).pointer;}
3107 (PCB).ag_min_depth = (PCB).ssx = (PCB).ag_rss[ag_rk++];
3108 (PCB).sn = (PCB).ss[(PCB).ssx] = (PCB).ag_rss[ag_rk];
3109 (PCB).sn = ag_jns((PCB).token_number);
3110 if ((PCB).ag_error_depth == 0 || (PCB).ag_error_depth > (PCB).ssx)
3111 (PCB).ag_error_depth = (PCB).ssx;
3112 if (++(PCB).ssx >= 128) {
3113 (PCB).exit_flag = AG_STACK_ERROR_CODE;
3114 PARSER_STACK_OVERFLOW;
3115 return;
3116 }
3117 GET_CONTEXT;
3118 (PCB).ss[(PCB).ssx] = (PCB).sn;
3119 (PCB).ag_tmp_depth = (PCB).ag_min_depth;
3120 (PCB).la_ptr = (PCB).pointer;
3121 return;
3122 }
3123
3124
3125 static int ag_action_10_proc(void) {
3126 int ag_t = (PCB).token_number;
3127 (PCB).btsx = 0, (PCB).drt = -1;
3128 do {
3129 ag_track();
3130 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr));
3131 (PCB).la_ptr++;
3132 if (ag_key_index[(PCB).sn]) {
3133 unsigned ag_k = ag_key_index[(PCB).sn];
3134 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer));
3135 if (ag_ch <= 255) {
3136 while (ag_key_ch[ag_k] < ag_ch) ag_k++;
3137 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k);
3138 }
3139 }
3140 } while ((PCB).token_number == (pgg_token_type) ag_t);
3141 (PCB).la_ptr = (PCB).pointer;
3142 return 1;
3143 }
3144
3145 static int ag_action_11_proc(void) {
3146 int ag_t = (PCB).token_number;
3147
3148 (PCB).btsx = 0, (PCB).drt = -1;
3149 do {
3150 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer;
3151 (PCB).ssx--;
3152 ag_track();
3153 ag_ra();
3154 if ((PCB).exit_flag != AG_RUNNING_CODE) return 0;
3155 (PCB).ssx++;
3156 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr));
3157 (PCB).la_ptr++;
3158 if (ag_key_index[(PCB).sn]) {
3159 unsigned ag_k = ag_key_index[(PCB).sn];
3160 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer));
3161 if (ag_ch <= 255) {
3162 while (ag_key_ch[ag_k] < ag_ch) ag_k++;
3163 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k);
3164 }
3165 }
3166 }
3167 while ((PCB).token_number == (pgg_token_type) ag_t);
3168 (PCB).la_ptr = (PCB).pointer;
3169 return 1;
3170 }
3171
3172 static int ag_action_3_r_proc(void) {
3173 int ag_sd = ag_fl[(PCB).ag_ap] - 1;
3174 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3175 (PCB).btsx = 0, (PCB).drt = -1;
3176 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3177 ag_ra();
3178 return (PCB).exit_flag == AG_RUNNING_CODE;
3179 }
3180
3181 static int ag_action_3_s_proc(void) {
3182 int ag_sd = ag_fl[(PCB).ag_ap] - 1;
3183 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3184 (PCB).btsx = 0, (PCB).drt = -1;
3185 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3186 ag_ra();
3187 return (PCB).exit_flag == AG_RUNNING_CODE;
3188 }
3189
3190 static int ag_action_4_r_proc(void) {
3191 int ag_sd = ag_fl[(PCB).ag_ap] - 1;
3192 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3193 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3194 return 1;
3195 }
3196
3197 static int ag_action_2_proc(void) {
3198 (PCB).btsx = 0, (PCB).drt = -1;
3199 if ((PCB).ssx >= 128) {
3200 (PCB).exit_flag = AG_STACK_ERROR_CODE;
3201 PARSER_STACK_OVERFLOW;
3202 }
3203 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer;
3204 GET_CONTEXT;
3205 (PCB).ss[(PCB).ssx] = (PCB).sn;
3206 (PCB).ssx++;
3207 (PCB).sn = (PCB).ag_ap;
3208 ag_track();
3209 return 0;
3210 }
3211
3212 static int ag_action_9_proc(void) {
3213 if ((PCB).drt == -1) {
3214 (PCB).drt=(PCB).token_number;
3215 (PCB).dssx=(PCB).ssx;
3216 (PCB).dsn=(PCB).sn;
3217 }
3218 ag_prot();
3219 (PCB).vs[(PCB).ssx] = ag_null_value;
3220 GET_CONTEXT;
3221 (PCB).ss[(PCB).ssx] = (PCB).sn;
3222 (PCB).ssx++;
3223 (PCB).sn = (PCB).ag_ap;
3224 (PCB).la_ptr = (PCB).pointer;
3225 return (PCB).exit_flag == AG_RUNNING_CODE;
3226 }
3227
3228 static int ag_action_2_r_proc(void) {
3229 (PCB).ssx++;
3230 (PCB).sn = (PCB).ag_ap;
3231 return 0;
3232 }
3233
3234 static int ag_action_7_proc(void) {
3235 --(PCB).ssx;
3236 (PCB).la_ptr = (PCB).pointer;
3237 (PCB).exit_flag = AG_SUCCESS_CODE;
3238 return 0;
3239 }
3240
3241 static int ag_action_1_proc(void) {
3242 ag_track();
3243 (PCB).exit_flag = AG_SUCCESS_CODE;
3244 return 0;
3245 }
3246
3247 static int ag_action_1_r_proc(void) {
3248 (PCB).exit_flag = AG_SUCCESS_CODE;
3249 return 0;
3250 }
3251
3252 static int ag_action_1_s_proc(void) {
3253 (PCB).exit_flag = AG_SUCCESS_CODE;
3254 return 0;
3255 }
3256
3257 static int ag_action_4_proc(void) {
3258 int ag_sd = ag_fl[(PCB).ag_ap] - 1;
3259 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3260 (PCB).btsx = 0, (PCB).drt = -1;
3261 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer;
3262 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3263 else GET_CONTEXT;
3264 (PCB).ss[(PCB).ssx] = (PCB).sn;
3265 ag_track();
3266 while ((PCB).exit_flag == AG_RUNNING_CODE) {
3267 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1;
3268 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1;
3269 do {
3270 unsigned ag_tx = (ag_t1 + ag_t2)/2;
3271 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1;
3272 else ag_t2 = ag_tx;
3273 } while (ag_t1 < ag_t2);
3274 if (ag_tstt[ag_t1] != (PCB).reduction_token) {
3275 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE;
3276 REDUCTION_TOKEN_ERROR; break;}
3277 (PCB).ag_ap = ag_pstt[ag_t1];
3278 if ((*(PCB).s_procs[ag_astt[ag_t1]])() == 0) break;
3279 }
3280 return 0;
3281 }
3282
3283 static int ag_action_3_proc(void) {
3284 int ag_sd = ag_fl[(PCB).ag_ap] - 1;
3285 (PCB).btsx = 0, (PCB).drt = -1;
3286 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer;
3287 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3288 else GET_CONTEXT;
3289 (PCB).ss[(PCB).ssx] = (PCB).sn;
3290 ag_track();
3291 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3292 ag_ra();
3293 while ((PCB).exit_flag == AG_RUNNING_CODE) {
3294 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1;
3295 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1;
3296 do {
3297 unsigned ag_tx = (ag_t1 + ag_t2)/2;
3298 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1;
3299 else ag_t2 = ag_tx;
3300 } while (ag_t1 < ag_t2);
3301 if (ag_tstt[ag_t1] != (PCB).reduction_token) {
3302 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE;
3303 REDUCTION_TOKEN_ERROR; break;}
3304 (PCB).ag_ap = ag_pstt[ag_t1];
3305 if ((*(PCB).s_procs[ag_astt[ag_t1]])() == 0) break;
3306 }
3307 return 0;
3308 }
3309
3310 static int ag_action_8_proc(void) {
3311 ag_undo();
3312 (PCB).la_ptr = (PCB).pointer;
3313 ag_auto_resynch();
3314 return (PCB).exit_flag == AG_RUNNING_CODE;
3315 }
3316
3317 static int ag_action_5_proc(void) {
3318 int ag_sd = ag_fl[(PCB).ag_ap];
3319 (PCB).btsx = 0, (PCB).drt = -1;
3320 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3321 else {
3322 GET_CONTEXT;
3323 (PCB).ss[(PCB).ssx] = (PCB).sn;
3324 }
3325 (PCB).la_ptr = (PCB).pointer;
3326 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3327 ag_ra();
3328 while ((PCB).exit_flag == AG_RUNNING_CODE) {
3329 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1;
3330 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1;
3331 do {
3332 unsigned ag_tx = (ag_t1 + ag_t2)/2;
3333 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1;
3334 else ag_t2 = ag_tx;
3335 } while (ag_t1 < ag_t2);
3336 if (ag_tstt[ag_t1] != (PCB).reduction_token) {
3337 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE;
3338 REDUCTION_TOKEN_ERROR; break;}
3339 (PCB).ag_ap = ag_pstt[ag_t1];
3340 if ((*(PCB).r_procs[ag_astt[ag_t1]])() == 0) break;
3341 }
3342 return (PCB).exit_flag == AG_RUNNING_CODE;
3343 }
3344
3345 static int ag_action_6_proc(void) {
3346 int ag_sd = ag_fl[(PCB).ag_ap];
3347 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap];
3348 if ((PCB).drt == -1) {
3349 (PCB).drt=(PCB).token_number;
3350 (PCB).dssx=(PCB).ssx;
3351 (PCB).dsn=(PCB).sn;
3352 }
3353 if (ag_sd) {
3354 (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd];
3355 }
3356 else {
3357 ag_prot();
3358 (PCB).vs[(PCB).ssx] = ag_null_value;
3359 GET_CONTEXT;
3360 (PCB).ss[(PCB).ssx] = (PCB).sn;
3361 }
3362 (PCB).la_ptr = (PCB).pointer;
3363 while ((PCB).exit_flag == AG_RUNNING_CODE) {
3364 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1;
3365 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1;
3366 do {
3367 unsigned ag_tx = (ag_t1 + ag_t2)/2;
3368 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1;
3369 else ag_t2 = ag_tx;
3370 } while (ag_t1 < ag_t2);
3371 if (ag_tstt[ag_t1] != (PCB).reduction_token) {
3372 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE;
3373 REDUCTION_TOKEN_ERROR; break;}
3374 (PCB).ag_ap = ag_pstt[ag_t1];
3375 if ((*(PCB).r_procs[ag_astt[ag_t1]])() == 0) break;
3376 }
3377 return (PCB).exit_flag == AG_RUNNING_CODE;
3378 }
3379
3380
3381 static void ag_check_depth(int ag_fl) {
3382 int ag_sx = (PCB).ssx - ag_fl;
3383 if ((PCB).ag_error_depth && ag_sx < (PCB).ag_tmp_depth) (PCB).ag_tmp_depth = ag_sx;
3384 }
3385
3386 static int ag_action_3_er_proc(void) {
3387 ag_check_depth(ag_fl[(PCB).ag_ap] - 1);
3388 return ag_action_4_r_proc();
3389 }
3390
3391 static int ag_action_2_e_proc(void) {
3392 ag_action_2_proc();
3393 (PCB).ag_min_depth = (PCB).ag_tmp_depth;
3394 return 0;
3395 }
3396
3397 static int ag_action_4_e_proc(void) {
3398 ag_check_depth(ag_fl[(PCB).ag_ap] - 1);
3399 (PCB).ag_min_depth = (PCB).ag_tmp_depth;
3400 return ag_action_4_proc();
3401 }
3402
3403 static int ag_action_6_e_proc(void) {
3404 ag_check_depth(ag_fl[(PCB).ag_ap]);
3405 return ag_action_6_proc();
3406 }
3407
3408 static int ag_action_11_e_proc(void) {
3409 return ag_action_10_proc();
3410 }
3411
3412 static int (*ag_r_procs_error[])(void) = {
3413 ag_action_1_r_proc,
3414 ag_action_2_r_proc,
3415 ag_action_3_er_proc,
3416 ag_action_3_er_proc
3417 };
3418
3419 static int (*ag_s_procs_error[])(void) = {
3420 ag_action_1_s_proc,
3421 ag_action_2_r_proc,
3422 ag_action_3_er_proc,
3423 ag_action_3_er_proc
3424 };
3425
3426 static int (*ag_gt_procs_error[])(void) = {
3427 ag_action_1_proc,
3428 ag_action_2_e_proc,
3429 ag_action_4_e_proc,
3430 ag_action_4_e_proc,
3431 ag_action_6_e_proc,
3432 ag_action_6_e_proc,
3433 ag_action_7_proc,
3434 ag_action_8_proc,
3435 ag_action_9_proc,
3436 ag_action_10_proc,
3437 ag_action_11_e_proc,
3438 ag_action_8_proc
3439 };
3440
3441 static void ag_set_error_procs(void) {
3442 (PCB).gt_procs = ag_gt_procs_error;
3443 (PCB).r_procs = ag_r_procs_error;
3444 (PCB).s_procs = ag_s_procs_error;
3445 }
3446
3447
3448 void init_pgg(void) {
3449 (PCB).la_ptr = (PCB).pointer;
3450 (PCB).gt_procs = ag_gt_procs_scan;
3451 (PCB).r_procs = ag_r_procs_scan;
3452 (PCB).s_procs = ag_s_procs_scan;
3453 (PCB).ag_error_depth = (PCB).ag_min_depth = (PCB).ag_tmp_depth = 0;
3454 (PCB).ag_resynch_active = 0;
3455 (PCB).ss[0] = (PCB).sn = (PCB).ssx = 0;
3456 (PCB).exit_flag = AG_RUNNING_CODE;
3457 (PCB).line = FIRST_LINE;
3458 (PCB).column = FIRST_COLUMN;
3459 (PCB).btsx = 0, (PCB).drt = -1;
3460 }
3461
3462 void pgg(void) {
3463 init_pgg();
3464 (PCB).exit_flag = AG_RUNNING_CODE;
3465 while ((PCB).exit_flag == AG_RUNNING_CODE) {
3466 unsigned ag_t1 = ag_sbt[(PCB).sn];
3467 if (ag_tstt[ag_t1]) {
3468 unsigned ag_t2 = ag_sbe[(PCB).sn] - 1;
3469 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr));
3470 (PCB).la_ptr++;
3471 if (ag_key_index[(PCB).sn]) {
3472 unsigned ag_k = ag_key_index[(PCB).sn];
3473 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer));
3474 if (ag_ch <= 255) {
3475 while (ag_key_ch[ag_k] < ag_ch) ag_k++;
3476 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k);
3477 }
3478 }
3479 do {
3480 unsigned ag_tx = (ag_t1 + ag_t2)/2;
3481 if (ag_tstt[ag_tx] > (unsigned char)(PCB).token_number)
3482 ag_t1 = ag_tx + 1;
3483 else ag_t2 = ag_tx;
3484 } while (ag_t1 < ag_t2);
3485 if (ag_tstt[ag_t1] != (unsigned char)(PCB).token_number)
3486 ag_t1 = ag_sbe[(PCB).sn];
3487 }
3488 (PCB).ag_ap = ag_pstt[ag_t1];
3489 (*(PCB).gt_procs[ag_astt[ag_t1]])();
3490 }
3491 }
3492
3493