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

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 <https://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.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

/* 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, and Bison version.  */
#define YYBISON 30802

/* Bison version string.  */
#define YYBISON_VERSION "3.8.2"

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

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1




/* First part of user prologue.  */
#line 22 "grammar.y"

#include "dstruct.h"
#include "syntax.h"
#include "lexicon.h"
#include "pragmatics.h"
#include "systemlog.h"
#include "stomp.h"
#include "show.h"

/* strings for error reporting */
char precede[]	 = "precede";
char follow[]	 = "follow";
char act_str[]	 = "action";
char bexp_str[]	 = "logical expression";
char aexp_str[]	 = "arithmetic expression";
char pexp_str[]	 = "arithmetic or string expression";
char quant_str[] = "quantifier";
char aggr_str[]  = "aggregation operator";
char pcnt_str[]  = "percentage quantifier";
char host_str[]  = "host name";
char inst_str[]  = "instance name";
char sample_str[]  = "sample number(s)";
char tstr_str[]	 = "(time interval optional) and string";
char num_str[]	 = "number";

/* report grammatical error */
static void
gramerr(char *phrase, char *pos, char *op)
{
    fprintf(stderr, "%s expected to %s %s\n", phrase, pos, op);
    lexSync();
}



#line 107 "grammar.tab.c"

# ifndef YY_CAST
#  ifdef __cplusplus
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
#  else
#   define YY_CAST(Type, Val) ((Type) (Val))
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
#  endif
# endif
# ifndef YY_NULLPTR
#  if defined __cplusplus
#   if 201103L <= __cplusplus
#    define YY_NULLPTR nullptr
#   else
#    define YY_NULLPTR 0
#   endif
#  else
#   define YY_NULLPTR ((void*)0)
#  endif
# endif

#include "grammar.tab.h"
/* Symbol kind.  */
enum yysymbol_kind_t
{
  YYSYMBOL_YYEMPTY = -2,
  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
  YYSYMBOL_YYerror = 1,                    /* error  */
  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
  YYSYMBOL_ARROW = 3,                      /* ARROW  */
  YYSYMBOL_SHELL = 4,                      /* SHELL  */
  YYSYMBOL_ALARM = 5,                      /* ALARM  */
  YYSYMBOL_SYSLOG = 6,                     /* SYSLOG  */
  YYSYMBOL_PRINT = 7,                      /* PRINT  */
  YYSYMBOL_STOMP = 8,                      /* STOMP  */
  YYSYMBOL_SOME_QUANT = 9,                 /* SOME_QUANT  */
  YYSYMBOL_ALL_QUANT = 10,                 /* ALL_QUANT  */
  YYSYMBOL_PCNT_QUANT = 11,                /* PCNT_QUANT  */
  YYSYMBOL_LEQ_REL = 12,                   /* LEQ_REL  */
  YYSYMBOL_GEQ_REL = 13,                   /* GEQ_REL  */
  YYSYMBOL_NEQ_REL = 14,                   /* NEQ_REL  */
  YYSYMBOL_EQ_REL = 15,                    /* EQ_REL  */
  YYSYMBOL_AND = 16,                       /* AND  */
  YYSYMBOL_SEQ = 17,                       /* SEQ  */
  YYSYMBOL_OR = 18,                        /* OR  */
  YYSYMBOL_ALT = 19,                       /* ALT  */
  YYSYMBOL_NOT = 20,                       /* NOT  */
  YYSYMBOL_RISE = 21,                      /* RISE  */
  YYSYMBOL_FALL = 22,                      /* FALL  */
  YYSYMBOL_MATCH = 23,                     /* MATCH  */
  YYSYMBOL_NOMATCH = 24,                   /* NOMATCH  */
  YYSYMBOL_RULESET = 25,                   /* RULESET  */
  YYSYMBOL_ELSE = 26,                      /* ELSE  */
  YYSYMBOL_UNKNOWN = 27,                   /* UNKNOWN  */
  YYSYMBOL_OTHERWISE = 28,                 /* OTHERWISE  */
  YYSYMBOL_MIN_AGGR = 29,                  /* MIN_AGGR  */
  YYSYMBOL_MAX_AGGR = 30,                  /* MAX_AGGR  */
  YYSYMBOL_AVG_AGGR = 31,                  /* AVG_AGGR  */
  YYSYMBOL_SUM_AGGR = 32,                  /* SUM_AGGR  */
  YYSYMBOL_COUNT_AGGR = 33,                /* COUNT_AGGR  */
  YYSYMBOL_TIME_DOM = 34,                  /* TIME_DOM  */
  YYSYMBOL_INST_DOM = 35,                  /* INST_DOM  */
  YYSYMBOL_HOST_DOM = 36,                  /* HOST_DOM  */
  YYSYMBOL_UNIT_SLASH = 37,                /* UNIT_SLASH  */
  YYSYMBOL_INTERVAL = 38,                  /* INTERVAL  */
  YYSYMBOL_EVENT_UNIT = 39,                /* EVENT_UNIT  */
  YYSYMBOL_TIME_UNIT = 40,                 /* TIME_UNIT  */
  YYSYMBOL_SPACE_UNIT = 41,                /* SPACE_UNIT  */
  YYSYMBOL_NUMBER = 42,                    /* NUMBER  */
  YYSYMBOL_IDENT = 43,                     /* IDENT  */
  YYSYMBOL_STRING = 44,                    /* STRING  */
  YYSYMBOL_TRU = 45,                       /* TRU  */
  YYSYMBOL_FALS = 46,                      /* FALS  */
  YYSYMBOL_VAR = 47,                       /* VAR  */
  YYSYMBOL_48_ = 48,                       /* '>'  */
  YYSYMBOL_49_ = 49,                       /* '<'  */
  YYSYMBOL_50_ = 50,                       /* '+'  */
  YYSYMBOL_51_ = 51,                       /* '-'  */
  YYSYMBOL_52_ = 52,                       /* '*'  */
  YYSYMBOL_53_ = 53,                       /* '/'  */
  YYSYMBOL_UMINUS = 54,                    /* UMINUS  */
  YYSYMBOL_RATE = 55,                      /* RATE  */
  YYSYMBOL_INSTANT = 56,                   /* INSTANT  */
  YYSYMBOL_57_ = 57,                       /* ':'  */
  YYSYMBOL_58_ = 58,                       /* '#'  */
  YYSYMBOL_59_ = 59,                       /* '@'  */
  YYSYMBOL_60_ = 60,                       /* '='  */
  YYSYMBOL_61_ = 61,                       /* '('  */
  YYSYMBOL_62_ = 62,                       /* ')'  */
  YYSYMBOL_63_ = 63,                       /* '^'  */
  YYSYMBOL_YYACCEPT = 64,                  /* $accept  */
  YYSYMBOL_stmnt = 65,                     /* stmnt  */
  YYSYMBOL_exp = 66,                       /* exp  */
  YYSYMBOL_rule = 67,                      /* rule  */
  YYSYMBOL_ruleset = 68,                   /* ruleset  */
  YYSYMBOL_rulelist = 69,                  /* rulelist  */
  YYSYMBOL_rulesetopt = 70,                /* rulesetopt  */
  YYSYMBOL_act = 71,                       /* act  */
  YYSYMBOL_actarg = 72,                    /* actarg  */
  YYSYMBOL_arglist = 73,                   /* arglist  */
  YYSYMBOL_bexp = 74,                      /* bexp  */
  YYSYMBOL_quant = 75,                     /* quant  */
  YYSYMBOL_rexp = 76,                      /* rexp  */
  YYSYMBOL_aexp = 77,                      /* aexp  */
  YYSYMBOL_pexp = 78,                      /* pexp  */
  YYSYMBOL_aggr = 79,                      /* aggr  */
  YYSYMBOL_dom = 80,                       /* dom  */
  YYSYMBOL_fetch = 81,                     /* fetch  */
  YYSYMBOL_metric = 82,                    /* metric  */
  YYSYMBOL_hosts = 83,                     /* hosts  */
  YYSYMBOL_insts = 84,                     /* insts  */
  YYSYMBOL_times = 85,                     /* times  */
  YYSYMBOL_num = 86,                       /* num  */
  YYSYMBOL_units = 87,                     /* units  */
  YYSYMBOL_unit = 88,                      /* unit  */
  YYSYMBOL_str = 89                        /* str  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;




#ifdef short
# undef short
#endif

/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
   <limits.h> and (if available) <stdint.h> are included
   so that the code can choose integer types of a good width.  */

#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
#  define YY_STDINT_H
# endif
#endif

/* Narrow types that promote to a signed type and that can represent a
   signed or unsigned integer of at least N bits.  In tables they can
   save space and decrease cache pressure.  Promoting to a signed type
   helps avoid bugs in integer arithmetic.  */

#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif

/* Work around bug in HP-UX 11.23, which defines these macros
   incorrectly for preprocessor constants.  This workaround can likely
   be removed in 2023, as HPE has promised support for HP-UX 11.23
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif

#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif

#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif

#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
#  ifndef ptrdiff_t
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  endif
#  define YYPTRDIFF_T ptrdiff_t
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif

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

#define YYSIZE_MAXIMUM                                  \
  YY_CAST (YYPTRDIFF_T,                                 \
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
            ? YYPTRDIFF_MAXIMUM                         \
            : YY_CAST (YYSIZE_T, -1)))

#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))


/* Stored state numbers (used for stacks). */
typedef yytype_uint8 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#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_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
#  define YY_ATTRIBUTE_UNUSED
# endif
#endif

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

/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# 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 __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
    _Pragma ("GCC diagnostic push")                            \
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END            \
    _Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif


#define YY_ASSERT(E) ((void) (0 && (E)))

#if !defined yyoverflow

/* 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 */

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

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

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

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
      + 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                                                                  \
      {                                                                 \
        YYPTRDIFF_T yynewbytes;                                         \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / YYSIZEOF (*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, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYPTRDIFF_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  122
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   1421

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  64
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  26
/* YYNRULES -- Number of rules.  */
#define YYNRULES  155
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  245

/* YYMAXUTOK -- Last valid token kind.  */
#define YYMAXUTOK   305


/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, with out-of-bounds checking.  */
#define YYTRANSLATE(YYX)                                \
  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
   : YYSYMBOL_YYUNDEF)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_int8 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,    58,     2,     2,     2,     2,
      61,    62,    52,    50,     2,    51,     2,    53,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    57,     2,
      49,    60,    48,     2,    59,     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,    63,     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,     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,    54,    55,    56
};

#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   157,   157,   158,   172,   183,   185,   187,   189,   191,
     193,   197,   199,   203,   206,   211,   215,   217,   226,   228,
     230,   233,   236,   238,   240,   242,   244,   246,   248,   250,
     254,   259,   261,   263,   268,   275,   279,   282,   285,   289,
     292,   295,   298,   301,   306,   310,   312,   316,   318,   320,
     322,   324,   326,   328,   330,   332,   334,   336,   342,   346,
     349,   352,   355,   358,   361,   364,   368,   371,   374,   377,
     383,   385,   387,   391,   394,   397,   400,   405,   417,   429,
     441,   453,   465,   479,   482,   485,   488,   491,   494,   497,
     500,   503,   506,   509,   512,   517,   519,   521,   523,   525,
     527,   533,   541,   547,   558,   569,   580,   593,   596,   599,
     603,   606,   609,   612,   615,   618,   621,   624,   630,   632,
     636,   638,   640,   642,   644,   648,   651,   654,   657,   660,
     665,   667,   669,   673,   677,   682,   684,   690,   697,   699,
     705,   712,   714,   717,   728,   734,   739,   740,   754,   770,
     772,   775,   777,   780,   782,   787
};
#endif

