/* A Bison parser, made by GNU Bison 3.8.2.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 3 of the License, 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, see <https://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

/* 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, and Bison version.  */
#define YYBISON 30802

/* Bison version string.  */
#define YYBISON_VERSION "3.8.2"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1




/* First part of user prologue.  */
#line 79 "cfg.y"


#include <stdlib.h>
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <string.h>
#include <errno.h>
#include "route_struct.h"
#include "globals.h"
#include "route.h"
#include "dprint.h"
#include "cfg_pp.h"
#include "sr_module.h"
#include "modparam.h"
#include "ip_addr.h"
#include "resolve.h"
#include "socket_info.h"
#include "name_alias.h"
#include "ut.h"
#include "pt_scaling.h"
#include "dset.h"
#include "pvar.h"
#include "blacklists.h"
#include "xlog.h"
#include "db/db_insertq.h"
#include "bin_interface.h"
#include "net/trans.h"
#include "config.h"
#include "mem/rpm_mem.h"
#include "poll_types.h"

#ifdef SHM_EXTRA_STATS
#include "mem/module_info.h"
#endif

#ifdef DEBUG_DMALLOC
#include <dmalloc.h>
#endif

/* hack to avoid alloca usage in the generated C file (needed for compiler
 with no built in alloca, like icc*/
#undef _ALLOCA_H

#undef MIN
#undef MAX

extern int yylex();
static void yyerror(char* s);
static void yyerrorf(char* fmt, ...);
static char* tmp;
static int i_tmp, rc;
static struct socket_id* lst_tmp;
static int rt;  /* Type of route block for find_export */
static str s_tmp;
static str tstr;
static struct net* net_tmp;
static pv_spec_t *spec;
static pv_elem_t *elem;
static struct bl_rule *bl_head = 0;
static struct bl_rule *bl_tail = 0;
static struct script_route_ref *rt_ref = NULL;

action_elem_t elems[MAX_ACTION_ELEMS];
static action_elem_t route_elems[MAX_ACTION_ELEMS];
action_elem_t *a_tmp;

struct port_range {
	int min;
	int max;
	struct port_range *next;
} *pr_tmp;
static struct script_return_param sr_tmp;

static inline void warn(char* s);
static struct socket_id* mk_listen_id(char*, enum sip_protos, int);
static struct socket_id* mk_listen_id_range(char*, enum sip_protos, struct port_range *);
static struct socket_id* set_listen_id_adv(struct socket_id *, char *, int);
static struct socket_id* mk_bond_id(char*, struct socket_bond_elem *);
static struct multi_str *new_string(char *s);
static struct port_range* mk_port_range(int, int);
static struct socket_bond_elem *new_socket_bond_elem(char *name);
static int parse_ipnet(char *in, int len, struct net **ipnet);
static struct script_return_param *mk_script_return(enum script_return_type type)
{
	struct script_return_param *param = pkg_malloc(sizeof *param);
	if (!param)
		return NULL;
	*param = sr_tmp;
	param->type = type;
	param->next = NULL;
	return param;
}

extern int line;
extern int column;
extern int startcolumn;
extern char *finame;

struct listen_param {
	enum si_flags flags;
	int workers;
	int tos;
	struct socket_id *socket;
	char *tag;
	char *auto_scaling_profile;
} p_tmp;
static void fill_socket_id(struct listen_param *param, struct socket_id *s);

union route_name_var {
	int iname;
	struct _pv_spec *sname;
	struct _pv_elem *ename;
	void *data;
} rn_tmp;

#ifndef SHM_EXTRA_STATS
struct multi_str{
	char *s;
	struct multi_str* next;
};
#else
static struct multi_str *tmp_mod;
#endif

#define get_cfg_file_name \
	((finame) ? finame : cfg_file ? cfg_file : "default")

#define si_subdomain_to_alias_flag(_flags) (int) _flags & SI_ACCEPT_SUBDOMAIN_ALIAS

#define mk_action_(_res, _type, _no, _elems) \
	do { \
		_res = mk_action(_type, _no, _elems, line, get_cfg_file_name); \
	} while(0)
#define mk_action0(_res, _type) \
	do { \
		_res = mk_action(_type, 0, 0, line, get_cfg_file_name); \
	} while(0)
#define mk_action1(_res, _type, _p1_type, _p1) \
	do { \
		elems[0].type = _p1_type; \
		elems[0].u.data = _p1; \
		_res = mk_action(_type, 1, elems, line, get_cfg_file_name); \
	} while(0)
#define	mk_action2(_res, _type, _p1_type, _p2_type, _p1, _p2) \
	do { \
		elems[0].type = _p1_type; \
		elems[0].u.data = _p1; \
		elems[1].type = _p2_type; \
		elems[1].u.data = _p2; \
		_res = mk_action(_type, 2, elems, line, get_cfg_file_name); \
	} while(0)
#define mk_action3(_res, _type, _p1_type, _p2_type, _p3_type, _p1, _p2, _p3) \
	do { \
		elems[0].type = _p1_type; \
		elems[0].u.data = _p1; \
		elems[1].type = _p2_type; \
		elems[1].u.data = _p2; \
		elems[2].type = _p3_type; \
		elems[2].u.data = _p3; \
		_res = mk_action(_type, 3, elems, line, get_cfg_file_name); \
	} while(0)

extern int cfg_parse_only_routes;
#define IFOR(_instr) \
	if (cfg_parse_only_routes==1) {_instr;break;}


#line 244 "cfg.tab.c"

# ifndef YY_CAST
#  ifdef __cplusplus
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
#  else
#   define YY_CAST(Type, Val) ((Type) (Val))
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
#  endif
# endif
# ifndef YY_NULLPTR
#  if defined __cplusplus
#   if 201103L <= __cplusplus
#    define YY_NULLPTR nullptr
#   else
#    define YY_NULLPTR 0
#   endif
#  else
#   define YY_NULLPTR ((void*)0)
#  endif
# endif

#include "cfg.tab.h"
/* Symbol kind.  */
enum yysymbol_kind_t
{
  YYSYMBOL_YYEMPTY = -2,
  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
  YYSYMBOL_YYerror = 1,                    /* error  */
  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
  YYSYMBOL_DROP = 3,                       /* DROP  */
  YYSYMBOL_ASSERT = 4,                     /* ASSERT  */
  YYSYMBOL_EXIT = 5,                       /* EXIT  */
  YYSYMBOL_RETURN = 6,                     /* RETURN  */
  YYSYMBOL_LOG_TOK = 7,                    /* LOG_TOK  */
  YYSYMBOL_ERROR = 8,                      /* ERROR  */
  YYSYMBOL_ROUTE = 9,                      /* ROUTE  */
  YYSYMBOL_ROUTE_FAILURE = 10,             /* ROUTE_FAILURE  */
  YYSYMBOL_ROUTE_ONREPLY = 11,             /* ROUTE_ONREPLY  */
  YYSYMBOL_ROUTE_BRANCH = 12,              /* ROUTE_BRANCH  */
  YYSYMBOL_ROUTE_ERROR = 13,               /* ROUTE_ERROR  */
  YYSYMBOL_ROUTE_LOCAL = 14,               /* ROUTE_LOCAL  */
  YYSYMBOL_ROUTE_STARTUP = 15,             /* ROUTE_STARTUP  */
  YYSYMBOL_ROUTE_TIMER = 16,               /* ROUTE_TIMER  */
  YYSYMBOL_ROUTE_EVENT = 17,               /* ROUTE_EVENT  */
  YYSYMBOL_IF = 18,                        /* IF  */
  YYSYMBOL_ELSE = 19,                      /* ELSE  */
  YYSYMBOL_SWITCH = 20,                    /* SWITCH  */
  YYSYMBOL_CASE = 21,                      /* CASE  */
  YYSYMBOL_DEFAULT = 22,                   /* DEFAULT  */
  YYSYMBOL_BREAK = 23,                     /* BREAK  */
  YYSYMBOL_WHILE = 24,                     /* WHILE  */
  YYSYMBOL_FOR = 25,                       /* FOR  */
  YYSYMBOL_IN = 26,                        /* IN  */
  YYSYMBOL_READONLY = 27,                  /* READONLY  */
  YYSYMBOL_EXPIRE = 28,                    /* EXPIRE  */
  YYSYMBOL_NULLV = 29,                     /* NULLV  */
  YYSYMBOL_XDBG = 30,                      /* XDBG  */
  YYSYMBOL_XLOG = 31,                      /* XLOG  */
  YYSYMBOL_XLOG_BUF_SIZE = 32,             /* XLOG_BUF_SIZE  */
  YYSYMBOL_XLOG_FORCE_COLOR = 33,          /* XLOG_FORCE_COLOR  */
  YYSYMBOL_XLOG_PRINT_LEVEL = 34,          /* XLOG_PRINT_LEVEL  */
  YYSYMBOL_XLOG_LEVEL = 35,                /* XLOG_LEVEL  */
  YYSYMBOL_PV_PRINT_BUF_SIZE = 36,         /* PV_PRINT_BUF_SIZE  */
  YYSYMBOL_DEBUG_MODE = 37,                /* DEBUG_MODE  */
  YYSYMBOL_ENABLE_ASSERTS = 38,            /* ENABLE_ASSERTS  */
  YYSYMBOL_ABORT_ON_ASSERT = 39,           /* ABORT_ON_ASSERT  */
  YYSYMBOL_LOGLEVEL = 40,                  /* LOGLEVEL  */
  YYSYMBOL_LOGPREFIX = 41,                 /* LOGPREFIX  */
  YYSYMBOL_LOGSTDOUT = 42,                 /* LOGSTDOUT  */
  YYSYMBOL_STDERROR_ENABLED = 43,          /* STDERROR_ENABLED  */
  YYSYMBOL_SYSLOG_ENABLED = 44,            /* SYSLOG_ENABLED  */
  YYSYMBOL_LOG_EVENT_ENABLED = 45,         /* LOG_EVENT_ENABLED  */
  YYSYMBOL_STDERROR_LEVEL_FILTER = 46,     /* STDERROR_LEVEL_FILTER  */
  YYSYMBOL_SYSLOG_LEVEL_FILTER = 47,       /* SYSLOG_LEVEL_FILTER  */
  YYSYMBOL_LOG_EVENT_LEVEL_FILTER = 48,    /* LOG_EVENT_LEVEL_FILTER  */
  YYSYMBOL_STDERROR_FORMAT = 49,           /* STDERROR_FORMAT  */
  YYSYMBOL_SYSLOG_FORMAT = 50,             /* SYSLOG_FORMAT  */
  YYSYMBOL_LOG_JSON_BUF_SIZE = 51,         /* LOG_JSON_BUF_SIZE  */
  YYSYMBOL_LOG_MSG_BUF_SIZE = 52,          /* LOG_MSG_BUF_SIZE  */
  YYSYMBOL_SYSLOG_FACILITY = 53,           /* SYSLOG_FACILITY  */
  YYSYMBOL_SYSLOG_NAME = 54,               /* SYSLOG_NAME  */
  YYSYMBOL_AVP_ALIASES = 55,               /* AVP_ALIASES  */
  YYSYMBOL_SOCKET = 56,                    /* SOCKET  */
  YYSYMBOL_MEMGROUP = 57,                  /* MEMGROUP  */
  YYSYMBOL_ALIAS = 58,                     /* ALIAS  */
  YYSYMBOL_AUTO_ALIASES = 59,              /* AUTO_ALIASES  */
  YYSYMBOL_TAG = 60,                       /* TAG  */
  YYSYMBOL_DNS = 61,                       /* DNS  */
  YYSYMBOL_REV_DNS = 62,                   /* REV_DNS  */
  YYSYMBOL_DNS_TRY_IPV6 = 63,              /* DNS_TRY_IPV6  */
  YYSYMBOL_DNS_TRY_NAPTR = 64,             /* DNS_TRY_NAPTR  */
  YYSYMBOL_DNS_RETR_TIME = 65,             /* DNS_RETR_TIME  */
  YYSYMBOL_DNS_RETR_NO = 66,               /* DNS_RETR_NO  */
  YYSYMBOL_DNS_SERVERS_NO = 67,            /* DNS_SERVERS_NO  */
  YYSYMBOL_DNS_USE_SEARCH = 68,            /* DNS_USE_SEARCH  */
  YYSYMBOL_MAX_WHILE_LOOPS = 69,           /* MAX_WHILE_LOOPS  */
  YYSYMBOL_UDP_WORKERS = 70,               /* UDP_WORKERS  */
  YYSYMBOL_CHECK_VIA = 71,                 /* CHECK_VIA  */
  YYSYMBOL_SHM_HASH_SPLIT_PERCENTAGE = 72, /* SHM_HASH_SPLIT_PERCENTAGE  */
  YYSYMBOL_SHM_SECONDARY_HASH_SIZE = 73,   /* SHM_SECONDARY_HASH_SIZE  */
  YYSYMBOL_MEM_WARMING_ENABLED = 74,       /* MEM_WARMING_ENABLED  */
  YYSYMBOL_MEM_WARMING_PATTERN_FILE = 75,  /* MEM_WARMING_PATTERN_FILE  */
  YYSYMBOL_MEM_WARMING_PERCENTAGE = 76,    /* MEM_WARMING_PERCENTAGE  */
  YYSYMBOL_RPM_MEM_FILE = 77,              /* RPM_MEM_FILE  */
  YYSYMBOL_RPM_MEM_SIZE = 78,              /* RPM_MEM_SIZE  */
  YYSYMBOL_MEMLOG = 79,                    /* MEMLOG  */
  YYSYMBOL_MEMDUMP = 80,                   /* MEMDUMP  */
  YYSYMBOL_SHM_MEMLOG_SIZE = 81,           /* SHM_MEMLOG_SIZE  */
  YYSYMBOL_EXECMSGTHRESHOLD = 82,          /* EXECMSGTHRESHOLD  */
  YYSYMBOL_EXECDNSTHRESHOLD = 83,          /* EXECDNSTHRESHOLD  */
  YYSYMBOL_TCPTHRESHOLD = 84,              /* TCPTHRESHOLD  */
  YYSYMBOL_EVENT_SHM_THRESHOLD = 85,       /* EVENT_SHM_THRESHOLD  */
  YYSYMBOL_EVENT_PKG_THRESHOLD = 86,       /* EVENT_PKG_THRESHOLD  */
  YYSYMBOL_QUERYBUFFERSIZE = 87,           /* QUERYBUFFERSIZE  */
  YYSYMBOL_QUERYFLUSHTIME = 88,            /* QUERYFLUSHTIME  */
  YYSYMBOL_SIP_WARNING = 89,               /* SIP_WARNING  */
  YYSYMBOL_SERVER_SIGNATURE = 90,          /* SERVER_SIGNATURE  */
  YYSYMBOL_SERVER_HEADER = 91,             /* SERVER_HEADER  */
  YYSYMBOL_USER_AGENT_HEADER = 92,         /* USER_AGENT_HEADER  */
  YYSYMBOL_LOADMODULE = 93,                /* LOADMODULE  */
  YYSYMBOL_MPATH = 94,                     /* MPATH  */
  YYSYMBOL_MODPARAM = 95,                  /* MODPARAM  */
  YYSYMBOL_MAXBUFFER = 96,                 /* MAXBUFFER  */
  YYSYMBOL_CHROOT = 97,                    /* CHROOT  */
  YYSYMBOL_WDIR = 98,                      /* WDIR  */
  YYSYMBOL_MHOMED = 99,                    /* MHOMED  */
  YYSYMBOL_POLL_METHOD = 100,              /* POLL_METHOD  */
  YYSYMBOL_TCP_ACCEPT_ALIASES = 101,       /* TCP_ACCEPT_ALIASES  */
  YYSYMBOL_TCP_WORKERS = 102,              /* TCP_WORKERS  */
  YYSYMBOL_TCP_CONNECT_TIMEOUT = 103,      /* TCP_CONNECT_TIMEOUT  */
  YYSYMBOL_TCP_CON_LIFETIME = 104,         /* TCP_CON_LIFETIME  */
  YYSYMBOL_TCP_SOCKET_BACKLOG = 105,       /* TCP_SOCKET_BACKLOG  */
  YYSYMBOL_TCP_MAX_CONNECTIONS = 106,      /* TCP_MAX_CONNECTIONS  */
  YYSYMBOL_TCP_NO_NEW_CONN_BFLAG = 107,    /* TCP_NO_NEW_CONN_BFLAG  */
  YYSYMBOL_TCP_NO_NEW_CONN_RPLFLAG = 108,  /* TCP_NO_NEW_CONN_RPLFLAG  */
  YYSYMBOL_TCP_KEEPALIVE = 109,            /* TCP_KEEPALIVE  */
  YYSYMBOL_TCP_KEEPCOUNT = 110,            /* TCP_KEEPCOUNT  */
  YYSYMBOL_TCP_KEEPIDLE = 111,             /* TCP_KEEPIDLE  */
  YYSYMBOL_TCP_KEEPINTERVAL = 112,         /* TCP_KEEPINTERVAL  */
  YYSYMBOL_TCP_MAX_MSG_TIME = 113,         /* TCP_MAX_MSG_TIME  */
  YYSYMBOL_TCP_THREADS = 114,              /* TCP_THREADS  */
  YYSYMBOL_ADVERTISED_ADDRESS = 115,       /* ADVERTISED_ADDRESS  */
  YYSYMBOL_ADVERTISED_PORT = 116,          /* ADVERTISED_PORT  */
  YYSYMBOL_DISABLE_CORE = 117,             /* DISABLE_CORE  */
  YYSYMBOL_OPEN_FD_LIMIT = 118,            /* OPEN_FD_LIMIT  */
  YYSYMBOL_MCAST_LOOPBACK = 119,           /* MCAST_LOOPBACK  */
  YYSYMBOL_MCAST_TTL = 120,                /* MCAST_TTL  */
  YYSYMBOL_TOS = 121,                      /* TOS  */
  YYSYMBOL_DISABLE_DNS_FAILOVER = 122,     /* DISABLE_DNS_FAILOVER  */
  YYSYMBOL_DISABLE_DNS_BLACKLIST = 123,    /* DISABLE_DNS_BLACKLIST  */
  YYSYMBOL_DST_BLACKLIST = 124,            /* DST_BLACKLIST  */
  YYSYMBOL_DISABLE_STATELESS_FWD = 125,    /* DISABLE_STATELESS_FWD  */
  YYSYMBOL_DB_VERSION_TABLE = 126,         /* DB_VERSION_TABLE  */
  YYSYMBOL_DB_DEFAULT_URL = 127,           /* DB_DEFAULT_URL  */
  YYSYMBOL_DB_MAX_ASYNC_CONNECTIONS = 128, /* DB_MAX_ASYNC_CONNECTIONS  */
  YYSYMBOL_DISABLE_503_TRANSLATION = 129,  /* DISABLE_503_TRANSLATION  */
  YYSYMBOL_SYNC_TOKEN = 130,               /* SYNC_TOKEN  */
  YYSYMBOL_ASYNC_TOKEN = 131,              /* ASYNC_TOKEN  */
  YYSYMBOL_LAUNCH_TOKEN = 132,             /* LAUNCH_TOKEN  */
  YYSYMBOL_AUTO_SCALING_PROFILE = 133,     /* AUTO_SCALING_PROFILE  */
  YYSYMBOL_AUTO_SCALING_CYCLE = 134,       /* AUTO_SCALING_CYCLE  */
  YYSYMBOL_TIMER_WORKERS = 135,            /* TIMER_WORKERS  */
  YYSYMBOL_EQUAL = 136,                    /* EQUAL  */
  YYSYMBOL_EQUAL_T = 137,                  /* EQUAL_T  */
  YYSYMBOL_GT = 138,                       /* GT  */
  YYSYMBOL_LT = 139,                       /* LT  */
  YYSYMBOL_GTE = 140,                      /* GTE  */
  YYSYMBOL_LTE = 141,                      /* LTE  */
  YYSYMBOL_DIFF = 142,                     /* DIFF  */
  YYSYMBOL_MATCH = 143,                    /* MATCH  */
  YYSYMBOL_NOTMATCH = 144,                 /* NOTMATCH  */
  YYSYMBOL_COLONEQ = 145,                  /* COLONEQ  */
  YYSYMBOL_PLUSEQ = 146,                   /* PLUSEQ  */
  YYSYMBOL_MINUSEQ = 147,                  /* MINUSEQ  */
  YYSYMBOL_SLASHEQ = 148,                  /* SLASHEQ  */
  YYSYMBOL_MULTEQ = 149,                   /* MULTEQ  */
  YYSYMBOL_MODULOEQ = 150,                 /* MODULOEQ  */
  YYSYMBOL_BANDEQ = 151,                   /* BANDEQ  */
  YYSYMBOL_BOREQ = 152,                    /* BOREQ  */
  YYSYMBOL_BXOREQ = 153,                   /* BXOREQ  */
  YYSYMBOL_OR = 154,                       /* OR  */
  YYSYMBOL_AND = 155,                      /* AND  */
  YYSYMBOL_BOR = 156,                      /* BOR  */
  YYSYMBOL_BAND = 157,                     /* BAND  */
  YYSYMBOL_BXOR = 158,                     /* BXOR  */
  YYSYMBOL_BLSHIFT = 159,                  /* BLSHIFT  */
  YYSYMBOL_BRSHIFT = 160,                  /* BRSHIFT  */
  YYSYMBOL_PLUS = 161,                     /* PLUS  */
  YYSYMBOL_MINUS = 162,                    /* MINUS  */
  YYSYMBOL_MULT = 163,                     /* MULT  */
  YYSYMBOL_MODULO = 164,                   /* MODULO  */
  YYSYMBOL_NOT = 165,                      /* NOT  */
  YYSYMBOL_BNOT = 166,                     /* BNOT  */
  YYSYMBOL_NUMBER = 167,                   /* NUMBER  */
  YYSYMBOL_ZERO = 168,                     /* ZERO  */
  YYSYMBOL_ID = 169,                       /* ID  */
  YYSYMBOL_STRING = 170,                   /* STRING  */
  YYSYMBOL_SCRIPTVAR = 171,                /* SCRIPTVAR  */
  YYSYMBOL_IPV6ADDR = 172,                 /* IPV6ADDR  */
  YYSYMBOL_IPV4ADDR = 173,                 /* IPV4ADDR  */
  YYSYMBOL_IPNET = 174,                    /* IPNET  */
  YYSYMBOL_COMMA = 175,                    /* COMMA  */
  YYSYMBOL_SEMICOLON = 176,                /* SEMICOLON  */
  YYSYMBOL_RPAREN = 177,                   /* RPAREN  */
  YYSYMBOL_LPAREN = 178,                   /* LPAREN  */
  YYSYMBOL_LBRACE = 179,                   /* LBRACE  */
  YYSYMBOL_RBRACE = 180,                   /* RBRACE  */
  YYSYMBOL_LBRACK = 181,                   /* LBRACK  */
  YYSYMBOL_RBRACK = 182,                   /* RBRACK  */
  YYSYMBOL_SLASH = 183,                    /* SLASH  */
  YYSYMBOL_AS = 184,                       /* AS  */
  YYSYMBOL_USE_WORKERS = 185,              /* USE_WORKERS  */
  YYSYMBOL_SOCK_TOS = 186,                 /* SOCK_TOS  */
  YYSYMBOL_USE_AUTO_SCALING_PROFILE = 187, /* USE_AUTO_SCALING_PROFILE  */
  YYSYMBOL_MAX = 188,                      /* MAX  */
  YYSYMBOL_MIN = 189,                      /* MIN  */
  YYSYMBOL_DOT = 190,                      /* DOT  */
  YYSYMBOL_CR = 191,                       /* CR  */
  YYSYMBOL_COLON = 192,                    /* COLON  */
  YYSYMBOL_ANY = 193,                      /* ANY  */
  YYSYMBOL_ANYCAST = 194,                  /* ANYCAST  */
  YYSYMBOL_ACCEPT_SUBDOMAIN = 195,         /* ACCEPT_SUBDOMAIN  */
  YYSYMBOL_FRAG = 196,                     /* FRAG  */
  YYSYMBOL_REUSE_PORT = 197,               /* REUSE_PORT  */
  YYSYMBOL_ALLOW_PROXY_PROTOCOL = 198,     /* ALLOW_PROXY_PROTOCOL  */
  YYSYMBOL_SEND_PROXY_PROTOCOL = 199,      /* SEND_PROXY_PROTOCOL  */
  YYSYMBOL_PROXY_PROTOCOL = 200,           /* PROXY_PROTOCOL  */
  YYSYMBOL_SCRIPTVARERR = 201,             /* SCRIPTVARERR  */
  YYSYMBOL_SCALE_UP_TO = 202,              /* SCALE_UP_TO  */
  YYSYMBOL_SCALE_DOWN_TO = 203,            /* SCALE_DOWN_TO  */
  YYSYMBOL_ON = 204,                       /* ON  */
  YYSYMBOL_CYCLES = 205,                   /* CYCLES  */
  YYSYMBOL_CYCLES_WITHIN = 206,            /* CYCLES_WITHIN  */
  YYSYMBOL_PERCENTAGE = 207,               /* PERCENTAGE  */
  YYSYMBOL_BOND = 208,                     /* BOND  */
  YYSYMBOL_YYACCEPT = 209,                 /* $accept  */
  YYSYMBOL_cfg = 210,                      /* cfg  */
  YYSYMBOL_statements = 211,               /* statements  */
  YYSYMBOL_statement = 212,                /* statement  */
  YYSYMBOL_213_1 = 213,                    /* $@1  */
  YYSYMBOL_214_2 = 214,                    /* $@2  */
  YYSYMBOL_215_3 = 215,                    /* $@3  */
  YYSYMBOL_216_4 = 216,                    /* $@4  */
  YYSYMBOL_217_5 = 217,                    /* $@5  */
  YYSYMBOL_218_6 = 218,                    /* $@6  */
  YYSYMBOL_219_7 = 219,                    /* $@7  */
  YYSYMBOL_220_8 = 220,                    /* $@8  */
  YYSYMBOL_221_9 = 221,                    /* $@9  */
  YYSYMBOL_listen_id = 222,                /* listen_id  */
  YYSYMBOL_host_sep = 223,                 /* host_sep  */
  YYSYMBOL_host = 224,                     /* host  */
  YYSYMBOL_proto = 225,                    /* proto  */
  YYSYMBOL_port = 226,                     /* port  */
  YYSYMBOL_portrange = 227,                /* portrange  */
  YYSYMBOL_snumber = 228,                  /* snumber  */
  YYSYMBOL_phostport = 229,                /* phostport  */
  YYSYMBOL_phostportrange = 230,           /* phostportrange  */
  YYSYMBOL_any_alias = 231,                /* any_alias  */
  YYSYMBOL_alias_def = 232,                /* alias_def  */
  YYSYMBOL_id_lst = 233,                   /* id_lst  */
  YYSYMBOL_listen_id_def = 234,            /* listen_id_def  */
  YYSYMBOL_socket_def_param = 235,         /* socket_def_param  */
  YYSYMBOL_socket_def_params = 236,        /* socket_def_params  */
  YYSYMBOL_socket_bond_elems = 237,        /* socket_bond_elems  */
  YYSYMBOL_socket_def = 238,               /* socket_def  */
  YYSYMBOL_239_10 = 239,                   /* $@10  */
  YYSYMBOL_any_proto = 240,                /* any_proto  */
  YYSYMBOL_multi_string = 241,             /* multi_string  */
  YYSYMBOL_blst_elem = 242,                /* blst_elem  */
  YYSYMBOL_blst_def = 243,                 /* blst_def  */
  YYSYMBOL_blst_flag = 244,                /* blst_flag  */
  YYSYMBOL_blst_flags = 245,               /* blst_flags  */
  YYSYMBOL_blst_elem_list = 246,           /* blst_elem_list  */
  YYSYMBOL_mpath_def_list = 247,           /* mpath_def_list  */
  YYSYMBOL_auto_scale_profile_def = 248,   /* auto_scale_profile_def  */
  YYSYMBOL_assign_stm = 249,               /* assign_stm  */
  YYSYMBOL_module_stm = 250,               /* module_stm  */
  YYSYMBOL_ip = 251,                       /* ip  */
  YYSYMBOL_ipv4 = 252,                     /* ipv4  */
  YYSYMBOL_ipv6addr = 253,                 /* ipv6addr  */
  YYSYMBOL_ipv6 = 254,                     /* ipv6  */
  YYSYMBOL_ipnet = 255,                    /* ipnet  */
  YYSYMBOL_folded_string = 256,            /* folded_string  */
  YYSYMBOL_route_name = 257,               /* route_name  */
  YYSYMBOL_route_name_var = 258,           /* route_name_var  */
  YYSYMBOL_route_stm = 259,                /* route_stm  */
  YYSYMBOL_failure_route_stm = 260,        /* failure_route_stm  */
  YYSYMBOL_onreply_route_stm = 261,        /* onreply_route_stm  */
  YYSYMBOL_branch_route_stm = 262,         /* branch_route_stm  */
  YYSYMBOL_error_route_stm = 263,          /* error_route_stm  */
  YYSYMBOL_local_route_stm = 264,          /* local_route_stm  */
  YYSYMBOL_startup_route_stm = 265,        /* startup_route_stm  */
  YYSYMBOL_timer_route_stm = 266,          /* timer_route_stm  */
  YYSYMBOL_event_route_stm = 267,          /* event_route_stm  */
  YYSYMBOL_exp = 268,                      /* exp  */
  YYSYMBOL_equalop = 269,                  /* equalop  */
  YYSYMBOL_compop = 270,                   /* compop  */
  YYSYMBOL_matchop = 271,                  /* matchop  */
  YYSYMBOL_intop = 272,                    /* intop  */
  YYSYMBOL_strop = 273,                    /* strop  */
  YYSYMBOL_script_var = 274,               /* script_var  */
  YYSYMBOL_exp_elem = 275,                 /* exp_elem  */
  YYSYMBOL_exp_cond = 276,                 /* exp_cond  */
  YYSYMBOL_assignop = 277,                 /* assignop  */
  YYSYMBOL_assignexp = 278,                /* assignexp  */
  YYSYMBOL_assign_cmd = 279,               /* assign_cmd  */
  YYSYMBOL_exp_stm = 280,                  /* exp_stm  */
  YYSYMBOL_brk_stm = 281,                  /* brk_stm  */
  YYSYMBOL_stm = 282,                      /* stm  */
  YYSYMBOL_actions = 283,                  /* actions  */
  YYSYMBOL_brk_actions = 284,              /* brk_actions  */
  YYSYMBOL_action = 285,                   /* action  */
  YYSYMBOL_brk_action = 286,               /* brk_action  */
  YYSYMBOL_brk_if_cmd = 287,               /* brk_if_cmd  */
  YYSYMBOL_if_cmd = 288,                   /* if_cmd  */
  YYSYMBOL_while_cmd = 289,                /* while_cmd  */
  YYSYMBOL_foreach_cmd = 290,              /* foreach_cmd  */
  YYSYMBOL_switch_cmd = 291,               /* switch_cmd  */
  YYSYMBOL_switch_stm = 292,               /* switch_stm  */
  YYSYMBOL_case_stms = 293,                /* case_stms  */
  YYSYMBOL_case_stm = 294,                 /* case_stm  */
  YYSYMBOL_default_stm = 295,              /* default_stm  */
  YYSYMBOL_func_param = 296,               /* func_param  */
  YYSYMBOL_route_param = 297,              /* route_param  */
  YYSYMBOL_async_func = 298,               /* async_func  */
  YYSYMBOL_return_param = 299,             /* return_param  */
  YYSYMBOL_return_params = 300,            /* return_params  */
  YYSYMBOL_cmd = 301                       /* cmd  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;




#ifdef short
# undef short
#endif

/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
   <limits.h> and (if available) <stdint.h> are included
   so that the code can choose integer types of a good width.  */

#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
#  define YY_STDINT_H
# endif
#endif

/* Narrow types that promote to a signed type and that can represent a
   signed or unsigned integer of at least N bits.  In tables they can
   save space and decrease cache pressure.  Promoting to a signed type
   helps avoid bugs in integer arithmetic.  */

#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif

/* Work around bug in HP-UX 11.23, which defines these macros
   incorrectly for preprocessor constants.  This workaround can likely
   be removed in 2023, as HPE has promised support for HP-UX 11.23
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif

#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif

#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif

#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
#  ifndef ptrdiff_t
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  endif
#  define YYPTRDIFF_T ptrdiff_t
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned
# endif
#endif

#define YYSIZE_MAXIMUM                                  \
  YY_CAST (YYPTRDIFF_T,                                 \
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
            ? YYPTRDIFF_MAXIMUM                         \
            : YY_CAST (YYSIZE_T, -1)))

#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))


/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
#  define YY_ATTRIBUTE_UNUSED
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YY_USE(E) ((void) (E))
#else
# define YY_USE(E) /* empty */
#endif

/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif

#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
    _Pragma ("GCC diagnostic push")                            \
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END            \
    _Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif


#define YY_ASSERT(E) ((void) (0 && (E)))

#if !defined yyoverflow

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
#     ifndef EXIT_SUCCESS
#      define EXIT_SUCCESS 0
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's 'empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* !defined yyoverflow */

#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yy_state_t yyss_alloc;
  YYSTYPE yyvs_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* 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_alloc, Stack)                           \
    do                                                                  \
      {                                                                 \
        YYPTRDIFF_T yynewbytes;                                         \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYPTRDIFF_T yyi;                      \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  226
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   2324

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  209
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  93
/* YYNRULES -- Number of rules.  */
#define YYNRULES  538
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  1020

/* YYMAXUTOK -- Last valid token kind.  */
#define YYMAXUTOK   463


/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, with out-of-bounds checking.  */
#define YYTRANSLATE(YYX)                                \
  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
   : YYSYMBOL_YYUNDEF)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_uint8 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,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    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,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
     195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
     205,   206,   207,   208
};

