ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config-parser.c
Revision: 5274
Committed: Thu Jan 1 20:00:33 2015 UTC (10 years, 7 months ago) by michael
Content type: text/x-csrc
File size: 77999 byte(s)
Log Message:
- Renamed MyMalloc() to xcalloc()

File Contents

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

Properties

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