/** Accessing symbol of state STATE.  */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])

#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
   YYSYMBOL.  No bounds checking.  */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;

/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "\"end of file\"", "error", "\"invalid token\"", "ARROW", "SHELL",
  "ALARM", "SYSLOG", "PRINT", "STOMP", "SOME_QUANT", "ALL_QUANT",
  "PCNT_QUANT", "LEQ_REL", "GEQ_REL", "NEQ_REL", "EQ_REL", "AND", "SEQ",
  "OR", "ALT", "NOT", "RISE", "FALL", "MATCH", "NOMATCH", "RULESET",
  "ELSE", "UNKNOWN", "OTHERWISE", "MIN_AGGR", "MAX_AGGR", "AVG_AGGR",
  "SUM_AGGR", "COUNT_AGGR", "TIME_DOM", "INST_DOM", "HOST_DOM",
  "UNIT_SLASH", "INTERVAL", "EVENT_UNIT", "TIME_UNIT", "SPACE_UNIT",
  "NUMBER", "IDENT", "STRING", "TRU", "FALS", "VAR", "'>'", "'<'", "'+'",
  "'-'", "'*'", "'/'", "UMINUS", "RATE", "INSTANT", "':'", "'#'", "'@'",
  "'='", "'('", "')'", "'^'", "$accept", "stmnt", "exp", "rule", "ruleset",
  "rulelist", "rulesetopt", "act", "actarg", "arglist", "bexp", "quant",
  "rexp", "aexp", "pexp", "aggr", "dom", "fetch", "metric", "hosts",
  "insts", "times", "num", "units", "unit", "str", YY_NULLPTR
};

static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
  return yytname[yysymbol];
}
#endif

#define YYPACT_NINF (-41)

#define yypact_value_is_default(Yyn) \
  ((Yyn) == YYPACT_NINF)

#define YYTABLE_NINF (-11)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
     176,  1353,    17,    18,    27,    42,    69,   117,   117,   340,
     388,   436,    41,    48,   484,   117,   117,   117,   117,   117,
      -3,   -28,   -41,   -41,   -41,   -41,   989,  1022,  1029,   292,
      58,   -41,   -41,   -41,   106,   104,   -41,   -41,   306,    25,
     -41,   -41,   -41,   -41,    68,   -41,   -41,   -41,   -41,   -41,
     -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,   -41,
     -41,   -41,   -41,    44,   -41,   -41,    44,   -41,   -41,    44,
     -41,   -41,    44,   -41,   -41,    44,   -41,   -41,    44,   -41,
     -41,   -41,   532,   580,  1368,   -41,   628,   -41,   221,   -41,
    1368,   -41,  1368,   -41,   -41,   676,   -41,   724,  1325,   484,
      72,    89,   104,  1062,  1069,  1102,  1109,   772,   117,   123,
     234,   -41,  1142,   -41,   -40,   -41,   -40,   -41,    43,   -10,
      11,   198,   -41,    40,    49,    75,   820,   868,  1149,  1182,
    1189,  1222,  1229,  1262,  1269,  1302,   949,   982,    45,   -41,
     -41,   -41,   -41,   -41,   -41,  1368,   -41,  1368,   -41,  1368,
      15,  1368,   -41,  1368,   -41,   484,   105,   118,   -41,   -40,
     -41,   -40,   -41,   -40,   -41,   -40,   -41,  1368,   -41,   916,
     185,    66,    76,    82,   -41,   -41,   -40,   140,   -41,   -41,
     -41,   -41,   109,   126,   -41,   109,   -41,   109,   106,  1368,
     -41,  1368,   -41,   -40,   164,   -40,   164,   -40,   164,   -40,
     164,   -40,   142,   -40,   142,   -40,   -41,   -40,   -41,   -40,
     164,   -41,   -40,   -41,    29,   120,   -41,   126,   126,  1368,
     -41,   -41,    70,    93,   170,   109,   -41,   -41,    50,    62,
     -41,   121,   106,   -41,   -41,   -41,   -41,   -41,   -41,   127,
     225,   187,   126,   -41,   106
};

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

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
     -41,   -41,   135,    -9,   -41,    81,   -41,   -29,    31,   167,
      -8,   -41,   -41,    38,    67,   -41,     7,   -41,   -41,   -41,
     -41,   -41,   153,   -41,    83,     4
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_uint8 yydefgoto[] =
{
       0,    30,    31,    32,    33,   101,   158,    34,    64,    65,
      35,    36,    37,    88,    39,    40,    82,    41,    42,   138,
     215,   230,    43,   109,   174,    89
};

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

