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

/* Bison implementation for Yacc-like parsers in C
   
      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
   
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

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

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

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

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

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

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

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1

/* Using locations.  */
#define YYLSP_NEEDED 0



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

/* Line 268 of yacc.c  */
#line 1 "parser.y"

/*-------------------------------------------------------------------------
 * 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 268 of yacc.c  */
#line 122 "y.tab.c"

/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

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

/* Enabling the token table.  */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   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




#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{

/* Line 293 of yacc.c  */
#line 54 "parser.y"

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



/* Line 293 of yacc.c  */
#line 341 "y.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif


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


/* Line 343 of yacc.c  */
#line 353 "y.tab.c"

#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;
#elif (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif

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

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

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

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

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

/* Identity function, used to suppress warnings about constant conditions.  */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static int
YYID (int yyi)
#else
static int
YYID (yyi)
    int yyi;
#endif
{
  return yyi;
}
#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 && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#     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 (YYID (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 && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
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 (YYID (0))

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  YYSIZE_T yyi;				\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (YYID (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
/* YYNRULES -- Number of states.  */
#define YYNSTATES  349

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   341

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

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to 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
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const yytype_uint16 yyprhs[] =
{
       0,     0,     3,     7,    14,    16,    19,    28,    30,    33,
      35,    37,    39,    46,    54,    62,    69,    75,    81,    87,
      89,    92,    94,    96,    98,   100,   102,   104,   106,   108,
     110,   112,   114,   116,   118,   120,   122,   124,   126,   128,
     130,   132,   134,   136,   138,   140,   142,   144,   146,   148,
     150,   152,   154,   156,   158,   160,   163,   165,   167,   169,
     171,   176,   180,   185,   191,   196,   198,   201,   204,   209,
     214,   219,   226,   230,   236,   244,   249,   254,   259,   264,
     269,   274,   279,   284,   289,   294,   300,   306,   312,   318,
     324,   330,   335,   340,   345,   350,   355,   360,   365,   370,
     376,   382,   387,   391,   395,   397,   402,   404,   408,   412,
     416,   421,   426,   430,   434,   438,   443,   448,   453,   458,
     462,   466,   470,   474,   478,   482,   487,   492,   497,   502,
     508,   512,   516,   520,   524,   528,   532,   537,   541,   547,
     553,   557,   561,   565,   569,   574,   576,   578,   580,   582,
     584,   586,   588,   590,   592,   594,   596,   598,   600
};

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

/* 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 || YYTOKEN_TABLE
/* 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", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
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

/* 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 composing 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
};

/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
   Performed when YYTABLE doesn't 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
};

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

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -224
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
};

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

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -159
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
};

#define yypact_value_is_default(yystate) \
  ((yystate) == (-224))

#define yytable_value_is_error(yytable_value) \
  YYID (0)

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
};

#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


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  However,
   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
   discussed.  */

#define YYFAIL		goto yyerrlab
#if defined YYFAIL
  /* This is here to suppress warnings from the GCC cpp's
     -Wunused-macros.  Normally we don't worry about that warning, but
     some users do, and we want to make it easy for users to remove
     YYFAIL uses, which will produce warnings from Bison 2.5.  */
#endif

#define YYRECOVERING()  (!!yyerrstatus)

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


#define YYTERROR	1
#define YYERRCODE	256


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

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


/* This macro is provided for backward compatibility. */

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


/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
# define YYLEX yylex ()
#endif

/* 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 (YYID (0))

# 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 (YYID (0))


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

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
#endif
{
  if (!yyvaluep)
    return;
# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
  YYUSE (yyoutput);
# endif
  switch (yytype)
    {
      default:
	break;
    }
}


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

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
#endif
{
  if (yytype < YYNTOKENS)
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

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

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

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
yy_stack_print (yybottom, yytop)
    yytype_int16 *yybottom;
    yytype_int16 *yytop;
#endif
{
  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 (YYID (0))


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

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
static void
yy_reduce_print (yyvsp, yyrule)
    YYSTYPE *yyvsp;
    int yyrule;
#endif
{
  int yynrhs = yyr2[yyrule];
  int yyi;
  unsigned long int yylno = yyrline[yyrule];
  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, yyrhs[yyprhs[yyrule] + yyi],
		       &(yyvsp[(yyi + 1) - (yynrhs)])
		       		       );
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (yyvsp, Rule); \
} while (YYID (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.  */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
    const char *yystr;
#endif
{
  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.  */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
    char *yydest;
    const char *yysrc;
#endif
{
  char *yyd = yydest;
  const char *yys = yysrc;

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

  return yyd - 1;
}
#  endif
# endif

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

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

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

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

  if (! yyres)
    return yystrlen (yystr);

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

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

   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
   not large enough to hold the message.  In that case, also set
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
   required number of bytes is too large to store.  */
static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                yytype_int16 *yyssp, int yytoken)
{
  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
  YYSIZE_T yysize = yysize0;
  YYSIZE_T yysize1;
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  /* Internationalized format string. */
  const char *yyformat = 0;
  /* 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:
     - Assume YYFAIL is not used.  It's too flawed to consider.  See
       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
       for details.  YYERROR is fine as it does not invoke this
       function.
     - 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];
                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
                if (! (yysize <= yysize1
                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
                  return 2;
                yysize = yysize1;
              }
        }
    }

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

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

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

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

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

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yymsg, yytype, yyvaluep)
    const char *yymsg;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  YYUSE (yyvaluep);

  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  switch (yytype)
    {

      default:
	break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */


/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;


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

#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
    void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
    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 thru 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;
  /* 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;

  yytoken = 0;
  yyss = yyssa;
  yyvs = yyvsa;
  yystacksize = YYINITDEPTH;

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

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY; /* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */
  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

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

 yysetstate:
  *yyssp = yystate;

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

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

	/* 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 /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyexhaustedlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

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

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

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

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

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

  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;

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

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

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

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

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

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

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

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

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

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

  yystate = yyn;
  *++yyvsp = yylval;

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

						parser_script->clustername		= (yyvsp[(1) - (3)].str);
						parser_script->filename			= current_file;
						parser_script->adminfo_list		= (yyvsp[(2) - (3)].adm_info);
						parser_script->script_stmts		= (yyvsp[(3) - (3)].statement);
					}
    break;

  case 3:

/* Line 1806 of yacc.c  */
#line 241 "parser.y"
    {
						(yyval.str) = (yyvsp[(5) - (6)].str);
					}
    break;

  case 4:

/* Line 1806 of yacc.c  */
#line 247 "parser.y"
    { (yyval.adm_info) = (yyvsp[(1) - (1)].adm_info); }
    break;

  case 5:

/* Line 1806 of yacc.c  */
#line 249 "parser.y"
    { (yyvsp[(1) - (2)].adm_info)->next = (yyvsp[(2) - (2)].adm_info); (yyval.adm_info) = (yyvsp[(1) - (2)].adm_info); }
    break;

  case 6:

/* Line 1806 of yacc.c  */
#line 253 "parser.y"
    {
						SlonikAdmInfo	   *new;

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

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

						(yyval.adm_info) = new;
					}
    break;

  case 7:

/* Line 1806 of yacc.c  */
#line 271 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 8:

/* Line 1806 of yacc.c  */
#line 273 "parser.y"
    { (yyvsp[(1) - (2)].statement)->next = (yyvsp[(2) - (2)].statement); (yyval.statement) = (yyvsp[(1) - (2)].statement); }
    break;

  case 9:

/* Line 1806 of yacc.c  */
#line 277 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 10:

/* Line 1806 of yacc.c  */
#line 279 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 11:

/* Line 1806 of yacc.c  */
#line 281 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 12:

/* Line 1806 of yacc.c  */
#line 286 "parser.y"
    {
						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[(1) - (6)].ival);

						new->try_block = (yyvsp[(4) - (6)].statement);
						new->error_block = (yyvsp[(6) - (6)].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 13:

/* Line 1806 of yacc.c  */
#line 303 "parser.y"
    {
						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[(1) - (7)].ival);

						new->try_block = (yyvsp[(4) - (7)].statement);
						new->success_block = (yyvsp[(6) - (7)].statement);
						new->error_block = (yyvsp[(7) - (7)].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 14:

/* Line 1806 of yacc.c  */
#line 321 "parser.y"
    {
						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[(1) - (7)].ival);

						new->try_block = (yyvsp[(4) - (7)].statement);
						new->success_block = (yyvsp[(7) - (7)].statement);
						new->error_block = (yyvsp[(6) - (7)].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 15:

/* Line 1806 of yacc.c  */
#line 339 "parser.y"
    {
						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[(1) - (6)].ival);

						new->try_block = (yyvsp[(4) - (6)].statement);
						new->success_block = (yyvsp[(6) - (6)].statement);

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 16:

/* Line 1806 of yacc.c  */
#line 355 "parser.y"
    {
						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[(1) - (5)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 17:

/* Line 1806 of yacc.c  */
#line 372 "parser.y"
    { (yyval.statement) = (yyvsp[(4) - (5)].statement); }
    break;

  case 18:

/* Line 1806 of yacc.c  */
#line 375 "parser.y"
    { (yyval.statement) = (yyvsp[(4) - (5)].statement); }
    break;

  case 19:

/* Line 1806 of yacc.c  */
#line 379 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 20:

/* Line 1806 of yacc.c  */
#line 381 "parser.y"
    { (yyvsp[(1) - (2)].statement)->next = (yyvsp[(2) - (2)].statement); (yyval.statement) = (yyvsp[(1) - (2)].statement); }
    break;

  case 21:

/* Line 1806 of yacc.c  */
#line 385 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 22:

/* Line 1806 of yacc.c  */
#line 387 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 23:

/* Line 1806 of yacc.c  */
#line 389 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 24:

/* Line 1806 of yacc.c  */
#line 391 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 25:

/* Line 1806 of yacc.c  */
#line 393 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 26:

/* Line 1806 of yacc.c  */
#line 395 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 27:

/* Line 1806 of yacc.c  */
#line 397 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 28:

/* Line 1806 of yacc.c  */
#line 399 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 29:

/* Line 1806 of yacc.c  */
#line 401 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 30:

/* Line 1806 of yacc.c  */
#line 403 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 31:

/* Line 1806 of yacc.c  */
#line 405 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 32:

/* Line 1806 of yacc.c  */
#line 407 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 33:

/* Line 1806 of yacc.c  */
#line 409 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 34:

/* Line 1806 of yacc.c  */
#line 411 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 35:

/* Line 1806 of yacc.c  */
#line 413 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 36:

/* Line 1806 of yacc.c  */
#line 415 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 37:

/* Line 1806 of yacc.c  */
#line 417 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 38:

/* Line 1806 of yacc.c  */
#line 419 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 39:

/* Line 1806 of yacc.c  */
#line 421 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 40:

/* Line 1806 of yacc.c  */
#line 423 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 41:

/* Line 1806 of yacc.c  */
#line 425 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 42:

/* Line 1806 of yacc.c  */
#line 427 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 43:

/* Line 1806 of yacc.c  */
#line 429 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 44:

/* Line 1806 of yacc.c  */
#line 431 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 45:

/* Line 1806 of yacc.c  */
#line 433 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 46:

/* Line 1806 of yacc.c  */
#line 435 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 47:

/* Line 1806 of yacc.c  */
#line 437 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 48:

/* Line 1806 of yacc.c  */
#line 439 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 49:

/* Line 1806 of yacc.c  */
#line 441 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 50:

/* Line 1806 of yacc.c  */
#line 443 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 51:

/* Line 1806 of yacc.c  */
#line 445 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 52:

/* Line 1806 of yacc.c  */
#line 447 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 53:

/* Line 1806 of yacc.c  */
#line 449 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 54:

/* Line 1806 of yacc.c  */
#line 451 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 55:

/* Line 1806 of yacc.c  */
#line 453 "parser.y"
    { yyerrok;
						  (yyval.statement) = (yyvsp[(1) - (2)].statement); }
    break;

  case 56:

/* Line 1806 of yacc.c  */
#line 456 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 57:

/* Line 1806 of yacc.c  */
#line 458 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 58:

/* Line 1806 of yacc.c  */
#line 462 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 59:

/* Line 1806 of yacc.c  */
#line 464 "parser.y"
    { (yyval.statement) = (yyvsp[(1) - (1)].statement); }
    break;

  case 60:

/* Line 1806 of yacc.c  */
#line 468 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 61:

/* Line 1806 of yacc.c  */
#line 485 "parser.y"
    {
						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[(1) - (3)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 62:

/* Line 1806 of yacc.c  */
#line 511 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 63:

/* Line 1806 of yacc.c  */
#line 528 "parser.y"
    {
						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[(1) - (5)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 64:

/* Line 1806 of yacc.c  */
#line 544 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 65:

/* Line 1806 of yacc.c  */
#line 572 "parser.y"
    { (yyval.ival) = strtol(yytext, NULL, 10); }
    break;

  case 66:

/* Line 1806 of yacc.c  */
#line 574 "parser.y"
    { (yyval.ival) = -(yyvsp[(2) - (2)].ival); }
    break;

  case 67:

/* Line 1806 of yacc.c  */
#line 578 "parser.y"
    {
						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) - (2)].ival);

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 68:

/* Line 1806 of yacc.c  */
#line 593 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 69:

/* Line 1806 of yacc.c  */
#line 621 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 70:

/* Line 1806 of yacc.c  */
#line 651 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 71:

/* Line 1806 of yacc.c  */
#line 708 "parser.y"
    {
						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[(1) - (6)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 72:

/* Line 1806 of yacc.c  */
#line 723 "parser.y"
    {
						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[(1) - (3)].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[(3) - (3)].opt_list)) == 0)
						{
							new->nodes->no_id			= opt[0].ival;
							new->nodes->backup_node	= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 73:

/* Line 1806 of yacc.c  */
#line 754 "parser.y"
    {
						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[(4) - (5)].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->backup_node	= opt[1].ival;
						}
						else
							parser_errors++;

						(yyval.failed_node_entry) = new;

}
    break;

  case 74:

/* Line 1806 of yacc.c  */
#line 777 "parser.y"
    {
					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[(4) - (7)].opt_list)) == 0)
						{
							new->no_id			= opt[0].ival;
							new->backup_node	= opt[1].ival;
						}
						else
							parser_errors++;
						new->next=(yyvsp[(7) - (7)].failed_node_entry);
						(yyval.failed_node_entry) = new;

}
    break;

  case 75:

/* Line 1806 of yacc.c  */
#line 801 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 76:

/* Line 1806 of yacc.c  */
#line 827 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 77:

/* Line 1806 of yacc.c  */
#line 857 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 78:

/* Line 1806 of yacc.c  */
#line 885 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 79:

/* Line 1806 of yacc.c  */
#line 917 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 80:

/* Line 1806 of yacc.c  */
#line 947 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 81:

/* Line 1806 of yacc.c  */
#line 977 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 82:

/* Line 1806 of yacc.c  */
#line 1007 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 83:

/* Line 1806 of yacc.c  */
#line 1037 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 84:

/* Line 1806 of yacc.c  */
#line 1065 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 85:

/* Line 1806 of yacc.c  */
#line 1096 "parser.y"
    {
						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[(1) - (5)].ival);

						if (assign_options(opt, (yyvsp[(5) - (5)].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;
					}
    break;

  case 86:

/* Line 1806 of yacc.c  */
#line 1136 "parser.y"
    {
						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[(1) - (5)].ival);

						if (assign_options(opt, (yyvsp[(5) - (5)].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;
					}
    break;

  case 87:

/* Line 1806 of yacc.c  */
#line 1172 "parser.y"
    {
						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[(1) - (5)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 88:

/* Line 1806 of yacc.c  */
#line 1198 "parser.y"
    {
						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[(1) - (5)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 89:

/* Line 1806 of yacc.c  */
#line 1226 "parser.y"
    {
						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[(1) - (5)].ival);

						if (assign_options(opt, (yyvsp[(5) - (5)].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;
					}
    break;

  case 90:

/* Line 1806 of yacc.c  */
#line 1254 "parser.y"
    {
						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[(1) - (5)].ival);

						if (assign_options(opt, (yyvsp[(5) - (5)].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;
					}
    break;

  case 91:

/* Line 1806 of yacc.c  */
#line 1284 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 92:

/* Line 1806 of yacc.c  */
#line 1317 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 93:

/* Line 1806 of yacc.c  */
#line 1345 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 94:

/* Line 1806 of yacc.c  */
#line 1373 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 95:

/* Line 1806 of yacc.c  */
#line 1401 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 96:

/* Line 1806 of yacc.c  */
#line 1431 "parser.y"
    {
						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[(1) - (4)].ival);

						if (assign_options(opt, (yyvsp[(4) - (4)].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;
					}
    break;

  case 97:

/* Line 1806 of yacc.c  */
#line 1466 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 98:

/* Line 1806 of yacc.c  */
#line 1491 "parser.y"
    {
						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[(1) - (4)].ival);

                                                if (assign_options(opt, (yyvsp[(4) - (4)].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;
                                        }
    break;

  case 99:

/* Line 1806 of yacc.c  */
#line 1522 "parser.y"
    {
						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[(1) - (5)].ival);

						if (assign_options(opt, (yyvsp[(5) - (5)].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;
					}
    break;

  case 100:

/* Line 1806 of yacc.c  */
#line 1554 "parser.y"
    {
						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[(1) - (5)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 101:

/* Line 1806 of yacc.c  */
#line 1574 "parser.y"
    {
						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[(1) - (4)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 102:

/* Line 1806 of yacc.c  */
#line 1600 "parser.y"
    {
						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[(1) - (3)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 103:

/* Line 1806 of yacc.c  */
#line 1626 "parser.y"
    {
						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[(1) - (3)].ival);

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

						(yyval.statement) = (SlonikStmt *)new;
					}
    break;

  case 104:

/* Line 1806 of yacc.c  */
#line 1652 "parser.y"
    { (yyval.opt_list) = NULL; }
    break;

  case 105:

/* Line 1806 of yacc.c  */
#line 1654 "parser.y"
    { (yyval.opt_list) = (yyvsp[(2) - (4)].opt_list); }
    break;

  case 106:

/* Line 1806 of yacc.c  */
#line 1658 "parser.y"
    { (yyval.opt_list) = (yyvsp[(1) - (1)].opt_list); }
    break;

  case 107:

/* Line 1806 of yacc.c  */
#line 1660 "parser.y"
    { (yyvsp[(1) - (3)].opt_list)->next = (yyvsp[(3) - (3)].opt_list); (yyval.opt_list) = (yyvsp[(1) - (3)].opt_list); }
    break;

  case 108:

/* Line 1806 of yacc.c  */
#line 1664 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_ID;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 109:

/* Line 1806 of yacc.c  */
#line 1669 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code= O_ID;
						(yyval.opt_list)=(yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 110:

/* Line 1806 of yacc.c  */
#line 1674 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_BACKUP_NODE;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 111:

/* Line 1806 of yacc.c  */
#line 1679 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_EVENT_NODE;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 112:

/* Line 1806 of yacc.c  */
#line 1684 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_SERVER;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 113:

/* Line 1806 of yacc.c  */
#line 1689 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_CLIENT;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 114:

/* Line 1806 of yacc.c  */
#line 1694 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_ORIGIN;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 115:

/* Line 1806 of yacc.c  */
#line 1699 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_OLD_ORIGIN;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 116:

/* Line 1806 of yacc.c  */
#line 1704 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_OMIT_COPY;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 117:

/* Line 1806 of yacc.c  */
#line 1709 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_NEW_ORIGIN;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 118:

/* Line 1806 of yacc.c  */
#line 1714 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_NEW_SET;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 119:

/* Line 1806 of yacc.c  */
#line 1719 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_RECEIVER;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 120:

/* Line 1806 of yacc.c  */
#line 1724 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_PROVIDER;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 121:

/* Line 1806 of yacc.c  */
#line 1729 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_CONNRETRY;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 122:

/* Line 1806 of yacc.c  */
#line 1734 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_COMMENT;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 123:

/* Line 1806 of yacc.c  */
#line 1739 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_CONNINFO;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 124:

/* Line 1806 of yacc.c  */
#line 1744 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_DATE_FORMAT;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 125:

/* Line 1806 of yacc.c  */
#line 1749 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_SET_ID;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 126:

/* Line 1806 of yacc.c  */
#line 1754 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_ADD_ID;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 127:

/* Line 1806 of yacc.c  */
#line 1759 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_NODE_ID;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 128:

/* Line 1806 of yacc.c  */
#line 1764 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_TAB_ID;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 129:

/* Line 1806 of yacc.c  */
#line 1769 "parser.y"
    {
						(yyvsp[(5) - (5)].opt_list)->opt_code	= O_FQNAME;
						(yyval.opt_list) = (yyvsp[(5) - (5)].opt_list);
					}
    break;

  case 130:

/* Line 1806 of yacc.c  */
#line 1774 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_USE_KEY;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 131:

/* Line 1806 of yacc.c  */
#line 1779 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_FORWARD;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 132:

/* Line 1806 of yacc.c  */
#line 1784 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_FILENAME;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 133:

/* Line 1806 of yacc.c  */
#line 1789 "parser.y"
    {
						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;
					}
    break;

  case 134:

/* Line 1806 of yacc.c  */
#line 1802 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_WAIT_CONFIRMED;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 135:

/* Line 1806 of yacc.c  */
#line 1807 "parser.y"
    {
						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;
					}
    break;

  case 136:

/* Line 1806 of yacc.c  */
#line 1820 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code	= O_WAIT_ON;
						(yyval.opt_list) = (yyvsp[(4) - (4)].opt_list);
					}
    break;

  case 137:

/* Line 1806 of yacc.c  */
#line 1825 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_TIMEOUT;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 138:

/* Line 1806 of yacc.c  */
#line 1830 "parser.y"
    {
						(yyvsp[(5) - (5)].opt_list)->opt_code	= O_EXECUTE_ONLY_ON;
						(yyval.opt_list) = (yyvsp[(5) - (5)].opt_list);
					}
    break;

  case 139:

/* Line 1806 of yacc.c  */
#line 1835 "parser.y"
    {
						(yyvsp[(5) - (5)].opt_list)->opt_code	= O_EXECUTE_ONLY_LIST;
						(yyval.opt_list) = (yyvsp[(5) - (5)].opt_list);
					}
    break;

  case 140:

/* Line 1806 of yacc.c  */
#line 1840 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_SECONDS;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 141:

/* Line 1806 of yacc.c  */
#line 1845 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_SQL;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 142:

/* Line 1806 of yacc.c  */
#line 1850 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code	= O_TABLES;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 143:

/* Line 1806 of yacc.c  */
#line 1855 "parser.y"
    {
						(yyvsp[(3) - (3)].opt_list)->opt_code = O_SEQUENCES;
						(yyval.opt_list) = (yyvsp[(3) - (3)].opt_list);
					}
    break;

  case 144:

/* Line 1806 of yacc.c  */
#line 1860 "parser.y"
    {
						(yyvsp[(4) - (4)].opt_list)->opt_code=O_ADD_SEQUENCES;
						(yyval.opt_list)=(yyvsp[(4) - (4)].opt_list);

					}
    break;

  case 145:

/* Line 1806 of yacc.c  */
#line 1868 "parser.y"
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

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

						(yyval.opt_list) = new;
					}
    break;

  case 146:

/* Line 1806 of yacc.c  */
#line 1882 "parser.y"
    {
						option_list *new;
						new = (option_list *)malloc(sizeof(option_list));

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

						(yyval.opt_list) = new;
					}
    break;

  case 147:

/* Line 1806 of yacc.c  */
#line 1896 "parser.y"
    {
						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;
					}
    break;

  case 148:

/* Line 1806 of yacc.c  */
#line 1908 "parser.y"
    {
						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;
					}
    break;

  case 155:

/* Line 1806 of yacc.c  */
#line 1932 "parser.y"
    {
						(yyval.ival) = strtol(yytext, NULL, 10);
					}
    break;

  case 156:

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

						(yyval.str) = ret;
					}
    break;

  case 157:

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

						(yyval.str) = ret;
					}
    break;

  case 158:

/* Line 1806 of yacc.c  */
#line 1962 "parser.y"
    { (yyval.ival) = yylineno; }
    break;



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

  yyn = yyr1[yyn];

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

  goto yynewstate;


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

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



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

  /* Do not reclaim the symbols of the rule which 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);
    }

  *++yyvsp = yylval;


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

  yystate = yyn;
  goto yynewstate;


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

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

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

yyreturn:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval);
    }
  /* Do not reclaim the symbols of the rule which 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
  /* Make sure YYID is used.  */
  return YYID (yyresult);
}



/* Line 2067 of yacc.c  */
#line 1965 "parser.y"



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

