1 /* A Bison parser, made by GNU Bison 3.3.2. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
44 /* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
46
47 /* Identify Bison output. */
48 #define YYBISON 1
49
50 /* Bison version. */
51 #define YYBISON_VERSION "3.3.2"
52
53 /* Skeleton name. */
54 #define YYSKELETON_NAME "yacc.c"
55
56 /* Pure parsers. */
57 #define YYPURE 0
58
59 /* Push parsers. */
60 #define YYPUSH 0
61
62 /* Pull parsers. */
63 #define YYPULL 1
64
65
66
67
68 /* First part of user prologue. */
69 #line 1 "parser.y" /* yacc.c:337 */
70
71 /*-------------------------------------------------------------------------
72 * parser.y
73 *
74 * The slonik command language grammar
75 *
76 * Copyright (c) 2003-2009, PostgreSQL Global Development Group
77 * Author: Jan Wieck, Afilias USA INC.
78 *
79 *
80 *-------------------------------------------------------------------------
81 */
82
83 #include "types.h"
84 #include "libpq-fe.h"
85 #include "slonik.h"
86 #include "scan.h"
87
88
89 /*
90 * Common per statement possible option strcture
91 */
92 typedef struct statement_option {
93 option_code opt_code;
94 int lineno;
95 int ival;
96 char *str;
97 } statement_option;
98 #define STMT_OPTION_INT(_code,_dfl) {_code, -1, _dfl, NULL}
99 #define STMT_OPTION_STR(_code,_dfl) {_code, -1, -1, _dfl}
100 #define STMT_OPTION_YN(_code,_dfl) {_code, -1, _dfl, NULL}
101 #define STMT_OPTION_END {END_OF_OPTIONS, -1, -1, NULL}
102
103
104 /*
105 * Global data
106 */
107 char *current_file = "<stdin>";
108 #ifdef DEBUG
109 int yydebug=1;
110 #endif
111 /*
112 * Local functions
113 */
114 static int assign_options(statement_option *so, option_list *ol);
115
116
117
118
119 #line 120 "y.tab.c" /* yacc.c:337 */
120 # ifndef YY_NULLPTR
121 # if defined __cplusplus
122 # if 201103L <= __cplusplus
123 # define YY_NULLPTR nullptr
124 # else
125 # define YY_NULLPTR 0
126 # endif
127 # else
128 # define YY_NULLPTR ((void*)0)
129 # endif
130 # endif
131
132 /* Enabling verbose error messages. */
133 #ifdef YYERROR_VERBOSE
134 # undef YYERROR_VERBOSE
135 # define YYERROR_VERBOSE 1
136 #else
137 # define YYERROR_VERBOSE 0
138 #endif
139
140 /* In a future release of Bison, this section will be replaced
141 by #include "y.tab.h". */
142 #ifndef YY_YY_Y_TAB_H_INCLUDED
143 # define YY_YY_Y_TAB_H_INCLUDED
144 /* Debug traces. */
145 #ifndef YYDEBUG
146 # define YYDEBUG 0
147 #endif
148 #if YYDEBUG
149 extern int yydebug;
150 #endif
151
152 /* Token type. */
153 #ifndef YYTOKENTYPE
154 # define YYTOKENTYPE
155 enum yytokentype
156 {
157 K_ADD = 258,
158 K_ADMIN = 259,
159 K_ALL = 260,
160 K_BACKUP = 261,
161 K_CLIENT = 262,
162 K_CLONE = 263,
163 K_CLUSTER = 264,
164 K_CLUSTERNAME = 265,
165 K_COMMENT = 266,
166 K_CONFIG = 267,
167 K_CONFIRMED = 268,
168 K_CONNINFO = 269,
169 K_CONNRETRY = 270,
170 K_COPY = 271,
171 K_CREATE = 272,
172 K_DATE = 273,
173 K_DFORMAT = 274,
174 K_DROP = 275,
175 K_ECHO = 276,
176 K_ERROR = 277,
177 K_EVENT = 278,
178 K_EXECUTE = 279,
179 K_EXIT = 280,
180 K_FAILOVER = 281,
181 K_FALSE = 282,
182 K_FILENAME = 283,
183 K_FINISH = 284,
184 K_FOR = 285,
185 K_FORWARD = 286,
186 K_FULL = 287,
187 K_FUNCTIONS = 288,
188 K_ID = 289,
189 K_INIT = 290,
190 K_KEY = 291,
191 K_LISTEN = 292,
192 K_LOCK = 293,
193 K_LOG = 294,
194 K_MERGE = 295,
195 K_MOVE = 296,
196 K_NAME = 297,
197 K_NEW = 298,
198 K_NO = 299,
199 K_NODE = 300,
200 K_OFF = 301,
201 K_OLD = 302,
202 K_ON = 303,
203 K_ONLY = 304,
204 K_ORIGIN = 305,
205 K_PATH = 306,
206 K_PREPARE = 307,
207 K_PROVIDER = 308,
208 K_QUALIFIED = 309,
209 K_RECEIVER = 310,
210 K_RESTART = 311,
211 K_SCRIPT = 312,
212 K_SEQUENCE = 313,
213 K_SERVER = 314,
214 K_SET = 315,
215 K_SLEEP = 316,
216 K_SQL = 317,
217 K_STORE = 318,
218 K_SUBSCRIBE = 319,
219 K_SUCCESS = 320,
220 K_SWITCH = 321,
221 K_SYNC = 322,
222 K_TABLE = 323,
223 K_TIMEOUT = 324,
224 K_TRUE = 325,
225 K_TRY = 326,
226 K_UNINSTALL = 327,
227 K_UNLOCK = 328,
228 K_UNSUBSCRIBE = 329,
229 K_UPDATE = 330,
230 K_WAIT = 331,
231 K_YES = 332,
232 K_OMIT = 333,
233 K_REPAIR = 334,
234 K_RESUBSCRIBE = 335,
235 K_SECONDS = 336,
236 K_SEQUENCES = 337,
237 K_TABLES = 338,
238 T_IDENT = 339,
239 T_LITERAL = 340,
240 T_NUMBER = 341
241 };
242 #endif
243 /* Tokens. */
244 #define K_ADD 258
245 #define K_ADMIN 259
246 #define K_ALL 260
247 #define K_BACKUP 261
248 #define K_CLIENT 262
249 #define K_CLONE 263
250 #define K_CLUSTER 264
251 #define K_CLUSTERNAME 265
252 #define K_COMMENT 266
253 #define K_CONFIG 267
254 #define K_CONFIRMED 268
255 #define K_CONNINFO 269
256 #define K_CONNRETRY 270
257 #define K_COPY 271
258 #define K_CREATE 272
259 #define K_DATE 273
260 #define K_DFORMAT 274
261 #define K_DROP 275
262 #define K_ECHO 276
263 #define K_ERROR 277
264 #define K_EVENT 278
265 #define K_EXECUTE 279
266 #define K_EXIT 280
267 #define K_FAILOVER 281
268 #define K_FALSE 282
269 #define K_FILENAME 283
270 #define K_FINISH 284
271 #define K_FOR 285
272 #define K_FORWARD 286
273 #define K_FULL 287
274 #define K_FUNCTIONS 288
275 #define K_ID 289
276 #define K_INIT 290
277 #define K_KEY 291
278 #define K_LISTEN 292
279 #define K_LOCK 293
280 #define K_LOG 294
281 #define K_MERGE 295
282 #define K_MOVE 296
283 #define K_NAME 297
284 #define K_NEW 298
285 #define K_NO 299
286 #define K_NODE 300
287 #define K_OFF 301
288 #define K_OLD 302
289 #define K_ON 303
290 #define K_ONLY 304
291 #define K_ORIGIN 305
292 #define K_PATH 306
293 #define K_PREPARE 307
294 #define K_PROVIDER 308
295 #define K_QUALIFIED 309
296 #define K_RECEIVER 310
297 #define K_RESTART 311
298 #define K_SCRIPT 312
299 #define K_SEQUENCE 313
300 #define K_SERVER 314
301 #define K_SET 315
302 #define K_SLEEP 316
303 #define K_SQL 317
304 #define K_STORE 318
305 #define K_SUBSCRIBE 319
306 #define K_SUCCESS 320
307 #define K_SWITCH 321
308 #define K_SYNC 322
309 #define K_TABLE 323
310 #define K_TIMEOUT 324
311 #define K_TRUE 325
312 #define K_TRY 326
313 #define K_UNINSTALL 327
314 #define K_UNLOCK 328
315 #define K_UNSUBSCRIBE 329
316 #define K_UPDATE 330
317 #define K_WAIT 331
318 #define K_YES 332
319 #define K_OMIT 333
320 #define K_REPAIR 334
321 #define K_RESUBSCRIBE 335
322 #define K_SECONDS 336
323 #define K_SEQUENCES 337
324 #define K_TABLES 338
325 #define T_IDENT 339
326 #define T_LITERAL 340
327 #define T_NUMBER 341
328
329 /* Value type. */
330 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
331
332 union YYSTYPE
333 {
334 #line 54 "parser.y" /* yacc.c:352 */
335
336 int32 ival;
337 char *str;
338 option_list *opt_list;
339 SlonikAdmInfo *adm_info;
340 SlonikStmt *statement;
341 failed_node_entry * failed_node_entry;
342
343 #line 344 "y.tab.c" /* yacc.c:352 */
344 };
345
346 typedef union YYSTYPE YYSTYPE;
347 # define YYSTYPE_IS_TRIVIAL 1
348 # define YYSTYPE_IS_DECLARED 1
349 #endif
350
351
352 extern YYSTYPE yylval;
353
354 int yyparse (void);
355
356 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
357
358
359
360 #ifdef short
361 # undef short
362 #endif
363
364 #ifdef YYTYPE_UINT8
365 typedef YYTYPE_UINT8 yytype_uint8;
366 #else
367 typedef unsigned char yytype_uint8;
368 #endif
369
370 #ifdef YYTYPE_INT8
371 typedef YYTYPE_INT8 yytype_int8;
372 #else
373 typedef signed char yytype_int8;
374 #endif
375
376 #ifdef YYTYPE_UINT16
377 typedef YYTYPE_UINT16 yytype_uint16;
378 #else
379 typedef unsigned short yytype_uint16;
380 #endif
381
382 #ifdef YYTYPE_INT16
383 typedef YYTYPE_INT16 yytype_int16;
384 #else
385 typedef short yytype_int16;
386 #endif
387
388 #ifndef YYSIZE_T
389 # ifdef __SIZE_TYPE__
390 # define YYSIZE_T __SIZE_TYPE__
391 # elif defined size_t
392 # define YYSIZE_T size_t
393 # elif ! defined YYSIZE_T
394 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
395 # define YYSIZE_T size_t
396 # else
397 # define YYSIZE_T unsigned
398 # endif
399 #endif
400
401 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
402
403 #ifndef YY_
404 # if defined YYENABLE_NLS && YYENABLE_NLS
405 # if ENABLE_NLS
406 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
407 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
408 # endif
409 # endif
410 # ifndef YY_
411 # define YY_(Msgid) Msgid
412 # endif
413 #endif
414
415 #ifndef YY_ATTRIBUTE
416 # if (defined __GNUC__ \
417 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
418 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
419 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
420 # else
421 # define YY_ATTRIBUTE(Spec) /* empty */
422 # endif
423 #endif
424
425 #ifndef YY_ATTRIBUTE_PURE
426 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
427 #endif
428
429 #ifndef YY_ATTRIBUTE_UNUSED
430 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
431 #endif
432
433 /* Suppress unused-variable warnings by "using" E. */
434 #if ! defined lint || defined __GNUC__
435 # define YYUSE(E) ((void) (E))
436 #else
437 # define YYUSE(E) /* empty */
438 #endif
439
440 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
441 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
442 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
443 _Pragma ("GCC diagnostic push") \
444 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
445 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
446 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
447 _Pragma ("GCC diagnostic pop")
448 #else
449 # define YY_INITIAL_VALUE(Value) Value
450 #endif
451 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
452 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
453 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
454 #endif
455 #ifndef YY_INITIAL_VALUE
456 # define YY_INITIAL_VALUE(Value) /* Nothing. */
457 #endif
458
459
460 #if ! defined yyoverflow || YYERROR_VERBOSE
461
462 /* The parser invokes alloca or malloc; define the necessary symbols. */
463
464 # ifdef YYSTACK_USE_ALLOCA
465 # if YYSTACK_USE_ALLOCA
466 # ifdef __GNUC__
467 # define YYSTACK_ALLOC __builtin_alloca
468 # elif defined __BUILTIN_VA_ARG_INCR
469 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
470 # elif defined _AIX
471 # define YYSTACK_ALLOC __alloca
472 # elif defined _MSC_VER
473 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
474 # define alloca _alloca
475 # else
476 # define YYSTACK_ALLOC alloca
477 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
478 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
479 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
480 # ifndef EXIT_SUCCESS
481 # define EXIT_SUCCESS 0
482 # endif
483 # endif
484 # endif
485 # endif
486 # endif
487
488 # ifdef YYSTACK_ALLOC
489 /* Pacify GCC's 'empty if-body' warning. */
490 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
491 # ifndef YYSTACK_ALLOC_MAXIMUM
492 /* The OS might guarantee only one guard page at the bottom of the stack,
493 and a page size can be as small as 4096 bytes. So we cannot safely
494 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
495 to allow for a few compiler-allocated temporary stack slots. */
496 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
497 # endif
498 # else
499 # define YYSTACK_ALLOC YYMALLOC
500 # define YYSTACK_FREE YYFREE
501 # ifndef YYSTACK_ALLOC_MAXIMUM
502 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
503 # endif
504 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
505 && ! ((defined YYMALLOC || defined malloc) \
506 && (defined YYFREE || defined free)))
507 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
508 # ifndef EXIT_SUCCESS
509 # define EXIT_SUCCESS 0
510 # endif
511 # endif
512 # ifndef YYMALLOC
513 # define YYMALLOC malloc
514 # if ! defined malloc && ! defined EXIT_SUCCESS
515 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
516 # endif
517 # endif
518 # ifndef YYFREE
519 # define YYFREE free
520 # if ! defined free && ! defined EXIT_SUCCESS
521 void free (void *); /* INFRINGES ON USER NAME SPACE */
522 # endif
523 # endif
524 # endif
525 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
526
527
528 #if (! defined yyoverflow \
529 && (! defined __cplusplus \
530 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
531
532 /* A type that is properly aligned for any stack member. */
533 union yyalloc
534 {
535 yytype_int16 yyss_alloc;
536 YYSTYPE yyvs_alloc;
537 };
538
539 /* The size of the maximum gap between one aligned stack and the next. */
540 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
541
542 /* The size of an array large to enough to hold all stacks, each with
543 N elements. */
544 # define YYSTACK_BYTES(N) \
545 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
546 + YYSTACK_GAP_MAXIMUM)
547
548 # define YYCOPY_NEEDED 1
549
550 /* Relocate STACK from its old location to the new one. The
551 local variables YYSIZE and YYSTACKSIZE give the old and new number of
552 elements in the stack, and YYPTR gives the new location of the
553 stack. Advance YYPTR to a properly aligned location for the next
554 stack. */
555 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
556 do \
557 { \
558 YYSIZE_T yynewbytes; \
559 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
560 Stack = &yyptr->Stack_alloc; \
561 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
562 yyptr += yynewbytes / sizeof (*yyptr); \
563 } \
564 while (0)
565
566 #endif
567
568 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
569 /* Copy COUNT objects from SRC to DST. The source and destination do
570 not overlap. */
571 # ifndef YYCOPY
572 # if defined __GNUC__ && 1 < __GNUC__
573 # define YYCOPY(Dst, Src, Count) \
574 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
575 # else
576 # define YYCOPY(Dst, Src, Count) \
577 do \
578 { \
579 YYSIZE_T yyi; \
580 for (yyi = 0; yyi < (Count); yyi++) \
581 (Dst)[yyi] = (Src)[yyi]; \
582 } \
583 while (0)
584 # endif
585 # endif
586 #endif /* !YYCOPY_NEEDED */
587
588 /* YYFINAL -- State number of the termination state. */
589 #define YYFINAL 4
590 /* YYLAST -- Last index in YYTABLE. */
591 #define YYLAST 464
592
593 /* YYNTOKENS -- Number of terminals. */
594 #define YYNTOKENS 95
595 /* YYNNTS -- Number of nonterminals. */
596 #define YYNNTS 66
597 /* YYNRULES -- Number of rules. */
598 #define YYNRULES 158
599 /* YYNSTATES -- Number of states. */
600 #define YYNSTATES 349
601
602 #define YYUNDEFTOK 2
603 #define YYMAXUTOK 341
604
605 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
606 as returned by yylex, with out-of-bounds checking. */
607 #define YYTRANSLATE(YYX) \
608 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
609
610 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
611 as returned by yylex. */
612 static const yytype_uint8 yytranslate[] =
613 {
614 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 92, 93, 2, 2, 94, 91, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 88,
620 2, 87, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 89, 2, 90, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
640 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
641 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
642 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
643 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
644 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
645 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
646 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
647 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
648 85, 86
649 };
650
651 #if YYDEBUG
652 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
653 static const yytype_uint16 yyrline[] =
654 {
655 0, 225, 225, 240, 246, 248, 252, 270, 272, 276,
656 278, 280, 284, 301, 319, 337, 354, 371, 374, 378,
657 380, 384, 386, 388, 390, 392, 394, 396, 398, 400,
658 402, 404, 406, 408, 410, 412, 414, 416, 418, 420,
659 422, 424, 426, 428, 430, 432, 434, 436, 438, 440,
660 442, 444, 446, 448, 450, 452, 455, 457, 461, 463,
661 467, 484, 510, 527, 543, 571, 573, 577, 592, 620,
662 650, 707, 722, 753, 776, 800, 826, 856, 884, 916,
663 946, 976, 1006, 1036, 1064, 1095, 1135, 1171, 1197, 1225,
664 1253, 1283, 1316, 1344, 1372, 1400, 1430, 1465, 1490, 1521,
665 1553, 1573, 1599, 1625, 1651, 1653, 1657, 1659, 1663, 1668,
666 1673, 1678, 1683, 1688, 1693, 1698, 1703, 1708, 1713, 1718,
667 1723, 1728, 1733, 1738, 1743, 1748, 1753, 1758, 1763, 1768,
668 1773, 1778, 1783, 1788, 1801, 1806, 1819, 1824, 1829, 1834,
669 1839, 1844, 1849, 1854, 1859, 1867, 1881, 1895, 1907, 1921,
670 1922, 1923, 1926, 1927, 1928, 1931, 1937, 1949, 1962
671 };
672 #endif
673
674 #if YYDEBUG || YYERROR_VERBOSE || 0
675 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
676 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
677 static const char *const yytname[] =
678 {
679 "$end", "error", "$undefined", "K_ADD", "K_ADMIN", "K_ALL", "K_BACKUP",
680 "K_CLIENT", "K_CLONE", "K_CLUSTER", "K_CLUSTERNAME", "K_COMMENT",
681 "K_CONFIG", "K_CONFIRMED", "K_CONNINFO", "K_CONNRETRY", "K_COPY",
682 "K_CREATE", "K_DATE", "K_DFORMAT", "K_DROP", "K_ECHO", "K_ERROR",
683 "K_EVENT", "K_EXECUTE", "K_EXIT", "K_FAILOVER", "K_FALSE", "K_FILENAME",
684 "K_FINISH", "K_FOR", "K_FORWARD", "K_FULL", "K_FUNCTIONS", "K_ID",
685 "K_INIT", "K_KEY", "K_LISTEN", "K_LOCK", "K_LOG", "K_MERGE", "K_MOVE",
686 "K_NAME", "K_NEW", "K_NO", "K_NODE", "K_OFF", "K_OLD", "K_ON", "K_ONLY",
687 "K_ORIGIN", "K_PATH", "K_PREPARE", "K_PROVIDER", "K_QUALIFIED",
688 "K_RECEIVER", "K_RESTART", "K_SCRIPT", "K_SEQUENCE", "K_SERVER", "K_SET",
689 "K_SLEEP", "K_SQL", "K_STORE", "K_SUBSCRIBE", "K_SUCCESS", "K_SWITCH",
690 "K_SYNC", "K_TABLE", "K_TIMEOUT", "K_TRUE", "K_TRY", "K_UNINSTALL",
691 "K_UNLOCK", "K_UNSUBSCRIBE", "K_UPDATE", "K_WAIT", "K_YES", "K_OMIT",
692 "K_REPAIR", "K_RESUBSCRIBE", "K_SECONDS", "K_SEQUENCES", "K_TABLES",
693 "T_IDENT", "T_LITERAL", "T_NUMBER", "'='", "';'", "'{'", "'}'", "'-'",
694 "'('", "')'", "','", "$accept", "script", "hdr_clustername",
695 "hdr_admconninfos", "hdr_admconninfo", "stmts", "stmt", "stmt_try",
696 "try_on_error", "try_on_success", "try_stmts", "normal_stmt", "try_stmt",
697 "stmt_echo", "stmt_date", "stmt_exit", "stmt_restart_node",
698 "stmt_resubscribe_node", "exit_code", "stmt_error", "stmt_init_cluster",
699 "stmt_store_node", "stmt_drop_node", "stmt_failed_node",
700 "fail_node_list", "stmt_uninstall_node", "stmt_clone_prepare",
701 "stmt_clone_finish", "stmt_store_path", "stmt_drop_path",
702 "stmt_store_listen", "stmt_drop_listen", "stmt_create_set",
703 "stmt_drop_set", "stmt_merge_set", "stmt_set_add_table",
704 "stmt_set_add_sequence", "stmt_set_drop_table", "stmt_set_drop_sequence",
705 "stmt_set_move_table", "stmt_set_move_sequence", "stmt_subscribe_set",
706 "stmt_unsubscribe_set", "stmt_lock_set", "stmt_unlock_set",
707 "stmt_move_set", "stmt_ddl_script", "stmt_update_functions",
708 "stmt_repair_config", "stmt_wait_event", "stmt_wait_inside_try",
709 "stmt_switch_log", "stmt_sync", "stmt_sleep", "option_list",
710 "option_list_items", "option_list_item", "option_item_id",
711 "option_item_literal", "option_item_yn", "option_item_yn_yes",
712 "option_item_yn_no", "id", "ident", "literal", "lno", YY_NULLPTR
713 };
714 #endif
715
716 # ifdef YYPRINT
717 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
718 (internal) symbol number NUM (which must be that of a token). */
719 static const yytype_uint16 yytoknum[] =
720 {
721 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
722 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
723 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
724 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
725 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
726 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
727 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
728 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
729 335, 336, 337, 338, 339, 340, 341, 61, 59, 123,
730 125, 45, 40, 41, 44
731 };
732 # endif
733
734 #define YYPACT_NINF -224
735
736 #define yypact_value_is_default(Yystate) \
737 (!!((Yystate) == (-224)))
738
739 #define YYTABLE_NINF -159
740
741 #define yytable_value_is_error(Yytable_value) \
742 0
743
744 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
745 STATE-NUM. */
746 static const yytype_int16 yypact[] =
747 {
748 -224, 22, -224, 18, -224, -224, -16, -7, 7, -224,
749 3, -224, -224, -224, -224, -224, -224, -224, 14, -224,
750 -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
751 -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
752 -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
753 -224, 315, -224, 17, 26, -224, -224, -224, -6, 45,
754 -26, 39, 24, 58, 15, 16, 108, 67, 68, 69,
755 73, 36, -26, 38, 70, 92, -26, 43, 88, 74,
756 75, 103, 107, 126, 95, -224, 137, 62, -26, -26,
757 -26, -224, 156, -224, -26, -26, -26, -26, -224, 59,
758 -26, -224, 15, 60, 239, -224, -26, -26, -26, -26,
759 17, -11, 13, 42, -224, -26, -26, -26, -26, -26,
760 -224, -224, -26, -26, -26, -26, 127, -26, -26, 135,
761 -224, 64, -224, -224, -224, -14, 109, 71, 77, 78,
762 79, 81, 85, 111, 112, 87, 89, 106, 90, 91,
763 47, 123, 131, 96, 98, 99, 102, 148, 104, 159,
764 110, 146, 179, 115, 117, 118, 105, 113, -224, -224,
765 -224, -224, -224, -224, -224, -224, -13, 119, -224, -224,
766 -224, -224, 120, -26, -26, -26, -26, -26, -26, -224,
767 -224, -224, -224, -224, 124, -224, 129, -224, 384, -224,
768 -224, -224, -224, -26, -224, -224, 130, -224, 133, 134,
769 136, 17, 24, 8, 24, 17, 24, 139, 162, 24,
770 21, 171, -45, 24, 140, 141, 142, 143, 10, 17,
771 17, 17, 144, 24, 149, 17, 153, 154, 17, 24,
772 24, 145, 156, 151, 147, -224, -224, -224, -224, -224,
773 -224, -224, 174, -224, 214, -224, 24, 17, 21, 17,
774 -224, -224, -224, -224, -224, -224, -224, -224, -224, 17,
775 160, -224, -224, -224, -224, -224, -224, -224, -224, -224,
776 -224, 161, -224, -224, -224, 17, 17, 17, 17, -224,
777 -224, -224, -224, -224, 17, -224, 17, -224, 17, 21,
778 -224, -224, -224, -224, -224, 156, -224, -15, 201, 203,
779 232, 168, -224, -224, -224, -224, -45, 24, -224, -224,
780 -224, -224, -224, -224, -224, -224, 164, 170, 172, 195,
781 -224, 242, -224, -26, -224, -224, -224, -224, 178, -224,
782 -224, -224, 220, 176, 184, 181, -224, -224, -224
783 };
784
785 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
786 Performed when YYTABLE does not specify something else to do. Zero
787 means the default is an error. */
788 static const yytype_uint8 yydefact[] =
789 {
790 158, 0, 158, 0, 1, 158, 4, 0, 0, 2,
791 158, 9, 10, 21, 22, 23, 24, 53, 0, 25,
792 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
793 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
794 46, 47, 48, 49, 50, 51, 52, 11, 54, 56,
795 57, 0, 5, 0, 0, 8, 55, 67, 0, 0,
796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
798 0, 0, 0, 0, 0, 155, 0, 0, 0, 0,
799 0, 104, 0, 61, 0, 0, 0, 0, 157, 0,
800 0, 65, 0, 0, 0, 72, 0, 0, 0, 0,
801 0, 0, 0, 0, 103, 0, 0, 0, 0, 0,
802 102, 158, 0, 0, 0, 0, 0, 0, 0, 0,
803 156, 0, 77, 76, 82, 0, 0, 0, 0, 0,
804 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
806 0, 0, 0, 0, 0, 0, 0, 106, 81, 70,
807 79, 83, 60, 96, 66, 62, 0, 0, 68, 93,
808 84, 95, 0, 0, 0, 0, 0, 0, 0, 80,
809 69, 78, 91, 101, 0, 58, 158, 59, 0, 75,
810 94, 92, 97, 0, 98, 64, 0, 3, 0, 0,
811 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
812 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
814 0, 0, 0, 0, 0, 63, 86, 85, 88, 87,
815 90, 89, 16, 20, 0, 99, 0, 0, 0, 0,
816 113, 145, 122, 146, 135, 134, 123, 121, 124, 0,
817 0, 132, 154, 152, 153, 150, 151, 149, 131, 147,
818 148, 0, 108, 109, 130, 0, 0, 0, 0, 133,
819 114, 120, 119, 112, 0, 141, 0, 137, 0, 0,
820 140, 143, 142, 105, 107, 0, 71, 0, 12, 15,
821 0, 0, 126, 144, 110, 111, 0, 0, 117, 118,
822 127, 115, 125, 128, 136, 116, 0, 0, 0, 0,
823 14, 0, 13, 0, 6, 138, 139, 129, 73, 158,
824 158, 100, 0, 0, 0, 0, 74, 17, 18
825 };
826
827 /* YYPGOTO[NTERM-NUM]. */
828 static const yytype_int16 yypgoto[] =
829 {
830 -224, -224, -224, 270, -224, -10, -224, -224, -32, -30,
831 83, -116, -224, -224, -224, -224, -224, -224, 183, -224,
832 -224, -224, -224, -224, -62, -224, -224, -224, -224, -224,
833 -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
834 -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
835 -224, -224, -224, -224, -64, -223, -224, -143, -205, -221,
836 -224, -224, -37, -224, -60, 4
837 };
838
839 /* YYDEFGOTO[NTERM-NUM]. */
840 static const yytype_int16 yydefgoto[] =
841 {
842 -1, 1, 2, 5, 6, 9, 10, 11, 308, 309,
843 194, 12, 196, 13, 14, 15, 16, 17, 103, 18,
844 19, 20, 21, 22, 177, 23, 24, 25, 26, 27,
845 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
846 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
847 197, 48, 49, 50, 93, 166, 167, 260, 262, 278,
848 279, 280, 261, 131, 263, 51
849 };
850
851 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
852 positive, shift that token. If negative, reduce the rule whose
853 number is the opposite. If YYTABLE_NINF, syntax error. */
854 static const yytype_int16 yytable[] =
855 {
856 55, 105, 99, -7, 3, 195, 7, 327, 114, 266,
857 7, 268, 120, 264, 271, 289, 86, 283, 284, 304,
858 208, 226, 4, 88, 132, 133, 134, 8, 295, -158,
859 168, 169, 170, 171, 301, 302, 173, 313, 53, 111,
860 98, 85, 178, 179, 180, 181, 89, 183, 272, 54,
861 328, 189, 190, 191, 192, 193, 112, 184, 199, 200,
862 201, 202, 91, 204, 205, 273, 92, 274, 209, 275,
863 265, 185, 267, 182, 243, 115, 94, 113, 325, 282,
864 195, 186, 326, 116, 95, 290, 291, 292, 293, 117,
865 96, 276, 297, -7, 85, 300, 85, 224, 277, 97,
866 187, 101, 56, 85, 91, 90, 102, 225, 104, 98,
867 188, 336, 337, 87, 312, 100, 314, 106, 110, 246,
868 247, 248, 249, 250, 251, 198, 315, 107, 108, 109,
869 118, 119, 121, 122, 123, 124, 125, 126, 127, 255,
870 128, 129, 318, 319, 320, 321, 130, 172, 175, 206,
871 203, 322, 207, 323, 210, 324, 217, 226, 211, 135,
872 221, 218, 136, 137, 212, 213, 214, 138, 215, 139,
873 140, 141, 216, 335, 219, 142, 220, 222, 223, 143,
874 144, 227, 232, 228, 145, 229, 230, 146, 147, 231,
875 148, 233, 149, 234, 236, 237, 311, 235, 241, 150,
876 198, 151, 238, 152, 239, 240, 153, 242, 245, 154,
877 270, 155, 244, 281, 252, 156, 157, 256, 158, -19,
878 257, 258, 307, 259, 159, 160, 269, 285, 286, 287,
879 288, 294, 161, 303, 162, 306, 296, 163, 164, 165,
880 298, 299, 135, 305, 310, 136, 137, 316, 317, 329,
881 138, 331, 139, 140, 141, 333, 334, 338, 142, 339,
882 328, 340, 143, 144, 327, 345, 347, 145, 243, 341,
883 146, 147, 342, 148, 348, 149, 52, 332, 330, 253,
884 346, 0, 150, 0, 176, 174, 152, 0, 0, 153,
885 0, 0, 154, 0, 155, 0, 0, 0, 156, 157,
886 0, 158, 0, 0, 0, 0, 0, 159, 160, 0,
887 0, 0, 0, 0, 0, 161, 57, 162, 0, 0,
888 163, 164, 165, 58, 0, 0, 0, 0, 0, 343,
889 344, 0, 59, 60, 0, 61, 62, 0, 0, 63,
890 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
891 66, 0, 0, 67, 0, 68, 69, 0, 0, 0,
892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
893 0, 70, 0, 0, 0, 71, 72, 0, 73, 74,
894 0, 75, 76, 0, 0, 57, 77, 78, 79, 80,
895 81, 82, 58, 0, 83, 84, 0, 0, 0, 0,
896 0, 59, 60, 0, 61, 62, 0, 0, 63, 64,
897 65, 0, 0, 0, 0, 0, 0, 0, 0, 66,
898 0, 0, 67, 0, 68, 69, 0, 0, 0, 0,
899 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
900 70, 0, 0, 0, 71, 72, 0, 73, 74, 0,
901 75, 76, 0, 0, 0, 0, 78, 79, 80, 81,
902 254, 0, 0, 83, 84
903 };
904
905 static const yytype_int16 yycheck[] =
906 {
907 10, 65, 62, 0, 0, 121, 2, 22, 72, 214,
908 6, 216, 76, 5, 219, 5, 53, 222, 223, 242,
909 34, 34, 0, 29, 88, 89, 90, 9, 233, 45,
910 94, 95, 96, 97, 239, 240, 100, 258, 45, 3,
911 85, 86, 106, 107, 108, 109, 52, 58, 27, 42,
912 65, 115, 116, 117, 118, 119, 20, 68, 122, 123,
913 124, 125, 88, 127, 128, 44, 92, 46, 82, 48,
914 213, 58, 215, 110, 87, 37, 37, 41, 299, 222,
915 196, 68, 305, 45, 45, 228, 229, 230, 231, 51,
916 51, 70, 235, 90, 86, 238, 86, 50, 77, 60,
917 58, 86, 88, 86, 88, 60, 91, 60, 92, 85,
918 68, 316, 317, 87, 257, 57, 259, 9, 45, 183,
919 184, 185, 186, 187, 188, 121, 269, 60, 60, 60,
920 60, 39, 89, 45, 60, 60, 33, 30, 12, 203,
921 45, 4, 285, 286, 287, 288, 84, 88, 88, 14,
922 23, 294, 88, 296, 45, 298, 45, 34, 87, 3,
923 54, 49, 6, 7, 87, 87, 87, 11, 87, 13,
924 14, 15, 87, 316, 87, 19, 87, 87, 87, 23,
925 24, 50, 34, 87, 28, 87, 87, 31, 32, 87,
926 34, 87, 36, 34, 48, 16, 256, 87, 93, 43,
927 196, 45, 87, 47, 87, 87, 50, 94, 88, 53,
928 48, 55, 93, 42, 90, 59, 60, 87, 62, 90,
929 87, 87, 48, 87, 68, 69, 87, 87, 87, 87,
930 87, 87, 76, 88, 78, 88, 87, 81, 82, 83,
931 87, 87, 3, 92, 30, 6, 7, 87, 87, 48,
932 11, 48, 13, 14, 15, 23, 88, 93, 19, 89,
933 65, 89, 23, 24, 22, 45, 90, 28, 87, 333,
934 31, 32, 94, 34, 90, 36, 6, 309, 308, 196,
935 342, -1, 43, -1, 45, 102, 47, -1, -1, 50,
936 -1, -1, 53, -1, 55, -1, -1, -1, 59, 60,
937 -1, 62, -1, -1, -1, -1, -1, 68, 69, -1,
938 -1, -1, -1, -1, -1, 76, 1, 78, -1, -1,
939 81, 82, 83, 8, -1, -1, -1, -1, -1, 339,
940 340, -1, 17, 18, -1, 20, 21, -1, -1, 24,
941 25, 26, -1, -1, -1, -1, -1, -1, -1, -1,
942 35, -1, -1, 38, -1, 40, 41, -1, -1, -1,
943 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
944 -1, 56, -1, -1, -1, 60, 61, -1, 63, 64,
945 -1, 66, 67, -1, -1, 1, 71, 72, 73, 74,
946 75, 76, 8, -1, 79, 80, -1, -1, -1, -1,
947 -1, 17, 18, -1, 20, 21, -1, -1, 24, 25,
948 26, -1, -1, -1, -1, -1, -1, -1, -1, 35,
949 -1, -1, 38, -1, 40, 41, -1, -1, -1, -1,
950 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
951 56, -1, -1, -1, 60, 61, -1, 63, 64, -1,
952 66, 67, -1, -1, -1, -1, 72, 73, 74, 75,
953 76, -1, -1, 79, 80
954 };
955
956 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
957 symbol of state STATE-NUM. */
958 static const yytype_uint8 yystos[] =
959 {
960 0, 96, 97, 160, 0, 98, 99, 160, 9, 100,
961 101, 102, 106, 108, 109, 110, 111, 112, 114, 115,
962 116, 117, 118, 120, 121, 122, 123, 124, 125, 126,
963 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
964 137, 138, 139, 140, 141, 142, 143, 144, 146, 147,
965 148, 160, 98, 45, 42, 100, 88, 1, 8, 17,
966 18, 20, 21, 24, 25, 26, 35, 38, 40, 41,
967 56, 60, 61, 63, 64, 66, 67, 71, 72, 73,
968 74, 75, 76, 79, 80, 86, 157, 87, 29, 52,
969 60, 88, 92, 149, 37, 45, 51, 60, 85, 159,
970 57, 86, 91, 113, 92, 149, 9, 60, 60, 60,
971 45, 3, 20, 41, 149, 37, 45, 51, 60, 39,
972 149, 89, 45, 60, 60, 33, 30, 12, 45, 4,
973 84, 158, 149, 149, 149, 3, 6, 7, 11, 13,
974 14, 15, 19, 23, 24, 28, 31, 32, 34, 36,
975 43, 45, 47, 50, 53, 55, 59, 60, 62, 68,
976 69, 76, 78, 81, 82, 83, 150, 151, 149, 149,
977 149, 149, 88, 149, 113, 88, 45, 119, 149, 149,
978 149, 149, 157, 58, 68, 58, 68, 58, 68, 149,
979 149, 149, 149, 149, 105, 106, 107, 145, 160, 149,
980 149, 149, 149, 23, 149, 149, 14, 88, 34, 82,
981 45, 87, 87, 87, 87, 87, 87, 45, 49, 87,
982 87, 54, 87, 87, 50, 60, 34, 50, 87, 87,
983 87, 87, 34, 87, 34, 87, 48, 16, 87, 87,
984 87, 93, 94, 87, 93, 88, 149, 149, 149, 149,
985 149, 149, 90, 105, 76, 149, 87, 87, 87, 87,
986 152, 157, 153, 159, 5, 152, 153, 152, 153, 87,
987 48, 153, 27, 44, 46, 48, 70, 77, 154, 155,
988 156, 42, 152, 153, 153, 87, 87, 87, 87, 5,
989 152, 152, 152, 152, 87, 153, 87, 152, 87, 87,
990 152, 153, 153, 88, 150, 92, 88, 48, 103, 104,
991 30, 159, 152, 154, 152, 152, 87, 87, 152, 152,
992 152, 152, 152, 152, 152, 154, 150, 22, 65, 48,
993 104, 48, 103, 23, 88, 152, 153, 153, 93, 89,
994 89, 149, 94, 100, 100, 45, 119, 90, 90
995 };
996
997 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
998 static const yytype_uint8 yyr1[] =
999 {
1000 0, 95, 96, 97, 98, 98, 99, 100, 100, 101,
1001 101, 101, 102, 102, 102, 102, 102, 103, 104, 105,
1002 105, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1003 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1004 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1005 106, 106, 106, 106, 106, 106, 106, 106, 107, 107,
1006 108, 109, 110, 111, 112, 113, 113, 114, 115, 116,
1007 117, 118, 118, 119, 119, 120, 121, 122, 123, 124,
1008 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1009 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1010 145, 146, 147, 148, 149, 149, 150, 150, 151, 151,
1011 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1012 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1013 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1014 151, 151, 151, 151, 151, 152, 153, 154, 154, 155,
1015 155, 155, 156, 156, 156, 157, 158, 159, 160
1016 };
1017
1018 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1019 static const yytype_uint8 yyr2[] =
1020 {
1021 0, 2, 3, 6, 1, 2, 8, 1, 2, 1,
1022 1, 1, 6, 7, 7, 6, 5, 5, 5, 1,
1023 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1024 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1025 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1026 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,
1027 4, 3, 4, 5, 4, 1, 2, 2, 4, 4,
1028 4, 6, 3, 5, 7, 4, 4, 4, 4, 4,
1029 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
1030 5, 4, 4, 4, 4, 4, 4, 4, 4, 5,
1031 5, 4, 3, 3, 1, 4, 1, 3, 3, 3,
1032 4, 4, 3, 3, 3, 4, 4, 4, 4, 3,
1033 3, 3, 3, 3, 3, 4, 4, 4, 4, 5,
1034 3, 3, 3, 3, 3, 3, 4, 3, 5, 5,
1035 3, 3, 3, 3, 4, 1, 1, 1, 1, 1,
1036 1, 1, 1, 1, 1, 1, 1, 1, 0
1037 };
1038
1039
1040 #define yyerrok (yyerrstatus = 0)
1041 #define yyclearin (yychar = YYEMPTY)
1042 #define YYEMPTY (-2)
1043 #define YYEOF 0
1044
1045 #define YYACCEPT goto yyacceptlab
1046 #define YYABORT goto yyabortlab
1047 #define YYERROR goto yyerrorlab
1048
1049
1050 #define YYRECOVERING() (!!yyerrstatus)
1051
1052 #define YYBACKUP(Token, Value) \
1053 do \
1054 if (yychar == YYEMPTY) \
1055 { \
1056 yychar = (Token); \
1057 yylval = (Value); \
1058 YYPOPSTACK (yylen); \
1059 yystate = *yyssp; \
1060 goto yybackup; \
1061 } \
1062 else \
1063 { \
1064 yyerror (YY_("syntax error: cannot back up")); \
1065 YYERROR; \
1066 } \
1067 while (0)
1068
1069 /* Error token number */
1070 #define YYTERROR 1
1071 #define YYERRCODE 256
1072
1073
1074
1075 /* Enable debugging if requested. */
1076 #if YYDEBUG
1077
1078 # ifndef YYFPRINTF
1079 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1080 # define YYFPRINTF fprintf
1081 # endif
1082
1083 # define YYDPRINTF(Args) \
1084 do { \
1085 if (yydebug) \
1086 YYFPRINTF Args; \
1087 } while (0)
1088
1089 /* This macro is provided for backward compatibility. */
1090 #ifndef YY_LOCATION_PRINT
1091 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1092 #endif
1093
1094
1095 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1096 do { \
1097 if (yydebug) \
1098 { \
1099 YYFPRINTF (stderr, "%s ", Title); \
1100 yy_symbol_print (stderr, \
1101 Type, Value); \
1102 YYFPRINTF (stderr, "\n"); \
1103 } \
1104 } while (0)
1105
1106
1107 /*-----------------------------------.
1108 | Print this symbol's value on YYO. |
1109 `-----------------------------------*/
1110
1111 static void
yy_symbol_value_print(FILE * yyo,int yytype,YYSTYPE const * const yyvaluep)1112 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1113 {
1114 FILE *yyoutput = yyo;
1115 YYUSE (yyoutput);
1116 if (!yyvaluep)
1117 return;
1118 # ifdef YYPRINT
1119 if (yytype < YYNTOKENS)
1120 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1121 # endif
1122 YYUSE (yytype);
1123 }
1124
1125
1126 /*---------------------------.
1127 | Print this symbol on YYO. |
1128 `---------------------------*/
1129
1130 static void
yy_symbol_print(FILE * yyo,int yytype,YYSTYPE const * const yyvaluep)1131 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1132 {
1133 YYFPRINTF (yyo, "%s %s (",
1134 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1135
1136 yy_symbol_value_print (yyo, yytype, yyvaluep);
1137 YYFPRINTF (yyo, ")");
1138 }
1139
1140 /*------------------------------------------------------------------.
1141 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1142 | TOP (included). |
1143 `------------------------------------------------------------------*/
1144
1145 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)1146 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1147 {
1148 YYFPRINTF (stderr, "Stack now");
1149 for (; yybottom <= yytop; yybottom++)
1150 {
1151 int yybot = *yybottom;
1152 YYFPRINTF (stderr, " %d", yybot);
1153 }
1154 YYFPRINTF (stderr, "\n");
1155 }
1156
1157 # define YY_STACK_PRINT(Bottom, Top) \
1158 do { \
1159 if (yydebug) \
1160 yy_stack_print ((Bottom), (Top)); \
1161 } while (0)
1162
1163
1164 /*------------------------------------------------.
1165 | Report that the YYRULE is going to be reduced. |
1166 `------------------------------------------------*/
1167
1168 static void
yy_reduce_print(yytype_int16 * yyssp,YYSTYPE * yyvsp,int yyrule)1169 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1170 {
1171 unsigned long yylno = yyrline[yyrule];
1172 int yynrhs = yyr2[yyrule];
1173 int yyi;
1174 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1175 yyrule - 1, yylno);
1176 /* The symbols being reduced. */
1177 for (yyi = 0; yyi < yynrhs; yyi++)
1178 {
1179 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1180 yy_symbol_print (stderr,
1181 yystos[yyssp[yyi + 1 - yynrhs]],
1182 &yyvsp[(yyi + 1) - (yynrhs)]
1183 );
1184 YYFPRINTF (stderr, "\n");
1185 }
1186 }
1187
1188 # define YY_REDUCE_PRINT(Rule) \
1189 do { \
1190 if (yydebug) \
1191 yy_reduce_print (yyssp, yyvsp, Rule); \
1192 } while (0)
1193
1194 /* Nonzero means print parse trace. It is left uninitialized so that
1195 multiple parsers can coexist. */
1196 int yydebug;
1197 #else /* !YYDEBUG */
1198 # define YYDPRINTF(Args)
1199 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1200 # define YY_STACK_PRINT(Bottom, Top)
1201 # define YY_REDUCE_PRINT(Rule)
1202 #endif /* !YYDEBUG */
1203
1204
1205 /* YYINITDEPTH -- initial size of the parser's stacks. */
1206 #ifndef YYINITDEPTH
1207 # define YYINITDEPTH 200
1208 #endif
1209
1210 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1211 if the built-in stack extension method is used).
1212
1213 Do not make this value too large; the results are undefined if
1214 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1215 evaluated with infinite-precision integer arithmetic. */
1216
1217 #ifndef YYMAXDEPTH
1218 # define YYMAXDEPTH 10000
1219 #endif
1220
1221
1222 #if YYERROR_VERBOSE
1223
1224 # ifndef yystrlen
1225 # if defined __GLIBC__ && defined _STRING_H
1226 # define yystrlen strlen
1227 # else
1228 /* Return the length of YYSTR. */
1229 static YYSIZE_T
yystrlen(const char * yystr)1230 yystrlen (const char *yystr)
1231 {
1232 YYSIZE_T yylen;
1233 for (yylen = 0; yystr[yylen]; yylen++)
1234 continue;
1235 return yylen;
1236 }
1237 # endif
1238 # endif
1239
1240 # ifndef yystpcpy
1241 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1242 # define yystpcpy stpcpy
1243 # else
1244 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1245 YYDEST. */
1246 static char *
yystpcpy(char * yydest,const char * yysrc)1247 yystpcpy (char *yydest, const char *yysrc)
1248 {
1249 char *yyd = yydest;
1250 const char *yys = yysrc;
1251
1252 while ((*yyd++ = *yys++) != '\0')
1253 continue;
1254
1255 return yyd - 1;
1256 }
1257 # endif
1258 # endif
1259
1260 # ifndef yytnamerr
1261 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1262 quotes and backslashes, so that it's suitable for yyerror. The
1263 heuristic is that double-quoting is unnecessary unless the string
1264 contains an apostrophe, a comma, or backslash (other than
1265 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1266 null, do not copy; instead, return the length of what the result
1267 would have been. */
1268 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)1269 yytnamerr (char *yyres, const char *yystr)
1270 {
1271 if (*yystr == '"')
1272 {
1273 YYSIZE_T yyn = 0;
1274 char const *yyp = yystr;
1275
1276 for (;;)
1277 switch (*++yyp)
1278 {
1279 case '\'':
1280 case ',':
1281 goto do_not_strip_quotes;
1282
1283 case '\\':
1284 if (*++yyp != '\\')
1285 goto do_not_strip_quotes;
1286 else
1287 goto append;
1288
1289 append:
1290 default:
1291 if (yyres)
1292 yyres[yyn] = *yyp;
1293 yyn++;
1294 break;
1295
1296 case '"':
1297 if (yyres)
1298 yyres[yyn] = '\0';
1299 return yyn;
1300 }
1301 do_not_strip_quotes: ;
1302 }
1303
1304 if (! yyres)
1305 return yystrlen (yystr);
1306
1307 return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1308 }
1309 # endif
1310
1311 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1312 about the unexpected token YYTOKEN for the state stack whose top is
1313 YYSSP.
1314
1315 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1316 not large enough to hold the message. In that case, also set
1317 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1318 required number of bytes is too large to store. */
1319 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)1320 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1321 yytype_int16 *yyssp, int yytoken)
1322 {
1323 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1324 YYSIZE_T yysize = yysize0;
1325 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1326 /* Internationalized format string. */
1327 const char *yyformat = YY_NULLPTR;
1328 /* Arguments of yyformat. */
1329 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1330 /* Number of reported tokens (one for the "unexpected", one per
1331 "expected"). */
1332 int yycount = 0;
1333
1334 /* There are many possibilities here to consider:
1335 - If this state is a consistent state with a default action, then
1336 the only way this function was invoked is if the default action
1337 is an error action. In that case, don't check for expected
1338 tokens because there are none.
1339 - The only way there can be no lookahead present (in yychar) is if
1340 this state is a consistent state with a default action. Thus,
1341 detecting the absence of a lookahead is sufficient to determine
1342 that there is no unexpected or expected token to report. In that
1343 case, just report a simple "syntax error".
1344 - Don't assume there isn't a lookahead just because this state is a
1345 consistent state with a default action. There might have been a
1346 previous inconsistent state, consistent state with a non-default
1347 action, or user semantic action that manipulated yychar.
1348 - Of course, the expected token list depends on states to have
1349 correct lookahead information, and it depends on the parser not
1350 to perform extra reductions after fetching a lookahead from the
1351 scanner and before detecting a syntax error. Thus, state merging
1352 (from LALR or IELR) and default reductions corrupt the expected
1353 token list. However, the list is correct for canonical LR with
1354 one exception: it will still contain any token that will not be
1355 accepted due to an error action in a later state.
1356 */
1357 if (yytoken != YYEMPTY)
1358 {
1359 int yyn = yypact[*yyssp];
1360 yyarg[yycount++] = yytname[yytoken];
1361 if (!yypact_value_is_default (yyn))
1362 {
1363 /* Start YYX at -YYN if negative to avoid negative indexes in
1364 YYCHECK. In other words, skip the first -YYN actions for
1365 this state because they are default actions. */
1366 int yyxbegin = yyn < 0 ? -yyn : 0;
1367 /* Stay within bounds of both yycheck and yytname. */
1368 int yychecklim = YYLAST - yyn + 1;
1369 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1370 int yyx;
1371
1372 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1373 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1374 && !yytable_value_is_error (yytable[yyx + yyn]))
1375 {
1376 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1377 {
1378 yycount = 1;
1379 yysize = yysize0;
1380 break;
1381 }
1382 yyarg[yycount++] = yytname[yyx];
1383 {
1384 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1385 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1386 yysize = yysize1;
1387 else
1388 return 2;
1389 }
1390 }
1391 }
1392 }
1393
1394 switch (yycount)
1395 {
1396 # define YYCASE_(N, S) \
1397 case N: \
1398 yyformat = S; \
1399 break
1400 default: /* Avoid compiler warnings. */
1401 YYCASE_(0, YY_("syntax error"));
1402 YYCASE_(1, YY_("syntax error, unexpected %s"));
1403 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1404 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1405 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1406 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1407 # undef YYCASE_
1408 }
1409
1410 {
1411 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1412 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1413 yysize = yysize1;
1414 else
1415 return 2;
1416 }
1417
1418 if (*yymsg_alloc < yysize)
1419 {
1420 *yymsg_alloc = 2 * yysize;
1421 if (! (yysize <= *yymsg_alloc
1422 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1423 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1424 return 1;
1425 }
1426
1427 /* Avoid sprintf, as that infringes on the user's name space.
1428 Don't have undefined behavior even if the translation
1429 produced a string with the wrong number of "%s"s. */
1430 {
1431 char *yyp = *yymsg;
1432 int yyi = 0;
1433 while ((*yyp = *yyformat) != '\0')
1434 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1435 {
1436 yyp += yytnamerr (yyp, yyarg[yyi++]);
1437 yyformat += 2;
1438 }
1439 else
1440 {
1441 yyp++;
1442 yyformat++;
1443 }
1444 }
1445 return 0;
1446 }
1447 #endif /* YYERROR_VERBOSE */
1448
1449 /*-----------------------------------------------.
1450 | Release the memory associated to this symbol. |
1451 `-----------------------------------------------*/
1452
1453 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1454 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1455 {
1456 YYUSE (yyvaluep);
1457 if (!yymsg)
1458 yymsg = "Deleting";
1459 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1460
1461 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1462 YYUSE (yytype);
1463 YY_IGNORE_MAYBE_UNINITIALIZED_END
1464 }
1465
1466
1467
1468
1469 /* The lookahead symbol. */
1470 int yychar;
1471
1472 /* The semantic value of the lookahead symbol. */
1473 YYSTYPE yylval;
1474 /* Number of syntax errors so far. */
1475 int yynerrs;
1476
1477
1478 /*----------.
1479 | yyparse. |
1480 `----------*/
1481
1482 int
yyparse(void)1483 yyparse (void)
1484 {
1485 int yystate;
1486 /* Number of tokens to shift before error messages enabled. */
1487 int yyerrstatus;
1488
1489 /* The stacks and their tools:
1490 'yyss': related to states.
1491 'yyvs': related to semantic values.
1492
1493 Refer to the stacks through separate pointers, to allow yyoverflow
1494 to reallocate them elsewhere. */
1495
1496 /* The state stack. */
1497 yytype_int16 yyssa[YYINITDEPTH];
1498 yytype_int16 *yyss;
1499 yytype_int16 *yyssp;
1500
1501 /* The semantic value stack. */
1502 YYSTYPE yyvsa[YYINITDEPTH];
1503 YYSTYPE *yyvs;
1504 YYSTYPE *yyvsp;
1505
1506 YYSIZE_T yystacksize;
1507
1508 int yyn;
1509 int yyresult;
1510 /* Lookahead token as an internal (translated) token number. */
1511 int yytoken = 0;
1512 /* The variables used to return semantic value and location from the
1513 action routines. */
1514 YYSTYPE yyval;
1515
1516 #if YYERROR_VERBOSE
1517 /* Buffer for error messages, and its allocated size. */
1518 char yymsgbuf[128];
1519 char *yymsg = yymsgbuf;
1520 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1521 #endif
1522
1523 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1524
1525 /* The number of symbols on the RHS of the reduced rule.
1526 Keep to zero when no symbol should be popped. */
1527 int yylen = 0;
1528
1529 yyssp = yyss = yyssa;
1530 yyvsp = yyvs = yyvsa;
1531 yystacksize = YYINITDEPTH;
1532
1533 YYDPRINTF ((stderr, "Starting parse\n"));
1534
1535 yystate = 0;
1536 yyerrstatus = 0;
1537 yynerrs = 0;
1538 yychar = YYEMPTY; /* Cause a token to be read. */
1539 goto yysetstate;
1540
1541
1542 /*------------------------------------------------------------.
1543 | yynewstate -- push a new state, which is found in yystate. |
1544 `------------------------------------------------------------*/
1545 yynewstate:
1546 /* In all cases, when you get here, the value and location stacks
1547 have just been pushed. So pushing a state here evens the stacks. */
1548 yyssp++;
1549
1550
1551 /*--------------------------------------------------------------------.
1552 | yynewstate -- set current state (the top of the stack) to yystate. |
1553 `--------------------------------------------------------------------*/
1554 yysetstate:
1555 *yyssp = (yytype_int16) yystate;
1556
1557 if (yyss + yystacksize - 1 <= yyssp)
1558 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1559 goto yyexhaustedlab;
1560 #else
1561 {
1562 /* Get the current used size of the three stacks, in elements. */
1563 YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1564
1565 # if defined yyoverflow
1566 {
1567 /* Give user a chance to reallocate the stack. Use copies of
1568 these so that the &'s don't force the real ones into
1569 memory. */
1570 YYSTYPE *yyvs1 = yyvs;
1571 yytype_int16 *yyss1 = yyss;
1572
1573 /* Each stack pointer address is followed by the size of the
1574 data in use in that stack, in bytes. This used to be a
1575 conditional around just the two extra args, but that might
1576 be undefined if yyoverflow is a macro. */
1577 yyoverflow (YY_("memory exhausted"),
1578 &yyss1, yysize * sizeof (*yyssp),
1579 &yyvs1, yysize * sizeof (*yyvsp),
1580 &yystacksize);
1581 yyss = yyss1;
1582 yyvs = yyvs1;
1583 }
1584 # else /* defined YYSTACK_RELOCATE */
1585 /* Extend the stack our own way. */
1586 if (YYMAXDEPTH <= yystacksize)
1587 goto yyexhaustedlab;
1588 yystacksize *= 2;
1589 if (YYMAXDEPTH < yystacksize)
1590 yystacksize = YYMAXDEPTH;
1591
1592 {
1593 yytype_int16 *yyss1 = yyss;
1594 union yyalloc *yyptr =
1595 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1596 if (! yyptr)
1597 goto yyexhaustedlab;
1598 YYSTACK_RELOCATE (yyss_alloc, yyss);
1599 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1600 # undef YYSTACK_RELOCATE
1601 if (yyss1 != yyssa)
1602 YYSTACK_FREE (yyss1);
1603 }
1604 # endif
1605
1606 yyssp = yyss + yysize - 1;
1607 yyvsp = yyvs + yysize - 1;
1608
1609 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1610 (unsigned long) yystacksize));
1611
1612 if (yyss + yystacksize - 1 <= yyssp)
1613 YYABORT;
1614 }
1615 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1616
1617 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1618
1619 if (yystate == YYFINAL)
1620 YYACCEPT;
1621
1622 goto yybackup;
1623
1624
1625 /*-----------.
1626 | yybackup. |
1627 `-----------*/
1628 yybackup:
1629 /* Do appropriate processing given the current state. Read a
1630 lookahead token if we need one and don't already have one. */
1631
1632 /* First try to decide what to do without reference to lookahead token. */
1633 yyn = yypact[yystate];
1634 if (yypact_value_is_default (yyn))
1635 goto yydefault;
1636
1637 /* Not known => get a lookahead token if don't already have one. */
1638
1639 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1640 if (yychar == YYEMPTY)
1641 {
1642 YYDPRINTF ((stderr, "Reading a token: "));
1643 yychar = yylex ();
1644 }
1645
1646 if (yychar <= YYEOF)
1647 {
1648 yychar = yytoken = YYEOF;
1649 YYDPRINTF ((stderr, "Now at end of input.\n"));
1650 }
1651 else
1652 {
1653 yytoken = YYTRANSLATE (yychar);
1654 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1655 }
1656
1657 /* If the proper action on seeing token YYTOKEN is to reduce or to
1658 detect an error, take that action. */
1659 yyn += yytoken;
1660 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1661 goto yydefault;
1662 yyn = yytable[yyn];
1663 if (yyn <= 0)
1664 {
1665 if (yytable_value_is_error (yyn))
1666 goto yyerrlab;
1667 yyn = -yyn;
1668 goto yyreduce;
1669 }
1670
1671 /* Count tokens shifted since error; after three, turn off error
1672 status. */
1673 if (yyerrstatus)
1674 yyerrstatus--;
1675
1676 /* Shift the lookahead token. */
1677 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1678
1679 /* Discard the shifted token. */
1680 yychar = YYEMPTY;
1681
1682 yystate = yyn;
1683 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1684 *++yyvsp = yylval;
1685 YY_IGNORE_MAYBE_UNINITIALIZED_END
1686
1687 goto yynewstate;
1688
1689
1690 /*-----------------------------------------------------------.
1691 | yydefault -- do the default action for the current state. |
1692 `-----------------------------------------------------------*/
1693 yydefault:
1694 yyn = yydefact[yystate];
1695 if (yyn == 0)
1696 goto yyerrlab;
1697 goto yyreduce;
1698
1699
1700 /*-----------------------------.
1701 | yyreduce -- do a reduction. |
1702 `-----------------------------*/
1703 yyreduce:
1704 /* yyn is the number of a rule to reduce with. */
1705 yylen = yyr2[yyn];
1706
1707 /* If YYLEN is nonzero, implement the default value of the action:
1708 '$$ = $1'.
1709
1710 Otherwise, the following line sets YYVAL to garbage.
1711 This behavior is undocumented and Bison
1712 users should not rely upon it. Assigning to YYVAL
1713 unconditionally makes the parser a bit smaller, and it avoids a
1714 GCC warning that YYVAL may be used uninitialized. */
1715 yyval = yyvsp[1-yylen];
1716
1717
1718 YY_REDUCE_PRINT (yyn);
1719 switch (yyn)
1720 {
1721 case 2:
1722 #line 228 "parser.y" /* yacc.c:1652 */
1723 {
1724 parser_script = (SlonikScript *)
1725 malloc(sizeof(SlonikScript));
1726 memset(parser_script, 0, sizeof(SlonikScript));
1727
1728 parser_script->clustername = (yyvsp[-2].str);
1729 parser_script->filename = current_file;
1730 parser_script->adminfo_list = (yyvsp[-1].adm_info);
1731 parser_script->script_stmts = (yyvsp[0].statement);
1732 }
1733 #line 1734 "y.tab.c" /* yacc.c:1652 */
1734 break;
1735
1736 case 3:
1737 #line 241 "parser.y" /* yacc.c:1652 */
1738 {
1739 (yyval.str) = (yyvsp[-1].str);
1740 }
1741 #line 1742 "y.tab.c" /* yacc.c:1652 */
1742 break;
1743
1744 case 4:
1745 #line 247 "parser.y" /* yacc.c:1652 */
1746 { (yyval.adm_info) = (yyvsp[0].adm_info); }
1747 #line 1748 "y.tab.c" /* yacc.c:1652 */
1748 break;
1749
1750 case 5:
1751 #line 249 "parser.y" /* yacc.c:1652 */
1752 { (yyvsp[-1].adm_info)->next = (yyvsp[0].adm_info); (yyval.adm_info) = (yyvsp[-1].adm_info); }
1753 #line 1754 "y.tab.c" /* yacc.c:1652 */
1754 break;
1755
1756 case 6:
1757 #line 253 "parser.y" /* yacc.c:1652 */
1758 {
1759 SlonikAdmInfo *new;
1760
1761 new = (SlonikAdmInfo *)
1762 malloc(sizeof(SlonikAdmInfo));
1763 memset(new, 0, sizeof(SlonikAdmInfo));
1764
1765 new->no_id = (yyvsp[-5].ival);
1766 new->stmt_filename = current_file;
1767 new->stmt_lno = (yyvsp[-7].ival);
1768 new->conninfo = (yyvsp[-1].str);
1769 new->last_event = -1;
1770
1771 (yyval.adm_info) = new;
1772 }
1773 #line 1774 "y.tab.c" /* yacc.c:1652 */
1774 break;
1775
1776 case 7:
1777 #line 271 "parser.y" /* yacc.c:1652 */
1778 { (yyval.statement) = (yyvsp[0].statement); }
1779 #line 1780 "y.tab.c" /* yacc.c:1652 */
1780 break;
1781
1782 case 8:
1783 #line 273 "parser.y" /* yacc.c:1652 */
1784 { (yyvsp[-1].statement)->next = (yyvsp[0].statement); (yyval.statement) = (yyvsp[-1].statement); }
1785 #line 1786 "y.tab.c" /* yacc.c:1652 */
1786 break;
1787
1788 case 9:
1789 #line 277 "parser.y" /* yacc.c:1652 */
1790 { (yyval.statement) = (yyvsp[0].statement); }
1791 #line 1792 "y.tab.c" /* yacc.c:1652 */
1792 break;
1793
1794 case 10:
1795 #line 279 "parser.y" /* yacc.c:1652 */
1796 { (yyval.statement) = (yyvsp[0].statement); }
1797 #line 1798 "y.tab.c" /* yacc.c:1652 */
1798 break;
1799
1800 case 11:
1801 #line 281 "parser.y" /* yacc.c:1652 */
1802 { (yyval.statement) = (yyvsp[0].statement); }
1803 #line 1804 "y.tab.c" /* yacc.c:1652 */
1804 break;
1805
1806 case 12:
1807 #line 286 "parser.y" /* yacc.c:1652 */
1808 {
1809 SlonikStmt_try *new;
1810
1811 new = (SlonikStmt_try *)
1812 malloc(sizeof(SlonikStmt_try));
1813 memset(new, 0, sizeof(SlonikStmt_try));
1814 new->hdr.stmt_type = STMT_TRY;
1815 new->hdr.stmt_filename = current_file;
1816 new->hdr.stmt_lno = (yyvsp[-5].ival);
1817
1818 new->try_block = (yyvsp[-2].statement);
1819 new->error_block = (yyvsp[0].statement);
1820
1821 (yyval.statement) = (SlonikStmt *)new;
1822 }
1823 #line 1824 "y.tab.c" /* yacc.c:1652 */
1824 break;
1825
1826 case 13:
1827 #line 303 "parser.y" /* yacc.c:1652 */
1828 {
1829 SlonikStmt_try *new;
1830
1831 new = (SlonikStmt_try *)
1832 malloc(sizeof(SlonikStmt_try));
1833 memset(new, 0, sizeof(SlonikStmt_try));
1834 new->hdr.stmt_type = STMT_TRY;
1835 new->hdr.stmt_filename = current_file;
1836 new->hdr.stmt_lno = (yyvsp[-6].ival);
1837
1838 new->try_block = (yyvsp[-3].statement);
1839 new->success_block = (yyvsp[-1].statement);
1840 new->error_block = (yyvsp[0].statement);
1841
1842 (yyval.statement) = (SlonikStmt *)new;
1843 }
1844 #line 1845 "y.tab.c" /* yacc.c:1652 */
1845 break;
1846
1847 case 14:
1848 #line 321 "parser.y" /* yacc.c:1652 */
1849 {
1850 SlonikStmt_try *new;
1851
1852 new = (SlonikStmt_try *)
1853 malloc(sizeof(SlonikStmt_try));
1854 memset(new, 0, sizeof(SlonikStmt_try));
1855 new->hdr.stmt_type = STMT_TRY;
1856 new->hdr.stmt_filename = current_file;
1857 new->hdr.stmt_lno = (yyvsp[-6].ival);
1858
1859 new->try_block = (yyvsp[-3].statement);
1860 new->success_block = (yyvsp[0].statement);
1861 new->error_block = (yyvsp[-1].statement);
1862
1863 (yyval.statement) = (SlonikStmt *)new;
1864 }
1865 #line 1866 "y.tab.c" /* yacc.c:1652 */
1866 break;
1867
1868 case 15:
1869 #line 339 "parser.y" /* yacc.c:1652 */
1870 {
1871 SlonikStmt_try *new;
1872
1873 new = (SlonikStmt_try *)
1874 malloc(sizeof(SlonikStmt_try));
1875 memset(new, 0, sizeof(SlonikStmt_try));
1876 new->hdr.stmt_type = STMT_TRY;
1877 new->hdr.stmt_filename = current_file;
1878 new->hdr.stmt_lno = (yyvsp[-5].ival);
1879
1880 new->try_block = (yyvsp[-2].statement);
1881 new->success_block = (yyvsp[0].statement);
1882
1883 (yyval.statement) = (SlonikStmt *)new;
1884 }
1885 #line 1886 "y.tab.c" /* yacc.c:1652 */
1886 break;
1887
1888 case 16:
1889 #line 355 "parser.y" /* yacc.c:1652 */
1890 {
1891 SlonikStmt_try *new;
1892
1893 new = (SlonikStmt_try *)
1894 malloc(sizeof(SlonikStmt_try));
1895 memset(new, 0, sizeof(SlonikStmt_try));
1896 new->hdr.stmt_type = STMT_TRY;
1897 new->hdr.stmt_filename = current_file;
1898 new->hdr.stmt_lno = (yyvsp[-4].ival);
1899
1900 new->try_block = (yyvsp[-1].statement);
1901
1902 (yyval.statement) = (SlonikStmt *)new;
1903 }
1904 #line 1905 "y.tab.c" /* yacc.c:1652 */
1905 break;
1906
1907 case 17:
1908 #line 372 "parser.y" /* yacc.c:1652 */
1909 { (yyval.statement) = (yyvsp[-1].statement); }
1910 #line 1911 "y.tab.c" /* yacc.c:1652 */
1911 break;
1912
1913 case 18:
1914 #line 375 "parser.y" /* yacc.c:1652 */
1915 { (yyval.statement) = (yyvsp[-1].statement); }
1916 #line 1917 "y.tab.c" /* yacc.c:1652 */
1917 break;
1918
1919 case 19:
1920 #line 379 "parser.y" /* yacc.c:1652 */
1921 { (yyval.statement) = (yyvsp[0].statement); }
1922 #line 1923 "y.tab.c" /* yacc.c:1652 */
1923 break;
1924
1925 case 20:
1926 #line 381 "parser.y" /* yacc.c:1652 */
1927 { (yyvsp[-1].statement)->next = (yyvsp[0].statement); (yyval.statement) = (yyvsp[-1].statement); }
1928 #line 1929 "y.tab.c" /* yacc.c:1652 */
1929 break;
1930
1931 case 21:
1932 #line 385 "parser.y" /* yacc.c:1652 */
1933 { (yyval.statement) = (yyvsp[0].statement); }
1934 #line 1935 "y.tab.c" /* yacc.c:1652 */
1935 break;
1936
1937 case 22:
1938 #line 387 "parser.y" /* yacc.c:1652 */
1939 { (yyval.statement) = (yyvsp[0].statement); }
1940 #line 1941 "y.tab.c" /* yacc.c:1652 */
1941 break;
1942
1943 case 23:
1944 #line 389 "parser.y" /* yacc.c:1652 */
1945 { (yyval.statement) = (yyvsp[0].statement); }
1946 #line 1947 "y.tab.c" /* yacc.c:1652 */
1947 break;
1948
1949 case 24:
1950 #line 391 "parser.y" /* yacc.c:1652 */
1951 { (yyval.statement) = (yyvsp[0].statement); }
1952 #line 1953 "y.tab.c" /* yacc.c:1652 */
1953 break;
1954
1955 case 25:
1956 #line 393 "parser.y" /* yacc.c:1652 */
1957 { (yyval.statement) = (yyvsp[0].statement); }
1958 #line 1959 "y.tab.c" /* yacc.c:1652 */
1959 break;
1960
1961 case 26:
1962 #line 395 "parser.y" /* yacc.c:1652 */
1963 { (yyval.statement) = (yyvsp[0].statement); }
1964 #line 1965 "y.tab.c" /* yacc.c:1652 */
1965 break;
1966
1967 case 27:
1968 #line 397 "parser.y" /* yacc.c:1652 */
1969 { (yyval.statement) = (yyvsp[0].statement); }
1970 #line 1971 "y.tab.c" /* yacc.c:1652 */
1971 break;
1972
1973 case 28:
1974 #line 399 "parser.y" /* yacc.c:1652 */
1975 { (yyval.statement) = (yyvsp[0].statement); }
1976 #line 1977 "y.tab.c" /* yacc.c:1652 */
1977 break;
1978
1979 case 29:
1980 #line 401 "parser.y" /* yacc.c:1652 */
1981 { (yyval.statement) = (yyvsp[0].statement); }
1982 #line 1983 "y.tab.c" /* yacc.c:1652 */
1983 break;
1984
1985 case 30:
1986 #line 403 "parser.y" /* yacc.c:1652 */
1987 { (yyval.statement) = (yyvsp[0].statement); }
1988 #line 1989 "y.tab.c" /* yacc.c:1652 */
1989 break;
1990
1991 case 31:
1992 #line 405 "parser.y" /* yacc.c:1652 */
1993 { (yyval.statement) = (yyvsp[0].statement); }
1994 #line 1995 "y.tab.c" /* yacc.c:1652 */
1995 break;
1996
1997 case 32:
1998 #line 407 "parser.y" /* yacc.c:1652 */
1999 { (yyval.statement) = (yyvsp[0].statement); }
2000 #line 2001 "y.tab.c" /* yacc.c:1652 */
2001 break;
2002
2003 case 33:
2004 #line 409 "parser.y" /* yacc.c:1652 */
2005 { (yyval.statement) = (yyvsp[0].statement); }
2006 #line 2007 "y.tab.c" /* yacc.c:1652 */
2007 break;
2008
2009 case 34:
2010 #line 411 "parser.y" /* yacc.c:1652 */
2011 { (yyval.statement) = (yyvsp[0].statement); }
2012 #line 2013 "y.tab.c" /* yacc.c:1652 */
2013 break;
2014
2015 case 35:
2016 #line 413 "parser.y" /* yacc.c:1652 */
2017 { (yyval.statement) = (yyvsp[0].statement); }
2018 #line 2019 "y.tab.c" /* yacc.c:1652 */
2019 break;
2020
2021 case 36:
2022 #line 415 "parser.y" /* yacc.c:1652 */
2023 { (yyval.statement) = (yyvsp[0].statement); }
2024 #line 2025 "y.tab.c" /* yacc.c:1652 */
2025 break;
2026
2027 case 37:
2028 #line 417 "parser.y" /* yacc.c:1652 */
2029 { (yyval.statement) = (yyvsp[0].statement); }
2030 #line 2031 "y.tab.c" /* yacc.c:1652 */
2031 break;
2032
2033 case 38:
2034 #line 419 "parser.y" /* yacc.c:1652 */
2035 { (yyval.statement) = (yyvsp[0].statement); }
2036 #line 2037 "y.tab.c" /* yacc.c:1652 */
2037 break;
2038
2039 case 39:
2040 #line 421 "parser.y" /* yacc.c:1652 */
2041 { (yyval.statement) = (yyvsp[0].statement); }
2042 #line 2043 "y.tab.c" /* yacc.c:1652 */
2043 break;
2044
2045 case 40:
2046 #line 423 "parser.y" /* yacc.c:1652 */
2047 { (yyval.statement) = (yyvsp[0].statement); }
2048 #line 2049 "y.tab.c" /* yacc.c:1652 */
2049 break;
2050
2051 case 41:
2052 #line 425 "parser.y" /* yacc.c:1652 */
2053 { (yyval.statement) = (yyvsp[0].statement); }
2054 #line 2055 "y.tab.c" /* yacc.c:1652 */
2055 break;
2056
2057 case 42:
2058 #line 427 "parser.y" /* yacc.c:1652 */
2059 { (yyval.statement) = (yyvsp[0].statement); }
2060 #line 2061 "y.tab.c" /* yacc.c:1652 */
2061 break;
2062
2063 case 43:
2064 #line 429 "parser.y" /* yacc.c:1652 */
2065 { (yyval.statement) = (yyvsp[0].statement); }
2066 #line 2067 "y.tab.c" /* yacc.c:1652 */
2067 break;
2068
2069 case 44:
2070 #line 431 "parser.y" /* yacc.c:1652 */
2071 { (yyval.statement) = (yyvsp[0].statement); }
2072 #line 2073 "y.tab.c" /* yacc.c:1652 */
2073 break;
2074
2075 case 45:
2076 #line 433 "parser.y" /* yacc.c:1652 */
2077 { (yyval.statement) = (yyvsp[0].statement); }
2078 #line 2079 "y.tab.c" /* yacc.c:1652 */
2079 break;
2080
2081 case 46:
2082 #line 435 "parser.y" /* yacc.c:1652 */
2083 { (yyval.statement) = (yyvsp[0].statement); }
2084 #line 2085 "y.tab.c" /* yacc.c:1652 */
2085 break;
2086
2087 case 47:
2088 #line 437 "parser.y" /* yacc.c:1652 */
2089 { (yyval.statement) = (yyvsp[0].statement); }
2090 #line 2091 "y.tab.c" /* yacc.c:1652 */
2091 break;
2092
2093 case 48:
2094 #line 439 "parser.y" /* yacc.c:1652 */
2095 { (yyval.statement) = (yyvsp[0].statement); }
2096 #line 2097 "y.tab.c" /* yacc.c:1652 */
2097 break;
2098
2099 case 49:
2100 #line 441 "parser.y" /* yacc.c:1652 */
2101 { (yyval.statement) = (yyvsp[0].statement); }
2102 #line 2103 "y.tab.c" /* yacc.c:1652 */
2103 break;
2104
2105 case 50:
2106 #line 443 "parser.y" /* yacc.c:1652 */
2107 { (yyval.statement) = (yyvsp[0].statement); }
2108 #line 2109 "y.tab.c" /* yacc.c:1652 */
2109 break;
2110
2111 case 51:
2112 #line 445 "parser.y" /* yacc.c:1652 */
2113 { (yyval.statement) = (yyvsp[0].statement); }
2114 #line 2115 "y.tab.c" /* yacc.c:1652 */
2115 break;
2116
2117 case 52:
2118 #line 447 "parser.y" /* yacc.c:1652 */
2119 { (yyval.statement) = (yyvsp[0].statement); }
2120 #line 2121 "y.tab.c" /* yacc.c:1652 */
2121 break;
2122
2123 case 53:
2124 #line 449 "parser.y" /* yacc.c:1652 */
2125 { (yyval.statement) = (yyvsp[0].statement); }
2126 #line 2127 "y.tab.c" /* yacc.c:1652 */
2127 break;
2128
2129 case 54:
2130 #line 451 "parser.y" /* yacc.c:1652 */
2131 { (yyval.statement) = (yyvsp[0].statement); }
2132 #line 2133 "y.tab.c" /* yacc.c:1652 */
2133 break;
2134
2135 case 55:
2136 #line 453 "parser.y" /* yacc.c:1652 */
2137 { yyerrok;
2138 (yyval.statement) = (yyvsp[-1].statement); }
2139 #line 2140 "y.tab.c" /* yacc.c:1652 */
2140 break;
2141
2142 case 56:
2143 #line 456 "parser.y" /* yacc.c:1652 */
2144 { (yyval.statement) = (yyvsp[0].statement); }
2145 #line 2146 "y.tab.c" /* yacc.c:1652 */
2146 break;
2147
2148 case 57:
2149 #line 458 "parser.y" /* yacc.c:1652 */
2150 { (yyval.statement) = (yyvsp[0].statement); }
2151 #line 2152 "y.tab.c" /* yacc.c:1652 */
2152 break;
2153
2154 case 58:
2155 #line 462 "parser.y" /* yacc.c:1652 */
2156 { (yyval.statement) = (yyvsp[0].statement); }
2157 #line 2158 "y.tab.c" /* yacc.c:1652 */
2158 break;
2159
2160 case 59:
2161 #line 464 "parser.y" /* yacc.c:1652 */
2162 { (yyval.statement) = (yyvsp[0].statement); }
2163 #line 2164 "y.tab.c" /* yacc.c:1652 */
2164 break;
2165
2166 case 60:
2167 #line 468 "parser.y" /* yacc.c:1652 */
2168 {
2169 SlonikStmt_echo *new;
2170
2171 new = (SlonikStmt_echo *)
2172 malloc(sizeof(SlonikStmt_echo));
2173 memset(new, 0, sizeof(SlonikStmt_echo));
2174 new->hdr.stmt_type = STMT_ECHO;
2175 new->hdr.stmt_filename = current_file;
2176 new->hdr.stmt_lno = (yyvsp[-3].ival);
2177
2178 new->str = (yyvsp[-1].str);
2179
2180 (yyval.statement) = (SlonikStmt *)new;
2181 }
2182 #line 2183 "y.tab.c" /* yacc.c:1652 */
2183 break;
2184
2185 case 61:
2186 #line 485 "parser.y" /* yacc.c:1652 */
2187 {
2188 SlonikStmt_date *new;
2189 statement_option opt[] = {
2190 STMT_OPTION_STR( O_DATE_FORMAT, "%F %T"),
2191 STMT_OPTION_END
2192 };
2193
2194 new = (SlonikStmt_date *)
2195 malloc(sizeof(SlonikStmt_date));
2196 memset(new, 0, sizeof(SlonikStmt_date));
2197 new->hdr.stmt_type = STMT_DATE;
2198 new->hdr.stmt_filename = current_file;
2199 new->hdr.stmt_lno = (yyvsp[-2].ival);
2200
2201 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2202 {
2203 new->fmt = opt[0].str;
2204 }
2205 else
2206 parser_errors++;
2207
2208 (yyval.statement) = (SlonikStmt *)new;
2209 }
2210 #line 2211 "y.tab.c" /* yacc.c:1652 */
2211 break;
2212
2213 case 62:
2214 #line 511 "parser.y" /* yacc.c:1652 */
2215 {
2216 SlonikStmt_exit *new;
2217
2218 new = (SlonikStmt_exit *)
2219 malloc(sizeof(SlonikStmt_exit));
2220 memset(new, 0, sizeof(SlonikStmt_exit));
2221 new->hdr.stmt_type = STMT_EXIT;
2222 new->hdr.stmt_filename = current_file;
2223 new->hdr.stmt_lno = (yyvsp[-3].ival);
2224
2225 new->exitcode = (yyvsp[-1].ival);
2226
2227 (yyval.statement) = (SlonikStmt *)new;
2228 }
2229 #line 2230 "y.tab.c" /* yacc.c:1652 */
2230 break;
2231
2232 case 63:
2233 #line 528 "parser.y" /* yacc.c:1652 */
2234 {
2235 SlonikStmt_restart_node *new;
2236
2237 new = (SlonikStmt_restart_node *)
2238 malloc(sizeof(SlonikStmt_restart_node));
2239 memset(new, 0, sizeof(SlonikStmt_restart_node));
2240 new->hdr.stmt_type = STMT_RESTART_NODE;
2241 new->hdr.stmt_filename = current_file;
2242 new->hdr.stmt_lno = (yyvsp[-4].ival);
2243
2244 new->no_id = (yyvsp[-1].ival);
2245
2246 (yyval.statement) = (SlonikStmt *)new;
2247 }
2248 #line 2249 "y.tab.c" /* yacc.c:1652 */
2249 break;
2250
2251 case 64:
2252 #line 544 "parser.y" /* yacc.c:1652 */
2253 {
2254 SlonikStmt_resubscribe_node * new;
2255 statement_option opt[] = {
2256 STMT_OPTION_INT( O_ORIGIN, -1 ),
2257 STMT_OPTION_INT( O_PROVIDER, -1 ),
2258 STMT_OPTION_INT( O_RECEIVER, -1),
2259 STMT_OPTION_END
2260 };
2261
2262 new = (SlonikStmt_resubscribe_node *)
2263 malloc(sizeof(SlonikStmt_resubscribe_node));
2264 memset(new, 0, sizeof(SlonikStmt_resubscribe_node));
2265 new->hdr.stmt_type = STMT_RESUBSCRIBE_NODE;
2266 new->hdr.stmt_filename = current_file;
2267 new->hdr.stmt_lno = (yyvsp[-3].ival);
2268
2269 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2270 {
2271 new->no_origin = opt[0].ival;
2272 new->no_provider = opt[1].ival;
2273 new->no_receiver = opt[2].ival;
2274 }
2275 else
2276 parser_errors++;
2277 (yyval.statement) = (SlonikStmt *)new;
2278 }
2279 #line 2280 "y.tab.c" /* yacc.c:1652 */
2280 break;
2281
2282 case 65:
2283 #line 572 "parser.y" /* yacc.c:1652 */
2284 { (yyval.ival) = strtol(yytext, NULL, 10); }
2285 #line 2286 "y.tab.c" /* yacc.c:1652 */
2286 break;
2287
2288 case 66:
2289 #line 574 "parser.y" /* yacc.c:1652 */
2290 { (yyval.ival) = -(yyvsp[0].ival); }
2291 #line 2292 "y.tab.c" /* yacc.c:1652 */
2292 break;
2293
2294 case 67:
2295 #line 578 "parser.y" /* yacc.c:1652 */
2296 {
2297 SlonikStmt *new;
2298
2299 new = (SlonikStmt *)
2300 malloc(sizeof(SlonikStmt));
2301 memset(new, 0, sizeof(SlonikStmt));
2302 new->stmt_type = STMT_ERROR;
2303 new->stmt_filename = current_file;
2304 new->stmt_lno = (yyvsp[-1].ival);
2305
2306 (yyval.statement) = (SlonikStmt *)new;
2307 }
2308 #line 2309 "y.tab.c" /* yacc.c:1652 */
2309 break;
2310
2311 case 68:
2312 #line 593 "parser.y" /* yacc.c:1652 */
2313 {
2314 SlonikStmt_init_cluster *new;
2315 statement_option opt[] = {
2316 STMT_OPTION_INT( O_ID, -1 ),
2317 STMT_OPTION_STR( O_COMMENT, "Initial Node" ),
2318 STMT_OPTION_END
2319 };
2320
2321 new = (SlonikStmt_init_cluster *)
2322 malloc(sizeof(SlonikStmt_init_cluster));
2323 memset(new, 0, sizeof(SlonikStmt_init_cluster));
2324 new->hdr.stmt_type = STMT_INIT_CLUSTER;
2325 new->hdr.stmt_filename = current_file;
2326 new->hdr.stmt_lno = (yyvsp[-3].ival);
2327
2328 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2329 {
2330 new->no_id = opt[0].ival;
2331 new->no_comment = opt[1].str;
2332 }
2333 else
2334 parser_errors++;
2335
2336 (yyval.statement) = (SlonikStmt *)new;
2337 }
2338 #line 2339 "y.tab.c" /* yacc.c:1652 */
2339 break;
2340
2341 case 69:
2342 #line 621 "parser.y" /* yacc.c:1652 */
2343 {
2344 SlonikStmt_store_node *new;
2345 statement_option opt[] = {
2346 STMT_OPTION_INT( O_ID, -1 ),
2347 STMT_OPTION_STR( O_COMMENT, NULL ),
2348 STMT_OPTION_INT( O_EVENT_NODE, -1 ),
2349 STMT_OPTION_END
2350 };
2351
2352 new = (SlonikStmt_store_node *)
2353 malloc(sizeof(SlonikStmt_store_node));
2354 memset(new, 0, sizeof(SlonikStmt_store_node));
2355 new->hdr.stmt_type = STMT_STORE_NODE;
2356 new->hdr.stmt_filename = current_file;
2357 new->hdr.stmt_lno = (yyvsp[-3].ival);
2358
2359 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2360 {
2361 new->no_id = opt[0].ival;
2362 new->no_comment = opt[1].str;
2363 new->ev_origin = opt[2].ival;
2364 }
2365 else
2366 parser_errors++;
2367
2368 (yyval.statement) = (SlonikStmt *)new;
2369 }
2370 #line 2371 "y.tab.c" /* yacc.c:1652 */
2371 break;
2372
2373 case 70:
2374 #line 651 "parser.y" /* yacc.c:1652 */
2375 {
2376 SlonikStmt_drop_node *new;
2377 statement_option opt[] = {
2378 STMT_OPTION_STR( O_ID, NULL ),
2379 STMT_OPTION_INT( O_ID, -1 ),
2380 STMT_OPTION_INT( O_EVENT_NODE, -1 ),
2381 STMT_OPTION_END
2382 };
2383
2384 new = (SlonikStmt_drop_node *)
2385 malloc(sizeof(SlonikStmt_drop_node));
2386 memset(new, 0, sizeof(SlonikStmt_drop_node));
2387 new->hdr.stmt_type = STMT_DROP_NODE;
2388 new->hdr.stmt_filename = current_file;
2389 new->hdr.stmt_lno = (yyvsp[-3].ival);
2390
2391 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2392 {
2393 if(opt[0].ival > -1 )
2394 {
2395 new->no_id_list=malloc(sizeof(int)*2);
2396 new->no_id_list[0]=opt[0].ival;
2397 new->no_id_list[1]=-1;
2398 }
2399 else
2400 {
2401 char * token;
2402 char * saveptr=NULL;
2403 int cnt;
2404 char * option_copy=strdup(opt[0].str);
2405 for(cnt=0,token=strtok_r(option_copy,",",
2406 &saveptr);
2407 token != NULL; cnt++,
2408 token=strtok_r(NULL,",",&saveptr));
2409 free(option_copy);
2410 new->no_id_list=malloc(sizeof(int)*(cnt+1));
2411 cnt=0;
2412 option_copy=strdup(opt[0].str);
2413 for(token=strtok_r(option_copy,",",&saveptr);
2414 token!=NULL;
2415 token=strtok_r(NULL,",",&saveptr))
2416 {
2417 new->no_id_list[cnt++]=atoi(token);
2418 }
2419 free(option_copy);
2420 new->no_id_list[cnt]=-1;
2421 }
2422 new->ev_origin = opt[2].ival;
2423
2424 }
2425 else
2426 parser_errors++;
2427
2428 (yyval.statement) = (SlonikStmt *)new;
2429 }
2430 #line 2431 "y.tab.c" /* yacc.c:1652 */
2431 break;
2432
2433 case 71:
2434 #line 708 "parser.y" /* yacc.c:1652 */
2435 {
2436 SlonikStmt_failed_node *new;
2437
2438 new = (SlonikStmt_failed_node *)
2439 malloc(sizeof(SlonikStmt_failed_node));
2440 memset(new, 0, sizeof(SlonikStmt_failed_node));
2441 new->hdr.stmt_type = STMT_FAILED_NODE;
2442 new->hdr.stmt_filename = current_file;
2443 new->hdr.stmt_lno = (yyvsp[-5].ival);
2444
2445 new->nodes=(yyvsp[-2].failed_node_entry);
2446
2447 (yyval.statement) = (SlonikStmt *)new;
2448 }
2449 #line 2450 "y.tab.c" /* yacc.c:1652 */
2450 break;
2451
2452 case 72:
2453 #line 723 "parser.y" /* yacc.c:1652 */
2454 {
2455 SlonikStmt_failed_node *new;
2456 statement_option opt[] = {
2457 STMT_OPTION_INT( O_ID, -1 ),
2458 STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
2459 STMT_OPTION_END
2460 };
2461
2462 new = (SlonikStmt_failed_node *)
2463 malloc(sizeof(SlonikStmt_failed_node));
2464 memset(new, 0, sizeof(SlonikStmt_failed_node));
2465 new->hdr.stmt_type = STMT_FAILED_NODE;
2466 new->hdr.stmt_filename = current_file;
2467 new->hdr.stmt_lno = (yyvsp[-2].ival);
2468 new->nodes=(failed_node_entry*)
2469 malloc(sizeof(failed_node_entry)*1);
2470 memset(new->nodes,0, sizeof(failed_node_entry));
2471
2472 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2473 {
2474 new->nodes->no_id = opt[0].ival;
2475 new->nodes->backup_node = opt[1].ival;
2476 }
2477 else
2478 parser_errors++;
2479
2480 (yyval.statement) = (SlonikStmt *)new;
2481 }
2482 #line 2483 "y.tab.c" /* yacc.c:1652 */
2483 break;
2484
2485 case 73:
2486 #line 754 "parser.y" /* yacc.c:1652 */
2487 {
2488 failed_node_entry *new;
2489 statement_option opt[] = {
2490 STMT_OPTION_INT( O_ID, -1 ),
2491 STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
2492 STMT_OPTION_END
2493 };
2494
2495 new = (failed_node_entry *)
2496 malloc(sizeof(failed_node_entry));
2497 memset(new, 0, sizeof(failed_node_entry));
2498 if (assign_options(opt, (yyvsp[-1].opt_list)) == 0)
2499 {
2500 new->no_id = opt[0].ival;
2501 new->backup_node = opt[1].ival;
2502 }
2503 else
2504 parser_errors++;
2505
2506 (yyval.failed_node_entry) = new;
2507
2508 }
2509 #line 2510 "y.tab.c" /* yacc.c:1652 */
2510 break;
2511
2512 case 74:
2513 #line 777 "parser.y" /* yacc.c:1652 */
2514 {
2515 failed_node_entry *new;
2516 statement_option opt[] = {
2517 STMT_OPTION_INT( O_ID, -1 ),
2518 STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
2519 STMT_OPTION_END
2520 };
2521
2522 new = (failed_node_entry *)
2523 malloc(sizeof(failed_node_entry));
2524 memset(new, 0, sizeof(failed_node_entry));
2525 if (assign_options(opt, (yyvsp[-3].opt_list)) == 0)
2526 {
2527 new->no_id = opt[0].ival;
2528 new->backup_node = opt[1].ival;
2529 }
2530 else
2531 parser_errors++;
2532 new->next=(yyvsp[0].failed_node_entry);
2533 (yyval.failed_node_entry) = new;
2534
2535 }
2536 #line 2537 "y.tab.c" /* yacc.c:1652 */
2537 break;
2538
2539 case 75:
2540 #line 801 "parser.y" /* yacc.c:1652 */
2541 {
2542 SlonikStmt_uninstall_node *new;
2543 statement_option opt[] = {
2544 STMT_OPTION_INT( O_ID, -1 ),
2545 STMT_OPTION_END
2546 };
2547
2548 new = (SlonikStmt_uninstall_node *)
2549 malloc(sizeof(SlonikStmt_uninstall_node));
2550 memset(new, 0, sizeof(SlonikStmt_uninstall_node));
2551 new->hdr.stmt_type = STMT_UNINSTALL_NODE;
2552 new->hdr.stmt_filename = current_file;
2553 new->hdr.stmt_lno = (yyvsp[-3].ival);
2554
2555 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2556 {
2557 new->no_id = opt[0].ival;
2558 }
2559 else
2560 parser_errors++;
2561
2562 (yyval.statement) = (SlonikStmt *)new;
2563 }
2564 #line 2565 "y.tab.c" /* yacc.c:1652 */
2565 break;
2566
2567 case 76:
2568 #line 827 "parser.y" /* yacc.c:1652 */
2569 {
2570 SlonikStmt_clone_prepare *new;
2571 statement_option opt[] = {
2572 STMT_OPTION_INT( O_ID, -1 ),
2573 STMT_OPTION_INT( O_PROVIDER, -1 ),
2574 STMT_OPTION_STR( O_COMMENT, NULL ),
2575 STMT_OPTION_END
2576 };
2577
2578 new = (SlonikStmt_clone_prepare *)
2579 malloc(sizeof(SlonikStmt_clone_prepare));
2580 memset(new, 0, sizeof(SlonikStmt_clone_prepare));
2581 new->hdr.stmt_type = STMT_CLONE_PREPARE;
2582 new->hdr.stmt_filename = current_file;
2583 new->hdr.stmt_lno = (yyvsp[-3].ival);
2584
2585 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2586 {
2587 new->no_id = opt[0].ival;
2588 new->no_provider = opt[1].ival;
2589 new->no_comment = opt[2].str;
2590 }
2591 else
2592 parser_errors++;
2593
2594 (yyval.statement) = (SlonikStmt *)new;
2595 }
2596 #line 2597 "y.tab.c" /* yacc.c:1652 */
2597 break;
2598
2599 case 77:
2600 #line 857 "parser.y" /* yacc.c:1652 */
2601 {
2602 SlonikStmt_clone_finish *new;
2603 statement_option opt[] = {
2604 STMT_OPTION_INT( O_ID, -1 ),
2605 STMT_OPTION_INT( O_PROVIDER, -1 ),
2606 STMT_OPTION_END
2607 };
2608
2609 new = (SlonikStmt_clone_finish *)
2610 malloc(sizeof(SlonikStmt_clone_finish));
2611 memset(new, 0, sizeof(SlonikStmt_clone_finish));
2612 new->hdr.stmt_type = STMT_CLONE_FINISH;
2613 new->hdr.stmt_filename = current_file;
2614 new->hdr.stmt_lno = (yyvsp[-3].ival);
2615
2616 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2617 {
2618 new->no_id = opt[0].ival;
2619 new->no_provider = opt[1].ival;
2620 }
2621 else
2622 parser_errors++;
2623
2624 (yyval.statement) = (SlonikStmt *)new;
2625 }
2626 #line 2627 "y.tab.c" /* yacc.c:1652 */
2627 break;
2628
2629 case 78:
2630 #line 885 "parser.y" /* yacc.c:1652 */
2631 {
2632 SlonikStmt_store_path *new;
2633 statement_option opt[] = {
2634 STMT_OPTION_INT( O_SERVER, -1 ),
2635 STMT_OPTION_INT( O_CLIENT, -1 ),
2636 STMT_OPTION_STR( O_CONNINFO, NULL ),
2637 STMT_OPTION_INT( O_CONNRETRY, 10 ),
2638 STMT_OPTION_END
2639 };
2640
2641 new = (SlonikStmt_store_path *)
2642 malloc(sizeof(SlonikStmt_store_path));
2643 memset(new, 0, sizeof(SlonikStmt_store_path));
2644 new->hdr.stmt_type = STMT_STORE_PATH;
2645 new->hdr.stmt_filename = current_file;
2646 new->hdr.stmt_lno = (yyvsp[-3].ival);
2647
2648 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2649 {
2650 new->pa_server = opt[0].ival;
2651 new->pa_client = opt[1].ival;
2652 new->pa_conninfo = opt[2].str;
2653 new->pa_connretry = opt[3].ival;
2654 }
2655 else
2656 parser_errors++;
2657
2658 (yyval.statement) = (SlonikStmt *)new;
2659 }
2660 #line 2661 "y.tab.c" /* yacc.c:1652 */
2661 break;
2662
2663 case 79:
2664 #line 917 "parser.y" /* yacc.c:1652 */
2665 {
2666 SlonikStmt_drop_path *new;
2667 statement_option opt[] = {
2668 STMT_OPTION_INT( O_SERVER, -1 ),
2669 STMT_OPTION_INT( O_CLIENT, -1 ),
2670 STMT_OPTION_INT( O_EVENT_NODE, -1 ),
2671 STMT_OPTION_END
2672 };
2673
2674 new = (SlonikStmt_drop_path *)
2675 malloc(sizeof(SlonikStmt_drop_path));
2676 memset(new, 0, sizeof(SlonikStmt_drop_path));
2677 new->hdr.stmt_type = STMT_DROP_PATH;
2678 new->hdr.stmt_filename = current_file;
2679 new->hdr.stmt_lno = (yyvsp[-3].ival);
2680
2681 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2682 {
2683 new->pa_server = opt[0].ival;
2684 new->pa_client = opt[1].ival;
2685 new->ev_origin = opt[2].ival;
2686 }
2687 else
2688 parser_errors++;
2689
2690 (yyval.statement) = (SlonikStmt *)new;
2691 }
2692 #line 2693 "y.tab.c" /* yacc.c:1652 */
2693 break;
2694
2695 case 80:
2696 #line 947 "parser.y" /* yacc.c:1652 */
2697 {
2698 SlonikStmt_store_listen *new;
2699 statement_option opt[] = {
2700 STMT_OPTION_INT( O_ORIGIN, -1 ),
2701 STMT_OPTION_INT( O_RECEIVER, -1 ),
2702 STMT_OPTION_INT( O_PROVIDER, -1 ),
2703 STMT_OPTION_END
2704 };
2705
2706 new = (SlonikStmt_store_listen *)
2707 malloc(sizeof(SlonikStmt_store_listen));
2708 memset(new, 0, sizeof(SlonikStmt_store_listen));
2709 new->hdr.stmt_type = STMT_STORE_LISTEN;
2710 new->hdr.stmt_filename = current_file;
2711 new->hdr.stmt_lno = (yyvsp[-3].ival);
2712
2713 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2714 {
2715 new->li_origin = opt[0].ival;
2716 new->li_receiver = opt[1].ival;
2717 new->li_provider = opt[2].ival;
2718 }
2719 else
2720 parser_errors++;
2721
2722 (yyval.statement) = (SlonikStmt *)new;
2723 }
2724 #line 2725 "y.tab.c" /* yacc.c:1652 */
2725 break;
2726
2727 case 81:
2728 #line 977 "parser.y" /* yacc.c:1652 */
2729 {
2730 SlonikStmt_drop_listen *new;
2731 statement_option opt[] = {
2732 STMT_OPTION_INT( O_ORIGIN, -1 ),
2733 STMT_OPTION_INT( O_RECEIVER, -1 ),
2734 STMT_OPTION_INT( O_PROVIDER, -1 ),
2735 STMT_OPTION_END
2736 };
2737
2738 new = (SlonikStmt_drop_listen *)
2739 malloc(sizeof(SlonikStmt_drop_listen));
2740 memset(new, 0, sizeof(SlonikStmt_drop_listen));
2741 new->hdr.stmt_type = STMT_DROP_LISTEN;
2742 new->hdr.stmt_filename = current_file;
2743 new->hdr.stmt_lno = (yyvsp[-3].ival);
2744
2745 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2746 {
2747 new->li_origin = opt[0].ival;
2748 new->li_receiver = opt[1].ival;
2749 new->li_provider = opt[2].ival;
2750 }
2751 else
2752 parser_errors++;
2753
2754 (yyval.statement) = (SlonikStmt *)new;
2755 }
2756 #line 2757 "y.tab.c" /* yacc.c:1652 */
2757 break;
2758
2759 case 82:
2760 #line 1007 "parser.y" /* yacc.c:1652 */
2761 {
2762 SlonikStmt_create_set *new;
2763 statement_option opt[] = {
2764 STMT_OPTION_INT( O_ID, -1 ),
2765 STMT_OPTION_INT( O_ORIGIN, -1 ),
2766 STMT_OPTION_STR( O_COMMENT, NULL ),
2767 STMT_OPTION_END
2768 };
2769
2770 new = (SlonikStmt_create_set *)
2771 malloc(sizeof(SlonikStmt_create_set));
2772 memset(new, 0, sizeof(SlonikStmt_create_set));
2773 new->hdr.stmt_type = STMT_CREATE_SET;
2774 new->hdr.stmt_filename = current_file;
2775 new->hdr.stmt_lno = (yyvsp[-3].ival);
2776
2777 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2778 {
2779 new->set_id = opt[0].ival;
2780 new->set_origin = opt[1].ival;
2781 new->set_comment = opt[2].str;
2782 }
2783 else
2784 parser_errors++;
2785
2786 (yyval.statement) = (SlonikStmt *)new;
2787 }
2788 #line 2789 "y.tab.c" /* yacc.c:1652 */
2789 break;
2790
2791 case 83:
2792 #line 1037 "parser.y" /* yacc.c:1652 */
2793 {
2794 SlonikStmt_drop_set *new;
2795 statement_option opt[] = {
2796 STMT_OPTION_INT( O_ID, -1 ),
2797 STMT_OPTION_INT( O_ORIGIN, -1 ),
2798 STMT_OPTION_END
2799 };
2800
2801 new = (SlonikStmt_drop_set *)
2802 malloc(sizeof(SlonikStmt_drop_set));
2803 memset(new, 0, sizeof(SlonikStmt_drop_set));
2804 new->hdr.stmt_type = STMT_DROP_SET;
2805 new->hdr.stmt_filename = current_file;
2806 new->hdr.stmt_lno = (yyvsp[-3].ival);
2807
2808 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2809 {
2810 new->set_id = opt[0].ival;
2811 new->set_origin = opt[1].ival;
2812 }
2813 else
2814 parser_errors++;
2815
2816 (yyval.statement) = (SlonikStmt *)new;
2817 }
2818 #line 2819 "y.tab.c" /* yacc.c:1652 */
2819 break;
2820
2821 case 84:
2822 #line 1065 "parser.y" /* yacc.c:1652 */
2823 {
2824 SlonikStmt_merge_set *new;
2825 statement_option opt[] = {
2826 STMT_OPTION_INT( O_ID, -1 ),
2827 STMT_OPTION_INT( O_ADD_ID, -1 ),
2828 STMT_OPTION_INT( O_ORIGIN, -1 ),
2829 STMT_OPTION_END
2830 };
2831
2832 new = (SlonikStmt_merge_set *)
2833 malloc(sizeof(SlonikStmt_merge_set));
2834 memset(new, 0, sizeof(SlonikStmt_merge_set));
2835 new->hdr.stmt_type = STMT_MERGE_SET;
2836 new->hdr.stmt_filename = current_file;
2837 new->hdr.stmt_lno = (yyvsp[-3].ival);
2838
2839 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2840 {
2841 new->set_id = opt[0].ival;
2842 new->add_id = opt[1].ival;
2843 new->set_origin = opt[2].ival;
2844 }
2845 else
2846 parser_errors++;
2847
2848 (yyval.statement) = (SlonikStmt *)new;
2849 }
2850 #line 2851 "y.tab.c" /* yacc.c:1652 */
2851 break;
2852
2853 case 85:
2854 #line 1096 "parser.y" /* yacc.c:1652 */
2855 {
2856 SlonikStmt_set_add_table *new;
2857 statement_option opt[] = {
2858 STMT_OPTION_INT( O_SET_ID, -1 ),
2859 STMT_OPTION_INT( O_ORIGIN, -1 ),
2860 STMT_OPTION_INT( O_ID, -1 ),
2861 STMT_OPTION_STR( O_FQNAME, NULL ),
2862 STMT_OPTION_STR( O_USE_KEY, NULL ),
2863 STMT_OPTION_STR( O_COMMENT, NULL ),
2864 STMT_OPTION_STR( O_TABLES,NULL),
2865 STMT_OPTION_YN(O_ADD_SEQUENCES,0),
2866 STMT_OPTION_END
2867 };
2868
2869 new = (SlonikStmt_set_add_table *)
2870 malloc(sizeof(SlonikStmt_set_add_table));
2871 memset(new, 0, sizeof(SlonikStmt_set_add_table));
2872 new->hdr.stmt_type = STMT_SET_ADD_TABLE;
2873 new->hdr.stmt_filename = current_file;
2874 new->hdr.stmt_lno = (yyvsp[-4].ival);
2875
2876 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2877 {
2878 new->set_id = opt[0].ival;
2879 new->set_origin = opt[1].ival;
2880 new->tab_id = opt[2].ival;
2881 new->tab_fqname = opt[3].str;
2882 new->use_key = opt[4].str;
2883 new->tab_comment = opt[5].str;
2884 new->tables = opt[6].str;
2885 new->add_sequences = opt[7].ival;
2886 }
2887 else
2888 parser_errors++;
2889
2890 (yyval.statement) = (SlonikStmt *)new;
2891 }
2892 #line 2893 "y.tab.c" /* yacc.c:1652 */
2893 break;
2894
2895 case 86:
2896 #line 1136 "parser.y" /* yacc.c:1652 */
2897 {
2898 SlonikStmt_set_add_sequence *new;
2899 statement_option opt[] = {
2900 STMT_OPTION_INT( O_SET_ID, -1 ),
2901 STMT_OPTION_INT( O_ORIGIN, -1 ),
2902 STMT_OPTION_INT( O_ID, -1 ),
2903 STMT_OPTION_STR( O_FQNAME, NULL ),
2904 STMT_OPTION_STR( O_COMMENT, NULL ),
2905 STMT_OPTION_STR( O_SEQUENCES, NULL),
2906 STMT_OPTION_END
2907 };
2908
2909 new = (SlonikStmt_set_add_sequence *)
2910 malloc(sizeof(SlonikStmt_set_add_sequence));
2911 memset(new, 0, sizeof(SlonikStmt_set_add_sequence));
2912 new->hdr.stmt_type = STMT_SET_ADD_SEQUENCE;
2913 new->hdr.stmt_filename = current_file;
2914 new->hdr.stmt_lno = (yyvsp[-4].ival);
2915
2916 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2917 {
2918 new->set_id = opt[0].ival;
2919 new->set_origin = opt[1].ival;
2920 new->seq_id = opt[2].ival;
2921 new->seq_fqname = opt[3].str;
2922 new->seq_comment = opt[4].str;
2923 new->sequences = opt[5].str;
2924 }
2925 else
2926 parser_errors++;
2927
2928 (yyval.statement) = (SlonikStmt *)new;
2929 }
2930 #line 2931 "y.tab.c" /* yacc.c:1652 */
2931 break;
2932
2933 case 87:
2934 #line 1172 "parser.y" /* yacc.c:1652 */
2935 {
2936 SlonikStmt_set_drop_table *new;
2937 statement_option opt[] = {
2938 STMT_OPTION_INT( O_ORIGIN, -1 ),
2939 STMT_OPTION_INT( O_ID, -1 ),
2940 STMT_OPTION_END
2941 };
2942 new = (SlonikStmt_set_drop_table *)
2943 malloc(sizeof(SlonikStmt_set_drop_table));
2944 memset(new, 0, sizeof(SlonikStmt_set_drop_table));
2945 new->hdr.stmt_type = STMT_SET_DROP_TABLE;
2946 new->hdr.stmt_filename = current_file;
2947 new->hdr.stmt_lno = (yyvsp[-4].ival);
2948
2949 if (assign_options(opt, (yyvsp[0].opt_list)) == 0) {
2950 new->set_origin = opt[0].ival;
2951 new->tab_id = opt[1].ival;
2952 }
2953 else
2954 parser_errors++;
2955
2956 (yyval.statement) = (SlonikStmt *)new;
2957 }
2958 #line 2959 "y.tab.c" /* yacc.c:1652 */
2959 break;
2960
2961 case 88:
2962 #line 1198 "parser.y" /* yacc.c:1652 */
2963 {
2964 SlonikStmt_set_drop_sequence *new;
2965 statement_option opt[] = {
2966 STMT_OPTION_INT( O_ORIGIN, -1 ),
2967 STMT_OPTION_INT( O_ID, -1 ),
2968 STMT_OPTION_END
2969 };
2970
2971 new = (SlonikStmt_set_drop_sequence *)
2972 malloc(sizeof(SlonikStmt_set_drop_sequence));
2973 memset(new, 0, sizeof(SlonikStmt_set_drop_sequence));
2974 new->hdr.stmt_type = STMT_SET_DROP_SEQUENCE;
2975 new->hdr.stmt_filename = current_file;
2976 new->hdr.stmt_lno = (yyvsp[-4].ival);
2977
2978 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
2979 {
2980 new->set_origin = opt[0].ival;
2981 new->seq_id = opt[1].ival;
2982 }
2983 else
2984 parser_errors++;
2985
2986 (yyval.statement) = (SlonikStmt *)new;
2987 }
2988 #line 2989 "y.tab.c" /* yacc.c:1652 */
2989 break;
2990
2991 case 89:
2992 #line 1226 "parser.y" /* yacc.c:1652 */
2993 {
2994 SlonikStmt_set_move_table *new;
2995 statement_option opt[] = {
2996 STMT_OPTION_INT( O_ORIGIN, -1 ),
2997 STMT_OPTION_INT( O_ID, -1 ),
2998 STMT_OPTION_INT( O_NEW_SET, -1 ),
2999 STMT_OPTION_END
3000 };
3001 new = (SlonikStmt_set_move_table *)
3002 malloc(sizeof(SlonikStmt_set_move_table));
3003 memset(new, 0, sizeof(SlonikStmt_set_move_table));
3004 new->hdr.stmt_type = STMT_SET_MOVE_TABLE;
3005 new->hdr.stmt_filename = current_file;
3006 new->hdr.stmt_lno = (yyvsp[-4].ival);
3007
3008 if (assign_options(opt, (yyvsp[0].opt_list)) == 0) {
3009 new->set_origin = opt[0].ival;
3010 new->tab_id = opt[1].ival;
3011 new->new_set_id = opt[2].ival;
3012 }
3013 else
3014 parser_errors++;
3015
3016 (yyval.statement) = (SlonikStmt *)new;
3017 }
3018 #line 3019 "y.tab.c" /* yacc.c:1652 */
3019 break;
3020
3021 case 90:
3022 #line 1254 "parser.y" /* yacc.c:1652 */
3023 {
3024 SlonikStmt_set_move_sequence *new;
3025 statement_option opt[] = {
3026 STMT_OPTION_INT( O_ORIGIN, -1 ),
3027 STMT_OPTION_INT( O_ID, -1 ),
3028 STMT_OPTION_INT( O_NEW_SET, -1 ),
3029 STMT_OPTION_END
3030 };
3031
3032 new = (SlonikStmt_set_move_sequence *)
3033 malloc(sizeof(SlonikStmt_set_move_sequence));
3034 memset(new, 0, sizeof(SlonikStmt_set_move_sequence));
3035 new->hdr.stmt_type = STMT_SET_MOVE_SEQUENCE;
3036 new->hdr.stmt_filename = current_file;
3037 new->hdr.stmt_lno = (yyvsp[-4].ival);
3038
3039 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3040 {
3041 new->set_origin = opt[0].ival;
3042 new->seq_id = opt[1].ival;
3043 new->new_set_id = opt[2].ival;
3044 }
3045 else
3046 parser_errors++;
3047
3048 (yyval.statement) = (SlonikStmt *)new;
3049 }
3050 #line 3051 "y.tab.c" /* yacc.c:1652 */
3051 break;
3052
3053 case 91:
3054 #line 1284 "parser.y" /* yacc.c:1652 */
3055 {
3056 SlonikStmt_subscribe_set *new;
3057 statement_option opt[] = {
3058 STMT_OPTION_INT( O_ID, -1 ),
3059 STMT_OPTION_INT( O_PROVIDER, -1 ),
3060 STMT_OPTION_INT( O_RECEIVER, -1 ),
3061 STMT_OPTION_YN( O_FORWARD, 0 ),
3062 STMT_OPTION_YN( O_OMIT_COPY, 0 ),
3063 STMT_OPTION_END
3064 };
3065
3066 new = (SlonikStmt_subscribe_set *)
3067 malloc(sizeof(SlonikStmt_subscribe_set));
3068 memset(new, 0, sizeof(SlonikStmt_subscribe_set));
3069 new->hdr.stmt_type = STMT_SUBSCRIBE_SET;
3070 new->hdr.stmt_filename = current_file;
3071 new->hdr.stmt_lno = (yyvsp[-3].ival);
3072
3073 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3074 {
3075 new->sub_setid = opt[0].ival;
3076 new->sub_provider = opt[1].ival;
3077 new->sub_receiver = opt[2].ival;
3078 new->sub_forward = opt[3].ival;
3079 new->omit_copy = opt[4].ival;
3080 }
3081 else
3082 parser_errors++;
3083
3084 (yyval.statement) = (SlonikStmt *)new;
3085 }
3086 #line 3087 "y.tab.c" /* yacc.c:1652 */
3087 break;
3088
3089 case 92:
3090 #line 1317 "parser.y" /* yacc.c:1652 */
3091 {
3092 SlonikStmt_unsubscribe_set *new;
3093 statement_option opt[] = {
3094 STMT_OPTION_INT( O_ID, -1 ),
3095 STMT_OPTION_INT( O_RECEIVER, -1 ),
3096 STMT_OPTION_END
3097 };
3098
3099 new = (SlonikStmt_unsubscribe_set *)
3100 malloc(sizeof(SlonikStmt_unsubscribe_set));
3101 memset(new, 0, sizeof(SlonikStmt_unsubscribe_set));
3102 new->hdr.stmt_type = STMT_UNSUBSCRIBE_SET;
3103 new->hdr.stmt_filename = current_file;
3104 new->hdr.stmt_lno = (yyvsp[-3].ival);
3105
3106 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3107 {
3108 new->sub_setid = opt[0].ival;
3109 new->sub_receiver = opt[1].ival;
3110 }
3111 else
3112 parser_errors++;
3113
3114 (yyval.statement) = (SlonikStmt *)new;
3115 }
3116 #line 3117 "y.tab.c" /* yacc.c:1652 */
3117 break;
3118
3119 case 93:
3120 #line 1345 "parser.y" /* yacc.c:1652 */
3121 {
3122 SlonikStmt_lock_set *new;
3123 statement_option opt[] = {
3124 STMT_OPTION_INT( O_ID, -1 ),
3125 STMT_OPTION_INT( O_ORIGIN, -1 ),
3126 STMT_OPTION_END
3127 };
3128
3129 new = (SlonikStmt_lock_set *)
3130 malloc(sizeof(SlonikStmt_lock_set));
3131 memset(new, 0, sizeof(SlonikStmt_lock_set));
3132 new->hdr.stmt_type = STMT_LOCK_SET;
3133 new->hdr.stmt_filename = current_file;
3134 new->hdr.stmt_lno = (yyvsp[-3].ival);
3135
3136 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3137 {
3138 new->set_id = opt[0].ival;
3139 new->set_origin = opt[1].ival;
3140 }
3141 else
3142 parser_errors++;
3143
3144 (yyval.statement) = (SlonikStmt *)new;
3145 }
3146 #line 3147 "y.tab.c" /* yacc.c:1652 */
3147 break;
3148
3149 case 94:
3150 #line 1373 "parser.y" /* yacc.c:1652 */
3151 {
3152 SlonikStmt_unlock_set *new;
3153 statement_option opt[] = {
3154 STMT_OPTION_INT( O_ID, -1 ),
3155 STMT_OPTION_INT( O_ORIGIN, -1 ),
3156 STMT_OPTION_END
3157 };
3158
3159 new = (SlonikStmt_unlock_set *)
3160 malloc(sizeof(SlonikStmt_unlock_set));
3161 memset(new, 0, sizeof(SlonikStmt_unlock_set));
3162 new->hdr.stmt_type = STMT_UNLOCK_SET;
3163 new->hdr.stmt_filename = current_file;
3164 new->hdr.stmt_lno = (yyvsp[-3].ival);
3165
3166 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3167 {
3168 new->set_id = opt[0].ival;
3169 new->set_origin = opt[1].ival;
3170 }
3171 else
3172 parser_errors++;
3173
3174 (yyval.statement) = (SlonikStmt *)new;
3175 }
3176 #line 3177 "y.tab.c" /* yacc.c:1652 */
3177 break;
3178
3179 case 95:
3180 #line 1401 "parser.y" /* yacc.c:1652 */
3181 {
3182 SlonikStmt_move_set *new;
3183 statement_option opt[] = {
3184 STMT_OPTION_INT( O_ID, -1 ),
3185 STMT_OPTION_INT( O_OLD_ORIGIN, -1 ),
3186 STMT_OPTION_INT( O_NEW_ORIGIN, -1 ),
3187 STMT_OPTION_END
3188 };
3189
3190 new = (SlonikStmt_move_set *)
3191 malloc(sizeof(SlonikStmt_move_set));
3192 memset(new, 0, sizeof(SlonikStmt_move_set));
3193 new->hdr.stmt_type = STMT_MOVE_SET;
3194 new->hdr.stmt_filename = current_file;
3195 new->hdr.stmt_lno = (yyvsp[-3].ival);
3196
3197 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3198 {
3199 new->set_id = opt[0].ival;
3200 new->old_origin = opt[1].ival;
3201 new->new_origin = opt[2].ival;
3202 }
3203 else
3204 parser_errors++;
3205
3206 (yyval.statement) = (SlonikStmt *)new;
3207 }
3208 #line 3209 "y.tab.c" /* yacc.c:1652 */
3209 break;
3210
3211 case 96:
3212 #line 1431 "parser.y" /* yacc.c:1652 */
3213 {
3214 SlonikStmt_ddl_script *new;
3215 statement_option opt[] = {
3216 STMT_OPTION_STR( O_FILENAME, NULL ),
3217 STMT_OPTION_STR( O_SQL, NULL ),
3218 STMT_OPTION_INT( O_EVENT_NODE, -1 ),
3219 STMT_OPTION_STR( O_EXECUTE_ONLY_LIST, NULL ),
3220 STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
3221 STMT_OPTION_END
3222 };
3223
3224 new = (SlonikStmt_ddl_script *)
3225 malloc(sizeof(SlonikStmt_ddl_script));
3226 memset(new, 0, sizeof(SlonikStmt_ddl_script));
3227 new->hdr.stmt_type = STMT_DDL_SCRIPT;
3228 new->hdr.stmt_filename = current_file;
3229 new->hdr.stmt_lno = (yyvsp[-3].ival);
3230
3231 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3232 {
3233 new->ddl_fname = opt[0].str;
3234 new->ddl_sql = opt[1].str;
3235 new->ev_origin = opt[2].ival;
3236 new->only_on_nodes = opt[3].str;
3237 new->only_on_node = opt[4].ival;
3238 new->ddl_fd = NULL;
3239 }
3240 else
3241 parser_errors++;
3242
3243 (yyval.statement) = (SlonikStmt *)new;
3244 }
3245 #line 3246 "y.tab.c" /* yacc.c:1652 */
3246 break;
3247
3248 case 97:
3249 #line 1466 "parser.y" /* yacc.c:1652 */
3250 {
3251 SlonikStmt_update_functions *new;
3252 statement_option opt[] = {
3253 STMT_OPTION_INT( O_ID, -1 ),
3254 STMT_OPTION_END
3255 };
3256
3257 new = (SlonikStmt_update_functions *)
3258 malloc(sizeof(SlonikStmt_update_functions));
3259 memset(new, 0, sizeof(SlonikStmt_update_functions));
3260 new->hdr.stmt_type = STMT_UPDATE_FUNCTIONS;
3261 new->hdr.stmt_filename = current_file;
3262 new->hdr.stmt_lno = (yyvsp[-3].ival);
3263
3264 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3265 {
3266 new->no_id = opt[0].ival;
3267 }
3268 else
3269 parser_errors++;
3270
3271 (yyval.statement) = (SlonikStmt *)new;
3272 }
3273 #line 3274 "y.tab.c" /* yacc.c:1652 */
3274 break;
3275
3276 case 98:
3277 #line 1491 "parser.y" /* yacc.c:1652 */
3278 {
3279 SlonikStmt_repair_config *new;
3280 statement_option opt[] = {
3281 STMT_OPTION_INT( O_SET_ID, -1 ),
3282 STMT_OPTION_INT( O_EVENT_NODE, -1 ),
3283 STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
3284 STMT_OPTION_END
3285 };
3286
3287 new = (SlonikStmt_repair_config *)
3288 malloc(sizeof(SlonikStmt_repair_config));
3289 memset(new, 0, sizeof(SlonikStmt_repair_config));
3290 new->hdr.stmt_type = STMT_REPAIR_CONFIG;
3291 new->hdr.stmt_filename = current_file;
3292 new->hdr.stmt_lno = (yyvsp[-3].ival);
3293
3294 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3295 {
3296 new->set_id = opt[0].ival;
3297 new->ev_origin = opt[1].ival;
3298 new->only_on_node = opt[2].ival;
3299 }
3300 else
3301 {
3302 parser_errors++;
3303 }
3304 (yyval.statement) = (SlonikStmt *)new;
3305 }
3306 #line 3307 "y.tab.c" /* yacc.c:1652 */
3307 break;
3308
3309 case 99:
3310 #line 1522 "parser.y" /* yacc.c:1652 */
3311 {
3312 SlonikStmt_wait_event *new;
3313 statement_option opt[] = {
3314 STMT_OPTION_INT( O_ORIGIN, -1 ),
3315 STMT_OPTION_INT( O_WAIT_CONFIRMED, -1 ),
3316 STMT_OPTION_INT( O_WAIT_ON, -1 ),
3317 STMT_OPTION_INT( O_TIMEOUT, 600 ),
3318 STMT_OPTION_END
3319 };
3320
3321 new = (SlonikStmt_wait_event *)
3322 malloc(sizeof(SlonikStmt_wait_event));
3323 memset(new, 0, sizeof(SlonikStmt_wait_event));
3324 new->hdr.stmt_type = STMT_WAIT_EVENT;
3325 new->hdr.stmt_filename = current_file;
3326 new->hdr.stmt_lno = (yyvsp[-4].ival);
3327
3328 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3329 {
3330 new->wait_origin = opt[0].ival;
3331 new->wait_confirmed = opt[1].ival;
3332 new->wait_on = opt[2].ival;
3333 new->wait_timeout = opt[3].ival;
3334 }
3335 else
3336 parser_errors++;
3337
3338 (yyval.statement) = (SlonikStmt *)new;
3339 }
3340 #line 3341 "y.tab.c" /* yacc.c:1652 */
3341 break;
3342
3343 case 100:
3344 #line 1554 "parser.y" /* yacc.c:1652 */
3345 {
3346 SlonikStmt_wait_event *new;
3347
3348 new = (SlonikStmt_wait_event *)
3349 malloc(sizeof(SlonikStmt_wait_event));
3350 memset(new, 0, sizeof(SlonikStmt_wait_event));
3351 new->hdr.stmt_type = STMT_WAIT_EVENT;
3352 new->hdr.stmt_filename = current_file;
3353 new->hdr.stmt_lno = (yyvsp[-4].ival);
3354
3355 fprintf(stderr, "%s:%d: wait for event "
3356 "not allowed inside try block\n",
3357 current_file, (yyvsp[-4].ival));
3358 parser_errors++;
3359
3360 (yyval.statement) = (SlonikStmt *)new;
3361 }
3362 #line 3363 "y.tab.c" /* yacc.c:1652 */
3363 break;
3364
3365 case 101:
3366 #line 1574 "parser.y" /* yacc.c:1652 */
3367 {
3368 SlonikStmt_switch_log *new;
3369 statement_option opt[] = {
3370 STMT_OPTION_INT( O_ID, -1 ),
3371 STMT_OPTION_END
3372 };
3373
3374 new = (SlonikStmt_switch_log *)
3375 malloc(sizeof(SlonikStmt_switch_log));
3376 memset(new, 0, sizeof(SlonikStmt_switch_log));
3377 new->hdr.stmt_type = STMT_SWITCH_LOG;
3378 new->hdr.stmt_filename = current_file;
3379 new->hdr.stmt_lno = (yyvsp[-3].ival);
3380
3381 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3382 {
3383 new->no_id = opt[0].ival;
3384 }
3385 else
3386 parser_errors++;
3387
3388 (yyval.statement) = (SlonikStmt *)new;
3389 }
3390 #line 3391 "y.tab.c" /* yacc.c:1652 */
3391 break;
3392
3393 case 102:
3394 #line 1600 "parser.y" /* yacc.c:1652 */
3395 {
3396 SlonikStmt_sync *new;
3397 statement_option opt[] = {
3398 STMT_OPTION_INT( O_ID, -1 ),
3399 STMT_OPTION_END
3400 };
3401
3402 new = (SlonikStmt_sync *)
3403 malloc(sizeof(SlonikStmt_sync));
3404 memset(new, 0, sizeof(SlonikStmt_sync));
3405 new->hdr.stmt_type = STMT_SYNC;
3406 new->hdr.stmt_filename = current_file;
3407 new->hdr.stmt_lno = (yyvsp[-2].ival);
3408
3409 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3410 {
3411 new->no_id = opt[0].ival;
3412 }
3413 else
3414 parser_errors++;
3415
3416 (yyval.statement) = (SlonikStmt *)new;
3417 }
3418 #line 3419 "y.tab.c" /* yacc.c:1652 */
3419 break;
3420
3421 case 103:
3422 #line 1626 "parser.y" /* yacc.c:1652 */
3423 {
3424 SlonikStmt_sleep *new;
3425 statement_option opt[] = {
3426 STMT_OPTION_INT( O_SECONDS, -1 ),
3427 STMT_OPTION_END
3428 };
3429
3430 new = (SlonikStmt_sleep *)
3431 malloc(sizeof(SlonikStmt_sleep));
3432 memset(new, 0, sizeof(SlonikStmt_sleep));
3433 new->hdr.stmt_type = STMT_SLEEP;
3434 new->hdr.stmt_filename = current_file;
3435 new->hdr.stmt_lno = (yyvsp[-2].ival);
3436
3437 if (assign_options(opt, (yyvsp[0].opt_list)) == 0)
3438 {
3439 new->num_secs = opt[0].ival;
3440 }
3441 else
3442 parser_errors++;
3443
3444 (yyval.statement) = (SlonikStmt *)new;
3445 }
3446 #line 3447 "y.tab.c" /* yacc.c:1652 */
3447 break;
3448
3449 case 104:
3450 #line 1652 "parser.y" /* yacc.c:1652 */
3451 { (yyval.opt_list) = NULL; }
3452 #line 3453 "y.tab.c" /* yacc.c:1652 */
3453 break;
3454
3455 case 105:
3456 #line 1654 "parser.y" /* yacc.c:1652 */
3457 { (yyval.opt_list) = (yyvsp[-2].opt_list); }
3458 #line 3459 "y.tab.c" /* yacc.c:1652 */
3459 break;
3460
3461 case 106:
3462 #line 1658 "parser.y" /* yacc.c:1652 */
3463 { (yyval.opt_list) = (yyvsp[0].opt_list); }
3464 #line 3465 "y.tab.c" /* yacc.c:1652 */
3465 break;
3466
3467 case 107:
3468 #line 1660 "parser.y" /* yacc.c:1652 */
3469 { (yyvsp[-2].opt_list)->next = (yyvsp[0].opt_list); (yyval.opt_list) = (yyvsp[-2].opt_list); }
3470 #line 3471 "y.tab.c" /* yacc.c:1652 */
3471 break;
3472
3473 case 108:
3474 #line 1664 "parser.y" /* yacc.c:1652 */
3475 {
3476 (yyvsp[0].opt_list)->opt_code = O_ID;
3477 (yyval.opt_list) = (yyvsp[0].opt_list);
3478 }
3479 #line 3480 "y.tab.c" /* yacc.c:1652 */
3480 break;
3481
3482 case 109:
3483 #line 1669 "parser.y" /* yacc.c:1652 */
3484 {
3485 (yyvsp[0].opt_list)->opt_code= O_ID;
3486 (yyval.opt_list)=(yyvsp[0].opt_list);
3487 }
3488 #line 3489 "y.tab.c" /* yacc.c:1652 */
3489 break;
3490
3491 case 110:
3492 #line 1674 "parser.y" /* yacc.c:1652 */
3493 {
3494 (yyvsp[0].opt_list)->opt_code = O_BACKUP_NODE;
3495 (yyval.opt_list) = (yyvsp[0].opt_list);
3496 }
3497 #line 3498 "y.tab.c" /* yacc.c:1652 */
3498 break;
3499
3500 case 111:
3501 #line 1679 "parser.y" /* yacc.c:1652 */
3502 {
3503 (yyvsp[0].opt_list)->opt_code = O_EVENT_NODE;
3504 (yyval.opt_list) = (yyvsp[0].opt_list);
3505 }
3506 #line 3507 "y.tab.c" /* yacc.c:1652 */
3507 break;
3508
3509 case 112:
3510 #line 1684 "parser.y" /* yacc.c:1652 */
3511 {
3512 (yyvsp[0].opt_list)->opt_code = O_SERVER;
3513 (yyval.opt_list) = (yyvsp[0].opt_list);
3514 }
3515 #line 3516 "y.tab.c" /* yacc.c:1652 */
3516 break;
3517
3518 case 113:
3519 #line 1689 "parser.y" /* yacc.c:1652 */
3520 {
3521 (yyvsp[0].opt_list)->opt_code = O_CLIENT;
3522 (yyval.opt_list) = (yyvsp[0].opt_list);
3523 }
3524 #line 3525 "y.tab.c" /* yacc.c:1652 */
3525 break;
3526
3527 case 114:
3528 #line 1694 "parser.y" /* yacc.c:1652 */
3529 {
3530 (yyvsp[0].opt_list)->opt_code = O_ORIGIN;
3531 (yyval.opt_list) = (yyvsp[0].opt_list);
3532 }
3533 #line 3534 "y.tab.c" /* yacc.c:1652 */
3534 break;
3535
3536 case 115:
3537 #line 1699 "parser.y" /* yacc.c:1652 */
3538 {
3539 (yyvsp[0].opt_list)->opt_code = O_OLD_ORIGIN;
3540 (yyval.opt_list) = (yyvsp[0].opt_list);
3541 }
3542 #line 3543 "y.tab.c" /* yacc.c:1652 */
3543 break;
3544
3545 case 116:
3546 #line 1704 "parser.y" /* yacc.c:1652 */
3547 {
3548 (yyvsp[0].opt_list)->opt_code = O_OMIT_COPY;
3549 (yyval.opt_list) = (yyvsp[0].opt_list);
3550 }
3551 #line 3552 "y.tab.c" /* yacc.c:1652 */
3552 break;
3553
3554 case 117:
3555 #line 1709 "parser.y" /* yacc.c:1652 */
3556 {
3557 (yyvsp[0].opt_list)->opt_code = O_NEW_ORIGIN;
3558 (yyval.opt_list) = (yyvsp[0].opt_list);
3559 }
3560 #line 3561 "y.tab.c" /* yacc.c:1652 */
3561 break;
3562
3563 case 118:
3564 #line 1714 "parser.y" /* yacc.c:1652 */
3565 {
3566 (yyvsp[0].opt_list)->opt_code = O_NEW_SET;
3567 (yyval.opt_list) = (yyvsp[0].opt_list);
3568 }
3569 #line 3570 "y.tab.c" /* yacc.c:1652 */
3570 break;
3571
3572 case 119:
3573 #line 1719 "parser.y" /* yacc.c:1652 */
3574 {
3575 (yyvsp[0].opt_list)->opt_code = O_RECEIVER;
3576 (yyval.opt_list) = (yyvsp[0].opt_list);
3577 }
3578 #line 3579 "y.tab.c" /* yacc.c:1652 */
3579 break;
3580
3581 case 120:
3582 #line 1724 "parser.y" /* yacc.c:1652 */
3583 {
3584 (yyvsp[0].opt_list)->opt_code = O_PROVIDER;
3585 (yyval.opt_list) = (yyvsp[0].opt_list);
3586 }
3587 #line 3588 "y.tab.c" /* yacc.c:1652 */
3588 break;
3589
3590 case 121:
3591 #line 1729 "parser.y" /* yacc.c:1652 */
3592 {
3593 (yyvsp[0].opt_list)->opt_code = O_CONNRETRY;
3594 (yyval.opt_list) = (yyvsp[0].opt_list);
3595 }
3596 #line 3597 "y.tab.c" /* yacc.c:1652 */
3597 break;
3598
3599 case 122:
3600 #line 1734 "parser.y" /* yacc.c:1652 */
3601 {
3602 (yyvsp[0].opt_list)->opt_code = O_COMMENT;
3603 (yyval.opt_list) = (yyvsp[0].opt_list);
3604 }
3605 #line 3606 "y.tab.c" /* yacc.c:1652 */
3606 break;
3607
3608 case 123:
3609 #line 1739 "parser.y" /* yacc.c:1652 */
3610 {
3611 (yyvsp[0].opt_list)->opt_code = O_CONNINFO;
3612 (yyval.opt_list) = (yyvsp[0].opt_list);
3613 }
3614 #line 3615 "y.tab.c" /* yacc.c:1652 */
3615 break;
3616
3617 case 124:
3618 #line 1744 "parser.y" /* yacc.c:1652 */
3619 {
3620 (yyvsp[0].opt_list)->opt_code = O_DATE_FORMAT;
3621 (yyval.opt_list) = (yyvsp[0].opt_list);
3622 }
3623 #line 3624 "y.tab.c" /* yacc.c:1652 */
3624 break;
3625
3626 case 125:
3627 #line 1749 "parser.y" /* yacc.c:1652 */
3628 {
3629 (yyvsp[0].opt_list)->opt_code = O_SET_ID;
3630 (yyval.opt_list) = (yyvsp[0].opt_list);
3631 }
3632 #line 3633 "y.tab.c" /* yacc.c:1652 */
3633 break;
3634
3635 case 126:
3636 #line 1754 "parser.y" /* yacc.c:1652 */
3637 {
3638 (yyvsp[0].opt_list)->opt_code = O_ADD_ID;
3639 (yyval.opt_list) = (yyvsp[0].opt_list);
3640 }
3641 #line 3642 "y.tab.c" /* yacc.c:1652 */
3642 break;
3643
3644 case 127:
3645 #line 1759 "parser.y" /* yacc.c:1652 */
3646 {
3647 (yyvsp[0].opt_list)->opt_code = O_NODE_ID;
3648 (yyval.opt_list) = (yyvsp[0].opt_list);
3649 }
3650 #line 3651 "y.tab.c" /* yacc.c:1652 */
3651 break;
3652
3653 case 128:
3654 #line 1764 "parser.y" /* yacc.c:1652 */
3655 {
3656 (yyvsp[0].opt_list)->opt_code = O_TAB_ID;
3657 (yyval.opt_list) = (yyvsp[0].opt_list);
3658 }
3659 #line 3660 "y.tab.c" /* yacc.c:1652 */
3660 break;
3661
3662 case 129:
3663 #line 1769 "parser.y" /* yacc.c:1652 */
3664 {
3665 (yyvsp[0].opt_list)->opt_code = O_FQNAME;
3666 (yyval.opt_list) = (yyvsp[0].opt_list);
3667 }
3668 #line 3669 "y.tab.c" /* yacc.c:1652 */
3669 break;
3670
3671 case 130:
3672 #line 1774 "parser.y" /* yacc.c:1652 */
3673 {
3674 (yyvsp[0].opt_list)->opt_code = O_USE_KEY;
3675 (yyval.opt_list) = (yyvsp[0].opt_list);
3676 }
3677 #line 3678 "y.tab.c" /* yacc.c:1652 */
3678 break;
3679
3680 case 131:
3681 #line 1779 "parser.y" /* yacc.c:1652 */
3682 {
3683 (yyvsp[0].opt_list)->opt_code = O_FORWARD;
3684 (yyval.opt_list) = (yyvsp[0].opt_list);
3685 }
3686 #line 3687 "y.tab.c" /* yacc.c:1652 */
3687 break;
3688
3689 case 132:
3690 #line 1784 "parser.y" /* yacc.c:1652 */
3691 {
3692 (yyvsp[0].opt_list)->opt_code = O_FILENAME;
3693 (yyval.opt_list) = (yyvsp[0].opt_list);
3694 }
3695 #line 3696 "y.tab.c" /* yacc.c:1652 */
3696 break;
3697
3698 case 133:
3699 #line 1789 "parser.y" /* yacc.c:1652 */
3700 {
3701 option_list *new;
3702 new = (option_list *)malloc(sizeof(option_list));
3703
3704 new->opt_code = O_ORIGIN;
3705 new->ival = -2;
3706 new->str = NULL;
3707 new->lineno = yylineno;
3708 new->next = NULL;
3709
3710 (yyval.opt_list) = new;
3711 }
3712 #line 3713 "y.tab.c" /* yacc.c:1652 */
3713 break;
3714
3715 case 134:
3716 #line 1802 "parser.y" /* yacc.c:1652 */
3717 {
3718 (yyvsp[0].opt_list)->opt_code = O_WAIT_CONFIRMED;
3719 (yyval.opt_list) = (yyvsp[0].opt_list);
3720 }
3721 #line 3722 "y.tab.c" /* yacc.c:1652 */
3722 break;
3723
3724 case 135:
3725 #line 1807 "parser.y" /* yacc.c:1652 */
3726 {
3727 option_list *new;
3728 new = (option_list *)malloc(sizeof(option_list));
3729
3730 new->opt_code = O_WAIT_CONFIRMED;
3731 new->ival = -2;
3732 new->str = NULL;
3733 new->lineno = yylineno;
3734 new->next = NULL;
3735
3736 (yyval.opt_list) = new;
3737 }
3738 #line 3739 "y.tab.c" /* yacc.c:1652 */
3739 break;
3740
3741 case 136:
3742 #line 1820 "parser.y" /* yacc.c:1652 */
3743 {
3744 (yyvsp[0].opt_list)->opt_code = O_WAIT_ON;
3745 (yyval.opt_list) = (yyvsp[0].opt_list);
3746 }
3747 #line 3748 "y.tab.c" /* yacc.c:1652 */
3748 break;
3749
3750 case 137:
3751 #line 1825 "parser.y" /* yacc.c:1652 */
3752 {
3753 (yyvsp[0].opt_list)->opt_code = O_TIMEOUT;
3754 (yyval.opt_list) = (yyvsp[0].opt_list);
3755 }
3756 #line 3757 "y.tab.c" /* yacc.c:1652 */
3757 break;
3758
3759 case 138:
3760 #line 1830 "parser.y" /* yacc.c:1652 */
3761 {
3762 (yyvsp[0].opt_list)->opt_code = O_EXECUTE_ONLY_ON;
3763 (yyval.opt_list) = (yyvsp[0].opt_list);
3764 }
3765 #line 3766 "y.tab.c" /* yacc.c:1652 */
3766 break;
3767
3768 case 139:
3769 #line 1835 "parser.y" /* yacc.c:1652 */
3770 {
3771 (yyvsp[0].opt_list)->opt_code = O_EXECUTE_ONLY_LIST;
3772 (yyval.opt_list) = (yyvsp[0].opt_list);
3773 }
3774 #line 3775 "y.tab.c" /* yacc.c:1652 */
3775 break;
3776
3777 case 140:
3778 #line 1840 "parser.y" /* yacc.c:1652 */
3779 {
3780 (yyvsp[0].opt_list)->opt_code = O_SECONDS;
3781 (yyval.opt_list) = (yyvsp[0].opt_list);
3782 }
3783 #line 3784 "y.tab.c" /* yacc.c:1652 */
3784 break;
3785
3786 case 141:
3787 #line 1845 "parser.y" /* yacc.c:1652 */
3788 {
3789 (yyvsp[0].opt_list)->opt_code = O_SQL;
3790 (yyval.opt_list) = (yyvsp[0].opt_list);
3791 }
3792 #line 3793 "y.tab.c" /* yacc.c:1652 */
3793 break;
3794
3795 case 142:
3796 #line 1850 "parser.y" /* yacc.c:1652 */
3797 {
3798 (yyvsp[0].opt_list)->opt_code = O_TABLES;
3799 (yyval.opt_list) = (yyvsp[0].opt_list);
3800 }
3801 #line 3802 "y.tab.c" /* yacc.c:1652 */
3802 break;
3803
3804 case 143:
3805 #line 1855 "parser.y" /* yacc.c:1652 */
3806 {
3807 (yyvsp[0].opt_list)->opt_code = O_SEQUENCES;
3808 (yyval.opt_list) = (yyvsp[0].opt_list);
3809 }
3810 #line 3811 "y.tab.c" /* yacc.c:1652 */
3811 break;
3812
3813 case 144:
3814 #line 1860 "parser.y" /* yacc.c:1652 */
3815 {
3816 (yyvsp[0].opt_list)->opt_code=O_ADD_SEQUENCES;
3817 (yyval.opt_list)=(yyvsp[0].opt_list);
3818
3819 }
3820 #line 3821 "y.tab.c" /* yacc.c:1652 */
3821 break;
3822
3823 case 145:
3824 #line 1868 "parser.y" /* yacc.c:1652 */
3825 {
3826 option_list *new;
3827 new = (option_list *)malloc(sizeof(option_list));
3828
3829 new->ival = (yyvsp[0].ival);
3830 new->str = NULL;
3831 new->lineno = yylineno;
3832 new->next = NULL;
3833
3834 (yyval.opt_list) = new;
3835 }
3836 #line 3837 "y.tab.c" /* yacc.c:1652 */
3837 break;
3838
3839 case 146:
3840 #line 1882 "parser.y" /* yacc.c:1652 */
3841 {
3842 option_list *new;
3843 new = (option_list *)malloc(sizeof(option_list));
3844
3845 new->ival = -1;
3846 new->str = (yyvsp[0].str);
3847 new->lineno = yylineno;
3848 new->next = NULL;
3849
3850 (yyval.opt_list) = new;
3851 }
3852 #line 3853 "y.tab.c" /* yacc.c:1652 */
3853 break;
3854
3855 case 147:
3856 #line 1896 "parser.y" /* yacc.c:1652 */
3857 {
3858 option_list *new;
3859 new = (option_list *)malloc(sizeof(option_list));
3860
3861 new->ival = 1;
3862 new->str = NULL;
3863 new->lineno = yylineno;
3864 new->next = NULL;
3865
3866 (yyval.opt_list) = new;
3867 }
3868 #line 3869 "y.tab.c" /* yacc.c:1652 */
3869 break;
3870
3871 case 148:
3872 #line 1908 "parser.y" /* yacc.c:1652 */
3873 {
3874 option_list *new;
3875 new = (option_list *)malloc(sizeof(option_list));
3876
3877 new->ival = 0;
3878 new->str = NULL;
3879 new->lineno = yylineno;
3880 new->next = NULL;
3881
3882 (yyval.opt_list) = new;
3883 }
3884 #line 3885 "y.tab.c" /* yacc.c:1652 */
3885 break;
3886
3887 case 155:
3888 #line 1932 "parser.y" /* yacc.c:1652 */
3889 {
3890 (yyval.ival) = strtol(yytext, NULL, 10);
3891 }
3892 #line 3893 "y.tab.c" /* yacc.c:1652 */
3893 break;
3894
3895 case 156:
3896 #line 1938 "parser.y" /* yacc.c:1652 */
3897 {
3898 char *ret;
3899 size_t toklen=yyget_leng();
3900 ret = malloc(yyget_leng() + 1);
3901 memcpy(ret, yytext, toklen);
3902 ret[toklen] = '\0';
3903
3904 (yyval.str) = ret;
3905 }
3906 #line 3907 "y.tab.c" /* yacc.c:1652 */
3907 break;
3908
3909 case 157:
3910 #line 1950 "parser.y" /* yacc.c:1652 */
3911 {
3912 char *ret;
3913 size_t toklen=yyget_leng();
3914 ret = malloc(toklen + 1);
3915 memcpy(ret, yytext, toklen);
3916 ret[toklen] = '\0';
3917
3918 (yyval.str) = ret;
3919 }
3920 #line 3921 "y.tab.c" /* yacc.c:1652 */
3921 break;
3922
3923 case 158:
3924 #line 1962 "parser.y" /* yacc.c:1652 */
3925 { (yyval.ival) = yylineno; }
3926 #line 3927 "y.tab.c" /* yacc.c:1652 */
3927 break;
3928
3929
3930 #line 3931 "y.tab.c" /* yacc.c:1652 */
3931 default: break;
3932 }
3933 /* User semantic actions sometimes alter yychar, and that requires
3934 that yytoken be updated with the new translation. We take the
3935 approach of translating immediately before every use of yytoken.
3936 One alternative is translating here after every semantic action,
3937 but that translation would be missed if the semantic action invokes
3938 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3939 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3940 incorrect destructor might then be invoked immediately. In the
3941 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3942 to an incorrect destructor call or verbose syntax error message
3943 before the lookahead is translated. */
3944 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3945
3946 YYPOPSTACK (yylen);
3947 yylen = 0;
3948 YY_STACK_PRINT (yyss, yyssp);
3949
3950 *++yyvsp = yyval;
3951
3952 /* Now 'shift' the result of the reduction. Determine what state
3953 that goes to, based on the state we popped back to and the rule
3954 number reduced by. */
3955 {
3956 const int yylhs = yyr1[yyn] - YYNTOKENS;
3957 const int yyi = yypgoto[yylhs] + *yyssp;
3958 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
3959 ? yytable[yyi]
3960 : yydefgoto[yylhs]);
3961 }
3962
3963 goto yynewstate;
3964
3965
3966 /*--------------------------------------.
3967 | yyerrlab -- here on detecting error. |
3968 `--------------------------------------*/
3969 yyerrlab:
3970 /* Make sure we have latest lookahead translation. See comments at
3971 user semantic actions for why this is necessary. */
3972 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3973
3974 /* If not already recovering from an error, report this error. */
3975 if (!yyerrstatus)
3976 {
3977 ++yynerrs;
3978 #if ! YYERROR_VERBOSE
3979 yyerror (YY_("syntax error"));
3980 #else
3981 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3982 yyssp, yytoken)
3983 {
3984 char const *yymsgp = YY_("syntax error");
3985 int yysyntax_error_status;
3986 yysyntax_error_status = YYSYNTAX_ERROR;
3987 if (yysyntax_error_status == 0)
3988 yymsgp = yymsg;
3989 else if (yysyntax_error_status == 1)
3990 {
3991 if (yymsg != yymsgbuf)
3992 YYSTACK_FREE (yymsg);
3993 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3994 if (!yymsg)
3995 {
3996 yymsg = yymsgbuf;
3997 yymsg_alloc = sizeof yymsgbuf;
3998 yysyntax_error_status = 2;
3999 }
4000 else
4001 {
4002 yysyntax_error_status = YYSYNTAX_ERROR;
4003 yymsgp = yymsg;
4004 }
4005 }
4006 yyerror (yymsgp);
4007 if (yysyntax_error_status == 2)
4008 goto yyexhaustedlab;
4009 }
4010 # undef YYSYNTAX_ERROR
4011 #endif
4012 }
4013
4014
4015
4016 if (yyerrstatus == 3)
4017 {
4018 /* If just tried and failed to reuse lookahead token after an
4019 error, discard it. */
4020
4021 if (yychar <= YYEOF)
4022 {
4023 /* Return failure if at end of input. */
4024 if (yychar == YYEOF)
4025 YYABORT;
4026 }
4027 else
4028 {
4029 yydestruct ("Error: discarding",
4030 yytoken, &yylval);
4031 yychar = YYEMPTY;
4032 }
4033 }
4034
4035 /* Else will try to reuse lookahead token after shifting the error
4036 token. */
4037 goto yyerrlab1;
4038
4039
4040 /*---------------------------------------------------.
4041 | yyerrorlab -- error raised explicitly by YYERROR. |
4042 `---------------------------------------------------*/
4043 yyerrorlab:
4044 /* Pacify compilers when the user code never invokes YYERROR and the
4045 label yyerrorlab therefore never appears in user code. */
4046 if (0)
4047 YYERROR;
4048
4049 /* Do not reclaim the symbols of the rule whose action triggered
4050 this YYERROR. */
4051 YYPOPSTACK (yylen);
4052 yylen = 0;
4053 YY_STACK_PRINT (yyss, yyssp);
4054 yystate = *yyssp;
4055 goto yyerrlab1;
4056
4057
4058 /*-------------------------------------------------------------.
4059 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4060 `-------------------------------------------------------------*/
4061 yyerrlab1:
4062 yyerrstatus = 3; /* Each real token shifted decrements this. */
4063
4064 for (;;)
4065 {
4066 yyn = yypact[yystate];
4067 if (!yypact_value_is_default (yyn))
4068 {
4069 yyn += YYTERROR;
4070 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4071 {
4072 yyn = yytable[yyn];
4073 if (0 < yyn)
4074 break;
4075 }
4076 }
4077
4078 /* Pop the current state because it cannot handle the error token. */
4079 if (yyssp == yyss)
4080 YYABORT;
4081
4082
4083 yydestruct ("Error: popping",
4084 yystos[yystate], yyvsp);
4085 YYPOPSTACK (1);
4086 yystate = *yyssp;
4087 YY_STACK_PRINT (yyss, yyssp);
4088 }
4089
4090 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4091 *++yyvsp = yylval;
4092 YY_IGNORE_MAYBE_UNINITIALIZED_END
4093
4094
4095 /* Shift the error token. */
4096 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4097
4098 yystate = yyn;
4099 goto yynewstate;
4100
4101
4102 /*-------------------------------------.
4103 | yyacceptlab -- YYACCEPT comes here. |
4104 `-------------------------------------*/
4105 yyacceptlab:
4106 yyresult = 0;
4107 goto yyreturn;
4108
4109
4110 /*-----------------------------------.
4111 | yyabortlab -- YYABORT comes here. |
4112 `-----------------------------------*/
4113 yyabortlab:
4114 yyresult = 1;
4115 goto yyreturn;
4116
4117
4118 #if !defined yyoverflow || YYERROR_VERBOSE
4119 /*-------------------------------------------------.
4120 | yyexhaustedlab -- memory exhaustion comes here. |
4121 `-------------------------------------------------*/
4122 yyexhaustedlab:
4123 yyerror (YY_("memory exhausted"));
4124 yyresult = 2;
4125 /* Fall through. */
4126 #endif
4127
4128
4129 /*-----------------------------------------------------.
4130 | yyreturn -- parsing is finished, return the result. |
4131 `-----------------------------------------------------*/
4132 yyreturn:
4133 if (yychar != YYEMPTY)
4134 {
4135 /* Make sure we have latest lookahead translation. See comments at
4136 user semantic actions for why this is necessary. */
4137 yytoken = YYTRANSLATE (yychar);
4138 yydestruct ("Cleanup: discarding lookahead",
4139 yytoken, &yylval);
4140 }
4141 /* Do not reclaim the symbols of the rule whose action triggered
4142 this YYABORT or YYACCEPT. */
4143 YYPOPSTACK (yylen);
4144 YY_STACK_PRINT (yyss, yyssp);
4145 while (yyssp != yyss)
4146 {
4147 yydestruct ("Cleanup: popping",
4148 yystos[*yyssp], yyvsp);
4149 YYPOPSTACK (1);
4150 }
4151 #ifndef yyoverflow
4152 if (yyss != yyssa)
4153 YYSTACK_FREE (yyss);
4154 #endif
4155 #if YYERROR_VERBOSE
4156 if (yymsg != yymsgbuf)
4157 YYSTACK_FREE (yymsg);
4158 #endif
4159 return yyresult;
4160 }
4161 #line 1965 "parser.y" /* yacc.c:1918 */
4162
4163
4164
4165 /* ----------
4166 * option_str
4167 *
4168 * Returns a string representation of a common option type
4169 * ----------
4170 */
4171 static char *
option_str(option_code opt_code)4172 option_str(option_code opt_code)
4173 {
4174 switch (opt_code)
4175 {
4176 case O_ADD_ID: return "add id";
4177 case O_ADD_SEQUENCES: return "add sequences";
4178 case O_BACKUP_NODE: return "backup node";
4179 case O_CLIENT: return "client";
4180 case O_COMMENT: return "comment";
4181 case O_CONNINFO: return "conninfo";
4182 case O_CONNRETRY: return "connretry";
4183 case O_DATE_FORMAT: return "format";
4184 case O_EVENT_NODE: return "event node";
4185 case O_EXECUTE_ONLY_ON: return "execute only on";
4186 case O_EXECUTE_ONLY_LIST: return "execute only on";
4187 case O_FILENAME: return "filename";
4188 case O_FORWARD: return "forward";
4189 case O_FQNAME: return "full qualified name";
4190 case O_ID: return "id";
4191 case O_NEW_ORIGIN: return "new origin";
4192 case O_NEW_SET: return "new set";
4193 case O_NODE_ID: return "node id";
4194 case O_OLD_ORIGIN: return "old origin";
4195 case O_OMIT_COPY: return "omit copy";
4196 case O_ORIGIN: return "origin";
4197 case O_PROVIDER: return "provider";
4198 case O_RECEIVER: return "receiver";
4199 case O_SECONDS: return "seconds";
4200 case O_SEQUENCES: return "sequences";
4201 case O_SERVER: return "server";
4202 case O_SET_ID: return "set id";
4203 case O_SQL: return "sql";
4204 case O_TAB_ID: return "table id";
4205 case O_TABLES: return "tables";
4206 case O_TIMEOUT: return "timeout";
4207 case O_USE_KEY: return "key";
4208 case O_WAIT_CONFIRMED: return "confirmed";
4209 case O_WAIT_ON: return "wait on";
4210 case END_OF_OPTIONS: return "???";
4211 }
4212 return "???";
4213 }
4214
4215 /* ----------
4216 * assign_options
4217 *
4218 * Try to map the actually given options to the statements specific
4219 * possible options.
4220 * ----------
4221 */
4222 static int
assign_options(statement_option * so,option_list * ol)4223 assign_options(statement_option *so, option_list *ol)
4224 {
4225 statement_option *s_opt;
4226 option_list *u_opt;
4227 int errors = 0;
4228
4229 for (u_opt = ol; u_opt; u_opt = u_opt->next)
4230 {
4231 for (s_opt = so; s_opt->opt_code >= 0; s_opt++)
4232 {
4233 if (s_opt->opt_code == u_opt->opt_code)
4234 break;
4235 }
4236
4237 if (s_opt->opt_code < 0)
4238 {
4239 fprintf(stderr, "%s:%d: option %s not allowed here\n",
4240 current_file, u_opt->lineno,
4241 option_str(u_opt->opt_code));
4242 errors++;
4243 continue;
4244 }
4245
4246 if (s_opt->lineno >= 0)
4247 {
4248 fprintf(stderr, "%s:%d: option %s already defined on line %d\n",
4249 current_file, u_opt->lineno,
4250 option_str(u_opt->opt_code), s_opt->lineno);
4251 errors++;
4252 continue;
4253 }
4254
4255 s_opt->lineno = u_opt->lineno;
4256 s_opt->ival = u_opt->ival;
4257 s_opt->str = u_opt->str;
4258 }
4259
4260 return errors;
4261 }
4262
4263
4264 void
yyerror(const char * msg)4265 yyerror(const char *msg)
4266 {
4267 fprintf(stderr, "%s:%d: ERROR: %s at or near %s\n", current_file,
4268 yylineno, msg, yytext);
4269 parser_errors++;
4270 }
4271
4272
4273
4274
4275
4276 /*
4277 * Local Variables:
4278 * tab-width: 4
4279 * c-indent-level: 4
4280 * c-basic-offset: 4
4281 * End:
4282 */
4283