/* A Bison parser, made from config-parser.y, by GNU bison 1.75.  */

/* Skeleton parser for Yacc-like parsing with 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.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* 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.  */

/* Identify Bison output.  */
#define YYBISON	1

/* Pure parsers.  */
#define YYPURE	0

/* Using locations.  */
#define YYLSP_NEEDED 0



/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     AWAY = 258,
     BAN_UNKNOWN = 259,
     BLACKLIST = 260,
     CHANNEL = 261,
     CONNREGEX = 262,
     DNS_FDLIMIT = 263,
     DNSBL_FROM = 264,
     DNSBL_TO = 265,
     EXEMPT = 266,
     FD = 267,
     INVITE = 268,
     IRC = 269,
     KLINE = 270,
     KEY = 271,
     MASK = 272,
     MAX_READ = 273,
     MODE = 274,
     NAME = 275,
     NEGCACHE = 276,
     NICK = 277,
     NICKSERV = 278,
     OPER = 279,
     OPM = 280,
     OPTIONS = 281,
     PASSWORD = 282,
     PERFORM = 283,
     PIDFILE = 284,
     PORT = 285,
     PROTOCOL = 286,
     PROTOCOLTYPE = 287,
     REALNAME = 288,
     REPLY = 289,
     SCANLOG = 290,
     SCANNER = 291,
     SENDMAIL = 292,
     SERVER = 293,
     TARGET_IP = 294,
     TARGET_PORT = 295,
     TARGET_STRING = 296,
     TIMEOUT = 297,
     TYPE = 298,
     USERNAME = 299,
     USER = 300,
     VHOST = 301,
     NUMBER = 302,
     STRING = 303
   };
#endif
#define AWAY 258
#define BAN_UNKNOWN 259
#define BLACKLIST 260
#define CHANNEL 261
#define CONNREGEX 262
#define DNS_FDLIMIT 263
#define DNSBL_FROM 264
#define DNSBL_TO 265
#define EXEMPT 266
#define FD 267
#define INVITE 268
#define IRC 269
#define KLINE 270
#define KEY 271
#define MASK 272
#define MAX_READ 273
#define MODE 274
#define NAME 275
#define NEGCACHE 276
#define NICK 277
#define NICKSERV 278
#define OPER 279
#define OPM 280
#define OPTIONS 281
#define PASSWORD 282
#define PERFORM 283
#define PIDFILE 284
#define PORT 285
#define PROTOCOL 286
#define PROTOCOLTYPE 287
#define REALNAME 288
#define REPLY 289
#define SCANLOG 290
#define SCANNER 291
#define SENDMAIL 292
#define SERVER 293
#define TARGET_IP 294
#define TARGET_PORT 295
#define TARGET_STRING 296
#define TIMEOUT 297
#define TYPE 298
#define USERNAME 299
#define USER 300
#define VHOST 301
#define NUMBER 302
#define STRING 303




/* Copy the first part of user declarations.  */
#line 25 "config-parser.y"

#include <stdio.h>
#include <string.h>
#include "malloc.h"
#include "config.h"

int yydebug=0;
void *tmp;        /* Variable to temporarily hold nodes before insertion to list */



/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#ifndef YYSTYPE
#line 82 "config-parser.y"
typedef union {
        int number;
        char *string;
} yystype;
/* Line 193 of /usr/local/share/bison/yacc.c.  */
#line 185 "config-parser.c"
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif

#ifndef YYLTYPE
typedef struct yyltype
{
  int first_line;
  int first_column;
  int last_line;
  int last_column;
} yyltype;
# define YYLTYPE yyltype
# define YYLTYPE_IS_TRIVIAL 1
#endif

/* Copy the second part of user declarations.  */


/* Line 213 of /usr/local/share/bison/yacc.c.  */
#line 206 "config-parser.c"

#if ! defined (yyoverflow) || 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) || 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;
  };

/* 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.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
      + YYSTACK_GAP_MAX)

/* 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 (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  2
#define YYLAST   281

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  54
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  74
/* YYNRULES -- Number of rules. */
#define YYNRULES  136
/* YYNRULES -- Number of states. */
#define YYNSTATES  293

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   303

