view tests/agcl/oldagsrc/good/pgg24ts.cpp @ 24:a4899cdfc2d6 default tip

Obfuscate the regexps to strip off the IBM compiler's copyright banners. I don't want bots scanning github to think they're real copyright notices because that could cause real problems.
author David A. Holland
date Mon, 13 Jun 2022 00:40:23 -0400
parents 13d2b8934445
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 PGG24TS_H
#include "pgg24ts.h"
#endif

#ifndef PGG24TS_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);

static void ag_delete_wrappers(void);
#ifndef DELETE_WRAPPERS
#define DELETE_WRAPPERS ag_delete_wrappers()
#endif
#define TOKEN_NAMES pgg_token_names
const char *const pgg_token_names[242] = {
  "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",
  "'$'",
  "",
  "",
  "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\"",
  "\"lexeme\"",
  "\"reserve\"",
  "\"keywords\"",
  "\"rename\"",
  "\"macro\"",
  "macro name",
  "",
  "tokens",
  "'\\?'",
  "\"}...\"",
  "\"]...\"",
  "\"?...\"",
  "\"}/...\"",
  "\"]/...\"",
  "embedded c head",
  "",
  "",
  "",
  "",
  "c code first",
  "",
  "",
  "c character constant",
  "c string constant",
  "",
  "simple c char",
  "",
  "",
  "",
  "",
  "\"\\\\\\n\"",
  "",
  "\"*/\"",
  "\"/*\"",
  "",
  "c literal elem",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",

};


#line - "pgg24ts.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 - "pgg24ts.cpp"
#line - "pgg24ts.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> 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;

       Expressionss2(void);

       void acs(int);
       void aws(int);
       void atkn(Token);
       void definition_1(Expression);
       void definition_2(int);
       void definition_3(int);
       int  form_element_1(Expression);
       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(Expression);
       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;

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(&pgcb);
}
#line - "pgg24ts.cpp"

#ifndef CONVERT_CASE
#define CONVERT_CASE(c) (c)
#endif
#ifndef TAB_SPACING
#define TAB_SPACING 8
#endif

