1 /* A Bison parser, made by GNU Bison 2.7. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
42
43 /* Identify Bison output. */
44 #define YYBISON 1
45
46 /* Bison version. */
47 #define YYBISON_VERSION "2.7"
48
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers. */
53 #define YYPURE 1
54
55 /* Push parsers. */
56 #define YYPUSH 0
57
58 /* Pull parsers. */
59 #define YYPULL 1
60
61
62
63
64 /* Copy the first part of user declarations. */
65 /* Line 371 of yacc.c */
66 #line 1 "src/IceStorm/Grammar.y"
67
68
69 //
70 // Copyright (c) ZeroC, Inc. All rights reserved.
71 //
72
73 #include <Ice/Ice.h>
74 #include <IceStorm/Parser.h>
75
76 #ifdef _MSC_VER
77 // warning C4102: 'yyoverflowlab' : unreferenced label
78 # pragma warning(disable:4102)
79 // warning C4065: switch statement contains 'default' but no 'case' labels
80 # pragma warning(disable:4065)
81 // warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data
82 # pragma warning(disable:4244)
83 // warning C4702: unreachable code
84 # pragma warning(disable:4702)
85 #endif
86
87 //
88 // Avoid old style cast warnings in generated grammar
89 //
90 #ifdef __GNUC__
91 # pragma GCC diagnostic ignored "-Wold-style-cast"
92 #endif
93
94 using namespace std;
95 using namespace Ice;
96 using namespace IceStorm;
97
98 void
yyerror(const char * s)99 yyerror(const char* s)
100 {
101 parser->error(s);
102 }
103
104
105 /* Line 371 of yacc.c */
106 #line 112 "src/IceStorm/Grammar.cpp"
107
108 # ifndef YY_NULL
109 # if defined __cplusplus && 201103L <= __cplusplus
110 # define YY_NULL nullptr
111 # else
112 # define YY_NULL 0
113 # endif
114 # endif
115
116 /* Enabling verbose error messages. */
117 #ifdef YYERROR_VERBOSE
118 # undef YYERROR_VERBOSE
119 # define YYERROR_VERBOSE 1
120 #else
121 # define YYERROR_VERBOSE 0
122 #endif
123
124 /* In a future release of Bison, this section will be replaced
125 by #include "Grammar.hpp". */
126 #ifndef YY_YY_SRC_ICESTORM_GRAMMAR_HPP_INCLUDED
127 # define YY_YY_SRC_ICESTORM_GRAMMAR_HPP_INCLUDED
128 /* Enabling traces. */
129 #ifndef YYDEBUG
130 # define YYDEBUG 1
131 #endif
132 #if YYDEBUG
133 extern int yydebug;
134 #endif
135
136 /* Tokens. */
137 #ifndef YYTOKENTYPE
138 # define YYTOKENTYPE
139 /* Put the tokens into the symbol table, so that GDB and other debuggers
140 know about them. */
141 enum yytokentype {
142 ICE_STORM_HELP = 258,
143 ICE_STORM_EXIT = 259,
144 ICE_STORM_CURRENT = 260,
145 ICE_STORM_CREATE = 261,
146 ICE_STORM_DESTROY = 262,
147 ICE_STORM_LINK = 263,
148 ICE_STORM_UNLINK = 264,
149 ICE_STORM_LINKS = 265,
150 ICE_STORM_TOPICS = 266,
151 ICE_STORM_REPLICA = 267,
152 ICE_STORM_SUBSCRIBERS = 268,
153 ICE_STORM_STRING = 269
154 };
155 #endif
156
157
158 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
159 typedef int YYSTYPE;
160 # define YYSTYPE_IS_TRIVIAL 1
161 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
162 # define YYSTYPE_IS_DECLARED 1
163 #endif
164
165
166 #ifdef YYPARSE_PARAM
167 #if defined __STDC__ || defined __cplusplus
168 int yyparse (void *YYPARSE_PARAM);
169 #else
170 int yyparse ();
171 #endif
172 #else /* ! YYPARSE_PARAM */
173 #if defined __STDC__ || defined __cplusplus
174 int yyparse (void);
175 #else
176 int yyparse ();
177 #endif
178 #endif /* ! YYPARSE_PARAM */
179
180 #endif /* !YY_YY_SRC_ICESTORM_GRAMMAR_HPP_INCLUDED */
181
182 /* Copy the second part of user declarations. */
183
184 /* Line 390 of yacc.c */
185 #line 191 "src/IceStorm/Grammar.cpp"
186
187 #ifdef short
188 # undef short
189 #endif
190
191 #ifdef YYTYPE_UINT8
192 typedef YYTYPE_UINT8 yytype_uint8;
193 #else
194 typedef unsigned char yytype_uint8;
195 #endif
196
197 #ifdef YYTYPE_INT8
198 typedef YYTYPE_INT8 yytype_int8;
199 #elif (defined __STDC__ || defined __C99__FUNC__ \
200 || defined __cplusplus || defined _MSC_VER)
201 typedef signed char yytype_int8;
202 #else
203 typedef short int yytype_int8;
204 #endif
205
206 #ifdef YYTYPE_UINT16
207 typedef YYTYPE_UINT16 yytype_uint16;
208 #else
209 typedef unsigned short int yytype_uint16;
210 #endif
211
212 #ifdef YYTYPE_INT16
213 typedef YYTYPE_INT16 yytype_int16;
214 #else
215 typedef short int yytype_int16;
216 #endif
217
218 #ifndef YYSIZE_T
219 # ifdef __SIZE_TYPE__
220 # define YYSIZE_T __SIZE_TYPE__
221 # elif defined size_t
222 # define YYSIZE_T size_t
223 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
224 || defined __cplusplus || defined _MSC_VER)
225 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
226 # define YYSIZE_T size_t
227 # else
228 # define YYSIZE_T unsigned int
229 # endif
230 #endif
231
232 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
233
234 #ifndef YY_
235 # if defined YYENABLE_NLS && YYENABLE_NLS
236 # if ENABLE_NLS
237 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
238 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
239 # endif
240 # endif
241 # ifndef YY_
242 # define YY_(Msgid) Msgid
243 # endif
244 #endif
245
246 /* Suppress unused-variable warnings by "using" E. */
247 #if ! defined lint || defined __GNUC__
248 # define YYUSE(E) ((void) (E))
249 #else
250 # define YYUSE(E) /* empty */
251 #endif
252
253 /* Identity function, used to suppress warnings about constant conditions. */
254 #ifndef lint
255 # define YYID(N) (N)
256 #else
257 #if (defined __STDC__ || defined __C99__FUNC__ \
258 || defined __cplusplus || defined _MSC_VER)
259 static int
YYID(int yyi)260 YYID (int yyi)
261 #else
262 static int
263 YYID (yyi)
264 int yyi;
265 #endif
266 {
267 return yyi;
268 }
269 #endif
270
271 #if ! defined yyoverflow || YYERROR_VERBOSE
272
273 /* The parser invokes alloca or malloc; define the necessary symbols. */
274
275 # ifdef YYSTACK_USE_ALLOCA
276 # if YYSTACK_USE_ALLOCA
277 # ifdef __GNUC__
278 # define YYSTACK_ALLOC __builtin_alloca
279 # elif defined __BUILTIN_VA_ARG_INCR
280 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
281 # elif defined _AIX
282 # define YYSTACK_ALLOC __alloca
283 # elif defined _MSC_VER
284 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
285 # define alloca _alloca
286 # else
287 # define YYSTACK_ALLOC alloca
288 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
289 || defined __cplusplus || defined _MSC_VER)
290 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
291 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
292 # ifndef EXIT_SUCCESS
293 # define EXIT_SUCCESS 0
294 # endif
295 # endif
296 # endif
297 # endif
298 # endif
299
300 # ifdef YYSTACK_ALLOC
301 /* Pacify GCC's `empty if-body' warning. */
302 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
303 # ifndef YYSTACK_ALLOC_MAXIMUM
304 /* The OS might guarantee only one guard page at the bottom of the stack,
305 and a page size can be as small as 4096 bytes. So we cannot safely
306 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
307 to allow for a few compiler-allocated temporary stack slots. */
308 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
309 # endif
310 # else
311 # define YYSTACK_ALLOC YYMALLOC
312 # define YYSTACK_FREE YYFREE
313 # ifndef YYSTACK_ALLOC_MAXIMUM
314 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
315 # endif
316 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
317 && ! ((defined YYMALLOC || defined malloc) \
318 && (defined YYFREE || defined free)))
319 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
320 # ifndef EXIT_SUCCESS
321 # define EXIT_SUCCESS 0
322 # endif
323 # endif
324 # ifndef YYMALLOC
325 # define YYMALLOC malloc
326 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
327 || defined __cplusplus || defined _MSC_VER)
328 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
329 # endif
330 # endif
331 # ifndef YYFREE
332 # define YYFREE free
333 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
334 || defined __cplusplus || defined _MSC_VER)
335 void free (void *); /* INFRINGES ON USER NAME SPACE */
336 # endif
337 # endif
338 # endif
339 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
340
341
342 #if (! defined yyoverflow \
343 && (! defined __cplusplus \
344 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
345
346 /* A type that is properly aligned for any stack member. */
347 union yyalloc
348 {
349 yytype_int16 yyss_alloc;
350 YYSTYPE yyvs_alloc;
351 };
352
353 /* The size of the maximum gap between one aligned stack and the next. */
354 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
355
356 /* The size of an array large to enough to hold all stacks, each with
357 N elements. */
358 # define YYSTACK_BYTES(N) \
359 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
360 + YYSTACK_GAP_MAXIMUM)
361
362 # define YYCOPY_NEEDED 1
363
364 /* Relocate STACK from its old location to the new one. The
365 local variables YYSIZE and YYSTACKSIZE give the old and new number of
366 elements in the stack, and YYPTR gives the new location of the
367 stack. Advance YYPTR to a properly aligned location for the next
368 stack. */
369 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
370 do \
371 { \
372 YYSIZE_T yynewbytes; \
373 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
374 Stack = &yyptr->Stack_alloc; \
375 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
376 yyptr += yynewbytes / sizeof (*yyptr); \
377 } \
378 while (YYID (0))
379
380 #endif
381
382 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
383 /* Copy COUNT objects from SRC to DST. The source and destination do
384 not overlap. */
385 # ifndef YYCOPY
386 # if defined __GNUC__ && 1 < __GNUC__
387 # define YYCOPY(Dst, Src, Count) \
388 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
389 # else
390 # define YYCOPY(Dst, Src, Count) \
391 do \
392 { \
393 YYSIZE_T yyi; \
394 for (yyi = 0; yyi < (Count); yyi++) \
395 (Dst)[yyi] = (Src)[yyi]; \
396 } \
397 while (YYID (0))
398 # endif
399 # endif
400 #endif /* !YYCOPY_NEEDED */
401
402 /* YYFINAL -- State number of the termination state. */
403 #define YYFINAL 42
404 /* YYLAST -- Last index in YYTABLE. */
405 #define YYLAST 65
406
407 /* YYNTOKENS -- Number of terminals. */
408 #define YYNTOKENS 16
409 /* YYNNTS -- Number of nonterminals. */
410 #define YYNNTS 6
411 /* YYNRULES -- Number of rules. */
412 #define YYNRULES 31
413 /* YYNRULES -- Number of states. */
414 #define YYNSTATES 56
415
416 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
417 #define YYUNDEFTOK 2
418 #define YYMAXUTOK 269
419
420 #define YYTRANSLATE(YYX) \
421 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
422
423 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
424 static const yytype_uint8 yytranslate[] =
425 {
426 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 15,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
452 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
453 };
454
455 #if YYDEBUG
456 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
457 YYRHS. */
458 static const yytype_uint8 yyprhs[] =
459 {
460 0, 0, 3, 5, 6, 9, 11, 14, 17, 21,
461 25, 29, 33, 37, 41, 45, 49, 53, 57, 60,
462 62, 65, 68, 69, 71, 73, 75, 77, 79, 81,
463 83, 85
464 };
465
466 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
467 static const yytype_int8 yyrhs[] =
468 {
469 17, 0, -1, 18, -1, -1, 18, 19, -1, 19,
470 -1, 3, 15, -1, 4, 15, -1, 6, 20, 15,
471 -1, 5, 20, 15, -1, 7, 20, 15, -1, 8,
472 20, 15, -1, 9, 20, 15, -1, 10, 20, 15,
473 -1, 11, 20, 15, -1, 12, 20, 15, -1, 13,
474 20, 15, -1, 14, 1, 15, -1, 1, 15, -1,
475 15, -1, 14, 20, -1, 21, 20, -1, -1, 3,
476 -1, 4, -1, 5, -1, 6, -1, 7, -1, 8,
477 -1, 9, -1, 10, -1, 11, -1
478 };
479
480 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
481 static const yytype_uint8 yyrline[] =
482 {
483 0, 70, 70, 74, 81, 84, 92, 96, 100, 104,
484 108, 112, 116, 120, 124, 128, 132, 136, 140, 144,
485 152, 157, 163, 171, 174, 177, 180, 183, 186, 189,
486 192, 195
487 };
488 #endif
489
490 #if YYDEBUG || YYERROR_VERBOSE || 0
491 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
492 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
493 static const char *const yytname[] =
494 {
495 "$end", "error", "$undefined", "ICE_STORM_HELP", "ICE_STORM_EXIT",
496 "ICE_STORM_CURRENT", "ICE_STORM_CREATE", "ICE_STORM_DESTROY",
497 "ICE_STORM_LINK", "ICE_STORM_UNLINK", "ICE_STORM_LINKS",
498 "ICE_STORM_TOPICS", "ICE_STORM_REPLICA", "ICE_STORM_SUBSCRIBERS",
499 "ICE_STORM_STRING", "';'", "$accept", "start", "commands", "command",
500 "strings", "keyword", YY_NULL
501 };
502 #endif
503
504 # ifdef YYPRINT
505 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
506 token YYLEX-NUM. */
507 static const yytype_uint16 yytoknum[] =
508 {
509 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
510 265, 266, 267, 268, 269, 59
511 };
512 # endif
513
514 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
515 static const yytype_uint8 yyr1[] =
516 {
517 0, 16, 17, 17, 18, 18, 19, 19, 19, 19,
518 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
519 20, 20, 20, 21, 21, 21, 21, 21, 21, 21,
520 21, 21
521 };
522
523 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
524 static const yytype_uint8 yyr2[] =
525 {
526 0, 2, 1, 0, 2, 1, 2, 2, 3, 3,
527 3, 3, 3, 3, 3, 3, 3, 3, 2, 1,
528 2, 2, 0, 1, 1, 1, 1, 1, 1, 1,
529 1, 1
530 };
531
532 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
533 Performed when YYTABLE doesn't specify something else to do. Zero
534 means the default is an error. */
535 static const yytype_uint8 yydefact[] =
536 {
537 0, 0, 0, 0, 22, 22, 22, 22, 22, 22,
538 22, 22, 22, 0, 19, 0, 0, 5, 18, 6,
539 7, 23, 24, 25, 26, 27, 28, 29, 30, 31,
540 22, 0, 22, 0, 0, 0, 0, 0, 0, 0,
541 0, 0, 1, 4, 20, 9, 21, 8, 10, 11,
542 12, 13, 14, 15, 16, 17
543 };
544
545 /* YYDEFGOTO[NTERM-NUM]. */
546 static const yytype_int8 yydefgoto[] =
547 {
548 -1, 15, 16, 17, 31, 32
549 };
550
551 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
552 STATE-NUM. */
553 #define YYPACT_NINF -6
554 static const yytype_int8 yypact[] =
555 {
556 8, 9, 11, 15, 41, 41, 41, 41, 41, 41,
557 41, 41, 41, 52, -6, 10, 28, -6, -6, -6,
558 -6, -6, -6, -6, -6, -6, -6, -6, -6, -6,
559 41, 39, 41, 42, 43, 44, 45, 46, 47, 48,
560 49, 50, -6, -6, -6, -6, -6, -6, -6, -6,
561 -6, -6, -6, -6, -6, -6
562 };
563
564 /* YYPGOTO[NTERM-NUM]. */
565 static const yytype_int8 yypgoto[] =
566 {
567 -6, -6, -6, 40, -5, -6
568 };
569
570 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
571 positive, shift that token. If negative, reduce the rule which
572 number is the opposite. If YYTABLE_NINF, syntax error. */
573 #define YYTABLE_NINF -4
574 static const yytype_int8 yytable[] =
575 {
576 33, 34, 35, 36, 37, 38, 39, 40, -3, 1,
577 42, 2, 3, 4, 5, 6, 7, 8, 9, 10,
578 11, 12, 13, 14, 18, 44, 19, 46, -2, 1,
579 20, 2, 3, 4, 5, 6, 7, 8, 9, 10,
580 11, 12, 13, 14, 21, 22, 23, 24, 25, 26,
581 27, 28, 29, 41, 45, 30, 43, 47, 48, 49,
582 50, 51, 52, 53, 54, 55
583 };
584
585 #define yypact_value_is_default(Yystate) \
586 (!!((Yystate) == (-6)))
587
588 #define yytable_value_is_error(Yytable_value) \
589 YYID (0)
590
591 static const yytype_uint8 yycheck[] =
592 {
593 5, 6, 7, 8, 9, 10, 11, 12, 0, 1,
594 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
595 12, 13, 14, 15, 15, 30, 15, 32, 0, 1,
596 15, 3, 4, 5, 6, 7, 8, 9, 10, 11,
597 12, 13, 14, 15, 3, 4, 5, 6, 7, 8,
598 9, 10, 11, 1, 15, 14, 16, 15, 15, 15,
599 15, 15, 15, 15, 15, 15
600 };
601
602 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
603 symbol of state STATE-NUM. */
604 static const yytype_uint8 yystos[] =
605 {
606 0, 1, 3, 4, 5, 6, 7, 8, 9, 10,
607 11, 12, 13, 14, 15, 17, 18, 19, 15, 15,
608 15, 3, 4, 5, 6, 7, 8, 9, 10, 11,
609 14, 20, 21, 20, 20, 20, 20, 20, 20, 20,
610 20, 1, 0, 19, 20, 15, 20, 15, 15, 15,
611 15, 15, 15, 15, 15, 15
612 };
613
614 #define yyerrok (yyerrstatus = 0)
615 #define yyclearin (yychar = YYEMPTY)
616 #define YYEMPTY (-2)
617 #define YYEOF 0
618
619 #define YYACCEPT goto yyacceptlab
620 #define YYABORT goto yyabortlab
621 #define YYERROR goto yyerrorlab
622
623
624 /* Like YYERROR except do call yyerror. This remains here temporarily
625 to ease the transition to the new meaning of YYERROR, for GCC.
626 Once GCC version 2 has supplanted version 1, this can go. However,
627 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
628 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
629 discussed. */
630
631 #define YYFAIL goto yyerrlab
632 #if defined YYFAIL
633 /* This is here to suppress warnings from the GCC cpp's
634 -Wunused-macros. Normally we don't worry about that warning, but
635 some users do, and we want to make it easy for users to remove
636 YYFAIL uses, which will produce warnings from Bison 2.5. */
637 #endif
638
639 #define YYRECOVERING() (!!yyerrstatus)
640
641 #define YYBACKUP(Token, Value) \
642 do \
643 if (yychar == YYEMPTY) \
644 { \
645 yychar = (Token); \
646 yylval = (Value); \
647 YYPOPSTACK (yylen); \
648 yystate = *yyssp; \
649 goto yybackup; \
650 } \
651 else \
652 { \
653 yyerror (YY_("syntax error: cannot back up")); \
654 YYERROR; \
655 } \
656 while (YYID (0))
657
658 /* Error token number */
659 #define YYTERROR 1
660 #define YYERRCODE 256
661
662
663 /* This macro is provided for backward compatibility. */
664 #ifndef YY_LOCATION_PRINT
665 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
666 #endif
667
668
669 /* YYLEX -- calling `yylex' with the right arguments. */
670 #ifdef YYLEX_PARAM
671 # define YYLEX yylex (&yylval, YYLEX_PARAM)
672 #else
673 # define YYLEX yylex (&yylval)
674 #endif
675
676 /* Enable debugging if requested. */
677 #if YYDEBUG
678
679 # ifndef YYFPRINTF
680 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
681 # define YYFPRINTF fprintf
682 # endif
683
684 # define YYDPRINTF(Args) \
685 do { \
686 if (yydebug) \
687 YYFPRINTF Args; \
688 } while (YYID (0))
689
690 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
691 do { \
692 if (yydebug) \
693 { \
694 YYFPRINTF (stderr, "%s ", Title); \
695 yy_symbol_print (stderr, \
696 Type, Value); \
697 YYFPRINTF (stderr, "\n"); \
698 } \
699 } while (YYID (0))
700
701
702 /*--------------------------------.
703 | Print this symbol on YYOUTPUT. |
704 `--------------------------------*/
705
706 /*ARGSUSED*/
707 #if (defined __STDC__ || defined __C99__FUNC__ \
708 || defined __cplusplus || defined _MSC_VER)
709 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)710 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
711 #else
712 static void
713 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
714 FILE *yyoutput;
715 int yytype;
716 YYSTYPE const * const yyvaluep;
717 #endif
718 {
719 FILE *yyo = yyoutput;
720 YYUSE (yyo);
721 if (!yyvaluep)
722 return;
723 # ifdef YYPRINT
724 if (yytype < YYNTOKENS)
725 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
726 # else
727 YYUSE (yyoutput);
728 # endif
729 switch (yytype)
730 {
731 default:
732 break;
733 }
734 }
735
736
737 /*--------------------------------.
738 | Print this symbol on YYOUTPUT. |
739 `--------------------------------*/
740
741 #if (defined __STDC__ || defined __C99__FUNC__ \
742 || defined __cplusplus || defined _MSC_VER)
743 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)744 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
745 #else
746 static void
747 yy_symbol_print (yyoutput, yytype, yyvaluep)
748 FILE *yyoutput;
749 int yytype;
750 YYSTYPE const * const yyvaluep;
751 #endif
752 {
753 if (yytype < YYNTOKENS)
754 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
755 else
756 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
757
758 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
759 YYFPRINTF (yyoutput, ")");
760 }
761
762 /*------------------------------------------------------------------.
763 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
764 | TOP (included). |
765 `------------------------------------------------------------------*/
766
767 #if (defined __STDC__ || defined __C99__FUNC__ \
768 || defined __cplusplus || defined _MSC_VER)
769 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)770 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
771 #else
772 static void
773 yy_stack_print (yybottom, yytop)
774 yytype_int16 *yybottom;
775 yytype_int16 *yytop;
776 #endif
777 {
778 YYFPRINTF (stderr, "Stack now");
779 for (; yybottom <= yytop; yybottom++)
780 {
781 int yybot = *yybottom;
782 YYFPRINTF (stderr, " %d", yybot);
783 }
784 YYFPRINTF (stderr, "\n");
785 }
786
787 # define YY_STACK_PRINT(Bottom, Top) \
788 do { \
789 if (yydebug) \
790 yy_stack_print ((Bottom), (Top)); \
791 } while (YYID (0))
792
793
794 /*------------------------------------------------.
795 | Report that the YYRULE is going to be reduced. |
796 `------------------------------------------------*/
797
798 #if (defined __STDC__ || defined __C99__FUNC__ \
799 || defined __cplusplus || defined _MSC_VER)
800 static void
yy_reduce_print(YYSTYPE * yyvsp,int yyrule)801 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
802 #else
803 static void
804 yy_reduce_print (yyvsp, yyrule)
805 YYSTYPE *yyvsp;
806 int yyrule;
807 #endif
808 {
809 int yynrhs = yyr2[yyrule];
810 int yyi;
811 unsigned long int yylno = yyrline[yyrule];
812 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
813 yyrule - 1, yylno);
814 /* The symbols being reduced. */
815 for (yyi = 0; yyi < yynrhs; yyi++)
816 {
817 YYFPRINTF (stderr, " $%d = ", yyi + 1);
818 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
819 &(yyvsp[(yyi + 1) - (yynrhs)])
820 );
821 YYFPRINTF (stderr, "\n");
822 }
823 }
824
825 # define YY_REDUCE_PRINT(Rule) \
826 do { \
827 if (yydebug) \
828 yy_reduce_print (yyvsp, Rule); \
829 } while (YYID (0))
830
831 /* Nonzero means print parse trace. It is left uninitialized so that
832 multiple parsers can coexist. */
833 int yydebug;
834 #else /* !YYDEBUG */
835 # define YYDPRINTF(Args)
836 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
837 # define YY_STACK_PRINT(Bottom, Top)
838 # define YY_REDUCE_PRINT(Rule)
839 #endif /* !YYDEBUG */
840
841
842 /* YYINITDEPTH -- initial size of the parser's stacks. */
843 #ifndef YYINITDEPTH
844 # define YYINITDEPTH 200
845 #endif
846
847 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
848 if the built-in stack extension method is used).
849
850 Do not make this value too large; the results are undefined if
851 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
852 evaluated with infinite-precision integer arithmetic. */
853
854 #ifndef YYMAXDEPTH
855 # define YYMAXDEPTH 10000
856 #endif
857
858
859 #if YYERROR_VERBOSE
860
861 # ifndef yystrlen
862 # if defined __GLIBC__ && defined _STRING_H
863 # define yystrlen strlen
864 # else
865 /* Return the length of YYSTR. */
866 #if (defined __STDC__ || defined __C99__FUNC__ \
867 || defined __cplusplus || defined _MSC_VER)
868 static YYSIZE_T
yystrlen(const char * yystr)869 yystrlen (const char *yystr)
870 #else
871 static YYSIZE_T
872 yystrlen (yystr)
873 const char *yystr;
874 #endif
875 {
876 YYSIZE_T yylen;
877 for (yylen = 0; yystr[yylen]; yylen++)
878 continue;
879 return yylen;
880 }
881 # endif
882 # endif
883
884 # ifndef yystpcpy
885 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
886 # define yystpcpy stpcpy
887 # else
888 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
889 YYDEST. */
890 #if (defined __STDC__ || defined __C99__FUNC__ \
891 || defined __cplusplus || defined _MSC_VER)
892 static char *
yystpcpy(char * yydest,const char * yysrc)893 yystpcpy (char *yydest, const char *yysrc)
894 #else
895 static char *
896 yystpcpy (yydest, yysrc)
897 char *yydest;
898 const char *yysrc;
899 #endif
900 {
901 char *yyd = yydest;
902 const char *yys = yysrc;
903
904 while ((*yyd++ = *yys++) != '\0')
905 continue;
906
907 return yyd - 1;
908 }
909 # endif
910 # endif
911
912 # ifndef yytnamerr
913 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
914 quotes and backslashes, so that it's suitable for yyerror. The
915 heuristic is that double-quoting is unnecessary unless the string
916 contains an apostrophe, a comma, or backslash (other than
917 backslash-backslash). YYSTR is taken from yytname. If YYRES is
918 null, do not copy; instead, return the length of what the result
919 would have been. */
920 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)921 yytnamerr (char *yyres, const char *yystr)
922 {
923 if (*yystr == '"')
924 {
925 YYSIZE_T yyn = 0;
926 char const *yyp = yystr;
927
928 for (;;)
929 switch (*++yyp)
930 {
931 case '\'':
932 case ',':
933 goto do_not_strip_quotes;
934
935 case '\\':
936 if (*++yyp != '\\')
937 goto do_not_strip_quotes;
938 /* Fall through. */
939 default:
940 if (yyres)
941 yyres[yyn] = *yyp;
942 yyn++;
943 break;
944
945 case '"':
946 if (yyres)
947 yyres[yyn] = '\0';
948 return yyn;
949 }
950 do_not_strip_quotes: ;
951 }
952
953 if (! yyres)
954 return yystrlen (yystr);
955
956 return yystpcpy (yyres, yystr) - yyres;
957 }
958 # endif
959
960 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
961 about the unexpected token YYTOKEN for the state stack whose top is
962 YYSSP.
963
964 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
965 not large enough to hold the message. In that case, also set
966 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
967 required number of bytes is too large to store. */
968 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)969 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
970 yytype_int16 *yyssp, int yytoken)
971 {
972 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
973 YYSIZE_T yysize = yysize0;
974 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
975 /* Internationalized format string. */
976 const char *yyformat = YY_NULL;
977 /* Arguments of yyformat. */
978 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
979 /* Number of reported tokens (one for the "unexpected", one per
980 "expected"). */
981 int yycount = 0;
982
983 /* There are many possibilities here to consider:
984 - Assume YYFAIL is not used. It's too flawed to consider. See
985 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
986 for details. YYERROR is fine as it does not invoke this
987 function.
988 - If this state is a consistent state with a default action, then
989 the only way this function was invoked is if the default action
990 is an error action. In that case, don't check for expected
991 tokens because there are none.
992 - The only way there can be no lookahead present (in yychar) is if
993 this state is a consistent state with a default action. Thus,
994 detecting the absence of a lookahead is sufficient to determine
995 that there is no unexpected or expected token to report. In that
996 case, just report a simple "syntax error".
997 - Don't assume there isn't a lookahead just because this state is a
998 consistent state with a default action. There might have been a
999 previous inconsistent state, consistent state with a non-default
1000 action, or user semantic action that manipulated yychar.
1001 - Of course, the expected token list depends on states to have
1002 correct lookahead information, and it depends on the parser not
1003 to perform extra reductions after fetching a lookahead from the
1004 scanner and before detecting a syntax error. Thus, state merging
1005 (from LALR or IELR) and default reductions corrupt the expected
1006 token list. However, the list is correct for canonical LR with
1007 one exception: it will still contain any token that will not be
1008 accepted due to an error action in a later state.
1009 */
1010 if (yytoken != YYEMPTY)
1011 {
1012 int yyn = yypact[*yyssp];
1013 yyarg[yycount++] = yytname[yytoken];
1014 if (!yypact_value_is_default (yyn))
1015 {
1016 /* Start YYX at -YYN if negative to avoid negative indexes in
1017 YYCHECK. In other words, skip the first -YYN actions for
1018 this state because they are default actions. */
1019 int yyxbegin = yyn < 0 ? -yyn : 0;
1020 /* Stay within bounds of both yycheck and yytname. */
1021 int yychecklim = YYLAST - yyn + 1;
1022 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1023 int yyx;
1024
1025 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1026 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1027 && !yytable_value_is_error (yytable[yyx + yyn]))
1028 {
1029 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1030 {
1031 yycount = 1;
1032 yysize = yysize0;
1033 break;
1034 }
1035 yyarg[yycount++] = yytname[yyx];
1036 {
1037 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1038 if (! (yysize <= yysize1
1039 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1040 return 2;
1041 yysize = yysize1;
1042 }
1043 }
1044 }
1045 }
1046
1047 switch (yycount)
1048 {
1049 # define YYCASE_(N, S) \
1050 case N: \
1051 yyformat = S; \
1052 break
1053 YYCASE_(0, YY_("syntax error"));
1054 YYCASE_(1, YY_("syntax error, unexpected %s"));
1055 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1056 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1057 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1058 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1059 # undef YYCASE_
1060 }
1061
1062 {
1063 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1064 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1065 return 2;
1066 yysize = yysize1;
1067 }
1068
1069 if (*yymsg_alloc < yysize)
1070 {
1071 *yymsg_alloc = 2 * yysize;
1072 if (! (yysize <= *yymsg_alloc
1073 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1074 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1075 return 1;
1076 }
1077
1078 /* Avoid sprintf, as that infringes on the user's name space.
1079 Don't have undefined behavior even if the translation
1080 produced a string with the wrong number of "%s"s. */
1081 {
1082 char *yyp = *yymsg;
1083 int yyi = 0;
1084 while ((*yyp = *yyformat) != '\0')
1085 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1086 {
1087 yyp += yytnamerr (yyp, yyarg[yyi++]);
1088 yyformat += 2;
1089 }
1090 else
1091 {
1092 yyp++;
1093 yyformat++;
1094 }
1095 }
1096 return 0;
1097 }
1098 #endif /* YYERROR_VERBOSE */
1099
1100 /*-----------------------------------------------.
1101 | Release the memory associated to this symbol. |
1102 `-----------------------------------------------*/
1103
1104 /*ARGSUSED*/
1105 #if (defined __STDC__ || defined __C99__FUNC__ \
1106 || defined __cplusplus || defined _MSC_VER)
1107 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1108 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1109 #else
1110 static void
1111 yydestruct (yymsg, yytype, yyvaluep)
1112 const char *yymsg;
1113 int yytype;
1114 YYSTYPE *yyvaluep;
1115 #endif
1116 {
1117 YYUSE (yyvaluep);
1118
1119 if (!yymsg)
1120 yymsg = "Deleting";
1121 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1122
1123 switch (yytype)
1124 {
1125
1126 default:
1127 break;
1128 }
1129 }
1130
1131
1132
1133
1134 /*----------.
1135 | yyparse. |
1136 `----------*/
1137
1138 #ifdef YYPARSE_PARAM
1139 #if (defined __STDC__ || defined __C99__FUNC__ \
1140 || defined __cplusplus || defined _MSC_VER)
1141 int
yyparse(void * YYPARSE_PARAM)1142 yyparse (void *YYPARSE_PARAM)
1143 #else
1144 int
1145 yyparse (YYPARSE_PARAM)
1146 void *YYPARSE_PARAM;
1147 #endif
1148 #else /* ! YYPARSE_PARAM */
1149 #if (defined __STDC__ || defined __C99__FUNC__ \
1150 || defined __cplusplus || defined _MSC_VER)
1151 int
1152 yyparse (void)
1153 #else
1154 int
1155 yyparse ()
1156
1157 #endif
1158 #endif
1159 {
1160 /* The lookahead symbol. */
1161 int yychar;
1162
1163
1164 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1165 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1166 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1167 _Pragma ("GCC diagnostic push") \
1168 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1169 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1170 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1171 _Pragma ("GCC diagnostic pop")
1172 #else
1173 /* Default value used for initialization, for pacifying older GCCs
1174 or non-GCC compilers. */
1175 static YYSTYPE yyval_default;
1176 # define YY_INITIAL_VALUE(Value) = Value
1177 #endif
1178 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1179 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1180 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1181 #endif
1182 #ifndef YY_INITIAL_VALUE
1183 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1184 #endif
1185
1186 /* The semantic value of the lookahead symbol. */
1187 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1188
1189 /* Number of syntax errors so far. */
1190 int yynerrs;
1191
1192 int yystate;
1193 /* Number of tokens to shift before error messages enabled. */
1194 int yyerrstatus;
1195
1196 /* The stacks and their tools:
1197 `yyss': related to states.
1198 `yyvs': related to semantic values.
1199
1200 Refer to the stacks through separate pointers, to allow yyoverflow
1201 to reallocate them elsewhere. */
1202
1203 /* The state stack. */
1204 yytype_int16 yyssa[YYINITDEPTH];
1205 yytype_int16 *yyss;
1206 yytype_int16 *yyssp;
1207
1208 /* The semantic value stack. */
1209 YYSTYPE yyvsa[YYINITDEPTH];
1210 YYSTYPE *yyvs;
1211 YYSTYPE *yyvsp;
1212
1213 YYSIZE_T yystacksize;
1214
1215 int yyn;
1216 int yyresult;
1217 /* Lookahead token as an internal (translated) token number. */
1218 int yytoken = 0;
1219 /* The variables used to return semantic value and location from the
1220 action routines. */
1221 YYSTYPE yyval;
1222
1223 #if YYERROR_VERBOSE
1224 /* Buffer for error messages, and its allocated size. */
1225 char yymsgbuf[128];
1226 char *yymsg = yymsgbuf;
1227 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1228 #endif
1229
1230 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1231
1232 /* The number of symbols on the RHS of the reduced rule.
1233 Keep to zero when no symbol should be popped. */
1234 int yylen = 0;
1235
1236 yyssp = yyss = yyssa;
1237 yyvsp = yyvs = yyvsa;
1238 yystacksize = YYINITDEPTH;
1239
1240 YYDPRINTF ((stderr, "Starting parse\n"));
1241
1242 yystate = 0;
1243 yyerrstatus = 0;
1244 yynerrs = 0;
1245 yychar = YYEMPTY; /* Cause a token to be read. */
1246 goto yysetstate;
1247
1248 /*------------------------------------------------------------.
1249 | yynewstate -- Push a new state, which is found in yystate. |
1250 `------------------------------------------------------------*/
1251 yynewstate:
1252 /* In all cases, when you get here, the value and location stacks
1253 have just been pushed. So pushing a state here evens the stacks. */
1254 yyssp++;
1255
1256 yysetstate:
1257 *yyssp = yystate;
1258
1259 if (yyss + yystacksize - 1 <= yyssp)
1260 {
1261 /* Get the current used size of the three stacks, in elements. */
1262 YYSIZE_T yysize = yyssp - yyss + 1;
1263
1264 #ifdef yyoverflow
1265 {
1266 /* Give user a chance to reallocate the stack. Use copies of
1267 these so that the &'s don't force the real ones into
1268 memory. */
1269 YYSTYPE *yyvs1 = yyvs;
1270 yytype_int16 *yyss1 = yyss;
1271
1272 /* Each stack pointer address is followed by the size of the
1273 data in use in that stack, in bytes. This used to be a
1274 conditional around just the two extra args, but that might
1275 be undefined if yyoverflow is a macro. */
1276 yyoverflow (YY_("memory exhausted"),
1277 &yyss1, yysize * sizeof (*yyssp),
1278 &yyvs1, yysize * sizeof (*yyvsp),
1279 &yystacksize);
1280
1281 yyss = yyss1;
1282 yyvs = yyvs1;
1283 }
1284 #else /* no yyoverflow */
1285 # ifndef YYSTACK_RELOCATE
1286 goto yyexhaustedlab;
1287 # else
1288 /* Extend the stack our own way. */
1289 if (YYMAXDEPTH <= yystacksize)
1290 goto yyexhaustedlab;
1291 yystacksize *= 2;
1292 if (YYMAXDEPTH < yystacksize)
1293 yystacksize = YYMAXDEPTH;
1294
1295 {
1296 yytype_int16 *yyss1 = yyss;
1297 union yyalloc *yyptr =
1298 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1299 if (! yyptr)
1300 goto yyexhaustedlab;
1301 YYSTACK_RELOCATE (yyss_alloc, yyss);
1302 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1303 # undef YYSTACK_RELOCATE
1304 if (yyss1 != yyssa)
1305 YYSTACK_FREE (yyss1);
1306 }
1307 # endif
1308 #endif /* no yyoverflow */
1309
1310 yyssp = yyss + yysize - 1;
1311 yyvsp = yyvs + yysize - 1;
1312
1313 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1314 (unsigned long int) yystacksize));
1315
1316 if (yyss + yystacksize - 1 <= yyssp)
1317 YYABORT;
1318 }
1319
1320 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1321
1322 if (yystate == YYFINAL)
1323 YYACCEPT;
1324
1325 goto yybackup;
1326
1327 /*-----------.
1328 | yybackup. |
1329 `-----------*/
1330 yybackup:
1331
1332 /* Do appropriate processing given the current state. Read a
1333 lookahead token if we need one and don't already have one. */
1334
1335 /* First try to decide what to do without reference to lookahead token. */
1336 yyn = yypact[yystate];
1337 if (yypact_value_is_default (yyn))
1338 goto yydefault;
1339
1340 /* Not known => get a lookahead token if don't already have one. */
1341
1342 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1343 if (yychar == YYEMPTY)
1344 {
1345 YYDPRINTF ((stderr, "Reading a token: "));
1346 yychar = YYLEX;
1347 }
1348
1349 if (yychar <= YYEOF)
1350 {
1351 yychar = yytoken = YYEOF;
1352 YYDPRINTF ((stderr, "Now at end of input.\n"));
1353 }
1354 else
1355 {
1356 yytoken = YYTRANSLATE (yychar);
1357 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1358 }
1359
1360 /* If the proper action on seeing token YYTOKEN is to reduce or to
1361 detect an error, take that action. */
1362 yyn += yytoken;
1363 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1364 goto yydefault;
1365 yyn = yytable[yyn];
1366 if (yyn <= 0)
1367 {
1368 if (yytable_value_is_error (yyn))
1369 goto yyerrlab;
1370 yyn = -yyn;
1371 goto yyreduce;
1372 }
1373
1374 /* Count tokens shifted since error; after three, turn off error
1375 status. */
1376 if (yyerrstatus)
1377 yyerrstatus--;
1378
1379 /* Shift the lookahead token. */
1380 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1381
1382 /* Discard the shifted token. */
1383 yychar = YYEMPTY;
1384
1385 yystate = yyn;
1386 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1387 *++yyvsp = yylval;
1388 YY_IGNORE_MAYBE_UNINITIALIZED_END
1389
1390 goto yynewstate;
1391
1392
1393 /*-----------------------------------------------------------.
1394 | yydefault -- do the default action for the current state. |
1395 `-----------------------------------------------------------*/
1396 yydefault:
1397 yyn = yydefact[yystate];
1398 if (yyn == 0)
1399 goto yyerrlab;
1400 goto yyreduce;
1401
1402
1403 /*-----------------------------.
1404 | yyreduce -- Do a reduction. |
1405 `-----------------------------*/
1406 yyreduce:
1407 /* yyn is the number of a rule to reduce with. */
1408 yylen = yyr2[yyn];
1409
1410 /* If YYLEN is nonzero, implement the default value of the action:
1411 `$$ = $1'.
1412
1413 Otherwise, the following line sets YYVAL to garbage.
1414 This behavior is undocumented and Bison
1415 users should not rely upon it. Assigning to YYVAL
1416 unconditionally makes the parser a bit smaller, and it avoids a
1417 GCC warning that YYVAL may be used uninitialized. */
1418 yyval = yyvsp[1-yylen];
1419
1420
1421 YY_REDUCE_PRINT (yyn);
1422 switch (yyn)
1423 {
1424 case 2:
1425 /* Line 1792 of yacc.c */
1426 #line 71 "src/IceStorm/Grammar.y"
1427 {
1428 }
1429 break;
1430
1431 case 3:
1432 /* Line 1792 of yacc.c */
1433 #line 74 "src/IceStorm/Grammar.y"
1434 {
1435 }
1436 break;
1437
1438 case 4:
1439 /* Line 1792 of yacc.c */
1440 #line 82 "src/IceStorm/Grammar.y"
1441 {
1442 }
1443 break;
1444
1445 case 5:
1446 /* Line 1792 of yacc.c */
1447 #line 85 "src/IceStorm/Grammar.y"
1448 {
1449 }
1450 break;
1451
1452 case 6:
1453 /* Line 1792 of yacc.c */
1454 #line 93 "src/IceStorm/Grammar.y"
1455 {
1456 parser->usage();
1457 }
1458 break;
1459
1460 case 7:
1461 /* Line 1792 of yacc.c */
1462 #line 97 "src/IceStorm/Grammar.y"
1463 {
1464 return 0;
1465 }
1466 break;
1467
1468 case 8:
1469 /* Line 1792 of yacc.c */
1470 #line 101 "src/IceStorm/Grammar.y"
1471 {
1472 parser->create((yyvsp[(2) - (3)]));
1473 }
1474 break;
1475
1476 case 9:
1477 /* Line 1792 of yacc.c */
1478 #line 105 "src/IceStorm/Grammar.y"
1479 {
1480 parser->current((yyvsp[(2) - (3)]));
1481 }
1482 break;
1483
1484 case 10:
1485 /* Line 1792 of yacc.c */
1486 #line 109 "src/IceStorm/Grammar.y"
1487 {
1488 parser->destroy((yyvsp[(2) - (3)]));
1489 }
1490 break;
1491
1492 case 11:
1493 /* Line 1792 of yacc.c */
1494 #line 113 "src/IceStorm/Grammar.y"
1495 {
1496 parser->link((yyvsp[(2) - (3)]));
1497 }
1498 break;
1499
1500 case 12:
1501 /* Line 1792 of yacc.c */
1502 #line 117 "src/IceStorm/Grammar.y"
1503 {
1504 parser->unlink((yyvsp[(2) - (3)]));
1505 }
1506 break;
1507
1508 case 13:
1509 /* Line 1792 of yacc.c */
1510 #line 121 "src/IceStorm/Grammar.y"
1511 {
1512 parser->links((yyvsp[(2) - (3)]));
1513 }
1514 break;
1515
1516 case 14:
1517 /* Line 1792 of yacc.c */
1518 #line 125 "src/IceStorm/Grammar.y"
1519 {
1520 parser->topics((yyvsp[(2) - (3)]));
1521 }
1522 break;
1523
1524 case 15:
1525 /* Line 1792 of yacc.c */
1526 #line 129 "src/IceStorm/Grammar.y"
1527 {
1528 parser->replica((yyvsp[(2) - (3)]));
1529 }
1530 break;
1531
1532 case 16:
1533 /* Line 1792 of yacc.c */
1534 #line 133 "src/IceStorm/Grammar.y"
1535 {
1536 parser->subscribers((yyvsp[(2) - (3)]));
1537 }
1538 break;
1539
1540 case 17:
1541 /* Line 1792 of yacc.c */
1542 #line 137 "src/IceStorm/Grammar.y"
1543 {
1544 parser->invalidCommand("unknown command `" + (yyvsp[(1) - (3)]).front() + "' (type `help' for more info)");
1545 }
1546 break;
1547
1548 case 18:
1549 /* Line 1792 of yacc.c */
1550 #line 141 "src/IceStorm/Grammar.y"
1551 {
1552 yyerrok;
1553 }
1554 break;
1555
1556 case 19:
1557 /* Line 1792 of yacc.c */
1558 #line 145 "src/IceStorm/Grammar.y"
1559 {
1560 }
1561 break;
1562
1563 case 20:
1564 /* Line 1792 of yacc.c */
1565 #line 153 "src/IceStorm/Grammar.y"
1566 {
1567 (yyval) = (yyvsp[(2) - (2)]);
1568 (yyval).push_front((yyvsp[(1) - (2)]).front());
1569 }
1570 break;
1571
1572 case 21:
1573 /* Line 1792 of yacc.c */
1574 #line 158 "src/IceStorm/Grammar.y"
1575 {
1576 (yyval) = (yyvsp[(2) - (2)]);
1577 (yyval).push_front((yyvsp[(1) - (2)]).front());
1578 }
1579 break;
1580
1581 case 22:
1582 /* Line 1792 of yacc.c */
1583 #line 163 "src/IceStorm/Grammar.y"
1584 {
1585 (yyval) = YYSTYPE();
1586 }
1587 break;
1588
1589 case 23:
1590 /* Line 1792 of yacc.c */
1591 #line 172 "src/IceStorm/Grammar.y"
1592 {
1593 }
1594 break;
1595
1596 case 24:
1597 /* Line 1792 of yacc.c */
1598 #line 175 "src/IceStorm/Grammar.y"
1599 {
1600 }
1601 break;
1602
1603 case 25:
1604 /* Line 1792 of yacc.c */
1605 #line 178 "src/IceStorm/Grammar.y"
1606 {
1607 }
1608 break;
1609
1610 case 26:
1611 /* Line 1792 of yacc.c */
1612 #line 181 "src/IceStorm/Grammar.y"
1613 {
1614 }
1615 break;
1616
1617 case 27:
1618 /* Line 1792 of yacc.c */
1619 #line 184 "src/IceStorm/Grammar.y"
1620 {
1621 }
1622 break;
1623
1624 case 28:
1625 /* Line 1792 of yacc.c */
1626 #line 187 "src/IceStorm/Grammar.y"
1627 {
1628 }
1629 break;
1630
1631 case 29:
1632 /* Line 1792 of yacc.c */
1633 #line 190 "src/IceStorm/Grammar.y"
1634 {
1635 }
1636 break;
1637
1638 case 30:
1639 /* Line 1792 of yacc.c */
1640 #line 193 "src/IceStorm/Grammar.y"
1641 {
1642 }
1643 break;
1644
1645 case 31:
1646 /* Line 1792 of yacc.c */
1647 #line 196 "src/IceStorm/Grammar.y"
1648 {
1649 }
1650 break;
1651
1652
1653 /* Line 1792 of yacc.c */
1654 #line 1660 "src/IceStorm/Grammar.cpp"
1655 default: break;
1656 }
1657 /* User semantic actions sometimes alter yychar, and that requires
1658 that yytoken be updated with the new translation. We take the
1659 approach of translating immediately before every use of yytoken.
1660 One alternative is translating here after every semantic action,
1661 but that translation would be missed if the semantic action invokes
1662 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1663 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1664 incorrect destructor might then be invoked immediately. In the
1665 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1666 to an incorrect destructor call or verbose syntax error message
1667 before the lookahead is translated. */
1668 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1669
1670 YYPOPSTACK (yylen);
1671 yylen = 0;
1672 YY_STACK_PRINT (yyss, yyssp);
1673
1674 *++yyvsp = yyval;
1675
1676 /* Now `shift' the result of the reduction. Determine what state
1677 that goes to, based on the state we popped back to and the rule
1678 number reduced by. */
1679
1680 yyn = yyr1[yyn];
1681
1682 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1683 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1684 yystate = yytable[yystate];
1685 else
1686 yystate = yydefgoto[yyn - YYNTOKENS];
1687
1688 goto yynewstate;
1689
1690
1691 /*------------------------------------.
1692 | yyerrlab -- here on detecting error |
1693 `------------------------------------*/
1694 yyerrlab:
1695 /* Make sure we have latest lookahead translation. See comments at
1696 user semantic actions for why this is necessary. */
1697 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1698
1699 /* If not already recovering from an error, report this error. */
1700 if (!yyerrstatus)
1701 {
1702 ++yynerrs;
1703 #if ! YYERROR_VERBOSE
1704 yyerror (YY_("syntax error"));
1705 #else
1706 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1707 yyssp, yytoken)
1708 {
1709 char const *yymsgp = YY_("syntax error");
1710 int yysyntax_error_status;
1711 yysyntax_error_status = YYSYNTAX_ERROR;
1712 if (yysyntax_error_status == 0)
1713 yymsgp = yymsg;
1714 else if (yysyntax_error_status == 1)
1715 {
1716 if (yymsg != yymsgbuf)
1717 YYSTACK_FREE (yymsg);
1718 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1719 if (!yymsg)
1720 {
1721 yymsg = yymsgbuf;
1722 yymsg_alloc = sizeof yymsgbuf;
1723 yysyntax_error_status = 2;
1724 }
1725 else
1726 {
1727 yysyntax_error_status = YYSYNTAX_ERROR;
1728 yymsgp = yymsg;
1729 }
1730 }
1731 yyerror (yymsgp);
1732 if (yysyntax_error_status == 2)
1733 goto yyexhaustedlab;
1734 }
1735 # undef YYSYNTAX_ERROR
1736 #endif
1737 }
1738
1739
1740
1741 if (yyerrstatus == 3)
1742 {
1743 /* If just tried and failed to reuse lookahead token after an
1744 error, discard it. */
1745
1746 if (yychar <= YYEOF)
1747 {
1748 /* Return failure if at end of input. */
1749 if (yychar == YYEOF)
1750 YYABORT;
1751 }
1752 else
1753 {
1754 yydestruct ("Error: discarding",
1755 yytoken, &yylval);
1756 yychar = YYEMPTY;
1757 }
1758 }
1759
1760 /* Else will try to reuse lookahead token after shifting the error
1761 token. */
1762 goto yyerrlab1;
1763
1764
1765 /*---------------------------------------------------.
1766 | yyerrorlab -- error raised explicitly by YYERROR. |
1767 `---------------------------------------------------*/
1768 yyerrorlab:
1769
1770 /* Pacify compilers like GCC when the user code never invokes
1771 YYERROR and the label yyerrorlab therefore never appears in user
1772 code. */
1773 if (/*CONSTCOND*/ 0)
1774 goto yyerrorlab;
1775
1776 /* Do not reclaim the symbols of the rule which action triggered
1777 this YYERROR. */
1778 YYPOPSTACK (yylen);
1779 yylen = 0;
1780 YY_STACK_PRINT (yyss, yyssp);
1781 yystate = *yyssp;
1782 goto yyerrlab1;
1783
1784
1785 /*-------------------------------------------------------------.
1786 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1787 `-------------------------------------------------------------*/
1788 yyerrlab1:
1789 yyerrstatus = 3; /* Each real token shifted decrements this. */
1790
1791 for (;;)
1792 {
1793 yyn = yypact[yystate];
1794 if (!yypact_value_is_default (yyn))
1795 {
1796 yyn += YYTERROR;
1797 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1798 {
1799 yyn = yytable[yyn];
1800 if (0 < yyn)
1801 break;
1802 }
1803 }
1804
1805 /* Pop the current state because it cannot handle the error token. */
1806 if (yyssp == yyss)
1807 YYABORT;
1808
1809
1810 yydestruct ("Error: popping",
1811 yystos[yystate], yyvsp);
1812 YYPOPSTACK (1);
1813 yystate = *yyssp;
1814 YY_STACK_PRINT (yyss, yyssp);
1815 }
1816
1817 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1818 *++yyvsp = yylval;
1819 YY_IGNORE_MAYBE_UNINITIALIZED_END
1820
1821
1822 /* Shift the error token. */
1823 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1824
1825 yystate = yyn;
1826 goto yynewstate;
1827
1828
1829 /*-------------------------------------.
1830 | yyacceptlab -- YYACCEPT comes here. |
1831 `-------------------------------------*/
1832 yyacceptlab:
1833 yyresult = 0;
1834 goto yyreturn;
1835
1836 /*-----------------------------------.
1837 | yyabortlab -- YYABORT comes here. |
1838 `-----------------------------------*/
1839 yyabortlab:
1840 yyresult = 1;
1841 goto yyreturn;
1842
1843 #if !defined yyoverflow || YYERROR_VERBOSE
1844 /*-------------------------------------------------.
1845 | yyexhaustedlab -- memory exhaustion comes here. |
1846 `-------------------------------------------------*/
1847 yyexhaustedlab:
1848 yyerror (YY_("memory exhausted"));
1849 yyresult = 2;
1850 /* Fall through. */
1851 #endif
1852
1853 yyreturn:
1854 if (yychar != YYEMPTY)
1855 {
1856 /* Make sure we have latest lookahead translation. See comments at
1857 user semantic actions for why this is necessary. */
1858 yytoken = YYTRANSLATE (yychar);
1859 yydestruct ("Cleanup: discarding lookahead",
1860 yytoken, &yylval);
1861 }
1862 /* Do not reclaim the symbols of the rule which action triggered
1863 this YYABORT or YYACCEPT. */
1864 YYPOPSTACK (yylen);
1865 YY_STACK_PRINT (yyss, yyssp);
1866 while (yyssp != yyss)
1867 {
1868 yydestruct ("Cleanup: popping",
1869 yystos[*yyssp], yyvsp);
1870 YYPOPSTACK (1);
1871 }
1872 #ifndef yyoverflow
1873 if (yyss != yyssa)
1874 YYSTACK_FREE (yyss);
1875 #endif
1876 #if YYERROR_VERBOSE
1877 if (yymsg != yymsgbuf)
1878 YYSTACK_FREE (yymsg);
1879 #endif
1880 /* Make sure YYID is used. */
1881 return YYID (yyresult);
1882 }
1883
1884
1885 /* Line 2055 of yacc.c */
1886 #line 199 "src/IceStorm/Grammar.y"
1887
1888