static const yytype_int16 yycheck[] =
{
      29,     9,    10,    11,     0,    14,    14,    17,    11,    19,
      50,    51,    52,    53,     3,     8,    12,    13,     1,     1,
      29,    29,    15,    16,    17,    18,    19,    16,     1,    18,
       1,    16,    60,    18,     3,     4,     5,     6,     0,    14,
      15,     1,     1,     1,     4,     5,     6,     7,     8,     1,
       1,     1,    62,     4,     5,     6,     7,     8,     0,    42,
      42,    44,    44,     1,    26,    27,    28,    29,     0,    42,
       1,    44,    43,    62,    82,    83,     1,    62,    86,     4,
       5,     6,     7,     8,    42,    44,    44,    95,    44,    97,
      99,    99,    44,    43,   123,   124,   125,    66,    26,   107,
      69,    61,    57,    72,    42,    62,    75,     3,     3,    78,
      61,    42,    42,    44,   110,   108,    27,    28,   126,   127,
      16,     3,    18,    17,    86,    19,    17,     1,    19,    63,
       4,     5,     6,     7,     8,    42,    61,    99,    17,    63,
      19,   103,   104,   105,   106,    63,   155,   155,   110,    28,
     112,    34,    35,    36,   183,     2,     3,     4,     5,     6,
      37,   169,    39,    40,    41,    38,   128,   129,   130,   131,
     132,   133,   134,   135,   136,   137,     0,     1,    58,    59,
       4,     5,     6,     7,     8,     9,    10,    61,   217,   218,
      50,    51,    52,    53,    52,    53,    20,    21,    22,    23,
      24,    25,    62,   136,   137,    29,    30,    31,    32,    33,
      12,    13,    42,   242,    50,    51,    52,    53,    42,    43,
      44,    45,    46,    47,    39,    40,    41,    51,     3,    42,
      63,    55,    56,    12,    13,     1,   155,    61,     4,     5,
       6,     7,     8,     9,    10,   110,    48,    49,    50,    51,
      52,    53,    -1,   170,    20,    21,    22,    23,    24,    25,
      62,    -1,    -1,    29,    30,    31,    32,    33,    -1,    48,
      49,    50,    51,    52,    53,    -1,    42,    43,    44,    45,
      46,    47,    -1,    -1,    -1,    51,    -1,    -1,    -1,    55,
      56,    -1,    -1,     1,    -1,    61,     4,     5,     6,     7,
       8,     9,    10,    -1,    -1,    -1,     0,    -1,    -1,    -1,
      -1,    -1,    20,    21,    22,    23,    24,    -1,    12,    13,
      -1,    29,    30,    31,    32,    33,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    42,    43,    44,    45,    46,    47,
      -1,     1,    -1,    51,    -1,    -1,    -1,    55,    56,     9,
      10,    -1,    -1,    61,    48,    49,    50,    51,    52,    53,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    42,    43,    44,    45,    46,    47,    -1,     1,
      -1,    51,    -1,    -1,    -1,    55,    56,     9,    10,    -1,
      -1,    61,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      42,    43,    44,    45,    46,    47,    -1,     1,    -1,    51,
      -1,    -1,    -1,    55,    56,     9,    10,    -1,    -1,    61,
      -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,    43,
      44,    45,    46,    47,    -1,     1,    -1,    51,    -1,    -1,
      -1,    55,    56,     9,    10,    -1,    -1,    61,    -1,    -1,
      -1,    -1,    -1,    -1,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    42,    43,    44,    45,
      46,    47,    -1,     1,    -1,    51,    -1,    -1,    -1,    55,
      56,     9,    10,    -1,    -1,    61,    -1,    -1,    -1,    -1,
      -1,    -1,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    42,    43,    44,    45,    46,    47,
      -1,     1,    -1,    51,    -1,    -1,    -1,    55,    56,     9,
      10,    -1,    -1,    61,    -1,    -1,    -1,    -1,    -1,    -1,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    42,    43,    44,    45,    46,    47,    -1,     1,
      -1,    51,    -1,    -1,    -1,    55,    56,     9,    10,    -1,
      -1,    61,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      42,    43,    44,    45,    46,    47,    -1,     1,    -1,    51,
      -1,    -1,    -1,    55,    56,     9,    10,    -1,    -1,    61,
      -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,    43,
      44,    45,    46,    47,    -1,     1,    -1,    51,    -1,    -1,
      -1,    55,    56,     9,    10,    -1,    -1,    61,    -1,    -1,
      -1,    -1,    -1,    -1,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    42,    43,    44,    45,
      46,    47,    -1,     1,    -1,    51,    -1,    -1,    -1,    55,
      56,     9,    10,    -1,    -1,    61,    -1,    -1,    -1,    -1,
      -1,    -1,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    42,    43,    44,    45,    46,    47,
      -1,     1,    -1,    51,    -1,    -1,    -1,    55,    56,     9,
      10,    -1,    -1,    61,    -1,    -1,    -1,    -1,    -1,    -1,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    42,    43,    44,    45,    46,    47,    -1,     1,
      -1,    51,    -1,    -1,    -1,    55,    56,     9,    10,    -1,
      -1,    61,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      42,    43,    44,    45,    46,    47,    -1,     1,    -1,    51,
      -1,    -1,    -1,    55,    56,     9,    10,    -1,    -1,    61,
      -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
       1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,    43,
      44,    45,    46,    47,    -1,    -1,    -1,    51,    -1,    -1,
      -1,    55,    56,    -1,    -1,    -1,    -1,    61,    29,    30,
      31,    32,    33,     1,    -1,    -1,    -1,    -1,    -1,    -1,
       1,    42,    43,    44,    -1,    -1,    47,    -1,    -1,    -1,
      51,    -1,    -1,    -1,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    44,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
       1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,    -1,    -1,
      61,    29,    30,    31,    32,    33,    -1,    -1,    29,    30,
      31,    32,    33,     1,    42,    43,    -1,    -1,    -1,    47,
      -1,    42,    43,    51,    -1,    -1,    47,    55,    56,    -1,
      51,    -1,    -1,    61,    55,    56,    -1,    -1,     3,    -1,
      61,    29,    30,    31,    32,    33,    11,    12,    13,    14,
      15,    16,    -1,    18,    42,    43,    -1,    -1,    -1,    47,
      -1,    -1,    -1,    51,    -1,    -1,     3,    55,    56,    -1,
      -1,    -1,    -1,    61,    11,    12,    13,    14,    15,    16,
      17,    18,    19,    48,    49,    50,    51,    52,    53,    11,
      12,    13,    14,    15,    16,    -1,    18,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    48,    49,    50,    51,    52,    53,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    48,    49,    50,    51,
      52,    53
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_int8 yystos[] =
{
       0,     1,     4,     5,     6,     7,     8,     9,    10,    20,
      21,    22,    23,    24,    25,    29,    30,    31,    32,    33,
      42,    43,    44,    45,    46,    47,    51,    55,    56,    61,
      65,    66,    67,    68,    71,    74,    75,    76,    77,    78,
      79,    81,    82,    86,    89,     3,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    48,    49,    50,    51,    52,
      53,     1,    42,    44,    72,    73,    86,     1,    72,    86,
       1,    72,    86,     1,    72,    86,     1,    72,    86,    34,
      35,    36,    80,    80,     1,    43,    61,    74,    77,    89,
       1,    74,     1,    74,     1,    89,     1,    89,     1,    61,
      67,    69,    74,    80,    80,    80,    80,    80,    11,    87,
      60,     1,    61,    77,     1,    77,     1,    77,    67,    71,
      74,    77,     0,    17,    19,     3,    16,    18,    12,    13,
      48,    49,    50,    51,    52,    53,    14,    15,    83,    73,
      72,    72,    72,    72,    72,     1,    74,     1,    74,     1,
      74,     1,    74,     1,    74,    26,    27,    28,    70,     1,
      77,     1,    77,     1,    77,     1,    77,     1,    74,    80,
      37,    39,    40,    41,    88,    66,     1,    77,    62,    62,
      62,    62,     1,    61,    71,     1,    71,     1,    71,     1,
      74,     1,    74,     1,    77,     1,    77,     1,    77,     1,
      77,     1,    77,     1,    77,     1,    77,     1,    77,     1,
      77,    78,     1,    78,    57,    84,    69,     3,     3,     1,
      74,    88,    63,    63,    63,     1,     1,    43,    58,    59,
      85,    71,    71,    42,    42,    42,     1,    43,     1,    42,
      28,    38,     3,    42,    71
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr1[] =
{
       0,    64,    65,    65,    65,    66,    66,    66,    66,    66,
      66,    67,    67,    67,    67,    68,    69,    69,    70,    70,
      70,    70,    71,    71,    71,    71,    71,    71,    71,    71,
      71,    71,    71,    71,    71,    71,    71,    71,    71,    71,
      71,    71,    71,    71,    72,    73,    73,    74,    74,    74,
      74,    74,    74,    74,    74,    74,    74,    74,    74,    74,
      74,    74,    74,    74,    74,    74,    74,    74,    74,    74,
      75,    75,    75,    75,    75,    75,    75,    76,    76,    76,
      76,    76,    76,    76,    76,    76,    76,    76,    76,    76,
      76,    76,    76,    76,    76,    77,    77,    77,    77,    77,
      77,    77,    77,    77,    77,    77,    77,    77,    77,    77,
      77,    77,    77,    77,    77,    77,    77,    77,    78,    78,
      79,    79,    79,    79,    79,    79,    79,    79,    79,    79,
      80,    80,    80,    81,    82,    83,    83,    83,    84,    84,
      84,    85,    85,    85,    85,    86,    87,    87,    87,    88,
      88,    88,    88,    88,    88,    89
};

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


enum { YYENOMEM = -2 };

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)

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


#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)

/* Backward compatibility with an undocumented macro.
   Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF


/* 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)




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


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

static void
yy_symbol_value_print (FILE *yyo,
                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  if (!yyvaluep)
    return;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


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

static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  yy_symbol_value_print (yyo, yykind, yyvaluep);
  YYFPRINTF (yyo, ")");
}

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

static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *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 (yy_state_t *yyssp, YYSTYPE *yyvsp,
                 int yyrule)
{
  int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
                       &yyvsp[(yyi + 1) - (yynrhs)]);
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, 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) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, 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






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

static void
yydestruct (const char *yymsg,
            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
  YY_USE (yyvaluep);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/* Lookahead token kind.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Number of syntax errors so far.  */
int yynerrs;




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

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

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

    /* Their size.  */
    YYPTRDIFF_T yystacksize = YYINITDEPTH;

    /* The state stack: array, bottom, top.  */
    yy_state_t yyssa[YYINITDEPTH];
    yy_state_t *yyss = yyssa;
    yy_state_t *yyssp = yyss;

    /* The semantic value stack: array, bottom, top.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs = yyvsa;
    YYSTYPE *yyvsp = yyvs;

  int yyn;
  /* The return value of yyparse.  */
  int yyresult;
  /* Lookahead symbol kind.  */
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;



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

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

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

  yychar = YYEMPTY; /* Cause a token to be read.  */

  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 -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  YY_IGNORE_USELESS_CAST_BEGIN
  *yyssp = YY_CAST (yy_state_t, yystate);
  YY_IGNORE_USELESS_CAST_END
  YY_STACK_PRINT (yyss, yyssp);

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    YYNOMEM;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

# if defined 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.  */
        yy_state_t *yyss1 = yyss;
        YYSTYPE *yyvs1 = yyvs;

        /* 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 * YYSIZEOF (*yyssp),
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        YYNOMEM;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yy_state_t *yyss1 = yyss;
        union yyalloc *yyptr =
          YY_CAST (union yyalloc *,
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
        if (! yyptr)
          YYNOMEM;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

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

      YY_IGNORE_USELESS_CAST_BEGIN
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
                  YY_CAST (long, yystacksize)));
      YY_IGNORE_USELESS_CAST_END

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */


  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 empty, or end-of-input, or a valid lookahead.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yylex ();
    }

  if (yychar <= YYEOF)
    {
      yychar = YYEOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == YYerror)
    {
      /* The scanner already issued an error message, process directly
         to error recovery.  But do not keep the error token as
         lookahead, it is too special and may lead us to an endless
         loop in error recovery. */
      yychar = YYUNDEF;
      yytoken = YYSYMBOL_YYerror;
      goto yyerrlab1;
    }
  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);
  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  /* Discard the shifted token.  */
  yychar = YYEMPTY;
  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];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 2: /* stmnt: %empty  */