static inline void ag_rp_1(int t) {
#line - "pgg24ts.syn"
  production(t);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_2(void) {
#line - "pgg24ts.syn"
  nPrologueSegments = 1;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_4(int t) {
#line - "pgg24ts.syn"
  production(t);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_5(int type) {
#line - "pgg24ts.syn"
  return iws(),type;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_6(int type) {
#line - "pgg24ts.syn"
  return concat_list(),type;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_7(void) {
#line - "pgg24ts.syn"
  return 0;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_8(int d) {
#line - "pgg24ts.syn"
  return head_list_3(d);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_9(int x) {
#line - "pgg24ts.syn"
  sws(head_list_2(x));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_10(int x) {
#line - "pgg24ts.syn"
  aws(head_list_2(x));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_11(void) {
#line - "pgg24ts.syn"
  return 0;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_12(void) {
#line - "pgg24ts.syn"
  return 1;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_13(void) {
#line - "pgg24ts.syn"
  return Cast::create();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_14(int n) {
#line - "pgg24ts.syn"
  sws(n);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_15(int n) {
#line - "pgg24ts.syn"
  aws(n);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_16(int pn) {
#line - "pgg24ts.syn"
  sws((iws(),vp_form3(pn)));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_17(int s) {
#line - "pgg24ts.syn"
  return vp_form3(s);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_18(int n) {
#line - "pgg24ts.syn"
  sws(form_spec_2(form1(),n));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_19(int n) {
#line - "pgg24ts.syn"
  sws(n);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_20(int n) {
#line - "pgg24ts.syn"
  aws(n);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_21(int s) {
#line - "pgg24ts.syn"
  return form_spec_2(makeRule(ruleElementStack.pop()),s);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_22(int e, int p) {
#line - "pgg24ts.syn"
  ruleElementStack.top().push(RuleElement(e,p));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_23(int e, int p) {
#line - "pgg24ts.syn"
  ruleElementStack.top().push(RuleElement(e,p));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_24(void) {
#line - "pgg24ts.syn"
  ruleElementStack.push(AgStack<RuleElement>());
#line - "pgg24ts.cpp"
}

static inline int ag_rp_25(void) {
#line - "pgg24ts.syn"
  return 0;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_26(void) {
#line - "pgg24ts.syn"
  return proc_spec_4(0);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_27(void) {
#line - "pgg24ts.syn"
  return proc_spec_4(1);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_28(void) {
#line - "pgg24ts.syn"
  concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_29(void) {
#line - "pgg24ts.syn"
  sss("::");
#line - "pgg24ts.cpp"
}

static inline void ag_rp_30(void) {
#line - "pgg24ts.syn"
  concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_31(void) {
#line - "pgg24ts.syn"
  ass("::");
#line - "pgg24ts.cpp"
}

static inline void ag_rp_32(void) {
#line - "pgg24ts.syn"
  concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_33(void) {
#line - "pgg24ts.syn"
  concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_34(void) {
#line - "pgg24ts.syn"
  acs('>'), concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_35(void) {
#line - "pgg24ts.syn"
  acs('<');
#line - "pgg24ts.cpp"
}

static inline void ag_rp_36(void) {
#line - "pgg24ts.syn"
  acs(','), concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_37(void) {
#line - "pgg24ts.syn"
  scs('(');
#line - "pgg24ts.cpp"
}

static inline void ag_rp_38(void) {
#line - "pgg24ts.syn"
  concat_string(), acs(')');
#line - "pgg24ts.cpp"
}

static inline void ag_rp_39(void) {
#line - "pgg24ts.syn"
  sss(" *");
#line - "pgg24ts.cpp"
}

static inline void ag_rp_40(void) {
#line - "pgg24ts.syn"
  concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_41(void) {
#line - "pgg24ts.syn"
  concat_string();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_42(int c) {
#line - "pgg24ts.syn"
  scs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_43(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_44(int c) {
#line - "pgg24ts.syn"
  acs(' '), acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_45(int c) {
#line - "pgg24ts.syn"
  sss("enum "), acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_46(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_47(int c) {
#line - "pgg24ts.syn"
  acs(' '), acs(c);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_48(int x) {
#line - "pgg24ts.syn"
  return x & 0x1f;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_49(int c) {
#line - "pgg24ts.syn"
  return (character_seen=1),c;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_50(int s, int n) {
#line - "pgg24ts.syn"
  return s*n;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_51(void) {
#line - "pgg24ts.syn"
  return 1;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_52(void) {
#line - "pgg24ts.syn"
  return -1;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_53(int n) {
#line - "pgg24ts.syn"
  return n;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_54(int n) {
#line - "pgg24ts.syn"
  return n;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_55(int d) {
#line - "pgg24ts.syn"
  return d - '0';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_56(int n, int d) {
#line - "pgg24ts.syn"
  return 10*n + d - '0';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_57(void) {
#line - "pgg24ts.syn"
  return 0;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_58(int n, int d) {
#line - "pgg24ts.syn"
  return 8*n + d - '0';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_59(int d) {
#line - "pgg24ts.syn"
  return d;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_60(int n, int d) {
#line - "pgg24ts.syn"
  return 16*n + d;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_61(int d) {
#line - "pgg24ts.syn"
  return d-'0';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_62(int d) {
#line - "pgg24ts.syn"
  return (d&7)+9;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_63(int p) {
#line - "pgg24ts.syn"
  return vp_8a(p);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_64(Expression &n) {
#line - "pgg24ts.syn"
  return form_element_1(n);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_65(Expression &u, Expression &i) {
#line - "pgg24ts.syn"
  return new CharSetUnion(u,i);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_66(Expression &u, Expression &i) {
#line - "pgg24ts.syn"
  return new CharSetDifference(u,i);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_67(Expression &i, Expression &n) {
#line - "pgg24ts.syn"
  return new CharSetIntersection(i,n);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_68(Expression &n) {
#line - "pgg24ts.syn"
  return new CharSetComplement(n);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_69(int c) {
#line - "pgg24ts.syn"
  return new IndividualCode(c);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_70(int c) {
#line - "pgg24ts.syn"
  return new IndividualChar(c);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_71(void) {
#line - "pgg24ts.syn"
  return ss2();
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_72(Expression &x) {
#line - "pgg24ts.syn"
  return x;
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_73(int l, int r) {
#line - "pgg24ts.syn"
  return (character_seen=1),new CharRange(l,r);
#line - "pgg24ts.cpp"
}

static inline Expression ag_rp_74(int l, int r) {
#line - "pgg24ts.syn"
  return new CodeRange(l,r);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_75(Expression &n) {
#line - "pgg24ts.syn"
  definition_1(n);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_76(int p) {
#line - "pgg24ts.syn"
  definition_2(p);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_77(int p) {
#line - "pgg24ts.syn"
  definition_2(vp_8a(p));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_78(void) {
#line - "pgg24ts.syn"
  definition_3(enum_base++);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_79(int n) {
#line - "pgg24ts.syn"
  definition_3(enum_base = n), enum_base++;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_80(int n) {
#line - "pgg24ts.syn"
  definition_3(enum_base = n), enum_base++;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_81(void) {
#line - "pgg24ts.syn"
  ics();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_82(int n) {
#line - "pgg24ts.syn"
  return null_warning(n);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_83(void) {
#line - "pgg24ts.syn"
  return '\a';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_84(void) {
#line - "pgg24ts.syn"
  return '\b';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_85(void) {
#line - "pgg24ts.syn"
  return '\f';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_86(void) {
#line - "pgg24ts.syn"
  return '\n';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_87(void) {
#line - "pgg24ts.syn"
  return '\r';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_88(void) {
#line - "pgg24ts.syn"
  return '\t';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_89(void) {
#line - "pgg24ts.syn"
  return '\v';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_90(void) {
#line - "pgg24ts.syn"
  return '\\';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_91(void) {
#line - "pgg24ts.syn"
  return '\?';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_92(void) {
#line - "pgg24ts.syn"
  return '\'';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_93(void) {
#line - "pgg24ts.syn"
  return '"';
#line - "pgg24ts.cpp"
}

static inline int ag_rp_94(int n) {
#line - "pgg24ts.syn"
  return n&7;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_95(int n, int d) {
#line - "pgg24ts.syn"
  return n*8 + (d&7);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_96(int n, int d) {
#line - "pgg24ts.syn"
  return n*8 + (d&7);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_97(int x) {
#line - "pgg24ts.syn"
  return x;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_98(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_99(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_100(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_101(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_102(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_103(int c) {
#line - "pgg24ts.syn"
  acs(null_warning(c));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_104(int c) {
#line - "pgg24ts.syn"
  acs(null_warning(c));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_105(int c) {
#line - "pgg24ts.syn"
  acs(null_warning(c));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_106(int c) {
#line - "pgg24ts.syn"
  acs(null_warning(c));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_107(void) {
#line - "pgg24ts.syn"
  return 0;
#line - "pgg24ts.cpp"
}

static inline int ag_rp_108(void) {
#line - "pgg24ts.syn"
  return cVariableList << buildAgString();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_109(int c) {
#line - "pgg24ts.syn"
  scs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_110(int c) {
#line - "pgg24ts.syn"
  acs(c);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_111(void) {
#line - "pgg24ts.syn"
  ConfigParam::set(1, pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_112(void) {
#line - "pgg24ts.syn"
  ConfigParam::set(0, pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_113(void) {
#line - "pgg24ts.syn"
  ConfigParam::set(pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_114(void) {
#line - "pgg24ts.syn"
  ConfigParam::set(pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_115(void) {
#line - "pgg24ts.syn"
  ConfigParam::set(pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_116(int n) {
#line - "pgg24ts.syn"
  ConfigParam::set(n, pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_117(void) {
#line - "pgg24ts.syn"
  concat_string(), ConfigParam::set(1, pggErrorHandler);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_118(void) {
#line - "pgg24ts.syn"
  sss("distinguish ");
#line - "pgg24ts.cpp"
}

static inline void ag_rp_119(void) {
#line - "pgg24ts.syn"
  set_prec(1,0);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_120(void) {
#line - "pgg24ts.syn"
  set_prec(0,1);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_121(void) {
#line - "pgg24ts.syn"
  set_prec(0,0);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_122(void) {
#line - "pgg24ts.syn"
  set_sticky();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_123(void) {
#line - "pgg24ts.syn"
  set_subgrammar();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_124(void) {
#line - "pgg24ts.syn"
  set_hidden();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_125(int t) {
#line - "pgg24ts.syn"
  disregard(t);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_126(void) {
#line - "pgg24ts.syn"
  set_lexeme();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_127(void) {
#line - "pgg24ts.syn"
  set_reserved_words();
#line - "pgg24ts.cpp"
}

static inline void ag_rp_128(int oldName, int newName) {
#line - "pgg24ts.syn"
  at(rename_macro_list,oldName,newName);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_129(void) {
#line - "pgg24ts.syn"
  return (PCB).pointer-input_base-1;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_130(Expression &n) {
#line - "pgg24ts.syn"
  distinguishSets.push(ParseTree(n));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_131(Expression &n) {
#line - "pgg24ts.syn"
  distinguishSets.push(ParseTree(n));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_132(int t) {
#line - "pgg24ts.syn"
  sws(t);
#line - "pgg24ts.cpp"
}

static inline void ag_rp_133(int t) {
#line - "pgg24ts.syn"
  aws(t);
#line - "pgg24ts.cpp"
}

static inline int ag_rp_134(void) {
#line - "pgg24ts.syn"
  return vp_s();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_135(void) {
#line - "pgg24ts.syn"
  return vp_5(vp_s());
#line - "pgg24ts.cpp"
}

static inline int ag_rp_136(void) {
#line - "pgg24ts.syn"
  return vp_1();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_137(void) {
#line - "pgg24ts.syn"
  return vp_2();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_138(void) {
#line - "pgg24ts.syn"
  return vp_3();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_139(void) {
#line - "pgg24ts.syn"
  return vp_4();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_140(Expression &n) {
#line - "pgg24ts.syn"
  return vp_5(form_element_1(n));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_141(Expression &n) {
#line - "pgg24ts.syn"
  return vp_6(form_element_1(n));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_142(Expression &n) {
#line - "pgg24ts.syn"
  return vp_7(form_element_1(n));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_143(void) {
#line - "pgg24ts.syn"
  return vp_9();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_144(void) {
#line - "pgg24ts.syn"
  return vp_10();
#line - "pgg24ts.cpp"
}

static inline int ag_rp_145(void) {
#line - "pgg24ts.syn"
  return mid_line(proc_spec_4(0));
#line - "pgg24ts.cpp"
}

static inline int ag_rp_146(void) {
#line - "pgg24ts.syn"
  return mid_line(proc_spec_4(1));
#line - "pgg24ts.cpp"
}

static inline void ag_rp_147(unsigned char * y) {
#line - "pgg24ts.syn"
  cSegmentStack.top().end = y;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_148(void) {
#line - "pgg24ts.syn"
  cSegmentStack.push(CSegment());
#line - "pgg24ts.cpp"
}

static inline unsigned char * ag_rp_149(void) {
#line - "pgg24ts.syn"
  return PCB.pointer;
#line - "pgg24ts.cpp"
}

static inline unsigned char * ag_rp_150(void) {
#line - "pgg24ts.syn"
  return PCB.pointer;
#line - "pgg24ts.cpp"
}

static inline void ag_rp_151(void) {
#line - "pgg24ts.syn"
  cSegmentStack.push(CSegment());
#line - "pgg24ts.cpp"
}

static inline void ag_rp_152(void) {
#line - "pgg24ts.syn"
  cSegmentStack.top().end = PCB.pointer;
#line - "pgg24ts.cpp"
}

static void ag_rp_153(void) {
#line - "pgg24ts.syn"
if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token;
#line - "pgg24ts.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 const char ag_wdf[] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,
  0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 4, 0, 0, 0
};

#undef  VW
#define VW(i,t) *(t) (&(PCB).vs[(PCB).ssx + (i)])
#undef  VNO
#define VNO new(&(PCB).vs[(PCB).ssx])
#undef  VRO
#define VRO(to,v) ag_replace_object((to) &(PCB).vs[(PCB).ssx], v)
#undef  VWD
#define VWD(i,t) ag_delete_object((t) &(PCB).vs[(PCB).ssx + (i)]);
#undef  VDO
#define VDO(to, v) ag_delete_object((to) &(PCB).vs[(PCB).ssx], v)

template <class NewObject, class OldObject>
static inline void ag_replace_object(AgObjectWrapper<OldObject> *p, const NewObject &o) {
  delete p;
  new(p) AgObjectWrapper<NewObject >(o);
}

template <class Object>
static inline void ag_delete_object(AgObjectWrapper<Object> *p) {
  delete p;
}

template <class NewObject, class OldObject>
static inline const NewObject &ag_delete_object(AgObjectWrapper<OldObject> *p, const NewObject &o) {
  delete p;
  return o;
}


#undef AG_WRAP_4
#define AG_WRAP_4 AgObjectWrapper<Expression >

static void ag_delete_wrappers(void) {
  if ((PCB).ag_resynch_active) return;
  (PCB).ag_resynch_active = 1;
  int sn = (PCB).sn;
  int sx = (PCB).ssx;
  while (sx--) {
    switch (ag_wdf[sn]) {
      case 4: ag_delete_object((AG_WRAP_4 *) &(PCB).vs[sx]); break;
      default: break;
    }
    sn = (PCB).ss[sx];
  }
}

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, 14, 15,  0,  0,  0, 16, 17, 18,  0, 19, 20, 21, 22, 23, 24, 25,
   26,  0,  0,  0,  0, 27,  0, 28, 29, 30, 31,  0,  0, 32, 33, 34, 35, 36,
   37, 38,  0, 39,  0, 40, 41, 42, 43, 44, 45, 46,  0,  0,  0,  0,  0,  0,
    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
    0, 47, 48, 49,  0,  0, 50, 51,  0, 52,  0,  0, 53, 54, 55, 56, 57, 58,
   59, 60, 61,  0, 62, 63,  0,  0, 64, 65,  0, 66,  0, 67,  0,  0,  0,  0,
    0,  0, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,  0,  0,  0,  0,
    0,  0, 80,  0,  0, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
   94, 95,  0,  0, 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,
    0,  0,  0,  0,  0,  0,  0,110,111,112,113,114,115,  0,116,117,118,119,
  120,121,122,123,  0,  0,124,125,126,127,128,  0,  0,  0,  0,  0,129,130,
    0,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,  0,
    0,  0,  0,  0,147,148,149,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
    0,  0,150,151,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,152
};

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,145,0
};

static const unsigned char ag_key_ch[] = {
    0, 42, 47,255, 47,255, 42, 47,255, 46,255, 46,255, 42, 47,255, 88,120,
  255, 46, 47,255,114,116,255,115,255,105,255,102,120,255,101,255,110,115,
  255,101,105,255,116,117,255, 46, 47,255, 45, 46, 47, 48, 58, 63, 93,100,
  101,104,108,110,114,115,125,255, 47,255, 42, 47,255,114,116,255,115,255,
  105,255,102,120,255,101,255,110,115,255,101,105,255,116,117,255, 47,100,
  101,104,108,110,114,115,255, 42, 47,255, 88,120,255, 47, 48, 58,255, 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, 42, 47,255, 88,120,255, 47, 48,255,114,116,255,115,255,105,255,
  102,120,255,101,255,110,115,255,101,105,255,116,117,255, 47,100,101,104,
  108,110,114,115,255, 42, 47,255, 88,120,255, 47, 48, 58, 92,255, 88,120,
  255, 48,255, 42, 47,255, 45, 47,255, 88,120,255, 47, 48,255, 88,120,255,
   47, 48, 58, 92,125,255, 47, 58,255,114,116,255,115,255,105,255,102,120,
  255,101,255,110,115,255,101,105,255,116,117,255,100,101,104,108,110,114,
  115,255, 42, 47,255, 46, 47,255, 46, 47,255, 47, 93,125,255, 42, 47,255,
   47, 92,255, 92,255, 42, 47,255, 88,120,255, 47, 48,125,255, 34, 39, 63,
   92, 97, 98,102,110,114,116,118,120,255, 92,255, 88,120,255, 48,125,255,
   46, 47,255, 46, 47,255, 47, 93,125,255, 46,255, 46,255, 46, 47,255, 46,
   47,255, 46, 47, 63, 93,125,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,
  125,255, 46, 47, 63,255, 46, 47,255, 46, 47,255, 93,125,255, 46, 47,255,
   93,255, 46, 47,255,125,255,125,255, 46,255, 46,255, 42, 47,255, 46, 47,
  255, 46, 47,255, 46, 47, 63, 93,125,255, 47,107,255, 47,109,255, 88,120,
  255, 47, 48,255, 88,120,255, 48, 58,255, 47, 92,255, 42, 47,255, 46, 47,
  255, 46, 47,255, 46, 47, 63, 93,125,255
};

static const unsigned char ag_key_act[] = {
  0,0,0,4,2,4,3,3,4,5,4,6,4,0,0,4,0,0,4,3,3,4,3,3,4,2,4,2,4,3,3,4,2,4,3,
  3,4,2,3,4,3,3,4,3,3,4,3,2,2,2,3,3,2,2,3,3,2,3,2,2,2,4,3,4,0,0,4,3,3,4,
  2,4,2,4,3,3,4,2,4,3,3,4,2,3,4,3,3,4,2,2,3,3,2,3,2,2,4,0,0,4,0,0,4,2,2,
  3,4,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,0,0,4,0,0,4,2,2,4,3,3,4,2,4,2,4,3,3,4,2,4,3,3,4,2,3,4,3,3,
  4,3,2,3,3,2,3,2,2,4,0,0,4,0,0,4,2,2,3,3,4,0,0,4,2,4,0,0,4,3,2,4,0,0,4,
  3,2,4,0,0,4,3,2,3,3,3,4,3,3,4,3,3,4,2,4,2,4,3,3,4,2,4,3,3,4,2,3,4,3,3,
  4,2,3,3,2,3,2,2,4,0,0,4,3,3,4,3,3,4,2,2,2,4,0,0,4,2,3,4,3,4,0,0,4,0,0,
  4,2,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,4,2,3,4,3,3,4,3,3,4,3,2,2,
  4,5,4,6,4,3,3,4,3,3,4,2,3,3,2,2,4,3,3,4,3,3,4,7,3,3,2,2,4,7,3,3,4,3,3,
  4,3,3,4,2,2,4,3,3,4,2,4,3,3,4,2,4,3,4,5,4,6,4,0,0,4,3,3,4,3,3,4,2,2,3,
  2,2,4,3,3,4,3,3,4,0,0,4,3,2,4,0,0,4,2,3,4,3,3,4,0,0,4,3,3,4,3,3,4,7,2,
  3,2,2,4
};

static const unsigned char ag_key_parm[] = {
    0,227,106,  0,  0,  0,226,227,  0,  0,  0,  2,  0,227,106,  0,123,122,
    0,204,207,  0,193,183,  0,  0,  0,  0,  0,184,194,  0,  0,  0,197,195,
    0,  0,186,  0,188,189,  0,203,206,  0,  2,  0,  0,  0, 79,205,  0,  0,
   95,190,  0,187,  0,  0,  0,  0,106,  0,227,106,  0,193,183,  0,  0,  0,
    0,  0,184,194,  0,  0,  0,197,195,  0,  0,186,  0,188,189,  0,  0,  0,
   95,190,  0,187,  0,  0,  0,227,106,  0,123,122,  0,  0,  0, 79,  0, 79,
    0,227,106,  0,204,207,  0,203,206,  0,  2,  0,  0, 79,205,  0,  0,  0,
    2,106,  0,227,106,  0,123,122,  0,  0,  0, 79,224,203,  0,227,  0,106,
   79,  0,227,106,  0,123,122,  0,  0,  0,  0,193,183,  0,  0,  0,  0,  0,
  184,194,  0,  0,  0,197,195,  0,  0,186,  0,188,189,  0,106,  0, 95,190,
    0,187,  0,  0,  0,227,106,  0,123,122,  0,  0,  0, 79,224,  0,123,122,
    0,  0,  0,227,106,  0,  2,  0,  0,123,122,  0,106,  0,  0,123,122,  0,
  227,  0, 79,224,203,  0,227, 79,  0,193,183,  0,  0,  0,  0,  0,184,194,
    0,  0,  0,197,195,  0,  0,186,  0,188,189,  0,  0, 95,190,  0,187,  0,
    0,  0,227,106,  0,204,207,  0,203,206,  0,  0,  0,  0,  0,227,106,  0,
    0,224,  0,224,  0,227,106,  0,123,122,  0,  0,  0,203,  0,167,166,165,
  164,157,158,159,160,161,162,163,171,  0,  0,  0,123,122,  0,  0,203,  0,
  204,207,  0,203,206,  0,106,  0,  0,  0,  0,  0,  2,  0,204,207,  0,203,
  206,  0,  0,106,205,  0,  0,  0,204,207,  0,203,206,  0,  0,106,205,  0,
    0,  0,  0,106,205,  0,204,207,  0,203,206,  0,  0,  0,  0,204,207,  0,
    0,  0,203,206,  0,  0,  0,203,  0,  0,  0,  2,  0,227,106,  0,204,207,
    0,203,206,  0,  0,  0,205,  0,  0,  0,227,196,  0,227,198,  0,123,122,
    0,227,  0,  0,123,122,  0,  0, 79,  0,227,224,  0,227,106,  0,204,207,
    0,203,206,  0,  0,  0,205,  0,  0,  0
};

static const unsigned short ag_key_jmp[] = {
    0,  0,  0,  0,  1,  0,  0,  2,  0,  0,  0,  9,  0,  0,  0,  0,  0,  0,
    0, 12, 15,  0, 19, 25,  0, 22,  0, 25,  0, 43, 45,  0, 29,  0, 57, 61,
    0, 34, 66,  0, 70, 75,  0, 84, 87,  0,  4, 11, 13, 16,  6,  8, 19, 27,
   33, 37, 32, 49, 37, 40, 43,  0, 91,  0,  0,  0,  0, 93, 99,  0, 67,  0,
   70,  0,117,119,  0, 74,  0,131,135,  0, 79,140,  0,144,149,  0, 64, 72,
  107,111, 77,123, 82, 85,  0,  0,  0,  0,  0,  0,  0, 97,100,158,  0,160,
    0,  0,  0,  0,173,176,  0,180,183,  0,162,164,109,167,169,112,115,  0,
  187,189,  0,  0,  0,  0,  0,  0,  0,129,132,191,193,195,  0,199,  0,201,
  203,  0,  0,  0,  0,  0,  0,  0,146,149,  0,207,213,  0,155,  0,158,  0,
  231,233,  0,162,  0,245,249,  0,167,254,  0,258,263,  0,205,160,221,225,
  165,237,170,173,  0,  0,  0,  0,  0,  0,  0,185,188,272,274,  0,  0,  0,
    0,196,  0,  0,  0,  0,276,201,  0,  0,  0,  0,278,207,  0,  0,  0,  0,
  280,213,282,284,286,  0,290,292,  0,294,300,  0,225,  0,228,  0,318,320,
    0,232,  0,332,336,  0,237,341,  0,345,350,  0,230,308,312,235,324,240,
  243,  0,  0,  0,  0,359,362,  0,366,369,  0,254,257,260,  0,  0,  0,  0,
  267,373,  0,375,  0,  0,  0,  0,  0,  0,  0,275,278,377,  0,  0,  0,  0,
    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,285,  0,  0,  0,  0,300,381,  0,
  387,390,  0,394,397,  0,385,306,309,  0,  0,  0,316,  0,407,410,  0,414,
  417,  0,318,401,403,320,323,  0,430,433,  0,437,440,  0,421,424,426,332,
  335,  0,444,447,449,  0,453,456,  0,460,463,  0,348,351,  0,467,470,  0,
  357,  0,474,477,  0,362,  0,481,  0,  0,  0,369,  0,  0,  0,  0,489,492,
    0,496,499,  0,371,373,485,376,379,  0,503,505,  0,513,515,  0,  0,  0,
    0,520,394,  0,  0,  0,  0,400,522,  0,524,526,  0,  0,  0,  0,535,538,
    0,542,545,  0,528,409,531,412,415,  0
};

static const unsigned short ag_key_index[] = {
    4,  6, 46, 62,  0,  0,  0, 88,  0,  0,  0,  0,  0,103,107,  4,118,  0,
  126, 88,  4,126,126, 62, 62, 62, 62,  0,  0,  0,  0,135,141,143,  0,  0,
    4,118,126,126,152,  0,176,  0,  0,  0,  0,  0,  0,  4,  0,191,199,204,
  152,210,  4,  4,  4,204, 62, 62,  0,216,141,141,  0,222,107, 62,  4,246,
  263,  0,  0,  0,  0,  0,  4,263,270,273,152,281,298,199,303,312,152,152,
  199,  0,298,152,199,326,199,338,344,199, 62,273, 62,152,199, 62,  4,204,
  216,  0,141,  4, 62,  0, 62,  0,141,141,141,141,141, 62, 62,141,141,141,
  141,141,141,  4,  0,141,  0, 62, 62,  0,  0,  0,  4,273,  0,  0,  0,298,
  298,298,298,298,354,360,365,367,367,263,  0,382,382,382,382,  0,  0,152,
  152,263,263,263,199,199,338,312,199,  0,  0,  0,222,  4,388,391,388,141,
  397,  0,  0,199,  0,  4,  0,141,403, 88,  0,  4,  0,  0,406,263,298,263,
  263,263,199,263,263,382,382,298,418,418,199,199,338,338,  4,312,263,141,
  141,141,199, 62, 62,  0,  0,  0,  0,141,141, 62,199,263,199,141,199,298,
   62,141,  0, 62
};

static const unsigned char ag_key_ends[] = {
47,0, 42,0, 62,0, 58,0, 46,46,46,0, 46,46,0, 46,46,46,0, 
101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, 
105,100,100,101,110,0, 116,0, 101,109,101,0, 
111,110,97,115,115,111,99,0, 97,109,101,0, 101,114,118,101,0, 
103,104,116,0, 105,99,107,121,0, 98,103,114,97,109,109,97,114,0, 
46,46,0, 46,46,46,0, 47,0, 101,103,97,114,100,0, 
105,110,103,117,105,115,104,0, 110,117,109,0, 105,100,100,101,110,0, 
116,0, 101,109,101,0, 111,110,97,115,115,111,99,0, 97,109,101,0, 
101,114,118,101,0, 103,104,116,0, 105,99,107,121,0, 
98,103,114,97,109,109,97,114,0, 58,0, 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, 110,117,109,0, 
105,100,100,101,110,0, 116,0, 101,109,101,0, 
111,110,97,115,115,111,99,0, 97,109,101,0, 101,114,118,101,0, 
103,104,116,0, 105,99,107,121,0, 98,103,114,97,109,109,97,114,0, 
58,0, 10,0, 62,0, 47,0, 42,0, 58,0, 10,0, 46,46,46,0, 42,0, 
58,0, 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 
110,117,109,0, 105,100,100,101,110,0, 116,0, 101,109,101,0, 
111,110,97,115,115,111,99,0, 97,109,101,0, 101,114,118,101,0, 
103,104,116,0, 105,99,107,121,0, 98,103,114,97,109,109,97,114,0, 
46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 10,0, 10,0, 
46,46,46,0, 46,46,46,0, 47,0, 46,46,0, 46,46,46,0, 46,46,0, 
46,46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 
46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 
46,46,0, 46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 
46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 
46,46,46,0, 46,46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 
46,46,0, 46,46,46,0, 42,0, 101,121,119,111,114,100,115,0, 42,0, 
97,99,114,111,0, 42,0, 58,0, 42,0, 10,0, 46,46,0, 46,46,46,0, 
46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 
};

#define AG_TCV(x) ag_tcv[(x)]

static const unsigned char ag_tcv[] = {
   44,240,240,240,240,240,240,240,240, 96,103,105,105,101,240,240,240,240,
  240,240,240,240,240,240,240,240, 44,240,240,240,240,240, 96, 15,151,241,
   60,241,137, 33, 21, 31, 89, 25,  7, 23,241,241,120,238,238,238,238,238,
  238,238,239,239,174, 74, 86, 13, 85,202,241,130,130,130,130,130,130,237,
  237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
  237, 19,169, 27,112,237,241,130,130,130,130,130,130,237,237,237,237,237,
  237,237,237,237,237,237,237,237,237,237,237,237,237,237,237, 17, 37, 29,
   35,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
  240,240,240,240
};

#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[] = {
   97,225,  0
};

static const unsigned char ag_tstt[] = {
237,227,130,106,103,101,96,21,19,17,0,3,4,5,38,97,225,
241,240,239,238,237,227,226,202,174,169,151,137,130,120,112,105,103,101,96,
  89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,97,225,
227,96,0,3,97,225,
237,130,106,103,101,21,19,17,0,39,40,99,102,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,103,101,96,89,86,85,
  74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,108,109,
103,0,
103,101,0,102,
237,227,197,195,194,193,190,189,188,187,186,184,183,130,106,105,103,101,96,
  95,35,27,21,19,17,0,3,97,99,102,104,225,
237,130,21,19,17,0,20,41,45,46,47,48,51,56,57,58,59,91,208,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,96,89,86,85,74,60,
  37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,
103,0,
103,101,0,102,
103,0,
239,238,237,227,130,123,122,120,112,106,103,101,96,89,79,35,33,25,23,21,0,3,
  4,8,9,97,98,99,100,102,225,
237,130,79,0,59,61,75,91,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,103,101,96,
  89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,15,13,7,0,102,210,211,212,
239,238,237,227,207,206,205,204,203,202,174,137,130,120,106,103,101,96,89,
  86,85,79,60,44,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,97,225,
237,130,0,56,58,59,91,
7,0,6,
237,227,197,195,194,193,190,189,188,187,186,184,183,130,106,103,101,96,95,
  35,27,0,3,4,5,97,177,225,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,96,89,86,85,
  74,60,37,35,33,31,29,27,25,23,21,19,15,13,7,0,97,99,209,213,216,217,225,
60,13,0,12,
2,0,1,52,
106,103,101,0,39,99,102,
106,103,101,0,39,99,102,
106,103,101,0,39,99,102,
106,103,101,0,39,99,102,
237,130,44,21,19,17,0,20,42,43,45,46,47,48,49,50,51,56,57,58,59,91,208,
103,0,
103,0,
103,101,0,100,102,
241,240,239,238,237,227,224,203,202,174,169,151,137,130,123,122,120,112,106,
  105,103,101,96,89,86,85,79,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,
  0,3,97,98,99,100,102,225,
237,227,130,96,0,80,
106,103,101,89,86,85,79,31,27,21,7,0,76,77,84,
31,0,
103,0,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,103,101,96,
  89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,15,13,7,0,102,210,
239,238,237,227,130,120,96,0,3,97,225,
60,0,
7,0,6,
239,238,237,227,151,130,123,122,120,112,106,103,101,96,35,33,29,25,23,21,19,
  17,15,0,3,4,8,9,97,98,99,100,102,225,
237,130,0,58,59,91,
237,197,195,194,193,190,189,188,187,186,184,183,130,106,103,101,95,35,27,0,
  39,40,99,102,
27,0,26,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,96,89,86,85,74,60,
  37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,231,232,233,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,96,89,86,85,74,60,
  37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,234,235,236,
151,0,
33,0,
103,101,0,102,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,103,101,96,
  89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,214,
29,0,28,
241,240,239,238,237,227,224,202,174,169,151,137,130,123,122,120,112,106,105,
  103,101,96,89,86,85,79,60,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,
  9,97,98,99,100,102,225,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,15,0,14,16,18,20,
  22,24,34,59,91,110,111,114,116,118,132,133,134,135,136,138,144,148,149,
227,106,103,101,96,44,7,2,0,3,4,5,97,225,
239,238,237,227,151,130,123,122,120,112,106,103,101,96,44,37,35,33,25,23,21,
  19,17,15,13,0,3,4,5,97,225,
239,238,237,151,130,123,122,120,112,106,103,101,44,37,35,33,25,23,21,19,17,
  15,13,0,12,55,66,68,69,70,
237,227,130,106,105,103,101,96,44,21,19,17,0,3,97,99,102,104,225,
237,227,130,106,105,103,101,96,44,21,19,17,0,3,97,99,102,104,225,
237,227,130,106,105,103,101,96,44,21,19,17,0,3,97,99,102,104,225,
237,227,130,106,105,103,101,96,44,37,21,19,17,2,0,1,3,36,52,53,54,97,99,102,
  104,225,
106,103,101,44,0,39,99,102,
106,103,101,44,0,39,99,102,
44,0,
227,96,0,3,4,97,225,
237,227,130,96,0,3,4,5,97,225,
237,227,130,96,0,81,
89,21,0,20,78,82,83,87,88,90,
237,227,130,96,79,0,3,4,5,97,225,
237,130,79,0,59,61,75,91,
106,103,101,89,85,31,27,21,7,0,
237,227,130,106,103,101,96,0,3,4,8,9,97,98,99,100,102,225,
237,197,195,194,193,190,189,188,187,186,184,183,130,95,35,27,0,34,59,91,94,
  147,178,179,180,181,182,191,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,103,101,96,89,86,85,
  74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,230,
241,240,239,238,237,202,174,169,137,130,120,112,105,96,89,86,85,74,60,37,35,
  33,31,29,27,25,23,21,19,17,15,13,7,0,231,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,103,101,96,89,86,85,
  74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,230,
241,240,239,238,237,202,174,169,151,137,130,120,112,105,96,89,86,85,74,60,
  37,35,31,29,27,25,23,21,19,17,15,13,7,0,234,
103,0,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,103,101,96,
  89,86,85,74,60,37,35,33,31,27,25,23,21,19,17,15,13,7,0,97,99,216,217,
  218,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
241,240,239,238,237,227,224,202,174,169,151,137,130,120,112,106,105,103,101,
  96,89,86,85,60,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,9,97,98,99,
  100,102,225,
241,240,239,238,237,224,202,174,169,151,137,130,120,112,105,89,86,85,60,37,
  35,33,31,27,25,23,21,19,17,15,13,7,0,47,73,208,220,
239,238,237,227,151,130,123,122,120,112,106,103,101,96,35,33,25,23,21,19,17,
  15,0,3,4,8,9,97,98,99,100,102,225,
239,238,237,227,203,151,130,123,122,120,112,106,103,101,96,37,35,33,29,25,
  23,21,19,17,15,13,0,3,4,8,9,97,98,99,100,102,225,
241,240,239,238,237,202,174,171,169,167,166,165,164,163,162,161,160,159,158,
  157,137,130,120,112,105,96,89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,
  17,15,13,7,0,140,141,142,143,150,152,153,154,155,168,170,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,15,0,62,63,68,70,
239,238,237,203,151,130,123,122,120,112,37,35,33,29,25,23,21,19,17,15,13,0,
  12,62,63,65,66,67,68,70,
202,0,
239,238,237,227,130,123,122,120,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9,
  97,98,99,100,102,225,
239,238,237,227,130,123,122,120,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9,
  97,98,99,100,102,225,
239,238,123,122,120,0,117,119,124,
241,239,238,237,202,174,169,151,137,130,120,112,89,86,85,74,60,37,35,33,31,
  29,27,25,23,21,19,17,15,13,7,0,
241,240,239,238,237,202,174,171,169,167,166,165,164,163,162,161,160,159,158,
  157,151,137,130,120,112,105,96,89,86,85,74,60,37,35,31,29,27,25,23,21,
  19,17,15,13,7,0,115,140,141,142,143,168,170,
239,238,237,227,130,123,122,120,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9,
  97,98,99,100,102,225,
239,238,237,130,123,122,120,112,35,33,25,23,21,0,20,22,24,34,59,91,110,111,
  114,116,118,133,135,136,138,144,
145,0,
239,238,237,130,123,122,120,112,35,33,25,23,21,0,20,22,24,34,59,91,110,111,
  114,116,118,136,138,144,
137,0,
205,202,25,23,11,0,10,22,24,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,15,0,14,16,18,20,
  22,24,34,59,71,91,110,111,114,116,118,131,132,133,134,135,136,138,144,
  148,149,
106,103,101,44,37,13,7,0,6,12,66,
241,240,239,238,237,224,202,174,169,151,137,130,120,112,105,89,86,85,60,37,
  35,33,31,27,25,23,21,19,17,15,13,7,0,47,73,208,220,
37,0,36,53,
239,238,237,227,151,130,123,122,120,112,106,103,101,96,35,33,25,23,21,19,17,
  15,0,3,4,8,9,97,98,99,100,102,225,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,15,0,68,69,70,
37,0,36,53,
237,227,130,106,105,103,101,96,44,21,19,17,0,3,97,99,102,104,225,
237,227,130,106,105,103,101,96,44,37,21,19,17,2,0,1,3,36,52,53,54,97,99,102,
  104,225,
227,96,0,3,97,225,
237,130,0,59,91,
237,227,130,96,0,3,4,5,97,225,
237,227,130,106,103,101,96,89,85,31,27,21,7,0,3,4,5,97,225,
237,130,0,59,91,
89,21,0,20,78,82,83,87,88,90,
89,21,0,20,83,87,88,90,
85,7,0,
227,96,0,3,4,97,225,
227,96,0,3,4,97,225,
227,96,0,3,4,97,225,
227,96,0,3,4,97,185,225,
227,96,0,3,4,97,225,
106,103,101,29,7,0,6,98,99,100,102,192,200,
106,103,101,29,7,0,6,98,99,100,102,192,200,
227,96,0,3,4,97,185,225,
227,96,0,3,4,97,185,225,
227,96,0,3,4,97,185,225,
227,96,0,3,4,97,185,225,
227,96,0,3,4,97,185,225,
227,96,0,3,4,97,185,225,
227,106,103,101,96,0,3,4,8,97,98,99,100,102,225,
237,130,0,59,91,
239,238,237,227,130,120,96,13,0,3,4,5,97,225,
237,130,0,59,91,
13,0,12,
106,103,101,27,0,39,40,99,102,
151,0,
33,0,
103,101,0,102,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,103,101,96,
  89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,214,
241,240,239,238,237,224,202,174,169,151,137,130,120,112,105,89,86,85,60,37,
  35,33,31,27,25,23,21,19,15,13,7,0,216,217,221,222,
74,0,
238,120,0,
239,238,130,120,0,125,129,
238,120,0,
238,120,0,
239,130,0,
239,238,130,120,0,
241,240,237,202,174,171,169,167,166,165,164,163,162,161,160,159,158,157,151,
  137,112,105,96,89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,
  0,140,141,142,143,155,168,170,
207,206,204,203,37,29,27,13,7,0,6,12,66,
207,204,37,27,0,26,36,64,
206,37,0,36,64,
37,0,36,64,
203,29,0,28,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
239,238,130,120,0,125,129,
238,227,207,206,205,204,203,202,174,145,137,120,106,103,101,96,44,37,31,29,
  27,25,23,13,11,7,0,121,
239,238,120,0,
227,207,206,205,204,203,202,174,145,137,106,103,101,96,44,37,31,29,27,25,23,
  13,11,7,0,3,4,5,97,225,
227,207,206,205,204,203,202,174,145,137,106,103,101,96,44,37,31,29,27,25,23,
  13,11,7,0,3,4,5,97,225,
33,23,0,32,
31,25,23,0,22,24,30,
239,238,227,123,122,120,112,106,103,101,96,25,23,0,3,4,8,9,97,98,99,100,102,
  225,
239,238,237,227,130,123,122,120,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9,
  97,98,99,100,102,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
239,238,237,130,123,122,120,112,35,33,25,23,21,0,20,22,24,34,59,91,110,111,
  114,116,118,135,136,138,144,
239,238,237,130,123,122,120,112,35,33,25,23,21,0,20,22,24,34,59,91,110,111,
  114,116,118,135,136,138,144,
205,202,25,23,11,0,10,22,24,
207,206,204,203,174,106,103,101,44,37,29,27,13,7,0,72,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,15,0,14,16,18,20,
  22,24,34,59,71,91,110,111,114,116,118,131,132,133,134,135,136,138,144,
  148,149,
74,0,
237,130,0,59,91,
31,0,30,
237,227,130,96,79,0,3,4,5,97,225,
227,106,103,101,96,89,85,31,27,21,7,0,3,4,5,97,225,
227,196,96,0,3,97,225,
227,198,96,0,3,97,225,
227,196,96,0,3,97,225,
227,96,17,0,3,16,97,225,
239,238,237,227,151,130,123,122,120,112,96,35,33,25,23,21,19,17,0,3,16,18,
  20,22,24,34,59,91,97,110,111,114,116,118,131,133,134,135,136,138,144,
  148,149,225,
29,0,28,
237,130,0,59,91,146,
239,238,237,130,123,122,120,112,35,33,29,25,23,21,0,20,22,24,34,59,91,110,
  111,114,116,118,133,135,136,138,144,
17,0,16,
239,238,237,227,130,120,106,103,101,96,17,0,3,97,98,99,100,102,225,
13,0,12,
239,238,237,227,130,120,96,0,3,97,225,
239,238,237,151,130,123,122,120,79,25,23,0,22,24,59,61,75,91,111,116,118,
  148,149,
237,227,197,195,194,193,190,189,188,187,186,184,183,130,106,105,103,101,96,
  95,35,27,0,3,34,59,91,94,97,99,102,104,147,180,181,182,191,225,
103,0,
241,240,239,238,237,227,202,174,169,151,137,130,120,112,106,105,103,101,96,
  89,86,85,74,60,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,97,99,216,217,
  218,225,
151,0,
33,0,
241,240,239,238,237,227,224,202,174,169,151,137,130,120,112,105,96,89,86,85,
  60,37,35,33,31,27,25,23,21,19,15,13,7,0,3,97,216,217,222,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
239,238,130,120,0,129,
227,207,206,204,203,202,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,15,0,63,68,70,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
227,207,206,204,203,174,106,103,101,96,44,37,29,27,13,7,0,3,4,5,97,225,
239,238,130,120,0,129,
238,120,0,
241,240,239,238,237,202,174,171,169,167,166,165,164,163,162,161,160,159,158,
  157,151,137,130,120,112,105,96,89,86,85,74,60,37,35,31,29,27,25,23,21,
  19,17,15,13,7,0,115,140,141,142,143,168,170,
227,207,206,205,204,203,202,174,137,106,103,101,96,44,37,31,29,27,25,23,13,
  11,7,0,3,4,5,97,225,
227,207,206,205,204,203,202,174,137,106,103,101,96,85,44,37,31,29,27,25,23,
  13,11,7,0,3,4,5,97,225,
239,238,123,122,120,112,25,23,0,22,24,110,111,116,118,
239,238,237,130,123,122,120,112,35,33,25,23,21,0,20,22,24,34,59,91,110,111,
  114,116,118,136,138,144,
137,0,
137,0,
237,227,130,106,103,101,96,0,3,4,8,9,97,98,99,100,102,225,
207,206,204,203,174,106,103,101,44,37,29,27,13,7,0,72,
227,207,206,204,203,106,103,101,96,44,37,29,27,0,3,4,5,97,225,
227,96,0,3,4,97,225,
227,96,0,3,4,97,225,
227,96,0,3,4,97,185,225,
239,238,237,151,130,123,122,120,112,35,33,25,23,21,19,17,0,16,18,20,22,24,
  34,59,91,110,111,114,116,118,131,133,134,135,136,138,144,148,149,201,
13,0,12,
25,23,0,22,24,
237,130,0,59,91,146,
151,0,148,149,
33,0,32,
237,130,0,175,176,
227,96,17,0,3,16,97,225,
237,227,130,96,0,3,97,199,225,
106,103,101,29,7,0,6,98,99,100,102,192,200,
239,238,123,122,120,112,33,25,23,0,22,24,110,111,114,116,118,
239,238,237,227,207,206,204,203,130,120,106,103,101,96,44,37,29,27,13,7,0,3,
  4,5,97,225,
239,238,237,130,123,122,120,112,35,33,25,23,21,0,20,22,24,34,59,91,110,111,
  114,116,118,133,135,136,138,144,
239,238,237,227,130,120,96,0,3,4,97,225,
239,238,237,151,130,123,122,120,112,35,33,29,25,23,21,19,17,0,16,18,20,22,
  24,34,59,91,110,111,114,116,118,131,133,134,135,136,138,144,148,149,
241,240,239,238,237,202,174,171,169,167,166,165,164,163,162,161,160,159,158,
  157,151,137,130,120,112,105,96,89,86,85,74,60,37,35,31,29,27,25,23,21,
  19,17,15,13,7,0,115,140,141,142,143,168,170,
25,23,0,22,24,
237,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,1,2,9,7,3,3,1,1,1,7,2,9,9,9,9,9,4
};


static const unsigned short ag_pstt[] = {
3,1,3,3,3,3,2,3,3,3,0,2,2,3,0,2,1,
301,301,301,301,301,1,299,301,301,301,301,301,301,301,301,301,301,301,301,
  301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,
  301,1,302,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,123,123,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
  4,9,125,
118,5,
10,10,6,10,
24,1,24,24,24,24,24,24,24,24,24,24,24,24,4,120,12,12,119,24,24,24,24,24,24,
  7,119,119,11,12,119,1,
96,96,13,19,15,8,14,27,26,25,24,23,22,18,17,49,21,16,20,
122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
  122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,124,
117,10,
28,28,11,28,
115,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,
96,96,32,14,33,34,33,16,
272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,35,35,272,
  272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
  15,35,36,36,274,
97,97,97,1,3,3,3,3,3,3,3,3,97,97,3,3,3,37,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
  16,37,37,102,37,1,
96,96,17,39,49,38,16,
40,47,41,
3,1,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,
  275,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,
96,96,62,13,19,15,27,14,62,62,61,60,60,60,32,60,22,18,17,49,21,16,20,
116,28,
63,29,
29,29,30,108,29,
105,105,105,105,105,1,105,105,105,105,105,105,105,105,105,105,105,105,4,105,
  29,29,2,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
  105,105,105,31,2,2,106,30,106,29,1,
79,79,79,79,32,64,
73,73,73,66,67,73,65,73,73,66,73,33,69,66,68,
70,34,
269,35,
273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,35,35,273,
  273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,
  36,35,271,
98,98,98,1,98,98,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,40,31,31,8,8,31,8,30,8,29,
  1,
96,96,41,50,38,16,
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,217,
74,74,74,74,74,74,74,73,308,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,310,
76,76,76,76,76,76,76,75,76,76,76,76,76,76,76,76,76,76,76,76,76,76,316,76,76,
  76,76,76,76,76,76,76,76,76,45,76,76,318,
281,46,
280,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,282,78,78,78,78,78,78,78,78,78,49,78,
79,50,268,
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,
130,130,96,182,96,130,130,130,91,93,92,88,89,13,82,83,80,52,81,86,85,94,133,
  132,96,166,16,95,95,165,90,132,172,98,171,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,
69,69,69,69,69,69,69,69,69,70,70,70,70,70,69,69,69,69,69,69,69,69,51,55,101,
  102,62,100,63,99,
31,1,31,4,120,12,12,119,31,31,31,31,56,119,119,11,12,119,1,
30,1,30,4,120,12,12,119,30,30,30,30,57,119,119,11,12,119,1,
29,1,29,4,120,12,12,119,29,29,29,29,58,119,119,11,12,119,1,
28,1,28,4,120,12,12,119,28,103,28,28,28,54,59,55,119,104,39,105,105,119,11,
  12,119,1,
4,5,5,36,60,106,6,5,
4,5,5,35,61,107,6,5,
27,62,
1,108,112,108,108,108,1,
109,1,109,2,64,2,2,109,2,1,
81,81,81,81,65,110,
111,13,66,89,77,114,77,113,112,114,
3,1,3,2,3,67,2,2,87,2,1,
96,96,32,68,33,115,33,16,
74,74,74,76,74,74,74,76,74,69,
6,1,6,4,29,29,31,70,31,31,53,53,31,53,30,53,29,1,
96,117,118,119,120,123,124,125,126,127,128,116,96,129,93,218,71,132,133,16,
  131,121,134,220,134,134,130,122,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,72,2,2,17,2,1,
305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
  305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,73,
  305,
307,307,307,307,307,307,307,73,307,307,307,307,307,307,307,307,307,307,307,
  307,307,307,307,307,307,307,307,307,307,307,307,307,307,309,307,
313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
  313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,75,
  313,
315,315,315,315,315,315,315,75,315,315,315,315,315,315,315,315,315,315,315,
  315,315,315,315,315,315,315,315,315,315,315,315,315,315,317,315,
279,77,
283,283,283,283,283,1,283,283,283,44,283,283,283,283,4,283,283,283,283,283,
  283,283,283,283,283,283,45,283,283,283,283,283,283,138,283,283,283,276,
  283,137,136,135,283,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,
290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,
  290,290,290,290,290,290,290,290,290,15,290,290,290,81,266,140,20,139,
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,83,31,31,12,12,31,12,
  30,12,29,1,
203,203,204,204,203,203,203,142,141,196,195,194,193,192,191,190,189,188,187,
  186,203,204,204,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
  203,203,203,203,203,203,203,203,84,203,208,185,210,147,146,145,147,203,
  144,143,
69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,85,149,54,148,99,
69,69,69,70,69,69,69,69,69,69,70,69,69,70,69,69,69,69,69,69,51,86,101,150,
  54,151,57,152,148,99,
153,255,
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,
139,139,154,154,155,90,157,156,154,
158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,
  158,158,158,158,158,158,158,158,158,158,158,158,91,
159,159,159,159,159,159,159,142,141,196,195,194,193,192,191,190,189,188,187,
  186,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
  159,159,159,159,159,159,159,159,92,159,159,159,159,159,144,143,
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,
130,130,96,96,130,130,130,91,93,92,88,89,13,94,94,133,132,96,166,16,95,95,
  165,90,132,160,97,97,97,97,
161,164,
130,130,96,96,130,130,130,91,93,92,88,89,13,96,94,133,132,96,166,16,95,95,
  165,90,132,157,157,157,
162,151,
164,165,88,89,163,170,263,166,167,
130,130,96,182,96,130,130,130,91,93,92,88,89,13,82,83,80,99,81,86,85,94,133,
  132,96,166,169,16,95,95,165,90,132,169,148,168,169,97,97,97,97,87,84,
70,70,70,70,70,51,40,100,170,101,66,
290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,
  290,290,290,290,290,290,290,290,290,15,290,290,290,101,71,171,20,139,
103,43,104,64,
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,
69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,104,100,65,99,
103,42,104,41,
34,1,34,4,120,12,12,119,34,34,34,34,106,119,119,11,12,119,1,
33,1,33,4,120,12,12,119,33,103,33,33,33,54,107,55,119,104,39,105,105,119,11,
  12,119,1,
1,2,113,2,2,1,
96,96,109,80,16,
172,1,172,2,110,2,2,172,2,1,
3,1,3,3,3,3,2,3,3,3,3,3,3,111,2,2,91,2,1,
96,96,92,93,16,
111,13,113,89,173,114,173,113,112,114,
111,13,83,89,85,113,112,95,
175,174,115,
1,176,116,176,176,176,1,
1,177,117,177,177,177,1,
1,178,118,178,178,178,1,
1,179,119,179,179,179,241,1,
1,180,120,180,180,180,1,
4,29,29,181,40,121,182,181,30,181,29,239,181,
4,29,29,181,40,122,183,181,30,181,29,238,181,
1,179,123,179,179,179,237,1,
1,179,124,179,179,179,236,1,
1,179,125,179,179,179,235,1,
1,179,126,179,179,179,234,1,
1,179,127,179,179,179,233,1,
1,179,128,179,179,179,232,1,
1,4,29,29,185,129,185,185,184,185,184,30,184,29,1,
96,96,130,230,16,
100,100,100,1,100,100,187,186,131,187,187,186,187,1,
96,96,132,224,16,
51,223,188,
4,5,5,23,134,189,219,6,5,
289,135,
288,136,
190,190,137,190,
191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
  191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
  191,138,191,
194,194,194,194,194,194,194,194,194,44,194,194,194,194,194,194,194,194,194,
  194,194,45,194,194,194,194,194,194,194,194,194,139,193,192,194,194,
195,140,
197,197,141,
145,145,146,145,142,196,143,
199,199,201,
198,198,200,
207,207,180,
206,206,206,206,179,
205,205,205,205,205,142,141,196,195,194,193,192,191,190,189,188,187,186,197,
  205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
  205,205,205,205,205,147,205,209,185,211,205,144,143,
70,70,70,70,70,70,70,51,40,148,170,101,61,
198,199,103,72,149,259,200,55,
201,103,60,200,55,
103,59,200,58,
202,79,152,257,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,153,2,2,256,2,1,
145,145,146,145,154,203,143,
141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
  141,141,141,141,141,141,141,155,204,
140,140,140,134,
1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,157,2,2,129,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,158,2,2,127,2,1,
206,205,159,128,
207,88,89,160,166,167,167,
208,208,1,208,208,208,208,4,29,29,31,208,208,161,31,31,208,208,31,208,30,
  208,29,1,
209,209,209,1,209,209,209,209,209,4,29,29,31,209,209,209,209,209,162,31,31,
  209,209,31,209,30,209,29,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,163,2,2,9,2,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,164,2,2,262,2,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,165,2,2,261,2,1,
130,130,96,96,130,130,130,91,93,92,88,89,13,166,94,133,132,96,166,16,95,95,
  165,90,132,210,210,210,210,
130,130,96,96,130,130,130,91,93,92,88,89,13,167,94,133,132,96,166,16,95,95,
  165,90,132,211,211,211,211,
164,165,88,89,163,149,263,166,167,
212,212,212,212,212,212,212,212,212,212,212,212,212,212,169,67,
130,130,96,182,96,130,130,130,91,93,92,88,89,13,82,83,80,170,81,86,85,94,
  133,132,96,166,213,16,95,95,165,90,132,213,148,168,213,97,97,97,97,87,
  84,
214,171,
96,96,172,82,16,
207,173,90,
3,1,3,2,3,174,2,2,88,2,1,
1,3,3,3,2,3,3,3,3,3,3,175,2,2,86,2,1,
1,215,2,231,2,2,1,
1,216,2,177,2,2,1,
1,217,2,178,2,2,1,
1,2,83,179,2,218,2,1,
130,130,96,1,182,96,130,130,130,91,2,93,92,88,89,13,82,83,180,2,86,85,94,
  133,132,96,166,16,2,95,95,165,90,132,240,168,240,97,97,97,97,87,84,1,
79,181,249,
96,96,247,219,16,177,
130,130,96,96,130,130,130,91,93,92,247,88,89,13,183,94,133,132,96,166,16,95,
  95,165,90,132,220,97,97,97,97,
83,184,221,
99,99,99,1,99,99,4,29,29,2,105,185,2,2,106,30,106,29,1,
51,186,222,
101,101,101,1,101,101,2,4,2,2,1,
130,130,96,182,96,130,130,130,32,88,89,188,133,132,33,225,33,16,228,90,132,
  226,84,
96,1,117,118,119,120,123,124,125,126,127,128,116,96,4,120,12,12,119,129,93,
  24,189,119,132,133,16,131,119,11,12,119,121,222,222,130,122,1,
287,190,
283,283,283,283,283,1,283,283,283,44,283,283,283,283,4,283,283,283,283,283,
  283,283,283,283,283,283,45,283,285,283,283,283,283,283,138,283,283,283,
  191,283,137,136,135,283,1,
298,192,
297,193,
293,293,293,293,293,1,293,293,293,293,44,293,293,293,293,293,294,293,293,
  293,293,293,293,45,293,293,293,293,293,293,293,293,293,291,294,294,193,
  192,293,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,195,2,2,267,2,1,
145,145,146,145,202,144,
1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,197,2,2,178,2,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,198,2,2,265,2,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,199,2,2,260,2,1,
69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,200,56,148,99,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,201,2,2,264,2,1,
1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,202,2,2,258,2,1,
145,145,146,145,138,144,
142,142,135,
223,223,223,223,223,223,223,142,141,196,195,194,193,192,191,190,189,188,187,
  186,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
  223,223,223,223,223,223,223,223,205,223,223,223,223,223,144,143,
1,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,206,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,207,2,2,19,2,1,
130,130,130,130,130,91,88,89,208,133,132,169,169,90,132,
130,130,96,96,130,130,130,91,93,92,88,89,13,209,94,133,132,96,166,16,95,95,
  165,90,132,155,155,155,
162,153,
162,152,
224,1,224,4,29,29,31,212,31,31,224,224,31,224,30,224,29,1,
212,212,212,212,212,212,212,212,212,212,212,212,212,212,213,68,
1,3,3,3,3,3,3,3,2,3,3,3,3,214,2,2,72,2,1,
1,225,215,225,225,225,1,
1,226,216,226,226,226,1,
1,179,217,179,179,179,242,1,
130,130,96,182,96,130,130,130,91,93,92,88,89,13,82,83,218,86,85,94,133,132,
  96,166,16,95,95,165,90,132,253,168,253,97,97,97,97,87,84,227,
51,173,228,
88,89,251,166,167,
96,96,221,219,16,176,
182,222,227,84,
206,223,168,
214,214,224,213,229,
1,2,83,225,2,230,2,1,
244,1,244,2,226,2,2,231,1,
4,29,29,181,40,227,232,181,30,181,29,252,181,
130,130,130,130,130,91,233,88,89,228,133,132,174,174,175,90,132,
215,215,215,1,3,3,3,3,215,215,3,3,3,2,3,3,3,3,3,3,229,2,2,216,2,1,
130,130,96,96,130,130,130,91,93,92,88,89,13,230,94,133,132,96,166,16,95,95,
  165,90,132,234,97,97,97,97,
245,245,245,1,245,245,235,231,235,235,235,1,
130,130,96,182,96,130,130,130,91,93,92,247,88,89,13,82,83,232,86,85,94,133,
  132,96,166,16,95,95,165,90,132,254,168,254,97,97,97,97,87,84,
236,236,236,236,236,236,236,142,141,196,195,194,193,192,191,190,189,188,187,
  186,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,
  236,236,236,236,236,236,236,236,233,236,236,236,236,236,144,143,
88,89,250,166,167,
244,1,244,2,235,2,2,237,1,
206,236,128,
245,245,245,245,245,243,

};


static const unsigned short ag_sbt[] = {
     0,  17,  58,  64,  77, 116, 118, 122, 154, 173, 208, 210, 214, 216,
   247, 255, 297, 338, 345, 348, 376, 419, 423, 427, 434, 441, 448, 455,
   478, 480, 482, 487, 537, 543, 558, 560, 562, 602, 613, 615, 618, 652,
   658, 682, 685, 723, 761, 763, 765, 769, 809, 812, 863, 904, 918, 949,
   979, 998,1017,1036,1062,1070,1078,1080,1087,1097,1103,1113,1124,1132,
  1142,1160,1188,1210,1248,1283,1321,1356,1358,1402,1424,1472,1509,1542,
  1579,1636,1658,1688,1690,1719,1748,1757,1789,1842,1871,1901,1903,1931,
  1933,1942,1985,1996,2033,2037,2070,2091,2095,2114,2140,2146,2151,2161,
  2180,2185,2195,2203,2206,2213,2220,2227,2235,2242,2255,2268,2276,2284,
  2292,2300,2308,2316,2331,2336,2350,2355,2358,2367,2369,2371,2375,2415,
  2451,2453,2456,2463,2466,2469,2472,2477,2527,2540,2548,2553,2557,2561,
  2583,2590,2618,2622,2652,2682,2686,2693,2717,2746,2768,2790,2812,2841,
  2870,2879,2895,2938,2940,2945,2948,2959,2976,2983,2990,2997,3005,3049,
  3052,3058,3089,3092,3111,3114,3125,3148,3186,3188,3233,3235,3237,3277,
  3299,3305,3328,3350,3372,3393,3415,3437,3443,3446,3499,3528,3558,3573,
  3601,3603,3605,3623,3639,3658,3665,3672,3680,3720,3723,3728,3734,3738,
  3741,3746,3754,3763,3776,3793,3819,3849,3861,3901,3954,3959,3968,3971,
  3977
};


static const unsigned short ag_sbe[] = {
    10,  55,  60,  72, 113, 117, 120, 147, 159, 207, 209, 212, 215, 236,
   250, 292, 332, 340, 346, 369, 411, 421, 424, 430, 437, 444, 451, 461,
   479, 481, 484, 529, 541, 554, 559, 561, 599, 609, 614, 616, 641, 654,
   677, 683, 719, 757, 762, 764, 767, 807, 810, 852, 880, 912, 943, 972,
   991,1010,1029,1050,1066,1074,1079,1082,1091,1101,1105,1118,1127,1141,
  1149,1176,1204,1246,1281,1319,1354,1357,1395,1418,1461,1504,1531,1568,
  1624,1653,1679,1689,1708,1737,1753,1788,1834,1860,1884,1902,1916,1932,
  1938,1959,1992,2028,2034,2059,2087,2092,2107,2128,2142,2148,2155,2174,
  2182,2187,2197,2205,2208,2215,2222,2229,2237,2247,2260,2270,2278,2286,
  2294,2302,2310,2321,2333,2344,2352,2356,2362,2368,2370,2373,2413,2446,
  2452,2455,2460,2465,2468,2471,2476,2519,2536,2544,2550,2554,2559,2577,
  2587,2616,2621,2646,2676,2684,2689,2706,2735,2762,2784,2806,2825,2854,
  2875,2893,2912,2939,2942,2946,2953,2970,2979,2986,2993,3000,3023,3050,
  3054,3072,3090,3103,3112,3121,3136,3170,3187,3226,3234,3236,3270,3293,
  3303,3322,3344,3366,3389,3409,3431,3441,3445,3491,3522,3552,3566,3586,
  3602,3604,3612,3637,3652,3660,3667,3674,3696,3721,3725,3730,3735,3739,
  3743,3749,3758,3768,3785,3813,3832,3856,3878,3946,3956,3963,3969,3976,3977
};


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,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,2,4,7,1,
  2,0,1,1,2,6,3,4,1,3,1,3,3,4,3,4,3,3,2,4,4,2,4,3,2,1,2,0,1,2,0,2,1,1,3,
  2,2,0,2,1,3,1,3,2,2,0,2,1,2,2,1,1,2,2,2,1,2,2,1,1,2,1,2,0,1,2,1,1,2,1,
  2,0,1,2,1
};

static const unsigned char ag_ptt[] = {
    0,  4,  4,  5,  5,  1,  9,  9,  6, 10, 12, 14, 16, 18, 20, 22, 24, 26,
   28, 30, 32, 34, 36, 40, 40, 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, 62, 64, 65, 65, 67, 67, 63, 55, 55, 55, 53, 69, 68, 68, 70, 66, 66,
   66, 61, 61, 77, 77, 61, 75, 80, 75, 81, 75, 78, 78, 78, 76, 84, 84, 87,
   83, 88, 90, 90, 82, 82, 91, 91, 91, 94, 94, 94, 59,  3,  3,  8,  8,  8,
   98, 98,102,102,100,100,104,104,104, 39, 39, 39, 39,108,108,109,109, 99,
  110,110,114,111,118,118,116,116,117,117,124,124,117,119,119,121,121,125,
  125,129,129, 71, 71,131,131,133,133,133,135,135,136,136,115,115,115,115,
  115,138,138,138,138,138,144,144, 46, 46, 46,146,146,146,147,147,148,150,
  150,150,149,155,155,155,140,140,140,140,140,140,140,140,140,140,140,168,
  170,142,141,141,143,152,152,152,152,152,153,153,154,154, 72, 72,176,176,
  175, 48,179,179,177,178,178,180,180,180,180,180,180,180,180,182,181,181,
  181,181,181,181,181,181,181,181,181,181,199,199,200,200,200,192,191,191,
  185,201,201,134,134,134,134,134,134,134,134,134,134,134,132,132, 47,210,
  211,211,212,212,208,209,209,213,213,213,213,213,214,214,218,218,218,218,
  218,218,220, 73,221,221,221,222,222,222,222, 97,225,225, 97,231,231,231,
  232,232,233,233,217,234,234,234,235,235,236,236,216,230
};

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(V(0,(int *))); break;
    case 14: ag_rp_15(V(1,(int *))); break;
    case 15: ag_rp_16(V(0,(int *))); break;
    case 16: V(0,(int *)) = ag_rp_17(V(1,(int *))); break;
    case 17: ag_rp_18(V(0,(int *))); break;
    case 18: ag_rp_19(V(0,(int *))); break;
    case 19: ag_rp_20(V(1,(int *))); break;
    case 20: V(0,(int *)) = ag_rp_21(V(1,(int *))); break;
    case 21: ag_rp_22(V(1,(int *)), V(2,(int *))); break;
    case 22: ag_rp_23(V(2,(int *)), V(3,(int *))); break;
    case 23: ag_rp_24(); break;
    case 24: V(0,(int *)) = ag_rp_25(); break;
    case 25: V(0,(int *)) = ag_rp_26(); break;
    case 26: V(0,(int *)) = ag_rp_27(); break;
    case 27: 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(V(0,(int *))); break;
    case 42: ag_rp_43(V(1,(int *))); break;
    case 43: ag_rp_44(V(2,(int *))); break;
    case 44: ag_rp_45(V(2,(int *))); break;
    case 45: ag_rp_46(V(1,(int *))); break;
    case 46: ag_rp_47(V(2,(int *))); break;
    case 47: V(0,(int *)) = ag_rp_48(V(1,(int *))); break;
    case 48: V(0,(int *)) = ag_rp_49(V(1,(int *))); break;
    case 49: V(0,(int *)) = ag_rp_50(V(0,(int *)), V(1,(int *))); break;
    case 50: V(0,(int *)) = ag_rp_51(); break;
    case 51: V(0,(int *)) = ag_rp_52(); break;
    case 52: V(0,(int *)) = ag_rp_53(V(1,(int *))); break;
    case 53: V(0,(int *)) = ag_rp_54(V(1,(int *))); break;
    case 54: V(0,(int *)) = ag_rp_55(V(0,(int *))); break;
    case 55: V(0,(int *)) = ag_rp_56(V(0,(int *)), V(1,(int *))); break;
    case 56: V(0,(int *)) = ag_rp_57(); break;
    case 57: V(0,(int *)) = ag_rp_58(V(0,(int *)), V(1,(int *))); break;
    case 58: V(0,(int *)) = ag_rp_59(V(0,(int *))); break;
    case 59: V(0,(int *)) = ag_rp_60(V(0,(int *)), V(1,(int *))); break;
    case 60: V(0,(int *)) = ag_rp_61(V(0,(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 *)) = VDO(AG_WRAP_4 *, ag_rp_64(VW(0, AG_WRAP_4 *))); break;
    case 64: VRO(AG_WRAP_4 *, ag_rp_65(VW(0, AG_WRAP_4 *), VW(2, AG_WRAP_4 *))); 
            VWD(2, AG_WRAP_4 *); break;
    case 65: VRO(AG_WRAP_4 *, ag_rp_66(VW(0, AG_WRAP_4 *), VW(2, AG_WRAP_4 *))); 
            VWD(2, AG_WRAP_4 *); break;
    case 66: VRO(AG_WRAP_4 *, ag_rp_67(VW(0, AG_WRAP_4 *), VW(3, AG_WRAP_4 *))); 
            VWD(3, AG_WRAP_4 *); break;
    case 67: VNO AG_WRAP_4(ag_rp_68(VW(1, AG_WRAP_4 *))); 
            VWD(1, AG_WRAP_4 *); break;
    case 68: VNO AG_WRAP_4(ag_rp_69(V(0,(int *)))); break;
    case 69: VNO AG_WRAP_4(ag_rp_70(V(0,(int *)))); break;
    case 70: VNO AG_WRAP_4(ag_rp_71()); break;
    case 71: VNO AG_WRAP_4(ag_rp_72(VW(1, AG_WRAP_4 *))); 
            VWD(1, AG_WRAP_4 *); break;
    case 72: VNO AG_WRAP_4(ag_rp_73(V(1,(int *)), V(3,(int *)))); break;
    case 73: VNO AG_WRAP_4(ag_rp_74(V(0,(int *)), V(3,(int *)))); break;
    case 74: ag_rp_75(VW(2, AG_WRAP_4 *)); 
            VWD(2, AG_WRAP_4 *); break;
    case 75: ag_rp_76(V(2,(int *))); break;
    case 76: ag_rp_77(V(2,(int *))); break;
    case 77: ag_rp_78(); break;
    case 78: ag_rp_79(V(2,(int *))); break;
    case 79: ag_rp_80(V(2,(int *))); break;
    case 80: ag_rp_81(); break;
    case 81: V(0,(int *)) = ag_rp_82(V(0,(int *))); break;
    case 82: V(0,(int *)) = ag_rp_83(); 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(V(1,(int *))); break;
    case 94: V(0,(int *)) = ag_rp_95(V(0,(int *)), 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(1,(int *))); break;
    case 97: ag_rp_98(V(0,(int *))); break;
    case 98: ag_rp_99(V(0,(int *))); break;
    case 99: ag_rp_100(V(1,(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(0,(int *))); break;
    case 103: ag_rp_104(V(1,(int *))); break;
    case 104: ag_rp_105(V(0,(int *))); break;
    case 105: ag_rp_106(V(1,(int *))); break;
    case 106: V(0,(int *)) = ag_rp_107(); break;
    case 107: V(0,(int *)) = ag_rp_108(); break;
    case 108: ag_rp_109(V(0,(int *))); break;
    case 109: ag_rp_110(V(1,(int *))); break;
    case 110: ag_rp_111(); 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(V(2,(int *))); break;
    case 116: ag_rp_117(); 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(V(2,(int *))); break;
    case 125: ag_rp_126(); break;
    case 126: ag_rp_127(); break;
    case 127: ag_rp_128(V(4,(int *)), V(6,(int *))); break;
    case 128: V(0,(int *)) = ag_rp_129(); break;
    case 129: ag_rp_130(VW(5, AG_WRAP_4 *)); 
            VWD(5, AG_WRAP_4 *); break;
    case 130: ag_rp_131(VW(2, AG_WRAP_4 *)); 
            VWD(2, AG_WRAP_4 *); break;
    case 131: ag_rp_132(V(0,(int *))); break;
    case 132: ag_rp_133(V(2,(int *))); break;
    case 133: V(0,(int *)) = ag_rp_134(); break;
    case 134: V(0,(int *)) = ag_rp_135(); 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 *)) = VDO(AG_WRAP_4 *, ag_rp_140(VW(0, AG_WRAP_4 *))); break;
    case 140: V(0,(int *)) = VDO(AG_WRAP_4 *, ag_rp_141(VW(0, AG_WRAP_4 *))); break;
    case 141: V(0,(int *)) = VDO(AG_WRAP_4 *, ag_rp_142(VW(0, AG_WRAP_4 *))); break;
    case 142: V(0,(int *)) = ag_rp_143(); break;
    case 143: V(0,(int *)) = ag_rp_144(); break;
    case 144: V(0,(int *)) = ag_rp_145(); break;
    case 145: V(0,(int *)) = ag_rp_146(); break;
    case 146: ag_rp_147(V(1,(unsigned char * *))); break;
    case 147: ag_rp_148(); break;
    case 148: V(0,(unsigned char * *)) = ag_rp_149(); break;
    case 149: V(0,(unsigned char * *)) = ag_rp_150(); break;
    case 150: ag_rp_151(); break;
    case 151: ag_rp_152(); break;
    case 152: ag_default(&ag_rtt[0]); ag_rp_153(); break;
  }
  (PCB).la_ptr = (PCB).pointer;
}


static const unsigned char ag_ctn[] = {
    0,0, 97,1,  0,0,  0,0, 99,1,  0,0,  0,0,  0,0,  0,0,  0,0,  0,0,  0,0,
    0,0,  0,0, 57,1,208,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, 98,1,  0,0, 75,1,  0,0, 57,2,  0,0,
    0,0,  0,0,  0,0, 56,1,  0,0, 56,2,177,1, 48,2,217,1,216,1,213,1,213,1,
  213,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, 75,2, 75,2,  0,0, 84,1,  0,0,  0,0, 57,3,177,2,
    0,0,  0,0,  0,0,  0,0,  0,0,213,2,  0,0,  0,0,132,1,132,1,134,1,  0,0,
  148,1,134,1,134,1,134,1,  0,0,  0,0,111,1,110,1,  0,0,  0,0,  0,0,144,1,
    0,0,  0,0,134,1, 68,1,  0,0, 66,1,  0,0,  0,0,  0,0,  0,0,  0,0,  0,0,
    0,0, 75,3, 75,3,  0,0,  0,0,  0,0,  0,0,  0,0,180,1,181,1,181,1,181,1,
  181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,180,1,180,1,180,1,
  180,1,180,1,  0,0,  0,0,  0,0,  0,0,  0,0, 73,1,132,2,141,1,143,1,  0,0,
  141,1,150,1,150,1,150,1, 63,1,  0,0, 67,1, 67,1,134,2,134,2,  0,0,  0,0,
  119,1,111,2,110,2,  0,0,  0,0,144,2,  0,0,  0,0,134,2,134,2,  0,0,  0,0,
  134,1, 68,2, 68,2, 66,2, 75,4,  0,0, 84,3,  0,0,  0,0,  0,0,  0,0,185,1,
    0,0,  0,0,147,2,181,2,147,2,  0,0,180,2,  0,0,180,2,  0,0,  0,0,  0,0,
    0,0,  0,0,  0,0,132,3,125,1,148,3,134,3,134,3,  0,0,134,3,134,3,125,1,
  121,1,144,3,  0,0,  0,0,144,3,  0,0,  0,0,  0,0, 72,1, 68,3, 66,3,181,3,
  181,3,181,3,185,2,146,1,  0,0,147,3,180,3,144,4, 72,2,  0,0,  0,0,201,1,
  146,2,  0,0,181,5,199,1,201,2,114,1,  0,0,  0,0,114,2,199,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;
  DELETE_WRAPPERS;
  (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]])();
  }
}