/* A Bison parser, made from conf_yacc.y
by GNU bison 1.35. */
#define YYBISON 1 /* Identify Bison output. */
#define yyparse conf_parse
#define yylex conf_lex
#define yyerror conf_error
#define yylval conf_lval
#define yychar conf_char
#define yydebug conf_debug
#define yynerrs conf_nerrs
# define TNUMBER 257
# define ADDR 258
# define IPADDR 259
# define IP6ADDR 260
# define CIDR 261
# define FROM 262
# define RCPT 263
# define EMAIL 264
# define PEER 265
# define AUTOWHITE 266
# define GREYLIST 267
# define NOAUTH 268
# define NOACCESSDB 269
# define EXTENDEDREGEX 270
# define NOSPF 271
# define QUIET 272
# define TESTMODE 273
# define VERBOSE 274
# define PIDFILE 275
# define GLDUMPFILE 276
# define QSTRING 277
# define TDELAY 278
# define SUBNETMATCH 279
# define SUBNETMATCH6 280
# define SOCKET 281
# define USER 282
# define NODETACH 283
# define REGEX 284
# define REPORT 285
# define NONE 286
# define DELAYS 287
# define NODELAYS 288
# define ALL 289
# define LAZYAW 290
# define GLDUMPFREQ 291
# define GLTIMEOUT 292
# define DOMAIN 293
# define DOMAINNAME 294
# define SYNCADDR 295
# define SYNCSRCADDR 296
# define PORT 297
# define ACL 298
# define WHITELIST 299
# define DEFAULT 300
# define STAR 301
# define DELAYEDREJECT 302
# define DB 303
# define NODRAC 304
# define DRAC 305
# define DUMP_NO_TIME_TRANSLATION 306
# define LOGEXPIRED 307
# define GLXDELAY 308
# define DNSRBL 309
# define LIST 310
# define OPENLIST 311
# define CLOSELIST 312
# define BLACKLIST 313
# define FLUSHADDR 314
# define CODE 315
# define ECODE 316
# define MSG 317
# define SM_MACRO 318
# define UNSET 319
#line 3 "conf_yacc.y"
#include "config.h"
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#ifdef __RCSID
__RCSID("$Id: conf_yacc.y,v 1.59.2.2 2006/09/20 07:38:24 manu Exp $");
#endif
#endif
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <sysexits.h>
#include "conf.h"
#include "acl.h"
#include "sync.h"
#include "list.h"
#include "macro.h"
#ifdef USE_DNSRBL
#include "dnsrbl.h"
#endif
#include "milter-greylist.h"
#define LEN4 sizeof(struct sockaddr_in)
#define IP4TOSTRING(ip4, str) iptostring(SA(&(ip4)), LEN4, (str), IPADDRSTRLEN)
#define LEN6 sizeof(struct sockaddr_in6)
#define IP6TOSTRING(ip6, str) iptostring(SA(&(ip6)), LEN6, (str), IPADDRSTRLEN)
int conf_lex(void);
void conf_error(char *);
#line 38 "conf_yacc.y"
#ifndef YYSTYPE
typedef union {
struct sockaddr_in ipaddr;
#ifdef AF_INET6
struct sockaddr_in6 ip6addr;
#else
struct sockaddr_in ip6addr; /* XXX: for dummy */
#endif
int cidr;
char email[ADDRLEN + 1];
char domainname[ADDRLEN + 1];
char qstring[QSTRLEN + 1];
char delay[NUMLEN + 1];
char regex[REGEXLEN + 1];
} yystype;
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#define YYFINAL 286
#define YYFLAG -32768
#define YYNTBASE 67
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 319 ? yytranslate[x] : 141)
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
static const char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
66, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65
};
#if YYDEBUG
static const short yyprhs[] =
{
0, 0, 4, 8, 12, 16, 20, 24, 28, 32,
36, 40, 44, 48, 52, 56, 60, 64, 68, 72,
76, 80, 84, 88, 92, 96, 100, 104, 108, 112,
116, 120, 124, 128, 132, 136, 140, 144, 148, 152,
156, 159, 160, 164, 167, 171, 174, 177, 180, 183,
186, 189, 192, 195, 198, 201, 204, 207, 210, 213,
215, 217, 219, 221, 223, 225, 227, 229, 231, 233,
235, 237, 240, 243, 246, 249, 252, 255, 258, 261,
264, 267, 270, 273, 276, 279, 282, 285, 288, 293,
298, 303, 306, 309, 312, 317, 322, 327, 331, 335,
339, 341, 343, 346, 348, 351, 353, 355, 358, 360,
362, 364, 366, 368, 370, 372, 374, 376, 378, 380,
383, 385, 387, 389, 391, 393, 395, 398, 401, 403,
406, 409, 412, 415, 418, 421, 424, 427, 430, 433,
436, 439, 443, 446, 450, 453, 457, 459, 464, 466,
468, 470, 475, 480, 485, 489, 494, 499, 504, 509,
514, 519, 521, 524, 526, 528, 530, 533, 535, 537,
539, 542, 544, 546, 549, 552, 554, 557
};
static const short yyrhs[] =
{
67, 68, 66, 0, 67, 69, 66, 0, 67, 70,
66, 0, 67, 71, 66, 0, 67, 72, 66, 0,
67, 73, 66, 0, 67, 74, 66, 0, 67, 75,
66, 0, 67, 78, 66, 0, 67, 79, 66, 0,
67, 81, 66, 0, 67, 82, 66, 0, 67, 83,
66, 0, 67, 84, 66, 0, 67, 85, 66, 0,
67, 86, 66, 0, 67, 87, 66, 0, 67, 76,
66, 0, 67, 77, 66, 0, 67, 90, 66, 0,
67, 91, 66, 0, 67, 92, 66, 0, 67, 93,
66, 0, 67, 94, 66, 0, 67, 95, 66, 0,
67, 88, 66, 0, 67, 89, 66, 0, 67, 96,
66, 0, 67, 97, 66, 0, 67, 98, 66, 0,
67, 99, 66, 0, 67, 100, 66, 0, 67, 101,
66, 0, 67, 125, 66, 0, 67, 126, 66, 0,
67, 80, 66, 0, 67, 127, 66, 0, 67, 128,
66, 0, 67, 132, 66, 0, 67, 66, 0, 0,
4, 5, 7, 0, 4, 5, 0, 4, 6, 7,
0, 4, 6, 0, 8, 10, 0, 9, 10, 0,
8, 30, 0, 9, 30, 0, 39, 40, 0, 39,
30, 0, 11, 5, 0, 11, 6, 0, 11, 40,
0, 12, 24, 0, 12, 3, 0, 13, 24, 0,
13, 3, 0, 20, 0, 52, 0, 53, 0, 18,
0, 14, 0, 15, 0, 16, 0, 17, 0, 48,
0, 19, 0, 29, 0, 36, 0, 21, 23, 0,
22, 23, 0, 25, 7, 0, 26, 7, 0, 27,
23, 0, 28, 23, 0, 31, 32, 0, 31, 33,
0, 31, 34, 0, 31, 35, 0, 37, 24, 0,
37, 3, 0, 38, 24, 0, 38, 3, 0, 41,
47, 0, 41, 5, 0, 41, 6, 0, 41, 47,
43, 3, 0, 41, 5, 43, 3, 0, 41, 6,
43, 3, 0, 42, 47, 0, 42, 5, 0, 42,
6, 0, 42, 47, 43, 3, 0, 42, 5, 43,
3, 0, 42, 6, 43, 3, 0, 44, 13, 102,
0, 44, 45, 102, 0, 44, 59, 102, 0, 103,
0, 104, 0, 46, 107, 0, 46, 0, 105, 107,
0, 105, 0, 106, 0, 105, 106, 0, 115, 0,
116, 0, 117, 0, 118, 0, 119, 0, 120, 0,
124, 0, 121, 0, 122, 0, 123, 0, 108, 0,
107, 108, 0, 109, 0, 110, 0, 112, 0, 113,
0, 114, 0, 111, 0, 54, 24, 0, 12, 24,
0, 60, 0, 61, 23, 0, 62, 23, 0, 63,
23, 0, 8, 10, 0, 8, 30, 0, 9, 10,
0, 9, 30, 0, 39, 40, 0, 39, 30, 0,
55, 23, 0, 64, 23, 0, 56, 23, 0, 4,
5, 7, 0, 4, 5, 0, 4, 6, 7, 0,
4, 6, 0, 51, 49, 23, 0, 50, 0, 55,
23, 40, 5, 0, 129, 0, 130, 0, 131, 0,
64, 23, 23, 23, 0, 64, 23, 23, 30, 0,
64, 23, 23, 65, 0, 56, 23, 123, 0, 8,
57, 133, 58, 0, 9, 57, 133, 58, 0, 39,
57, 135, 58, 0, 55, 57, 137, 58, 0, 64,
57, 137, 58, 0, 4, 57, 139, 58, 0, 134,
0, 133, 134, 0, 10, 0, 30, 0, 136, 0,
135, 136, 0, 40, 0, 30, 0, 138, 0, 137,
138, 0, 23, 0, 140, 0, 139, 140, 0, 5,
7, 0, 5, 0, 6, 7, 0, 6, 0
};
#endif
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
0, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 105, 110, 115, 126, 138, 143, 152, 157,
165, 170, 175, 186, 203, 213, 217, 222, 226, 231,
233, 235, 237, 239, 241, 243, 245, 247, 249, 251,
253, 255, 260, 265, 269, 279, 284, 289, 290, 291,
292, 294, 297, 301, 304, 308, 312, 321, 335, 341,
352, 370, 374, 383, 397, 403, 414, 432, 435, 438,
443, 444, 452, 452, 453, 453, 455, 456, 459, 460,
461, 462, 463, 464, 465, 466, 467, 468, 471, 472,
475, 476, 477, 478, 479, 480, 483, 486, 489, 491,
497, 503, 509, 512, 515, 518, 521, 524, 527, 540,
547, 553, 557, 561, 571, 582, 593, 596, 610, 610,
610, 612, 623, 632, 641, 649, 651, 653, 655, 657,
659, 663, 664, 667, 668, 671, 672, 675, 676, 679,
680, 683, 691, 692, 695, 699, 703, 713
};
#endif
#if (YYDEBUG) || defined YYERROR_VERBOSE
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
"$", "error", "$undefined.", "TNUMBER", "ADDR", "IPADDR", "IP6ADDR",
"CIDR", "FROM", "RCPT", "EMAIL", "PEER", "AUTOWHITE", "GREYLIST",
"NOAUTH", "NOACCESSDB", "EXTENDEDREGEX", "NOSPF", "QUIET", "TESTMODE",
"VERBOSE", "PIDFILE", "GLDUMPFILE", "QSTRING", "TDELAY", "SUBNETMATCH",
"SUBNETMATCH6", "SOCKET", "USER", "NODETACH", "REGEX", "REPORT", "NONE",
"DELAYS", "NODELAYS", "ALL", "LAZYAW", "GLDUMPFREQ", "GLTIMEOUT",
"DOMAIN", "DOMAINNAME", "SYNCADDR", "SYNCSRCADDR", "PORT", "ACL",
"WHITELIST", "DEFAULT", "STAR", "DELAYEDREJECT", "DB", "NODRAC", "DRAC",
"DUMP_NO_TIME_TRANSLATION", "LOGEXPIRED", "GLXDELAY", "DNSRBL", "LIST",
"OPENLIST", "CLOSELIST", "BLACKLIST", "FLUSHADDR", "CODE", "ECODE",
"MSG", "SM_MACRO", "UNSET", "'\\n'", "lines", "netblock", "fromaddr",
"rcptaddr", "fromregex", "rcptregex", "domainaddr", "domainregex",
"peeraddr", "autowhite", "greylist", "verbose",
"dump_no_time_translation", "logexpired", "quiet", "noauth",
"noaccessdb", "extendedregex", "nospf", "delayedreject", "testmode",
"nodetach", "lazyaw", "pidfile", "dumpfile", "subnetmatch",
"subnetmatch6", "socket", "user", "report", "dumpfreq", "timeout",
"syncaddr", "syncsrcaddr", "access_list", "acl_entry",
"acl_default_entry", "acl_plain_entry", "acl_clauses", "acl_clause",
"acl_values", "acl_value", "greylist_value", "autowhite_value",
"flush_value", "code_value", "ecode_value", "msg_value",
"fromaddr_clause", "fromregex_clause", "rcptaddr_clause",
"rcptregex_clause", "domainaddr_clause", "domainregex_clause",
"dnsrbl_clause", "macro_clause", "list_clause", "netblock_clause",
"dracdb", "nodrac", "dnsrbldef", "macrodef", "macrodef_string",
"macrodef_regex", "macrodef_unset", "listdef", "email_list",
"email_item", "domain_list", "domain_item", "qstring_list",
"qstring_item", "addr_list", "addr_item", 0
};
#endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
0, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
67, 67, 68, 68, 68, 68, 69, 70, 71, 72,
73, 74, 75, 75, 75, 76, 76, 77, 77, 78,
79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
89, 90, 91, 92, 93, 94, 95, 96, 96, 96,
96, 97, 97, 98, 98, 99, 99, 99, 99, 99,
99, 100, 100, 100, 100, 100, 100, 101, 101, 101,
102, 102, 103, 103, 104, 104, 105, 105, 106, 106,
106, 106, 106, 106, 106, 106, 106, 106, 107, 107,
108, 108, 108, 108, 108, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
123, 124, 124, 124, 124, 125, 126, 127, 128, 128,
128, 129, 130, 131, 132, 123, 123, 123, 123, 123,
123, 133, 133, 134, 134, 135, 135, 136, 136, 137,
137, 138, 139, 139, 140, 140, 140, 140
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
0, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2, 0, 3, 2, 3, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 4, 4,
4, 2, 2, 2, 4, 4, 4, 3, 3, 3,
1, 1, 2, 1, 2, 1, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 3, 2, 3, 2, 3, 1, 4, 1, 1,
1, 4, 4, 4, 3, 4, 4, 4, 4, 4,
4, 1, 2, 1, 1, 1, 2, 1, 1, 1,
2, 1, 1, 2, 2, 1, 2, 1
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
static const short yydefact[] =
{
41, 0, 0, 0, 0, 0, 0, 0, 63, 64,
65, 66, 62, 68, 59, 0, 0, 0, 0, 0,
0, 69, 0, 70, 0, 0, 0, 0, 0, 0,
67, 146, 0, 60, 61, 0, 0, 0, 40, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 148, 149, 150,
0, 43, 45, 46, 48, 47, 49, 52, 53, 54,
56, 55, 58, 57, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 82, 81, 84, 83, 51, 50,
86, 87, 85, 92, 93, 91, 0, 0, 0, 0,
0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
8, 18, 19, 9, 10, 36, 11, 12, 13, 14,
15, 16, 17, 26, 27, 20, 21, 22, 23, 24,
25, 28, 29, 30, 31, 32, 33, 34, 35, 37,
38, 39, 42, 44, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 103, 0, 0, 0, 97, 100,
101, 105, 106, 108, 109, 110, 111, 112, 113, 115,
116, 117, 114, 98, 99, 145, 0, 0, 0, 0,
0, 0, 0, 154, 0, 89, 90, 88, 95, 96,
94, 142, 144, 0, 132, 133, 0, 134, 135, 0,
137, 136, 0, 0, 0, 128, 0, 0, 0, 102,
118, 120, 121, 125, 122, 123, 124, 138, 0, 140,
139, 0, 107, 104, 147, 151, 152, 153, 141, 143,
175, 177, 0, 172, 163, 164, 0, 161, 0, 168,
167, 0, 165, 127, 126, 129, 130, 131, 119, 171,
0, 169, 0, 174, 176, 160, 173, 155, 162, 156,
157, 166, 158, 170, 159, 0, 0
};
static const short yydefgoto[] =
{
1, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 178, 179, 180, 181, 182,
229, 230, 231, 232, 233, 234, 235, 236, 183, 184,
185, 186, 187, 188, 189, 190, 191, 192, 73, 74,
75, 76, 77, 78, 79, 80, 256, 257, 261, 262,
270, 271, 252, 253
};
static const short yypact[] =
{
-32768, 0, 140, 53, 110, 112, 119, 120,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, -21, -17, 3, 68, 56,
76,-32768, 123,-32768, 125, 127, 102, 40, 92, 57,
-32768,-32768, 66,-32768,-32768, 114, 141, 142,-32768, 65,
97, 100, 101, 103, 104, 105, 106, 107, 109, 111,
113, 115, 116, 117, 118, 121, 122, 126, 128, 129,
130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
143, 144, 145, 146, 147, 148, 149,-32768,-32768,-32768,
150, 161, 167,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
163, 164, 165, 174, 175, 176, 26, 26, 26, 153,
151, 69, 155,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 177, 182, 183, 186, 187, 190,
27, 39, 70, 96, 31, 78, 197, 84,-32768,-32768,
-32768, 50,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 216, 93, 166, 168,
169, 170, 171,-32768, 38,-32768,-32768,-32768,-32768,-32768,
-32768, 215, 217, 154,-32768,-32768, 124,-32768,-32768, 124,
-32768,-32768, 108, 205, 206,-32768, 208, 209, 210, 31,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 211,-32768,
-32768, 211,-32768, 31,-32768,-32768,-32768,-32768,-32768,-32768,
228, 229, 18,-32768,-32768,-32768, 30,-32768, 37,-32768,
-32768, 89,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
51,-32768, 63,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, 237,-32768
};
static const short yypgoto[] =
{
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, 44,-32768,-32768,-32768, 58,
59, -172,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 152,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 19, -255,-32768, -20,
1, -265,-32768, -9
};
#define YYLAST 273
static const short yytable[] =
{
285, 278, 94, 278, 2, 283, 95, 283, 3, 4,
96, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 250, 251, 17, 18, 19, 20, 21,
170, 22, 211, 212, 171, 172, 23, 24, 25, 26,
254, 27, 28, 223, 29, 110, 111, 254, 30, 214,
31, 32, 33, 34, 170, 35, 36, 268, 171, 172,
255, 245, 223, 83, 37, 173, 38, 255, 246, 215,
116, 268, 174, 197, 269, 97, 275, 198, 199, 98,
217, 175, 176, 84, 213, 224, 269, 112, 277, 173,
177, 225, 226, 227, 228, 279, 216, 113, 114, 99,
218, 237, 117, 247, 224, 175, 176, 240, 200, 282,
225, 226, 227, 228, 177, 119, 118, 87, 88, 259,
85, 284, 90, 92, 201, 176, 220, 219, 104, 260,
106, 123, 108, 202, 254, 238, 221, 120, 259, 115,
86, 241, 109, 91, 93, 81, 82, 280, 260, 105,
213, 107, 89, 222, 255, 100, 101, 102, 103, 250,
251, 193, 194, 124, 121, 122, 125, 126, 162, 127,
128, 129, 130, 131, 163, 132, 195, 133, 204, 134,
205, 135, 136, 137, 138, 206, 207, 139, 140, 208,
209, 196, 141, 210, 142, 143, 144, 145, 146, 147,
148, 149, 150, 151, 152, 153, 164, 165, 166, 154,
155, 156, 157, 158, 159, 160, 161, 167, 168, 169,
239, 244, 248, 216, 249, 219, 222, 238, 241, 263,
264, 265, 266, 267, 269, 273, 274, 286, 258, 242,
243, 281, 272, 276, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 203
};
static const short yycheck[] =
{
0, 256, 23, 258, 4, 270, 23, 272, 8, 9,
7, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 5, 6, 25, 26, 27, 28, 29,
4, 31, 5, 6, 8, 9, 36, 37, 38, 39,
10, 41, 42, 12, 44, 5, 6, 10, 48, 10,
50, 51, 52, 53, 4, 55, 56, 229, 8, 9,
30, 23, 12, 10, 64, 39, 66, 30, 30, 30,
13, 243, 46, 4, 23, 7, 58, 8, 9, 23,
10, 55, 56, 30, 57, 54, 23, 47, 58, 39,
64, 60, 61, 62, 63, 58, 57, 5, 6, 23,
30, 23, 45, 65, 54, 55, 56, 23, 39, 58,
60, 61, 62, 63, 64, 49, 59, 5, 6, 30,
10, 58, 3, 3, 55, 56, 30, 57, 3, 40,
3, 66, 30, 64, 10, 57, 40, 23, 30, 47,
30, 57, 40, 24, 24, 5, 6, 58, 40, 24,
57, 24, 40, 57, 30, 32, 33, 34, 35, 5,
6, 117, 118, 66, 23, 23, 66, 66, 7, 66,
66, 66, 66, 66, 7, 66, 23, 66, 23, 66,
3, 66, 66, 66, 66, 3, 3, 66, 66, 3,
3, 40, 66, 3, 66, 66, 66, 66, 66, 66,
66, 66, 66, 66, 66, 66, 43, 43, 43, 66,
66, 66, 66, 66, 66, 66, 66, 43, 43, 43,
23, 5, 7, 57, 7, 57, 57, 57, 57, 24,
24, 23, 23, 23, 23, 7, 7, 0, 219, 181,
181, 261, 241, 252, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 121
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/local/share/bison/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* This is the parser code that is written into each bison parser when
the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short yyss;
YYSTYPE yyvs;
# if YYLSP_NEEDED
YYLTYPE yyls;
# endif
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# if YYLSP_NEEDED
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
# else
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
# endif
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
register YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (0)
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ \
yyerror ("syntax error: cannot back up"); \
YYERROR; \
} \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run).
When YYLLOC_DEFAULT is run, CURRENT is set the location of the
first token. By default, to implement support for ranges, extend
its range to the last symbol. */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#if YYPURE
# if YYLSP_NEEDED
# ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
# else
# define YYLEX yylex (&yylval, &yylloc)
# endif
# else /* !YYLSP_NEEDED */
# ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
# else
# define YYLEX yylex (&yylval)
# endif
# endif /* !YYLSP_NEEDED */
#else /* !YYPURE */
# define YYLEX yylex ()
#endif /* !YYPURE */
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
#ifdef YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
static YYSIZE_T
# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
# else
yystrlen (yystr)
const char *yystr;
# endif
{
register const char *yys = yystr;
while (*yys++ != '\0')
continue;
return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
static char *
# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
# else
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
# endif
{
register char *yyd = yydest;
register const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
#endif
#line 315 "/usr/local/share/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
# define YYPARSE_PARAM_DECL
# else
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
# ifdef YYPARSE_PARAM
int yyparse (void *);
# else
int yyparse (void);
# endif
#endif
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
variables are global, or local to YYPARSE. */
#define YY_DECL_NON_LSP_VARIABLES \
/* The lookahead symbol. */ \
int yychar; \
\
/* The semantic value of the lookahead symbol. */ \
YYSTYPE yylval; \
\
/* Number of parse errors so far. */ \
int yynerrs;
#if YYLSP_NEEDED
# define YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES \
\
/* Location data for the lookahead symbol. */ \
YYLTYPE yylloc;
#else
# define YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES
#endif
/* If nonreentrant, generate the variables here. */
#if !YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
int
yyparse (YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
/* If reentrant, generate the variables here. */
#if YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
register int yystate;
register int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
int yychar1 = 0;
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp;
#if YYLSP_NEEDED
/* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#endif
#if YYLSP_NEEDED
# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK (yyvsp--, yyssp--)
#endif
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYLSP_NEEDED
YYLTYPE yyloc;
#endif
/* When reducing, the number of symbols on the RHS of the reduced
rule. */
int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
#if YYLSP_NEEDED
yylsp = yyls;
#endif
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks.
*/
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. */
# if YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
yyls = yyls1;
# else
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
# endif
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyoverflowlab;
# else
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
goto yyoverflowlab;
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
{
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyoverflowlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
# if YYLSP_NEEDED
YYSTACK_RELOCATE (yyls);
# endif
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
yylsp = yyls + yysize - 1;
#endif
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yychar1 = YYTRANSLATE (yychar);
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
YYFPRINTF (stderr, "Next token is %d (%s",
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
# endif
YYFPRINTF (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
yystate = yyn;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to the semantic value of
the lookahead token. This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
#if YYLSP_NEEDED
/* Similarly for the default location. Let the user run additional
commands if for instance locations are ranges. */
yyloc = yylsp[1-yylen];
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables which
are defined only if `YYDEBUG' is set. */
if (yydebug)
{
int yyi;
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 42:
#line 105 "conf_yacc.y"
{
acl_add_netblock(SA(&yyvsp[-1].ipaddr),
sizeof(struct sockaddr_in), yyvsp[0].cidr);
acl_register_entry_first(A_WHITELIST);
}
break;
case 43:
#line 110 "conf_yacc.y"
{
acl_add_netblock(SA(&yyvsp[0].ipaddr),
sizeof(struct sockaddr_in), 32);
acl_register_entry_first(A_WHITELIST);
}
break;
case 44:
#line 115 "conf_yacc.y"
{
#ifdef AF_INET6
acl_add_netblock(SA(&yyvsp[-1].ip6addr),
sizeof(struct sockaddr_in6), yyvsp[0].cidr);
acl_register_entry_first(A_WHITELIST);
#else
mg_log(LOG_INFO,
"IPv6 is not supported, ignore line %d",
conf_line);
#endif
}
break;
case 45:
#line 126 "conf_yacc.y"
{
#ifdef AF_INET6
acl_add_netblock(SA(&yyvsp[0].ip6addr),
sizeof(struct sockaddr_in6), 128);
acl_register_entry_first(A_WHITELIST);
#else
mg_log(LOG_INFO,
"IPv6 is not supported, ignore line %d",
conf_line);
#endif
}
break;
case 46:
#line 138 "conf_yacc.y"
{
acl_add_from(yyvsp[0].email);
acl_register_entry_first(A_WHITELIST);
}
break;
case 47:
#line 143 "conf_yacc.y"
{
acl_add_rcpt(yyvsp[0].email);
if (conf.c_testmode)
acl_register_entry_first(A_GREYLIST);
else
acl_register_entry_first(A_WHITELIST);
}
break;
case 48:
#line 152 "conf_yacc.y"
{
acl_add_from_regex(yyvsp[0].regex);
acl_register_entry_first(A_WHITELIST);
}
break;
case 49:
#line 157 "conf_yacc.y"
{
acl_add_rcpt_regex(yyvsp[0].regex);
if (conf.c_testmode)
acl_register_entry_first(A_GREYLIST);
else
acl_register_entry_first(A_WHITELIST);
}
break;
case 50:
#line 165 "conf_yacc.y"
{
acl_add_domain(yyvsp[0].domainname);
acl_register_entry_first(A_WHITELIST);
}
break;
case 51:
#line 170 "conf_yacc.y"
{
acl_add_domain_regex(yyvsp[0].regex);
acl_register_entry_first(A_WHITELIST);
}
break;
case 52:
#line 175 "conf_yacc.y"
{
char addr[IPADDRSTRLEN];
if (IP4TOSTRING(yyvsp[0].ipaddr, addr) == NULL) {
mg_log(LOG_ERR,
"invalid IPv4 address line %d",
conf_line);
exit(EX_DATAERR);
}
peer_add(addr);
}
break;
case 53:
#line 186 "conf_yacc.y"
{
#ifdef AF_INET6
char addr[IPADDRSTRLEN];
if (IP6TOSTRING(yyvsp[0].ip6addr, addr) == NULL) {
mg_log(LOG_ERR,
"invalid IPv6 address line %d",
conf_line);
exit(EX_DATAERR);
}
peer_add(addr);
#else
mg_log(LOG_INFO,
"IPv6 is not supported, ignore line %d",
conf_line);
#endif
}
break;
case 54:
#line 203 "conf_yacc.y"
{
#ifdef HAVE_GETADDRINFO
peer_add(yyvsp[0].domainname);
#else
mg_log(LOG_INFO,
"FQDN in peer is not supported, "
"ignore line %d", conf_line);
#endif
}
break;
case 55:
#line 213 "conf_yacc.y"
{ if (C_NOTFORCED(C_AUTOWHITE))
conf.c_autowhite_validity =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 56:
#line 217 "conf_yacc.y"
{ if (C_NOTFORCED(C_AUTOWHITE))
conf.c_autowhite_validity =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 57:
#line 222 "conf_yacc.y"
{ if (C_NOTFORCED(C_DELAY))
conf.c_delay =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 58:
#line 226 "conf_yacc.y"
{ if (C_NOTFORCED(C_DELAY))
conf.c_delay =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 59:
#line 231 "conf_yacc.y"
{ if (C_NOTFORCED(C_DEBUG)) conf.c_debug = 1; }
break;
case 60:
#line 233 "conf_yacc.y"
{ conf.c_dump_no_time_translation = 1; }
break;
case 61:
#line 235 "conf_yacc.y"
{ conf.c_logexpired = 1; }
break;
case 62:
#line 237 "conf_yacc.y"
{ if (C_NOTFORCED(C_QUIET)) conf.c_quiet = 1; }
break;
case 63:
#line 239 "conf_yacc.y"
{ if (C_NOTFORCED(C_NOAUTH)) conf.c_noauth = 1; }
break;
case 64:
#line 241 "conf_yacc.y"
{ conf.c_noaccessdb = 1; }
break;
case 65:
#line 243 "conf_yacc.y"
{ conf.c_extendedregex = 1; }
break;
case 66:
#line 245 "conf_yacc.y"
{ if (C_NOTFORCED(C_NOSPF)) conf.c_nospf = 1; }
break;
case 67:
#line 247 "conf_yacc.y"
{ conf.c_delayedreject = 1; }
break;
case 68:
#line 249 "conf_yacc.y"
{ if (C_NOTFORCED(C_TESTMODE)) conf.c_testmode = 1; }
break;
case 69:
#line 251 "conf_yacc.y"
{ if (C_NOTFORCED(C_NODETACH)) conf_nodetach = 1; }
break;
case 70:
#line 253 "conf_yacc.y"
{ if (C_NOTFORCED(C_LAZYAW)) conf.c_lazyaw = 1; }
break;
case 71:
#line 255 "conf_yacc.y"
{ if (C_NOTFORCED(C_PIDFILE))
conf.c_pidfile =
quotepath(c_pidfile, yyvsp[0].qstring, QSTRLEN);
}
break;
case 72:
#line 260 "conf_yacc.y"
{ if (C_NOTFORCED(C_DUMPFILE))
conf.c_dumpfile =
quotepath(c_dumpfile, yyvsp[0].qstring, QSTRLEN);
}
break;
case 73:
#line 265 "conf_yacc.y"
{ if (C_NOTFORCED(C_MATCHMASK))
prefix2mask4(yyvsp[0].cidr, &conf.c_match_mask);
}
break;
case 74:
#line 269 "conf_yacc.y"
{
#ifdef AF_INET6
if (C_NOTFORCED(C_MATCHMASK6))
prefix2mask6(yyvsp[0].cidr, &conf.c_match_mask6);
#else
mg_log(LOG_INFO, "IPv6 is not supported, "
"ignore line %d", conf_line);
#endif
}
break;
case 75:
#line 279 "conf_yacc.y"
{ if (C_NOTFORCED(C_SOCKET))
conf.c_socket =
quotepath(c_socket, yyvsp[0].qstring, QSTRLEN);
}
break;
case 76:
#line 284 "conf_yacc.y"
{ if (C_NOTFORCED(C_USER))
conf.c_user =
quotepath(c_user, yyvsp[0].qstring, QSTRLEN);
}
break;
case 77:
#line 289 "conf_yacc.y"
{ conf.c_report = C_GLNONE; }
break;
case 78:
#line 290 "conf_yacc.y"
{ conf.c_report = C_DELAYS; }
break;
case 79:
#line 291 "conf_yacc.y"
{ conf.c_report = C_NODELAYS; }
break;
case 80:
#line 292 "conf_yacc.y"
{ conf.c_report = C_ALL; }
break;
case 81:
#line 294 "conf_yacc.y"
{ conf.c_dumpfreq =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 82:
#line 297 "conf_yacc.y"
{ conf.c_dumpfreq =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 83:
#line 301 "conf_yacc.y"
{ conf.c_timeout =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 84:
#line 304 "conf_yacc.y"
{ conf.c_timeout =
(time_t)humanized_atoi(yyvsp[0].delay);
}
break;
case 85:
#line 308 "conf_yacc.y"
{
conf.c_syncaddr = NULL;
conf.c_syncport = NULL;
}
break;
case 86:
#line 312 "conf_yacc.y"
{
if (IP4TOSTRING(yyvsp[0].ipaddr, c_syncaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv4 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncaddr = c_syncaddr;
conf.c_syncport = NULL;
}
break;
case 87:
#line 321 "conf_yacc.y"
{
#ifdef AF_INET6
if (IP6TOSTRING(yyvsp[0].ip6addr, c_syncaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv6 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncaddr = c_syncaddr;
conf.c_syncport = NULL;
#else /* AF_INET6 */
mg_log(LOG_INFO, "IPv6 is not supported, "
"ignore line %d", conf_line);
#endif /* AF_INET6 */
}
break;
case 88:
#line 335 "conf_yacc.y"
{
conf.c_syncaddr = NULL;
conf.c_syncport = c_syncport;
strncpy(conf.c_syncport, yyvsp[0].delay, NUMLEN);
conf.c_syncport[NUMLEN] = '\0';
}
break;
case 89:
#line 341 "conf_yacc.y"
{
if (IP4TOSTRING(yyvsp[-2].ipaddr, c_syncaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv4 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncaddr = c_syncaddr;
conf.c_syncport = c_syncport;
strncpy(conf.c_syncport, yyvsp[0].delay, NUMLEN);
conf.c_syncport[NUMLEN] = '\0';
}
break;
case 90:
#line 352 "conf_yacc.y"
{
#ifdef AF_INET6
if (IP6TOSTRING(yyvsp[-2].ip6addr, c_syncaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv6 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncaddr = c_syncaddr;
conf.c_syncport = c_syncport;
strncpy(conf.c_syncport, yyvsp[0].delay, NUMLEN);
conf.c_syncport[NUMLEN] = '\0';
#else /* AF_INET6 */
mg_log(LOG_INFO, "IPv6 is not supported, "
"ignore line %d", conf_line);
#endif /* AF_INET6 */
}
break;
case 91:
#line 370 "conf_yacc.y"
{
conf.c_syncsrcaddr = NULL;
conf.c_syncsrcport = NULL;
}
break;
case 92:
#line 374 "conf_yacc.y"
{
if (IP4TOSTRING(yyvsp[0].ipaddr, c_syncsrcaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv4 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncsrcaddr = c_syncsrcaddr;
conf.c_syncsrcport = NULL;
}
break;
case 93:
#line 383 "conf_yacc.y"
{
#ifdef AF_INET6
if (IP6TOSTRING(yyvsp[0].ip6addr, c_syncsrcaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv6 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncsrcaddr = c_syncsrcaddr;
conf.c_syncsrcport = NULL;
#else /* AF_INET6 */
mg_log(LOG_INFO, "IPv6 is not supported, "
"ignore line %d", conf_line);
#endif /* AF_INET6 */
}
break;
case 94:
#line 397 "conf_yacc.y"
{
conf.c_syncsrcaddr = NULL;
conf.c_syncsrcport = c_syncsrcport;
strncpy(conf.c_syncsrcport, yyvsp[0].delay, NUMLEN);
conf.c_syncsrcport[NUMLEN] = '\0';
}
break;
case 95:
#line 403 "conf_yacc.y"
{
if (IP4TOSTRING(yyvsp[-2].ipaddr, c_syncsrcaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv4 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncsrcaddr = c_syncsrcaddr;
conf.c_syncsrcport = c_syncsrcport;
strncpy(conf.c_syncsrcport, yyvsp[0].delay, NUMLEN);
conf.c_syncsrcport[NUMLEN] = '\0';
}
break;
case 96:
#line 414 "conf_yacc.y"
{
#ifdef AF_INET6
if (IP6TOSTRING(yyvsp[-2].ip6addr, c_syncsrcaddr) == NULL) {
mg_log(LOG_ERR, "invalid IPv6 address "
"line %d", conf_line);
exit(EX_DATAERR);
}
conf.c_syncsrcaddr = c_syncsrcaddr;
conf.c_syncsrcport = c_syncsrcport;
strncpy(conf.c_syncsrcport, yyvsp[0].delay, NUMLEN);
conf.c_syncsrcport[NUMLEN] = '\0';
#else /* AF_INET6 */
mg_log(LOG_INFO, "IPv6 is not supported, "
"ignore line %d", conf_line);
#endif /* AF_INET6 */
}
break;
case 97:
#line 432 "conf_yacc.y"
{
acl_register_entry_last(A_GREYLIST);
}
break;
case 98:
#line 435 "conf_yacc.y"
{
acl_register_entry_last(A_WHITELIST);
}
break;
case 99:
#line 438 "conf_yacc.y"
{
acl_register_entry_last(A_BLACKLIST);
}
break;
case 100:
#line 443 "conf_yacc.y"
{ conf_acl_end = 1; }
break;
case 101:
#line 444 "conf_yacc.y"
{
if (conf_acl_end != 0)
mg_log(LOG_WARNING,
"ignored acl entry after acl "
"default rule at line %d", conf_line);
}
break;
case 126:
#line 484 "conf_yacc.y"
{ acl_add_delay((time_t)humanized_atoi(yyvsp[0].delay)); }
break;
case 127:
#line 487 "conf_yacc.y"
{ acl_add_autowhite((time_t)humanized_atoi(yyvsp[0].delay)); }
break;
case 128:
#line 489 "conf_yacc.y"
{ acl_add_flushaddr(); }
break;
case 129:
#line 491 "conf_yacc.y"
{
char code[QSTRLEN + 1];
acl_add_code(quotepath(code, yyvsp[0].qstring, QSTRLEN));
}
break;
case 130:
#line 497 "conf_yacc.y"
{
char ecode[QSTRLEN + 1];
acl_add_ecode(quotepath(ecode, yyvsp[0].qstring, QSTRLEN));
}
break;
case 131:
#line 503 "conf_yacc.y"
{
char msg[QSTRLEN + 1];
acl_add_msg(quotepath(msg, yyvsp[0].qstring, QSTRLEN));
}
break;
case 132:
#line 509 "conf_yacc.y"
{ acl_add_from (yyvsp[0].email); }
break;
case 133:
#line 512 "conf_yacc.y"
{ acl_add_from_regex (yyvsp[0].regex); }
break;
case 134:
#line 515 "conf_yacc.y"
{ acl_add_rcpt (yyvsp[0].email); }
break;
case 135:
#line 518 "conf_yacc.y"
{ acl_add_rcpt_regex (yyvsp[0].regex); }
break;
case 136:
#line 521 "conf_yacc.y"
{ acl_add_domain (yyvsp[0].domainname); }
break;
case 137:
#line 524 "conf_yacc.y"
{ acl_add_domain_regex (yyvsp[0].regex); }
break;
case 138:
#line 527 "conf_yacc.y"
{
#ifdef USE_DNSRBL
char path[QSTRLEN + 1];
acl_add_dnsrbl(quotepath(path, yyvsp[0].qstring, QSTRLEN));
#else
mg_log(LOG_INFO,
"DNSRBL support not compiled in line %d",
conf_line);
#endif
}
break;
case 139:
#line 540 "conf_yacc.y"
{
char qstring[QSTRLEN + 1];
acl_add_macro(quotepath(qstring, yyvsp[0].qstring, QSTRLEN));
}
break;
case 140:
#line 547 "conf_yacc.y"
{
char path[QSTRLEN + 1];
acl_add_list(quotepath(path, yyvsp[0].qstring, QSTRLEN));
}
break;
case 141:
#line 553 "conf_yacc.y"
{
acl_add_netblock(SA(&yyvsp[-1].ipaddr),
sizeof(struct sockaddr_in), yyvsp[0].cidr);
}
break;
case 142:
#line 557 "conf_yacc.y"
{
acl_add_netblock(SA(&yyvsp[0].ipaddr),
sizeof(struct sockaddr_in), 32);
}
break;
case 143:
#line 561 "conf_yacc.y"
{
#ifdef AF_INET6
acl_add_netblock(SA(&yyvsp[-1].ip6addr),
sizeof(struct sockaddr_in6), yyvsp[0].cidr);
#else
mg_log(LOG_INFO,
"IPv6 is not supported, ignore line %d",
conf_line);
#endif
}
break;
case 144:
#line 571 "conf_yacc.y"
{
#ifdef AF_INET6
acl_add_netblock(SA(&yyvsp[0].ip6addr),
sizeof(struct sockaddr_in6), 128);
#else
mg_log(LOG_INFO, "IPv6 is not supported, "
"ignore line %d", conf_line);
#endif
}
break;
case 145:
#line 582 "conf_yacc.y"
{
#ifdef USE_DRAC
conf.c_dracdb =
quotepath(c_dracdb, yyvsp[0].qstring, QSTRLEN);
#else
mg_log(LOG_INFO, "DRAC support not compiled "
"in line %d", conf_line);
#endif
}
break;
case 146:
#line 593 "conf_yacc.y"
{ conf.c_nodrac = 1; }
break;
case 147:
#line 596 "conf_yacc.y"
{
#ifdef USE_DNSRBL
char path[QSTRLEN + 1];
dnsrbl_source_add(quotepath(path, yyvsp[-2].qstring, QSTRLEN),
yyvsp[-1].domainname, SA(&yyvsp[0].ipaddr));
#else
mg_log(LOG_INFO,
"DNSRBL support not compiled in line %d",
conf_line);
#endif
}
break;
case 151:
#line 612 "conf_yacc.y"
{
char name[QSTRLEN + 1];
char macro[QSTRLEN + 1];
char value[QSTRLEN + 1];
macro_add_string(quotepath(name, yyvsp[-2].qstring, QSTRLEN),
quotepath(macro, yyvsp[-1].qstring, QSTRLEN),
quotepath(value, yyvsp[0].qstring, QSTRLEN));
}
break;
case 152:
#line 623 "conf_yacc.y"
{
char name[QSTRLEN + 1];
char macro[QSTRLEN + 1];
macro_add_regex(quotepath(name, yyvsp[-2].qstring, QSTRLEN),
quotepath(macro, yyvsp[-1].qstring, QSTRLEN), yyvsp[0].regex);
}
break;
case 153:
#line 632 "conf_yacc.y"
{
char name[QSTRLEN + 1];
char macro[QSTRLEN + 1];
macro_add_unset(quotepath(name, yyvsp[-2].qstring, QSTRLEN),
quotepath(macro, yyvsp[-1].qstring, QSTRLEN));
}
break;
case 154:
#line 641 "conf_yacc.y"
{
char path[QSTRLEN + 1];
all_list_setname(glist, quotepath(path, yyvsp[-1].qstring, QSTRLEN));
glist_init();
}
break;
case 155:
#line 650 "conf_yacc.y"
{ all_list_settype(glist, LT_FROM); }
break;
case 156:
#line 652 "conf_yacc.y"
{ all_list_settype(glist, LT_RCPT); }
break;
case 157:
#line 654 "conf_yacc.y"
{ all_list_settype(glist, LT_DOMAIN); }
break;
case 158:
#line 656 "conf_yacc.y"
{ all_list_settype(glist, LT_DNSRBL); }
break;
case 159:
#line 658 "conf_yacc.y"
{ all_list_settype(glist, LT_MACRO); }
break;
case 160:
#line 660 "conf_yacc.y"
{ all_list_settype(glist, LT_ADDR); }
break;
case 163:
#line 667 "conf_yacc.y"
{ list_add(glist, L_STRING, yyvsp[0].email); }
break;
case 164:
#line 668 "conf_yacc.y"
{ list_add(glist, L_REGEX, yyvsp[0].regex); }
break;
case 167:
#line 675 "conf_yacc.y"
{ list_add(glist, L_STRING, yyvsp[0].domainname); }
break;
case 168:
#line 676 "conf_yacc.y"
{ list_add(glist, L_REGEX, yyvsp[0].regex); }
break;
case 171:
#line 683 "conf_yacc.y"
{
char tmpstr[QSTRLEN + 1];
list_add(glist, L_STRING,
quotepath(tmpstr, yyvsp[0].qstring, QSTRLEN));
}
break;
case 174:
#line 695 "conf_yacc.y"
{
list_add_netblock(glist, SA(&yyvsp[-1].ipaddr),
sizeof(struct sockaddr_in), yyvsp[0].cidr);
}
break;
case 175:
#line 699 "conf_yacc.y"
{
list_add_netblock(glist, SA(&yyvsp[0].ipaddr),
sizeof(struct sockaddr_in), 32);
}
break;
case 176:
#line 703 "conf_yacc.y"
{
#ifdef AF_INET6
list_add_netblock(glist, SA(&yyvsp[-1].ip6addr),
sizeof(struct sockaddr_in6), yyvsp[0].cidr);
#else
mg_log(LOG_INFO,
"IPv6 is not supported, ignore line %d",
conf_line);
#endif
}
break;
case 177:
#line 713 "conf_yacc.y"
{
#ifdef AF_INET6
list_add_netblock(glist, SA(&yyvsp[0].ip6addr),
sizeof(struct sockaddr_in6), 128);
#else
mg_log(LOG_ERR,
"IPv6 is not supported, ignore line %d",
conf_line);
#endif
}
break;
}
#line 705 "/usr/local/share/bison/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#if YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#if YYLSP_NEEDED
*++yylsp = yyloc;
#endif
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
YYSIZE_T yysize = 0;
char *yymsg;
int yyx, yycount;
yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx)
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("parse error, unexpected ") + 1;
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
if (yycount < 5)
{
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)
if (yycheck[yyx + yyn] == yyx)
{
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yycount++;
}
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exhausted");
}
else
#endif /* defined (YYERROR_VERBOSE) */
yyerror ("parse error");
}
goto yyerrlab1;
/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
yyerrlab1:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token after shifting the error
token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
/*-------------------------------------------------------------------.
| yyerrdefault -- current state does not do anything special for the |
| error token. |
`-------------------------------------------------------------------*/
yyerrdefault:
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
/* If its default is to accept any token, ok. Otherwise pop it. */
yyn = yydefact[yystate];
if (yyn)
goto yydefault;
#endif
/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token |
`---------------------------------------------------------------*/
yyerrpop:
if (yyssp == yyss)
YYABORT;
yyvsp--;
yystate = *--yyssp;
#if YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
/*--------------.
| yyerrhandle. |
`--------------*/
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here. |
`---------------------------------------------*/
yyoverflowlab:
yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */
yyreturn:
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
return yyresult;
}
#line 724 "conf_yacc.y"
#include "conf_lex.c"
syntax highlighted by Code2HTML, v. 0.9.1