#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   531,   531,   534,   535,   536,   539,   540,   541,   541,
     542,   542,   543,   543,   544,   544,   545,   545,   546,   546,
     547,   547,   548,   548,   549,   549,   551,   554,   569,   578,
     593,   594,   597,   598,   612,   617,   627,   628,   631,   644,
     653,   660,   662,   663,   664,   668,   670,   672,   677,   685,
     687,   689,   691,   693,   698,   705,   707,   709,   711,   715,
     718,   719,   725,   726,   729,   731,   733,   739,   742,   745,
     748,   751,   754,   757,   760,   763,   766,   769,   772,   777,
     778,   781,   787,   796,   797,   797,   802,   810,   811,   813,
     814,   817,   825,   834,   840,   847,   853,   860,   866,   873,
     879,   886,   892,   901,   902,   903,   906,   907,   908,   911,
     912,   915,   916,   917,   920,   921,   925,   933,   941,   947,
     955,   959,   971,   972,   973,   974,   975,   976,   991,   993,
     996,   997,  1008,  1009,  1020,  1021,  1030,  1031,  1037,  1038,
    1044,  1045,  1047,  1048,  1073,  1098,  1106,  1107,  1115,  1116,
    1122,  1123,  1124,  1125,  1126,  1127,  1128,  1129,  1130,  1131,
    1132,  1133,  1134,  1135,  1136,  1137,  1138,  1139,  1140,  1141,
    1142,  1143,  1144,  1145,  1146,  1150,  1151,  1154,  1158,  1159,
    1160,  1168,  1176,  1184,  1192,  1200,  1208,  1216,  1224,  1232,
    1240,  1243,  1244,  1247,  1248,  1249,  1250,  1251,  1252,  1253,
    1254,  1255,  1256,  1257,  1258,  1259,  1260,  1270,  1271,  1285,
    1286,  1287,  1288,  1289,  1290,  1291,  1292,  1293,  1294,  1295,
    1296,  1297,  1298,  1299,  1300,  1310,  1320,  1321,  1326,  1327,
    1330,  1334,  1335,  1340,  1341,  1344,  1345,  1348,  1349,  1352,
    1353,  1360,  1361,  1368,  1370,  1373,  1374,  1377,  1378,  1383,
    1386,  1393,  1394,  1401,  1402,  1409,  1410,  1412,  1413,  1417,
    1418,  1421,  1422,  1424,  1425,  1427,  1429,  1431,  1432,  1433,
    1434,  1436,  1437,  1446,  1449,  1493,  1494,  1499,  1501,  1503,
    1504,  1510,  1512,  1526,  1528,  1531,  1532,  1535,  1536,  1543,
    1544,  1551,  1552,  1556,  1584,  1585,  1586,  1587,  1590,  1591,
    1594,  1595,  1605,  1615,  1617,  1619,  1620,  1622,  1623,  1625,
    1628,  1630,  1633,  1634,  1637,  1639,  1642,  1645,  1649,  1650,
    1656,  1662,  1668,  1672,  1673,  1676,  1692,  1708,  1709,  1712,
    1718,  1728,  1738,  1749,  1752,  1761,  1766,  1789,  1794,  1802,
    1818,  1821,  1827,  1830,  1838,  1844,  1847,  1853,  1856,  1864,
    1867,  1875,  1878,  1886,  1889,  1902,  1905,  1911,  1916,  1917,
    1918,  1919,  1920,  1921,  1924,  1925,  1928,  1929,  1930,  1931,
    1933,  1934,  1937,  1938,  1941,  1942,  1943,  1946,  1962,  1967,
    1968,  1969,  1971,  1976,  1979,  1982,  1985,  1988,  1994,  1995,
    1996,  1997,  1998,  1999,  2000,  2001,  2002,  2003,  2007,  2008,
    2009,  2010,  2011,  2012,  2015,  2018,  2021,  2024,  2027,  2030,
    2033,  2036,  2039,  2042,  2045,  2048,  2061,  2074,  2089,  2090,
    2091,  2092,  2093,  2096,  2097,  2098,  2101,  2102,  2103,  2106,
    2107,  2108,  2112,  2113,  2114,  2117,  2118,  2119,  2120,  2121,
    2122,  2123,  2124,  2127,  2128,  2129,  2130,  2131,  2132,  2133,
    2134,  2135,  2138,  2146,  2156,  2164,  2174,  2182,  2200,  2209,
    2210,  2212,  2213,  2216,  2222,  2228,  2234,  2242,  2245,  2248,
    2253,  2263,  2270,  2277,  2287,  2292,  2299,  2309,  2314,  2321,
    2333,  2338,  2343,  2348,  2353,  2363,  2373,  2383,  2395,  2413,
    2444,  2448,  2454,  2455,  2456,  2458,  2461,  2462,  2465,  2468,
    2471,  2472,  2473,  2474,  2475,  2481,  2487,  2493,  2499,  2505,
    2511,  2517,  2523,  2528,  2531,  2537,  2538,  2540,  2546,  2547,
    2549,  2553,  2572,  2573,  2575,  2598,  2634,  2636,  2639,  2641,
    2643,  2645,  2647,  2649,  2651,  2658,  2665,  2672,  2679
};
#endif

/** Accessing symbol of state STATE.  */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])

#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
   YYSYMBOL.  No bounds checking.  */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;

/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "\"end of file\"", "error", "\"invalid token\"", "DROP", "ASSERT",
  "EXIT", "RETURN", "LOG_TOK", "ERROR", "ROUTE", "ROUTE_FAILURE",
  "ROUTE_ONREPLY", "ROUTE_BRANCH", "ROUTE_ERROR", "ROUTE_LOCAL",
  "ROUTE_STARTUP", "ROUTE_TIMER", "ROUTE_EVENT", "IF", "ELSE", "SWITCH",
  "CASE", "DEFAULT", "BREAK", "WHILE", "FOR", "IN", "READONLY", "EXPIRE",
  "NULLV", "XDBG", "XLOG", "XLOG_BUF_SIZE", "XLOG_FORCE_COLOR",
  "XLOG_PRINT_LEVEL", "XLOG_LEVEL", "PV_PRINT_BUF_SIZE", "DEBUG_MODE",
  "ENABLE_ASSERTS", "ABORT_ON_ASSERT", "LOGLEVEL", "LOGPREFIX",
  "LOGSTDOUT", "STDERROR_ENABLED", "SYSLOG_ENABLED", "LOG_EVENT_ENABLED",
  "STDERROR_LEVEL_FILTER", "SYSLOG_LEVEL_FILTER", "LOG_EVENT_LEVEL_FILTER",
  "STDERROR_FORMAT", "SYSLOG_FORMAT", "LOG_JSON_BUF_SIZE",
  "LOG_MSG_BUF_SIZE", "SYSLOG_FACILITY", "SYSLOG_NAME", "AVP_ALIASES",
  "SOCKET", "MEMGROUP", "ALIAS", "AUTO_ALIASES", "TAG", "DNS", "REV_DNS",
  "DNS_TRY_IPV6", "DNS_TRY_NAPTR", "DNS_RETR_TIME", "DNS_RETR_NO",
  "DNS_SERVERS_NO", "DNS_USE_SEARCH", "MAX_WHILE_LOOPS", "UDP_WORKERS",
  "CHECK_VIA", "SHM_HASH_SPLIT_PERCENTAGE", "SHM_SECONDARY_HASH_SIZE",
  "MEM_WARMING_ENABLED", "MEM_WARMING_PATTERN_FILE",
  "MEM_WARMING_PERCENTAGE", "RPM_MEM_FILE", "RPM_MEM_SIZE", "MEMLOG",
  "MEMDUMP", "SHM_MEMLOG_SIZE", "EXECMSGTHRESHOLD", "EXECDNSTHRESHOLD",
  "TCPTHRESHOLD", "EVENT_SHM_THRESHOLD", "EVENT_PKG_THRESHOLD",
  "QUERYBUFFERSIZE", "QUERYFLUSHTIME", "SIP_WARNING", "SERVER_SIGNATURE",
  "SERVER_HEADER", "USER_AGENT_HEADER", "LOADMODULE", "MPATH", "MODPARAM",
  "MAXBUFFER", "CHROOT", "WDIR", "MHOMED", "POLL_METHOD",
  "TCP_ACCEPT_ALIASES", "TCP_WORKERS", "TCP_CONNECT_TIMEOUT",
  "TCP_CON_LIFETIME", "TCP_SOCKET_BACKLOG", "TCP_MAX_CONNECTIONS",
  "TCP_NO_NEW_CONN_BFLAG", "TCP_NO_NEW_CONN_RPLFLAG", "TCP_KEEPALIVE",
  "TCP_KEEPCOUNT", "TCP_KEEPIDLE", "TCP_KEEPINTERVAL", "TCP_MAX_MSG_TIME",
  "TCP_THREADS", "ADVERTISED_ADDRESS", "ADVERTISED_PORT", "DISABLE_CORE",
  "OPEN_FD_LIMIT", "MCAST_LOOPBACK", "MCAST_TTL", "TOS",
  "DISABLE_DNS_FAILOVER", "DISABLE_DNS_BLACKLIST", "DST_BLACKLIST",
  "DISABLE_STATELESS_FWD", "DB_VERSION_TABLE", "DB_DEFAULT_URL",
  "DB_MAX_ASYNC_CONNECTIONS", "DISABLE_503_TRANSLATION", "SYNC_TOKEN",
  "ASYNC_TOKEN", "LAUNCH_TOKEN", "AUTO_SCALING_PROFILE",
  "AUTO_SCALING_CYCLE", "TIMER_WORKERS", "EQUAL", "EQUAL_T", "GT", "LT",
  "GTE", "LTE", "DIFF", "MATCH", "NOTMATCH", "COLONEQ", "PLUSEQ",
  "MINUSEQ", "SLASHEQ", "MULTEQ", "MODULOEQ", "BANDEQ", "BOREQ", "BXOREQ",
  "OR", "AND", "BOR", "BAND", "BXOR", "BLSHIFT", "BRSHIFT", "PLUS",
  "MINUS", "MULT", "MODULO", "NOT", "BNOT", "NUMBER", "ZERO", "ID",
  "STRING", "SCRIPTVAR", "IPV6ADDR", "IPV4ADDR", "IPNET", "COMMA",
  "SEMICOLON", "RPAREN", "LPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK",
  "SLASH", "AS", "USE_WORKERS", "SOCK_TOS", "USE_AUTO_SCALING_PROFILE",
  "MAX", "MIN", "DOT", "CR", "COLON", "ANY", "ANYCAST", "ACCEPT_SUBDOMAIN",
  "FRAG", "REUSE_PORT", "ALLOW_PROXY_PROTOCOL", "SEND_PROXY_PROTOCOL",
  "PROXY_PROTOCOL", "SCRIPTVARERR", "SCALE_UP_TO", "SCALE_DOWN_TO", "ON",
  "CYCLES", "CYCLES_WITHIN", "PERCENTAGE", "BOND", "$accept", "cfg",
  "statements", "statement", "$@1", "$@2", "$@3", "$@4", "$@5", "$@6",
  "$@7", "$@8", "$@9", "listen_id", "host_sep", "host", "proto", "port",
  "portrange", "snumber", "phostport", "phostportrange", "any_alias",
  "alias_def", "id_lst", "listen_id_def", "socket_def_param",
  "socket_def_params", "socket_bond_elems", "socket_def", "$@10",
  "any_proto", "multi_string", "blst_elem", "blst_def", "blst_flag",
  "blst_flags", "blst_elem_list", "mpath_def_list",
  "auto_scale_profile_def", "assign_stm", "module_stm", "ip", "ipv4",
  "ipv6addr", "ipv6", "ipnet", "folded_string", "route_name",
  "route_name_var", "route_stm", "failure_route_stm", "onreply_route_stm",
  "branch_route_stm", "error_route_stm", "local_route_stm",
  "startup_route_stm", "timer_route_stm", "event_route_stm", "exp",
  "equalop", "compop", "matchop", "intop", "strop", "script_var",
  "exp_elem", "exp_cond", "assignop", "assignexp", "assign_cmd", "exp_stm",
  "brk_stm", "stm", "actions", "brk_actions", "action", "brk_action",
  "brk_if_cmd", "if_cmd", "while_cmd", "foreach_cmd", "switch_cmd",
  "switch_stm", "case_stms", "case_stm", "default_stm", "func_param",
  "route_param", "async_func", "return_param", "return_params", "cmd", YY_NULLPTR
};

static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
  return yytname[yysymbol];
}
#endif

#define YYPACT_NINF (-918)

#define yypact_value_is_default(Yyn) \
  ((Yyn) == YYPACT_NINF)

#define YYTABLE_NINF (-468)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
    2133,   -60,   -57,   -49,   -19,     1,    15,    32,    55,   202,
     226,   242,   252,   270,   284,   295,   300,   332,   344,   374,
     385,   391,   397,   402,   437,   453,   479,   499,   504,   517,
     525,    29,    31,    45,    54,   188,   321,   528,   573,   594,
     604,   608,   613,   616,   627,   637,   647,   650,   668,   673,
     676,   684,   696,   700,   701,   716,   717,   723,   729,   733,
     743,   107,   761,     6,   762,   769,   773,   779,   792,   803,
     808,   825,   842,   849,   851,   856,   865,   873,   879,   885,
     889,   890,   891,   892,   900,   903,   914,   918,   919,   920,
     341,   378,   921,   936,   939,   940,   941,   943,   945,   950,
     951,  -918,   162,  2002,  -918,   556,   444,   363,   565,   585,
     703,   756,   902,   781,  -918,  -918,  -918,   340,   365,   380,
     238,   381,   389,   392,   407,   -40,   115,   409,   411,   429,
     441,   364,   367,   379,   552,   714,   442,   443,   130,   132,
       3,   787,   203,   446,   457,   458,  -918,   922,  -918,   925,
    -918,   926,  -918,   927,  -918,   931,  -918,   938,   464,   465,
     475,   481,   482,   493,   133,   505,   145,   514,   445,   461,
     472,   516,   522,   523,   538,   549,   557,   562,   578,   579,
     153,   155,  -918,  -918,   169,  -918,   807,   581,   106,   122,
     610,   128,   635,   640,   654,   655,   656,   657,   174,   194,
     658,   672,   677,   678,   687,   690,   186,   705,   706,   707,
     709,   710,    94,  -918,   942,  -918,   961,   780,   965,   170,
     187,   711,   713,   217,   732,   967,  -918,   -60,  -918,    24,
    -918,    42,  -918,    51,  -918,    46,  -918,    28,  -918,    63,
    -918,    74,  -918,    56,  -918,    57,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,   970,   972,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,   860,   896,   848,  -918,   915,
    -918,  1105,   949,  -918,  -918,  -918,   946,   953,  -918,  -117,
     954,  -918,   952,   615,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,   930,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,   958,   976,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,   966,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -148,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,   974,  -918,  -918,  -918,   968,  -918,  1830,
     234,  -918,   234,  -918,  1830,   234,  -918,   234,  -918,  1830,
    -918,  1830,  -918,  1830,  -918,   234,  -918,   234,  -918,  -918,
     983,   868,   916,   227,  -918,   981,   901,  -918,   265,   998,
     901,  -918,  -918,  1000,  1002,  1004,  1013,   623,  1006,  -918,
    1020,  1027,  1010,  1023,  1025,   749,    22,    53,    71,  1035,
    1036,  1037,  1038,  1039,  1040,  1041,  1044,    76,  -918,  -918,
    -918,  1559,  1022,   750,  -918,  -918,  -918,  -918,  -918,    18,
    -918,  -918,  -918,  1015,  1017,   810,  1042,  1043,   882,   928,
     964,  1030,  1048,  1047,  1045,  1046,  1063,   901,  1068,  1081,
    1082,  -918,  -918,  -918,  -918,  -918,  -918,  -918,   916,  -918,
    -918,  1083,  -918,  -918,  1062,  -918,  -918,  1065,  -918,  -918,
    1077,  -918,  -918,  -918,  -918,  -918,   -91,   782,  1051,  -918,
    1087,  1390,  1088,   628,  -918,  -918,  -918,   103,  -918,   228,
    -918,   182,  1390,  -108,  1390,  -108,  1089,  1090,  1097,  1097,
    -918,    73,  1251,  1252,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  1569,  -918,  -918,  -918,  -918,  -918,  -918,  1103,
    1104,  -918,  1107,  1109,  -918,  -918,  -918,  1100,  1111,  1121,
     734,   736,  -918,  1101,  -918,  -918,  -918,  -918,  -918,  -918,
      19,    26,   580,   623,  -918,   588,  -918,   674,  -918,  -918,
      61,  -918,  -918,  1125,  -918,  1390,  1390,  1589,  1569,  -918,
     -14,  1536,  -918,  -918,  -918,  -918,  -918,  -918,  -918,   308,
    -918,   -64,   264,  1119,  1138,  1120,  1140,  1143,  1148,  -918,
     275,  -918,     5,  1151,   240,  1311,   -45,   -35,   747,   -27,
      81,  1172,   278,  1171,  -918,   -23,  -918,  -918,  -918,   415,
    -918,  -918,  1569,  -918,  1569,  -918,  1169,  -918,  1331,  -918,
    1830,  1830,  1830,  1830,  1167,  1830,  1175,  1173,  -918,  1189,
    1177,  -918,  1177,   737,  -918,  -918,  -918,  -918,  -918,  -918,
     232,  1179,   251,  -918,   674,  -918,  -918,  -918,  1183,   546,
    -918,  1158,  -918,  1195,  -918,   283,  -918,   999,  1228,  1390,
    1390,  1190,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,   318,   -65,  -918,   -40,   -52,  -918,  -918,  -918,  -918,
    -918,   681,   308,  -918,   308,  -918,  -918,  -918,  1193,  -918,
    1194,  -918,   390,  -918,  1640,  1186,  1455,  -108,  -918,  -918,
    -918,  -918,  1196,  -918,  -918,  -918,   119,   234,   234,  -918,
    -918,  -918,  -918,  -918,  1019,  -918,  -918,  1273,  1569,  1569,
    1569,  1569,  1569,  1569,  1569,  1569,  1569,  1569,  1060,  1118,
    1153,  1203,  1192,  1238,  1121,  -918,  1206,  1208,  -918,  1177,
    -918,  -918,  -918,  1201,   693,  1021,  -125,  -918,  -918,  1352,
    -918,  -918,  -918,  -918,  -918,  1204,  -918,  -918,  -918,  -918,
    -918,   308,  -918,   748,   763,  1205,  1223,  -918,  -918,  -918,
    -918,   768,  1771,  1359,  -918,  1380,  1202,  1226,  -918,  1523,
    1227,  -918,  -918,  -918,  -918,  -918,  -918,    30,  1229,   294,
     360,  1235,  -918,   789,   816,   821,  -918,  -918,  -918,  -918,
     731,   731,   731,   731,   731,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -918,  1830,  -918,  -918,  -918,  1243,  1021,
    -125,  -918,   822,  1236,  1248,  -918,  -918,  -918,  -918,  -918,
    -918,   476,  -918,  -918,  1296,  1640,   813,  1237,   757,  -918,
    1390,  -918,  -918,   662,  -918,  -918,  -918,  -918,  1455,  -918,
    -918,  -918,  -918,  1249,  -918,  1253,  -918,  1337,  1255,   835,
    1242,  -125,  -918,  -918,   586,  -918,  -918,  -918,  -918,  -918,
    -918,  1232,  1233,  -918,  1234,  -918,  -918,   520,  -918,  -918,
    -918,  -918,  1261,  1263,  -918,  -918,  -125,  -918,  -918,   841,
    1239,  1274,  1822,  1822,  1822,  1455,  -918,  -918,   845,  1275,
    -918,  1276,  1241,   563,   596,   695,  1427,  1277,  -918,  1271,
    1245,  1284,  1455,  1278,  -918,  1285,  1250,  -918,  -918,  1289,
    1290,  1441,  1306,  1304,  1449,  1272,  1314,  -918,  1279,  -918
};

/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
   Performed when YYTABLE does not specify something else to do.  Zero
   means the default is an error.  */
static const yytype_int16 yydefact[] =
{
       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,     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,     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,    26,     0,     0,     4,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     6,     7,   316,     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,   158,     0,   160,     0,
     162,     0,   164,     0,   166,     0,   168,     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,   318,   317,     0,   322,     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,   298,     0,   300,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     1,     5,     3,     0,
       9,     0,    11,     0,    13,     0,    15,     0,    17,     0,
      19,     0,    21,     0,    23,     0,    25,   267,   264,   268,
     265,   269,   266,   271,     0,     0,    42,   270,   263,   262,
     128,   127,   124,   123,   126,   125,   120,   122,   121,   130,
     129,   132,   131,   134,   133,   136,   135,   138,   137,   140,
     139,   142,   141,   143,   144,   146,   145,   148,   147,   150,
     149,   152,   151,   273,    35,     0,     0,    83,   272,     0,
     277,     0,    32,    28,   326,   325,     0,     0,    55,    29,
       0,    59,    60,    62,   276,    27,   323,   327,   324,   279,
     278,   154,   153,   156,   155,   157,   159,   161,   163,   165,
     167,   170,   169,   175,   173,   179,   178,   181,   180,   183,
     182,   185,   184,   187,   186,   189,   188,   191,   190,   193,
     192,   195,   194,   199,   198,   197,   196,   201,   200,   203,
     202,   205,   204,   207,   206,   209,   208,   211,   210,   213,
     212,   215,   214,   257,   256,   259,   258,   261,   260,   296,
     115,   295,     0,   172,   171,   218,   217,   216,   221,   220,
     219,   223,   222,   226,   224,   225,   228,   227,   231,   229,
     233,   232,   235,   234,   237,   236,   239,   238,   241,   240,
     243,   242,   245,   244,   251,   250,   253,   252,   255,   254,
     247,   246,   249,   248,   281,    32,   280,   283,   282,   285,
     284,   287,   286,   289,   288,   291,   290,   294,   292,   293,
     297,   299,   105,   303,   305,   304,   307,   306,   309,   308,
     311,   310,   313,     0,   312,   315,   314,   176,   340,     0,
       0,   342,     0,   345,     0,     0,   347,     0,   349,     0,
     351,     0,   353,     0,   355,     0,   357,     0,    43,    44,
       0,     0,     0,     0,    48,     0,     0,    31,     0,     0,
       0,    61,    63,     0,     0,     0,     0,     0,     0,   302,
       0,     0,   500,     0,   502,   512,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   377,   441,
     378,     0,     0,     0,   430,   436,   437,   438,   439,     0,
     334,   333,   335,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    49,    50,     0,     0,     0,     0,
       0,    67,    70,    68,    69,    71,    72,    73,    79,    85,
     275,    89,   274,   328,    56,    34,    33,    45,   174,   114,
       0,   230,   108,   106,   107,   110,   105,     0,     0,   177,
       0,     0,     0,     0,   507,   504,   515,     0,   518,     0,
     522,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     527,     0,   388,   389,   390,   391,   392,   393,   394,   395,
     396,   397,     0,   440,   431,   338,   429,   442,   435,     0,
       0,   343,     0,     0,   348,   350,   352,     0,     0,     0,
       0,     0,    77,    64,    76,    74,    75,    78,    80,    90,
       0,     0,     0,     0,   301,     0,   329,     0,   104,   112,
       0,   330,   101,     0,   501,     0,     0,     0,     0,   381,
       0,   382,   363,   379,   420,   380,   419,   418,   503,     0,
     510,     0,     0,     0,     0,     0,     0,     0,     0,   336,
       0,   337,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   469,   471,   524,   474,   477,     0,
     416,   417,     0,   399,     0,   398,   400,   401,   415,   402,
       0,     0,     0,     0,     0,     0,    81,     0,    53,    41,
      51,    54,    52,     0,    58,    36,    37,    57,    47,    46,
       0,     0,     0,   109,     0,   102,    87,    88,     0,     0,
     113,     0,   103,     0,   360,     0,   422,     0,     0,     0,
       0,     0,   499,   364,   366,   367,   368,   369,   365,   370,
     371,   372,   373,   376,     0,     0,   495,   494,   493,   492,
     496,     0,     0,   508,     0,   505,   516,   513,     0,   519,
       0,   523,     0,   520,     0,     0,     0,     0,   331,   528,
     332,   529,     0,   530,   531,   491,     0,     0,     0,   538,
     526,   472,   475,   478,   473,   525,   413,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,    86,     0,     0,    66,    65,
     319,   321,   320,     0,     0,     0,     0,    99,   111,     0,
     361,   421,   362,   359,   358,     0,   386,   387,   385,   384,
     383,     0,   511,     0,     0,     0,     0,   482,   480,   481,
     483,     0,     0,   454,   426,     0,     0,     0,   450,     0,
       0,   456,   423,   445,   446,   447,   448,     0,     0,     0,
       0,     0,   488,     0,     0,     0,   470,   476,   479,   414,
     409,   408,   410,   411,   412,   403,   404,   405,   407,   406,
     339,   341,   344,   346,     0,   356,    82,    40,    39,     0,
       0,   100,     0,     0,     0,   498,   497,   509,   506,   514,
     517,     0,   521,   428,     0,     0,     0,     0,   460,   462,
       0,   443,   425,     0,   433,   449,   451,   444,     0,   532,
     533,   490,   489,     0,   534,     0,   537,     0,     0,     0,
       0,     0,    95,    97,     0,   487,   484,   485,   486,   427,
     455,     0,     0,   458,     0,   461,   459,     0,   434,   424,
     432,   457,     0,     0,   354,    38,     0,    96,    98,     0,
     119,     0,   466,   464,   468,     0,   535,   536,     0,     0,
      93,     0,   118,     0,     0,     0,   452,     0,    94,     0,
       0,     0,     0,     0,    91,     0,     0,   453,    92,     0,
       0,     0,     0,     0,     0,     0,     0,   117,     0,   116
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -918,  -918,  -918,  1379,  -918,  -918,  -918,  -918,  -918,  -918,
    -918,  -918,  -918,  -203,  -918,  -918,  -139,  -615,  -597,  -120,
    -918,  -918,  -918,  -918,  1170,  -918,  -918,   944,   675,  -918,
    -918,   764,   935,   759,   929,   858,  -918,  -918,  -918,  -918,
    -918,  -918,  -136,  -918,  1197,  -918,  -637,  -582,  -406,  -918,
    -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -918,  -570,
    -918,  -918,  -918,  -918,  -918,  -503,  -918,  -553,  -918,   462,
    -498,  -918,  -857,   582,  -455,  -917,  -502,  -133,  -918,  -541,
    -769,  -569,  -440,  -918,  -918,   576,  -918,   715,  -918,   910,
     659,  -256,  -482
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
       0,   102,   103,   104,   105,   106,   107,   108,   109,   110,
     111,   112,   113,   308,   489,   309,   310,   727,   720,   705,
     311,   297,   312,   313,   314,   634,   558,   559,   717,   298,
     482,   738,   562,   649,   499,   575,   576,   650,   381,   454,
     114,   115,   651,   316,   317,   318,   652,   687,   533,   680,
     230,   232,   234,   236,   238,   240,   242,   244,   246,   660,
     761,   762,   763,   764,   765,   521,   662,   707,   612,   708,
     522,   665,   871,   863,   523,   933,   524,   872,   873,   525,
     526,   527,   528,   927,   928,   929,   966,   699,   861,   691,
     770,   771,   529
};

/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule whose
   number is the opposite.  If YYTABLE_NINF, syntax error.  */
static const yytype_int16 yytable[] =
{
     257,   296,   585,   426,   293,   266,   315,   185,   735,   535,
     739,   278,   280,   282,   538,   689,   539,   874,   540,   617,
     724,   616,   682,   586,   684,   458,   729,   728,   663,   468,
     146,   936,   148,   616,   722,   497,   616,   616,   616,   663,
     666,   663,   725,   461,   498,   487,   150,   466,   352,   354,
     356,   666,   463,   666,   588,   152,   534,   474,   476,   536,
     732,   537,   740,   518,   470,   993,   994,   995,   726,   541,
     315,   542,   590,   488,   693,   472,   116,   600,   661,   117,
     672,   971,   795,   664,   643,   744,   745,   118,   681,   661,
     683,   661,   685,   520,   664,   437,   664,   834,   698,   667,
     874,   498,   663,   663,   673,  -375,  -375,   385,   182,   706,
     667,   772,   667,   773,   666,   666,   267,   119,   849,   518,
     881,   254,   255,   388,   847,   788,   829,   256,   996,   393,
     709,   289,   789,   291,   343,   790,  -375,   120,   254,   255,
     749,   750,   791,   790,   256,  1007,   347,   801,   518,   520,
     794,   121,   661,   661,   375,   706,   377,   664,   664,   749,
     750,   751,   226,   752,   874,   147,   769,   149,   122,   874,
     379,   444,   294,   667,   667,   408,   709,   315,   520,   843,
     844,   151,   784,   678,   186,   679,   725,   424,   446,   154,
     153,   123,   803,   725,   618,   410,   663,   663,   912,   706,
     587,   706,   747,   459,   300,   460,   937,   469,   666,   666,
     880,   295,   726,   874,   874,   874,   874,   875,   452,   726,
     709,   913,   709,   462,   874,   874,   874,   467,   560,   676,
     464,   589,   465,   874,   254,   255,   741,   475,   477,   253,
     256,   742,   471,   694,   518,   616,   661,   661,   695,   591,
     696,   664,   664,   473,   601,   818,   819,   820,   821,   796,
     823,   438,   850,   439,   254,   255,   565,   667,   667,   769,
     256,   769,   949,   674,   520,   386,   387,   183,   545,   860,
     254,   255,   864,   564,   878,   268,   256,   567,   870,   694,
     518,   389,   390,   698,   695,   950,   882,   394,   395,   290,
     875,   888,   292,   344,   877,   706,   706,   706,   706,   706,
     706,   706,   706,   706,   706,   348,   616,   616,   616,   616,
     520,   616,   156,   376,   155,   378,   709,   709,   709,   709,
     709,   709,   709,   709,   709,   709,   979,   766,   124,   380,
     445,   247,   213,   409,   633,   315,   876,   846,   769,   530,
     315,   531,   532,   518,   315,   425,   303,   447,   304,   305,
     967,   988,   125,   411,   875,   277,   249,   306,   279,   875,
     301,   870,   302,   303,   233,   304,   305,   663,   126,   215,
     281,   251,   258,   520,   306,   584,   453,   877,   127,   666,
     260,   884,   885,   262,   749,   750,   307,   561,   677,   254,
     255,   530,   788,   531,   532,   256,   128,   924,   264,   830,
     269,   315,   271,   875,   875,   875,   875,   786,   958,   857,
     129,   790,   616,   864,   875,   875,   875,   661,   832,   876,
     273,   130,   664,   875,   -30,   870,   131,   749,   750,   774,
     870,   775,   275,   285,   287,   616,   351,   319,   667,   947,
     782,   877,   783,   798,   231,   799,   877,   157,   321,   323,
     840,   659,   353,   671,   788,   331,   333,   675,   132,   254,
     255,   939,   659,   355,   659,   256,   335,   214,   767,   518,
     133,   697,   337,   339,   870,   870,   870,   870,  -374,  -374,
     304,   305,   646,   876,   341,   870,   870,   870,   876,   306,
     877,   877,   877,   877,   870,   955,   345,   248,   737,   520,
     134,   877,   877,   877,   216,   349,   853,   357,   854,  -374,
     877,   135,   731,   359,   361,   254,   255,   136,   254,   255,
     790,   256,   250,   137,   256,   659,   659,   940,   138,   363,
     254,   255,   876,   876,   876,   876,   256,   252,   259,   768,
     365,   254,   255,   876,   876,   876,   261,   256,   367,   263,
     858,   518,   876,   369,   968,   229,   502,   503,   504,   505,
     506,   507,   508,   139,   265,   802,   270,   235,   272,   371,
     373,   866,   383,   510,  -465,  -465,   867,   511,   512,   140,
     804,   520,   805,   513,   514,   737,   274,   968,   237,   502,
     503,   504,   505,   506,   507,   508,   254,   255,   276,   286,
     288,   391,   256,   320,   866,   141,   510,  -463,  -463,   867,
     511,   512,   254,   255,   322,   324,   513,   514,   256,   659,
     659,   332,   334,   254,   255,   142,   396,   254,   255,   256,
     143,   398,   336,   256,   848,   572,   956,   518,   338,   340,
     573,   574,   768,   144,   768,   400,   402,   404,   406,   412,
     342,   145,   859,   968,   158,   502,   503,   504,   505,   506,
     507,   508,   346,   414,   749,   750,   697,   520,   416,   418,
     866,   350,   510,   358,   887,   867,   511,   512,   420,   360,
     362,   422,   513,   514,   515,   516,   968,   985,   502,   503,
     504,   505,   506,   507,   508,   364,   427,   429,   431,   159,
     433,   435,   448,   866,   450,   510,   366,   239,   867,   511,
     512,   836,   283,   837,   368,   513,   514,   515,   516,   370,
     160,   768,   517,   455,   518,   718,   934,   721,   828,   868,
     161,   254,   255,  -465,   162,   372,   374,   256,   384,   163,
     730,   614,   164,   502,   503,   504,   505,   506,   507,   508,
     304,   305,   646,   165,   520,   517,   734,   518,   509,   306,
     510,   241,   868,   166,   511,   512,  -463,   392,   926,   964,
     513,   514,   301,   167,   302,   303,   168,   304,   305,   254,
     255,   980,   981,   515,   516,   256,   306,   520,   245,   518,
     970,   957,   397,   669,   169,   670,   962,   399,   307,   170,
     659,   614,   171,   502,   503,   504,   505,   506,   507,   508,
     172,   401,   403,   405,   407,   413,   515,   516,   509,   520,
     510,   517,   173,   518,   511,   512,   174,   175,   868,   415,
     513,   514,   969,   294,   417,   419,   304,   305,   646,   934,
     934,   934,   176,   177,   421,   306,   851,   423,   852,   178,
     970,   970,   970,   520,   517,   179,   518,   736,   910,   180,
     911,   868,   428,   430,   432,  -467,   434,   436,   449,   181,
     451,   515,   516,   614,   284,   502,   503,   504,   505,   506,
     507,   508,   813,   814,   815,   816,   520,   184,   187,   456,
     509,   719,   510,   719,   719,   188,   511,   512,   -84,   189,
     254,   255,   513,   514,   817,   190,   256,   788,   243,   517,
     518,   518,   792,   851,   793,   917,   519,   583,   191,   614,
     615,   502,   503,   504,   505,   506,   507,   508,   851,   192,
     918,   515,   516,   921,   193,   922,   509,   645,   510,   442,
     520,   520,   511,   512,   304,   305,   646,   299,   513,   514,
     647,   194,   648,   306,   804,   614,   942,   502,   503,   504,
     505,   506,   507,   508,   254,   255,   546,   382,   195,   517,
     256,   518,   509,   961,   510,   196,   519,   197,   511,   512,
     621,   943,   198,   944,   513,   514,   945,   951,   946,   952,
     614,   199,   502,   503,   504,   505,   506,   507,   508,   200,
     976,   520,   977,   515,   516,   201,   989,   509,   990,   510,
     997,   202,   998,   511,   512,   203,   204,   205,   206,   513,
     514,   544,   -84,   -84,   -84,   -84,   207,   425,   303,   208,
     304,   305,   -84,   -84,   -84,   -84,   -84,   -84,   -84,   306,
     209,   517,   480,   518,   210,   211,   212,   217,   519,   515,
     516,   614,   624,   502,   503,   504,   505,   506,   507,   508,
     425,   303,   218,   304,   305,   219,   220,   221,   509,   222,
     510,   223,   306,   520,   511,   512,   224,   225,   481,   325,
     513,   514,   326,   327,   328,   515,   516,   517,   329,   518,
     547,   548,   549,   550,   519,   330,   484,   483,   625,   440,
     551,   552,   553,   554,   555,   556,   557,   493,   304,   614,
     748,   502,   503,   504,   505,   506,   507,   508,   441,   520,
     515,   516,   443,   517,   457,   518,   509,   478,   510,   479,
     519,   -35,   511,   512,   626,   486,   490,   491,   513,   514,
     494,   495,   543,   496,   614,   501,   502,   503,   504,   505,
     506,   507,   508,   563,   806,   520,   807,   566,   517,   568,
     518,   509,   569,   510,   570,   519,   500,   511,   512,   841,
     254,   255,   571,   513,   514,   577,   256,   578,   580,   886,
     518,   515,   516,   304,   305,   646,   579,   619,   613,   620,
     520,   581,   306,   582,   614,   627,   502,   503,   504,   505,
     506,   507,   508,   592,   593,   594,   595,   596,   597,   598,
     520,   509,   599,   510,   622,   623,   629,   511,   512,   517,
     628,   518,   632,   513,   514,   635,   519,   630,   631,   614,
     900,   502,   503,   504,   505,   506,   507,   508,   636,   515,
     516,   637,   642,   561,   640,   653,   509,   641,   510,   686,
     688,   520,   511,   512,   654,   668,   690,   714,   513,   514,
     890,   891,   892,   893,   894,   895,   896,   897,   898,   899,
     700,   701,   710,   711,   515,   516,   712,   517,   713,   518,
     715,   716,   743,   723,   519,   778,   776,   614,   901,   502,
     503,   504,   505,   506,   507,   508,   753,   754,   755,   756,
     757,   758,   759,   760,   509,   777,   510,   779,   780,   520,
     511,   512,   517,   645,   518,   781,   513,   514,   785,   519,
     304,   305,   646,   902,   515,   516,   647,   787,   614,   306,
     502,   503,   504,   505,   506,   507,   508,   797,   800,   822,
     824,   826,   827,   825,   520,   509,   831,   510,   835,   839,
     845,   511,   512,   855,   856,   865,   879,   513,   514,   515,
     516,   904,   517,   907,   518,   908,   909,   914,   925,   519,
     930,   915,   919,   903,   808,   809,   810,   811,   812,   813,
     814,   815,   816,   502,   503,   504,   505,   506,   507,   508,
     920,   926,   931,   935,   520,   948,   938,   517,   509,   518,
     842,   817,   941,   953,   519,   954,   972,   963,   905,   978,
     513,   514,   975,   973,   982,   983,   984,   515,   516,   808,
     809,   810,   811,   812,   813,   814,   815,   816,   986,   520,
     987,   992,   991,  1000,  1001,   999,  1002,  1003,  1004,  1005,
     889,  1006,  1009,  1011,  1010,  1008,   817,  1012,   502,   503,
     504,   505,   506,   507,   508,   517,  1013,   518,   515,   516,
    1014,  1015,   519,   866,  1016,   510,   959,  1017,   867,   511,
     512,  1018,   228,   492,  1019,   513,   514,   808,   809,   810,
     811,   812,   813,   814,   815,   816,   639,   520,   833,   906,
     838,   733,   638,   485,   965,   644,   517,   960,   518,   692,
     916,   883,     0,   519,   817,     0,     0,   974,     0,     0,
       0,   515,   516,     0,     0,     0,   502,   503,   504,   505,
     506,   507,   508,     0,     0,     0,     0,     0,   520,     0,
       0,   866,     0,   510,     0,     0,   867,   511,   512,     0,
       0,   254,   255,   513,   514,   655,     0,   256,     0,   517,
       0,   518,     0,     0,     0,     0,     0,     0,   656,   657,
       0,   658,   502,   503,   504,   505,   506,   507,   508,     0,
       0,     0,     0,     0,     0,     0,   515,   516,     0,     0,
       0,   520,   502,   503,   504,   505,   506,   507,   508,   513,
     514,     0,     0,     0,     0,     0,     0,   509,     0,   510,
       0,     0,     0,   511,   512,     0,     0,     0,     0,   513,
     514,     0,     0,     0,   517,     0,   518,     0,     0,     0,
       0,   868,     0,     0,   869,     0,     0,     0,     0,     0,
       0,     0,     0,   502,   503,   504,   505,   506,   507,   508,
       0,     0,     0,     0,   515,   516,   520,     0,   509,     0,
     510,     0,     0,     0,   511,   512,     0,     0,     0,     0,
     513,   514,   602,   753,   754,   755,   756,   757,   758,   759,
     760,   603,   604,   605,   606,   607,   608,   609,   610,   611,
       0,     0,   517,     0,   518,   602,     0,     0,     0,   868,
     515,   516,     0,   932,   603,   604,   605,   606,   607,   608,
     609,   610,   611,     0,     0,     0,     0,     0,     0,     0,
     515,   516,     0,     0,   520,     0,     0,     0,     0,     0,
     254,   255,     0,     0,     0,   702,   256,     0,   517,   703,
     518,     0,     0,     0,     0,     0,     0,   704,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   517,     0,
     518,     0,     0,     0,     0,   519,     0,     0,     0,   746,
     520,   515,   516,     0,   502,   503,   504,   505,   506,   507,
     508,     0,     0,     0,     0,     0,     0,     0,     0,   509,
     520,   510,     0,     0,     0,   511,   512,     0,     0,     0,
       0,   513,   514,     0,     0,     0,     0,     0,     0,   517,
       0,   518,     0,     0,     0,     0,   519,     0,     0,   862,
       0,     0,     0,     0,     0,   502,   503,   504,   505,   506,
     507,   508,     0,   502,   503,   504,   505,   506,   507,   508,
     866,   520,   510,     0,     0,   867,   511,   512,   509,     0,
     510,     0,   513,   514,   511,   512,     0,     0,     0,     0,
     513,   514,     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,
       0,     0,   515,   516,     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,
     517,     0,   518,     0,     0,     0,     0,   519,     0,     0,
       0,   923,     0,   515,   516,     0,     0,     0,     0,     0,
       0,   515,   516,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   520,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   517,     0,   518,     0,     0,     0,     0,   868,   517,
       0,   518,    -2,   227,     0,     0,   519,     0,     0,     0,
       0,    -8,   -10,   -12,   -14,   -16,   -18,   -20,   -22,   -24,
       0,     0,     0,   520,     0,     0,     0,     0,     0,     0,
       0,   520,     0,     0,     2,     3,     4,     5,     6,     7,
       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,     0,    25,    26,
      27,    28,     0,    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,
      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,     0,     0,     1,    98,    99,   100,     0,     0,
       0,     0,    -8,   -10,   -12,   -14,   -16,   -18,   -20,   -22,
     -24,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     2,     3,     4,     5,     6,
       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
      17,    18,    19,    20,    21,    22,    23,    24,     0,    25,
      26,    27,    28,   101,    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,    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,     0,     0,     0,    98,    99,   100,     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,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   101
};

