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

/* Bison implementation for Yacc-like parsers in C

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

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

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

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

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

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

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

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

/* Undocumented macros, especially those whose name start with YY_,
   are private implementation details.  Do not rely on them.  */

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

/* Bison version.  */
#define YYBISON_VERSION "3.3.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 1 "parser.y" /* yacc.c:337  */

/*-------------------------------------------------------------------------
 * parser.y
 *
 *	The slonik command language grammar
 *
 *	Copyright (c) 2003-2009, PostgreSQL Global Development Group
 *	Author: Jan Wieck, Afilias USA INC.
 *
 *	
 *-------------------------------------------------------------------------
 */

#include "types.h"
#include "libpq-fe.h"
#include "slonik.h"
#include "scan.h"


/*
 * Common per statement possible option strcture
 */
typedef struct statement_option {
	option_code	opt_code;
	int			lineno;
	int			ival;
	char	   *str;
} statement_option;
#define	STMT_OPTION_INT(_code,_dfl)		{_code, -1, _dfl, NULL}
#define	STMT_OPTION_STR(_code,_dfl)		{_code, -1, -1, _dfl}
#define	STMT_OPTION_YN(_code,_dfl)		{_code, -1, _dfl, NULL}
#define STMT_OPTION_END					{END_OF_OPTIONS, -1, -1, NULL}


/*
 * Global data
 */
char   *current_file = "<stdin>";
#ifdef DEBUG
int yydebug=1;
#endif
/*
 * Local functions
 */
static int	assign_options(statement_option *so, option_list *ol);




#line 120 "y.tab.c" /* yacc.c:337  */
# 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

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

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

/* Token type.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    K_ADD = 258,
    K_ADMIN = 259,
    K_ALL = 260,
    K_BACKUP = 261,
    K_CLIENT = 262,
    K_CLONE = 263,
    K_CLUSTER = 264,
    K_CLUSTERNAME = 265,
    K_COMMENT = 266,
    K_CONFIG = 267,
    K_CONFIRMED = 268,
    K_CONNINFO = 269,
    K_CONNRETRY = 270,
    K_COPY = 271,
    K_CREATE = 272,
    K_DATE = 273,
    K_DFORMAT = 274,
    K_DROP = 275,
    K_ECHO = 276,
    K_ERROR = 277,
    K_EVENT = 278,
    K_EXECUTE = 279,
    K_EXIT = 280,
    K_FAILOVER = 281,
    K_FALSE = 282,
    K_FILENAME = 283,
    K_FINISH = 284,
    K_FOR = 285,
    K_FORWARD = 286,
    K_FULL = 287,
    K_FUNCTIONS = 288,
    K_ID = 289,
    K_INIT = 290,
    K_KEY = 291,
    K_LISTEN = 292,
    K_LOCK = 293,
    K_LOG = 294,
    K_MERGE = 295,
    K_MOVE = 296,
    K_NAME = 297,
    K_NEW = 298,
    K_NO = 299,
    K_NODE = 300,
    K_OFF = 301,
    K_OLD = 302,
    K_ON = 303,
    K_ONLY = 304,
    K_ORIGIN = 305,
    K_PATH = 306,
    K_PREPARE = 307,
    K_PROVIDER = 308,
    K_QUALIFIED = 309,
    K_RECEIVER = 310,
    K_RESTART = 311,
    K_SCRIPT = 312,
    K_SEQUENCE = 313,
    K_SERVER = 314,
    K_SET = 315,
    K_SLEEP = 316,
    K_SQL = 317,
    K_STORE = 318,
    K_SUBSCRIBE = 319,
    K_SUCCESS = 320,
    K_SWITCH = 321,
    K_SYNC = 322,
    K_TABLE = 323,
    K_TIMEOUT = 324,
    K_TRUE = 325,
    K_TRY = 326,
    K_UNINSTALL = 327,
    K_UNLOCK = 328,
    K_UNSUBSCRIBE = 329,
    K_UPDATE = 330,
    K_WAIT = 331,
    K_YES = 332,
    K_OMIT = 333,
    K_REPAIR = 334,
    K_RESUBSCRIBE = 335,
    K_SECONDS = 336,
    K_SEQUENCES = 337,
    K_TABLES = 338,
    T_IDENT = 339,
    T_LITERAL = 340,
    T_NUMBER = 341
  };
#endif
/* Tokens.  */
#define K_ADD 258
#define K_ADMIN 259
#define K_ALL 260
#define K_BACKUP 261
#define K_CLIENT 262
#define K_CLONE 263
#define K_CLUSTER 264
#define K_CLUSTERNAME 265
#define K_COMMENT 266
#define K_CONFIG 267
#define K_CONFIRMED 268
#define K_CONNINFO 269
#define K_CONNRETRY 270
#define K_COPY 271
#define K_CREATE 272
#define K_DATE 273
#define K_DFORMAT 274
#define K_DROP 275
#define K_ECHO 276
#define K_ERROR 277
#define K_EVENT 278
#define K_EXECUTE 279
#define K_EXIT 280
#define K_FAILOVER 281
#define K_FALSE 282
#define K_FILENAME 283
#define K_FINISH 284
#define K_FOR 285
#define K_FORWARD 286
#define K_FULL 287
#define K_FUNCTIONS 288
#define K_ID 289
#define K_INIT 290
#define K_KEY 291
#define K_LISTEN 292
#define K_LOCK 293
#define K_LOG 294
#define K_MERGE 295
#define K_MOVE 296
#define K_NAME 297
#define K_NEW 298
#define K_NO 299
#define K_NODE 300
#define K_OFF 301
#define K_OLD 302
#define K_ON 303
#define K_ONLY 304
#define K_ORIGIN 305
#define K_PATH 306
#define K_PREPARE 307
#define K_PROVIDER 308
#define K_QUALIFIED 309
#define K_RECEIVER 310
#define K_RESTART 311
#define K_SCRIPT 312
#define K_SEQUENCE 313
#define K_SERVER 314
#define K_SET 315
#define K_SLEEP 316
#define K_SQL 317
#define K_STORE 318
#define K_SUBSCRIBE 319
#define K_SUCCESS 320
#define K_SWITCH 321
#define K_SYNC 322
#define K_TABLE 323
#define K_TIMEOUT 324
#define K_TRUE 325
#define K_TRY 326
#define K_UNINSTALL 327
#define K_UNLOCK 328
#define K_UNSUBSCRIBE 329
#define K_UPDATE 330
#define K_WAIT 331
#define K_YES 332
#define K_OMIT 333
#define K_REPAIR 334
#define K_RESUBSCRIBE 335
#define K_SECONDS 336
#define K_SEQUENCES 337
#define K_TABLES 338
#define T_IDENT 339
#define T_LITERAL 340
#define T_NUMBER 341

/* Value type.  */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED

union YYSTYPE
{
#line 54 "parser.y" /* yacc.c:352  */

	int32		ival;
	char		*str;
	option_list	*opt_list;
	SlonikAdmInfo	*adm_info;
	SlonikStmt	*statement;
	failed_node_entry * failed_node_entry;

#line 344 "y.tab.c" /* yacc.c:352  */
};

typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif


extern YYSTYPE yylval;

int yyparse (void);

#endif /* !YY_YY_Y_TAB_H_INCLUDED  */



#ifdef short
# undef short
#endif

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

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

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

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

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

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

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

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

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

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

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

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


#if ! defined yyoverflow || YYERROR_VERBOSE

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

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

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


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

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

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

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

# define YYCOPY_NEEDED 1

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

#endif

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

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

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  95
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  66
/* YYNRULES -- Number of rules.  */
#define YYNRULES  158
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  349

#define YYUNDEFTOK  2
#define YYMAXUTOK   341

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

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_uint8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      92,    93,     2,     2,    94,    91,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,    88,
       2,    87,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    89,     2,    90,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86
};

#if YYDEBUG
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
       0,   225,   225,   240,   246,   248,   252,   270,   272,   276,
     278,   280,   284,   301,   319,   337,   354,   371,   374,   378,
     380,   384,   386,   388,   390,   392,   394,   396,   398,   400,
     402,   404,   406,   408,   410,   412,   414,   416,   418,   420,
     422,   424,   426,   428,   430,   432,   434,   436,   438,   440,
     442,   444,   446,   448,   450,   452,   455,   457,   461,   463,
     467,   484,   510,   527,   543,   571,   573,   577,   592,   620,
     650,   707,   722,   753,   776,   800,   826,   856,   884,   916,
     946,   976,  1006,  1036,  1064,  1095,  1135,  1171,  1197,  1225,
    1253,  1283,  1316,  1344,  1372,  1400,  1430,  1465,  1490,  1521,
    1553,  1573,  1599,  1625,  1651,  1653,  1657,  1659,  1663,  1668,
    1673,  1678,  1683,  1688,  1693,  1698,  1703,  1708,  1713,  1718,
    1723,  1728,  1733,  1738,  1743,  1748,  1753,  1758,  1763,  1768,
    1773,  1778,  1783,  1788,  1801,  1806,  1819,  1824,  1829,  1834,
    1839,  1844,  1849,  1854,  1859,  1867,  1881,  1895,  1907,  1921,
    1922,  1923,  1926,  1927,  1928,  1931,  1937,  1949,  1962
};
#endif

