/* A Bison parser, made by GNU Bison 3.0.4.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Bison version.  */
#define YYBISON_VERSION "3.0.4"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1




/* Copy the first part of user declarations.  */
#line 86 "zparse.y" /* yacc.c:339  */

#include "fuzz.h"
#include "absyn.h"
#include <string.h>
#include <ctype.h>

#define yylex zzlex /* link to newline filter */

#ifdef DEBUG
#define YYDEBUG 1
#endif

PRIVATE tree schema_head(tok name, tok decor, tree formals, int loc);
PRIVATE tree promote(tree a, int loc);
PRIVATE tree sexp_fix(tree a);
PRIVATE tree pred_fix(tree a);
PRIVATE void check_end(tok found);
PRIVATE void set_value(tree syms, int val, int prio);
PRIVATE tree reduce_ops(tree exp);

PRIVATE tree finger;
PRIVATE int end_tok;

EXTERN int line_count;

#define line first_line

#define mk_id(n,d)	((tree) mk_symbol((tok) (n), (tok) (d)))

#line 96 "y.tab.c" /* yacc.c:339  */

# ifndef YY_NULLPTR
#  if defined __cplusplus && 201103L <= __cplusplus
#   define YY_NULLPTR nullptr
#  else
#   define YY_NULLPTR 0
#  endif
# endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

/* In a future release of Bison, this section will be replaced
   by #include "y.tab.h".  */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif

/* Token type.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    AND = 258,
    BAXDEF = 259,
    BGENDEF = 260,
    BSCHEMA = 261,
    BSUP = 262,
    BSYNTAX = 263,
    BZED = 264,
    COCOEQ = 265,
    CROSS = 266,
    DECOR = 267,
    DEFEQ = 268,
    DUMMY = 269,
    EAXDEF = 270,
    EGENDEF = 271,
    EQEQ = 272,
    EQUIV = 273,
    ESCHEMA = 274,
    ESUP = 275,
    ESYNTAX = 276,
    EXISTS = 277,
    EXISTS1 = 278,
    EZED = 279,
    FALSITY = 280,
    FATSEMI = 281,
    FORALL = 282,
    GREEK = 283,
    HIDE = 284,
    IMPLIES = 285,
    IN = 286,
    INGEN = 287,
    INREL = 288,
    LAMBDA = 289,
    LBAG = 290,
    LDATA = 291,
    LET = 292,
    LIMG = 293,
    MU = 294,
    NL = 295,
    NOT = 296,
    NUMBER = 297,
    OR = 298,
    PIPE = 299,
    POWER = 300,
    PRE = 301,
    PROJECT = 302,
    RBAG = 303,
    RDATA = 304,
    RIMG = 305,
    THETA = 306,
    TRUTH = 307,
    UMINUS = 308,
    VDASH = 309,
    WHERE = 310,
    WORD = 311,
    XINGEN = 312,
    XINOP = 313,
    XINREL = 314,
    XPOSTOP = 315,
    XPREGEN = 316,
    XPREREL = 317,
    XABBREV = 318,
    XTAME = 319,
    XPNAME = 320,
    SNAME = 321,
    PREGEN = 322,
    PREREL = 323,
    POSTOP = 324,
    IMAGE = 325,
    STRING = 326,
    LBRACE = 327,
    RBRACE = 328,
    YINREL = 329,
    EDIR = 330,
    IF = 331,
    THEN = 332,
    ELSE = 333,
    LANGLE = 334,
    BIND = 335,
    RANGLE = 336,
    XTOKEN = 337,
    XIGNORE = 338,
    IGNORE = 339,
    XDEBUG = 340,
    XLINE = 341,
    BADTOK = 342,
    APPLY = 343,
    BAG = 344,
    BODY = 345,
    COMP = 346,
    DECL = 347,
    EQUAL = 348,
    EXT = 349,
    GIVEN = 350,
    IDENT = 351,
    INLHS = 352,
    INOP = 353,
    JUST = 354,
    LHS = 355,
    MEMBER = 356,
    NOTHING = 357,
    PRELHS = 358,
    REF = 359,
    SDEF = 360,
    SREF = 361,
    SELECT = 362,
    TEXT = 363,
    SEQ = 364,
    TUPLE = 365,
    CONS = 366,
    DATA = 367,
    ARM = 368,
    BINDING = 369,
    LETDEF = 370,
    PRED = 371,
    AXDEF = 372,
    DEFINE = 373,
    RENAME = 374,
    SHEAD = 375,
    PARA = 376,
    SEXPR = 377,
    SPRED = 378,
    SDECL = 379,
    LETEXPR = 380,
    LETPRED = 381,
    SNOT = 382,
    SAND = 383,
    SOR = 384,
    SIMPLIES = 385,
    SEQUIV = 386,
    SEXISTS = 387,
    SFORALL = 388,
    SEXISTS1 = 389,
    ERROR = 390,
    SET = 391,
    MAX_TOKEN = 392
  };
#endif
/* Tokens.  */
#define AND 258
#define BAXDEF 259
#define BGENDEF 260
#define BSCHEMA 261
#define BSUP 262
#define BSYNTAX 263
#define BZED 264
#define COCOEQ 265
#define CROSS 266
#define DECOR 267
#define DEFEQ 268
#define DUMMY 269
#define EAXDEF 270
#define EGENDEF 271
#define EQEQ 272
#define EQUIV 273
#define ESCHEMA 274
#define ESUP 275
#define ESYNTAX 276
#define EXISTS 277
#define EXISTS1 278
#define EZED 279
#define FALSITY 280
#define FATSEMI 281
#define FORALL 282
#define GREEK 283
#define HIDE 284
#define IMPLIES 285
#define IN 286
#define INGEN 287
#define INREL 288
#define LAMBDA 289
#define LBAG 290
#define LDATA 291
#define LET 292
#define LIMG 293
#define MU 294
#define NL 295
#define NOT 296
#define NUMBER 297
#define OR 298
#define PIPE 299
#define POWER 300
#define PRE 301
#define PROJECT 302
#define RBAG 303
#define RDATA 304
#define RIMG 305
#define THETA 306
#define TRUTH 307
#define UMINUS 308
#define VDASH 309
#define WHERE 310
#define WORD 311
#define XINGEN 312
#define XINOP 313
#define XINREL 314
#define XPOSTOP 315
#define XPREGEN 316
#define XPREREL 317
#define XABBREV 318
#define XTAME 319
#define XPNAME 320
#define SNAME 321
#define PREGEN 322
#define PREREL 323
#define POSTOP 324
#define IMAGE 325
#define STRING 326
#define LBRACE 327
#define RBRACE 328
#define YINREL 329
#define EDIR 330
#define IF 331
#define THEN 332
#define ELSE 333
#define LANGLE 334
#define BIND 335
#define RANGLE 336
#define XTOKEN 337
#define XIGNORE 338
#define IGNORE 339
#define XDEBUG 340
#define XLINE 341
#define BADTOK 342
#define APPLY 343
#define BAG 344
#define BODY 345
#define COMP 346
#define DECL 347
#define EQUAL 348
#define EXT 349
#define GIVEN 350
#define IDENT 351
#define INLHS 352
#define INOP 353
#define JUST 354
#define LHS 355
#define MEMBER 356
#define NOTHING 357
#define PRELHS 358
#define REF 359
#define SDEF 360
#define SREF 361
#define SELECT 362
#define TEXT 363
#define SEQ 364
#define TUPLE 365
#define CONS 366
#define DATA 367
#define ARM 368
#define BINDING 369
#define LETDEF 370
#define PRED 371
#define AXDEF 372
#define DEFINE 373
#define RENAME 374
#define SHEAD 375
#define PARA 376
#define SEXPR 377
#define SPRED 378
#define SDECL 379
#define LETEXPR 380
#define LETPRED 381
#define SNOT 382
#define SAND 383
#define SOR 384
#define SIMPLIES 385
#define SEQUIV 386
#define SEXISTS 387
#define SFORALL 388
#define SEXISTS1 389
#define ERROR 390
#define SET 391
#define MAX_TOKEN 392

/* Value type.  */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif

/* Location type.  */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE YYLTYPE;
struct YYLTYPE
{
  int first_line;
  int first_column;
  int last_line;
  int last_column;
};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif


extern YYSTYPE yylval;
extern YYLTYPE yylloc;
int yyparse (void);

#endif /* !YY_YY_Y_TAB_H_INCLUDED  */

/* Copy the second part of user declarations.  */

#line 435 "y.tab.c" /* yacc.c:358  */

#ifdef short
# undef short
#endif

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif

#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif

#ifndef YY_ATTRIBUTE
# if (defined __GNUC__                                               \
      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
# else
#  define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif

#ifndef YY_ATTRIBUTE_PURE
# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif

#if !defined _Noreturn \
     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
# if defined _MSC_VER && 1200 <= _MSC_VER
#  define _Noreturn __declspec (noreturn)
# else
#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif

#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
    _Pragma ("GCC diagnostic push") \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif


#if ! defined yyoverflow || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
#     ifndef EXIT_SUCCESS
#      define EXIT_SUCCESS 0
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's 'empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */


#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
             && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yytype_int16 yyss_alloc;
  YYSTYPE yyvs_alloc;
  YYLTYPE yyls_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
      + 2 * YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    do                                                                  \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYSIZE_T yyi;                         \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  2
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   1584

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  154
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  91
/* YYNRULES -- Number of rules.  */
#define YYNRULES  250
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  505

/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
   by yylex, with out-of-bounds checking.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   392

#define YYTRANSLATE(YYX)                                                \
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, without out-of-bounds checking.  */
static const yytype_uint8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     139,   143,     2,     2,   142,   138,   141,   151,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,   152,   146,
       2,   137,     2,     2,   153,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,   147,     2,   144,   140,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,   148,   150,   149,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
     135,   136,   145
};

#if YYDEBUG
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
       0,   121,   121,   122,   125,   126,   129,   130,   131,   134,
     134,   136,   136,   138,   138,   142,   145,   146,   149,   150,
     152,   152,   152,   152,   152,   155,   156,   160,   161,   164,
     165,   167,   167,   170,   171,   174,   175,   176,   177,   179,
     180,   181,   189,   191,   193,   195,   199,   202,   206,   209,
     212,   212,   215,   216,   217,   220,   221,   222,   223,   224,
     225,   228,   229,   230,   231,   232,   233,   238,   244,   245,
     248,   249,   252,   254,   258,   264,   268,   270,   273,   274,
     277,   278,   281,   287,   288,   291,   292,   296,   297,   303,
     305,   308,   309,   310,   311,   312,   315,   316,   317,   318,
     319,   320,   321,   322,   323,   324,   325,   326,   327,   328,
     329,   330,   331,   332,   334,   337,   337,   337,   340,   341,
     344,   346,   348,   359,   361,   372,   372,   375,   376,   377,
     380,   381,   384,   387,   388,   391,   392,   393,   394,   398,
     399,   400,   409,   413,   414,   417,   420,   421,   424,   424,
     427,   428,   430,   432,   434,   437,   438,   442,   443,   444,
     445,   446,   447,   448,   449,   450,   451,   452,   453,   455,
     458,   462,   463,   465,   465,   468,   469,   472,   475,   485,
     487,   510,   511,   512,   514,   517,   525,   529,   530,   533,
     534,   548,   549,   551,   567,   568,   569,   570,   571,   574,
     575,   578,   579,   582,   583,   589,   590,   593,   594,   597,
     598,   601,   602,   605,   606,   609,   610,   613,   614,   620,
     621,   624,   625,   628,   631,   632,   634,   635,   636,   637,
     638,   640,   640,   641,   641,   641,   642,   645,   646,   649,
     650,   652,   652,   654,   654,   654,   654,   654,   655,   658,
     659
};
#endif

#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "AND", "BAXDEF", "BGENDEF", "BSCHEMA",
  "BSUP", "BSYNTAX", "BZED", "COCOEQ", "CROSS", "DECOR", "DEFEQ", "DUMMY",
  "EAXDEF", "EGENDEF", "EQEQ", "EQUIV", "ESCHEMA", "ESUP", "ESYNTAX",
  "EXISTS", "EXISTS1", "EZED", "FALSITY", "FATSEMI", "FORALL", "GREEK",
  "HIDE", "IMPLIES", "IN", "INGEN", "INREL", "LAMBDA", "LBAG", "LDATA",
  "LET", "LIMG", "MU", "NL", "NOT", "NUMBER", "OR", "PIPE", "POWER", "PRE",
  "PROJECT", "RBAG", "RDATA", "RIMG", "THETA", "TRUTH", "UMINUS", "VDASH",
  "WHERE", "WORD", "XINGEN", "XINOP", "XINREL", "XPOSTOP", "XPREGEN",
  "XPREREL", "XABBREV", "XTAME", "XPNAME", "SNAME", "PREGEN", "PREREL",
  "POSTOP", "IMAGE", "STRING", "LBRACE", "RBRACE", "YINREL", "EDIR", "IF",
  "THEN", "ELSE", "LANGLE", "BIND", "RANGLE", "XTOKEN", "XIGNORE",
  "IGNORE", "XDEBUG", "XLINE", "BADTOK", "APPLY", "BAG", "BODY", "COMP",
  "DECL", "EQUAL", "EXT", "GIVEN", "IDENT", "INLHS", "INOP", "JUST", "LHS",
  "MEMBER", "NOTHING", "PRELHS", "REF", "SDEF", "SREF", "SELECT", "TEXT",
  "SEQ", "TUPLE", "CONS", "DATA", "ARM", "BINDING", "LETDEF", "PRED",
  "AXDEF", "DEFINE", "RENAME", "SHEAD", "PARA", "SEXPR", "SPRED", "SDECL",
  "LETEXPR", "LETPRED", "SNOT", "SAND", "SOR", "SIMPLIES", "SEQUIV",
  "SEXISTS", "SFORALL", "SEXISTS1", "ERROR", "SET", "'='", "'-'", "'('",
  "'^'", "'.'", "','", "')'", "']'", "MAX_TOKEN", "';'", "'['", "'{'",
  "'}'", "'|'", "'/'", "':'", "'@'", "$accept", "text", "section", "para",
  "box", "$@1", "$@2", "$@3", "display", "zed.text", "display.begin",
  "end", "long.schema", "axiom.part", "axioms", "sep", "short.para",
  "short.para.ok", "def.lhs", "schema.lhs", "schema.head", "future.sname",
  "sname", "dir", "string.opt", "data.rhs", "arm", "schema", "sref",
  "sref.tail", "rename.opt", "rename.list", "rename", "decl.part", "decl",
  "easy.decl", "sexp", "pred", "logic", "logic1", "quant", "rel.chain",
  "rel.item", "mark.expr", "last.expr", "expr0", "quant.expr", "let.defs",
  "let.def", "expr", "expr0.5", "bad.exp.quant", "product", "expr1",
  "op.chain", "inop", "expr1.5", "expr2", "expr3", "selector",
  "binding.list", "binding", "theta", "set", "set.decl", "some.idents",
  "more.decls", "bra.sref", "g.actual.opt", "g.formal.opt", "gen.formals",
  "ref.head", "decl.seq", "pred.seq.opt", "pred.seq", "expr.list",
  "expr.list.opt", "expr.opt", "dname.list", "vname", "dname", "ident",
  "op.name", "pre.sym", "in.sym", "post.sym", "relation", "decor", "word",
  "symbol", "symbols", YY_NULLPTR
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
   (internal) symbol number NUM (which must be that of a token).  */
