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