ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config-parser.c
Revision: 8739
Committed: Sun Dec 16 14:59:31 2018 UTC (7 years, 7 months ago) by michael
Content type: text/x-csrc
File size: 82301 byte(s)
Log Message:
- Rebuilt autogenerated files

File Contents

# Content
1 /* A Bison parser, made by GNU Bison 3.2.2. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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 /* Undocumented macros, especially those whose name start with YY_,
44 are private implementation details. Do not rely on them. */
45
46 /* Identify Bison output. */
47 #define YYBISON 1
48
49 /* Bison version. */
50 #define YYBISON_VERSION "3.2.2"
51
52 /* Skeleton name. */
53 #define YYSKELETON_NAME "yacc.c"
54
55 /* Pure parsers. */
56 #define YYPURE 0
57
58 /* Push parsers. */
59 #define YYPUSH 0
60
61 /* Pull parsers. */
62 #define YYPULL 1
63
64
65
66
67 /* First part of user prologue. */
68 #line 21 "config-parser.y" /* yacc.c:338 */
69
70 #include <string.h>
71
72 #include "memory.h"
73 #include "config.h"
74
75 int yylex(void);
76
77 static void *tmp; /* Variable to temporarily hold nodes before insertion to list */
78
79
80 #line 81 "config-parser.c" /* yacc.c:338 */
81 # ifndef YY_NULLPTR
82 # if defined __cplusplus
83 # if 201103L <= __cplusplus
84 # define YY_NULLPTR nullptr
85 # else
86 # define YY_NULLPTR 0
87 # endif
88 # else
89 # define YY_NULLPTR ((void*)0)
90 # endif
91 # endif
92
93 /* Enabling verbose error messages. */
94 #ifdef YYERROR_VERBOSE
95 # undef YYERROR_VERBOSE
96 # define YYERROR_VERBOSE 1
97 #else
98 # define YYERROR_VERBOSE 0
99 #endif
100
101 /* In a future release of Bison, this section will be replaced
102 by #include "y.tab.h". */
103 #ifndef YY_YY_CONFIG_PARSER_H_INCLUDED
104 # define YY_YY_CONFIG_PARSER_H_INCLUDED
105 /* Debug traces. */
106 #ifndef YYDEBUG
107 # define YYDEBUG 0
108 #endif
109 #if YYDEBUG
110 extern int yydebug;
111 #endif
112
113 /* Token type. */
114 #ifndef YYTOKENTYPE
115 # define YYTOKENTYPE
116 enum yytokentype
117 {
118 ADDRESS_FAMILY = 258,
119 AWAY = 259,
120 BAN_UNKNOWN = 260,
121 BLACKLIST = 261,
122 BYTES = 262,
123 KBYTES = 263,
124 MBYTES = 264,
125 CHANNEL = 265,
126 COMMAND_INTERVAL = 266,
127 COMMAND_QUEUE_SIZE = 267,
128 COMMAND_TIMEOUT = 268,
129 CONNREGEX = 269,
130 DNS_FDLIMIT = 270,
131 DNS_TIMEOUT = 271,
132 DNSBL_FROM = 272,
133 DNSBL_TO = 273,
134 EXEMPT = 274,
135 FD = 275,
136 INVITE = 276,
137 IPV4 = 277,
138 IPV6 = 278,
139 IRC = 279,
140 KLINE = 280,
141 KEY = 281,
142 MASK = 282,
143 MAX_READ = 283,
144 MODE = 284,
145 NAME = 285,
146 NEGCACHE = 286,
147 NEGCACHE_REBUILD = 287,
148 NICK = 288,
149 NICKSERV = 289,
150 NOTICE = 290,
151 OPER = 291,
152 OPM = 292,
153 OPTIONS = 293,
154 PASSWORD = 294,
155 PERFORM = 295,
156 PIDFILE = 296,
157 PORT = 297,
158 PROTOCOL = 298,
159 READTIMEOUT = 299,
160 REALNAME = 300,
161 RECONNECTINTERVAL = 301,
162 REPLY = 302,
163 SCANLOG = 303,
164 SCANNER = 304,
165 SECONDS = 305,
166 MINUTES = 306,
167 HOURS = 307,
168 DAYS = 308,
169 WEEKS = 309,
170 MONTHS = 310,
171 YEARS = 311,
172 SENDMAIL = 312,
173 SERVER = 313,
174 TARGET_IP = 314,
175 TARGET_PORT = 315,
176 TARGET_STRING = 316,
177 TIMEOUT = 317,
178 TYPE = 318,
179 USERNAME = 319,
180 USER = 320,
181 VHOST = 321,
182 NUMBER = 322,
183 STRING = 323,
184 PROTOCOLTYPE = 324
185 };
186 #endif
187 /* Tokens. */
188 #define ADDRESS_FAMILY 258
189 #define AWAY 259
190 #define BAN_UNKNOWN 260
191 #define BLACKLIST 261
192 #define BYTES 262
193 #define KBYTES 263
194 #define MBYTES 264
195 #define CHANNEL 265
196 #define COMMAND_INTERVAL 266
197 #define COMMAND_QUEUE_SIZE 267
198 #define COMMAND_TIMEOUT 268
199 #define CONNREGEX 269
200 #define DNS_FDLIMIT 270
201 #define DNS_TIMEOUT 271
202 #define DNSBL_FROM 272
203 #define DNSBL_TO 273
204 #define EXEMPT 274
205 #define FD 275
206 #define INVITE 276
207 #define IPV4 277
208 #define IPV6 278
209 #define IRC 279
210 #define KLINE 280
211 #define KEY 281
212 #define MASK 282
213 #define MAX_READ 283
214 #define MODE 284
215 #define NAME 285
216 #define NEGCACHE 286
217 #define NEGCACHE_REBUILD 287
218 #define NICK 288
219 #define NICKSERV 289
220 #define NOTICE 290
221 #define OPER 291
222 #define OPM 292
223 #define OPTIONS 293
224 #define PASSWORD 294
225 #define PERFORM 295
226 #define PIDFILE 296
227 #define PORT 297
228 #define PROTOCOL 298
229 #define READTIMEOUT 299
230 #define REALNAME 300
231 #define RECONNECTINTERVAL 301
232 #define REPLY 302
233 #define SCANLOG 303
234 #define SCANNER 304
235 #define SECONDS 305
236 #define MINUTES 306
237 #define HOURS 307
238 #define DAYS 308
239 #define WEEKS 309
240 #define MONTHS 310
241 #define YEARS 311
242 #define SENDMAIL 312
243 #define SERVER 313
244 #define TARGET_IP 314
245 #define TARGET_PORT 315
246 #define TARGET_STRING 316
247 #define TIMEOUT 317
248 #define TYPE 318
249 #define USERNAME 319
250 #define USER 320
251 #define VHOST 321
252 #define NUMBER 322
253 #define STRING 323
254 #define PROTOCOLTYPE 324
255
256 /* Value type. */
257 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
258
259 union YYSTYPE
260 {
261 #line 91 "config-parser.y" /* yacc.c:353 */
262
263 int number;
264 char *string;
265
266 #line 267 "config-parser.c" /* yacc.c:353 */
267 };
268
269 typedef union YYSTYPE YYSTYPE;
270 # define YYSTYPE_IS_TRIVIAL 1
271 # define YYSTYPE_IS_DECLARED 1
272 #endif
273
274
275 extern YYSTYPE yylval;
276
277 int yyparse (void);
278
279 #endif /* !YY_YY_CONFIG_PARSER_H_INCLUDED */
280
281
282
283 #ifdef short
284 # undef short
285 #endif
286
287 #ifdef YYTYPE_UINT8
288 typedef YYTYPE_UINT8 yytype_uint8;
289 #else
290 typedef unsigned char yytype_uint8;
291 #endif
292
293 #ifdef YYTYPE_INT8
294 typedef YYTYPE_INT8 yytype_int8;
295 #else
296 typedef signed char yytype_int8;
297 #endif
298
299 #ifdef YYTYPE_UINT16
300 typedef YYTYPE_UINT16 yytype_uint16;
301 #else
302 typedef unsigned short yytype_uint16;
303 #endif
304
305 #ifdef YYTYPE_INT16
306 typedef YYTYPE_INT16 yytype_int16;
307 #else
308 typedef short yytype_int16;
309 #endif
310
311 #ifndef YYSIZE_T
312 # ifdef __SIZE_TYPE__
313 # define YYSIZE_T __SIZE_TYPE__
314 # elif defined size_t
315 # define YYSIZE_T size_t
316 # elif ! defined YYSIZE_T
317 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
318 # define YYSIZE_T size_t
319 # else
320 # define YYSIZE_T unsigned
321 # endif
322 #endif
323
324 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
325
326 #ifndef YY_
327 # if defined YYENABLE_NLS && YYENABLE_NLS
328 # if ENABLE_NLS
329 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
330 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
331 # endif
332 # endif
333 # ifndef YY_
334 # define YY_(Msgid) Msgid
335 # endif
336 #endif
337
338 #ifndef YY_ATTRIBUTE
339 # if (defined __GNUC__ \
340 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
341 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
342 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
343 # else
344 # define YY_ATTRIBUTE(Spec) /* empty */
345 # endif
346 #endif
347
348 #ifndef YY_ATTRIBUTE_PURE
349 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
350 #endif
351
352 #ifndef YY_ATTRIBUTE_UNUSED
353 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
354 #endif
355
356 /* Suppress unused-variable warnings by "using" E. */
357 #if ! defined lint || defined __GNUC__
358 # define YYUSE(E) ((void) (E))
359 #else
360 # define YYUSE(E) /* empty */
361 #endif
362
363 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
364 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
365 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
366 _Pragma ("GCC diagnostic push") \
367 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
368 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
369 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
370 _Pragma ("GCC diagnostic pop")
371 #else
372 # define YY_INITIAL_VALUE(Value) Value
373 #endif
374 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
375 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
376 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
377 #endif
378 #ifndef YY_INITIAL_VALUE
379 # define YY_INITIAL_VALUE(Value) /* Nothing. */
380 #endif
381
382
383 #if ! defined yyoverflow || YYERROR_VERBOSE
384
385 /* The parser invokes alloca or malloc; define the necessary symbols. */
386
387 # ifdef YYSTACK_USE_ALLOCA
388 # if YYSTACK_USE_ALLOCA
389 # ifdef __GNUC__
390 # define YYSTACK_ALLOC __builtin_alloca
391 # elif defined __BUILTIN_VA_ARG_INCR
392 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
393 # elif defined _AIX
394 # define YYSTACK_ALLOC __alloca
395 # elif defined _MSC_VER
396 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
397 # define alloca _alloca
398 # else
399 # define YYSTACK_ALLOC alloca
400 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
401 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
402 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
403 # ifndef EXIT_SUCCESS
404 # define EXIT_SUCCESS 0
405 # endif
406 # endif
407 # endif
408 # endif
409 # endif
410
411 # ifdef YYSTACK_ALLOC
412 /* Pacify GCC's 'empty if-body' warning. */
413 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
414 # ifndef YYSTACK_ALLOC_MAXIMUM
415 /* The OS might guarantee only one guard page at the bottom of the stack,
416 and a page size can be as small as 4096 bytes. So we cannot safely
417 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
418 to allow for a few compiler-allocated temporary stack slots. */
419 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
420 # endif
421 # else
422 # define YYSTACK_ALLOC YYMALLOC
423 # define YYSTACK_FREE YYFREE
424 # ifndef YYSTACK_ALLOC_MAXIMUM
425 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
426 # endif
427 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
428 && ! ((defined YYMALLOC || defined malloc) \
429 && (defined YYFREE || defined free)))
430 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
431 # ifndef EXIT_SUCCESS
432 # define EXIT_SUCCESS 0
433 # endif
434 # endif
435 # ifndef YYMALLOC
436 # define YYMALLOC malloc
437 # if ! defined malloc && ! defined EXIT_SUCCESS
438 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
439 # endif
440 # endif
441 # ifndef YYFREE
442 # define YYFREE free
443 # if ! defined free && ! defined EXIT_SUCCESS
444 void free (void *); /* INFRINGES ON USER NAME SPACE */
445 # endif
446 # endif
447 # endif
448 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
449
450
451 #if (! defined yyoverflow \
452 && (! defined __cplusplus \
453 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
454
455 /* A type that is properly aligned for any stack member. */
456 union yyalloc
457 {
458 yytype_int16 yyss_alloc;
459 YYSTYPE yyvs_alloc;
460 };
461
462 /* The size of the maximum gap between one aligned stack and the next. */
463 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
464
465 /* The size of an array large to enough to hold all stacks, each with
466 N elements. */
467 # define YYSTACK_BYTES(N) \
468 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
469 + YYSTACK_GAP_MAXIMUM)
470
471 # define YYCOPY_NEEDED 1
472
473 /* Relocate STACK from its old location to the new one. The
474 local variables YYSIZE and YYSTACKSIZE give the old and new number of
475 elements in the stack, and YYPTR gives the new location of the
476 stack. Advance YYPTR to a properly aligned location for the next
477 stack. */
478 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
479 do \
480 { \
481 YYSIZE_T yynewbytes; \
482 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
483 Stack = &yyptr->Stack_alloc; \
484 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
485 yyptr += yynewbytes / sizeof (*yyptr); \
486 } \
487 while (0)
488
489 #endif
490
491 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
492 /* Copy COUNT objects from SRC to DST. The source and destination do
493 not overlap. */
494 # ifndef YYCOPY
495 # if defined __GNUC__ && 1 < __GNUC__
496 # define YYCOPY(Dst, Src, Count) \
497 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
498 # else
499 # define YYCOPY(Dst, Src, Count) \
500 do \
501 { \
502 YYSIZE_T yyi; \
503 for (yyi = 0; yyi < (Count); yyi++) \
504 (Dst)[yyi] = (Src)[yyi]; \
505 } \
506 while (0)
507 # endif
508 # endif
509 #endif /* !YYCOPY_NEEDED */
510
511 /* YYFINAL -- State number of the termination state. */
512 #define YYFINAL 2
513 /* YYLAST -- Last index in YYTABLE. */
514 #define YYLAST 346
515
516 /* YYNTOKENS -- Number of terminals. */
517 #define YYNTOKENS 76
518 /* YYNNTS -- Number of nonterminals. */
519 #define YYNNTS 90
520 /* YYNRULES -- Number of rules. */
521 #define YYNRULES 170
522 /* YYNSTATES -- Number of states. */
523 #define YYNSTATES 370
524
525 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
526 by yylex, with out-of-bounds checking. */
527 #define YYUNDEFTOK 2
528 #define YYMAXUTOK 324
529
530 #define YYTRANSLATE(YYX) \
531 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
532
533 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
534 as returned by yylex, without out-of-bounds checking. */
535 static const yytype_uint8 yytranslate[] =
536 {
537 0, 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, 75, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 74, 72,
543 2, 73, 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, 2, 2, 2, 2,
549 2, 2, 2, 70, 2, 71, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
562 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
563 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
564 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
565 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
566 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
567 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
568 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
569 65, 66, 67, 68, 69
570 };
571
572 #if YYDEBUG
573 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
574 static const yytype_uint16 yyrline[] =
575 {
576 0, 106, 106, 107, 110, 111, 112, 113, 114, 115,
577 117, 117, 118, 119, 120, 121, 122, 123, 124, 125,
578 128, 128, 129, 130, 131, 132, 137, 139, 140, 142,
579 143, 144, 145, 146, 147, 148, 149, 150, 151, 153,
580 158, 163, 169, 174, 179, 185, 190, 195, 202, 204,
581 205, 207, 208, 209, 210, 211, 212, 213, 214, 215,
582 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
583 227, 233, 239, 245, 251, 257, 263, 269, 274, 279,
584 284, 289, 294, 300, 306, 312, 318, 327, 327, 340,
585 341, 343, 344, 345, 347, 355, 363, 374, 374, 384,
586 385, 387, 388, 389, 391, 398, 408, 408, 443, 444,
587 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
588 457, 465, 473, 481, 494, 501, 508, 515, 522, 538,
589 540, 541, 543, 544, 545, 546, 547, 549, 555, 561,
590 570, 570, 586, 587, 589, 590, 591, 592, 593, 594,
591 595, 597, 606, 605, 613, 613, 614, 619, 626, 634,
592 646, 653, 655, 656, 658, 672, 674, 675, 677, 678,
593 680
594 };
595 #endif
596
597 #if YYDEBUG || YYERROR_VERBOSE || 0
598 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
599 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
600 static const char *const yytname[] =
601 {
602 "$end", "error", "$undefined", "ADDRESS_FAMILY", "AWAY", "BAN_UNKNOWN",
603 "BLACKLIST", "BYTES", "KBYTES", "MBYTES", "CHANNEL", "COMMAND_INTERVAL",
604 "COMMAND_QUEUE_SIZE", "COMMAND_TIMEOUT", "CONNREGEX", "DNS_FDLIMIT",
605 "DNS_TIMEOUT", "DNSBL_FROM", "DNSBL_TO", "EXEMPT", "FD", "INVITE",
606 "IPV4", "IPV6", "IRC", "KLINE", "KEY", "MASK", "MAX_READ", "MODE",
607 "NAME", "NEGCACHE", "NEGCACHE_REBUILD", "NICK", "NICKSERV", "NOTICE",
608 "OPER", "OPM", "OPTIONS", "PASSWORD", "PERFORM", "PIDFILE", "PORT",
609 "PROTOCOL", "READTIMEOUT", "REALNAME", "RECONNECTINTERVAL", "REPLY",
610 "SCANLOG", "SCANNER", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS",
611 "MONTHS", "YEARS", "SENDMAIL", "SERVER", "TARGET_IP", "TARGET_PORT",
612 "TARGET_STRING", "TIMEOUT", "TYPE", "USERNAME", "USER", "VHOST",
613 "NUMBER", "STRING", "PROTOCOLTYPE", "'{'", "'}'", "';'", "'='", "':'",
614 "','", "$accept", "config", "config_items", "timespec_", "timespec",
615 "sizespec_", "sizespec", "options_entry", "options_items",
616 "options_item", "options_negcache", "options_negcache_rebuild",
617 "options_pidfile", "options_dns_fdlimit", "options_dns_timeout",
618 "options_scanlog", "options_command_queue_size",
619 "options_command_interval", "options_command_timeout", "irc_entry",
620 "irc_items", "irc_item", "irc_away", "irc_kline", "irc_mode", "irc_nick",
621 "irc_nickserv", "irc_oper", "irc_password", "irc_perform", "irc_notice",
622 "irc_port", "irc_readtimeout", "irc_reconnectinterval", "irc_realname",
623 "irc_server", "irc_username", "irc_vhost", "irc_connregex",
624 "channel_entry", "$@1", "channel_items", "channel_item", "channel_name",
625 "channel_key", "channel_invite", "user_entry", "$@2", "user_items",
626 "user_item", "user_mask", "user_scanner", "scanner_entry", "$@3",
627 "scanner_items", "scanner_item", "scanner_name", "scanner_vhost",
628 "scanner_target_ip", "scanner_target_string", "scanner_fd",
629 "scanner_target_port", "scanner_timeout", "scanner_max_read",
630 "scanner_protocol", "opm_entry", "opm_items", "opm_item",
631 "opm_dnsbl_from", "opm_dnsbl_to", "opm_sendmail", "opm_blacklist_entry",
632 "$@4", "blacklist_items", "blacklist_item", "blacklist_name",
633 "blacklist_address_family", "$@5", "blacklist_address_family_items",
634 "blacklist_address_family_item", "blacklist_kline", "blacklist_type",
635 "blacklist_ban_unknown", "blacklist_reply", "blacklist_reply_items",
636 "blacklist_reply_item", "exempt_entry", "exempt_items", "exempt_item",
637 "exempt_mask", YY_NULLPTR
638 };
639 #endif
640
641 # ifdef YYPRINT
642 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
643 (internal) symbol number NUM (which must be that of a token). */
644 static const yytype_uint16 yytoknum[] =
645 {
646 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
647 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
648 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
649 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
650 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
651 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
652 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
653 123, 125, 59, 61, 58, 44
654 };
655 # endif
656
657 #define YYPACT_NINF -294
658
659 #define yypact_value_is_default(Yystate) \
660 (!!((Yystate) == (-294)))
661
662 #define YYTABLE_NINF -141
663
664 #define yytable_value_is_error(Yytable_value) \
665 0
666
667 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
668 STATE-NUM. */
669 static const yytype_int16 yypact[] =
670 {
671 -294, 138, -294, -63, -54, -52, -38, -294, -294, -294,
672 -294, -24, -294, 14, -294, -294, 23, 95, 37, 181,
673 9, 13, -294, -3, 4, -294, -294, -294, 12, 18,
674 19, 20, 24, 31, 33, 35, 42, 44, 48, 49,
675 53, 59, 60, 63, 70, 0, -294, -294, -294, -294,
676 -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
677 -294, -294, -294, -294, -294, 77, -294, 73, 78, 82,
678 5, -294, -294, -294, -294, -294, 150, -294, 85, 87,
679 90, 92, 93, 97, 98, 99, 100, 36, -294, -294,
680 -294, -294, -294, -294, -294, -294, -294, -294, 115, 124,
681 109, 96, -294, 110, 111, 112, 113, 120, 121, 127,
682 137, 140, 141, 83, 139, 142, 139, 143, 146, 149,
683 147, -294, 151, 152, 155, 156, 153, -294, 157, 139,
684 159, 139, 161, 139, 139, 139, 169, 170, 167, -294,
685 -294, 145, 168, 29, -294, -294, -294, -294, 171, 172,
686 173, 174, 175, 176, 177, 178, 179, 52, -294, -294,
687 -294, -294, -294, -294, -294, -294, -294, -294, 182, -294,
688 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
689 193, 148, 194, 195, 196, 197, 198, 199, -294, -18,
690 200, 201, 202, -294, 144, 203, 204, 205, 206, 207,
691 208, 209, 210, 211, -294, 216, 217, 214, -294, 220,
692 221, 222, 223, 225, 224, 226, 139, 227, 228, -294,
693 -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
694 -294, -294, 139, 139, 139, 139, 139, 139, 139, -294,
695 -294, -294, -294, -294, -294, -294, -294, 180, 229, 230,
696 39, -294, -294, -294, -294, -294, -294, -294, -294, -294,
697 231, 232, 233, 219, 234, 56, -294, -294, -294, -294,
698 -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
699 -294, -294, 236, 237, -294, 238, 81, 239, 240, 166,
700 241, 242, 243, 244, 245, -294, -294, -294, -294, -294,
701 -294, -294, -294, 250, 251, 252, 249, -294, 253, 255,
702 256, 257, 260, 261, 258, -294, -294, -294, -294, 221,
703 221, 221, -294, -294, -294, -294, 264, -294, -294, -294,
704 -294, -294, 262, 263, 265, -294, 51, 266, 267, 268,
705 259, -58, -294, 269, -294, -294, -294, -294, 270, -294,
706 -294, -294, -294, -294, 26, -294, -294, -294, -294, 275,
707 272, -294, -294, -294, -294, 51, 273, -294, -294, -294
708 };
709
710 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
711 Performed when YYTABLE does not specify something else to do. Zero
712 means the default is an error. */
713 static const yytype_uint8 yydefact[] =
714 {
715 2, 97, 1, 0, 0, 0, 0, 3, 5, 4,
716 7, 0, 8, 0, 6, 9, 0, 0, 0, 0,
717 0, 0, 169, 0, 0, 167, 168, 69, 0, 0,
718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
719 0, 0, 0, 0, 0, 0, 50, 51, 53, 56,
720 54, 55, 57, 58, 66, 67, 59, 60, 61, 62,
721 63, 64, 65, 52, 68, 0, 136, 0, 0, 0,
722 0, 131, 132, 133, 134, 135, 0, 38, 0, 0,
723 0, 0, 0, 0, 0, 0, 0, 0, 28, 29,
724 30, 31, 32, 33, 34, 35, 36, 37, 0, 0,
725 0, 0, 166, 0, 0, 0, 0, 0, 0, 0,
726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
727 0, 49, 0, 0, 0, 0, 0, 130, 0, 0,
728 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,
729 103, 0, 0, 0, 100, 101, 102, 119, 0, 0,
730 0, 0, 0, 0, 0, 0, 0, 0, 109, 110,
731 111, 113, 115, 112, 114, 117, 118, 116, 0, 165,
732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
733 0, 10, 0, 0, 0, 0, 0, 0, 48, 0,
734 0, 0, 0, 129, 0, 0, 0, 0, 0, 0,
735 0, 0, 0, 0, 26, 0, 0, 0, 99, 0,
736 0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
737 170, 70, 86, 71, 72, 73, 74, 78, 75, 76,
738 77, 79, 10, 10, 10, 10, 10, 10, 10, 12,
739 11, 80, 82, 81, 83, 84, 85, 0, 0, 0,
740 0, 90, 91, 92, 93, 137, 138, 139, 150, 152,
741 0, 0, 0, 0, 0, 0, 143, 144, 145, 147,
742 146, 148, 149, 46, 45, 47, 42, 43, 39, 40,
743 41, 44, 0, 0, 98, 0, 20, 0, 0, 0,
744 0, 0, 0, 0, 0, 107, 13, 14, 15, 16,
745 17, 18, 19, 0, 0, 0, 0, 89, 0, 0,
746 0, 0, 0, 0, 0, 142, 104, 105, 124, 20,
747 20, 20, 22, 21, 127, 120, 0, 122, 125, 123,
748 126, 121, 0, 0, 0, 88, 0, 0, 0, 0,
749 0, 0, 163, 0, 141, 23, 24, 25, 0, 96,
750 95, 94, 156, 157, 0, 155, 160, 158, 151, 0,
751 0, 162, 159, 128, 153, 0, 0, 161, 154, 164
752 };
753
754 /* YYPGOTO[NTERM-NUM]. */
755 static const yytype_int16 yypgoto[] =
756 {
757 -294, -294, -294, -2, -114, -293, 6, -294, -294, 212,
758 -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
759 -294, 278, -294, -294, -294, -294, -294, -294, -294, -294,
760 -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
761 -294, -294, -8, -294, -294, -294, -294, -294, -294, 154,
762 -294, -294, -294, -294, -294, 86, -294, -294, -294, -294,
763 -294, -294, -294, -294, -294, -294, -294, 276, -294, -294,
764 -294, -294, -294, -294, 68, -294, -294, -294, -294, -69,
765 -294, -294, -294, -294, -294, -43, -294, -294, 277, -294
766 };
767
768 /* YYDEFGOTO[NTERM-NUM]. */
769 static const yytype_int16 yydefgoto[] =
770 {
771 -1, 1, 7, 239, 240, 322, 323, 8, 87, 88,
772 89, 90, 91, 92, 93, 94, 95, 96, 97, 9,
773 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
774 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
775 65, 250, 251, 252, 253, 254, 10, 11, 143, 144,
776 145, 146, 12, 13, 157, 158, 159, 160, 161, 162,
777 163, 164, 165, 166, 167, 14, 70, 71, 72, 73,
778 74, 75, 76, 265, 266, 267, 268, 308, 354, 355,
779 269, 270, 271, 272, 341, 342, 15, 24, 25, 26
780 };
781
782 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
783 positive, shift that token. If negative, reduce the rule whose
784 number is the opposite. If YYTABLE_NINF, syntax error. */
785 static const yytype_int16 yytable[] =
786 {
787 182, 27, 184, 247, 28, 22, 66, 16, 248, 340,
788 -87, -140, 249, 360, 29, 195, 17, 197, 18, 199,
789 200, 201, 67, 68, 22, 30, 345, 346, 347, 31,
790 140, 23, 19, 32, 33, 34, 35, 77, 66, 36,
791 37, 20, 38, -140, 39, 40, 41, 78, 79, 80,
792 23, 81, 82, 147, 67, 68, 141, 258, 42, 259,
793 247, 260, 69, 21, 43, 248, 44, 83, 84, 249,
794 100, 120, 148, 352, 353, 101, 126, 85, 142, 98,
795 149, 261, 150, 99, 86, 103, 262, 122, 319, 320,
796 321, 104, 105, 106, 69, 151, 27, 107, 364, 28,
797 207, 365, 293, 263, 108, -87, 109, 138, 110, 29,
798 306, 152, 153, 154, 155, 111, 140, 112, 156, 264,
799 30, 113, 114, 218, 31, 147, 115, 314, 32, 33,
800 34, 35, 116, 117, 36, 37, 118, 38, 2, 39,
801 40, 41, 141, 119, 148, 258, 123, 259, 286, 260,
802 180, 124, 149, 42, 150, 125, 128, 3, 129, 43,
803 130, 44, 4, 131, 142, 132, 133, 151, 169, 261,
804 134, 135, 136, 137, 262, 5, 6, 168, 170, 171,
805 172, 173, 77, 152, 153, 154, 155, -106, 174, 175,
806 156, 263, 78, 79, 80, 176, 81, 82, 232, 233,
807 234, 235, 236, 237, 238, 177, 181, 264, 178, 179,
808 183, 185, 83, 84, 186, 181, 287, 187, 205, 188,
809 190, 189, 85, 191, 192, 193, 196, 194, 198, 86,
810 296, 297, 298, 299, 300, 301, 302, 202, 203, 204,
811 326, 206, 307, 219, 209, 210, 211, 212, 213, 214,
812 215, 216, 217, 303, 220, 221, 222, 223, 224, 225,
813 226, 227, 228, 229, 230, 231, 241, 242, 243, 244,
814 245, 246, 255, 256, 257, 273, 274, 275, 276, 277,
815 278, 279, 280, 281, 282, 283, 284, 285, 286, 312,
816 288, 291, 289, 290, 292, 294, 368, 208, 361, 139,
817 295, 102, 304, 305, 309, 310, 311, 313, 316, 317,
818 318, 324, 325, 327, 328, 329, 330, 331, 332, 333,
819 334, 335, 337, 121, 338, 339, 336, 340, 0, 343,
820 344, 348, 359, 315, 349, 350, 0, 351, 356, 357,
821 358, 362, 363, 366, 367, 369, 127
822 };
823
824 static const yytype_int16 yycheck[] =
825 {
826 114, 1, 116, 21, 4, 1, 1, 70, 26, 67,
827 10, 6, 30, 71, 14, 129, 70, 131, 70, 133,
828 134, 135, 17, 18, 1, 25, 319, 320, 321, 29,
829 1, 27, 70, 33, 34, 35, 36, 1, 1, 39,
830 40, 65, 42, 6, 44, 45, 46, 11, 12, 13,
831 27, 15, 16, 1, 17, 18, 27, 1, 58, 3,
832 21, 5, 57, 49, 64, 26, 66, 31, 32, 30,
833 73, 71, 20, 22, 23, 71, 71, 41, 49, 70,
834 28, 25, 30, 70, 48, 73, 30, 10, 7, 8,
835 9, 73, 73, 73, 57, 43, 1, 73, 72, 4,
836 71, 75, 216, 47, 73, 10, 73, 71, 73, 14,
837 71, 59, 60, 61, 62, 73, 1, 73, 66, 63,
838 25, 73, 73, 71, 29, 1, 73, 71, 33, 34,
839 35, 36, 73, 73, 39, 40, 73, 42, 0, 44,
840 45, 46, 27, 73, 20, 1, 73, 3, 67, 5,
841 67, 73, 28, 58, 30, 73, 6, 19, 73, 64,
842 73, 66, 24, 73, 49, 73, 73, 43, 72, 25,
843 73, 73, 73, 73, 30, 37, 38, 68, 68, 68,
844 68, 68, 1, 59, 60, 61, 62, 49, 68, 68,
845 66, 47, 11, 12, 13, 68, 15, 16, 50, 51,
846 52, 53, 54, 55, 56, 68, 67, 63, 68, 68,
847 68, 68, 31, 32, 68, 67, 210, 68, 73, 72,
848 68, 70, 41, 68, 68, 72, 67, 70, 67, 48,
849 232, 233, 234, 235, 236, 237, 238, 68, 68, 72,
850 74, 73, 250, 157, 73, 73, 73, 73, 73, 73,
851 73, 73, 73, 73, 72, 72, 72, 72, 72, 72,
852 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
853 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
854 72, 72, 72, 72, 68, 68, 72, 67, 67, 70,
855 68, 67, 69, 68, 68, 68, 365, 143, 341, 87,
856 72, 24, 73, 73, 73, 73, 73, 73, 72, 72,
857 72, 72, 72, 72, 72, 72, 72, 72, 68, 68,
858 68, 72, 67, 45, 68, 68, 73, 67, -1, 68,
859 72, 67, 73, 265, 72, 72, -1, 72, 72, 72,
860 72, 72, 72, 68, 72, 72, 70
861 };
862
863 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
864 symbol of state STATE-NUM. */
865 static const yytype_uint8 yystos[] =
866 {
867 0, 77, 0, 19, 24, 37, 38, 78, 83, 95,
868 122, 123, 128, 129, 141, 162, 70, 70, 70, 70,
869 65, 49, 1, 27, 163, 164, 165, 1, 4, 14,
870 25, 29, 33, 34, 35, 36, 39, 40, 42, 44,
871 45, 46, 58, 64, 66, 96, 97, 98, 99, 100,
872 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
873 111, 112, 113, 114, 115, 116, 1, 17, 18, 57,
874 142, 143, 144, 145, 146, 147, 148, 1, 11, 12,
875 13, 15, 16, 31, 32, 41, 48, 84, 85, 86,
876 87, 88, 89, 90, 91, 92, 93, 94, 70, 70,
877 73, 71, 164, 73, 73, 73, 73, 73, 73, 73,
878 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
879 71, 97, 10, 73, 73, 73, 71, 143, 6, 73,
880 73, 73, 73, 73, 73, 73, 73, 73, 71, 85,
881 1, 27, 49, 124, 125, 126, 127, 1, 20, 28,
882 30, 43, 59, 60, 61, 62, 66, 130, 131, 132,
883 133, 134, 135, 136, 137, 138, 139, 140, 68, 72,
884 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
885 67, 67, 80, 68, 80, 68, 68, 68, 72, 70,
886 68, 68, 68, 72, 70, 80, 67, 80, 67, 80,
887 80, 80, 68, 68, 72, 73, 73, 71, 125, 73,
888 73, 73, 73, 73, 73, 73, 73, 73, 71, 131,
889 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
890 72, 72, 50, 51, 52, 53, 54, 55, 56, 79,
891 80, 72, 72, 72, 72, 72, 72, 21, 26, 30,
892 117, 118, 119, 120, 121, 72, 72, 72, 1, 3,
893 5, 25, 30, 47, 63, 149, 150, 151, 152, 156,
894 157, 158, 159, 72, 72, 72, 72, 72, 72, 72,
895 72, 72, 68, 68, 72, 67, 67, 82, 68, 69,
896 68, 67, 68, 80, 68, 72, 79, 79, 79, 79,
897 79, 79, 79, 73, 73, 73, 71, 118, 153, 73,
898 73, 73, 70, 73, 71, 150, 72, 72, 72, 7,
899 8, 9, 81, 82, 72, 72, 74, 72, 72, 72,
900 72, 72, 68, 68, 68, 72, 73, 67, 68, 68,
901 67, 160, 161, 68, 72, 81, 81, 81, 67, 72,
902 72, 72, 22, 23, 154, 155, 72, 72, 72, 73,
903 71, 161, 72, 72, 72, 75, 68, 72, 155, 72
904 };
905
906 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
907 static const yytype_uint8 yyr1[] =
908 {
909 0, 76, 77, 77, 78, 78, 78, 78, 78, 78,
910 79, 79, 80, 80, 80, 80, 80, 80, 80, 80,
911 81, 81, 82, 82, 82, 82, 83, 84, 84, 85,
912 85, 85, 85, 85, 85, 85, 85, 85, 85, 86,
913 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
914 96, 97, 97, 97, 97, 97, 97, 97, 97, 97,
915 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
916 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
917 108, 109, 110, 111, 112, 113, 114, 116, 115, 117,
918 117, 118, 118, 118, 119, 120, 121, 123, 122, 124,
919 124, 125, 125, 125, 126, 127, 129, 128, 130, 130,
920 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
921 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
922 142, 142, 143, 143, 143, 143, 143, 144, 145, 146,
923 148, 147, 149, 149, 150, 150, 150, 150, 150, 150,
924 150, 151, 153, 152, 154, 154, 155, 155, 156, 157,
925 158, 159, 160, 160, 161, 162, 163, 163, 164, 164,
926 165
927 };
928
929 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
930 static const yytype_uint8 yyr2[] =
931 {
932 0, 2, 0, 2, 1, 1, 1, 1, 1, 1,
933 0, 1, 2, 3, 3, 3, 3, 3, 3, 3,
934 0, 1, 2, 3, 3, 3, 5, 2, 1, 1,
935 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
936 4, 4, 4, 4, 4, 4, 4, 4, 5, 2,
937 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
938 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
939 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
940 4, 4, 4, 4, 4, 4, 4, 0, 6, 2,
941 1, 1, 1, 1, 4, 4, 4, 0, 6, 2,
942 1, 1, 1, 1, 4, 4, 0, 6, 2, 1,
943 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
944 4, 4, 4, 4, 4, 4, 4, 4, 6, 5,
945 2, 1, 1, 1, 1, 1, 1, 4, 4, 4,
946 0, 6, 2, 1, 1, 1, 1, 1, 1, 1,
947 1, 4, 0, 5, 3, 1, 1, 1, 4, 4,
948 4, 5, 2, 1, 4, 5, 2, 1, 1, 1,
949 4
950 };
951
952
953 #define yyerrok (yyerrstatus = 0)
954 #define yyclearin (yychar = YYEMPTY)
955 #define YYEMPTY (-2)
956 #define YYEOF 0
957
958 #define YYACCEPT goto yyacceptlab
959 #define YYABORT goto yyabortlab
960 #define YYERROR goto yyerrorlab
961
962
963 #define YYRECOVERING() (!!yyerrstatus)
964
965 #define YYBACKUP(Token, Value) \
966 do \
967 if (yychar == YYEMPTY) \
968 { \
969 yychar = (Token); \
970 yylval = (Value); \
971 YYPOPSTACK (yylen); \
972 yystate = *yyssp; \
973 goto yybackup; \
974 } \
975 else \
976 { \
977 yyerror (YY_("syntax error: cannot back up")); \
978 YYERROR; \
979 } \
980 while (0)
981
982 /* Error token number */
983 #define YYTERROR 1
984 #define YYERRCODE 256
985
986
987
988 /* Enable debugging if requested. */
989 #if YYDEBUG
990
991 # ifndef YYFPRINTF
992 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
993 # define YYFPRINTF fprintf
994 # endif
995
996 # define YYDPRINTF(Args) \
997 do { \
998 if (yydebug) \
999 YYFPRINTF Args; \
1000 } while (0)
1001
1002 /* This macro is provided for backward compatibility. */
1003 #ifndef YY_LOCATION_PRINT
1004 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1005 #endif
1006
1007
1008 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1009 do { \
1010 if (yydebug) \
1011 { \
1012 YYFPRINTF (stderr, "%s ", Title); \
1013 yy_symbol_print (stderr, \
1014 Type, Value); \
1015 YYFPRINTF (stderr, "\n"); \
1016 } \
1017 } while (0)
1018
1019
1020 /*-----------------------------------.
1021 | Print this symbol's value on YYO. |
1022 `-----------------------------------*/
1023
1024 static void
1025 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1026 {
1027 FILE *yyoutput = yyo;
1028 YYUSE (yyoutput);
1029 if (!yyvaluep)
1030 return;
1031 # ifdef YYPRINT
1032 if (yytype < YYNTOKENS)
1033 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1034 # endif
1035 YYUSE (yytype);
1036 }
1037
1038
1039 /*---------------------------.
1040 | Print this symbol on YYO. |
1041 `---------------------------*/
1042
1043 static void
1044 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1045 {
1046 YYFPRINTF (yyo, "%s %s (",
1047 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1048
1049 yy_symbol_value_print (yyo, yytype, yyvaluep);
1050 YYFPRINTF (yyo, ")");
1051 }
1052
1053 /*------------------------------------------------------------------.
1054 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1055 | TOP (included). |
1056 `------------------------------------------------------------------*/
1057
1058 static void
1059 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1060 {
1061 YYFPRINTF (stderr, "Stack now");
1062 for (; yybottom <= yytop; yybottom++)
1063 {
1064 int yybot = *yybottom;
1065 YYFPRINTF (stderr, " %d", yybot);
1066 }
1067 YYFPRINTF (stderr, "\n");
1068 }
1069
1070 # define YY_STACK_PRINT(Bottom, Top) \
1071 do { \
1072 if (yydebug) \
1073 yy_stack_print ((Bottom), (Top)); \
1074 } while (0)
1075
1076
1077 /*------------------------------------------------.
1078 | Report that the YYRULE is going to be reduced. |
1079 `------------------------------------------------*/
1080
1081 static void
1082 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1083 {
1084 unsigned long yylno = yyrline[yyrule];
1085 int yynrhs = yyr2[yyrule];
1086 int yyi;
1087 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1088 yyrule - 1, yylno);
1089 /* The symbols being reduced. */
1090 for (yyi = 0; yyi < yynrhs; yyi++)
1091 {
1092 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1093 yy_symbol_print (stderr,
1094 yystos[yyssp[yyi + 1 - yynrhs]],
1095 &(yyvsp[(yyi + 1) - (yynrhs)])
1096 );
1097 YYFPRINTF (stderr, "\n");
1098 }
1099 }
1100
1101 # define YY_REDUCE_PRINT(Rule) \
1102 do { \
1103 if (yydebug) \
1104 yy_reduce_print (yyssp, yyvsp, Rule); \
1105 } while (0)
1106
1107 /* Nonzero means print parse trace. It is left uninitialized so that
1108 multiple parsers can coexist. */
1109 int yydebug;
1110 #else /* !YYDEBUG */
1111 # define YYDPRINTF(Args)
1112 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1113 # define YY_STACK_PRINT(Bottom, Top)
1114 # define YY_REDUCE_PRINT(Rule)
1115 #endif /* !YYDEBUG */
1116
1117
1118 /* YYINITDEPTH -- initial size of the parser's stacks. */
1119 #ifndef YYINITDEPTH
1120 # define YYINITDEPTH 200
1121 #endif
1122
1123 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1124 if the built-in stack extension method is used).
1125
1126 Do not make this value too large; the results are undefined if
1127 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1128 evaluated with infinite-precision integer arithmetic. */
1129
1130 #ifndef YYMAXDEPTH
1131 # define YYMAXDEPTH 10000
1132 #endif
1133
1134
1135 #if YYERROR_VERBOSE
1136
1137 # ifndef yystrlen
1138 # if defined __GLIBC__ && defined _STRING_H
1139 # define yystrlen strlen
1140 # else
1141 /* Return the length of YYSTR. */
1142 static YYSIZE_T
1143 yystrlen (const char *yystr)
1144 {
1145 YYSIZE_T yylen;
1146 for (yylen = 0; yystr[yylen]; yylen++)
1147 continue;
1148 return yylen;
1149 }
1150 # endif
1151 # endif
1152
1153 # ifndef yystpcpy
1154 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1155 # define yystpcpy stpcpy
1156 # else
1157 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1158 YYDEST. */
1159 static char *
1160 yystpcpy (char *yydest, const char *yysrc)
1161 {
1162 char *yyd = yydest;
1163 const char *yys = yysrc;
1164
1165 while ((*yyd++ = *yys++) != '\0')
1166 continue;
1167
1168 return yyd - 1;
1169 }
1170 # endif
1171 # endif
1172
1173 # ifndef yytnamerr
1174 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1175 quotes and backslashes, so that it's suitable for yyerror. The
1176 heuristic is that double-quoting is unnecessary unless the string
1177 contains an apostrophe, a comma, or backslash (other than
1178 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1179 null, do not copy; instead, return the length of what the result
1180 would have been. */
1181 static YYSIZE_T
1182 yytnamerr (char *yyres, const char *yystr)
1183 {
1184 if (*yystr == '"')
1185 {
1186 YYSIZE_T yyn = 0;
1187 char const *yyp = yystr;
1188
1189 for (;;)
1190 switch (*++yyp)
1191 {
1192 case '\'':
1193 case ',':
1194 goto do_not_strip_quotes;
1195
1196 case '\\':
1197 if (*++yyp != '\\')
1198 goto do_not_strip_quotes;
1199 /* Fall through. */
1200 default:
1201 if (yyres)
1202 yyres[yyn] = *yyp;
1203 yyn++;
1204 break;
1205
1206 case '"':
1207 if (yyres)
1208 yyres[yyn] = '\0';
1209 return yyn;
1210 }
1211 do_not_strip_quotes: ;
1212 }
1213
1214 if (! yyres)
1215 return yystrlen (yystr);
1216
1217 return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1218 }
1219 # endif
1220
1221 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1222 about the unexpected token YYTOKEN for the state stack whose top is
1223 YYSSP.
1224
1225 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1226 not large enough to hold the message. In that case, also set
1227 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1228 required number of bytes is too large to store. */
1229 static int
1230 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1231 yytype_int16 *yyssp, int yytoken)
1232 {
1233 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1234 YYSIZE_T yysize = yysize0;
1235 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1236 /* Internationalized format string. */
1237 const char *yyformat = YY_NULLPTR;
1238 /* Arguments of yyformat. */
1239 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1240 /* Number of reported tokens (one for the "unexpected", one per
1241 "expected"). */
1242 int yycount = 0;
1243
1244 /* There are many possibilities here to consider:
1245 - If this state is a consistent state with a default action, then
1246 the only way this function was invoked is if the default action
1247 is an error action. In that case, don't check for expected
1248 tokens because there are none.
1249 - The only way there can be no lookahead present (in yychar) is if
1250 this state is a consistent state with a default action. Thus,
1251 detecting the absence of a lookahead is sufficient to determine
1252 that there is no unexpected or expected token to report. In that
1253 case, just report a simple "syntax error".
1254 - Don't assume there isn't a lookahead just because this state is a
1255 consistent state with a default action. There might have been a
1256 previous inconsistent state, consistent state with a non-default
1257 action, or user semantic action that manipulated yychar.
1258 - Of course, the expected token list depends on states to have
1259 correct lookahead information, and it depends on the parser not
1260 to perform extra reductions after fetching a lookahead from the
1261 scanner and before detecting a syntax error. Thus, state merging
1262 (from LALR or IELR) and default reductions corrupt the expected
1263 token list. However, the list is correct for canonical LR with
1264 one exception: it will still contain any token that will not be
1265 accepted due to an error action in a later state.
1266 */
1267 if (yytoken != YYEMPTY)
1268 {
1269 int yyn = yypact[*yyssp];
1270 yyarg[yycount++] = yytname[yytoken];
1271 if (!yypact_value_is_default (yyn))
1272 {
1273 /* Start YYX at -YYN if negative to avoid negative indexes in
1274 YYCHECK. In other words, skip the first -YYN actions for
1275 this state because they are default actions. */
1276 int yyxbegin = yyn < 0 ? -yyn : 0;
1277 /* Stay within bounds of both yycheck and yytname. */
1278 int yychecklim = YYLAST - yyn + 1;
1279 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1280 int yyx;
1281
1282 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1283 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1284 && !yytable_value_is_error (yytable[yyx + yyn]))
1285 {
1286 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1287 {
1288 yycount = 1;
1289 yysize = yysize0;
1290 break;
1291 }
1292 yyarg[yycount++] = yytname[yyx];
1293 {
1294 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1295 if (! (yysize <= yysize1
1296 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1297 return 2;
1298 yysize = yysize1;
1299 }
1300 }
1301 }
1302 }
1303
1304 switch (yycount)
1305 {
1306 # define YYCASE_(N, S) \
1307 case N: \
1308 yyformat = S; \
1309 break
1310 default: /* Avoid compiler warnings. */
1311 YYCASE_(0, YY_("syntax error"));
1312 YYCASE_(1, YY_("syntax error, unexpected %s"));
1313 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1314 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1315 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1316 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1317 # undef YYCASE_
1318 }
1319
1320 {
1321 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1322 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1323 return 2;
1324 yysize = yysize1;
1325 }
1326
1327 if (*yymsg_alloc < yysize)
1328 {
1329 *yymsg_alloc = 2 * yysize;
1330 if (! (yysize <= *yymsg_alloc
1331 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1332 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1333 return 1;
1334 }
1335
1336 /* Avoid sprintf, as that infringes on the user's name space.
1337 Don't have undefined behavior even if the translation
1338 produced a string with the wrong number of "%s"s. */
1339 {
1340 char *yyp = *yymsg;
1341 int yyi = 0;
1342 while ((*yyp = *yyformat) != '\0')
1343 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1344 {
1345 yyp += yytnamerr (yyp, yyarg[yyi++]);
1346 yyformat += 2;
1347 }
1348 else
1349 {
1350 yyp++;
1351 yyformat++;
1352 }
1353 }
1354 return 0;
1355 }
1356 #endif /* YYERROR_VERBOSE */
1357
1358 /*-----------------------------------------------.
1359 | Release the memory associated to this symbol. |
1360 `-----------------------------------------------*/
1361
1362 static void
1363 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1364 {
1365 YYUSE (yyvaluep);
1366 if (!yymsg)
1367 yymsg = "Deleting";
1368 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1369
1370 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1371 YYUSE (yytype);
1372 YY_IGNORE_MAYBE_UNINITIALIZED_END
1373 }
1374
1375
1376
1377
1378 /* The lookahead symbol. */
1379 int yychar;
1380
1381 /* The semantic value of the lookahead symbol. */
1382 YYSTYPE yylval;
1383 /* Number of syntax errors so far. */
1384 int yynerrs;
1385
1386
1387 /*----------.
1388 | yyparse. |
1389 `----------*/
1390
1391 int
1392 yyparse (void)
1393 {
1394 int yystate;
1395 /* Number of tokens to shift before error messages enabled. */
1396 int yyerrstatus;
1397
1398 /* The stacks and their tools:
1399 'yyss': related to states.
1400 'yyvs': related to semantic values.
1401
1402 Refer to the stacks through separate pointers, to allow yyoverflow
1403 to reallocate them elsewhere. */
1404
1405 /* The state stack. */
1406 yytype_int16 yyssa[YYINITDEPTH];
1407 yytype_int16 *yyss;
1408 yytype_int16 *yyssp;
1409
1410 /* The semantic value stack. */
1411 YYSTYPE yyvsa[YYINITDEPTH];
1412 YYSTYPE *yyvs;
1413 YYSTYPE *yyvsp;
1414
1415 YYSIZE_T yystacksize;
1416
1417 int yyn;
1418 int yyresult;
1419 /* Lookahead token as an internal (translated) token number. */
1420 int yytoken = 0;
1421 /* The variables used to return semantic value and location from the
1422 action routines. */
1423 YYSTYPE yyval;
1424
1425 #if YYERROR_VERBOSE
1426 /* Buffer for error messages, and its allocated size. */
1427 char yymsgbuf[128];
1428 char *yymsg = yymsgbuf;
1429 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1430 #endif
1431
1432 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1433
1434 /* The number of symbols on the RHS of the reduced rule.
1435 Keep to zero when no symbol should be popped. */
1436 int yylen = 0;
1437
1438 yyssp = yyss = yyssa;
1439 yyvsp = yyvs = yyvsa;
1440 yystacksize = YYINITDEPTH;
1441
1442 YYDPRINTF ((stderr, "Starting parse\n"));
1443
1444 yystate = 0;
1445 yyerrstatus = 0;
1446 yynerrs = 0;
1447 yychar = YYEMPTY; /* Cause a token to be read. */
1448 goto yysetstate;
1449
1450 /*------------------------------------------------------------.
1451 | yynewstate -- Push a new state, which is found in yystate. |
1452 `------------------------------------------------------------*/
1453 yynewstate:
1454 /* In all cases, when you get here, the value and location stacks
1455 have just been pushed. So pushing a state here evens the stacks. */
1456 yyssp++;
1457
1458 yysetstate:
1459 *yyssp = (yytype_int16) yystate;
1460
1461 if (yyss + yystacksize - 1 <= yyssp)
1462 {
1463 /* Get the current used size of the three stacks, in elements. */
1464 YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1465
1466 #ifdef yyoverflow
1467 {
1468 /* Give user a chance to reallocate the stack. Use copies of
1469 these so that the &'s don't force the real ones into
1470 memory. */
1471 YYSTYPE *yyvs1 = yyvs;
1472 yytype_int16 *yyss1 = yyss;
1473
1474 /* Each stack pointer address is followed by the size of the
1475 data in use in that stack, in bytes. This used to be a
1476 conditional around just the two extra args, but that might
1477 be undefined if yyoverflow is a macro. */
1478 yyoverflow (YY_("memory exhausted"),
1479 &yyss1, yysize * sizeof (*yyssp),
1480 &yyvs1, yysize * sizeof (*yyvsp),
1481 &yystacksize);
1482 yyss = yyss1;
1483 yyvs = yyvs1;
1484 }
1485 #else /* no yyoverflow */
1486 # ifndef YYSTACK_RELOCATE
1487 goto yyexhaustedlab;
1488 # else
1489 /* Extend the stack our own way. */
1490 if (YYMAXDEPTH <= yystacksize)
1491 goto yyexhaustedlab;
1492 yystacksize *= 2;
1493 if (YYMAXDEPTH < yystacksize)
1494 yystacksize = YYMAXDEPTH;
1495
1496 {
1497 yytype_int16 *yyss1 = yyss;
1498 union yyalloc *yyptr =
1499 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1500 if (! yyptr)
1501 goto yyexhaustedlab;
1502 YYSTACK_RELOCATE (yyss_alloc, yyss);
1503 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1504 # undef YYSTACK_RELOCATE
1505 if (yyss1 != yyssa)
1506 YYSTACK_FREE (yyss1);
1507 }
1508 # endif
1509 #endif /* no yyoverflow */
1510
1511 yyssp = yyss + yysize - 1;
1512 yyvsp = yyvs + yysize - 1;
1513
1514 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1515 (unsigned long) yystacksize));
1516
1517 if (yyss + yystacksize - 1 <= yyssp)
1518 YYABORT;
1519 }
1520
1521 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1522
1523 if (yystate == YYFINAL)
1524 YYACCEPT;
1525
1526 goto yybackup;
1527
1528 /*-----------.
1529 | yybackup. |
1530 `-----------*/
1531 yybackup:
1532
1533 /* Do appropriate processing given the current state. Read a
1534 lookahead token if we need one and don't already have one. */
1535
1536 /* First try to decide what to do without reference to lookahead token. */
1537 yyn = yypact[yystate];
1538 if (yypact_value_is_default (yyn))
1539 goto yydefault;
1540
1541 /* Not known => get a lookahead token if don't already have one. */
1542
1543 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1544 if (yychar == YYEMPTY)
1545 {
1546 YYDPRINTF ((stderr, "Reading a token: "));
1547 yychar = yylex ();
1548 }
1549
1550 if (yychar <= YYEOF)
1551 {
1552 yychar = yytoken = YYEOF;
1553 YYDPRINTF ((stderr, "Now at end of input.\n"));
1554 }
1555 else
1556 {
1557 yytoken = YYTRANSLATE (yychar);
1558 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1559 }
1560
1561 /* If the proper action on seeing token YYTOKEN is to reduce or to
1562 detect an error, take that action. */
1563 yyn += yytoken;
1564 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1565 goto yydefault;
1566 yyn = yytable[yyn];
1567 if (yyn <= 0)
1568 {
1569 if (yytable_value_is_error (yyn))
1570 goto yyerrlab;
1571 yyn = -yyn;
1572 goto yyreduce;
1573 }
1574
1575 /* Count tokens shifted since error; after three, turn off error
1576 status. */
1577 if (yyerrstatus)
1578 yyerrstatus--;
1579
1580 /* Shift the lookahead token. */
1581 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1582
1583 /* Discard the shifted token. */
1584 yychar = YYEMPTY;
1585
1586 yystate = yyn;
1587 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1588 *++yyvsp = yylval;
1589 YY_IGNORE_MAYBE_UNINITIALIZED_END
1590
1591 goto yynewstate;
1592
1593
1594 /*-----------------------------------------------------------.
1595 | yydefault -- do the default action for the current state. |
1596 `-----------------------------------------------------------*/
1597 yydefault:
1598 yyn = yydefact[yystate];
1599 if (yyn == 0)
1600 goto yyerrlab;
1601 goto yyreduce;
1602
1603
1604 /*-----------------------------.
1605 | yyreduce -- Do a reduction. |
1606 `-----------------------------*/
1607 yyreduce:
1608 /* yyn is the number of a rule to reduce with. */
1609 yylen = yyr2[yyn];
1610
1611 /* If YYLEN is nonzero, implement the default value of the action:
1612 '$$ = $1'.
1613
1614 Otherwise, the following line sets YYVAL to garbage.
1615 This behavior is undocumented and Bison
1616 users should not rely upon it. Assigning to YYVAL
1617 unconditionally makes the parser a bit smaller, and it avoids a
1618 GCC warning that YYVAL may be used uninitialized. */
1619 yyval = yyvsp[1-yylen];
1620
1621
1622 YY_REDUCE_PRINT (yyn);
1623 switch (yyn)
1624 {
1625 case 10:
1626 #line 117 "config-parser.y" /* yacc.c:1645 */
1627 { (yyval.number) = 0; }
1628 #line 1629 "config-parser.c" /* yacc.c:1645 */
1629 break;
1630
1631 case 12:
1632 #line 118 "config-parser.y" /* yacc.c:1645 */
1633 { (yyval.number) = (yyvsp[-1].number) + (yyvsp[0].number); }
1634 #line 1635 "config-parser.c" /* yacc.c:1645 */
1635 break;
1636
1637 case 13:
1638 #line 119 "config-parser.y" /* yacc.c:1645 */
1639 { (yyval.number) = (yyvsp[-2].number) + (yyvsp[0].number); }
1640 #line 1641 "config-parser.c" /* yacc.c:1645 */
1641 break;
1642
1643 case 14:
1644 #line 120 "config-parser.y" /* yacc.c:1645 */
1645 { (yyval.number) = (yyvsp[-2].number) * 60 + (yyvsp[0].number); }
1646 #line 1647 "config-parser.c" /* yacc.c:1645 */
1647 break;
1648
1649 case 15:
1650 #line 121 "config-parser.y" /* yacc.c:1645 */
1651 { (yyval.number) = (yyvsp[-2].number) * 60 * 60 + (yyvsp[0].number); }
1652 #line 1653 "config-parser.c" /* yacc.c:1645 */
1653 break;
1654
1655 case 16:
1656 #line 122 "config-parser.y" /* yacc.c:1645 */
1657 { (yyval.number) = (yyvsp[-2].number) * 60 * 60 * 24 + (yyvsp[0].number); }
1658 #line 1659 "config-parser.c" /* yacc.c:1645 */
1659 break;
1660
1661 case 17:
1662 #line 123 "config-parser.y" /* yacc.c:1645 */
1663 { (yyval.number) = (yyvsp[-2].number) * 60 * 60 * 24 * 7 + (yyvsp[0].number); }
1664 #line 1665 "config-parser.c" /* yacc.c:1645 */
1665 break;
1666
1667 case 18:
1668 #line 124 "config-parser.y" /* yacc.c:1645 */
1669 { (yyval.number) = (yyvsp[-2].number) * 60 * 60 * 24 * 7 * 4 + (yyvsp[0].number); }
1670 #line 1671 "config-parser.c" /* yacc.c:1645 */
1671 break;
1672
1673 case 19:
1674 #line 125 "config-parser.y" /* yacc.c:1645 */
1675 { (yyval.number) = (yyvsp[-2].number) * 60 * 60 * 24 * 365 + (yyvsp[0].number); }
1676 #line 1677 "config-parser.c" /* yacc.c:1645 */
1677 break;
1678
1679 case 20:
1680 #line 128 "config-parser.y" /* yacc.c:1645 */
1681 { (yyval.number) = 0; }
1682 #line 1683 "config-parser.c" /* yacc.c:1645 */
1683 break;
1684
1685 case 22:
1686 #line 129 "config-parser.y" /* yacc.c:1645 */
1687 { (yyval.number) = (yyvsp[-1].number) + (yyvsp[0].number); }
1688 #line 1689 "config-parser.c" /* yacc.c:1645 */
1689 break;
1690
1691 case 23:
1692 #line 130 "config-parser.y" /* yacc.c:1645 */
1693 { (yyval.number) = (yyvsp[-2].number) + (yyvsp[0].number); }
1694 #line 1695 "config-parser.c" /* yacc.c:1645 */
1695 break;
1696
1697 case 24:
1698 #line 131 "config-parser.y" /* yacc.c:1645 */
1699 { (yyval.number) = (yyvsp[-2].number) * 1024 + (yyvsp[0].number); }
1700 #line 1701 "config-parser.c" /* yacc.c:1645 */
1701 break;
1702
1703 case 25:
1704 #line 132 "config-parser.y" /* yacc.c:1645 */
1705 { (yyval.number) = (yyvsp[-2].number) * 1024 * 1024 + (yyvsp[0].number); }
1706 #line 1707 "config-parser.c" /* yacc.c:1645 */
1707 break;
1708
1709 case 39:
1710 #line 154 "config-parser.y" /* yacc.c:1645 */
1711 {
1712 OptionsItem.negcache = (yyvsp[-1].number);
1713 }
1714 #line 1715 "config-parser.c" /* yacc.c:1645 */
1715 break;
1716
1717 case 40:
1718 #line 159 "config-parser.y" /* yacc.c:1645 */
1719 {
1720 OptionsItem.negcache_rebuild = (yyvsp[-1].number);
1721 }
1722 #line 1723 "config-parser.c" /* yacc.c:1645 */
1723 break;
1724
1725 case 41:
1726 #line 164 "config-parser.y" /* yacc.c:1645 */
1727 {
1728 xfree(OptionsItem.pidfile);
1729 OptionsItem.pidfile = xstrdup((yyvsp[-1].string));
1730 }
1731 #line 1732 "config-parser.c" /* yacc.c:1645 */
1732 break;
1733
1734 case 42:
1735 #line 170 "config-parser.y" /* yacc.c:1645 */
1736 {
1737 OptionsItem.dns_fdlimit = (yyvsp[-1].number);
1738 }
1739 #line 1740 "config-parser.c" /* yacc.c:1645 */
1740 break;
1741
1742 case 43:
1743 #line 175 "config-parser.y" /* yacc.c:1645 */
1744 {
1745 OptionsItem.dns_timeout = (yyvsp[-1].number);
1746 }
1747 #line 1748 "config-parser.c" /* yacc.c:1645 */
1748 break;
1749
1750 case 44:
1751 #line 180 "config-parser.y" /* yacc.c:1645 */
1752 {
1753 xfree(OptionsItem.scanlog);
1754 OptionsItem.scanlog = xstrdup((yyvsp[-1].string));
1755 }
1756 #line 1757 "config-parser.c" /* yacc.c:1645 */
1757 break;
1758
1759 case 45:
1760 #line 186 "config-parser.y" /* yacc.c:1645 */
1761 {
1762 OptionsItem.command_queue_size = (yyvsp[-1].number);
1763 }
1764 #line 1765 "config-parser.c" /* yacc.c:1645 */
1765 break;
1766
1767 case 46:
1768 #line 191 "config-parser.y" /* yacc.c:1645 */
1769 {
1770 OptionsItem.command_interval = (yyvsp[-1].number);
1771 }
1772 #line 1773 "config-parser.c" /* yacc.c:1645 */
1773 break;
1774
1775 case 47:
1776 #line 196 "config-parser.y" /* yacc.c:1645 */
1777 {
1778 OptionsItem.command_timeout = (yyvsp[-1].number);
1779 }
1780 #line 1781 "config-parser.c" /* yacc.c:1645 */
1781 break;
1782
1783 case 70:
1784 #line 228 "config-parser.y" /* yacc.c:1645 */
1785 {
1786 xfree(IRCItem.away);
1787 IRCItem.away = xstrdup((yyvsp[-1].string));
1788 }
1789 #line 1790 "config-parser.c" /* yacc.c:1645 */
1790 break;
1791
1792 case 71:
1793 #line 234 "config-parser.y" /* yacc.c:1645 */
1794 {
1795 xfree(IRCItem.kline);
1796 IRCItem.kline = xstrdup((yyvsp[-1].string));
1797 }
1798 #line 1799 "config-parser.c" /* yacc.c:1645 */
1799 break;
1800
1801 case 72:
1802 #line 240 "config-parser.y" /* yacc.c:1645 */
1803 {
1804 xfree(IRCItem.mode);
1805 IRCItem.mode = xstrdup((yyvsp[-1].string));
1806 }
1807 #line 1808 "config-parser.c" /* yacc.c:1645 */
1808 break;
1809
1810 case 73:
1811 #line 246 "config-parser.y" /* yacc.c:1645 */
1812 {
1813 xfree(IRCItem.nick);
1814 IRCItem.nick = xstrdup((yyvsp[-1].string));
1815 }
1816 #line 1817 "config-parser.c" /* yacc.c:1645 */
1817 break;
1818
1819 case 74:
1820 #line 252 "config-parser.y" /* yacc.c:1645 */
1821 {
1822 xfree(IRCItem.nickserv);
1823 IRCItem.nickserv = xstrdup((yyvsp[-1].string));
1824 }
1825 #line 1826 "config-parser.c" /* yacc.c:1645 */
1826 break;
1827
1828 case 75:
1829 #line 258 "config-parser.y" /* yacc.c:1645 */
1830 {
1831 xfree(IRCItem.oper);
1832 IRCItem.oper = xstrdup((yyvsp[-1].string));
1833 }
1834 #line 1835 "config-parser.c" /* yacc.c:1645 */
1835 break;
1836
1837 case 76:
1838 #line 264 "config-parser.y" /* yacc.c:1645 */
1839 {
1840 xfree(IRCItem.password);
1841 IRCItem.password = xstrdup((yyvsp[-1].string));
1842 }
1843 #line 1844 "config-parser.c" /* yacc.c:1645 */
1844 break;
1845
1846 case 77:
1847 #line 270 "config-parser.y" /* yacc.c:1645 */
1848 {
1849 list_add(xstrdup((yyvsp[-1].string)), node_create(), &IRCItem.performs);
1850 }
1851 #line 1852 "config-parser.c" /* yacc.c:1645 */
1852 break;
1853
1854 case 78:
1855 #line 275 "config-parser.y" /* yacc.c:1645 */
1856 {
1857 list_add(xstrdup((yyvsp[-1].string)), node_create(), &IRCItem.notices);
1858 }
1859 #line 1860 "config-parser.c" /* yacc.c:1645 */
1860 break;
1861
1862 case 79:
1863 #line 280 "config-parser.y" /* yacc.c:1645 */
1864 {
1865 IRCItem.port = (yyvsp[-1].number);
1866 }
1867 #line 1868 "config-parser.c" /* yacc.c:1645 */
1868 break;
1869
1870 case 80:
1871 #line 285 "config-parser.y" /* yacc.c:1645 */
1872 {
1873 IRCItem.readtimeout = (yyvsp[-1].number);
1874 }
1875 #line 1876 "config-parser.c" /* yacc.c:1645 */
1876 break;
1877
1878 case 81:
1879 #line 290 "config-parser.y" /* yacc.c:1645 */
1880 {
1881 IRCItem.reconnectinterval = (yyvsp[-1].number);
1882 }
1883 #line 1884 "config-parser.c" /* yacc.c:1645 */
1884 break;
1885
1886 case 82:
1887 #line 295 "config-parser.y" /* yacc.c:1645 */
1888 {
1889 xfree(IRCItem.realname);
1890 IRCItem.realname = xstrdup((yyvsp[-1].string));
1891 }
1892 #line 1893 "config-parser.c" /* yacc.c:1645 */
1893 break;
1894
1895 case 83:
1896 #line 301 "config-parser.y" /* yacc.c:1645 */
1897 {
1898 xfree(IRCItem.server);
1899 IRCItem.server = xstrdup((yyvsp[-1].string));
1900 }
1901 #line 1902 "config-parser.c" /* yacc.c:1645 */
1902 break;
1903
1904 case 84:
1905 #line 307 "config-parser.y" /* yacc.c:1645 */
1906 {
1907 xfree(IRCItem.username);
1908 IRCItem.username = xstrdup((yyvsp[-1].string));
1909 }
1910 #line 1911 "config-parser.c" /* yacc.c:1645 */
1911 break;
1912
1913 case 85:
1914 #line 313 "config-parser.y" /* yacc.c:1645 */
1915 {
1916 xfree(IRCItem.vhost);
1917 IRCItem.vhost = xstrdup((yyvsp[-1].string));
1918 }
1919 #line 1920 "config-parser.c" /* yacc.c:1645 */
1920 break;
1921
1922 case 86:
1923 #line 319 "config-parser.y" /* yacc.c:1645 */
1924 {
1925 xfree(IRCItem.connregex);
1926 IRCItem.connregex = xstrdup((yyvsp[-1].string));
1927 }
1928 #line 1929 "config-parser.c" /* yacc.c:1645 */
1929 break;
1930
1931 case 87:
1932 #line 327 "config-parser.y" /* yacc.c:1645 */
1933 {
1934 struct ChannelConf *item;
1935
1936 item = xcalloc(sizeof(*item));
1937 item->name = xstrdup("");
1938 item->key = xstrdup("");
1939 item->invite = xstrdup("");
1940
1941 list_add(item, &item->node, &IRCItem.channels);
1942 tmp = item;
1943 }
1944 #line 1945 "config-parser.c" /* yacc.c:1645 */
1945 break;
1946
1947 case 94:
1948 #line 348 "config-parser.y" /* yacc.c:1645 */
1949 {
1950 struct ChannelConf *item = tmp;
1951
1952 xfree(item->name);
1953 item->name = xstrdup((yyvsp[-1].string));
1954 }
1955 #line 1956 "config-parser.c" /* yacc.c:1645 */
1956 break;
1957
1958 case 95:
1959 #line 356 "config-parser.y" /* yacc.c:1645 */
1960 {
1961 struct ChannelConf *item = tmp;
1962
1963 xfree(item->key);
1964 item->key = xstrdup((yyvsp[-1].string));
1965 }
1966 #line 1967 "config-parser.c" /* yacc.c:1645 */
1967 break;
1968
1969 case 96:
1970 #line 364 "config-parser.y" /* yacc.c:1645 */
1971 {
1972 struct ChannelConf *item = tmp;
1973
1974 xfree(item->invite);
1975 item->invite = xstrdup((yyvsp[-1].string));
1976 }
1977 #line 1978 "config-parser.c" /* yacc.c:1645 */
1978 break;
1979
1980 case 97:
1981 #line 374 "config-parser.y" /* yacc.c:1645 */
1982 {
1983 struct UserConf *item;
1984
1985 item = xcalloc(sizeof(*item));
1986
1987 list_add(item, &item->node, &UserItemList);
1988 tmp = item;
1989 }
1990 #line 1991 "config-parser.c" /* yacc.c:1645 */
1991 break;
1992
1993 case 104:
1994 #line 392 "config-parser.y" /* yacc.c:1645 */
1995 {
1996 struct UserConf *item = tmp;
1997
1998 list_add(xstrdup((yyvsp[-1].string)), node_create(), &item->masks);
1999 }
2000 #line 2001 "config-parser.c" /* yacc.c:1645 */
2001 break;
2002
2003 case 105:
2004 #line 399 "config-parser.y" /* yacc.c:1645 */
2005 {
2006 struct UserConf *item = tmp;
2007
2008 list_add(xstrdup((yyvsp[-1].string)), node_create(), &item->scanners);
2009 }
2010 #line 2011 "config-parser.c" /* yacc.c:1645 */
2011 break;
2012
2013 case 106:
2014 #line 408 "config-parser.y" /* yacc.c:1645 */
2015 {
2016 struct ScannerConf *item, *olditem;
2017
2018 item = xcalloc(sizeof(*item));
2019
2020 /* Setup ScannerConf defaults */
2021 item->name = xstrdup("undefined");
2022
2023 if (LIST_SIZE(&ScannerItemList))
2024 {
2025 olditem = ScannerItemList.tail->data;
2026
2027 item->vhost = xstrdup(olditem->vhost);
2028 item->fd = olditem->fd;
2029 item->target_ip = xstrdup(olditem->target_ip);
2030 item->target_port = olditem->target_port;
2031 item->timeout = olditem->timeout;
2032 item->max_read = olditem->max_read;
2033 memcpy(&item->target_string, &olditem->target_string, sizeof(item->target_string));
2034 }
2035 else
2036 {
2037 item->vhost = xstrdup("0.0.0.0");
2038 item->fd = 512;
2039 item->target_ip = xstrdup("127.0.0.1");
2040 item->target_port = 6667;
2041 item->timeout = 30;
2042 item->max_read = 4096;
2043 }
2044
2045 list_add(item, &item->node, &ScannerItemList);
2046 tmp = item;
2047 }
2048 #line 2049 "config-parser.c" /* yacc.c:1645 */
2049 break;
2050
2051 case 120:
2052 #line 458 "config-parser.y" /* yacc.c:1645 */
2053 {
2054 struct ScannerConf *item = tmp;
2055
2056 xfree(item->name);
2057 item->name = xstrdup((yyvsp[-1].string));
2058 }
2059 #line 2060 "config-parser.c" /* yacc.c:1645 */
2060 break;
2061
2062 case 121:
2063 #line 466 "config-parser.y" /* yacc.c:1645 */
2064 {
2065 struct ScannerConf *item = tmp;
2066
2067 xfree(item->vhost);
2068 item->vhost = xstrdup((yyvsp[-1].string));
2069 }
2070 #line 2071 "config-parser.c" /* yacc.c:1645 */
2071 break;
2072
2073 case 122:
2074 #line 474 "config-parser.y" /* yacc.c:1645 */
2075 {
2076 struct ScannerConf *item = tmp;
2077
2078 xfree(item->target_ip);
2079 item->target_ip = xstrdup((yyvsp[-1].string));
2080 }
2081 #line 2082 "config-parser.c" /* yacc.c:1645 */
2082 break;
2083
2084 case 123:
2085 #line 482 "config-parser.y" /* yacc.c:1645 */
2086 {
2087 struct ScannerConf *item = tmp;
2088
2089 if (item->target_string_created == 0)
2090 {
2091 memset(&item->target_string, 0, sizeof(item->target_string));
2092 item->target_string_created = 1;
2093 }
2094
2095 list_add(xstrdup((yyvsp[-1].string)), node_create(), &item->target_string);
2096 }
2097 #line 2098 "config-parser.c" /* yacc.c:1645 */
2098 break;
2099
2100 case 124:
2101 #line 495 "config-parser.y" /* yacc.c:1645 */
2102 {
2103 struct ScannerConf *item = tmp;
2104
2105 item->fd = (yyvsp[-1].number);
2106 }
2107 #line 2108 "config-parser.c" /* yacc.c:1645 */
2108 break;
2109
2110 case 125:
2111 #line 502 "config-parser.y" /* yacc.c:1645 */
2112 {
2113 struct ScannerConf *item = tmp;
2114
2115 item->target_port = (yyvsp[-1].number);
2116 }
2117 #line 2118 "config-parser.c" /* yacc.c:1645 */
2118 break;
2119
2120 case 126:
2121 #line 509 "config-parser.y" /* yacc.c:1645 */
2122 {
2123 struct ScannerConf *item = tmp;
2124
2125 item->timeout = (yyvsp[-1].number);
2126 }
2127 #line 2128 "config-parser.c" /* yacc.c:1645 */
2128 break;
2129
2130 case 127:
2131 #line 516 "config-parser.y" /* yacc.c:1645 */
2132 {
2133 struct ScannerConf *item = tmp;
2134
2135 item->max_read = (yyvsp[-1].number);
2136 }
2137 #line 2138 "config-parser.c" /* yacc.c:1645 */
2138 break;
2139
2140 case 128:
2141 #line 523 "config-parser.y" /* yacc.c:1645 */
2142 {
2143 struct ProtocolConf *item;
2144 struct ScannerConf *item2;
2145
2146 item = xcalloc(sizeof(*item));
2147 item->type = (yyvsp[-3].number);
2148 item->port = (yyvsp[-1].number);
2149
2150 item2 = tmp;
2151
2152 list_add(item, node_create(), &item2->protocols);
2153 }
2154 #line 2155 "config-parser.c" /* yacc.c:1645 */
2155 break;
2156
2157 case 137:
2158 #line 550 "config-parser.y" /* yacc.c:1645 */
2159 {
2160 xfree(OpmItem.dnsbl_from);
2161 OpmItem.dnsbl_from = xstrdup((yyvsp[-1].string));
2162 }
2163 #line 2164 "config-parser.c" /* yacc.c:1645 */
2164 break;
2165
2166 case 138:
2167 #line 556 "config-parser.y" /* yacc.c:1645 */
2168 {
2169 xfree(OpmItem.dnsbl_to);
2170 OpmItem.dnsbl_to = xstrdup((yyvsp[-1].string));
2171 }
2172 #line 2173 "config-parser.c" /* yacc.c:1645 */
2173 break;
2174
2175 case 139:
2176 #line 562 "config-parser.y" /* yacc.c:1645 */
2177 {
2178 xfree(OpmItem.sendmail);
2179 OpmItem.sendmail = xstrdup((yyvsp[-1].string));
2180 }
2181 #line 2182 "config-parser.c" /* yacc.c:1645 */
2182 break;
2183
2184 case 140:
2185 #line 570 "config-parser.y" /* yacc.c:1645 */
2186 {
2187 struct BlacklistConf *item;
2188
2189 item = xcalloc(sizeof(*item));
2190 item->name = xstrdup("");
2191 item->kline = xstrdup("");
2192 item->ipv4 = 1;
2193 item->ban_unknown = 0;
2194 item->type = A_BITMASK;
2195
2196 list_add(item, node_create(), &OpmItem.blacklists);
2197
2198 tmp = item;
2199 }
2200 #line 2201 "config-parser.c" /* yacc.c:1645 */
2201 break;
2202
2203 case 151:
2204 #line 598 "config-parser.y" /* yacc.c:1645 */
2205 {
2206 struct BlacklistConf *item = tmp;
2207
2208 xfree(item->name);
2209 item->name = xstrdup((yyvsp[-1].string));
2210 }
2211 #line 2212 "config-parser.c" /* yacc.c:1645 */
2212 break;
2213
2214 case 152:
2215 #line 606 "config-parser.y" /* yacc.c:1645 */
2216 {
2217 struct BlacklistConf *item = tmp;
2218
2219 item->ipv4 = 0;
2220 item->ipv6 = 0;
2221 }
2222 #line 2223 "config-parser.c" /* yacc.c:1645 */
2223 break;
2224
2225 case 156:
2226 #line 615 "config-parser.y" /* yacc.c:1645 */
2227 {
2228 struct BlacklistConf *item = tmp;
2229
2230 item->ipv4 = 1;
2231 }
2232 #line 2233 "config-parser.c" /* yacc.c:1645 */
2233 break;
2234
2235 case 157:
2236 #line 620 "config-parser.y" /* yacc.c:1645 */
2237 {
2238 struct BlacklistConf *item = tmp;
2239
2240 item->ipv6 = 1;
2241 }
2242 #line 2243 "config-parser.c" /* yacc.c:1645 */
2243 break;
2244
2245 case 158:
2246 #line 627 "config-parser.y" /* yacc.c:1645 */
2247 {
2248 struct BlacklistConf *item = tmp;
2249
2250 xfree(item->kline);
2251 item->kline = xstrdup((yyvsp[-1].string));
2252 }
2253 #line 2254 "config-parser.c" /* yacc.c:1645 */
2254 break;
2255
2256 case 159:
2257 #line 635 "config-parser.y" /* yacc.c:1645 */
2258 {
2259 struct BlacklistConf *item = tmp;
2260
2261 if (strcmp("A record bitmask", (yyvsp[-1].string)) == 0)
2262 item->type = A_BITMASK;
2263 else if (strcmp("A record reply", (yyvsp[-1].string)) == 0)
2264 item->type = A_REPLY;
2265 else
2266 yyerror("Unknown blacklist type defined");
2267 }
2268 #line 2269 "config-parser.c" /* yacc.c:1645 */
2269 break;
2270
2271 case 160:
2272 #line 647 "config-parser.y" /* yacc.c:1645 */
2273 {
2274 struct BlacklistConf *item = tmp;
2275
2276 item->ban_unknown = (yyvsp[-1].number);
2277 }
2278 #line 2279 "config-parser.c" /* yacc.c:1645 */
2279 break;
2280
2281 case 164:
2282 #line 659 "config-parser.y" /* yacc.c:1645 */
2283 {
2284 struct BlacklistReplyConf *item;
2285 struct BlacklistConf *blacklist = tmp;
2286
2287 item = xcalloc(sizeof(*item));
2288 item->number = (yyvsp[-3].number);
2289 item->type = xstrdup((yyvsp[-1].string));
2290
2291 list_add(item, node_create(), &blacklist->reply);
2292 }
2293 #line 2294 "config-parser.c" /* yacc.c:1645 */
2294 break;
2295
2296 case 170:
2297 #line 681 "config-parser.y" /* yacc.c:1645 */
2298 {
2299 list_add(xstrdup((yyvsp[-1].string)), node_create(), &ExemptItem.masks);
2300 }
2301 #line 2302 "config-parser.c" /* yacc.c:1645 */
2302 break;
2303
2304
2305 #line 2306 "config-parser.c" /* yacc.c:1645 */
2306 default: break;
2307 }
2308 /* User semantic actions sometimes alter yychar, and that requires
2309 that yytoken be updated with the new translation. We take the
2310 approach of translating immediately before every use of yytoken.
2311 One alternative is translating here after every semantic action,
2312 but that translation would be missed if the semantic action invokes
2313 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2314 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2315 incorrect destructor might then be invoked immediately. In the
2316 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2317 to an incorrect destructor call or verbose syntax error message
2318 before the lookahead is translated. */
2319 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2320
2321 YYPOPSTACK (yylen);
2322 yylen = 0;
2323 YY_STACK_PRINT (yyss, yyssp);
2324
2325 *++yyvsp = yyval;
2326
2327 /* Now 'shift' the result of the reduction. Determine what state
2328 that goes to, based on the state we popped back to and the rule
2329 number reduced by. */
2330 {
2331 const int yylhs = yyr1[yyn] - YYNTOKENS;
2332 const int yyi = yypgoto[yylhs] + *yyssp;
2333 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2334 ? yytable[yyi]
2335 : yydefgoto[yylhs]);
2336 }
2337
2338 goto yynewstate;
2339
2340
2341 /*--------------------------------------.
2342 | yyerrlab -- here on detecting error. |
2343 `--------------------------------------*/
2344 yyerrlab:
2345 /* Make sure we have latest lookahead translation. See comments at
2346 user semantic actions for why this is necessary. */
2347 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2348
2349 /* If not already recovering from an error, report this error. */
2350 if (!yyerrstatus)
2351 {
2352 ++yynerrs;
2353 #if ! YYERROR_VERBOSE
2354 yyerror (YY_("syntax error"));
2355 #else
2356 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2357 yyssp, yytoken)
2358 {
2359 char const *yymsgp = YY_("syntax error");
2360 int yysyntax_error_status;
2361 yysyntax_error_status = YYSYNTAX_ERROR;
2362 if (yysyntax_error_status == 0)
2363 yymsgp = yymsg;
2364 else if (yysyntax_error_status == 1)
2365 {
2366 if (yymsg != yymsgbuf)
2367 YYSTACK_FREE (yymsg);
2368 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2369 if (!yymsg)
2370 {
2371 yymsg = yymsgbuf;
2372 yymsg_alloc = sizeof yymsgbuf;
2373 yysyntax_error_status = 2;
2374 }
2375 else
2376 {
2377 yysyntax_error_status = YYSYNTAX_ERROR;
2378 yymsgp = yymsg;
2379 }
2380 }
2381 yyerror (yymsgp);
2382 if (yysyntax_error_status == 2)
2383 goto yyexhaustedlab;
2384 }
2385 # undef YYSYNTAX_ERROR
2386 #endif
2387 }
2388
2389
2390
2391 if (yyerrstatus == 3)
2392 {
2393 /* If just tried and failed to reuse lookahead token after an
2394 error, discard it. */
2395
2396 if (yychar <= YYEOF)
2397 {
2398 /* Return failure if at end of input. */
2399 if (yychar == YYEOF)
2400 YYABORT;
2401 }
2402 else
2403 {
2404 yydestruct ("Error: discarding",
2405 yytoken, &yylval);
2406 yychar = YYEMPTY;
2407 }
2408 }
2409
2410 /* Else will try to reuse lookahead token after shifting the error
2411 token. */
2412 goto yyerrlab1;
2413
2414
2415 /*---------------------------------------------------.
2416 | yyerrorlab -- error raised explicitly by YYERROR. |
2417 `---------------------------------------------------*/
2418 yyerrorlab:
2419
2420 /* Pacify compilers like GCC when the user code never invokes
2421 YYERROR and the label yyerrorlab therefore never appears in user
2422 code. */
2423 if (/*CONSTCOND*/ 0)
2424 goto yyerrorlab;
2425
2426 /* Do not reclaim the symbols of the rule whose action triggered
2427 this YYERROR. */
2428 YYPOPSTACK (yylen);
2429 yylen = 0;
2430 YY_STACK_PRINT (yyss, yyssp);
2431 yystate = *yyssp;
2432 goto yyerrlab1;
2433
2434
2435 /*-------------------------------------------------------------.
2436 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2437 `-------------------------------------------------------------*/
2438 yyerrlab1:
2439 yyerrstatus = 3; /* Each real token shifted decrements this. */
2440
2441 for (;;)
2442 {
2443 yyn = yypact[yystate];
2444 if (!yypact_value_is_default (yyn))
2445 {
2446 yyn += YYTERROR;
2447 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2448 {
2449 yyn = yytable[yyn];
2450 if (0 < yyn)
2451 break;
2452 }
2453 }
2454
2455 /* Pop the current state because it cannot handle the error token. */
2456 if (yyssp == yyss)
2457 YYABORT;
2458
2459
2460 yydestruct ("Error: popping",
2461 yystos[yystate], yyvsp);
2462 YYPOPSTACK (1);
2463 yystate = *yyssp;
2464 YY_STACK_PRINT (yyss, yyssp);
2465 }
2466
2467 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2468 *++yyvsp = yylval;
2469 YY_IGNORE_MAYBE_UNINITIALIZED_END
2470
2471
2472 /* Shift the error token. */
2473 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2474
2475 yystate = yyn;
2476 goto yynewstate;
2477
2478
2479 /*-------------------------------------.
2480 | yyacceptlab -- YYACCEPT comes here. |
2481 `-------------------------------------*/
2482 yyacceptlab:
2483 yyresult = 0;
2484 goto yyreturn;
2485
2486 /*-----------------------------------.
2487 | yyabortlab -- YYABORT comes here. |
2488 `-----------------------------------*/
2489 yyabortlab:
2490 yyresult = 1;
2491 goto yyreturn;
2492
2493 #if !defined yyoverflow || YYERROR_VERBOSE
2494 /*-------------------------------------------------.
2495 | yyexhaustedlab -- memory exhaustion comes here. |
2496 `-------------------------------------------------*/
2497 yyexhaustedlab:
2498 yyerror (YY_("memory exhausted"));
2499 yyresult = 2;
2500 /* Fall through. */
2501 #endif
2502
2503 yyreturn:
2504 if (yychar != YYEMPTY)
2505 {
2506 /* Make sure we have latest lookahead translation. See comments at
2507 user semantic actions for why this is necessary. */
2508 yytoken = YYTRANSLATE (yychar);
2509 yydestruct ("Cleanup: discarding lookahead",
2510 yytoken, &yylval);
2511 }
2512 /* Do not reclaim the symbols of the rule whose action triggered
2513 this YYABORT or YYACCEPT. */
2514 YYPOPSTACK (yylen);
2515 YY_STACK_PRINT (yyss, yyssp);
2516 while (yyssp != yyss)
2517 {
2518 yydestruct ("Cleanup: popping",
2519 yystos[*yyssp], yyvsp);
2520 YYPOPSTACK (1);
2521 }
2522 #ifndef yyoverflow
2523 if (yyss != yyssa)
2524 YYSTACK_FREE (yyss);
2525 #endif
2526 #if YYERROR_VERBOSE
2527 if (yymsg != yymsgbuf)
2528 YYSTACK_FREE (yymsg);
2529 #endif
2530 return yyresult;
2531 }
2532 #line 685 "config-parser.y" /* yacc.c:1903 */
2533

Properties

Name Value
svn:eol-style native
svn:keywords Id