#define YYTRANSLATE(X) \
  ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned char yytranslate[] =
{
       0,     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,    53,    51,
       2,    52,     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,    49,     2,    50,     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,     2,     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
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned short yyprhs[] =
{
       0,     0,     3,     4,     7,     9,    11,    13,    15,    17,
      19,    25,    26,    29,    31,    33,    35,    37,    39,    41,
      46,    51,    56,    61,    67,    70,    72,    74,    76,    78,
      80,    82,    84,    86,    88,    90,    92,    94,    96,    98,
     100,   102,   104,   109,   114,   119,   124,   129,   134,   139,
     144,   149,   154,   159,   164,   169,   174,   175,   182,   185,
     187,   189,   191,   193,   198,   203,   208,   209,   216,   219,
     221,   223,   225,   227,   232,   237,   238,   245,   248,   250,
     252,   254,   256,   258,   260,   262,   264,   266,   268,   270,
     275,   280,   285,   290,   295,   300,   305,   310,   317,   323,
     324,   327,   329,   331,   333,   335,   337,   339,   344,   349,
     354,   355,   362,   363,   366,   368,   370,   372,   374,   376,
     378,   380,   385,   390,   395,   400,   406,   407,   410,   412,
     417,   423,   424,   427,   429,   431,   433
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] =
{
      55,     0,    -1,    -1,    55,    56,    -1,    64,    -1,    57,
      -1,   107,    -1,    88,    -1,    94,    -1,   124,    -1,    26,
      49,    58,    50,    51,    -1,    -1,    58,    59,    -1,    59,
      -1,    60,    -1,    61,    -1,    62,    -1,    63,    -1,     1,
      -1,    21,    52,    47,    51,    -1,    29,    52,    48,    51,
      -1,     8,    52,    47,    51,    -1,    35,    52,    48,    51,
      -1,    14,    49,    65,    50,    51,    -1,    65,    66,    -1,
      66,    -1,    67,    -1,    80,    -1,    68,    -1,    70,    -1,
      71,    -1,    69,    -1,    72,    -1,    73,    -1,    75,    -1,
      76,    -1,    77,    -1,    78,    -1,    79,    -1,    74,    -1,
      81,    -1,     1,    -1,     3,    52,    48,    51,    -1,    15,
      52,    48,    51,    -1,    19,    52,    48,    51,    -1,    22,
      52,    48,    51,    -1,    23,    52,    48,    51,    -1,    24,
      52,    48,    51,    -1,    27,    52,    48,    51,    -1,    28,
      52,    48,    51,    -1,    30,    52,    47,    51,    -1,    33,
      52,    48,    51,    -1,    38,    52,    48,    51,    -1,    44,
      52,    48,    51,    -1,    46,    52,    48,    51,    -1,     7,
      52,    48,    51,    -1,    -1,    82,     6,    49,    83,    50,
      51,    -1,    83,    84,    -1,    84,    -1,    85,    -1,    86,
      -1,    87,    -1,    20,    52,    48,    51,    -1,    16,    52,
      48,    51,    -1,    13,    52,    48,    51,    -1,    -1,    89,
      45,    49,    90,    50,    51,    -1,    90,    91,    -1,    91,
      -1,    92,    -1,    93,    -1,     1,    -1,    17,    52,    48,
      51,    -1,    36,    52,    48,    51,    -1,    -1,    95,    36,
      49,    96,    50,    51,    -1,    96,    97,    -1,    97,    -1,
      98,    -1,    99,    -1,   102,    -1,   100,    -1,   103,    -1,
     101,    -1,   106,    -1,   104,    -1,   105,    -1,     1,    -1,
      20,    52,    48,    51,    -1,    46,    52,    48,    51,    -1,
      39,    52,    48,    51,    -1,    41,    52,    48,    51,    -1,
      12,    52,    47,    51,    -1,    40,    52,    47,    51,    -1,
      42,    52,    47,    51,    -1,    18,    52,    47,    51,    -1,
      31,    52,    32,    53,    47,    51,    -1,    25,    49,   108,
      50,    51,    -1,    -1,   108,   109,    -1,   109,    -1,   110,
      -1,   111,    -1,   112,    -1,   113,    -1,     1,    -1,     9,
      52,    48,    51,    -1,    10,    52,    48,    51,    -1,    37,
      52,    48,    51,    -1,    -1,   114,     5,    49,   115,    50,
      51,    -1,    -1,   115,   116,    -1,   116,    -1,   117,    -1,
     119,    -1,   118,    -1,   120,    -1,   121,    -1,     1,    -1,
      20,    52,    48,    51,    -1,    15,    52,    48,    51,    -1,
      43,    52,    48,    51,    -1,     4,    52,    47,    51,    -1,
      34,    49,   122,    50,    51,    -1,    -1,   122,   123,    -1,
     123,    -1,    47,    52,    48,    51,    -1,    11,    49,   125,
      50,    51,    -1,    -1,   125,   126,    -1,   126,    -1,   127,
      -1,     1,    -1,    17,    52,    48,    51,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,    93,    93,    94,    97,    97,    98,    99,   100,   101,
     107,   109,   109,   110,   113,   113,   114,   115,   116,   119,
     124,   130,   135,   143,   145,   145,   148,   148,   149,   150,
     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
     161,   162,   165,   171,   177,   183,   189,   195,   201,   207,
     215,   220,   226,   232,   238,   244,   254,   253,   271,   271,
     274,   274,   275,   278,   286,   294,   305,   304,   321,   321,
     324,   324,   325,   328,   338,   351,   350,   396,   396,   399,
     399,   400,   401,   402,   403,   404,   405,   406,   407,   410,
     417,   424,   431,   447,   453,   459,   465,   471,   490,   492,
     492,   493,   496,   496,   497,   498,   499,   502,   508,   514,
     523,   522,   542,   542,   543,   546,   546,   547,   548,   549,
     550,   553,   560,   567,   578,   584,   586,   586,   587,   590,
     608,   610,   610,   611,   614,   614,   617
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "AWAY", "BAN_UNKNOWN", "BLACKLIST", 
  "CHANNEL", "CONNREGEX", "DNS_FDLIMIT", "DNSBL_FROM", "DNSBL_TO", 
  "EXEMPT", "FD", "INVITE", "IRC", "KLINE", "KEY", "MASK", "MAX_READ", 
  "MODE", "NAME", "NEGCACHE", "NICK", "NICKSERV", "OPER", "OPM", 
  "OPTIONS", "PASSWORD", "PERFORM", "PIDFILE", "PORT", "PROTOCOL", 
  "PROTOCOLTYPE", "REALNAME", "REPLY", "SCANLOG", "SCANNER", "SENDMAIL", 
  "SERVER", "TARGET_IP", "TARGET_PORT", "TARGET_STRING", "TIMEOUT", 
  "TYPE", "USERNAME", "USER", "VHOST", "NUMBER", "STRING", "'{'", "'}'", 
  "';'", "'='", "':'", "$accept", "config", "config_items", 
  "options_entry", "options_items", "options_item", "options_negcache", 
  "options_pidfile", "options_dns_fdlimit", "options_scanlog", 
  "irc_entry", "irc_items", "irc_item", "irc_away", "irc_kline", 
  "irc_mode", "irc_nick", "irc_nickserv", "irc_oper", "irc_password", 
  "irc_perform", "irc_port", "irc_realname", "irc_server", "irc_username", 
  "irc_vhost", "irc_connregex", "channel_entry", "@1", "channel_items", 
  "channel_item", "channel_name", "channel_key", "channel_invite", 
  "user_entry", "@2", "user_items", "user_item", "user_mask", 
  "user_scanner", "scanner_entry", "@3", "scanner_items", "scanner_item", 
  "scanner_name", "scanner_vhost", "scanner_target_ip", 
  "scanner_target_string", "scanner_fd", "scanner_target_port", 
  "scanner_timeout", "scanner_max_read", "scanner_protocol", "opm_entry", 
  "opm_items", "opm_item", "opm_dnsbl_from", "opm_dnsbl_to", 
  "opm_sendmail", "opm_blacklist_entry", "@4", "blacklist_items", 
  "blacklist_item", "blacklist_name", "blacklist_kline", "blacklist_type", 
  "blacklist_ban_unknown", "blacklist_reply", "blacklist_reply_items", 
  "blacklist_reply_item", "exempt_entry", "exempt_items", "exempt_item", 
  "exempt_mask", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   123,
     125,    59,    61,    58
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    54,    55,    55,    56,    56,    56,    56,    56,    56,
      57,    58,    58,    58,    59,    59,    59,    59,    59,    60,
      61,    62,    63,    64,    65,    65,    66,    66,    66,    66,
      66,    66,    66,    66,    66,    66,    66,    66,    66,    66,
      66,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    82,    81,    83,    83,
      84,    84,    84,    85,    86,    87,    89,    88,    90,    90,
      91,    91,    91,    92,    93,    95,    94,    96,    96,    97,
      97,    97,    97,    97,    97,    97,    97,    97,    97,    98,
      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
     108,   108,   109,   109,   109,   109,   109,   110,   111,   112,
     114,   113,   115,   115,   115,   116,   116,   116,   116,   116,
     116,   117,   118,   119,   120,   121,   122,   122,   122,   123,
     124,   125,   125,   125,   126,   126,   127
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     0,     2,     1,     1,     1,     1,     1,     1,
       5,     0,     2,     1,     1,     1,     1,     1,     1,     4,
       4,     4,     4,     5,     2,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     4,     4,     4,     4,     4,     4,     4,     4,
       4,     4,     4,     4,     4,     4,     0,     6,     2,     1,
       1,     1,     1,     4,     4,     4,     0,     6,     2,     1,
       1,     1,     1,     4,     4,     0,     6,     2,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     4,
       4,     4,     4,     4,     4,     4,     4,     6,     5,     0,
       2,     1,     1,     1,     1,     1,     1,     4,     4,     4,
       0,     6,     0,     2,     1,     1,     1,     1,     1,     1,
       1,     4,     4,     4,     4,     5,     0,     2,     1,     4,
       5,     0,     2,     1,     1,     1,     4
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       2,    66,     1,     0,     0,     0,     0,     3,     5,     4,
       7,     0,     8,     0,     6,     9,     0,     0,     0,     0,
       0,     0,   135,     0,     0,   133,   134,    41,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    25,    26,    28,    31,    29,    30,    32,
      33,    39,    34,    35,    36,    37,    38,    27,    40,     0,
     106,     0,     0,     0,     0,   101,   102,   103,   104,   105,
       0,    18,     0,     0,     0,     0,     0,    13,    14,    15,
      16,    17,     0,     0,     0,     0,   132,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    24,     0,     0,     0,     0,     0,   100,     0,
       0,     0,     0,     0,     0,    12,    72,     0,     0,     0,
      69,    70,    71,    88,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    78,    79,    80,    82,    84,    81,
      83,    86,    87,    85,     0,   130,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      23,     0,     0,     0,     0,    98,     0,     0,     0,     0,
       0,    10,     0,     0,     0,    68,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    77,   136,    42,    55,
      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
      53,    54,     0,     0,     0,     0,    59,    60,    61,    62,
     107,   108,   109,   120,     0,     0,     0,     0,     0,     0,
     114,   115,   117,   116,   118,   119,    21,    19,    20,    22,
       0,     0,    67,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    76,     0,     0,     0,     0,    58,     0,     0,
       0,   126,     0,     0,   113,    73,    74,    93,    96,    89,
       0,    91,    94,    92,    95,    90,     0,     0,     0,    57,
       0,     0,     0,     0,     0,   128,     0,   111,     0,    65,
      64,    63,   124,   122,   121,     0,     0,   127,   123,    97,
       0,   125,   129
};

/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
      -1,     1,     7,     8,    76,    77,    78,    79,    80,    81,
       9,    42,    43,    44,    45,    46,    47,    48,    49,    50,
      51,    52,    53,    54,    55,    56,    57,    58,    59,   205,
     206,   207,   208,   209,    10,    11,   119,   120,   121,   122,
      12,    13,   133,   134,   135,   136,   137,   138,   139,   140,
     141,   142,   143,    14,    64,    65,    66,    67,    68,    69,
      70,   219,   220,   221,   222,   223,   224,   225,   274,   275,
      15,    24,    25,    26
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -91
static const short yypact[] =
{
     -91,   132,   -91,   -40,   -39,   -34,   -30,   -91,   -91,   -91,
     -91,   -14,   -91,    -3,   -91,   -91,    24,   107,     2,    59,
      -7,    -5,   -91,   -17,    29,   -91,   -91,   -91,    -4,     9,
      11,    19,    30,    35,    38,    43,    44,    51,    53,    55,
      63,    66,    -1,   -91,   -91,   -91,   -91,   -91,   -91,   -91,
     -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,    69,
     -91,    68,    71,    72,    67,   -91,   -91,   -91,   -91,   -91,
      86,   -91,    76,    81,    87,    89,    77,   -91,   -91,   -91,
     -91,   -91,    80,   124,    54,    60,   -91,    73,    90,    99,
     100,   101,   102,   104,   106,   108,   112,   113,   114,   119,
     121,   109,   -91,    52,   123,   125,   126,   127,   -91,    70,
     128,   129,   131,   133,   134,   -91,   -91,   120,   130,    23,
     -91,   -91,   -91,   -91,   135,   136,   137,   138,   139,   140,
     141,   142,   143,    16,   -91,   -91,   -91,   -91,   -91,   -91,
     -91,   -91,   -91,   -91,   145,   -91,   146,   147,   148,   149,
     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
     -91,     0,   160,   161,   162,   -91,    49,   163,   164,   165,
     166,   -91,   170,   171,   169,   -91,   174,   175,   176,   191,
     177,   179,   180,   182,   183,   181,   -91,   -91,   -91,   -91,
     -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,
     -91,   -91,   178,   184,   185,   -12,   -91,   -91,   -91,   -91,
     -91,   -91,   -91,   -91,   186,   187,   188,   192,   190,    50,
     -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,
     193,   194,   -91,   195,   196,   197,   198,   199,   201,   202,
     203,   204,   -91,   208,   209,   210,   211,   -91,   212,   213,
     215,   217,   218,   214,   -91,   -91,   -91,   -91,   -91,   -91,
     220,   -91,   -91,   -91,   -91,   -91,   219,   221,   222,   -91,
     223,   224,   225,   216,    39,   -91,   226,   -91,   227,   -91,
     -91,   -91,   -91,   -91,   -91,   231,   229,   -91,   -91,   -91,
     230,   -91,   -91
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
     -91,   -91,   -91,   -91,   -91,   110,   -91,   -91,   -91,   -91,
     -91,   -91,   207,   -91,   -91,   -91,   -91,   -91,   -91,   -91,
     -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,   -91,
     -28,   -91,   -91,   -91,   -91,   -91,   -91,    61,   -91,   -91,
     -91,   -91,   -91,    94,   -91,   -91,   -91,   -91,   -91,   -91,
     -91,   -91,   -91,   -91,   -91,   205,   -91,   -91,   -91,   -91,
     -91,   -91,   -36,   -91,   -91,   -91,   -91,   -91,   -91,   -90,
     -91,   -91,   236,   -91
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, parse error.  */
#define YYTABLE_NINF -132
static const short yytable[] =
{
      27,   202,    28,    60,   203,   -56,    29,   -99,   204,    16,
      17,    61,    62,   202,    30,    18,   203,   123,    31,    19,
     204,    32,    33,    34,   116,    22,    35,    36,   124,    37,
      22,    20,    38,    21,   125,    84,   126,    39,   246,    63,
     117,    23,    82,    40,    83,    41,    23,   127,    87,   101,
     213,   213,   -99,   214,   214,   128,   129,   130,   131,   118,
      71,    88,   132,    89,   215,   215,   185,    72,    60,   216,
     216,    90,  -110,   174,  -131,   103,    61,    62,    71,    85,
      73,   116,    91,   217,   217,    72,   273,    92,    74,   286,
      93,   109,   218,   218,    75,    94,    95,   117,    73,  -112,
     253,   161,   144,    96,    63,    97,    74,    98,    27,   -11,
      28,   145,    75,   -56,    29,    99,   118,   107,   100,   166,
     104,   146,    30,   105,   106,   123,    31,   114,   110,    32,
      33,    34,     2,   111,    35,    36,   124,    37,   147,   112,
      38,   113,   125,     3,   126,    39,     4,   148,   149,   150,
     151,    40,   152,    41,   153,   127,   154,     5,     6,   155,
     160,   156,   157,   128,   129,   130,   131,   158,   -75,   159,
     132,   162,   172,   163,   164,   167,   168,   247,   165,   169,
     175,   170,   173,   254,   287,   171,   115,   176,   177,   178,
     179,   180,   181,   182,   183,   184,   187,   188,   189,   190,
     191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
     201,   210,   211,   212,   226,   227,   228,   229,   230,   231,
     232,   233,   234,   236,   235,   237,   238,   186,   239,   240,
     243,   241,   242,     0,     0,     0,   244,   245,   248,   249,
     250,   251,   252,     0,   255,   256,   257,   258,   259,   102,
     261,   260,   262,   263,   264,   265,   266,   267,   268,   270,
      86,   271,   269,   272,   273,   277,   276,   278,   285,   108,
     279,     0,   280,   281,   282,   283,   284,   288,   289,   290,
     291,   292
};

static const short yycheck[] =
{
       1,    13,     3,     1,    16,     6,     7,     5,    20,    49,
      49,     9,    10,    13,    15,    49,    16,     1,    19,    49,
      20,    22,    23,    24,     1,     1,    27,    28,    12,    30,
       1,    45,    33,    36,    18,    52,    20,    38,    50,    37,
      17,    17,    49,    44,    49,    46,    17,    31,    52,    50,
       1,     1,    50,     4,     4,    39,    40,    41,    42,    36,
       1,    52,    46,    52,    15,    15,    50,     8,     1,    20,
      20,    52,     5,    50,    50,     6,     9,    10,     1,    50,
      21,     1,    52,    34,    34,     8,    47,    52,    29,    50,
      52,     5,    43,    43,    35,    52,    52,    17,    21,    50,
      50,    49,    48,    52,    37,    52,    29,    52,     1,    50,
       3,    51,    35,     6,     7,    52,    36,    50,    52,    49,
      52,    48,    15,    52,    52,     1,    19,    50,    52,    22,
      23,    24,     0,    52,    27,    28,    12,    30,    48,    52,
      33,    52,    18,    11,    20,    38,    14,    48,    48,    48,
      48,    44,    48,    46,    48,    31,    48,    25,    26,    47,
      51,    48,    48,    39,    40,    41,    42,    48,    36,    48,
      46,    48,    52,    48,    48,    47,    47,   205,    51,    48,
     119,    48,    52,   219,   274,    51,    76,    52,    52,    52,
      52,    52,    52,    52,    52,    52,    51,    51,    51,    51,
      51,    51,    51,    51,    51,    51,    51,    51,    51,    51,
      51,    51,    51,    51,    51,    51,    51,    51,    48,    48,
      51,    47,    47,    32,    48,    48,    47,   133,    48,    47,
      52,    48,    51,    -1,    -1,    -1,    52,    52,    52,    52,
      52,    49,    52,    -1,    51,    51,    51,    51,    51,    42,
      51,    53,    51,    51,    51,    51,    48,    48,    48,    47,
      24,    48,    51,    48,    47,    51,    48,    47,    52,    64,
      51,    -1,    51,    51,    51,    51,    51,    51,    51,    48,
      51,    51
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,    55,     0,    11,    14,    25,    26,    56,    57,    64,
      88,    89,    94,    95,   107,   124,    49,    49,    49,    49,
      45,    36,     1,    17,   125,   126,   127,     1,     3,     7,
      15,    19,    22,    23,    24,    27,    28,    30,    33,    38,
      44,    46,    65,    66,    67,    68,    69,    70,    71,    72,
      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
       1,     9,    10,    37,   108,   109,   110,   111,   112,   113,
     114,     1,     8,    21,    29,    35,    58,    59,    60,    61,
      62,    63,    49,    49,    52,    50,   126,    52,    52,    52,
      52,    52,    52,    52,    52,    52,    52,    52,    52,    52,
      52,    50,    66,     6,    52,    52,    52,    50,   109,     5,
      52,    52,    52,    52,    50,    59,     1,    17,    36,    90,
      91,    92,    93,     1,    12,    18,    20,    31,    39,    40,
      41,    42,    46,    96,    97,    98,    99,   100,   101,   102,
     103,   104,   105,   106,    48,    51,    48,    48,    48,    48,
      48,    48,    48,    48,    48,    47,    48,    48,    48,    48,
      51,    49,    48,    48,    48,    51,    49,    47,    47,    48,
      48,    51,    52,    52,    50,    91,    52,    52,    52,    52,
      52,    52,    52,    52,    52,    50,    97,    51,    51,    51,
      51,    51,    51,    51,    51,    51,    51,    51,    51,    51,
      51,    51,    13,    16,    20,    83,    84,    85,    86,    87,
      51,    51,    51,     1,     4,    15,    20,    34,    43,   115,
     116,   117,   118,   119,   120,   121,    51,    51,    51,    51,
      48,    48,    51,    47,    47,    48,    32,    48,    47,    48,
      47,    48,    51,    52,    52,    52,    50,    84,    52,    52,
      52,    49,    52,    50,   116,    51,    51,    51,    51,    51,
      53,    51,    51,    51,    51,    51,    48,    48,    48,    51,
      47,    48,    48,    47,   122,   123,    48,    51,    47,    51,
      51,    51,    51,    51,    51,    52,    50,   123,    51,    51,
      48,    51,    51
};

#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).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)           \
  Current.first_line   = Rhs[1].first_line;      \
  Current.first_column = Rhs[1].first_column;    \
  Current.last_line    = Rhs[N].last_line;       \
  Current.last_column  = Rhs[N].last_column;
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#define YYLEX	yylex ()

/* 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)
# define YYDSYMPRINT(Args)			\
do {						\
  if (yydebug)					\
    yysymprint 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)
# define YYDSYMPRINT(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



#if 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 /* !YYERROR_VERBOSE */



#if YYDEBUG
/*-----------------------------.
| Print this symbol on YYOUT.  |
`-----------------------------*/

static void
#if defined (__STDC__) || defined (__cplusplus)
yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue)
#else
yysymprint (yyout, yytype, yyvalue)
    FILE* yyout;
    int yytype;
    YYSTYPE yyvalue;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvalue;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyout, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyout, yytoknum[yytype], yyvalue);