#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "K_ADD", "K_ADMIN", "K_ALL", "K_BACKUP",
  "K_CLIENT", "K_CLONE", "K_CLUSTER", "K_CLUSTERNAME", "K_COMMENT",
  "K_CONFIG", "K_CONFIRMED", "K_CONNINFO", "K_CONNRETRY", "K_COPY",
  "K_CREATE", "K_DATE", "K_DFORMAT", "K_DROP", "K_ECHO", "K_ERROR",
  "K_EVENT", "K_EXECUTE", "K_EXIT", "K_FAILOVER", "K_FALSE", "K_FILENAME",
  "K_FINISH", "K_FOR", "K_FORWARD", "K_FULL", "K_FUNCTIONS", "K_ID",
  "K_INIT", "K_KEY", "K_LISTEN", "K_LOCK", "K_LOG", "K_MERGE", "K_MOVE",
  "K_NAME", "K_NEW", "K_NO", "K_NODE", "K_OFF", "K_OLD", "K_ON", "K_ONLY",
  "K_ORIGIN", "K_PATH", "K_PREPARE", "K_PROVIDER", "K_QUALIFIED",
  "K_RECEIVER", "K_RESTART", "K_SCRIPT", "K_SEQUENCE", "K_SERVER", "K_SET",
  "K_SLEEP", "K_SQL", "K_STORE", "K_SUBSCRIBE", "K_SUCCESS", "K_SWITCH",
  "K_SYNC", "K_TABLE", "K_TIMEOUT", "K_TRUE", "K_TRY", "K_UNINSTALL",
  "K_UNLOCK", "K_UNSUBSCRIBE", "K_UPDATE", "K_WAIT", "K_YES", "K_OMIT",
  "K_REPAIR", "K_RESUBSCRIBE", "K_SECONDS", "K_SEQUENCES", "K_TABLES",
  "T_IDENT", "T_LITERAL", "T_NUMBER", "'='", "';'", "'{'", "'}'", "'-'",
  "'('", "')'", "','", "$accept", "script", "hdr_clustername",
  "hdr_admconninfos", "hdr_admconninfo", "stmts", "stmt", "stmt_try",
  "try_on_error", "try_on_success", "try_stmts", "normal_stmt", "try_stmt",
  "stmt_echo", "stmt_date", "stmt_exit", "stmt_restart_node",
  "stmt_resubscribe_node", "exit_code", "stmt_error", "stmt_init_cluster",
  "stmt_store_node", "stmt_drop_node", "stmt_failed_node",
  "fail_node_list", "stmt_uninstall_node", "stmt_clone_prepare",
  "stmt_clone_finish", "stmt_store_path", "stmt_drop_path",
  "stmt_store_listen", "stmt_drop_listen", "stmt_create_set",
  "stmt_drop_set", "stmt_merge_set", "stmt_set_add_table",
  "stmt_set_add_sequence", "stmt_set_drop_table", "stmt_set_drop_sequence",
  "stmt_set_move_table", "stmt_set_move_sequence", "stmt_subscribe_set",
  "stmt_unsubscribe_set", "stmt_lock_set", "stmt_unlock_set",
  "stmt_move_set", "stmt_ddl_script", "stmt_update_functions",
  "stmt_repair_config", "stmt_wait_event", "stmt_wait_inside_try",
  "stmt_switch_log", "stmt_sync", "stmt_sleep", "option_list",
  "option_list_items", "option_list_item", "option_item_id",
  "option_item_literal", "option_item_yn", "option_item_yn_yes",
  "option_item_yn_no", "id", "ident", "literal", "lno", YY_NULLPTR
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
   (internal) symbol number NUM (which must be that of a token).  */
static const yytype_uint16 yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   340,   341,    61,    59,   123,
     125,    45,    40,    41,    44
};
# endif

#define YYPACT_NINF -224

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

#define YYTABLE_NINF -159

#define yytable_value_is_error(Yytable_value) \
  0

  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
     STATE-NUM.  */
