ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config-parser.c
Revision: 8582
Committed: Sun Oct 14 16:59:59 2018 UTC (6 years, 10 months ago) by michael
Content type: text/x-csrc
File size: 82454 byte(s)
Log Message:
- Further cleanups to node allocation handling

File Contents

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

Properties

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