Mercurial > ~dholland > hg > ag > index.cgi
view tests/agcl/oldagsrc/good/pgg24.cpp @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
line wrap: on
line source
/* AnaGram Syntax Analyzer. Copyright (c) Jerome T. Holland, 1989, 1990, 1991, 1992 All Rights Reserved. */ //#define INCLUDE_LOGGING #include "assert.h" //ASSERT #include "config.h" #include "csexp.h" #include "data.h" //DATA #include "error.h" #include "log.hpp" #include "myalloc.h" #include "rproc.h" #include "stk.h" //STK #include "symbol.h" #include "token.h" #include "tree.h" #include "tsd.h" #include "ut.h" //UT #include <ctype.h> //CTYPE #include <stdio.h> //STDIO #include <stdlib.h> //STDLIB #include <string.h> //STRING #include "pgg24.h" //PGG #undef MODULE #define MODULE 3 /* * AnaGram, A System for Syntax Directed Programming * File generated by: ... * * AnaGram Parsing Engine * Copyright 1993-2002 Parsifal Software. All Rights Reserved. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #ifndef PGG24_H #include "pgg24.h" #endif #ifndef PGG24_H #error Mismatched header file #endif #include <ctype.h> #include <stdio.h> #define RULE_CONTEXT (&((PCB).cs[(PCB).ssx])) #define ERROR_CONTEXT ((PCB).cs[(PCB).error_frame_ssx]) #define CONTEXT ((PCB).cs[(PCB).ssx]) #define CHANGE_REDUCTION(x) pgg_change_reduction(pgg_##x##_token) int pgg_change_reduction(pgg_token_type); #define TOKEN_NAMES pgg_token_names const char *const pgg_token_names[247] = { "syntax definition", "", "\"->\"", "", "", "", "", "','", "", "", "", "\"...\"", "", "'='", "", "'!'", "", "'{'", "", "'['", "", "'('", "", "'-'", "", "'+'", "", "']'", "", "'}'", "", "')'", "", "single quote", "", "'~'", "", "'|'", "syntax definition", "", "", "complete statements", "statement", "", "eof", "production", "definition", "embedded c", "configuration section", "", "", "left hand side", "right hand side", "", "", "", "token name list", "type definition", "", "name", "'$'", "", "wrapper type", "wrapper list", "", "vp rule spec", "", "", "reduction procedure", "vp rules", "grammar rule", "", "init grammar rule", "rule element", "parameter name", "c expression", "';'", "type name", "", "", "", "\"::\"", "", "", "", "", "template field head", "'>'", "'<'", "", "", "'*'", "", "", "letter", "", "", "\"enum\"", "blank char", "c comment", "continuation", "comment", "", "carriage return", "", "newline", "", "vertical space", "\"//\"", "", "", "", "character", "signed number", "'^'", "", "quoted character", "char const", "", "", "", "decimal number", "'0'", "octal number", "\"0x\"", "\"0X\"", "", "hex number", "", "", "", "hex digit", "", "token", "mid rule action", "", "virtual production", "", "", "'&'", "", "", "escape sequence", "octal escape", "", "hex escape", "character range", "\"..\"", "enum definition", "enum statement", "keyword string", "keyword string head", "string", "double quote", "", "", "", "string char", "simple string char", "\"\\\\a\"", "\"\\\\b\"", "\"\\\\f\"", "\"\\\\n\"", "\"\\\\r\"", "\"\\\\t\"", "\"\\\\v\"", "\"\\\\\\\\\"", "\"\\\\?\"", "\"\\\\\\'\"", "\"\\\\\\\"\"", "", "backslash", "", "\"\\\\x\"", "any digit", "nonoctal digit", "':'", "", "", "configuration parameters", "configuration parameter list", "", "configuration parameter", "attribute statement", "keyword kluge", "\"distinguish\"", "\"left\"", "token list", "\"right\"", "\"nonassoc\"", "\"sticky\"", "\"subgrammar\"", "\"hidden\"", "", "", "\"disregard\"", "\"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 - "pgg24.syn" int null_warning(int n) { extern void warning_here(const char *,...); if (n == 0) log_error("Null character in keyword string"); return n; } #line - "pgg24.cpp" #line - "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() extern AgStack< AgStack<RuleElement> > ruleElementStack; AgStack<CSegment> extensionStack; AgStack<CSegment> cSegmentStack; int nPrologueSegments; CSegment::CSegment() : begin(PCB.pointer), end(PCB.pointer), line(PCB.line) { LOGSECTION("CSegment::CSegment"); // Nothing to do } class PggErrorHandler : public ConfigParam::ErrorHandler { void badParam(const char *s){log_error(s);} } pggErrorHandler; 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); } extern AgString infile_name; Error::Error(AgString msg, int contextFlag) : file(infile_name), line(contextFlag? ERROR_CONTEXT.y : PCB.line), column(contextFlag? ERROR_CONTEXT.x : PCB.column), key(warn), message(msg) { LOGSECTION("Error::Error(AgString, int)"); LOGV(PCB.line) LCV(PCB.column) LCV(contextFlag) LCV(msg.pointer()); LOGV(ERROR_CONTEXT.x) LCV(ERROR_CONTEXT.y); // Nothing here } Error::Error(int l, int c, AgString msg) : file(infile_name), line(l), column(c), key(warn), message(msg) { LOGSECTION("Error::Error(int, int, AgString)"); // Nothing here } extern tsd *rename_macro_list; extern int parse_abort_flag; 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; } extern int character_seen; extern int enum_base; extern unsigned char *input_base; extern int precedence_level; extern int syntax_error_flag; CharSetExpression *ss2(void); void acs(int); void aws(int); void atkn(Token); void definition_1(CharSetExpression *); void definition_2(int); void definition_3(int); int form_element_1(CharSetExpression *); int form_spec_2(int, int); int form1(void); int form2(void); int head_list_1(int); int head_list_2(int); static int head_list_3(int); void ics(void); int identify_node(CharSetExpression *); void iws(void); int makeRule(const AgIndexedContainer<RuleElement> &); int mid_line(int); int null_warning(int); int proc_spec_4(int); void production(int); void range(int, int); void scs(int); static void set_prec(int,int); void sws(int); int vp_form3(int); int vp_s(void); int vp_1(void); int vp_2(void); int vp_3(void); int vp_4(void); int vp_5(int); int vp_6(int); int vp_7(int); int vp_8(int); int vp_8a(int); int vp_9(void); int vp_10(void); int *disregard_list = NULL; int n_disregard_list = 0; int nClassWrappers = 0; 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 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); errorList.push(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; } 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(); } 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(); } void set_lexeme(void) { LOGSECTION("set_lexeme"); int n = tis(); while (n--) { Token token = list_base[n]; token->lexeme = 1; } rws(); } void set_reserved_words(void) { LOGSECTION("set_reserved_words"); int n = tis(); while (n--) { Token(list_base[n])->reserved_word = 1; } rws(); } void parse(void) { pgcb.pointer = input_base; pgg(); } #line - "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_4(t) (production(t)) #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(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) (definition_2(vp_8a(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) (disregard(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() (mid_line(proc_spec_4(0))) #define ag_rp_148() (mid_line(proc_spec_4(1))) #define ag_rp_149(y) (cSegmentStack.top().end = y) #define ag_rp_150() (cSegmentStack.push(CSegment())) #define ag_rp_151() (PCB.pointer) #define ag_rp_152() (PCB.pointer) #define ag_rp_153() (cSegmentStack.push(CSegment())) #define ag_rp_154() (cSegmentStack.top().end = PCB.pointer) static void ag_rp_155(void) { #line - "pgg24.syn" if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token; #line - "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, 1, 0, 2, 0, 0, 1, 0, 3, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 14, 0, 15, 16, 0, 0, 0, 17, 18, 19, 0, 20, 21, 22, 23, 24, 25, 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, 66, 0, 67, 0, 68, 0, 0, 0, 0, 0, 0, 69, 70, 71, 72, 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, 0, 0, 0, 0, 0,149,150,151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154 }; static const unsigned char ag_key_itt[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const unsigned short ag_key_pt[] = { 0, 11, 0,147,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,125,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, 42, 47,255, 88,120,255, 47, 48, 58, 92, 255, 88,120,255, 48,255, 42, 47,255, 45, 47,255, 42, 47,255, 88,120,255, 47, 48,255, 88,120,255, 47, 48,255, 88,120,255, 47, 48, 58, 92,125,255, 47, 58,255,114,116,255,115,255,105,255,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, 42, 47,255, 88,120,255, 47, 48, 58,125,255, 34, 39, 63, 92, 97, 98,102,110,114,116,118,120,255, 92,255, 88,120,255, 48,125,255, 46, 47,255, 46, 47,255, 47, 93,125,255, 46,255, 46,255, 46, 47,255, 46, 47, 255, 46, 47, 63, 93,125,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,125, 255, 46, 47, 63,255, 46, 47,255, 46, 47,255, 93,125,255, 46, 47,255, 93, 255, 46, 47,255,125,255,125,255, 46,255, 46,255, 42, 47,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,125,255, 47,107,255, 47,109,255, 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 }; static const unsigned char ag_key_act[] = { 0,0,0,4,2,4,3,3,4,5,4,6,4,0,0,4,0,0,4,3,3,4,3,3,4,2,4,2,4,3,3,4,3,3,4, 2,4,3,3,4,2,3,4,3,3,4,3,3,4,3,2,2,2,3,3,2,2,2,3,2,3,2,2,3,2,4,3,4,0,0, 4,3,3,4,2,4,2,4,3,3,4,3,3,4,2,4,3,3,4,2,3,4,3,3,4,2,2,2,3,2,3,2,2,3,4, 0,0,4,0,0,4,2,2,3,4,3,4,0,0,4,3,3,4,3,3,4,3,7,2,3,3,2,2,4,3,3,4,0,0,4, 0,0,4,2,2,3,3,3,4,3,4,3,3,4,3,3,4,2,4,2,4,3,3,4,3,3,4,2,4,3,3,4,2,3,4, 3,3,4,3,2,2,3,2,3,2,2,3,4,0,0,4,0,0,4,2,2,3,3,4,0,0,4,2,4,0,0,4,3,2,4, 0,0,4,0,0,4,2,2,4,0,0,4,3,2,4,0,0,4,3,2,3,3,3,4,3,3,4,3,3,4,2,4,2,4,3, 3,4,3,3,4,2,4,3,3,4,2,3,4,3,3,4,2,2,3,2,3,2,2,3,4,0,0,4,3,3,4,3,3,4,2, 2,2,4,0,0,4,2,3,4,3,4,0,0,4,0,0,4,2,2,3,3,4,0,0,0,0,0,0,0,0,0,0,0,0,4, 2,4,0,0,4,2,3,4,3,3,4,3,3,4,3,2,2,4,5,4,6,4,3,3,4,3,3,4,2,3,3,2,2,4,3, 3,4,3,3,4,7,3,3,2,2,4,7,3,3,4,3,3,4,3,3,4,2,2,4,3,3,4,2,4,3,3,4,2,4,3, 4,5,4,6,4,0,0,4,3,3,4,3,3,4,2,2,3,2,2,4,3,3,4,3,3,4,3,3,4,0,0,4,3,2,4, 0,0,4,2,3,4,3,3,4,0,0,4,3,3,4,3,3,4,7,2,3,2,2,4 }; static const unsigned char ag_key_parm[] = { 0,232,108, 0, 0, 0,231,232, 0, 0, 0, 2, 0,232,108, 0,125,124, 0,209,212, 0,195,185, 0, 0, 0, 0, 0, 97,196, 0,186,198, 0, 0, 0,201,199, 0, 0,188, 0,190,191, 0,208,211, 0, 2, 0, 0, 0, 81, 210, 0, 0, 0,192, 0,189, 0, 0,204, 0, 0,108, 0,232,108, 0,195, 185, 0, 0, 0, 0, 0, 97,196, 0,186,198, 0, 0, 0,201,199, 0, 0, 188, 0,190,191, 0, 0, 0, 0,192, 0,189, 0, 0,204, 0,232,108, 0, 125,124, 0, 0, 0, 81, 0, 81, 0,232,108, 0,209,212, 0,208,211, 0, 2, 0, 0, 81,210, 0, 0, 0, 2,108, 0,232,108, 0,125,124, 0, 0, 0, 81,229,208, 0,232, 0,108, 81, 0,195,185, 0, 0, 0, 0, 0, 97, 196, 0,186,198, 0, 0, 0,201,199, 0, 0,188, 0,190,191, 0,108, 0, 0,192, 0,189, 0, 0,204, 0,232,108, 0,125,124, 0, 0, 0, 81,229, 0,125,124, 0, 0, 0,232,108, 0, 2, 0, 0,232,108, 0,125,124, 0, 0, 0, 0,125,124, 0,108, 0, 0,125,124, 0,232, 0, 81,229,208, 0, 232, 81, 0,195,185, 0, 0, 0, 0, 0, 97,196, 0,186,198, 0, 0, 0, 201,199, 0, 0,188, 0,190,191, 0, 0, 0,192, 0,189, 0, 0,204, 0, 232,108, 0,209,212, 0,208,211, 0, 0, 0, 0, 0,232,108, 0, 0,229, 0,229, 0,232,108, 0,125,124, 0, 0, 0, 81,208, 0,169,168,167,166, 159,160,161,162,163,164,165,173, 0, 0, 0,125,124, 0, 0,208, 0,209, 212, 0,208,211, 0,108, 0, 0, 0, 0, 0, 2, 0,209,212, 0,208,211, 0, 0,108,210, 0, 0, 0,209,212, 0,208,211, 0, 0,108,210, 0, 0, 0, 0,108,210, 0,209,212, 0,208,211, 0, 0, 0, 0,209,212, 0, 0, 0,208,211, 0, 0, 0,208, 0, 0, 0, 2, 0,232,108, 0,209,212, 0, 208,211, 0, 0, 0,210, 0, 0, 0,232,200, 0,232,202, 0,232,197, 0, 125,124, 0,232, 0, 0,125,124, 0, 0, 81, 0,232,229, 0,232,108, 0, 209,212, 0,208,211, 0, 0, 0,210, 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,217, 0,221, 0,223,225, 0,229,235, 0,154, 0,157, 0,243, 246, 0,257,259, 0,164, 0,271,275, 0,169,280, 0,284,289, 0,227,159, 161,251,167,263,172,175,298, 0, 0, 0, 0, 0, 0, 0,188,191,305,307, 0, 0, 0, 0,199, 0, 0, 0, 0,309,204, 0, 0, 0, 0, 0, 0, 0, 210,213, 0, 0, 0, 0,311,219, 0, 0, 0, 0,313,225,315,317,319, 0, 323,325, 0,327,333, 0,237, 0,240, 0,341,344, 0,355,357, 0,247, 0, 369,373, 0,252,378, 0,382,387, 0,242,244,349,250,361,255,258,396, 0, 0, 0, 0,403,406, 0,410,413, 0,270,273,276, 0, 0, 0, 0,283,417, 0,419, 0, 0, 0, 0, 0, 0, 0,291,294,421,423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,302, 0, 0, 0, 0,317,427, 0,433, 436, 0,440,443, 0,431,323,326, 0, 0, 0,333, 0,453,456, 0,460,463, 0,335,447,449,337,340, 0,476,479, 0,483,486, 0,467,470,472,349,352, 0,490,493,495, 0,499,502, 0,506,509, 0,365,368, 0,513,516, 0,374, 0,520,523, 0,379, 0,527, 0, 0, 0,386, 0, 0, 0, 0,535,538, 0, 542,545, 0,388,390,531,393,396, 0,549,551, 0,559,561, 0,566,568, 0, 0, 0, 0,571,414, 0, 0, 0, 0,420,573, 0,575,577, 0, 0, 0, 0, 586,589, 0,593,596, 0,579,429,582,432,435, 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,143,149,151, 0, 0, 4,126,134,134,111, 0,178, 0, 0, 0, 0, 0, 0, 4, 0,194,202,207, 216,222, 4, 4, 4,207, 66, 66, 0,228,149,149, 0,234,115, 66, 4,261, 279, 0, 0, 0, 0, 0, 4,279,286,289,216,297,315,202,320,329,216,216, 202, 0,315,216,202,343,202,355,361,202, 66,289, 66,216,202, 66, 4,207, 228, 0,149, 4, 66, 0, 66, 0,149,149,149,149,149,149,149, 66, 66,149, 149,149,149,149,149, 4, 0,149, 0, 66, 66, 0, 0, 0, 4,289, 0, 0, 0,315,315,315,315,315,371,377,382,384,384,279, 0,399,399,399,399, 0, 0,216,216,279,279,279,202,202,355,329,202, 0, 0, 0,234, 4,405, 0, 408,405,149,411,417, 0, 0,202, 0, 4, 0,149,423, 95, 0, 4, 0, 0, 426,279,315,279,279,279,202,279,279,399,399,315,438,438,202,202,355,355, 4,329,279,149,115,149,149,202,149, 66, 66, 0, 0, 0, 0,149, 0,149, 66, 0,202,279,202,115,149,202,315, 66,149, 0, 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, 46,46,46,0, 42,0, 47,0, 58,0, 47,0, 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 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, 10,0, 62,0, 47,0, 42,0, 58,0, 10,0, 46,46,46,0, 42,0, 58,0, 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 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, 58,0, 46,46,46,0, 46,46,46,0, 47,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 42,0, 101,121,119,111,114,100,115,0, 42,0, 97,99,114,111,0, 42,0, 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[] = { 44,245,245,245,245,245,245,245,245, 98,105,107,107,103,245,245,245,245, 245,245,245,245,245,245,245,245, 44,245,245,245,245,245, 98, 15,153,246, 60,246,139, 33, 21, 31, 91, 25, 7, 23,246,246,122,243,243,243,243,243, 243,243,244,244,176, 76, 88, 13, 87,207,246,132,132,132,132,132,132,242, 242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, 242, 19,171, 27,114,242,246,132,132,132,132,132,132,242,242,242,242,242, 242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, 17, 37, 29, 35,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245 }; #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[] = { 99,230, 0 }; static const unsigned char ag_tstt[] = { 242,232,132,108,105,103,98,21,19,17,0,3,4,5,38,99,230, 246,245,244,243,242,232,231,207,176,171,153,139,132,122,114,107,105,103,98, 91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,99,230, 232,98,0,3,99,230, 242,132,108,105,103,21,19,17,0,39,40,101,104, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,105,103,98,91,88,87, 76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,110,111, 105,0, 105,103,0,104, 242,232,204,201,199,198,196,195,192,191,190,189,188,186,185,132,108,107,105, 103,98,97,35,27,21,19,17,0,3,99,101,104,106,230, 242,132,21,19,17,0,20,41,45,46,47,48,51,56,57,58,59,93,213, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,98,91,88,87,76,60, 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0, 105,0, 105,103,0,104, 105,0, 244,243,242,232,132,125,124,122,114,108,105,103,98,91,81,35,33,25,23,21,0,3, 4,8,9,99,100,101,102,104,230, 242,132,81,0,59,61,77,93, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,105,103,98, 91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,15,13,7,0,104,215,216,217, 244,243,242,232,212,211,210,209,208,207,176,139,132,122,108,105,103,98,91, 88,87,81,60,44,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,99,230, 242,132,0,56,58,59,93, 7,0,6, 242,232,204,201,199,198,196,195,192,191,190,189,188,186,185,132,108,105,103, 98,97,35,27,0,3,4,5,99,179,230, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,98,91,88,87, 76,60,37,35,33,31,29,27,25,23,21,19,15,13,7,0,99,101,214,218,221,222, 230, 60,13,0,12, 2,0,1,52, 108,105,103,0,39,101,104, 108,105,103,0,39,101,104, 108,105,103,0,39,101,104, 108,105,103,0,39,101,104, 242,132,44,21,19,17,0,20,42,43,45,46,47,48,49,50,51,56,57,58,59,93,213, 105,0, 105,0, 105,103,0,102,104, 246,245,244,243,242,232,229,208,207,176,171,153,139,132,125,124,122,114,108, 107,105,103,98,91,88,87,81,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7, 0,3,99,100,101,102,104,230, 242,232,132,98,0,82, 108,105,103,91,88,87,81,31,29,27,21,7,0,78,79,86, 31,0, 105,0, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,105,103,98, 91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,15,13,7,0,104,215, 244,243,242,232,132,122,98,0,3,99,230, 60,0, 7,0,6, 244,243,242,232,153,132,125,124,122,114,108,105,103,98,81,35,33,29,25,23,21, 19,17,15,0,3,4,8,9,99,100,101,102,104,230, 242,132,0,58,59,93, 242,204,201,199,198,196,195,192,191,190,189,188,186,185,132,108,105,103,97, 35,27,0,39,40,101,104, 27,0,26, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,98,91,88,87,76,60, 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,236,237,238, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,98,91,88,87,76,60, 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,239,240,241, 153,0, 33,0, 105,103,0,104, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,105,103,98, 91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,219, 29,0,28, 246,245,244,243,242,232,229,207,176,171,153,139,132,125,124,122,114,108,107, 105,103,98,91,88,87,81,60,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8, 9,99,100,101,102,104,230, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,15,0,14,16,18,20, 22,24,34,59,93,112,113,116,118,120,134,135,136,137,138,140,146,150,151, 232,108,105,103,98,44,7,2,0,3,4,5,99,230, 244,243,242,232,153,132,125,124,122,114,108,105,103,98,44,37,35,33,25,23,21, 19,17,15,13,0,3,4,5,99,230, 244,243,242,153,132,125,124,122,114,108,105,103,44,37,35,33,25,23,21,19,17, 15,13,0,12,55,68,70,71,72, 242,232,132,108,107,105,103,98,44,21,19,17,0,3,99,101,104,106,230, 242,232,132,108,107,105,103,98,44,21,19,17,0,3,99,101,104,106,230, 242,232,132,108,107,105,103,98,44,21,19,17,0,3,99,101,104,106,230, 242,232,132,108,107,105,103,98,44,37,21,19,17,2,0,1,3,36,52,53,54,99,101, 104,106,230, 108,105,103,44,0,39,101,104, 108,105,103,44,0,39,101,104, 44,0, 232,98,0,3,4,99,230, 242,232,132,98,0,3,4,5,99,230, 242,232,132,98,0,83, 91,21,0,20,80,84,85,89,90,92, 242,232,132,98,81,0,3,4,5,99,230, 242,132,81,0,59,61,77,93, 108,105,103,91,87,31,29,27,21,7,0, 242,232,132,108,105,103,98,0,3,4,8,9,99,100,101,102,104,230, 242,204,201,199,198,196,195,192,191,190,189,188,186,185,132,97,35,27,0,34, 59,93,96,149,180,181,182,183,184,193, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,105,103,98,91,88,87, 76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,235, 246,245,244,243,242,207,176,171,139,132,122,114,107,98,91,88,87,76,60,37,35, 33,31,29,27,25,23,21,19,17,15,13,7,0,236, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,105,103,98,91,88,87, 76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,235, 246,245,244,243,242,207,176,171,153,139,132,122,114,107,98,91,88,87,76,60, 37,35,31,29,27,25,23,21,19,17,15,13,7,0,239, 105,0, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,105,103,98, 91,88,87,76,60,37,35,33,31,27,25,23,21,19,17,15,13,7,0,99,101,221,222, 223,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 246,245,244,243,242,232,229,207,176,171,153,139,132,122,114,108,107,105,103, 98,91,88,87,60,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,9,99,100, 101,102,104,230, 246,245,244,243,242,229,207,176,171,153,139,132,122,114,107,91,88,87,60,37, 35,33,31,27,25,23,21,19,17,15,13,7,0,47,75,213,225, 244,243,242,232,153,132,125,124,122,114,108,105,103,98,35,33,25,23,21,19,17, 15,0,3,4,8,9,99,100,101,102,104,230, 244,243,242,232,208,153,132,125,124,122,114,108,105,103,98,81,37,35,33,29, 25,23,21,19,17,15,13,0,3,4,8,9,99,100,101,102,104,230, 246,245,244,243,242,207,176,173,171,169,168,167,166,165,164,163,162,161,160, 159,139,132,122,114,107,98,91,88,87,76,60,37,35,33,31,29,27,25,23,21,19, 17,15,13,7,0,142,143,144,145,152,154,155,156,157,170,172, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,15,0,64,65,70,72, 244,243,242,208,153,132,125,124,122,114,37,35,33,29,25,23,21,19,17,15,13,0, 12,64,65,67,68,69,70,72, 207,0, 244,243,242,232,132,125,124,122,114,108,105,103,98,35,33,25,23,21,0,3,4,8,9, 99,100,101,102,104,230, 244,243,242,232,132,125,124,122,114,108,105,103,98,35,33,25,23,21,0,3,4,8,9, 99,100,101,102,104,230, 244,243,125,124,122,0,119,121,126, 246,244,243,242,207,176,171,153,139,132,122,114,91,88,87,76,60,37,35,33,31, 29,27,25,23,21,19,17,15,13,7,0, 246,245,244,243,242,207,176,173,171,169,168,167,166,165,164,163,162,161,160, 159,153,139,132,122,114,107,98,91,88,87,76,60,37,35,31,29,27,25,23,21, 19,17,15,13,7,0,117,142,143,144,145,170,172, 244,243,242,232,132,125,124,122,114,108,105,103,98,35,33,25,23,21,0,3,4,8,9, 99,100,101,102,104,230, 244,243,242,132,125,124,122,114,35,33,25,23,21,0,20,22,24,34,59,93,112,113, 116,118,120,135,137,138,140,146, 147,0, 244,243,242,132,125,124,122,114,35,33,25,23,21,0,20,22,24,34,59,93,112,113, 116,118,120,138,140,146, 139,0, 210,207,25,23,11,0,10,22,24, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,15,0,14,16,18,20, 22,24,34,59,73,93,112,113,116,118,120,133,134,135,136,137,138,140,146, 150,151, 108,105,103,44,37,13,7,0,6,12,68, 246,245,244,243,242,229,207,176,171,153,139,132,122,114,107,91,88,87,60,37, 35,33,31,27,25,23,21,19,17,15,13,7,0,47,75,213,225, 37,0,36,53, 244,243,242,232,153,132,125,124,122,114,108,105,103,98,35,33,25,23,21,19,17, 15,0,3,4,8,9,99,100,101,102,104,230, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,15,0,70,71,72, 37,0,36,53, 242,232,132,108,107,105,103,98,44,21,19,17,0,3,99,101,104,106,230, 242,232,132,108,107,105,103,98,44,37,21,19,17,2,0,1,3,36,52,53,54,99,101, 104,106,230, 232,98,0,3,99,230, 242,132,0,59,93, 242,232,132,98,0,3,4,5,99,230, 242,232,132,108,105,103,98,91,87,31,29,27,21,7,0,3,4,5,99,230, 242,132,0,59,93, 91,21,0,20,80,84,85,89,90,92, 91,21,0,20,85,89,90,92, 87,7,0, 232,98,0,3,4,99,230, 232,98,17,0,3,4,5,99,230, 232,98,0,3,4,99,230, 232,98,0,3,4,99,230, 232,98,0,3,4,99,187,230, 232,98,0,3,4,99,230, 232,98,0,3,4,99,230, 108,105,103,29,7,0,6,100,101,102,104,194,205, 108,105,103,29,7,0,6,100,101,102,104,194,205, 232,98,0,3,4,99,187,230, 232,98,0,3,4,99,187,230, 232,98,0,3,4,99,187,230, 232,98,0,3,4,99,187,230, 232,98,0,3,4,99,187,230, 232,98,0,3,4,99,187,230, 232,108,105,103,98,0,3,4,8,99,100,101,102,104,230, 242,132,0,59,93, 244,243,242,232,132,122,98,13,0,3,4,5,99,230, 242,132,0,59,93, 13,0,12, 108,105,103,27,0,39,40,101,104, 153,0, 33,0, 105,103,0,104, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,105,103,98, 91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,219, 246,245,244,243,242,229,207,176,171,153,139,132,122,114,107,91,88,87,60,37, 35,33,31,27,25,23,21,19,15,13,7,0,221,222,226,227, 76,0, 243,122,0, 244,243,132,122,0,127,131, 243,122,0, 243,122,0, 244,132,0, 244,243,132,122,0, 246,245,242,207,176,173,171,169,168,167,166,165,164,163,162,161,160,159,153, 139,114,107,98,91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7, 0,142,143,144,145,157,170,172, 212,211,209,208,37,29,27,13,7,0,6,12,68, 212,209,37,27,0,26,36,66, 211,37,0,36,66, 37,0,36,66, 208,29,0,28, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 244,243,132,122,0,127,131, 243,232,212,211,210,209,208,207,176,147,139,122,108,105,103,98,44,37,31,29, 27,25,23,13,11,7,0,123, 244,243,122,0, 232,212,211,210,209,208,207,176,147,139,108,105,103,98,44,37,31,29,27,25,23, 13,11,7,0,3,4,5,99,230, 232,212,211,210,209,208,207,176,147,139,108,105,103,98,44,37,31,29,27,25,23, 13,11,7,0,3,4,5,99,230, 33,23,0,32, 31,25,23,0,22,24,30, 244,243,232,125,124,122,114,108,105,103,98,25,23,0,3,4,8,9,99,100,101,102, 104,230, 244,243,242,232,132,125,124,122,114,108,105,103,98,35,33,25,23,21,0,3,4,8,9, 99,100,101,102,104,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 244,243,242,132,125,124,122,114,35,33,25,23,21,0,20,22,24,34,59,93,112,113, 116,118,120,137,138,140,146, 244,243,242,132,125,124,122,114,35,33,25,23,21,0,20,22,24,34,59,93,112,113, 116,118,120,137,138,140,146, 210,207,25,23,11,0,10,22,24, 212,211,209,208,176,108,105,103,44,37,29,27,13,7,0,74, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,15,0,14,16,18,20, 22,24,34,59,73,93,112,113,116,118,120,133,134,135,136,137,138,140,146, 150,151, 76,0, 242,132,0,59,93, 31,0,30, 242,232,132,98,81,0,3,4,5,99,230, 232,108,105,103,98,91,87,31,29,27,21,7,0,3,4,5,99,230, 232,200,98,0,3,99,230, 17,0,16, 232,202,98,0,3,99,230, 232,200,98,0,3,99,230, 232,98,17,0,3,16,99,230, 232,197,98,0,3,99,230, 244,243,242,232,153,132,125,124,122,114,98,35,33,25,23,21,19,17,0,3,16,18, 20,22,24,34,59,93,99,112,113,116,118,120,133,135,136,137,138,140,146, 150,151,230, 29,0,28, 242,132,0,59,93,148, 244,243,242,132,125,124,122,114,35,33,29,25,23,21,0,20,22,24,34,59,93,112, 113,116,118,120,135,137,138,140,146, 17,0,16, 244,243,242,232,132,122,108,105,103,98,17,0,3,99,100,101,102,104,230, 13,0,12, 244,243,242,232,132,122,98,0,3,99,230, 244,243,242,153,132,125,124,122,81,25,23,0,22,24,59,61,77,93,113,118,120, 150,151, 242,232,204,201,199,198,196,195,192,191,190,189,188,186,185,132,108,107,105, 103,98,97,35,27,0,3,34,59,93,96,99,101,104,106,149,182,183,184,193,230, 105,0, 246,245,244,243,242,232,207,176,171,153,139,132,122,114,108,107,105,103,98, 91,88,87,76,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,99,101,221, 222,223,230, 153,0, 33,0, 246,245,244,243,242,232,229,207,176,171,153,139,132,122,114,107,98,91,88,87, 60,37,35,33,31,27,25,23,21,19,15,13,7,0,3,99,221,222,227,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 244,243,132,122,0,131, 232,212,211,209,208,207,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,15,0,65,70,72, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 232,212,211,209,208,176,108,105,103,98,44,37,29,27,13,7,0,3,4,5,99,230, 244,243,132,122,0,131, 243,122,0, 246,245,244,243,242,207,176,173,171,169,168,167,166,165,164,163,162,161,160, 159,153,139,132,122,114,107,98,91,88,87,76,60,37,35,31,29,27,25,23,21, 19,17,15,13,7,0,117,142,143,144,145,170,172, 232,212,211,210,209,208,207,176,139,108,105,103,98,44,37,31,29,27,25,23,13, 11,7,0,3,4,5,99,230, 232,212,211,210,209,208,207,176,139,108,105,103,98,87,44,37,31,29,27,25,23, 13,11,7,0,3,4,5,99,230, 244,243,125,124,122,114,25,23,0,22,24,112,113,118,120, 244,243,242,132,125,124,122,114,35,33,25,23,21,0,20,22,24,34,59,93,112,113, 116,118,120,138,140,146, 139,0, 139,0, 242,232,132,108,105,103,98,0,3,4,8,9,99,100,101,102,104,230, 212,211,209,208,176,108,105,103,44,37,29,27,13,7,0,74, 232,212,211,209,208,108,105,103,98,44,37,29,27,0,3,4,5,99,230, 232,98,0,3,4,99,230, 242,132,81,0,59,61,62,63,77,93, 232,98,0,3,4,99,230, 232,98,0,3,4,99,187,230, 244,243,242,153,132,125,124,122,114,35,33,25,23,21,19,17,0,16,18,20,22,24, 34,59,93,112,113,116,118,120,133,135,136,137,138,140,146,150,151,206, 232,98,17,0,3,4,5,99,230, 13,0,12, 25,23,0,22,24, 242,132,0,59,93,148, 153,0,150,151, 33,0,32, 242,132,0,177,178, 232,98,17,0,3,16,99,230, 29,7,0,6,28, 242,232,132,98,0,3,99,203,230, 108,105,103,29,7,0,6,100,101,102,104,194,205, 17,0,47,213, 244,243,125,124,122,114,33,25,23,0,22,24,112,113,116,118,120, 244,243,242,232,212,211,209,208,132,122,108,105,103,98,44,37,29,27,13,7,0,3, 4,5,99,230, 244,243,242,132,125,124,122,114,35,33,25,23,21,0,20,22,24,34,59,93,112,113, 116,118,120,135,137,138,140,146, 242,132,81,0,59,61,62,77,93, 244,243,242,232,132,122,98,0,3,4,99,230, 244,243,242,153,132,125,124,122,114,35,33,29,25,23,21,19,17,0,16,18,20,22, 24,34,59,93,112,113,116,118,120,133,135,136,137,138,140,146,150,151, 246,245,244,243,242,207,176,173,171,169,168,167,166,165,164,163,162,161,160, 159,153,139,132,122,114,107,98,91,88,87,76,60,37,35,31,29,27,25,23,21, 19,17,15,13,7,0,117,142,143,144,145,170,172, 25,23,0,22,24, 242,232,132,98,0,3,99,203,230, 33,0,32, 244,243,242,132,122,0, }; static unsigned const char ag_astt[4056] = { 5,1,5,8,8,8,1,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,8,8,8,7,1, 1,1,1,1,1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 306,1,307,1, 1,2,4,2,2,1, 8,8,4,5,5,8,8,8,3,7,8,6,5, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,126,126,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 4,9,128, 121,5, 10,10,6,10, 24,1,24,24,24,24,24,24,24,24,24,24,24,24,24,24,4,123,12,12,122,24,24,24,24, 24,24,7,122,122,11,12,122,1, 99,99,13,19,15,8,14,27,26,25,24,23,22,18,17,49,21,16,20, 125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, 125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,127, 120,10, 28,28,11,28, 118,12, 6,6,6,1,6,6,6,6,6,4,29,29,31,6,6,6,6,6,6,6,13,31,31,14,14,31,14,30,14,29,1, 99,99,32,14,33,34,33,16, 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,35,35,277, 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277, 15,35,36,36,279, 100,100,100,1,3,3,3,3,3,3,3,3,100,100,3,3,3,37,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,16,37,37,105,37,1, 99,99,17,39,49,38,16, 40,47,41, 3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,42,42,42,2,3,3,3,19,2,2,42,2,43,1, 49,49,49,49,49,1,49,49,49,44,49,49,49,49,4,49,49,49,49,49,49,49,49,49,45,49, 280,49,49,49,49,49,49,49,49,20,49,48,50,49,47,46,1, 53,51,51,52, 54,37,55,38, 4,5,5,23,56,6,5, 4,5,5,24,57,6,5, 4,5,5,25,58,6,5, 4,5,5,26,59,6,5, 99,99,62,13,19,15,27,14,62,62,61,60,60,60,32,60,22,18,17,49,21,16,20, 119,28, 63,29, 29,29,30,111,29, 108,108,108,108,108,1,108,108,108,108,108,108,108,108,108,108,108,108,4,108, 29,29,2,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108, 108,108,108,31,2,2,109,30,109,29,1, 82,82,82,82,32,64, 76,76,76,66,67,76,65,76,76,76,66,76,33,69,66,68, 70,34, 274,35, 278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,35,35,278, 278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, 36,35,276, 101,101,101,1,101,101,2,4,2,2,1, 53,51, 40,48,41, 6,6,6,1,6,6,6,6,6,6,4,29,29,31,6,6,6,6,6,6,6,6,6,6,40,31,31,8,8,31,8,30,8, 29,1, 99,99,41,50,38,16, 71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,4,5,5,71,71,23,42,7,71,6,5, 72,43,220, 74,74,74,74,74,74,74,73,313,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,44,74,74,315, 76,76,76,76,76,76,76,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,321,76,76, 76,76,76,76,76,76,76,76,76,45,76,76,323, 286,46, 285,47, 77,77,48,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,287,78,78,78,78,78,78,78,78,78,49,78, 79,50,273, 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,6,6,4,6,29,29,31,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 6,6,6,6,51,31,31,10,10,31,10,30,10,29,1, 133,133,99,185,99,133,133,133,91,93,92,88,89,13,82,83,80,52,81,86,85,94,136, 135,96,169,16,95,95,168,90,135,175,98,174,97,97,97,97,87,84, 1,3,3,3,2,3,3,3,53,2,2,52,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,54,2,2,5,2,1, 72,72,72,72,72,72,72,72,72,73,73,73,73,73,72,72,72,72,72,72,72,72,51,55,101, 102,65,100,66,99, 31,1,31,4,123,12,12,122,31,31,31,31,56,122,122,11,12,122,1, 30,1,30,4,123,12,12,122,30,30,30,30,57,122,122,11,12,122,1, 29,1,29,4,123,12,12,122,29,29,29,29,58,122,122,11,12,122,1, 28,1,28,4,123,12,12,122,28,103,28,28,28,54,59,55,122,104,39,105,105,122,11, 12,122,1, 4,5,5,36,60,106,6,5, 4,5,5,35,61,107,6,5, 27,62, 1,108,115,108,108,108,1, 109,1,109,2,64,2,2,109,2,1, 84,84,84,84,65,110, 111,13,66,92,80,114,80,113,112,114, 3,1,3,2,3,67,2,2,90,2,1, 99,99,32,68,33,115,33,16, 77,77,77,79,77,77,77,77,79,77,69, 6,1,6,4,29,29,31,70,31,31,53,53,31,53,30,53,29,1, 99,117,118,119,120,121,122,125,126,127,128,129,130,116,99,131,93,221,71,134, 135,16,133,123,136,223,136,136,132,124, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,72,2,2,17,2,1, 310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310, 310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,73, 310, 312,312,312,312,312,312,312,73,312,312,312,312,312,312,312,312,312,312,312, 312,312,312,312,312,312,312,312,312,312,312,312,312,312,314,312, 318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318, 318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,75, 318, 320,320,320,320,320,320,320,75,320,320,320,320,320,320,320,320,320,320,320, 320,320,320,320,320,320,320,320,320,320,320,320,320,320,322,320, 284,77, 288,288,288,288,288,1,288,288,288,44,288,288,288,288,4,288,288,288,288,288, 288,288,288,288,288,288,45,288,288,288,288,288,288,140,288,288,288,281, 288,139,138,137,288,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,29,29,31,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 6,80,31,31,11,11,31,11,30,11,29,1, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,15,295,295,295,81,271,142,20,141, 6,6,6,1,6,6,6,6,6,6,4,29,29,31,6,6,6,6,6,6,6,6,82,31,31,13,13,31,13,30,13, 29,1, 6,6,6,1,6,6,6,6,6,6,6,4,29,29,31,6,6,6,6,6,6,6,6,6,6,6,6,83,31,31,12,12,31, 12,30,12,29,1, 206,206,207,207,206,206,206,144,143,199,198,197,196,195,194,193,192,191,190, 189,206,207,207,206,206,206,206,206,206,206,206,206,206,206,206,206,206, 206,206,206,206,206,206,206,206,84,206,211,188,213,149,148,147,149,206, 146,145, 72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,85,151,57,150,99, 72,72,72,73,72,72,72,72,72,72,73,72,72,73,72,72,72,72,72,72,51,86,101,152, 57,153,60,154,150,99, 155,260, 6,6,6,1,6,6,6,6,6,4,29,29,31,6,6,6,6,6,88,31,31,16,16,31,16,30,16,29,1, 6,6,6,1,6,6,6,6,6,4,29,29,31,6,6,6,6,6,89,31,31,15,15,31,15,30,15,29,1, 142,142,156,156,157,90,159,158,156, 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160, 160,160,160,160,160,160,160,160,160,160,160,160,91, 161,161,161,161,161,161,161,144,143,199,198,197,196,195,194,193,192,191,190, 189,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161, 161,161,161,161,161,161,161,161,92,161,161,161,161,161,146,145, 6,6,6,1,6,6,6,6,6,4,29,29,31,6,6,6,6,6,93,31,31,21,21,31,21,30,21,29,1, 133,133,99,99,133,133,133,91,93,92,88,89,13,94,94,136,135,96,169,16,95,95, 168,90,135,162,97,97,97,97, 163,167, 133,133,99,99,133,133,133,91,93,92,88,89,13,96,94,136,135,96,169,16,95,95, 168,90,135,160,160,160, 164,154, 166,167,88,89,165,173,268,168,169, 133,133,99,185,99,133,133,133,91,93,92,88,89,13,82,83,80,99,81,86,85,94,136, 135,96,169,171,16,95,95,168,90,135,171,151,170,171,97,97,97,97,87,84, 73,73,73,73,73,51,40,100,172,101,69, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,15,295,295,295,101,74,173,20,141, 103,43,104,67, 6,6,6,1,6,6,6,6,6,6,4,29,29,31,6,6,6,6,6,6,6,6,103,31,31,22,22,31,22,30,22, 29,1, 72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,104,100,68,99, 103,42,104,41, 34,1,34,4,123,12,12,122,34,34,34,34,106,122,122,11,12,122,1, 33,1,33,4,123,12,12,122,33,103,33,33,33,54,107,55,122,104,39,105,105,122,11, 12,122,1, 1,2,116,2,2,1, 99,99,109,83,16, 174,1,174,2,110,2,2,174,2,1, 3,1,3,3,3,3,2,3,3,3,3,3,3,3,111,2,2,94,2,1, 99,99,95,96,16, 111,13,113,92,175,114,175,113,112,114, 111,13,86,92,88,113,112,98, 177,176,115, 1,178,116,178,178,178,1, 1,2,179,117,2,2,179,2,1, 1,180,118,180,180,180,1, 1,181,119,181,181,181,1, 1,182,120,182,182,182,245,1, 1,183,121,183,183,183,1, 1,184,122,184,184,184,1, 4,29,29,185,40,123,186,185,30,185,29,242,185, 4,29,29,185,40,124,187,185,30,185,29,241,185, 1,182,125,182,182,182,240,1, 1,182,126,182,182,182,239,1, 1,182,127,182,182,182,238,1, 1,182,128,182,182,182,237,1, 1,182,129,182,182,182,236,1, 1,182,130,182,182,182,235,1, 1,4,29,29,189,131,189,189,188,189,188,30,188,29,1, 99,99,132,233,16, 103,103,103,1,103,103,191,190,133,191,191,190,191,1, 99,99,134,227,16, 51,226,192, 4,5,5,23,136,193,222,6,5, 294,137, 293,138, 194,194,139,194, 195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195, 195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195, 195,140,195, 198,198,198,198,198,198,198,198,198,44,198,198,198,198,198,198,198,198,198, 198,198,45,198,198,198,198,198,198,198,198,198,141,197,196,198,198, 199,142, 200,200,143, 148,148,149,148,144,200,146, 202,202,204, 201,201,203, 210,210,183, 209,209,209,209,182, 208,208,208,208,208,144,143,199,198,197,196,195,194,193,192,191,190,189,201, 208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208, 208,208,208,208,208,149,208,212,188,214,208,146,145, 73,73,73,73,73,73,73,51,40,150,172,101,64, 202,203,103,72,151,264,204,58, 205,103,63,204,58, 103,62,204,61, 206,79,154,262, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,155,2,2,261,2,1, 148,148,149,148,156,207,146, 144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 144,144,144,144,144,144,144,157,208, 143,143,143,137, 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,159,2,2,132,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,160,2,2,130,2,1, 210,209,161,131, 211,88,89,162,168,169,170, 212,212,1,212,212,212,212,4,29,29,31,212,212,163,31,31,212,212,31,212,30, 212,29,1, 213,213,213,1,213,213,213,213,213,4,29,29,31,213,213,213,213,213,164,31,31, 213,213,31,213,30,213,29,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,165,2,2,9,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,166,2,2,267,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,167,2,2,266,2,1, 133,133,99,99,133,133,133,91,93,92,88,89,13,168,94,136,135,96,169,16,95,95, 168,90,135,214,214,214,214, 133,133,99,99,133,133,133,91,93,92,88,89,13,169,94,136,135,96,169,16,95,95, 168,90,135,215,215,215,215, 166,167,88,89,165,152,268,168,169, 215,215,215,215,216,215,215,215,215,215,215,215,215,215,171,70, 133,133,99,185,99,133,133,133,91,93,92,88,89,13,82,83,80,172,81,86,85,94, 136,135,96,169,217,16,95,95,168,90,135,217,151,170,217,97,97,97,97,87, 84, 218,173, 99,99,174,85,16, 211,175,93, 3,1,3,2,3,176,2,2,91,2,1, 1,3,3,3,2,3,3,3,3,3,3,3,177,2,2,89,2,1, 1,219,2,234,2,2,1, 83,179,220, 1,221,2,180,2,2,1, 1,222,2,181,2,2,1, 1,2,83,182,2,223,2,1, 1,224,2,183,2,2,1, 133,133,99,1,185,99,133,133,133,91,2,93,92,88,89,13,82,83,184,2,86,85,94, 136,135,96,169,16,2,95,95,168,90,135,243,170,243,97,97,97,97,87,84,1, 79,185,254, 99,99,252,225,16,180, 133,133,99,99,133,133,133,91,93,92,252,88,89,13,187,94,136,135,96,169,16,95, 95,168,90,135,226,97,97,97,97, 83,188,227, 102,102,102,1,102,102,4,29,29,2,108,189,2,2,109,30,109,29,1, 51,190,228, 104,104,104,1,104,104,2,4,2,2,1, 133,133,99,185,99,133,133,133,32,88,89,192,136,135,33,228,33,16,231,90,135, 229,84, 99,1,117,118,119,120,121,122,125,126,127,128,129,130,116,99,4,123,12,12,122, 131,93,24,193,122,134,135,16,133,122,11,12,122,123,225,225,132,124,1, 292,194, 288,288,288,288,288,1,288,288,288,44,288,288,288,288,4,288,288,288,288,288, 288,288,288,288,288,288,45,288,290,288,288,288,288,288,140,288,288,288, 195,288,139,138,137,288,1, 303,196, 302,197, 298,298,298,298,298,1,298,298,298,298,44,298,298,298,298,298,299,298,298, 298,298,298,298,45,298,298,298,298,298,298,298,298,298,296,299,299,197, 196,298,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,199,2,2,272,2,1, 148,148,149,148,205,147, 1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,201,2,2,181,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,202,2,2,270,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,203,2,2,265,2,1, 72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,204,59,150,99, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,205,2,2,269,2,1, 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,206,2,2,263,2,1, 148,148,149,148,141,147, 145,145,138, 229,229,229,229,229,229,229,144,143,199,198,197,196,195,194,193,192,191,190, 189,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229, 229,229,229,229,229,229,229,229,209,229,229,229,229,229,146,145, 1,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,210,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,211,2,2,19,2,1, 133,133,133,133,133,91,88,89,212,136,135,172,172,90,135, 133,133,99,99,133,133,133,91,93,92,88,89,13,213,94,136,135,96,169,16,95,95, 168,90,135,158,158,158, 164,156, 164,155, 230,1,230,4,29,29,31,216,31,31,230,230,31,230,30,230,29,1, 215,215,215,215,216,215,215,215,215,215,215,215,215,215,217,71, 1,3,3,3,3,3,3,3,2,3,3,3,3,218,2,2,75,2,1, 1,231,219,231,231,231,1, 99,99,32,220,33,54,232,232,33,16, 1,233,221,233,233,233,1, 1,182,222,182,182,182,246,1, 133,133,99,185,99,133,133,133,91,93,92,88,89,13,82,83,223,86,85,94,136,135, 96,169,16,95,95,168,90,135,258,170,258,97,97,97,97,87,84,234, 1,2,235,224,2,2,235,2,1, 51,176,236, 88,89,256,168,169, 99,99,227,225,16,179, 185,228,230,84, 210,229,171, 217,217,230,216,237, 1,2,83,231,2,238,2,1, 79,40,232,239,248, 249,1,249,2,233,2,2,240,1, 4,29,29,185,40,234,241,185,30,185,29,257,185, 15,235,244,20, 133,133,133,133,133,91,242,88,89,236,136,135,177,177,178,90,135, 218,218,218,1,3,3,3,3,218,218,3,3,3,2,3,3,3,3,3,3,237,2,2,219,2,1, 133,133,99,99,133,133,133,91,93,92,88,89,13,238,94,136,135,96,169,16,95,95, 168,90,135,243,97,97,97,97, 99,99,32,239,33,54,56,33,16, 250,250,250,1,250,250,244,240,244,244,244,1, 133,133,99,185,99,133,133,133,91,93,92,252,88,89,13,82,83,241,86,85,94,136, 135,96,169,16,95,95,168,90,135,259,170,259,97,97,97,97,87,84, 245,245,245,245,245,245,245,144,143,199,198,197,196,195,194,193,192,191,190, 189,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, 245,245,245,245,245,245,245,245,242,245,245,245,245,245,146,145, 88,89,255,168,169, 249,1,249,2,244,2,2,246,1, 210,245,131, 250,250,250,250,250,247, }; static const unsigned short ag_sbt[] = { 0, 17, 58, 64, 77, 116, 118, 122, 156, 175, 210, 212, 216, 218, 249, 257, 299, 340, 347, 350, 380, 423, 427, 431, 438, 445, 452, 459, 482, 484, 486, 491, 541, 547, 563, 565, 567, 607, 618, 620, 623, 658, 664, 690, 693, 731, 769, 771, 773, 777, 817, 820, 871, 912, 926, 957, 987,1006,1025,1044,1070,1078,1086,1088,1095,1105,1111,1121,1132,1140, 1151,1169,1199,1221,1259,1294,1332,1367,1369,1413,1435,1483,1520,1553, 1591,1648,1670,1700,1702,1731,1760,1769,1801,1854,1883,1913,1915,1943, 1945,1954,1997,2008,2045,2049,2082,2103,2107,2126,2152,2158,2163,2173, 2193,2198,2208,2216,2219,2226,2235,2242,2249,2257,2264,2271,2284,2297, 2305,2313,2321,2329,2337,2345,2360,2365,2379,2384,2387,2396,2398,2400, 2404,2444,2480,2482,2485,2492,2495,2498,2501,2506,2556,2569,2577,2582, 2586,2590,2612,2619,2647,2651,2681,2711,2715,2722,2746,2775,2797,2819, 2841,2870,2899,2908,2924,2967,2969,2974,2977,2988,3006,3013,3016,3023, 3030,3038,3045,3089,3092,3098,3129,3132,3151,3154,3165,3188,3228,3230, 3275,3277,3279,3319,3341,3347,3370,3392,3414,3435,3457,3479,3485,3488, 3541,3570,3600,3615,3643,3645,3647,3665,3681,3700,3707,3717,3724,3732, 3772,3781,3784,3789,3795,3799,3802,3807,3815,3820,3829,3842,3846,3863, 3889,3919,3928,3940,3980,4033,4038,4047,4050,4056 }; static const unsigned short ag_sbe[] = { 10, 55, 60, 72, 113, 117, 120, 149, 161, 209, 211, 214, 217, 238, 252, 294, 334, 342, 348, 373, 415, 425, 428, 434, 441, 448, 455, 465, 483, 485, 488, 533, 545, 559, 564, 566, 604, 614, 619, 621, 647, 660, 685, 691, 727, 765, 770, 772, 775, 815, 818, 860, 888, 920, 951, 980, 999,1018,1037,1058,1074,1082,1087,1090,1099,1109,1113,1126,1135,1150, 1158,1187,1215,1257,1292,1330,1365,1368,1406,1429,1472,1515,1542,1580, 1636,1665,1691,1701,1720,1749,1765,1800,1846,1872,1896,1914,1928,1944, 1950,1971,2004,2040,2046,2071,2099,2104,2119,2140,2154,2160,2167,2187, 2195,2200,2210,2218,2221,2229,2237,2244,2251,2259,2266,2276,2289,2299, 2307,2315,2323,2331,2339,2350,2362,2373,2381,2385,2391,2397,2399,2402, 2442,2475,2481,2484,2489,2494,2497,2500,2505,2548,2565,2573,2579,2583, 2588,2606,2616,2645,2650,2675,2705,2713,2718,2735,2764,2791,2813,2835, 2854,2883,2904,2922,2941,2968,2971,2975,2982,3000,3009,3014,3019,3026, 3033,3041,3063,3090,3094,3112,3130,3143,3152,3161,3176,3212,3229,3268, 3276,3278,3312,3335,3345,3364,3386,3408,3431,3451,3473,3483,3487,3533, 3564,3594,3608,3628,3644,3646,3654,3679,3694,3702,3710,3719,3726,3748, 3775,3782,3786,3791,3796,3800,3804,3810,3817,3824,3834,3843,3855,3883, 3902,3922,3935,3957,4025,4035,4042,4048,4055,4056 }; 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,5,2,2,2,2,2,2,2, 1,1,1,2,3,1,2,3,2,1,1,1,1,2,1,3,1,3,4,1,1,3,1,2,2,1,2,1,1,2,1,1,2,2,2, 3,4,0,0,2,4,1,2,0,1,3,1,0,4,0,5,1,1,2,4,2,4,1,3,2,1,2,1,2,1,2,3,3,2,3, 2,1,1,1,2,1,2,1,0,1,2,3,1,2,3,3,2,2,2,1,2,0,1,2,1,3,3,3,0,1,1,1,1,2,1, 1,2,1,2,0,2,1,2,1,1,1,1,1,1,1,3,3,1,4,1,2,1,1,1,1,1,1,1,1,1,3,5,4,3,3, 3,1,3,3,4,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1,1,2,1,1,2,2, 2,1,2,1,2,0,3,1,2,2,3,0,2,3,1,3,1,2,3,3,4,3,1,2,2,2,2,2,2,2,2,2,2,3,5, 2,4,7,5,1,2,0,1,1,2,6,3,4,1,3,1,3,3,4,3,4,3,3,2,4,4,2,4,3,2,1,2,0,1,2, 0,2,1,1,3,2,2,0,2,1,3,1,3,2,2,0,2,1,2,2,1,1,2,2,2,1,2,2,1,1,2,1,2,0,1, 2,1,1,2,1,2,0,1,2,1 }; static const unsigned char ag_ptt[] = { 0, 4, 4, 5, 5, 1, 9, 9, 6, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 40, 40, 43, 43, 38, 41, 41, 41, 41, 41, 49, 49, 42, 42, 45, 45, 45, 54, 54, 45, 52, 50, 50, 50, 51, 51, 56, 56, 58, 58, 57, 62, 63, 63, 64, 64, 66, 67, 67, 69, 69, 65, 55, 55, 55, 53, 71, 70, 70, 72, 68, 68, 68, 61, 61, 79, 79, 61, 77, 82, 77, 83, 77, 80, 80, 80, 78, 86, 86, 89, 85, 90, 92, 92, 84, 84, 93, 93, 93, 96, 96, 96, 59, 3, 3, 8, 8, 8,100,100,104,104,102,102,106,106,106, 39, 39, 39, 39,110,110, 111,111,101,112,112,116,113,120,120,118,118,119,119,126,126,119,121,121, 123,123,127,127,131,131, 73, 73,133,133,135,135,135,137,137,138,138,117, 117,117,117,117,140,140,140,140,140,146,146, 46, 46, 46,148,148,148,149, 149,150,152,152,152,151,157,157,157,142,142,142,142,142,142,142,142,142, 142,142,170,172,144,143,143,145,154,154,154,154,154,155,155,156,156, 74, 74,178,178,177, 48,181,181,179,180,180,182,182,182,182,182,182,182,182, 184,183,183,183,183,183,183,183,183,183,183,183,183,183,183,203,203,205, 205,205,194,193,193,187,206,206,136,136,136,136,136,136,136,136,136,136, 136,134,134, 47,215,216,216,217,217,213,214,214,218,218,218,218,218,219, 219,223,223,223,223,223,223,225, 75,226,226,226,227,227,227,227, 99,230, 230, 99,236,236,236,237,237,238,238,222,239,239,239,240,240,241,241,221, 235 }; 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_4(V(0,(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(1,(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: ag_rp_149(V(1,(unsigned char * *))); break; case 149: ag_rp_150(); break; case 150: V(0,(unsigned char * *)) = ag_rp_151(); break; case 151: V(0,(unsigned char * *)) = ag_rp_152(); break; case 152: ag_rp_153(); break; case 153: ag_rp_154(); break; case 154: ag_default(&ag_rtt[0]); ag_rp_155(); break; } (PCB).la_ptr = (PCB).pointer; } static const unsigned char ag_ctn[] = { 0,0, 99,1, 0,0, 0,0,101,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 57,1,213,1, 59,1, 51,1, 56,1, 48,1, 47,1, 0,0, 45,1, 41,1, 41,1, 41,1, 41,1, 41,1, 0,0, 0,0,100,1, 0,0, 77,1, 0,0, 57,2, 0,0, 0,0, 0,0, 0,0, 56,1, 0,0, 56,2,179,1, 48,2,222,1,221,1,218,1,218,1, 218,1, 0,0, 47,2, 0,0, 46,2, 0,0, 52,1, 52,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 77,2, 77,2, 0,0, 86,1, 0,0, 0,0, 57,3,179,2, 0,0, 0,0, 0,0, 0,0, 0,0,218,2, 0,0, 0,0,134,1,134,1,136,1, 0,0, 150,1,136,1,136,1,136,1, 0,0, 0,0,113,1,112,1, 0,0, 0,0, 0,0,146,1, 0,0, 0,0,136,1, 70,1, 0,0, 68,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 77,3, 77,3, 0,0, 0,0, 0,0, 0,0, 0,0,182,1,183,1,183,1,183,1, 183,1,183,1,183,1,183,1,183,1,183,1,183,1,183,1,183,1,183,1,183,1,182,1, 182,1,182,1,182,1,182,1, 0,0, 0,0, 0,0, 0,0, 0,0, 75,1,134,2,143,1, 145,1, 0,0,143,1,152,1,152,1,152,1, 65,1, 0,0, 69,1, 69,1,136,2,136,2, 0,0, 0,0,121,1,113,2,112,2, 0,0, 0,0,146,2, 0,0, 0,0,136,2,136,2, 0,0, 0,0,136,1, 70,2, 70,2, 68,2, 77,4, 0,0, 86,3, 0,0, 0,0,183,2, 0,0, 0,0,187,1, 0,0, 0,0, 0,0,149,2,183,2,149,2, 0,0,182,2, 0,0, 182,2, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0,134,3,127,1,150,3,136,3,136,3, 0,0,136,3,136,3,127,1,123,1,146,3, 0,0, 0,0,146,3, 0,0, 0,0, 0,0, 74,1, 70,3, 68,3,183,3,183,3,183,3,183,3,187,2,183,3,148,1, 0,0,149,3, 182,3,146,4, 74,2, 0,0, 63,1, 0,0,206,1,183,4,148,2, 0,0,183,5, 63,2, 203,1,206,2,116,1, 0,0, 0,0,116,2,203,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 == 44) {(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]])(); } }