static const yytype_int16 yycheck[] =
{
     120,   140,   505,   206,     1,   125,   142,     1,   645,   464,
     647,   131,   132,   133,   469,   597,   471,   786,   473,     1,
       1,   523,   592,     1,   594,     1,   641,     1,   581,     1,
       1,     1,     1,   535,   631,   183,   538,   539,   540,   592,
     581,   594,   167,     1,   192,   162,     1,     1,   168,   169,
     170,   592,     1,   594,     1,     1,   462,     1,     1,   465,
     642,   467,     1,   171,     1,   982,   983,   984,   193,   475,
     206,   477,     1,   190,     1,     1,   136,     1,   581,   136,
     583,   938,     1,   581,   175,   655,   656,   136,   591,   592,
     593,   594,   595,   201,   592,     1,   594,   734,   601,   581,
     869,   192,   655,   656,     1,   170,   171,     1,     1,   612,
     592,   175,   594,   177,   655,   656,     1,   136,   170,   171,
       1,   161,   162,     1,   761,   170,   723,   167,   985,     1,
     612,     1,   177,     1,     1,   170,   201,   136,   161,   162,
     154,   155,   177,   170,   167,  1002,     1,   170,   171,   201,
     177,   136,   655,   656,     1,   658,     1,   655,   656,   154,
     155,   175,     0,   177,   933,   136,   669,   136,   136,   938,
       1,     1,   169,   655,   656,     1,   658,   313,   201,   749,
     750,   136,   177,     1,   178,   591,   167,     1,     1,     1,
     136,   136,   695,   167,   176,     1,   749,   750,   835,   702,
     178,   704,   657,   179,     1,   181,   176,   179,   749,   750,
     792,   208,   193,   982,   983,   984,   985,   786,     1,   193,
     702,   836,   704,   181,   993,   994,   995,   181,     1,     1,
     179,   178,   181,  1002,   161,   162,   175,   181,   181,     1,
     167,   180,   179,   170,   171,   747,   749,   750,   175,   178,
     177,   749,   750,   179,   178,   710,   711,   712,   713,   178,
     715,   167,   765,   169,   161,   162,     1,   749,   750,   772,
     167,   774,   909,   170,   201,   169,   170,   170,   481,   782,
     161,   162,   784,   486,   787,   170,   167,   490,   786,   170,
     171,   169,   170,   796,   175,   910,   177,   169,   170,   169,
     869,   804,   170,   170,   786,   808,   809,   810,   811,   812,
     813,   814,   815,   816,   817,   170,   818,   819,   820,   821,
     201,   823,     1,   170,   136,   170,   808,   809,   810,   811,
     812,   813,   814,   815,   816,   817,   951,    29,   136,   170,
     170,     1,     1,   169,   547,   481,   786,    29,   851,   167,
     486,   169,   170,   171,   490,   169,   170,   170,   172,   173,
     930,   976,   136,   169,   933,     1,     1,   181,     1,   938,
     167,   869,   169,   170,    11,   172,   173,   930,   136,     1,
       1,     1,     1,   201,   181,   505,   169,   869,   136,   930,
       1,   797,   798,     1,   154,   155,   193,   170,   170,   161,
     162,   167,   170,   169,   170,   167,   136,   862,     1,   177,
       1,   547,     1,   982,   983,   984,   985,   177,   921,    29,
     136,   170,   924,   925,   993,   994,   995,   930,   177,   869,
       1,   136,   930,  1002,   169,   933,   136,   154,   155,   175,
     938,   177,     1,     1,     1,   947,     1,     1,   930,   904,
     175,   933,   177,   175,    10,   177,   938,   136,     1,     1,
     177,   581,     1,   583,   170,     1,     1,   587,   136,   161,
     162,   177,   592,     1,   594,   167,     1,   136,   170,   171,
     136,   601,     1,     1,   982,   983,   984,   985,   170,   171,
     172,   173,   174,   933,     1,   993,   994,   995,   938,   181,
     982,   983,   984,   985,  1002,    29,     1,   167,   647,   201,
     136,   993,   994,   995,   136,     1,   772,     1,   774,   201,
    1002,   136,   642,     1,     1,   161,   162,   136,   161,   162,
     170,   167,   167,   136,   167,   655,   656,   177,   136,     1,
     161,   162,   982,   983,   984,   985,   167,   167,   167,   669,
       1,   161,   162,   993,   994,   995,   167,   167,     1,   167,
     170,   171,  1002,     1,     1,     9,     3,     4,     5,     6,
       7,     8,     9,   136,   167,   695,   167,    12,   167,     1,
       1,    18,     1,    20,    21,    22,    23,    24,    25,   136,
     175,   201,   177,    30,    31,   734,   167,     1,    13,     3,
       4,     5,     6,     7,     8,     9,   161,   162,   167,   167,
     167,     1,   167,   167,    18,   136,    20,    21,    22,    23,
      24,    25,   161,   162,   167,   167,    30,    31,   167,   749,
     750,   167,   167,   161,   162,   136,     1,   161,   162,   167,
     136,     1,   167,   167,   764,    22,   170,   171,   167,   167,
      27,    28,   772,   136,   774,     1,     1,     1,     1,     1,
     167,   136,   782,     1,   136,     3,     4,     5,     6,     7,
       8,     9,   167,     1,   154,   155,   796,   201,     1,     1,
      18,   167,    20,   167,   804,    23,    24,    25,     1,   167,
     167,     1,    30,    31,   131,   132,     1,   177,     3,     4,
       5,     6,     7,     8,     9,   167,     1,     1,     1,   136,
       1,     1,     1,    18,     1,    20,   167,    14,    23,    24,
      25,   175,   170,   177,   167,    30,    31,   131,   132,   167,
     136,   851,   169,     1,   171,     1,   869,     1,     1,   176,
     136,   161,   162,   180,   136,   167,   167,   167,   167,   136,
     170,     1,   136,     3,     4,     5,     6,     7,     8,     9,
     172,   173,   174,   136,   201,   169,   178,   171,    18,   181,
      20,    15,   176,   136,    24,    25,   180,   167,    21,    22,
      30,    31,   167,   136,   169,   170,   136,   172,   173,   161,
     162,   205,   206,   131,   132,   167,   181,   201,    17,   171,
     933,   921,   167,   175,   136,   177,   926,   167,   193,   136,
     930,     1,   136,     3,     4,     5,     6,     7,     8,     9,
     136,   167,   167,   167,   167,   167,   131,   132,    18,   201,
      20,   169,   136,   171,    24,    25,   136,   136,   176,   167,
      30,    31,   180,   169,   167,   167,   172,   173,   174,   982,
     983,   984,   136,   136,   167,   181,   175,   167,   177,   136,
     993,   994,   995,   201,   169,   136,   171,   193,   175,   136,
     177,   176,   167,   167,   167,   180,   167,   167,   167,   136,
     167,   131,   132,     1,   170,     3,     4,     5,     6,     7,
       8,     9,   161,   162,   163,   164,   201,   136,   136,   167,
      18,   167,    20,   167,   167,   136,    24,    25,    60,   136,
     161,   162,    30,    31,   183,   136,   167,   170,    16,   169,
     171,   171,   175,   175,   177,   177,   176,   178,   136,     1,
     180,     3,     4,     5,     6,     7,     8,     9,   175,   136,
     177,   131,   132,   175,   136,   177,    18,   165,    20,   169,
     201,   201,    24,    25,   172,   173,   174,   170,    30,    31,
     178,   136,   180,   181,   175,     1,   177,     3,     4,     5,
       6,     7,     8,     9,   161,   162,    60,   170,   136,   169,
     167,   171,    18,   170,    20,   136,   176,   136,    24,    25,
     180,   175,   136,   177,    30,    31,   175,   175,   177,   177,
       1,   136,     3,     4,     5,     6,     7,     8,     9,   136,
     175,   201,   177,   131,   132,   136,   175,    18,   177,    20,
     175,   136,   177,    24,    25,   136,   136,   136,   136,    30,
      31,   163,   184,   185,   186,   187,   136,   169,   170,   136,
     172,   173,   194,   195,   196,   197,   198,   199,   200,   181,
     136,   169,   192,   171,   136,   136,   136,   136,   176,   131,
     132,     1,   180,     3,     4,     5,     6,     7,     8,     9,
     169,   170,   136,   172,   173,   136,   136,   136,    18,   136,
      20,   136,   181,   201,    24,    25,   136,   136,   192,   167,
      30,    31,   167,   167,   167,   131,   132,   169,   167,   171,
     184,   185,   186,   187,   176,   167,     1,   192,   180,   167,
     194,   195,   196,   197,   198,   199,   200,   187,   172,     1,
     658,     3,     4,     5,     6,     7,     8,     9,   167,   201,
     131,   132,   167,   169,   167,   171,    18,   167,    20,   167,
     176,   192,    24,    25,   180,   192,   192,   195,    30,    31,
     192,   175,   169,   187,     1,   187,     3,     4,     5,     6,
       7,     8,     9,   182,   702,   201,   704,   169,   169,   169,
     171,    18,   170,    20,   170,   176,   202,    24,    25,   180,
     161,   162,   169,    30,    31,   179,   167,   167,   178,   170,
     171,   131,   132,   172,   173,   174,   169,   182,   176,   182,
     201,   178,   181,   178,     1,   175,     3,     4,     5,     6,
       7,     8,     9,   178,   178,   178,   178,   178,   178,   178,
     201,    18,   178,    20,   182,   182,   179,    24,    25,   169,
     182,   171,   169,    30,    31,   167,   176,   192,   192,     1,
     180,     3,     4,     5,     6,     7,     8,     9,   167,   131,
     132,   169,   175,   170,   192,   204,    18,   192,    20,   170,
     170,   201,    24,    25,   177,   177,   169,   167,    30,    31,
     808,   809,   810,   811,   812,   813,   814,   815,   816,   817,
      29,    29,   179,   179,   131,   132,   179,   169,   179,   171,
     179,   170,   167,   192,   176,   175,   177,     1,   180,     3,
       4,     5,     6,     7,     8,     9,   137,   138,   139,   140,
     141,   142,   143,   144,    18,   177,    20,   177,   175,   201,
      24,    25,   169,   165,   171,   177,    30,    31,   177,   176,
     172,   173,   174,   180,   131,   132,   178,    26,     1,   181,
       3,     4,     5,     6,     7,     8,     9,   175,   177,   182,
     175,   162,   175,   180,   201,    18,   177,    20,   175,   164,
     170,    24,    25,   170,   170,   179,   170,    30,    31,   131,
     132,   179,   169,   167,   171,   167,   175,    25,    19,   176,
     178,   177,   177,   180,   156,   157,   158,   159,   160,   161,
     162,   163,   164,     3,     4,     5,     6,     7,     8,     9,
     177,    21,   176,   176,   201,   162,   177,   169,    18,   171,
     182,   183,   177,   177,   176,   167,   167,   180,   180,   177,
      30,    31,   167,   170,   192,   192,   192,   131,   132,   156,
     157,   158,   159,   160,   161,   162,   163,   164,   177,   201,
     177,   167,   203,   167,   203,   170,    19,   170,   177,   204,
     177,   167,   167,   164,   204,   177,   183,   167,     3,     4,
       5,     6,     7,     8,     9,   169,    25,   171,   131,   132,
     164,   167,   176,    18,    25,    20,   180,   205,    23,    24,
      25,   167,   103,   313,   205,    30,    31,   156,   157,   158,
     159,   160,   161,   162,   163,   164,   561,   201,   734,   824,
     741,   643,   558,   306,   928,   576,   169,   925,   171,   599,
     851,   796,    -1,   176,   183,    -1,    -1,   180,    -1,    -1,
      -1,   131,   132,    -1,    -1,    -1,     3,     4,     5,     6,
       7,     8,     9,    -1,    -1,    -1,    -1,    -1,   201,    -1,
      -1,    18,    -1,    20,    -1,    -1,    23,    24,    25,    -1,
      -1,   161,   162,    30,    31,   165,    -1,   167,    -1,   169,
      -1,   171,    -1,    -1,    -1,    -1,    -1,    -1,   178,   179,
      -1,   181,     3,     4,     5,     6,     7,     8,     9,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   131,   132,    -1,    -1,
      -1,   201,     3,     4,     5,     6,     7,     8,     9,    30,
      31,    -1,    -1,    -1,    -1,    -1,    -1,    18,    -1,    20,
      -1,    -1,    -1,    24,    25,    -1,    -1,    -1,    -1,    30,
      31,    -1,    -1,    -1,   169,    -1,   171,    -1,    -1,    -1,
      -1,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     3,     4,     5,     6,     7,     8,     9,
      -1,    -1,    -1,    -1,   131,   132,   201,    -1,    18,    -1,
      20,    -1,    -1,    -1,    24,    25,    -1,    -1,    -1,    -1,
      30,    31,   136,   137,   138,   139,   140,   141,   142,   143,
     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
      -1,    -1,   169,    -1,   171,   136,    -1,    -1,    -1,   176,
     131,   132,    -1,   180,   145,   146,   147,   148,   149,   150,
     151,   152,   153,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     131,   132,    -1,    -1,   201,    -1,    -1,    -1,    -1,    -1,
     161,   162,    -1,    -1,    -1,   166,   167,    -1,   169,   170,
     171,    -1,    -1,    -1,    -1,    -1,    -1,   178,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,
     171,    -1,    -1,    -1,    -1,   176,    -1,    -1,    -1,   180,
     201,   131,   132,    -1,     3,     4,     5,     6,     7,     8,
       9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    18,
     201,    20,    -1,    -1,    -1,    24,    25,    -1,    -1,    -1,
      -1,    30,    31,    -1,    -1,    -1,    -1,    -1,    -1,   169,
      -1,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,   179,
      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
       8,     9,    -1,     3,     4,     5,     6,     7,     8,     9,
      18,   201,    20,    -1,    -1,    23,    24,    25,    18,    -1,
      20,    -1,    30,    31,    24,    25,    -1,    -1,    -1,    -1,
      30,    31,    -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,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   131,   132,    -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,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     169,    -1,   171,    -1,    -1,    -1,    -1,   176,    -1,    -1,
      -1,   180,    -1,   131,   132,    -1,    -1,    -1,    -1,    -1,
      -1,   131,   132,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   201,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   169,    -1,   171,    -1,    -1,    -1,    -1,   176,   169,
      -1,   171,     0,     1,    -1,    -1,   176,    -1,    -1,    -1,
      -1,     9,    10,    11,    12,    13,    14,    15,    16,    17,
      -1,    -1,    -1,   201,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   201,    -1,    -1,    32,    33,    34,    35,    36,    37,
      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
      48,    49,    50,    51,    52,    53,    54,    -1,    56,    57,
      58,    59,    -1,    61,    62,    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,   104,   105,   106,   107,
     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
     128,   129,    -1,    -1,     1,   133,   134,   135,    -1,    -1,
      -1,    -1,     9,    10,    11,    12,    13,    14,    15,    16,
      17,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    32,    33,    34,    35,    36,
      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
      47,    48,    49,    50,    51,    52,    53,    54,    -1,    56,
      57,    58,    59,   191,    61,    62,    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,   104,   105,   106,
     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
     127,   128,   129,    -1,    -1,    -1,   133,   134,   135,    -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,    -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,   191
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_int16 yystos[] =
{
       0,     1,    32,    33,    34,    35,    36,    37,    38,    39,
      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    56,    57,    58,    59,    61,
      62,    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,   104,   105,   106,   107,   108,   109,   110,   111,
     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
     122,   123,   124,   125,   126,   127,   128,   129,   133,   134,
     135,   191,   210,   211,   212,   213,   214,   215,   216,   217,
     218,   219,   220,   221,   249,   250,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,     1,   136,     1,   136,
       1,   136,     1,   136,     1,   136,     1,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,     1,   170,   136,     1,   178,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,     1,   136,     1,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,     0,     1,   212,     9,
     259,    10,   260,    11,   261,    12,   262,    13,   263,    14,
     264,    15,   265,    16,   266,    17,   267,     1,   167,     1,
     167,     1,   167,     1,   161,   162,   167,   228,     1,   167,
       1,   167,     1,   167,     1,   167,   228,     1,   170,     1,
     167,     1,   167,     1,   167,     1,   167,     1,   228,     1,
     228,     1,   228,   170,   170,     1,   167,     1,   167,     1,
     169,     1,   170,     1,   169,   208,   225,   230,   238,   170,
       1,   167,   169,   170,   172,   173,   181,   193,   222,   224,
     225,   229,   231,   232,   233,   251,   252,   253,   254,     1,
     167,     1,   167,     1,   167,   167,   167,   167,   167,   167,
     167,     1,   167,     1,   167,     1,   167,     1,   167,     1,
     167,     1,   167,     1,   170,     1,   167,     1,   170,     1,
     167,     1,   228,     1,   228,     1,   228,     1,   167,     1,
     167,     1,   167,     1,   167,     1,   167,     1,   167,     1,
     167,     1,   167,     1,   167,     1,   170,     1,   170,     1,
     170,   247,   170,     1,   167,     1,   169,   170,     1,   169,
     170,     1,   167,     1,   169,   170,     1,   167,     1,   167,
       1,   167,     1,   167,     1,   167,     1,   167,     1,   169,
       1,   169,     1,   167,     1,   167,     1,   167,     1,   167,
       1,   167,     1,   167,     1,   169,   222,     1,   167,     1,
     167,     1,   167,     1,   167,     1,   167,     1,   167,   169,
     167,   167,   169,   167,     1,   170,     1,   170,     1,   167,
       1,   167,     1,   169,   248,     1,   167,   167,     1,   179,
     181,     1,   181,     1,   179,   181,     1,   181,     1,   179,
       1,   179,     1,   179,     1,   181,     1,   181,   167,   167,
     192,   192,   239,   192,     1,   253,   192,   162,   190,   223,
     192,   195,   233,   187,   192,   175,   187,   183,   192,   243,
     202,   187,     3,     4,     5,     6,     7,     8,     9,    18,
      20,    24,    25,    30,    31,   131,   132,   169,   171,   176,
     201,   274,   279,   283,   285,   288,   289,   290,   291,   301,
     167,   169,   170,   257,   257,   283,   257,   257,   283,   283,
     283,   257,   257,   169,   163,   222,    60,   184,   185,   186,
     187,   194,   195,   196,   197,   198,   199,   200,   235,   236,
       1,   170,   241,   182,   222,     1,   169,   222,   169,   170,
     170,   169,    22,    27,    28,   244,   245,   179,   167,   169,
     178,   178,   178,   178,   228,   274,     1,   178,     1,   178,
       1,   178,   178,   178,   178,   178,   178,   178,   178,   178,
       1,   178,   136,   145,   146,   147,   148,   149,   150,   151,
     152,   153,   277,   176,     1,   180,   285,     1,   176,   182,
     182,   180,   182,   182,   180,   180,   180,   175,   182,   179,
     192,   192,   169,   222,   234,   167,   167,   169,   236,   241,
     192,   192,   175,   175,   243,   165,   174,   178,   180,   242,
     246,   251,   255,   204,   177,   165,   178,   179,   181,   228,
     268,   274,   275,   276,   279,   280,   288,   301,   177,   175,
     177,   228,   274,     1,   170,   228,     1,   170,     1,   257,
     258,   274,   268,   274,   268,   274,   170,   256,   170,   256,
     169,   298,   298,     1,   170,   175,   177,   228,   274,   296,
      29,    29,   166,   170,   178,   228,   274,   276,   278,   301,
     179,   179,   179,   179,   167,   179,   170,   237,     1,   167,
     227,     1,   227,   192,     1,   167,   193,   226,     1,   226,
     170,   228,   256,   244,   178,   255,   193,   225,   240,   255,
       1,   175,   180,   167,   268,   268,   180,   283,   278,   154,
     155,   175,   177,   137,   138,   139,   140,   141,   142,   143,
     144,   269,   270,   271,   272,   273,    29,   170,   228,   274,
     299,   300,   175,   177,   175,   177,   177,   177,   175,   177,
     175,   177,   175,   177,   177,   177,   177,    26,   170,   177,
     170,   177,   175,   177,   177,     1,   178,   175,   175,   177,
     177,   170,   228,   274,   175,   177,   278,   278,   156,   157,
     158,   159,   160,   161,   162,   163,   164,   183,   283,   283,
     283,   283,   182,   283,   175,   180,   162,   175,     1,   227,
     177,   177,   177,   240,   255,   175,   175,   177,   242,   164,
     177,   180,   182,   268,   268,   170,    29,   255,   228,   170,
     274,   175,   177,   300,   300,   170,   170,    29,   170,   228,
     274,   297,   179,   282,   285,   179,    18,    23,   176,   179,
     279,   281,   286,   287,   289,   290,   291,   301,   274,   170,
     256,     1,   177,   296,   257,   257,   170,   228,   274,   177,
     278,   278,   278,   278,   278,   278,   278,   278,   278,   278,
     180,   180,   180,   180,   179,   180,   237,   167,   167,   175,
     175,   177,   255,   226,    25,   177,   299,   177,   177,   177,
     177,   175,   177,   180,   283,    19,    21,   292,   293,   294,
     178,   176,   180,   284,   286,   176,     1,   176,   177,   177,
     177,   177,   177,   175,   177,   175,   177,   283,   162,   255,
     226,   175,   177,   177,   167,    29,   170,   228,   274,   180,
     282,   170,   228,   180,    22,   294,   295,   268,     1,   180,
     286,   281,   167,   170,   180,   167,   175,   177,   177,   226,
     205,   206,   192,   192,   192,   177,   177,   177,   226,   175,
     177,   203,   167,   284,   284,   284,   281,   175,   177,   170,
     167,   203,    19,   170,   177,   204,   167,   281,   177,   167,
     204,   164,   167,    25,   164,   167,    25,   205,   167,   205
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_int16 yyr1[] =
{
       0,   209,   210,   211,   211,   211,   212,   212,   213,   212,
     214,   212,   215,   212,   216,   212,   217,   212,   218,   212,
     219,   212,   220,   212,   221,   212,   212,   222,   222,   222,
     223,   223,   224,   224,   224,   225,   226,   226,   227,   227,
     227,   227,   228,   228,   228,   229,   229,   229,   229,   230,
     230,   230,   230,   230,   230,   231,   231,   231,   231,   231,
     232,   232,   233,   233,   234,   234,   234,   235,   235,   235,
     235,   235,   235,   235,   235,   235,   235,   235,   235,   236,
     236,   237,   237,   238,   239,   238,   238,   240,   240,   241,
     241,   242,   242,   242,   242,   242,   242,   242,   242,   242,
     242,   242,   242,   243,   243,   243,   244,   244,   244,   245,
     245,   246,   246,   246,   247,   247,   248,   248,   248,   248,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   249,   249,
     249,   249,   249,   249,   249,   249,   249,   250,   250,   250,
     250,   250,   250,   251,   251,   252,   253,   254,   254,   255,
     255,   256,   256,   257,   257,   257,   258,   258,   259,   259,
     259,   260,   260,   261,   261,   261,   262,   262,   263,   263,
     264,   264,   265,   265,   266,   266,   267,   267,   268,   268,
     268,   268,   268,   268,   269,   269,   270,   270,   270,   270,
     271,   271,   272,   272,   273,   273,   273,   274,   274,   275,
     275,   275,   275,   276,   276,   276,   276,   276,   277,   277,
     277,   277,   277,   277,   277,   277,   277,   277,   278,   278,
     278,   278,   278,   278,   278,   278,   278,   278,   278,   278,
     278,   278,   278,   278,   278,   279,   279,   279,   280,   280,
     280,   280,   280,   281,   281,   281,   282,   282,   282,   283,
     283,   283,   284,   284,   284,   285,   285,   285,   285,   285,
     285,   285,   285,   286,   286,   286,   286,   286,   286,   286,
     286,   286,   287,   287,   288,   288,   289,   290,   291,   292,
     292,   293,   293,   294,   294,   294,   294,   295,   295,   296,
     296,   296,   296,   296,   296,   296,   296,   296,   296,   296,
     297,   297,   297,   297,   297,   297,   297,   297,   298,   298,
     298,   298,   299,   299,   299,   299,   300,   300,   301,   301,
     301,   301,   301,   301,   301,   301,   301,   301,   301,   301,
     301,   301,   301,   301,   301,   301,   301,   301,   301,   301,
     301,   301,   301,   301,   301,   301,   301,   301,   301,   301,
     301,   301,   301,   301,   301,   301,   301,   301,   301
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     1,     2,     1,     2,     1,     1,     0,     2,
       0,     2,     0,     2,     0,     2,     0,     2,     0,     2,
       0,     2,     0,     2,     0,     2,     1,     1,     1,     1,
       1,     1,     1,     3,     3,     1,     1,     1,     5,     3,
       3,     1,     1,     2,     2,     3,     5,     5,     2,     3,
       3,     5,     5,     5,     5,     1,     3,     5,     5,     1,
       1,     2,     1,     2,     1,     3,     3,     1,     1,     1,
       1,     1,     1,     1,     2,     2,     2,     2,     2,     1,
       2,     1,     3,     1,     0,     3,     6,     1,     1,     1,
       2,     9,    10,     7,     8,     5,     6,     5,     6,     3,
       4,     1,     2,     4,     3,     0,     1,     1,     1,     3,
       1,     3,     1,     2,     3,     1,    18,    17,    10,     9,
       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,     3,
       2,     3,     2,     3,     2,     3,     2,     3,     2,     3,
       3,     3,     3,     3,     5,     3,     3,     5,     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,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       5,     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,
       3,     3,     3,     3,     5,     5,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     2,     3,
       2,     6,     4,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     2,     2,     2,     8,
       8,     8,     2,     1,     1,     1,     1,     1,     3,     1,
       1,     2,     2,     1,     1,     1,     1,     1,     4,     7,
       2,     7,     2,     4,     7,     2,     7,     2,     4,     2,
       4,     2,     4,     2,     9,     2,     7,     2,     3,     3,
       2,     3,     3,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     3,     3,     3,     3,     3,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     2,     3,     3,     3,     3,     1,     1,
       1,     3,     2,     1,     3,     2,     1,     3,     2,     2,
       1,     2,     2,     1,     2,     2,     1,     1,     1,     1,
       2,     1,     2,     2,     2,     1,     1,     1,     1,     2,
       1,     2,     5,     7,     5,     7,     5,     7,     7,     2,
       1,     2,     1,     4,     3,     4,     3,     3,     2,     1,
       3,     1,     2,     2,     1,     2,     3,     1,     2,     3,
       1,     1,     1,     1,     3,     3,     3,     3,     3,     4,
       4,     2,     1,     1,     1,     1,     1,     3,     6,     4,
       1,     3,     1,     3,     2,     4,     6,     2,     4,     6,
       3,     5,     1,     4,     6,     2,     4,     6,     2,     4,
       4,     6,     2,     4,     3,     4,     4,     2,     4,     4,
       4,     4,     6,     6,     6,     8,     8,     6,     4
};


enum { YYENOMEM = -2 };

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYNOMEM         goto yyexhaustedlab


#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                    \
  do                                                              \
    if (yychar == YYEMPTY)                                        \
      {                                                           \
        yychar = (Token);                                         \
        yylval = (Value);                                         \
        YYPOPSTACK (yylen);                                       \
        yystate = *yyssp;                                         \
        goto yybackup;                                            \
      }                                                           \
    else                                                          \
      {                                                           \
        yyerror (YY_("syntax error: cannot back up")); \
        YYERROR;                                                  \
      }                                                           \
  while (0)

/* Backward compatibility with an undocumented macro.
   Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF


/* 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 YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Kind, Value); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*-----------------------------------.
| Print this symbol's value on YYO.  |
`-----------------------------------*/

static void
yy_symbol_value_print (FILE *yyo,
                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  if (!yyvaluep)
    return;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/*---------------------------.
| Print this symbol on YYO.  |
`---------------------------*/

static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  yy_symbol_value_print (yyo, yykind, yyvaluep);
  YYFPRINTF (yyo, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

static void
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
                 int yyrule)
{
  int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
                       &yyvsp[(yyi + 1) - (yynrhs)]);
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, Rule); \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#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
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif






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

static void
yydestruct (const char *yymsg,
            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
  YY_USE (yyvaluep);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/* Lookahead token kind.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Number of syntax errors so far.  */
int yynerrs;




/*----------.
| yyparse.  |
`----------*/

int
yyparse (void)
{
    yy_state_fast_t yystate = 0;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus = 0;

    /* Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* Their size.  */
    YYPTRDIFF_T yystacksize = YYINITDEPTH;

    /* The state stack: array, bottom, top.  */
    yy_state_t yyssa[YYINITDEPTH];
    yy_state_t *yyss = yyssa;
    yy_state_t *yyssp = yyss;

    /* The semantic value stack: array, bottom, top.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs = yyvsa;
    YYSTYPE *yyvsp = yyvs;

  int yyn;
  /* The return value of yyparse.  */
  int yyresult;
  /* Lookahead symbol kind.  */
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;



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

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yychar = YYEMPTY; /* Cause a token to be read.  */

  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 -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  YY_IGNORE_USELESS_CAST_BEGIN
  *yyssp = YY_CAST (yy_state_t, yystate);
  YY_IGNORE_USELESS_CAST_END
  YY_STACK_PRINT (yyss, yyssp);

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    YYNOMEM;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

# if defined 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.  */
        yy_state_t *yyss1 = yyss;
        YYSTYPE *yyvs1 = yyvs;

        /* 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 (YY_("memory exhausted"),
                    &yyss1, yysize * YYSIZEOF (*yyssp),
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        YYNOMEM;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yy_state_t *yyss1 = yyss;
        union yyalloc *yyptr =
          YY_CAST (union yyalloc *,
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
        if (! yyptr)
          YYNOMEM;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

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

      YY_IGNORE_USELESS_CAST_BEGIN
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
                  YY_CAST (long, yystacksize)));
      YY_IGNORE_USELESS_CAST_END

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */


  if (yystate == YYFINAL)
    YYACCEPT;

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

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yylex ();
    }

  if (yychar <= YYEOF)
    {
      yychar = YYEOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == YYerror)
    {
      /* The scanner already issued an error message, process directly
         to error recovery.  But do not keep the error token as
         lookahead, it is too special and may lead us to an endless
         loop in error recovery. */
      yychar = YYUNDEF;
      yytoken = YYSYMBOL_YYerror;
      goto yyerrlab1;
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

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

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  /* Discard the shifted token.  */
  yychar = YYEMPTY;
  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];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 3: /* statements: statements statement  */
#line 534 "cfg.y"
                                     {}
#line 2544 "cfg.tab.c"
    break;

  case 4: /* statements: statement  */
#line 535 "cfg.y"
                            {}
#line 2550 "cfg.tab.c"
    break;

  case 5: /* statements: statements error  */
#line 536 "cfg.y"
                                   { yyerror(""); YYABORT;}
#line 2556 "cfg.tab.c"
    break;

  case 8: /* $@1: %empty  */
#line 541 "cfg.y"
                  {rt=REQUEST_ROUTE;}
#line 2562 "cfg.tab.c"
    break;

  case 10: /* $@2: %empty  */
#line 542 "cfg.y"
                  {rt=FAILURE_ROUTE;}
#line 2568 "cfg.tab.c"
    break;

  case 12: /* $@3: %empty  */
#line 543 "cfg.y"
                  {rt=ONREPLY_ROUTE;}
#line 2574 "cfg.tab.c"
    break;

  case 14: /* $@4: %empty  */
#line 544 "cfg.y"
                  {rt=BRANCH_ROUTE;}
#line 2580 "cfg.tab.c"
    break;

  case 16: /* $@5: %empty  */
#line 545 "cfg.y"
                  {rt=ERROR_ROUTE;}
#line 2586 "cfg.tab.c"
    break;

  case 18: /* $@6: %empty  */
#line 546 "cfg.y"
                  {rt=LOCAL_ROUTE;}
#line 2592 "cfg.tab.c"
    break;

  case 20: /* $@7: %empty  */
#line 547 "cfg.y"
                  {rt=STARTUP_ROUTE;}
#line 2598 "cfg.tab.c"
    break;

  case 22: /* $@8: %empty  */
#line 548 "cfg.y"
                  {rt=TIMER_ROUTE;}
#line 2604 "cfg.tab.c"
    break;

  case 24: /* $@9: %empty  */
#line 549 "cfg.y"
                  {rt=EVENT_ROUTE;}
#line 2610 "cfg.tab.c"
    break;

  case 27: /* listen_id: ip  */
#line 554 "cfg.y"
                                        { IFOR();
							tmp=ip_addr2a((yyvsp[0].ipaddr));
							if(tmp==0){
								LM_CRIT("cfg. parser: bad ip address.\n");
								(yyval.strval)=0;
							}else{
								(yyval.strval)=pkg_malloc(strlen(tmp)+1);
								if ((yyval.strval)==0){
									LM_CRIT("cfg. parser: out of memory.\n");
									YYABORT;
								}else{
									memcpy((yyval.strval), tmp, strlen(tmp)+1);
								}
							}
						}
#line 2630 "cfg.tab.c"
    break;

  case 28: /* listen_id: STRING  */
#line 569 "cfg.y"
                                        { IFOR();
							(yyval.strval)=pkg_malloc(strlen((yyvsp[0].strval))+1);
							if ((yyval.strval)==0){
									LM_CRIT("cfg. parser: out of memory.\n");
									YYABORT;
							}else{
									memcpy((yyval.strval), (yyvsp[0].strval), strlen((yyvsp[0].strval))+1);
							}
						}
#line 2644 "cfg.tab.c"
    break;

  case 29: /* listen_id: host  */
#line 578 "cfg.y"
                                        { IFOR();
							if ((yyvsp[0].strval)==0) {
								(yyval.strval) = 0;
							} else {
								(yyval.strval)=pkg_malloc(strlen((yyvsp[0].strval))+1);
								if ((yyval.strval)==0){
									LM_CRIT("cfg. parser: out of memory.\n");
									YYABORT;
								}else{
									memcpy((yyval.strval), (yyvsp[0].strval), strlen((yyvsp[0].strval))+1);
								}
							}
						}
#line 2662 "cfg.tab.c"
    break;

  case 30: /* host_sep: DOT  */
#line 593 "cfg.y"
                    {(yyval.strval)=".";}
#line 2668 "cfg.tab.c"
    break;

  case 31: /* host_sep: MINUS  */
#line 594 "cfg.y"
                              {(yyval.strval)="-"; }
#line 2674 "cfg.tab.c"
    break;

  case 32: /* host: ID  */
#line 597 "cfg.y"
                                        { (yyval.strval)=(yyvsp[0].strval); }
#line 2680 "cfg.tab.c"
    break;

  case 33: /* host: host host_sep ID  */
#line 598 "cfg.y"
                                { IFOR();
						(yyval.strval)=(char*)pkg_malloc(strlen((yyvsp[-2].strval))+1+strlen((yyvsp[0].strval))+1);
						if ((yyval.strval)==0){
							LM_CRIT("cfg. parser: memory allocation"
										" failure while parsing host\n");
							YYABORT;
						}else{
							memcpy((yyval.strval), (yyvsp[-2].strval), strlen((yyvsp[-2].strval)));
							(yyval.strval)[strlen((yyvsp[-2].strval))]=*(yyvsp[-1].strval);
							memcpy((yyval.strval)+strlen((yyvsp[-2].strval))+1, (yyvsp[0].strval), strlen((yyvsp[0].strval)));
							(yyval.strval)[strlen((yyvsp[-2].strval))+1+strlen((yyvsp[0].strval))]=0;
						}
						pkg_free((yyvsp[-2].strval)); pkg_free((yyvsp[0].strval));
					}
#line 2699 "cfg.tab.c"
    break;

  case 34: /* host: host DOT error  */
#line 612 "cfg.y"
                         { (yyval.strval)=0; pkg_free((yyvsp[-2].strval));
					yyerror("invalid hostname (use quotes if hostname "
						"has config keywords)"); }
#line 2707 "cfg.tab.c"
    break;

  case 35: /* proto: ID  */
#line 617 "cfg.y"
           { IFOR();
		if (parse_proto((unsigned char *)(yyvsp[0].strval), strlen((yyvsp[0].strval)), &i_tmp) < 0) {
			yyerrorf("cannot handle protocol <%s>\n", (yyvsp[0].strval));
			YYABORT;
		}
		pkg_free((yyvsp[0].strval));
		(yyval.intval) = i_tmp;
	 }
#line 2720 "cfg.tab.c"
    break;

  case 36: /* port: NUMBER  */
#line 627 "cfg.y"
                        { (yyval.intval)=(yyvsp[0].intval); }
#line 2726 "cfg.tab.c"
    break;

  case 37: /* port: ANY  */
#line 628 "cfg.y"
                                { (yyval.intval)=0; }
#line 2732 "cfg.tab.c"
    break;

  case 38: /* portrange: portrange COMMA NUMBER MINUS NUMBER  */
#line 631 "cfg.y"
                                               { IFOR();
				if ((yyvsp[-2].intval) > (yyvsp[0].intval)) {
					yyerrorf("invalid port range (%d > %d)\n", (int)(yyvsp[-2].intval), (int)(yyvsp[0].intval));
					YYABORT;
				}
				pr_tmp = mk_port_range((yyvsp[-2].intval), (yyvsp[0].intval));
				if (!pr_tmp) {
					yyerror("cannot allocate new portrange\n");
					YYABORT;
				}
				pr_tmp->next = (yyvsp[-4].portrange);
				(yyval.portrange) = pr_tmp;
			}
#line 2750 "cfg.tab.c"
    break;

  case 39: /* portrange: portrange COMMA NUMBER  */
#line 644 "cfg.y"
                                          { IFOR();
				pr_tmp = mk_port_range((yyvsp[0].intval), (yyvsp[0].intval));
				if (!pr_tmp) {
					yyerror("cannot allocate new portrange\n");
					YYABORT;
				}
				pr_tmp->next = (yyvsp[-2].portrange);
				(yyval.portrange) = pr_tmp;
			}
#line 2764 "cfg.tab.c"
    break;

  case 40: /* portrange: NUMBER MINUS NUMBER  */
#line 653 "cfg.y"
                                       { IFOR();
				if ((yyvsp[-2].intval) > (yyvsp[0].intval)) {
					yyerrorf("invalid port range (%d > %d)\n", (int)(yyvsp[-2].intval), (int)(yyvsp[0].intval));
					YYABORT;
				}
				(yyval.portrange)=mk_port_range((yyvsp[-2].intval), (yyvsp[0].intval));
			}
#line 2776 "cfg.tab.c"
    break;

  case 41: /* portrange: NUMBER  */
#line 660 "cfg.y"
                          { IFOR(); (yyval.portrange)=mk_port_range((yyvsp[0].intval), (yyvsp[0].intval)); }
#line 2782 "cfg.tab.c"
    break;

  case 42: /* snumber: NUMBER  */
#line 662 "cfg.y"
                        { (yyval.intval)=(yyvsp[0].intval); }
#line 2788 "cfg.tab.c"
    break;

  case 43: /* snumber: PLUS NUMBER  */
#line 663 "cfg.y"
                                { (yyval.intval)=(yyvsp[0].intval); }
#line 2794 "cfg.tab.c"
    break;

  case 44: /* snumber: MINUS NUMBER  */
#line 664 "cfg.y"
                                { (yyval.intval)=-(yyvsp[0].intval); }
#line 2800 "cfg.tab.c"
    break;

  case 45: /* phostport: proto COLON listen_id  */
#line 668 "cfg.y"
                                        { IFOR();
				(yyval.sockid)=mk_listen_id((yyvsp[0].strval), (yyvsp[-2].intval), 0); }
#line 2807 "cfg.tab.c"
    break;

  case 46: /* phostport: proto COLON listen_id COLON port  */
#line 670 "cfg.y"
                                                                { IFOR();
				(yyval.sockid)=mk_listen_id((yyvsp[-2].strval), (yyvsp[-4].intval), (yyvsp[0].intval));}
#line 2814 "cfg.tab.c"
    break;

  case 47: /* phostport: proto COLON listen_id COLON error  */
#line 672 "cfg.y"
                                                            {
				(yyval.sockid)=0;
				yyerror("port number expected");
				YYABORT;
				}
#line 2824 "cfg.tab.c"
    break;

  case 48: /* phostport: NUMBER error  */
#line 677 "cfg.y"
                                       { (yyval.sockid)=0;
				yyerror("protocol expected");
				YYABORT;
			}
#line 2833 "cfg.tab.c"
    break;

  case 49: /* phostportrange: proto COLON MULT  */
#line 685 "cfg.y"
                                                                { IFOR();
				(yyval.sockid)=mk_listen_id(0, (yyvsp[-2].intval), 0); }
#line 2840 "cfg.tab.c"
    break;

  case 50: /* phostportrange: proto COLON listen_id  */
#line 687 "cfg.y"
                                                { IFOR();
				(yyval.sockid)=mk_listen_id_range((yyvsp[0].strval), (yyvsp[-2].intval), 0); }
#line 2847 "cfg.tab.c"
    break;

  case 51: /* phostportrange: proto COLON MULT COLON portrange  */
#line 689 "cfg.y"
                                                                { IFOR();
				(yyval.sockid)=mk_listen_id_range(0, (yyvsp[-4].intval), (yyvsp[0].portrange)); }
#line 2854 "cfg.tab.c"
    break;

  case 52: /* phostportrange: proto COLON listen_id COLON portrange  */
#line 691 "cfg.y"
                                                                { IFOR();
				(yyval.sockid)=mk_listen_id_range((yyvsp[-2].strval), (yyvsp[-4].intval), (yyvsp[0].portrange)); }
#line 2861 "cfg.tab.c"
    break;

  case 53: /* phostportrange: proto COLON MULT COLON error  */
#line 693 "cfg.y"
                                                        { IFOR();
				(yyval.sockid)=0;
				yyerror("invalid port range");
				YYABORT;
			}
#line 2871 "cfg.tab.c"
    break;

  case 54: /* phostportrange: proto COLON listen_id COLON error  */
#line 698 "cfg.y"
                                                                { IFOR();
				(yyval.sockid)=0;
				yyerror("invalid port range");
				YYABORT;
			}
#line 2881 "cfg.tab.c"
    break;

  case 55: /* any_alias: listen_id  */
#line 705 "cfg.y"
                                                                        { IFOR();
				(yyval.sockid)=mk_listen_id((yyvsp[0].strval), PROTO_NONE, 0); }
#line 2888 "cfg.tab.c"
    break;

  case 56: /* any_alias: ANY COLON listen_id  */
#line 707 "cfg.y"
                                                                        { IFOR();
		 		(yyval.sockid)=mk_listen_id((yyvsp[0].strval), PROTO_NONE, 0); }
#line 2895 "cfg.tab.c"
    break;

  case 57: /* any_alias: ANY COLON listen_id COLON port  */
#line 709 "cfg.y"
                                                        { IFOR();
		 		(yyval.sockid)=mk_listen_id((yyvsp[-2].strval), PROTO_NONE, (yyvsp[0].intval)); }
#line 2902 "cfg.tab.c"
    break;

  case 58: /* any_alias: ANY COLON listen_id COLON error  */
#line 711 "cfg.y"
                                                        {
				(yyval.sockid)=0;
				yyerror(" port number expected");
				}
#line 2911 "cfg.tab.c"
    break;

  case 60: /* alias_def: any_alias  */
#line 718 "cfg.y"
                                              { (yyval.sockid)=(yyvsp[0].sockid); }
#line 2917 "cfg.tab.c"
    break;

  case 61: /* alias_def: any_alias ACCEPT_SUBDOMAIN  */
#line 719 "cfg.y"
                                              {
				(yyval.sockid)=(yyvsp[-1].sockid);
				(yyval.sockid)->flags |= SI_ACCEPT_SUBDOMAIN_ALIAS;
				}
#line 2926 "cfg.tab.c"
    break;

  case 62: /* id_lst: alias_def  */
#line 725 "cfg.y"
                                        { IFOR();  (yyval.sockid)=(yyvsp[0].sockid) ; }
#line 2932 "cfg.tab.c"
    break;

  case 63: /* id_lst: alias_def id_lst  */
#line 726 "cfg.y"
                                        { IFOR(); (yyval.sockid)=(yyvsp[-1].sockid); (yyval.sockid)->next=(yyvsp[0].sockid); }
#line 2938 "cfg.tab.c"
    break;

  case 64: /* listen_id_def: listen_id  */
#line 729 "cfg.y"
                                                                { IFOR();
					(yyval.sockid)=mk_listen_id((yyvsp[0].strval), PROTO_NONE, 0); }
#line 2945 "cfg.tab.c"
    break;

  case 65: /* listen_id_def: listen_id COLON portrange  */
#line 731 "cfg.y"
                                                                { IFOR();
					(yyval.sockid)=mk_listen_id_range((yyvsp[-2].strval), PROTO_NONE, (yyvsp[0].portrange)); }
#line 2952 "cfg.tab.c"
    break;

  case 66: /* listen_id_def: listen_id COLON error  */
#line 733 "cfg.y"
                                                      {
					(yyval.sockid)=0;
					yyerror(" port number expected");
					}
#line 2961 "cfg.tab.c"
    break;

  case 67: /* socket_def_param: ANYCAST  */
#line 739 "cfg.y"
                          { IFOR();
					p_tmp.flags |= SI_IS_ANYCAST;
					}
#line 2969 "cfg.tab.c"
    break;

  case 68: /* socket_def_param: FRAG  */
#line 742 "cfg.y"
                                       { IFOR();
					p_tmp.flags |= SI_FRAG;
					}
#line 2977 "cfg.tab.c"
    break;

  case 69: /* socket_def_param: REUSE_PORT  */
#line 745 "cfg.y"
                                             { IFOR();
					p_tmp.flags |= SI_REUSEPORT;
					}
#line 2985 "cfg.tab.c"
    break;

  case 70: /* socket_def_param: ACCEPT_SUBDOMAIN  */
#line 748 "cfg.y"
                                                   { IFOR();
					p_tmp.flags |= SI_ACCEPT_SUBDOMAIN_ALIAS;
					}
#line 2993 "cfg.tab.c"
    break;

  case 71: /* socket_def_param: ALLOW_PROXY_PROTOCOL  */
#line 751 "cfg.y"
                                                       { IFOR();
					p_tmp.flags |= SI_PROXY_IN;
					}
#line 3001 "cfg.tab.c"
    break;

  case 72: /* socket_def_param: SEND_PROXY_PROTOCOL  */
#line 754 "cfg.y"
                                                      { IFOR();
					p_tmp.flags |= SI_PROXY_OUT;
					}
#line 3009 "cfg.tab.c"
    break;

  case 73: /* socket_def_param: PROXY_PROTOCOL  */
#line 757 "cfg.y"
                                                 { IFOR();
					p_tmp.flags |= SI_PROXY;
					}
#line 3017 "cfg.tab.c"
    break;

  case 74: /* socket_def_param: USE_WORKERS NUMBER  */
#line 760 "cfg.y"
                                                     { IFOR();
					p_tmp.workers=(yyvsp[0].intval);
					}
#line 3025 "cfg.tab.c"
    break;

  case 75: /* socket_def_param: SOCK_TOS NUMBER  */
#line 763 "cfg.y"
                                                  { IFOR();
					p_tmp.tos=(yyvsp[0].intval);
					}
#line 3033 "cfg.tab.c"
    break;

  case 76: /* socket_def_param: AS listen_id_def  */
#line 766 "cfg.y"
                                                   { IFOR();
					p_tmp.socket = (yyvsp[0].sockid);
					}
#line 3041 "cfg.tab.c"
    break;

  case 77: /* socket_def_param: TAG ID  */
#line 769 "cfg.y"
                                         { IFOR();
					p_tmp.tag = (yyvsp[0].strval);
					}
#line 3049 "cfg.tab.c"
    break;

  case 78: /* socket_def_param: USE_AUTO_SCALING_PROFILE ID  */
#line 772 "cfg.y"
                                                              { IFOR();
					p_tmp.auto_scaling_profile=(yyvsp[0].strval);
					}
#line 3057 "cfg.tab.c"
    break;

  case 81: /* socket_bond_elems: STRING  */
#line 781 "cfg.y"
                               { IFOR();
				(yyval.bondlst) = new_socket_bond_elem((yyvsp[0].strval));
				if (!(yyval.bondlst)) {
					yyerror("failed to alloc BOND element\n");YYABORT;
				}
			}
#line 3068 "cfg.tab.c"
    break;

  case 82: /* socket_bond_elems: STRING COMMA socket_bond_elems  */
#line 787 "cfg.y"
                                                       { IFOR();
				(yyval.bondlst) = new_socket_bond_elem((yyvsp[-2].strval));
				if (!(yyval.bondlst)) {
					yyerror("failed to alloc BOND element\n");YYABORT;
				}
				(yyval.bondlst)->next = (yyvsp[0].bondlst);
			}
#line 3080 "cfg.tab.c"
    break;

  case 83: /* socket_def: phostportrange  */
#line 796 "cfg.y"
                                { (yyval.sockid)=(yyvsp[0].sockid); }
#line 3086 "cfg.tab.c"
    break;

  case 84: /* $@10: %empty  */
#line 797 "cfg.y"
                                         { IFOR();
					memset(&p_tmp, 0, sizeof(p_tmp));
				}
#line 3094 "cfg.tab.c"
    break;

  case 85: /* socket_def: phostportrange $@10 socket_def_params  */
#line 799 "cfg.y"
                                                        { IFOR();
					(yyval.sockid)=(yyvsp[-2].sockid); fill_socket_id(&p_tmp, (yyval.sockid));
				}
#line 3102 "cfg.tab.c"
    break;

  case 86: /* socket_def: BOND COLON ID LBRACE socket_bond_elems RBRACE  */
#line 802 "cfg.y"
                                                                        { IFOR();
				if (!mk_bond_id((yyvsp[-3].strval), (yyvsp[-1].bondlst))) {
					yyerror("failed to add new BOND socket\n");YYABORT;
				}
				(yyval.sockid) = NULL; /*trick to avoid being added as regular interface*/
				}
#line 3113 "cfg.tab.c"
    break;

  case 87: /* any_proto: ANY  */
#line 810 "cfg.y"
                        { (yyval.intval)=PROTO_NONE; }
#line 3119 "cfg.tab.c"
    break;

  case 88: /* any_proto: proto  */
#line 811 "cfg.y"
                                { (yyval.intval)=(yyvsp[0].intval); }
#line 3125 "cfg.tab.c"
    break;

  case 89: /* multi_string: STRING  */
#line 813 "cfg.y"
                       {  IFOR(); (yyval.multistr)=new_string((yyvsp[0].strval)); }
#line 3131 "cfg.tab.c"
    break;

  case 90: /* multi_string: STRING multi_string  */
#line 814 "cfg.y"
                                      { IFOR(); (yyval.multistr)=new_string((yyvsp[-1].strval)); (yyval.multistr)->next=(yyvsp[0].multistr); }
#line 3137 "cfg.tab.c"
    break;

  case 91: /* blst_elem: LPAREN any_proto COMMA ipnet COMMA port COMMA STRING RPAREN  */
#line 817 "cfg.y"
                                                                       {
				IFOR(pkg_free((yyvsp[-5].ipnet)));
				s_tmp.s=(yyvsp[-1].strval);
				s_tmp.len=strlen((yyvsp[-1].strval));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-5].ipnet),&s_tmp,(yyvsp[-3].intval),(yyvsp[-7].intval),0)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3150 "cfg.tab.c"
    break;

  case 92: /* blst_elem: NOT LPAREN any_proto COMMA ipnet COMMA port COMMA STRING RPAREN  */
#line 825 "cfg.y"
                                                                                  {
				IFOR(pkg_free((yyvsp[-5].ipnet)));
				s_tmp.s=(yyvsp[-1].strval);
				s_tmp.len=strlen((yyvsp[-1].strval));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-5].ipnet),&s_tmp,
				(yyvsp[-3].intval),(yyvsp[-7].intval),BLR_APPLY_CONTRARY)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3164 "cfg.tab.c"
    break;

  case 93: /* blst_elem: LPAREN any_proto COMMA ipnet COMMA port RPAREN  */