#line 157 "grammar.y"
                {    parse = NULL; }
#line 1590 "grammar.tab.c"
    break;

  case 3: /* stmnt: IDENT '=' exp  */
#line 159 "grammar.y"
                {   parse = statement((yyvsp[-2].s), (yyvsp[0].x));
		    if ((agent || applet) && (yyvsp[0].x) != NULL &&
			((yyvsp[0].x)->op == RULE || (yyvsp[0].x)->op == ACT_SEQ ||
			 (yyvsp[0].x)->op == ACT_ALT || (yyvsp[0].x)->op == ACT_SHELL ||
			 (yyvsp[0].x)->op == ACT_ALARM || (yyvsp[0].x)->op == ACT_SYSLOG ||
			 (yyvsp[0].x)->op == ACT_PRINT || (yyvsp[0].x)->op == ACT_STOMP)) {
			synerr();
			fprintf(stderr, "operator %s not allowed in agent "
					"mode\n", opStrings((yyvsp[0].x)->op));
			parse = NULL;
		    }
		    free((yyvsp[-2].s));
		}
#line 1608 "grammar.tab.c"
    break;

  case 4: /* stmnt: exp  */
#line 173 "grammar.y"
                {   parse = statement(NULL, (yyvsp[0].x));
		    if (agent) {
			synerr();
			fprintf(stderr, "expressions must be named in agent "
					"mode\n");
			parse = NULL;
		    }
		}
#line 1621 "grammar.tab.c"
    break;

  case 5: /* exp: rule  */
#line 184 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1627 "grammar.tab.c"
    break;

  case 6: /* exp: ruleset  */
#line 186 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1633 "grammar.tab.c"
    break;

  case 7: /* exp: bexp  */
#line 188 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1639 "grammar.tab.c"
    break;

  case 8: /* exp: aexp  */
#line 190 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1645 "grammar.tab.c"
    break;

  case 9: /* exp: act  */
#line 192 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1651 "grammar.tab.c"
    break;

  case 10: /* exp: str  */
#line 194 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1657 "grammar.tab.c"
    break;

  case 11: /* rule: '(' rule ')'  */
#line 198 "grammar.y"
                {   (yyval.x) = (yyvsp[-1].x); }
#line 1663 "grammar.tab.c"
    break;

  case 12: /* rule: bexp ARROW act  */
#line 200 "grammar.y"
                {    (yyval.x) = ruleExpr((yyvsp[-2].x), (yyvsp[0].x)); }
#line 1669 "grammar.tab.c"
    break;

  case 13: /* rule: error ARROW  */
#line 204 "grammar.y"
                {   gramerr(bexp_str, precede, opStrings(RULE));
		    (yyval.x) = NULL; }
#line 1676 "grammar.tab.c"
    break;

  case 14: /* rule: bexp ARROW error  */
#line 207 "grammar.y"
                {   gramerr(act_str, follow, opStrings(RULE));
		    (yyval.x) = NULL; }
#line 1683 "grammar.tab.c"
    break;

  case 15: /* ruleset: RULESET rulelist rulesetopt  */
#line 212 "grammar.y"
                {   (yyval.x) = binaryExpr(CND_RULESET, (yyvsp[-1].x), (yyvsp[0].x)); }
#line 1689 "grammar.tab.c"
    break;

  case 16: /* rulelist: rule  */
#line 216 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1695 "grammar.tab.c"
    break;

  case 17: /* rulelist: rule ELSE rulelist  */
#line 223 "grammar.y"
                {   (yyval.x) = binaryExpr(CND_OR, (yyvsp[-2].x), (yyvsp[0].x)); }
#line 1701 "grammar.tab.c"
    break;

  case 18: /* rulesetopt: UNKNOWN ARROW act  */
#line 227 "grammar.y"
                {    (yyval.x) = binaryExpr(CND_OTHER, ruleExpr(boolConst(B_TRUE), (yyvsp[0].x)), boolConst(B_FALSE)); }
#line 1707 "grammar.tab.c"
    break;

  case 19: /* rulesetopt: OTHERWISE ARROW act  */
#line 229 "grammar.y"
                {    (yyval.x) = binaryExpr(CND_OTHER, boolConst(B_FALSE), ruleExpr(boolConst(B_TRUE), (yyvsp[0].x))); }
#line 1713 "grammar.tab.c"
    break;

  case 20: /* rulesetopt: UNKNOWN ARROW act OTHERWISE ARROW act  */
#line 231 "grammar.y"
                {    (yyval.x) = binaryExpr(CND_OTHER, ruleExpr(boolConst(B_TRUE), (yyvsp[-3].x)), ruleExpr(boolConst(B_TRUE), (yyvsp[0].x))); }