# endif
    }
  else
    YYFPRINTF (yyout, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyout, ")");
}
#endif /* YYDEBUG. */


/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
#if defined (__STDC__) || defined (__cplusplus)
yydestruct (int yytype, YYSTYPE yyvalue)
#else
yydestruct (yytype, yyvalue)
    int yytype;
    YYSTYPE yyvalue;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvalue;

  switch (yytype)
    {
      default:
        break;
    }
}



/* 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


/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of parse errors so far.  */
int yynerrs;


int
yyparse (YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  
  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;



#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* 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;

  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.  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),

		    &yystacksize);

	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);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      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 == YYPACT_NINF)
    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);

      /* We have to keep this `#if YYDEBUG', since we use variables
	 which are defined only if `YYDEBUG' is set.  */
      YYDPRINTF ((stderr, "Next token is "));
      YYDSYMPRINT ((stderr, yychar1, yylval));
      YYDPRINTF ((stderr, "\n"));
    }

  /* If the proper action on seeing token YYCHAR1 is to reduce or to
     detect an error, take that action.  */
  yyn += yychar1;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  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;


  /* 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 garbage.
     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 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 - 1, 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 19:
#line 120 "config-parser.y"
    {
   OptionsItem->negcache = yyvsp[-1].number;
}
    break;

  case 20:
#line 125 "config-parser.y"
    {
   MyFree(OptionsItem->pidfile);
   OptionsItem->pidfile = DupString(yyvsp[-1].string);
}
    break;

  case 21:
#line 131 "config-parser.y"
    {
   OptionsItem->dns_fdlimit = yyvsp[-1].number;
}
    break;

  case 22:
#line 136 "config-parser.y"
    {
   MyFree(OptionsItem->scanlog);
   OptionsItem->scanlog = DupString(yyvsp[-1].string);
}
    break;

  case 42:
#line 166 "config-parser.y"
    {
   MyFree(IRCItem->away);
   IRCItem->away = DupString(yyvsp[-1].string);
}
    break;

  case 43:
#line 172 "config-parser.y"
    {
   MyFree(IRCItem->kline);
   IRCItem->kline = DupString(yyvsp[-1].string);
}
    break;

  case 44:
#line 178 "config-parser.y"
    {
   MyFree(IRCItem->mode);
   IRCItem->mode = DupString(yyvsp[-1].string);
}
    break;

  case 45:
#line 184 "config-parser.y"
    {
   MyFree(IRCItem->nick);
   IRCItem->nick = DupString(yyvsp[-1].string);
}
    break;

  case 46:
#line 190 "config-parser.y"
    {
   MyFree(IRCItem->nickserv);
   IRCItem->nickserv = DupString(yyvsp[-1].string);
}
    break;

  case 47:
#line 196 "config-parser.y"
    {
   MyFree(IRCItem->oper);
   IRCItem->oper = DupString(yyvsp[-1].string);
}
    break;

  case 48:
#line 202 "config-parser.y"
    {
   MyFree(IRCItem->password);
   IRCItem->password = DupString(yyvsp[-1].string);
}
    break;

  case 49:
#line 208 "config-parser.y"
    {
   node_t *node;
   node = node_create(DupString(yyvsp[-1].string));

   list_add(IRCItem->performs, node);
}
    break;

  case 50:
#line 216 "config-parser.y"
    {
   IRCItem->port = yyvsp[-1].number;
}
    break;

  case 51:
#line 221 "config-parser.y"
    {
   MyFree(IRCItem->realname);
   IRCItem->realname = DupString(yyvsp[-1].string);
}
    break;

  case 52:
#line 227 "config-parser.y"
    {
   MyFree(IRCItem->server);
   IRCItem->server = DupString(yyvsp[-1].string);
}
    break;

  case 53:
#line 233 "config-parser.y"
    {
   MyFree(IRCItem->username);
   IRCItem->username = DupString(yyvsp[-1].string);
}
    break;

  case 54:
#line 239 "config-parser.y"
    {
   MyFree(IRCItem->vhost);
   IRCItem->vhost = DupString(yyvsp[-1].string);
}
    break;

  case 55:
#line 245 "config-parser.y"
    {
   MyFree(IRCItem->connregex);
   IRCItem->connregex = DupString(yyvsp[-1].string);
}
    break;

  case 56:
#line 254 "config-parser.y"
    {
   node_t *node;
   struct ChannelConf *item;

   item = MyMalloc(sizeof *item);

   item->name = DupString("");
   item->key = DupString("");
   item->invite = DupString("");

   node = node_create(item);
   list_add(IRCItem->channels, node);

   tmp = (void *) item;
}
    break;

  case 63:
#line 279 "config-parser.y"
    {
   struct ChannelConf *item = tmp;

   MyFree(item->name);
   item->name = DupString(yyvsp[-1].string);
}
    break;

  case 64:
#line 287 "config-parser.y"
    {
   struct ChannelConf *item = tmp;

   MyFree(item->key);
   item->key = DupString(yyvsp[-1].string);
}
    break;

  case 65:
#line 295 "config-parser.y"
    {
   struct ChannelConf *item = tmp;

   MyFree(item->invite);
   item->invite = DupString(yyvsp[-1].string);
}
    break;

  case 66:
#line 305 "config-parser.y"
    {
   node_t *node;
   struct UserConf *item;

   item = MyMalloc(sizeof *item);

   item->masks = list_create();
   item->scanners = list_create();

   node = node_create(item);
   list_add(UserItemList, node);

   tmp = (void *) item; 
}
    break;

  case 73:
#line 329 "config-parser.y"
    {
   struct UserConf *item = (struct UserConf *) tmp;

   node_t *node;
   node = node_create((void *) DupString(yyvsp[-1].string));

   list_add(item->masks, node);
}
    break;

  case 74:
#line 339 "config-parser.y"
    {
   struct UserConf *item = (struct UserConf *) tmp;

   node_t *node;
   node = node_create((void *) DupString(yyvsp[-1].string));

   list_add(item->scanners, node);
}
    break;

  case 75:
#line 351 "config-parser.y"
    {
   node_t *node;
   struct ScannerConf *item, *olditem;

   item = MyMalloc(sizeof *item);

   /* Setup ScannerConf defaults */
   item->name = DupString("undefined");

	if(LIST_SIZE(ScannerItemList) > 0)
	{
	   olditem = ScannerItemList->tail->data;

		item->vhost = DupString(olditem->vhost);
		item->fd = olditem->fd;
		item->target_ip = DupString(olditem->target_ip);
		item->target_port = olditem->target_port;
		item->timeout = olditem->timeout;
		item->max_read = olditem->max_read;

		item->target_string = olditem->target_string;
		item->target_string_created = 0;
	}
	else
	{
	   item->vhost = DupString("0.0.0.0");
      item->fd = 512;
      item->target_ip = DupString("127.0.0.1");
      item->target_port = 6667;
      item->timeout = 30;
      item->max_read = 4096;
		
		item->target_string = list_create();
		item->target_string_created = 1;
	}
	
   item->protocols = list_create();

   node = node_create(item);

   list_add(ScannerItemList, node);
   tmp = (void *) item;
}
    break;

  case 89:
