ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config-parser.c
Revision: 5665
Committed: Wed Mar 11 16:23:37 2015 UTC (10 years, 5 months ago) by michael
Content type: text/x-csrc
File size: 78902 byte(s)
Log Message:
- Rebuilt parser files

File Contents

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

Properties

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