static const yytype_uint16 yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
     365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
     385,   386,   387,   388,   389,   390,   391,    61,    45,    40,
      94,    46,    44,    41,    93,   392,    59,    91,   123,   125,
     124,    47,    58,    64
};
# endif

#define YYPACT_NINF -304

#define yypact_value_is_default(Yystate) \
  (!!((Yystate) == (-304)))

#define YYTABLE_NINF -224

#define yytable_value_is_error(Yytable_value) \
  0

  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
     STATE-NUM.  */
static const yytype_int16 yypact[] =
{
    -304,  1498,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  1416,
    1416,  1416,  1416,  1416,  1416,  1416,  1416,  1416,     2,  1416,
      23,    75,  -304,  -304,  -304,  -304,   702,  -304,   259,   -23,
    -110,    60,  -304,  -304,    88,  -304,  -304,  -304,  -304,  -304,
    -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,   503,   760,
     851,  1276,  1297,  1322,  1349,  1370,    90,   104,  1395,   111,
     120,  -304,   285,   285,  -304,   285,  -304,  1182,   -21,  -304,
     975,  -304,   427,   975,   167,  -304,   199,   199,   199,  1024,
    1060,  1024,   199,   939,   285,    47,  -304,  -304,   205,   203,
     199,  -304,   173,  -304,   194,   486,  -304,   273,  -304,   246,
    -304,   254,   281,  -304,    27,   427,    11,  -304,  -304,   831,
       9,   476,   199,   199,   199,   199,  -304,   199,  -304,   345,
    -304,  -304,   -78,  -304,  -304,  -304,   241,   259,  -304,   302,
     259,  -304,  -304,  -304,  -304,  -304,   225,  -304,  -304,  -304,
    -304,  -304,  -304,   243,   249,  -304,  -304,  -304,   303,   155,
    -304,   -74,   158,   230,  -304,   199,  1103,  -304,  -304,   192,
     340,    -4,    29,   -86,  -304,   375,  -304,  -304,  -304,  -304,
     939,   285,  -304,    14,   255,  -304,   199,  -304,  -304,   427,
    1182,   199,   199,   268,   -19,   250,  1024,   362,   105,   335,
    -304,   -29,  -304,   357,   368,    15,   427,   285,   -21,   285,
     199,   311,   313,   200,   619,   315,   298,   -83,  -304,  -304,
    -304,  -304,  -304,  -304,  -304,  -304,   702,  1182,  1060,  -304,
      10,  1060,   975,   975,   975,   327,   975,   975,   975,   975,
    -304,   339,  -304,   199,   380,   380,  -304,  -304,   199,    14,
    1182,  1218,   199,   320,    -6,   -21,   199,  1182,  -304,   461,
     199,   471,   342,   199,   199,   473,  -304,    16,   474,   478,
    -304,   328,   809,  -304,   259,    72,  1182,   241,   107,  -304,
    -304,   165,  -304,  -304,  -304,  -304,  -304,  -304,  1060,   285,
    1060,  -304,  1060,  1060,   427,   -21,   200,   351,   355,  1182,
    -304,   199,  1182,   358,   -21,  1060,  1182,   356,    14,     0,
    -304,    42,   427,  1182,   434,  -304,   285,   360,   -33,   141,
     181,  -304,  -304,  1182,  -304,    72,  -304,  1182,    14,   364,
     116,   268,  1139,  -304,  -304,  1182,  -304,  -304,  -304,    12,
    -304,  -304,  -304,  -304,  -304,  -304,  1024,  -304,  -304,  -304,
    -304,   146,   387,    72,   146,   508,   534,   396,  1182,  1182,
    1182,  -304,  1261,  -304,  -304,   380,   493,   -21,   470,  -304,
    -304,  -304,  1182,  -304,  -304,  -304,   373,  -304,   488,   489,
    1261,  1182,   204,   -12,  -304,   477,   241,   512,  -304,  -304,
    1024,  -304,  -304,   481,  -304,    47,  -304,  -304,  -304,  -304,
     215,  -304,  -304,   -23,   379,  -304,  -304,  -304,   386,  -304,
    -304,   121,  -304,   255,  -304,  1261,  1182,    33,  -304,  -304,
    -304,  -304,    72,  -304,  -304,  -304,   392,   268,  -304,  1182,
    -304,   464,  -304,  -304,  1182,  1060,  -304,   232,   339,  -304,
    -304,   223,  -304,   235,   393,   247,   318,  -304,  -304,  -304,
     246,  -304,  -304,   163,   199,   397,   -21,  1182,   246,    -5,
     299,   193,  -304,   166,   199,   398,  -304,  -304,  -304,  1060,
    -304,  -304,  -304,  -304,  1060,  1182,  -304,   229,  -304,   480,
    -304,  1182,  -304,   408,   661,  -304,    72,  -304,   356,    72,
    -304,  -304,  -304,  -304,  1182,  -304,  -304,  -304,   505,  -304,
     233,  -304,  -304,  -304,  -304,  -304,   412,  -304,  -304,  -304,
    -304,  -304,  -304,  -304,  -304
};

  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
     Performed when YYTABLE does not specify something else to do.  Zero
     means the default is an error.  */
