Mercurial > ~dholland > hg > ag > index.cgi
view anagram/agcore/pgg24.cpp @ 5:7661c1604e49
Add additional operator delete calls gcc 10 asked for.
author | David A. Holland |
---|---|
date | Mon, 30 May 2022 23:32:56 -0400 |
parents | 13d2b8934445 |
children | ec2b657edf13 |
line wrap: on
line source
/* * AnaGram, A System for Syntax Directed Programming * Copyright 1989-2002 Jerome T. Holland. All Rights Reserved. * See the file COPYING for license and usage terms. * * pgg24.syn - parser generator grammar, rev. 24 */ #include "port.h" #include "agdict.h" #include "agstring.h" #include "assert.h" #include "bpe3.h" #include "cint.h" #include "config.h" #include "configparam.h" #include "csexp.h" #include "error.h" #include "lexeme.h" #include "operations.h" #include "p.h" #include "pgg24-defs.h" #include "pgg24.h" #include "rpk.h" #include "rpz.h" #include "rproc.h" #include "rule.h" #include "stacks.h" #include "token.h" #include "tree.h" #include "tsd.h" #include "ut.h" //#define INCLUDE_LOGGING #include "log.h" /* * AnaGram, A System for Syntax Directed Programming * File generated by: Version 2.40-current, built Oct 30 2007 * * AnaGram Parsing Engine * Copyright 1993-2002 Parsifal Software. All Rights Reserved. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #ifndef PGG24_H_1198348407 #include "pgg24.h" #endif #ifndef PGG24_H_1198348407 #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[254] = { "syntax definition", "", "\"->\"", "", "", "", "", "','", "", "", "", "\"...\"", "", "'='", "", "'!'", "", "'{'", "", "'['", "", "'('", "", "'-'", "", "'+'", "", "']'", "", "'}'", "", "')'", "", "single quote", "", "'~'", "", "'|'", "syntax definition", "", "", "statement list", "statement", "", "", "eof", "production", "definition", "embedded c", "configuration section", "", "comment", "", "left hand side", "right hand side", "", "", "", "token name list", "type definition", "", "symbol name", "'$'", "", "wrapper type", "wrapper list", "wrappers", "", "", "vp rule spec", "", "", "empty vp rule", "proper reduction procedure", "vp rules", "grammar rule", "reduction procedure", "", "init grammar rule", "rule element", "parameter name", "c expression", "';'", "type name", "", "", "", "\"::\"", "", "", "", "", "template field head", "'>'", "'<'", "", "", "'*'", "", "", "letter", "", "", "\"enum\"", "blank char", "c comment", "continuation", "", "carriage return", "", "newline", "", "vertical space", "\"//\"", "", "", "", "character", "signed number", "'^'", "", "quoted character", "char const", "", "", "", "decimal number", "octal number", "\"0x\"", "\"0X\"", "", "hex number", "", "", "'0'", "", "hex digit", "", "token", "immediate action", "set union", "virtual production", "set intersection", "set difference", "set complement", "'&'", "character set", "", "escape sequence", "octal escape", "", "hex escape", "", "any character", "\"..\"", "proc def", "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\"", "\"extend\"", "\"pcb\"", "\"lexeme\"", "\"reserve\"", "\"keywords\"", "\"rename\"", "\"macro\"", "macro name", "\"wrapper\"", "", "tokens", "'\\?'", "\"}...\"", "\"]...\"", "\"?...\"", "\"}/...\"", "\"]/...\"", "embedded c head", "", "", "", "", "c code first", "", "", "c character constant", "c string constant", "", "simple c char", "", "", "", "", "\"\\\\\\n\"", "", "\"*/\"", "\"/*\"", "", "c literal elem", "", "", "", "", "", "", "", "", "", "", "", "", }; #line 447 "pgg24.syn" static int null_warning(int n) { if (n == 0) log_error("Null character in string"); return n; } #line 347 "pgg24.cpp" #line 671 "pgg24.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() CSegment::CSegment() : begin(PCB.pointer), end(PCB.pointer), line(PCB.line) { LOGSECTION("CSegment::CSegment"); // Nothing to do } static class PggErrorHandler : public ConfigParam::ErrorHandler { void badParam(const char *s){log_error(s);} } pggErrorHandler; static void reduction_token_error(void) { #ifdef INCLUDE_LOGGING LOGSECTION("reduction_token_error"); LOGV(PCB.sn) LCV(PCB.ssx) LCV(PCB.reduction_token); for (int i = 0; i < PCB.ssx; i++) LOGV(i) LCV(PCB.ss[i]); #endif assert(0); } static void parse_stack_overflow(void) { reset_stk(); log_error("Nesting too deep. Analysis aborted."); errorList.top().setFatal(); parse_abort_flag = 1; PCB.exit_flag = AG_SEMANTIC_ERROR_CODE; } static int head_list_3(int); static void set_prec(int,int); // void range(int, int); /* static void disregard(int tn) { LOGSECTION("disregard"); iws(); if (n_disregard_list) { int *p = disregard_list; while (n_disregard_list--) aws(*p++); DEALLOCATE(disregard_list); } xws(tn); disregard_list = build_list(); n_disregard_list = fis(); } */ static void pgg24_error(const char *msg, int contextFlag=0) { LOGSECTION("pgg24_error"); LOGV(msg); LOGV(contextFlag); LOGV(PCB.line) LCV(PCB.column); LOGV(ERROR_CONTEXT.y) LCV(ERROR_CONTEXT.x); int line, column; if (contextFlag) { line = ERROR_CONTEXT.y; column = ERROR_CONTEXT.x; } else { line = PCB.line; column = PCB.column; } errorList.push(Error(line, column, msg)); } static void log_syntax_error(void) { LOGSECTION("log_syntax_error"); #ifdef INCLUDE_LOGGING { LOGV(PCB.sn) LCV(PCB.ssx) LCV(PCB.token_number); for (int i = 0; i < PCB.ssx; i++) LOGV(i) LCV(PCB.ss[i]); } #endif int flag = PCB.error_frame_token == pgg_c_comment_token || PCB.error_frame_token == pgg_embedded_c_token; LOGV(flag); reset_stk(); #ifdef INCLUDE_LOGGING { LOGV(PCB.sn) LCV(PCB.ssx) LCV(PCB.token_number); for (int i = 0; i < PCB.ssx; i++) LOGV(i) LCV(PCB.ss[i]); } #endif ssprintf("%s in %s", PCB.error_message, pgg_token_names[PCB.error_frame_token]); LOGS(string_base); pgg24_error(string_base, flag && PCB.token_number == pgg_eof_token); rcs(); #ifdef INCLUDE_LOGGING { LOGV(PCB.sn) LCV(PCB.ssx) LCV(PCB.token_number); for (int i = 0; i < PCB.ssx; i++) LOGV(i) LCV(PCB.ss[i]); } #endif LOGS("error logged"); errorList.top().setFatal(); LOGS("fatal flag set"); syntax_error_flag++; #ifdef INCLUDE_LOGGING { LOGV(PCB.sn) LCV(PCB.ssx) LCV(PCB.token_number); for (int i = 0; i < PCB.ssx; i++) LOGV(i) LCV(PCB.ss[i]); } #endif if (errorList.size() < 50) return; log_error("Too many errors. Parse aborted."); errorList.top().setFatal(); PCB.exit_flag = AG_SYNTAX_ERROR_CODE; } static int head_list_3(int type) { LOGSECTION("head_list_3"); LOGV(type); int i, n = tis(); for (i = 0; i < n; i ++) { Token token(list_base[i]); int ptt = token->value_type; LOGV(ptt) LCV(type); if (ptt && ptt != type) { ssprintf("Type Redefinition of T%03d: ", (int) token); atkn(token); log_error(); } token->value_type = type; /* if (ptt == 0 && token->rp_arg && type == void_token_type) { //ssprintf("Void token, %s, used as parameter", dict_str(tkn_dict,token->token_name)); ssprintf("Void token, %s, used as parameter", token->token_name->string.pointer()); log_error(); } */ } return type; } static void set_prec(int left, int right){ LOGSECTION("set_prec"); int n = tis(); precedence_level++; while (n--) { Token token(list_base[n]); token->left_associative = left; token->right_associative = right; token->precedence_level = precedence_level; token->operatorCandidate = 1; } rws(); } static void set_sticky(void){ LOGSECTION("set_sticky"); int n = tis(); while (n--) { Token token(list_base[n]); token->sticky = 1; } rws(); } static void set_subgrammar(void){ LOGSECTION("set_subgrammar"); int n = tis(); while (n--) { Token token = list_base[n]; token->subgrammar = 1; } rws(); } static void set_hidden(void) { LOGSECTION("set_hidden"); int *lb = list_base; int n = tis(); //while (n--) map_token_number[*lb++].fine_structure = 1; while (n--) Token(*lb++)->fine_structure = 1; rws(); } static void set_lexeme(void) { LOGSECTION("set_lexeme"); int n = tis(); while (n--) { Token token = list_base[n]; token->lexeme = 1; } rws(); } static void set_reserved_words(void) { LOGSECTION("set_reserved_words"); int n = tis(); while (n--) { Token token(list_base[n]); token->reserved_word = 1; } rws(); } void parse(void) { pgcb.pointer = input_base; pgg(); } #line 567 "pgg24.cpp" #ifndef CONVERT_CASE #define CONVERT_CASE(c) (c) #endif #ifndef TAB_SPACING #define TAB_SPACING 8 #endif #define ag_rp_1(t) (production(t)) #define ag_rp_2() (nPrologueSegments = 1) #define ag_rp_5(type) (iws(),type) #define ag_rp_6(type) (concat_list(),type) #define ag_rp_7() (0) #define ag_rp_8(d) (head_list_3(d)) #define ag_rp_9(x) (sws(head_list_2(x))) #define ag_rp_10(x) (aws(head_list_2(x))) #define ag_rp_11() (0) #define ag_rp_12() (1) #define ag_rp_13() (Cast::create()) #define ag_rp_14() (Cast::create().requireWrapper()) #define ag_rp_15(n) (sws(n)) #define ag_rp_16(n) (aws(n)) #define ag_rp_17(pn) (sws((iws(),vp_form3(pn)))) #define ag_rp_18(s) (vp_form3(s)) #define ag_rp_19(n) (sws(form_spec_2(form1(),n))) #define ag_rp_20(n) (sws(n)) #define ag_rp_21(n) (aws(n)) #define ag_rp_22(s) (form_spec_2(makeRule(ruleElementStack.pop()),s)) #define ag_rp_23(e, p) (ruleElementStack.top().push(RuleElement(e,p))) #define ag_rp_24(e, p) (ruleElementStack.top().push(RuleElement(e,p))) #define ag_rp_25() (ruleElementStack.push(AgStack<RuleElement>())) #define ag_rp_26() (0) #define ag_rp_27() (proc_spec_4(0)) #define ag_rp_28() (proc_spec_4(1)) #define ag_rp_29() (concat_string()) #define ag_rp_30() (sss("::")) #define ag_rp_31() (concat_string()) #define ag_rp_32() (ass("::")) #define ag_rp_33() (concat_string()) #define ag_rp_34() (concat_string()) #define ag_rp_35() (acs('>'), concat_string()) #define ag_rp_36() (acs('<')) #define ag_rp_37() (acs(','), concat_string()) #define ag_rp_38() (scs('(')) #define ag_rp_39() (concat_string(), acs(')')) #define ag_rp_40() (sss(" *")) #define ag_rp_41() (concat_string()) #define ag_rp_42() (concat_string()) #define ag_rp_43(c) (scs(c)) #define ag_rp_44(c) (acs(c)) #define ag_rp_45(c) (acs(' '), acs(c)) #define ag_rp_46(c) (sss("enum "), acs(c)) #define ag_rp_47(c) (acs(c)) #define ag_rp_48(c) (acs(' '), acs(c)) #define ag_rp_49(x) (x & 0x1f) #define ag_rp_50(c) ((character_seen=1),c) #define ag_rp_51(s, n) (s*n) #define ag_rp_52() (1) #define ag_rp_53() (-1) #define ag_rp_54(n) (n) #define ag_rp_55(n) (n) #define ag_rp_56(d) (d - '0') #define ag_rp_57(n, d) (10*n + d - '0') #define ag_rp_58() (0) #define ag_rp_59(n, d) (8*n + d - '0') #define ag_rp_60(d) (d) #define ag_rp_61(n, d) (16*n + d) #define ag_rp_62(d) (d-'0') #define ag_rp_63(d) ((d&7)+9) #define ag_rp_64(p) (vp_8a(mid_line(p))) #define ag_rp_65(n) (form_element_1(n)) #define ag_rp_66(u, i) (new CharSetUnion(u,i)) #define ag_rp_67(u, i) (new CharSetDifference(u,i)) #define ag_rp_68(i, n) (new CharSetIntersection(i,n)) #define ag_rp_69(n) (new CharSetComplement(n)) #define ag_rp_70(c) (new IndividualCode(c)) #define ag_rp_71(c) (new IndividualChar(c)) #define ag_rp_72() (ss2()) #define ag_rp_73(x) (x) #define ag_rp_74(l, r) ((character_seen=1),new CharRange(l,r)) #define ag_rp_75(l, r) (new CodeRange(l,r)) #define ag_rp_76(n) (definition_1(n)) #define ag_rp_77(p) (definition_2(p)) #define ag_rp_78(p) (defineImmediateProc(Procedure(p))) #define ag_rp_79() (definition_3(enum_base++)) #define ag_rp_80(n) (definition_3(enum_base = n), enum_base++) #define ag_rp_81(n) (definition_3(enum_base = n), enum_base++) #define ag_rp_82() (ics()) #define ag_rp_83(n) (null_warning(n)) #define ag_rp_84() ('\a') #define ag_rp_85() ('\b') #define ag_rp_86() ('\f') #define ag_rp_87() ('\n') #define ag_rp_88() ('\r') #define ag_rp_89() ('\t') #define ag_rp_90() ('\v') #define ag_rp_91() ('\\') #define ag_rp_92() ('\?') #define ag_rp_93() ('\'') #define ag_rp_94() ('"') #define ag_rp_95(n) (n&7) #define ag_rp_96(n, d) (n*8 + (d&7)) #define ag_rp_97(n, d) (n*8 + (d&7)) #define ag_rp_98(x) (x) #define ag_rp_99(c) (acs(c)) #define ag_rp_100(c) (acs(c)) #define ag_rp_101(c) (acs(c)) #define ag_rp_102(c) (acs(c)) #define ag_rp_103(c) (acs(c)) #define ag_rp_104(c) (acs(null_warning(c))) #define ag_rp_105(c) (acs(null_warning(c))) #define ag_rp_106(c) (acs(null_warning(c))) #define ag_rp_107(c) (acs(null_warning(c))) #define ag_rp_108() (0) #define ag_rp_109() (cVariableList << buildAgString()) #define ag_rp_110(c) (scs(c)) #define ag_rp_111(c) (acs(c)) #define ag_rp_112() (ConfigParam::set(1, pggErrorHandler)) #define ag_rp_113() (ConfigParam::set(0, pggErrorHandler)) #define ag_rp_114() (ConfigParam::set(pggErrorHandler)) #define ag_rp_115() (ConfigParam::set(pggErrorHandler)) #define ag_rp_116() (ConfigParam::set(pggErrorHandler)) #define ag_rp_117(n) (ConfigParam::set(n, pggErrorHandler)) #define ag_rp_118() (concat_string(), ConfigParam::set(1, pggErrorHandler)) #define ag_rp_119() (sss("distinguish ")) #define ag_rp_120() (set_prec(1,0)) #define ag_rp_121() (set_prec(0,1)) #define ag_rp_122() (set_prec(0,0)) #define ag_rp_123() (set_sticky()) #define ag_rp_124() (set_subgrammar()) #define ag_rp_125() (set_hidden()) #define ag_rp_126(t) (disregardList.push(t)) #define ag_rp_127() (extensionStack.push(cSegmentStack.pop())) #define ag_rp_128() (set_lexeme()) #define ag_rp_129() (set_reserved_words()) #define ag_rp_130(oldName, newName) (at(rename_macro_list,oldName,newName)) #define ag_rp_131() ((PCB).pointer-input_base-1) #define ag_rp_132(n) (distinguishSets.push(ParseTree(n))) #define ag_rp_133(n) (distinguishSets.push(ParseTree(n))) #define ag_rp_134(t) (sws(t)) #define ag_rp_135(t) (aws(t)) #define ag_rp_136() (vp_s()) #define ag_rp_137() (vp_5(vp_s())) #define ag_rp_138() (vp_1()) #define ag_rp_139() (vp_2()) #define ag_rp_140() (vp_3()) #define ag_rp_141() (vp_4()) #define ag_rp_142(n) (vp_5(form_element_1(n))) #define ag_rp_143(n) (vp_6(form_element_1(n))) #define ag_rp_144(n) (vp_7(form_element_1(n))) #define ag_rp_145() (vp_9()) #define ag_rp_146() (vp_10()) #define ag_rp_147() (proc_spec_4(0)) #define ag_rp_148() (proc_spec_4(1)) #define ag_rp_149() (proc_spec_4(0)) #define ag_rp_150() (proc_spec_4(1)) #define ag_rp_151(y) (cSegmentStack.top().end = y) #define ag_rp_152() (cSegmentStack.push(CSegment())) #define ag_rp_153() (PCB.pointer) #define ag_rp_154() (PCB.pointer) #define ag_rp_155() (cSegmentStack.push(CSegment())) #define ag_rp_156() (cSegmentStack.top().end = PCB.pointer) static void ag_rp_157(void) { #line 636 "pgg24.syn" if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token; #line 887 "pgg24.cpp" } #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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 3, 0, 0, 0, 1, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 0, 14, 0, 15, 0, 0, 16, 0, 0, 17, 18, 19, 0, 20, 21, 22, 23, 24, 25, 0, 26, 27, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 0, 0, 33, 34, 35, 36, 37, 38, 39, 0, 40, 0, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, 0, 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 63, 64, 0, 0, 65, 0, 66, 0, 67, 0, 68, 0, 0, 0, 0, 0, 0, 69, 70, 71, 72, 0, 0, 73, 74, 75, 76, 77, 78, 79, 80, 0, 0, 0, 0, 0, 0, 81, 0, 0, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 0, 0, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110, 0, 0, 0, 0, 0, 0, 0,111,112,113,114,115,116, 0,117,118,119,120,121,122,123,124, 0, 0, 125,126,127,128,129, 0,130, 0, 0, 0, 0, 0,131,132, 0,133,134,135, 136,137,138,139,140,141,142,143,144,145,146,147,148,149,150, 0, 0, 0, 0, 0,151,152,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154,155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,156 }; 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,154,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,110,120,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,119,125,255, 47,255, 42, 47,255,114, 116,255,115,255,105,255,110,120,255,102,120,255,101,255,110,115,255,101, 105,255,116,117,255, 47,100,101,104,108,110,114,115,119,255, 42, 47,255, 88,120,255, 47, 48, 58,255, 58,255, 42, 47,255, 46, 47,255, 46, 47,255, 45, 46, 47, 58, 63, 93,125,255, 45, 47,255, 42, 47,255, 88,120,255, 47, 48, 58, 92,255, 47,255, 47, 58,255,114,116,255,115,255,105,255,110,120, 255,102,120,255,101,255,110,115,255,101,105,255,116,117,255, 47,100,101, 104,108,110,114,115,119,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,255, 47, 58,255,114,116,255,115,255,105,255,110,120,255, 102,120,255,101,255,110,115,255,101,105,255,116,117,255,100,101,104,108, 110,114,115,119,255, 42, 47,255, 46, 47,255, 46, 47,255, 47, 93,125,255, 42, 47,255, 47, 92,255, 92,255, 34, 39, 63, 92, 97, 98,102,110,114,116, 118,120,255, 92,255, 46, 47,255, 46, 47,255, 47, 93,125,255, 46,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, 47,112,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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217, 0, 0, 0,200, 0,197, 0, 0,211, 0, 0,113, 0,239,113, 0,202, 193, 0, 0, 0, 0, 0,103,203, 0,194,205, 0, 0, 0,208,206, 0, 0, 196, 0,198,199, 0, 0, 0, 0,200, 0,197, 0, 0,211, 0,239,113, 0, 129,128, 0, 0, 0, 87, 0, 87, 0,239,113, 0,216,219, 0,215,218, 0, 2, 0, 0, 87,217, 0, 0, 0, 2,113, 0,239,113, 0,129,128, 0, 0, 0, 87,236, 0,239, 0,113, 87, 0,202,193, 0, 0, 0, 0, 0,103,203, 0,194,205, 0, 0, 0,208,206, 0, 0,196, 0,198,199, 0,113, 0, 0, 200, 0,197, 0, 0,211, 0,129,128, 0, 0, 0,239,113, 0, 2, 0, 0, 239,113, 0,129,128, 0, 0, 0, 0,129,128, 0,113, 0, 0,129,128, 0, 239, 0, 87,236, 0,239, 87, 0,202,193, 0, 0, 0, 0, 0,103,203, 0, 194,205, 0, 0, 0,208,206, 0, 0,196, 0,198,199, 0, 0, 0,200, 0, 197, 0, 0,211, 0,239,113, 0,216,219, 0,215,218, 0, 0, 0, 0, 0, 239,113, 0, 0,236, 0,236, 0,177,176,175,174,167,168,169,170,171,172, 173,181, 0, 0, 0,216,219, 0,215,218, 0,113, 0, 0, 0, 2, 0, 0, 0, 2, 0,216,219, 0,215,218, 0, 0,113,217, 0, 0, 0,216,219, 0, 215,218, 0, 0,113,217, 0, 0, 0, 0,113,217, 0,216,219, 0,215,218, 0, 0, 0, 0,216,219, 0, 0, 0,215,218, 0, 0, 0,215, 0, 0, 0, 2, 0,239,113, 0,216,219, 0,215,218, 0, 0, 0,217, 0, 0, 0,239, 207, 0,239,209, 0,239,204, 0,129,128, 0,239, 0, 0,129,128, 0, 0, 87, 0,239,236, 0,239,113, 0,216,219, 0,215,218, 0, 0, 0,217, 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, 33, 36, 0, 47, 49, 0, 32, 0, 61, 65, 0, 37, 70, 0, 74, 79, 0, 95, 98, 0, 4, 11, 13, 16, 6, 8, 19, 27, 29, 41, 35, 53, 40, 43, 88, 46, 0,102, 0, 0, 0, 0,104, 110, 0, 71, 0, 74, 0,118,121, 0,132,134, 0, 81, 0,146,150, 0, 86, 155, 0,159,164, 0, 68, 76, 78,126, 84,138, 89, 92,173, 0, 0, 0, 0, 0, 0, 0,105,108,180, 0,182, 0, 0, 0, 0,195,198, 0,202,205, 0, 184,186,117,189,191,120,123, 0,209,211, 0, 0, 0, 0, 0, 0, 0,137, 140,213,215, 0,217, 0,219,221, 0,225,231, 0,153, 0,156, 0,239,242, 0,253,255, 0,163, 0,267,271, 0,168,276, 0,280,285, 0,223,158,160, 247,166,259,171,174,294, 0, 0, 0, 0,187, 0, 0, 0, 0,301,192, 0, 0, 0, 0, 0, 0, 0,198,201, 0, 0, 0, 0,303,207, 0, 0, 0, 0, 305,213,307,309, 0,311,313, 0,315,321, 0,224, 0,227, 0,329,332, 0, 343,345, 0,234, 0,357,361, 0,239,366, 0,370,375, 0,229,231,337,237, 349,242,245,384, 0, 0, 0, 0,391,394, 0,398,401, 0,257,260,263, 0, 0, 0, 0,270,405, 0,407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,278, 0,411,414, 0,418,421, 0,409,293,296, 0,425, 0, 0, 0,305, 0,433,436, 0,440,443, 0,307,427,429,309,312, 0,456,459, 0, 463,466, 0,447,450,452,321,324, 0,470,473,475, 0,479,482, 0,486,489, 0,337,340, 0,493,496, 0,346, 0,500,503, 0,351, 0,507, 0, 0, 0, 358, 0, 0, 0, 0,515,518, 0,522,525, 0,360,362,511,365,368, 0,529, 531, 0,539,541, 0,546,548, 0, 0, 0, 0,551,386, 0, 0, 0, 0,392, 553, 0,555,557, 0, 0, 0, 0,566,569, 0,573,576, 0,559,401,562,404, 407, 0 }; static const unsigned short ag_key_index[] = { 4, 6, 49, 66, 0, 0, 0, 95, 0, 0, 0, 0, 0,111,115, 4,126, 0, 134, 95, 4,134,134, 66, 66, 66, 66, 0, 0, 0, 0, 0,143,148,150, 0, 0, 4,126,134,134,111, 0,177, 0, 0, 0, 0, 0, 0, 4, 0,143,190, 195,204,210, 4, 4, 4,195, 66, 66,216,148,148, 0,221,115, 66, 4,248, 266, 0, 0, 0, 0, 0, 4,266,273,276,204,111,291,190,190,299,204,204, 190, 0,303,291,204,190,315,315,190,327,333,190,276, 66, 66,204,190, 66, 0, 4,195,216, 0,148, 4, 66, 0, 66, 0,148,148,148,148,148,148,148, 66, 66,148,148,148,148,148,148, 4, 0,148, 0, 66, 66, 0, 0, 0, 4, 276, 0, 0, 0,291,291,291,291,291,343,349, 0,354,356,356,266, 0,371, 371,371,371,204, 0, 0,204,266,266,266,190,190,276,327,299, 0,190, 0, 0,221, 4,377,148,380,377,148,383,389, 0, 0,190, 0, 4, 0,148,395, 95, 0, 4, 0, 0,398, 4,291,266,266,266,190,266,266,371,190,291,371, 410,190,327,327, 0, 4,266,299,148,115,148,148,190,148, 66, 66, 0, 0, 291, 0,266, 0,148, 66,148, 66, 0,190, 0,266,190,115,148,190, 66,148, 66 }; 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, 117,109,0, 116,101,110,100,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, 114,97,112,112,101,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, 117,109,0, 116,101,110,100,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, 114,97,112,112,101,114,0, 58,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, 62,0, 47,0, 58,0, 10,0, 42,0, 47,0, 58,0, 47,0, 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 117,109,0, 116,101,110,100,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, 114,97,112,112,101,114,0, 62,0, 47,0, 42,0, 58,0, 10,0, 42,0, 58,0, 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 117,109,0, 116,101,110,100,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, 114,97,112,112,101,114,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 10,0, 10,0, 47,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 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, 99,98,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[] = { 45,252,252,252,252,252,252,252,252,104,110,112,112,108,252,252,252,252, 252,252,252,252,252,252,252,252, 45,252,252,252,252,252,104, 15,161,253, 62,253,145, 33, 21, 31, 97, 25, 7, 23,253,253,134,250,250,250,250,250, 250,250,251,251,184, 82, 94, 13, 93,214,253,137,137,137,137,137,137,249, 249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249, 249, 19,179, 27,119,249,253,137,137,137,137,137,137,249,249,249,249,249, 249,249,249,249,249,249,249,249,249,249,249,249,249,249,249, 17, 37, 29, 35,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252, 252,252,252,252 }; #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[] = { 105,237, 0 }; static const unsigned char ag_tstt[] = { 249,239,137,113,110,108,104,45,21,19,17,0,3,4,5,38,105,237, 253,252,251,250,249,239,238,214,184,179,161,145,137,134,119,112,110,108,104, 97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,105,237, 239,104,0,3,105,237, 249,137,113,110,108,45,21,19,17,0,39,40,51,109, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,110,108,104,97,94, 93,82,62,45,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,115,116, 110,0, 110,108,0,109, 249,239,211,208,206,205,203,202,200,199,198,197,196,194,193,137,113,112,110, 108,104,103,45,35,27,21,19,17,0,3,51,105,109,111,237, 249,137,45,21,19,17,0,20,41,44,46,47,48,49,53,58,59,60,61,99,220, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,104,97,94,93,82,62, 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0, 110,0, 110,108,0,109, 110,0, 251,250,249,239,137,134,129,128,119,113,110,108,104,97,87,35,33,25,23,21,0, 3,4,8,9,51,105,106,107,109,237, 249,137,87,0,61,63,83,99, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,110,108,104, 97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,15,13,7,0,109,222,223,224, 251,250,249,239,219,218,217,216,215,214,184,145,137,134,113,110,108,104,97, 94,93,87,62,45,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,105,237, 249,137,0,58,60,61,99, 7,0,6, 249,239,211,208,206,205,203,202,200,199,198,197,196,194,193,137,113,110,108, 104,103,35,27,0,3,4,5,105,187,237, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,104,97,94, 93,82,62,37,35,33,31,29,27,25,23,21,19,15,13,7,0,51,105,221,225,228,229, 237, 62,13,0,12, 2,0,1,54, 113,110,108,0,39,51,109, 113,110,108,0,39,51,109, 113,110,108,0,39,51,109, 113,110,108,0,39,51,109, 249,137,45,21,19,17,0,20,42,43,46,47,48,49,50,53,58,59,60,61,99,220, 45,0, 110,0, 110,0, 110,108,0,107,109, 253,252,251,250,249,239,236,214,184,179,161,145,137,134,129,128,119,113,112, 110,108,104,97,94,93,87,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,3, 51,105,106,107,109,237, 249,239,137,104,0,88, 113,110,108,97,94,93,87,31,29,27,21,7,0,84,85,92, 31,0, 110,0, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,110,108,104, 97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,15,13,7,0,109,222, 251,250,249,239,137,134,104,0,3,105,237, 62,0, 7,0,6, 251,250,249,239,161,137,134,129,128,119,113,110,108,104,87,35,33,29,25,23, 21,19,17,15,0,3,4,8,9,51,105,106,107,109,237, 249,137,0,60,61,99, 249,211,208,206,205,203,202,200,199,198,197,196,194,193,137,113,110,108,103, 35,27,0,39,40,51,109, 27,0,26, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,104,97,94,93,82,62, 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,243,244,245, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,104,97,94,93,82,62, 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,246,247,248, 161,0, 33,0, 110,108,0,109, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,110,108,104, 97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,226, 29,0,28, 253,252,251,250,249,239,236,214,184,179,161,145,137,134,129,128,119,113,112, 110,108,104,97,94,93,87,62,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4, 8,9,51,105,106,107,109,237, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,0,14,16,18,20, 22,24,34,61,99,117,118,121,123,125,140,141,142,143,144,146,152,153,155, 158,159, 239,113,110,108,104,45,7,2,0,3,4,5,105,237, 251,250,249,239,161,137,134,129,128,119,113,110,108,104,45,37,35,33,25,23, 21,19,17,15,13,0,3,4,5,105,237, 251,250,249,161,137,134,129,128,119,113,110,108,45,37,35,33,25,23,21,19,17, 15,13,0,12,57,73,75,76,77,78, 249,239,137,113,112,110,108,104,45,21,19,17,0,3,51,105,109,111,237, 249,239,137,113,112,110,108,104,45,21,19,17,0,3,51,105,109,111,237, 249,239,137,113,112,110,108,104,45,21,19,17,0,3,51,105,109,111,237, 249,239,137,113,112,110,108,104,45,37,21,19,17,2,0,1,3,36,51,54,55,56,105, 109,111,237, 113,110,108,45,0,39,51,52,109, 113,110,108,45,0,39,51,52,109, 239,104,0,3,4,105,237, 249,239,137,104,0,3,4,5,105,237, 249,239,137,104,0,89, 97,21,0,20,86,90,91,95,96,98, 249,239,137,104,87,0,3,4,5,105,237, 249,137,87,0,61,63,83,99, 113,110,108,97,93,31,29,27,21,7,0, 249,239,137,113,110,108,104,0,3,4,8,9,51,105,106,107,109,237, 249,211,208,206,205,203,202,200,199,198,197,196,194,193,137,103,35,27,0,34, 61,99,102,157,188,189,190,191,192,201, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,110,108,104,97,94, 93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,242, 253,252,251,250,249,214,184,179,145,137,134,119,112,104,97,94,93,82,62,37, 35,33,31,29,27,25,23,21,19,17,15,13,7,0,243, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,110,108,104,97,94, 93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,242, 253,252,251,250,249,214,184,179,161,145,137,134,119,112,104,97,94,93,82,62, 37,35,31,29,27,25,23,21,19,17,15,13,7,0,246, 110,0, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,110,108,104, 97,94,93,82,62,37,35,33,31,27,25,23,21,19,17,15,13,7,0,51,105,228,229, 230,237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 253,252,251,250,249,239,236,214,184,179,161,145,137,134,119,113,112,110,108, 104,97,94,93,62,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,9,51,105, 106,107,109,237, 253,252,251,250,249,236,214,184,179,161,145,137,134,119,112,97,94,93,62,37, 35,33,31,27,25,23,21,19,17,15,13,7,0,48,81,220,232, 251,250,249,239,161,137,134,129,128,119,113,110,108,104,35,33,25,23,21,19, 17,15,0,3,4,8,9,51,105,106,107,109,237, 251,250,249,239,161,137,134,129,128,119,113,110,108,104,87,35,33,25,23,21, 19,17,15,13,0,3,4,8,9,51,105,106,107,109,237, 253,252,251,250,249,214,184,181,179,177,176,175,174,173,172,171,170,169,168, 167,145,137,134,119,112,104,97,94,93,82,62,37,35,33,31,29,27,25,23,21, 19,17,15,13,7,0,148,149,150,151,160,162,163,164,165,178,180, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,0,68,69,75,78, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,13,0,12,68,69, 71,72,73,74,75,78, 214,0, 251,250,249,239,137,134,129,128,119,113,110,108,104,35,33,25,23,21,0,3,4,8, 9,51,105,106,107,109,237, 251,250,249,239,137,134,129,128,119,113,110,108,104,35,33,25,23,21,0,3,4,8, 9,51,105,106,107,109,237, 251,250,134,129,128,0,124,126,127,130, 253,251,250,249,214,184,179,161,145,137,134,119,97,94,93,82,62,37,35,33,31, 29,27,25,23,21,19,17,15,13,7,0, 154,0, 253,252,251,250,249,214,184,181,179,177,176,175,174,173,172,171,170,169,168, 167,161,145,137,134,119,112,104,97,94,93,82,62,37,35,31,29,27,25,23,21, 19,17,15,13,7,0,122,148,149,150,151,178,180, 251,250,249,239,137,134,129,128,119,113,110,108,104,35,33,25,23,21,0,3,4,8, 9,51,105,106,107,109,237, 251,250,249,137,134,129,128,119,35,33,25,23,21,0,20,22,24,34,61,99,117,118, 121,123,125,140,142,143,144,146,152,153, 219,218,217,216,215,214,184,154,145,113,110,108,45,37,31,29,27,25,23,13,11, 7,0, 219,218,217,216,215,214,184,154,145,113,110,108,45,37,31,29,27,25,23,13,11, 7,0, 251,250,249,137,134,129,128,119,35,33,25,23,21,0,20,22,24,34,61,99,117,118, 121,123,125,144,146,152,153, 145,0, 217,214,25,23,11,0,10,22,24, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,0,14,16,18,20, 22,24,34,61,79,99,117,118,121,123,125,138,139,140,141,142,143,144,146, 152,153,158,159, 253,252,251,250,249,236,214,184,179,161,145,137,134,119,112,97,94,93,62,37, 35,33,31,27,25,23,21,19,17,15,13,7,0,48,81,220,232, 113,110,108,45,37,13,7,0,6,12,73,76, 37,0,36,55, 251,250,249,239,161,137,134,129,128,119,113,110,108,104,35,33,25,23,21,19, 17,15,0,3,4,8,9,51,105,106,107,109,237, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,0,75,77,78, 37,0,36,55, 110,108,45,0,109, 249,239,137,113,112,110,108,104,45,21,19,17,0,3,51,105,109,111,237, 249,239,137,113,112,110,108,104,45,37,21,19,17,2,0,1,3,36,51,54,55,56,105, 109,111,237, 239,104,0,3,105,237, 249,137,0,61,99, 249,239,137,104,0,3,4,5,105,237, 249,239,137,113,110,108,104,97,93,31,29,27,21,7,0,3,4,5,105,237, 249,137,0,61,99, 97,21,0,20,86,90,91,95,96,98, 97,21,0,20,91,95,96,98, 93,7,0, 239,104,0,3,4,105,237, 239,104,0,3,4,65,105,237, 239,104,0,3,4,105,237, 239,104,0,3,4,105,237, 239,104,0,3,4,105,195,237, 239,104,0,3,4,105,237, 239,104,0,3,4,105,237, 113,110,108,29,7,0,6,51,67,106,107,109,212, 113,110,108,29,7,0,6,51,67,106,107,109,212, 239,104,0,3,4,105,195,237, 239,104,0,3,4,105,195,237, 239,104,0,3,4,105,195,237, 239,104,0,3,4,105,195,237, 239,104,0,3,4,105,195,237, 239,104,0,3,4,105,195,237, 239,113,110,108,104,0,3,4,8,51,105,106,107,109,237, 249,137,0,61,99, 251,250,249,239,137,134,104,13,0,3,4,5,105,237, 249,137,0,61,99, 13,0,12, 113,110,108,27,0,39,40,51,109, 161,0, 33,0, 110,108,0,109, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,110,108,104, 97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,226, 253,252,251,250,249,236,214,184,179,161,145,137,134,119,112,97,94,93,62,37, 35,33,31,27,25,23,21,19,15,13,7,0,228,229,233,234, 82,0, 250,134,0, 251,250,137,134,0,131,136, 250,134,0, 250,134,0, 251,137,0, 251,250,137,134,0, 253,252,249,214,184,181,179,177,176,175,174,173,172,171,170,169,168,167,161, 145,119,112,104,97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7, 0,148,149,150,151,165,178,180, 219,218,216,215,37,29,27,13,7,0,6,12,73,76, 219,216,37,27,0,26,36,70, 37,0,36,70, 218,37,0,36,70, 37,0,36,70, 215,29,0,28, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 251,250,137,134,0,131,136, 250,134,0, 251,250,134,0, 239,219,218,217,216,215,214,184,154,145,113,110,108,104,45,37,31,29,27,25, 23,13,11,7,0,3,4,5,105,237, 239,219,218,217,216,215,214,184,154,145,113,110,108,104,45,37,31,29,27,25, 23,13,11,7,0,3,4,5,105,237, 251,250,239,134,129,128,119,113,110,108,104,33,25,23,0,3,4,8,9,51,105,106, 107,109,237, 33,23,0,32, 31,25,23,0,22,24,30, 251,250,249,239,137,134,129,128,119,113,110,108,104,35,33,25,23,21,0,3,4,8, 9,51,105,106,107,109,237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 251,250,249,137,134,129,128,119,35,33,25,23,21,0,20,22,24,34,61,99,117,118, 121,123,125,142,144,146,152,153, 251,250,249,137,134,129,128,119,35,33,25,23,21,0,20,22,24,34,61,99,117,118, 121,123,125,142,144,146,152,153, 253,252,251,250,249,236,214,184,179,161,145,137,134,119,112,97,94,93,62,37, 35,33,31,27,25,23,21,19,17,15,13,7,0,48,81,220,232, 217,214,25,23,11,0,10,22,24, 219,218,216,215,184,113,110,108,45,37,29,27,13,7,0,80, 82,0, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,0,14,16,18,20, 22,24,34,61,79,99,117,118,121,123,125,138,139,140,141,142,143,144,146, 152,153,158,159, 249,137,0,61,99, 31,0,30, 249,239,137,104,87,0,3,4,5,105,237, 239,113,110,108,104,97,93,31,29,27,21,7,0,3,4,5,105,237, 239,207,104,0,3,105,237, 239,104,17,0,3,16,105,237, 239,209,104,0,3,105,237, 239,207,104,0,3,105,237, 239,104,17,0,3,16,105,237, 239,204,104,0,3,105,237, 251,250,249,239,161,137,134,129,128,119,104,35,33,25,23,21,19,17,0,3,16,18, 20,22,24,34,61,99,105,117,118,121,123,125,138,140,141,142,143,144,146, 152,153,158,159,237, 29,0,28, 249,137,0,61,99,156, 251,250,249,137,134,129,128,119,35,33,29,25,23,21,0,20,22,24,34,61,99,117, 118,121,123,125,140,142,143,144,146,152,153, 17,0,16, 251,250,249,239,137,134,113,110,108,104,17,0,3,51,105,106,107,109,237, 13,0,12, 251,250,249,239,137,134,104,0,3,105,237, 251,250,249,161,137,134,129,128,87,25,23,0,22,24,61,63,83,99,118,123,125, 158,159, 249,239,211,208,206,205,203,202,200,199,198,197,196,194,193,137,113,112,110, 108,104,103,35,27,0,3,34,51,61,99,102,105,109,111,157,190,191,192,201, 237, 110,0, 253,252,251,250,249,239,214,184,179,161,145,137,134,119,113,112,110,108,104, 97,94,93,82,62,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,51,105,228, 229,230,237, 161,0, 33,0, 253,252,251,250,249,239,236,214,184,179,161,145,137,134,119,112,104,97,94, 93,62,37,35,33,31,27,25,23,21,19,15,13,7,0,3,105,228,229,234,237, 239,113,110,108,104,45,0,3,4,5,105,237, 251,250,137,134,0,136, 239,219,218,216,215,214,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105, 237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,15,0,69,75,78, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 251,250,137,134,0,136, 251,250,134,129,128,119,33,25,23,0,22,24,117,118,121,123,125,153, 253,252,251,250,249,214,184,181,179,177,176,175,174,173,172,171,170,169,168, 167,161,145,137,134,119,112,104,97,94,93,82,62,37,35,31,29,27,25,23,21, 19,17,15,13,7,0,122,148,149,150,151,178,180, 239,219,218,217,216,215,214,184,154,145,113,110,108,104,45,37,31,29,27,25, 23,13,11,7,0,3,4,5,105,237, 239,219,218,217,216,215,214,184,145,113,110,108,104,93,45,37,31,29,27,25,23, 13,11,7,0,3,4,5,105,237, 251,250,249,137,134,129,128,119,35,33,25,23,21,0,20,22,24,34,61,99,117,118, 121,123,125,144,146,152,153, 145,0, 145,0, 82,0, 249,239,137,113,110,108,104,0,3,4,8,9,51,105,106,107,109,237, 239,219,218,216,215,113,110,108,104,45,37,29,27,0,3,4,5,105,237, 219,218,216,215,184,113,110,108,45,37,29,27,13,7,0,80, 239,104,0,3,4,105,237, 249,137,87,0,61,63,64,66,83,99, 239,104,0,3,4,105,237, 239,104,0,3,4,105,195,237, 251,250,249,161,137,134,129,128,119,35,33,25,23,21,19,17,0,16,18,20,22,24, 34,61,99,117,118,121,123,125,138,140,141,142,143,144,146,152,153,158, 159,213, 239,104,17,0,3,4,5,105,237, 13,0,12, 25,23,0,22,24, 249,137,0,61,99,156, 161,0,158,159, 253,252,251,250,249,214,184,181,179,177,176,175,174,173,172,171,170,169,168, 167,161,145,137,134,119,112,104,97,94,93,82,62,37,35,31,29,27,25,23,21, 19,17,15,13,7,0,122,148,149,150,151,178,180, 33,0,32, 239,219,218,216,215,184,113,110,108,104,45,37,29,27,13,7,0,3,4,5,105,237, 249,137,0,185,186, 239,104,17,0,3,16,105,237, 113,110,108,29,7,0,6,51,67,106,107,109,212, 249,239,137,104,0,3,105,210,237, 113,110,108,29,7,0,6,51,67,106,107,109,212, 17,0,48,220, 251,250,134,129,128,119,33,25,23,0,22,24,117,118,121,123,125, 33,0,32, 251,250,249,239,219,218,216,215,137,134,113,110,108,104,45,37,29,27,13,7,0, 3,4,5,105,237, 251,250,249,137,134,129,128,119,35,33,25,23,21,0,20,22,24,34,61,99,117,118, 121,123,125,140,142,143,144,146,152,153, 249,137,87,0,61,63,64,83,99, 251,250,249,239,137,134,104,0,3,4,105,237, 251,250,249,161,137,134,129,128,119,35,33,29,25,23,21,19,17,0,16,18,20,22, 24,34,61,99,117,118,121,123,125,138,140,141,142,143,144,146,152,153,158, 159, 25,23,0,22,24, 249,239,137,104,0,3,105,210,237, 251,250,249,137,134,0, }; static unsigned const char ag_astt[4178] = { 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,5,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,5,5,1,9,8,1,9,5,5, 5,5,5,5,5,7,3,1,3,1,3,1,2,2,8,1,1,1,7,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,1,3,3,1,1,2,2,1,7, 1,1,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,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,1,1,1,2,2, 1,2,1,1,1,1,1,2,2,1,2,1,1,1,1,1,1,1,1,1,1,1,8,7,1,1,1,1,1,1,4,1,1,1,4,1,1, 2,2,7,1,1,3,2,7,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,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,7,1,1,1,1,1,1,1,1,7,2,1,5,5,5,5,5,5,5, 5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,7,2,1,1,9,1,7,3,1,3,1,1,8,1,8,1,7,1,1,3,1, 1,1,1,2,1,2,9,7,3,3,1,1,1,8,1,8,1,7,1,1,3,1,1,1,1,1,7,2,1,5,5,5,5,5,1,1,1, 1,7,2,2,2,2,2,1,2,1,7,2,10,10,10,1,5,5,5,5,10,10,5,5,5,1,5,5,5,5,5,5,7,1,1, 3,1,1,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,2,2, 1,5,1,2,3,1,1,9,9,9,1,9,9,1,7,1,1,1,1,5,5,2,2,2,5,5,5,1,1,1,5,1,1,1,1,1,7, 1,1,1,2,2,1,2,1,1,1,1,1,2,2,1,2,1,1,1,1,1,1,1,1,1,1,4,1,1,2,1,2,9,7,3,3,1, 1,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, 317,317,317,317,317,1,315,317,317,317,317,317,317,317,317,317,317,317,317, 317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317, 317,1,318,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,132,132,9,9,9,9,9,9,132,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,4,9,134, 127,5, 10,10,6,10, 24,1,24,24,24,24,24,24,24,24,24,24,24,24,24,24,4,129,12,12,128,24,24,24,24, 24,24,24,7,128,11,128,12,128,1, 105,105,28,13,19,15,8,14,27,28,26,25,24,23,22,18,17,52,21,16,20, 131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131, 131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,133, 126,10, 29,29,11,29, 124,12, 6,6,6,1,6,6,6,6,6,4,30,30,32,6,6,6,6,6,6,6,13,32,32,14,14,31,32,14,14,30,1, 105,105,33,14,34,35,34,16, 288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,36,36,288, 288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288, 15,36,37,37,290, 106,106,106,1,3,3,3,3,3,3,3,3,106,106,3,3,3,38,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,16,38,38,111,38,1, 105,105,17,40,52,39,16, 41,50,42, 3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,43,43,43,2,3,3,3,19,2,2,43,2,44,1, 50,50,50,50,50,1,50,50,50,45,50,50,50,50,4,50,50,50,50,50,50,50,50,50,46,50, 291,50,50,50,50,50,50,50,50,20,49,50,51,50,48,47,1, 54,52,54,53, 55,40,56,41, 4,5,5,23,57,6,5, 4,5,5,24,58,6,5, 4,5,5,25,59,6,5, 4,5,5,26,60,6,5, 105,105,25,13,19,15,27,14,28,28,62,61,61,61,61,22,18,17,52,21,16,20, 29,28, 125,29, 63,30, 30,30,31,117,30, 114,114,114,114,114,1,114,114,114,114,114,114,114,114,114,114,114,4,114,30, 30,2,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, 114,114,114,32,2,31,2,115,115,30,1, 88,88,88,88,33,64, 82,82,82,66,67,82,65,82,82,82,66,82,34,69,66,68, 70,35, 285,36, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,36,36,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 37,36,287, 107,107,107,1,107,107,2,4,2,2,1, 54,54, 41,51,42, 6,6,6,1,6,6,6,6,6,6,4,30,30,32,6,6,6,6,6,6,6,6,6,6,41,32,32,8,8,31,32,8,8, 30,1, 105,105,42,53,39,16, 71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,4,5,5,71,71,23,43,7,71,6,5, 72,44,229, 74,74,74,74,74,74,74,73,324,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,45,74,74,326, 76,76,76,76,76,76,76,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,332,76,76, 76,76,76,76,76,76,76,76,76,46,76,76,334, 297,47, 296,48, 77,77,49,77, 78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78, 78,78,78,298,78,78,78,78,78,78,78,78,78,50,78, 79,51,284, 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,6,6,4,6,30,30,32,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 6,6,6,6,52,32,32,10,10,31,32,10,10,30,1, 139,139,105,194,105,139,139,139,91,94,93,88,89,13,82,83,80,53,81,86,85,95, 142,141,98,176,16,97,97,96,90,141,100,183,99,100,99,99,99,92,184,87,84, 1,3,3,3,2,3,3,3,54,2,2,55,2,1, 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,55,2,2,5,2,1, 77,77,77,77,77,77,77,77,77,78,78,78,78,78,77,77,77,77,77,77,77,77,52,56,102, 104,70,103,70,71,101, 33,1,33,4,129,12,12,128,33,33,33,33,57,128,11,128,12,128,1, 32,1,32,4,129,12,12,128,32,32,32,32,58,128,11,128,12,128,1, 31,1,31,4,129,12,12,128,31,31,31,31,59,128,11,128,12,128,1, 30,1,30,4,129,12,12,128,30,105,30,30,30,55,60,56,128,106,11,42,107,107,128, 12,128,1, 4,5,5,36,61,109,108,39,5, 4,5,5,36,62,110,108,38,5, 1,111,121,111,111,111,1, 112,1,112,2,64,2,2,112,2,1, 90,90,90,90,65,113, 114,13,66,98,86,117,86,116,115,117, 3,1,3,2,3,67,2,2,96,2,1, 105,105,33,68,34,118,34,16, 83,83,83,85,83,83,83,83,85,83,69, 6,1,6,4,30,30,32,70,32,32,56,56,31,32,56,56,30,1, 105,120,121,122,123,124,125,128,129,130,131,132,133,119,105,134,94,230,71, 137,138,16,136,126,139,232,139,139,135,127, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,72,2,2,17,2,1, 321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321, 321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,73, 321, 323,323,323,323,323,323,323,73,323,323,323,323,323,323,323,323,323,323,323, 323,323,323,323,323,323,323,323,323,323,323,323,323,323,325,323, 329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329, 329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,75, 329, 331,331,331,331,331,331,331,75,331,331,331,331,331,331,331,331,331,331,331, 331,331,331,331,331,331,331,331,331,331,331,331,331,331,333,331, 295,77, 299,299,299,299,299,1,299,299,299,45,299,299,299,299,4,299,299,299,299,299, 299,299,299,299,299,299,46,299,299,299,299,299,299,143,299,299,299,292, 142,299,141,140,299,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,79,2,2,18,2,1, 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,4,6,30,30,32,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 6,80,32,32,11,11,31,32,11,11,30,1, 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,306,306,306,15,306,306,306,81,280,145,20,144, 6,6,6,1,6,6,6,6,6,6,4,30,30,32,6,6,6,6,6,6,6,6,82,32,32,13,13,31,32,13,13, 30,1, 6,6,6,1,6,6,6,6,6,6,4,30,30,32,6,6,6,6,6,6,6,6,6,6,83,32,32,12,12,31,32,12, 12,30,1, 215,215,216,216,215,215,215,147,146,208,207,206,205,204,203,202,201,200,199, 198,215,216,216,215,215,215,215,215,215,215,215,215,215,215,215,215,215, 215,215,215,215,215,215,215,215,84,215,220,197,222,152,151,150,152,215, 149,148, 77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,85,154,61,153,101, 77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,52,86,102,156,61,157,155, 66,158,153,101, 159,269, 6,6,6,1,6,6,6,6,6,4,30,30,32,6,6,6,6,6,88,32,32,16,16,31,32,16,16,30,1, 6,6,6,1,6,6,6,6,6,4,30,30,32,6,6,6,6,6,89,32,32,15,15,31,32,15,15,30,1, 148,148,150,160,160,90,163,162,161,160, 164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164, 164,164,164,164,164,164,164,164,164,164,164,164,91, 165,92, 166,166,166,166,166,166,166,147,146,208,207,206,205,204,203,202,201,200,199, 198,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166, 166,166,166,166,166,166,166,166,93,166,166,166,166,166,149,148, 6,6,6,1,6,6,6,6,6,4,30,30,32,6,6,6,6,6,94,32,32,21,21,31,32,21,21,30,1, 139,139,105,105,139,139,139,91,94,93,88,89,13,95,95,142,141,98,176,16,97,97, 96,90,141,167,99,167,99,99,99,92, 175,175,175,175,175,175,175,179,175,175,175,175,175,175,175,175,175,175,175, 175,175,175,96, 174,174,174,174,174,174,174,178,174,174,174,174,174,174,174,174,174,174,174, 174,174,174,97, 139,139,105,105,139,139,139,91,94,93,88,89,13,98,95,142,141,98,176,16,97,97, 96,90,141,167,167,167,92, 168,160, 170,171,88,89,169,182,277,172,173, 139,139,105,194,105,139,139,139,91,94,93,88,89,13,82,83,80,101,174,86,85,95, 142,141,98,176,176,16,97,97,96,90,141,176,157,175,176,99,175,99,99,99, 92,87,84, 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,306,306,306,15,306,306,306,102,80,177,20,144, 78,78,78,78,78,52,41,103,178,102,74,74, 105,46,106,72, 6,6,6,1,6,6,6,6,6,6,4,30,30,32,6,6,6,6,6,6,6,6,105,32,32,22,22,31,32,22,22, 30,1, 77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,106,103,73,101, 105,45,106,44, 10,10,37,108,10, 35,1,35,4,129,12,12,128,35,35,35,35,109,128,11,128,12,128,1, 34,1,34,4,129,12,12,128,34,105,34,34,34,55,110,56,128,106,11,42,107,107,128, 12,128,1, 1,2,122,2,2,1, 105,105,112,89,16, 179,1,179,2,113,2,2,179,2,1, 3,1,3,3,3,3,2,3,3,3,3,3,3,3,114,2,2,100,2,1, 105,105,101,102,16, 114,13,116,98,180,117,180,116,115,117, 114,13,92,98,94,116,115,104, 182,181,118, 1,183,119,183,183,183,1, 1,184,120,184,184,257,184,1, 1,185,121,185,185,185,1, 1,186,122,186,186,186,1, 1,187,123,187,187,187,254,1, 1,188,124,188,188,188,1, 1,189,125,189,189,189,1, 4,30,30,190,41,126,191,31,251,190,190,30,190, 4,30,30,190,41,127,192,31,250,190,190,30,190, 1,187,128,187,187,187,249,1, 1,187,129,187,187,187,248,1, 1,187,130,187,187,187,247,1, 1,187,131,187,187,187,246,1, 1,187,132,187,187,187,245,1, 1,187,133,187,187,187,244,1, 1,4,30,30,194,134,194,194,193,31,194,193,193,30,1, 105,105,135,242,16, 109,109,109,1,109,109,196,195,136,196,196,195,196,1, 105,105,137,236,16, 52,235,197, 4,5,5,23,139,198,231,6,5, 305,140, 304,141, 199,199,142,199, 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200, 200,143,200, 203,203,203,203,203,203,203,203,203,45,203,203,203,203,203,203,203,203,203, 203,203,46,203,203,203,203,203,203,203,203,203,144,202,201,203,203, 204,145, 209,209,146, 154,154,155,154,147,205,152, 211,211,213, 210,210,212, 219,219,192, 218,218,218,218,191, 217,217,217,217,217,147,146,208,207,206,205,204,203,202,201,200,199,198,206, 217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217, 217,217,217,217,217,152,217,221,197,223,217,149,148, 78,78,78,78,78,78,78,52,41,153,178,102,69,69, 207,208,105,72,154,273,209,62, 105,155,209,64, 210,105,68,209,62, 105,67,209,65, 211,79,158,271, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,159,2,2,270,2,1, 154,154,155,154,160,212,152, 151,151,144, 149,149,149,143, 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,163,2,2,138,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,164,2,2,136,2,1, 213,213,1,213,213,213,213,4,30,30,32,213,213,213,165,32,32,213,213,31,32, 213,213,30,1, 215,214,166,137, 216,88,89,167,172,173,177, 217,217,217,1,217,217,217,217,217,4,30,30,32,217,217,217,217,217,168,32,32, 217,217,31,32,217,217,30,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,169,2,2,9,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,170,2,2,276,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,171,2,2,275,2,1, 139,139,105,105,139,139,139,91,94,93,88,89,13,172,95,142,141,98,176,16,97, 97,96,90,141,218,218,218,218,92, 139,139,105,105,139,139,139,91,94,93,88,89,13,173,95,142,141,98,176,16,97, 97,96,90,141,219,219,219,219,92, 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,306,306,306,15,306,306,306,174,282,220,20,144, 170,171,88,89,169,158,277,172,173, 224,224,224,224,221,224,224,224,224,224,224,224,224,224,176,75, 222,177, 139,139,105,194,105,139,139,139,91,94,93,88,89,13,82,83,80,178,174,86,85,95, 142,141,98,176,223,16,97,97,96,90,141,223,157,175,223,99,175,99,99,99, 92,87,84, 105,105,179,91,16, 216,180,99, 3,1,3,2,3,181,2,2,97,2,1, 1,3,3,3,2,3,3,3,3,3,3,3,182,2,2,95,2,1, 1,224,2,243,2,2,1, 1,2,83,184,2,225,2,1, 1,226,2,185,2,2,1, 1,227,2,186,2,2,1, 1,2,83,187,2,228,2,1, 1,229,2,188,2,2,1, 139,139,105,1,194,105,139,139,139,91,2,94,93,88,89,13,82,83,189,2,86,85,95, 142,141,98,176,16,2,97,97,96,90,141,252,175,252,99,175,99,99,99,92,87, 84,1, 79,190,263, 105,105,261,230,16,189, 139,139,105,105,139,139,139,91,94,93,261,88,89,13,192,95,142,141,98,176,16, 97,97,96,90,141,231,99,231,99,99,99,92, 83,193,232, 108,108,108,1,108,108,4,30,30,2,114,194,2,31,2,115,115,30,1, 52,195,233, 110,110,110,1,110,110,2,4,2,2,1, 139,139,105,194,105,139,139,139,33,88,89,197,142,141,34,237,34,16,240,90, 141,238,84, 105,1,120,121,122,123,124,125,128,129,130,131,132,133,119,105,4,129,12,12, 128,134,94,24,198,128,137,11,138,16,136,128,12,128,126,234,234,135,127, 1, 303,199, 299,299,299,299,299,1,299,299,299,45,299,299,299,299,4,299,299,299,299,299, 299,299,299,299,299,299,46,299,301,299,299,299,299,299,143,299,299,299, 200,142,299,141,140,299,1, 314,201, 313,202, 309,309,309,309,309,1,309,309,309,309,45,309,309,309,309,309,310,309,309, 309,309,309,309,46,309,309,309,309,309,309,309,309,309,307,310,310,202, 201,309,1, 1,3,3,3,2,3,204,2,2,281,2,1, 154,154,155,154,214,153, 1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,206,2,2,190,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,207,2,2,279,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,208,2,2,274,2,1, 77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,209,63,153,101, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,210,2,2,278,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,211,2,2,272,2,1, 154,154,155,154,147,153, 139,139,139,139,139,91,234,88,89,213,142,141,181,181,181,90,141,181, 235,235,235,235,235,235,235,147,146,208,207,206,205,204,203,202,201,200,199, 198,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235, 235,235,235,235,235,235,235,235,214,235,235,235,235,235,149,148, 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,215,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,216,2,2,19,2,1, 139,139,105,105,139,139,139,91,94,93,88,89,13,217,95,142,141,98,176,16,97, 97,96,90,141,165,165,165,92, 168,163, 168,161, 236,220, 237,1,237,4,30,30,32,221,32,32,237,237,31,32,237,237,30,1, 1,3,3,3,3,3,3,3,2,3,3,3,3,222,2,2,81,2,1, 224,224,224,224,221,224,224,224,224,224,224,224,224,224,223,76, 1,238,224,238,238,238,1, 105,105,33,225,34,57,239,239,34,16, 1,240,226,240,240,240,1, 1,187,227,187,187,187,255,1, 139,139,105,194,105,139,139,139,91,94,93,88,89,13,82,83,228,86,85,95,142, 141,98,176,16,97,97,96,90,141,267,175,267,99,175,99,99,99,92,87,84,241, 1,2,242,229,2,2,242,2,1, 52,185,243, 88,89,265,172,173, 105,105,232,230,16,188, 194,233,239,84, 244,244,244,244,244,244,244,147,146,208,207,206,205,204,203,202,201,200,199, 198,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244, 244,244,244,244,244,244,244,244,234,244,244,244,244,244,149,148, 215,235,180, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,236,2,2,283,2,1, 226,226,237,225,245, 1,2,83,238,2,246,2,1, 4,30,30,190,41,239,247,31,58,190,190,30,190, 258,1,258,2,240,2,2,248,1, 4,30,30,190,41,241,249,31,266,190,190,30,190, 15,242,253,20, 139,139,139,139,139,91,234,88,89,243,142,141,186,186,187,90,141, 215,244,137, 227,227,227,1,3,3,3,3,227,227,3,3,3,2,3,3,3,3,3,3,245,2,2,228,2,1, 139,139,105,105,139,139,139,91,94,93,88,89,13,246,95,142,141,98,176,16,97, 97,96,90,141,250,99,250,99,99,99,92, 105,105,33,261,34,57,60,34,16, 259,259,259,1,259,259,251,248,251,251,251,1, 139,139,105,194,105,139,139,139,91,94,93,261,88,89,13,82,83,249,86,85,95, 142,141,98,176,16,97,97,96,90,141,268,175,268,99,175,99,99,99,92,87,84, 88,89,264,172,173, 258,1,258,2,251,2,2,252,1, 259,259,259,259,259,256, }; static const unsigned short ag_sbt[] = { 0, 18, 59, 65, 79, 119, 121, 125, 160, 181, 216, 218, 222, 224, 255, 263, 305, 346, 353, 356, 386, 429, 433, 437, 444, 451, 458, 465, 487, 489, 491, 493, 498, 547, 553, 569, 571, 573, 613, 624, 626, 629, 664, 670, 696, 699, 737, 775, 777, 779, 783, 823, 826, 877, 920, 934, 965, 996,1015,1034,1053,1079,1088,1097,1104,1114,1120,1130,1141,1149, 1160,1178,1208,1230,1268,1303,1341,1376,1378,1422,1444,1492,1529,1562, 1597,1654,1676,1704,1706,1735,1764,1774,1806,1808,1861,1890,1922,1945, 1968,1997,1999,2008,2053,2090,2102,2106,2139,2160,2164,2169,2188,2214, 2220,2225,2235,2255,2260,2270,2278,2281,2288,2296,2303,2310,2318,2325, 2332,2345,2358,2366,2374,2382,2390,2398,2406,2421,2426,2440,2445,2448, 2457,2459,2461,2465,2505,2541,2543,2546,2553,2556,2559,2562,2567,2617, 2631,2639,2643,2648,2652,2656,2678,2685,2688,2692,2722,2752,2777,2781, 2788,2817,2839,2861,2883,2913,2943,2980,2989,3005,3007,3052,3057,3060, 3071,3089,3096,3104,3111,3118,3126,3133,3179,3182,3188,3221,3224,3243, 3246,3257,3280,3320,3322,3367,3369,3371,3411,3423,3429,3452,3474,3496, 3517,3539,3561,3567,3585,3638,3668,3698,3727,3729,3731,3733,3751,3770, 3786,3793,3803,3810,3818,3860,3869,3872,3877,3883,3887,3940,3943,3965, 3970,3978,3991,4000,4013,4017,4034,4037,4063,4095,4104,4116,4158,4163, 4172,4178 }; static const unsigned short ag_sbe[] = { 11, 56, 61, 74, 116, 120, 123, 153, 166, 215, 217, 220, 223, 244, 258, 300, 340, 348, 354, 379, 421, 431, 434, 440, 447, 454, 461, 471, 488, 490, 492, 495, 539, 551, 565, 570, 572, 610, 620, 625, 627, 653, 666, 691, 697, 733, 771, 776, 778, 781, 821, 824, 866, 894, 928, 959, 988,1008,1027,1046,1067,1083,1092,1099,1108,1118,1122,1135,1144,1159, 1167,1196,1224,1266,1301,1339,1374,1377,1415,1438,1481,1524,1551,1586, 1642,1671,1694,1705,1724,1753,1769,1805,1807,1853,1879,1903,1944,1967, 1981,1998,2004,2025,2085,2097,2103,2128,2156,2161,2167,2181,2202,2216, 2222,2229,2249,2257,2262,2272,2280,2283,2290,2298,2305,2312,2320,2327, 2337,2350,2360,2368,2376,2384,2392,2400,2411,2423,2434,2442,2446,2452, 2458,2460,2463,2503,2536,2542,2545,2550,2555,2558,2561,2566,2609,2626, 2635,2640,2645,2649,2654,2672,2682,2687,2691,2716,2746,2766,2779,2784, 2806,2833,2855,2877,2896,2926,2975,2985,3003,3006,3024,3054,3058,3065, 3083,3092,3099,3107,3114,3121,3129,3151,3180,3184,3202,3222,3235,3244, 3253,3268,3304,3321,3360,3368,3370,3404,3417,3427,3446,3468,3490,3513, 3533,3555,3565,3576,3630,3662,3692,3711,3728,3730,3732,3740,3764,3784, 3788,3796,3805,3812,3834,3863,3870,3874,3879,3884,3932,3941,3959,3967, 3973,3983,3995,4005,4014,4026,4035,4057,4076,4098,4111,4133,4160,4167, 4177,4178 }; 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,0,1,0,2,4,2,2,2,2,3, 3,0,1,2,2,1,2,3,1,2,3,2,1,1,1,1,2,1,3,1,3,4,1,4,1,3,1,2,2,2,2,1,1,1,2, 1,1,2,2,2,3,4,0,0,1,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,1,1,1,2,1,2,1,2,1,2,1,1,1,1,1,1,1,3,1,3,1,4,1,2,1,1,1,1,1,1,1, 1,1,3,1,1,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,5,2,4,7,2,1,2,0,1,1,2,6,3,4,1,3,1,3,3,4,3,4,3,3,2,4,4, 2,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, 43, 43, 44, 44, 38, 41, 41, 41, 41, 41, 41, 52, 52, 42, 42, 46, 46, 46, 56, 56, 46, 54, 50, 50, 50, 53, 53, 58, 58, 60, 60, 59, 64, 65, 66, 66, 68, 68, 70, 71, 71, 72, 74, 74, 69, 57, 57, 57, 55, 77, 75, 75, 78, 76, 76, 73, 73, 63, 63, 85, 85, 63, 83, 88, 83, 89, 83, 86, 86, 86, 84, 92, 92, 95, 91, 96, 98, 98, 90, 90, 99, 99, 99, 102,102,102, 61, 3, 3, 8, 8, 8,106,106,109,109,107,107,111,111,111, 39, 39, 39, 39,115,115,116,116, 51,117,117,121,118,125,125,123,123,124, 124,130,130,124,126,126,127,127,131,131,136,136, 79, 79,138,138,140,140, 140,143,142,142,144,144,122,122,122,122,122,146,146,146,146,146,153,153, 152,152, 47, 47, 47,156,156,156,157,157,158,160,160,160,159,165,165,165, 148,148,148,148,148,148,148,148,148,148,148,178,180,150,149,149,151,162, 162,162,162,162,163,163,164,164, 80, 80,186,186,185, 49,189,189,187,188, 188,190,190,190,190,190,190,190,190,192,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,210,210,212,212,212, 67,201,201,195,213,213,141, 141,141,141,141,141,141,141,141,141,141,155,155,139,139, 48,222,223,223, 224,224,220,221,221,225,225,225,225,225,226,226,230,230,230,230,230,230, 232, 81,233,233,233,234,234,234,234,105,237,237,105,243,243,243,244,244, 245,245,229,246,246,246,247,247,248,248,228,242 }; 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(V(0,(int *))); break; case 2: ag_rp_2(); break; case 3: ag_rp_1(V(1,(int *))); break; case 4: V(0,(int *)) = ag_rp_5(V(0,(int *))); break; case 5: V(0,(int *)) = ag_rp_6(V(0,(int *))); break; case 6: V(0,(int *)) = ag_rp_7(); break; case 7: V(0,(int *)) = ag_rp_8(V(0,(int *))); break; case 8: ag_rp_9(V(0,(int *))); break; case 9: ag_rp_10(V(2,(int *))); break; case 10: V(0,(int *)) = ag_rp_11(); break; case 11: V(0,(int *)) = ag_rp_12(); break; case 12: V(0,(int *)) = ag_rp_13(); break; case 13: ag_rp_14(); break; case 14: ag_rp_15(V(0,(int *))); break; case 15: ag_rp_16(V(1,(int *))); break; case 16: ag_rp_17(V(0,(int *))); break; case 17: V(0,(int *)) = ag_rp_18(V(1,(int *))); break; case 18: ag_rp_19(V(0,(int *))); break; case 19: ag_rp_20(V(0,(int *))); break; case 20: ag_rp_21(V(1,(int *))); break; case 21: V(0,(int *)) = ag_rp_22(V(1,(int *))); break; case 22: ag_rp_23(V(1,(int *)), V(2,(int *))); break; case 23: ag_rp_24(V(2,(int *)), V(3,(int *))); break; case 24: ag_rp_25(); break; case 25: V(0,(int *)) = ag_rp_26(); break; case 26: V(0,(int *)) = ag_rp_27(); break; case 27: V(0,(int *)) = ag_rp_28(); break; case 28: ag_rp_29(); break; case 29: ag_rp_30(); break; case 30: ag_rp_31(); break; case 31: ag_rp_32(); break; case 32: ag_rp_33(); break; case 33: ag_rp_34(); break; case 34: ag_rp_35(); break; case 35: ag_rp_36(); break; case 36: ag_rp_37(); break; case 37: ag_rp_38(); break; case 38: ag_rp_39(); break; case 39: ag_rp_40(); break; case 40: ag_rp_41(); break; case 41: ag_rp_42(); break; case 42: ag_rp_43(V(0,(int *))); break; case 43: ag_rp_44(V(1,(int *))); break; case 44: ag_rp_45(V(2,(int *))); break; case 45: ag_rp_46(V(2,(int *))); break; case 46: ag_rp_47(V(1,(int *))); break; case 47: ag_rp_48(V(2,(int *))); break; case 48: V(0,(int *)) = ag_rp_49(V(1,(int *))); break; case 49: V(0,(int *)) = ag_rp_50(V(1,(int *))); break; case 50: V(0,(int *)) = ag_rp_51(V(0,(int *)), V(1,(int *))); break; case 51: V(0,(int *)) = ag_rp_52(); break; case 52: V(0,(int *)) = ag_rp_53(); break; case 53: V(0,(int *)) = ag_rp_54(V(0,(int *))); break; case 54: V(0,(int *)) = ag_rp_55(V(1,(int *))); break; case 55: V(0,(int *)) = ag_rp_56(V(0,(int *))); break; case 56: V(0,(int *)) = ag_rp_57(V(0,(int *)), V(1,(int *))); break; case 57: V(0,(int *)) = ag_rp_58(); break; case 58: V(0,(int *)) = ag_rp_59(V(0,(int *)), V(1,(int *))); break; case 59: V(0,(int *)) = ag_rp_60(V(0,(int *))); break; case 60: V(0,(int *)) = ag_rp_61(V(0,(int *)), V(1,(int *))); break; case 61: V(0,(int *)) = ag_rp_62(V(0,(int *))); break; case 62: V(0,(int *)) = ag_rp_63(V(0,(int *))); break; case 63: V(0,(int *)) = ag_rp_64(V(0,(int *))); break; case 64: V(0,(int *)) = ag_rp_65(V(0,(CharSetExpression * *))); break; case 65: V(0,(CharSetExpression * *)) = ag_rp_66(V(0,(CharSetExpression * *)), V(2,(CharSetExpression * *))); break; case 66: V(0,(CharSetExpression * *)) = ag_rp_67(V(0,(CharSetExpression * *)), V(2,(CharSetExpression * *))); break; case 67: V(0,(CharSetExpression * *)) = ag_rp_68(V(0,(CharSetExpression * *)), V(3,(CharSetExpression * *))); break; case 68: V(0,(CharSetExpression * *)) = ag_rp_69(V(1,(CharSetExpression * *))); break; case 69: V(0,(CharSetExpression * *)) = ag_rp_70(V(0,(int *))); break; case 70: V(0,(CharSetExpression * *)) = ag_rp_71(V(0,(int *))); break; case 71: V(0,(CharSetExpression * *)) = ag_rp_72(); break; case 72: V(0,(CharSetExpression * *)) = ag_rp_73(V(1,(CharSetExpression * *))); break; case 73: V(0,(CharSetExpression * *)) = ag_rp_74(V(1,(int *)), V(3,(int *))); break; case 74: V(0,(CharSetExpression * *)) = ag_rp_75(V(0,(int *)), V(3,(int *))); break; case 75: ag_rp_76(V(2,(CharSetExpression * *))); break; case 76: ag_rp_77(V(2,(int *))); break; case 77: ag_rp_78(V(2,(int *))); break; case 78: ag_rp_79(); break; case 79: ag_rp_80(V(2,(int *))); break; case 80: ag_rp_81(V(2,(int *))); break; case 81: ag_rp_82(); break; case 82: V(0,(int *)) = ag_rp_83(V(0,(int *))); break; case 83: V(0,(int *)) = ag_rp_84(); break; case 84: V(0,(int *)) = ag_rp_85(); break; case 85: V(0,(int *)) = ag_rp_86(); break; case 86: V(0,(int *)) = ag_rp_87(); break; case 87: V(0,(int *)) = ag_rp_88(); break; case 88: V(0,(int *)) = ag_rp_89(); break; case 89: V(0,(int *)) = ag_rp_90(); break; case 90: V(0,(int *)) = ag_rp_91(); break; case 91: V(0,(int *)) = ag_rp_92(); break; case 92: V(0,(int *)) = ag_rp_93(); break; case 93: V(0,(int *)) = ag_rp_94(); break; case 94: V(0,(int *)) = ag_rp_95(V(1,(int *))); break; case 95: V(0,(int *)) = ag_rp_96(V(0,(int *)), V(1,(int *))); break; case 96: V(0,(int *)) = ag_rp_97(V(0,(int *)), V(1,(int *))); break; case 97: V(0,(int *)) = ag_rp_98(V(1,(int *))); break; case 98: ag_rp_99(V(0,(int *))); break; case 99: ag_rp_100(V(0,(int *))); break; case 100: ag_rp_101(V(1,(int *))); break; case 101: ag_rp_102(V(1,(int *))); break; case 102: ag_rp_103(V(1,(int *))); break; case 103: ag_rp_104(V(0,(int *))); break; case 104: ag_rp_105(V(1,(int *))); break; case 105: ag_rp_106(V(0,(int *))); break; case 106: ag_rp_107(V(1,(int *))); break; case 107: V(0,(int *)) = ag_rp_108(); break; case 108: V(0,(int *)) = ag_rp_109(); break; case 109: ag_rp_110(V(0,(int *))); break; case 110: ag_rp_111(V(1,(int *))); break; case 111: ag_rp_112(); break; case 112: ag_rp_113(); break; case 113: ag_rp_114(); break; case 114: ag_rp_115(); break; case 115: ag_rp_116(); break; case 116: ag_rp_117(V(2,(int *))); break; case 117: ag_rp_118(); break; case 118: ag_rp_119(); break; case 119: ag_rp_120(); break; case 120: ag_rp_121(); break; case 121: ag_rp_122(); break; case 122: ag_rp_123(); break; case 123: ag_rp_124(); break; case 124: ag_rp_125(); break; case 125: ag_rp_126(V(2,(int *))); break; case 126: ag_rp_127(); break; case 127: ag_rp_128(); break; case 128: ag_rp_129(); break; case 129: ag_rp_130(V(4,(int *)), V(6,(int *))); break; case 130: V(0,(int *)) = ag_rp_131(); break; case 131: ag_rp_132(V(5,(CharSetExpression * *))); break; case 132: ag_rp_133(V(2,(CharSetExpression * *))); break; case 133: ag_rp_134(V(0,(int *))); break; case 134: ag_rp_135(V(2,(int *))); break; case 135: V(0,(int *)) = ag_rp_136(); break; case 136: V(0,(int *)) = ag_rp_137(); break; case 137: V(0,(int *)) = ag_rp_138(); break; case 138: V(0,(int *)) = ag_rp_139(); break; case 139: V(0,(int *)) = ag_rp_140(); break; case 140: V(0,(int *)) = ag_rp_141(); break; case 141: V(0,(int *)) = ag_rp_142(V(0,(CharSetExpression * *))); break; case 142: V(0,(int *)) = ag_rp_143(V(0,(CharSetExpression * *))); break; case 143: V(0,(int *)) = ag_rp_144(V(0,(CharSetExpression * *))); break; case 144: V(0,(int *)) = ag_rp_145(); break; case 145: V(0,(int *)) = ag_rp_146(); break; case 146: V(0,(int *)) = ag_rp_147(); break; case 147: V(0,(int *)) = ag_rp_148(); break; case 148: V(0,(int *)) = ag_rp_149(); break; case 149: V(0,(int *)) = ag_rp_150(); break; case 150: ag_rp_151(V(1,(unsigned char * *))); break; case 151: ag_rp_152(); break; case 152: V(0,(unsigned char * *)) = ag_rp_153(); break; case 153: V(0,(unsigned char * *)) = ag_rp_154(); break; case 154: ag_rp_155(); break; case 155: ag_rp_156(); break; case 156: ag_default(&ag_rtt[0]); ag_rp_157(); break; } (PCB).la_ptr = (PCB).pointer; } static const unsigned char ag_ctn[] = { 0,0,105,1, 0,0, 0,0, 51,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 59,1,220,1, 61,1, 53,1, 58,1, 49,1, 48,1, 0,0, 46,1, 41,1, 41,1, 41,1, 41,1, 0,0, 0,0, 0,0, 0,0,106,1, 0,0, 83,1, 0,0, 59,2, 0,0, 0,0, 0,0, 0,0, 58,1, 0,0, 58,2,187,1, 49,2,229,1,228,1,225,1, 225,1,225,1, 0,0, 48,2, 0,0, 47,2, 0,0, 54,1, 54,1, 0,0, 0,0, 0,0, 0,0, 42,1, 46,1, 0,0, 83,2, 83,2, 0,0, 92,1, 0,0, 0,0, 59,3,187,2, 0,0, 0,0, 0,0, 0,0, 0,0,225,2, 0,0, 0,0, 0,0,155,1,141,1, 0,0, 158,1,141,1,141,1,141,1, 0,0, 0,0,118,1,117,1,146,1,146,1, 0,0,146,1, 0,0, 0,0,144,1,142,1,140,1, 75,1, 73,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 83,3, 83,3, 0,0, 0,0, 0,0, 0,0, 0,0,190,1, 191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1,191,1, 191,1,191,1,190,1,190,1,190,1,190,1,190,1, 0,0, 0,0, 0,0, 0,0, 0,0, 81,1,155,2,149,1,151,1, 0,0,149,1,160,1,160,1,160,1, 69,1, 0,0, 74,1, 74,1, 74,1,141,2,141,2, 0,0,127,1,126,1,118,2,117,2,146,2,146,2,143,1, 142,2, 0,0,141,2,141,2,143,2,143,2,139,1,141,1, 75,2, 73,2, 75,2, 83,4, 0,0, 92,3, 0,0, 0,0, 65,1, 0,0, 0,0,195,1, 0,0, 0,0, 0,0,157,2, 191,2,157,2, 0,0,190,2, 0,0,190,2, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 155,3,131,1,158,3,141,3,141,3, 0,0,141,3,141,3,131,1,146,3,146,3, 0,0, 0,0,142,3,142,1,142,1,139,2, 80,1, 73,3, 75,3,191,3, 65,2,191,3,191,3, 195,2,191,3,156,1,143,1,157,3,190,3,121,1,146,4,139,3, 80,2, 0,0, 66,1, 0,0,213,1,191,4,156,2,121,2, 0,0,191,5, 66,2,210,1,213,2,143,1, 0,0, 210,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 == 45) {(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]])(); } }