#line 834 "cfg.y"
                                                                 {
				IFOR(pkg_free((yyvsp[-3].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-3].ipnet),NULL,(yyvsp[-1].intval),(yyvsp[-5].intval),0)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3175 "cfg.tab.c"
    break;

  case 94: /* blst_elem: NOT LPAREN any_proto COMMA ipnet COMMA port RPAREN  */
#line 840 "cfg.y"
                                                                     {
				IFOR(pkg_free((yyvsp[-3].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-3].ipnet),NULL,
				(yyvsp[-1].intval),(yyvsp[-5].intval),BLR_APPLY_CONTRARY)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3187 "cfg.tab.c"
    break;

  case 95: /* blst_elem: LPAREN any_proto COMMA ipnet RPAREN  */
#line 847 "cfg.y"
                                                      {
				IFOR(pkg_free((yyvsp[-1].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-1].ipnet),NULL,0,(yyvsp[-3].intval),0)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3198 "cfg.tab.c"
    break;

  case 96: /* blst_elem: NOT LPAREN any_proto COMMA ipnet RPAREN  */
#line 853 "cfg.y"
                                                          {
				IFOR(pkg_free((yyvsp[-1].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-1].ipnet),NULL,
				0,(yyvsp[-3].intval),BLR_APPLY_CONTRARY)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3210 "cfg.tab.c"
    break;

  case 97: /* blst_elem: LPAREN ipnet COMMA port RPAREN  */
#line 860 "cfg.y"
                                                 {
				IFOR(pkg_free((yyvsp[-3].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-3].ipnet),NULL,(yyvsp[-1].intval),PROTO_NONE,0)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3221 "cfg.tab.c"
    break;

  case 98: /* blst_elem: NOT LPAREN ipnet COMMA port RPAREN  */
#line 866 "cfg.y"
                                                     {
				IFOR(pkg_free((yyvsp[-3].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-3].ipnet),NULL,
				(yyvsp[-1].intval),PROTO_NONE,BLR_APPLY_CONTRARY)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3233 "cfg.tab.c"
    break;

  case 99: /* blst_elem: LPAREN ipnet RPAREN  */
#line 873 "cfg.y"
                                      {
				IFOR(pkg_free((yyvsp[-1].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-1].ipnet),NULL,0,PROTO_NONE,0)) {
					yyerror("failed to add backlist element\n"); YYABORT;
				}
			}
#line 3244 "cfg.tab.c"
    break;

  case 100: /* blst_elem: NOT LPAREN ipnet RPAREN  */
#line 879 "cfg.y"
                                          {
				IFOR(pkg_free((yyvsp[-1].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[-1].ipnet),NULL,
				0,PROTO_NONE,BLR_APPLY_CONTRARY)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3256 "cfg.tab.c"
    break;

  case 101: /* blst_elem: ipnet  */
#line 886 "cfg.y"
                        {
				IFOR(pkg_free((yyvsp[0].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[0].ipnet),NULL,0,PROTO_NONE,0)) {
					yyerror("failed to add backlist element\n"); YYABORT;
				}
			}
#line 3267 "cfg.tab.c"
    break;

  case 102: /* blst_elem: NOT ipnet  */
#line 892 "cfg.y"
                            {
				IFOR(pkg_free((yyvsp[0].ipnet)));
				if (add_rule_to_list(&bl_head,&bl_tail,(yyvsp[0].ipnet),NULL,
				0,PROTO_NONE,BLR_APPLY_CONTRARY)) {
					yyerror("failed to add backlist element\n");YYABORT;
				}
			}
#line 3279 "cfg.tab.c"
    break;

  case 106: /* blst_flag: READONLY  */
#line 906 "cfg.y"
                    { (yyval.intval) = BL_READONLY_LIST; }
#line 3285 "cfg.tab.c"
    break;

  case 107: /* blst_flag: EXPIRE  */
#line 907 "cfg.y"
                          { (yyval.intval) = BL_DO_EXPIRE; }
#line 3291 "cfg.tab.c"
    break;

  case 108: /* blst_flag: DEFAULT  */
#line 908 "cfg.y"
                           { (yyval.intval) = BL_BY_DEFAULT; }
#line 3297 "cfg.tab.c"
    break;

  case 109: /* blst_flags: blst_flags COMMA blst_flag  */
#line 911 "cfg.y"
                                       { (yyval.intval) = (yyvsp[-2].intval) | (yyvsp[0].intval); }
#line 3303 "cfg.tab.c"
    break;

  case 110: /* blst_flags: blst_flag  */
#line 912 "cfg.y"
                            {}
#line 3309 "cfg.tab.c"
    break;

  case 111: /* blst_elem_list: blst_elem_list COMMA blst_elem  */
#line 915 "cfg.y"
                                               {}
#line 3315 "cfg.tab.c"
    break;

  case 112: /* blst_elem_list: blst_elem  */
#line 916 "cfg.y"
                            {}
#line 3321 "cfg.tab.c"
    break;

  case 113: /* blst_elem_list: blst_elem_list error  */
#line 917 "cfg.y"
                                       { yyerror("bad black list element");}
#line 3327 "cfg.tab.c"
    break;

  case 114: /* mpath_def_list: mpath_def_list COLON STRING  */
#line 920 "cfg.y"
                                            {IFOR(); add_mpath((yyvsp[0].strval));}
#line 3333 "cfg.tab.c"
    break;

  case 115: /* mpath_def_list: STRING  */
#line 921 "cfg.y"
                         { IFOR(); add_mpath((yyvsp[0].strval));}
#line 3339 "cfg.tab.c"
    break;

  case 116: /* auto_scale_profile_def: ID SCALE_UP_TO NUMBER ON NUMBER MODULO FOR NUMBER CYCLES_WITHIN NUMBER SCALE_DOWN_TO NUMBER ON NUMBER MODULO FOR NUMBER CYCLES  */
#line 928 "cfg.y"
                                              { IFOR();
			if (create_auto_scaling_profile((yyvsp[-17].strval),(yyvsp[-15].intval),(yyvsp[-13].intval),(yyvsp[-10].intval),(yyvsp[-8].intval),
			(yyvsp[-6].intval), (yyvsp[-4].intval), (yyvsp[-1].intval),10*(yyvsp[-1].intval))<0)
				yyerror("failed to create auto scaling profile");
		 }
#line 3349 "cfg.tab.c"
    break;

  case 117: /* auto_scale_profile_def: ID SCALE_UP_TO NUMBER ON NUMBER MODULO FOR NUMBER CYCLES SCALE_DOWN_TO NUMBER ON NUMBER MODULO FOR NUMBER CYCLES  */
#line 936 "cfg.y"
                                              { IFOR();
			if (create_auto_scaling_profile((yyvsp[-16].strval),(yyvsp[-14].intval),(yyvsp[-12].intval),(yyvsp[-9].intval),(yyvsp[-9].intval),
			(yyvsp[-6].intval), (yyvsp[-4].intval), (yyvsp[-1].intval), 10*(yyvsp[-1].intval))<0)
				yyerror("failed to create auto scaling profile");
		 }
#line 3359 "cfg.tab.c"
    break;

  case 118: /* auto_scale_profile_def: ID SCALE_UP_TO NUMBER ON NUMBER MODULO FOR NUMBER CYCLES_WITHIN NUMBER  */
#line 942 "cfg.y"
                                                            { IFOR();
			if (create_auto_scaling_profile((yyvsp[-9].strval),(yyvsp[-7].intval),(yyvsp[-5].intval),(yyvsp[-2].intval),(yyvsp[0].intval),
			0, 0, 0, 0)<0)
				yyerror("failed to create auto scaling profile");
		}
#line 3369 "cfg.tab.c"
    break;

  case 119: /* auto_scale_profile_def: ID SCALE_UP_TO NUMBER ON NUMBER MODULO FOR NUMBER CYCLES  */
#line 948 "cfg.y"
                                              { IFOR();
			if (create_auto_scaling_profile((yyvsp[-8].strval),(yyvsp[-6].intval),(yyvsp[-4].intval),(yyvsp[-1].intval),(yyvsp[-1].intval),
			0, 0, 0, 0)<0)
				yyerror("failed to create auto scaling profile");
		}
#line 3379 "cfg.tab.c"
    break;

  case 120: /* assign_stm: LOGLEVEL EQUAL snumber  */
#line 955 "cfg.y"
                                   { IFOR();
			/* in debug mode, force logging to DEBUG level*/
			*log_level = debug_mode?L_DBG:(yyvsp[0].intval);
			}
#line 3388 "cfg.tab.c"
    break;

  case 121: /* assign_stm: LOGPREFIX EQUAL STRING  */
#line 959 "cfg.y"
                                         { IFOR();
			if (*(yyvsp[0].strval)) {
				int len = strlen((yyvsp[0].strval));
				char *buf = pkg_malloc(len + 2);
				if (!buf)
					yyerror("oom");
				sprintf(buf, "%s:", (yyvsp[0].strval));
				log_prefix = buf;
			} else {
				log_prefix = (yyvsp[0].strval);
			}
			}
#line 3405 "cfg.tab.c"
    break;

  case 122: /* assign_stm: LOGPREFIX EQUAL error  */
#line 971 "cfg.y"
                                         { yyerror("string value expected"); }
#line 3411 "cfg.tab.c"
    break;

  case 123: /* assign_stm: ENABLE_ASSERTS EQUAL NUMBER  */
#line 972 "cfg.y"
                                               { IFOR(); enable_asserts=(yyvsp[0].intval); }
#line 3417 "cfg.tab.c"
    break;

  case 124: /* assign_stm: ENABLE_ASSERTS EQUAL error  */
#line 973 "cfg.y"
                                              { yyerror("boolean value expected"); }
#line 3423 "cfg.tab.c"
    break;

  case 125: /* assign_stm: ABORT_ON_ASSERT EQUAL NUMBER  */
#line 974 "cfg.y"
                                                { IFOR(); abort_on_assert=(yyvsp[0].intval); }
#line 3429 "cfg.tab.c"
    break;

  case 126: /* assign_stm: ABORT_ON_ASSERT EQUAL error  */
#line 975 "cfg.y"
                                               { yyerror("boolean value expected"); }
#line 3435 "cfg.tab.c"
    break;

  case 127: /* assign_stm: DEBUG_MODE EQUAL NUMBER  */
#line 976 "cfg.y"
                                           { IFOR();
			debug_mode=(yyvsp[0].intval);
			if (debug_mode) {
				*log_level = L_DBG;
				stderr_enabled=1;
				syslog_enabled=0;

				s_tmp.s=STDERR_CONSUMER_NAME;
				s_tmp.len=strlen(STDERR_CONSUMER_NAME);
				set_log_consumer_mute_state(&s_tmp, 0);
				s_tmp.s=SYSLOG_CONSUMER_NAME;
				s_tmp.len=strlen(SYSLOG_CONSUMER_NAME);
				set_log_consumer_mute_state(&s_tmp, 1);
			}
			}
#line 3455 "cfg.tab.c"
    break;

  case 128: /* assign_stm: DEBUG_MODE EQUAL error  */
#line 992 "cfg.y"
                        { yyerror("boolean value expected for debug_mode"); }
#line 3461 "cfg.tab.c"
    break;

  case 129: /* assign_stm: LOGSTDOUT EQUAL NUMBER  */
#line 995 "cfg.y"
                        { IFOR(); log_stdout=(yyvsp[0].intval); }
#line 3467 "cfg.tab.c"
    break;

  case 130: /* assign_stm: LOGSTDOUT EQUAL error  */
#line 996 "cfg.y"
                                        { yyerror("boolean value expected"); }
#line 3473 "cfg.tab.c"
    break;

  case 131: /* assign_stm: STDERROR_ENABLED EQUAL NUMBER  */
#line 997 "cfg.y"
                                                {
			/* in config-check or debug mode we force logging
			 * to standard error */
			IFOR();
			if (!config_check && !debug_mode) {
				stderr_enabled=(yyvsp[0].intval);
				s_tmp.s=STDERR_CONSUMER_NAME;
				s_tmp.len=strlen(STDERR_CONSUMER_NAME);
				set_log_consumer_mute_state(&s_tmp, !(yyvsp[0].intval));
			}
			}
#line 3489 "cfg.tab.c"
    break;

  case 132: /* assign_stm: STDERROR_ENABLED EQUAL error  */
#line 1008 "cfg.y"
                                               { yyerror("boolean value expected"); }
#line 3495 "cfg.tab.c"
    break;

  case 133: /* assign_stm: SYSLOG_ENABLED EQUAL NUMBER  */
#line 1009 "cfg.y"
                                              {
			IFOR();
			/* in config-check or debug mode we force logging
			 * to standard error */
			if (!config_check && !debug_mode) {
				syslog_enabled=(yyvsp[0].intval);
				s_tmp.s=SYSLOG_CONSUMER_NAME;
				s_tmp.len=strlen(SYSLOG_CONSUMER_NAME);
				set_log_consumer_mute_state(&s_tmp, !(yyvsp[0].intval));
			}
			}
#line 3511 "cfg.tab.c"
    break;

  case 134: /* assign_stm: SYSLOG_ENABLED EQUAL error  */
#line 1020 "cfg.y"
                                             { yyerror("boolean value expected"); }
#line 3517 "cfg.tab.c"
    break;

  case 135: /* assign_stm: LOG_EVENT_ENABLED EQUAL NUMBER  */
#line 1021 "cfg.y"
                                                 {
			IFOR();
			if ((yyvsp[0].intval)) {
				if (init_log_msg_buf(0) < 0) {
					yyerror("failed to allocate msg log buffer");
					YYABORT;
				}
			}
			log_event_enabled=(yyvsp[0].intval); }
#line 3531 "cfg.tab.c"
    break;

  case 136: /* assign_stm: LOG_EVENT_ENABLED EQUAL error  */
#line 1030 "cfg.y"
                                                { yyerror("boolean value expected"); }
#line 3537 "cfg.tab.c"
    break;

  case 137: /* assign_stm: STDERROR_LEVEL_FILTER EQUAL snumber  */
#line 1031 "cfg.y"
                                                      {
			IFOR();
			s_tmp.s=STDERR_CONSUMER_NAME;
			s_tmp.len=strlen(STDERR_CONSUMER_NAME);
			set_log_consumer_level_filter(&s_tmp, (yyvsp[0].intval));
			}
#line 3548 "cfg.tab.c"
    break;

  case 138: /* assign_stm: STDERROR_LEVEL_FILTER EQUAL error  */
#line 1037 "cfg.y"
                                                    { yyerror("number expected"); }
#line 3554 "cfg.tab.c"
    break;

  case 139: /* assign_stm: SYSLOG_LEVEL_FILTER EQUAL snumber  */
#line 1038 "cfg.y"
                                                    {
			IFOR();
			s_tmp.s=SYSLOG_CONSUMER_NAME;
			s_tmp.len=strlen(SYSLOG_CONSUMER_NAME);
			set_log_consumer_level_filter(&s_tmp, (yyvsp[0].intval));
			}
#line 3565 "cfg.tab.c"
    break;

  case 140: /* assign_stm: SYSLOG_LEVEL_FILTER EQUAL error  */
#line 1044 "cfg.y"
                                                  { yyerror("number expected"); }
#line 3571 "cfg.tab.c"
    break;

  case 141: /* assign_stm: LOG_EVENT_LEVEL_FILTER EQUAL snumber  */
#line 1045 "cfg.y"
                                                       { IFOR();
							log_event_level_filter = (yyvsp[0].intval); }
#line 3578 "cfg.tab.c"
    break;

  case 142: /* assign_stm: LOG_EVENT_LEVEL_FILTER EQUAL error  */
#line 1047 "cfg.y"
                                                     { yyerror("number expected"); }
#line 3584 "cfg.tab.c"
    break;

  case 143: /* assign_stm: STDERROR_FORMAT EQUAL STRING  */
#line 1048 "cfg.y"
                                               { IFOR();
			s_tmp.s = (yyvsp[0].strval);
			s_tmp.len = strlen((yyvsp[0].strval));
			if ((i_tmp = parse_log_format(&s_tmp)) < 0) {
				yyerror("unknown log format");
			} else {
				if (i_tmp != LOG_FORMAT_PLAIN) {
					if (init_log_json_buf(0) < 0) {
						yyerror("failed to allocate json log buffer");
						YYABORT;
					}
					if (init_log_msg_buf(0) < 0) {
						yyerror("failed to allocate msg log buffer");
						YYABORT;
					}

					if (i_tmp == LOG_FORMAT_JSON_CEE && init_log_cee_hostname() < 0) {
						yyerror("failed to allocate hostname buffer");
						YYABORT;
					}
				}

				stderr_log_format = i_tmp;
			}
			}
#line 3614 "cfg.tab.c"
    break;

  case 144: /* assign_stm: SYSLOG_FORMAT EQUAL STRING  */
#line 1073 "cfg.y"
                                             { IFOR();
			s_tmp.s = (yyvsp[0].strval);
			s_tmp.len = strlen((yyvsp[0].strval));
			if ((i_tmp = parse_log_format(&s_tmp)) < 0) {
				yyerror("unknown log format");
			} else {
				if (i_tmp != LOG_FORMAT_PLAIN) {
					if (init_log_json_buf(0) < 0) {
						yyerror("failed to allocate json log buffer");
						YYABORT;
					}
					if (init_log_msg_buf(0) < 0) {
						yyerror("failed to allocate msg log buffer");
						YYABORT;
					}

					if (i_tmp == LOG_FORMAT_JSON_CEE && init_log_cee_hostname() < 0) {
						yyerror("failed to allocate hostname buffer");
						YYABORT;
					}
				}

				syslog_log_format = i_tmp;
			}
			}
#line 3644 "cfg.tab.c"
    break;

  case 145: /* assign_stm: LOG_JSON_BUF_SIZE EQUAL NUMBER  */
#line 1098 "cfg.y"
                                                 {
			IFOR();
			log_json_buf_size = (yyvsp[0].intval);
			if (init_log_json_buf(1) < 0) {
				yyerror("failed to realloc json log buffer");
				YYABORT;
			}
			}
#line 3657 "cfg.tab.c"
    break;

  case 146: /* assign_stm: LOG_JSON_BUF_SIZE EQUAL error  */
#line 1106 "cfg.y"
                                                { yyerror("number expected"); }
#line 3663 "cfg.tab.c"
    break;

  case 147: /* assign_stm: LOG_MSG_BUF_SIZE EQUAL NUMBER  */
#line 1107 "cfg.y"
                                                {
			IFOR();
			log_msg_buf_size = (yyvsp[0].intval);
			if (init_log_msg_buf(1) < 0) {
				yyerror("failed to realloc msg log buffer");
				YYABORT;
			}
			}
#line 3676 "cfg.tab.c"
    break;

  case 148: /* assign_stm: LOG_MSG_BUF_SIZE EQUAL error  */
#line 1115 "cfg.y"
                                               { yyerror("number expected"); }
#line 3682 "cfg.tab.c"
    break;

  case 149: /* assign_stm: SYSLOG_FACILITY EQUAL ID  */
#line 1116 "cfg.y"
                                           { IFOR();
			if ( (i_tmp=str2facility((yyvsp[0].strval)))==-1)
				yyerror("bad facility (see syslog(3) man page)");
			if (!config_check)
				log_facility=i_tmp;
			}
#line 3693 "cfg.tab.c"
    break;

  case 150: /* assign_stm: SYSLOG_FACILITY EQUAL error  */
#line 1122 "cfg.y"
                                              { yyerror("ID expected"); }
#line 3699 "cfg.tab.c"
    break;

  case 151: /* assign_stm: SYSLOG_NAME EQUAL STRING  */
#line 1123 "cfg.y"
                                           { IFOR(); log_name=(yyvsp[0].strval); }
#line 3705 "cfg.tab.c"
    break;

  case 152: /* assign_stm: SYSLOG_NAME EQUAL error  */
#line 1124 "cfg.y"
                                          { yyerror("string value expected"); }
#line 3711 "cfg.tab.c"
    break;

  case 153: /* assign_stm: DNS EQUAL NUMBER  */
#line 1125 "cfg.y"
                                     { IFOR(); received_dns|= ((yyvsp[0].intval))?DO_DNS:0; }
#line 3717 "cfg.tab.c"
    break;

  case 154: /* assign_stm: DNS EQUAL error  */
#line 1126 "cfg.y"
                                  { yyerror("boolean value expected"); }
#line 3723 "cfg.tab.c"
    break;

  case 155: /* assign_stm: REV_DNS EQUAL NUMBER  */
#line 1127 "cfg.y"
                                       { IFOR(); received_dns|= ((yyvsp[0].intval))?DO_REV_DNS:0; }
#line 3729 "cfg.tab.c"
    break;

  case 156: /* assign_stm: REV_DNS EQUAL error  */
#line 1128 "cfg.y"
                                      { yyerror("boolean value expected"); }
#line 3735 "cfg.tab.c"
    break;

  case 157: /* assign_stm: DNS_TRY_IPV6 EQUAL NUMBER  */
#line 1129 "cfg.y"
                                              { IFOR(); dns_try_ipv6=(yyvsp[0].intval); }
#line 3741 "cfg.tab.c"
    break;

  case 158: /* assign_stm: DNS_TRY_IPV6 error  */
#line 1130 "cfg.y"
                                     { yyerror("boolean value expected"); }
#line 3747 "cfg.tab.c"
    break;

  case 159: /* assign_stm: DNS_TRY_NAPTR EQUAL NUMBER  */
#line 1131 "cfg.y"
                                               { IFOR(); dns_try_naptr=(yyvsp[0].intval); }
#line 3753 "cfg.tab.c"
    break;

  case 160: /* assign_stm: DNS_TRY_NAPTR error  */
#line 1132 "cfg.y"
                                      { yyerror("boolean value expected"); }
#line 3759 "cfg.tab.c"
    break;

  case 161: /* assign_stm: DNS_RETR_TIME EQUAL NUMBER  */
#line 1133 "cfg.y"
                                               { IFOR(); dns_retr_time=(yyvsp[0].intval); }
#line 3765 "cfg.tab.c"
    break;

  case 162: /* assign_stm: DNS_RETR_TIME error  */
#line 1134 "cfg.y"
                                      { yyerror("number expected"); }
#line 3771 "cfg.tab.c"
    break;

  case 163: /* assign_stm: DNS_RETR_NO EQUAL NUMBER  */
#line 1135 "cfg.y"
                                             { IFOR(); dns_retr_no=(yyvsp[0].intval); }
#line 3777 "cfg.tab.c"
    break;

  case 164: /* assign_stm: DNS_RETR_NO error  */
#line 1136 "cfg.y"
                                    { yyerror("number expected"); }
#line 3783 "cfg.tab.c"
    break;

  case 165: /* assign_stm: DNS_SERVERS_NO EQUAL NUMBER  */
#line 1137 "cfg.y"
                                                { IFOR(); dns_servers_no=(yyvsp[0].intval); }
#line 3789 "cfg.tab.c"
    break;

  case 166: /* assign_stm: DNS_SERVERS_NO error  */
#line 1138 "cfg.y"
                                       { yyerror("number expected"); }
#line 3795 "cfg.tab.c"
    break;

  case 167: /* assign_stm: DNS_USE_SEARCH EQUAL NUMBER  */
#line 1139 "cfg.y"
                                                { IFOR(); dns_search_list=(yyvsp[0].intval); }
#line 3801 "cfg.tab.c"
    break;

  case 168: /* assign_stm: DNS_USE_SEARCH error  */
#line 1140 "cfg.y"
                                       { yyerror("boolean value expected"); }
#line 3807 "cfg.tab.c"
    break;

  case 169: /* assign_stm: MAX_WHILE_LOOPS EQUAL NUMBER  */
#line 1141 "cfg.y"
                                               { IFOR(); max_while_loops=(yyvsp[0].intval); }
#line 3813 "cfg.tab.c"
    break;

  case 170: /* assign_stm: MAX_WHILE_LOOPS EQUAL error  */
#line 1142 "cfg.y"
                                              { yyerror("number expected"); }
#line 3819 "cfg.tab.c"
    break;

  case 171: /* assign_stm: MAXBUFFER EQUAL NUMBER  */
#line 1143 "cfg.y"
                                         { IFOR(); maxbuffer=(yyvsp[0].intval); }
#line 3825 "cfg.tab.c"
    break;

  case 172: /* assign_stm: MAXBUFFER EQUAL error  */
#line 1144 "cfg.y"
                                        { yyerror("number expected"); }
#line 3831 "cfg.tab.c"
    break;

  case 173: /* assign_stm: UDP_WORKERS EQUAL NUMBER  */
#line 1145 "cfg.y"
                                           { IFOR(); udp_workers_no=(yyvsp[0].intval); }
#line 3837 "cfg.tab.c"
    break;

  case 174: /* assign_stm: UDP_WORKERS EQUAL NUMBER USE_AUTO_SCALING_PROFILE ID  */
#line 1146 "cfg.y"
                                                                       { IFOR();
				udp_workers_no=(yyvsp[-2].intval);
				udp_auto_scaling_profile=(yyvsp[0].strval);
		}
#line 3846 "cfg.tab.c"
    break;

  case 175: /* assign_stm: UDP_WORKERS EQUAL error  */
#line 1150 "cfg.y"
                                          { yyerror("number expected"); }
#line 3852 "cfg.tab.c"
    break;

  case 176: /* assign_stm: TIMER_WORKERS EQUAL NUMBER  */
#line 1151 "cfg.y"
                                             { IFOR();
				timer_workers_no=(yyvsp[0].intval);
		}
#line 3860 "cfg.tab.c"
    break;

  case 177: /* assign_stm: TIMER_WORKERS EQUAL NUMBER USE_AUTO_SCALING_PROFILE ID  */
#line 1154 "cfg.y"
                                                                         { IFOR();
				timer_workers_no=(yyvsp[-2].intval);
				timer_auto_scaling_profile=(yyvsp[0].strval);
		}
#line 3869 "cfg.tab.c"
    break;

  case 178: /* assign_stm: CHECK_VIA EQUAL NUMBER  */
#line 1158 "cfg.y"
                                         { check_via=(yyvsp[0].intval); }
#line 3875 "cfg.tab.c"
    break;

  case 179: /* assign_stm: CHECK_VIA EQUAL error  */
#line 1159 "cfg.y"
                                        { yyerror("boolean value expected"); }
#line 3881 "cfg.tab.c"
    break;

  case 180: /* assign_stm: SHM_HASH_SPLIT_PERCENTAGE EQUAL NUMBER  */
#line 1160 "cfg.y"
                                                         { IFOR();
			#ifdef HP_MALLOC
			shm_hash_split_percentage=(yyvsp[0].intval);
			#else
			LM_ERR("Cannot set parameter; Please recompile with support "
				"for HP_MALLOC\n");
			#endif
			}
#line 3894 "cfg.tab.c"
    break;

  case 181: /* assign_stm: SHM_HASH_SPLIT_PERCENTAGE EQUAL error  */
#line 1168 "cfg.y"
                                                        {
			#ifdef HP_MALLOC
			yyerror("number expected");
			#else
			LM_ERR("Cannot set parameter; Please recompile with support "
				"for HP_MALLOC\n");
			#endif
				}
#line 3907 "cfg.tab.c"
    break;

  case 182: /* assign_stm: SHM_SECONDARY_HASH_SIZE EQUAL NUMBER  */
#line 1176 "cfg.y"
                                                       { IFOR();
			#ifdef HP_MALLOC
			shm_secondary_hash_size=(yyvsp[0].intval);
			#else
			LM_ERR("Cannot set parameter; Please recompile with support"
				" for HP_MALLOC\n");
			#endif
			}
#line 3920 "cfg.tab.c"
    break;

  case 183: /* assign_stm: SHM_SECONDARY_HASH_SIZE EQUAL error  */
#line 1184 "cfg.y"
                                                      {
			#ifdef HP_MALLOC
			yyerror("number expected");
			#else
			LM_ERR("Cannot set parameter; Please recompile with support "
				"for HP_MALLOC\n");
			#endif
			}
#line 3933 "cfg.tab.c"
    break;

  case 184: /* assign_stm: MEM_WARMING_ENABLED EQUAL NUMBER  */
#line 1192 "cfg.y"
                                                   { IFOR();
			#ifdef HP_MALLOC
			mem_warming_enabled = (yyvsp[0].intval);
			#else
			LM_ERR("Cannot set parameter; Please recompile with support"
				" for HP_MALLOC\n");
			#endif
			}
#line 3946 "cfg.tab.c"
    break;

  case 185: /* assign_stm: MEM_WARMING_ENABLED EQUAL error  */
#line 1200 "cfg.y"
                                                  {
			#ifdef HP_MALLOC
			yyerror("number expected");
			#else
			LM_ERR("Cannot set parameter; Please recompile with support "
				"for HP_MALLOC\n");
			#endif
			}
#line 3959 "cfg.tab.c"
    break;

  case 186: /* assign_stm: MEM_WARMING_PATTERN_FILE EQUAL STRING  */
#line 1208 "cfg.y"
                                                        { IFOR();
			#ifdef HP_MALLOC
			mem_warming_pattern_file = (yyvsp[0].strval);
			#else
			LM_ERR("Cannot set parameter; Please recompile with "
				"support for HP_MALLOC\n");
			#endif
			}
#line 3972 "cfg.tab.c"
    break;

  case 187: /* assign_stm: MEM_WARMING_PATTERN_FILE EQUAL error  */
#line 1216 "cfg.y"
                                                       {
			#ifdef HP_MALLOC
			yyerror("string expected");
			#else
			LM_ERR("Cannot set parameter; Please recompile with support "
				"for HP_MALLOC\n");
			#endif
			}
#line 3985 "cfg.tab.c"
    break;

  case 188: /* assign_stm: MEM_WARMING_PERCENTAGE EQUAL NUMBER  */
#line 1224 "cfg.y"
                                                      { IFOR();
			#ifdef HP_MALLOC
			mem_warming_percentage = (yyvsp[0].intval);
			#else
			LM_ERR("Cannot set parameter; Please recompile with "
				"support for HP_MALLOC\n");
			#endif
			}
#line 3998 "cfg.tab.c"
    break;

  case 189: /* assign_stm: MEM_WARMING_PERCENTAGE EQUAL error  */
#line 1232 "cfg.y"
                                                     {
			#ifdef HP_MALLOC
			yyerror("number expected");
			#else
			LM_ERR("Cannot set parameter; Please recompile with support "
				"for HP_MALLOC\n");
			#endif
			}
#line 4011 "cfg.tab.c"
    break;

  case 190: /* assign_stm: RPM_MEM_FILE EQUAL STRING  */
#line 1240 "cfg.y"
                                            { IFOR();
			rpm_mem_file = (yyvsp[0].strval);
			}
#line 4019 "cfg.tab.c"
    break;

  case 191: /* assign_stm: RPM_MEM_FILE EQUAL error  */
#line 1243 "cfg.y"
                                           { yyerror("string value expected"); }
#line 4025 "cfg.tab.c"
    break;

  case 192: /* assign_stm: RPM_MEM_SIZE EQUAL NUMBER  */
#line 1244 "cfg.y"
                                            { IFOR();
			rpm_mem_size = (yyvsp[0].intval) * 1024 * 1024;
			}
#line 4033 "cfg.tab.c"
    break;

  case 193: /* assign_stm: RPM_MEM_SIZE EQUAL error  */
#line 1247 "cfg.y"
                                           { yyerror("int value expected"); }
#line 4039 "cfg.tab.c"
    break;

  case 194: /* assign_stm: MEMLOG EQUAL snumber  */
#line 1248 "cfg.y"
                                       { IFOR(); memlog=(yyvsp[0].intval); memdump=(yyvsp[0].intval); }
#line 4045 "cfg.tab.c"
    break;

  case 195: /* assign_stm: MEMLOG EQUAL error  */
#line 1249 "cfg.y"
                                     { yyerror("int value expected"); }
#line 4051 "cfg.tab.c"
    break;

  case 196: /* assign_stm: SHM_MEMLOG_SIZE EQUAL snumber  */
#line 1250 "cfg.y"
                                                { IFOR(); shm_memlog_size=(yyvsp[0].intval);}
#line 4057 "cfg.tab.c"
    break;

  case 197: /* assign_stm: SHM_MEMLOG_SIZE EQUAL error  */
#line 1251 "cfg.y"
                                              { yyerror("int value expected"); }
#line 4063 "cfg.tab.c"
    break;

  case 198: /* assign_stm: MEMDUMP EQUAL snumber  */
#line 1252 "cfg.y"
                                        { IFOR(); memdump=(yyvsp[0].intval); }
#line 4069 "cfg.tab.c"
    break;

  case 199: /* assign_stm: MEMDUMP EQUAL error  */
#line 1253 "cfg.y"
                                      { yyerror("int value expected"); }
#line 4075 "cfg.tab.c"
    break;

  case 200: /* assign_stm: EXECMSGTHRESHOLD EQUAL NUMBER  */
#line 1254 "cfg.y"
                                                {  IFOR();execmsgthreshold=(yyvsp[0].intval); }
#line 4081 "cfg.tab.c"
    break;

  case 201: /* assign_stm: EXECMSGTHRESHOLD EQUAL error  */
#line 1255 "cfg.y"
                                               { yyerror("int value expected"); }
#line 4087 "cfg.tab.c"
    break;

  case 202: /* assign_stm: EXECDNSTHRESHOLD EQUAL NUMBER  */
#line 1256 "cfg.y"
                                                { IFOR(); execdnsthreshold=(yyvsp[0].intval); }
#line 4093 "cfg.tab.c"
    break;

  case 203: /* assign_stm: EXECDNSTHRESHOLD EQUAL error  */
#line 1257 "cfg.y"
                                               { yyerror("int value expected"); }
#line 4099 "cfg.tab.c"
    break;

  case 204: /* assign_stm: TCPTHRESHOLD EQUAL NUMBER  */
#line 1258 "cfg.y"
                                            { IFOR(); tcpthreshold=(yyvsp[0].intval); }
#line 4105 "cfg.tab.c"
    break;

  case 205: /* assign_stm: TCPTHRESHOLD EQUAL error  */
#line 1259 "cfg.y"
                                           { yyerror("int value expected"); }
#line 4111 "cfg.tab.c"
    break;

  case 206: /* assign_stm: EVENT_SHM_THRESHOLD EQUAL NUMBER  */
#line 1260 "cfg.y"
                                                   { IFOR();
			#ifdef STATISTICS
			if ((yyvsp[0].intval) < 0 || (yyvsp[0].intval) > 100)
				yyerror("SHM threshold has to be a percentage between"
					" 0 and 100");
			event_shm_threshold=(yyvsp[0].intval);
			#else
			yyerror("statistics support not compiled in");
			#endif /* STATISTICS */
			}
#line 4126 "cfg.tab.c"
    break;

  case 207: /* assign_stm: EVENT_SHM_THRESHOLD EQUAL error  */
#line 1270 "cfg.y"
                                                  { yyerror("int value expected"); }
#line 4132 "cfg.tab.c"
    break;

  case 208: /* assign_stm: EVENT_PKG_THRESHOLD EQUAL NUMBER  */
#line 1271 "cfg.y"
                                                   { IFOR();
			#ifdef PKG_MALLOC
			#ifdef STATISTICS
			if ((yyvsp[0].intval) < 0 || (yyvsp[0].intval) > 100)
				yyerror("PKG threshold has to be a percentage between "
					"0 and 100");
			event_pkg_threshold=(yyvsp[0].intval);
			#else
			yyerror("statistics support not compiled in");
			#endif
			#else
			yyerror("pkg_malloc support not compiled in");
			#endif
			}
#line 4151 "cfg.tab.c"
    break;

  case 209: /* assign_stm: EVENT_PKG_THRESHOLD EQUAL error  */
#line 1285 "cfg.y"
                                                  { yyerror("int value expected"); }
#line 4157 "cfg.tab.c"
    break;

  case 210: /* assign_stm: QUERYBUFFERSIZE EQUAL NUMBER  */
#line 1286 "cfg.y"
                                               { IFOR(); query_buffer_size=(yyvsp[0].intval); }
#line 4163 "cfg.tab.c"
    break;

  case 211: /* assign_stm: QUERYBUFFERSIZE EQUAL error  */
#line 1287 "cfg.y"
                                              { yyerror("int value expected"); }
#line 4169 "cfg.tab.c"
    break;

  case 212: /* assign_stm: QUERYFLUSHTIME EQUAL NUMBER  */
#line 1288 "cfg.y"
                                              { IFOR(); query_flush_time=(yyvsp[0].intval); }
#line 4175 "cfg.tab.c"
    break;

  case 213: /* assign_stm: QUERYFLUSHTIME EQUAL error  */
#line 1289 "cfg.y"
                                             { yyerror("int value expected"); }
#line 4181 "cfg.tab.c"
    break;

  case 214: /* assign_stm: SIP_WARNING EQUAL NUMBER  */
#line 1290 "cfg.y"
                                           { IFOR(); sip_warning=(yyvsp[0].intval); }
#line 4187 "cfg.tab.c"
    break;

  case 215: /* assign_stm: SIP_WARNING EQUAL error  */
#line 1291 "cfg.y"
                                          { yyerror("boolean value expected"); }
#line 4193 "cfg.tab.c"
    break;

  case 216: /* assign_stm: CHROOT EQUAL STRING  */
#line 1292 "cfg.y"
                                          { IFOR(); chroot_dir=(yyvsp[0].strval); }
#line 4199 "cfg.tab.c"
    break;

  case 217: /* assign_stm: CHROOT EQUAL ID  */
#line 1293 "cfg.y"
                                          { IFOR(); chroot_dir=(yyvsp[0].strval); }
#line 4205 "cfg.tab.c"
    break;

  case 218: /* assign_stm: CHROOT EQUAL error  */
#line 1294 "cfg.y"
                                          { yyerror("string value expected"); }
#line 4211 "cfg.tab.c"
    break;

  case 219: /* assign_stm: WDIR EQUAL STRING  */
#line 1295 "cfg.y"
                                        { IFOR(); working_dir=(yyvsp[0].strval); }
#line 4217 "cfg.tab.c"
    break;

  case 220: /* assign_stm: WDIR EQUAL ID  */
#line 1296 "cfg.y"
                                        { IFOR(); working_dir=(yyvsp[0].strval); }
#line 4223 "cfg.tab.c"
    break;

  case 221: /* assign_stm: WDIR EQUAL error  */
#line 1297 "cfg.y"
                                        { yyerror("string value expected"); }
#line 4229 "cfg.tab.c"
    break;

  case 222: /* assign_stm: MHOMED EQUAL NUMBER  */
#line 1298 "cfg.y"
                                      { IFOR(); mhomed=(yyvsp[0].intval); }
#line 4235 "cfg.tab.c"
    break;

  case 223: /* assign_stm: MHOMED EQUAL error  */
#line 1299 "cfg.y"
                                     { yyerror("boolean value expected"); }
#line 4241 "cfg.tab.c"
    break;

  case 224: /* assign_stm: POLL_METHOD EQUAL ID  */
#line 1300 "cfg.y"
                                       { IFOR();
									io_poll_method=get_poll_type((yyvsp[0].strval));
									if (io_poll_method==POLL_NONE){
										LM_CRIT("bad poll method name:"
											" %s\n, try one of %s.\n",
											(yyvsp[0].strval), poll_support);
										yyerror("bad poll_method "
											"value");
									}
								}
#line 4256 "cfg.tab.c"
    break;

  case 225: /* assign_stm: POLL_METHOD EQUAL STRING  */
#line 1310 "cfg.y"
                                           { IFOR();
									io_poll_method=get_poll_type((yyvsp[0].strval));
									if (io_poll_method==POLL_NONE){
										LM_CRIT("bad poll method name:"
											" %s\n, try one of %s.\n",
											(yyvsp[0].strval), poll_support);
										yyerror("bad poll_method "
											"value");
									}
									}
#line 4271 "cfg.tab.c"
    break;

  case 226: /* assign_stm: POLL_METHOD EQUAL error  */
#line 1320 "cfg.y"
                                          { yyerror("poll method name expected"); }
#line 4277 "cfg.tab.c"
    break;

  case 227: /* assign_stm: TCP_ACCEPT_ALIASES EQUAL NUMBER  */
#line 1321 "cfg.y"
                                                  { IFOR();
				if ((yyvsp[0].intval) < TCP_ALIAS_NEVER || (yyvsp[0].intval) > TCP_ALIAS_ALWAYS)
					yyerror("invalid 'tcp_accept_aliases' value");
				tcp_accept_aliases=(yyvsp[0].intval);
		}
#line 4287 "cfg.tab.c"
    break;

  case 228: /* assign_stm: TCP_ACCEPT_ALIASES EQUAL error  */
#line 1326 "cfg.y"
                                                 { yyerror("boolean value expected"); }
#line 4293 "cfg.tab.c"
    break;

  case 229: /* assign_stm: TCP_WORKERS EQUAL NUMBER  */
#line 1327 "cfg.y"
                                           { IFOR();
				tcp_workers_no=(yyvsp[0].intval);
		}
#line 4301 "cfg.tab.c"
    break;

  case 230: /* assign_stm: TCP_WORKERS EQUAL NUMBER USE_AUTO_SCALING_PROFILE ID  */
#line 1330 "cfg.y"
                                                                      { IFOR();
				tcp_workers_no=(yyvsp[-2].intval);
				tcp_auto_scaling_profile=(yyvsp[0].strval);
		}
#line 4310 "cfg.tab.c"
    break;

  case 231: /* assign_stm: TCP_WORKERS EQUAL error  */
#line 1334 "cfg.y"
                                          { yyerror("number expected"); }
#line 4316 "cfg.tab.c"
    break;

  case 232: /* assign_stm: TCP_CONNECT_TIMEOUT EQUAL NUMBER  */
#line 1335 "cfg.y"
                                                   { IFOR();
				if ((yyvsp[0].intval) <= 0)
					yyerror("invalid 'tcp_connect_timeout' (value too low!)");
				tcp_connect_timeout=(yyvsp[0].intval);
		}
#line 4326 "cfg.tab.c"
    break;

  case 233: /* assign_stm: TCP_CONNECT_TIMEOUT EQUAL error  */
#line 1340 "cfg.y"
                                                  { yyerror("number expected"); }
#line 4332 "cfg.tab.c"
    break;

  case 234: /* assign_stm: TCP_CON_LIFETIME EQUAL NUMBER  */
#line 1341 "cfg.y"
                                                { IFOR();
				tcp_con_lifetime=(yyvsp[0].intval);
		}
#line 4340 "cfg.tab.c"
    break;

  case 235: /* assign_stm: TCP_CON_LIFETIME EQUAL error  */
#line 1344 "cfg.y"
                                               { yyerror("number expected"); }
#line 4346 "cfg.tab.c"
    break;

  case 236: /* assign_stm: TCP_SOCKET_BACKLOG EQUAL NUMBER  */
#line 1345 "cfg.y"
                                                  { IFOR();
				tcp_socket_backlog=(yyvsp[0].intval);
		}
#line 4354 "cfg.tab.c"
    break;

  case 237: /* assign_stm: TCP_SOCKET_BACKLOG EQUAL error  */
#line 1348 "cfg.y"
                                                 { yyerror("number expected"); }
#line 4360 "cfg.tab.c"
    break;

  case 238: /* assign_stm: TCP_MAX_CONNECTIONS EQUAL NUMBER  */
#line 1349 "cfg.y"
                                                   { IFOR();
				tcp_max_connections=(yyvsp[0].intval);
		}
#line 4368 "cfg.tab.c"
    break;

  case 239: /* assign_stm: TCP_MAX_CONNECTIONS EQUAL error  */
#line 1352 "cfg.y"
                                                  { yyerror("number expected"); }
#line 4374 "cfg.tab.c"
    break;

  case 240: /* assign_stm: TCP_NO_NEW_CONN_BFLAG EQUAL ID  */
#line 1353 "cfg.y"
                                                 { IFOR();
				tcp_no_new_conn_bflag =
					get_flag_id_by_name(FLAG_TYPE_BRANCH, (yyvsp[0].strval), 0);
				if (!flag_in_range( (flag_t)tcp_no_new_conn_bflag ) )
					yyerror("invalid TCP no_new_conn Branch Flag");
				flag_idx2mask( &tcp_no_new_conn_bflag );
		}
#line 4386 "cfg.tab.c"
    break;

  case 241: /* assign_stm: TCP_NO_NEW_CONN_BFLAG EQUAL error  */
#line 1360 "cfg.y"
                                                    { yyerror("number value expected"); }
#line 4392 "cfg.tab.c"
    break;

  case 242: /* assign_stm: TCP_NO_NEW_CONN_RPLFLAG EQUAL ID  */
#line 1361 "cfg.y"
                                                   { IFOR();
				tcp_no_new_conn_rplflag =
					get_flag_id_by_name(FLAG_TYPE_MSG, (yyvsp[0].strval), 0);
				if (!flag_in_range( (flag_t)tcp_no_new_conn_rplflag ) )
					yyerror("invalid TCP no_new_conn RePLy Flag");
				flag_idx2mask( &tcp_no_new_conn_rplflag );
		}
#line 4404 "cfg.tab.c"
    break;

  case 243: /* assign_stm: TCP_NO_NEW_CONN_RPLFLAG EQUAL error  */
#line 1368 "cfg.y"
                                                      { yyerror("number value expected"); }
#line 4410 "cfg.tab.c"
    break;

  case 244: /* assign_stm: TCP_KEEPALIVE EQUAL NUMBER  */
#line 1370 "cfg.y"
                                             { IFOR();
				tcp_keepalive=!!(yyvsp[0].intval);
		}
#line 4418 "cfg.tab.c"
    break;

  case 245: /* assign_stm: TCP_KEEPALIVE EQUAL error  */
#line 1373 "cfg.y"
                                            { yyerror("boolean value expected"); }
#line 4424 "cfg.tab.c"
    break;

  case 246: /* assign_stm: TCP_MAX_MSG_TIME EQUAL NUMBER  */
#line 1374 "cfg.y"
                                                { IFOR();
				tcp_max_msg_time=(yyvsp[0].intval);
		}
#line 4432 "cfg.tab.c"
    break;

  case 247: /* assign_stm: TCP_MAX_MSG_TIME EQUAL error  */
#line 1377 "cfg.y"
                                               { yyerror("number expected"); }
#line 4438 "cfg.tab.c"
    break;

  case 248: /* assign_stm: TCP_THREADS EQUAL NUMBER  */
#line 1378 "cfg.y"
                                           { IFOR();
				if ((yyvsp[0].intval) <= 0)
					yyerror("invalid 'tcp_threads' value");
				tcp_threads=(yyvsp[0].intval);
		}
#line 4448 "cfg.tab.c"
    break;

  case 249: /* assign_stm: TCP_THREADS EQUAL error  */
#line 1383 "cfg.y"
                                          {
			yyerror("number value expected");
		}
#line 4456 "cfg.tab.c"
    break;

  case 250: /* assign_stm: TCP_KEEPCOUNT EQUAL NUMBER  */
#line 1386 "cfg.y"
                                                        { IFOR();
			#ifndef HAVE_TCP_KEEPCNT
				warn("cannot be enabled TCP_KEEPCOUNT (no OS support)");
			#else
				tcp_keepcount=(yyvsp[0].intval);
			#endif
		}
#line 4468 "cfg.tab.c"
    break;

  case 251: /* assign_stm: TCP_KEEPCOUNT EQUAL error  */
#line 1393 "cfg.y"
                                            { yyerror("int value expected"); }
#line 4474 "cfg.tab.c"
    break;

  case 252: /* assign_stm: TCP_KEEPIDLE EQUAL NUMBER  */
#line 1394 "cfg.y"
                                                        { IFOR();
			#ifndef HAVE_TCP_KEEPIDLE
				warn("cannot be enabled TCP_KEEPIDLE (no OS support)");
			#else
				tcp_keepidle=(yyvsp[0].intval);
			#endif
		}
#line 4486 "cfg.tab.c"
    break;

  case 253: /* assign_stm: TCP_KEEPIDLE EQUAL error  */
#line 1401 "cfg.y"
                                           { yyerror("int value expected"); }
#line 4492 "cfg.tab.c"
    break;

  case 254: /* assign_stm: TCP_KEEPINTERVAL EQUAL NUMBER  */
#line 1402 "cfg.y"
                                                { IFOR();
			#ifndef HAVE_TCP_KEEPINTVL
				warn("cannot be enabled TCP_KEEPINTERVAL (no OS support)");
			#else
				tcp_keepinterval=(yyvsp[0].intval);
			 #endif
		}
#line 4504 "cfg.tab.c"
    break;

  case 255: /* assign_stm: TCP_KEEPINTERVAL EQUAL error  */
#line 1409 "cfg.y"
                                               { yyerror("int value expected"); }
#line 4510 "cfg.tab.c"
    break;

  case 256: /* assign_stm: SERVER_SIGNATURE EQUAL NUMBER  */
#line 1410 "cfg.y"
                                                { IFOR();
							server_signature=(yyvsp[0].intval); }
#line 4517 "cfg.tab.c"
    break;

  case 257: /* assign_stm: SERVER_SIGNATURE EQUAL error  */
#line 1412 "cfg.y"
                                               { yyerror("boolean value expected"); }
#line 4523 "cfg.tab.c"
    break;

  case 258: /* assign_stm: SERVER_HEADER EQUAL STRING  */
#line 1413 "cfg.y"
                                             { IFOR();
							server_header->s=(yyvsp[0].strval);
							server_header->len=strlen((yyvsp[0].strval));
							}
#line 4532 "cfg.tab.c"
    break;

  case 259: /* assign_stm: SERVER_HEADER EQUAL error  */
#line 1417 "cfg.y"
                                            { yyerror("string value expected"); }
#line 4538 "cfg.tab.c"
    break;

  case 260: /* assign_stm: USER_AGENT_HEADER EQUAL STRING  */
#line 1418 "cfg.y"
                                                 { user_agent_header->s=(yyvsp[0].strval);
			user_agent_header->len=strlen((yyvsp[0].strval));
									}
#line 4546 "cfg.tab.c"
    break;

  case 261: /* assign_stm: USER_AGENT_HEADER EQUAL error  */
#line 1421 "cfg.y"
                                                { yyerror("string value expected"); }
#line 4552 "cfg.tab.c"
    break;

  case 262: /* assign_stm: PV_PRINT_BUF_SIZE EQUAL NUMBER  */
#line 1422 "cfg.y"
                                                 { IFOR();
							pv_print_buf_size = (yyvsp[0].intval); }
#line 4559 "cfg.tab.c"
    break;

  case 263: /* assign_stm: PV_PRINT_BUF_SIZE EQUAL error  */
#line 1424 "cfg.y"
                                                { yyerror("number expected"); }
#line 4565 "cfg.tab.c"
    break;

  case 264: /* assign_stm: XLOG_BUF_SIZE EQUAL NUMBER  */
#line 1425 "cfg.y"
                                             { IFOR();
							xlog_buf_size = (yyvsp[0].intval); }
#line 4572 "cfg.tab.c"
    break;

  case 265: /* assign_stm: XLOG_FORCE_COLOR EQUAL NUMBER  */
#line 1427 "cfg.y"
                                                { IFOR();
							xlog_force_color = (yyvsp[0].intval); }
#line 4579 "cfg.tab.c"
    break;

  case 266: /* assign_stm: XLOG_PRINT_LEVEL EQUAL NUMBER  */
#line 1429 "cfg.y"
                                                { IFOR();
							xlog_print_level = (yyvsp[0].intval); }
#line 4586 "cfg.tab.c"
    break;

  case 267: /* assign_stm: XLOG_BUF_SIZE EQUAL error  */
#line 1431 "cfg.y"
                                            { yyerror("number expected"); }
#line 4592 "cfg.tab.c"
    break;

  case 268: /* assign_stm: XLOG_FORCE_COLOR EQUAL error  */
#line 1432 "cfg.y"
                                               { yyerror("boolean value expected"); }
#line 4598 "cfg.tab.c"
    break;

  case 269: /* assign_stm: XLOG_PRINT_LEVEL EQUAL error  */
#line 1433 "cfg.y"
                                               { yyerror("number expected"); }
#line 4604 "cfg.tab.c"
    break;

  case 270: /* assign_stm: XLOG_LEVEL EQUAL snumber  */
#line 1434 "cfg.y"
                                           { IFOR();
							*xlog_level = (yyvsp[0].intval); }
#line 4611 "cfg.tab.c"
    break;

  case 271: /* assign_stm: XLOG_LEVEL EQUAL error  */
#line 1436 "cfg.y"
                                         { yyerror("number expected"); }
#line 4617 "cfg.tab.c"
    break;

  case 272: /* assign_stm: SOCKET EQUAL socket_def  */
#line 1437 "cfg.y"
                                          { IFOR();
							for (lst_tmp = (yyvsp[0].sockid); lst_tmp; lst_tmp = lst_tmp->next) {
								if (add_listening_socket(lst_tmp)!=0){
									LM_CRIT("cfg. parser: failed"
											" to add listening socket\n");
									break;
								}
							}
						}
#line 4631 "cfg.tab.c"
    break;

  case 273: /* assign_stm: SOCKET EQUAL error  */
#line 1446 "cfg.y"
                                      { yyerror("ip address or hostname "
						"expected (use quotes if the hostname includes"
						" config keywords)"); }
#line 4639 "cfg.tab.c"
    break;

  case 274: /* assign_stm: MEMGROUP EQUAL STRING COLON multi_string  */
#line 1449 "cfg.y"
                                                           { IFOR();
							/* convert STIRNG ($3) to an ID */
							/* update the memstats type for each module */
							#ifndef SHM_EXTRA_STATS
								LM_CRIT("SHM_EXTRA_STATS not defined");
								YYABORT;
							#else

							#ifdef SHM_SHOW_DEFAULT_GROUP
							if(strcmp((yyvsp[-2].strval), "default") == 0){
								LM_CRIT("default group  name is not allowed");
								YYABORT;
							}
							#endif

							for(tmp_mod = mod_names; tmp_mod; tmp_mod=tmp_mod->next){
								if(strcmp((yyvsp[-2].strval), tmp_mod->s) == 0){
									LM_CRIT("The same mem-group name is used twice: [%s] [%s]\n", (yyvsp[-2].strval), tmp_mod->s);
									YYABORT;
								}
							}

							tmp_mod = pkg_malloc(sizeof(struct multi_str));
							if(!tmp_mod){
								LM_CRIT("out of pkg memory");
								YYABORT;
							}

							tmp_mod->s = (yyvsp[-2].strval);
							tmp_mod->next = mod_names;
							mod_names = tmp_mod;
							for (tmp_mod = (yyvsp[0].multistr); tmp_mod; tmp_mod = tmp_mod->next){
								if(set_mem_idx(tmp_mod->s, mem_free_idx)){
									YYABORT;
								}
							}

							mem_free_idx++;

							if(alloc_group_stat()){
								YYABORT;
							}
							#endif
						}
#line 4688 "cfg.tab.c"
    break;

  case 275: /* assign_stm: MEMGROUP EQUAL STRING COLON error  */
#line 1493 "cfg.y"
                                                    { yyerror("invalid or no module specified"); }
#line 4694 "cfg.tab.c"
    break;

  case 276: /* assign_stm: ALIAS EQUAL id_lst  */
#line 1494 "cfg.y"
                                      { IFOR();
							for(lst_tmp=(yyvsp[0].sockid); lst_tmp; lst_tmp=lst_tmp->next)
								add_alias(lst_tmp->name, strlen(lst_tmp->name),
											lst_tmp->port, lst_tmp->proto, si_subdomain_to_alias_flag(lst_tmp->flags));
							  }
#line 4704 "cfg.tab.c"
    break;

  case 277: /* assign_stm: ALIAS EQUAL error  */
#line 1499 "cfg.y"
                                      { yyerror("hostname expected (use quotes"
							" if the hostname includes config keywords)"); }
#line 4711 "cfg.tab.c"
    break;

  case 278: /* assign_stm: AUTO_ALIASES EQUAL NUMBER  */
#line 1501 "cfg.y"
                                            { IFOR();
								auto_aliases=(yyvsp[0].intval); }
#line 4718 "cfg.tab.c"
    break;

  case 279: /* assign_stm: AUTO_ALIASES EQUAL error  */
#line 1503 "cfg.y"
                                            { yyerror("number  expected"); }
#line 4724 "cfg.tab.c"
    break;

  case 280: /* assign_stm: ADVERTISED_ADDRESS EQUAL listen_id  */
#line 1504 "cfg.y"
                                                     { IFOR();
								if ((yyvsp[0].strval)) {
									default_global_address->s=(yyvsp[0].strval);
									default_global_address->len=strlen((yyvsp[0].strval));
								}
								}
#line 4735 "cfg.tab.c"
    break;

  case 281: /* assign_stm: ADVERTISED_ADDRESS EQUAL error  */
#line 1510 "cfg.y"
                                                 {yyerror("ip address or hostname "
												"expected"); }
#line 4742 "cfg.tab.c"
    break;

  case 282: /* assign_stm: ADVERTISED_PORT EQUAL NUMBER  */
#line 1512 "cfg.y"
                                               { IFOR();
								tmp = int2str((yyvsp[0].intval), &i_tmp);
								if (i_tmp > default_global_port->len)
									default_global_port->s =
									pkg_realloc(default_global_port->s, i_tmp);
								if (!default_global_port->s) {
									LM_CRIT("cfg. parser: out of memory.\n");
									YYABORT;
								} else {
									default_global_port->len = i_tmp;
									memcpy(default_global_port->s, tmp,
											default_global_port->len);
								}
								}
#line 4761 "cfg.tab.c"
    break;

  case 283: /* assign_stm: ADVERTISED_PORT EQUAL error  */
#line 1526 "cfg.y"
                                             {yyerror("ip address or hostname "
												"expected"); }
#line 4768 "cfg.tab.c"
    break;

  case 284: /* assign_stm: DISABLE_CORE EQUAL NUMBER  */
#line 1528 "cfg.y"
                                            { IFOR();
										disable_core_dump=(yyvsp[0].intval);
									}
#line 4776 "cfg.tab.c"
    break;

  case 285: /* assign_stm: DISABLE_CORE EQUAL error  */
#line 1531 "cfg.y"
                                           { yyerror("boolean value expected"); }
#line 4782 "cfg.tab.c"
    break;

  case 286: /* assign_stm: OPEN_FD_LIMIT EQUAL NUMBER  */
#line 1532 "cfg.y"
                                             { IFOR();
										open_files_limit=(yyvsp[0].intval);
									}
#line 4790 "cfg.tab.c"
    break;

  case 287: /* assign_stm: OPEN_FD_LIMIT EQUAL error  */
#line 1535 "cfg.y"
                                            { yyerror("number expected"); }
#line 4796 "cfg.tab.c"
    break;

  case 288: /* assign_stm: MCAST_LOOPBACK EQUAL NUMBER  */
#line 1536 "cfg.y"
                                              { IFOR();
								#ifdef USE_MCAST
										mcast_loopback=(yyvsp[0].intval);
								#else
									warn("no multicast support compiled in");
								#endif
		  }
#line 4808 "cfg.tab.c"
    break;

  case 289: /* assign_stm: MCAST_LOOPBACK EQUAL error  */
#line 1543 "cfg.y"
                                             { yyerror("boolean value expected"); }
#line 4814 "cfg.tab.c"
    break;

  case 290: /* assign_stm: MCAST_TTL EQUAL NUMBER  */
#line 1544 "cfg.y"
                                         { IFOR();
								#ifdef USE_MCAST
										mcast_ttl=(yyvsp[0].intval);
								#else
									warn("no multicast support compiled in");
								#endif
		  }
#line 4826 "cfg.tab.c"
    break;

  case 291: /* assign_stm: MCAST_TTL EQUAL error  */
#line 1551 "cfg.y"
                                        { yyerror("number expected as tos"); }
#line 4832 "cfg.tab.c"
    break;

  case 292: /* assign_stm: TOS EQUAL NUMBER  */
#line 1552 "cfg.y"
                                   { IFOR(); tos = (yyvsp[0].intval);
							if (tos<0)
								yyerror("invalid tos value");
		 }
#line 4841 "cfg.tab.c"
    break;

  case 293: /* assign_stm: TOS EQUAL ID  */
#line 1556 "cfg.y"
                               { IFOR();
							if (strcasecmp((yyvsp[0].strval),"IPTOS_LOWDELAY")) {
								tos=IPTOS_LOWDELAY;
							} else if (strcasecmp((yyvsp[0].strval),"IPTOS_THROUGHPUT")) {
								tos=IPTOS_THROUGHPUT;
							} else if (strcasecmp((yyvsp[0].strval),"IPTOS_RELIABILITY")) {
								tos=IPTOS_RELIABILITY;
#if defined(IPTOS_MINCOST)
							} else if (strcasecmp((yyvsp[0].strval),"IPTOS_MINCOST")) {
								tos=IPTOS_MINCOST;
#endif
#if defined(IPTOS_LOWCOST)
							} else if (strcasecmp((yyvsp[0].strval),"IPTOS_LOWCOST")) {
								tos=IPTOS_LOWCOST;
#endif
							} else {
								yyerror("invalid tos value - allowed: "
									"IPTOS_LOWDELAY,IPTOS_THROUGHPUT,"
									"IPTOS_RELIABILITY"
#if defined(IPTOS_LOWCOST)
									",IPTOS_LOWCOST"
#endif
#if defined(IPTOS_MINCOST)
									",IPTOS_MINCOST"
#endif
									"\n");
							}
		 }
#line 4874 "cfg.tab.c"
    break;

  case 294: /* assign_stm: TOS EQUAL error  */
#line 1584 "cfg.y"
                                  { yyerror("number expected"); }
#line 4880 "cfg.tab.c"
    break;

  case 295: /* assign_stm: MPATH EQUAL mpath_def_list  */
#line 1585 "cfg.y"
                                             {IFOR();}
#line 4886 "cfg.tab.c"
    break;

  case 296: /* assign_stm: MPATH EQUAL error  */
#line 1586 "cfg.y"
                                     { yyerror("string value expected"); }
#line 4892 "cfg.tab.c"
    break;

  case 297: /* assign_stm: DISABLE_DNS_FAILOVER EQUAL NUMBER  */
#line 1587 "cfg.y"
                                                    { IFOR();
										disable_dns_failover=(yyvsp[0].intval);
									}
#line 4900 "cfg.tab.c"
    break;

  case 298: /* assign_stm: DISABLE_DNS_FAILOVER error  */
#line 1590 "cfg.y"
                                             { yyerror("boolean value expected"); }
#line 4906 "cfg.tab.c"
    break;

  case 299: /* assign_stm: DISABLE_DNS_BLACKLIST EQUAL NUMBER  */
#line 1591 "cfg.y"
                                                     { IFOR();
										disable_dns_blacklist=(yyvsp[0].intval);
									}
#line 4914 "cfg.tab.c"
    break;

  case 300: /* assign_stm: DISABLE_DNS_BLACKLIST error  */
#line 1594 "cfg.y"
                                              { yyerror("boolean value expected"); }
#line 4920 "cfg.tab.c"
    break;

  case 301: /* assign_stm: DST_BLACKLIST EQUAL ID SLASH blst_flags blst_def  */
#line 1595 "cfg.y"
                                                                   { IFOR();
				s_tmp.s = (yyvsp[-3].strval);
				s_tmp.len = strlen((yyvsp[-3].strval));
				if (create_bl_head(_str("script"), (yyvsp[-1].intval),
				    bl_head, bl_tail, &s_tmp)==0) {
					yyerror("failed to create blacklist\n");
					YYABORT;
				}
				bl_head = bl_tail = NULL;
				}
#line 4935 "cfg.tab.c"
    break;

  case 302: /* assign_stm: DST_BLACKLIST EQUAL ID blst_def  */
#line 1605 "cfg.y"
                                                  { IFOR();
				s_tmp.s = (yyvsp[-1].strval);
				s_tmp.len = strlen((yyvsp[-1].strval));
				if (create_bl_head(_str("script"), BL_READONLY_LIST,
				    bl_head, bl_tail, &s_tmp)==0) {
					yyerror("failed to create blacklist\n");
					YYABORT;
				}
				bl_head = bl_tail = NULL;
				}
#line 4950 "cfg.tab.c"
    break;

  case 303: /* assign_stm: DISABLE_STATELESS_FWD EQUAL NUMBER  */
#line 1615 "cfg.y"
                                                     { IFOR();
				sl_fwd_disabled=(yyvsp[0].intval); }
#line 4957 "cfg.tab.c"
    break;

  case 304: /* assign_stm: DB_VERSION_TABLE EQUAL STRING  */
#line 1617 "cfg.y"
                                                { IFOR();
				db_version_table=(yyvsp[0].strval); }
#line 4964 "cfg.tab.c"
    break;

  case 305: /* assign_stm: DB_VERSION_TABLE EQUAL error  */
#line 1619 "cfg.y"
                                               { yyerror("string value expected"); }
#line 4970 "cfg.tab.c"
    break;

  case 306: /* assign_stm: DB_DEFAULT_URL EQUAL STRING  */
#line 1620 "cfg.y"
                                              { IFOR();
				db_default_url=(yyvsp[0].strval); }
#line 4977 "cfg.tab.c"
    break;

  case 307: /* assign_stm: DB_DEFAULT_URL EQUAL error  */
#line 1622 "cfg.y"
                                             { yyerror("string value expected"); }
#line 4983 "cfg.tab.c"
    break;

  case 308: /* assign_stm: DB_MAX_ASYNC_CONNECTIONS EQUAL NUMBER  */
#line 1623 "cfg.y"
                                                        { IFOR();
				db_max_async_connections=(yyvsp[0].intval); }
#line 4990 "cfg.tab.c"
    break;

  case 309: /* assign_stm: DB_MAX_ASYNC_CONNECTIONS EQUAL error  */
#line 1625 "cfg.y"
                                                       {
				yyerror("integer value expected");
				}
#line 4998 "cfg.tab.c"
    break;

  case 310: /* assign_stm: DISABLE_503_TRANSLATION EQUAL NUMBER  */
#line 1628 "cfg.y"
                                                       { IFOR();
				disable_503_translation=(yyvsp[0].intval); }
#line 5005 "cfg.tab.c"
    break;

  case 311: /* assign_stm: DISABLE_503_TRANSLATION EQUAL error  */
#line 1630 "cfg.y"
                                                      {
				yyerror("integer value expected");
				}
#line 5013 "cfg.tab.c"
    break;

  case 312: /* assign_stm: AUTO_SCALING_PROFILE EQUAL auto_scale_profile_def  */
#line 1633 "cfg.y"
                                                                    {}
#line 5019 "cfg.tab.c"
    break;

  case 313: /* assign_stm: AUTO_SCALING_PROFILE EQUAL error  */
#line 1634 "cfg.y"
                                                   {
				yyerror("bad auto-scaling profile definition");
				}
#line 5027 "cfg.tab.c"
    break;

  case 314: /* assign_stm: AUTO_SCALING_CYCLE EQUAL NUMBER  */
#line 1637 "cfg.y"
                                                  { IFOR();
				auto_scaling_cycle=(yyvsp[0].intval); }
#line 5034 "cfg.tab.c"
    break;

  case 315: /* assign_stm: AUTO_SCALING_CYCLE EQUAL error  */
#line 1639 "cfg.y"
                                                 {
				yyerror("integer value expected");
				}
#line 5042 "cfg.tab.c"
    break;

  case 316: /* assign_stm: error EQUAL  */
#line 1642 "cfg.y"
                              { yyerror("unknown config variable"); }
#line 5048 "cfg.tab.c"
    break;

  case 317: /* module_stm: LOADMODULE STRING  */
#line 1645 "cfg.y"
                                        { IFOR();
			if (load_module((yyvsp[0].strval)) < 0)
				yyerrorf("failed to load module %s\n", (yyvsp[0].strval));
		}
#line 5057 "cfg.tab.c"
    break;

  case 318: /* module_stm: LOADMODULE error  */
#line 1649 "cfg.y"
                                        { yyerror("string expected");  }
#line 5063 "cfg.tab.c"
    break;

  case 319: /* module_stm: MODPARAM LPAREN STRING COMMA STRING COMMA STRING RPAREN  */
#line 1650 "cfg.y"
                                                                          { IFOR();
				if (set_mod_param_regex((yyvsp[-5].strval), (yyvsp[-3].strval), STR_PARAM, (yyvsp[-1].strval)) != 0) {
					yyerrorf("Parameter <%s> not found in module <%s> - "
						"can't set", (yyvsp[-3].strval), (yyvsp[-5].strval));
				}
			}
#line 5074 "cfg.tab.c"
    break;

  case 320: /* module_stm: MODPARAM LPAREN STRING COMMA STRING COMMA folded_string RPAREN  */
#line 1656 "cfg.y"
                                                                                 { IFOR();
				if (set_mod_param_regex((yyvsp[-5].strval), (yyvsp[-3].strval), STR_PARAM, (yyvsp[-1].strval)) != 0) {
					yyerrorf("Parameter <%s> not found in module <%s> - "
						"can't set", (yyvsp[-3].strval), (yyvsp[-5].strval));
				}
			}
#line 5085 "cfg.tab.c"
    break;

  case 321: /* module_stm: MODPARAM LPAREN STRING COMMA STRING COMMA snumber RPAREN  */
#line 1662 "cfg.y"
                                                                           { IFOR();
				if (set_mod_param_regex((yyvsp[-5].strval), (yyvsp[-3].strval), INT_PARAM, (void*)(yyvsp[-1].intval)) != 0) {
					yyerrorf("Parameter <%s> not found in module <%s> - "
						"can't set", (yyvsp[-3].strval), (yyvsp[-5].strval));
				}
			}
#line 5096 "cfg.tab.c"
    break;

  case 322: /* module_stm: MODPARAM error  */
#line 1668 "cfg.y"
                                 { yyerror("Invalid arguments"); }
#line 5102 "cfg.tab.c"
    break;

  case 323: /* ip: ipv4  */
#line 1672 "cfg.y"
                       { (yyval.ipaddr)=(yyvsp[0].ipaddr); }
#line 5108 "cfg.tab.c"
    break;

  case 324: /* ip: ipv6  */
#line 1673 "cfg.y"
                       { (yyval.ipaddr)=(yyvsp[0].ipaddr); }
#line 5114 "cfg.tab.c"
    break;

  case 325: /* ipv4: IPV4ADDR  */
#line 1676 "cfg.y"
                 {
					(yyval.ipaddr)=pkg_malloc(sizeof(struct ip_addr));
					if ((yyval.ipaddr)==0){
						LM_CRIT("ERROR: cfg. parser: out of memory.\n");
						YYABORT;
					}else{
						memset((yyval.ipaddr), 0, sizeof(struct ip_addr));
						(yyval.ipaddr)->af=AF_INET;
						(yyval.ipaddr)->len=16;
						if (inet_pton(AF_INET, (yyvsp[0].strval), (yyval.ipaddr)->u.addr)<=0){
							yyerror("bad ipv4 address");
						}
					}
				}
#line 5133 "cfg.tab.c"
    break;

  case 326: /* ipv6addr: IPV6ADDR  */
#line 1692 "cfg.y"
                         {
					(yyval.ipaddr)=pkg_malloc(sizeof(struct ip_addr));
					if ((yyval.ipaddr)==0){
						LM_CRIT("ERROR: cfg. parser: out of memory.\n");
						YYABORT;
					}else{
						memset((yyval.ipaddr), 0, sizeof(struct ip_addr));
						(yyval.ipaddr)->af=AF_INET6;
						(yyval.ipaddr)->len=16;
						if (inet_pton(AF_INET6, (yyvsp[0].strval), (yyval.ipaddr)->u.addr)<=0){
							yyerror("bad ipv6 address");
						}
					}
				}
#line 5152 "cfg.tab.c"
    break;

  case 327: /* ipv6: ipv6addr  */
#line 1708 "cfg.y"
                 { (yyval.ipaddr)=(yyvsp[0].ipaddr); }
#line 5158 "cfg.tab.c"
    break;

  case 328: /* ipv6: LBRACK ipv6addr RBRACK  */
#line 1709 "cfg.y"
                                 {(yyval.ipaddr)=(yyvsp[-1].ipaddr); }
#line 5164 "cfg.tab.c"
    break;

  case 329: /* ipnet: IPNET  */
#line 1712 "cfg.y"
                {
				if (parse_ipnet((yyvsp[0].strval), strlen((yyvsp[0].strval)), &net_tmp) < 0)
					yyerror("unable to parse ip and/or netmask\n");

				(yyval.ipnet) = net_tmp;
			}
#line 5175 "cfg.tab.c"
    break;

  case 330: /* ipnet: ip  */
#line 1718 "cfg.y"
                        {
				(yyval.ipnet)=mk_net_bitlen((yyvsp[0].ipaddr), (yyvsp[0].ipaddr)->len*8);
				pkg_free((yyvsp[0].ipaddr));
			}
#line 5184 "cfg.tab.c"
    break;

  case 331: /* folded_string: STRING STRING  */
#line 1728 "cfg.y"
                              {
				(yyval.strval) = pkg_malloc( strlen((yyvsp[-1].strval)) + strlen((yyvsp[0].strval)) + 1);
				if ((yyval.strval)==0){
					yyerror("cfg. parser: out of memory");
					YYABORT;
				} else {
					strcpy((yyval.strval),(yyvsp[-1].strval)); strcat((yyval.strval),(yyvsp[0].strval));
					pkg_free((yyvsp[-1].strval)); pkg_free((yyvsp[0].strval));
				}
			}
#line 5199 "cfg.tab.c"
    break;

  case 332: /* folded_string: folded_string STRING  */
#line 1738 "cfg.y"
                                       {
				(yyval.strval) = pkg_malloc( strlen((yyvsp[-1].strval)) + strlen((yyvsp[0].strval)) + 1);
				if ((yyval.strval)==0){
					LM_CRIT("ERROR: cfg. parser: out of memory.\n");
					YYABORT;
				} else {
					strcpy((yyval.strval),(yyvsp[-1].strval)); strcat((yyval.strval),(yyvsp[0].strval));
					pkg_free((yyvsp[-1].strval)); pkg_free((yyvsp[0].strval));
				}
			}
#line 5214 "cfg.tab.c"
    break;

  case 333: /* route_name: ID  */
#line 1749 "cfg.y"
                {
				(yyval.strval) = (yyvsp[0].strval);
				}
#line 5222 "cfg.tab.c"
    break;

  case 334: /* route_name: NUMBER  */
#line 1752 "cfg.y"
                         {
				tmp=int2str((yyvsp[0].intval), &i_tmp);
				if (((yyval.strval)=pkg_malloc(i_tmp+1))==0) {
					yyerror("cfg. parser: out of memory.\n");
					YYABORT;
				}
				memcpy( (yyval.strval), tmp, i_tmp);
				(yyval.strval)[i_tmp] = 0;
				}
#line 5236 "cfg.tab.c"
    break;

  case 335: /* route_name: STRING  */
#line 1761 "cfg.y"
                        {
				(yyval.strval) = (yyvsp[0].strval);
		}
#line 5244 "cfg.tab.c"
    break;

  case 336: /* route_name_var: route_name  */
#line 1766 "cfg.y"
                           {
				/* check to see if there are any "$" in the string name */
				tmp = strchr((yyvsp[0].strval), '$');
				if (!tmp) {
					/* route name is a cosntant string - search for the route */
					rn_tmp.data = 0;
					rn_tmp.iname = get_script_route_idx((yyvsp[0].strval), sroutes->request,
							RT_NO, 0);
					if (rn_tmp.iname==-1)
						yyerror("too many script routes");
					(yyval.intval) = NUMBER_ST;
				} else {
					tstr.s = (yyvsp[0].strval);
					tstr.len = strlen(tstr.s);
					if (pv_parse_format(&tstr, &elem) < 0) {
						yyerror("cannot parse format");
						YYABORT;
					}
					/* the route name is a format, so we can't evaluate it now */
					rn_tmp.ename = elem;
					(yyval.intval) = SCRIPTVAR_ELEM_ST;
				}
			}
#line 5272 "cfg.tab.c"
    break;

  case 337: /* route_name_var: script_var  */
#line 1789 "cfg.y"
                             {
				rn_tmp.sname = (yyvsp[0].specval);
				(yyval.intval) = SCRIPTVAR_ST;
		}
#line 5281 "cfg.tab.c"
    break;

  case 338: /* route_stm: ROUTE LBRACE actions RBRACE  */
#line 1794 "cfg.y"
                                        {
						if (sroutes->request[DEFAULT_RT].a!=0) {
							yyerror("overwriting default "
								"request routing table");
							YYABORT;
						}
						push((yyvsp[-1].action), &sroutes->request[DEFAULT_RT].a);
					}
#line 5294 "cfg.tab.c"
    break;

  case 339: /* route_stm: ROUTE LBRACK route_name RBRACK LBRACE actions RBRACE  */
#line 1802 "cfg.y"
                                                                       {
						if ( strtol((yyvsp[-4].strval),&tmp,10)==0 && *tmp==0) {
							/* route[0] detected */
							if (sroutes->request[DEFAULT_RT].a!=0) {
								yyerror("overwriting(2) default "
									"request routing table");
								YYABORT;
							}
							push((yyvsp[-1].action), &sroutes->request[DEFAULT_RT].a);
						} else {
							i_tmp = get_script_route_idx( (yyvsp[-4].strval),
								sroutes->request, RT_NO,1);
							if (i_tmp==-1) YYABORT;
							push((yyvsp[-1].action), &sroutes->request[i_tmp].a);
						}
					}
#line 5315 "cfg.tab.c"
    break;

  case 340: /* route_stm: ROUTE error  */
#line 1818 "cfg.y"
                              { yyerror("invalid  route  statement"); }
#line 5321 "cfg.tab.c"
    break;

  case 341: /* failure_route_stm: ROUTE_FAILURE LBRACK route_name RBRACK LBRACE actions RBRACE  */
#line 1821 "cfg.y"
                                                                                {
						i_tmp = get_script_route_idx( (yyvsp[-4].strval), sroutes->failure,
							FAILURE_RT_NO,1);
						if (i_tmp==-1) YYABORT;
						push((yyvsp[-1].action), &sroutes->failure[i_tmp].a);
					}
#line 5332 "cfg.tab.c"
    break;

  case 342: /* failure_route_stm: ROUTE_FAILURE error  */
#line 1827 "cfg.y"
                                      { yyerror("invalid failure_route statement"); }
#line 5338 "cfg.tab.c"
    break;

  case 343: /* onreply_route_stm: ROUTE_ONREPLY LBRACE actions RBRACE  */
#line 1830 "cfg.y"
                                                       {
						if (sroutes->onreply[DEFAULT_RT].a!=0) {
							yyerror("overwriting default "
								"onreply routing table");
							YYABORT;
						}
						push((yyvsp[-1].action), &sroutes->onreply[DEFAULT_RT].a);
					}
#line 5351 "cfg.tab.c"
    break;

  case 344: /* onreply_route_stm: ROUTE_ONREPLY LBRACK route_name RBRACK LBRACE actions RBRACE  */
#line 1838 "cfg.y"
                                                                               {
						i_tmp = get_script_route_idx( (yyvsp[-4].strval), sroutes->onreply,
							ONREPLY_RT_NO,1);
						if (i_tmp==-1) YYABORT;
						push((yyvsp[-1].action), &sroutes->onreply[i_tmp].a);
					}
#line 5362 "cfg.tab.c"
    break;

  case 345: /* onreply_route_stm: ROUTE_ONREPLY error  */
#line 1844 "cfg.y"
                                      { yyerror("invalid onreply_route statement"); }
#line 5368 "cfg.tab.c"
    break;

  case 346: /* branch_route_stm: ROUTE_BRANCH LBRACK route_name RBRACK LBRACE actions RBRACE  */
#line 1847 "cfg.y"
                                                                              {
						i_tmp = get_script_route_idx( (yyvsp[-4].strval), sroutes->branch,
							BRANCH_RT_NO,1);
						if (i_tmp==-1) YYABORT;
						push((yyvsp[-1].action), &sroutes->branch[i_tmp].a);
					}
#line 5379 "cfg.tab.c"
    break;

  case 347: /* branch_route_stm: ROUTE_BRANCH error  */
#line 1853 "cfg.y"
                                     { yyerror("invalid branch_route statement"); }
#line 5385 "cfg.tab.c"
    break;

  case 348: /* error_route_stm: ROUTE_ERROR LBRACE actions RBRACE  */
#line 1856 "cfg.y"
                                                    {
						if (sroutes->error.a!=0) {
							yyerror("overwriting default "
								"error routing table");
							YYABORT;
						}
						push((yyvsp[-1].action), &sroutes->error.a);
					}
#line 5398 "cfg.tab.c"
    break;

  case 349: /* error_route_stm: ROUTE_ERROR error  */
#line 1864 "cfg.y"
                                    { yyerror("invalid error_route statement"); }
#line 5404 "cfg.tab.c"
    break;

  case 350: /* local_route_stm: ROUTE_LOCAL LBRACE actions RBRACE  */
#line 1867 "cfg.y"
                                                    {
						if (sroutes->local.a!=0) {
							yyerror("re-definition of local "
								"route detected");
							YYABORT;
						}
						push((yyvsp[-1].action), &sroutes->local.a);
					}
#line 5417 "cfg.tab.c"
    break;

  case 351: /* local_route_stm: ROUTE_LOCAL error  */
#line 1875 "cfg.y"
                                    { yyerror("invalid local_route statement"); }
#line 5423 "cfg.tab.c"
    break;

  case 352: /* startup_route_stm: ROUTE_STARTUP LBRACE actions RBRACE  */
#line 1878 "cfg.y"
                                                        {
						if (sroutes->startup.a!=0) {
							yyerror("re-definition of startup "
								"route detected");
							YYABORT;
						}
						push((yyvsp[-1].action), &sroutes->startup.a);
					}
#line 5436 "cfg.tab.c"
    break;

  case 353: /* startup_route_stm: ROUTE_STARTUP error  */
#line 1886 "cfg.y"
                                      { yyerror("invalid startup_route statement"); }
#line 5442 "cfg.tab.c"
    break;

  case 354: /* timer_route_stm: ROUTE_TIMER LBRACK route_name COMMA NUMBER RBRACK LBRACE actions RBRACE  */
#line 1889 "cfg.y"
                                                                                          {
						i_tmp = 0;
						while(i_tmp<TIMER_RT_NO && sroutes->timer[i_tmp].a!=0){
							i_tmp++;
						}
						if(i_tmp == TIMER_RT_NO) {
							yyerror("Too many timer routes defined\n");
							YYABORT;
						}
						sroutes->timer[i_tmp].name = (yyvsp[-6].strval);
						sroutes->timer[i_tmp].interval = (yyvsp[-4].intval);
						push((yyvsp[-1].action), &sroutes->timer[i_tmp].a);
					}
#line 5460 "cfg.tab.c"
    break;

  case 355: /* timer_route_stm: ROUTE_TIMER error  */
#line 1902 "cfg.y"
                                    { yyerror("invalid timer_route statement"); }
#line 5466 "cfg.tab.c"
    break;

  case 356: /* event_route_stm: ROUTE_EVENT LBRACK route_name RBRACK LBRACE actions RBRACE  */
#line 1905 "cfg.y"
                                                                            {
						i_tmp = get_script_route_idx((yyvsp[-4].strval), sroutes->event,
								EVENT_RT_NO,1);
						if (i_tmp==-1) YYABORT;
						push((yyvsp[-1].action), &sroutes->event[i_tmp].a);
					}
#line 5477 "cfg.tab.c"
    break;

  case 357: /* event_route_stm: ROUTE_EVENT error  */
#line 1911 "cfg.y"
                                    { yyerror("invalid event_route statement"); }
#line 5483 "cfg.tab.c"
    break;

  case 358: /* exp: exp AND exp  */
#line 1916 "cfg.y"
                        { (yyval.expr)=mk_exp(AND_OP, (yyvsp[-2].expr), (yyvsp[0].expr)); }
#line 5489 "cfg.tab.c"
    break;

  case 359: /* exp: exp OR exp  */
#line 1917 "cfg.y"
                                { (yyval.expr)=mk_exp(OR_OP, (yyvsp[-2].expr), (yyvsp[0].expr));  }
#line 5495 "cfg.tab.c"
    break;

  case 360: /* exp: NOT exp  */
#line 1918 "cfg.y"
                                        { (yyval.expr)=mk_exp(NOT_OP, (yyvsp[0].expr), 0);  }
#line 5501 "cfg.tab.c"
    break;

  case 361: /* exp: LPAREN exp RPAREN  */
#line 1919 "cfg.y"
                                { (yyval.expr)=mk_exp(EVAL_OP, (yyvsp[-1].expr), 0); }
#line 5507 "cfg.tab.c"
    break;

  case 362: /* exp: LBRACK assignexp RBRACK  */
#line 1920 "cfg.y"
                                  { (yyval.expr)=(yyvsp[-1].expr); }
#line 5513 "cfg.tab.c"
    break;

  case 363: /* exp: exp_elem  */
#line 1921 "cfg.y"
                                        { (yyval.expr)=(yyvsp[0].expr); }
#line 5519 "cfg.tab.c"
    break;

  case 364: /* equalop: EQUAL_T  */
#line 1924 "cfg.y"
                          {(yyval.intval)=EQUAL_OP; }
#line 5525 "cfg.tab.c"
    break;

  case 365: /* equalop: DIFF  */
#line 1925 "cfg.y"
                                {(yyval.intval)=DIFF_OP; }
#line 5531 "cfg.tab.c"
    break;

  case 366: /* compop: GT  */
#line 1928 "cfg.y"
                {(yyval.intval)=GT_OP; }
#line 5537 "cfg.tab.c"
    break;

  case 367: /* compop: LT  */
#line 1929 "cfg.y"
                        {(yyval.intval)=LT_OP; }
#line 5543 "cfg.tab.c"
    break;

  case 368: /* compop: GTE  */
#line 1930 "cfg.y"
                        {(yyval.intval)=GTE_OP; }
#line 5549 "cfg.tab.c"
    break;

  case 369: /* compop: LTE  */
#line 1931 "cfg.y"
                        {(yyval.intval)=LTE_OP; }
#line 5555 "cfg.tab.c"
    break;

  case 370: /* matchop: MATCH  */
#line 1933 "cfg.y"
                {(yyval.intval)=MATCH_OP; }
#line 5561 "cfg.tab.c"
    break;

  case 371: /* matchop: NOTMATCH  */
#line 1934 "cfg.y"
                                {(yyval.intval)=NOTMATCH_OP; }
#line 5567 "cfg.tab.c"
    break;

  case 372: /* intop: equalop  */
#line 1937 "cfg.y"
                {(yyval.intval)=(yyvsp[0].intval); }
#line 5573 "cfg.tab.c"
    break;

  case 373: /* intop: compop  */
#line 1938 "cfg.y"
                        {(yyval.intval)=(yyvsp[0].intval); }
#line 5579 "cfg.tab.c"
    break;

  case 374: /* strop: equalop  */
#line 1941 "cfg.y"
                {(yyval.intval)=(yyvsp[0].intval); }
#line 5585 "cfg.tab.c"
    break;

  case 375: /* strop: compop  */
#line 1942 "cfg.y"
                     {(yyval.intval)=(yyvsp[0].intval); }
#line 5591 "cfg.tab.c"
    break;

  case 376: /* strop: matchop  */
#line 1943 "cfg.y"
                                {(yyval.intval)=(yyvsp[0].intval); }
#line 5597 "cfg.tab.c"
    break;

  case 377: /* script_var: SCRIPTVAR  */
#line 1946 "cfg.y"
                                {
				spec = (pv_spec_t*)pkg_malloc(sizeof(pv_spec_t));
				if (spec==NULL){
					yyerror("no more pkg memory\n");
					YYABORT;
				}
				memset(spec, 0, sizeof(pv_spec_t));
				tstr.s = (yyvsp[0].strval);
				tstr.len = strlen(tstr.s);
				if(pv_parse_spec(&tstr, spec)==NULL)
				{
					yyerror("unknown script variable");
				}

				(yyval.specval) = spec;
			}
#line 5618 "cfg.tab.c"
    break;

  case 378: /* script_var: SCRIPTVARERR  */
#line 1962 "cfg.y"
                               {
			(yyval.specval)=0; yyerror("invalid script variable name");
		}
#line 5626 "cfg.tab.c"
    break;

  case 379: /* exp_elem: exp_cond  */
#line 1967 "cfg.y"
                                {(yyval.expr)=(yyvsp[0].expr); }
#line 5632 "cfg.tab.c"
    break;

  case 380: /* exp_elem: exp_stm  */
#line 1968 "cfg.y"
                                        {(yyval.expr)=mk_elem( NO_OP, ACTION_O, 0, ACTIONS_ST, (yyvsp[0].action) ); }
#line 5638 "cfg.tab.c"
    break;

  case 381: /* exp_elem: snumber  */
#line 1969 "cfg.y"
                                        {(yyval.expr)=mk_elem( NO_OP, NUMBER_O, 0, NUMBER_ST,
											(void*)(yyvsp[0].intval) ); }
#line 5645 "cfg.tab.c"
    break;

  case 382: /* exp_elem: script_var  */
#line 1971 "cfg.y"
                                {
				(yyval.expr)=mk_elem(NO_OP, SCRIPTVAR_O,0,SCRIPTVAR_ST,(void*)(yyvsp[0].specval));
			}
#line 5653 "cfg.tab.c"
    break;

  case 383: /* exp_cond: script_var strop script_var  */
#line 1976 "cfg.y"
                                      {
				(yyval.expr)=mk_elem( (yyvsp[-1].intval), SCRIPTVAR_O,(void*)(yyvsp[-2].specval),SCRIPTVAR_ST,(void*)(yyvsp[0].specval));
			}
#line 5661 "cfg.tab.c"
    break;

  case 384: /* exp_cond: script_var strop STRING  */
#line 1979 "cfg.y"
                                          {
				(yyval.expr)=mk_elem( (yyvsp[-1].intval), SCRIPTVAR_O,(void*)(yyvsp[-2].specval),STR_ST,(yyvsp[0].strval));
			}
#line 5669 "cfg.tab.c"
    break;

  case 385: /* exp_cond: script_var intop snumber  */
#line 1982 "cfg.y"
                                           {
				(yyval.expr)=mk_elem( (yyvsp[-1].intval), SCRIPTVAR_O,(void*)(yyvsp[-2].specval),NUMBER_ST,(void *)(yyvsp[0].intval));
			}
#line 5677 "cfg.tab.c"
    break;

  case 386: /* exp_cond: script_var equalop NULLV  */
#line 1985 "cfg.y"
                                                {
				(yyval.expr)=mk_elem( (yyvsp[-1].intval), SCRIPTVAR_O,(void*)(yyvsp[-2].specval), NULLV_ST, 0);
			}
#line 5685 "cfg.tab.c"
    break;

  case 387: /* exp_cond: script_var equalop ipnet  */
#line 1988 "cfg.y"
                                           {
				(yyval.expr)=mk_elem((yyvsp[-1].intval), SCRIPTVAR_O, (void*)(yyvsp[-2].specval), NET_ST, (yyvsp[0].ipnet));
			}
#line 5693 "cfg.tab.c"
    break;

  case 388: /* assignop: EQUAL  */
#line 1994 "cfg.y"
              { (yyval.intval) = EQ_T; }
#line 5699 "cfg.tab.c"
    break;

  case 389: /* assignop: COLONEQ  */
#line 1995 "cfg.y"
                  { (yyval.intval) = COLONEQ_T; }
#line 5705 "cfg.tab.c"
    break;

  case 390: /* assignop: PLUSEQ  */
#line 1996 "cfg.y"
                 { (yyval.intval) = PLUSEQ_T; }
#line 5711 "cfg.tab.c"
    break;

  case 391: /* assignop: MINUSEQ  */
#line 1997 "cfg.y"
                  { (yyval.intval) = MINUSEQ_T;}
#line 5717 "cfg.tab.c"
    break;

  case 392: /* assignop: SLASHEQ  */
#line 1998 "cfg.y"
                  { (yyval.intval) = DIVEQ_T; }
#line 5723 "cfg.tab.c"
    break;

  case 393: /* assignop: MULTEQ  */
#line 1999 "cfg.y"
                 { (yyval.intval) = MULTEQ_T; }
#line 5729 "cfg.tab.c"
    break;

  case 394: /* assignop: MODULOEQ  */
#line 2000 "cfg.y"
                   { (yyval.intval) = MODULOEQ_T; }
#line 5735 "cfg.tab.c"
    break;

  case 395: /* assignop: BANDEQ  */
#line 2001 "cfg.y"
                 { (yyval.intval) = BANDEQ_T; }
#line 5741 "cfg.tab.c"
    break;

  case 396: /* assignop: BOREQ  */
#line 2002 "cfg.y"
                { (yyval.intval) = BOREQ_T; }
#line 5747 "cfg.tab.c"
    break;

  case 397: /* assignop: BXOREQ  */
#line 2003 "cfg.y"
                 { (yyval.intval) = BXOREQ_T; }
#line 5753 "cfg.tab.c"
    break;

  case 398: /* assignexp: snumber  */
#line 2007 "cfg.y"
                { (yyval.expr) = mk_elem(VALUE_OP, NUMBERV_O, (void*)(yyvsp[0].intval), 0, 0); }
#line 5759 "cfg.tab.c"
    break;

  case 399: /* assignexp: STRING  */
#line 2008 "cfg.y"
                 { (yyval.expr) = mk_elem(VALUE_OP, STRINGV_O, (yyvsp[0].strval), 0, 0); }
#line 5765 "cfg.tab.c"
    break;

  case 400: /* assignexp: script_var  */
#line 2009 "cfg.y"
                     { (yyval.expr) = mk_elem(VALUE_OP, SCRIPTVAR_O, (yyvsp[0].specval), 0, 0); }
#line 5771 "cfg.tab.c"
    break;

  case 401: /* assignexp: exp_cond  */
#line 2010 "cfg.y"
                   { (yyval.expr)= (yyvsp[0].expr); }
#line 5777 "cfg.tab.c"
    break;

  case 402: /* assignexp: cmd  */
#line 2011 "cfg.y"
              { (yyval.expr)=mk_elem( NO_OP, ACTION_O, 0, ACTIONS_ST, (yyvsp[0].action) ); }
#line 5783 "cfg.tab.c"
    break;

  case 403: /* assignexp: assignexp PLUS assignexp  */
#line 2012 "cfg.y"
                                   {
				(yyval.expr) = mk_elem(PLUS_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5791 "cfg.tab.c"
    break;

  case 404: /* assignexp: assignexp MINUS assignexp  */
#line 2015 "cfg.y"
                                    {
				(yyval.expr) = mk_elem(MINUS_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5799 "cfg.tab.c"
    break;

  case 405: /* assignexp: assignexp MULT assignexp  */
#line 2018 "cfg.y"
                                   {
				(yyval.expr) = mk_elem(MULT_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5807 "cfg.tab.c"
    break;

  case 406: /* assignexp: assignexp SLASH assignexp  */
#line 2021 "cfg.y"
                                    {
				(yyval.expr) = mk_elem(DIV_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5815 "cfg.tab.c"
    break;

  case 407: /* assignexp: assignexp MODULO assignexp  */
#line 2024 "cfg.y"
                                     {
				(yyval.expr) = mk_elem(MODULO_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5823 "cfg.tab.c"
    break;

  case 408: /* assignexp: assignexp BAND assignexp  */
#line 2027 "cfg.y"
                                   {
				(yyval.expr) = mk_elem(BAND_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5831 "cfg.tab.c"
    break;

  case 409: /* assignexp: assignexp BOR assignexp  */
#line 2030 "cfg.y"
                                  {
				(yyval.expr) = mk_elem(BOR_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5839 "cfg.tab.c"
    break;

  case 410: /* assignexp: assignexp BXOR assignexp  */
#line 2033 "cfg.y"
                                   {
				(yyval.expr) = mk_elem(BXOR_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5847 "cfg.tab.c"
    break;

  case 411: /* assignexp: assignexp BLSHIFT assignexp  */
#line 2036 "cfg.y"
                                      {
				(yyval.expr) = mk_elem(BLSHIFT_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5855 "cfg.tab.c"
    break;

  case 412: /* assignexp: assignexp BRSHIFT assignexp  */
#line 2039 "cfg.y"
                                      {
				(yyval.expr) = mk_elem(BRSHIFT_OP, EXPR_O, (yyvsp[-2].expr), EXPR_ST, (yyvsp[0].expr));
			}
#line 5863 "cfg.tab.c"
    break;

  case 413: /* assignexp: BNOT assignexp  */
#line 2042 "cfg.y"
                         {
				(yyval.expr) = mk_elem(BNOT_OP, EXPR_O, (yyvsp[0].expr), 0, 0);
			}
#line 5871 "cfg.tab.c"
    break;

  case 414: /* assignexp: LPAREN assignexp RPAREN  */
#line 2045 "cfg.y"
                                  { (yyval.expr) = (yyvsp[-1].expr); }
#line 5877 "cfg.tab.c"
    break;

  case 415: /* assign_cmd: script_var assignop assignexp  */
#line 2048 "cfg.y"
                                          {
			if(!pv_is_w((yyvsp[-2].specval)))
				yyerror("invalid left operand in assignment");
			if((yyvsp[-2].specval)->trans!=0)
				yyerror("transformations not accepted in left side "
					"of assignment");

			mk_action2( (yyval.action), (yyvsp[-1].intval),
					SCRIPTVAR_ST,
					EXPR_ST,
					(yyvsp[-2].specval),
					(yyvsp[0].expr));
		}
#line 5895 "cfg.tab.c"
    break;

  case 416: /* assign_cmd: script_var EQUAL NULLV  */
#line 2061 "cfg.y"
                                  {
			if(!pv_is_w((yyvsp[-2].specval)))
				yyerror("invalid left operand in assignment");
			if((yyvsp[-2].specval)->trans!=0)
				yyerror("transformations not accepted in left side "
					"of assignment");

			mk_action2( (yyval.action), EQ_T,
					SCRIPTVAR_ST,
					NULLV_ST,
					(yyvsp[-2].specval),
					0);
		}
#line 5913 "cfg.tab.c"
    break;

  case 417: /* assign_cmd: script_var COLONEQ NULLV  */
#line 2074 "cfg.y"
                                    {
			if(!pv_is_w((yyvsp[-2].specval)))
				yyerror("invalid left operand in assignment");
			if((yyvsp[-2].specval)->trans!=0)
				yyerror("transformations not accepted in left side "
					"of assignment");

			mk_action2( (yyval.action), COLONEQ_T,
					SCRIPTVAR_ST,
					NULLV_ST,
					(yyvsp[-2].specval),
					0);
		}
#line 5931 "cfg.tab.c"
    break;

  case 418: /* exp_stm: cmd  */
#line 2089 "cfg.y"
                                                                { (yyval.action)=(yyvsp[0].action); }
#line 5937 "cfg.tab.c"
    break;

  case 419: /* exp_stm: if_cmd  */
#line 2090 "cfg.y"
                                                                { (yyval.action)=(yyvsp[0].action); }
#line 5943 "cfg.tab.c"
    break;

  case 420: /* exp_stm: assign_cmd  */
#line 2091 "cfg.y"
                                                                { (yyval.action)=(yyvsp[0].action); }
#line 5949 "cfg.tab.c"
    break;

  case 421: /* exp_stm: LBRACE actions RBRACE  */
#line 2092 "cfg.y"
                                                { (yyval.action)=(yyvsp[-1].action); }
#line 5955 "cfg.tab.c"
    break;

  case 422: /* exp_stm: LBRACE RBRACE  */
#line 2093 "cfg.y"
                                                        { (yyval.action)=0; }
#line 5961 "cfg.tab.c"
    break;

  case 423: /* brk_stm: brk_action  */
#line 2096 "cfg.y"
                                                                { (yyval.action)=(yyvsp[0].action); }
#line 5967 "cfg.tab.c"
    break;

  case 424: /* brk_stm: LBRACE brk_actions RBRACE  */
#line 2097 "cfg.y"
                                                        { (yyval.action)=(yyvsp[-1].action); }
#line 5973 "cfg.tab.c"
    break;

  case 425: /* brk_stm: LBRACE RBRACE  */
#line 2098 "cfg.y"
                                                        { (yyval.action)=0; }
#line 5979 "cfg.tab.c"
    break;

  case 426: /* stm: action  */
#line 2101 "cfg.y"
                                                        { (yyval.action)=(yyvsp[0].action); }
#line 5985 "cfg.tab.c"
    break;

  case 427: /* stm: LBRACE actions RBRACE  */
#line 2102 "cfg.y"
                                                { (yyval.action)=(yyvsp[-1].action); }
#line 5991 "cfg.tab.c"
    break;

  case 428: /* stm: LBRACE RBRACE  */
#line 2103 "cfg.y"
                                                        { (yyval.action)=0; }
#line 5997 "cfg.tab.c"
    break;

  case 429: /* actions: actions action  */
#line 2106 "cfg.y"
                                {(yyval.action)=append_action((yyvsp[-1].action), (yyvsp[0].action)); }
#line 6003 "cfg.tab.c"
    break;

  case 430: /* actions: action  */
#line 2107 "cfg.y"
                                                {(yyval.action)=(yyvsp[0].action);}
#line 6009 "cfg.tab.c"
    break;

  case 431: /* actions: actions error  */
#line 2108 "cfg.y"
                                { (yyval.action)=0; yyerror("bad command!)"); }
#line 6015 "cfg.tab.c"
    break;

  case 432: /* brk_actions: brk_actions brk_action  */
#line 2112 "cfg.y"
                                        {(yyval.action)=append_action((yyvsp[-1].action), (yyvsp[0].action)); }
#line 6021 "cfg.tab.c"
    break;

  case 433: /* brk_actions: brk_action  */
#line 2113 "cfg.y"
                                                {(yyval.action)=(yyvsp[0].action);}
#line 6027 "cfg.tab.c"
    break;

  case 434: /* brk_actions: brk_actions error  */
#line 2114 "cfg.y"
                                    { (yyval.action)=0; yyerror("bad command!)"); }
#line 6033 "cfg.tab.c"
    break;

  case 435: /* action: cmd SEMICOLON  */
#line 2117 "cfg.y"
                              {(yyval.action)=(yyvsp[-1].action);}
#line 6039 "cfg.tab.c"
    break;

  case 436: /* action: if_cmd  */
#line 2118 "cfg.y"
                         {(yyval.action)=(yyvsp[0].action);}
#line 6045 "cfg.tab.c"
    break;

  case 437: /* action: while_cmd  */
#line 2119 "cfg.y"
                            {(yyval.action)=(yyvsp[0].action);}
#line 6051 "cfg.tab.c"
    break;

  case 438: /* action: foreach_cmd  */
#line 2120 "cfg.y"
                              {(yyval.action)=(yyvsp[0].action);}
#line 6057 "cfg.tab.c"
    break;

  case 439: /* action: switch_cmd  */
#line 2121 "cfg.y"
                             {(yyval.action)=(yyvsp[0].action);}
#line 6063 "cfg.tab.c"
    break;

  case 440: /* action: assign_cmd SEMICOLON  */
#line 2122 "cfg.y"
                                       {(yyval.action)=(yyvsp[-1].action);}
#line 6069 "cfg.tab.c"
    break;

  case 441: /* action: SEMICOLON  */
#line 2123 "cfg.y"
                                              {(yyval.action)=0;}
#line 6075 "cfg.tab.c"
    break;

  case 442: /* action: cmd error  */
#line 2124 "cfg.y"
                            { (yyval.action)=0; yyerror("bad command: missing ';'?"); }
#line 6081 "cfg.tab.c"
    break;

  case 443: /* brk_action: BREAK SEMICOLON  */
#line 2127 "cfg.y"
                            { mk_action0((yyval.action), BREAK_T);}
#line 6087 "cfg.tab.c"
    break;

  case 444: /* brk_action: cmd SEMICOLON  */
#line 2128 "cfg.y"
                                {(yyval.action)=(yyvsp[-1].action);}
#line 6093 "cfg.tab.c"
    break;

  case 445: /* brk_action: brk_if_cmd  */
#line 2129 "cfg.y"
                             {(yyval.action)=(yyvsp[0].action);}
#line 6099 "cfg.tab.c"
    break;

  case 446: /* brk_action: while_cmd  */
#line 2130 "cfg.y"
                            {(yyval.action)=(yyvsp[0].action);}
#line 6105 "cfg.tab.c"
    break;

  case 447: /* brk_action: foreach_cmd  */
#line 2131 "cfg.y"
                              {(yyval.action)=(yyvsp[0].action);}
#line 6111 "cfg.tab.c"
    break;

  case 448: /* brk_action: switch_cmd  */
#line 2132 "cfg.y"
                             {(yyval.action)=(yyvsp[0].action);}
#line 6117 "cfg.tab.c"
    break;

  case 449: /* brk_action: assign_cmd SEMICOLON  */
#line 2133 "cfg.y"
                                       {(yyval.action)=(yyvsp[-1].action);}
#line 6123 "cfg.tab.c"
    break;

  case 450: /* brk_action: SEMICOLON  */
#line 2134 "cfg.y"
                                              {(yyval.action)=0;}
#line 6129 "cfg.tab.c"
    break;

  case 451: /* brk_action: cmd error  */
#line 2135 "cfg.y"
                            { (yyval.action)=0; yyerror("bad command: missing ';'?"); }
#line 6135 "cfg.tab.c"
    break;

  case 452: /* brk_if_cmd: IF LPAREN exp RPAREN brk_stm  */
#line 2138 "cfg.y"
                                                                { mk_action3( (yyval.action), IF_T,
													 EXPR_ST,
													 ACTIONS_ST,
													 NOSUBTYPE,
													 (yyvsp[-2].expr),
													 (yyvsp[0].action),
													 0);
									}
#line 6148 "cfg.tab.c"
    break;

  case 453: /* brk_if_cmd: IF LPAREN exp RPAREN brk_stm ELSE brk_stm  */
#line 2146 "cfg.y"
                                                                        { mk_action3( (yyval.action), IF_T,
													 EXPR_ST,
													 ACTIONS_ST,
													 ACTIONS_ST,
													 (yyvsp[-4].expr),
													 (yyvsp[-2].action),
													 (yyvsp[0].action));
									}
#line 6161 "cfg.tab.c"
    break;

  case 454: /* if_cmd: IF LPAREN exp RPAREN stm  */
#line 2156 "cfg.y"
                                                                        { mk_action3( (yyval.action), IF_T,
													 EXPR_ST,
													 ACTIONS_ST,
													 NOSUBTYPE,
													 (yyvsp[-2].expr),
													 (yyvsp[0].action),
													 0);
									}
#line 6174 "cfg.tab.c"
    break;

  case 455: /* if_cmd: IF LPAREN exp RPAREN stm ELSE stm  */
#line 2164 "cfg.y"
                                                                { mk_action3( (yyval.action), IF_T,
													 EXPR_ST,
													 ACTIONS_ST,
													 ACTIONS_ST,
													 (yyvsp[-4].expr),
													 (yyvsp[-2].action),
													 (yyvsp[0].action));
									}
#line 6187 "cfg.tab.c"
    break;

  case 456: /* while_cmd: WHILE LPAREN exp RPAREN brk_stm  */
#line 2174 "cfg.y"
                                                        { mk_action2( (yyval.action), WHILE_T,
													 EXPR_ST,
													 ACTIONS_ST,
													 (yyvsp[-2].expr),
													 (yyvsp[0].action));
									}
#line 6198 "cfg.tab.c"
    break;

  case 457: /* foreach_cmd: FOR LPAREN script_var IN script_var RPAREN brk_stm  */
#line 2182 "cfg.y"
                                                                   {
					if ((yyvsp[-4].specval)->type != PVT_SCRIPTVAR &&
					    (yyvsp[-4].specval)->type != PVT_AVP &&
						pv_type((yyvsp[-4].specval)->type) != PVT_JSON) {
						yyerror("\nfor-each statement: only \"var\", \"avp\" "
					            "and \"json\" iterators are supported!");
					}

					mk_action3( (yyval.action), FOR_EACH_T,
					            SCRIPTVAR_ST,
					            SCRIPTVAR_ST,
					            ACTIONS_ST,
					            (yyvsp[-4].specval),
					            (yyvsp[-2].specval),
					            (yyvsp[0].action));
					}
#line 6219 "cfg.tab.c"
    break;

  case 458: /* switch_cmd: SWITCH LPAREN script_var RPAREN LBRACE switch_stm RBRACE  */
#line 2200 "cfg.y"
                                                                                        {
											mk_action2( (yyval.action), SWITCH_T,
														SCRIPTVAR_ST,
														ACTIONS_ST,
														(yyvsp[-4].specval),
														(yyvsp[-1].action));
									}
#line 6231 "cfg.tab.c"
    break;

  case 459: /* switch_stm: case_stms default_stm  */
#line 2209 "cfg.y"
                                  { (yyval.action)=append_action((yyvsp[-1].action), (yyvsp[0].action)); }
#line 6237 "cfg.tab.c"
    break;

  case 460: /* switch_stm: case_stms  */
#line 2210 "cfg.y"
                                                { (yyval.action)=(yyvsp[0].action); }
#line 6243 "cfg.tab.c"
    break;

  case 461: /* case_stms: case_stms case_stm  */
#line 2212 "cfg.y"
                                        {(yyval.action)=append_action((yyvsp[-1].action), (yyvsp[0].action)); }
#line 6249 "cfg.tab.c"
    break;

  case 462: /* case_stms: case_stm  */
#line 2213 "cfg.y"
                                                {(yyval.action)=(yyvsp[0].action);}
#line 6255 "cfg.tab.c"
    break;

  case 463: /* case_stm: CASE snumber COLON brk_actions  */
#line 2216 "cfg.y"
                                         { mk_action2( (yyval.action), CASE_T,
													NUMBER_ST,
													ACTIONS_ST,
													(void*)(yyvsp[-2].intval),
													(yyvsp[0].action));
											}
#line 6266 "cfg.tab.c"
    break;

  case 464: /* case_stm: CASE snumber COLON  */
#line 2222 "cfg.y"
                                     { mk_action2( (yyval.action), CASE_T,
													NUMBER_ST,
													ACTIONS_ST,
													(void*)(yyvsp[-1].intval),
													NULL);
							}
#line 6277 "cfg.tab.c"
    break;

  case 465: /* case_stm: CASE STRING COLON brk_actions  */
#line 2228 "cfg.y"
                                                { mk_action2( (yyval.action), CASE_T,
													STR_ST,
													ACTIONS_ST,
													(void*)(yyvsp[-2].strval),
													(yyvsp[0].action));
											}
#line 6288 "cfg.tab.c"
    break;

  case 466: /* case_stm: CASE STRING COLON  */
#line 2234 "cfg.y"
                                    { mk_action2( (yyval.action), CASE_T,
													STR_ST,
													ACTIONS_ST,
													(void*)(yyvsp[-1].strval),
													NULL);
							}
#line 6299 "cfg.tab.c"
    break;

  case 467: /* default_stm: DEFAULT COLON brk_actions  */
#line 2242 "cfg.y"
                                       { mk_action1( (yyval.action), DEFAULT_T,
													ACTIONS_ST, (yyvsp[0].action));
									}
#line 6307 "cfg.tab.c"
    break;

  case 468: /* default_stm: DEFAULT COLON  */
#line 2245 "cfg.y"
                                { mk_action1( (yyval.action), DEFAULT_T, ACTIONS_ST, NULL); }
#line 6313 "cfg.tab.c"
    break;

  case 469: /* func_param: STRING  */
#line 2248 "cfg.y"
                   {
										elems[1].type = STR_ST;
										elems[1].u.data = (yyvsp[0].strval);
										(yyval.intval)=1;
										}
#line 6323 "cfg.tab.c"
    break;

  case 470: /* func_param: func_param COMMA STRING  */
#line 2253 "cfg.y"
                                          {
										if ((yyvsp[-2].intval)+1>=MAX_ACTION_ELEMS) {
											yyerror("too many arguments "
												"in function\n");
											(yyval.intval)=0;
										}
										elems[(yyvsp[-2].intval)+1].type = STR_ST;
										elems[(yyvsp[-2].intval)+1].u.data = (yyvsp[0].strval);
										(yyval.intval)=(yyvsp[-2].intval)+1;
										}
#line 6338 "cfg.tab.c"
    break;

  case 471: /* func_param: COMMA  */
#line 2263 "cfg.y"
                        {
										elems[1].type = NULLV_ST;
										elems[1].u.data = NULL;
										elems[2].type = NULLV_ST;
										elems[2].u.data = NULL;
										(yyval.intval)=2;
										}
#line 6350 "cfg.tab.c"
    break;

  case 472: /* func_param: COMMA STRING  */
#line 2270 "cfg.y"
                               {
										elems[1].type = NULLV_ST;
										elems[1].u.data = NULL;
										elems[2].type = STR_ST;
										elems[2].u.data = (yyvsp[0].strval);
										(yyval.intval)=2;
										}
#line 6362 "cfg.tab.c"
    break;

  case 473: /* func_param: func_param COMMA  */
#line 2277 "cfg.y"
                                   {
										if ((yyvsp[-1].intval)+1>=MAX_ACTION_ELEMS) {
											yyerror("too many arguments "
												"in function\n");
											(yyval.intval)=0;
										}
										elems[(yyvsp[-1].intval)+1].type = NULLV_ST;
										elems[(yyvsp[-1].intval)+1].u.data = NULL;
										(yyval.intval)=(yyvsp[-1].intval)+1;
										}
#line 6377 "cfg.tab.c"
    break;

  case 474: /* func_param: snumber  */
#line 2287 "cfg.y"
                          {
										elems[1].type = NUMBER_ST;
										elems[1].u.number = (yyvsp[0].intval);
										(yyval.intval)=1;
										}
#line 6387 "cfg.tab.c"
    break;

  case 475: /* func_param: COMMA snumber  */
#line 2292 "cfg.y"
                                {
										elems[1].type = NULLV_ST;
										elems[1].u.data = NULL;
										elems[2].type = NUMBER_ST;
										elems[2].u.number = (yyvsp[0].intval);
										(yyval.intval)=2;
										}
#line 6399 "cfg.tab.c"
    break;

  case 476: /* func_param: func_param COMMA snumber  */
#line 2299 "cfg.y"
                                           {
										if ((yyvsp[-2].intval)+1>=MAX_ACTION_ELEMS) {
											yyerror("too many arguments "
												"in function\n");
											(yyval.intval)=0;
										}
										elems[(yyvsp[-2].intval)+1].type = NUMBER_ST;
										elems[(yyvsp[-2].intval)+1].u.number = (yyvsp[0].intval);
										(yyval.intval)=(yyvsp[-2].intval)+1;
										}
#line 6414 "cfg.tab.c"
    break;

  case 477: /* func_param: script_var  */
#line 2309 "cfg.y"
                             {
										elems[1].type = SCRIPTVAR_ST;
										elems[1].u.data = (yyvsp[0].specval);
										(yyval.intval)=1;
										}
#line 6424 "cfg.tab.c"
    break;

  case 478: /* func_param: COMMA script_var  */
#line 2314 "cfg.y"
                                   {
										elems[1].type = NULLV_ST;
										elems[1].u.data = NULL;
										elems[2].type = SCRIPTVAR_ST;
										elems[2].u.data = (yyvsp[0].specval);
										(yyval.intval)=2;
										}
#line 6436 "cfg.tab.c"
    break;

  case 479: /* func_param: func_param COMMA script_var  */
#line 2321 "cfg.y"
                                              {
										if ((yyvsp[-2].intval)+1>=MAX_ACTION_ELEMS) {
											yyerror("too many arguments "
												"in function\n");
											(yyval.intval)=0;
										}
										elems[(yyvsp[-2].intval)+1].type = SCRIPTVAR_ST;
										elems[(yyvsp[-2].intval)+1].u.data = (yyvsp[0].specval);
										(yyval.intval)=(yyvsp[-2].intval)+1;
										}
#line 6451 "cfg.tab.c"
    break;

  case 480: /* route_param: STRING  */
#line 2333 "cfg.y"
                    {
						route_elems[0].type = STRING_ST;
						route_elems[0].u.string = (yyvsp[0].strval);
						(yyval.intval)=1;
			}
#line 6461 "cfg.tab.c"
    break;

  case 481: /* route_param: snumber  */
#line 2338 "cfg.y"
                          {
						route_elems[0].type = NUMBER_ST;
						route_elems[0].u.number = (long)(yyvsp[0].intval);
						(yyval.intval)=1;
			}
#line 6471 "cfg.tab.c"
    break;

  case 482: /* route_param: NULLV  */
#line 2343 "cfg.y"
                        {
						route_elems[0].type = NULLV_ST;
						route_elems[0].u.data = 0;
						(yyval.intval)=1;
			}
#line 6481 "cfg.tab.c"
    break;

  case 483: /* route_param: script_var  */
#line 2348 "cfg.y"
                             {
						route_elems[0].type = SCRIPTVAR_ST;
						route_elems[0].u.data = (yyvsp[0].specval);
						(yyval.intval)=1;
			}
#line 6491 "cfg.tab.c"
    break;

  case 484: /* route_param: route_param COMMA STRING  */
#line 2353 "cfg.y"
                                           {
						if ((yyvsp[-2].intval)>=MAX_ACTION_ELEMS) {
							yyerror("too many arguments in function\n");
							(yyval.intval)=-1;
						} else {
							route_elems[(yyvsp[-2].intval)].type = STRING_ST;
							route_elems[(yyvsp[-2].intval)].u.data = (yyvsp[0].strval);
							(yyval.intval)=(yyvsp[-2].intval)+1;
						}
			}
#line 6506 "cfg.tab.c"
    break;

  case 485: /* route_param: route_param COMMA snumber  */
#line 2363 "cfg.y"
                                            {
						if ((yyvsp[-2].intval)>=MAX_ACTION_ELEMS) {
							yyerror("too many arguments in function\n");
							(yyval.intval)=-1;
						} else {
							route_elems[(yyvsp[-2].intval)].type = NUMBER_ST;
							route_elems[(yyvsp[-2].intval)].u.data = (void*)(long)(yyvsp[0].intval);
							(yyval.intval)=(yyvsp[-2].intval)+1;
						}
			}
#line 6521 "cfg.tab.c"
    break;

  case 486: /* route_param: route_param COMMA script_var  */
#line 2373 "cfg.y"
                                               {
						if ((yyvsp[-2].intval)+1>=MAX_ACTION_ELEMS) {
							yyerror("too many arguments in function\n");
							(yyval.intval)=-1;
						} else {
							route_elems[(yyvsp[-2].intval)].type = SCRIPTVAR_ST;
							route_elems[(yyvsp[-2].intval)].u.data = (yyvsp[0].specval);
							(yyval.intval)=(yyvsp[-2].intval)+1;
						}
			}
#line 6536 "cfg.tab.c"
    break;

  case 487: /* route_param: route_param COMMA NULLV  */
#line 2383 "cfg.y"
                                          {
						if ((yyvsp[-2].intval)+1>=MAX_ACTION_ELEMS) {
							yyerror("too many arguments in function\n");
							(yyval.intval)=-1;
						} else {
							route_elems[(yyvsp[-2].intval)].type = NULLV_ST;
							route_elems[(yyvsp[-2].intval)].u.data = 0;
							(yyval.intval)=(yyvsp[-2].intval)+1;
						}
			}
#line 6551 "cfg.tab.c"
    break;

  case 488: /* async_func: ID LPAREN RPAREN  */
#line 2395 "cfg.y"
                             {
				const acmd_export_t* acmd_tmp=find_mod_acmd_export_t((yyvsp[-2].strval));
				if (acmd_tmp==0){
					yyerrorf("unknown async command <%s>, "
						"missing loadmodule?", (yyvsp[-2].strval));
					(yyval.action)=0;
				}else{
					if (check_acmd_call_params(acmd_tmp,elems,0)<0) {
						yyerrorf("too few parameters "
							"for command <%s>\n", (yyvsp[-2].strval));
						(yyval.action)=0;
					} else {
						elems[0].type = ACMD_ST;
						elems[0].u.data_const = acmd_tmp;
						mk_action_((yyval.action), AMODULE_T, 1, elems);
					}
				}
			}
#line 6574 "cfg.tab.c"
    break;

  case 489: /* async_func: ID LPAREN func_param RPAREN  */
#line 2413 "cfg.y"
                                                      {
				const acmd_export_t* acmd_tmp=find_mod_acmd_export_t((yyvsp[-3].strval));
				if (acmd_tmp==0){
					yyerrorf("unknown async command <%s>, "
						"missing loadmodule?", (yyvsp[-3].strval));
					(yyval.action)=0;
				}else{
					rc = check_acmd_call_params(acmd_tmp,elems,(yyvsp[-1].intval));
					switch (rc) {
					case -1:
						yyerrorf("too few parameters "
							"for async command <%s>\n", (yyvsp[-3].strval));
						(yyval.action)=0;
						break;
					case -2:
						yyerrorf("too many parameters "
							"for async command <%s>\n", (yyvsp[-3].strval));
						(yyval.action)=0;
						break;
					case -3:
						yyerrorf("mandatory parameter "
							" omitted for async command <%s>\n", (yyvsp[-3].strval));
						(yyval.action)=0;
						break;
					default:
						elems[0].type = ACMD_ST;
						elems[0].u.data_const = acmd_tmp;
						mk_action_((yyval.action), AMODULE_T, (yyvsp[-1].intval)+1, elems);
					}
				}
			}
#line 6610 "cfg.tab.c"
    break;

  case 490: /* async_func: ID LPAREN error RPAREN  */
#line 2444 "cfg.y"
                                                 {
				(yyval.action)=0;
				yyerrorf("bad arguments for command <%s>", (yyvsp[-3].strval));
			}
#line 6619 "cfg.tab.c"
    break;

  case 491: /* async_func: ID error  */
#line 2448 "cfg.y"
                                   {
				(yyval.action)=0;
				yyerrorf("bare word <%s> found, command calls need '()'", (yyvsp[-1].strval));
			}
#line 6628 "cfg.tab.c"
    break;

  case 492: /* return_param: script_var  */
#line 2454 "cfg.y"
                         { sr_tmp.rspec = (yyvsp[0].specval); (yyval.return_params) = mk_script_return(SCRIPT_ROUTE_RET_VAR);}
#line 6634 "cfg.tab.c"
    break;

  case 493: /* return_param: snumber  */
#line 2455 "cfg.y"
                          { sr_tmp.rint = (yyvsp[0].intval); (yyval.return_params) = mk_script_return(SCRIPT_ROUTE_RET_INT);}
#line 6640 "cfg.tab.c"
    break;

  case 494: /* return_param: STRING  */
#line 2456 "cfg.y"
                         { sr_tmp.rstr.s = (yyvsp[0].strval); sr_tmp.rstr.len = strlen((yyvsp[0].strval));
					(yyval.return_params) = mk_script_return(SCRIPT_ROUTE_RET_STR);}
#line 6647 "cfg.tab.c"
    break;

  case 495: /* return_param: NULLV  */
#line 2458 "cfg.y"
                        { (yyval.return_params) = mk_script_return(SCRIPT_ROUTE_RET_NULL);}
#line 6653 "cfg.tab.c"
    break;

  case 496: /* return_params: return_param  */
#line 2461 "cfg.y"
                            { (yyval.return_params) = (yyvsp[0].return_params); }
#line 6659 "cfg.tab.c"
    break;

  case 497: /* return_params: return_params COMMA return_param  */
#line 2462 "cfg.y"
                                                   { (yyvsp[0].return_params)->next = (yyvsp[-2].return_params); (yyval.return_params) = (yyvsp[0].return_params); }
#line 6665 "cfg.tab.c"
    break;

  case 498: /* cmd: ASSERT LPAREN exp COMMA STRING RPAREN  */
#line 2465 "cfg.y"
                                                 {
			mk_action2( (yyval.action), ASSERT_T, EXPR_ST, STRING_ST, (yyvsp[-3].expr), (yyvsp[-1].strval));
			}
#line 6673 "cfg.tab.c"
    break;

  case 499: /* cmd: ASSERT LPAREN exp RPAREN  */
#line 2468 "cfg.y"
                                                 {
			mk_action2( (yyval.action), ASSERT_T, EXPR_ST, STRING_ST, (yyvsp[-1].expr), NULL);
			}
#line 6681 "cfg.tab.c"
    break;

  case 500: /* cmd: DROP  */
#line 2471 "cfg.y"
                                                 {mk_action0( (yyval.action), DROP_T); }
#line 6687 "cfg.tab.c"
    break;

  case 501: /* cmd: DROP LPAREN RPAREN  */
#line 2472 "cfg.y"
                                     {mk_action0( (yyval.action), DROP_T); }
#line 6693 "cfg.tab.c"
    break;

  case 502: /* cmd: EXIT  */
#line 2473 "cfg.y"
                                                 {mk_action0( (yyval.action), EXIT_T); }
#line 6699 "cfg.tab.c"
    break;

  case 503: /* cmd: EXIT LPAREN RPAREN  */
#line 2474 "cfg.y"
                                     {mk_action0( (yyval.action), EXIT_T); }
#line 6705 "cfg.tab.c"
    break;

  case 504: /* cmd: RETURN script_var  */
#line 2476 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								SCRIPTVAR_ST,
								NULLV_ST,
								(void*)(yyvsp[0].specval),
								NULL); }
#line 6715 "cfg.tab.c"
    break;

  case 505: /* cmd: RETURN LPAREN script_var RPAREN  */
#line 2482 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								SCRIPTVAR_ST,
								NULLV_ST,
								(void*)(yyvsp[-1].specval),
								NULL); }
#line 6725 "cfg.tab.c"
    break;

  case 506: /* cmd: RETURN LPAREN script_var COMMA return_params RPAREN  */
#line 2488 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								SCRIPTVAR_ST,
								EXPR_ST,
								(void*)(yyvsp[-3].specval),
								(yyvsp[-1].return_params)); }
#line 6735 "cfg.tab.c"
    break;

  case 507: /* cmd: RETURN snumber  */
#line 2494 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								NUMBER_ST,
								NULLV_ST,
								(void*)(yyvsp[0].intval),
								NULL); }
#line 6745 "cfg.tab.c"
    break;

  case 508: /* cmd: RETURN LPAREN snumber RPAREN  */
#line 2500 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								NUMBER_ST,
								NULLV_ST,
								(void*)(yyvsp[-1].intval),
								NULL); }
#line 6755 "cfg.tab.c"
    break;

  case 509: /* cmd: RETURN LPAREN snumber COMMA return_params RPAREN  */
#line 2506 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								NUMBER_ST,
								EXPR_ST,
								(void*)(yyvsp[-3].intval),
								(yyvsp[-1].return_params)); }
#line 6765 "cfg.tab.c"
    break;

  case 510: /* cmd: RETURN LPAREN RPAREN  */
#line 2512 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								NUMBER_ST,
								NULLV_ST,
								(void*)1,
								NULL); }
#line 6775 "cfg.tab.c"
    break;

  case 511: /* cmd: RETURN LPAREN COMMA return_params RPAREN  */
#line 2518 "cfg.y"
                                                         {mk_action2( (yyval.action), RETURN_T,
								NUMBER_ST,
								EXPR_ST,
								(void*)1,
								(yyvsp[-1].return_params)); }
#line 6785 "cfg.tab.c"
    break;

  case 512: /* cmd: RETURN  */
#line 2523 "cfg.y"
                                                 {mk_action2( (yyval.action), RETURN_T,
								NUMBER_ST,
								NULLV_ST,
								(void*)1,
								NULL); }
#line 6795 "cfg.tab.c"
    break;

  case 513: /* cmd: LOG_TOK LPAREN STRING RPAREN  */
#line 2528 "cfg.y"
                                                {mk_action2( (yyval.action), LOG_T, NUMBER_ST,
													STRING_ST,(void*)4,(yyvsp[-1].strval));
									}
#line 6803 "cfg.tab.c"
    break;

  case 514: /* cmd: LOG_TOK LPAREN snumber COMMA STRING RPAREN  */
#line 2531 "cfg.y"
                                                                {mk_action2( (yyval.action), LOG_T,
																NUMBER_ST,
																STRING_ST,
																(void*)(yyvsp[-3].intval),
																(yyvsp[-1].strval));
												}
#line 6814 "cfg.tab.c"
    break;

  case 515: /* cmd: LOG_TOK error  */
#line 2537 "cfg.y"
                                { (yyval.action)=0; yyerror("missing '(' or ')' ?"); }
#line 6820 "cfg.tab.c"
    break;

  case 516: /* cmd: LOG_TOK LPAREN error RPAREN  */
#line 2538 "cfg.y"
                                              { (yyval.action)=0; yyerror("bad log"
									"argument"); }
#line 6827 "cfg.tab.c"
    break;

  case 517: /* cmd: ERROR LPAREN STRING COMMA STRING RPAREN  */
#line 2540 "cfg.y"
                                                          {mk_action2( (yyval.action), ERROR_T,
																STRING_ST,
																STRING_ST,
																(yyvsp[-3].strval),
																(yyvsp[-1].strval));
												  }
#line 6838 "cfg.tab.c"
    break;

  case 518: /* cmd: ERROR error  */
#line 2546 "cfg.y"
                              { (yyval.action)=0; yyerror("missing '(' or ')' ?"); }
#line 6844 "cfg.tab.c"
    break;

  case 519: /* cmd: ERROR LPAREN error RPAREN  */
#line 2547 "cfg.y"
                                            { (yyval.action)=0; yyerror("bad error"
														"argument"); }
#line 6851 "cfg.tab.c"
    break;

  case 520: /* cmd: ROUTE LPAREN route_name_var RPAREN  */
#line 2549 "cfg.y"
                                                        {
						mk_action2( (yyval.action), ROUTE_T, (yyvsp[-1].intval), 0, rn_tmp.data, 0);
					}
#line 6859 "cfg.tab.c"
    break;

  case 521: /* cmd: ROUTE LPAREN route_name_var COMMA route_param RPAREN  */
#line 2553 "cfg.y"
                                                                        {
						if ((yyvsp[-1].intval) <= 0) yyerror("too many route parameters");

						/* duplicate the list */
						a_tmp = pkg_malloc((yyvsp[-1].intval) * sizeof(action_elem_t));
						if (!a_tmp) {
							yyerror("no more pkg memory");
							YYABORT;
						}
						memcpy(a_tmp, route_elems, (yyvsp[-1].intval)*sizeof(action_elem_t));

						mk_action3( (yyval.action), ROUTE_T, (yyvsp[-3].intval),	/* route idx */
							NUMBER_ST,					/* number of params */
							SCRIPTVAR_ST,				/* parameters */
							rn_tmp.data,
							(void*)(long)(yyvsp[-1].intval),
							(void*)a_tmp);
					}
#line 6882 "cfg.tab.c"
    break;

  case 522: /* cmd: ROUTE error  */
#line 2572 "cfg.y"
                              { (yyval.action)=0; yyerror("missing '(' or ')' ?"); }
#line 6888 "cfg.tab.c"
    break;

  case 523: /* cmd: ROUTE LPAREN error RPAREN  */
#line 2573 "cfg.y"
                                            { (yyval.action)=0; yyerror("bad route"
						"argument"); }
#line 6895 "cfg.tab.c"
    break;

  case 524: /* cmd: ID LPAREN RPAREN  */
#line 2575 "cfg.y"
                                        {
								const cmd_export_t* cmd_tmp=find_cmd_export_t((yyvsp[-2].strval), rt);
								if (cmd_tmp==0){
									if (find_cmd_export_t((yyvsp[-2].strval), 0)) {
										yyerrorf("Command <%s> cannot be "
											"used in the block\n", (yyvsp[-2].strval));
									} else {
										yyerrorf("unknown command <%s>, "
											"missing loadmodule?", (yyvsp[-2].strval));
									}
									(yyval.action)=0;
								}else{
									if (check_cmd_call_params(cmd_tmp,elems,0)<0) {
										yyerrorf("too few parameters "
											"for command <%s>\n", (yyvsp[-2].strval));
										(yyval.action)=0;
									} else {
										elems[0].type = CMD_ST;
										elems[0].u.data_const = cmd_tmp;
										mk_action_((yyval.action), CMD_T, 1, elems);
									}
								}
							}
#line 6923 "cfg.tab.c"
    break;

  case 525: /* cmd: ID LPAREN func_param RPAREN  */
#line 2598 "cfg.y"
                                                {
								const cmd_export_t* cmd_tmp=find_cmd_export_t((yyvsp[-3].strval), rt);
								if (cmd_tmp==0){
									if (find_cmd_export_t((yyvsp[-3].strval), 0)) {
										yyerrorf("Command <%s> cannot be "
											"used in the block\n", (yyvsp[-3].strval));
									} else {
										yyerrorf("unknown command <%s>, "
											"missing loadmodule?", (yyvsp[-3].strval));
									}
									(yyval.action)=0;
								}else{
									rc = check_cmd_call_params(cmd_tmp,elems,(yyvsp[-1].intval));
									switch (rc) {
									case -1:
										yyerrorf("too few parameters "
											"for command <%s>\n", (yyvsp[-3].strval));
										(yyval.action)=0;
										break;
									case -2:
										yyerrorf("too many parameters "
											"for command <%s>\n", (yyvsp[-3].strval));
										(yyval.action)=0;
										break;
									case -3:
										yyerrorf("mandatory parameter "
											"omitted for command <%s>\n", (yyvsp[-3].strval));
										(yyval.action)=0;
										break;
									default:
										elems[0].type = CMD_ST;
										elems[0].u.data_const = cmd_tmp;
										mk_action_((yyval.action), CMD_T, (yyvsp[-1].intval)+1, elems);
									}
								}
							}
#line 6964 "cfg.tab.c"
    break;

  case 526: /* cmd: ID LPAREN error RPAREN  */
#line 2634 "cfg.y"
                                         { (yyval.action)=0; yyerrorf("bad arguments for "
												"command <%s>", (yyvsp[-3].strval)); }
#line 6971 "cfg.tab.c"
    break;

  case 527: /* cmd: ID error  */
#line 2636 "cfg.y"
                           { (yyval.action)=0;
			yyerrorf("bare word <%s> found, command calls need '()'", (yyvsp[-1].strval));
			}
#line 6979 "cfg.tab.c"
    break;

  case 528: /* cmd: XDBG LPAREN STRING RPAREN  */
#line 2639 "cfg.y"
                                            {
				mk_action1((yyval.action), XDBG_T, STR_ST, (yyvsp[-1].strval));	}
#line 6986 "cfg.tab.c"
    break;

  case 529: /* cmd: XDBG LPAREN folded_string RPAREN  */
#line 2641 "cfg.y"
                                                   {
				mk_action1((yyval.action), XDBG_T, STR_ST, (yyvsp[-1].strval));	}
#line 6993 "cfg.tab.c"
    break;

  case 530: /* cmd: XLOG LPAREN STRING RPAREN  */
#line 2643 "cfg.y"
                                            {
				mk_action1((yyval.action), XLOG_T, STR_ST, (yyvsp[-1].strval)); }
#line 7000 "cfg.tab.c"
    break;

  case 531: /* cmd: XLOG LPAREN folded_string RPAREN  */
#line 2645 "cfg.y"
                                                   {
				mk_action1((yyval.action), XLOG_T, STR_ST, (yyvsp[-1].strval)); }
#line 7007 "cfg.tab.c"
    break;

  case 532: /* cmd: XLOG LPAREN STRING COMMA STRING RPAREN  */
#line 2647 "cfg.y"
                                                         {
				mk_action2((yyval.action), XLOG_T, STR_ST, STR_ST, (yyvsp[-3].strval), (yyvsp[-1].strval)); }
#line 7014 "cfg.tab.c"
    break;

  case 533: /* cmd: XLOG LPAREN STRING COMMA folded_string RPAREN  */
#line 2649 "cfg.y"
                                                                {
				mk_action2((yyval.action), XLOG_T, STR_ST, STR_ST, (yyvsp[-3].strval), (yyvsp[-1].strval)); }
#line 7021 "cfg.tab.c"
    break;

  case 534: /* cmd: ASYNC_TOKEN LPAREN async_func COMMA route_name RPAREN  */
#line 2651 "cfg.y"
                                                                        {
				rt_ref = ref_script_route_by_name( (yyvsp[-1].strval), sroutes->request,
					RT_NO, REQUEST_ROUTE, 0);
				if (rt_ref==NULL) yyerror("fail to create route reference");
				mk_action2((yyval.action), ASYNC_T, ACTIONS_ST, ROUTE_REF_ST,
						(yyvsp[-3].action), (void*)rt_ref);
				}
#line 7033 "cfg.tab.c"
    break;

  case 535: /* cmd: ASYNC_TOKEN LPAREN async_func COMMA route_name COMMA NUMBER RPAREN  */
#line 2658 "cfg.y"
                                                                                     {
				rt_ref = ref_script_route_by_name( (yyvsp[-3].strval), sroutes->request,
					RT_NO, REQUEST_ROUTE, 0);
				if (rt_ref==NULL) yyerror("fail to create route reference");
				mk_action3((yyval.action), ASYNC_T, ACTIONS_ST, ROUTE_REF_ST, NUMBER_ST,
						(yyvsp[-5].action), (void*)rt_ref, (void*)(long)(yyvsp[-1].intval));
				}
#line 7045 "cfg.tab.c"
    break;

  case 536: /* cmd: LAUNCH_TOKEN LPAREN async_func COMMA route_name COMMA STRING RPAREN  */
#line 2665 "cfg.y"
                                                                                      {
				rt_ref = ref_script_route_by_name( (yyvsp[-3].strval), sroutes->request,
					RT_NO, REQUEST_ROUTE, 0);
				if (rt_ref==NULL) yyerror("fail to create route reference");
				mk_action3((yyval.action), LAUNCH_T, ACTIONS_ST, ROUTE_REF_ST, STRING_ST,
						(yyvsp[-5].action), (void*)rt_ref, (yyvsp[-1].strval));
				}
#line 7057 "cfg.tab.c"
    break;

  case 537: /* cmd: LAUNCH_TOKEN LPAREN async_func COMMA route_name RPAREN  */
#line 2672 "cfg.y"
                                                                         {
				rt_ref = ref_script_route_by_name( (yyvsp[-1].strval), sroutes->request,
					RT_NO, REQUEST_ROUTE, 0);
				if (rt_ref==NULL) yyerror("fail to create route reference");
				mk_action2((yyval.action), LAUNCH_T, ACTIONS_ST, ROUTE_REF_ST,
						(yyvsp[-3].action), (void*)rt_ref);
				}
#line 7069 "cfg.tab.c"
    break;

  case 538: /* cmd: LAUNCH_TOKEN LPAREN async_func RPAREN  */
#line 2679 "cfg.y"
                                                        {
				mk_action2((yyval.action), LAUNCH_T, ACTIONS_ST, ROUTE_REF_ST,
						(yyvsp[-1].action), (void*)NULL);
				}
#line 7078 "cfg.tab.c"
    break;


#line 7082 "cfg.tab.c"

      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;

  *++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.  */
  {
    const int yylhs = yyr1[yyn] - YYNTOKENS;
    const int yyi = yypgoto[yylhs] + *yyssp;
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
               ? yytable[yyi]
               : yydefgoto[yylhs]);
  }

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (YY_("syntax error"));
    }

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == YYEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval);
          yychar = YYEMPTY;
        }
    }

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


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:
  /* Pacify compilers when the user code never invokes YYERROR and the
     label yyerrorlab therefore never appears in user code.  */
  if (0)
    YYERROR;
  ++yynerrs;

  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  /* Pop stack until we find a state that shifts the error token.  */
  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYSYMBOL_YYerror;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

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


      yydestruct ("Error: popping",
                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


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


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


/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
`-----------------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval);
    }
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif

  return yyresult;
}

#line 2686 "cfg.y"


static inline void ALLOW_UNUSED warn(char* s)
{
	LM_WARN("warning in config file %s, line %d, column %d-%d: %s\n",
			get_cfg_file_name, line, startcolumn, column, s);
}

static void yyerror(char* s)
{
	cfg_dump_backtrace();
	LM_CRIT("parse error in %s:%d:%d-%d: %s\n",
			get_cfg_file_name, line, startcolumn, column, s);
	_cfg_dump_context(get_cfg_file_name, line, startcolumn, column, 1);
	cfg_errors++;
}

#define ERROR_MAXLEN 1024
static void yyerrorf(char *fmt, ...)
{
	char *tmp = pkg_malloc(ERROR_MAXLEN);
	va_list ap;
	va_start(ap, fmt);

	vsnprintf(tmp, ERROR_MAXLEN, fmt, ap);
	yyerror(tmp);

	pkg_free(tmp);
	va_end(ap);
}


static struct socket_id* mk_listen_id(char* host, enum sip_protos proto,
																	int port)
{
	struct socket_id* l;
	l=pkg_malloc(sizeof(struct socket_id));
	if (l==0){
		LM_CRIT("cfg. parser: out of memory.\n");
	}else{
		memset(l, 0, sizeof(*l));
		l->name     = host;
		l->proto    = proto;
		l->port     = port;
	}

	return l;
}

static struct socket_id* mk_bond_id(char *bond_name,
		struct socket_bond_elem *bond_list)
{
	struct socket_id *sid;

	sid = mk_listen_id( bond_name, PROTO_BOND, 0);
	if (!sid) {
		LM_CRIT("cfg. parser: out of memory.\n");
		return NULL;
	}
	sid->bond_list = bond_list;
	add_bond_socket_id(sid);
	return sid;
}

static struct socket_id* mk_listen_id_range(char* host, enum sip_protos proto, struct port_range *pr)
{
	int port;
	struct socket_id *sid, *first_sid = NULL;
	if (!pr)
		return mk_listen_id(host, proto, 0);
	while (pr) {
		for (port = pr->max; port >= pr->min; port--) {
			sid = mk_listen_id(host, proto, port);
			if (!sid)
				return first_sid;
			sid->next = first_sid;
			first_sid = sid;
		}
		pr = pr->next;
	}
	return first_sid;
}

static struct socket_bond_elem *new_socket_bond_elem(char *name)
{
	struct socket_bond_elem *elem = pkg_malloc(sizeof *elem);

	if (!elem) {
		LM_CRIT("cfg. parser: out of memory.\n");
		pkg_free(name);
		return NULL;
	}
	elem->name = name;
	elem->next = NULL;
	return elem;
}

static void fill_socket_id(struct listen_param *param, struct socket_id *s)
{
	int warn;
	struct socket_id *socket;
	while (s) {
		s->flags |= param->flags;
		s->workers = param->workers;
		s->tos = param->tos;
		s->auto_scaling_profile = param->auto_scaling_profile;
		s->tag = param->tag;
		if (param->socket) {
			socket = param->socket;
			param->socket = param->socket->next;
			set_listen_id_adv(s, socket->name, socket->port);
			pkg_free(socket);
		} else if (!warn) {
			LM_WARN("inconsistent port range with advertised ports - skipping advertised\n");
			warn = 1;
		}
		s = s->next;
	}
	/* free remaining sockets, if any */
	while (param->socket) {
		if (!warn) {
			LM_WARN("inconsistent port range with advertised ports - too many adverised\n");
			warn = 1;
		}
		socket = param->socket->next;
		param->socket = param->socket->next;
		pkg_free(socket);
	}
}

static struct multi_str *new_string(char *s)
{
	struct multi_str *ms = pkg_malloc(sizeof(struct multi_str));
	if (!ms) {
		LM_CRIT("cfg. parser: out of memory.\n");
	}else{
		ms->s    = s;
		ms->next = NULL;
	}
	return ms;
}

static struct port_range* mk_port_range(int min, int max)
{
	struct port_range *pr = pkg_malloc(sizeof *pr);
	if (pr) {
		memset(pr, 0, sizeof *pr);
		pr->min = min;
		pr->max = max;
		pr->next = NULL;
	} else {
		LM_CRIT("cfg. parser: out of memory.\n");
	}
	return pr;
}

static struct socket_id* set_listen_id_adv(struct socket_id* sock,
											char *adv_name,
											int adv_port)
{
	sock->adv_name=adv_name;
	sock->adv_port=adv_port;
	return sock;
}

static int parse_ipnet(char *in, int len, struct net **ipnet)
{
	char *p = NULL;
	str ip_s, mask_s;
	struct ip_addr *ip = NULL, *mask = NULL, *ip_tmp;
	int af;
	unsigned int bitlen;

	p = q_memchr(in, '.', len);
	if (p)
		af = AF_INET;
	else if (q_memchr(in, ':', len)) {
		af = AF_INET6;
	} else {
		LM_ERR("Not an IP");
		return -1;
	}

	p = q_memchr(in, '/', len);
	if (!p) {
		LM_ERR("No netmask\n");
		return -1;
	}
	ip_s.s = in;
	ip_s.len = p - in;

	mask_s.s = p + 1;
	mask_s.len = len - ip_s.len - 1;
	if (!mask_s.s || mask_s.len == 0) {
		LM_ERR("Empty netmask\n");
		return -1;
	}

	ip_tmp = (af == AF_INET) ? str2ip(&ip_s) : str2ip6(&ip_s);
	if (!ip_tmp) {
		LM_ERR("Invalid IP\n");
		return -1;
	}
	ip = pkg_malloc(sizeof *ip);
	if (!ip) {
		LM_CRIT("No more pkg memory\n");
		return -1;
	}
	memcpy(ip, ip_tmp, sizeof *ip);

	p = (af == AF_INET) ? q_memchr(p, '.', len-(p-in)+1) : q_memchr(p, ':', len-(p-in)+1);
	if (p) {
		ip_tmp = (af == AF_INET) ? str2ip(&mask_s) : str2ip6(&mask_s);
		if (!ip_tmp) {
			LM_ERR("Invalid netmask\n");
			return -1;
		}
		mask = pkg_malloc(sizeof *mask);
		if (!mask) {
			LM_CRIT("No more pkg memory\n");
			return -1;
		}
		memcpy(mask, ip_tmp, sizeof *mask);

		*ipnet = mk_net(ip, mask);
	} else {
		if (str2int(&mask_s, &bitlen) < 0) {
			LM_ERR("Invalid netmask bitlen\n");
			return -1;
		}

		*ipnet = mk_net_bitlen(ip, bitlen);
	}

	pkg_free(ip);
	pkg_free(mask);

	if (*ipnet == NULL)
			return -1;

	return 0;
}