static const yytype_int16 yypact[] =
{
    -224,    22,  -224,    18,  -224,  -224,   -16,    -7,     7,  -224,
       3,  -224,  -224,  -224,  -224,  -224,  -224,  -224,    14,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
    -224,   315,  -224,    17,    26,  -224,  -224,  -224,    -6,    45,
     -26,    39,    24,    58,    15,    16,   108,    67,    68,    69,
      73,    36,   -26,    38,    70,    92,   -26,    43,    88,    74,
      75,   103,   107,   126,    95,  -224,   137,    62,   -26,   -26,
     -26,  -224,   156,  -224,   -26,   -26,   -26,   -26,  -224,    59,
     -26,  -224,    15,    60,   239,  -224,   -26,   -26,   -26,   -26,
      17,   -11,    13,    42,  -224,   -26,   -26,   -26,   -26,   -26,
    -224,  -224,   -26,   -26,   -26,   -26,   127,   -26,   -26,   135,
    -224,    64,  -224,  -224,  -224,   -14,   109,    71,    77,    78,
      79,    81,    85,   111,   112,    87,    89,   106,    90,    91,
      47,   123,   131,    96,    98,    99,   102,   148,   104,   159,
     110,   146,   179,   115,   117,   118,   105,   113,  -224,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,   -13,   119,  -224,  -224,
    -224,  -224,   120,   -26,   -26,   -26,   -26,   -26,   -26,  -224,
    -224,  -224,  -224,  -224,   124,  -224,   129,  -224,   384,  -224,
    -224,  -224,  -224,   -26,  -224,  -224,   130,  -224,   133,   134,
     136,    17,    24,     8,    24,    17,    24,   139,   162,    24,
      21,   171,   -45,    24,   140,   141,   142,   143,    10,    17,
      17,    17,   144,    24,   149,    17,   153,   154,    17,    24,
      24,   145,   156,   151,   147,  -224,  -224,  -224,  -224,  -224,
    -224,  -224,   174,  -224,   214,  -224,    24,    17,    21,    17,
    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,    17,
     160,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
    -224,   161,  -224,  -224,  -224,    17,    17,    17,    17,  -224,
    -224,  -224,  -224,  -224,    17,  -224,    17,  -224,    17,    21,
    -224,  -224,  -224,  -224,  -224,   156,  -224,   -15,   201,   203,
     232,   168,  -224,  -224,  -224,  -224,   -45,    24,  -224,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,   164,   170,   172,   195,
    -224,   242,  -224,   -26,  -224,  -224,  -224,  -224,   178,  -224,
    -224,  -224,   220,   176,   184,   181,  -224,  -224,  -224
};

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

  /* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -224,  -224,  -224,   270,  -224,   -10,  -224,  -224,   -32,   -30,
      83,  -116,  -224,  -224,  -224,  -224,  -224,  -224,   183,  -224,
    -224,  -224,  -224,  -224,   -62,  -224,  -224,  -224,  -224,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
    -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
    -224,  -224,  -224,  -224,   -64,  -223,  -224,  -143,  -205,  -221,
    -224,  -224,   -37,  -224,   -60,     4
};

  /* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
      -1,     1,     2,     5,     6,     9,    10,    11,   308,   309,
     194,    12,   196,    13,    14,    15,    16,    17,   103,    18,
      19,    20,    21,    22,   177,    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,
     197,    48,    49,    50,    93,   166,   167,   260,   262,   278,
     279,   280,   261,   131,   263,    51
};

  /* 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[] =
{
      55,   105,    99,    -7,     3,   195,     7,   327,   114,   266,
       7,   268,   120,   264,   271,   289,    86,   283,   284,   304,
     208,   226,     4,    88,   132,   133,   134,     8,   295,  -158,
     168,   169,   170,   171,   301,   302,   173,   313,    53,   111,
      98,    85,   178,   179,   180,   181,    89,   183,   272,    54,
     328,   189,   190,   191,   192,   193,   112,   184,   199,   200,
     201,   202,    91,   204,   205,   273,    92,   274,   209,   275,
     265,   185,   267,   182,   243,   115,    94,   113,   325,   282,
     195,   186,   326,   116,    95,   290,   291,   292,   293,   117,
      96,   276,   297,    -7,    85,   300,    85,   224,   277,    97,
     187,   101,    56,    85,    91,    90,   102,   225,   104,    98,
     188,   336,   337,    87,   312,   100,   314,   106,   110,   246,
     247,   248,   249,   250,   251,   198,   315,   107,   108,   109,
     118,   119,   121,   122,   123,   124,   125,   126,   127,   255,
     128,   129,   318,   319,   320,   321,   130,   172,   175,   206,
     203,   322,   207,   323,   210,   324,   217,   226,   211,   135,
     221,   218,   136,   137,   212,   213,   214,   138,   215,   139,
     140,   141,   216,   335,   219,   142,   220,   222,   223,   143,
     144,   227,   232,   228,   145,   229,   230,   146,   147,   231,
     148,   233,   149,   234,   236,   237,   311,   235,   241,   150,
     198,   151,   238,   152,   239,   240,   153,   242,   245,   154,
     270,   155,   244,   281,   252,   156,   157,   256,   158,   -19,
     257,   258,   307,   259,   159,   160,   269,   285,   286,   287,
     288,   294,   161,   303,   162,   306,   296,   163,   164,   165,
     298,   299,   135,   305,   310,   136,   137,   316,   317,   329,
     138,   331,   139,   140,   141,   333,   334,   338,   142,   339,
     328,   340,   143,   144,   327,   345,   347,   145,   243,   341,
     146,   147,   342,   148,   348,   149,    52,   332,   330,   253,
     346,     0,   150,     0,   176,   174,   152,     0,     0,   153,
       0,     0,   154,     0,   155,     0,     0,     0,   156,   157,
       0,   158,     0,     0,     0,     0,     0,   159,   160,     0,
       0,     0,     0,     0,     0,   161,    57,   162,     0,     0,
     163,   164,   165,    58,     0,     0,     0,     0,     0,   343,
     344,     0,    59,    60,     0,    61,    62,     0,     0,    63,
      64,    65,     0,     0,     0,     0,     0,     0,     0,     0,
      66,     0,     0,    67,     0,    68,    69,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    70,     0,     0,     0,    71,    72,     0,    73,    74,
       0,    75,    76,     0,     0,    57,    77,    78,    79,    80,
      81,    82,    58,     0,    83,    84,     0,     0,     0,     0,
       0,    59,    60,     0,    61,    62,     0,     0,    63,    64,
      65,     0,     0,     0,     0,     0,     0,     0,     0,    66,
       0,     0,    67,     0,    68,    69,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      70,     0,     0,     0,    71,    72,     0,    73,    74,     0,
      75,    76,     0,     0,     0,     0,    78,    79,    80,    81,
     254,     0,     0,    83,    84
};

static const yytype_int16 yycheck[] =
{
      10,    65,    62,     0,     0,   121,     2,    22,    72,   214,
       6,   216,    76,     5,   219,     5,    53,   222,   223,   242,
      34,    34,     0,    29,    88,    89,    90,     9,   233,    45,
      94,    95,    96,    97,   239,   240,   100,   258,    45,     3,
      85,    86,   106,   107,   108,   109,    52,    58,    27,    42,
      65,   115,   116,   117,   118,   119,    20,    68,   122,   123,
     124,   125,    88,   127,   128,    44,    92,    46,    82,    48,
     213,    58,   215,   110,    87,    37,    37,    41,   299,   222,
     196,    68,   305,    45,    45,   228,   229,   230,   231,    51,
      51,    70,   235,    90,    86,   238,    86,    50,    77,    60,
      58,    86,    88,    86,    88,    60,    91,    60,    92,    85,
      68,   316,   317,    87,   257,    57,   259,     9,    45,   183,
     184,   185,   186,   187,   188,   121,   269,    60,    60,    60,
      60,    39,    89,    45,    60,    60,    33,    30,    12,   203,
      45,     4,   285,   286,   287,   288,    84,    88,    88,    14,
      23,   294,    88,   296,    45,   298,    45,    34,    87,     3,
      54,    49,     6,     7,    87,    87,    87,    11,    87,    13,
      14,    15,    87,   316,    87,    19,    87,    87,    87,    23,
      24,    50,    34,    87,    28,    87,    87,    31,    32,    87,
      34,    87,    36,    34,    48,    16,   256,    87,    93,    43,
     196,    45,    87,    47,    87,    87,    50,    94,    88,    53,
      48,    55,    93,    42,    90,    59,    60,    87,    62,    90,
      87,    87,    48,    87,    68,    69,    87,    87,    87,    87,
      87,    87,    76,    88,    78,    88,    87,    81,    82,    83,
      87,    87,     3,    92,    30,     6,     7,    87,    87,    48,
      11,    48,    13,    14,    15,    23,    88,    93,    19,    89,
      65,    89,    23,    24,    22,    45,    90,    28,    87,   333,
      31,    32,    94,    34,    90,    36,     6,   309,   308,   196,
     342,    -1,    43,    -1,    45,   102,    47,    -1,    -1,    50,
      -1,    -1,    53,    -1,    55,    -1,    -1,    -1,    59,    60,
      -1,    62,    -1,    -1,    -1,    -1,    -1,    68,    69,    -1,
      -1,    -1,    -1,    -1,    -1,    76,     1,    78,    -1,    -1,
      81,    82,    83,     8,    -1,    -1,    -1,    -1,    -1,   339,
     340,    -1,    17,    18,    -1,    20,    21,    -1,    -1,    24,
      25,    26,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      35,    -1,    -1,    38,    -1,    40,    41,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    56,    -1,    -1,    -1,    60,    61,    -1,    63,    64,
      -1,    66,    67,    -1,    -1,     1,    71,    72,    73,    74,
      75,    76,     8,    -1,    79,    80,    -1,    -1,    -1,    -1,
      -1,    17,    18,    -1,    20,    21,    -1,    -1,    24,    25,
      26,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    35,
      -1,    -1,    38,    -1,    40,    41,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      56,    -1,    -1,    -1,    60,    61,    -1,    63,    64,    -1,
      66,    67,    -1,    -1,    -1,    -1,    72,    73,    74,    75,
      76,    -1,    -1,    79,    80
};

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

  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const yytype_uint8 yyr1[] =
{
       0,    95,    96,    97,    98,    98,    99,   100,   100,   101,
     101,   101,   102,   102,   102,   102,   102,   103,   104,   105,
     105,   106,   106,   106,   106,   106,   106,   106,   106,   106,
     106,   106,   106,   106,   106,   106,   106,   106,   106,   106,
     106,   106,   106,   106,   106,   106,   106,   106,   106,   106,
     106,   106,   106,   106,   106,   106,   106,   106,   107,   107,
     108,   109,   110,   111,   112,   113,   113,   114,   115,   116,
     117,   118,   118,   119,   119,   120,   121,   122,   123,   124,
     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
     145,   146,   147,   148,   149,   149,   150,   150,   151,   151,
     151,   151,   151,   151,   151,   151,   151,   151,   151,   151,
     151,   151,   151,   151,   151,   151,   151,   151,   151,   151,
     151,   151,   151,   151,   151,   151,   151,   151,   151,   151,
     151,   151,   151,   151,   151,   152,   153,   154,   154,   155,
     155,   155,   156,   156,   156,   157,   158,   159,   160
};

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


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

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


#define YYRECOVERING()  (!!yyerrstatus)

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

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



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

/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif


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


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

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


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

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

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

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

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

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


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

static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
{
  unsigned long yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       yystos[yyssp[yyi + 1 - yynrhs]],
                       &yyvsp[(yyi + 1) - (yynrhs)]
                                              );
      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)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


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

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

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

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif


#if YYERROR_VERBOSE

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

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

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

  return yyd - 1;
}
#  endif
# endif

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

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

          case '\\':
            if (*++yyp != '\\')
              goto do_not_strip_quotes;
            else
              goto append;

          append:
          default:
            if (yyres)
              yyres[yyn] = *yyp;
            yyn++;
            break;

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

  if (! yyres)
    return yystrlen (yystr);

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

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

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

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

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

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

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

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

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

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

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

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YYUSE (yytype);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}




/* The lookahead symbol.  */
int yychar;

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


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

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

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

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

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

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

    YYSIZE_T yystacksize;

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

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

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

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

  yyssp = yyss = yyssa;
  yyvsp = yyvs = yyvsa;
  yystacksize = YYINITDEPTH;

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

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  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++;