#line 411 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   MyFree(item->name);
   item->name = DupString(yyvsp[-1].string);
}
    break;

  case 90:
#line 418 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   MyFree(item->vhost);
   item->vhost = DupString(yyvsp[-1].string);
}
    break;

  case 91:
#line 425 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   MyFree(item->target_ip);
   item->target_ip = DupString(yyvsp[-1].string);
}
    break;

  case 92:
#line 432 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;

   node_t *node;
   node = node_create(yyvsp[-1].string);

	if(item->target_string_created == 0)
	{
	   item->target_string = list_create();
		item->target_string_created = 1;
	}

   list_add(item->target_string, node);
}
    break;

  case 93:
#line 448 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   item->fd = yyvsp[-1].number;
}
    break;

  case 94:
#line 454 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   item->target_port = yyvsp[-1].number;
}
    break;

  case 95:
#line 460 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   item->timeout = yyvsp[-1].number;
}
    break;

  case 96:
#line 466 "config-parser.y"
    {
   struct ScannerConf *item = (struct ScannerConf *) tmp;
   item->max_read = yyvsp[-1].number;
}
    break;

  case 97:
#line 472 "config-parser.y"
    {
   struct ProtocolConf *item;
   struct ScannerConf  *item2;

   node_t *node;
 
   item = MyMalloc(sizeof *item);
   item->type = yyvsp[-3].number;
   item->port = yyvsp[-1].number;

   item2 = (struct ScannerConf *) tmp;

   node = node_create(item);
   list_add(item2->protocols, node);
}
    break;

  case 107:
#line 503 "config-parser.y"
    {
   MyFree(OpmItem->dnsbl_from);
   OpmItem->dnsbl_from = DupString(yyvsp[-1].string);
}
    break;

  case 108:
#line 509 "config-parser.y"
    {
   MyFree(OpmItem->dnsbl_to);
   OpmItem->dnsbl_to = DupString(yyvsp[-1].string);
}
    break;

  case 109:
#line 515 "config-parser.y"
    {
   MyFree(OpmItem->sendmail);
   OpmItem->sendmail = DupString(yyvsp[-1].string);
}
    break;

  case 110:
#line 523 "config-parser.y"
    {
   node_t *node;
   struct BlacklistConf *item;

   item = MyMalloc(sizeof *item);

   item->name = DupString("");
   item->kline = DupString("");
   item->ban_unknown = 0;
   item->type = A_BITMASK;
   item->reply = list_create();

   node = node_create(item);
   list_add(OpmItem->blacklists, node);

   tmp = (void *) item;
}
    break;

  case 121:
#line 553 "config-parser.y"
    {
   struct BlacklistConf *item = tmp;

   MyFree(item->name);
   item->name = DupString(yyvsp[-1].string);
}
    break;

  case 122:
#line 560 "config-parser.y"
    {
   struct BlacklistConf *item = tmp;

   MyFree(item->kline);
   item->kline = DupString(yyvsp[-1].string);
}
    break;

  case 123:
#line 567 "config-parser.y"
    {
   struct BlacklistConf *item = tmp;
   
   if(strcmp("A record bitmask", yyvsp[-1].string) == 0)
      item->type = A_BITMASK;
   else if(strcmp("A record reply", yyvsp[-1].string) == 0)
      item->type = A_REPLY;
   else
      yyerror("Unknown blacklist type defined");
}
    break;

  case 124:
#line 578 "config-parser.y"
    {
   struct BlacklistConf *item = tmp;

   item->ban_unknown = yyvsp[-1].number;
}
    break;

  case 129:
#line 591 "config-parser.y"
    {
   struct BlacklistReplyConf *item;
   struct BlacklistConf *blacklist = tmp;
   node_t *node;

   item = MyMalloc(sizeof *item);

   item->number = yyvsp[-3].number;
   item->type = DupString(yyvsp[-1].string);

   node = node_create(item);
   list_add(blacklist->reply, node);
}
    break;

  case 136:
#line 618 "config-parser.y"
    {
   node_t *node;
   node = node_create(DupString(yyvsp[-1].string));

   list_add(ExemptItem->masks, node);
}
    break;


    }

/* Line 1016 of /usr/local/share/bison/yacc.c.  */
#line 1785 "config-parser.c"

  yyvsp -= yylen;
  yyssp -= yylen;


