Mercurial > ~dholland > hg > ag > index.cgi
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/agcl/oldagsrc/good/pgg24a.cpp Sat Dec 22 17:52:45 2007 -0500 @@ -0,0 +1,3493 @@ +/* + 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 PGG + #include MYALLOC + #include UT + +/* + * 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 PGG24A_H +#include "pgg24a.h" +#endif + +#ifndef PGG24A_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[243] = { + "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\"", + "blank char", + "c comment", + "continuation", + "comment", + "", + "carriage return", + "", + "newline", + "", + "vertical space", + "\"//\"", + "", + "", + "", + "character", + "signed number", + "'^'", + "", + "quoted character", + "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", + "keyword kluge", + "\"distinguish\"", + "\"left\"", + "token list", + "\"right\"", + "\"nonassoc\"", + "\"sticky\"", + "\"subgrammar\"", + "\"hidden\"", + "", + "", + "\"disregard\"", + "\"lexeme\"", + "\"reserve\"", + "\"keywords\"", + "\"rename\"", + "\"macro\"", + "macro name", + "", + "tokens", + "'\\?'", + "\"}...\"", + "\"]...\"", + "\"?...\"", + "\"}/...\"", + "\"]/...\"", + "embedded c head", + "", + "", + "", + "", + "c code first", + "", + "", + "c character constant", + "c string constant", + "", + "simple c char", + "", + "", + "", + "", + "\"\\\\\\n\"", + "", + "\"*/\"", + "\"/*\"", + "", + "c literal elem", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + +}; + + +/* Line -, pgg24a.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 -, pgg24a.syn */ +pgg_pcb_type pgcb; +#define PCB pgcb + +#define PARSER_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 tsd *rename_macro_list; + +extern int parse_abort_flag; +void log_error_location(int, int); +void log_error(void); +void show_error(void); + +void parse_stack_overflow(void) { + int eline = PCB.line, ecol = PCB.column; + reset_stk(); + log_error_location(ecol,eline); + ass("Nesting too deep"); + log_error(); + sss("Syntax Analysis aborted"); + show_error(); + parse_abort_flag = 1; + PCB.exit_flag = AG_SEMANTIC_ERROR_CODE; +} + +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); + CharSetExpression *ss2(void); + //node ss3(void); + + void acs(int); + void aws(int); + void atkn(unsigned); + void copyoff(void); + void copyon(void); + //void definition_1(node); + void definition_1(CharSetExpression *); + void definition_2(int); + void definition_3(int); + //int form_element_1(node); + int form_element_1(CharSetExpression *); + int form_spec_2(int, int); + int form1(void); + int form2(void); + void gp2(void); + void gp3(void); + void gp4(int); + void 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); + int identify_node(CharSetExpression *); + //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); + void 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; + +static 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); + apprintf("%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(); + apprintf("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(); + apprintf("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 set_reserved_words(void) { + int n = tis(); + while (n--) { + token_number_map *tp = &map_token_number[list_base[n]]; + tp->reserved_word = 1; + } + rws(); +} + +void parse(void) { + pgcb.pointer = input_base; + pgg(); +} + +#ifndef CONVERT_CASE +#define CONVERT_CASE(c) (c) +#endif +#ifndef TAB_SPACING +#define TAB_SPACING 8 +#endif + +static void ag_rp_1(void) { +/* Line -, pgg24a.syn */ + n_statements++; +} + +static void ag_rp_2(void) { +/* Line -, pgg24a.syn */ + n_statements++; +} + +static void ag_rp_3(int t) { +/* Line -, pgg24a.syn */ + production(t); +} + +static void ag_rp_4(void) { +/* Line -, pgg24a.syn */ + n_statements++; +} + +static void ag_rp_5(int t) { +/* Line -, pgg24a.syn */ + production(t); +} + +static void ag_rp_6(void) { +/* Line -, pgg24a.syn */ + n_statements++; +} + +static int ag_rp_7(int type) { +/* Line -, pgg24a.syn */ + return iws(),type; +} + +static int ag_rp_8(int type) { +/* Line -, pgg24a.syn */ + return concat_list(),type; +} + +static int ag_rp_9(void) { +/* Line -, pgg24a.syn */ + return n_statements++, 0; +} + +static int ag_rp_10(int d) { +/* Line -, pgg24a.syn */ + return n_statements++, head_list_3(d); +} + +static void ag_rp_11(int x) { +/* Line -, pgg24a.syn */ + sws(head_list_2(x)); +} + +static void ag_rp_12(int x) { +/* Line -, pgg24a.syn */ + aws(head_list_2(x)); +} + +static int ag_rp_13(void) { +/* Line -, pgg24a.syn */ + return 0; +} + +static int ag_rp_14(void) { +/* Line -, pgg24a.syn */ + return 1; +} + +static int ag_rp_15(void) { +/* Line -, pgg24a.syn */ + return ids(cast_dict),fis(); +} + +static void ag_rp_16(int n) { +/* Line -, pgg24a.syn */ + sws(n); +} + +static void ag_rp_17(int n) { +/* Line -, pgg24a.syn */ + aws(n); +} + +static void ag_rp_18(int pn) { +/* Line -, pgg24a.syn */ + sws((iws(),vp_form3(pn))); +} + +static int ag_rp_19(int s) { +/* Line -, pgg24a.syn */ + return vp_form3(s); +} + +static void ag_rp_20(int n) { +/* Line -, pgg24a.syn */ + sws(form_spec_2(form1(),n)); +} + +static void ag_rp_21(int n) { +/* Line -, pgg24a.syn */ + sws(n); +} + +static void ag_rp_22(int n) { +/* Line -, pgg24a.syn */ + aws(n); +} + +static int ag_rp_23(int s) { +/* Line -, pgg24a.syn */ + return form_spec_2(form2(),s); +} + +static void ag_rp_24(int e, int p) { +/* Line -, pgg24a.syn */ + iws(),pf2x(e,p); +} + +static void ag_rp_25(int e, int p) { +/* Line -, pgg24a.syn */ + pf2x(e,p); +} + +static int ag_rp_26(void) { +/* Line -, pgg24a.syn */ + return 0; +} + +static int ag_rp_27(void) { +/* Line -, pgg24a.syn */ + return proc_spec_4(0); +} + +static int ag_rp_28(void) { +/* Line -, pgg24a.syn */ + return proc_spec_4(1); +} + +static void ag_rp_29(void) { +/* Line -, pgg24a.syn */ + concat_string(); +} + +static void ag_rp_30(void) { +/* Line -, pgg24a.syn */ + sss("::"); +} + +static void ag_rp_31(void) { +/* Line -, pgg24a.syn */ + concat_string(); +} + +static void ag_rp_32(void) { +/* Line -, pgg24a.syn */ + ass("::"); +} + +static void ag_rp_33(void) { +/* Line -, pgg24a.syn */ + concat_string(); +} + +static void ag_rp_34(void) { +/* Line -, pgg24a.syn */ + concat_string(); +} + +static void ag_rp_35(void) { +/* Line -, pgg24a.syn */ + acs('>'), concat_string(); +} + +static void ag_rp_36(void) { +/* Line -, pgg24a.syn */ + acs('<'); +} + +static void ag_rp_37(void) { +/* Line -, pgg24a.syn */ + acs(','), concat_string(); +} + +static void ag_rp_38(void) { +/* Line -, pgg24a.syn */ + scs('('); +} + +static void ag_rp_39(void) { +/* Line -, pgg24a.syn */ + concat_string(), acs(')'); +} + +static void ag_rp_40(void) { +/* Line -, pgg24a.syn */ + sss(" *"); +} + +static void ag_rp_41(void) { +/* Line -, pgg24a.syn */ + concat_string(); +} + +static void ag_rp_42(void) { +/* Line -, pgg24a.syn */ + concat_string(); +} + +static void ag_rp_43(int c) { +/* Line -, pgg24a.syn */ + scs(c); +} + +static void ag_rp_44(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_45(int c) { +/* Line -, pgg24a.syn */ + acs(' '), acs(c); +} + +static void ag_rp_46(int c) { +/* Line -, pgg24a.syn */ + sss("enum "), acs(c); +} + +static void ag_rp_47(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_48(int c) { +/* Line -, pgg24a.syn */ + acs(' '), acs(c); +} + +static int ag_rp_49(int x) { +/* Line -, pgg24a.syn */ + return x & 0x1f; +} + +static int ag_rp_50(int c) { +/* Line -, pgg24a.syn */ + return (character_seen=1),c; +} + +static int ag_rp_51(int s, int n) { +/* Line -, pgg24a.syn */ + return s*n; +} + +static int ag_rp_52(void) { +/* Line -, pgg24a.syn */ + return 1; +} + +static int ag_rp_53(void) { +/* Line -, pgg24a.syn */ + return -1; +} + +static int ag_rp_54(int n) { +/* Line -, pgg24a.syn */ + return n; +} + +static int ag_rp_55(int n) { +/* Line -, pgg24a.syn */ + return n; +} + +static int ag_rp_56(int d) { +/* Line -, pgg24a.syn */ + return d - '0'; +} + +static int ag_rp_57(int n, int d) { +/* Line -, pgg24a.syn */ + return 10*n + d - '0'; +} + +static int ag_rp_58(void) { +/* Line -, pgg24a.syn */ + return 0; +} + +static int ag_rp_59(int n, int d) { +/* Line -, pgg24a.syn */ + return 8*n + d - '0'; +} + +static int ag_rp_60(int d) { +/* Line -, pgg24a.syn */ + return d; +} + +static int ag_rp_61(int n, int d) { +/* Line -, pgg24a.syn */ + return 16*n + d; +} + +static int ag_rp_62(int d) { +/* Line -, pgg24a.syn */ + return d-'0'; +} + +static int ag_rp_63(int d) { +/* Line -, pgg24a.syn */ + return (d&7)+9; +} + +static int ag_rp_64(int p) { +/* Line -, pgg24a.syn */ + return vp_8a(p); +} + +static int ag_rp_65(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + return form_element_1(n); +} + +static CharSetExpression * ag_rp_66(CharSetExpression * u, CharSetExpression * i) { +/* Line -, pgg24a.syn */ + return new CharSetUnion(u,i); +} + +static CharSetExpression * ag_rp_67(CharSetExpression * u, CharSetExpression * i) { +/* Line -, pgg24a.syn */ + return new CharSetDifference(u,i); +} + +static CharSetExpression * ag_rp_68(CharSetExpression * i, CharSetExpression * n) { +/* Line -, pgg24a.syn */ + return new CharSetIntersection(i,n); +} + +static CharSetExpression * ag_rp_69(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + return new CharSetComplement(n); +} + +static int ag_rp_70(int c) { +/* Line -, pgg24a.syn */ + return case_sensitive ? (c) : toupper(c); +} + +static CharSetExpression * ag_rp_71(int c) { +/* Line -, pgg24a.syn */ + return new IndividualCode(c); +} + +static CharSetExpression * ag_rp_72(int c) { +/* Line -, pgg24a.syn */ + return new IndividualChar(c); +} + +static CharSetExpression * ag_rp_73(void) { +/* Line -, pgg24a.syn */ + return ss2(); +} + +static CharSetExpression * ag_rp_74(CharSetExpression * x) { +/* Line -, pgg24a.syn */ + return x; +} + +static CharSetExpression * ag_rp_75(int l, int r) { +/* Line -, pgg24a.syn */ + return (character_seen=1),new CharRange(l,r); +} + +static CharSetExpression * ag_rp_76(int l, int r) { +/* Line -, pgg24a.syn */ + return new CodeRange(l,r); +} + +static void ag_rp_77(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + definition_1(n); +} + +static void ag_rp_78(int p) { +/* Line -, pgg24a.syn */ + definition_2(p); +} + +static void ag_rp_79(int p) { +/* Line -, pgg24a.syn */ + definition_2(vp_8a(p)); +} + +static void ag_rp_80(void) { +/* Line -, pgg24a.syn */ + definition_3(enum_base++); +} + +static void ag_rp_81(int n) { +/* Line -, pgg24a.syn */ + definition_3(enum_base = n), enum_base++; +} + +static void ag_rp_82(int n) { +/* Line -, pgg24a.syn */ + definition_3(enum_base = n), enum_base++; +} + +static void ag_rp_83(void) { +/* Line -, pgg24a.syn */ + ics(); +} + +static int ag_rp_84(int n) { +/* Line -, pgg24a.syn */ + return null_warning(n); +} + +static int ag_rp_85(void) { +/* Line -, pgg24a.syn */ + return '\a'; +} + +static int ag_rp_86(void) { +/* Line -, pgg24a.syn */ + return '\b'; +} + +static int ag_rp_87(void) { +/* Line -, pgg24a.syn */ + return '\f'; +} + +static int ag_rp_88(void) { +/* Line -, pgg24a.syn */ + return '\n'; +} + +static int ag_rp_89(void) { +/* Line -, pgg24a.syn */ + return '\r'; +} + +static int ag_rp_90(void) { +/* Line -, pgg24a.syn */ + return '\t'; +} + +static int ag_rp_91(void) { +/* Line -, pgg24a.syn */ + return '\v'; +} + +static int ag_rp_92(void) { +/* Line -, pgg24a.syn */ + return '\\'; +} + +static int ag_rp_93(void) { +/* Line -, pgg24a.syn */ + return '\?'; +} + +static int ag_rp_94(void) { +/* Line -, pgg24a.syn */ + return '\''; +} + +static int ag_rp_95(void) { +/* Line -, pgg24a.syn */ + return '"'; +} + +static int ag_rp_96(int n) { +/* Line -, pgg24a.syn */ + return n&7; +} + +static int ag_rp_97(int n, int d) { +/* Line -, pgg24a.syn */ + return n*8 + (d&7); +} + +static int ag_rp_98(int n, int d) { +/* Line -, pgg24a.syn */ + return n*8 + (d&7); +} + +static int ag_rp_99(int x) { +/* Line -, pgg24a.syn */ + return x; +} + +static void ag_rp_100(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_101(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_102(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_103(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_104(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_105(int c) { +/* Line -, pgg24a.syn */ + acs(null_warning(c)); +} + +static void ag_rp_106(int c) { +/* Line -, pgg24a.syn */ + acs(null_warning(c)); +} + +static void ag_rp_107(int c) { +/* Line -, pgg24a.syn */ + acs(null_warning(c)); +} + +static void ag_rp_108(int c) { +/* Line -, pgg24a.syn */ + acs(null_warning(c)); +} + +static int ag_rp_109(void) { +/* Line -, pgg24a.syn */ + return 0; +} + +static int ag_rp_110(void) { +/* Line -, pgg24a.syn */ + return ids(cvar_dict),fis(); +} + +static void ag_rp_111(int c) { +/* Line -, pgg24a.syn */ + scs(c); +} + +static void ag_rp_112(int c) { +/* Line -, pgg24a.syn */ + acs(c); +} + +static void ag_rp_113(void) { +/* Line -, pgg24a.syn */ + gp4(1); +} + +static void ag_rp_114(void) { +/* Line -, pgg24a.syn */ + gp4(0); +} + +static void ag_rp_115(void) { +/* Line -, pgg24a.syn */ + gp2(); +} + +static void ag_rp_116(void) { +/* Line -, pgg24a.syn */ + gp3(); +} + +static void ag_rp_117(void) { +/* Line -, pgg24a.syn */ + gp3(); +} + +static void ag_rp_118(int n) { +/* Line -, pgg24a.syn */ + gp5(n); +} + +static void ag_rp_119(void) { +/* Line -, pgg24a.syn */ + concat_string(), gp4(1); +} + +static void ag_rp_120(void) { +/* Line -, pgg24a.syn */ + sss("distinguish_"); +} + +static void ag_rp_121(void) { +/* Line -, pgg24a.syn */ + set_prec(1,0); +} + +static void ag_rp_122(void) { +/* Line -, pgg24a.syn */ + set_prec(0,1); +} + +static void ag_rp_123(void) { +/* Line -, pgg24a.syn */ + set_prec(0,0); +} + +static void ag_rp_124(void) { +/* Line -, pgg24a.syn */ + set_sticky(); +} + +static void ag_rp_125(void) { +/* Line -, pgg24a.syn */ + set_subgrammar(); +} + +static void ag_rp_126(void) { +/* Line -, pgg24a.syn */ + set_hidden(); +} + +static void ag_rp_127(int t) { +/* Line -, pgg24a.syn */ + disregard(t); +} + +static void ag_rp_128(void) { +/* Line -, pgg24a.syn */ + set_lexeme(); +} + +static void ag_rp_129(void) { +/* Line -, pgg24a.syn */ + set_reserved_words(); +} + +static void ag_rp_130(int oldName, int newName) { +/* Line -, pgg24a.syn */ + at(rename_macro_list,oldName,newName); +} + +static int ag_rp_131(void) { +/* Line -, pgg24a.syn */ + return (PCB).pointer-input_base-1; +} + +static void ag_rp_132(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + distinguishSets.push(identify_node(n)); +} + +static void ag_rp_133(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + distinguishSets.push(identify_node(n)); +} + +static void ag_rp_134(int t) { +/* Line -, pgg24a.syn */ + sws(t); +} + +static void ag_rp_135(int t) { +/* Line -, pgg24a.syn */ + aws(t); +} + +static int ag_rp_136(void) { +/* Line -, pgg24a.syn */ + return vp_s(); +} + +static int ag_rp_137(void) { +/* Line -, pgg24a.syn */ + return vp_5(vp_s()); +} + +static int ag_rp_138(void) { +/* Line -, pgg24a.syn */ + return vp_1(); +} + +static int ag_rp_139(void) { +/* Line -, pgg24a.syn */ + return vp_2(); +} + +static int ag_rp_140(void) { +/* Line -, pgg24a.syn */ + return vp_3(); +} + +static int ag_rp_141(void) { +/* Line -, pgg24a.syn */ + return vp_4(); +} + +static int ag_rp_142(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + return vp_5(form_element_1(n)); +} + +static int ag_rp_143(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + return vp_6(form_element_1(n)); +} + +static int ag_rp_144(CharSetExpression * n) { +/* Line -, pgg24a.syn */ + return vp_7(form_element_1(n)); +} + +static int ag_rp_145(void) { +/* Line -, pgg24a.syn */ + return vp_9(); +} + +static int ag_rp_146(void) { +/* Line -, pgg24a.syn */ + return vp_10(); +} + +static int ag_rp_147(void) { +/* Line -, pgg24a.syn */ + return mid_line(proc_spec_4(0)); +} + +static int ag_rp_148(void) { +/* Line -, pgg24a.syn */ + return mid_line(proc_spec_4(1)); +} + +static void ag_rp_149(void) { +/* Line -, pgg24a.syn */ + copyon(); +} + +static void ag_rp_150(void) { +/* Line -, pgg24a.syn */ + copyoff(); +} + +static void ag_rp_151(void) { +/* Line -, pgg24a.syn */ + copyoff(); +} + +static void ag_rp_152(void) { +/* Line -, pgg24a.syn */ + copyon(); +} + +static void ag_rp_153(void) { +/* Line -, pgg24a.syn */ + copyoff(); +} + +static void ag_rp_154(void) { +/* Line -, pgg24a.syn */ +if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token; +} + + +#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, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, + 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 14, 15, 16, + 0, 17, 18, 0, 0, 0, 19, 20, 21, 0, 22, 23, 24, 25, 0, 26, 27, 28, + 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 0, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 0, 42, 43, 44, 45, 46, 47, 48, 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, + 49, 50, 51, 0, 0, 52, 53, 0, 54, 0, 0, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 0, 64, 65, 0, 0, 66, 67, 0, 68, 0, 69, 70, 0, 0, 0, 0, + 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 0, 0, 0, 0, 0, + 0, 83, 0, 0, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 0, 0, 99,100,101,102,103,104,105,106,107,108,109,110,111,112, 0, + 0, 0, 0, 0, 0, 0,113,114,115,116,117,118, 0,119,120,121,122,123, + 124,125,126, 0, 0,127,128,129,130,131, 0, 0, 0, 0, 0,132,133, 0, + 134,135,136,137,138,139,140,141,142,143,144,145,146,147,148, 0, 0, 0, + 0, 0, 0,149,150,151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,152,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154 +}; + +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,146,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,110,115, + 255,101,105,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,110,115,255,101,105,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,110,115,255,101, + 105,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,110,115,255,101,105,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, 47,109,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,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, + 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, + 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,2,3,4,3,3,4,3,2,3,3,2,3,2,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,4,3,3, + 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, + 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,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,228,107, 0, 0, 0,227,228, 0, 0, 0, 2, 0,228,107, 0,124,123, + 0,205,208, 0,194,184, 0, 0, 0, 0, 0,185,195, 0, 0, 0,198,196, + 0, 0,187, 0,189,190, 0,204,207, 0, 2, 0, 0, 0, 80,206, 0, 0, + 96,191, 0,188, 0, 0, 0, 0,107, 0,228,107, 0,194,184, 0, 0, 0, + 0, 0,185,195, 0, 0, 0,198,196, 0, 0,187, 0,189,190, 0, 0, 0, + 96,191, 0,188, 0, 0, 0,228,107, 0,124,123, 0, 0, 0, 80, 0,228, + 107, 0,205,208, 0,204,207, 0, 2, 0, 0, 80,206, 0, 0, 0, 80, 0, + 2,107, 0,228,107, 0,124,123, 0, 0, 0, 80,225,204, 0,228, 0,107, + 80, 0,194,184, 0, 0, 0, 0, 0,185,195, 0, 0, 0,198,196, 0, 0, + 187, 0,189,190, 0,107, 0, 96,191, 0,188, 0, 0, 0,228,107, 0,124, + 123, 0, 0, 0, 80,225, 0,124,123, 0, 0, 0,228,107, 0, 2, 0, 0, + 228,107, 0,124,123, 0, 0, 0, 0,124,123, 0,107, 0, 0,124,123, 0, + 228, 0, 80,225,204, 0,228, 80, 0,194,184, 0, 0, 0, 0, 0,185,195, + 0, 0, 0,198,196, 0, 0,187, 0,189,190, 0, 0, 96,191, 0,188, 0, + 0, 0,228,107, 0,205,208, 0,204,207, 0, 0, 0, 0, 0,228,107, 0, + 0,225, 0,225, 0,228,107, 0,124,123, 0, 0, 0,204, 0,168,167,166, + 165,158,159,160,161,162,163,164,172, 0, 0, 0,124,123, 0, 0,204, 0, + 205,208, 0,204,207, 0,107, 0, 0, 0, 0, 0, 2, 0,205,208, 0,204, + 207, 0, 0,107,206, 0, 0, 0,205,208, 0,204,207, 0, 0,107,206, 0, + 0, 0, 0,107,206, 0,205,208, 0,204,207, 0, 0, 0, 0,205,208, 0, + 0, 0,204,207, 0, 0, 0,204, 0, 0, 0, 2, 0,228,107, 0,205,208, + 0,204,207, 0, 0, 0,206, 0, 0, 0,228,197, 0,228,199, 0,124,123, + 0,228, 0, 0,124,123, 0, 0, 80, 0,228,225, 0,228,107, 0,205,208, + 0,204,207, 0, 0, 0,206, 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, 57, 61, + 0, 34, 66, 0, 70, 75, 0, 84, 87, 0, 4, 11, 13, 16, 6, 8, 19, 27, + 33, 37, 32, 49, 37, 40, 43, 0, 91, 0, 0, 0, 0, 93, 99, 0, 67, 0, + 70, 0,117,119, 0, 74, 0,131,135, 0, 79,140, 0,144,149, 0, 64, 72, + 107,111, 77,123, 82, 85, 0, 0, 0, 0, 0, 0, 0, 97,100,158, 0, 0, + 0, 0,171,174, 0,178,181, 0,160,162,107,165,167,110,113, 0,185, 0, + 187,189, 0, 0, 0, 0, 0, 0, 0,129,132,191,193,195, 0,199, 0,201, + 203, 0,207,213, 0,146, 0,149, 0,231,233, 0,153, 0,245,249, 0,158, + 254, 0,258,263, 0,205,151,221,225,156,237,161,164, 0, 0, 0, 0, 0, + 0, 0,176,179,272,274, 0, 0, 0, 0,187, 0, 0, 0, 0,276,192, 0, + 0, 0, 0, 0, 0, 0,198,201, 0, 0, 0, 0,278,207, 0, 0, 0, 0, + 280,213,282,284,286, 0,290,292, 0,294,300, 0,225, 0,228, 0,318,320, + 0,232, 0,332,336, 0,237,341, 0,345,350, 0,230,308,312,235,324,240, + 243, 0, 0, 0, 0,359,362, 0,366,369, 0,254,257,260, 0, 0, 0, 0, + 267,373, 0,375, 0, 0, 0, 0, 0, 0, 0,275,278,377, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,285, 0, 0, 0, 0,300,381, 0, + 387,390, 0,394,397, 0,385,306,309, 0, 0, 0,316, 0,407,410, 0,414, + 417, 0,318,401,403,320,323, 0,430,433, 0,437,440, 0,421,424,426,332, + 335, 0,444,447,449, 0,453,456, 0,460,463, 0,348,351, 0,467,470, 0, + 357, 0,474,477, 0,362, 0,481, 0, 0, 0,369, 0, 0, 0, 0,489,492, + 0,496,499, 0,371,373,485,376,379, 0,503,505, 0,513,515, 0, 0, 0, + 0,520,394, 0, 0, 0, 0,400,522, 0,524,526, 0, 0, 0, 0,535,538, + 0,542,545, 0,528,409,531,412,415, 0 +}; + +static const unsigned short ag_key_index[] = { + 4, 6, 46, 62, 0, 0, 0, 88, 0, 0, 0, 0, 0,103, 4,116,124, 88, + 4,126, 0,126,126, 62, 62, 0, 0, 0, 0, 0,135, 0, 4,116,141,143, + 0,167, 0, 0, 0, 0, 0, 0, 4, 0,182,190,195,126,126,204, 0,204, + 210, 4,195, 62, 62,216,141,141, 0,222,124, 62, 4,246,263, 0, 0, 0, + 0, 0, 4,263,270,273,204,281,298,190,303,312,204,204,190, 0,298,204, + 190,326,190,338,344,338,190,312, 62,273, 62,204,190, 62,216, 0,141, 4, + 62, 0, 62, 0,141,141,141,141,141, 62, 62,141,141,141,141,141,141, 4, + 0,141, 0, 62, 62, 0, 0, 0, 4,273, 0, 0, 0,298,298,298,298,298, + 354,360,365,367,367,263, 0,382,382,382,382, 0, 0,204,204,263,263,263, + 190,190,312, 4, 0, 0, 0,222, 4,388,391,388,141,397, 0, 0,190, 0, + 4, 0,141,403, 88, 0, 4, 0, 0,406,263,298,263,263,263,190,263,263, + 382,382,298,418,418,190,190,338,338, 0,263,141,141,141,190, 62, 62, 0, + 0, 0,263,141,141, 62,190,190,141,190,298, 62,141, 0, 62 +}; + +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, 97,109,101,0, 101,114,118,101,0, +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, 97,109,101,0, +101,114,118,101,0, 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, 97,109,101,0, 101,114,118,101,0, +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, 97,109,101,0, 101,114,118,101,0, +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, +97,99,114,111,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,241,241,241,241,241,241,241,241, 97,104,106,106,102,241,241,241,241, + 241,241,241,241,241,241,241,241, 46,241,241,241,241,241, 97, 15,152,242, + 61,242,138, 33, 21, 31, 90, 25, 7, 23,242,242,121,239,239,239,239,239, + 239,239,240,240,175, 75, 87, 13, 86,203,242,131,131,131,131,131,131,238, + 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, + 238, 19,170, 27,113,238,242,131,131,131,131,131,131,238,238,238,238,238, + 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, 17, 37, 29, + 35,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 241,241,241,241 +}; + +#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 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 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 ag_prot(void) { + int ag_k; + ag_k = 128 - ++(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 ag_undo(void) { + if ((PCB).drt == -1) return; + while ((PCB).btsx) { + int ag_k = 128 - (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[] = { + 98,226, 0 +}; + +static const unsigned char ag_tstt[] = { +238,228,131,107,104,102,97,46,21,19,17,0,3,4,5,38,98,226, +242,241,240,239,238,228,227,203,175,170,152,138,131,121,113,106,104,102,97, + 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,98,226, +228,97,0,3,98,226, +238,131,107,104,102,46,21,19,17,0,39,40,100,103, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,104,102,97,90,87,86, + 75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,109,110, +104,0, +104,102,0,103, +238,228,198,196,195,194,191,190,189,188,187,185,184,131,107,106,104,102,97, + 96,46,35,27,21,19,17,0,3,98,100,103,105,226, +238,131,46,21,19,17,0,20,41,42,45,47,48,49,54,55,56,57,58,59,60,92,209, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61, + 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0, +104,0, +104,102,0,103, +104,0, +240,239,238,228,131,124,123,121,113,107,104,102,97,90,80,35,33,25,23,21,0,3, + 4,8,9,98,99,100,101,103,226, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97, + 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,103,211,212,213, +240,239,238,228,208,207,206,205,204,203,175,138,131,121,107,104,102,97,90, + 87,86,80,61,46,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,98,226, +238,131,80,0,60,62,76,92, +238,228,198,196,195,194,191,190,189,188,187,185,184,131,107,104,102,97,96, + 35,27,0,3,4,5,98,178,226, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,97,90,87,86, + 75,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,98,100,210,214,217,218, + 226, +61,13,0,12, +238,131,0,57,59,60,92, +7,0,6, +2,0,1,50, +107,104,102,0,39,100,103, +107,104,102,0,39,100,103, +238,131,46,21,19,17,0,20,41,43,44,47,48,49,54,55,56,57,58,59,60,92,209, +46,0, +104,0, +104,0, +104,102,0,101,103, +242,241,240,239,238,228,225,204,203,175,170,152,138,131,124,123,121,113,107, + 106,104,102,97,90,87,86,80,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7, + 0,3,98,99,100,101,103,226, +104,0, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97, + 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,103,211, +240,239,238,228,131,121,97,0,3,98,226, +238,228,131,97,0,81, +107,104,102,90,87,86,80,31,27,21,7,0,77,78,85, +31,0, +238,198,196,195,194,191,190,189,188,187,185,184,131,107,104,102,96,35,27,0, + 39,40,100,103, +27,0,26, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61, + 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,232,233,234, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61, + 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,235,236,237, +152,0, +33,0, +104,102,0,103, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97, + 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,215, +29,0,28, +242,241,240,239,238,228,225,203,175,170,152,138,131,124,123,121,113,107,106, + 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, + 9,98,99,100,101,103,226, +240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,92,111,112,115,117,119,133,134,135,136,137,139,145,149,150, +228,107,104,102,97,46,7,2,0,3,4,5,98,226, +61,0, +7,0,6, +240,239,238,228,152,131,124,123,121,113,107,104,102,97,35,33,29,25,23,21,19, + 17,15,0,3,4,8,9,98,99,100,101,103,226, +238,131,0,59,60,92, +240,239,238,228,152,131,124,123,121,113,107,104,102,97,46,37,35,33,25,23,21, + 19,17,15,13,0,3,4,5,98,226, +240,239,238,152,131,124,123,121,113,107,104,102,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,73,92,111,112,115,117, + 119,132,133,134,135,136,137,139,145,149,150, +238,228,131,107,106,104,102,97,46,21,19,17,0,3,98,100,103,105,226, +238,228,131,107,106,104,102,97,46,37,21,19,17,2,0,1,3,36,50,51,52,98,100, + 103,105,226, +107,104,102,46,0,39,100,103, +107,104,102,46,0,39,100,103, +228,97,0,3,4,98,226, +238,228,131,97,0,3,4,5,98,226, +238,228,131,97,0,82, +90,21,0,20,79,83,84,88,89,91, +238,228,131,97,80,0,3,4,5,98,226, +238,131,80,0,60,62,76,92, +107,104,102,90,86,31,27,21,7,0, +238,228,131,107,104,102,97,0,3,4,8,9,98,99,100,101,103,226, +238,198,196,195,194,191,190,189,188,187,185,184,131,96,35,27,0,34,60,92,95, + 148,179,180,181,182,183,192, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,104,102,97,90,87,86, + 75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,231, +242,241,240,239,238,203,175,170,138,131,121,113,106,97,90,87,86,75,61,37,35, + 33,31,29,27,25,23,21,19,17,15,13,7,0,232, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,104,102,97,90,87,86, + 75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,231, +242,241,240,239,238,203,175,170,152,138,131,121,113,106,97,90,87,86,75,61, + 37,35,31,29,27,25,23,21,19,17,15,13,7,0,235, +104,0, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97, + 90,87,86,75,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,98,100,217,218, + 219,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +242,241,240,239,238,228,225,203,175,170,152,138,131,121,113,107,106,104,102, + 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, + 100,101,103,226, +242,241,240,239,238,225,203,175,170,152,138,131,121,113,106,90,87,86,61,37, + 35,33,31,27,25,23,21,19,17,15,13,7,0,55,74,209,221, +240,239,238,228,152,131,124,123,121,113,107,104,102,97,35,33,25,23,21,19,17, + 15,0,3,4,8,9,98,99,100,101,103,226, +240,239,238,228,204,152,131,124,123,121,113,107,104,102,97,37,35,33,29,25, + 23,21,19,17,15,13,0,3,4,8,9,98,99,100,101,103,226, +242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159, + 158,138,131,121,113,106,97,90,87,86,75,61,37,35,33,31,29,27,25,23,21,19, + 17,15,13,7,0,141,142,143,144,151,153,154,155,156,169,171, +240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,63,64,69,71,73,92,111,112,115,117,119,132,133,134,135,136, + 137,139,145,149,150, +240,239,238,204,152,131,124,123,121,113,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,73,92,111,112,115,117, + 119,132,133,134,135,136,137,139,145,149,150, +203,0, +240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9, + 98,99,100,101,103,226, +240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9, + 98,99,100,101,103,226, +240,239,124,123,121,0,118,120,125, +242,240,239,238,203,175,170,152,138,131,121,113,90,87,86,75,61,37,35,33,31, + 29,27,25,23,21,19,17,15,13,7,0, +242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159, + 158,152,138,131,121,113,106,97,90,87,86,75,61,37,35,31,29,27,25,23,21, + 19,17,15,13,7,0,116,141,142,143,144,169,171, +240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9, + 98,99,100,101,103,226, +240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112, + 115,117,119,134,136,137,139,145, +146,0, +240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112, + 115,117,119,137,139,145, +138,0, +206,203,25,23,11,0,10,22,24, +206,203,25,23,11,0,10,22,24, +240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,71,92,111,112,115,117,119,132,133,134,135,136,137,139,145, + 149,150, +208,207,205,204,175,107,104,102,46,37,29,27,13,7,0,72, +107,104,102,46,37,13,7,0,6,12,67, +242,241,240,239,238,225,203,175,170,152,138,131,121,113,106,90,87,86,61,37, + 35,33,31,27,25,23,21,19,17,15,13,7,0,55,74,209,221, +37,0,36,51, +240,239,238,228,152,131,124,123,121,113,107,104,102,97,35,33,25,23,21,19,17, + 15,0,3,4,8,9,98,99,100,101,103,226, +240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,69,70,71,73,92,111,112,115,117,119,132,133,134,135,136,137, + 139,145,149,150, +37,0,36,51, +228,97,0,3,98,226, +238,131,0,60,92, +238,228,131,97,0,3,4,5,98,226, +238,228,131,107,104,102,97,90,86,31,27,21,7,0,3,4,5,98,226, +238,131,0,60,92, +90,21,0,20,79,83,84,88,89,91, +90,21,0,20,84,88,89,91, +86,7,0, +228,97,0,3,4,98,226, +228,97,0,3,4,98,226, +228,97,0,3,4,98,226, +228,97,0,3,4,98,186,226, +228,97,0,3,4,98,226, +107,104,102,29,7,0,6,99,100,101,103,193,201, +107,104,102,29,7,0,6,99,100,101,103,193,201, +228,97,0,3,4,98,186,226, +228,97,0,3,4,98,186,226, +228,97,0,3,4,98,186,226, +228,97,0,3,4,98,186,226, +228,97,0,3,4,98,186,226, +228,97,0,3,4,98,186,226, +228,107,104,102,97,0,3,4,8,98,99,100,101,103,226, +238,131,0,60,92, +240,239,238,228,131,121,97,13,0,3,4,5,98,226, +238,131,0,60,92, +13,0,12, +107,104,102,27,0,39,40,100,103, +152,0, +33,0, +104,102,0,103, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97, + 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,215, +242,241,240,239,238,225,203,175,170,152,138,131,121,113,106,90,87,86,61,37, + 35,33,31,27,25,23,21,19,15,13,7,0,217,218,222,223, +75,0, +239,121,0, +240,239,131,121,0,126,130, +239,121,0, +239,121,0, +240,131,0, +240,239,131,121,0, +242,241,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159,158,152, + 138,113,106,97,90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7, + 0,141,142,143,144,156,169,171, +208,207,205,204,37,29,27,13,7,0,6,12,67, +208,205,37,27,0,26,36,65, +207,37,0,36,65, +37,0,36,65, +204,29,0,28, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +240,239,131,121,0,126,130, +239,228,208,207,206,205,204,203,175,146,138,121,107,104,102,97,46,37,31,29, + 27,25,23,13,11,7,0,122, +240,239,121,0, +228,208,207,206,205,204,203,175,146,138,107,104,102,97,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,98,226, +228,208,207,206,205,204,203,175,146,138,107,104,102,97,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,98,226, +33,23,0,32, +31,25,23,0,22,24,30, +240,239,228,124,123,121,113,107,104,102,97,25,23,0,3,4,8,9,98,99,100,101, + 103,226, +240,239,238,228,131,124,123,121,113,107,104,102,97,35,33,25,23,21,0,3,4,8,9, + 98,99,100,101,103,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112, + 115,117,119,136,137,139,145, +240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112, + 115,117,119,136,137,139,145, +208,207,205,204,175,107,104,102,46,37,29,27,13,7,0,72, +238,228,131,107,104,102,97,0,3,4,8,9,98,99,100,101,103,226, +75,0, +238,131,0,60,92, +31,0,30, +238,228,131,97,80,0,3,4,5,98,226, +228,107,104,102,97,90,86,31,27,21,7,0,3,4,5,98,226, +228,197,97,0,3,98,226, +228,199,97,0,3,98,226, +228,197,97,0,3,98,226, +228,97,17,0,3,16,98,226, +240,239,238,228,152,131,124,123,121,113,97,35,33,25,23,21,19,17,0,3,16,18, + 20,22,24,34,60,92,98,111,112,115,117,119,132,134,135,136,137,139,145, + 149,150,226, +29,0,28, +238,131,0,60,92,147, +240,239,238,131,124,123,121,113,35,33,29,25,23,21,0,20,22,24,34,60,92,111, + 112,115,117,119,134,136,137,139,145, +17,0,16, +240,239,238,228,131,121,107,104,102,97,17,0,3,98,99,100,101,103,226, +13,0,12, +240,239,238,228,131,121,97,0,3,98,226, +240,239,238,152,131,124,123,121,80,25,23,0,22,24,60,62,76,92,112,117,119, + 149,150, +238,228,198,196,195,194,191,190,189,188,187,185,184,131,107,106,104,102,97, + 96,35,27,0,3,34,60,92,95,98,100,103,105,148,181,182,183,192,226, +104,0, +242,241,240,239,238,228,203,175,170,152,138,131,121,113,107,106,104,102,97, + 90,87,86,75,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,98,100,217, + 218,219,226, +152,0, +33,0, +242,241,240,239,238,228,225,203,175,170,152,138,131,121,113,106,97,90,87,86, + 61,37,35,33,31,27,25,23,21,19,15,13,7,0,3,98,217,218,223,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +240,239,131,121,0,130, +228,208,207,205,204,203,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,15,0,14,16,18,20, + 22,24,34,60,64,69,71,73,92,111,112,115,117,119,132,133,134,135,136,137, + 139,145,149,150, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +228,208,207,205,204,175,107,104,102,97,46,37,29,27,13,7,0,3,4,5,98,226, +240,239,131,121,0,130, +239,121,0, +242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159, + 158,152,138,131,121,113,106,97,90,87,86,75,61,37,35,31,29,27,25,23,21, + 19,17,15,13,7,0,116,141,142,143,144,169,171, +228,208,207,206,205,204,203,175,138,107,104,102,97,46,37,31,29,27,25,23,13, + 11,7,0,3,4,5,98,226, +228,208,207,206,205,204,203,175,138,107,104,102,97,86,46,37,31,29,27,25,23, + 13,11,7,0,3,4,5,98,226, +240,239,124,123,121,113,25,23,0,22,24,111,112,117,119, +240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112, + 115,117,119,137,139,145, +138,0, +138,0, +238,131,0,176,177, +228,208,207,205,204,107,104,102,97,46,37,29,27,0,3,4,5,98,226, +228,97,0,3,4,98,226, +228,97,0,3,4,98,226, +228,97,0,3,4,98,186,226, +240,239,238,152,131,124,123,121,113,35,33,25,23,21,19,17,0,16,18,20,22,24, + 34,60,92,111,112,115,117,119,132,134,135,136,137,139,145,149,150,202, +13,0,12, +25,23,0,22,24, +238,131,0,60,92,147, +152,0,149,150, +33,0,32, +240,239,238,228,208,207,205,204,131,121,107,104,102,97,46,37,29,27,13,7,0,3, + 4,5,98,226, +228,97,17,0,3,16,98,226, +238,228,131,97,0,3,98,200,226, +107,104,102,29,7,0,6,99,100,101,103,193,201, +240,239,124,123,121,113,33,25,23,0,22,24,111,112,115,117,119, +240,239,238,131,124,123,121,113,35,33,25,23,21,0,20,22,24,34,60,92,111,112, + 115,117,119,134,136,137,139,145, +240,239,238,228,131,121,97,0,3,4,98,226, +240,239,238,152,131,124,123,121,113,35,33,29,25,23,21,19,17,0,16,18,20,22, + 24,34,60,92,111,112,115,117,119,132,134,135,136,137,139,145,149,150, +242,241,240,239,238,203,175,172,170,168,167,166,165,164,163,162,161,160,159, + 158,152,138,131,121,113,106,97,90,87,86,75,61,37,35,31,29,27,25,23,21, + 19,17,15,13,7,0,116,141,142,143,144,169,171, +25,23,0,22,24, +238,228,131,97,0,3,98,200,226, +33,0,32, +240,239,238,131,121,0, + +}; + + +static unsigned const char ag_astt[3969] = { + 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,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,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,9,9,9,9,9,5,3,7,8,1,7,1,3, + 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, + 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, + 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, + 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, + 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,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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, + 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, + 1,1,2,1,2,9,7,3,3,1,1,1,7,2,9,9,9,9,9,4 +}; + + +static const unsigned short ag_pstt[] = { +3,1,3,3,3,3,2,3,3,3,3,0,2,2,3,0,2,1, +300,300,300,300,300,1,298,300,300,300,300,300,300,300,300,300,300,300,300, + 300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300, + 300,1,301,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,122,122,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 4,9,124, +117,5, +10,10,6,10, +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, + 24,7,118,118,11,12,118,1, +95,95,26,13,17,14,8,16,25,25,26,24,23,22,23,23,23,21,20,48,19,15,18, +121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121, + 121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,123, +116,10, +27,27,11,27, +114,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, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,31,31,271, + 271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, + 14,31,32,32,273, +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, + 15,33,33,101,33,1, +95,95,34,16,35,36,35,15, +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, +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, + 274,44,44,44,44,44,44,44,44,18,44,43,45,44,42,41,1, +48,46,50,47, +95,95,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, +95,95,27,13,17,14,25,16,26,30,30,58,57,22,57,57,57,21,20,48,19,15,18, +31,26, +115,27, +59,28, +28,28,29,107,28, +104,104,104,104,104,1,104,104,104,104,104,104,104,104,104,104,104,104,4,104, + 28,28,2,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, + 104,104,104,30,2,2,105,29,105,28,1, +268,31, +272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,31,31,272, + 272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272, + 32,31,270, +97,97,97,1,97,97,2,4,2,2,1, +78,78,78,78,34,60, +72,72,72,62,63,72,61,72,72,62,72,35,65,62,64, +66,36, +67,67,67,67,67,67,67,67,67,67,67,67,67,4,5,5,67,67,23,37,7,67,6,5, +68,38,216, +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, + 70,70,70,70,70,70,70,70,70,39,70,70,309, +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, + 72,72,72,72,72,72,72,72,72,40,72,72,317, +280,41, +279,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,281,74,74,74,74,74,74,74,74,74,44,74, +75,45,267, +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, +129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,47,77,82,81,90,132, + 131,92,165,15,91,91,164,86,131,171,94,170,93,93,93,93,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, +95,95,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, +129,129,95,181,95,129,129,129,87,69,69,69,69,69,89,88,84,85,13,78,79,76,46, + 54,99,77,82,81,90,132,131,92,100,165,61,98,62,97,96,15,91,91,164,86,131, + 97,147,95,97,93,93,93,93,83,80, +33,1,33,4,119,12,12,118,33,33,33,33,55,118,118,11,12,118,1, +32,1,32,4,119,12,12,118,32,101,32,32,32,53,56,54,118,102,38,103,103,118,11, + 12,118,1, +4,5,5,35,57,55,6,5, +4,5,5,34,58,56,6,5, +1,104,111,104,104,104,1, +105,1,105,2,60,2,2,105,2,1, +80,80,80,80,61,106, +107,13,62,88,76,110,76,109,108,110, +3,1,3,2,3,63,2,2,86,2,1, +95,95,34,64,35,111,35,15, +73,73,73,75,73,73,73,75,73,65, +6,1,6,4,28,28,30,66,30,30,52,52,30,52,29,52,28,1, +95,113,114,115,116,119,120,121,122,123,124,112,95,125,89,217,67,128,129,15, + 127,117,130,219,130,130,126,118, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,68,2,2,17,2,1, +304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304, + 304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,69, + 304, +306,306,306,306,306,306,306,69,306,306,306,306,306,306,306,306,306,306,306, + 306,306,306,306,306,306,306,306,306,306,306,306,306,306,308,306, +312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312, + 312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,71, + 312, +314,314,314,314,314,314,314,71,314,314,314,314,314,314,314,314,314,314,314, + 314,314,314,314,314,314,314,314,314,314,314,314,314,314,316,314, +278,73, +282,282,282,282,282,1,282,282,282,39,282,282,282,282,4,282,282,282,282,282, + 282,282,282,282,282,282,40,282,282,282,282,282,282,134,282,282,282,275, + 282,133,132,131,282,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, +289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, + 289,289,289,289,289,289,289,289,289,14,289,289,289,77,265,136,18,135, +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, +202,202,203,203,202,202,202,138,137,195,194,193,192,191,190,189,188,187,186, + 185,202,203,203,202,202,202,202,202,202,202,202,202,202,202,202,202,202, + 202,202,202,202,202,202,202,202,80,202,207,184,209,143,142,141,143,202, + 140,139, +129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,81,77,82,81,90,132, + 131,92,165,145,53,144,97,96,15,91,91,164,86,131,97,147,95,97,93,93,93, + 93,83,80, +129,129,95,69,181,95,129,129,129,87,69,89,88,69,84,85,13,78,79,76,46,82,99, + 77,82,81,90,132,131,92,165,146,53,147,56,148,144,97,96,15,91,91,164,86, + 131,97,147,95,97,93,93,93,93,83,80, +149,254, +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, +138,138,150,150,151,86,153,152,150, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, + 154,154,154,154,154,154,154,154,154,154,154,154,87, +157,157,157,157,157,157,157,138,137,195,194,193,192,191,190,189,188,187,186, + 185,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157, + 157,157,157,157,157,157,157,157,88,155,155,155,155,155,140,139, +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, +129,129,95,95,129,129,129,87,89,88,84,85,13,90,90,132,131,92,165,15,91,91, + 164,86,131,156,93,93,93,93, +157,163, +129,129,95,95,129,129,129,87,89,88,84,85,13,92,90,132,131,92,165,15,91,91, + 164,86,131,156,156,156, +158,150, +160,161,84,85,159,169,262,162,163, +160,161,84,85,159,148,262,162,163, +129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,96,77,82,81,90,132, + 131,92,165,164,15,91,91,164,86,131,164,147,95,164,93,93,93,93,83,80, +211,211,211,211,165,211,211,211,211,211,211,211,211,211,97,66, +69,69,69,69,69,46,51,98,68,99,65, +289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, + 289,289,289,289,289,289,289,289,289,14,289,289,289,99,70,166,18,135, +101,42,102,63, +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, + 28,1, +129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,102,77,82,81,90, + 132,131,92,165,98,64,97,96,15,91,91,164,86,131,97,147,95,97,93,93,93,93, + 83,80, +101,41,102,40, +1,2,112,2,2,1, +95,95,105,79,15, +167,1,167,2,106,2,2,167,2,1, +3,1,3,3,3,3,2,3,3,3,3,3,3,107,2,2,90,2,1, +95,95,91,92,15, +107,13,109,88,168,110,168,109,108,110, +107,13,82,88,84,109,108,94, +170,169,111, +1,171,112,171,171,171,1, +1,172,113,172,172,172,1, +1,173,114,173,173,173,1, +1,174,115,174,174,174,240,1, +1,175,116,175,175,175,1, +4,28,28,176,51,117,177,176,29,176,28,238,176, +4,28,28,176,51,118,178,176,29,176,28,237,176, +1,174,119,174,174,174,236,1, +1,174,120,174,174,174,235,1, +1,174,121,174,174,174,234,1, +1,174,122,174,174,174,233,1, +1,174,123,174,174,174,232,1, +1,174,124,174,174,174,231,1, +1,4,28,28,180,125,180,180,179,180,179,29,179,28,1, +95,95,126,229,15, +99,99,99,1,99,99,182,181,127,182,182,181,182,1, +95,95,128,223,15, +46,222,183, +4,5,5,23,130,184,218,6,5, +288,131, +287,132, +185,185,133,185, +186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186, + 186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186, + 186,134,186, +189,189,189,189,189,189,189,189,189,39,189,189,189,189,189,189,189,189,189, + 189,189,40,189,189,189,189,189,189,189,189,189,135,188,187,189,189, +190,136, +196,196,137, +144,144,145,144,138,191,142, +198,198,200, +197,197,199, +206,206,179, +205,205,205,205,178, +204,204,204,204,204,138,137,195,194,193,192,191,190,189,188,187,186,185,192, + 204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204, + 204,204,204,204,204,143,204,208,184,210,204,140,139, +69,69,69,69,69,69,69,46,51,144,68,99,60, +193,194,101,68,145,258,195,54, +196,101,59,195,54, +101,58,195,57, +197,75,148,256, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,149,2,2,255,2,1, +144,144,145,144,150,198,142, +140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140, + 140,140,140,140,140,140,140,151,199, +139,139,139,133, +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, +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, +201,200,155,127, +202,84,85,156,162,163,166, +203,203,1,203,203,203,203,4,28,28,30,203,203,157,30,30,203,203,30,203,29, + 203,28,1, +204,204,204,1,204,204,204,204,204,4,28,28,30,204,204,204,204,204,158,30,30, + 204,204,30,204,29,204,28,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,159,2,2,9,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,160,2,2,261,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,161,2,2,260,2,1, +129,129,95,95,129,129,129,87,89,88,84,85,13,162,90,132,131,92,165,15,91,91, + 164,86,131,205,205,205,205, +129,129,95,95,129,129,129,87,89,88,84,85,13,163,90,132,131,92,165,15,91,91, + 164,86,131,206,206,206,206, +211,211,211,211,165,211,211,211,211,211,211,211,211,211,164,67, +207,1,207,4,28,28,30,165,30,30,207,207,30,207,29,207,28,1, +208,166, +95,95,167,81,15, +202,168,89, +3,1,3,2,3,169,2,2,87,2,1, +1,3,3,3,2,3,3,3,3,3,3,170,2,2,85,2,1, +1,209,2,230,2,2,1, +1,210,2,172,2,2,1, +1,211,2,173,2,2,1, +1,2,79,174,2,212,2,1, +129,129,95,1,181,95,129,129,129,87,2,89,88,84,85,13,78,79,175,2,82,81,90, + 132,131,92,165,15,2,91,91,164,86,131,239,95,239,93,93,93,93,83,80,1, +75,176,248, +95,95,246,213,15,176, +129,129,95,95,129,129,129,87,89,88,246,84,85,13,178,90,132,131,92,165,15,91, + 91,164,86,131,214,93,93,93,93, +79,179,215, +98,98,98,1,98,98,4,28,28,2,104,180,2,2,105,29,105,28,1, +46,181,216, +100,100,100,1,100,100,2,4,2,2,1, +129,129,95,181,95,129,129,129,34,84,85,183,132,131,35,224,35,15,227,86,131, + 225,80, +95,1,113,114,115,116,119,120,121,122,123,124,112,95,4,119,12,12,118,125,89, + 24,184,118,128,129,15,127,118,11,12,118,117,221,221,126,118,1, +286,185, +282,282,282,282,282,1,282,282,282,39,282,282,282,282,4,282,282,282,282,282, + 282,282,282,282,282,282,40,282,284,282,282,282,282,282,134,282,282,282, + 186,282,133,132,131,282,1, +297,187, +296,188, +292,292,292,292,292,1,292,292,292,292,39,292,292,292,292,292,293,292,292, + 292,292,292,292,40,292,292,292,292,292,292,292,292,292,290,293,293,188, + 187,292,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,190,2,2,266,2,1, +144,144,145,144,201,143, +1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,192,2,2,177,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,193,2,2,264,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,194,2,2,259,2,1, +129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,76,195,77,82,81,90, + 132,131,92,165,55,144,97,96,15,91,91,164,86,131,97,147,95,97,93,93,93, + 93,83,80, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,196,2,2,263,2,1, +1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,197,2,2,257,2,1, +144,144,145,144,137,143, +141,141,134, +157,157,157,157,157,157,157,138,137,195,194,193,192,191,190,189,188,187,186, + 185,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157, + 157,157,157,157,157,157,157,157,200,217,217,217,217,217,140,139, +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, +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, +129,129,129,129,129,87,84,85,203,132,131,168,168,86,131, +129,129,95,95,129,129,129,87,89,88,84,85,13,204,90,132,131,92,165,15,91,91, + 164,86,131,154,154,154, +158,152, +158,151, +213,213,207,212,218, +1,3,3,3,3,3,3,3,2,3,3,3,3,208,2,2,71,2,1, +1,219,209,219,219,219,1, +1,220,210,220,220,220,1, +1,174,211,174,174,174,241,1, +129,129,95,181,95,129,129,129,87,89,88,84,85,13,78,79,212,82,81,90,132,131, + 92,165,15,91,91,164,86,131,252,95,252,93,93,93,93,83,80,221, +46,172,222, +84,85,250,162,163, +95,95,215,213,15,175, +181,216,226,80, +201,217,167, +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, +1,2,79,219,2,223,2,1, +243,1,243,2,220,2,2,224,1, +4,28,28,176,51,221,225,176,29,176,28,251,176, +129,129,129,129,129,87,226,84,85,222,132,131,173,173,174,86,131, +129,129,95,95,129,129,129,87,89,88,84,85,13,223,90,132,131,92,165,15,91,91, + 164,86,131,227,93,93,93,93, +244,244,244,1,244,244,228,224,228,228,228,1, +129,129,95,181,95,129,129,129,87,89,88,246,84,85,13,78,79,225,82,81,90,132, + 131,92,165,15,91,91,164,86,131,253,95,253,93,93,93,93,83,80, +157,157,157,157,157,157,157,138,137,195,194,193,192,191,190,189,188,187,186, + 185,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157, + 157,157,157,157,157,157,157,157,226,229,229,229,229,229,140,139, +84,85,249,162,163, +243,1,243,2,228,2,2,230,1, +201,229,127, +244,244,244,244,244,242, + +}; + + +static const unsigned short ag_sbt[] = { + 0, 18, 59, 65, 79, 118, 120, 124, 157, 180, 215, 217, 221, 223, + 254, 296, 337, 345, 373, 416, 420, 427, 430, 434, 441, 448, 471, 473, + 475, 477, 482, 532, 534, 574, 585, 591, 606, 608, 632, 635, 673, 711, + 713, 715, 719, 759, 762, 813, 854, 868, 870, 873, 907, 913, 944, 999, + 1018,1044,1052,1060,1067,1077,1083,1093,1104,1112,1122,1140,1168,1190, + 1228,1263,1301,1336,1338,1382,1404,1452,1489,1522,1559,1616,1663,1718, + 1720,1749,1778,1787,1819,1872,1901,1931,1933,1961,1963,1972,1981,2024, + 2040,2051,2088,2092,2125,2171,2175,2181,2186,2196,2215,2220,2230,2238, + 2241,2248,2255,2262,2270,2277,2290,2303,2311,2319,2327,2335,2343,2351, + 2366,2371,2385,2390,2393,2402,2404,2406,2410,2450,2486,2488,2491,2498, + 2501,2504,2507,2512,2562,2575,2583,2588,2592,2596,2618,2625,2653,2657, + 2687,2717,2721,2728,2752,2781,2803,2825,2847,2876,2905,2921,2939,2941, + 2946,2949,2960,2977,2984,2991,2998,3006,3050,3053,3059,3090,3093,3112, + 3115,3126,3149,3187,3189,3234,3236,3238,3278,3300,3306,3329,3351,3373, + 3419,3441,3463,3469,3472,3525,3554,3584,3599,3627,3629,3631,3636,3655, + 3662,3669,3677,3717,3720,3725,3731,3735,3738,3764,3772,3781,3794,3811, + 3841,3853,3893,3946,3951,3960,3963,3969 +}; + + +static const unsigned short ag_sbe[] = { + 11, 56, 61, 74, 115, 119, 122, 150, 163, 214, 216, 219, 222, 243, + 291, 331, 340, 366, 408, 418, 422, 428, 431, 437, 444, 454, 472, 474, + 476, 479, 524, 533, 571, 581, 589, 602, 607, 627, 633, 669, 707, 712, + 714, 717, 757, 760, 802, 830, 862, 869, 871, 896, 909, 938, 967,1011, + 1032,1048,1056,1062,1071,1081,1085,1098,1107,1121,1129,1156,1184,1226, + 1261,1299,1334,1337,1375,1398,1441,1484,1511,1548,1604,1633,1684,1719, + 1738,1767,1783,1818,1864,1890,1914,1932,1946,1962,1968,1977,1998,2038, + 2047,2083,2089,2114,2142,2172,2177,2183,2190,2209,2217,2222,2232,2240, + 2243,2250,2257,2264,2272,2282,2295,2305,2313,2321,2329,2337,2345,2356, + 2368,2379,2387,2391,2397,2403,2405,2408,2448,2481,2487,2490,2495,2500, + 2503,2506,2511,2554,2571,2579,2585,2589,2594,2612,2622,2651,2656,2681, + 2711,2719,2724,2741,2770,2797,2819,2841,2860,2889,2919,2928,2940,2943, + 2947,2954,2971,2980,2987,2994,3001,3024,3051,3055,3073,3091,3104,3113, + 3122,3137,3171,3188,3227,3235,3237,3271,3294,3304,3323,3345,3367,3390, + 3435,3457,3467,3471,3517,3548,3578,3592,3612,3628,3630,3633,3649,3657, + 3664,3671,3693,3718,3722,3727,3732,3736,3758,3767,3776,3786,3803,3824, + 3848,3870,3938,3948,3955,3961,3968,3969 +}; + + +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,3,2,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,1,3,5,4,3,3,3,1,3,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,2,2,3,2,4,7,1,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, 73, 67, 67, 67, + 62, 62, 78, 78, 62, 76, 81, 76, 82, 76, 79, 79, 79, 77, 85, 85, 88, 84, + 89, 91, 91, 83, 83, 92, 92, 92, 95, 95, 95, 60, 3, 3, 8, 8, 8, 99, + 99,103,103,101,101,105,105,105, 39, 39, 39, 39,109,109,110,110,100,111, + 111,115,112,119,119,117,117,118,118,125,125,118,120,120,122,122,126,126, + 130,130, 71, 71,132,132,134,134,134,136,136,137,137,116,116,116,116,116, + 139,139,139,139,139,145,145, 54, 54, 54,147,147,147,148,148,149,151,151, + 151,150,156,156,156,141,141,141,141,141,141,141,141,141,141,141,169,171, + 143,142,142,144,153,153,153,153,153,154,154,155,155, 72, 72,177,177,176, + 56,180,180,178,179,179,181,181,181,181,181,181,181,181,183,182,182,182, + 182,182,182,182,182,182,182,182,182,200,200,201,201,201,193,192,192,186, + 202,202,135,135,135,135,135,135,135,135,135,135,135,133,133, 55,211,212, + 212,213,213,209,210,210,214,214,214,214,214,215,215,219,219,219,219,219, + 219,221, 74,222,222,222,223,223,223,223, 98,226,226, 98,232,232,232,233, + 233,234,234,218,235,235,235,236,236,237,237,217,231 +}; + +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 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 ag_ra(void) +{ + switch(ag_rpx[(PCB).ag_ap]) { + case 1: ag_rp_1(); break; + case 2: ag_rp_2(); break; + case 3: ag_rp_3(V(0,(int *))); break; + case 4: ag_rp_4(); break; + case 5: ag_rp_5(V(0,(int *))); break; + case 6: ag_rp_6(); break; + case 7: V(0,(int *)) = ag_rp_7(V(0,(int *))); break; + case 8: V(0,(int *)) = ag_rp_8(V(0,(int *))); break; + case 9: V(0,(int *)) = ag_rp_9(); break; + case 10: V(0,(int *)) = ag_rp_10(V(0,(int *))); break; + case 11: ag_rp_11(V(0,(int *))); break; + case 12: ag_rp_12(V(2,(int *))); break; + case 13: V(0,(int *)) = ag_rp_13(); break; + case 14: V(0,(int *)) = ag_rp_14(); break; + case 15: V(0,(int *)) = ag_rp_15(); break; + case 16: ag_rp_16(V(0,(int *))); break; + case 17: ag_rp_17(V(1,(int *))); break; + case 18: ag_rp_18(V(0,(int *))); break; + case 19: V(0,(int *)) = ag_rp_19(V(1,(int *))); break; + case 20: ag_rp_20(V(0,(int *))); break; + case 21: ag_rp_21(V(0,(int *))); break; + case 22: ag_rp_22(V(1,(int *))); break; + case 23: V(0,(int *)) = ag_rp_23(V(1,(int *))); break; + case 24: ag_rp_24(V(0,(int *)), V(1,(int *))); break; + case 25: ag_rp_25(V(1,(int *)), V(2,(int *))); break; + case 26: V(0,(int *)) = ag_rp_26(); break; + case 27: V(0,(int *)) = ag_rp_27(); break; + case 28: V(0,(int *)) = ag_rp_28(); break; + case 29: ag_rp_29(); break; + case 30: ag_rp_30(); break; + case 31: ag_rp_31(); break; + case 32: ag_rp_32(); break; + case 33: ag_rp_33(); break; + case 34: ag_rp_34(); break; + case 35: ag_rp_35(); break; + case 36: ag_rp_36(); break; + case 37: ag_rp_37(); break; + case 38: ag_rp_38(); break; + case 39: ag_rp_39(); break; + case 40: ag_rp_40(); break; + case 41: ag_rp_41(); break; + case 42: ag_rp_42(); break; + case 43: ag_rp_43(V(0,(int *))); break; + case 44: ag_rp_44(V(1,(int *))); break; + case 45: ag_rp_45(V(2,(int *))); break; + case 46: ag_rp_46(V(2,(int *))); break; + case 47: ag_rp_47(V(1,(int *))); break; + case 48: ag_rp_48(V(2,(int *))); break; + case 49: V(0,(int *)) = ag_rp_49(V(1,(int *))); break; + case 50: V(0,(int *)) = ag_rp_50(V(1,(int *))); break; + case 51: V(0,(int *)) = ag_rp_51(V(0,(int *)), V(1,(int *))); break; + case 52: V(0,(int *)) = ag_rp_52(); break; + case 53: V(0,(int *)) = ag_rp_53(); break; + case 54: V(0,(int *)) = ag_rp_54(V(1,(int *))); break; + case 55: V(0,(int *)) = ag_rp_55(V(1,(int *))); break; + case 56: V(0,(int *)) = ag_rp_56(V(0,(int *))); break; + case 57: V(0,(int *)) = ag_rp_57(V(0,(int *)), V(1,(int *))); break; + case 58: V(0,(int *)) = ag_rp_58(); break; + case 59: V(0,(int *)) = ag_rp_59(V(0,(int *)), V(1,(int *))); break; + case 60: V(0,(int *)) = ag_rp_60(V(0,(int *))); break; + case 61: V(0,(int *)) = ag_rp_61(V(0,(int *)), V(1,(int *))); break; + case 62: V(0,(int *)) = ag_rp_62(V(0,(int *))); break; + case 63: V(0,(int *)) = ag_rp_63(V(0,(int *))); break; + case 64: V(0,(int *)) = ag_rp_64(V(0,(int *))); break; + case 65: V(0,(int *)) = ag_rp_65(V(0,(CharSetExpression * *))); break; + case 66: V(0,(CharSetExpression * *)) = ag_rp_66(V(0,(CharSetExpression * *)), V(2,(CharSetExpression * *))); break; + case 67: V(0,(CharSetExpression * *)) = ag_rp_67(V(0,(CharSetExpression * *)), V(2,(CharSetExpression * *))); break; + case 68: V(0,(CharSetExpression * *)) = ag_rp_68(V(0,(CharSetExpression * *)), V(3,(CharSetExpression * *))); break; + case 69: V(0,(CharSetExpression * *)) = ag_rp_69(V(1,(CharSetExpression * *))); break; + case 70: V(0,(int *)) = ag_rp_70(V(0,(int *))); break; + case 71: V(0,(CharSetExpression * *)) = ag_rp_71(V(0,(int *))); break; + case 72: V(0,(CharSetExpression * *)) = ag_rp_72(V(0,(int *))); break; + case 73: V(0,(CharSetExpression * *)) = ag_rp_73(); break; + case 74: V(0,(CharSetExpression * *)) = ag_rp_74(V(1,(CharSetExpression * *))); break; + case 75: V(0,(CharSetExpression * *)) = ag_rp_75(V(1,(int *)), V(3,(int *))); break; + case 76: V(0,(CharSetExpression * *)) = ag_rp_76(V(0,(int *)), V(3,(int *))); break; + case 77: ag_rp_77(V(2,(CharSetExpression * *))); break; + case 78: ag_rp_78(V(2,(int *))); break; + case 79: ag_rp_79(V(2,(int *))); break; + case 80: ag_rp_80(); break; + case 81: ag_rp_81(V(2,(int *))); break; + case 82: ag_rp_82(V(2,(int *))); break; + case 83: ag_rp_83(); break; + case 84: V(0,(int *)) = ag_rp_84(V(0,(int *))); break; + case 85: V(0,(int *)) = ag_rp_85(); break; + case 86: V(0,(int *)) = ag_rp_86(); break; + case 87: V(0,(int *)) = ag_rp_87(); break; + case 88: V(0,(int *)) = ag_rp_88(); break; + case 89: V(0,(int *)) = ag_rp_89(); break; + case 90: V(0,(int *)) = ag_rp_90(); break; + case 91: V(0,(int *)) = ag_rp_91(); break; + case 92: V(0,(int *)) = ag_rp_92(); break; + case 93: V(0,(int *)) = ag_rp_93(); break; + case 94: V(0,(int *)) = ag_rp_94(); break; + case 95: V(0,(int *)) = ag_rp_95(); break; + case 96: V(0,(int *)) = ag_rp_96(V(1,(int *))); break; + case 97: V(0,(int *)) = ag_rp_97(V(0,(int *)), V(1,(int *))); break; + case 98: V(0,(int *)) = ag_rp_98(V(0,(int *)), V(1,(int *))); break; + case 99: V(0,(int *)) = ag_rp_99(V(1,(int *))); break; + case 100: ag_rp_100(V(0,(int *))); break; + case 101: ag_rp_101(V(0,(int *))); break; + case 102: ag_rp_102(V(1,(int *))); break; + case 103: ag_rp_103(V(1,(int *))); break; + case 104: ag_rp_104(V(1,(int *))); break; + case 105: ag_rp_105(V(0,(int *))); break; + case 106: ag_rp_106(V(1,(int *))); break; + case 107: ag_rp_107(V(0,(int *))); break; + case 108: ag_rp_108(V(1,(int *))); break; + case 109: V(0,(int *)) = ag_rp_109(); break; + case 110: V(0,(int *)) = ag_rp_110(); break; + case 111: ag_rp_111(V(0,(int *))); break; + case 112: ag_rp_112(V(1,(int *))); break; + case 113: ag_rp_113(); break; + case 114: ag_rp_114(); break; + case 115: ag_rp_115(); break; + case 116: ag_rp_116(); break; + case 117: ag_rp_117(); break; + case 118: ag_rp_118(V(2,(int *))); break; + case 119: ag_rp_119(); break; + case 120: ag_rp_120(); break; + case 121: ag_rp_121(); break; + case 122: ag_rp_122(); break; + case 123: ag_rp_123(); break; + case 124: ag_rp_124(); break; + case 125: ag_rp_125(); break; + case 126: ag_rp_126(); break; + case 127: ag_rp_127(V(2,(int *))); break; + case 128: ag_rp_128(); break; + case 129: ag_rp_129(); break; + case 130: ag_rp_130(V(4,(int *)), V(6,(int *))); break; + case 131: V(0,(int *)) = ag_rp_131(); break; + case 132: ag_rp_132(V(5,(CharSetExpression * *))); break; + case 133: ag_rp_133(V(2,(CharSetExpression * *))); break; + case 134: ag_rp_134(V(0,(int *))); break; + case 135: ag_rp_135(V(2,(int *))); break; + case 136: V(0,(int *)) = ag_rp_136(); break; + case 137: V(0,(int *)) = ag_rp_137(); break; + case 138: V(0,(int *)) = ag_rp_138(); break; + case 139: V(0,(int *)) = ag_rp_139(); break; + case 140: V(0,(int *)) = ag_rp_140(); break; + case 141: V(0,(int *)) = ag_rp_141(); break; + case 142: V(0,(int *)) = ag_rp_142(V(0,(CharSetExpression * *))); break; + case 143: V(0,(int *)) = ag_rp_143(V(0,(CharSetExpression * *))); break; + case 144: V(0,(int *)) = ag_rp_144(V(0,(CharSetExpression * *))); break; + case 145: V(0,(int *)) = ag_rp_145(); break; + case 146: V(0,(int *)) = ag_rp_146(); break; + case 147: V(0,(int *)) = ag_rp_147(); break; + case 148: V(0,(int *)) = ag_rp_148(); break; + case 149: ag_rp_149(); break; + case 150: ag_rp_150(); break; + case 151: ag_rp_151(); break; + case 152: ag_rp_152(); break; + case 153: ag_rp_153(); break; + case 154: ag_default(&ag_rtt[0]); ag_rp_154(); break; + } + (PCB).la_ptr = (PCB).pointer; +} + + +static const unsigned char ag_ctn[] = { + 0,0, 98,1, 0,0, 0,0,100,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, + 0,0, 0,0,209,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, 99,1, 0,0, 0,0, 0,0, 0,0, 76,1, 0,0, + 58,2,178,1, 56,2,218,1,217,1,214,1,214,1,214,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, + 76,2, 76,2, 0,0, 85,1, 0,0, 0,0, 58,3,178,2, 0,0, 0,0, 0,0, 0,0, + 0,0,214,2, 0,0, 0,0,133,1,133,1,135,1, 0,0,149,1,135,1,135,1,135,1, + 0,0, 0,0,112,1,111,1, 0,0, 0,0, 0,0,145,1, 0,0, 0,0,135,1,135,1, + 69,1, 69,1, 0,0, 67,1, 0,0, 0,0, 0,0, 0,0, 0,0, 76,3, 76,3, 0,0, + 0,0, 0,0, 0,0, 0,0,181,1,182,1,182,1,182,1,182,1,182,1,182,1,182,1, + 182,1,182,1,182,1,182,1,182,1,181,1,181,1,181,1,181,1,181,1, 0,0, 0,0, + 0,0, 0,0, 0,0, 74,1,133,2,142,1,144,1, 0,0,142,1,151,1,151,1,151,1, + 64,1, 0,0, 68,1, 68,1,135,2,135,2, 0,0, 0,0,120,1,112,2,111,2, 0,0, + 0,0,145,2, 0,0, 0,0,135,2,135,2, 0,0, 0,0, 69,2, 72,1, 67,2, 76,4, + 0,0, 85,3, 0,0, 0,0, 0,0, 0,0,186,1, 0,0, 0,0,148,2,182,2,148,2, + 0,0,181,2, 0,0,181,2, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,133,3,126,1, + 149,3,135,3,135,3, 0,0,135,3,135,3,126,1,122,1,145,3, 0,0, 0,0,145,3, + 0,0, 0,0, 0,0, 72,2, 67,3,182,3,182,3,182,3,186,2,147,1, 0,0,148,3, + 181,3,145,4, 0,0, 0,0, 0,0,202,1,147,2,182,5,200,1,202,2,115,1, 0,0, + 0,0,115,2,200,1 +}; + +#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 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 ag_action_1_r_proc(void); +static int ag_action_2_r_proc(void); +static int ag_action_3_r_proc(void); +static int ag_action_4_r_proc(void); +static int ag_action_1_s_proc(void); +static int ag_action_3_s_proc(void); +static int ag_action_1_proc(void); +static int ag_action_2_proc(void); +static int ag_action_3_proc(void); +static int ag_action_4_proc(void); +static int ag_action_5_proc(void); +static int ag_action_6_proc(void); +static int ag_action_7_proc(void); +static int ag_action_8_proc(void); +static int ag_action_9_proc(void); +static int ag_action_10_proc(void); +static int ag_action_11_proc(void); +static int ag_action_8_proc(void); + + +static int (*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 (*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 (*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 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 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 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[128 - ++(PCB).btsx] = *ag_sx; + (PCB).ss[128 - (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[128 - (PCB).btsx]; + (PCB).ss[*ag_sx] = (PCB).ss[128 - (PCB).btsx--]; + } + return ag_flag; +} + + +static int 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 ag_set_error_procs(void); + +static void 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*128) { + 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 >= 128) { + (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 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 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 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 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 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 ag_action_2_proc(void) { + (PCB).btsx = 0, (PCB).drt = -1; + if ((PCB).ssx >= 128) { + (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 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 ag_action_2_r_proc(void) { + (PCB).ssx++; + (PCB).sn = (PCB).ag_ap; + return 0; +} + +static int ag_action_7_proc(void) { + --(PCB).ssx; + (PCB).la_ptr = (PCB).pointer; + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int ag_action_1_proc(void) { + ag_track(); + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int ag_action_1_r_proc(void) { + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int ag_action_1_s_proc(void) { + (PCB).exit_flag = AG_SUCCESS_CODE; + return 0; +} + +static int 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 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 ag_action_8_proc(void) { + ag_undo(); + (PCB).la_ptr = (PCB).pointer; + ag_auto_resynch(); + return (PCB).exit_flag == AG_RUNNING_CODE; +} + +static int 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 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 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 ag_action_3_er_proc(void) { + ag_check_depth(ag_fl[(PCB).ag_ap] - 1); + return ag_action_4_r_proc(); +} + +static int ag_action_2_e_proc(void) { + ag_action_2_proc(); + (PCB).ag_min_depth = (PCB).ag_tmp_depth; + return 0; +} + +static int 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 ag_action_6_e_proc(void) { + ag_check_depth(ag_fl[(PCB).ag_ap]); + return ag_action_6_proc(); +} + +static int ag_action_11_e_proc(void) { + return ag_action_10_proc(); +} + +static int (*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 (*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 (*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 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]])(); + } +} + +