/*--------------------------------------------------------------------.
| yynewstate -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  *yyssp = (yytype_int16) yystate;

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    goto yyexhaustedlab;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = (YYSIZE_T) (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.  */
        YYSTYPE *yyvs1 = yyvs;
        yytype_int16 *yyss1 = yyss;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow (YY_("memory exhausted"),
                    &yyss1, yysize * sizeof (*yyssp),
                    &yyvs1, yysize * sizeof (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

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

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

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

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

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

  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;


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

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

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

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

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

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

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

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

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

  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  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:
#line 228 "parser.y" /* yacc.c:1652  */
    {
						parser_script = (SlonikScript *)
								malloc(sizeof(SlonikScript));
						memset(parser_script, 0, sizeof(SlonikScript));

						parser_script->clustername		= (yyvsp[-2].str);
						parser_script->filename			= current_file;
						parser_script->adminfo_list		= (yyvsp[-1].adm_info);
						parser_script->script_stmts		= (yyvsp[0].statement);
					}
#line 1734 "y.tab.c" /* yacc.c:1652  */
    break;

  case 3:
#line 241 "parser.y" /* yacc.c:1652  */
    {
						(yyval.str) = (yyvsp[-1].str);
					}
#line 1742 "y.tab.c" /* yacc.c:1652  */
    break;

  case 4:
#line 247 "parser.y" /* yacc.c:1652  */
    { (yyval.adm_info) = (yyvsp[0].adm_info); }
#line 1748 "y.tab.c" /* yacc.c:1652  */
    break;

  case 5:
#line 249 "parser.y" /* yacc.c:1652  */
    { (yyvsp[-1].adm_info)->next = (yyvsp[0].adm_info); (yyval.adm_info) = (yyvsp[-1].adm_info); }
#line 1754 "y.tab.c" /* yacc.c:1652  */
    break;

  case 6:
#line 253 "parser.y" /* yacc.c:1652  */
    {
						SlonikAdmInfo	   *new;

						new = (SlonikAdmInfo *)
								malloc(sizeof(SlonikAdmInfo));
						memset(new, 0, sizeof(SlonikAdmInfo));

						new->no_id			= (yyvsp[-5].ival);
						new->stmt_filename	= current_file;
						new->stmt_lno		= (yyvsp[-7].ival);
						new->conninfo		= (yyvsp[-1].str);
						new->last_event		= -1;

						(yyval.adm_info) = new;
					}
#line 1774 "y.tab.c" /* yacc.c:1652  */
    break;

  case 7:
#line 271 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1780 "y.tab.c" /* yacc.c:1652  */
    break;

  case 8:
#line 273 "parser.y" /* yacc.c:1652  */
    { (yyvsp[-1].statement)->next = (yyvsp[0].statement); (yyval.statement) = (yyvsp[-1].statement); }
#line 1786 "y.tab.c" /* yacc.c:1652  */
    break;

  case 9:
#line 277 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1792 "y.tab.c" /* yacc.c:1652  */
    break;

  case 10:
#line 279 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1798 "y.tab.c" /* yacc.c:1652  */
    break;

  case 11:
#line 281 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1804 "y.tab.c" /* yacc.c:1652  */
    break;

  case 12:
#line 286 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_try *new;

						new = (SlonikStmt_try *)
								malloc(sizeof(SlonikStmt_try));
						memset(new, 0, sizeof(SlonikStmt_try));
						new->hdr.stmt_type		= STMT_TRY;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-5].ival);

						new->try_block = (yyvsp[-2].statement);
						new->error_block = (yyvsp[0].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 1824 "y.tab.c" /* yacc.c:1652  */
    break;

  case 13:
#line 303 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_try *new;

						new = (SlonikStmt_try *)
								malloc(sizeof(SlonikStmt_try));
						memset(new, 0, sizeof(SlonikStmt_try));
						new->hdr.stmt_type		= STMT_TRY;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-6].ival);

						new->try_block = (yyvsp[-3].statement);
						new->success_block = (yyvsp[-1].statement);
						new->error_block = (yyvsp[0].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 1845 "y.tab.c" /* yacc.c:1652  */
    break;

  case 14:
#line 321 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_try *new;

						new = (SlonikStmt_try *)
								malloc(sizeof(SlonikStmt_try));
						memset(new, 0, sizeof(SlonikStmt_try));
						new->hdr.stmt_type		= STMT_TRY;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-6].ival);

						new->try_block = (yyvsp[-3].statement);
						new->success_block = (yyvsp[0].statement);
						new->error_block = (yyvsp[-1].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 1866 "y.tab.c" /* yacc.c:1652  */
    break;

  case 15:
#line 339 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_try *new;

						new = (SlonikStmt_try *)
								malloc(sizeof(SlonikStmt_try));
						memset(new, 0, sizeof(SlonikStmt_try));
						new->hdr.stmt_type		= STMT_TRY;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-5].ival);

						new->try_block = (yyvsp[-2].statement);
						new->success_block = (yyvsp[0].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 1886 "y.tab.c" /* yacc.c:1652  */
    break;

  case 16:
#line 355 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_try *new;

						new = (SlonikStmt_try *)
								malloc(sizeof(SlonikStmt_try));
						memset(new, 0, sizeof(SlonikStmt_try));
						new->hdr.stmt_type		= STMT_TRY;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						new->try_block = (yyvsp[-1].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 1905 "y.tab.c" /* yacc.c:1652  */
    break;

  case 17:
#line 372 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[-1].statement); }
#line 1911 "y.tab.c" /* yacc.c:1652  */
    break;

  case 18:
#line 375 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[-1].statement); }
#line 1917 "y.tab.c" /* yacc.c:1652  */
    break;

  case 19:
#line 379 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1923 "y.tab.c" /* yacc.c:1652  */
    break;

  case 20:
#line 381 "parser.y" /* yacc.c:1652  */
    { (yyvsp[-1].statement)->next = (yyvsp[0].statement); (yyval.statement) = (yyvsp[-1].statement); }
#line 1929 "y.tab.c" /* yacc.c:1652  */
    break;

  case 21:
#line 385 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1935 "y.tab.c" /* yacc.c:1652  */
    break;

  case 22:
#line 387 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1941 "y.tab.c" /* yacc.c:1652  */
    break;

  case 23:
#line 389 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1947 "y.tab.c" /* yacc.c:1652  */
    break;

  case 24:
#line 391 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1953 "y.tab.c" /* yacc.c:1652  */
    break;

  case 25:
#line 393 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1959 "y.tab.c" /* yacc.c:1652  */
    break;

  case 26:
#line 395 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1965 "y.tab.c" /* yacc.c:1652  */
    break;

  case 27:
#line 397 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1971 "y.tab.c" /* yacc.c:1652  */
    break;

  case 28:
#line 399 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1977 "y.tab.c" /* yacc.c:1652  */
    break;

  case 29:
#line 401 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1983 "y.tab.c" /* yacc.c:1652  */
    break;

  case 30:
#line 403 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1989 "y.tab.c" /* yacc.c:1652  */
    break;

  case 31:
#line 405 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 1995 "y.tab.c" /* yacc.c:1652  */
    break;

  case 32:
#line 407 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2001 "y.tab.c" /* yacc.c:1652  */
    break;

  case 33:
#line 409 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2007 "y.tab.c" /* yacc.c:1652  */
    break;

  case 34:
#line 411 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2013 "y.tab.c" /* yacc.c:1652  */
    break;

  case 35:
#line 413 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2019 "y.tab.c" /* yacc.c:1652  */
    break;

  case 36:
#line 415 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2025 "y.tab.c" /* yacc.c:1652  */
    break;

  case 37:
#line 417 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2031 "y.tab.c" /* yacc.c:1652  */
    break;

  case 38:
#line 419 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2037 "y.tab.c" /* yacc.c:1652  */
    break;

  case 39:
#line 421 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2043 "y.tab.c" /* yacc.c:1652  */
    break;

  case 40:
#line 423 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2049 "y.tab.c" /* yacc.c:1652  */
    break;

  case 41:
#line 425 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2055 "y.tab.c" /* yacc.c:1652  */
    break;

  case 42:
#line 427 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2061 "y.tab.c" /* yacc.c:1652  */
    break;

  case 43:
#line 429 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2067 "y.tab.c" /* yacc.c:1652  */
    break;

  case 44:
#line 431 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2073 "y.tab.c" /* yacc.c:1652  */
    break;

  case 45:
#line 433 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2079 "y.tab.c" /* yacc.c:1652  */
    break;

  case 46:
#line 435 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2085 "y.tab.c" /* yacc.c:1652  */
    break;

  case 47:
#line 437 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2091 "y.tab.c" /* yacc.c:1652  */
    break;

  case 48:
#line 439 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2097 "y.tab.c" /* yacc.c:1652  */
    break;

  case 49:
#line 441 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2103 "y.tab.c" /* yacc.c:1652  */
    break;

  case 50:
#line 443 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2109 "y.tab.c" /* yacc.c:1652  */
    break;

  case 51:
#line 445 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2115 "y.tab.c" /* yacc.c:1652  */
    break;

  case 52:
#line 447 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2121 "y.tab.c" /* yacc.c:1652  */
    break;

  case 53:
#line 449 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2127 "y.tab.c" /* yacc.c:1652  */
    break;

  case 54:
#line 451 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2133 "y.tab.c" /* yacc.c:1652  */
    break;

  case 55:
#line 453 "parser.y" /* yacc.c:1652  */
    { yyerrok;
						  (yyval.statement) = (yyvsp[-1].statement); }
#line 2140 "y.tab.c" /* yacc.c:1652  */
    break;

  case 56:
#line 456 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2146 "y.tab.c" /* yacc.c:1652  */
    break;

  case 57:
#line 458 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2152 "y.tab.c" /* yacc.c:1652  */
    break;

  case 58:
#line 462 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2158 "y.tab.c" /* yacc.c:1652  */
    break;

  case 59:
#line 464 "parser.y" /* yacc.c:1652  */
    { (yyval.statement) = (yyvsp[0].statement); }
#line 2164 "y.tab.c" /* yacc.c:1652  */
    break;

  case 60:
#line 468 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_echo *new;

						new = (SlonikStmt_echo *)
								malloc(sizeof(SlonikStmt_echo));
						memset(new, 0, sizeof(SlonikStmt_echo));
						new->hdr.stmt_type		= STMT_ECHO;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						new->str = (yyvsp[-1].str);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2183 "y.tab.c" /* yacc.c:1652  */
    break;

  case 61:
#line 485 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_date *new;
						statement_option opt[] = {
							STMT_OPTION_STR( O_DATE_FORMAT, "%F %T"),
							STMT_OPTION_END
						};

						new = (SlonikStmt_date *)
								malloc(sizeof(SlonikStmt_date));
						memset(new, 0, sizeof(SlonikStmt_date));
						new->hdr.stmt_type		= STMT_DATE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-2].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->fmt = opt[0].str;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2211 "y.tab.c" /* yacc.c:1652  */
    break;

  case 62:
#line 511 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_exit *new;

						new = (SlonikStmt_exit *)
								malloc(sizeof(SlonikStmt_exit));
						memset(new, 0, sizeof(SlonikStmt_exit));
						new->hdr.stmt_type		= STMT_EXIT;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						new->exitcode = (yyvsp[-1].ival);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2230 "y.tab.c" /* yacc.c:1652  */
    break;

  case 63:
#line 528 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_restart_node *new;

						new = (SlonikStmt_restart_node *)
								malloc(sizeof(SlonikStmt_restart_node));
						memset(new, 0, sizeof(SlonikStmt_restart_node));
						new->hdr.stmt_type		= STMT_RESTART_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						new->no_id = (yyvsp[-1].ival);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2249 "y.tab.c" /* yacc.c:1652  */
    break;

  case 64:
#line 544 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_resubscribe_node * new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_PROVIDER, -1 ),
							STMT_OPTION_INT( O_RECEIVER, -1),
							STMT_OPTION_END
						};

						new = (SlonikStmt_resubscribe_node *)
								malloc(sizeof(SlonikStmt_resubscribe_node));
						memset(new, 0, sizeof(SlonikStmt_resubscribe_node));
						new->hdr.stmt_type		= STMT_RESUBSCRIBE_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_origin		= opt[0].ival;
							new->no_provider	= opt[1].ival;
							new->no_receiver	= opt[2].ival;
						}
						else
							parser_errors++;
						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2280 "y.tab.c" /* yacc.c:1652  */
    break;

  case 65:
#line 572 "parser.y" /* yacc.c:1652  */
    { (yyval.ival) = strtol(yytext, NULL, 10); }
#line 2286 "y.tab.c" /* yacc.c:1652  */
    break;

  case 66:
#line 574 "parser.y" /* yacc.c:1652  */
    { (yyval.ival) = -(yyvsp[0].ival); }
#line 2292 "y.tab.c" /* yacc.c:1652  */
    break;

  case 67:
#line 578 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt *new;

						new = (SlonikStmt *)
								malloc(sizeof(SlonikStmt));
						memset(new, 0, sizeof(SlonikStmt));
						new->stmt_type		= STMT_ERROR;
						new->stmt_filename	= current_file;
						new->stmt_lno		= (yyvsp[-1].ival);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2309 "y.tab.c" /* yacc.c:1652  */
    break;

  case 68:
#line 593 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_init_cluster *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_STR( O_COMMENT, "Initial Node" ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_init_cluster *)
								malloc(sizeof(SlonikStmt_init_cluster));
						memset(new, 0, sizeof(SlonikStmt_init_cluster));
						new->hdr.stmt_type		= STMT_INIT_CLUSTER;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->no_comment		= opt[1].str;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2339 "y.tab.c" /* yacc.c:1652  */
    break;

  case 69:
#line 621 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_store_node *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_STR( O_COMMENT, NULL ),
							STMT_OPTION_INT( O_EVENT_NODE, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_store_node *)
								malloc(sizeof(SlonikStmt_store_node));
						memset(new, 0, sizeof(SlonikStmt_store_node));
						new->hdr.stmt_type		= STMT_STORE_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->no_comment		= opt[1].str;
							new->ev_origin		= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2371 "y.tab.c" /* yacc.c:1652  */
    break;

  case 70:
#line 651 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_drop_node *new;
						statement_option opt[] = {
							STMT_OPTION_STR( O_ID, NULL ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_EVENT_NODE, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_drop_node *)
								malloc(sizeof(SlonikStmt_drop_node));
						memset(new, 0, sizeof(SlonikStmt_drop_node));
						new->hdr.stmt_type		= STMT_DROP_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							if(opt[0].ival > -1 )
							{
								new->no_id_list=malloc(sizeof(int)*2);
								new->no_id_list[0]=opt[0].ival;
								new->no_id_list[1]=-1;
							}
							else 
							{
								char * token;
								char * saveptr=NULL;
								int cnt;
								char * option_copy=strdup(opt[0].str);
								for(cnt=0,token=strtok_r(option_copy,",",
														 &saveptr);
									token != NULL; cnt++, 
										token=strtok_r(NULL,",",&saveptr));
								free(option_copy);
								new->no_id_list=malloc(sizeof(int)*(cnt+1));
								cnt=0;
								option_copy=strdup(opt[0].str);
								for(token=strtok_r(option_copy,",",&saveptr);
									token!=NULL;
									token=strtok_r(NULL,",",&saveptr))
								{
									new->no_id_list[cnt++]=atoi(token);
								}
								free(option_copy);
								new->no_id_list[cnt]=-1;
							}
							new->ev_origin		= opt[2].ival;
							
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2431 "y.tab.c" /* yacc.c:1652  */
    break;

  case 71:
#line 708 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_failed_node *new;
					
						new = (SlonikStmt_failed_node *)
								malloc(sizeof(SlonikStmt_failed_node));
						memset(new, 0, sizeof(SlonikStmt_failed_node));
						new->hdr.stmt_type		= STMT_FAILED_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-5].ival);

						new->nodes=(yyvsp[-2].failed_node_entry);

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2450 "y.tab.c" /* yacc.c:1652  */
    break;

  case 72:
#line 723 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_failed_node *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_failed_node *)
								malloc(sizeof(SlonikStmt_failed_node));
						memset(new, 0, sizeof(SlonikStmt_failed_node));
						new->hdr.stmt_type		= STMT_FAILED_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-2].ival);
						new->nodes=(failed_node_entry*)
							malloc(sizeof(failed_node_entry)*1);
						memset(new->nodes,0, sizeof(failed_node_entry));

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->nodes->no_id			= opt[0].ival;
							new->nodes->backup_node	= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2483 "y.tab.c" /* yacc.c:1652  */
    break;

  case 73:
#line 754 "parser.y" /* yacc.c:1652  */
    {
						failed_node_entry *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
							STMT_OPTION_END
						};

						new = (failed_node_entry *)
								malloc(sizeof(failed_node_entry));
						memset(new, 0, sizeof(failed_node_entry));
						if (assign_options(opt, (yyvsp[-1].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->backup_node	= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.failed_node_entry) = new;

}
#line 2510 "y.tab.c" /* yacc.c:1652  */
    break;

  case 74:
#line 777 "parser.y" /* yacc.c:1652  */
    {
					failed_node_entry *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
							STMT_OPTION_END
						};

						new = (failed_node_entry *)
								malloc(sizeof(failed_node_entry));
						memset(new, 0, sizeof(failed_node_entry));
						if (assign_options(opt, (yyvsp[-3].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->backup_node	= opt[1].ival;
						}
						else
							parser_errors++;
						new->next=(yyvsp[0].failed_node_entry);
						(yyval.failed_node_entry) = new;

}
#line 2537 "y.tab.c" /* yacc.c:1652  */
    break;

  case 75:
#line 801 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_uninstall_node *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_uninstall_node *)
								malloc(sizeof(SlonikStmt_uninstall_node));
						memset(new, 0, sizeof(SlonikStmt_uninstall_node));
						new->hdr.stmt_type		= STMT_UNINSTALL_NODE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2565 "y.tab.c" /* yacc.c:1652  */
    break;

  case 76:
#line 827 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_clone_prepare *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_PROVIDER, -1 ),
							STMT_OPTION_STR( O_COMMENT, NULL ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_clone_prepare *)
								malloc(sizeof(SlonikStmt_clone_prepare));
						memset(new, 0, sizeof(SlonikStmt_clone_prepare));
						new->hdr.stmt_type		= STMT_CLONE_PREPARE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->no_provider	= opt[1].ival;
							new->no_comment		= opt[2].str;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2597 "y.tab.c" /* yacc.c:1652  */
    break;

  case 77:
#line 857 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_clone_finish *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_PROVIDER, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_clone_finish *)
								malloc(sizeof(SlonikStmt_clone_finish));
						memset(new, 0, sizeof(SlonikStmt_clone_finish));
						new->hdr.stmt_type		= STMT_CLONE_FINISH;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->no_provider	= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2627 "y.tab.c" /* yacc.c:1652  */
    break;

  case 78:
#line 885 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_store_path *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_SERVER, -1 ),
							STMT_OPTION_INT( O_CLIENT, -1 ),
							STMT_OPTION_STR( O_CONNINFO, NULL ),
							STMT_OPTION_INT( O_CONNRETRY, 10 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_store_path *)
								malloc(sizeof(SlonikStmt_store_path));
						memset(new, 0, sizeof(SlonikStmt_store_path));
						new->hdr.stmt_type		= STMT_STORE_PATH;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->pa_server		= opt[0].ival;
							new->pa_client		= opt[1].ival;
							new->pa_conninfo	= opt[2].str;
							new->pa_connretry	= opt[3].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2661 "y.tab.c" /* yacc.c:1652  */
    break;

  case 79:
#line 917 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_drop_path *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_SERVER, -1 ),
							STMT_OPTION_INT( O_CLIENT, -1 ),
							STMT_OPTION_INT( O_EVENT_NODE, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_drop_path *)
								malloc(sizeof(SlonikStmt_drop_path));
						memset(new, 0, sizeof(SlonikStmt_drop_path));
						new->hdr.stmt_type		= STMT_DROP_PATH;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->pa_server		= opt[0].ival;
							new->pa_client		= opt[1].ival;
							new->ev_origin		= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2693 "y.tab.c" /* yacc.c:1652  */
    break;

  case 80:
#line 947 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_store_listen *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_RECEIVER, -1 ),
							STMT_OPTION_INT( O_PROVIDER, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_store_listen *)
								malloc(sizeof(SlonikStmt_store_listen));
						memset(new, 0, sizeof(SlonikStmt_store_listen));
						new->hdr.stmt_type		= STMT_STORE_LISTEN;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->li_origin		= opt[0].ival;
							new->li_receiver	= opt[1].ival;
							new->li_provider	= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2725 "y.tab.c" /* yacc.c:1652  */
    break;

  case 81:
#line 977 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_drop_listen *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_RECEIVER, -1 ),
							STMT_OPTION_INT( O_PROVIDER, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_drop_listen *)
								malloc(sizeof(SlonikStmt_drop_listen));
						memset(new, 0, sizeof(SlonikStmt_drop_listen));
						new->hdr.stmt_type		= STMT_DROP_LISTEN;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->li_origin		= opt[0].ival;
							new->li_receiver	= opt[1].ival;
							new->li_provider	= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2757 "y.tab.c" /* yacc.c:1652  */
    break;

  case 82:
#line 1007 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_create_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_STR( O_COMMENT, NULL ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_create_set *)
								malloc(sizeof(SlonikStmt_create_set));
						memset(new, 0, sizeof(SlonikStmt_create_set));
						new->hdr.stmt_type		= STMT_CREATE_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->set_origin		= opt[1].ival;
							new->set_comment	= opt[2].str;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2789 "y.tab.c" /* yacc.c:1652  */
    break;

  case 83:
#line 1037 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_drop_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_drop_set *)
								malloc(sizeof(SlonikStmt_drop_set));
						memset(new, 0, sizeof(SlonikStmt_drop_set));
						new->hdr.stmt_type		= STMT_DROP_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->set_origin		= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2819 "y.tab.c" /* yacc.c:1652  */
    break;

  case 84:
#line 1065 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_merge_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_ADD_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_merge_set *)
								malloc(sizeof(SlonikStmt_merge_set));
						memset(new, 0, sizeof(SlonikStmt_merge_set));
						new->hdr.stmt_type		= STMT_MERGE_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->add_id			= opt[1].ival;
							new->set_origin		= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2851 "y.tab.c" /* yacc.c:1652  */
    break;

  case 85:
#line 1096 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_set_add_table *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_SET_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_STR( O_FQNAME, NULL ),
							STMT_OPTION_STR( O_USE_KEY, NULL ),
							STMT_OPTION_STR( O_COMMENT, NULL ),
							STMT_OPTION_STR( O_TABLES,NULL),
							STMT_OPTION_YN(O_ADD_SEQUENCES,0),
							STMT_OPTION_END
						};

						new = (SlonikStmt_set_add_table *)
								malloc(sizeof(SlonikStmt_set_add_table));
						memset(new, 0, sizeof(SlonikStmt_set_add_table));
						new->hdr.stmt_type		= STMT_SET_ADD_TABLE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->set_origin		= opt[1].ival;
							new->tab_id			= opt[2].ival;
							new->tab_fqname		= opt[3].str;
							new->use_key		= opt[4].str;
							new->tab_comment	= opt[5].str;
							new->tables			= opt[6].str;
							new->add_sequences  = opt[7].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2893 "y.tab.c" /* yacc.c:1652  */
    break;

  case 86:
#line 1136 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_set_add_sequence *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_SET_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_STR( O_FQNAME, NULL ),
							STMT_OPTION_STR( O_COMMENT, NULL ),
							STMT_OPTION_STR( O_SEQUENCES, NULL),
							STMT_OPTION_END
						};

						new = (SlonikStmt_set_add_sequence *)
								malloc(sizeof(SlonikStmt_set_add_sequence));
						memset(new, 0, sizeof(SlonikStmt_set_add_sequence));
						new->hdr.stmt_type		= STMT_SET_ADD_SEQUENCE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->set_origin		= opt[1].ival;
							new->seq_id			= opt[2].ival;
							new->seq_fqname		= opt[3].str;
							new->seq_comment	= opt[4].str;
							new->sequences		= opt[5].str;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2931 "y.tab.c" /* yacc.c:1652  */
    break;

  case 87:
#line 1172 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_set_drop_table *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_END
						};
						new = (SlonikStmt_set_drop_table *)
							malloc(sizeof(SlonikStmt_set_drop_table));
						memset(new, 0, sizeof(SlonikStmt_set_drop_table));
						new->hdr.stmt_type		= STMT_SET_DROP_TABLE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0) {
							new->set_origin		= opt[0].ival;
							new->tab_id			= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2959 "y.tab.c" /* yacc.c:1652  */
    break;

  case 88:
#line 1198 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_set_drop_sequence *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_set_drop_sequence *)
								malloc(sizeof(SlonikStmt_set_drop_sequence));
						memset(new, 0, sizeof(SlonikStmt_set_drop_sequence));
						new->hdr.stmt_type		= STMT_SET_DROP_SEQUENCE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_origin		= opt[0].ival;
							new->seq_id			= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 2989 "y.tab.c" /* yacc.c:1652  */
    break;

  case 89:
#line 1226 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_set_move_table *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_NEW_SET, -1 ),
							STMT_OPTION_END
						};
						new = (SlonikStmt_set_move_table *)
							malloc(sizeof(SlonikStmt_set_move_table));
						memset(new, 0, sizeof(SlonikStmt_set_move_table));
						new->hdr.stmt_type		= STMT_SET_MOVE_TABLE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0) {
							new->set_origin		= opt[0].ival;
							new->tab_id			= opt[1].ival;
							new->new_set_id		= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3019 "y.tab.c" /* yacc.c:1652  */
    break;

  case 90:
#line 1254 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_set_move_sequence *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_NEW_SET, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_set_move_sequence *)
								malloc(sizeof(SlonikStmt_set_move_sequence));
						memset(new, 0, sizeof(SlonikStmt_set_move_sequence));
						new->hdr.stmt_type		= STMT_SET_MOVE_SEQUENCE;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_origin		= opt[0].ival;
							new->seq_id			= opt[1].ival;
							new->new_set_id		= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3051 "y.tab.c" /* yacc.c:1652  */
    break;

  case 91:
#line 1284 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_subscribe_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_PROVIDER, -1 ),
							STMT_OPTION_INT( O_RECEIVER, -1 ),
							STMT_OPTION_YN( O_FORWARD, 0 ),
							STMT_OPTION_YN( O_OMIT_COPY, 0 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_subscribe_set *)
								malloc(sizeof(SlonikStmt_subscribe_set));
						memset(new, 0, sizeof(SlonikStmt_subscribe_set));
						new->hdr.stmt_type		= STMT_SUBSCRIBE_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->sub_setid		= opt[0].ival;
							new->sub_provider	= opt[1].ival;
							new->sub_receiver	= opt[2].ival;
							new->sub_forward	= opt[3].ival;
							new->omit_copy      = opt[4].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3087 "y.tab.c" /* yacc.c:1652  */
    break;

  case 92:
#line 1317 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_unsubscribe_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_RECEIVER, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_unsubscribe_set *)
								malloc(sizeof(SlonikStmt_unsubscribe_set));
						memset(new, 0, sizeof(SlonikStmt_unsubscribe_set));
						new->hdr.stmt_type		= STMT_UNSUBSCRIBE_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->sub_setid		= opt[0].ival;
							new->sub_receiver	= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3117 "y.tab.c" /* yacc.c:1652  */
    break;

  case 93:
#line 1345 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_lock_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_lock_set *)
								malloc(sizeof(SlonikStmt_lock_set));
						memset(new, 0, sizeof(SlonikStmt_lock_set));
						new->hdr.stmt_type		= STMT_LOCK_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->set_origin		= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3147 "y.tab.c" /* yacc.c:1652  */
    break;

  case 94:
#line 1373 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_unlock_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_unlock_set *)
								malloc(sizeof(SlonikStmt_unlock_set));
						memset(new, 0, sizeof(SlonikStmt_unlock_set));
						new->hdr.stmt_type		= STMT_UNLOCK_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->set_origin		= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3177 "y.tab.c" /* yacc.c:1652  */
    break;

  case 95:
#line 1401 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_move_set *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_INT( O_OLD_ORIGIN, -1 ),
							STMT_OPTION_INT( O_NEW_ORIGIN, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_move_set *)
								malloc(sizeof(SlonikStmt_move_set));
						memset(new, 0, sizeof(SlonikStmt_move_set));
						new->hdr.stmt_type		= STMT_MOVE_SET;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id			= opt[0].ival;
							new->old_origin		= opt[1].ival;
							new->new_origin		= opt[2].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3209 "y.tab.c" /* yacc.c:1652  */
    break;

  case 96:
#line 1431 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_ddl_script *new;
						statement_option opt[] = {
							STMT_OPTION_STR( O_FILENAME, NULL ),
							STMT_OPTION_STR( O_SQL, NULL ),
							STMT_OPTION_INT( O_EVENT_NODE, -1 ),
							STMT_OPTION_STR( O_EXECUTE_ONLY_LIST, NULL ),
							STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_ddl_script *)
								malloc(sizeof(SlonikStmt_ddl_script));
						memset(new, 0, sizeof(SlonikStmt_ddl_script));
						new->hdr.stmt_type		= STMT_DDL_SCRIPT;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->ddl_fname		= opt[0].str;
							new->ddl_sql		= opt[1].str;
							new->ev_origin		= opt[2].ival;
							new->only_on_nodes	= opt[3].str;
							new->only_on_node   = opt[4].ival;
							new->ddl_fd			= NULL;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3246 "y.tab.c" /* yacc.c:1652  */
    break;

  case 97:
#line 1466 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_update_functions *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_update_functions *)
								malloc(sizeof(SlonikStmt_update_functions));
						memset(new, 0, sizeof(SlonikStmt_update_functions));
						new->hdr.stmt_type		= STMT_UPDATE_FUNCTIONS;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3274 "y.tab.c" /* yacc.c:1652  */
    break;

  case 98:
#line 1491 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_repair_config *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_SET_ID, -1 ),
							STMT_OPTION_INT( O_EVENT_NODE, -1 ),
							STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_repair_config *)
							malloc(sizeof(SlonikStmt_repair_config));
						memset(new, 0, sizeof(SlonikStmt_repair_config));
                                                new->hdr.stmt_type              = STMT_REPAIR_CONFIG;
                                                new->hdr.stmt_filename  = current_file;
                                                new->hdr.stmt_lno               = (yyvsp[-3].ival);

                                                if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->set_id		= opt[0].ival;
							new->ev_origin		= opt[1].ival;
							new->only_on_node	= opt[2].ival;
						}
						else
						{
							parser_errors++;
						}
                                                (yyval.statement) = (SlonikStmt *)new;
                                        }
