1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
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 2, or (at your option)
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.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
77 #define LOADMODULE 258
86 /* Copy the first part of user declarations. */
87 #line 6 "ircd_parser.y"
89 #include <sys/types.h>
92 #include <netinet/in.h>
98 #define WE_ARE_MEMORY_C
102 #include "ircd_defs.h"
111 void yyerror(const char *);
114 static time_t conf_find_time(char*);
121 {"second", "seconds", 1},
122 {"minute", "minutes", 60},
123 {"hour", "hours", 60 * 60},
124 {"day", "days", 60 * 60 * 24},
125 {"week", "weeks", 60 * 60 * 24 * 7},
126 {"fortnight", "fortnights", 60 * 60 * 24 * 14},
127 {"month", "months", 60 * 60 * 24 * 7 * 4},
128 {"year", "years", 60 * 60 * 24 * 365},
129 /* ok-- we now do sizes here too. they aren't times, but
131 {"byte", "bytes", 1},
133 {"kbyte", "kbytes", 1024},
134 {"kilobyte", "kilebytes", 1024},
135 {"mb", NULL
, 1024 * 1024},
136 {"mbyte", "mbytes", 1024 * 1024},
137 {"megabyte", "megabytes", 1024 * 1024},
141 time_t conf_find_time(char *name
)
145 for (i
= 0; ircd_times
[i
].name
; i
++)
147 if (strcasecmp(ircd_times
[i
].name
, name
) == 0 ||
148 (ircd_times
[i
].plural
&& strcasecmp(ircd_times
[i
].plural
, name
) == 0))
149 return ircd_times
[i
].val
;
169 static int conf_get_yesno_value(char *str
)
173 for (i
= 0; yesno
[i
].word
; i
++)
175 if (strcasecmp(str
, yesno
[i
].word
) == 0)
177 return yesno
[i
].yesno
;
184 static void free_cur_list(conf_parm_t
* list
)
186 if (list
->type
== CF_STRING
|| list
->type
== CF_QSTRING
) {
187 rb_free(list
->v
.string
);
188 } else if (list
->type
== CF_FLIST
) {
189 /* Even though CF_FLIST is a flag, comparing with == is valid
190 * because conf_parm_t.type must be either a type or one flag.
192 free_cur_list(list
->v
.list
);
196 free_cur_list(list
->next
);
203 conf_parm_t
* cur_list
= NULL
;
205 static void add_cur_list_cpt(conf_parm_t
*new)
207 if (cur_list
== NULL
)
209 cur_list
= rb_malloc(sizeof(conf_parm_t
));
210 cur_list
->type
= CF_FLIST
;
211 cur_list
->v
.list
= new;
215 new->next
= cur_list
->v
.list
;
216 cur_list
->v
.list
= new;
220 static void add_cur_list(int type
, char *str
, int number
)
224 new = rb_malloc(sizeof(conf_parm_t
));
233 new->v
.number
= number
;
237 new->v
.string
= rb_strdup(str
);
241 add_cur_list_cpt(new);
247 /* Enabling traces. */
252 /* Enabling verbose error messages. */
253 #ifdef YYERROR_VERBOSE
254 # undef YYERROR_VERBOSE
255 # define YYERROR_VERBOSE 1
257 # define YYERROR_VERBOSE 0
260 /* Enabling the token table. */
261 #ifndef YYTOKEN_TABLE
262 # define YYTOKEN_TABLE 0
265 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
266 typedef union YYSTYPE
267 #line 165 "ircd_parser.y"
270 char string
[IRCD_BUFSIZE
+ 1];
271 conf_parm_t
* conf_parm
;
273 /* Line 193 of yacc.c. */
274 #line 275 "ircd_parser.c"
276 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
277 # define YYSTYPE_IS_DECLARED 1
278 # define YYSTYPE_IS_TRIVIAL 1
283 /* Copy the second part of user declarations. */
286 /* Line 216 of yacc.c. */
287 #line 288 "ircd_parser.c"
294 typedef YYTYPE_UINT8 yytype_uint8
;
296 typedef unsigned char yytype_uint8
;
300 typedef YYTYPE_INT8 yytype_int8
;
301 #elif (defined __STDC__ || defined __C99__FUNC__ \
302 || defined __cplusplus || defined _MSC_VER)
303 typedef signed char yytype_int8
;
305 typedef short int yytype_int8
;
309 typedef YYTYPE_UINT16 yytype_uint16
;
311 typedef unsigned short int yytype_uint16
;
315 typedef YYTYPE_INT16 yytype_int16
;
317 typedef short int yytype_int16
;
321 # ifdef __SIZE_TYPE__
322 # define YYSIZE_T __SIZE_TYPE__
323 # elif defined size_t
324 # define YYSIZE_T size_t
325 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
326 || defined __cplusplus || defined _MSC_VER)
327 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
328 # define YYSIZE_T size_t
330 # define YYSIZE_T unsigned int
334 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
337 # if defined YYENABLE_NLS && YYENABLE_NLS
339 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
340 # define YY_(msgid) dgettext ("bison-runtime", msgid)
344 # define YY_(msgid) msgid
348 /* Suppress unused-variable warnings by "using" E. */
349 #if ! defined lint || defined __GNUC__
350 # define YYUSE(e) ((void) (e))
352 # define YYUSE(e) /* empty */
355 /* Identity function, used to suppress warnings about constant conditions. */
359 #if (defined __STDC__ || defined __C99__FUNC__ \
360 || defined __cplusplus || defined _MSC_VER)
373 #if ! defined yyoverflow || YYERROR_VERBOSE
375 /* The parser invokes alloca or malloc; define the necessary symbols. */
377 # ifdef YYSTACK_USE_ALLOCA
378 # if YYSTACK_USE_ALLOCA
380 # define YYSTACK_ALLOC __builtin_alloca
381 # elif defined __BUILTIN_VA_ARG_INCR
382 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
384 # define YYSTACK_ALLOC __alloca
385 # elif defined _MSC_VER
386 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
387 # define alloca _alloca
389 # define YYSTACK_ALLOC alloca
390 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
391 || defined __cplusplus || defined _MSC_VER)
392 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
401 # ifdef YYSTACK_ALLOC
402 /* Pacify GCC's `empty if-body' warning. */
403 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
404 # ifndef YYSTACK_ALLOC_MAXIMUM
405 /* The OS might guarantee only one guard page at the bottom of the stack,
406 and a page size can be as small as 4096 bytes. So we cannot safely
407 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
408 to allow for a few compiler-allocated temporary stack slots. */
409 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
412 # define YYSTACK_ALLOC YYMALLOC
413 # define YYSTACK_FREE YYFREE
414 # ifndef YYSTACK_ALLOC_MAXIMUM
415 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
417 # if (defined __cplusplus && ! defined _STDLIB_H \
418 && ! ((defined YYMALLOC || defined malloc) \
419 && (defined YYFREE || defined free)))
420 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
426 # define YYMALLOC malloc
427 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
428 || defined __cplusplus || defined _MSC_VER)
429 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
434 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
435 || defined __cplusplus || defined _MSC_VER)
436 void free (void *); /* INFRINGES ON USER NAME SPACE */
440 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
443 #if (! defined yyoverflow \
444 && (! defined __cplusplus \
445 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
447 /* A type that is properly aligned for any stack member. */
454 /* The size of the maximum gap between one aligned stack and the next. */
455 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
457 /* The size of an array large to enough to hold all stacks, each with
459 # define YYSTACK_BYTES(N) \
460 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
461 + YYSTACK_GAP_MAXIMUM)
463 /* Copy COUNT objects from FROM to TO. The source and destination do
466 # if defined __GNUC__ && 1 < __GNUC__
467 # define YYCOPY(To, From, Count) \
468 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
470 # define YYCOPY(To, From, Count) \
474 for (yyi = 0; yyi < (Count); yyi++) \
475 (To)[yyi] = (From)[yyi]; \
481 /* Relocate STACK from its old location to the new one. The
482 local variables YYSIZE and YYSTACKSIZE give the old and new number of
483 elements in the stack, and YYPTR gives the new location of the
484 stack. Advance YYPTR to a properly aligned location for the next
486 # define YYSTACK_RELOCATE(Stack) \
489 YYSIZE_T yynewbytes; \
490 YYCOPY (&yyptr->Stack, Stack, yysize); \
491 Stack = &yyptr->Stack; \
492 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
493 yyptr += yynewbytes / sizeof (*yyptr); \
499 /* YYFINAL -- State number of the termination state. */
501 /* YYLAST -- Last index in YYTABLE. */
504 /* YYNTOKENS -- Number of terminals. */
506 /* YYNNTS -- Number of nonterminals. */
508 /* YYNRULES -- Number of rules. */
510 /* YYNRULES -- Number of states. */
513 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
515 #define YYMAXUTOK 262
517 #define YYTRANSLATE(YYX) \
518 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
520 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
521 static const yytype_uint8 yytranslate
[] =
523 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 12, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 10,
529 2, 11, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 8, 2, 9, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
553 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
555 static const yytype_uint8 yyprhs
[] =
557 0, 0, 3, 4, 7, 9, 11, 13, 14, 21,
558 22, 30, 33, 35, 40, 44, 46, 48, 52, 54,
559 56, 58, 60, 61, 66, 68, 70, 72, 75, 78
562 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
563 static const yytype_int8 yyrhs
[] =
565 14, 0, -1, -1, 14, 15, -1, 1, -1, 16,
566 -1, 24, -1, -1, 27, 17, 8, 19, 9, 10,
567 -1, -1, 27, 26, 18, 8, 19, 9, 10, -1,
568 19, 20, -1, 20, -1, 27, 11, 21, 10, -1,
569 21, 12, 22, -1, 22, -1, 23, -1, 23, 4,
570 23, -1, 26, -1, 29, -1, 28, -1, 27, -1,
571 -1, 3, 5, 25, 10, -1, 5, -1, 6, -1,
572 7, -1, 28, 27, -1, 29, 29, -1, 29, 28,
576 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
577 static const yytype_uint16 yyrline
[] =
579 0, 184, 184, 185, 186, 189, 190, 194, 193, 203,
580 202, 213, 214, 217, 225, 226, 229, 233, 253, 259,
581 265, 271, 294, 293, 307, 308, 309, 311, 323, 327
585 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
586 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
587 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
588 static const char *const yytname
[] =
590 "$end", "error", "$undefined", "LOADMODULE", "TWODOTS", "QSTRING",
591 "STRING", "NUMBER", "'{'", "'}'", "';'", "'='", "','", "$accept", "conf",
592 "conf_item", "block", "@1", "@2", "block_items", "block_item",
593 "itemlist", "single", "oneitem", "loadmodule", "@3", "qstring", "string",
594 "number", "timespec", 0
599 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
601 static const yytype_uint16 yytoknum
[] =
603 0, 256, 257, 258, 259, 260, 261, 262, 123, 125,
608 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
609 static const yytype_uint8 yyr1
[] =
611 0, 13, 14, 14, 14, 15, 15, 17, 16, 18,
612 16, 19, 19, 20, 21, 21, 22, 22, 23, 23,
613 23, 23, 25, 24, 26, 27, 28, 29, 29, 29
616 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
617 static const yytype_uint8 yyr2
[] =
619 0, 2, 0, 2, 1, 1, 1, 0, 6, 0,
620 7, 2, 1, 4, 3, 1, 1, 3, 1, 1,
621 1, 1, 0, 4, 1, 1, 1, 2, 2, 2
624 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
625 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
626 means the default is an error. */
627 static const yytype_uint8 yydefact
[] =
629 0, 4, 0, 1, 0, 25, 3, 5, 6, 7,
630 22, 24, 0, 9, 0, 0, 0, 23, 0, 12,
631 0, 0, 0, 11, 0, 0, 8, 26, 0, 15,
632 16, 18, 21, 20, 19, 0, 13, 0, 0, 27,
636 /* YYDEFGOTO[NTERM-NUM]. */
637 static const yytype_int8 yydefgoto
[] =
639 -1, 2, 6, 7, 12, 16, 18, 19, 28, 29,
640 30, 8, 14, 31, 20, 33, 34
643 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
645 #define YYPACT_NINF -33
646 static const yytype_int8 yypact
[] =
648 11, -33, 13, -33, 2, -33, -33, -33, -33, 16,
649 -33, -33, 18, -33, 19, 22, 24, -33, 9, -33,
650 23, 22, 20, -33, -1, 14, -33, -33, 15, -33,
651 29, -33, -33, 22, 17, 27, -33, -1, -1, -33,
652 22, 17, -33, -33, -33
655 /* YYPGOTO[NTERM-NUM]. */
656 static const yytype_int8 yypgoto
[] =
658 -33, -33, -33, -33, -33, -33, 21, -17, -33, 3,
659 1, -33, -33, 32, -2, -32, -31
662 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
663 positive, shift that token. If negative, reduce the rule which
664 number is the opposite. If zero, do what YYDEFACT says.
665 If YYTABLE_NINF, syntax error. */
666 #define YYTABLE_NINF -3
667 static const yytype_int8 yytable
[] =
669 9, 23, 40, 41, 11, 5, 27, 10, 23, 40,
670 41, -2, 1, 3, -2, 5, 4, -2, 22, 5,
671 5, 11, 32, 35, 27, 36, 15, 37, 5, 17,
672 26, 39, 21, 38, 24, 32, 32, 42, 39, 44,
676 static const yytype_uint8 yycheck
[] =
678 2, 18, 34, 34, 5, 6, 7, 5, 25, 41,
679 41, 0, 1, 0, 3, 6, 3, 6, 9, 6,
680 6, 5, 24, 9, 7, 10, 8, 12, 6, 10,
681 10, 33, 8, 4, 11, 37, 38, 10, 40, 38,
685 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
686 symbol of state STATE-NUM. */
687 static const yytype_uint8 yystos
[] =
689 0, 1, 14, 0, 3, 6, 15, 16, 24, 27,
690 5, 5, 17, 26, 25, 8, 18, 10, 19, 20,
691 27, 8, 9, 20, 11, 19, 10, 7, 21, 22,
692 23, 26, 27, 28, 29, 9, 10, 12, 4, 27,
696 #define yyerrok (yyerrstatus = 0)
697 #define yyclearin (yychar = YYEMPTY)
701 #define YYACCEPT goto yyacceptlab
702 #define YYABORT goto yyabortlab
703 #define YYERROR goto yyerrorlab
706 /* Like YYERROR except do call yyerror. This remains here temporarily
707 to ease the transition to the new meaning of YYERROR, for GCC.
708 Once GCC version 2 has supplanted version 1, this can go. */
710 #define YYFAIL goto yyerrlab
712 #define YYRECOVERING() (!!yyerrstatus)
714 #define YYBACKUP(Token, Value) \
716 if (yychar == YYEMPTY && yylen == 1) \
720 yytoken = YYTRANSLATE (yychar); \
726 yyerror (YY_("syntax error: cannot back up")); \
733 #define YYERRCODE 256
736 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
737 If N is 0, then set CURRENT to the empty location which ends
738 the previous symbol: RHS[0] (always defined). */
740 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
741 #ifndef YYLLOC_DEFAULT
742 # define YYLLOC_DEFAULT(Current, Rhs, N) \
746 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
747 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
748 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
749 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
753 (Current).first_line = (Current).last_line = \
754 YYRHSLOC (Rhs, 0).last_line; \
755 (Current).first_column = (Current).last_column = \
756 YYRHSLOC (Rhs, 0).last_column; \
762 /* YY_LOCATION_PRINT -- Print the location on the stream.
763 This macro was not mandated originally: define only if we know
764 we won't break user code: when these are the locations we know. */
766 #ifndef YY_LOCATION_PRINT
767 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
768 # define YY_LOCATION_PRINT(File, Loc) \
769 fprintf (File, "%d.%d-%d.%d", \
770 (Loc).first_line, (Loc).first_column, \
771 (Loc).last_line, (Loc).last_column)
773 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
778 /* YYLEX -- calling `yylex' with the right arguments. */
781 # define YYLEX yylex (YYLEX_PARAM)
783 # define YYLEX yylex ()
786 /* Enable debugging if requested. */
790 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
791 # define YYFPRINTF fprintf
794 # define YYDPRINTF(Args) \
800 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
804 YYFPRINTF (stderr, "%s ", Title); \
805 yy_symbol_print (stderr, \
807 YYFPRINTF (stderr, "\n"); \
812 /*--------------------------------.
813 | Print this symbol on YYOUTPUT. |
814 `--------------------------------*/
817 #if (defined __STDC__ || defined __C99__FUNC__ \
818 || defined __cplusplus || defined _MSC_VER)
820 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
823 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
826 YYSTYPE
const * const yyvaluep
;
832 if (yytype
< YYNTOKENS
)
833 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
845 /*--------------------------------.
846 | Print this symbol on YYOUTPUT. |
847 `--------------------------------*/
849 #if (defined __STDC__ || defined __C99__FUNC__ \
850 || defined __cplusplus || defined _MSC_VER)
852 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
855 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
858 YYSTYPE
const * const yyvaluep
;
861 if (yytype
< YYNTOKENS
)
862 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
864 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
866 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
867 YYFPRINTF (yyoutput
, ")");
870 /*------------------------------------------------------------------.
871 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
873 `------------------------------------------------------------------*/
875 #if (defined __STDC__ || defined __C99__FUNC__ \
876 || defined __cplusplus || defined _MSC_VER)
878 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
881 yy_stack_print (bottom
, top
)
882 yytype_int16
*bottom
;
886 YYFPRINTF (stderr
, "Stack now");
887 for (; bottom
<= top
; ++bottom
)
888 YYFPRINTF (stderr
, " %d", *bottom
);
889 YYFPRINTF (stderr
, "\n");
892 # define YY_STACK_PRINT(Bottom, Top) \
895 yy_stack_print ((Bottom), (Top)); \
899 /*------------------------------------------------.
900 | Report that the YYRULE is going to be reduced. |
901 `------------------------------------------------*/
903 #if (defined __STDC__ || defined __C99__FUNC__ \
904 || defined __cplusplus || defined _MSC_VER)
906 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
909 yy_reduce_print (yyvsp
, yyrule
)
914 int yynrhs
= yyr2
[yyrule
];
916 unsigned long int yylno
= yyrline
[yyrule
];
917 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
919 /* The symbols being reduced. */
920 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
922 fprintf (stderr
, " $%d = ", yyi
+ 1);
923 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
924 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
926 fprintf (stderr
, "\n");
930 # define YY_REDUCE_PRINT(Rule) \
933 yy_reduce_print (yyvsp, Rule); \
936 /* Nonzero means print parse trace. It is left uninitialized so that
937 multiple parsers can coexist. */
940 # define YYDPRINTF(Args)
941 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
942 # define YY_STACK_PRINT(Bottom, Top)
943 # define YY_REDUCE_PRINT(Rule)
944 #endif /* !YYDEBUG */
947 /* YYINITDEPTH -- initial size of the parser's stacks. */
949 # define YYINITDEPTH 200
952 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
953 if the built-in stack extension method is used).
955 Do not make this value too large; the results are undefined if
956 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
957 evaluated with infinite-precision integer arithmetic. */
960 # define YYMAXDEPTH 10000
968 # if defined __GLIBC__ && defined _STRING_H
969 # define yystrlen strlen
971 /* Return the length of YYSTR. */
972 #if (defined __STDC__ || defined __C99__FUNC__ \
973 || defined __cplusplus || defined _MSC_VER)
975 yystrlen (const char *yystr
)
983 for (yylen
= 0; yystr
[yylen
]; yylen
++)
991 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
992 # define yystpcpy stpcpy
994 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
996 #if (defined __STDC__ || defined __C99__FUNC__ \
997 || defined __cplusplus || defined _MSC_VER)
999 yystpcpy (char *yydest
, const char *yysrc
)
1002 yystpcpy (yydest
, yysrc
)
1008 const char *yys
= yysrc
;
1010 while ((*yyd
++ = *yys
++) != '\0')
1019 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1020 quotes and backslashes, so that it's suitable for yyerror. The
1021 heuristic is that double-quoting is unnecessary unless the string
1022 contains an apostrophe, a comma, or backslash (other than
1023 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1024 null, do not copy; instead, return the length of what the result
1027 yytnamerr (char *yyres
, const char *yystr
)
1032 char const *yyp
= yystr
;
1039 goto do_not_strip_quotes
;
1043 goto do_not_strip_quotes
;
1056 do_not_strip_quotes
: ;
1060 return yystrlen (yystr
);
1062 return yystpcpy (yyres
, yystr
) - yyres
;
1066 /* Copy into YYRESULT an error message about the unexpected token
1067 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1068 including the terminating null byte. If YYRESULT is null, do not
1069 copy anything; just return the number of bytes that would be
1070 copied. As a special case, return 0 if an ordinary "syntax error"
1071 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1072 size calculation. */
1074 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1076 int yyn
= yypact
[yystate
];
1078 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1082 int yytype
= YYTRANSLATE (yychar
);
1083 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1084 YYSIZE_T yysize
= yysize0
;
1086 int yysize_overflow
= 0;
1087 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1088 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1092 /* This is so xgettext sees the translatable formats that are
1093 constructed on the fly. */
1094 YY_("syntax error, unexpected %s");
1095 YY_("syntax error, unexpected %s, expecting %s");
1096 YY_("syntax error, unexpected %s, expecting %s or %s");
1097 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1098 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1102 static char const yyunexpected
[] = "syntax error, unexpected %s";
1103 static char const yyexpecting
[] = ", expecting %s";
1104 static char const yyor
[] = " or %s";
1105 char yyformat
[sizeof yyunexpected
1106 + sizeof yyexpecting
- 1
1107 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1108 * (sizeof yyor
- 1))];
1109 char const *yyprefix
= yyexpecting
;
1111 /* Start YYX at -YYN if negative to avoid negative indexes in
1113 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1115 /* Stay within bounds of both yycheck and yytname. */
1116 int yychecklim
= YYLAST
- yyn
+ 1;
1117 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1120 yyarg
[0] = yytname
[yytype
];
1121 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1123 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1124 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1126 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1130 yyformat
[sizeof yyunexpected
- 1] = '\0';
1133 yyarg
[yycount
++] = yytname
[yyx
];
1134 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1135 yysize_overflow
|= (yysize1
< yysize
);
1137 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1141 yyf
= YY_(yyformat
);
1142 yysize1
= yysize
+ yystrlen (yyf
);
1143 yysize_overflow
|= (yysize1
< yysize
);
1146 if (yysize_overflow
)
1147 return YYSIZE_MAXIMUM
;
1151 /* Avoid sprintf, as that infringes on the user's name space.
1152 Don't have undefined behavior even if the translation
1153 produced a string with the wrong number of "%s"s. */
1154 char *yyp
= yyresult
;
1156 while ((*yyp
= *yyf
) != '\0')
1158 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1160 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1173 #endif /* YYERROR_VERBOSE */
1176 /*-----------------------------------------------.
1177 | Release the memory associated to this symbol. |
1178 `-----------------------------------------------*/
1181 #if (defined __STDC__ || defined __C99__FUNC__ \
1182 || defined __cplusplus || defined _MSC_VER)
1184 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1187 yydestruct (yymsg
, yytype
, yyvaluep
)
1197 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1208 /* Prevent warnings from -Wmissing-prototypes. */
1210 #ifdef YYPARSE_PARAM
1211 #if defined __STDC__ || defined __cplusplus
1212 int yyparse (void *YYPARSE_PARAM
);
1216 #else /* ! YYPARSE_PARAM */
1217 #if defined __STDC__ || defined __cplusplus
1222 #endif /* ! YYPARSE_PARAM */
1226 /* The look-ahead symbol. */
1229 /* The semantic value of the look-ahead symbol. */
1232 /* Number of syntax errors so far. */
1241 #ifdef YYPARSE_PARAM
1242 #if (defined __STDC__ || defined __C99__FUNC__ \
1243 || defined __cplusplus || defined _MSC_VER)
1245 yyparse (void *YYPARSE_PARAM
)
1248 yyparse (YYPARSE_PARAM
)
1249 void *YYPARSE_PARAM
;
1251 #else /* ! YYPARSE_PARAM */
1252 #if (defined __STDC__ || defined __C99__FUNC__ \
1253 || defined __cplusplus || defined _MSC_VER)
1267 /* Number of tokens to shift before error messages enabled. */
1269 /* Look-ahead token as an internal (translated) token number. */
1272 /* Buffer for error messages, and its allocated size. */
1274 char *yymsg
= yymsgbuf
;
1275 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1278 /* Three stacks and their tools:
1279 `yyss': related to states,
1280 `yyvs': related to semantic values,
1281 `yyls': related to locations.
1283 Refer to the stacks thru separate pointers, to allow yyoverflow
1284 to reallocate them elsewhere. */
1286 /* The state stack. */
1287 yytype_int16 yyssa
[YYINITDEPTH
];
1288 yytype_int16
*yyss
= yyssa
;
1289 yytype_int16
*yyssp
;
1291 /* The semantic value stack. */
1292 YYSTYPE yyvsa
[YYINITDEPTH
];
1293 YYSTYPE
*yyvs
= yyvsa
;
1298 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1300 YYSIZE_T yystacksize
= YYINITDEPTH
;
1302 /* The variables used to return semantic value and location from the
1307 /* The number of symbols on the RHS of the reduced rule.
1308 Keep to zero when no symbol should be popped. */
1311 YYDPRINTF ((stderr
, "Starting parse\n"));
1316 yychar
= YYEMPTY
; /* Cause a token to be read. */
1318 /* Initialize stack pointers.
1319 Waste one element of value and location stack
1320 so that they stay on the same level as the state stack.
1321 The wasted elements are never initialized. */
1328 /*------------------------------------------------------------.
1329 | yynewstate -- Push a new state, which is found in yystate. |
1330 `------------------------------------------------------------*/
1332 /* In all cases, when you get here, the value and location stacks
1333 have just been pushed. So pushing a state here evens the stacks. */
1339 if (yyss
+ yystacksize
- 1 <= yyssp
)
1341 /* Get the current used size of the three stacks, in elements. */
1342 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1346 /* Give user a chance to reallocate the stack. Use copies of
1347 these so that the &'s don't force the real ones into
1349 YYSTYPE
*yyvs1
= yyvs
;
1350 yytype_int16
*yyss1
= yyss
;
1353 /* Each stack pointer address is followed by the size of the
1354 data in use in that stack, in bytes. This used to be a
1355 conditional around just the two extra args, but that might
1356 be undefined if yyoverflow is a macro. */
1357 yyoverflow (YY_("memory exhausted"),
1358 &yyss1
, yysize
* sizeof (*yyssp
),
1359 &yyvs1
, yysize
* sizeof (*yyvsp
),
1366 #else /* no yyoverflow */
1367 # ifndef YYSTACK_RELOCATE
1368 goto yyexhaustedlab
;
1370 /* Extend the stack our own way. */
1371 if (YYMAXDEPTH
<= yystacksize
)
1372 goto yyexhaustedlab
;
1374 if (YYMAXDEPTH
< yystacksize
)
1375 yystacksize
= YYMAXDEPTH
;
1378 yytype_int16
*yyss1
= yyss
;
1379 union yyalloc
*yyptr
=
1380 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1382 goto yyexhaustedlab
;
1383 YYSTACK_RELOCATE (yyss
);
1384 YYSTACK_RELOCATE (yyvs
);
1386 # undef YYSTACK_RELOCATE
1388 YYSTACK_FREE (yyss1
);
1391 #endif /* no yyoverflow */
1393 yyssp
= yyss
+ yysize
- 1;
1394 yyvsp
= yyvs
+ yysize
- 1;
1397 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1398 (unsigned long int) yystacksize
));
1400 if (yyss
+ yystacksize
- 1 <= yyssp
)
1404 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1413 /* Do appropriate processing given the current state. Read a
1414 look-ahead token if we need one and don't already have one. */
1416 /* First try to decide what to do without reference to look-ahead token. */
1417 yyn
= yypact
[yystate
];
1418 if (yyn
== YYPACT_NINF
)
1421 /* Not known => get a look-ahead token if don't already have one. */
1423 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1424 if (yychar
== YYEMPTY
)
1426 YYDPRINTF ((stderr
, "Reading a token: "));
1430 if (yychar
<= YYEOF
)
1432 yychar
= yytoken
= YYEOF
;
1433 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1437 yytoken
= YYTRANSLATE (yychar
);
1438 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1441 /* If the proper action on seeing token YYTOKEN is to reduce or to
1442 detect an error, take that action. */
1444 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1449 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1458 /* Count tokens shifted since error; after three, turn off error
1463 /* Shift the look-ahead token. */
1464 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1466 /* Discard the shifted token unless it is eof. */
1467 if (yychar
!= YYEOF
)
1476 /*-----------------------------------------------------------.
1477 | yydefault -- do the default action for the current state. |
1478 `-----------------------------------------------------------*/
1480 yyn
= yydefact
[yystate
];
1486 /*-----------------------------.
1487 | yyreduce -- Do a reduction. |
1488 `-----------------------------*/
1490 /* yyn is the number of a rule to reduce with. */
1493 /* If YYLEN is nonzero, implement the default value of the action:
1496 Otherwise, the following line sets YYVAL to garbage.
1497 This behavior is undocumented and Bison
1498 users should not rely upon it. Assigning to YYVAL
1499 unconditionally makes the parser a bit smaller, and it avoids a
1500 GCC warning that YYVAL may be used uninitialized. */
1501 yyval
= yyvsp
[1-yylen
];
1504 YY_REDUCE_PRINT (yyn
);
1508 #line 194 "ircd_parser.y"
1510 conf_start_block((yyvsp
[(1) - (1)].string
), NULL
);
1515 #line 198 "ircd_parser.y"
1518 conf_end_block(conf_cur_block
);
1523 #line 203 "ircd_parser.y"
1525 conf_start_block((yyvsp
[(1) - (2)].string
), (yyvsp
[(2) - (2)].string
));
1530 #line 207 "ircd_parser.y"
1533 conf_end_block(conf_cur_block
);
1538 #line 218 "ircd_parser.y"
1540 conf_call_set(conf_cur_block
, (yyvsp
[(1) - (4)].string
), cur_list
);
1541 free_cur_list(cur_list
);
1547 #line 230 "ircd_parser.y"
1549 add_cur_list_cpt((yyvsp
[(1) - (1)].conf_parm
));
1554 #line 234 "ircd_parser.y"
1556 /* "1 .. 5" meaning 1,2,3,4,5 - only valid for integers */
1557 if ((yyvsp
[(1) - (3)].conf_parm
)->type
!= CF_INT
|| (yyvsp
[(3) - (3)].conf_parm
)->type
!= CF_INT
)
1559 conf_report_error("Both arguments in '..' notation must be integers.");
1566 for (i
= (yyvsp
[(1) - (3)].conf_parm
)->v
.number
; i
<= (yyvsp
[(3) - (3)].conf_parm
)->v
.number
; i
++)
1568 add_cur_list(CF_INT
, 0, i
);
1575 #line 254 "ircd_parser.y"
1577 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1578 (yyval
.conf_parm
)->type
= CF_QSTRING
;
1579 (yyval
.conf_parm
)->v
.string
= rb_strdup((yyvsp
[(1) - (1)].string
));
1584 #line 260 "ircd_parser.y"
1586 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1587 (yyval
.conf_parm
)->type
= CF_TIME
;
1588 (yyval
.conf_parm
)->v
.number
= (yyvsp
[(1) - (1)].number
);
1593 #line 266 "ircd_parser.y"
1595 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1596 (yyval
.conf_parm
)->type
= CF_INT
;
1597 (yyval
.conf_parm
)->v
.number
= (yyvsp
[(1) - (1)].number
);
1602 #line 272 "ircd_parser.y"
1604 /* a 'string' could also be a yes/no value ..
1605 so pass it as that, if so */
1606 int val
= conf_get_yesno_value((yyvsp
[(1) - (1)].string
));
1608 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1612 (yyval
.conf_parm
)->type
= CF_YESNO
;
1613 (yyval
.conf_parm
)->v
.number
= val
;
1617 (yyval
.conf_parm
)->type
= CF_STRING
;
1618 (yyval
.conf_parm
)->v
.string
= rb_strdup((yyvsp
[(1) - (1)].string
));
1624 #line 294 "ircd_parser.y"
1628 m_bn
= rb_basename((char *) (yyvsp
[(2) - (2)].string
));
1630 if (findmodule_byname(m_bn
) == -1)
1631 load_one_module((yyvsp
[(2) - (2)].string
), 0);
1638 #line 307 "ircd_parser.y"
1639 { strcpy((yyval
.string
), (yyvsp
[(1) - (1)].string
)); }
1643 #line 308 "ircd_parser.y"
1644 { strcpy((yyval
.string
), (yyvsp
[(1) - (1)].string
)); }
1648 #line 309 "ircd_parser.y"
1649 { (yyval
.number
) = (yyvsp
[(1) - (1)].number
); }
1653 #line 312 "ircd_parser.y"
1657 if ((t
= conf_find_time((yyvsp
[(2) - (2)].string
))) == 0)
1659 conf_report_error("Unrecognised time type/size '%s'", (yyvsp
[(2) - (2)].string
));
1663 (yyval
.number
) = (yyvsp
[(1) - (2)].number
) * t
;
1668 #line 324 "ircd_parser.y"
1670 (yyval
.number
) = (yyvsp
[(1) - (2)].number
) + (yyvsp
[(2) - (2)].number
);
1675 #line 328 "ircd_parser.y"
1677 (yyval
.number
) = (yyvsp
[(1) - (2)].number
) + (yyvsp
[(2) - (2)].number
);
1682 /* Line 1267 of yacc.c. */
1683 #line 1684 "ircd_parser.c"
1686 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
1690 YY_STACK_PRINT (yyss
, yyssp
);
1695 /* Now `shift' the result of the reduction. Determine what state
1696 that goes to, based on the state we popped back to and the rule
1697 number reduced by. */
1701 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1702 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1703 yystate
= yytable
[yystate
];
1705 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1710 /*------------------------------------.
1711 | yyerrlab -- here on detecting error |
1712 `------------------------------------*/
1714 /* If not already recovering from an error, report this error. */
1718 #if ! YYERROR_VERBOSE
1719 yyerror (YY_("syntax error"));
1722 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
1723 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
1725 YYSIZE_T yyalloc
= 2 * yysize
;
1726 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
1727 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
1728 if (yymsg
!= yymsgbuf
)
1729 YYSTACK_FREE (yymsg
);
1730 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
1732 yymsg_alloc
= yyalloc
;
1736 yymsg_alloc
= sizeof yymsgbuf
;
1740 if (0 < yysize
&& yysize
<= yymsg_alloc
)
1742 (void) yysyntax_error (yymsg
, yystate
, yychar
);
1747 yyerror (YY_("syntax error"));
1749 goto yyexhaustedlab
;
1757 if (yyerrstatus
== 3)
1759 /* If just tried and failed to reuse look-ahead token after an
1760 error, discard it. */
1762 if (yychar
<= YYEOF
)
1764 /* Return failure if at end of input. */
1765 if (yychar
== YYEOF
)
1770 yydestruct ("Error: discarding",
1776 /* Else will try to reuse look-ahead token after shifting the error
1781 /*---------------------------------------------------.
1782 | yyerrorlab -- error raised explicitly by YYERROR. |
1783 `---------------------------------------------------*/
1786 /* Pacify compilers like GCC when the user code never invokes
1787 YYERROR and the label yyerrorlab therefore never appears in user
1789 if (/*CONSTCOND*/ 0)
1792 /* Do not reclaim the symbols of the rule which action triggered
1796 YY_STACK_PRINT (yyss
, yyssp
);
1801 /*-------------------------------------------------------------.
1802 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1803 `-------------------------------------------------------------*/
1805 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1809 yyn
= yypact
[yystate
];
1810 if (yyn
!= YYPACT_NINF
)
1813 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1821 /* Pop the current state because it cannot handle the error token. */
1826 yydestruct ("Error: popping",
1827 yystos
[yystate
], yyvsp
);
1830 YY_STACK_PRINT (yyss
, yyssp
);
1839 /* Shift the error token. */
1840 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1846 /*-------------------------------------.
1847 | yyacceptlab -- YYACCEPT comes here. |
1848 `-------------------------------------*/
1853 /*-----------------------------------.
1854 | yyabortlab -- YYABORT comes here. |
1855 `-----------------------------------*/
1861 /*-------------------------------------------------.
1862 | yyexhaustedlab -- memory exhaustion comes here. |
1863 `-------------------------------------------------*/
1865 yyerror (YY_("memory exhausted"));
1871 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
1872 yydestruct ("Cleanup: discarding lookahead",
1874 /* Do not reclaim the symbols of the rule which action triggered
1875 this YYABORT or YYACCEPT. */
1877 YY_STACK_PRINT (yyss
, yyssp
);
1878 while (yyssp
!= yyss
)
1880 yydestruct ("Cleanup: popping",
1881 yystos
[*yyssp
], yyvsp
);
1886 YYSTACK_FREE (yyss
);
1889 if (yymsg
!= yymsgbuf
)
1890 YYSTACK_FREE (yymsg
);
1892 /* Make sure YYID is used. */
1893 return YYID (yyresult
);