static const yytype_uint8 yydefact[] =
{
       3,     0,     1,     5,     9,    11,    13,    19,    18,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     2,     4,     6,     7,     0,     8,     0,   200,
       0,     0,   234,   247,     0,   241,    52,   231,   232,   236,
     233,   235,   242,   244,   245,   246,   243,   249,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      69,    34,   116,   117,   101,   115,   139,   214,   141,   140,
       0,   159,     0,     0,     0,   100,   240,   240,   240,   214,
       0,   214,   240,     0,     0,     0,    16,    33,     0,     0,
     240,   193,     0,    40,    90,    95,   114,    96,   123,   134,
     138,   136,   137,   145,   146,   154,   156,   166,   161,    98,
     198,     0,   240,   240,   240,   240,    10,   240,    86,     0,
      87,    83,     0,   217,   221,   222,     0,     0,   199,     0,
       0,    54,    53,   248,    56,   250,     0,    58,    60,    55,
      57,    61,    62,     0,     0,    65,    66,    68,     0,     0,
     205,   208,     0,     0,   141,   240,     0,   211,   160,   213,
       0,   198,     0,     0,   130,     0,   219,   116,   117,   115,
       0,     0,   102,   150,   198,   103,   240,   239,   223,     0,
       0,   240,   240,   216,   193,   190,     0,     0,   198,     0,
      90,     0,   175,     0,     0,   198,     0,   139,   141,   140,
     240,   113,     0,   123,   160,     0,     0,     0,    20,    21,
      22,    24,    23,    32,    31,    15,     0,     0,    38,    75,
      79,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     119,     0,   124,   240,     0,     0,   149,   148,   240,   155,
       0,     0,   240,     0,     0,     0,   240,     0,   157,    42,
     240,     0,     0,   240,   240,     0,    88,    79,     0,     0,
     229,    79,     0,    26,     0,     0,     0,     0,     0,    12,
      51,     0,    50,    14,    59,    63,    64,    67,     0,     0,
       0,    74,     0,     0,     0,   141,   123,   160,     0,     0,
     165,   240,     0,     0,     0,     0,     0,    79,   151,   198,
      97,     0,   229,     0,     0,   185,     0,   208,     0,     0,
     198,   181,   187,     0,   162,     0,   164,     0,   152,     0,
       0,   216,     0,   112,   172,     0,   171,   124,   191,   198,
      99,    35,    17,    37,    36,    89,     0,    77,    47,    41,
     104,   107,   110,     0,   106,   105,   111,   108,     0,     0,
       0,   118,     0,   144,   143,     0,     0,   141,     0,   125,
     126,   168,     0,   167,   174,   173,    39,    70,     0,    72,
       0,     0,     0,   198,   237,     0,     0,     0,   228,   225,
       0,   226,   227,     0,    25,     0,    29,    84,   218,    85,
       0,   203,   202,   200,     0,    92,   206,   209,   207,    93,
      91,     0,   124,   198,   212,     0,     0,   198,   220,   131,
      94,   132,     0,   178,   215,   182,   189,   216,   183,     0,
     188,     0,   176,   177,     0,     0,   128,   180,   179,   158,
      43,     0,    80,     0,     0,   198,     0,   123,   123,   123,
     135,   147,   169,     0,   240,     0,     0,     0,   142,   198,
       0,   198,   197,   196,   240,     0,   224,    28,    27,     0,
     204,   201,    48,    49,     0,     0,   179,   198,   196,     0,
     186,     0,   127,   123,   160,   163,     0,    78,    79,     0,
     109,   121,   120,   122,     0,   153,   170,    71,     0,   195,
     194,   230,   238,    30,   210,   129,   160,   194,   184,   133,
     192,    81,    76,    82,    73
};

  /* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,
    -304,   -87,   -15,  -304,  -304,  -113,   341,  -304,  -304,  -304,
    -304,  -304,   578,  -304,  -304,  -304,   110,   -49,    57,   446,
    -290,  -304,    85,  -304,   -24,   301,   350,   -77,    -1,   -22,
    -304,  -304,   479,  -194,  -303,  -304,   332,  -183,   288,   115,
    -295,  -304,  -304,   236,   220,  -304,  -304,  -304,    18,  -304,
    -304,   264,   352,  -304,  -304,  -304,  -304,     8,  -298,  -109,
     312,  -203,   278,   291,  -304,    13,   348,  -288,   -79,  -234,
     -73,   -26,   239,  -304,   491,   492,   495,   367,   511,   882,
     707
};

  /* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
      -1,     1,    22,    23,    24,    28,    29,    30,    25,    85,
      26,   215,   116,   384,   385,   216,    86,    87,    88,    89,
     130,   271,   117,    27,   148,   366,   367,   206,    91,   219,
     337,   431,   432,   119,   150,   121,    92,    93,   190,    95,
      96,    97,   351,   232,   231,   358,   202,   163,   164,    98,
      99,   100,   101,   102,   103,   238,   104,   105,   106,   363,
     191,   192,   107,   108,   185,   186,   307,   158,   248,   127,
     128,   267,   151,   281,   398,   159,   160,   304,   122,   165,
     123,   161,   125,    43,    44,    45,   350,   178,    46,    47,
      48
};

  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
     positive, shift that token.  If negative, reduce the rule whose
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
static const yytype_int16 yytable[] =
{
     110,   249,   124,   189,   120,   207,   264,   413,   194,   327,
     365,   368,   -45,   149,   152,   320,   153,   -44,   240,   245,
     291,   240,  -200,  -200,   428,    94,  -200,   291,   291,  -200,
     183,   429,   263,   426,   109,    76,   124,   124,   129,   124,
     418,   246,   166,   111,   371,    74,   174,   291,   172,   241,
      76,   175,   314,   188,   305,   195,   381,   440,   124,   265,
     294,   331,   208,   209,   265,   291,   210,   295,   211,   266,
      31,   212,   279,    57,   266,   448,   280,    67,   109,   174,
     242,   109,   201,   242,    71,   118,   111,   213,   109,   406,
     173,   204,   402,    74,    59,  -221,   113,   114,    76,   466,
     268,   124,   401,   120,   124,   429,   120,   309,    36,   289,
     448,   338,   269,   315,    79,   273,   131,    60,   162,   118,
     118,    81,   118,   239,   126,   236,   132,   -86,    76,   469,
     391,   -86,   453,   162,   -86,   292,   184,   291,   133,   113,
     114,   118,   292,   292,   339,   124,   144,   292,   319,   222,
     321,   243,   244,   299,   243,   244,   247,   336,  -223,   247,
     310,   143,   292,   380,   287,   237,  -221,   115,  -223,   201,
     174,   124,   166,   124,   443,   391,   226,   468,   204,  -202,
     292,   156,   157,  -202,   118,   386,   146,   118,   502,   227,
     110,   147,   388,   214,   157,    31,   157,   298,   203,   308,
     340,   341,   342,   397,   344,   345,   346,   347,   174,   174,
     115,   177,   368,   291,   318,    94,   218,   335,   166,   369,
     430,   373,   217,    35,   109,   291,   109,   221,   118,   109,
     109,   109,   109,    36,   109,   109,   109,   109,   124,   124,
     120,   390,   194,   481,   482,   483,  -201,   312,   -89,   391,
    -201,   392,   292,   124,   118,   396,   118,  -221,   174,   166,
     372,   291,   294,   434,   436,   234,   407,   294,   166,   425,
     109,   286,   459,   111,   465,   174,   174,   395,   233,   291,
     124,   399,   400,   265,   462,   203,   109,    31,   109,   124,
     109,   109,   235,   419,   410,   300,   457,    76,   458,   111,
     274,   157,   298,   109,  -124,   372,  -124,   434,   278,   294,
     435,   282,   126,    31,   393,   112,   484,   124,   275,   298,
     318,   118,   205,   420,   276,    36,   113,   114,   292,   174,
      31,   166,   333,  -221,   289,   460,   118,   490,   427,   434,
     292,    76,   325,   326,   449,   451,   289,  -124,   452,   433,
     455,    36,   113,   114,   195,   356,   360,   460,   270,   461,
     208,   209,   157,   118,   210,   476,   211,   477,    36,   212,
     348,   460,   250,   497,   289,   475,   292,   289,   277,   478,
     467,   389,   493,   283,   450,   213,   124,   494,   290,   391,
     222,   392,   296,   433,   292,   288,   306,   115,  -221,   222,
     262,   293,   292,   434,   404,   223,   503,   157,    31,   288,
    -124,   411,   313,   252,   223,    67,   225,   226,   414,   450,
     369,   303,    71,   115,   410,    72,   226,   187,   421,   193,
     227,    74,   423,   474,   229,   311,    76,   300,   316,   227,
     157,   289,   330,   489,   179,   180,    36,   155,   317,   196,
     124,   157,    79,   124,   323,    31,   324,   220,   329,    81,
     265,   480,    67,   437,   438,   439,   343,   109,   362,    71,
     353,   354,   109,   496,   -46,   380,   349,   445,    74,   257,
     258,   259,   260,    76,   261,   375,   157,   379,   381,   222,
     376,   214,   382,    36,   328,   157,   208,   209,   403,    79,
     210,   408,   211,   412,   223,   212,    81,   415,    32,   250,
     280,   222,   224,   442,   251,   225,   226,   424,    82,   156,
     444,   157,   284,   446,   447,  -219,   456,   454,   463,   227,
     228,    31,   464,   229,   470,    32,    33,   222,   279,   472,
     473,    34,   471,   297,   479,    39,   486,   492,   301,   302,
     252,  -129,   223,   498,   504,   500,   487,   332,   256,    35,
     224,   501,   488,   225,   226,   387,   156,   322,   334,    36,
      37,    38,    39,   359,    40,   441,   230,   227,   134,   422,
     495,   229,   409,   394,   416,   176,   499,    42,    42,    42,
      42,    42,    42,    42,    42,    42,   364,    42,   417,   495,
     352,    40,   253,   254,    90,   355,   255,     0,     0,   361,
       0,     0,     0,   370,    41,     0,     0,   374,     0,     0,
     377,   378,   -98,     0,     0,     0,    42,    42,    42,    42,
      42,    42,    42,    42,   -98,   -98,    42,   -98,   -98,     0,
     -98,    41,     0,   -98,     0,   -98,     0,     0,   -98,   -98,
       0,     0,    42,     0,     0,     0,     0,     0,   405,   -98,
       0,     0,   -98,   -98,   -98,     0,   -98,     0,     0,   -98,
       0,     0,     0,   -98,     0,     0,   -98,   -98,     0,   -98,
     -98,     0,   -98,     0,     0,   -98,     0,   -98,     0,     0,
     -98,   -98,   -98,     0,     0,     0,   -98,     0,     0,     0,
       0,   -98,     0,    61,   -98,   -98,     0,   272,   -98,     0,
       0,   -98,     0,     0,     0,   -98,     0,    49,    50,    51,
      52,    53,    54,    55,    62,    63,    58,    64,     0,    65,
      31,     0,     0,     0,   -98,     0,    66,    67,   -98,    68,
       0,    69,     0,    70,    71,     0,     0,    72,    73,     0,
       0,     0,     0,    74,    75,     0,     0,     0,    76,     0,
       0,     0,   328,   -98,     0,   -98,     0,     0,    36,    77,
      78,     0,   -98,     0,    79,     0,     0,     0,    80,     0,
       0,    81,     0,     0,     0,     0,     0,     0,    31,     0,
       0,     0,    32,    33,    90,     0,     0,     0,    34,     0,
       0,     0,   136,     0,   500,   -98,     0,   -98,     0,     0,
     383,   485,     0,     0,   -98,     0,    35,     0,     0,     0,
       0,   491,     0,     0,     0,     0,    36,    37,    38,    39,
       0,    62,    63,     0,    64,     0,    65,    31,  -160,     0,
      82,    83,  -160,    66,    67,     0,    68,     0,    69,    84,
      70,    71,     0,     0,    72,    73,     0,     0,    40,  -160,
      74,    75,  -160,  -160,  -160,    76,  -160,     0,     0,  -160,
       0,     0,     0,  -160,     0,    36,   155,    78,     0,    31,
       0,    79,  -160,    32,    33,    80,     0,  -160,    81,    34,
       0,     0,     0,     0,     0,     0,     0,  -160,    41,    56,
    -160,     0,     0,  -160,     0,  -160,     0,    35,     0,     0,
    -160,     0,     0,     0,     0,     0,     0,    36,    37,    38,
      39,     0,     0,     0,     0,     0,   137,     0,     0,  -160,
     135,   135,   135,   135,   135,   135,   135,   135,     0,     0,
     135,     0,     0,     0,     0,     0,     0,    82,   170,    40,
       0,     0,     0,   111,     0,     0,   171,     0,     0,     0,
       0,    62,    63,     0,    64,     0,    65,    31,  -160,  -160,
    -160,  -160,  -160,   197,    67,     0,   198,     0,   199,     0,
      70,    71,     0,     0,    72,    73,     0,     0,     0,    41,
      74,    75,     0,     0,     0,    76,     0,   167,   168,     0,
      64,     0,   169,    31,     0,    36,   181,   200,     0,    66,
      67,    79,   154,     0,    69,    80,    70,    71,    81,     0,
      72,    73,     0,     0,     0,     0,    74,    75,     0,     0,
       0,    76,     0,     0,     0,     0,     0,     0,   111,     0,
       0,    36,   155,    78,     0,     0,     0,    79,     0,     0,
       0,    80,    31,     0,    81,     0,     0,     0,    66,    67,
       0,   154,     0,    69,     0,     0,    71,     0,     0,    72,
       0,     0,     0,     0,     0,    74,     0,   182,   170,     0,
      76,     0,    62,    63,     0,    64,   171,    65,    31,     0,
      36,   181,   114,     0,    66,    67,    79,    68,     0,    69,
      80,    70,    71,    81,     0,    72,    73,     0,     0,     0,
       0,    74,    75,    82,   170,     0,    76,   111,     0,     0,
       0,     0,   171,     0,     0,     0,    36,   155,    78,     0,
       0,    31,    79,     0,     0,     0,    80,   197,    67,    81,
     285,     0,   199,     0,     0,    71,     0,     0,    72,     0,
       0,     0,     0,   382,    74,     0,     0,     0,     0,    76,
       0,     0,   182,   156,     0,     0,     0,    31,     0,    36,
     181,   114,     0,    66,    67,    79,   154,     0,    69,    80,
       0,    71,    81,     0,    72,     0,     0,     0,     0,     0,
      74,     0,     0,     0,     0,    76,     0,     0,    82,   170,
       0,     0,     0,     0,     0,    36,   155,   171,     0,     0,
      31,    79,     0,     0,     0,    80,    66,    67,    81,   154,
       0,    69,     0,     0,    71,     0,     0,    72,     0,     0,
       0,     0,     0,    74,     0,     0,     0,     0,    76,     0,
       0,   182,   156,     0,     0,     0,    31,     0,    36,   155,
       0,     0,   197,    67,    79,   357,     0,   199,    80,     0,
      71,    81,     0,    72,     0,     0,     0,     0,     0,    74,
       0,     0,     0,     0,    76,     0,     0,    82,   156,     0,
       0,     0,     0,     0,    36,   155,     0,     0,     0,    31,
      79,     0,     0,     0,    80,    66,    67,    81,   154,     0,
      69,     0,     0,    71,    31,     0,    72,     0,    32,    33,
       0,     0,    74,     0,    34,     0,     0,    76,     0,     0,
      82,   156,     0,     0,     0,    31,     0,    36,   155,    32,
      33,     0,    35,    79,     0,    34,     0,     0,     0,     0,
      81,     0,    36,    37,    38,    39,     0,     0,     0,     0,
      31,   138,     0,    35,    32,    33,    82,   156,     0,     0,
      34,     0,     0,    36,    37,    38,    39,     0,     0,     0,
       0,     0,   139,     0,    40,     0,     0,    31,    35,     0,
       0,    32,    33,     0,     0,     0,     0,    34,    36,    37,
      38,    39,     0,     0,     0,    40,     0,   140,    31,    82,
     156,     0,    32,    33,     0,    35,     0,     0,    34,     0,
       0,     0,     0,     0,    41,    36,    37,    38,    39,     0,
      40,     0,     0,    31,   141,     0,    35,    32,    33,     0,
       0,     0,     0,    34,     0,    41,    36,    37,    38,    39,
       0,     0,     0,     0,    31,   142,     0,    40,    32,    33,
       0,    35,     0,     0,    34,     0,     0,     0,     0,     0,
      41,    36,    37,    38,    39,     0,     0,     0,    40,     0,
     145,     0,    35,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    36,    37,    38,    39,     0,    41,     0,     0,
       0,     0,     0,    40,     0,     0,     0,     0,     2,     3,
       0,     0,     4,     5,     6,     0,     7,     8,    41,     0,
       0,     0,     0,     0,    40,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    41,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    41,     9,    10,    11,    12,    13,
      14,    15,    16,    17,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      18,    19,     0,    20,    21
};

static const yytype_int16 yycheck[] =
{
      26,   110,    28,    80,    28,    84,   119,   297,    81,   203,
     244,   245,    17,    62,    63,   198,    65,    17,     7,    10,
      32,     7,    13,    13,   327,    26,    17,    32,    32,    17,
      79,   329,   119,   321,    26,    56,    62,    63,   148,    65,
      73,    32,    68,    14,   247,    51,    72,    32,    70,    38,
      56,    73,    81,    79,    73,    81,    14,   352,    84,   142,
     146,   144,    15,    16,   142,    32,    19,   153,    21,   152,
      28,    24,   146,    71,   152,   370,   150,    35,    70,   105,
      69,    73,    83,    69,    42,    28,    14,    40,    80,   292,
      72,    83,   286,    51,    71,    80,    67,    68,    56,   402,
     126,   127,   285,   127,   130,   403,   130,   186,    66,   142,
     405,   220,   127,   142,    72,   130,    56,    42,   139,    62,
      63,    79,    65,   105,   147,    98,    66,   146,    56,   417,
     142,   150,   144,   139,   153,   147,    79,    32,    50,    67,
      68,    84,   147,   147,   221,   171,    42,   147,   197,     3,
     199,   140,   141,   179,   140,   141,   147,   147,   142,   147,
     186,    71,   147,   147,   156,   138,   151,   138,   152,   170,
     196,   197,   198,   199,   357,   142,    30,   144,   170,    13,
     147,   139,    67,    17,   127,   262,    75,   130,   478,    43,
     216,    71,   265,   146,    79,    28,    81,   179,    83,   186,
     222,   223,   224,   280,   226,   227,   228,   229,   234,   235,
     138,    12,   446,    32,   196,   216,    13,   218,   244,   245,
     329,   247,    17,    56,   216,    32,   218,    54,   171,   221,
     222,   223,   224,    66,   226,   227,   228,   229,   264,   265,
     264,   267,   315,   437,   438,   439,    13,   142,    54,   142,
      17,   144,   147,   279,   197,   279,   199,   152,   284,   285,
     247,    32,   146,   336,   343,    11,   292,   146,   294,   153,
     262,   156,   385,    14,   153,   301,   302,   278,    32,    32,
     306,   282,   283,   142,   393,   170,   278,    28,   280,   315,
     282,   283,    11,   152,   295,   180,   383,    56,   385,    14,
      75,   186,   284,   295,    31,   292,    33,   380,   153,   146,
     336,   153,   147,    28,   149,    56,   153,   343,    75,   301,
     302,   264,    83,   142,    75,    66,    67,    68,   147,   355,
      28,   357,   217,   152,   142,   142,   279,   144,   325,   412,
     147,    56,   142,   143,   370,   371,   142,    74,   144,   336,
     376,    66,    67,    68,   380,   240,   241,   142,    56,   144,
      15,    16,   247,   306,    19,   142,    21,   144,    66,    24,
      31,   142,    33,   144,   142,   143,   147,   142,    75,   144,
     406,   266,   459,   153,   371,    40,   412,   464,    48,   142,
       3,   144,    17,   380,   147,   156,   146,   138,   151,     3,
      55,   162,   147,   476,   289,    18,   479,   292,    28,   170,
     137,   296,    77,    74,    18,    35,    29,    30,   303,   406,
     446,   153,    42,   138,   425,    45,    30,    79,   313,    81,
      43,    51,   317,   425,    47,    73,    56,   322,    81,    43,
     325,   142,   144,   144,    77,    78,    66,    67,    80,    82,
     476,   336,    72,   479,   143,    28,   143,    90,   143,    79,
     142,   143,    35,   348,   349,   350,   139,   459,   148,    42,
     234,   235,   464,   465,    13,   147,   137,   362,    51,   112,
     113,   114,   115,    56,   117,    14,   371,    14,    14,     3,
     148,   146,    14,    66,   143,   380,    15,    16,   143,    72,
      19,   143,    21,   147,    18,    24,    79,    73,    32,    33,
     150,     3,    26,    20,    38,    29,    30,   153,   138,   139,
      50,   406,   155,   150,    36,    36,    14,    50,   149,    43,
      44,    28,   146,    47,   419,    32,    33,     3,   146,   424,
     425,    38,    78,   176,   151,    69,   149,   149,   181,   182,
      74,   143,    18,    73,    49,   143,   446,   216,   112,    56,
      26,   476,   447,    29,    30,   264,   139,   200,   218,    66,
      67,    68,    69,   241,    98,   355,    97,    43,    75,   315,
     465,    47,   294,   271,   306,    74,   471,     9,    10,    11,
      12,    13,    14,    15,    16,    17,   244,    19,   307,   484,
     233,    98,   111,   111,    26,   238,   111,    -1,    -1,   242,
      -1,    -1,    -1,   246,   138,    -1,    -1,   250,    -1,    -1,
     253,   254,     3,    -1,    -1,    -1,    48,    49,    50,    51,
      52,    53,    54,    55,    15,    16,    58,    18,    19,    -1,
      21,   138,    -1,    24,    -1,    26,    -1,    -1,    29,    30,
      -1,    -1,    74,    -1,    -1,    -1,    -1,    -1,   291,    40,
      -1,    -1,    43,    44,     3,    -1,    47,    -1,    -1,    50,
      -1,    -1,    -1,    54,    -1,    -1,    15,    16,    -1,    18,
      19,    -1,    21,    -1,    -1,    24,    -1,    26,    -1,    -1,
      29,    30,    73,    -1,    -1,    -1,    77,    -1,    -1,    -1,
      -1,    40,    -1,     1,    43,    44,    -1,   129,    47,    -1,
      -1,    50,    -1,    -1,    -1,    54,    -1,    10,    11,    12,
      13,    14,    15,    16,    22,    23,    19,    25,    -1,    27,
      28,    -1,    -1,    -1,    73,    -1,    34,    35,    77,    37,
      -1,    39,    -1,    41,    42,    -1,    -1,    45,    46,    -1,
      -1,    -1,    -1,    51,    52,    -1,    -1,    -1,    56,    -1,
      -1,    -1,   143,   144,    -1,   146,    -1,    -1,    66,    67,
      68,    -1,   153,    -1,    72,    -1,    -1,    -1,    76,    -1,
      -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    28,    -1,
      -1,    -1,    32,    33,   216,    -1,    -1,    -1,    38,    -1,
      -1,    -1,    42,    -1,   143,   144,    -1,   146,    -1,    -1,
       1,   444,    -1,    -1,   153,    -1,    56,    -1,    -1,    -1,
      -1,   454,    -1,    -1,    -1,    -1,    66,    67,    68,    69,
      -1,    22,    23,    -1,    25,    -1,    27,    28,     7,    -1,
     138,   139,    11,    34,    35,    -1,    37,    -1,    39,   147,
      41,    42,    -1,    -1,    45,    46,    -1,    -1,    98,    28,
      51,    52,    31,    32,    33,    56,    35,    -1,    -1,    38,
      -1,    -1,    -1,    42,    -1,    66,    67,    68,    -1,    28,
      -1,    72,    51,    32,    33,    76,    -1,    56,    79,    38,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,   138,    17,
      69,    -1,    -1,    72,    -1,    74,    -1,    56,    -1,    -1,
      79,    -1,    -1,    -1,    -1,    -1,    -1,    66,    67,    68,
      69,    -1,    -1,    -1,    -1,    -1,    75,    -1,    -1,    98,
      48,    49,    50,    51,    52,    53,    54,    55,    -1,    -1,
      58,    -1,    -1,    -1,    -1,    -1,    -1,   138,   139,    98,
      -1,    -1,    -1,    14,    -1,    -1,   147,    -1,    -1,    -1,
      -1,    22,    23,    -1,    25,    -1,    27,    28,   137,   138,
     139,   140,   141,    34,    35,    -1,    37,    -1,    39,    -1,
      41,    42,    -1,    -1,    45,    46,    -1,    -1,    -1,   138,
      51,    52,    -1,    -1,    -1,    56,    -1,    22,    23,    -1,
      25,    -1,    27,    28,    -1,    66,    67,    68,    -1,    34,
      35,    72,    37,    -1,    39,    76,    41,    42,    79,    -1,
      45,    46,    -1,    -1,    -1,    -1,    51,    52,    -1,    -1,
      -1,    56,    -1,    -1,    -1,    -1,    -1,    -1,    14,    -1,
      -1,    66,    67,    68,    -1,    -1,    -1,    72,    -1,    -1,
      -1,    76,    28,    -1,    79,    -1,    -1,    -1,    34,    35,
      -1,    37,    -1,    39,    -1,    -1,    42,    -1,    -1,    45,
      -1,    -1,    -1,    -1,    -1,    51,    -1,   138,   139,    -1,
      56,    -1,    22,    23,    -1,    25,   147,    27,    28,    -1,
      66,    67,    68,    -1,    34,    35,    72,    37,    -1,    39,
      76,    41,    42,    79,    -1,    45,    46,    -1,    -1,    -1,
      -1,    51,    52,   138,   139,    -1,    56,    14,    -1,    -1,
      -1,    -1,   147,    -1,    -1,    -1,    66,    67,    68,    -1,
      -1,    28,    72,    -1,    -1,    -1,    76,    34,    35,    79,
      37,    -1,    39,    -1,    -1,    42,    -1,    -1,    45,    -1,
      -1,    -1,    -1,    14,    51,    -1,    -1,    -1,    -1,    56,
      -1,    -1,   138,   139,    -1,    -1,    -1,    28,    -1,    66,
      67,    68,    -1,    34,    35,    72,    37,    -1,    39,    76,
      -1,    42,    79,    -1,    45,    -1,    -1,    -1,    -1,    -1,
      51,    -1,    -1,    -1,    -1,    56,    -1,    -1,   138,   139,
      -1,    -1,    -1,    -1,    -1,    66,    67,   147,    -1,    -1,
      28,    72,    -1,    -1,    -1,    76,    34,    35,    79,    37,
      -1,    39,    -1,    -1,    42,    -1,    -1,    45,    -1,    -1,
      -1,    -1,    -1,    51,    -1,    -1,    -1,    -1,    56,    -1,
      -1,   138,   139,    -1,    -1,    -1,    28,    -1,    66,    67,
      -1,    -1,    34,    35,    72,    37,    -1,    39,    76,    -1,
      42,    79,    -1,    45,    -1,    -1,    -1,    -1,    -1,    51,
      -1,    -1,    -1,    -1,    56,    -1,    -1,   138,   139,    -1,
      -1,    -1,    -1,    -1,    66,    67,    -1,    -1,    -1,    28,
      72,    -1,    -1,    -1,    76,    34,    35,    79,    37,    -1,
      39,    -1,    -1,    42,    28,    -1,    45,    -1,    32,    33,
      -1,    -1,    51,    -1,    38,    -1,    -1,    56,    -1,    -1,
     138,   139,    -1,    -1,    -1,    28,    -1,    66,    67,    32,
      33,    -1,    56,    72,    -1,    38,    -1,    -1,    -1,    -1,
      79,    -1,    66,    67,    68,    69,    -1,    -1,    -1,    -1,
      28,    75,    -1,    56,    32,    33,   138,   139,    -1,    -1,
      38,    -1,    -1,    66,    67,    68,    69,    -1,    -1,    -1,
      -1,    -1,    75,    -1,    98,    -1,    -1,    28,    56,    -1,
      -1,    32,    33,    -1,    -1,    -1,    -1,    38,    66,    67,
      68,    69,    -1,    -1,    -1,    98,    -1,    75,    28,   138,
     139,    -1,    32,    33,    -1,    56,    -1,    -1,    38,    -1,
      -1,    -1,    -1,    -1,   138,    66,    67,    68,    69,    -1,
      98,    -1,    -1,    28,    75,    -1,    56,    32,    33,    -1,
      -1,    -1,    -1,    38,    -1,   138,    66,    67,    68,    69,
      -1,    -1,    -1,    -1,    28,    75,    -1,    98,    32,    33,
      -1,    56,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,
     138,    66,    67,    68,    69,    -1,    -1,    -1,    98,    -1,
      75,    -1,    56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    66,    67,    68,    69,    -1,   138,    -1,    -1,
      -1,    -1,    -1,    98,    -1,    -1,    -1,    -1,     0,     1,
      -1,    -1,     4,     5,     6,    -1,     8,     9,   138,    -1,
      -1,    -1,    -1,    -1,    98,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   138,    57,    58,    59,    60,    61,
      62,    63,    64,    65,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      82,    83,    -1,    85,    86
};

  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
     symbol of state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,   155,     0,     1,     4,     5,     6,     8,     9,    57,
      58,    59,    60,    61,    62,    63,    64,    65,    82,    83,
      85,    86,   156,   157,   158,   162,   164,   177,   159,   160,
     161,    28,    32,    33,    38,    56,    66,    67,    68,    69,
      98,   138,   176,   237,   238,   239,   242,   243,   244,   244,
     244,   244,   244,   244,   244,   244,   243,    71,   244,    71,
      42,     1,    22,    23,    25,    27,    34,    35,    37,    39,
      41,    42,    45,    46,    51,    52,    56,    67,    68,    72,
      76,    79,   138,   139,   147,   163,   170,   171,   172,   173,
     176,   182,   190,   191,   192,   193,   194,   195,   203,   204,
     205,   206,   207,   208,   210,   211,   212,   216,   217,   221,
     235,    14,    56,    67,    68,   138,   166,   176,   182,   187,
     188,   189,   232,   234,   235,   236,   147,   223,   224,   148,
     174,    56,    66,    50,    75,   243,    42,    75,    75,    75,
      75,    75,    75,    71,    42,    75,    75,    71,   178,   181,
     188,   226,   181,   181,    37,    67,   139,   203,   221,   229,
     230,   235,   139,   201,   202,   233,   235,    22,    23,    27,
     139,   147,   193,   212,   235,   193,   242,    12,   241,   241,
     241,    67,   138,   181,   182,   218,   219,   230,   235,   191,
     192,   214,   215,   230,   234,   235,   241,    34,    37,    39,
      68,   192,   200,   203,   221,   236,   181,   232,    15,    16,
      19,    21,    24,    40,   146,   165,   169,    17,    13,   183,
     241,    54,     3,    18,    26,    29,    30,    43,    44,    47,
     196,   198,   197,    32,    11,    11,    98,   138,   209,   212,
       7,    38,    69,   140,   141,    10,    32,   147,   222,   223,
      33,    38,    74,   238,   239,   240,   183,   241,   241,   241,
     241,   241,    55,   165,   169,   142,   152,   225,   235,   166,
      56,   175,   176,   166,    75,    75,    75,    75,   153,   146,
     150,   227,   153,   153,   241,    37,   203,   221,   236,   142,
      48,    32,   147,   236,   146,   153,    17,   241,   212,   235,
     203,   241,   241,   153,   231,    73,   146,   220,   229,   232,
     235,    73,   142,    77,    81,   142,    81,    80,   212,   181,
     201,   181,   241,   143,   143,   142,   143,   197,   143,   143,
     144,   144,   170,   203,   190,   192,   147,   184,   223,   191,
     193,   193,   193,   139,   193,   193,   193,   193,    31,   137,
     240,   196,   241,   207,   207,   241,   203,    37,   199,   200,
     203,   241,   148,   213,   216,   233,   179,   180,   233,   235,
     241,   225,   229,   235,   241,    14,   148,   241,   241,    14,
     147,    14,    14,     1,   167,   168,   191,   189,   234,   203,
     235,   142,   144,   149,   224,   192,   188,   191,   228,   192,
     192,   201,   197,   143,   203,   241,   225,   235,   143,   202,
     192,   203,   147,   184,   203,    73,   226,   227,    73,   152,
     142,   203,   215,   203,   153,   153,   231,   229,   198,   222,
     223,   185,   186,   229,   234,   235,   232,   203,   203,   203,
     204,   208,    20,   201,    50,   203,   150,    36,   204,   235,
     229,   235,   144,   144,    50,   235,    14,   165,   165,   169,
     142,   144,   223,   149,   146,   153,   198,   235,   144,   231,
     203,    78,   203,   203,   221,   143,   142,   144,   144,   151,
     143,   197,   197,   197,   153,   241,   149,   180,   203,   144,
     144,   241,   149,   191,   191,   203,   221,   144,    73,   203,
     143,   186,   184,   234,    49
};

  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const yytype_uint8 yyr1[] =
{
       0,   154,   155,   155,   156,   156,   157,   157,   157,   159,
     158,   160,   158,   161,   158,   162,   163,   163,   164,   164,
     165,   165,   165,   165,   165,   166,   166,   167,   167,   168,
     168,   169,   169,   170,   170,   171,   171,   171,   171,   171,
     171,   171,   172,   172,   172,   172,   173,   173,   174,   174,
     175,   175,   176,   176,   176,   177,   177,   177,   177,   177,
     177,   177,   177,   177,   177,   177,   177,   177,   178,   178,
     179,   179,   180,   180,   181,   182,   183,   183,   184,   184,
     185,   185,   186,   187,   187,   188,   188,   189,   189,   190,
     191,   192,   192,   192,   192,   192,   193,   193,   193,   193,
     193,   193,   193,   193,   193,   193,   193,   193,   193,   193,
     193,   193,   193,   193,   193,   194,   194,   194,   195,   195,
     196,   196,   196,   197,   198,   199,   199,   200,   200,   200,
     201,   201,   202,   203,   203,   204,   204,   204,   204,   205,
     205,   205,   204,   206,   206,   207,   208,   208,   209,   209,
     210,   210,   210,   210,   210,   211,   211,   212,   212,   212,
     212,   212,   212,   212,   212,   212,   212,   212,   212,   212,
     212,   212,   212,   213,   213,   214,   214,   215,   216,   212,
     212,   217,   217,   217,   217,   217,   218,   219,   219,   220,
     220,   221,   221,   221,   222,   222,   222,   222,   222,   223,
     223,   224,   224,   225,   225,   226,   226,   227,   227,   228,
     228,   229,   229,   230,   230,   231,   231,   232,   232,   233,
     233,   234,   234,   235,   236,   236,   236,   236,   236,   236,
     236,   237,   237,   238,   238,   238,   239,   240,   240,   241,
     241,   242,   242,   243,   243,   243,   243,   243,   243,   244,
     244
};

  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
static const yytype_uint8 yyr2[] =
{
       0,     2,     2,     0,     1,     1,     1,     1,     1,     0,
       3,     0,     4,     0,     4,     3,     1,     3,     1,     1,
       1,     1,     1,     1,     1,     3,     2,     2,     2,     1,
       3,     1,     1,     1,     1,     3,     3,     3,     2,     3,
       1,     3,     2,     4,     3,     4,     2,     3,     4,     4,
       1,     1,     1,     2,     2,     3,     3,     3,     3,     4,
       3,     3,     3,     4,     4,     3,     3,     4,     1,     0,
       1,     3,     1,     4,     2,     2,     5,     2,     3,     0,
       1,     3,     3,     1,     3,     3,     1,     1,     2,     1,
       1,     4,     4,     4,     4,     1,     1,     3,     1,     3,
       1,     1,     2,     2,     3,     3,     3,     3,     3,     5,
       3,     3,     3,     2,     1,     1,     1,     1,     3,     2,
       4,     4,     4,     0,     0,     1,     1,     4,     3,     4,
       1,     3,     3,     6,     1,     4,     1,     1,     1,     1,
       1,     1,     4,     3,     3,     1,     1,     4,     1,     1,
       2,     3,     3,     5,     1,     2,     1,     2,     4,     1,
       1,     1,     3,     5,     3,     3,     1,     3,     3,     4,
       5,     3,     3,     1,     1,     1,     3,     3,     4,     4,
       4,     3,     4,     4,     6,     3,     4,     2,     3,     2,
       0,     3,     6,     1,     4,     4,     3,     3,     0,     1,
       0,     4,     3,     2,     3,     1,     3,     2,     0,     1,
       3,     1,     3,     1,     0,     2,     0,     1,     3,     1,
       3,     1,     1,     2,     4,     3,     3,     3,     3,     2,
       5,     1,     1,     1,     1,     1,     1,     2,     4,     1,
       0,     1,     1,     1,     1,     1,     1,     1,     2,     1,
       2
};


#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)
#define YYEMPTY         (-2)
#define YYEOF           0

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab


#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                  \
do                                                              \
  if (yychar == YYEMPTY)                                        \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      YYPOPSTACK (yylen);                                       \
      yystate = *yyssp;                                         \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      yyerror (YY_("syntax error: cannot back up")); \
      YYERROR;                                                  \
    }                                                           \
while (0)

/* Error token number */
#define YYTERROR        1
#define YYERRCODE       256


