1 /* A Bison parser, made by GNU Bison 3.0.4. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
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. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.4"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 #line 5 "ircd_parser.y" /* yacc.c:339 */
67 #include <sys/types.h>
70 #include <netinet/in.h>
76 #define WE_ARE_MEMORY_C
80 #include "ircd_defs.h"
89 void yyerror(const char *);
92 static time_t conf_find_time(char*);
99 {"second", "seconds", 1},
100 {"minute", "minutes", 60},
101 {"hour", "hours", 60 * 60},
102 {"day", "days", 60 * 60 * 24},
103 {"week", "weeks", 60 * 60 * 24 * 7},
104 {"fortnight", "fortnights", 60 * 60 * 24 * 14},
105 {"month", "months", 60 * 60 * 24 * 7 * 4},
106 {"year", "years", 60 * 60 * 24 * 365},
107 /* ok-- we now do sizes here too. they aren't times, but
109 {"byte", "bytes", 1},
111 {"kbyte", "kbytes", 1024},
112 {"kilobyte", "kilebytes", 1024},
113 {"mb", NULL
, 1024 * 1024},
114 {"mbyte", "mbytes", 1024 * 1024},
115 {"megabyte", "megabytes", 1024 * 1024},
119 time_t conf_find_time(char *name
)
123 for (i
= 0; ircd_times
[i
].name
; i
++)
125 if (strcasecmp(ircd_times
[i
].name
, name
) == 0 ||
126 (ircd_times
[i
].plural
&& strcasecmp(ircd_times
[i
].plural
, name
) == 0))
127 return ircd_times
[i
].val
;
147 static int conf_get_yesno_value(char *str
)
151 for (i
= 0; yesno
[i
].word
; i
++)
153 if (strcasecmp(str
, yesno
[i
].word
) == 0)
155 return yesno
[i
].yesno
;
162 static void free_cur_list(conf_parm_t
* list
)
164 if (list
->type
== CF_STRING
|| list
->type
== CF_QSTRING
) {
165 rb_free(list
->v
.string
);
166 } else if (list
->type
== CF_FLIST
) {
167 /* Even though CF_FLIST is a flag, comparing with == is valid
168 * because conf_parm_t.type must be either a type or one flag.
170 free_cur_list(list
->v
.list
);
174 free_cur_list(list
->next
);
181 conf_parm_t
* cur_list
= NULL
;
183 static void add_cur_list_cpt(conf_parm_t
*new)
185 if (cur_list
== NULL
)
187 cur_list
= rb_malloc(sizeof(conf_parm_t
));
188 cur_list
->type
= CF_FLIST
;
189 cur_list
->v
.list
= new;
193 new->next
= cur_list
->v
.list
;
194 cur_list
->v
.list
= new;
198 static void add_cur_list(int type
, char *str
, int number
)
202 new = rb_malloc(sizeof(conf_parm_t
));
211 new->v
.number
= number
;
215 new->v
.string
= rb_strdup(str
);
219 add_cur_list_cpt(new);
224 #line 225 "ircd_parser.c" /* yacc.c:339 */
227 # if defined __cplusplus && 201103L <= __cplusplus
228 # define YY_NULLPTR nullptr
230 # define YY_NULLPTR 0
234 /* Enabling verbose error messages. */
235 #ifdef YYERROR_VERBOSE
236 # undef YYERROR_VERBOSE
237 # define YYERROR_VERBOSE 1
239 # define YYERROR_VERBOSE 0
242 /* In a future release of Bison, this section will be replaced
243 by #include "y.tab.h". */
244 #ifndef YY_YY_IRCD_PARSER_H_INCLUDED
245 # define YY_YY_IRCD_PARSER_H_INCLUDED
267 #define LOADMODULE 258
274 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
278 #line 164 "ircd_parser.y" /* yacc.c:355 */
281 char string
[IRCD_BUFSIZE
+ 1];
282 conf_parm_t
* conf_parm
;
284 #line 285 "ircd_parser.c" /* yacc.c:355 */
287 typedef union YYSTYPE YYSTYPE
;
288 # define YYSTYPE_IS_TRIVIAL 1
289 # define YYSTYPE_IS_DECLARED 1
293 extern YYSTYPE yylval
;
297 #endif /* !YY_YY_IRCD_PARSER_H_INCLUDED */
299 /* Copy the second part of user declarations. */
301 #line 302 "ircd_parser.c" /* yacc.c:358 */
308 typedef YYTYPE_UINT8 yytype_uint8
;
310 typedef unsigned char yytype_uint8
;
314 typedef YYTYPE_INT8 yytype_int8
;
316 typedef signed char yytype_int8
;
320 typedef YYTYPE_UINT16 yytype_uint16
;
322 typedef unsigned short int yytype_uint16
;
326 typedef YYTYPE_INT16 yytype_int16
;
328 typedef short int yytype_int16
;
332 # ifdef __SIZE_TYPE__
333 # define YYSIZE_T __SIZE_TYPE__
334 # elif defined size_t
335 # define YYSIZE_T size_t
336 # elif ! defined YYSIZE_T
337 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
338 # define YYSIZE_T size_t
340 # define YYSIZE_T unsigned int
344 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
347 # if defined YYENABLE_NLS && YYENABLE_NLS
349 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
350 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
354 # define YY_(Msgid) Msgid
359 # if (defined __GNUC__ \
360 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
361 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
362 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
364 # define YY_ATTRIBUTE(Spec) /* empty */
368 #ifndef YY_ATTRIBUTE_PURE
369 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
372 #ifndef YY_ATTRIBUTE_UNUSED
373 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
376 #if !defined _Noreturn \
377 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
378 # if defined _MSC_VER && 1200 <= _MSC_VER
379 # define _Noreturn __declspec (noreturn)
381 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
385 /* Suppress unused-variable warnings by "using" E. */
386 #if ! defined lint || defined __GNUC__
387 # define YYUSE(E) ((void) (E))
389 # define YYUSE(E) /* empty */
392 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
393 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
394 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
395 _Pragma ("GCC diagnostic push") \
396 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
397 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
398 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
399 _Pragma ("GCC diagnostic pop")
401 # define YY_INITIAL_VALUE(Value) Value
403 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
404 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
405 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
407 #ifndef YY_INITIAL_VALUE
408 # define YY_INITIAL_VALUE(Value) /* Nothing. */
412 #if ! defined yyoverflow || YYERROR_VERBOSE
414 /* The parser invokes alloca or malloc; define the necessary symbols. */
416 # ifdef YYSTACK_USE_ALLOCA
417 # if YYSTACK_USE_ALLOCA
419 # define YYSTACK_ALLOC __builtin_alloca
420 # elif defined __BUILTIN_VA_ARG_INCR
421 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
423 # define YYSTACK_ALLOC __alloca
424 # elif defined _MSC_VER
425 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
426 # define alloca _alloca
428 # define YYSTACK_ALLOC alloca
429 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
430 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
431 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
432 # ifndef EXIT_SUCCESS
433 # define EXIT_SUCCESS 0
440 # ifdef YYSTACK_ALLOC
441 /* Pacify GCC's 'empty if-body' warning. */
442 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
443 # ifndef YYSTACK_ALLOC_MAXIMUM
444 /* The OS might guarantee only one guard page at the bottom of the stack,
445 and a page size can be as small as 4096 bytes. So we cannot safely
446 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
447 to allow for a few compiler-allocated temporary stack slots. */
448 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
451 # define YYSTACK_ALLOC YYMALLOC
452 # define YYSTACK_FREE YYFREE
453 # ifndef YYSTACK_ALLOC_MAXIMUM
454 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
456 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
457 && ! ((defined YYMALLOC || defined malloc) \
458 && (defined YYFREE || defined free)))
459 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
460 # ifndef EXIT_SUCCESS
461 # define EXIT_SUCCESS 0
465 # define YYMALLOC malloc
466 # if ! defined malloc && ! defined EXIT_SUCCESS
467 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
472 # if ! defined free && ! defined EXIT_SUCCESS
473 void free (void *); /* INFRINGES ON USER NAME SPACE */
477 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
480 #if (! defined yyoverflow \
481 && (! defined __cplusplus \
482 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
484 /* A type that is properly aligned for any stack member. */
487 yytype_int16 yyss_alloc
;
491 /* The size of the maximum gap between one aligned stack and the next. */
492 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
494 /* The size of an array large to enough to hold all stacks, each with
496 # define YYSTACK_BYTES(N) \
497 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
498 + YYSTACK_GAP_MAXIMUM)
500 # define YYCOPY_NEEDED 1
502 /* Relocate STACK from its old location to the new one. The
503 local variables YYSIZE and YYSTACKSIZE give the old and new number of
504 elements in the stack, and YYPTR gives the new location of the
505 stack. Advance YYPTR to a properly aligned location for the next
507 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
510 YYSIZE_T yynewbytes; \
511 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
512 Stack = &yyptr->Stack_alloc; \
513 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
514 yyptr += yynewbytes / sizeof (*yyptr); \
520 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
521 /* Copy COUNT objects from SRC to DST. The source and destination do
524 # if defined __GNUC__ && 1 < __GNUC__
525 # define YYCOPY(Dst, Src, Count) \
526 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
528 # define YYCOPY(Dst, Src, Count) \
532 for (yyi = 0; yyi < (Count); yyi++) \
533 (Dst)[yyi] = (Src)[yyi]; \
538 #endif /* !YYCOPY_NEEDED */
540 /* YYFINAL -- State number of the termination state. */
542 /* YYLAST -- Last index in YYTABLE. */
545 /* YYNTOKENS -- Number of terminals. */
547 /* YYNNTS -- Number of nonterminals. */
549 /* YYNRULES -- Number of rules. */
551 /* YYNSTATES -- Number of states. */
554 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
555 by yylex, with out-of-bounds checking. */
557 #define YYMAXUTOK 262
559 #define YYTRANSLATE(YYX) \
560 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
562 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
563 as returned by yylex, without out-of-bounds checking. */
564 static const yytype_uint8 yytranslate
[] =
566 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570 2, 2, 2, 2, 12, 2, 2, 2, 2, 2,
571 2, 2, 2, 2, 2, 2, 2, 2, 2, 10,
572 2, 11, 2, 2, 2, 2, 2, 2, 2, 2,
573 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578 2, 2, 2, 8, 2, 9, 2, 2, 2, 2,
579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
596 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
597 static const yytype_uint16 yyrline
[] =
599 0, 183, 183, 184, 185, 188, 189, 193, 192, 202,
600 201, 212, 213, 216, 224, 225, 228, 232, 252, 258,
601 264, 270, 293, 292, 307, 308, 309, 311, 323, 327
605 #if YYDEBUG || YYERROR_VERBOSE || 0
606 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
607 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
608 static const char *const yytname
[] =
610 "$end", "error", "$undefined", "LOADMODULE", "TWODOTS", "QSTRING",
611 "STRING", "NUMBER", "'{'", "'}'", "';'", "'='", "','", "$accept", "conf",
612 "conf_item", "block", "$@1", "$@2", "block_items", "block_item",
613 "itemlist", "single", "oneitem", "loadmodule", "$@3", "qstring",
614 "string", "number", "timespec", YY_NULLPTR
619 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
620 (internal) symbol number NUM (which must be that of a token). */
621 static const yytype_uint16 yytoknum
[] =
623 0, 256, 257, 258, 259, 260, 261, 262, 123, 125,
628 #define YYPACT_NINF -33
630 #define yypact_value_is_default(Yystate) \
631 (!!((Yystate) == (-33)))
633 #define YYTABLE_NINF -3
635 #define yytable_value_is_error(Yytable_value) \
638 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
640 static const yytype_int8 yypact
[] =
642 11, -33, 13, -33, 2, -33, -33, -33, -33, 16,
643 -33, -33, 18, -33, 19, 22, 24, -33, 9, -33,
644 23, 22, 20, -33, -1, 14, -33, -33, 15, -33,
645 29, -33, -33, 22, 17, 27, -33, -1, -1, -33,
646 22, 17, -33, -33, -33
649 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
650 Performed when YYTABLE does not specify something else to do. Zero
651 means the default is an error. */
652 static const yytype_uint8 yydefact
[] =
654 0, 4, 0, 1, 0, 25, 3, 5, 6, 7,
655 22, 24, 0, 9, 0, 0, 0, 23, 0, 12,
656 0, 0, 0, 11, 0, 0, 8, 26, 0, 15,
657 16, 18, 21, 20, 19, 0, 13, 0, 0, 27,
661 /* YYPGOTO[NTERM-NUM]. */
662 static const yytype_int8 yypgoto
[] =
664 -33, -33, -33, -33, -33, -33, 21, -17, -33, 3,
665 1, -33, -33, 32, -2, -32, -31
668 /* YYDEFGOTO[NTERM-NUM]. */
669 static const yytype_int8 yydefgoto
[] =
671 -1, 2, 6, 7, 12, 16, 18, 19, 28, 29,
672 30, 8, 14, 31, 20, 33, 34
675 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
676 positive, shift that token. If negative, reduce the rule whose
677 number is the opposite. If YYTABLE_NINF, syntax error. */
678 static const yytype_int8 yytable
[] =
680 9, 23, 40, 41, 11, 5, 27, 10, 23, 40,
681 41, -2, 1, 3, -2, 5, 4, -2, 22, 5,
682 5, 11, 32, 35, 27, 36, 15, 37, 5, 17,
683 26, 39, 21, 38, 24, 32, 32, 42, 39, 44,
687 static const yytype_uint8 yycheck
[] =
689 2, 18, 34, 34, 5, 6, 7, 5, 25, 41,
690 41, 0, 1, 0, 3, 6, 3, 6, 9, 6,
691 6, 5, 24, 9, 7, 10, 8, 12, 6, 10,
692 10, 33, 8, 4, 11, 37, 38, 10, 40, 38,
696 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
697 symbol of state STATE-NUM. */
698 static const yytype_uint8 yystos
[] =
700 0, 1, 14, 0, 3, 6, 15, 16, 24, 27,
701 5, 5, 17, 26, 25, 8, 18, 10, 19, 20,
702 27, 8, 9, 20, 11, 19, 10, 7, 21, 22,
703 23, 26, 27, 28, 29, 9, 10, 12, 4, 27,
707 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
708 static const yytype_uint8 yyr1
[] =
710 0, 13, 14, 14, 14, 15, 15, 17, 16, 18,
711 16, 19, 19, 20, 21, 21, 22, 22, 23, 23,
712 23, 23, 25, 24, 26, 27, 28, 29, 29, 29
715 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
716 static const yytype_uint8 yyr2
[] =
718 0, 2, 0, 2, 1, 1, 1, 0, 6, 0,
719 7, 2, 1, 4, 3, 1, 1, 3, 1, 1,
720 1, 1, 0, 4, 1, 1, 1, 2, 2, 2
724 #define yyerrok (yyerrstatus = 0)
725 #define yyclearin (yychar = YYEMPTY)
729 #define YYACCEPT goto yyacceptlab
730 #define YYABORT goto yyabortlab
731 #define YYERROR goto yyerrorlab
734 #define YYRECOVERING() (!!yyerrstatus)
736 #define YYBACKUP(Token, Value) \
738 if (yychar == YYEMPTY) \
742 YYPOPSTACK (yylen); \
748 yyerror (YY_("syntax error: cannot back up")); \
753 /* Error token number */
755 #define YYERRCODE 256
759 /* Enable debugging if requested. */
763 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
764 # define YYFPRINTF fprintf
767 # define YYDPRINTF(Args) \
773 /* This macro is provided for backward compatibility. */
774 #ifndef YY_LOCATION_PRINT
775 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
779 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
783 YYFPRINTF (stderr, "%s ", Title); \
784 yy_symbol_print (stderr, \
786 YYFPRINTF (stderr, "\n"); \
791 /*----------------------------------------.
792 | Print this symbol's value on YYOUTPUT. |
793 `----------------------------------------*/
796 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
798 FILE *yyo
= yyoutput
;
803 if (yytype
< YYNTOKENS
)
804 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
810 /*--------------------------------.
811 | Print this symbol on YYOUTPUT. |
812 `--------------------------------*/
815 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
817 YYFPRINTF (yyoutput
, "%s %s (",
818 yytype
< YYNTOKENS
? "token" : "nterm", yytname
[yytype
]);
820 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
821 YYFPRINTF (yyoutput
, ")");
824 /*------------------------------------------------------------------.
825 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
827 `------------------------------------------------------------------*/
830 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
832 YYFPRINTF (stderr
, "Stack now");
833 for (; yybottom
<= yytop
; yybottom
++)
835 int yybot
= *yybottom
;
836 YYFPRINTF (stderr
, " %d", yybot
);
838 YYFPRINTF (stderr
, "\n");
841 # define YY_STACK_PRINT(Bottom, Top) \
844 yy_stack_print ((Bottom), (Top)); \
848 /*------------------------------------------------.
849 | Report that the YYRULE is going to be reduced. |
850 `------------------------------------------------*/
853 yy_reduce_print (yytype_int16
*yyssp
, YYSTYPE
*yyvsp
, int yyrule
)
855 unsigned long int yylno
= yyrline
[yyrule
];
856 int yynrhs
= yyr2
[yyrule
];
858 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
860 /* The symbols being reduced. */
861 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
863 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
864 yy_symbol_print (stderr
,
865 yystos
[yyssp
[yyi
+ 1 - yynrhs
]],
866 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
868 YYFPRINTF (stderr
, "\n");
872 # define YY_REDUCE_PRINT(Rule) \
875 yy_reduce_print (yyssp, yyvsp, Rule); \
878 /* Nonzero means print parse trace. It is left uninitialized so that
879 multiple parsers can coexist. */
882 # define YYDPRINTF(Args)
883 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
884 # define YY_STACK_PRINT(Bottom, Top)
885 # define YY_REDUCE_PRINT(Rule)
886 #endif /* !YYDEBUG */
889 /* YYINITDEPTH -- initial size of the parser's stacks. */
891 # define YYINITDEPTH 200
894 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
895 if the built-in stack extension method is used).
897 Do not make this value too large; the results are undefined if
898 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
899 evaluated with infinite-precision integer arithmetic. */
902 # define YYMAXDEPTH 10000
909 # if defined __GLIBC__ && defined _STRING_H
910 # define yystrlen strlen
912 /* Return the length of YYSTR. */
914 yystrlen (const char *yystr
)
917 for (yylen
= 0; yystr
[yylen
]; yylen
++)
925 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
926 # define yystpcpy stpcpy
928 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
931 yystpcpy (char *yydest
, const char *yysrc
)
934 const char *yys
= yysrc
;
936 while ((*yyd
++ = *yys
++) != '\0')
945 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
946 quotes and backslashes, so that it's suitable for yyerror. The
947 heuristic is that double-quoting is unnecessary unless the string
948 contains an apostrophe, a comma, or backslash (other than
949 backslash-backslash). YYSTR is taken from yytname. If YYRES is
950 null, do not copy; instead, return the length of what the result
953 yytnamerr (char *yyres
, const char *yystr
)
958 char const *yyp
= yystr
;
965 goto do_not_strip_quotes
;
969 goto do_not_strip_quotes
;
982 do_not_strip_quotes
: ;
986 return yystrlen (yystr
);
988 return yystpcpy (yyres
, yystr
) - yyres
;
992 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
993 about the unexpected token YYTOKEN for the state stack whose top is
996 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
997 not large enough to hold the message. In that case, also set
998 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
999 required number of bytes is too large to store. */
1001 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1002 yytype_int16
*yyssp
, int yytoken
)
1004 YYSIZE_T yysize0
= yytnamerr (YY_NULLPTR
, yytname
[yytoken
]);
1005 YYSIZE_T yysize
= yysize0
;
1006 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1007 /* Internationalized format string. */
1008 const char *yyformat
= YY_NULLPTR
;
1009 /* Arguments of yyformat. */
1010 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1011 /* Number of reported tokens (one for the "unexpected", one per
1015 /* There are many possibilities here to consider:
1016 - If this state is a consistent state with a default action, then
1017 the only way this function was invoked is if the default action
1018 is an error action. In that case, don't check for expected
1019 tokens because there are none.
1020 - The only way there can be no lookahead present (in yychar) is if
1021 this state is a consistent state with a default action. Thus,
1022 detecting the absence of a lookahead is sufficient to determine
1023 that there is no unexpected or expected token to report. In that
1024 case, just report a simple "syntax error".
1025 - Don't assume there isn't a lookahead just because this state is a
1026 consistent state with a default action. There might have been a
1027 previous inconsistent state, consistent state with a non-default
1028 action, or user semantic action that manipulated yychar.
1029 - Of course, the expected token list depends on states to have
1030 correct lookahead information, and it depends on the parser not
1031 to perform extra reductions after fetching a lookahead from the
1032 scanner and before detecting a syntax error. Thus, state merging
1033 (from LALR or IELR) and default reductions corrupt the expected
1034 token list. However, the list is correct for canonical LR with
1035 one exception: it will still contain any token that will not be
1036 accepted due to an error action in a later state.
1038 if (yytoken
!= YYEMPTY
)
1040 int yyn
= yypact
[*yyssp
];
1041 yyarg
[yycount
++] = yytname
[yytoken
];
1042 if (!yypact_value_is_default (yyn
))
1044 /* Start YYX at -YYN if negative to avoid negative indexes in
1045 YYCHECK. In other words, skip the first -YYN actions for
1046 this state because they are default actions. */
1047 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1048 /* Stay within bounds of both yycheck and yytname. */
1049 int yychecklim
= YYLAST
- yyn
+ 1;
1050 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1053 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1054 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1055 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1057 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1063 yyarg
[yycount
++] = yytname
[yyx
];
1065 YYSIZE_T yysize1
= yysize
+ yytnamerr (YY_NULLPTR
, yytname
[yyx
]);
1066 if (! (yysize
<= yysize1
1067 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1077 # define YYCASE_(N, S) \
1081 YYCASE_(0, YY_("syntax error"));
1082 YYCASE_(1, YY_("syntax error, unexpected %s"));
1083 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1084 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1085 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1086 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1091 YYSIZE_T yysize1
= yysize
+ yystrlen (yyformat
);
1092 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1097 if (*yymsg_alloc
< yysize
)
1099 *yymsg_alloc
= 2 * yysize
;
1100 if (! (yysize
<= *yymsg_alloc
1101 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1102 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
1106 /* Avoid sprintf, as that infringes on the user's name space.
1107 Don't have undefined behavior even if the translation
1108 produced a string with the wrong number of "%s"s. */
1112 while ((*yyp
= *yyformat
) != '\0')
1113 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1115 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1126 #endif /* YYERROR_VERBOSE */
1128 /*-----------------------------------------------.
1129 | Release the memory associated to this symbol. |
1130 `-----------------------------------------------*/
1133 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1138 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1140 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1142 YY_IGNORE_MAYBE_UNINITIALIZED_END
1148 /* The lookahead symbol. */
1151 /* The semantic value of the lookahead symbol. */
1153 /* Number of syntax errors so far. */
1165 /* Number of tokens to shift before error messages enabled. */
1168 /* The stacks and their tools:
1169 'yyss': related to states.
1170 'yyvs': related to semantic values.
1172 Refer to the stacks through separate pointers, to allow yyoverflow
1173 to reallocate them elsewhere. */
1175 /* The state stack. */
1176 yytype_int16 yyssa
[YYINITDEPTH
];
1178 yytype_int16
*yyssp
;
1180 /* The semantic value stack. */
1181 YYSTYPE yyvsa
[YYINITDEPTH
];
1185 YYSIZE_T yystacksize
;
1189 /* Lookahead token as an internal (translated) token number. */
1191 /* The variables used to return semantic value and location from the
1196 /* Buffer for error messages, and its allocated size. */
1198 char *yymsg
= yymsgbuf
;
1199 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1202 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1204 /* The number of symbols on the RHS of the reduced rule.
1205 Keep to zero when no symbol should be popped. */
1208 yyssp
= yyss
= yyssa
;
1209 yyvsp
= yyvs
= yyvsa
;
1210 yystacksize
= YYINITDEPTH
;
1212 YYDPRINTF ((stderr
, "Starting parse\n"));
1217 yychar
= YYEMPTY
; /* Cause a token to be read. */
1220 /*------------------------------------------------------------.
1221 | yynewstate -- Push a new state, which is found in yystate. |
1222 `------------------------------------------------------------*/
1224 /* In all cases, when you get here, the value and location stacks
1225 have just been pushed. So pushing a state here evens the stacks. */
1231 if (yyss
+ yystacksize
- 1 <= yyssp
)
1233 /* Get the current used size of the three stacks, in elements. */
1234 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1238 /* Give user a chance to reallocate the stack. Use copies of
1239 these so that the &'s don't force the real ones into
1241 YYSTYPE
*yyvs1
= yyvs
;
1242 yytype_int16
*yyss1
= yyss
;
1244 /* Each stack pointer address is followed by the size of the
1245 data in use in that stack, in bytes. This used to be a
1246 conditional around just the two extra args, but that might
1247 be undefined if yyoverflow is a macro. */
1248 yyoverflow (YY_("memory exhausted"),
1249 &yyss1
, yysize
* sizeof (*yyssp
),
1250 &yyvs1
, yysize
* sizeof (*yyvsp
),
1256 #else /* no yyoverflow */
1257 # ifndef YYSTACK_RELOCATE
1258 goto yyexhaustedlab
;
1260 /* Extend the stack our own way. */
1261 if (YYMAXDEPTH
<= yystacksize
)
1262 goto yyexhaustedlab
;
1264 if (YYMAXDEPTH
< yystacksize
)
1265 yystacksize
= YYMAXDEPTH
;
1268 yytype_int16
*yyss1
= yyss
;
1269 union yyalloc
*yyptr
=
1270 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1272 goto yyexhaustedlab
;
1273 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1274 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1275 # undef YYSTACK_RELOCATE
1277 YYSTACK_FREE (yyss1
);
1280 #endif /* no yyoverflow */
1282 yyssp
= yyss
+ yysize
- 1;
1283 yyvsp
= yyvs
+ yysize
- 1;
1285 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1286 (unsigned long int) yystacksize
));
1288 if (yyss
+ yystacksize
- 1 <= yyssp
)
1292 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1294 if (yystate
== YYFINAL
)
1304 /* Do appropriate processing given the current state. Read a
1305 lookahead token if we need one and don't already have one. */
1307 /* First try to decide what to do without reference to lookahead token. */
1308 yyn
= yypact
[yystate
];
1309 if (yypact_value_is_default (yyn
))
1312 /* Not known => get a lookahead token if don't already have one. */
1314 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1315 if (yychar
== YYEMPTY
)
1317 YYDPRINTF ((stderr
, "Reading a token: "));
1321 if (yychar
<= YYEOF
)
1323 yychar
= yytoken
= YYEOF
;
1324 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1328 yytoken
= YYTRANSLATE (yychar
);
1329 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1332 /* If the proper action on seeing token YYTOKEN is to reduce or to
1333 detect an error, take that action. */
1335 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1340 if (yytable_value_is_error (yyn
))
1346 /* Count tokens shifted since error; after three, turn off error
1351 /* Shift the lookahead token. */
1352 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1354 /* Discard the shifted token. */
1358 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1360 YY_IGNORE_MAYBE_UNINITIALIZED_END
1365 /*-----------------------------------------------------------.
1366 | yydefault -- do the default action for the current state. |
1367 `-----------------------------------------------------------*/
1369 yyn
= yydefact
[yystate
];
1375 /*-----------------------------.
1376 | yyreduce -- Do a reduction. |
1377 `-----------------------------*/
1379 /* yyn is the number of a rule to reduce with. */
1382 /* If YYLEN is nonzero, implement the default value of the action:
1385 Otherwise, the following line sets YYVAL to garbage.
1386 This behavior is undocumented and Bison
1387 users should not rely upon it. Assigning to YYVAL
1388 unconditionally makes the parser a bit smaller, and it avoids a
1389 GCC warning that YYVAL may be used uninitialized. */
1390 yyval
= yyvsp
[1-yylen
];
1393 YY_REDUCE_PRINT (yyn
);
1397 #line 193 "ircd_parser.y" /* yacc.c:1646 */
1399 conf_start_block((yyvsp
[0].string
), NULL
);
1401 #line 1402 "ircd_parser.c" /* yacc.c:1646 */
1405 #line 197 "ircd_parser.y" /* yacc.c:1646 */
1408 conf_end_block(conf_cur_block
);
1410 #line 1411 "ircd_parser.c" /* yacc.c:1646 */
1414 #line 202 "ircd_parser.y" /* yacc.c:1646 */
1416 conf_start_block((yyvsp
[-1].string
), (yyvsp
[0].string
));
1418 #line 1419 "ircd_parser.c" /* yacc.c:1646 */
1422 #line 206 "ircd_parser.y" /* yacc.c:1646 */
1425 conf_end_block(conf_cur_block
);
1427 #line 1428 "ircd_parser.c" /* yacc.c:1646 */
1431 #line 217 "ircd_parser.y" /* yacc.c:1646 */
1433 conf_call_set(conf_cur_block
, (yyvsp
[-3].string
), cur_list
);
1434 free_cur_list(cur_list
);
1437 #line 1438 "ircd_parser.c" /* yacc.c:1646 */
1441 #line 229 "ircd_parser.y" /* yacc.c:1646 */
1443 add_cur_list_cpt((yyvsp
[0].conf_parm
));
1445 #line 1446 "ircd_parser.c" /* yacc.c:1646 */
1449 #line 233 "ircd_parser.y" /* yacc.c:1646 */
1451 /* "1 .. 5" meaning 1,2,3,4,5 - only valid for integers */
1452 if ((yyvsp
[-2].conf_parm
)->type
!= CF_INT
|| (yyvsp
[0].conf_parm
)->type
!= CF_INT
)
1454 conf_report_error("Both arguments in '..' notation must be integers.");
1461 for (i
= (yyvsp
[-2].conf_parm
)->v
.number
; i
<= (yyvsp
[0].conf_parm
)->v
.number
; i
++)
1463 add_cur_list(CF_INT
, 0, i
);
1467 #line 1468 "ircd_parser.c" /* yacc.c:1646 */
1471 #line 253 "ircd_parser.y" /* yacc.c:1646 */
1473 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1474 (yyval
.conf_parm
)->type
= CF_QSTRING
;
1475 (yyval
.conf_parm
)->v
.string
= rb_strdup((yyvsp
[0].string
));
1477 #line 1478 "ircd_parser.c" /* yacc.c:1646 */
1481 #line 259 "ircd_parser.y" /* yacc.c:1646 */
1483 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1484 (yyval
.conf_parm
)->type
= CF_TIME
;
1485 (yyval
.conf_parm
)->v
.number
= (yyvsp
[0].number
);
1487 #line 1488 "ircd_parser.c" /* yacc.c:1646 */
1491 #line 265 "ircd_parser.y" /* yacc.c:1646 */
1493 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1494 (yyval
.conf_parm
)->type
= CF_INT
;
1495 (yyval
.conf_parm
)->v
.number
= (yyvsp
[0].number
);
1497 #line 1498 "ircd_parser.c" /* yacc.c:1646 */
1501 #line 271 "ircd_parser.y" /* yacc.c:1646 */
1503 /* a 'string' could also be a yes/no value ..
1504 so pass it as that, if so */
1505 int val
= conf_get_yesno_value((yyvsp
[0].string
));
1507 (yyval
.conf_parm
) = rb_malloc(sizeof(conf_parm_t
));
1511 (yyval
.conf_parm
)->type
= CF_YESNO
;
1512 (yyval
.conf_parm
)->v
.number
= val
;
1516 (yyval
.conf_parm
)->type
= CF_STRING
;
1517 (yyval
.conf_parm
)->v
.string
= rb_strdup((yyvsp
[0].string
));
1520 #line 1521 "ircd_parser.c" /* yacc.c:1646 */
1524 #line 293 "ircd_parser.y" /* yacc.c:1646 */
1527 m_bn
= rb_basename((char *) (yyvsp
[0].string
));
1529 if (findmodule_byname(m_bn
) == -1)
1531 load_one_module((yyvsp
[0].string
), MAPI_ORIGIN_EXTENSION
, 0);
1536 #line 1537 "ircd_parser.c" /* yacc.c:1646 */
1540 #line 307 "ircd_parser.y" /* yacc.c:1646 */
1541 { strcpy((yyval
.string
), (yyvsp
[0].string
)); }
1542 #line 1543 "ircd_parser.c" /* yacc.c:1646 */
1546 #line 308 "ircd_parser.y" /* yacc.c:1646 */
1547 { strcpy((yyval
.string
), (yyvsp
[0].string
)); }
1548 #line 1549 "ircd_parser.c" /* yacc.c:1646 */
1552 #line 309 "ircd_parser.y" /* yacc.c:1646 */
1553 { (yyval
.number
) = (yyvsp
[0].number
); }
1554 #line 1555 "ircd_parser.c" /* yacc.c:1646 */
1558 #line 312 "ircd_parser.y" /* yacc.c:1646 */
1562 if ((t
= conf_find_time((yyvsp
[0].string
))) == 0)
1564 conf_report_error("Unrecognised time type/size '%s'", (yyvsp
[0].string
));
1568 (yyval
.number
) = (yyvsp
[-1].number
) * t
;
1570 #line 1571 "ircd_parser.c" /* yacc.c:1646 */
1574 #line 324 "ircd_parser.y" /* yacc.c:1646 */
1576 (yyval
.number
) = (yyvsp
[-1].number
) + (yyvsp
[0].number
);
1578 #line 1579 "ircd_parser.c" /* yacc.c:1646 */
1582 #line 328 "ircd_parser.y" /* yacc.c:1646 */
1584 (yyval
.number
) = (yyvsp
[-1].number
) + (yyvsp
[0].number
);
1586 #line 1587 "ircd_parser.c" /* yacc.c:1646 */
1590 #line 1591 "ircd_parser.c" /* yacc.c:1646 */
1593 /* User semantic actions sometimes alter yychar, and that requires
1594 that yytoken be updated with the new translation. We take the
1595 approach of translating immediately before every use of yytoken.
1596 One alternative is translating here after every semantic action,
1597 but that translation would be missed if the semantic action invokes
1598 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1599 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1600 incorrect destructor might then be invoked immediately. In the
1601 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1602 to an incorrect destructor call or verbose syntax error message
1603 before the lookahead is translated. */
1604 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
1608 YY_STACK_PRINT (yyss
, yyssp
);
1612 /* Now 'shift' the result of the reduction. Determine what state
1613 that goes to, based on the state we popped back to and the rule
1614 number reduced by. */
1618 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1619 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1620 yystate
= yytable
[yystate
];
1622 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1627 /*--------------------------------------.
1628 | yyerrlab -- here on detecting error. |
1629 `--------------------------------------*/
1631 /* Make sure we have latest lookahead translation. See comments at
1632 user semantic actions for why this is necessary. */
1633 yytoken
= yychar
== YYEMPTY
? YYEMPTY
: YYTRANSLATE (yychar
);
1635 /* If not already recovering from an error, report this error. */
1639 #if ! YYERROR_VERBOSE
1640 yyerror (YY_("syntax error"));
1642 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1645 char const *yymsgp
= YY_("syntax error");
1646 int yysyntax_error_status
;
1647 yysyntax_error_status
= YYSYNTAX_ERROR
;
1648 if (yysyntax_error_status
== 0)
1650 else if (yysyntax_error_status
== 1)
1652 if (yymsg
!= yymsgbuf
)
1653 YYSTACK_FREE (yymsg
);
1654 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
1658 yymsg_alloc
= sizeof yymsgbuf
;
1659 yysyntax_error_status
= 2;
1663 yysyntax_error_status
= YYSYNTAX_ERROR
;
1668 if (yysyntax_error_status
== 2)
1669 goto yyexhaustedlab
;
1671 # undef YYSYNTAX_ERROR
1677 if (yyerrstatus
== 3)
1679 /* If just tried and failed to reuse lookahead token after an
1680 error, discard it. */
1682 if (yychar
<= YYEOF
)
1684 /* Return failure if at end of input. */
1685 if (yychar
== YYEOF
)
1690 yydestruct ("Error: discarding",
1696 /* Else will try to reuse lookahead token after shifting the error
1701 /*---------------------------------------------------.
1702 | yyerrorlab -- error raised explicitly by YYERROR. |
1703 `---------------------------------------------------*/
1706 /* Pacify compilers like GCC when the user code never invokes
1707 YYERROR and the label yyerrorlab therefore never appears in user
1709 if (/*CONSTCOND*/ 0)
1712 /* Do not reclaim the symbols of the rule whose action triggered
1716 YY_STACK_PRINT (yyss
, yyssp
);
1721 /*-------------------------------------------------------------.
1722 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1723 `-------------------------------------------------------------*/
1725 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1729 yyn
= yypact
[yystate
];
1730 if (!yypact_value_is_default (yyn
))
1733 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1741 /* Pop the current state because it cannot handle the error token. */
1746 yydestruct ("Error: popping",
1747 yystos
[yystate
], yyvsp
);
1750 YY_STACK_PRINT (yyss
, yyssp
);
1753 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1755 YY_IGNORE_MAYBE_UNINITIALIZED_END
1758 /* Shift the error token. */
1759 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1765 /*-------------------------------------.
1766 | yyacceptlab -- YYACCEPT comes here. |
1767 `-------------------------------------*/
1772 /*-----------------------------------.
1773 | yyabortlab -- YYABORT comes here. |
1774 `-----------------------------------*/
1779 #if !defined yyoverflow || YYERROR_VERBOSE
1780 /*-------------------------------------------------.
1781 | yyexhaustedlab -- memory exhaustion comes here. |
1782 `-------------------------------------------------*/
1784 yyerror (YY_("memory exhausted"));
1790 if (yychar
!= YYEMPTY
)
1792 /* Make sure we have latest lookahead translation. See comments at
1793 user semantic actions for why this is necessary. */
1794 yytoken
= YYTRANSLATE (yychar
);
1795 yydestruct ("Cleanup: discarding lookahead",
1798 /* Do not reclaim the symbols of the rule whose action triggered
1799 this YYABORT or YYACCEPT. */
1801 YY_STACK_PRINT (yyss
, yyssp
);
1802 while (yyssp
!= yyss
)
1804 yydestruct ("Cleanup: popping",
1805 yystos
[*yyssp
], yyvsp
);
1810 YYSTACK_FREE (yyss
);
1813 if (yymsg
!= yymsgbuf
)
1814 YYSTACK_FREE (yymsg
);