#line 3307 "y.tab.c" /* yacc.c:1652  */
    break;

  case 99:
#line 1522 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_wait_event *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ORIGIN, -1 ),
							STMT_OPTION_INT( O_WAIT_CONFIRMED, -1 ),
							STMT_OPTION_INT( O_WAIT_ON, -1 ),
							STMT_OPTION_INT( O_TIMEOUT, 600 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_wait_event *)
								malloc(sizeof(SlonikStmt_wait_event));
						memset(new, 0, sizeof(SlonikStmt_wait_event));
						new->hdr.stmt_type		= STMT_WAIT_EVENT;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->wait_origin	= opt[0].ival;
							new->wait_confirmed	= opt[1].ival;
							new->wait_on		= opt[2].ival;
							new->wait_timeout	= opt[3].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3341 "y.tab.c" /* yacc.c:1652  */
    break;

  case 100:
#line 1554 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_wait_event *new;

						new = (SlonikStmt_wait_event *)
								malloc(sizeof(SlonikStmt_wait_event));
						memset(new, 0, sizeof(SlonikStmt_wait_event));
						new->hdr.stmt_type		= STMT_WAIT_EVENT;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-4].ival);

						fprintf(stderr, "%s:%d: wait for event "
								"not allowed inside try block\n",
								current_file, (yyvsp[-4].ival));
						parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3363 "y.tab.c" /* yacc.c:1652  */
    break;

  case 101:
#line 1574 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_switch_log *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_switch_log *)
								malloc(sizeof(SlonikStmt_switch_log));
						memset(new, 0, sizeof(SlonikStmt_switch_log));
						new->hdr.stmt_type		= STMT_SWITCH_LOG;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-3].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3391 "y.tab.c" /* yacc.c:1652  */
    break;

  case 102:
#line 1600 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_sync *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_ID, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_sync *)
								malloc(sizeof(SlonikStmt_sync));
						memset(new, 0, sizeof(SlonikStmt_sync));
						new->hdr.stmt_type		= STMT_SYNC;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-2].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3419 "y.tab.c" /* yacc.c:1652  */
    break;

  case 103:
#line 1626 "parser.y" /* yacc.c:1652  */
    {
						SlonikStmt_sleep *new;
						statement_option opt[] = {
							STMT_OPTION_INT( O_SECONDS, -1 ),
							STMT_OPTION_END
						};

						new = (SlonikStmt_sleep *)
								malloc(sizeof(SlonikStmt_sleep));
						memset(new, 0, sizeof(SlonikStmt_sleep));
						new->hdr.stmt_type		= STMT_SLEEP;
						new->hdr.stmt_filename	= current_file;
						new->hdr.stmt_lno		= (yyvsp[-2].ival);

						if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
						{
							new->num_secs			= opt[0].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
#line 3447 "y.tab.c" /* yacc.c:1652  */
    break;

  case 104:
#line 1652 "parser.y" /* yacc.c:1652  */
    { (yyval.opt_list) = NULL; }
#line 3453 "y.tab.c" /* yacc.c:1652  */
    break;

  case 105:
#line 1654 "parser.y" /* yacc.c:1652  */
    { (yyval.opt_list) = (yyvsp[-2].opt_list); }
#line 3459 "y.tab.c" /* yacc.c:1652  */
    break;

  case 106:
#line 1658 "parser.y" /* yacc.c:1652  */
    { (yyval.opt_list) = (yyvsp[0].opt_list); }
#line 3465 "y.tab.c" /* yacc.c:1652  */
    break;

  case 107:
#line 1660 "parser.y" /* yacc.c:1652  */
    { (yyvsp[-2].opt_list)->next = (yyvsp[0].opt_list); (yyval.opt_list) = (yyvsp[-2].opt_list); }
#line 3471 "y.tab.c" /* yacc.c:1652  */
    break;

  case 108:
#line 1664 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_ID;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3480 "y.tab.c" /* yacc.c:1652  */
    break;

  case 109:
#line 1669 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code= O_ID;
						(yyval.opt_list)=(yyvsp[0].opt_list);
					}
#line 3489 "y.tab.c" /* yacc.c:1652  */
    break;

  case 110:
#line 1674 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_BACKUP_NODE;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3498 "y.tab.c" /* yacc.c:1652  */
    break;

  case 111:
#line 1679 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_EVENT_NODE;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3507 "y.tab.c" /* yacc.c:1652  */
    break;

  case 112:
#line 1684 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_SERVER;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3516 "y.tab.c" /* yacc.c:1652  */
    break;

  case 113:
#line 1689 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_CLIENT;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3525 "y.tab.c" /* yacc.c:1652  */
    break;

  case 114:
#line 1694 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_ORIGIN;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3534 "y.tab.c" /* yacc.c:1652  */
    break;

  case 115:
#line 1699 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_OLD_ORIGIN;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3543 "y.tab.c" /* yacc.c:1652  */
    break;

  case 116:
#line 1704 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_OMIT_COPY;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3552 "y.tab.c" /* yacc.c:1652  */
    break;

  case 117:
#line 1709 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_NEW_ORIGIN;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3561 "y.tab.c" /* yacc.c:1652  */
    break;

  case 118:
#line 1714 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_NEW_SET;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3570 "y.tab.c" /* yacc.c:1652  */
    break;

  case 119:
#line 1719 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_RECEIVER;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3579 "y.tab.c" /* yacc.c:1652  */
    break;

  case 120:
#line 1724 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_PROVIDER;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3588 "y.tab.c" /* yacc.c:1652  */
    break;

  case 121:
#line 1729 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_CONNRETRY;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3597 "y.tab.c" /* yacc.c:1652  */
    break;

  case 122:
#line 1734 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_COMMENT;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3606 "y.tab.c" /* yacc.c:1652  */
    break;

  case 123:
#line 1739 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_CONNINFO;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3615 "y.tab.c" /* yacc.c:1652  */
    break;

  case 124:
#line 1744 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_DATE_FORMAT;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3624 "y.tab.c" /* yacc.c:1652  */
    break;

  case 125:
#line 1749 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_SET_ID;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3633 "y.tab.c" /* yacc.c:1652  */
    break;

  case 126:
#line 1754 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_ADD_ID;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3642 "y.tab.c" /* yacc.c:1652  */
    break;

  case 127:
#line 1759 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_NODE_ID;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3651 "y.tab.c" /* yacc.c:1652  */
    break;

  case 128:
#line 1764 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_TAB_ID;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3660 "y.tab.c" /* yacc.c:1652  */
    break;

  case 129:
#line 1769 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_FQNAME;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3669 "y.tab.c" /* yacc.c:1652  */
    break;

  case 130:
#line 1774 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_USE_KEY;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3678 "y.tab.c" /* yacc.c:1652  */
    break;

  case 131:
#line 1779 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_FORWARD;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3687 "y.tab.c" /* yacc.c:1652  */
    break;

  case 132:
#line 1784 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_FILENAME;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3696 "y.tab.c" /* yacc.c:1652  */
    break;

  case 133:
#line 1789 "parser.y" /* yacc.c:1652  */
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

						new->opt_code	= O_ORIGIN;
						new->ival	= -2;
						new->str	= NULL;
						new->lineno	= yylineno;
						new->next	= NULL;

						(yyval.opt_list) = new;
					}