/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
    do                                                                  \
      if (N)                                                            \
        {                                                               \
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).first_line   = (Current).last_line   =              \
            YYRHSLOC (Rhs, 0).last_line;                                \
          (Current).first_column = (Current).last_column =              \
            YYRHSLOC (Rhs, 0).last_column;                              \
        }                                                               \
    while (0)
#endif

#define YYRHSLOC(Rhs, K) ((Rhs)[K])


/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)


/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL

/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */

YY_ATTRIBUTE_UNUSED
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
  unsigned res = 0;
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  if (0 <= yylocp->first_line)
    {
      res += YYFPRINTF (yyo, "%d", yylocp->first_line);
      if (0 <= yylocp->first_column)
        res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
    }
  if (0 <= yylocp->last_line)
    {
      if (yylocp->first_line < yylocp->last_line)
        {
          res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
          if (0 <= end_col)
            res += YYFPRINTF (yyo, ".%d", end_col);
        }
      else if (0 <= end_col && yylocp->first_column < end_col)
        res += YYFPRINTF (yyo, "-%d", end_col);
    }
  return res;
 }

#  define YY_LOCATION_PRINT(File, Loc)          \
  yy_location_print_ (File, &(Loc))

# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif


# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Type, Value, Location); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*----------------------------------------.
| Print this symbol's value on YYOUTPUT.  |
`----------------------------------------*/

static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
  FILE *yyo = yyoutput;
  YYUSE (yyo);
  YYUSE (yylocationp);
  if (!yyvaluep)
    return;
# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
  YYUSE (yytype);
}


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
  YYFPRINTF (yyoutput, "%s %s (",
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);

  YY_LOCATION_PRINT (yyoutput, *yylocationp);
  YYFPRINTF (yyoutput, ": ");
  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
  YYFPRINTF (yyoutput, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
{
  unsigned long int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       yystos[yyssp[yyi + 1 - yynrhs]],
                       &(yyvsp[(yyi + 1) - (yynrhs)])
                       , &(yylsp[(yyi + 1) - (yynrhs)])                       );
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif


#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined __GLIBC__ && defined _STRING_H
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
yystrlen (const char *yystr)
{
  YYSIZE_T yylen;
  for (yylen = 0; yystr[yylen]; yylen++)
    continue;
  return yylen;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
yystpcpy (char *yydest, const char *yysrc)
{
  char *yyd = yydest;
  const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
   quotes and backslashes, so that it's suitable for yyerror.  The
   heuristic is that double-quoting is unnecessary unless the string
   contains an apostrophe, a comma, or backslash (other than
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
   null, do not copy; instead, return the length of what the result
   would have been.  */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYSIZE_T yyn = 0;
      char const *yyp = yystr;

      for (;;)
        switch (*++yyp)
          {
          case '\'':
          case ',':
            goto do_not_strip_quotes;

          case '\\':
            if (*++yyp != '\\')
              goto do_not_strip_quotes;
            /* Fall through.  */
          default:
            if (yyres)
              yyres[yyn] = *yyp;
            yyn++;
            break;

          case '"':
            if (yyres)
              yyres[yyn] = '\0';
            return yyn;
          }
    do_not_strip_quotes: ;
    }

  if (! yyres)
    return yystrlen (yystr);

  return yystpcpy (yyres, yystr) - yyres;
}
# endif

/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
   about the unexpected token YYTOKEN for the state stack whose top is
   YYSSP.

   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
   not large enough to hold the message.  In that case, also set
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
   required number of bytes is too large to store.  */
static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                yytype_int16 *yyssp, int yytoken)
{
  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
  YYSIZE_T yysize = yysize0;
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  /* Internationalized format string. */
  const char *yyformat = YY_NULLPTR;
  /* Arguments of yyformat. */
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  /* Number of reported tokens (one for the "unexpected", one per
     "expected"). */
  int yycount = 0;

  /* There are many possibilities here to consider:
     - If this state is a consistent state with a default action, then
       the only way this function was invoked is if the default action
       is an error action.  In that case, don't check for expected
       tokens because there are none.
     - The only way there can be no lookahead present (in yychar) is if
       this state is a consistent state with a default action.  Thus,
       detecting the absence of a lookahead is sufficient to determine
       that there is no unexpected or expected token to report.  In that
       case, just report a simple "syntax error".
     - Don't assume there isn't a lookahead just because this state is a
       consistent state with a default action.  There might have been a
       previous inconsistent state, consistent state with a non-default
       action, or user semantic action that manipulated yychar.
     - Of course, the expected token list depends on states to have
       correct lookahead information, and it depends on the parser not
       to perform extra reductions after fetching a lookahead from the
       scanner and before detecting a syntax error.  Thus, state merging
       (from LALR or IELR) and default reductions corrupt the expected
       token list.  However, the list is correct for canonical LR with
       one exception: it will still contain any token that will not be
       accepted due to an error action in a later state.
  */
  if (yytoken != YYEMPTY)
    {
      int yyn = yypact[*yyssp];
      yyarg[yycount++] = yytname[yytoken];
      if (!yypact_value_is_default (yyn))
        {
          /* Start YYX at -YYN if negative to avoid negative indexes in
             YYCHECK.  In other words, skip the first -YYN actions for
             this state because they are default actions.  */
          int yyxbegin = yyn < 0 ? -yyn : 0;
          /* Stay within bounds of both yycheck and yytname.  */
          int yychecklim = YYLAST - yyn + 1;
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
          int yyx;

          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
                && !yytable_value_is_error (yytable[yyx + yyn]))
              {
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
                  {
                    yycount = 1;
                    yysize = yysize0;
                    break;
                  }
                yyarg[yycount++] = yytname[yyx];
                {
                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
                  if (! (yysize <= yysize1
                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
                    return 2;
                  yysize = yysize1;
                }
              }
        }
    }

  switch (yycount)
    {
# define YYCASE_(N, S)                      \
      case N:                               \
        yyformat = S;                       \
      break
      YYCASE_(0, YY_("syntax error"));
      YYCASE_(1, YY_("syntax error, unexpected %s"));
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
    }

  {
    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
      return 2;
    yysize = yysize1;
  }

  if (*yymsg_alloc < yysize)
    {
      *yymsg_alloc = 2 * yysize;
      if (! (yysize <= *yymsg_alloc
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
      return 1;
    }

  /* Avoid sprintf, as that infringes on the user's name space.
     Don't have undefined behavior even if the translation
     produced a string with the wrong number of "%s"s.  */
  {
    char *yyp = *yymsg;
    int yyi = 0;
    while ((*yyp = *yyformat) != '\0')
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
        {
          yyp += yytnamerr (yyp, yyarg[yyi++]);
          yyformat += 2;
        }
      else
        {
          yyp++;
          yyformat++;
        }
  }
  return 0;
}
#endif /* YYERROR_VERBOSE */

/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
{
  YYUSE (yyvaluep);
  YYUSE (yylocationp);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YYUSE (yytype);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}




/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Location data for the lookahead symbol.  */
YYLTYPE yylloc
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  = { 1, 1, 1, 1 }
# endif
;
/* Number of syntax errors so far.  */
int yynerrs;


/*----------.
| yyparse.  |
`----------*/