#line 1719 "grammar.tab.c"
    break;

  case 21: /* rulesetopt: %empty  */
#line 233 "grammar.y"
                {    (yyval.x) = NULL; }
#line 1725 "grammar.tab.c"
    break;

  case 22: /* act: '(' act ')'  */
#line 237 "grammar.y"
                {   (yyval.x) = (yyvsp[-1].x); }
#line 1731 "grammar.tab.c"
    break;

  case 23: /* act: act SEQ act  */
#line 239 "grammar.y"
                {   (yyval.x) = actExpr(ACT_SEQ, (yyvsp[-2].x), (yyvsp[0].x)); }
#line 1737 "grammar.tab.c"
    break;

  case 24: /* act: act ALT act  */
#line 241 "grammar.y"
                {   (yyval.x) = actExpr(ACT_ALT, (yyvsp[-2].x), (yyvsp[0].x)); }
#line 1743 "grammar.tab.c"
    break;

  case 25: /* act: SHELL actarg  */
#line 243 "grammar.y"
                {   (yyval.x) = actExpr(ACT_SHELL, (yyvsp[0].x), NULL); }
#line 1749 "grammar.tab.c"
    break;

  case 26: /* act: SHELL num actarg  */
#line 245 "grammar.y"
                {   (yyval.x) = actExpr(ACT_SHELL, (yyvsp[0].x), (yyvsp[-1].x)); }
#line 1755 "grammar.tab.c"
    break;

  case 27: /* act: ALARM actarg  */
#line 247 "grammar.y"
                {   (yyval.x) = actExpr(ACT_ALARM, (yyvsp[0].x), NULL); }
#line 1761 "grammar.tab.c"
    break;

  case 28: /* act: ALARM num actarg  */
#line 249 "grammar.y"
                {   (yyval.x) = actExpr(ACT_ALARM, (yyvsp[0].x), (yyvsp[-1].x)); }
#line 1767 "grammar.tab.c"
    break;

  case 29: /* act: SYSLOG actarg  */
#line 251 "grammar.y"
                {   do_syslog_args((yyvsp[0].x));
		    (yyval.x) = actExpr(ACT_SYSLOG, (yyvsp[0].x), NULL);
		}
#line 1775 "grammar.tab.c"
    break;

  case 30: /* act: SYSLOG num actarg  */
#line 255 "grammar.y"
                {
		    do_syslog_args((yyvsp[0].x));
		    (yyval.x) = actExpr(ACT_SYSLOG, (yyvsp[0].x), (yyvsp[-1].x));
		}
#line 1784 "grammar.tab.c"
    break;

  case 31: /* act: PRINT actarg  */
#line 260 "grammar.y"
                {   (yyval.x) = actExpr(ACT_PRINT, (yyvsp[0].x), NULL); }
#line 1790 "grammar.tab.c"
    break;

  case 32: /* act: PRINT num actarg  */
#line 262 "grammar.y"
                {   (yyval.x) = actExpr(ACT_PRINT, (yyvsp[0].x), (yyvsp[-1].x)); }
#line 1796 "grammar.tab.c"
    break;

  case 33: /* act: STOMP actarg  */
#line 264 "grammar.y"
                {
		    stomping = 1;
		    (yyval.x) = actExpr(ACT_STOMP, (yyvsp[0].x), NULL);
		}
#line 1805 "grammar.tab.c"
    break;

  case 34: /* act: STOMP num actarg  */
#line 269 "grammar.y"
                {
		    stomping = 1;
		    (yyval.x) = actExpr(ACT_STOMP, (yyvsp[0].x), (yyvsp[-1].x));
		}
#line 1814 "grammar.tab.c"
    break;

  case 35: /* act: error SEQ  */
#line 276 "grammar.y"
                {   gramerr(act_str, precede, opStrings(ACT_SEQ));
		    (yyval.x) = NULL; }
#line 1821 "grammar.tab.c"
    break;

  case 36: /* act: act SEQ error  */
#line 280 "grammar.y"
                {   gramerr(act_str, follow, opStrings(ACT_SEQ));
		    (yyval.x) = NULL; }
#line 1828 "grammar.tab.c"
    break;

  case 37: /* act: error ALT  */
#line 283 "grammar.y"
                {   gramerr(act_str, precede, opStrings(ACT_ALT));
		    (yyval.x) = NULL; }
#line 1835 "grammar.tab.c"
    break;

  case 38: /* act: act ALT error  */
#line 286 "grammar.y"
                {   gramerr(act_str, follow, opStrings(ACT_ALT));
		    (yyval.x) = NULL; }
#line 1842 "grammar.tab.c"
    break;

  case 39: /* act: SHELL error  */
#line 290 "grammar.y"
                {   gramerr(tstr_str, follow, opStrings(ACT_SHELL));
		    (yyval.x) = NULL; }
#line 1849 "grammar.tab.c"
    break;

  case 40: /* act: ALARM error  */
#line 293 "grammar.y"
                {   gramerr(tstr_str, follow, opStrings(ACT_ALARM));
		    (yyval.x) = NULL; }
#line 1856 "grammar.tab.c"
    break;

  case 41: /* act: SYSLOG error  */
#line 296 "grammar.y"
                {   gramerr(tstr_str, follow, opStrings(ACT_SYSLOG));
		    (yyval.x) = NULL; }
#line 1863 "grammar.tab.c"
    break;

  case 42: /* act: PRINT error  */
#line 299 "grammar.y"
                {   gramerr(tstr_str, follow, opStrings(ACT_PRINT));
		    (yyval.x) = NULL; }
#line 1870 "grammar.tab.c"
    break;

  case 43: /* act: STOMP error  */
#line 302 "grammar.y"
                {   gramerr(tstr_str, follow, opStrings(ACT_STOMP));
		    (yyval.x) = NULL; }
#line 1877 "grammar.tab.c"
    break;

  case 44: /* actarg: arglist  */
#line 307 "grammar.y"
                {   (yyval.x) = actArgExpr((yyvsp[0].x), NULL); }
#line 1883 "grammar.tab.c"
    break;

  case 45: /* arglist: STRING  */
#line 311 "grammar.y"
                {   (yyval.x) = actArgList(NULL, (yyvsp[0].s)); free((yyvsp[0].s)); }
#line 1889 "grammar.tab.c"
    break;

  case 46: /* arglist: STRING arglist  */
#line 313 "grammar.y"
                {   (yyval.x) = actArgList((yyvsp[0].x), (yyvsp[-1].s)); free((yyvsp[-1].s)); }
#line 1895 "grammar.tab.c"
    break;

  case 47: /* bexp: '(' bexp ')'  */
#line 317 "grammar.y"
                {   (yyval.x) = (yyvsp[-1].x); }
#line 1901 "grammar.tab.c"
    break;

  case 48: /* bexp: rexp  */
#line 319 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1907 "grammar.tab.c"
    break;

  case 49: /* bexp: quant  */
#line 321 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 1913 "grammar.tab.c"
    break;

  case 50: /* bexp: TRU  */
#line 323 "grammar.y"
                {   (yyval.x) = boolConst(B_TRUE); }
#line 1919 "grammar.tab.c"
    break;

  case 51: /* bexp: FALS  */
#line 325 "grammar.y"
                {   (yyval.x) = boolConst(B_FALSE); }
#line 1925 "grammar.tab.c"
    break;

  case 52: /* bexp: NOT bexp  */
#line 327 "grammar.y"
                {   (yyval.x) = unaryExpr(CND_NOT, (yyvsp[0].x)); }
#line 1931 "grammar.tab.c"
    break;

  case 53: /* bexp: RISE bexp  */
#line 329 "grammar.y"
                {   (yyval.x) = boolMergeExpr(CND_RISE, (yyvsp[0].x)); }
#line 1937 "grammar.tab.c"
    break;

  case 54: /* bexp: FALL bexp  */
#line 331 "grammar.y"
                {   (yyval.x) = boolMergeExpr(CND_FALL, (yyvsp[0].x)); }
#line 1943 "grammar.tab.c"
    break;

  case 55: /* bexp: bexp AND bexp  */
#line 333 "grammar.y"
                {   (yyval.x) = binaryExpr(CND_AND, (yyvsp[-2].x), (yyvsp[0].x)); }