#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;


  /* 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 - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
	{
	  YYSIZE_T yysize = 0;
	  int yytype = YYTRANSLATE (yychar);
	  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 && yyx != YYTERROR)
	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
	  yysize += yystrlen ("parse error, unexpected ") + 1;
	  yysize += yystrlen (yytname[yytype]);
	  yymsg = (char *) YYSTACK_ALLOC (yysize);
	  if (yymsg != 0)
	    {
	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
	      yyp = yystpcpy (yyp, yytname[yytype]);

	      if (yycount < 5)
		{
		  yycount = 0;
		  for (yyx = yyn < 0 ? -yyn : 0;
		       yyx < (int) (sizeof (yytname) / sizeof (char *));
		       yyx++)
		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
		      {
			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 /* 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)
        {
	  /* Pop the error token.  */
          YYPOPSTACK;
	  /* Pop the rest of the stack.  */
	  while (yyssp > yyss)
	    {
	      YYDPRINTF ((stderr, "Error: popping "));
	      YYDSYMPRINT ((stderr,
			    yystos[*yyssp],
			    *yyvsp));
	      YYDPRINTF ((stderr, "\n"));
	      yydestruct (yystos[*yyssp], *yyvsp);
	      YYPOPSTACK;
	    }
	  YYABORT;
        }

      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
		  yychar, yytname[yychar1]));
      yydestruct (yychar1, yylval);
      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */

  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;

      YYDPRINTF ((stderr, "Error: popping "));
      YYDSYMPRINT ((stderr,
		    yystos[*yyssp], *yyvsp));
      YYDPRINTF ((stderr, "\n"));

      yydestruct (yystos[yystate], *yyvsp);
      yyvsp--;
      yystate = *--yyssp;


#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
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;


  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}


#line 625 "config-parser.y"




syntax highlighted by Code2HTML, v. 0.9.1