int
yyparse (void)
{
    int yystate;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus;

    /* The stacks and their tools:
       'yyss': related to states.
       'yyvs': related to semantic values.
       'yyls': related to locations.

       Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* The state stack.  */
    yytype_int16 yyssa[YYINITDEPTH];
    yytype_int16 *yyss;
    yytype_int16 *yyssp;

    /* The semantic value stack.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs;
    YYSTYPE *yyvsp;

    /* The location stack.  */
    YYLTYPE yylsa[YYINITDEPTH];
    YYLTYPE *yyls;
    YYLTYPE *yylsp;

    /* The locations where the error started and ended.  */
    YYLTYPE yyerror_range[3];

    YYSIZE_T yystacksize;

  int yyn;
  int yyresult;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
  YYLTYPE yyloc;

#if YYERROR_VERBOSE
  /* Buffer for error messages, and its allocated size.  */
  char yymsgbuf[128];
  char *yymsg = yymsgbuf;
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif

#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  yyssp = yyss = yyssa;
  yyvsp = yyvs = yyvsa;
  yylsp = yyls = yylsa;
  yystacksize = YYINITDEPTH;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY; /* Cause a token to be read.  */
  yylsp[0] = yylloc;
  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
        /* Give user a chance to reallocate the stack.  Use copies of
           these so that the &'s don't force the real ones into
           memory.  */
        YYSTYPE *yyvs1 = yyvs;
        yytype_int16 *yyss1 = yyss;
        YYLTYPE *yyls1 = yyls;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow (YY_("memory exhausted"),
                    &yyss1, yysize * sizeof (*yyssp),
                    &yyvs1, yysize * sizeof (*yyvsp),
                    &yyls1, yysize * sizeof (*yylsp),
                    &yystacksize);

        yyls = yyls1;
        yyss = yyss1;
        yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyexhaustedlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yytype_int16 *yyss1 = yyss;
        union yyalloc *yyptr =
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
        if (! yyptr)
          goto yyexhaustedlab;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
        YYSTACK_RELOCATE (yyls_alloc, yyls);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
      yylsp = yyls + yysize - 1;

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
                  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = yylex ();
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yytable_value_is_error (yyn))
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

  /* Discard the shifted token.  */
  yychar = YYEMPTY;

  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END
  *++yylsp = yylloc;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     '$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];

  /* Default location.  */
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 5:
#line 126 "zparse.y" /* yacc.c:1646  */
    { sflag = TRUE; }
#line 2216 "y.tab.c" /* yacc.c:1646  */
    break;

  case 6:
#line 129 "zparse.y" /* yacc.c:1646  */
    { do_para((yyvsp[0])); }
#line 2222 "y.tab.c" /* yacc.c:1646  */
    break;

  case 9:
#line 134 "zparse.y" /* yacc.c:1646  */
    { end_tok = EAXDEF; }
#line 2228 "y.tab.c" /* yacc.c:1646  */
    break;

  case 10:
#line 135 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,AXDEF,(yyvsp[0])); }
#line 2234 "y.tab.c" /* yacc.c:1646  */
    break;

  case 11:
#line 136 "zparse.y" /* yacc.c:1646  */
    { end_tok = EGENDEF; }
#line 2240 "y.tab.c" /* yacc.c:1646  */
    break;

  case 12:
#line 137 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,DEFINE,(yyvsp[-1]),(yyvsp[0])); }
#line 2246 "y.tab.c" /* yacc.c:1646  */
    break;

  case 13:
#line 138 "zparse.y" /* yacc.c:1646  */
    { end_tok = ESCHEMA; }
#line 2252 "y.tab.c" /* yacc.c:1646  */
    break;

  case 14:
#line 139 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,SDEF,(yyvsp[-1]),(yyvsp[0])); }
#line 2258 "y.tab.c" /* yacc.c:1646  */
    break;

  case 15:
#line 142 "zparse.y" /* yacc.c:1646  */
    { check_end((tok) (yyvsp[0])); }
#line 2264 "y.tab.c" /* yacc.c:1646  */
    break;

  case 18:
#line 149 "zparse.y" /* yacc.c:1646  */
    { end_tok = EZED; }
#line 2270 "y.tab.c" /* yacc.c:1646  */
    break;

  case 19:
#line 150 "zparse.y" /* yacc.c:1646  */
    { end_tok = ESYNTAX; }
#line 2276 "y.tab.c" /* yacc.c:1646  */
    break;

  case 25:
#line 155 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,BODY,(yyvsp[-2]),(yyvsp[0])); }
#line 2282 "y.tab.c" /* yacc.c:1646  */
    break;

  case 26:
#line 156 "zparse.y" /* yacc.c:1646  */
    { check_end((tok) (yyvsp[0])); 
				  (yyval) = node(2,(yylsp[-1]).line,BODY,(yyvsp[-1]),nil); }
#line 2289 "y.tab.c" /* yacc.c:1646  */
    break;

  case 27:
#line 160 "zparse.y" /* yacc.c:1646  */
    { check_end((tok) (yyvsp[0])); (yyval) = (yyvsp[-1]); }
#line 2295 "y.tab.c" /* yacc.c:1646  */
    break;

  case 28:
#line 161 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 2301 "y.tab.c" /* yacc.c:1646  */
    break;

  case 29:
#line 164 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 2307 "y.tab.c" /* yacc.c:1646  */
    break;

  case 30:
#line 165 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 2313 "y.tab.c" /* yacc.c:1646  */
    break;

  case 33:
#line 170 "zparse.y" /* yacc.c:1646  */
    { do_para((yyvsp[0])); }
#line 2319 "y.tab.c" /* yacc.c:1646  */
    break;

  case 34:
#line 171 "zparse.y" /* yacc.c:1646  */
    { sflag = TRUE; }
#line 2325 "y.tab.c" /* yacc.c:1646  */
    break;

  case 35:
#line 174 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,GIVEN,(yyvsp[-1])); }
#line 2331 "y.tab.c" /* yacc.c:1646  */
    break;

  case 36:
#line 175 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,DEFEQ,(yyvsp[-2]),(yyvsp[0])); }
#line 2337 "y.tab.c" /* yacc.c:1646  */
    break;

  case 37:
#line 176 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,EQEQ,(yyvsp[-2]),(yyvsp[0])); }
#line 2343 "y.tab.c" /* yacc.c:1646  */
    break;

  case 38:
#line 178 "zparse.y" /* yacc.c:1646  */
    { yyerror("Schema expression expected after \\defs"); YYERROR; }
#line 2349 "y.tab.c" /* yacc.c:1646  */
    break;

  case 39:
#line 179 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,DATA,(yyvsp[-2]),(yyvsp[0])); }
#line 2355 "y.tab.c" /* yacc.c:1646  */
    break;

  case 40:
#line 180 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[0]).line,PRED,(yyvsp[0])); }
#line 2361 "y.tab.c" /* yacc.c:1646  */
    break;

  case 41:
#line 181 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,VDASH,(yyvsp[-2]),(yyvsp[0])); }
#line 2367 "y.tab.c" /* yacc.c:1646  */
    break;

  case 42:
#line 190 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,LHS,(yyvsp[-1]),(yyvsp[0])); }
#line 2373 "y.tab.c" /* yacc.c:1646  */
    break;

  case 43:
#line 192 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,LHS,(yyvsp[-2]),(yyvsp[0])); }
#line 2379 "y.tab.c" /* yacc.c:1646  */
    break;

  case 44:
#line 194 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,PRELHS,mk_id((yyvsp[-2]),(yyvsp[-1])),list1((yyvsp[0]))); }
#line 2385 "y.tab.c" /* yacc.c:1646  */
    break;

  case 45:
#line 196 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,INLHS,mk_id((yyvsp[-2]),(yyvsp[-1])),list2((yyvsp[-3]),(yyvsp[0]))); }
#line 2391 "y.tab.c" /* yacc.c:1646  */
    break;

  case 46:
#line 200 "zparse.y" /* yacc.c:1646  */
    { sym s = (sym) (yyvsp[-1]);
	  (yyval) = schema_head(s->s_basename, s->s_decor, (yyvsp[0]), (yylsp[-1]).line); }
#line 2398 "y.tab.c" /* yacc.c:1646  */
    break;

  case 47:
#line 203 "zparse.y" /* yacc.c:1646  */
    { (yyval) = schema_head((tok) (yyvsp[-2]), (tok) (yyvsp[-1]), (yyvsp[0]), (yylsp[-2]).line); }
#line 2404 "y.tab.c" /* yacc.c:1646  */
    break;

  case 48:
#line 207 "zparse.y" /* yacc.c:1646  */
    { (yyval) = schema_head((tok) (yyvsp[-2]), empty, (yyvsp[0]), (yylsp[-2]).line); }
#line 2410 "y.tab.c" /* yacc.c:1646  */
    break;

  case 49:
#line 210 "zparse.y" /* yacc.c:1646  */
    { (yyval) = schema_head((tok) (yyvsp[-2]), empty, (yyvsp[-1]), (yylsp[-2]).line); }
#line 2416 "y.tab.c" /* yacc.c:1646  */
    break;

  case 53:
#line 216 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (tree) mk_greek((tok) (yyvsp[-1]), (tok) (yyvsp[0])); }
#line 2422 "y.tab.c" /* yacc.c:1646  */
    break;

  case 54:
#line 217 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (tree) mk_greek((tok) (yyvsp[-1]), (tok) (yyvsp[0])); }
#line 2428 "y.tab.c" /* yacc.c:1646  */
    break;

  case 55:
#line 220 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-1]), PREGEN, 0); }
#line 2434 "y.tab.c" /* yacc.c:1646  */
    break;

  case 56:
#line 221 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-1]), INGEN, 0); }
#line 2440 "y.tab.c" /* yacc.c:1646  */
    break;

  case 57:
#line 222 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-1]), PREREL, 0); }
#line 2446 "y.tab.c" /* yacc.c:1646  */
    break;

  case 58:
#line 223 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-1]), INREL, 0); }
#line 2452 "y.tab.c" /* yacc.c:1646  */
    break;

  case 59:
#line 224 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-2]), INOP, atoi((char *) (yyvsp[-1]))); }
#line 2458 "y.tab.c" /* yacc.c:1646  */
    break;

  case 60:
#line 225 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-1]), POSTOP, 0); }
#line 2464 "y.tab.c" /* yacc.c:1646  */
    break;

  case 61:
#line 228 "zparse.y" /* yacc.c:1646  */
    { do_para(node(1,(yylsp[-2]).line,XABBREV,(yyvsp[-1]))); }
#line 2470 "y.tab.c" /* yacc.c:1646  */
    break;

  case 62:
#line 229 "zparse.y" /* yacc.c:1646  */
    { do_para(node(1,(yylsp[-2]).line,XTAME,(yyvsp[-1]))); }
#line 2476 "y.tab.c" /* yacc.c:1646  */
    break;

  case 63:
#line 230 "zparse.y" /* yacc.c:1646  */
    { ((tok) (yyvsp[-2]))->l_pname = (char *) (yyvsp[-1]); }
#line 2482 "y.tab.c" /* yacc.c:1646  */
    break;

  case 64:
#line 231 "zparse.y" /* yacc.c:1646  */
    { enter((char *) (yyvsp[-2]), atoi((char *) (yyvsp[-1]))); }
#line 2488 "y.tab.c" /* yacc.c:1646  */
    break;

  case 65:
#line 232 "zparse.y" /* yacc.c:1646  */
    { set_value((yyvsp[-1]), IGNORE, 0); }
#line 2494 "y.tab.c" /* yacc.c:1646  */
    break;

  case 66:
#line 234 "zparse.y" /* yacc.c:1646  */
    { char *s;
	  for (s = (char *) (yyvsp[-1]); *s != '\0'; s++)
		  if (islower(*s)) debflag(*s)++;
	  yydebug = debug('y'); }
#line 2503 "y.tab.c" /* yacc.c:1646  */
    break;

  case 67:
#line 239 "zparse.y" /* yacc.c:1646  */
    { line_count = atoi((char *) (yyvsp[-2]));
	  if ((char *) (yyvsp[-1]) != NULL) 
		file_name = (char *) (yyvsp[-1]); }
#line 2511 "y.tab.c" /* yacc.c:1646  */
    break;

  case 69:
#line 245 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 2517 "y.tab.c" /* yacc.c:1646  */
    break;

  case 70:
#line 248 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 2523 "y.tab.c" /* yacc.c:1646  */
    break;

  case 71:
#line 249 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 2529 "y.tab.c" /* yacc.c:1646  */
    break;

  case 72:
#line 253 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2, (yylsp[0]).line, ARM, (yyvsp[0]), node(0, (yylsp[0]).line, NOTHING)); }
#line 2535 "y.tab.c" /* yacc.c:1646  */
    break;

  case 73:
#line 255 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2, (yylsp[-3]).line, ARM, (yyvsp[-3]), node(1, (yylsp[-1]).line, JUST, (yyvsp[-1]))); }
#line 2541 "y.tab.c" /* yacc.c:1646  */
    break;

  case 74:
#line 258 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,BODY,(yyvsp[-1]),(yyvsp[0])); }
#line 2547 "y.tab.c" /* yacc.c:1646  */
    break;

  case 75:
#line 264 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[0]); }
#line 2553 "y.tab.c" /* yacc.c:1646  */
    break;

  case 76:
#line 269 "zparse.y" /* yacc.c:1646  */
    { (yyval) = sref((yyvsp[-5]),(yyvsp[-4]),(yyvsp[-2]),(yyvsp[0]),(yylsp[-5]).line); }
#line 2559 "y.tab.c" /* yacc.c:1646  */
    break;

  case 77:
#line 270 "zparse.y" /* yacc.c:1646  */
    { (yyval) = sref((yyvsp[-2]),(yyvsp[-1]),nil,(yyvsp[0]),(yylsp[-2]).line); }
#line 2565 "y.tab.c" /* yacc.c:1646  */
    break;

  case 78:
#line 273 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 2571 "y.tab.c" /* yacc.c:1646  */
    break;

  case 79:
#line 274 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 2577 "y.tab.c" /* yacc.c:1646  */
    break;

  case 80:
#line 277 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 2583 "y.tab.c" /* yacc.c:1646  */
    break;

  case 81:
#line 278 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 2589 "y.tab.c" /* yacc.c:1646  */
    break;

  case 82:
#line 281 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,RENAME,(yyvsp[-2]),(yyvsp[0])); }
#line 2595 "y.tab.c" /* yacc.c:1646  */
    break;

  case 83:
#line 287 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 2601 "y.tab.c" /* yacc.c:1646  */
    break;

  case 84:
#line 288 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 2607 "y.tab.c" /* yacc.c:1646  */
    break;

  case 85:
#line 291 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,DECL,(yyvsp[-2]),(yyvsp[0])); }
#line 2613 "y.tab.c" /* yacc.c:1646  */
    break;

  case 86:
#line 292 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[0]).line,SDECL,(yyvsp[0])); }
#line 2619 "y.tab.c" /* yacc.c:1646  */
    break;

  case 88:
#line 297 "zparse.y" /* yacc.c:1646  */
    { ((tok) (yyvsp[-1]))->l_value = SNAME; 
				  (yyval) = node(1,(yylsp[-1]).line,SDECL,(yyvsp[0])); }
#line 2626 "y.tab.c" /* yacc.c:1646  */
    break;

  case 89:
#line 303 "zparse.y" /* yacc.c:1646  */
    { (yyval) = sexp_fix((yyvsp[0])); }
#line 2632 "y.tab.c" /* yacc.c:1646  */
    break;

  case 90:
#line 305 "zparse.y" /* yacc.c:1646  */
    { (yyval) = pred_fix((yyvsp[0])); }
#line 2638 "y.tab.c" /* yacc.c:1646  */
    break;

  case 91:
#line 308 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,FORALL,(yyvsp[-2]),(yyvsp[0])); }
#line 2644 "y.tab.c" /* yacc.c:1646  */
    break;

  case 92:
#line 309 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,EXISTS,(yyvsp[-2]),(yyvsp[0])); }
#line 2650 "y.tab.c" /* yacc.c:1646  */
    break;

  case 93:
#line 310 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,EXISTS1,(yyvsp[-2]),(yyvsp[0])); }
#line 2656 "y.tab.c" /* yacc.c:1646  */
    break;

  case 94:
#line 311 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,LETPRED,(yyvsp[-2]),(yyvsp[0])); }
#line 2662 "y.tab.c" /* yacc.c:1646  */
    break;

  case 97:
#line 316 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,PREREL,mk_id((yyvsp[-2]),(yyvsp[-1])),(yyvsp[0])); }
#line 2668 "y.tab.c" /* yacc.c:1646  */
    break;

  case 98:
#line 317 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[0]); }
#line 2674 "y.tab.c" /* yacc.c:1646  */
    break;

  case 99:
#line 318 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,TEXT,(yyvsp[-1])); }
#line 2680 "y.tab.c" /* yacc.c:1646  */
    break;

  case 100:
#line 319 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(0,(yylsp[0]).line,TRUTH); }
#line 2686 "y.tab.c" /* yacc.c:1646  */
    break;

  case 101:
#line 320 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(0,(yylsp[0]).line,FALSITY); }
#line 2692 "y.tab.c" /* yacc.c:1646  */
    break;

  case 102:
#line 321 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-1]).line,NOT,(yyvsp[0])); }
#line 2698 "y.tab.c" /* yacc.c:1646  */
    break;

  case 103:
#line 322 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-1]).line,PRE,(yyvsp[0])); }
#line 2704 "y.tab.c" /* yacc.c:1646  */
    break;

  case 104:
#line 323 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,AND,(yyvsp[-2]),(yyvsp[0])); }
#line 2710 "y.tab.c" /* yacc.c:1646  */
    break;

  case 105:
#line 324 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,OR,(yyvsp[-2]),(yyvsp[0])); }
#line 2716 "y.tab.c" /* yacc.c:1646  */
    break;

  case 106:
#line 325 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,IMPLIES,(yyvsp[-2]),(yyvsp[0])); }
#line 2722 "y.tab.c" /* yacc.c:1646  */
    break;

  case 107:
#line 326 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,EQUIV,(yyvsp[-2]),(yyvsp[0])); }
#line 2728 "y.tab.c" /* yacc.c:1646  */
    break;

  case 108:
#line 327 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,PROJECT,(yyvsp[-2]),(yyvsp[0])); }
#line 2734 "y.tab.c" /* yacc.c:1646  */
    break;

  case 109:
#line 328 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,HIDE,(yyvsp[-4]),(yyvsp[-1])); }
#line 2740 "y.tab.c" /* yacc.c:1646  */
    break;

  case 110:
#line 329 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,FATSEMI,(yyvsp[-2]),(yyvsp[0])); }
#line 2746 "y.tab.c" /* yacc.c:1646  */
    break;

  case 111:
#line 330 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,PIPE,(yyvsp[-2]),(yyvsp[0])); }
#line 2752 "y.tab.c" /* yacc.c:1646  */
    break;

  case 112:
#line 331 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 2758 "y.tab.c" /* yacc.c:1646  */
    break;

  case 113:
#line 332 "zparse.y" /* yacc.c:1646  */
    { yyerror("Closing parenthesis expected");
			  	  YYERROR; }
#line 2765 "y.tab.c" /* yacc.c:1646  */
    break;

  case 114:
#line 334 "zparse.y" /* yacc.c:1646  */
    { yyerror("Opening parenthesis expected");
				  YYERROR; }
#line 2772 "y.tab.c" /* yacc.c:1646  */
    break;

  case 118:
#line 340 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[0]); }
#line 2778 "y.tab.c" /* yacc.c:1646  */
    break;

  case 119:
#line 341 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[0]).line,AND,(yyvsp[-1]),(yyvsp[0])); }
#line 2784 "y.tab.c" /* yacc.c:1646  */
    break;

  case 120:
#line 345 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,EQUAL,(yyvsp[-3]),(yyvsp[-1])); }
#line 2790 "y.tab.c" /* yacc.c:1646  */
    break;

  case 121:
#line 347 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,MEMBER,(yyvsp[-3]),(yyvsp[-1])); }
#line 2796 "y.tab.c" /* yacc.c:1646  */
    break;

  case 122:
#line 349 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(3,(yylsp[-2]).line,INREL,(yyvsp[-2]),(yyvsp[-3]),(yyvsp[-1])); }
#line 2802 "y.tab.c" /* yacc.c:1646  */
    break;

  case 123:
#line 359 "zparse.y" /* yacc.c:1646  */
    { finger = (yyvsp[0]); }
#line 2808 "y.tab.c" /* yacc.c:1646  */
    break;

  case 124:
#line 361 "zparse.y" /* yacc.c:1646  */
    { (yyval) = finger; }
#line 2814 "y.tab.c" /* yacc.c:1646  */
    break;

  case 127:
#line 375 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,LAMBDA,(yyvsp[-2]),(yyvsp[0])); }
#line 2820 "y.tab.c" /* yacc.c:1646  */
    break;

  case 128:
#line 376 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,MU,(yyvsp[-1]),(yyvsp[0])); }
#line 2826 "y.tab.c" /* yacc.c:1646  */
    break;

  case 129:
#line 377 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,LETEXPR,(yyvsp[-2]),(yyvsp[0])); }
#line 2832 "y.tab.c" /* yacc.c:1646  */
    break;

  case 130:
#line 380 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 2838 "y.tab.c" /* yacc.c:1646  */
    break;

  case 131:
#line 381 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]), (yyvsp[0])); }
#line 2844 "y.tab.c" /* yacc.c:1646  */
    break;

  case 132:
#line 384 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,LETDEF,(yyvsp[-2]),(yyvsp[0])); }
#line 2850 "y.tab.c" /* yacc.c:1646  */
    break;

  case 133:
#line 387 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(3,(yylsp[-5]).line,IF,(yyvsp[-4]),(yyvsp[-2]),(yyvsp[0])); }
#line 2856 "y.tab.c" /* yacc.c:1646  */
    break;

  case 135:
#line 391 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(3,(yylsp[-2]).line,INGEN,mk_id((yyvsp[-2]),(yyvsp[-1])),(yyvsp[-3]),(yyvsp[0])); }
#line 2862 "y.tab.c" /* yacc.c:1646  */
    break;

  case 136:
#line 392 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[0]).line,CROSS,(yyvsp[0])); }
#line 2868 "y.tab.c" /* yacc.c:1646  */
    break;

  case 138:
#line 394 "zparse.y" /* yacc.c:1646  */
    { yyerror("Opening parenthesis expected");
			  	  YYERROR; }
#line 2875 "y.tab.c" /* yacc.c:1646  */
    break;

  case 142:
#line 410 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(3,(yylsp[-2]).line,INGEN,mk_id((yyvsp[-2]),(yyvsp[-1])),simply((yyvsp[-3]),(yylsp[-3]).line),(yyvsp[0])); }
#line 2881 "y.tab.c" /* yacc.c:1646  */
    break;

  case 143:
#line 413 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list2((yyvsp[-2]),(yyvsp[0])); }
#line 2887 "y.tab.c" /* yacc.c:1646  */
    break;

  case 144:
#line 414 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 2893 "y.tab.c" /* yacc.c:1646  */
    break;

  case 145:
#line 417 "zparse.y" /* yacc.c:1646  */
    { (yyval) = reduce_ops((yyvsp[0])); }
#line 2899 "y.tab.c" /* yacc.c:1646  */
    break;

  case 146:
#line 420 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list2((yyvsp[0]), (tree) infop); }
#line 2905 "y.tab.c" /* yacc.c:1646  */
    break;

  case 147:
#line 422 "zparse.y" /* yacc.c:1646  */
    { (yyval) = cons((yyvsp[-3]),cons(mk_id((yyvsp[-2]),(yyvsp[-1])),(yyvsp[0]))); }
#line 2911 "y.tab.c" /* yacc.c:1646  */
    break;

  case 150:
#line 427 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-1]).line,POWER,(yyvsp[0])); }
#line 2917 "y.tab.c" /* yacc.c:1646  */
    break;

  case 151:
#line 429 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-2]).line,PREGEN,mk_id((yyvsp[-2]),(yyvsp[-1])),(yyvsp[0])); }
#line 2923 "y.tab.c" /* yacc.c:1646  */
    break;

  case 152:
#line 431 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2, (yylsp[-2]).line, APPLY, simply(mk_id(uminus, (yyvsp[-1])), (yylsp[-2]).line), (yyvsp[0])); }
#line 2929 "y.tab.c" /* yacc.c:1646  */
    break;

  case 153:
#line 433 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(3, (yylsp[-3]).line, INOP, mk_id(image, (yyvsp[0])), (yyvsp[-4]), (yyvsp[-2])); }
#line 2935 "y.tab.c" /* yacc.c:1646  */
    break;

  case 155:
#line 437 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[0]).line,APPLY,(yyvsp[-1]),(yyvsp[0])); }
#line 2941 "y.tab.c" /* yacc.c:1646  */
    break;

  case 157:
#line 442 "zparse.y" /* yacc.c:1646  */
    { (yyval) = ref((yyvsp[-1]),(yyvsp[0]),(yylsp[-1]).line); }
#line 2947 "y.tab.c" /* yacc.c:1646  */
    break;

  case 158:
#line 443 "zparse.y" /* yacc.c:1646  */
    { (yyval) = ref((yyvsp[-2]),(yyvsp[0]),(yylsp[-2]).line); }
#line 2953 "y.tab.c" /* yacc.c:1646  */
    break;

  case 159:
#line 444 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[0]).line,NUMBER,(yyvsp[0])); }
#line 2959 "y.tab.c" /* yacc.c:1646  */
    break;

  case 160:
#line 445 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[0]); }
#line 2965 "y.tab.c" /* yacc.c:1646  */
    break;

  case 162:
#line 447 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,BINDING,(yyvsp[-1])); }
#line 2971 "y.tab.c" /* yacc.c:1646  */
    break;

  case 163:
#line 448 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-4]).line,TUPLE,cons((yyvsp[-3]),(yyvsp[-1]))); }
#line 2977 "y.tab.c" /* yacc.c:1646  */
    break;

  case 164:
#line 449 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,SEQ,(yyvsp[-1])); }
#line 2983 "y.tab.c" /* yacc.c:1646  */
    break;

  case 165:
#line 450 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,BAG,(yyvsp[-1])); }
#line 2989 "y.tab.c" /* yacc.c:1646  */
    break;

  case 167:
#line 452 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,SELECT,(yyvsp[-2]),(yyvsp[0])); }
#line 2995 "y.tab.c" /* yacc.c:1646  */
    break;

  case 168:
#line 454 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,POSTOP,mk_id((yyvsp[-1]),(yyvsp[0])),(yyvsp[-2])); }
#line 3001 "y.tab.c" /* yacc.c:1646  */
    break;

  case 169:
#line 456 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2, (yylsp[-2]).line, APPLY, node(2, (yylsp[-2]).line, APPLY,
  	 		simply((tree) iter, (yylsp[-2]).line), (yyvsp[-1])), (yyvsp[-3])); }
#line 3008 "y.tab.c" /* yacc.c:1646  */
    break;

  case 170:
#line 459 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,APPLY,node(2,(yylsp[-3]).line,APPLY,
  	 		simply((tree) iter, (yylsp[-3]).line), (yyvsp[-1])), (yyvsp[-4])); }
#line 3015 "y.tab.c" /* yacc.c:1646  */
    break;

  case 171:
#line 462 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3021 "y.tab.c" /* yacc.c:1646  */
    break;

  case 172:
#line 463 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3027 "y.tab.c" /* yacc.c:1646  */
    break;

  case 175:
#line 468 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 3033 "y.tab.c" /* yacc.c:1646  */
    break;

  case 176:
#line 469 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 3039 "y.tab.c" /* yacc.c:1646  */
    break;

  case 177:
#line 472 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-1]).line,BIND,(yyvsp[-2]),(yyvsp[0])); }
#line 3045 "y.tab.c" /* yacc.c:1646  */
    break;

  case 178:
#line 475 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(3,(yylsp[-3]).line,THETA,(yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); }
#line 3051 "y.tab.c" /* yacc.c:1646  */
    break;

  case 179:
#line 486 "zparse.y" /* yacc.c:1646  */
    { yyerror("Closing parenthesis expected"); YYERROR; }
#line 3057 "y.tab.c" /* yacc.c:1646  */
    break;

  case 180:
#line 488 "zparse.y" /* yacc.c:1646  */
    { yyerror("Closing parenthesis expected"); YYERROR; }
#line 3063 "y.tab.c" /* yacc.c:1646  */
    break;

  case 181:
#line 510 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[-2]).line,EXT,(yyvsp[-1])); }
#line 3069 "y.tab.c" /* yacc.c:1646  */
    break;

  case 182:
#line 511 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,COMP,(yyvsp[-2]),(yyvsp[-1])); }
#line 3075 "y.tab.c" /* yacc.c:1646  */
    break;

  case 183:
#line 513 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1, (yylsp[-3]).line, EXT, join(promote((yyvsp[-2]), (yylsp[-2]).line), (yyvsp[-1]))); }
#line 3081 "y.tab.c" /* yacc.c:1646  */
    break;

  case 184:
#line 515 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2, (yylsp[-5]).line, COMP, 
		    node(2, (yylsp[-4]).line, BODY, cons((yyvsp[-4]), (yyvsp[-3])), (yyvsp[-2])), (yyvsp[-1])); }
#line 3088 "y.tab.c" /* yacc.c:1646  */
    break;

  case 185:
#line 518 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2, (yylsp[-2]).line, COMP,
		    node(2, (yylsp[-1]).line, BODY,
			 list1(node(1, (yylsp[-1]).line, SDECL, (yyvsp[-1]))),
			 nil),
		    node(0, (yylsp[0]).line, NOTHING)); }
#line 3098 "y.tab.c" /* yacc.c:1646  */
    break;

  case 186:
#line 526 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-3]).line,DECL,join((yyvsp[-3]),(yyvsp[-2])),(yyvsp[0])); }
#line 3104 "y.tab.c" /* yacc.c:1646  */
    break;

  case 187:
#line 529 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[-1])); }
#line 3110 "y.tab.c" /* yacc.c:1646  */
    break;

  case 188:
#line 530 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[-1])); }
#line 3116 "y.tab.c" /* yacc.c:1646  */
    break;

  case 189:
#line 533 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[0]); }
#line 3122 "y.tab.c" /* yacc.c:1646  */
    break;

  case 190:
#line 534 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 3128 "y.tab.c" /* yacc.c:1646  */
    break;

  case 191:
#line 548 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3134 "y.tab.c" /* yacc.c:1646  */
    break;

  case 192:
#line 550 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(2,(yylsp[-4]).line,LETEXPR,(yyvsp[-3]),(yyvsp[-1])); }
#line 3140 "y.tab.c" /* yacc.c:1646  */
    break;

  case 193:
#line 551 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1,(yylsp[0]).line,SEXPR,(yyvsp[0])); }
#line 3146 "y.tab.c" /* yacc.c:1646  */
    break;

  case 194:
#line 567 "zparse.y" /* yacc.c:1646  */
    { (yyval) = promote(snoc((yyvsp[-2]), (yyvsp[-1])), (yylsp[-2]).line); }
#line 3152 "y.tab.c" /* yacc.c:1646  */
    break;

  case 195:
#line 568 "zparse.y" /* yacc.c:1646  */
    { (yyval) = join(promote((yyvsp[-2]), (yylsp[-2]).line), (yyvsp[-1])); }
#line 3158 "y.tab.c" /* yacc.c:1646  */
    break;

  case 196:
#line 569 "zparse.y" /* yacc.c:1646  */
    { (yyval) = promote(list1((yyvsp[-1])), (yylsp[-1]).line); }
#line 3164 "y.tab.c" /* yacc.c:1646  */
    break;

  case 197:
#line 570 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3170 "y.tab.c" /* yacc.c:1646  */
    break;

  case 198:
#line 571 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 3176 "y.tab.c" /* yacc.c:1646  */
    break;

  case 200:
#line 575 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 3182 "y.tab.c" /* yacc.c:1646  */
    break;

  case 201:
#line 578 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[-1])); }
#line 3188 "y.tab.c" /* yacc.c:1646  */
    break;

  case 202:
#line 579 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[-1])); }
#line 3194 "y.tab.c" /* yacc.c:1646  */
    break;

  case 203:
#line 582 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[-1])); }
#line 3200 "y.tab.c" /* yacc.c:1646  */
    break;

  case 204:
#line 583 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[-1])); }
#line 3206 "y.tab.c" /* yacc.c:1646  */
    break;

  case 205:
#line 589 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 3212 "y.tab.c" /* yacc.c:1646  */
    break;

  case 206:
#line 590 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 3218 "y.tab.c" /* yacc.c:1646  */
    break;

  case 207:
#line 593 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[0]); }
#line 3224 "y.tab.c" /* yacc.c:1646  */
    break;

  case 208:
#line 594 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 3230 "y.tab.c" /* yacc.c:1646  */
    break;

  case 209:
#line 597 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 3236 "y.tab.c" /* yacc.c:1646  */
    break;

  case 210:
#line 598 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 3242 "y.tab.c" /* yacc.c:1646  */
    break;

  case 211:
#line 601 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 3248 "y.tab.c" /* yacc.c:1646  */
    break;

  case 212:
#line 602 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 3254 "y.tab.c" /* yacc.c:1646  */
    break;

  case 214:
#line 606 "zparse.y" /* yacc.c:1646  */
    { (yyval) = nil; }
#line 3260 "y.tab.c" /* yacc.c:1646  */
    break;

  case 215:
#line 609 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(1, (yylsp[0]).line, JUST, (yyvsp[0])); }
#line 3266 "y.tab.c" /* yacc.c:1646  */
    break;

  case 216:
#line 610 "zparse.y" /* yacc.c:1646  */
    { (yyval) = node(0, 0, NOTHING); }
#line 3272 "y.tab.c" /* yacc.c:1646  */
    break;

  case 217:
#line 613 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 3278 "y.tab.c" /* yacc.c:1646  */
    break;

  case 218:
#line 614 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-2]),(yyvsp[0])); }
#line 3284 "y.tab.c" /* yacc.c:1646  */
    break;

  case 220:
#line 621 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3290 "y.tab.c" /* yacc.c:1646  */
    break;

  case 223:
#line 628 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id((yyvsp[-1]),(yyvsp[0])); }
#line 3296 "y.tab.c" /* yacc.c:1646  */
    break;

  case 224:
#line 631 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id((yyvsp[-2]),(yyvsp[-1])); }
#line 3302 "y.tab.c" /* yacc.c:1646  */
    break;

  case 225:
#line 632 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3308 "y.tab.c" /* yacc.c:1646  */
    break;

  case 226:
#line 634 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id((yyvsp[-2]),(yyvsp[-1])); }
#line 3314 "y.tab.c" /* yacc.c:1646  */
    break;

  case 227:
#line 635 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id((yyvsp[-2]),(yyvsp[-1])); }
#line 3320 "y.tab.c" /* yacc.c:1646  */
    break;

  case 228:
#line 636 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id((yyvsp[-1]),(yyvsp[0])); }
#line 3326 "y.tab.c" /* yacc.c:1646  */
    break;

  case 229:
#line 637 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id(uminus,(yyvsp[0])); }
#line 3332 "y.tab.c" /* yacc.c:1646  */
    break;

  case 230:
#line 638 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id(image,(yyvsp[0])); }
#line 3338 "y.tab.c" /* yacc.c:1646  */
    break;

  case 237:
#line 645 "zparse.y" /* yacc.c:1646  */
    { (yyval) = mk_id((yyvsp[-1]),(yyvsp[0])); }
#line 3344 "y.tab.c" /* yacc.c:1646  */
    break;

  case 238:
#line 646 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (yyvsp[-1]); }
#line 3350 "y.tab.c" /* yacc.c:1646  */
    break;

  case 240:
#line 650 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (tree) empty; }
#line 3356 "y.tab.c" /* yacc.c:1646  */
    break;

  case 248:
#line 655 "zparse.y" /* yacc.c:1646  */
    { (yyval) = (tree) image; }
#line 3362 "y.tab.c" /* yacc.c:1646  */
    break;

  case 249:
#line 658 "zparse.y" /* yacc.c:1646  */
    { (yyval) = list1((yyvsp[0])); }
#line 3368 "y.tab.c" /* yacc.c:1646  */
    break;

  case 250:
#line 659 "zparse.y" /* yacc.c:1646  */
    { (yyval) = snoc((yyvsp[-1]),(yyvsp[0])); }
#line 3374 "y.tab.c" /* yacc.c:1646  */
    break;


#line 3378 "y.tab.c" /* yacc.c:1646  */
      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;
  *++yylsp = yyloc;

  /* Now 'shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);

  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if ! YYERROR_VERBOSE
      yyerror (YY_("syntax error"));
#else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
                                        yyssp, yytoken)
      {
        char const *yymsgp = YY_("syntax error");
        int yysyntax_error_status;
        yysyntax_error_status = YYSYNTAX_ERROR;
        if (yysyntax_error_status == 0)
          yymsgp = yymsg;
        else if (yysyntax_error_status == 1)
          {
            if (yymsg != yymsgbuf)
              YYSTACK_FREE (yymsg);
            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
            if (!yymsg)
              {
                yymsg = yymsgbuf;
                yymsg_alloc = sizeof yymsgbuf;
                yysyntax_error_status = 2;
              }
            else
              {
                yysyntax_error_status = YYSYNTAX_ERROR;
                yymsgp = yymsg;
              }
          }
        yyerror (yymsgp);
        if (yysyntax_error_status == 2)
          goto yyexhaustedlab;
      }
# undef YYSYNTAX_ERROR
#endif
    }

  yyerror_range[1] = yylloc;

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == YYEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval, &yylloc);
          yychar = YYEMPTY;
        }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
     goto yyerrorlab;

  yyerror_range[1] = yylsp[1-yylen];
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYTERROR;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;

      yyerror_range[1] = *yylsp;
      yydestruct ("Error: popping",
                  yystos[yystate], yyvsp, yylsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  yyerror_range[2] = yylloc;
  /* Using YYLLOC is tempting, but would change the location of
     the lookahead.  YYLOC is available though.  */
  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
  *++yylsp = yyloc;

  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here.  |
`-------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval, &yylloc);
    }
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
                  yystos[*yyssp], yyvsp, yylsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
  if (yymsg != yymsgbuf)
    YYSTACK_FREE (yymsg);
#endif
  return yyresult;
}
#line 661 "zparse.y" /* yacc.c:1906  */


/* schema_head -- check and construct a schema heading */
PRIVATE tree schema_head(tok name, tok decor, tree formals, int loc)
{
     if (decor != empty)
	  yyerror("Decoration ignored in schema def");
     name->l_value = SNAME;
     return node(2, loc, SHEAD, (tree) name, formals);
}

/* join -- destructively concatenate two lists */
PUBLIC tree join(tree a, tree b)
{
     tree p = a;

     if (a == nil)
	  return b;
     else {
	  while (cdr(p) != nil)
	       p = cdr(p);
	  cdr(p) = b;
	  return a;
     }
}

/* promote -- destructively convert a list of identifiers into references */
PRIVATE tree promote(tree a, int loc)
{
     tree b;

     for (b = a; b != nil; b = cdr(b))
	  car(b) = simply(car(b), loc);
     return a;
}

PRIVATE struct { short old, new; } fix_table[] = {
     {FORALL, SFORALL}, {EXISTS, SEXISTS}, {EXISTS1, SEXISTS1}, 
     {NOT, SNOT}, {AND, SAND}, {OR, SOR}, {IMPLIES, SIMPLIES},
     {EQUIV, SEQUIV}, {0, 0}
} ;

/* schemafy -- schema version of logical operator */
PRIVATE int schemafy(int op)
{
     int i;

     for (i = 0; fix_table[i].old != 0; i++)
	  if (fix_table[i].old == op)
	       return fix_table[i].new;

     return op;
}

/* sexp_fix -- convert logical expression into schema expression */
PRIVATE tree sexp_fix(tree a)
{
     switch (a->x_kind) {
     case FORALL: case EXISTS: case EXISTS1:
	  a->x_kind = schemafy(a->x_kind);
	  a->x_body = sexp_fix(a->x_body);
	  return a;

     case TEXT:
	  return a;

     case SEXPR:
	  return a->x_arg;

     case NOT: case PRE:
	  a->x_kind = schemafy(a->x_kind);
	  a->x_arg = sexp_fix(a->x_arg);
	  return a;

     case AND: case OR: case IMPLIES: case EQUIV:
     case PROJECT: case FATSEMI: case PIPE:
	  a->x_kind = schemafy(a->x_kind);
	  a->x_arg1 = sexp_fix(a->x_arg1);
	  a->x_arg2 = sexp_fix(a->x_arg2);
	  return a;

     case HIDE:
	  a->x_arg1 = sexp_fix(a->x_arg1);
	  return a;

     default:
	  tc_error(a->x_loc, "Syntax error in schema expression (%d)",
		   a->x_kind);
	  tc_e_end();
	  sflag = TRUE;
	  return nil;
     }
}

/* pred_fix -- convert logical expression to predicate */
PRIVATE tree pred_fix(tree a)
{
     switch (a->x_kind) {
     case FORALL: case EXISTS: case EXISTS1:
	  a->x_body = pred_fix(a->x_body);
	  return a;

     case LETPRED: case LETEXPR:
	  /* LETEXPR is created by bra.sref */
	  a->x_kind = LETPRED;
	  a->x_body = pred_fix(a->x_body);
	  return a;

     case EQUAL: case MEMBER: case INREL: case PREREL:
     case TRUTH: case FALSITY:
	  return a;

     case SEXPR:
	  a->x_kind = SPRED;
	  return a;

     case PRE:
	  if (a->x_arg->x_kind == SEXPR)
	       a->x_arg = a->x_arg->x_arg;

	  if (a->x_arg->x_kind != SREF) {
	       tc_error(a->x_loc, 
			"argument of pre must be a schema reference");
	       tc_e_end();
	       sflag = TRUE;
	       return nil;
	  }
	  return node(1,a->x_loc,SPRED,a);

     case NOT:
	  a->x_arg = pred_fix(a->x_arg);
	  return a;

     case AND: case OR: case IMPLIES: case EQUIV:
	  a->x_arg1 = pred_fix(a->x_arg1);
	  a->x_arg2 = pred_fix(a->x_arg2);
	  return a;

     default:
	  tc_error(a->x_loc, "Syntax error in predicate (%d)",
		   a->x_kind);
	  tc_e_end();
	  sflag = TRUE;
	  return nil;
     }
}

/* set_value -- set token values of a list of symbols */
PRIVATE void set_value(tree syms, int val, int prio)
{
     tree t;

     for (t = syms; t != nil; t = cdr(t)) {
	  tok x = (tok) car(t);
	  if (x->l_value != '-') x->l_value = val;
	  x->l_prio = prio;
     }
}

/* check_end -- check that \begin{foo} and \end{foo} match */
PRIVATE void check_end(tok found)
{
     if (found->l_value != end_tok)
	  yyerror("\\end does not match \\begin");
}

/* name_of_tag -- translate tree tag to string */
PUBLIC char *name_of_tag(int x)
{
	return (char *) yytname[YYTRANSLATE(x)];
}


#define get_prio(s) s->s_basename->l_prio

/* reduce_ops -- reduce a list of infix operators and operands */
PRIVATE tree reduce_ops(tree t)
{
     tree rand[MAX_ARGS];
     sym rator[MAX_ARGS];
     int n = 0;

     for (; t != nil; t = cddr(t)) {
	  tree u = car(t);
	  sym w = (sym) cadr(t);
	  while (n > 0 && get_prio(rator[n-1]) >= get_prio(w)) {
	       n--; 
	       u = node(3, rand[n]->x_loc, INOP, rator[n], rand[n], u);
	  }
	  rand[n] = u;
	  rator[n++] = w;
	  if (debug('o')) {
	       int i;
	       grind(stdout, "Redop:");
	       for (i = 0; i < n; i++)
		    grind(stdout, " <%z> %n(%d)", 
			  rand[i], rator[i], get_prio(rator[i]));
	       grind(stdout, "\n");
	  }
     }

     if (n != 1) panic("reduce_ops");
     return rand[0];
}