#line 1949 "grammar.tab.c"
    break;

  case 56: /* bexp: bexp OR bexp  */
#line 335 "grammar.y"
                {   (yyval.x) = binaryExpr(CND_OR, (yyvsp[-2].x), (yyvsp[0].x)); }
#line 1955 "grammar.tab.c"
    break;

  case 57: /* bexp: MATCH str bexp  */
#line 337 "grammar.y"
                {   /*
		     * note args are reversed so bexp is to the "left"
		     * of the operand node in the expr tree
		     */
		    (yyval.x) = binaryExpr(CND_MATCH, (yyvsp[0].x), (yyvsp[-1].x)); }
#line 1965 "grammar.tab.c"
    break;

  case 58: /* bexp: NOMATCH str bexp  */
#line 343 "grammar.y"
                {   (yyval.x) = binaryExpr(CND_NOMATCH, (yyvsp[0].x), (yyvsp[-1].x)); }
#line 1971 "grammar.tab.c"
    break;

  case 59: /* bexp: NOT error  */
#line 347 "grammar.y"
                {   gramerr(bexp_str, follow, opStrings(CND_NOT));
		    (yyval.x) = NULL; }
#line 1978 "grammar.tab.c"
    break;

  case 60: /* bexp: RISE error  */
#line 350 "grammar.y"
                {   gramerr(bexp_str, follow, opStrings(CND_RISE));
		    (yyval.x) = NULL; }
#line 1985 "grammar.tab.c"
    break;

  case 61: /* bexp: FALL error  */
#line 353 "grammar.y"
                {   gramerr(bexp_str, follow, opStrings(CND_FALL));
		    (yyval.x) = NULL; }
#line 1992 "grammar.tab.c"
    break;

  case 62: /* bexp: MATCH error  */
#line 356 "grammar.y"
                {   gramerr("regular expression", follow, opStrings(CND_MATCH));
		    (yyval.x) = NULL; }
#line 1999 "grammar.tab.c"
    break;

  case 63: /* bexp: MATCH str error  */
#line 359 "grammar.y"
                {   gramerr(bexp_str, follow, "regular expression");
		    (yyval.x) = NULL; }
#line 2006 "grammar.tab.c"
    break;

  case 64: /* bexp: NOMATCH error  */
#line 362 "grammar.y"
                {   gramerr("regular expression", follow, opStrings(CND_NOMATCH));
		    (yyval.x) = NULL; }
#line 2013 "grammar.tab.c"
    break;

  case 65: /* bexp: NOMATCH str error  */
#line 365 "grammar.y"
                {   gramerr(bexp_str, follow, "regular expression");
		    (yyval.x) = NULL; }
#line 2020 "grammar.tab.c"
    break;

  case 66: /* bexp: error AND  */
#line 369 "grammar.y"
                {   gramerr(bexp_str, precede, opStrings(CND_AND));
		    (yyval.x) = NULL; }
#line 2027 "grammar.tab.c"
    break;

  case 67: /* bexp: bexp AND error  */
#line 372 "grammar.y"
                {   gramerr(bexp_str, follow, opStrings(CND_AND));
		    (yyval.x) = NULL; }
#line 2034 "grammar.tab.c"
    break;

  case 68: /* bexp: error OR  */
#line 375 "grammar.y"
                {   gramerr(bexp_str, precede, opStrings(CND_OR));
		    (yyval.x) = NULL; }
#line 2041 "grammar.tab.c"
    break;

  case 69: /* bexp: bexp OR error  */
#line 378 "grammar.y"
                {   gramerr(bexp_str, follow, opStrings(CND_OR));
		    (yyval.x) = NULL; }
#line 2048 "grammar.tab.c"
    break;

  case 70: /* quant: ALL_QUANT dom bexp  */