#line 3713 "y.tab.c" /* yacc.c:1652  */
    break;

  case 134:
#line 1802 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_WAIT_CONFIRMED;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3722 "y.tab.c" /* yacc.c:1652  */
    break;

  case 135:
#line 1807 "parser.y" /* yacc.c:1652  */
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

						new->opt_code	= O_WAIT_CONFIRMED;
						new->ival	= -2;
						new->str	= NULL;
						new->lineno	= yylineno;
						new->next	= NULL;

						(yyval.opt_list) = new;
					}
#line 3739 "y.tab.c" /* yacc.c:1652  */
    break;

  case 136:
#line 1820 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_WAIT_ON;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3748 "y.tab.c" /* yacc.c:1652  */
    break;

  case 137:
#line 1825 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_TIMEOUT;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3757 "y.tab.c" /* yacc.c:1652  */
    break;

  case 138:
#line 1830 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_EXECUTE_ONLY_ON;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3766 "y.tab.c" /* yacc.c:1652  */
    break;

  case 139:
#line 1835 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_EXECUTE_ONLY_LIST;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3775 "y.tab.c" /* yacc.c:1652  */
    break;

  case 140:
#line 1840 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_SECONDS;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3784 "y.tab.c" /* yacc.c:1652  */
    break;

  case 141:
#line 1845 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_SQL;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3793 "y.tab.c" /* yacc.c:1652  */
    break;

  case 142:
#line 1850 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code	= O_TABLES;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3802 "y.tab.c" /* yacc.c:1652  */
    break;

  case 143:
#line 1855 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code = O_SEQUENCES;
						(yyval.opt_list) = (yyvsp[0].opt_list);
					}
#line 3811 "y.tab.c" /* yacc.c:1652  */
    break;

  case 144:
#line 1860 "parser.y" /* yacc.c:1652  */
    {
						(yyvsp[0].opt_list)->opt_code=O_ADD_SEQUENCES;
						(yyval.opt_list)=(yyvsp[0].opt_list);

					}
#line 3821 "y.tab.c" /* yacc.c:1652  */
    break;

  case 145:
#line 1868 "parser.y" /* yacc.c:1652  */
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

						new->ival	= (yyvsp[0].ival);
						new->str	= NULL;
						new->lineno	= yylineno;
						new->next	= NULL;

						(yyval.opt_list) = new;
					}
#line 3837 "y.tab.c" /* yacc.c:1652  */
    break;

  case 146:
#line 1882 "parser.y" /* yacc.c:1652  */
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

						new->ival	= -1;
						new->str	= (yyvsp[0].str);
						new->lineno	= yylineno;
						new->next	= NULL;

						(yyval.opt_list) = new;
					}
#line 3853 "y.tab.c" /* yacc.c:1652  */
    break;

  case 147:
#line 1896 "parser.y" /* yacc.c:1652  */
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

						new->ival	= 1;
						new->str	= NULL;
						new->lineno	= yylineno;
						new->next	= NULL;

						(yyval.opt_list) = new;
					}
#line 3869 "y.tab.c" /* yacc.c:1652  */
    break;

  case 148:
#line 1908 "parser.y" /* yacc.c:1652  */
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

						new->ival	= 0;
						new->str	= NULL;
						new->lineno	= yylineno;
						new->next	= NULL;

						(yyval.opt_list) = new;
					}
#line 3885 "y.tab.c" /* yacc.c:1652  */
    break;

  case 155:
#line 1932 "parser.y" /* yacc.c:1652  */
    {
						(yyval.ival) = strtol(yytext, NULL, 10);
					}
#line 3893 "y.tab.c" /* yacc.c:1652  */
    break;

  case 156:
#line 1938 "parser.y" /* yacc.c:1652  */
    {
						char   *ret;
						size_t toklen=yyget_leng();
						ret = malloc(yyget_leng() + 1);
						memcpy(ret, yytext, toklen);
						ret[toklen] = '\0';

						(yyval.str) = ret;
					}
#line 3907 "y.tab.c" /* yacc.c:1652  */
    break;

  case 157:
#line 1950 "parser.y" /* yacc.c:1652  */
    {
						char   *ret;
						size_t toklen=yyget_leng();
						ret = malloc(toklen + 1);
						memcpy(ret, yytext, toklen);
						ret[toklen] = '\0';

						(yyval.str) = ret;
					}
#line 3921 "y.tab.c" /* yacc.c:1652  */
    break;

  case 158:
#line 1962 "parser.y" /* yacc.c:1652  */
    { (yyval.ival) = yylineno; }
#line 3927 "y.tab.c" /* yacc.c:1652  */
    break;


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

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

  *++yyvsp = yyval;

  /* 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 ? YYEMPTY : YYTRANSLATE (yychar);

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



  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;

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


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

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

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


      yydestruct ("Error: popping",
                  yystos[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", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


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


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


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


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



/* ----------
 * option_str
 *
 *	Returns a string representation of a common option type
 * ----------
 */
static char *
option_str(option_code opt_code)
{
	switch (opt_code)
	{
		case O_ADD_ID:			return "add id";
		case O_ADD_SEQUENCES:	return "add sequences"; 
		case O_BACKUP_NODE:		return "backup node";
		case O_CLIENT:			return "client";
		case O_COMMENT:			return "comment";
		case O_CONNINFO:		return "conninfo";
		case O_CONNRETRY:		return "connretry";
		case O_DATE_FORMAT:		return "format";
		case O_EVENT_NODE:		return "event node";
		case O_EXECUTE_ONLY_ON:	return "execute only on";
		case O_EXECUTE_ONLY_LIST:	return "execute only on";
		case O_FILENAME:		return "filename";
		case O_FORWARD:			return "forward";
		case O_FQNAME:			return "full qualified name";
		case O_ID:				return "id";
		case O_NEW_ORIGIN:		return "new origin";
		case O_NEW_SET:			return "new set";
		case O_NODE_ID:			return "node id";
		case O_OLD_ORIGIN:		return "old origin";
		case O_OMIT_COPY:       return "omit copy";
		case O_ORIGIN:			return "origin";
		case O_PROVIDER:		return "provider";
		case O_RECEIVER:		return "receiver";
		case O_SECONDS:			return "seconds";
		case O_SEQUENCES:		return "sequences";
		case O_SERVER:			return "server";
		case O_SET_ID:			return "set id";
		case O_SQL:				return "sql";
		case O_TAB_ID:			return "table id";
		case O_TABLES:			return "tables";			
		case O_TIMEOUT:			return "timeout";
		case O_USE_KEY:			return "key";
		case O_WAIT_CONFIRMED:	return "confirmed";
		case O_WAIT_ON:			return "wait on";
		case END_OF_OPTIONS:	return "???";
	}
	return "???";
}

/* ----------
 * assign_options
 *
 *	Try to map the actually given options to the statements specific
 *	possible options.
 * ----------
 */
static int
assign_options(statement_option *so, option_list *ol)
{
	statement_option	   *s_opt;
	option_list			   *u_opt;
	int						errors = 0;

	for (u_opt = ol; u_opt; u_opt = u_opt->next)
	{
		for (s_opt = so; s_opt->opt_code >= 0; s_opt++)
		{
			if (s_opt->opt_code == u_opt->opt_code)
				break;
		}

		if (s_opt->opt_code < 0)
		{
			fprintf(stderr, "%s:%d: option %s not allowed here\n",
					current_file, u_opt->lineno,
					option_str(u_opt->opt_code));
			errors++;
			continue;
		}

		if (s_opt->lineno >= 0)
		{
			fprintf(stderr, "%s:%d: option %s already defined on line %d\n",
					current_file, u_opt->lineno,
					option_str(u_opt->opt_code), s_opt->lineno);
			errors++;
			continue;
		}

		s_opt->lineno	= u_opt->lineno;
		s_opt->ival		= u_opt->ival;
		s_opt->str		= u_opt->str;
	}

	return errors;
}


void
yyerror(const char *msg)
{
	fprintf(stderr, "%s:%d: ERROR: %s at or near %s\n", current_file,
				yylineno, msg, yytext);
	parser_errors++;
}





/*
 * Local Variables:
 *  tab-width: 4
 *  c-indent-level: 4
 *  c-basic-offset: 4
 * End:
 */
