Mercurial > ~dholland > hg > ag > index.cgi
diff tests/agcl/oldagsrc/good/pgg24-3.c @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/agcl/oldagsrc/good/pgg24-3.c Sat Dec 22 17:52:45 2007 -0500 @@ -0,0 +1,2945 @@ +/* + AnaGram Syntax Analyzer. + Copyright (c) Jerome T. Holland, 1989, 1990, 1991, 1992 + All Rights Reserved. +*/ + #include HEADERS + #include STDLIB + #include STDIO + #include STRING + #include DATA + #include TREES + #include STK + #include CTYPE + #include ASSERT + #include SETJMP + #include PGG + #include MYALLOC + +/* + * AnaGram, A System for Syntax Directed Programming + * File generated by: ... + * + * AnaGram Parsing Engine + * Copyright 1993-2002 Parsifal Software. All Rights Reserved. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#ifndef PGG24-3_H +#include "pgg24-3.h" +#endif + +#ifndef PGG24-3_H +#error Mismatched header file +#endif + +#include <ctype.h> +#include <stdio.h> + +#define RULE_CONTEXT (&((PCB).cs[(PCB).ssx])) +#define ERROR_CONTEXT ((PCB).cs[(PCB).error_frame_ssx]) +#define CONTEXT ((PCB).cs[(PCB).ssx]) + + +#define CHANGE_REDUCTION(x) pgg_change_reduction(pgg_##x##_token) +int pgg_change_reduction(pgg_token_type); + +#define TOKEN_NAMES pgg_token_names +const char *const pgg_token_names[236] = { + "syntax definition", + "", + "\"->\"", + "", + "", + "", + "", + "','", + "", + "", + "", + "\"...\"", + "", + "'='", + "", + "'!'", + "", + "'{'", + "", + "'['", + "", + "'('", + "", + "'-'", + "", + "'+'", + "", + "']'", + "", + "'}'", + "", + "')'", + "", + "single quote", + "", + "'~'", + "", + "'|'", + "syntax definition", + "", + "", + "", + "", + "statement", + "", + "", + "eof", + "production", + "", + "left hand side", + "right hand side", + "", + "", + "", + "definition", + "embedded c", + "configuration section", + "token name list", + "type definition", + "", + "name", + "'$'", + "", + "", + "vp rule spec", + "", + "", + "reduction procedure", + "vp rules", + "grammar rule", + "", + "rule element", + "parameter name", + "c expression", + "';'", + "type name", + "", + "", + "", + "\"::\"", + "", + "", + "", + "", + "template field head", + "'>'", + "'<'", + "", + "", + "'*'", + "", + "", + "letter", + "", + "enum fix", + "\"enum\"", + "blank char", + "c comment", + "continuation", + "comment", + "", + "carriage return", + "", + "newline", + "", + "vertical space", + "\"//\"", + "", + "", + "", + "character", + "signed number", + "'^'", + "", + "char const", + "", + "", + "", + "decimal number", + "'0'", + "octal number", + "\"0x\"", + "\"0X\"", + "", + "hex number", + "", + "", + "", + "hex digit", + "", + "token", + "mid rule action", + "", + "virtual production", + "", + "", + "'&'", + "", + "", + "escape sequence", + "octal escape", + "", + "hex escape", + "character range", + "\"..\"", + "enum definition", + "enum statement", + "keyword string", + "keyword string head", + "string", + "double quote", + "", + "", + "", + "string char", + "simple string char", + "\"\\\\a\"", + "\"\\\\b\"", + "\"\\\\f\"", + "\"\\\\n\"", + "\"\\\\r\"", + "\"\\\\t\"", + "\"\\\\v\"", + "\"\\\\\\\\\"", + "\"\\\\?\"", + "\"\\\\\\'\"", + "\"\\\\\\\"\"", + "", + "backslash", + "", + "\"\\\\x\"", + "any digit", + "nonoctal digit", + "':'", + "", + "", + "configuration parameters", + "configuration parameter list", + "", + "configuration parameter", + "attribute statement", + "\"left\"", + "token list", + "\"right\"", + "\"nonassoc\"", + "\"sticky\"", + "\"subgrammar\"", + "\"hidden\"", + "", + "", + "\"disregard\"", + "\"lexeme\"", + "", + "\"distinguish\"", + "\"keywords\"", + "tokens", + "'\\?'", + "\"}...\"", + "\"]...\"", + "\"?...\"", + "\"}/...\"", + "\"]/...\"", + "embedded c head", + "", + "", + "", + "", + "c code first", + "", + "", + "c character constant", + "c string constant", + "", + "simple c char", + "", + "", + "", + "", + "\"\\\\\\n\"", + "", + "\"*/\"", + "\"/*\"", + "", + "c literal elem", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + +}; + + +#line - "pgg24-3.syn" + int null_warning(int n) { + extern void warning_here(const char *); + if (n == 0) warning_here("Null character in keyword string"); + return n; + } +#line - "pgg24-3.c" +#line - "pgg24-3.syn" +pgg_pcb_type pgcb; +#define PCB pgcb + +#define PARSE_STACK_OVERFLOW parse_stack_overflow() +#define SYNTAX_ERROR log_syntax_error() +#define GET_CONTEXT CONTEXT.y = PCB.line, CONTEXT.x = PCB.column; + +#define REDUCTION_TOKEN_ERROR reduction_token_error() + +int save_case_sensitive; + +void reduction_token_error(void) { + assert(0); +} + +extern jmp_buf error_continuation; +extern char longjmp_msg[]; + +void parse_stack_overflow(void) { + sprintf(longjmp_msg, "Excessive recursion"); + longjmp(error_continuation,1); +} + +extern string_dict *cast_dict; +extern int character_seen; +extern int enum_base; +extern unsigned char *input_base; +extern int nest_comments; +extern int precedence_level; +extern int syntax_error_flag; +extern int case_sensitive; +extern int n_statements; + + void log_error_location(int,int); + void log_error_here(void); + void log_error(void); + + node make_or_node(node,node); + node make_and_node(node,node); + node make_minus_node(node,node); + node make_tilde_node(node); + node ss1(int); + node ss2(void); + node ss3(void); + + void acs(int); + void aws(int); + void atkn(int); + int copyoff(void); + int copyon(void); + int definition_1(node); + int definition_2(int); + int definition_3(int); + int form_element_1(node); + int form_spec_2(int, int); + int form1(void); + int form2(void); + int gp2(void); + int gp3(void); + void gp4(int); + int gp5(int); + int head_list_1(int); + int head_list_2(int); +static int head_list_3(int); + void ics(void); + int identify_node(node); + void init_reserve(int); + void iws(void); + int mid_line(int); + int new_cast_spec_1(void); + int new_cast_spec_2(void); + void new_reserve(void); + int null_warning(int); +/* void pf2(int, int, int); */ + void pf2x(int, int); + int pr3(int); + int pr4(int); + int proc_spec_4(int); + int proc_spec_5(void); + void production(int); + int range(int, int); + void scs(int); +static void set_prec(int,int); +/* + void suppress(void); + void suppress_all(void); + void suppress_except(void); + void suppress_initial(void); +*/ + void sws(int); + void tp4(int); + int vp_form3(int); + int vp_s(void); + int vp_1(void); + int vp_2(void); + int vp_3(void); + int vp_4(void); + int vp_5(int); + int vp_6(int); + int vp_7(int); + int vp_8(int); + int vp_8a(int); + int vp_9(void); + int vp_10(void); + +/* +static int reserve(int pt) { + int key = map_token_number[vp_s()].key; + map_key_word[key].reserve = pt; + return pt; +} +*/ + +/* +static void anomalous(void) { + map_token_number[vp_s()].anomalous = 1; +} +*/ + +int *disregard_list = NULL; +int n_disregard_list = 0; + +void disregard(int tn) { + iws(); + if (n_disregard_list) { + int *p = disregard_list; + while (n_disregard_list--) aws(*p++); + free(disregard_list); + } + xws(tn); + disregard_list = build_list(); + n_disregard_list = fis(); +} + +extern tsd *syntax_errors; + +static void log_syntax_error(void) { + int eline = PCB.line, ecol = PCB.column; + int flag = PCB.error_frame_token == pgg_c_comment_token || + PCB.error_frame_token == pgg_embedded_c_token; + + reset_stk(); + if (flag && PCB.token_number == pgg_eof_token) { + eline = ERROR_CONTEXT.y; + ecol = ERROR_CONTEXT.x; + } + log_error_location(ecol,eline); + asprintf("%s in %s", + PCB.error_message,pgg_token_names[PCB.error_frame_token]); + log_error(); + syntax_error_flag++; + if (syntax_errors->nt < 50) return; + sss("Too many syntax errors, parse aborted"); + log_error(); + PCB.exit_flag = AG_SYNTAX_ERROR_CODE; +} + +static int head_list_3(int type) { + int i, n = tis(); + for (i = 0; i < n; i ++) { + int tn = list_base[i]; + token_number_map *tp = &map_token_number[tn]; + int ptt = tp->value_type; + if (ptt && ptt != type) { + log_error_here(); + asprintf("Type Redefinition of T%03d: ", tn); + atkn(tn); + log_error(); + } + tp->value_type = type; + if (ptt == 0 && tp->rp_arg && type == void_token_type) { + log_error_here(); + asprintf("Void token, %s, used as parameter", + dict_str(tkn_dict,tp->token_name)); + log_error(); + } + } + return type; +} + +static void set_prec(int left, int right){ + int n = tis(); + precedence_level++; + while (n--) { + int k = list_base[n]; + token_number_map *tp = &map_token_number[k]; + tp->left_associative = left; + tp->right_associative = right; + tp->precedence_level = precedence_level; + } + rws(); +} + +static void set_sticky(void){ + int n = tis(); + while (n--) { + int k = list_base[n]; + token_number_map *tp = &map_token_number[k]; + tp->sticky = 1; + } + rws(); +} + +static void set_subgrammar(void){ + int n = tis(); + while (n--) { + int k = list_base[n]; + token_number_map *tp = &map_token_number[k]; + tp->subgrammar = 1; + } + rws(); +} + +void set_hidden(void) { + int *lb = list_base; + int n = tis(); + while (n--) map_token_number[*lb++].fine_structure = 1; + rws(); +} + +void set_lexeme(void) { + int n = tis(); + while (n--) { + token_number_map *tp = &map_token_number[list_base[n]]; +/* tp->lexeme = tp->subgrammar = 1; */ + tp->lexeme = 1; + } + rws(); +} + +void parse(void) { + pgcb.pointer = input_base; + pgg(); +} +#line - "pgg24-3.c" + +#ifndef CONVERT_CASE +#define CONVERT_CASE(c) (c) +#endif +#ifndef TAB_SPACING +#define TAB_SPACING 8 +#endif + +#define ag_rp_1() (n_statements++) + +#define ag_rp_3(t) (production(t)) + +#define ag_rp_5(t) (production(t)) + +#define ag_rp_7(type) (iws(),type) + +#define ag_rp_8(type) (concat_list(),type) + +#define ag_rp_9() (n_statements++, 0) + +#define ag_rp_10(d) (n_statements++, head_list_3(d)) + +#define ag_rp_11(x) (sws(head_list_2(x))) + +#define ag_rp_12(x) (aws(head_list_2(x))) + +#define ag_rp_13() (0) + +#define ag_rp_14() (1) + +#define ag_rp_15() (ids(cast_dict),fis()) + +#define ag_rp_16(n) (sws(n)) + +#define ag_rp_17(n) (aws(n)) + +#define ag_rp_18(pn) (sws((iws(),vp_form3(pn)))) + +#define ag_rp_19(s) (vp_form3(s)) + +#define ag_rp_20(n) (sws(form_spec_2(form1(),n))) + +#define ag_rp_21(n) (sws(n)) + +#define ag_rp_22(n) (aws(n)) + +#define ag_rp_23(s) (form_spec_2(form2(),s)) + +#define ag_rp_24(e, p) (iws(),pf2x(e,p)) + +#define ag_rp_25(e, p) (pf2x(e,p)) + +#define ag_rp_26() (0) + +#define ag_rp_27() (proc_spec_4(0)) + +#define ag_rp_28() (proc_spec_4(1)) + +#define ag_rp_29() (concat_string()) + +#define ag_rp_30() (sss("::")) + +#define ag_rp_31() (concat_string()) + +#define ag_rp_32() (ass("::")) + +#define ag_rp_33() (concat_string()) + +#define ag_rp_34() (concat_string()) + +#define ag_rp_35() (acs('>'), concat_string()) + +#define ag_rp_36() (acs('<')) + +#define ag_rp_37() (acs(','), concat_string()) + +#define ag_rp_38() (scs('(')) + +#define ag_rp_39() (concat_string(), acs(')')) + +#define ag_rp_40() (sss(" *")) + +#define ag_rp_41() (concat_string()) + +#define ag_rp_42() (concat_string()) + +#define ag_rp_43(c) (scs(c)) + +#define ag_rp_44(c) (acs(c)) + +#define ag_rp_45(c) (acs(' '), acs(c)) + +#define ag_rp_46(c) (sss("enum "), acs(c)) + +#define ag_rp_47(c) (acs(c)) + +#define ag_rp_48(c) (acs(' '), acs(c)) + +#define ag_rp_49(x) (x & 0x1f) + +#define ag_rp_50(c) ((character_seen=1),c) + +#define ag_rp_51(s, n) (s*n) + +#define ag_rp_52() (1) + +#define ag_rp_53() (-1) + +#define ag_rp_54(n) (n) + +#define ag_rp_55(n) (n) + +#define ag_rp_56(d) (d - '0') + +#define ag_rp_57(n, d) (10*n + d - '0') + +#define ag_rp_58() (0) + +#define ag_rp_59(n, d) (8*n + d - '0') + +#define ag_rp_60(d) (d) + +#define ag_rp_61(n, d) (16*n + d) + +#define ag_rp_62(d) (d-'0') + +#define ag_rp_63(d) ((d&7)+9) + +#define ag_rp_64(p) (vp_8a(p)) + +#define ag_rp_65(n) (form_element_1(n)) + +#define ag_rp_66(u, i) (make_or_node(u,i)) + +#define ag_rp_67(u, i) (make_minus_node(u,i)) + +#define ag_rp_68(i, n) (make_and_node(i,n)) + +#define ag_rp_69(n) (make_tilde_node(n)) + +#define ag_rp_70(c) (case_sensitive ? (c) : toupper(c)) + +#define ag_rp_71() (ss3()) + +#define ag_rp_72(n) (ss1(n)) + +#define ag_rp_73() (ss2()) + +#define ag_rp_74(x) (x) + +#define ag_rp_75(l, r) ((character_seen=1),range(l,r)) + +#define ag_rp_76(l, r) (range(l,r)) + +#define ag_rp_77(n) (definition_1(n)) + +#define ag_rp_78(p) (definition_2(p)) + +#define ag_rp_79(p) (definition_2(vp_8a(p))) + +#define ag_rp_80() (definition_3(enum_base++)) + +#define ag_rp_81(n) (definition_3(enum_base = n), enum_base++) + +#define ag_rp_82() (ics()) + +#define ag_rp_83(n) (null_warning(n)) + +#define ag_rp_84() ('\a') + +#define ag_rp_85() ('\b') + +#define ag_rp_86() ('\f') + +#define ag_rp_87() ('\n') + +#define ag_rp_88() ('\r') + +#define ag_rp_89() ('\t') + +#define ag_rp_90() ('\v') + +#define ag_rp_91() ('\\') + +#define ag_rp_92() ('\?') + +#define ag_rp_93() ('\'') + +#define ag_rp_94() ('"') + +#define ag_rp_95(n) (n&7) + +#define ag_rp_96(n, d) (n*8 + (d&7)) + +#define ag_rp_97(n, d) (n*8 + (d&7)) + +#define ag_rp_98(x) (x) + +#define ag_rp_99(c) (acs(c)) + +#define ag_rp_100(c) (acs(c)) + +#define ag_rp_101(c) (acs(c)) + +#define ag_rp_102(c) (acs(c)) + +#define ag_rp_103(c) (acs(c)) + +#define ag_rp_104(c) (acs(null_warning(c))) + +#define ag_rp_105(c) (acs(null_warning(c))) + +#define ag_rp_106(c) (acs(null_warning(c))) + +#define ag_rp_107(c) (acs(null_warning(c))) + +#define ag_rp_108() (0) + +#define ag_rp_109() (ids(cvar_dict),fis()) + +#define ag_rp_110(c) (scs(c)) + +#define ag_rp_111(c) (acs(c)) + +#define ag_rp_112() (gp4(1)) + +#define ag_rp_113() (gp4(0)) + +#define ag_rp_114() (gp2()) + +#define ag_rp_115() (gp3()) + +#define ag_rp_116() (gp3()) + +#define ag_rp_117(n) (gp5(n)) + +#define ag_rp_118() (set_prec(1,0)) + +#define ag_rp_119() (set_prec(0,1)) + +#define ag_rp_120() (set_prec(0,0)) + +#define ag_rp_121() (set_sticky()) + +#define ag_rp_122() (set_subgrammar()) + +#define ag_rp_123() (set_hidden()) + +#define ag_rp_124() (new_reserve()) + +#define ag_rp_125(t) (disregard(t)) + +#define ag_rp_126() (set_lexeme()) + +#define ag_rp_127(n) (init_reserve(identify_node(n))) + +#define ag_rp_128(n) (aws(identify_node(n))) + +#define ag_rp_129(t) (sws(t)) + +#define ag_rp_130(t) (aws(t)) + +#define ag_rp_131() (vp_s()) + +#define ag_rp_132() (vp_5(vp_s())) + +#define ag_rp_133() (vp_1()) + +#define ag_rp_134() (vp_2()) + +#define ag_rp_135() (vp_3()) + +#define ag_rp_136() (vp_4()) + +#define ag_rp_137(n) (vp_5(form_element_1(n))) + +#define ag_rp_138(n) (vp_6(form_element_1(n))) + +#define ag_rp_139(n) (vp_7(form_element_1(n))) + +#define ag_rp_140() (vp_9()) + +#define ag_rp_141() (vp_10()) + +#define ag_rp_142() (mid_line(proc_spec_4(0))) + +#define ag_rp_143() (mid_line(proc_spec_4(1))) + +#define ag_rp_144() (copyon()) + +#define ag_rp_145() (copyoff()) + +#define ag_rp_146() (copyoff()) + +#define ag_rp_147() (copyon()) + +#define ag_rp_148() (copyoff()) + +static void near ag_rp_149(void) { +#line - "pgg24-3.syn" +if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token; +#line - "pgg24-3.c" +} + + +#define READ_COUNTS +#define WRITE_COUNTS +#undef V +#define V(i,t) (*t (&(PCB).vs[(PCB).ssx + i])) +#undef VS +#define VS(i) (PCB).vs[(PCB).ssx + i] + +#ifndef GET_CONTEXT +#define GET_CONTEXT CONTEXT = (PCB).input_context +#endif + +typedef enum { + ag_action_1, + ag_action_2, + ag_action_3, + ag_action_4, + ag_action_5, + ag_action_6, + ag_action_7, + ag_action_8, + ag_action_9, + ag_action_10, + ag_action_11, + ag_action_12 +} ag_parser_action; + + +#ifndef NULL_VALUE_INITIALIZER +#define NULL_VALUE_INITIALIZER = { 0 } +#endif + +static pgg_vs_type const ag_null_value NULL_VALUE_INITIALIZER; + +static const unsigned char ag_rpx[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 1, + 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 12, 13, + 0, 14, 15, 0, 0, 0, 16, 17, 18, 0, 19, 20, 21, 22, 23, 24, 25, 0, + 0, 0, 0, 26, 0, 27, 28, 29, 30, 0, 0, 31, 32, 33, 34, 35, 36, 37, + 0, 38, 0, 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, + 47, 48, 0, 0, 49, 50, 0, 51, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 0, 61, 62, 0, 0, 63, 64, 0, 65, 0, 66, 67, 0, 0, 0, 0, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 0, 0, 0, 0, 0, 0, 79, 0, + 0, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 0, 0, + 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,108, 0, 0, 0, 0, + 0, 0, 0,109,110,111,112,113,114, 0,115,116,117,118,119,120,121, 0, + 122,123, 0, 0, 0, 0,124,125, 0,126,127,128,129,130,131,132,133,134, + 135,136,137,138,139,140, 0, 0, 0, 0, 0, 0,141,142,143, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,145, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,146 +}; + +static const unsigned char ag_key_itt[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0 +}; + +static const unsigned short ag_key_pt[] = { + 0, 11, 0,144,0 +}; + +static const unsigned char ag_key_ch[] = { + 0, 42, 47,255, 47,255, 42, 47,255, 46,255, 46,255, 42, 47,255, 88,120, + 255, 46, 47,255,114,116,255,115,255,105,255,102,120,255,101,255,116,117, + 255, 46, 47,255, 45, 46, 47, 48, 58, 63, 93,100,101,104,108,110,114,115, + 125,255, 47,255, 42, 47,255,114,116,255,115,255,105,255,102,120,255,101, + 255,116,117,255, 47,100,101,104,108,110,114,115,255, 42, 47,255, 88,120, + 255, 47, 48, 58,255, 42, 47,255, 46, 47,255, 46, 47,255, 45, 46, 47, 58, + 63, 93,125,255, 58,255, 45, 47,255, 42, 47,255, 88,120,255, 47, 48, 58, + 92,125,255, 47,255, 47, 58,255,114,116,255,115,255,105,255,102,120,255, + 101,255,116,117,255, 47,100,101,104,108,110,114,115,255, 42, 47,255, 88, + 120,255, 47, 48, 58, 92,255, 88,120,255, 48,255, 42, 47,255, 45, 47,255, + 42, 47,255, 88,120,255, 47, 48,255, 88,120,255, 47, 48,255, 88,120,255, + 47, 48, 58, 92,125,255, 47, 58,255,114,116,255,115,255,105,255,102,120, + 255,101,255,116,117,255,100,101,104,108,110,114,115,255, 42, 47,255, 46, + 47,255, 46, 47,255, 47, 93,125,255, 42, 47,255, 47, 92,255, 92,255, 42, + 47,255, 88,120,255, 47, 48,125,255, 34, 39, 63, 92, 97, 98,102,110,114, + 116,118,120,255, 92,255, 88,120,255, 48,125,255, 46, 47,255, 46, 47,255, + 47, 93,125,255, 46,255, 46,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93, + 125,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,125,255, 46, 47, 63,255, + 46, 47,255, 46, 47,255, 93,125,255, 46, 47,255, 93,255, 46, 47,255,125, + 255,125,255, 46,255, 46,255, 42, 47,255, 46, 47,255, 46, 47,255, 46, 47, + 63, 93,125,255, 47,107,255, 88,120,255, 47, 48,255, 88,120,255, 48, 58, + 255, 47, 92,255, 42, 47,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,125, + 255 +}; + +static const unsigned char ag_key_act[] = { + 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, + 3,4,3,3,4,3,2,2,2,3,3,2,2,3,3,2,3,3,2,2,4,3,4,0,0,4,3,3,4,2,4,2,4,3,3, + 4,2,4,3,3,4,2,2,3,3,2,3,3,2,4,0,0,4,0,0,4,2,2,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,4,3,4,3,3,4,3,3,4,2,4,2, + 4,3,3,4,2,4,3,3,4,3,2,3,3,2,3,3,2,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,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,3,2,3,3,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,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,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,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,2,2,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,3,2,2,4 +}; + +static const unsigned char ag_key_parm[] = { + 0,221,106, 0, 0, 0,220,221, 0, 0, 0, 2, 0,221,106, 0,122,121, + 0,198,201, 0,190,193, 0, 0, 0, 0, 0,181,191, 0, 0, 0,185,186, + 0,197,200, 0, 2, 0, 0, 0, 79,199, 0, 0, 95,187, 0,184,183, 0, + 0, 0,106, 0,221,106, 0,190,193, 0, 0, 0, 0, 0,181,191, 0, 0, + 0,185,186, 0, 0, 0, 95,187, 0,184,183, 0, 0,221,106, 0,122,121, + 0, 0, 0, 79, 0,221,106, 0,198,201, 0,197,200, 0, 2, 0, 0, 79, + 199, 0, 0, 0, 79, 0, 2,106, 0,221,106, 0,122,121, 0, 0, 0, 79, + 218,197, 0,221, 0,106, 79, 0,190,193, 0, 0, 0, 0, 0,181,191, 0, + 0, 0,185,186, 0,106, 0, 95,187, 0,184,183, 0, 0,221,106, 0,122, + 121, 0, 0, 0, 79,218, 0,122,121, 0, 0, 0,221,106, 0, 2, 0, 0, + 221,106, 0,122,121, 0, 0, 0, 0,122,121, 0,106, 0, 0,122,121, 0, + 221, 0, 79,218,197, 0,221, 79, 0,190,193, 0, 0, 0, 0, 0,181,191, + 0, 0, 0,185,186, 0, 0, 95,187, 0,184,183, 0, 0,221,106, 0,198, + 201, 0,197,200, 0, 0, 0, 0, 0,221,106, 0, 0,218, 0,218, 0,221, + 106, 0,122,121, 0, 0, 0,197, 0,166,165,164,163,156,157,158,159,160, + 161,162,170, 0, 0, 0,122,121, 0, 0,197, 0,198,201, 0,197,200, 0, + 106, 0, 0, 0, 0, 0, 2, 0,198,201, 0,197,200, 0, 0,106,199, 0, + 0, 0,198,201, 0,197,200, 0, 0,106,199, 0, 0, 0, 0,106,199, 0, + 198,201, 0,197,200, 0, 0, 0, 0,198,201, 0, 0, 0,197,200, 0, 0, + 0,197, 0, 0, 0, 2, 0,221,106, 0,198,201, 0,197,200, 0, 0, 0, + 199, 0, 0, 0,221,194, 0,122,121, 0,221, 0, 0,122,121, 0, 0, 79, + 0,221,218, 0,221,106, 0,198,201, 0,197,200, 0, 0, 0,199, 0, 0, + 0 +}; + +static const unsigned short ag_key_jmp[] = { + 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 0, 12, 15, 0, 19, 25, 0, 22, 0, 25, 0, 43, 45, 0, 29, 0, 62, 67, + 0, 76, 79, 0, 4, 11, 13, 16, 6, 8, 19, 27, 33, 37, 32, 49, 57, 34, + 37, 0, 83, 0, 0, 0, 0, 85, 91, 0, 61, 0, 64, 0,109,111, 0, 68, + 0,128,133, 0, 58, 66, 99,103, 71,115,123, 73, 0, 0, 0, 0, 0, 0, + 0, 85, 88,142, 0, 0, 0, 0,155,158, 0,162,165, 0,144,146, 95,149, + 151, 98,101, 0,169, 0,171,173, 0, 0, 0, 0, 0, 0, 0,117,120,175, + 177,179, 0,183, 0,185,187, 0,191,197, 0,134, 0,137, 0,215,217, 0, + 141, 0,234,239, 0,189,139,205,209,144,221,229,146, 0, 0, 0, 0, 0, + 0, 0,158,161,248,250, 0, 0, 0, 0,169, 0, 0, 0, 0,252,174, 0, + 0, 0, 0, 0, 0, 0,180,183, 0, 0, 0, 0,254,189, 0, 0, 0, 0, + 256,195,258,260,262, 0,266,268, 0,270,276, 0,207, 0,210, 0,294,296, + 0,214, 0,313,318, 0,212,284,288,217,300,308,219, 0, 0, 0, 0,327, + 330, 0,334,337, 0,230,233,236, 0, 0, 0, 0,243,341, 0,343, 0, 0, + 0, 0, 0, 0, 0,251,254,345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,261, 0, 0, 0, 0,276,349, 0,355,358, 0,362,365, 0, + 353,282,285, 0, 0, 0,292, 0,375,378, 0,382,385, 0,294,369,371,296, + 299, 0,398,401, 0,405,408, 0,389,392,394,308,311, 0,412,415,417, 0, + 421,424, 0,428,431, 0,324,327, 0,435,438, 0,333, 0,442,445, 0,338, + 0,449, 0, 0, 0,345, 0, 0, 0, 0,457,460, 0,464,467, 0,347,349, + 453,352,355, 0,471,473, 0, 0, 0, 0,481,367, 0, 0, 0, 0,373,483, + 0,485,487, 0, 0, 0, 0,496,499, 0,503,506, 0,489,382,492,385,388, + 0 +}; + +static const unsigned short ag_key_index[] = { + 4, 6, 40, 56, 0, 0, 0, 76, 0, 0, 0, 0, 0, 91, 4,104,112, 76, + 4,114, 0,114,114, 56, 56, 0, 0, 0, 0, 0,123, 0, 4,104,129,131, + 0,149, 0, 0, 0, 0, 0, 0, 4, 0,164,172,177,114,114,186, 0,186, + 192, 4,177, 56, 56,198,129,129, 0,204,112, 56, 4,222,239, 0, 0, 0, + 0, 0, 4,239,246,249,186,257,274,172,279,288,186,186,172, 0,274,186, + 172,302,172,314,320,314,288, 56,249, 56,186,172, 56,198, 0,129, 4, 56, + 0, 56, 0,129,129,129, 56, 56,129,129,129,129,129,129, 4,129, 0, 56, + 56, 0, 0, 0, 4,249, 0, 0, 0,274,274,274,274,274,330,336,341,343, + 343,239, 0,358,358,358,358, 0, 0,186,186,239,239,239,172,172, 4,172, + 0, 0, 0,204, 4,364,129,370, 0, 0,172, 0, 4, 0,129,376, 76, 0, + 4, 0, 0,379,239,274,239,239,239,172,239,239,358,358,274,358,391,172, + 172,314,314, 0,288,239,129,172, 56, 56, 0, 0, 0,274,239,129, 56,172, + 0,172,172, 56 +}; + +static const unsigned char ag_key_ends[] = { +47,0, 42,0, 62,0, 58,0, 46,46,46,0, 46,46,0, 46,46,46,0, +101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, +105,100,100,101,110,0, 116,0, 101,109,101,0, +111,110,97,115,115,111,99,0, 105,103,104,116,0, 105,99,107,121,0, +98,103,114,97,109,109,97,114,0, 46,46,0, 46,46,46,0, 47,0, +101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, +105,100,100,101,110,0, 116,0, 101,109,101,0, +111,110,97,115,115,111,99,0, 105,103,104,116,0, 105,99,107,121,0, +98,103,114,97,109,109,97,114,0, 58,0, 62,0, 46,46,0, 58,0, +46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 58,0, +62,0, 47,0, 58,0, 10,0, 46,46,46,0, 42,0, 47,0, 58,0, 47,0, +101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, +105,100,100,101,110,0, 116,0, 101,109,101,0, +111,110,97,115,115,111,99,0, 105,103,104,116,0, 105,99,107,121,0, +98,103,114,97,109,109,97,114,0, 58,0, 10,0, 62,0, 47,0, 42,0, +58,0, 10,0, 46,46,46,0, 42,0, 58,0, 101,103,97,114,100,0, +105,110,103,117,105,115,104,0, 110,117,109,0, 105,100,100,101,110,0, +116,0, 101,109,101,0, 111,110,97,115,115,111,99,0, 105,103,104,116,0, +105,99,107,121,0, 98,103,114,97,109,109,97,114,0, 46,46,0, +46,46,46,0, 46,46,0, 46,46,46,0, 10,0, 10,0, 46,46,46,0, +46,46,46,0, 47,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, +47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, +46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, +46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, +46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, +46,46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, +46,46,46,0, 42,0, 101,121,119,111,114,100,115,0, 42,0, 58,0, +42,0, 10,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, +46,46,46,0, +}; + +#define AG_TCV(x) ag_tcv[(x)] + +static const unsigned char ag_tcv[] = { + 46,234,234,234,234,234,234,234,234, 96,103,105,105,101,234,234,234,234, + 234,234,234,234,234,234,234,234, 46,234,234,234,234,234, 96, 15,150,235, + 61,235,136, 33, 21, 31, 89, 25, 7, 23,235,235,119,232,232,232,232,232, + 232,232,233,233,173, 74, 86, 13, 85,196,235,129,129,129,129,129,129,231, + 231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231, + 231, 19,168, 27,112,231,235,129,129,129,129,129,129,231,231,231,231,231, + 231,231,231,231,231,231,231,231,231,231,231,231,231,231,231, 17, 37, 29, + 35,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, + 234,234,234,234 +}; + +#ifndef SYNTAX_ERROR +#define SYNTAX_ERROR fprintf(stderr,"%s, line %d, column %d\n", \ + (PCB).error_message, (PCB).line, (PCB).column) +#endif + +#ifndef FIRST_LINE +#define FIRST_LINE 1 +#endif + +#ifndef FIRST_COLUMN +#define FIRST_COLUMN 1 +#endif + +#ifndef PARSER_STACK_OVERFLOW +#define PARSER_STACK_OVERFLOW {fprintf(stderr, \ + "\nParser stack overflow, line %d, column %d\n",\ + (PCB).line, (PCB).column);} +#endif + +#ifndef REDUCTION_TOKEN_ERROR +#define REDUCTION_TOKEN_ERROR {fprintf(stderr, \ + "\nReduction token error, line %d, column %d\n", \ + (PCB).line, (PCB).column);} +#endif + + +#ifndef INPUT_CODE +#define INPUT_CODE(T) (T) +#endif + +typedef enum + {ag_accept_key, ag_set_key, ag_jmp_key, ag_end_key, ag_no_match_key, + ag_cf_accept_key, ag_cf_set_key, ag_cf_end_key} key_words; + +static void near ag_get_key_word(int ag_k) { + int ag_save = (int) ((PCB).la_ptr - (PCB).pointer); + const unsigned char *ag_p; + int ag_ch; + while (1) { + switch (ag_key_act[ag_k]) { + case ag_cf_end_key: { + const unsigned char *sp = ag_key_ends + ag_key_jmp[ag_k]; + do { + if ((ag_ch = *sp++) == 0) { + int ag_k1 = ag_key_parm[ag_k]; + int ag_k2 = ag_key_pt[ag_k1]; + if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) goto ag_fail; + (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1 + 1]; + return; + } + } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch); + goto ag_fail; + } + case ag_end_key: { + const unsigned char *sp = ag_key_ends + ag_key_jmp[ag_k]; + do { + if ((ag_ch = *sp++) == 0) { + (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k]; + return; + } + } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch); + } + case ag_no_match_key: +ag_fail: + (PCB).la_ptr = (PCB).pointer + ag_save; + return; + case ag_cf_set_key: { + int ag_k1 = ag_key_parm[ag_k]; + int ag_k2 = ag_key_pt[ag_k1]; + ag_k = ag_key_jmp[ag_k]; + if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) break; + ag_save = (int) ((PCB).la_ptr - (PCB).pointer); + (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1+1]; + break; + } + case ag_set_key: + ag_save = (int) ((PCB).la_ptr - (PCB).pointer); + (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k]; + case ag_jmp_key: + ag_k = ag_key_jmp[ag_k]; + break; + case ag_accept_key: + (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k]; + return; + case ag_cf_accept_key: { + int ag_k1 = ag_key_parm[ag_k]; + int ag_k2 = ag_key_pt[ag_k1]; + if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) + (PCB).la_ptr = (PCB).pointer + ag_save; + else (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1+1]; + return; + } + } + ag_ch = CONVERT_CASE(*(PCB).la_ptr++); + ag_p = &ag_key_ch[ag_k]; + if (ag_ch <= 255) while (*ag_p < ag_ch) ag_p++; + if (ag_ch > 255 || *ag_p != ag_ch) { + (PCB).la_ptr = (PCB).pointer + ag_save; + return; + } + ag_k = (int) (ag_p - ag_key_ch); + } +} + + +#ifndef AG_NEWLINE +#define AG_NEWLINE 10 +#endif + +#ifndef AG_RETURN +#define AG_RETURN 13 +#endif + +#ifndef AG_FORMFEED +#define AG_FORMFEED 12 +#endif + +#ifndef AG_TABCHAR +#define AG_TABCHAR 9 +#endif + +static void near ag_track(void) { + int ag_k = (int) ((PCB).la_ptr - (PCB).pointer); + while (ag_k--) { + switch (*(PCB).pointer++) { + case AG_NEWLINE: + (PCB).column = 1, (PCB).line++; + case AG_RETURN: + case AG_FORMFEED: + break; + case AG_TABCHAR: + (PCB).column += (TAB_SPACING) - ((PCB).column - 1) % (TAB_SPACING); + break; + default: + (PCB).column++; + } + } +} + + +static void near ag_prot(void) { + int ag_k; + ag_k = 53 - ++(PCB).btsx; + if (ag_k <= (PCB).ssx) { + (PCB).exit_flag = AG_STACK_ERROR_CODE; + PARSER_STACK_OVERFLOW; + return; + } + (PCB).bts[(PCB).btsx] = (PCB).sn; + (PCB).bts[ag_k] = (PCB).ssx; + (PCB).vs[ag_k] = (PCB).vs[(PCB).ssx]; + (PCB).ss[ag_k] = (PCB).ss[(PCB).ssx]; + (PCB).cs[ag_k] = (PCB).cs[(PCB).ssx]; +} + +static void near ag_undo(void) { + if ((PCB).drt == -1) return; + while ((PCB).btsx) { + int ag_k = 53 - (PCB).btsx; + (PCB).sn = (PCB).bts[(PCB).btsx--]; + (PCB).ssx = (PCB).bts[ag_k]; + (PCB).vs[(PCB).ssx] = (PCB).vs[ag_k]; + (PCB).ss[(PCB).ssx] = (PCB).ss[ag_k]; + (PCB).cs[(PCB).ssx] = (PCB).cs[ag_k]; + } + (PCB).token_number = (pgg_token_type) (PCB).drt; + (PCB).ssx = (PCB).dssx; + (PCB).sn = (PCB).dsn; + (PCB).drt = -1; +} + + + +static const int ag_rtt[] = { + 97,219, 0 +}; + +static const unsigned char ag_tstt[] = { +231,221,129,106,103,101,96,46,21,19,17,0,3,4,5,38,97,219, +235,234,233,232,231,221,220,196,173,168,150,136,129,119,112,105,103,101,96, + 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,97,219, +221,96,0,3,97,219, +231,129,106,103,101,46,21,19,17,0,39,40,99,102, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,103,101,96,89,86,85, + 74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,108,109, +103,0, +103,101,0,102, +231,221,193,191,190,187,186,185,184,183,181,129,106,105,103,101,96,95,46,35, + 27,21,19,17,0,3,97,99,102,104,219, +231,129,46,21,19,17,0,20,41,42,45,47,48,49,54,55,56,57,58,59,60,91,202, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, + 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0, +103,0, +103,101,0,102, +103,0, +233,232,231,221,129,122,121,119,112,106,103,101,96,89,79,35,33,25,23,21,0,3, + 4,8,9,97,98,99,100,102,219, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, + 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,102,204,205,206, +233,232,231,221,201,200,199,198,197,196,173,136,129,119,106,103,101,96,89, + 86,85,79,61,46,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,97,219, +231,129,79,0,60,62,75,91, +231,221,193,191,190,187,186,185,184,183,181,129,106,103,101,96,95,35,27,0,3, + 4,5,97,176,219, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,96,89,86,85, + 74,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,97,99,203,207,210,211,219, +61,13,0,12, +231,129,0,57,59,60,91, +7,0,6, +2,0,1,50, +106,103,101,0,39,99,102, +106,103,101,0,39,99,102, +231,129,46,21,19,17,0,20,41,43,44,47,48,49,54,55,56,57,58,59,60,91,202, +46,0, +103,0, +103,0, +103,101,0,100,102, +235,234,233,232,231,221,218,197,196,173,168,150,136,129,122,121,119,112,106, + 105,103,101,96,89,86,85,79,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7, + 0,3,97,98,99,100,102,219, +103,0, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, + 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,102,204, +233,232,231,221,129,119,96,0,3,97,219, +231,221,129,96,0,80, +106,103,101,89,86,85,79,31,27,21,7,0,76,77,84, +31,0, +231,193,191,190,187,186,185,184,183,181,129,106,103,101,95,35,27,0,39,40,99, + 102, +27,0,26, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, + 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,225,226,227, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, + 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,228,229,230, +150,0, +33,0, +103,101,0,102, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, + 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,208, +29,0,28, +235,234,233,232,231,221,218,196,173,168,150,136,129,122,121,119,112,106,105, + 103,101,96,89,86,85,79,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8, + 9,97,98,99,100,102,219, +233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,91,110,111,115,117,131,132,133,134,135,137,143,147,148, +221,106,103,101,96,46,7,2,0,3,4,5,97,219, +61,0, +7,0,6, +233,232,231,221,150,129,122,121,119,112,106,103,101,96,35,33,29,25,23,21,19, + 17,15,0,3,4,8,9,97,98,99,100,102,219, +231,129,0,59,60,91, +233,232,231,221,150,129,122,121,119,112,106,103,101,96,46,37,35,33,25,23,21, + 19,17,15,13,0,3,4,5,97,219, +233,232,231,150,129,122,121,119,112,106,103,101,46,37,35,33,25,23,21,19,17, + 15,13,0,12,14,16,18,20,22,24,34,53,60,67,69,70,71,91,110,111,115,117, + 130,131,132,133,134,135,137,143,147,148, +231,221,129,106,105,103,101,96,46,21,19,17,0,3,97,99,102,104,219, +231,221,129,106,105,103,101,96,46,37,21,19,17,2,0,1,3,36,50,51,52,97,99,102, + 104,219, +106,103,101,46,0,39,99,102, +106,103,101,46,0,39,99,102, +221,96,0,3,4,97,219, +231,221,129,96,0,3,4,5,97,219, +231,221,129,96,0,81, +89,21,0,20,78,82,83,87,88,90, +231,221,129,96,79,0,3,4,5,97,219, +231,129,79,0,60,62,75,91, +106,103,101,89,85,31,27,21,7,0, +231,221,129,106,103,101,96,0,3,4,8,9,97,98,99,100,102,219, +231,193,191,190,187,186,185,184,183,181,129,95,35,27,0,34,60,91,94,146,177, + 178,179,180,188, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,103,101,96,89,86,85, + 74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,224, +235,234,233,232,231,196,173,168,136,129,119,112,105,96,89,86,85,74,61,37,35, + 33,31,29,27,25,23,21,19,17,15,13,7,0,225, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,103,101,96,89,86,85, + 74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,224, +235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, + 37,35,31,29,27,25,23,21,19,17,15,13,7,0,228, +103,0, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, + 89,86,85,74,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,97,99,210,211, + 212,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +235,234,233,232,231,221,218,196,173,168,150,136,129,119,112,106,105,103,101, + 96,89,86,85,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,9,97,98,99, + 100,102,219, +235,234,233,232,231,218,196,173,168,150,136,129,119,112,105,89,86,85,61,37, + 35,33,31,27,25,23,21,19,17,15,13,7,0,55,73,202,214, +233,232,231,221,150,129,122,121,119,112,106,103,101,96,35,33,25,23,21,19,17, + 15,0,3,4,8,9,97,98,99,100,102,219, +233,232,231,221,197,150,129,122,121,119,112,106,103,101,96,37,35,33,29,25, + 23,21,19,17,15,13,0,3,4,8,9,97,98,99,100,102,219, +235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, + 156,136,129,119,112,105,96,89,86,85,74,61,37,35,33,31,29,27,25,23,21,19, + 17,15,13,7,0,139,140,141,142,149,151,152,153,154,167,169, +233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,63,64,69,71,91,110,111,115,117,130,131,132,133,134,135,137, + 143,147,148, +233,232,231,197,150,129,122,121,119,112,37,35,33,29,25,23,21,19,17,15,13,0, + 12,14,16,18,20,22,24,34,60,63,64,66,67,68,69,71,91,110,111,115,117,130, + 131,132,133,134,135,137,143,147,148, +196,0, +233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, + 97,98,99,100,102,219, +233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, + 97,98,99,100,102,219, +233,232,122,121,119,0,116,118,123, +235,233,232,231,196,173,168,150,136,129,119,112,89,86,85,74,61,37,35,33,31, + 29,27,25,23,21,19,17,15,13,7,0, +235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, + 156,150,136,129,119,112,105,96,89,86,85,74,61,37,35,31,29,27,25,23,21, + 19,17,15,13,7,0,114,139,140,141,142,167,169, +233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, + 97,98,99,100,102,219, +233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, + 115,117,132,134,135,137,143, +144,0, +233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, + 115,117,135,137,143, +136,0, +199,196,25,23,11,0,10,22,24, +199,196,25,23,11,0,10,22,24, +201,200,198,197,173,106,103,101,46,37,29,27,13,7,0,72, +106,103,101,46,37,13,7,0,6,12,67, +235,234,233,232,231,218,196,173,168,150,136,129,119,112,105,89,86,85,61,37, + 35,33,31,27,25,23,21,19,17,15,13,7,0,55,73,202,214, +37,0,36,51, +233,232,231,221,150,129,122,121,119,112,106,103,101,96,35,33,25,23,21,19,17, + 15,0,3,4,8,9,97,98,99,100,102,219, +233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,69,70,71,91,110,111,115,117,130,131,132,133,134,135,137,143, + 147,148, +37,0,36,51, +221,96,0,3,97,219, +231,129,0,60,91, +231,221,129,96,0,3,4,5,97,219, +231,221,129,106,103,101,96,89,85,31,27,21,7,0,3,4,5,97,219, +231,129,0,60,91, +89,21,0,20,78,82,83,87,88,90, +89,21,0,20,83,87,88,90, +85,7,0, +221,96,0,3,4,97,219, +221,96,0,3,4,97,182,219, +221,96,0,3,4,97,219, +106,103,101,29,7,0,6,98,99,100,102,189,192, +106,103,101,29,7,0,6,98,99,100,102,189,192, +221,96,0,3,4,97,182,219, +221,96,0,3,4,97,182,219, +221,96,0,3,4,97,182,219, +221,96,0,3,4,97,182,219, +221,96,0,3,4,97,182,219, +221,96,0,3,4,97,182,219, +221,106,103,101,96,0,3,4,8,97,98,99,100,102,219, +233,232,231,221,129,119,96,13,0,3,4,5,97,219, +231,129,0,60,91, +13,0,12, +106,103,101,27,0,39,40,99,102, +150,0, +33,0, +103,101,0,102, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, + 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,208, +235,234,233,232,231,218,196,173,168,150,136,129,119,112,105,89,86,85,61,37, + 35,33,31,27,25,23,21,19,15,13,7,0,210,211,215,216, +74,0, +232,119,0, +233,232,129,119,0,124,128, +232,119,0, +232,119,0, +233,129,0, +233,232,129,119,0, +235,234,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157,156,150, + 136,112,105,96,89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7, + 0,139,140,141,142,154,167,169, +201,200,198,197,37,29,27,13,7,0,6,12,67, +201,198,37,27,0,26,36,65, +200,37,0,36,65, +37,0,36,65, +197,29,0,28, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +233,232,129,119,0,124,128, +232,221,201,200,199,198,197,196,173,144,136,119,106,103,101,96,46,37,31,29, + 27,25,23,13,11,7,0,120, +233,232,119,0, +221,201,200,199,198,197,196,173,144,136,106,103,101,96,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,97,219, +221,201,200,199,198,197,196,173,144,136,106,103,101,96,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,97,219, +33,23,0,32, +31,25,23,0,22,24,30, +233,232,221,122,121,119,112,106,103,101,96,33,25,23,0,3,4,8,9,97,98,99,100, + 102,219, +233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, + 97,98,99,100,102,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, + 115,117,134,135,137,143, +233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, + 115,117,134,135,137,143, +231,221,129,106,103,101,96,0,3,4,8,9,97,98,99,100,102,219, +233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,71,91,110,111,115,117,130,131,132,133,134,135,137,143,147, + 148, +74,0, +231,129,0,60,91, +31,0,30, +231,221,129,96,79,0,3,4,5,97,219, +221,106,103,101,96,89,85,31,27,21,7,0,3,4,5,97,219, +221,194,96,0,3,97,219, +221,96,17,0,3,16,97,219, +233,232,231,221,150,129,122,121,119,112,96,35,33,25,23,21,19,17,0,3,16,18, + 20,22,24,34,60,91,97,110,111,115,117,130,132,133,134,135,137,143,147, + 148,219, +29,0,28, +231,129,0,60,91,145, +233,232,231,129,122,121,119,112,35,33,29,25,23,21,0,20,22,24,34,60,91,110, + 111,115,117,132,134,135,137,143, +17,0,16, +233,232,231,221,129,119,106,103,101,96,17,0,3,97,98,99,100,102,219, +13,0,12, +233,232,231,221,129,119,96,0,3,97,219, +233,232,231,150,129,122,121,119,79,25,23,0,22,24,60,62,75,91,111,115,117, + 147,148, +231,221,193,191,190,187,186,185,184,183,181,129,106,105,103,101,96,95,35,27, + 0,3,34,60,91,94,97,99,102,104,146,179,180,188,219, +103,0, +235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, + 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,97,99,210,211, + 212,219, +150,0, +33,0, +235,234,233,232,231,221,218,196,173,168,150,136,129,119,112,105,96,89,86,85, + 61,37,35,33,31,27,25,23,21,19,15,13,7,0,3,97,210,211,216,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +233,232,129,119,0,128, +221,201,200,198,197,196,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,64,69,71,91,110,111,115,117,130,131,132,133,134,135,137,143, + 147,148, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, +233,232,129,119,0,128, +232,119,0, +235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, + 156,150,136,129,119,112,105,96,89,86,85,74,61,37,35,31,29,27,25,23,21, + 19,17,15,13,7,0,114,139,140,141,142,167,169, +221,201,200,199,198,197,196,173,144,136,106,103,101,96,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,97,219, +221,201,200,199,198,197,196,173,136,106,103,101,96,85,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,97,219, +233,232,122,121,119,112,33,25,23,0,22,24,110,111,115,117, +233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, + 115,117,135,137,143, +136,0, +136,0, +231,129,0,174,175, +201,200,198,197,173,106,103,101,46,37,29,27,13,7,0,72, +221,201,200,198,197,106,103,101,96,46,37,29,27,0,3,4,5,97,219, +221,96,0,3,4,97,219, +233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,0,16,18,20,22,24, + 34,60,91,110,111,115,117,130,132,133,134,135,137,143,147,148,195, +13,0,12, +25,23,0,22,24, +231,129,0,60,91,145, +150,0,147,148, +33,0,32, +235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, + 156,150,136,129,119,112,105,96,89,86,85,74,61,37,35,31,29,27,25,23,21, + 19,17,15,13,7,0,114,139,140,141,142,167,169, +233,232,231,221,201,200,198,197,129,119,106,103,101,96,46,37,29,27,13,7,0,3, + 4,5,97,219, +221,96,17,0,3,16,97,219, +106,103,101,29,7,0,6,98,99,100,102,189,192, +233,232,122,121,119,112,33,25,23,0,22,24,110,111,115,117, +33,0,32, +233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, + 115,117,132,134,135,137,143, +233,232,231,150,129,122,121,119,112,35,33,29,25,23,21,19,17,0,16,18,20,22, + 24,34,60,91,110,111,115,117,130,132,133,134,135,137,143,147,148, +25,23,0,22,24, + +}; + + +static unsigned const char ag_astt[3853] = { + 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, + 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, + 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, + 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,1,9,8,1,9,5,5,5,5,5,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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,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,2,2,2,2,2,2,2,2,2,2,7,1,1,1,1,1,1,1,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,1,9,1,7,3,1,3,1,1,8,1,8,1,7,1,1,1,1,1,3,1,5, + 5,5,5,5,1,1,1,1,7,2,2,2,2,1,2,1,7,2,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2, + 1,1,1,1,2,1,1,1,1,2,5,5,2,2,2,5,5,5,1,1,1,5,1,1,1,1,1,7,1,1,1,2,2,1,2,1,1, + 1,1,2,2,1,2,1,1,1,2,1,1,1,1,4,1,1 +}; + + +static const unsigned short ag_pstt[] = { +3,1,3,3,3,3,2,3,3,3,3,0,2,2,3,0,2,1, +291,291,291,291,291,1,289,291,291,291,291,291,291,291,291,291,291,291,291, + 291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291, + 291,1,292,1, +1,2,4,2,2,1, +8,8,4,5,5,23,8,8,8,3,7,8,6,5, +9,9,9,9,9,9,9,9,9,9,9,9,9,9,121,121,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 4,9,123, +116,5, +10,10,6,10, +24,1,24,24,24,24,24,24,24,24,24,24,4,118,12,12,117,24,24,24,24,24,24,24,7, + 117,117,11,12,117,1, +94,94,26,13,17,14,8,16,25,25,26,24,23,22,23,23,23,21,20,48,19,15,18, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + 120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,122, +115,10, +27,27,11,27, +113,12, +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, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,31,31,262, + 262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, + 14,31,32,32,264, +95,95,95,1,3,3,3,3,3,3,3,3,95,95,3,3,3,33,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 15,33,33,100,33,1, +94,94,34,16,35,36,35,15, +3,1,3,3,3,3,3,3,3,3,3,3,37,37,37,2,3,3,3,17,2,2,37,2,38,1, +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, + 265,44,44,44,44,44,44,44,44,18,44,43,45,44,42,41,1, +48,46,50,47, +94,94,20,50,48,49,15, +51,46,52, +53,36,54,37, +4,5,5,23,55,6,5, +4,5,5,24,56,6,5, +94,94,27,13,17,14,25,16,26,30,30,58,57,22,57,57,57,21,20,48,19,15,18, +31,26, +114,27, +59,28, +28,28,29,106,28, +103,103,103,103,103,1,103,103,103,103,103,103,103,103,103,103,103,103,4,103, + 28,28,2,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103, + 103,103,103,30,2,2,104,29,104,28,1, +259,31, +263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,31,31,263, + 263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263, + 32,31,261, +96,96,96,1,96,96,2,4,2,2,1, +77,77,77,77,34,60, +71,71,71,62,63,71,61,71,71,62,71,35,65,62,64, +66,36, +67,67,67,67,67,67,67,67,67,67,67,4,5,5,67,67,23,37,7,67,6,5, +68,38,213, +70,70,70,70,70,70,70,69,298,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70, + 70,70,70,70,70,70,70,70,70,39,70,70,300, +72,72,72,72,72,72,72,71,72,72,72,72,72,72,72,72,72,72,72,72,72,72,306,72,72, + 72,72,72,72,72,72,72,72,72,40,72,72,308, +271,41, +270,42, +73,73,43,73, +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, + 74,74,74,272,74,74,74,74,74,74,74,74,74,44,74, +75,45,258, +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, + 6,6,6,6,46,30,30,10,10,30,10,29,10,28,1, +128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,47,77,82,81,90,131, + 130,92,163,15,91,91,86,130,169,94,168,93,93,93,161,83,80, +1,3,3,3,2,3,3,3,48,2,2,51,2,1, +48,50, +51,47,52, +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, + 1, +94,94,52,49,49,15, +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, +128,128,94,178,94,128,128,128,87,68,68,68,68,68,89,88,84,85,13,78,79,76,46, + 54,98,77,82,81,90,131,130,92,99,163,61,97,62,96,15,91,91,86,130,96,146, + 95,96,93,93,93,161,83,80, +33,1,33,4,118,12,12,117,33,33,33,33,55,117,117,11,12,117,1, +32,1,32,4,118,12,12,117,32,100,32,32,32,53,56,54,117,101,38,102,102,117,11, + 12,117,1, +4,5,5,35,57,55,6,5, +4,5,5,34,58,56,6,5, +1,103,110,103,103,103,1, +104,1,104,2,60,2,2,104,2,1, +79,79,79,79,61,105, +106,13,62,87,75,109,75,108,107,109, +3,1,3,2,3,63,2,2,85,2,1, +94,94,34,64,35,110,35,15, +72,72,72,74,72,72,72,74,72,65, +6,1,6,4,28,28,30,66,30,30,52,52,30,52,29,52,28,1, +94,111,112,113,116,117,118,119,120,121,94,122,89,214,67,124,125,15,123,114, + 126,216,126,126,115, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,68,2,2,17,2,1, +295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, + 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,69, + 295, +297,297,297,297,297,297,297,69,297,297,297,297,297,297,297,297,297,297,297, + 297,297,297,297,297,297,297,297,297,297,297,297,297,297,299,297, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, + 303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,71, + 303, +305,305,305,305,305,305,305,71,305,305,305,305,305,305,305,305,305,305,305, + 305,305,305,305,305,305,305,305,305,305,305,305,305,305,307,305, +269,73, +273,273,273,273,273,1,273,273,273,39,273,273,273,273,4,273,273,273,273,273, + 273,273,273,273,273,273,40,273,273,273,273,273,273,130,273,273,273,266, + 273,129,128,127,273,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,75,2,2,18,2,1, +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, + 6,76,30,30,11,11,30,11,29,11,28,1, +280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, + 280,280,280,280,280,280,280,280,280,14,280,280,280,77,256,132,18,131, +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, + 28,1, +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, + 29,12,28,1, +199,199,200,200,199,199,199,134,133,192,191,190,189,188,187,186,185,184,183, + 182,199,200,200,199,199,199,199,199,199,199,199,199,199,199,199,199,199, + 199,199,199,199,199,199,199,199,80,199,204,181,206,139,138,137,139,199, + 136,135, +128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,81,77,82,81,90,131, + 130,92,163,141,53,140,96,15,91,91,86,130,96,146,95,96,93,93,93,161,83, + 80, +128,128,94,68,178,94,128,128,128,87,68,89,88,68,84,85,13,78,79,76,46,82,98, + 77,82,81,90,131,130,92,163,142,53,143,56,144,140,96,15,91,91,86,130,96, + 146,95,96,93,93,93,161,83,80, +145,245, +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, +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, +137,137,146,146,147,86,149,148,146, +150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150, + 150,150,150,150,150,150,150,150,150,150,150,150,87, +156,156,156,156,156,156,156,134,133,192,191,190,189,188,187,186,185,184,183, + 182,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, + 156,156,156,156,156,156,156,156,88,151,151,151,151,151,136,135, +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, +128,128,94,94,128,128,128,87,89,88,84,85,13,90,90,131,130,92,163,15,91,91, + 86,130,152,93,93,93,161, +153,162, +128,128,94,94,128,128,128,87,89,88,84,85,13,92,90,131,130,92,163,15,91,91, + 86,130,155,155,161, +154,149, +156,157,84,85,155,167,253,158,159, +156,157,84,85,155,147,253,158,159, +208,208,208,208,160,208,208,208,208,208,208,208,208,208,96,66, +68,68,68,68,68,46,51,97,161,98,65, +280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, + 280,280,280,280,280,280,280,280,280,14,280,280,280,98,69,162,18,131, +100,42,101,63, +6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,100,30,30,22,22,30,22,29,22, + 28,1, +128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,101,77,82,81,90, + 131,130,92,163,97,64,96,15,91,91,86,130,96,146,95,96,93,93,93,161,83,80, +100,41,101,40, +1,2,111,2,2,1, +94,94,104,78,15, +163,1,163,2,105,2,2,163,2,1, +3,1,3,3,3,3,2,3,3,3,3,3,3,106,2,2,89,2,1, +94,94,90,91,15, +106,13,108,87,164,109,164,108,107,109, +106,13,81,87,83,108,107,93, +166,165,110, +1,167,111,167,167,167,1, +1,168,112,168,168,168,235,1, +1,169,113,169,169,169,1, +4,28,28,170,51,114,171,170,29,170,28,233,170, +4,28,28,170,51,115,172,170,29,170,28,232,170, +1,168,116,168,168,168,231,1, +1,168,117,168,168,168,230,1, +1,168,118,168,168,168,229,1, +1,168,119,168,168,168,228,1, +1,168,120,168,168,168,227,1, +1,168,121,168,168,168,226,1, +1,4,28,28,174,122,174,174,173,174,173,29,173,28,1, +98,98,98,1,98,98,176,175,123,176,176,175,176,1, +94,94,124,220,15, +46,219,177, +4,5,5,23,126,178,215,6,5, +279,127, +278,128, +179,179,129,179, +180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180, + 180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180, + 180,130,180, +183,183,183,183,183,183,183,183,183,39,183,183,183,183,183,183,183,183,183, + 183,183,40,183,183,183,183,183,183,183,183,183,131,182,181,183,183, +184,132, +193,193,133, +143,143,144,143,134,185,141, +195,195,197, +194,194,196, +203,203,176, +202,202,202,202,175, +201,201,201,201,201,134,133,192,191,190,189,188,187,186,185,184,183,182,186, + 201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201, + 201,201,201,201,201,139,201,205,181,207,201,136,135, +68,68,68,68,68,68,68,46,51,140,161,98,60, +187,188,100,68,141,249,189,54, +190,100,59,189,54, +100,58,189,57, +191,75,144,247, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,145,2,2,246,2,1, +143,143,144,143,146,192,141, +139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, + 139,139,139,139,139,139,139,147,193, +138,138,138,132, +1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,149,2,2,127,2,1, +1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,150,2,2,125,2,1, +195,194,151,126, +196,84,85,152,158,159,164, +197,197,1,197,197,197,197,4,28,28,30,197,197,197,153,30,30,197,197,30,197, + 29,197,28,1, +198,198,198,1,198,198,198,198,198,4,28,28,30,198,198,198,198,198,154,30,30, + 198,198,30,198,29,198,28,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,155,2,2,9,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,156,2,2,252,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,157,2,2,251,2,1, +128,128,94,94,128,128,128,87,89,88,84,85,13,158,90,131,130,92,163,15,91,91, + 86,130,199,199,199,161, +128,128,94,94,128,128,128,87,89,88,84,85,13,159,90,131,130,92,163,15,91,91, + 86,130,200,200,200,161, +201,1,201,4,28,28,30,160,30,30,201,201,30,201,29,201,28,1, +128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,161,77,82,81,90, + 131,130,92,163,202,15,91,91,86,130,202,146,95,202,93,93,93,161,83,80, +203,162, +94,94,163,80,15, +196,164,88, +3,1,3,2,3,165,2,2,86,2,1, +1,3,3,3,2,3,3,3,3,3,3,166,2,2,84,2,1, +1,204,2,167,2,2,1, +1,2,79,168,2,205,2,1, +128,128,94,1,178,94,128,128,128,87,2,89,88,84,85,13,78,79,169,2,82,81,90, + 131,130,92,163,15,2,91,91,86,130,234,95,234,93,93,93,161,83,80,1, +75,170,239, +94,94,237,206,15,173, +128,128,94,94,128,128,128,87,89,88,237,84,85,13,172,90,131,130,92,163,15,91, + 91,86,130,207,93,93,93,161, +79,173,208, +97,97,97,1,97,97,4,28,28,2,103,174,2,2,104,29,104,28,1, +46,175,209, +99,99,99,1,99,99,2,4,2,2,1, +128,128,94,178,94,128,128,128,34,84,85,177,131,130,35,221,35,15,224,86,130, + 222,80, +94,1,111,112,113,116,117,118,119,120,121,94,4,118,12,12,117,122,89,24,178, + 117,124,125,15,123,117,11,12,117,114,218,218,115,1, +277,179, +273,273,273,273,273,1,273,273,273,39,273,273,273,273,4,273,273,273,273,273, + 273,273,273,273,273,273,40,273,275,273,273,273,273,273,130,273,273,273, + 180,273,129,128,127,273,1, +288,181, +287,182, +283,283,283,283,283,1,283,283,283,283,39,283,283,283,283,283,284,283,283, + 283,283,283,283,40,283,283,283,283,283,283,283,283,283,281,284,284,182, + 181,283,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,184,2,2,257,2,1, +143,143,144,143,198,142, +1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,186,2,2,174,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,187,2,2,255,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,188,2,2,250,2,1, +128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,189,77,82,81,90, + 131,130,92,163,55,140,96,15,91,91,86,130,96,146,95,96,93,93,93,161,83, + 80, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,190,2,2,254,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,191,2,2,248,2,1, +143,143,144,143,136,142, +140,140,133, +156,156,156,156,156,156,156,134,133,192,191,190,189,188,187,186,185,184,183, + 182,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, + 156,156,156,156,156,156,156,156,194,210,210,210,210,210,136,135, +1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,195,2,2,20,2,1, +1,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,196,2,2,19,2,1, +128,128,128,128,128,87,211,84,85,197,131,130,166,166,86,130, +128,128,94,94,128,128,128,87,89,88,84,85,13,198,90,131,130,92,163,15,91,91, + 86,130,153,153,161, +154,151, +154,150, +210,210,201,209,212, +208,208,208,208,160,208,208,208,208,208,208,208,208,208,202,67, +1,3,3,3,3,3,3,3,2,3,3,3,3,203,2,2,70,2,1, +1,213,204,213,213,213,1, +128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,205,82,81,90,131,130, + 92,163,15,91,91,86,130,243,95,243,93,93,93,161,83,80,214, +46,170,215, +84,85,241,158,159, +94,94,208,206,15,172, +178,209,223,80, +195,210,165, +156,156,156,156,156,156,156,134,133,192,191,190,189,188,187,186,185,184,183, + 182,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, + 156,156,156,156,156,156,156,156,211,216,216,216,216,216,136,135, +211,211,211,1,3,3,3,3,211,211,3,3,3,2,3,3,3,3,3,3,212,2,2,212,2,1, +1,2,79,213,2,217,2,1, +4,28,28,170,51,214,218,170,29,170,28,242,170, +128,128,128,128,128,87,211,84,85,215,131,130,171,171,86,130, +195,216,126, +128,128,94,94,128,128,128,87,89,88,84,85,13,217,90,131,130,92,163,15,91,91, + 86,130,219,93,93,93,161, +128,128,94,178,94,128,128,128,87,89,88,237,84,85,13,78,79,218,82,81,90,131, + 130,92,163,15,91,91,86,130,244,95,244,93,93,93,161,83,80, +84,85,240,158,159, + +}; + + +static const unsigned short ag_sbt[] = { + 0, 18, 59, 65, 79, 118, 120, 124, 155, 178, 213, 215, 219, 221, + 252, 294, 335, 343, 369, 412, 416, 423, 426, 430, 437, 444, 467, 469, + 471, 473, 478, 528, 530, 570, 581, 587, 602, 604, 626, 629, 667, 705, + 707, 709, 713, 753, 756, 807, 847, 861, 863, 866, 900, 906, 937, 990, + 1009,1035,1043,1051,1058,1068,1074,1084,1095,1103,1113,1131,1156,1178, + 1216,1251,1289,1324,1326,1370,1392,1440,1477,1510,1547,1604,1649,1702, + 1704,1733,1762,1771,1803,1856,1885,1914,1916,1943,1945,1954,1963,1979, + 1990,2027,2031,2064,2108,2112,2118,2123,2133,2152,2157,2167,2175,2178, + 2185,2193,2200,2213,2226,2234,2242,2250,2258,2266,2274,2289,2303,2308, + 2311,2320,2322,2324,2328,2368,2404,2406,2409,2416,2419,2422,2425,2430, + 2480,2493,2501,2506,2510,2514,2536,2543,2571,2575,2605,2635,2639,2646, + 2671,2700,2722,2744,2766,2794,2822,2840,2882,2884,2889,2892,2903,2920, + 2927,2935,2978,2981,2987,3017,3020,3039,3042,3053,3076,3111,3113,3158, + 3160,3162,3202,3224,3230,3253,3275,3297,3341,3363,3385,3391,3394,3447, + 3477,3507,3523,3550,3552,3554,3559,3575,3594,3601,3640,3643,3648,3654, + 3658,3661,3714,3740,3748,3761,3777,3780,3809,3848,3853 +}; + + +static const unsigned short ag_sbe[] = { + 11, 56, 61, 74, 115, 119, 122, 148, 161, 212, 214, 217, 220, 241, + 289, 329, 338, 362, 404, 414, 418, 424, 427, 433, 440, 450, 468, 470, + 472, 475, 520, 529, 567, 577, 585, 598, 603, 621, 627, 663, 701, 706, + 708, 711, 751, 754, 796, 824, 855, 862, 864, 889, 902, 931, 960,1002, + 1023,1039,1047,1053,1062,1072,1076,1089,1098,1112,1120,1145,1172,1214, + 1249,1287,1322,1325,1363,1386,1429,1472,1499,1536,1592,1621,1670,1703, + 1722,1751,1767,1802,1848,1874,1898,1915,1929,1944,1950,1959,1977,1986, + 2022,2028,2053,2081,2109,2114,2120,2127,2146,2154,2159,2169,2177,2180, + 2187,2195,2205,2218,2228,2236,2244,2252,2260,2268,2279,2297,2305,2309, + 2315,2321,2323,2326,2366,2399,2405,2408,2413,2418,2421,2424,2429,2472, + 2489,2497,2503,2507,2512,2530,2540,2569,2574,2599,2629,2637,2642,2660, + 2689,2716,2738,2760,2779,2807,2829,2857,2883,2886,2890,2897,2914,2923, + 2930,2953,2979,2983,3001,3018,3031,3040,3049,3064,3096,3112,3151,3159, + 3161,3195,3218,3228,3247,3269,3291,3314,3357,3379,3389,3393,3439,3471, + 3501,3516,3536,3551,3553,3556,3573,3588,3596,3617,3641,3645,3650,3655, + 3659,3706,3734,3743,3753,3770,3778,3793,3826,3850,3853 +}; + + +static const unsigned char ag_fl[] = { + 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, + 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,4,0,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,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,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,3,5,4,3,3,3,1,3,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,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,3,2,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,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,0,1,2,1 +}; + +static const unsigned char ag_ptt[] = { + 0, 4, 4, 5, 5, 1, 9, 9, 6, 10, 12, 14, 16, 18, 20, 22, 24, 26, + 28, 30, 32, 34, 36, 40, 40, 42, 42, 44, 44, 45, 45, 38, 41, 41, 43, 43, + 47, 47, 47, 52, 52, 47, 50, 48, 48, 48, 49, 49, 57, 57, 59, 59, 58, 63, + 63, 65, 66, 66, 68, 68, 64, 53, 53, 53, 51, 70, 69, 69, 67, 67, 67, 62, + 62, 77, 77, 62, 75, 80, 75, 81, 75, 78, 78, 78, 76, 84, 84, 87, 83, 88, + 90, 90, 82, 82, 91, 91, 91, 94, 94, 94, 60, 3, 3, 8, 8, 8, 98, 98, + 102,102,100,100,104,104,104, 39, 39, 39, 39,108,108,109,109, 99,110,110, + 110,111,117,117,115,115,116,116,123,123,116,118,118,120,120,124,124,128, + 128, 71, 71,130,130,132,132,132,134,134,135,135,114,114,114,114,114,137, + 137,137,137,143,143, 54, 54, 54,145,145,146,146,147,149,149,149,148,154, + 154,154,139,139,139,139,139,139,139,139,139,139,139,167,169,141,140,140, + 142,151,151,151,151,151,152,152,153,153, 72, 72,175,175,174, 56,178,178, + 176,177,177,179,179,179,179,179,179,179,180,180,180,180,180,180,180,180, + 180,180,192,192,192,189,188,188,182,195,195,133,133,133,133,133,133,133, + 133,133,133,133,131,131, 55,204,205,205,206,206,202,203,203,207,207,207, + 207,207,208,208,212,212,212,212,212,212,214, 73,215,215,215,216,216,216, + 216, 97,219,219, 97,225,225,225,226,226,227,227,211,228,228,228,229,229, + 230,230,210,224 +}; + +static const unsigned char *ag_valid(int ag_k) { + const unsigned char *ag_tp = &ag_tstt[ag_sbt[(PCB).sn+1]]; + while (*--ag_tp != (unsigned char) ag_k) if (*ag_tp == 0) return NULL; + return ag_tp; +} + +int pgg_change_reduction(pgg_token_type ag_k) { + if (!ag_valid(ag_k)) return 0; + (PCB).reduction_token = ag_k; + return 1; +} + +static void near ag_default(const int *ag_tp) { + (PCB).ag_dsn = (PCB).sn; + (PCB).ag_dtl = ag_tp; + while (!ag_valid((pgg_token_type) *ag_tp)) ag_tp++; + (PCB).reduction_token = (pgg_token_type) *ag_tp; +} + + + +static void near ag_ra(void) +{ + switch(ag_rpx[(PCB).ag_ap]) { + case 1: ag_rp_1(); break; + case 2: ag_rp_3(V(0,(int *))); break; + case 3: ag_rp_5(V(0,(int *))); break; + case 4: V(0,(int *)) = ag_rp_7(V(0,(int *))); break; + case 5: V(0,(int *)) = ag_rp_8(V(0,(int *))); break; + case 6: V(0,(int *)) = ag_rp_9(); break; + case 7: V(0,(int *)) = ag_rp_10(V(0,(int *))); break; + case 8: ag_rp_11(V(0,(int *))); break; + case 9: ag_rp_12(V(2,(int *))); break; + case 10: V(0,(int *)) = ag_rp_13(); break; + case 11: V(0,(int *)) = ag_rp_14(); break; + case 12: V(0,(int *)) = ag_rp_15(); break; + case 13: ag_rp_16(V(0,(int *))); break; + case 14: ag_rp_17(V(1,(int *))); break; + case 15: ag_rp_18(V(0,(int *))); break; + case 16: V(0,(int *)) = ag_rp_19(V(1,(int *))); break; + case 17: ag_rp_20(V(0,(int *))); break; + case 18: ag_rp_21(V(0,(int *))); break; + case 19: ag_rp_22(V(1,(int *))); break; + case 20: V(0,(int *)) = ag_rp_23(V(1,(int *))); break; + case 21: ag_rp_24(V(0,(int *)), V(1,(int *))); break; + case 22: ag_rp_25(V(2,(int *)), V(3,(int *))); break; + case 23: V(0,(int *)) = ag_rp_26(); break; + case 24: V(0,(int *)) = ag_rp_27(); break; + case 25: V(0,(int *)) = ag_rp_28(); break; + case 26: ag_rp_29(); break; + case 27: ag_rp_30(); break; + case 28: ag_rp_31(); break; + case 29: ag_rp_32(); break; + case 30: ag_rp_33(); break; + case 31: ag_rp_34(); break; + case 32: ag_rp_35(); break; + case 33: ag_rp_36(); break; + case 34: ag_rp_37(); break; + case 35: ag_rp_38(); break; + case 36: ag_rp_39(); break; + case 37: ag_rp_40(); break; + case 38: ag_rp_41(); break; + case 39: ag_rp_42(); break; + case 40: ag_rp_43(V(0,(int *))); break; + case 41: ag_rp_44(V(1,(int *))); break; + case 42: ag_rp_45(V(2,(int *))); break; + case 43: ag_rp_46(V(2,(int *))); break; + case 44: ag_rp_47(V(1,(int *))); break; + case 45: ag_rp_48(V(2,(int *))); break; + case 46: V(0,(int *)) = ag_rp_49(V(1,(int *))); break; + case 47: V(0,(int *)) = ag_rp_50(V(1,(int *))); break; + case 48: V(0,(int *)) = ag_rp_51(V(0,(int *)), V(1,(int *))); break; + case 49: V(0,(int *)) = ag_rp_52(); break; + case 50: V(0,(int *)) = ag_rp_53(); break; + case 51: V(0,(int *)) = ag_rp_54(V(1,(int *))); break; + case 52: V(0,(int *)) = ag_rp_55(V(1,(int *))); break; + case 53: V(0,(int *)) = ag_rp_56(V(0,(int *))); break; + case 54: V(0,(int *)) = ag_rp_57(V(0,(int *)), V(1,(int *))); break; + case 55: V(0,(int *)) = ag_rp_58(); break; + case 56: V(0,(int *)) = ag_rp_59(V(0,(int *)), V(1,(int *))); break; + case 57: V(0,(int *)) = ag_rp_60(V(0,(int *))); break; + case 58: V(0,(int *)) = ag_rp_61(V(0,(int *)), V(1,(int *))); break; + case 59: V(0,(int *)) = ag_rp_62(V(0,(int *))); break; + case 60: V(0,(int *)) = ag_rp_63(V(0,(int *))); break; + case 61: V(0,(int *)) = ag_rp_64(V(0,(int *))); break; + case 62: V(0,(int *)) = ag_rp_65(V(0,(node *))); break; + case 63: V(0,(node *)) = ag_rp_66(V(0,(node *)), V(2,(node *))); break; + case 64: V(0,(node *)) = ag_rp_67(V(0,(node *)), V(2,(node *))); break; + case 65: V(0,(node *)) = ag_rp_68(V(0,(node *)), V(3,(node *))); break; + case 66: V(0,(node *)) = ag_rp_69(V(1,(node *))); break; + case 67: V(0,(int *)) = ag_rp_70(V(0,(int *))); break; + case 68: V(0,(node *)) = ag_rp_71(); break; + case 69: V(0,(node *)) = ag_rp_72(V(0,(int *))); break; + case 70: V(0,(node *)) = ag_rp_73(); break; + case 71: V(0,(node *)) = ag_rp_74(V(1,(node *))); break; + case 72: ag_rp_75(V(1,(int *)), V(3,(int *))); break; + case 73: ag_rp_76(V(0,(int *)), V(3,(int *))); break; + case 74: ag_rp_77(V(2,(node *))); break; + case 75: ag_rp_78(V(2,(int *))); break; + case 76: ag_rp_79(V(2,(int *))); break; + case 77: ag_rp_80(); break; + case 78: ag_rp_81(V(2,(int *))); break; + case 79: ag_rp_82(); break; + case 80: V(0,(int *)) = ag_rp_83(V(0,(int *))); break; + case 81: V(0,(int *)) = ag_rp_84(); break; + case 82: V(0,(int *)) = ag_rp_85(); break; + case 83: V(0,(int *)) = ag_rp_86(); break; + case 84: V(0,(int *)) = ag_rp_87(); break; + case 85: V(0,(int *)) = ag_rp_88(); break; + case 86: V(0,(int *)) = ag_rp_89(); break; + case 87: V(0,(int *)) = ag_rp_90(); break; + case 88: V(0,(int *)) = ag_rp_91(); break; + case 89: V(0,(int *)) = ag_rp_92(); break; + case 90: V(0,(int *)) = ag_rp_93(); break; + case 91: V(0,(int *)) = ag_rp_94(); break; + case 92: V(0,(int *)) = ag_rp_95(V(1,(int *))); break; + case 93: V(0,(int *)) = ag_rp_96(V(0,(int *)), V(1,(int *))); break; + case 94: V(0,(int *)) = ag_rp_97(V(0,(int *)), V(1,(int *))); break; + case 95: V(0,(int *)) = ag_rp_98(V(1,(int *))); break; + case 96: ag_rp_99(V(0,(int *))); break; + case 97: ag_rp_100(V(0,(int *))); break; + case 98: ag_rp_101(V(1,(int *))); break; + case 99: ag_rp_102(V(1,(int *))); break; + case 100: ag_rp_103(V(1,(int *))); break; + case 101: ag_rp_104(V(0,(int *))); break; + case 102: ag_rp_105(V(1,(int *))); break; + case 103: ag_rp_106(V(0,(int *))); break; + case 104: ag_rp_107(V(1,(int *))); break; + case 105: V(0,(int *)) = ag_rp_108(); break; + case 106: V(0,(int *)) = ag_rp_109(); break; + case 107: ag_rp_110(V(0,(int *))); break; + case 108: ag_rp_111(V(1,(int *))); break; + case 109: ag_rp_112(); break; + case 110: ag_rp_113(); break; + case 111: ag_rp_114(); break; + case 112: ag_rp_115(); break; + case 113: ag_rp_116(); break; + case 114: ag_rp_117(V(2,(int *))); break; + case 115: ag_rp_118(); break; + case 116: ag_rp_119(); break; + case 117: ag_rp_120(); break; + case 118: ag_rp_121(); break; + case 119: ag_rp_122(); break; + case 120: ag_rp_123(); break; + case 121: ag_rp_124(); break; + case 122: ag_rp_125(V(2,(int *))); break; + case 123: ag_rp_126(); break; + case 124: ag_rp_127(V(5,(node *))); break; + case 125: ag_rp_128(V(2,(node *))); break; + case 126: ag_rp_129(V(0,(int *))); break; + case 127: ag_rp_130(V(2,(int *))); break; + case 128: V(0,(int *)) = ag_rp_131(); break; + case 129: V(0,(int *)) = ag_rp_132(); break; + case 130: V(0,(int *)) = ag_rp_133(); break; + case 131: V(0,(int *)) = ag_rp_134(); break; + case 132: V(0,(int *)) = ag_rp_135(); break; + case 133: V(0,(int *)) = ag_rp_136(); break; + case 134: V(0,(int *)) = ag_rp_137(V(0,(node *))); break; + case 135: V(0,(int *)) = ag_rp_138(V(0,(node *))); break; + case 136: V(0,(int *)) = ag_rp_139(V(0,(node *))); break; + case 137: V(0,(int *)) = ag_rp_140(); break; + case 138: V(0,(int *)) = ag_rp_141(); break; + case 139: V(0,(int *)) = ag_rp_142(); break; + case 140: V(0,(int *)) = ag_rp_143(); break; + case 141: ag_rp_144(); break; + case 142: ag_rp_145(); break; + case 143: ag_rp_146(); break; + case 144: ag_rp_147(); break; + case 145: ag_rp_148(); break; + case 146: ag_default(&ag_rtt[0]); ag_rp_149(); break; + } + (PCB).la_ptr = (PCB).pointer; +} + + +static const unsigned char ag_ctn[] = { + 0,0, 97,1, 0,0, 0,0, 99,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, + 0,0, 0,0,202,1, 60,1, 58,1, 56,1, 55,1, 0,0, 49,1, 57,1, 47,1, 0,0, + 0,0, 0,0, 0,0, 0,0, 0,0, 98,1, 0,0, 0,0, 0,0, 0,0, 75,1, 0,0, + 58,2,176,1, 56,2,211,1,210,1,207,1,207,1,207,1, 0,0, 55,2, 0,0, 54,2, + 0,0, 0,0, 57,1, 0,0, 57,2, 50,1, 50,1, 0,0, 0,0, 0,0, 0,0, 0,0, + 75,2, 75,2, 0,0, 84,1, 0,0, 0,0, 58,3,176,2, 0,0, 0,0, 0,0, 0,0, + 0,0,207,2, 0,0, 0,0,131,1,131,1,133,1, 0,0,147,1,133,1,133,1,133,1, + 0,0, 0,0,111,1,110,1,143,1, 0,0, 0,0,143,1, 0,0, 0,0,133,1,133,1, + 69,1, 0,0, 67,1, 0,0, 0,0, 0,0, 0,0, 0,0, 75,3, 75,3, 0,0, 0,0, + 0,0, 0,0, 0,0,180,1,180,1,180,1,180,1,180,1,180,1,180,1,180,1,180,1, + 180,1,180,1,179,1,179,1,179,1,179,1, 0,0, 0,0, 0,0, 0,0, 0,0, 73,1, + 131,2,140,1,142,1, 0,0,140,1,149,1,149,1,149,1, 64,1, 0,0, 68,1, 68,1, + 133,2,133,2, 0,0, 0,0,118,1,111,2,110,2,143,2, 0,0,143,2, 0,0, 0,0, + 133,2,133,2, 0,0, 0,0, 72,1, 69,2, 67,2, 75,4, 0,0, 84,3, 0,0, 0,0, + 182,1, 0,0, 0,0,146,2,180,2,146,2, 0,0,179,2, 0,0,179,2, 0,0, 0,0, + 0,0, 0,0, 0,0, 0,0,131,3,124,1,147,3,133,3,133,3, 0,0,133,3,133,3, + 124,1,120,1,143,3, 0,0, 0,0,143,3, 0,0, 0,0, 0,0, 72,2, 69,3, 67,3, + 180,3,182,2,145,1, 0,0,146,3,179,3,143,4,110,1, 0,0, 0,0,195,1,145,2, + 110,2,180,5,195,2, 0,0 +}; + +#ifndef MISSING_FORMAT +#define MISSING_FORMAT "Missing %s" +#endif +#ifndef UNEXPECTED_FORMAT +#define UNEXPECTED_FORMAT "Unexpected %s" +#endif +#ifndef UNNAMED_TOKEN +#define UNNAMED_TOKEN "input" +#endif + + +static void near ag_diagnose(void) { + int ag_snd = (PCB).sn; + int ag_k = ag_sbt[ag_snd]; + + if (*TOKEN_NAMES[ag_tstt[ag_k]] && ag_astt[ag_k + 1] == ag_action_8) { + sprintf((PCB).ag_msg, MISSING_FORMAT, TOKEN_NAMES[ag_tstt[ag_k]]); + } + else if (ag_astt[ag_sbe[(PCB).sn]] == ag_action_8 + && (ag_k = (int) ag_sbe[(PCB).sn] + 1) == (int) ag_sbt[(PCB).sn+1] - 1 + && *TOKEN_NAMES[ag_tstt[ag_k]]) { + sprintf((PCB).ag_msg, MISSING_FORMAT, TOKEN_NAMES[ag_tstt[ag_k]]); + } + else if ((PCB).token_number && *TOKEN_NAMES[(PCB).token_number]) { + sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, TOKEN_NAMES[(PCB).token_number]); + } + else if (isprint(INPUT_CODE((*(PCB).pointer))) && INPUT_CODE((*(PCB).pointer)) != '\\') { + char buf[20]; + sprintf(buf, "\'%c\'", (char) INPUT_CODE((*(PCB).pointer))); + sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, buf); + } + else sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, UNNAMED_TOKEN); + (PCB).error_message = (PCB).ag_msg; + + +{ + int ag_sx, ag_t; + + ag_sx = (PCB).ssx; + (PCB).ss[ag_sx] = (PCB).sn; + do { + while (ag_sx && ag_ctn[2*(ag_snd = (PCB).ss[ag_sx])] == 0) ag_sx--; + if (ag_sx) { + ag_t = ag_ctn[2*ag_snd]; + ag_sx -= ag_ctn[2*ag_snd +1]; + ag_snd = (PCB).ss[ag_sx]; + } + else { + ag_snd = 0; + ag_t = ag_ptt[0]; + } + } while (ag_sx && *TOKEN_NAMES[ag_t]==0); + if (*TOKEN_NAMES[ag_t] == 0) ag_t = 0; + (PCB).error_frame_ssx = ag_sx; + (PCB).error_frame_token = (pgg_token_type) ag_t; +} + + +} +static int near ag_action_1_r_proc(void); +static int near ag_action_2_r_proc(void); +static int near ag_action_3_r_proc(void); +static int near ag_action_4_r_proc(void); +static int near ag_action_1_s_proc(void); +static int near ag_action_3_s_proc(void); +static int near ag_action_1_proc(void); +static int near ag_action_2_proc(void); +static int near ag_action_3_proc(void); +static int near ag_action_4_proc(void); +static int near ag_action_5_proc(void); +static int near ag_action_6_proc(void); +static int near ag_action_7_proc(void); +static int near ag_action_8_proc(void); +static int near ag_action_9_proc(void); +static int near ag_action_10_proc(void); +static int near ag_action_11_proc(void); +static int near ag_action_8_proc(void); + + +static int (near *const ag_r_procs_scan[])(void) = { + ag_action_1_r_proc, + ag_action_2_r_proc, + ag_action_3_r_proc, + ag_action_4_r_proc +}; + +static int (near *const ag_s_procs_scan[])(void) = { + ag_action_1_s_proc, + ag_action_2_r_proc, + ag_action_3_s_proc, + ag_action_4_r_proc +}; + +static int (near *const ag_gt_procs_scan[])(void) = { + ag_action_1_proc, + ag_action_2_proc, + ag_action_3_proc, + ag_action_4_proc, + ag_action_5_proc, + ag_action_6_proc, + ag_action_7_proc, + ag_action_8_proc, + ag_action_9_proc, + ag_action_10_proc, + ag_action_11_proc, + ag_action_8_proc +}; + + +static int near ag_rns(int ag_t, int *ag_sx, int ag_snd) { + while (1) { + int ag_act, ag_k = ag_sbt[ag_snd], ag_lim = ag_sbt[ag_snd+1]; + int ag_p; + + while (ag_k < ag_lim && ag_tstt[ag_k] != ag_t) ag_k++; + if (ag_k == ag_lim) break; + ag_act = ag_astt[ag_k]; + ag_p = ag_pstt[ag_k]; + if (ag_act == ag_action_2) return ag_p; + if (ag_act == ag_action_10 || ag_act == ag_action_11) { + (*ag_sx)--; + return ag_snd; + } + if (ag_act != ag_action_3 && + ag_act != ag_action_4) break; + *ag_sx -= (ag_fl[ag_p] - 1); + ag_snd = (PCB).ss[*ag_sx]; + ag_t = ag_ptt[ag_p]; + } + return 0; +} + +static int near ag_jns(int ag_t) { + int ag_k; + + ag_k = ag_sbt[(PCB).sn]; + while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; + while (1) { + int ag_p = ag_pstt[ag_k]; + int ag_sd; + + switch (ag_astt[ag_k]) { + case ag_action_2: + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + return ag_p; + case ag_action_10: + case ag_action_11: + return (PCB).ss[(PCB).ssx--]; + case ag_action_9: + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + (PCB).ssx++; + (PCB).sn = ag_p; + ag_k = ag_sbt[(PCB).sn]; + while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; + continue; + case ag_action_3: + case ag_action_4: + ag_sd = ag_fl[ag_p] - 1; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + else GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + ag_t = ag_ptt[ag_p]; + ag_k = ag_sbt[(PCB).sn+1]; + while (ag_tstt[--ag_k] != ag_t); + continue; + case ag_action_5: + case ag_action_6: + if (ag_fl[ag_p]) break; + (PCB).sn = ag_rns(ag_ptt[ag_p],&(PCB).ssx, (PCB).sn); + (PCB).ss[++(PCB).ssx] = (PCB).sn; + ag_k = ag_sbt[(PCB).sn]; + while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; + continue; + } + break; + } + return 0; +} + + +static int near ag_atx(int ag_t, int *ag_sx, int ag_snd) { + int ag_k, ag_f; + int ag_save_btsx = (PCB).btsx; + int ag_flag = 1; + + while (1) { + int ag_a; + + (PCB).bts[53 - ++(PCB).btsx] = *ag_sx; + (PCB).ss[53 - (PCB).btsx] = (PCB).ss[*ag_sx]; + (PCB).ss[*ag_sx] = ag_snd; + ag_k = ag_sbt[ag_snd]; + while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; + ag_a = ag_astt[ag_k]; + if (ag_a == ag_action_2 || + ag_a == ag_action_3 || + ag_a == ag_action_10 || + ag_a == ag_action_11 || + ag_a == ag_action_1 || + ag_a == ag_action_4) break; + if ((ag_a == ag_action_5 || + ag_a == ag_action_6) && + (ag_k = ag_fl[ag_f = ag_pstt[ag_k]]) == 0) { + ag_snd = ag_rns(ag_ptt[ag_f],ag_sx, (PCB).ss[*ag_sx]); + (*ag_sx)++; + continue; + } + if (ag_a == ag_action_9) { + ag_snd = ag_pstt[ag_k]; + (*ag_sx)++; + continue; + } + ag_flag = 0; + break; + } + while ((PCB).btsx > ag_save_btsx) { + *ag_sx = (PCB).bts[53 - (PCB).btsx]; + (PCB).ss[*ag_sx] = (PCB).ss[53 - (PCB).btsx--]; + } + return ag_flag; +} + + +static int near ag_tst_tkn(void) { + int ag_rk, ag_sx, ag_snd = (PCB).sn; + + (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); + (PCB).la_ptr++; + if (ag_key_index[(PCB).sn]) { + unsigned ag_k = ag_key_index[(PCB).sn]; + int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); + if (ag_ch <= 255) { + while (ag_key_ch[ag_k] < ag_ch) ag_k++; + if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); + } + } + for (ag_rk = 0; ag_rk < (PCB).ag_lrss; ag_rk += 2) { + ag_sx = (PCB).ag_rss[ag_rk]; + if (ag_sx > (PCB).ssx || ag_sx > (PCB).ag_min_depth) continue; + (PCB).sn = (PCB).ag_rss[ag_rk + 1]; + if (ag_atx((PCB).token_number, &ag_sx, (PCB).sn)) break; + } + (PCB).sn = ag_snd; + return ag_rk; +} + +static void near ag_set_error_procs(void); + +static void near ag_auto_resynch(void) { + int ag_sx, ag_rk; + int ag_rk1, ag_rk2, ag_tk1; + (PCB).ss[(PCB).ssx] = (PCB).sn; + if ((PCB).ag_error_depth && (PCB).ag_min_depth >= (PCB).ag_error_depth) { + (PCB).ssx = (PCB).ag_error_depth; + (PCB).sn = (PCB).ss[(PCB).ssx]; + } + else { + ag_diagnose(); + SYNTAX_ERROR; + if ((PCB).exit_flag != AG_RUNNING_CODE) return; + (PCB).ag_error_depth = (PCB).ag_min_depth = 0; + (PCB).ag_lrss = 0; + (PCB).ss[ag_sx = (PCB).ssx] = (PCB).sn; + (PCB).ag_min_depth = (PCB).ag_rss[(PCB).ag_lrss++] = ag_sx; + (PCB).ag_rss[(PCB).ag_lrss++] = (PCB).sn; + while (ag_sx && (PCB).ag_lrss < 2*53) { + int ag_t = 0, ag_x, ag_s, ag_sxs = ag_sx; + + while (ag_sx && (ag_t = ag_ctn[2*(PCB).sn]) == 0) (PCB).sn = (PCB).ss[--ag_sx]; + if (ag_t) (PCB).sn = (PCB).ss[ag_sx -= ag_ctn[2*(PCB).sn +1]]; + else { + if (ag_sx == 0) (PCB).sn = 0; + ag_t = ag_ptt[0]; + } + if ((ag_s = ag_rns(ag_t, &ag_sx, (PCB).sn)) == 0) break; + for (ag_x = 0; ag_x < (PCB).ag_lrss; ag_x += 2) + if ((PCB).ag_rss[ag_x] == ag_sx + 1 && (PCB).ag_rss[ag_x+1] == ag_s) break; + if (ag_x == (PCB).ag_lrss) { + (PCB).ag_rss[(PCB).ag_lrss++] = ++ag_sx; + (PCB).ag_rss[(PCB).ag_lrss++] = (PCB).sn = ag_s; + } + else if (ag_sx >= ag_sxs) ag_sx--; + } + ag_set_error_procs(); + } + (PCB).la_ptr = (PCB).pointer; + if ((PCB).ssx > (PCB).ag_min_depth) (PCB).ag_min_depth = (PCB).ssx; + while (1) { + ag_rk1 = ag_tst_tkn(); + if ((PCB).token_number == 46) + {(PCB).exit_flag = AG_SYNTAX_ERROR_CODE; return;} + if (ag_rk1 < (PCB).ag_lrss) break; + {(PCB).la_ptr = (PCB).pointer + 1; ag_track();} + } + ag_tk1 = (PCB).token_number; + ag_track(); + ag_rk2 = ag_tst_tkn(); + if (ag_rk2 < ag_rk1) {ag_rk = ag_rk2; ag_track();} + else {ag_rk = ag_rk1; (PCB).token_number = (pgg_token_type) ag_tk1; (PCB).la_ptr = (PCB).pointer;} + (PCB).ag_min_depth = (PCB).ssx = (PCB).ag_rss[ag_rk++]; + (PCB).sn = (PCB).ss[(PCB).ssx] = (PCB).ag_rss[ag_rk]; + (PCB).sn = ag_jns((PCB).token_number); + if ((PCB).ag_error_depth == 0 || (PCB).ag_error_depth > (PCB).ssx) + (PCB).ag_error_depth = (PCB).ssx; + if (++(PCB).ssx >= 53) { + (PCB).exit_flag = AG_STACK_ERROR_CODE; + PARSER_STACK_OVERFLOW; + return; + } + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + (PCB).ag_tmp_depth = (PCB).ag_min_depth; + (PCB).la_ptr = (PCB).pointer; + return; +} + + +static int near ag_action_10_proc(void) { + int ag_t = (PCB).token_number; + (PCB).btsx = 0, (PCB).drt = -1; + do { + ag_track(); + (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); + (PCB).la_ptr++; + if (ag_key_index[(PCB).sn]) { + unsigned ag_k = ag_key_index[(PCB).sn]; + int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); + if (ag_ch <= 255) { + while (ag_key_ch[ag_k] < ag_ch) ag_k++; + if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); + } + } + } while ((PCB).token_number == (pgg_token_type) ag_t); + (PCB).la_ptr = (PCB).pointer; + return 1; +} + +static int near ag_action_11_proc(void) { + int ag_t = (PCB).token_number; + + (PCB).btsx = 0, (PCB).drt = -1; + do { + (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; + (PCB).ssx--; + ag_track(); + ag_ra(); + if ((PCB).exit_flag != AG_RUNNING_CODE) return 0; + (PCB).ssx++; + (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); + (PCB).la_ptr++; + if (ag_key_index[(PCB).sn]) { + unsigned ag_k = ag_key_index[(PCB).sn]; + int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); + if (ag_ch <= 255) { + while (ag_key_ch[ag_k] < ag_ch) ag_k++; + if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); + } + } + } + while ((PCB).token_number == (pgg_token_type) ag_t); + (PCB).la_ptr = (PCB).pointer; + return 1; +} + +static int near ag_action_3_r_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap] - 1; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + (PCB).btsx = 0, (PCB).drt = -1; + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + ag_ra(); + return (PCB).exit_flag == AG_RUNNING_CODE; +} + +static int near ag_action_3_s_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap] - 1; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + (PCB).btsx = 0, (PCB).drt = -1; + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + ag_ra(); + return (PCB).exit_flag == AG_RUNNING_CODE; +} + +static int near ag_action_4_r_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap] - 1; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + return 1; +} + +static int near ag_action_2_proc(void) { + (PCB).btsx = 0, (PCB).drt = -1; + if ((PCB).ssx >= 53) { + (PCB).exit_flag = AG_STACK_ERROR_CODE; + PARSER_STACK_OVERFLOW; + } + (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + (PCB).ssx++; + (PCB).sn = (PCB).ag_ap; + ag_track(); + return 0; +} + +static int near ag_action_9_proc(void) { + if ((PCB).drt == -1) { + (PCB).drt=(PCB).token_number; + (PCB).dssx=(PCB).ssx; + (PCB).dsn=(PCB).sn; + } + ag_prot(); + (PCB).vs[(PCB).ssx] = ag_null_value; + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + (PCB).ssx++; + (PCB).sn = (PCB).ag_ap; + (PCB).la_ptr = (PCB).pointer; + return (PCB).exit_flag == AG_RUNNING_CODE; +} + +static int near ag_action_2_r_proc(void) { + (PCB).ssx++; + (PCB).sn = (PCB).ag_ap; + return 0; +} + +static int near ag_action_7_proc(void) { + --(PCB).ssx; + (PCB).la_ptr = (PCB).pointer; + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int near ag_action_1_proc(void) { + ag_track(); + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int near ag_action_1_r_proc(void) { + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int near ag_action_1_s_proc(void) { + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int near ag_action_4_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap] - 1; + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + (PCB).btsx = 0, (PCB).drt = -1; + (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + else GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + ag_track(); + while ((PCB).exit_flag == AG_RUNNING_CODE) { + unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; + unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; + do { + unsigned ag_tx = (ag_t1 + ag_t2)/2; + if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; + else ag_t2 = ag_tx; + } while (ag_t1 < ag_t2); + if (ag_tstt[ag_t1] != (PCB).reduction_token) { + (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; + REDUCTION_TOKEN_ERROR; break;} + (PCB).ag_ap = ag_pstt[ag_t1]; + if ((*(PCB).s_procs[ag_astt[ag_t1]])() == 0) break; + } + return 0; +} + +static int near ag_action_3_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap] - 1; + (PCB).btsx = 0, (PCB).drt = -1; + (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + else GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + ag_track(); + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + ag_ra(); + while ((PCB).exit_flag == AG_RUNNING_CODE) { + unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; + unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; + do { + unsigned ag_tx = (ag_t1 + ag_t2)/2; + if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; + else ag_t2 = ag_tx; + } while (ag_t1 < ag_t2); + if (ag_tstt[ag_t1] != (PCB).reduction_token) { + (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; + REDUCTION_TOKEN_ERROR; break;} + (PCB).ag_ap = ag_pstt[ag_t1]; + if ((*(PCB).s_procs[ag_astt[ag_t1]])() == 0) break; + } + return 0; +} + +static int near ag_action_8_proc(void) { + ag_undo(); + (PCB).la_ptr = (PCB).pointer; + ag_auto_resynch(); + return (PCB).exit_flag == AG_RUNNING_CODE; +} + +static int near ag_action_5_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap]; + (PCB).btsx = 0, (PCB).drt = -1; + if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + else { + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + } + (PCB).la_ptr = (PCB).pointer; + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + ag_ra(); + while ((PCB).exit_flag == AG_RUNNING_CODE) { + unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; + unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; + do { + unsigned ag_tx = (ag_t1 + ag_t2)/2; + if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; + else ag_t2 = ag_tx; + } while (ag_t1 < ag_t2); + if (ag_tstt[ag_t1] != (PCB).reduction_token) { + (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; + REDUCTION_TOKEN_ERROR; break;} + (PCB).ag_ap = ag_pstt[ag_t1]; + if ((*(PCB).r_procs[ag_astt[ag_t1]])() == 0) break; + } + return (PCB).exit_flag == AG_RUNNING_CODE; +} + +static int near ag_action_6_proc(void) { + int ag_sd = ag_fl[(PCB).ag_ap]; + (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; + if ((PCB).drt == -1) { + (PCB).drt=(PCB).token_number; + (PCB).dssx=(PCB).ssx; + (PCB).dsn=(PCB).sn; + } + if (ag_sd) { + (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; + } + else { + ag_prot(); + (PCB).vs[(PCB).ssx] = ag_null_value; + GET_CONTEXT; + (PCB).ss[(PCB).ssx] = (PCB).sn; + } + (PCB).la_ptr = (PCB).pointer; + while ((PCB).exit_flag == AG_RUNNING_CODE) { + unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; + unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; + do { + unsigned ag_tx = (ag_t1 + ag_t2)/2; + if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; + else ag_t2 = ag_tx; + } while (ag_t1 < ag_t2); + if (ag_tstt[ag_t1] != (PCB).reduction_token) { + (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; + REDUCTION_TOKEN_ERROR; break;} + (PCB).ag_ap = ag_pstt[ag_t1]; + if ((*(PCB).r_procs[ag_astt[ag_t1]])() == 0) break; + } + return (PCB).exit_flag == AG_RUNNING_CODE; +} + + +static void near ag_check_depth(int ag_fl) { + int ag_sx = (PCB).ssx - ag_fl; + if ((PCB).ag_error_depth && ag_sx < (PCB).ag_tmp_depth) (PCB).ag_tmp_depth = ag_sx; +} + +static int near ag_action_3_er_proc(void) { + ag_check_depth(ag_fl[(PCB).ag_ap] - 1); + return ag_action_4_r_proc(); +} + +static int near ag_action_2_e_proc(void) { + ag_action_2_proc(); + (PCB).ag_min_depth = (PCB).ag_tmp_depth; + return 0; +} + +static int near ag_action_4_e_proc(void) { + ag_check_depth(ag_fl[(PCB).ag_ap] - 1); + (PCB).ag_min_depth = (PCB).ag_tmp_depth; + return ag_action_4_proc(); +} + +static int near ag_action_6_e_proc(void) { + ag_check_depth(ag_fl[(PCB).ag_ap]); + return ag_action_6_proc(); +} + +static int near ag_action_11_e_proc(void) { + return ag_action_10_proc(); +} + +static int (near *ag_r_procs_error[])(void) = { + ag_action_1_r_proc, + ag_action_2_r_proc, + ag_action_3_er_proc, + ag_action_3_er_proc +}; + +static int (near *ag_s_procs_error[])(void) = { + ag_action_1_s_proc, + ag_action_2_r_proc, + ag_action_3_er_proc, + ag_action_3_er_proc +}; + +static int (near *ag_gt_procs_error[])(void) = { + ag_action_1_proc, + ag_action_2_e_proc, + ag_action_4_e_proc, + ag_action_4_e_proc, + ag_action_6_e_proc, + ag_action_6_e_proc, + ag_action_7_proc, + ag_action_8_proc, + ag_action_9_proc, + ag_action_10_proc, + ag_action_11_e_proc, + ag_action_8_proc +}; + +static void near ag_set_error_procs(void) { + (PCB).gt_procs = ag_gt_procs_error; + (PCB).r_procs = ag_r_procs_error; + (PCB).s_procs = ag_s_procs_error; +} + + +void init_pgg(void) { + (PCB).la_ptr = (PCB).pointer; + (PCB).gt_procs = ag_gt_procs_scan; + (PCB).r_procs = ag_r_procs_scan; + (PCB).s_procs = ag_s_procs_scan; + (PCB).ag_error_depth = (PCB).ag_min_depth = (PCB).ag_tmp_depth = 0; + (PCB).ag_resynch_active = 0; + (PCB).ss[0] = (PCB).sn = (PCB).ssx = 0; + (PCB).exit_flag = AG_RUNNING_CODE; + (PCB).line = FIRST_LINE; + (PCB).column = FIRST_COLUMN; + (PCB).btsx = 0, (PCB).drt = -1; +} + +void pgg(void) { + init_pgg(); + (PCB).exit_flag = AG_RUNNING_CODE; + while ((PCB).exit_flag == AG_RUNNING_CODE) { + unsigned ag_t1 = ag_sbt[(PCB).sn]; + if (ag_tstt[ag_t1]) { + unsigned ag_t2 = ag_sbe[(PCB).sn] - 1; + (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); + (PCB).la_ptr++; + if (ag_key_index[(PCB).sn]) { + unsigned ag_k = ag_key_index[(PCB).sn]; + int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); + if (ag_ch <= 255) { + while (ag_key_ch[ag_k] < ag_ch) ag_k++; + if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); + } + } + do { + unsigned ag_tx = (ag_t1 + ag_t2)/2; + if (ag_tstt[ag_tx] > (unsigned char)(PCB).token_number) + ag_t1 = ag_tx + 1; + else ag_t2 = ag_tx; + } while (ag_t1 < ag_t2); + if (ag_tstt[ag_t1] != (unsigned char)(PCB).token_number) + ag_t1 = ag_sbe[(PCB).sn]; + } + (PCB).ag_ap = ag_pstt[ag_t1]; + (*(PCB).gt_procs[ag_astt[ag_t1]])(); + } +} + +