#line 384 "grammar.y"
                {   (yyval.x) = domainExpr(CND_ALL_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2054 "grammar.tab.c"
    break;

  case 71: /* quant: SOME_QUANT dom bexp  */
#line 386 "grammar.y"
                {   (yyval.x) = domainExpr(CND_SOME_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2060 "grammar.tab.c"
    break;

  case 72: /* quant: NUMBER PCNT_QUANT dom bexp  */
#line 388 "grammar.y"
                {   (yyval.x) = percentExpr((yyvsp[-3].d), (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2066 "grammar.tab.c"
    break;

  case 73: /* quant: ALL_QUANT dom error  */
#line 392 "grammar.y"
                {   gramerr(bexp_str, follow, quant_str);
		    (yyval.x) = NULL; }
#line 2073 "grammar.tab.c"
    break;

  case 74: /* quant: SOME_QUANT dom error  */
#line 395 "grammar.y"
                {   gramerr(bexp_str, follow, quant_str);
		    (yyval.x) = NULL; }
#line 2080 "grammar.tab.c"
    break;

  case 75: /* quant: NUMBER PCNT_QUANT dom error  */
#line 398 "grammar.y"
                {   gramerr(bexp_str, follow, quant_str);
		    (yyval.x) = NULL; }
#line 2087 "grammar.tab.c"
    break;

  case 76: /* quant: error PCNT_QUANT  */
#line 401 "grammar.y"
                {   gramerr(num_str, precede, pcnt_str);
		    (yyval.x) = NULL; }
#line 2094 "grammar.tab.c"
    break;

  case 77: /* rexp: pexp EQ_REL pexp  */
#line 406 "grammar.y"
                {
		    if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = relExpr(CND_EQ, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2110 "grammar.tab.c"
    break;

  case 78: /* rexp: pexp NEQ_REL pexp  */
#line 418 "grammar.y"
                {
		    if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = relExpr(CND_NEQ, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2126 "grammar.tab.c"
    break;

  case 79: /* rexp: aexp '<' aexp  */
#line 430 "grammar.y"
                {
		    if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = relExpr(CND_LT, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2142 "grammar.tab.c"
    break;

  case 80: /* rexp: aexp '>' aexp  */
#line 442 "grammar.y"
                {
		    if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = relExpr(CND_GT, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2158 "grammar.tab.c"
    break;

  case 81: /* rexp: aexp LEQ_REL aexp  */
#line 454 "grammar.y"
                {
		    if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = relExpr(CND_LTE, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2174 "grammar.tab.c"
    break;

  case 82: /* rexp: aexp GEQ_REL aexp  */
#line 466 "grammar.y"
                {
		    if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = relExpr(CND_GTE, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2190 "grammar.tab.c"
    break;

  case 83: /* rexp: error EQ_REL  */
#line 480 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_EQ));
		    (yyval.x) = NULL; }
#line 2197 "grammar.tab.c"
    break;

  case 84: /* rexp: pexp EQ_REL error  */
#line 483 "grammar.y"
                {   gramerr(pexp_str, follow, opStrings(CND_EQ));
		    (yyval.x) = NULL; }
#line 2204 "grammar.tab.c"
    break;

  case 85: /* rexp: error NEQ_REL  */
#line 486 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_NEQ));
		    (yyval.x) = NULL; }
#line 2211 "grammar.tab.c"
    break;

  case 86: /* rexp: pexp NEQ_REL error  */
#line 489 "grammar.y"
                {   gramerr(pexp_str, follow, opStrings(CND_NEQ));
		    (yyval.x) = NULL; }
#line 2218 "grammar.tab.c"
    break;

  case 87: /* rexp: error '<'  */
#line 492 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_LT));
		    (yyval.x) = NULL; }
#line 2225 "grammar.tab.c"
    break;

  case 88: /* rexp: aexp '<' error  */
#line 495 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_LT));
		    (yyval.x) = NULL; }
#line 2232 "grammar.tab.c"
    break;

  case 89: /* rexp: error '>'  */
#line 498 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_GT));
		    (yyval.x) = NULL; }
#line 2239 "grammar.tab.c"
    break;

  case 90: /* rexp: aexp '>' error  */
#line 501 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_GT));
		    (yyval.x) = NULL; }
#line 2246 "grammar.tab.c"
    break;

  case 91: /* rexp: error LEQ_REL  */
#line 504 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_LTE));
		    (yyval.x) = NULL; }
#line 2253 "grammar.tab.c"
    break;

  case 92: /* rexp: aexp LEQ_REL error  */
#line 507 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_LTE));
		    (yyval.x) = NULL; }
#line 2260 "grammar.tab.c"
    break;

  case 93: /* rexp: error GEQ_REL  */
#line 510 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_GTE));
		    (yyval.x) = NULL; }
#line 2267 "grammar.tab.c"
    break;

  case 94: /* rexp: aexp GEQ_REL error  */
#line 513 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_GTE));
		    (yyval.x) = NULL; }
#line 2274 "grammar.tab.c"
    break;

  case 95: /* aexp: '(' aexp ')'  */
#line 518 "grammar.y"
                {   (yyval.x) = (yyvsp[-1].x); }
#line 2280 "grammar.tab.c"
    break;

  case 96: /* aexp: fetch  */
#line 520 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 2286 "grammar.tab.c"
    break;

  case 97: /* aexp: num  */
#line 522 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 2292 "grammar.tab.c"
    break;

  case 98: /* aexp: VAR  */
#line 524 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 2298 "grammar.tab.c"
    break;

  case 99: /* aexp: aggr  */
#line 526 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 2304 "grammar.tab.c"
    break;

  case 100: /* aexp: RATE aexp  */
#line 528 "grammar.y"
                {   if ((yyvsp[0].x) != NULL)
			(yyval.x) = numMergeExpr(CND_RATE, (yyvsp[0].x));
		    else
			(yyval.x) = NULL;
		}
#line 2314 "grammar.tab.c"
    break;

  case 101: /* aexp: INSTANT aexp  */
#line 534 "grammar.y"
                {   if ((yyvsp[0].x) != NULL) {
			(yyvsp[0].x)->sem = PM_SEM_INSTANT;
			(yyval.x) = unaryExpr(CND_INSTANT, (yyvsp[0].x));
		    }
		    else
			(yyval.x) = NULL;
		}
#line 2326 "grammar.tab.c"
    break;

  case 102: /* aexp: '-' aexp  */
#line 542 "grammar.y"
                {   if ((yyvsp[0].x) != NULL)
			(yyval.x) = unaryExpr(CND_NEG, (yyvsp[0].x));
		    else
			(yyval.x) = NULL;
		}
#line 2336 "grammar.tab.c"
    break;

  case 103: /* aexp: aexp '+' aexp  */
#line 548 "grammar.y"
                {   if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = binaryExpr(CND_ADD, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2351 "grammar.tab.c"
    break;

  case 104: /* aexp: aexp '-' aexp  */
#line 559 "grammar.y"
                {   if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = binaryExpr(CND_SUB, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2366 "grammar.tab.c"
    break;

  case 105: /* aexp: aexp '*' aexp  */
#line 570 "grammar.y"
                {   if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = binaryExpr(CND_MUL, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2381 "grammar.tab.c"
    break;

  case 106: /* aexp: aexp '/' aexp  */
#line 581 "grammar.y"
                {   if ((yyvsp[-2].x) != NULL && (yyvsp[0].x) != NULL)
			(yyval.x) = binaryExpr(CND_DIV, (yyvsp[-2].x), (yyvsp[0].x));
		    else {
			if ((yyvsp[-2].x) != NULL)
			    freeExpr((yyvsp[-2].x));
			if ((yyvsp[0].x) != NULL)
			    freeExpr((yyvsp[0].x));
			(yyval.x) = NULL;
		    }
		}
#line 2396 "grammar.tab.c"
    break;

  case 107: /* aexp: RATE error  */
#line 594 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_RATE));
		    (yyval.x) = NULL; }
#line 2403 "grammar.tab.c"
    break;

  case 108: /* aexp: INSTANT error  */
#line 597 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_INSTANT));
		    (yyval.x) = NULL; }
#line 2410 "grammar.tab.c"
    break;

  case 109: /* aexp: '-' error  */
#line 600 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_NEG));
		    (yyval.x) = NULL; }
#line 2417 "grammar.tab.c"
    break;

  case 110: /* aexp: error '+'  */
#line 604 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_ADD));
		    (yyval.x) = NULL; }
#line 2424 "grammar.tab.c"
    break;

  case 111: /* aexp: aexp '+' error  */
#line 607 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_ADD));
		    (yyval.x) = NULL; }
#line 2431 "grammar.tab.c"
    break;

  case 112: /* aexp: error '-'  */
#line 610 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_SUB));
		    (yyval.x) = NULL; }
#line 2438 "grammar.tab.c"
    break;

  case 113: /* aexp: aexp '-' error  */
#line 613 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_SUB));
		    (yyval.x) = NULL; }
#line 2445 "grammar.tab.c"
    break;

  case 114: /* aexp: error '*'  */
#line 616 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_MUL));
		    (yyval.x) = NULL; }
#line 2452 "grammar.tab.c"
    break;

  case 115: /* aexp: aexp '*' error  */
#line 619 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_MUL));
		    (yyval.x) = NULL; }
#line 2459 "grammar.tab.c"
    break;

  case 116: /* aexp: error '/'  */
#line 622 "grammar.y"
                {   gramerr(aexp_str, precede, opStrings(CND_DIV));
		    (yyval.x) = NULL; }
#line 2466 "grammar.tab.c"
    break;

  case 117: /* aexp: aexp '/' error  */
#line 625 "grammar.y"
                {   gramerr(aexp_str, follow, opStrings(CND_DIV));
		    (yyval.x) = NULL; }
#line 2473 "grammar.tab.c"
    break;

  case 118: /* pexp: aexp  */
#line 631 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 2479 "grammar.tab.c"
    break;

  case 119: /* pexp: str  */
#line 633 "grammar.y"
                {   (yyval.x) = (yyvsp[0].x); }
#line 2485 "grammar.tab.c"
    break;

  case 120: /* aggr: SUM_AGGR dom aexp  */
#line 637 "grammar.y"
                {   (yyval.x) = domainExpr(CND_SUM_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2491 "grammar.tab.c"
    break;

  case 121: /* aggr: AVG_AGGR dom aexp  */
#line 639 "grammar.y"
                {   (yyval.x) = domainExpr(CND_AVG_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2497 "grammar.tab.c"
    break;

  case 122: /* aggr: MAX_AGGR dom aexp  */
#line 641 "grammar.y"
                {   (yyval.x) = domainExpr(CND_MAX_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2503 "grammar.tab.c"
    break;

  case 123: /* aggr: MIN_AGGR dom aexp  */
#line 643 "grammar.y"
                {   (yyval.x) = domainExpr(CND_MIN_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2509 "grammar.tab.c"
    break;

  case 124: /* aggr: COUNT_AGGR dom bexp  */
#line 645 "grammar.y"
                {   (yyval.x) = domainExpr(CND_COUNT_HOST, (yyvsp[-1].i), (yyvsp[0].x)); }
#line 2515 "grammar.tab.c"
    break;

  case 125: /* aggr: SUM_AGGR dom error  */
#line 649 "grammar.y"
                {   gramerr(aexp_str, follow, aggr_str);
		    (yyval.x) = NULL; }
#line 2522 "grammar.tab.c"
    break;

  case 126: /* aggr: AVG_AGGR dom error  */
#line 652 "grammar.y"
                {   gramerr(aexp_str, follow, aggr_str);
		    (yyval.x) = NULL; }
#line 2529 "grammar.tab.c"
    break;

  case 127: /* aggr: MAX_AGGR dom error  */
#line 655 "grammar.y"
                {   gramerr(aexp_str, follow, aggr_str);
		    (yyval.x) = NULL; }
#line 2536 "grammar.tab.c"
    break;

  case 128: /* aggr: MIN_AGGR dom error  */
#line 658 "grammar.y"
                {   gramerr(aexp_str, follow, aggr_str);
		    (yyval.x) = NULL; }
#line 2543 "grammar.tab.c"
    break;

  case 129: /* aggr: COUNT_AGGR dom error  */
#line 661 "grammar.y"
                {   gramerr(bexp_str, follow, aggr_str);
		    (yyval.x) = NULL; }
#line 2550 "grammar.tab.c"
    break;

  case 130: /* dom: HOST_DOM  */
#line 666 "grammar.y"
                {   (yyval.i) = HOST_DOM; }
#line 2556 "grammar.tab.c"
    break;

  case 131: /* dom: INST_DOM  */
#line 668 "grammar.y"
                {   (yyval.i) = INST_DOM; }
#line 2562 "grammar.tab.c"
    break;

  case 132: /* dom: TIME_DOM  */
#line 670 "grammar.y"
                {   (yyval.i) = TIME_DOM; }
#line 2568 "grammar.tab.c"
    break;

  case 133: /* fetch: metric hosts insts times  */
#line 674 "grammar.y"
                {   (yyval.x) = fetchExpr((yyvsp[-3].s), (yyvsp[-2].sa), (yyvsp[-1].sa), (yyvsp[0].t)); free((yyvsp[-3].s)); }
#line 2574 "grammar.tab.c"
    break;

  case 134: /* metric: IDENT  */
#line 678 "grammar.y"
                {   (yyval.s) = (yyvsp[0].s); }
#line 2580 "grammar.tab.c"
    break;

  case 135: /* hosts: %empty  */
#line 682 "grammar.y"
                {   (yyval.sa).n = 0;
		    (yyval.sa).ss = NULL; }
#line 2587 "grammar.tab.c"
    break;

  case 136: /* hosts: hosts ':' IDENT  */
#line 685 "grammar.y"
                {   (yyval.sa).n = (yyvsp[-2].sa).n + 1;
		    (yyval.sa).ss = (char **) ralloc((yyvsp[-2].sa).ss, (yyval.sa).n * sizeof(char *));
		    (yyval.sa).ss[(yyvsp[-2].sa).n] = (yyvsp[0].s); }
#line 2595 "grammar.tab.c"
    break;

  case 137: /* hosts: hosts ':' error  */
#line 691 "grammar.y"
                {   gramerr(host_str, follow, ":");
                    (yyval.sa).n = 0;
		    (yyval.sa).ss = NULL; }
#line 2603 "grammar.tab.c"
    break;

  case 138: /* insts: %empty  */
#line 697 "grammar.y"
                {   (yyval.sa).n = 0;
		    (yyval.sa).ss = NULL; }
#line 2610 "grammar.tab.c"
    break;

  case 139: /* insts: insts '#' IDENT  */
#line 700 "grammar.y"
                {   (yyval.sa).n = (yyvsp[-2].sa).n + 1;
		    (yyval.sa).ss = (char **) ralloc((yyvsp[-2].sa).ss, (yyval.sa).n * sizeof(char *));
		    (yyval.sa).ss[(yyvsp[-2].sa).n] = (yyvsp[0].s); }
#line 2618 "grammar.tab.c"
    break;

  case 140: /* insts: insts '#' error  */
#line 706 "grammar.y"
                {   gramerr(inst_str, follow, "#");
                    (yyval.sa).n = 0;
		    (yyval.sa).ss = NULL; }
#line 2626 "grammar.tab.c"
    break;

  case 141: /* times: %empty  */
#line 712 "grammar.y"
                {   (yyval.t).t1 = 0;
		    (yyval.t).t2 = 0; }
#line 2633 "grammar.tab.c"
    break;

  case 142: /* times: '@' NUMBER  */
#line 715 "grammar.y"
                {   (yyval.t).t1 = (yyvsp[0].d);
		    (yyval.t).t2 = (yyvsp[0].d); }
#line 2640 "grammar.tab.c"
    break;

  case 143: /* times: '@' NUMBER INTERVAL NUMBER  */
#line 718 "grammar.y"
                {   if ((yyvsp[-2].d) <= (yyvsp[0].d)) {
			(yyval.t).t1 = (yyvsp[-2].d);
			(yyval.t).t2 = (yyvsp[0].d);
		    }
		    else {
			(yyval.t).t1 = (yyvsp[0].d);
			(yyval.t).t2 = (yyvsp[-2].d);
		    } }
#line 2653 "grammar.tab.c"
    break;

  case 144: /* times: '@' error  */
#line 729 "grammar.y"
                {   gramerr(sample_str, follow, "@");
                    (yyval.t).t1 = 0;
                    (yyval.t).t2 = 0; }
#line 2661 "grammar.tab.c"
    break;

  case 145: /* num: NUMBER units  */
#line 735 "grammar.y"
                {   (yyval.x) = numConst((yyvsp[-1].d), (yyvsp[0].u)); }
#line 2667 "grammar.tab.c"
    break;

  case 146: /* units: %empty  */
#line 739 "grammar.y"
                {   (yyval.u) = noUnits; }
#line 2673 "grammar.tab.c"
    break;

  case 147: /* units: units unit  */
#line 741 "grammar.y"
                {   (yyval.u) = (yyvsp[-1].u);
		    if ((yyvsp[0].u).dimSpace) {
			(yyval.u).dimSpace = (yyvsp[0].u).dimSpace;
			(yyval.u).scaleSpace = (yyvsp[0].u).scaleSpace;
		    }
		    else if ((yyvsp[0].u).dimTime) {
			(yyval.u).dimTime = (yyvsp[0].u).dimTime;
			(yyval.u).scaleTime = (yyvsp[0].u).scaleTime;
		    }
		    else {
			(yyval.u).dimCount = (yyvsp[0].u).dimCount;
			(yyval.u).scaleCount = (yyvsp[0].u).scaleCount;
		    } }
#line 2691 "grammar.tab.c"
    break;

  case 148: /* units: units UNIT_SLASH unit  */
#line 755 "grammar.y"
                {   (yyval.u) = (yyvsp[-2].u);
		    if ((yyvsp[0].u).dimSpace) {
			(yyval.u).dimSpace = -(yyvsp[0].u).dimSpace;
			(yyval.u).scaleSpace = (yyvsp[0].u).scaleSpace;
		    }
		    else if ((yyvsp[0].u).dimTime) {
			(yyval.u).dimTime = -(yyvsp[0].u).dimTime;
			(yyval.u).scaleTime = (yyvsp[0].u).scaleTime;
		    }
		    else {
			(yyval.u).dimCount = -(yyvsp[0].u).dimCount;
			(yyval.u).scaleCount = (yyvsp[0].u).scaleCount;
		    } }
#line 2709 "grammar.tab.c"
    break;

  case 149: /* unit: SPACE_UNIT  */
#line 771 "grammar.y"
                {   (yyval.u) = (yyvsp[0].u); }
#line 2715 "grammar.tab.c"
    break;

  case 150: /* unit: SPACE_UNIT '^' NUMBER  */
#line 773 "grammar.y"
                {   (yyval.u) = (yyvsp[-2].u);
		    (yyval.u).dimSpace = (yyvsp[0].d); }
#line 2722 "grammar.tab.c"
    break;

  case 151: /* unit: TIME_UNIT  */
#line 776 "grammar.y"
                {   (yyval.u) = (yyvsp[0].u); }
#line 2728 "grammar.tab.c"
    break;

  case 152: /* unit: TIME_UNIT '^' NUMBER  */
#line 778 "grammar.y"
                {   (yyval.u) = (yyvsp[-2].u);
		    (yyval.u).dimTime = (yyvsp[0].d); }
#line 2735 "grammar.tab.c"
    break;

  case 153: /* unit: EVENT_UNIT  */
#line 781 "grammar.y"
                {   (yyval.u) = (yyvsp[0].u); }
#line 2741 "grammar.tab.c"
    break;

  case 154: /* unit: EVENT_UNIT '^' NUMBER  */
#line 783 "grammar.y"
                {   (yyval.u) = (yyvsp[-2].u);
		    (yyval.u).dimCount = (yyvsp[0].d); }
#line 2748 "grammar.tab.c"
    break;

  case 155: /* str: STRING  */
#line 788 "grammar.y"
                {   (yyval.x) = strConst((yyvsp[0].s)); free((yyvsp[0].s)); }
#line 2754 "grammar.tab.c"
    break;


#line 2758 "grammar.tab.c"

      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 ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;

  *++yyvsp = yyval;

  /* 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.  */
  {
    const int yylhs = yyr1[yyn] - YYNTOKENS;
    const int yyi = yypgoto[yylhs] + *yyssp;
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
               ? yytable[yyi]
               : yydefgoto[yylhs]);
  }

  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 ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (YY_("syntax error"));
    }

  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);
          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 when the user code never invokes YYERROR and the
     label yyerrorlab therefore never appears in user code.  */
  if (0)
    YYERROR;
  ++yynerrs;

  /* 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.  */

  /* Pop stack until we find a state that shifts the error token.  */
  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYSYMBOL_YYerror;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

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


      yydestruct ("Error: popping",
                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END


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

  yystate = yyn;
  goto yynewstate;


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


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


/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
`-----------------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  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);
    }
  /* 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",
                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif

  return yyresult;
}

#line 791 "grammar.y"


