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

/* Push parsers.  */
#define YYPUSH 1

/* Pull parsers.  */
#define YYPULL 0

/* Substitute the type names.  */
#define YYSTYPE         FASTD_CONFIG_STYPE
#define YYLTYPE         FASTD_CONFIG_LTYPE
/* Substitute the variable and function names.  */
#define yypush_parse    fastd_config_push_parse
#define yypstate_new    fastd_config_pstate_new
#define yypstate_clear  fastd_config_pstate_clear
#define yypstate_delete fastd_config_pstate_delete
#define yypstate        fastd_config_pstate
#define yylex           fastd_config_lex
#define yyerror         fastd_config_error
#define yydebug         fastd_config_debug
#define yynerrs         fastd_config_nerrs


# 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 "config.yy.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_START_CONFIG = 3,               /* START_CONFIG  */
  YYSYMBOL_START_PEER_GROUP_CONFIG = 4,    /* START_PEER_GROUP_CONFIG  */
  YYSYMBOL_START_PEER_CONFIG = 5,          /* START_PEER_CONFIG  */
  YYSYMBOL_TOK_UINT = 6,                   /* TOK_UINT  */
  YYSYMBOL_TOK_STRING = 7,                 /* TOK_STRING  */
  YYSYMBOL_TOK_ADDR4 = 8,                  /* TOK_ADDR4  */
  YYSYMBOL_TOK_ADDR6 = 9,                  /* TOK_ADDR6  */
  YYSYMBOL_TOK_ADDR6_SCOPED = 10,          /* TOK_ADDR6_SCOPED  */
  YYSYMBOL_TOK_ADDRESSES = 11,             /* TOK_ADDRESSES  */
  YYSYMBOL_TOK_ANY = 12,                   /* TOK_ANY  */
  YYSYMBOL_TOK_AS = 13,                    /* TOK_AS  */
  YYSYMBOL_TOK_ASYNC = 14,                 /* TOK_ASYNC  */
  YYSYMBOL_TOK_AUTO = 15,                  /* TOK_AUTO  */
  YYSYMBOL_TOK_BIND = 16,                  /* TOK_BIND  */
  YYSYMBOL_TOK_CAPABILITIES = 17,          /* TOK_CAPABILITIES  */
  YYSYMBOL_TOK_CIPHER = 18,                /* TOK_CIPHER  */
  YYSYMBOL_TOK_CONNECT = 19,               /* TOK_CONNECT  */
  YYSYMBOL_TOK_DEBUG = 20,                 /* TOK_DEBUG  */
  YYSYMBOL_TOK_DEBUG2 = 21,                /* TOK_DEBUG2  */
  YYSYMBOL_TOK_DEFAULT = 22,               /* TOK_DEFAULT  */
  YYSYMBOL_TOK_DISESTABLISH = 23,          /* TOK_DISESTABLISH  */
  YYSYMBOL_TOK_DOWN = 24,                  /* TOK_DOWN  */
  YYSYMBOL_TOK_DROP = 25,                  /* TOK_DROP  */
  YYSYMBOL_TOK_EARLY = 26,                 /* TOK_EARLY  */
  YYSYMBOL_TOK_ERROR = 27,                 /* TOK_ERROR  */
  YYSYMBOL_TOK_ESTABLISH = 28,             /* TOK_ESTABLISH  */
  YYSYMBOL_TOK_FATAL = 29,                 /* TOK_FATAL  */
  YYSYMBOL_TOK_FLOAT = 30,                 /* TOK_FLOAT  */
  YYSYMBOL_TOK_FORCE = 31,                 /* TOK_FORCE  */
  YYSYMBOL_TOK_FORWARD = 32,               /* TOK_FORWARD  */
  YYSYMBOL_TOK_FROM = 33,                  /* TOK_FROM  */
  YYSYMBOL_TOK_GROUP = 34,                 /* TOK_GROUP  */
  YYSYMBOL_TOK_HANDSHAKES = 35,            /* TOK_HANDSHAKES  */
  YYSYMBOL_TOK_HIDE = 36,                  /* TOK_HIDE  */
  YYSYMBOL_TOK_INCLUDE = 37,               /* TOK_INCLUDE  */
  YYSYMBOL_TOK_INFO = 38,                  /* TOK_INFO  */
  YYSYMBOL_TOK_INTERFACE = 39,             /* TOK_INTERFACE  */
  YYSYMBOL_TOK_IP = 40,                    /* TOK_IP  */
  YYSYMBOL_TOK_IPV4 = 41,                  /* TOK_IPV4  */
  YYSYMBOL_TOK_IPV6 = 42,                  /* TOK_IPV6  */
  YYSYMBOL_TOK_KEY = 43,                   /* TOK_KEY  */
  YYSYMBOL_TOK_L2TP = 44,                  /* TOK_L2TP  */
  YYSYMBOL_TOK_LEVEL = 45,                 /* TOK_LEVEL  */
  YYSYMBOL_TOK_LIMIT = 46,                 /* TOK_LIMIT  */
  YYSYMBOL_TOK_LOG = 47,                   /* TOK_LOG  */
  YYSYMBOL_TOK_MAC = 48,                   /* TOK_MAC  */
  YYSYMBOL_TOK_MARK = 49,                  /* TOK_MARK  */
  YYSYMBOL_TOK_METHOD = 50,                /* TOK_METHOD  */
  YYSYMBOL_TOK_MODE = 51,                  /* TOK_MODE  */
  YYSYMBOL_TOK_MTU = 52,                   /* TOK_MTU  */
  YYSYMBOL_TOK_MULTITAP = 53,              /* TOK_MULTITAP  */
  YYSYMBOL_TOK_NO = 54,                    /* TOK_NO  */
  YYSYMBOL_TOK_OFFLOAD = 55,               /* TOK_OFFLOAD  */
  YYSYMBOL_TOK_ON = 56,                    /* TOK_ON  */
  YYSYMBOL_TOK_PACKET = 57,                /* TOK_PACKET  */
  YYSYMBOL_TOK_PEER = 58,                  /* TOK_PEER  */
  YYSYMBOL_TOK_PEERS = 59,                 /* TOK_PEERS  */
  YYSYMBOL_TOK_PERSIST = 60,               /* TOK_PERSIST  */
  YYSYMBOL_TOK_PMTU = 61,                  /* TOK_PMTU  */
  YYSYMBOL_TOK_PORT = 62,                  /* TOK_PORT  */
  YYSYMBOL_TOK_POST_DOWN = 63,             /* TOK_POST_DOWN  */
  YYSYMBOL_TOK_PRE_UP = 64,                /* TOK_PRE_UP  */
  YYSYMBOL_TOK_PROTOCOL = 65,              /* TOK_PROTOCOL  */
  YYSYMBOL_TOK_REMOTE = 66,                /* TOK_REMOTE  */
  YYSYMBOL_TOK_SECRET = 67,                /* TOK_SECRET  */
  YYSYMBOL_TOK_SECURE = 68,                /* TOK_SECURE  */
  YYSYMBOL_TOK_SOCKET = 69,                /* TOK_SOCKET  */
  YYSYMBOL_TOK_STATUS = 70,                /* TOK_STATUS  */
  YYSYMBOL_TOK_STDERR = 71,                /* TOK_STDERR  */
  YYSYMBOL_TOK_SYNC = 72,                  /* TOK_SYNC  */
  YYSYMBOL_TOK_SYSLOG = 73,                /* TOK_SYSLOG  */
  YYSYMBOL_TOK_TAP = 74,                   /* TOK_TAP  */
  YYSYMBOL_TOK_TO = 75,                    /* TOK_TO  */
  YYSYMBOL_TOK_TUN = 76,                   /* TOK_TUN  */
  YYSYMBOL_TOK_UP = 77,                    /* TOK_UP  */
  YYSYMBOL_TOK_USE = 78,                   /* TOK_USE  */
  YYSYMBOL_TOK_USER = 79,                  /* TOK_USER  */
  YYSYMBOL_TOK_VERBOSE = 80,               /* TOK_VERBOSE  */
  YYSYMBOL_TOK_VERIFY = 81,                /* TOK_VERIFY  */
  YYSYMBOL_TOK_WARN = 82,                  /* TOK_WARN  */
  YYSYMBOL_TOK_YES = 83,                   /* TOK_YES  */
  YYSYMBOL_84_ = 84,                       /* ';'  */
  YYSYMBOL_85_ = 85,                       /* '{'  */
  YYSYMBOL_86_ = 86,                       /* '}'  */
  YYSYMBOL_87_ = 87,                       /* ':'  */
  YYSYMBOL_YYACCEPT = 88,                  /* $accept  */
  YYSYMBOL_start = 89,                     /* start  */
  YYSYMBOL_config = 90,                    /* config  */
  YYSYMBOL_peer_group_config = 91,         /* peer_group_config  */
  YYSYMBOL_statement = 92,                 /* statement  */
  YYSYMBOL_peer_group_statement = 93,      /* peer_group_statement  */
  YYSYMBOL_user = 94,                      /* user  */
  YYSYMBOL_group = 95,                     /* group  */
  YYSYMBOL_drop_capabilities = 96,         /* drop_capabilities  */
  YYSYMBOL_drop_capabilities_enabled = 97, /* drop_capabilities_enabled  */
  YYSYMBOL_secure_handshakes = 98,         /* secure_handshakes  */
  YYSYMBOL_cipher = 99,                    /* cipher  */
  YYSYMBOL_mac = 100,                      /* mac  */
  YYSYMBOL_log = 101,                      /* log  */
  YYSYMBOL_persist = 102,                  /* persist  */
  YYSYMBOL_offload = 103,                  /* offload  */
  YYSYMBOL_hide = 104,                     /* hide  */
  YYSYMBOL_maybe_log_level = 105,          /* maybe_log_level  */
  YYSYMBOL_log_level = 106,                /* log_level  */
  YYSYMBOL_interface = 107,                /* interface  */
  YYSYMBOL_bind = 108,                     /* bind  */
  YYSYMBOL_bind_address = 109,             /* bind_address  */
  YYSYMBOL_maybe_bind_interface = 110,     /* maybe_bind_interface  */
  YYSYMBOL_maybe_bind_default = 111,       /* maybe_bind_default  */
  YYSYMBOL_bind_default = 112,             /* bind_default  */
  YYSYMBOL_packet_mark = 113,              /* packet_mark  */
  YYSYMBOL_mtu = 114,                      /* mtu  */
  YYSYMBOL_pmtu = 115,                     /* pmtu  */
  YYSYMBOL_mode = 116,                     /* mode  */
  YYSYMBOL_protocol = 117,                 /* protocol  */
  YYSYMBOL_secret = 118,                   /* secret  */
  YYSYMBOL_on_pre_up = 119,                /* on_pre_up  */
  YYSYMBOL_on_post_down = 120,             /* on_post_down  */
  YYSYMBOL_status_socket = 121,            /* status_socket  */
  YYSYMBOL_peer = 122,                     /* peer  */
  YYSYMBOL_peer_after = 123,               /* peer_after  */
  YYSYMBOL_peer_conf = 124,                /* peer_conf  */
  YYSYMBOL_peer_statement = 125,           /* peer_statement  */
  YYSYMBOL_peer_remote = 126,              /* peer_remote  */
  YYSYMBOL_peer_float = 127,               /* peer_float  */
  YYSYMBOL_peer_key = 128,                 /* peer_key  */
  YYSYMBOL_peer_interface = 129,           /* peer_interface  */
  YYSYMBOL_peer_mtu = 130,                 /* peer_mtu  */
  YYSYMBOL_peer_include = 131,             /* peer_include  */
  YYSYMBOL_peer_group = 132,               /* peer_group  */
  YYSYMBOL_peer_group_after = 133,         /* peer_group_after  */
  YYSYMBOL_peer_limit = 134,               /* peer_limit  */
  YYSYMBOL_method = 135,                   /* method  */
  YYSYMBOL_on_up = 136,                    /* on_up  */
  YYSYMBOL_on_down = 137,                  /* on_down  */
  YYSYMBOL_on_connect = 138,               /* on_connect  */
  YYSYMBOL_on_establish = 139,             /* on_establish  */
  YYSYMBOL_on_disestablish = 140,          /* on_disestablish  */
  YYSYMBOL_on_verify = 141,                /* on_verify  */
  YYSYMBOL_forward = 142,                  /* forward  */
  YYSYMBOL_include = 143,                  /* include  */
  YYSYMBOL_maybe_bind_port = 144,          /* maybe_bind_port  */
  YYSYMBOL_maybe_as = 145,                 /* maybe_as  */
  YYSYMBOL_maybe_af = 146,                 /* maybe_af  */
  YYSYMBOL_maybe_ipv4 = 147,               /* maybe_ipv4  */
  YYSYMBOL_maybe_ipv6 = 148,               /* maybe_ipv6  */
  YYSYMBOL_sync = 149,                     /* sync  */
  YYSYMBOL_boolean = 150,                  /* boolean  */
  YYSYMBOL_autobool = 151,                 /* autobool  */
  YYSYMBOL_colon_or_port = 152,            /* colon_or_port  */
  YYSYMBOL_port = 153,                     /* port  */
  YYSYMBOL_bind_port = 154                 /* bind_port  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;



/* Unqualified %code blocks.  */
#line 122 "../fastd-23/src/config.y"

	#include "config.h"
	#include "peer.h"
	#include "peer_group.h"

	#include <limits.h>

	static void fastd_config_handle_bind_address(
		fastd_peer_address_t address, int64_t maybe_port, const char *bindtodevice, unsigned bind_default);

	static void fastd_config_error(YYLTYPE *loc, fastd_parser_state_t *state, const char *s);

#line 282 "src/config.yy.c"

#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_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 FASTD_CONFIG_LTYPE_IS_TRIVIAL && FASTD_CONFIG_LTYPE_IS_TRIVIAL \
             && defined FASTD_CONFIG_STYPE_IS_TRIVIAL && FASTD_CONFIG_STYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yy_state_t yyss_alloc;
  YYSTYPE yyvs_alloc;
  YYLTYPE yyls_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) \
             + YYSIZEOF (YYLTYPE)) \
      + 2 * 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  8
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   230

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  88
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  67
/* YYNRULES -- Number of rules.  */
#define YYNRULES  147
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  269

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


/* 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_int8 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,    87,    84,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    85,     2,    86,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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
};

#if FASTD_CONFIG_DEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   153,   153,   154,   155,   158,   159,   163,   164,   167,
     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
     188,   189,   193,   194,   195,   196,   197,   198,   199,   200,
     201,   202,   203,   206,   216,   227,   232,   235,   238,   243,
     248,   252,   256,   262,   265,   268,   276,   281,   297,   300,
     306,   307,   310,   311,   312,   313,   314,   315,   316,   319,
     327,   330,   337,   340,   343,   349,   352,   358,   361,   367,
     370,   373,   378,   387,   397,   400,   401,   402,   405,   410,
     413,   418,   423,   433,   440,   447,   448,   451,   452,   453,
     454,   455,   456,   459,   469,   479,   498,   509,   514,   520,
     528,   537,   544,   550,   555,   565,   570,   575,   580,   585,
     590,   595,   606,   610,   622,   625,   633,   634,   637,   640,
     643,   644,   645,   648,   649,   652,   653,   656,   657,   658,
     660,   661,   664,   665,   668,   669,   672,   681
};
#endif

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

#if FASTD_CONFIG_DEBUG || 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\"", "START_CONFIG",
  "START_PEER_GROUP_CONFIG", "START_PEER_CONFIG", "TOK_UINT", "TOK_STRING",
  "TOK_ADDR4", "TOK_ADDR6", "TOK_ADDR6_SCOPED", "TOK_ADDRESSES", "TOK_ANY",
  "TOK_AS", "TOK_ASYNC", "TOK_AUTO", "TOK_BIND", "TOK_CAPABILITIES",
  "TOK_CIPHER", "TOK_CONNECT", "TOK_DEBUG", "TOK_DEBUG2", "TOK_DEFAULT",
  "TOK_DISESTABLISH", "TOK_DOWN", "TOK_DROP", "TOK_EARLY", "TOK_ERROR",
  "TOK_ESTABLISH", "TOK_FATAL", "TOK_FLOAT", "TOK_FORCE", "TOK_FORWARD",
  "TOK_FROM", "TOK_GROUP", "TOK_HANDSHAKES", "TOK_HIDE", "TOK_INCLUDE",
  "TOK_INFO", "TOK_INTERFACE", "TOK_IP", "TOK_IPV4", "TOK_IPV6", "TOK_KEY",
  "TOK_L2TP", "TOK_LEVEL", "TOK_LIMIT", "TOK_LOG", "TOK_MAC", "TOK_MARK",
  "TOK_METHOD", "TOK_MODE", "TOK_MTU", "TOK_MULTITAP", "TOK_NO",
  "TOK_OFFLOAD", "TOK_ON", "TOK_PACKET", "TOK_PEER", "TOK_PEERS",
  "TOK_PERSIST", "TOK_PMTU", "TOK_PORT", "TOK_POST_DOWN", "TOK_PRE_UP",
  "TOK_PROTOCOL", "TOK_REMOTE", "TOK_SECRET", "TOK_SECURE", "TOK_SOCKET",
  "TOK_STATUS", "TOK_STDERR", "TOK_SYNC", "TOK_SYSLOG", "TOK_TAP",
  "TOK_TO", "TOK_TUN", "TOK_UP", "TOK_USE", "TOK_USER", "TOK_VERBOSE",
  "TOK_VERIFY", "TOK_WARN", "TOK_YES", "';'", "'{'", "'}'", "':'",
  "$accept", "start", "config", "peer_group_config", "statement",
  "peer_group_statement", "user", "group", "drop_capabilities",
  "drop_capabilities_enabled", "secure_handshakes", "cipher", "mac", "log",
  "persist", "offload", "hide", "maybe_log_level", "log_level",
  "interface", "bind", "bind_address", "maybe_bind_interface",
  "maybe_bind_default", "bind_default", "packet_mark", "mtu", "pmtu",
  "mode", "protocol", "secret", "on_pre_up", "on_post_down",
  "status_socket", "peer", "peer_after", "peer_conf", "peer_statement",
  "peer_remote", "peer_float", "peer_key", "peer_interface", "peer_mtu",
  "peer_include", "peer_group", "peer_group_after", "peer_limit", "method",
  "on_up", "on_down", "on_connect", "on_establish", "on_disestablish",
  "on_verify", "forward", "include", "maybe_bind_port", "maybe_as",
  "maybe_af", "maybe_ipv4", "maybe_ipv6", "sync", "boolean", "autobool",
  "colon_or_port", "port", "bind_port", YY_NULLPTR
};

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

#define YYPACT_NINF (-158)

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

#define YYTABLE_NINF (-135)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
      97,  -158,  -158,  -158,    23,    -5,    76,    56,  -158,   136,
      19,    27,   -50,    42,   -24,    -1,    52,   -37,    59,    61,
      43,    69,    36,    48,    60,     2,    67,   -13,    84,   103,
      79,    49,   113,  -158,  -158,    54,  -158,   -50,   120,   129,
     133,   141,    82,  -158,  -158,  -158,   -47,  -158,    68,   -47,
      75,    70,   -19,  -158,  -158,    71,  -158,  -158,    72,   146,
     147,    77,  -158,   152,   127,    78,  -158,    80,     1,    57,
      81,    85,    83,  -158,    86,  -158,  -158,  -158,    87,  -158,
      88,   -50,    89,   -11,   -11,   -11,   -11,   159,   161,   -11,
     -11,   163,  -158,   167,   169,    91,   -50,    93,  -158,    94,
    -158,  -158,  -158,    95,  -158,    96,   -50,   174,  -158,    98,
      99,  -158,  -158,   100,  -158,   101,  -158,   102,  -158,   104,
     179,   182,   106,   184,   185,     9,  -158,  -158,   170,   188,
    -158,  -158,   156,   189,  -158,  -158,  -158,   114,  -158,  -158,
    -158,  -158,   -50,   -50,  -158,   186,   190,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,  -158,   155,    -8,  -158,
     194,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,   118,
     196,   121,   197,   122,   200,   124,   202,  -158,   126,  -158,
     128,   130,   204,   131,   206,  -158,   132,  -158,   134,  -158,
     137,  -158,  -158,  -158,  -158,  -158,  -158,   138,  -158,  -158,
     139,  -158,  -158,  -158,  -158,  -158,  -158,  -158,   -47,   -47,
     -47,   -47,    46,  -158,  -158,   210,   170,  -158,  -158,  -158,
    -158,   211,  -158,  -158,     1,  -158,   213,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,    55,  -158,  -158,   218,
    -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,
    -158,   155,    47,  -158,  -158,  -158,  -158,  -158,  -158
};

/* 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_uint8 yydefact[] =
{
       0,     6,     8,    96,     0,     2,     3,     4,     1,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     5,     9,     0,     7,     0,     0,     0,
       0,     0,   136,    95,    72,    73,   127,    74,     0,   127,
       0,     0,     0,   141,   140,     0,   122,    44,     0,     0,
       0,     0,   125,     0,     0,     0,    69,     0,     0,     0,
       0,     0,     0,   115,     0,    86,    85,    87,     0,    83,
       0,     0,     0,   139,   139,   139,   139,     0,     0,   139,
     139,     0,    93,     0,     0,     0,     0,     0,   142,     0,
     143,    84,    88,     0,    89,     0,     0,     0,    43,     0,
       0,   107,   111,     0,   109,     0,   108,     0,   110,     0,
     130,   135,     0,     0,     0,     0,   145,   144,    78,     0,
     126,    19,    76,     0,    14,    46,    47,     0,    45,    48,
      31,    11,     0,     0,    17,   129,     0,    42,    18,    67,
      68,    63,    62,    65,    66,    64,    52,    61,    61,    16,
       0,    15,    35,    23,    21,    57,    25,   138,   137,     0,
       0,     0,     0,     0,     0,     0,     0,    91,     0,    90,
       0,     0,     0,     0,     0,    82,     0,   112,     0,   114,
       0,    96,    56,    24,    22,    26,    27,     0,    49,    92,
       0,    10,    98,   102,   100,    99,   101,    97,     0,     0,
       0,     0,    81,    71,   147,     0,    78,    50,    12,    58,
      59,     0,   123,   124,     0,    53,     0,    54,    51,    38,
     118,    40,   120,    37,   117,    39,   119,    29,    28,    36,
     116,    41,   121,    20,     8,    34,     0,    13,    30,     0,
     106,   103,   104,   105,    79,    80,    77,    75,    70,   128,
      60,    61,     0,    94,   146,    55,   113,    32,    33
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -158,  -158,  -158,   -18,  -158,   220,  -158,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,  -158,  -157,     3,  -158,
    -158,  -158,  -158,    12,  -158,  -158,  -158,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,    38,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,  -158,
    -158,  -158,  -158,  -158,  -158,  -158,   181,  -158,  -158,  -158,
    -158,    53,   -27,  -158,   -32,   -60,  -158
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
       0,     4,     5,     6,    33,    36,   109,    58,   137,   138,
     197,    51,    72,    70,    97,    82,    61,   225,   156,    67,
      48,    49,   216,   213,   256,   186,    80,    99,    78,   103,
     105,   180,   178,   200,    95,   267,     7,    43,   122,   110,
     117,   115,   119,   113,   188,   268,   190,    74,   181,   173,
     169,   175,   171,   183,    55,    65,   128,   222,   123,   124,
     125,   170,    56,   101,   249,   250,   130
};

/* 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[] =
{
     100,   227,    98,   167,    53,   226,    62,   135,    68,    92,
     111,     9,   136,    10,   129,   126,    59,   129,   210,   211,
      11,   149,   150,     8,    60,   139,    50,    12,   151,    13,
     152,    14,    15,    54,    16,    53,    93,   224,    69,   153,
     127,    53,    17,    18,    52,    19,    20,    21,    94,    57,
      22,    23,    24,    25,   165,    26,    27,    63,    64,    66,
      28,   168,    29,    30,    54,    31,    71,    83,    73,   192,
      54,    84,    85,    83,    32,    79,    86,    84,    85,   198,
      81,   154,    86,   155,    15,    37,    37,   254,   255,  -132,
    -134,   102,    38,    38,    39,    39,    75,    19,    40,    40,
       1,     2,     3,    35,   265,    25,    96,    41,    41,    91,
     104,    87,    88,    15,   106,   219,   220,    76,   107,    77,
     108,    42,    42,   120,   121,    89,    19,   112,   157,    90,
     158,    89,    35,   266,    25,    90,   114,   172,   174,   176,
     116,   263,   182,   184,    44,    45,    46,   118,    47,   251,
     252,   253,   131,   133,   134,   140,   141,   142,   143,   145,
     146,   144,   147,   160,   148,   159,   177,   161,   179,   185,
     162,   163,   164,   166,   187,   189,   191,   193,   194,   195,
     196,   199,   201,   202,   203,   204,   205,  -133,   206,  -131,
     207,   208,   212,   209,   214,   215,   217,   223,   218,   221,
     224,   228,   229,   230,   232,   231,   233,   234,   235,   236,
     237,   240,   238,   242,   239,   241,   243,   257,   259,   244,
     261,   245,   247,   248,   264,    34,   262,   260,   258,   246,
     132
};

static const yytype_int16 yycheck[] =
{
      27,   158,    15,    14,    54,    13,     7,    26,    45,     7,
      37,    16,    31,    18,    46,    62,    40,    49,     9,    10,
      25,    20,    21,     0,    48,    52,     7,    32,    27,    34,
      29,    36,    37,    83,    39,    54,    34,    45,    75,    38,
      87,    54,    47,    48,    17,    50,    51,    52,    46,     7,
      55,    56,    57,    58,    81,    60,    61,    58,    59,     7,
      65,    72,    67,    68,    83,    70,     7,    19,     7,    96,
      83,    23,    24,    19,    79,     6,    28,    23,    24,   106,
      44,    80,    28,    82,    37,    30,    30,    41,    42,     7,
       8,     7,    37,    37,    39,    39,    53,    50,    43,    43,
       3,     4,     5,    56,   261,    58,    39,    52,    52,    49,
       7,    63,    64,    37,    35,   142,   143,    74,    69,    76,
       7,    66,    66,    41,    42,    77,    50,     7,    71,    81,
      73,    77,    56,    86,    58,    81,     7,    84,    85,    86,
       7,    86,    89,    90,     8,     9,    10,     6,    12,   209,
     210,   211,    84,    78,    84,    84,    84,    11,    11,     7,
      33,    84,    84,    78,    84,    84,     7,    84,     7,     6,
      84,    84,    84,    84,     7,     6,    85,    84,    84,    84,
      84,     7,    84,    84,    84,    84,    84,     8,    84,     7,
      84,     7,    22,     8,     6,    39,     7,     7,    84,    13,
      45,     7,    84,     7,     7,    84,    84,     7,    84,     7,
      84,     7,    84,     7,    84,    84,    84,     7,     7,    85,
       7,    84,    84,    84,     6,     5,   244,   224,   216,   191,
      49
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,     3,     4,     5,    89,    90,    91,   124,     0,    16,
      18,    25,    32,    34,    36,    37,    39,    47,    48,    50,
      51,    52,    55,    56,    57,    58,    60,    61,    65,    67,
      68,    70,    79,    92,    93,    56,    93,    30,    37,    39,
      43,    52,    66,   125,     8,     9,    10,    12,   108,   109,
       7,    99,    17,    54,    83,   142,   150,     7,    95,    40,
      48,   104,     7,    58,    59,   143,     7,   107,    45,    75,
     101,     7,   100,     7,   135,    53,    74,    76,   116,     6,
     114,    44,   103,    19,    23,    24,    28,    63,    64,    77,
      81,    49,     7,    34,    46,   122,    39,   102,    15,   115,
     150,   151,     7,   117,     7,   118,    35,    69,     7,    94,
     127,   150,     7,   131,     7,   129,     7,   128,     6,   130,
      41,    42,   126,   146,   147,   148,    62,    87,   144,   152,
     154,    84,   144,    78,    84,    26,    31,    96,    97,   150,
      84,    84,    11,    11,    84,     7,    33,    84,    84,    20,
      21,    27,    29,    38,    80,    82,   106,    71,    73,    84,
      78,    84,    84,    84,    84,   150,    84,    14,    72,   138,
     149,   140,   149,   137,   149,   139,   149,     7,   120,     7,
     119,   136,   149,   141,   149,     6,   113,     7,   132,     6,
     134,    85,   150,    84,    84,    84,    84,    98,   150,     7,
     121,    84,    84,    84,    84,    84,    84,    84,     7,     8,
       9,    10,    22,   111,     6,    39,   110,     7,    84,   150,
     150,    13,   145,     7,    45,   105,    13,   105,     7,    84,
       7,    84,     7,    84,     7,    84,     7,    84,    84,    84,
       7,    84,     7,    84,    85,    84,   124,    84,    84,   152,
     153,   153,   153,   153,    41,    42,   112,     7,   111,     7,
     106,     7,    91,    86,     6,   105,    86,   123,   133
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_uint8 yyr1[] =
{
       0,    88,    89,    89,    89,    90,    90,    91,    91,    92,
      92,    92,    92,    92,    92,    92,    92,    92,    92,    92,
      92,    92,    92,    92,    92,    92,    92,    92,    92,    92,
      92,    92,    93,    93,    93,    93,    93,    93,    93,    93,
      93,    93,    93,    94,    95,    96,    97,    97,    97,    98,
      99,   100,   101,   101,   101,   101,   102,   103,   104,   104,
     105,   105,   106,   106,   106,   106,   106,   106,   106,   107,
     108,   108,   109,   109,   109,   110,   110,   111,   111,   112,
     112,   112,   113,   114,   115,   116,   116,   116,   117,   118,
     119,   120,   121,   122,   123,   124,   124,   125,   125,   125,
     125,   125,   125,   126,   126,   126,   126,   127,   128,   129,
     130,   131,   132,   133,   134,   135,   136,   137,   138,   139,
     140,   141,   142,   143,   143,   143,   144,   144,   145,   145,
     146,   146,   146,   147,   147,   148,   148,   149,   149,   149,
     150,   150,   151,   151,   152,   152,   153,   154
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     2,     2,     2,     2,     0,     2,     0,     1,
       3,     3,     4,     4,     3,     3,     3,     3,     3,     3,
       4,     3,     3,     3,     3,     3,     3,     3,     4,     4,
       4,     3,     6,     7,     4,     3,     4,     4,     4,     4,
       4,     4,     3,     1,     1,     1,     1,     1,     1,     1,
       3,     3,     2,     3,     3,     5,     2,     2,     3,     3,
       2,     0,     1,     1,     1,     1,     1,     1,     1,     1,
       4,     3,     1,     1,     1,     2,     0,     2,     0,     1,
       1,     0,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     0,     2,     0,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     1,     1,     1,
       1,     1,     1,     0,     1,     1,     2,     2,     2,     2,
       2,     2,     1,     3,     3,     1,     1,     0,     2,     0,
       1,     1,     0,     1,     0,     1,     0,     1,     1,     0,
       1,     1,     1,     1,     1,     1,     2,     2
};


enum { YYENOMEM = -2 };

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

#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 == FASTD_CONFIG_EMPTY)                                        \
      {                                                           \
        yychar = (Token);                                         \
        yylval = (Value);                                         \
        YYPOPSTACK (yylen);                                       \
        yystate = *yyssp;                                         \
        goto yybackup;                                            \
      }                                                           \
    else                                                          \
      {                                                           \
        yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \
        YYERROR;                                                  \
      }                                                           \
  while (0)

/* Backward compatibility with an undocumented macro.
   Use FASTD_CONFIG_error or FASTD_CONFIG_UNDEF. */
#define YYERRCODE FASTD_CONFIG_UNDEF

/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
    do                                                                  \
      if (N)                                                            \
        {                                                               \
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).first_line   = (Current).last_line   =              \
            YYRHSLOC (Rhs, 0).last_line;                                \
          (Current).first_column = (Current).last_column =              \
            YYRHSLOC (Rhs, 0).last_column;                              \
        }                                                               \
    while (0)
#endif

#define YYRHSLOC(Rhs, K) ((Rhs)[K])


/* Enable debugging if requested.  */
#if FASTD_CONFIG_DEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)


/* YYLOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

# ifndef YYLOCATION_PRINT

#  if defined YY_LOCATION_PRINT

   /* Temporary convenience wrapper in case some people defined the
      undocumented and private YY_LOCATION_PRINT macros.  */
#   define YYLOCATION_PRINT(File, Loc)  YY_LOCATION_PRINT(File, *(Loc))

#  elif defined FASTD_CONFIG_LTYPE_IS_TRIVIAL && FASTD_CONFIG_LTYPE_IS_TRIVIAL

/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */

YY_ATTRIBUTE_UNUSED
static int
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
  int res = 0;
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  if (0 <= yylocp->first_line)
    {
      res += YYFPRINTF (yyo, "%d", yylocp->first_line);
      if (0 <= yylocp->first_column)
        res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
    }
  if (0 <= yylocp->last_line)
    {
      if (yylocp->first_line < yylocp->last_line)
        {
          res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
          if (0 <= end_col)
            res += YYFPRINTF (yyo, ".%d", end_col);
        }
      else if (0 <= end_col && yylocp->first_column < end_col)
        res += YYFPRINTF (yyo, "-%d", end_col);
    }
  return res;
}

#   define YYLOCATION_PRINT  yy_location_print_

    /* Temporary convenience wrapper in case some people defined the
       undocumented and private YY_LOCATION_PRINT macros.  */
#   define YY_LOCATION_PRINT(File, Loc)  YYLOCATION_PRINT(File, &(Loc))

#  else

#   define YYLOCATION_PRINT(File, Loc) ((void) 0)
    /* Temporary convenience wrapper in case some people defined the
       undocumented and private YY_LOCATION_PRINT macros.  */
#   define YY_LOCATION_PRINT  YYLOCATION_PRINT

#  endif
# endif /* !defined YYLOCATION_PRINT */


# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Kind, Value, Location, state); \
      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, YYLTYPE const * const yylocationp, fastd_parser_state_t *state)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  YY_USE (yylocationp);
  YY_USE (state);
  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, YYLTYPE const * const yylocationp, fastd_parser_state_t *state)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  YYLOCATION_PRINT (yyo, yylocationp);
  YYFPRINTF (yyo, ": ");
  yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, state);
  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, YYLTYPE *yylsp,
                 int yyrule, fastd_parser_state_t *state)
{
  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)],
                       &(yylsp[(yyi + 1) - (yynrhs)]), state);
      YYFPRINTF (stderr, "\n");
    }
}

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

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !FASTD_CONFIG_DEBUG */
# 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 /* !FASTD_CONFIG_DEBUG */


/* 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
/* Parser data structure.  */
struct yypstate
  {
    /* Number of syntax errors so far.  */
    int yynerrs;

    yy_state_fast_t yystate;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus;

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

    /* Their size.  */
    YYPTRDIFF_T yystacksize;

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

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

    /* The location stack: array, bottom, top.  */
    YYLTYPE yylsa[YYINITDEPTH];
    YYLTYPE *yyls;
    YYLTYPE *yylsp;
    /* Whether this instance has not started parsing yet.
     * If 2, it corresponds to a finished parsing.  */
    int yynew;
  };






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

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

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}





#define fastd_config_nerrs yyps->fastd_config_nerrs
#define yystate yyps->yystate
#define yyerrstatus yyps->yyerrstatus
#define yyssa yyps->yyssa
#define yyss yyps->yyss
#define yyssp yyps->yyssp
#define yyvsa yyps->yyvsa
#define yyvs yyps->yyvs
#define yyvsp yyps->yyvsp
#define yylsa yyps->yylsa
#define yyls yyps->yyls
#define yylsp yyps->yylsp
#define yystacksize yyps->yystacksize

/* Initialize the parser data structure.  */
static void
yypstate_clear (yypstate *yyps)
{
  yynerrs = 0;
  yystate = 0;
  yyerrstatus = 0;

  yyssp = yyss;
  yyvsp = yyvs;
  yylsp = yyls;

  /* Initialize the state stack, in case yypcontext_expected_tokens is
     called before the first call to yyparse. */
  *yyssp = 0;
  yyps->yynew = 1;
}

/* Initialize the parser data structure.  */
yypstate *
yypstate_new (void)
{
  yypstate *yyps;
  yyps = YY_CAST (yypstate *, YYMALLOC (sizeof *yyps));
  if (!yyps)
    return YY_NULLPTR;
  yystacksize = YYINITDEPTH;
  yyss = yyssa;
  yyvs = yyvsa;
  yyls = yylsa;
  yypstate_clear (yyps);
  return yyps;
}

void
yypstate_delete (yypstate *yyps)
{
  if (yyps)
    {
#ifndef yyoverflow
      /* If the stack was reallocated but the parse did not complete, then the
         stack still needs to be freed.  */
      if (yyss != yyssa)
        YYSTACK_FREE (yyss);
#endif
      YYFREE (yyps);
    }
}



/*---------------.
| yypush_parse.  |
`---------------*/

int
yypush_parse (yypstate *yyps,
              int yypushed_char, YYSTYPE const *yypushed_val, YYLTYPE *yypushed_loc, fastd_parser_state_t *state)
{
/* Lookahead token kind.  */
int yychar;


/* The semantic value of the lookahead symbol.  */
/* Default value used for initialization, for pacifying older GCCs
   or non-GCC compilers.  */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);

/* Location data for the lookahead symbol.  */
static YYLTYPE yyloc_default
# if defined FASTD_CONFIG_LTYPE_IS_TRIVIAL && FASTD_CONFIG_LTYPE_IS_TRIVIAL
  = { 1, 1, 1, 1 }
# endif
;
YYLTYPE yylloc = yyloc_default;

  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;
  YYLTYPE yyloc;

  /* The locations where the error started and ended.  */
  YYLTYPE yyerror_range[3];



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

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

  switch (yyps->yynew)
    {
    case 0:
      yyn = yypact[yystate];
      goto yyread_pushed_token;

    case 2:
      yypstate_clear (yyps);
      break;

    default:
      break;
    }

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

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

  yylsp[0] = *yypushed_loc;
  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;
        YYLTYPE *yyls1 = yyls;

        /* 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),
                    &yyls1, yysize * YYSIZEOF (*yylsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
        yyls = yyls1;
      }
# 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);
        YYSTACK_RELOCATE (yyls_alloc, yyls);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
      yylsp = yyls + 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 == FASTD_CONFIG_EMPTY)
    {
      if (!yyps->yynew)
        {
          YYDPRINTF ((stderr, "Return for a new token:\n"));
          yyresult = YYPUSH_MORE;
          goto yypushreturn;
        }
      yyps->yynew = 0;
yyread_pushed_token:
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yypushed_char;
      if (yypushed_val)
        yylval = *yypushed_val;
      if (yypushed_loc)
        yylloc = *yypushed_loc;
    }

  if (yychar <= FASTD_CONFIG_EOF)
    {
      yychar = FASTD_CONFIG_EOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == FASTD_CONFIG_error)
    {
      /* 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 = FASTD_CONFIG_UNDEF;
      yytoken = YYSYMBOL_YYerror;
      yyerror_range[1] = yylloc;
      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
  *++yylsp = yylloc;

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

  /* Default location. */
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  yyerror_range[1] = yyloc;
  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 43: /* user: TOK_STRING  */
#line 206 "../fastd-23/src/config.y"
                           {
#ifdef USE_USER
			free(conf.user);
			conf.user = fastd_strdup((yyvsp[0].str)->str);
#else
			fastd_config_error(&(yyloc), state, "user setting is not supported on this platform");
			YYERROR;
#endif
		}
#line 1644 "src/config.yy.c"
    break;

  case 44: /* group: TOK_STRING  */
#line 216 "../fastd-23/src/config.y"
                           {
#ifdef USE_USER
			free(conf.group);
			conf.group = fastd_strdup((yyvsp[0].str)->str);
#else
			fastd_config_error(&(yyloc), state, "group setting is not supported on this platform");
			YYERROR;
#endif
		}
#line 1658 "src/config.yy.c"
    break;

  case 45: /* drop_capabilities: drop_capabilities_enabled  */
#line 227 "../fastd-23/src/config.y"
                                          {
			conf.drop_caps = (yyvsp[0].uint64);
		}
#line 1666 "src/config.yy.c"
    break;

  case 46: /* drop_capabilities_enabled: TOK_EARLY  */
#line 232 "../fastd-23/src/config.y"
                          {
			(yyval.uint64) = DROP_CAPS_EARLY;
		}
#line 1674 "src/config.yy.c"
    break;

  case 47: /* drop_capabilities_enabled: TOK_FORCE  */
#line 235 "../fastd-23/src/config.y"
                          {
			(yyval.uint64) = DROP_CAPS_FORCE;
		}
#line 1682 "src/config.yy.c"
    break;

  case 48: /* drop_capabilities_enabled: boolean  */
#line 238 "../fastd-23/src/config.y"
                        {
			(yyval.uint64) = (yyvsp[0].boolean) ? DROP_CAPS_ON : DROP_CAPS_OFF;
		}
#line 1690 "src/config.yy.c"
    break;

  case 49: /* secure_handshakes: boolean  */
#line 243 "../fastd-23/src/config.y"
                        {
			pr_warn("'secure handshakes' configuration is deprecated, insecure handshakes are not supported anymore");
		}
#line 1698 "src/config.yy.c"
    break;

  case 50: /* cipher: TOK_STRING TOK_USE TOK_STRING  */
#line 248 "../fastd-23/src/config.y"
                                              {
			fastd_config_cipher((yyvsp[-2].str)->str, (yyvsp[0].str)->str);
		}
#line 1706 "src/config.yy.c"
    break;

  case 51: /* mac: TOK_STRING TOK_USE TOK_STRING  */
#line 252 "../fastd-23/src/config.y"
                                              {
			fastd_config_mac((yyvsp[-2].str)->str, (yyvsp[0].str)->str);
		}
#line 1714 "src/config.yy.c"
    break;

  case 52: /* log: TOK_LEVEL log_level  */
#line 256 "../fastd-23/src/config.y"
                                    {
			if (conf.log_syslog_level)
				conf.log_syslog_level = (yyvsp[0].uint64);
			if (conf.log_stderr_level || !conf.log_syslog_level)
				conf.log_stderr_level = (yyvsp[0].uint64);
		}
#line 1725 "src/config.yy.c"
    break;

  case 53: /* log: TOK_TO TOK_STDERR maybe_log_level  */
#line 262 "../fastd-23/src/config.y"
                                                  {
			conf.log_stderr_level = (yyvsp[0].uint64);
		}
#line 1733 "src/config.yy.c"
    break;

  case 54: /* log: TOK_TO TOK_SYSLOG maybe_log_level  */
#line 265 "../fastd-23/src/config.y"
                                                  {
			conf.log_syslog_level = (yyvsp[0].uint64);
		}
#line 1741 "src/config.yy.c"
    break;

  case 55: /* log: TOK_TO TOK_SYSLOG TOK_AS TOK_STRING maybe_log_level  */
#line 268 "../fastd-23/src/config.y"
                                                                    {
			free(conf.log_syslog_ident);
			conf.log_syslog_ident = fastd_strdup((yyvsp[-1].str)->str);

			conf.log_syslog_level = (yyvsp[0].uint64);
		}
#line 1752 "src/config.yy.c"
    break;

  case 56: /* persist: TOK_INTERFACE boolean  */
#line 276 "../fastd-23/src/config.y"
                                      {
			conf.iface_persist = (yyvsp[0].boolean);
		}
#line 1760 "src/config.yy.c"
    break;

  case 57: /* offload: TOK_L2TP boolean  */
#line 281 "../fastd-23/src/config.y"
                                 {
#ifdef WITH_OFFLOAD_L2TP
			conf.offload_l2tp = (yyvsp[0].boolean);
#else
			if ((yyvsp[0].boolean)) {
# ifdef __linux__
				fastd_config_error(&(yyloc), state, "L2TP offload is not supported by this build of fastd");
# else
				fastd_config_error(&(yyloc), state, "L2TP offload is not supported on this platform");
# endif
				YYERROR;
			}
#endif
		}
#line 1779 "src/config.yy.c"
    break;

  case 58: /* hide: TOK_IP TOK_ADDRESSES boolean  */
#line 297 "../fastd-23/src/config.y"
                                             {
			conf.hide_ip_addresses = (yyvsp[0].boolean);
		}
#line 1787 "src/config.yy.c"
    break;

  case 59: /* hide: TOK_MAC TOK_ADDRESSES boolean  */
#line 300 "../fastd-23/src/config.y"
                                              {
			conf.hide_mac_addresses = (yyvsp[0].boolean);
		}
#line 1795 "src/config.yy.c"
    break;

  case 60: /* maybe_log_level: TOK_LEVEL log_level  */
#line 306 "../fastd-23/src/config.y"
                                        { (yyval.uint64) = (yyvsp[0].uint64); }
#line 1801 "src/config.yy.c"
    break;

  case 61: /* maybe_log_level: %empty  */
#line 307 "../fastd-23/src/config.y"
                                        { (yyval.uint64) = LL_DEFAULT; }
#line 1807 "src/config.yy.c"
    break;

  case 62: /* log_level: TOK_FATAL  */
#line 310 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_FATAL; }
#line 1813 "src/config.yy.c"
    break;

  case 63: /* log_level: TOK_ERROR  */
#line 311 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_ERROR; }
#line 1819 "src/config.yy.c"
    break;

  case 64: /* log_level: TOK_WARN  */
#line 312 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_WARN; }
#line 1825 "src/config.yy.c"
    break;

  case 65: /* log_level: TOK_INFO  */
#line 313 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_INFO; }
#line 1831 "src/config.yy.c"
    break;

  case 66: /* log_level: TOK_VERBOSE  */
#line 314 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_VERBOSE; }
#line 1837 "src/config.yy.c"
    break;

  case 67: /* log_level: TOK_DEBUG  */
#line 315 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_DEBUG; }
#line 1843 "src/config.yy.c"
    break;

  case 68: /* log_level: TOK_DEBUG2  */
#line 316 "../fastd-23/src/config.y"
                                { (yyval.uint64) = LL_DEBUG2; }
#line 1849 "src/config.yy.c"
    break;

  case 69: /* interface: TOK_STRING  */
#line 319 "../fastd-23/src/config.y"
                                {
			if (!fastd_config_ifname(NULL, (yyvsp[0].str)->str)) {
				fastd_config_error(&(yyloc), state, "invalid interface name");
				YYERROR;
			}
		}
#line 1860 "src/config.yy.c"
    break;

  case 70: /* bind: bind_address maybe_bind_port maybe_bind_interface maybe_bind_default  */
#line 327 "../fastd-23/src/config.y"
                                                                                     {
			fastd_config_handle_bind_address((yyvsp[-3].addr), (yyvsp[-2].int64), (yyvsp[-1].str) ? (yyvsp[-1].str)->str : NULL, (yyvsp[0].uint64));
		}
#line 1868 "src/config.yy.c"
    break;

  case 71: /* bind: TOK_ADDR6_SCOPED maybe_bind_port maybe_bind_default  */
#line 330 "../fastd-23/src/config.y"
                                                                    {
			fastd_peer_address_t addr = { .in6 = { .sin6_family = AF_INET6, .sin6_addr = (yyvsp[-2].addr6_scoped).addr } };
			fastd_config_handle_bind_address(addr, (yyvsp[-1].int64), (yyvsp[-2].addr6_scoped).ifname, (yyvsp[0].uint64));
		}
#line 1877 "src/config.yy.c"
    break;

  case 72: /* bind_address: TOK_ADDR4  */
#line 337 "../fastd-23/src/config.y"
                          {
			(yyval.addr) = (fastd_peer_address_t){ .in = { .sin_family = AF_INET, .sin_addr = (yyvsp[0].addr4) } };
		}
#line 1885 "src/config.yy.c"
    break;

  case 73: /* bind_address: TOK_ADDR6  */
#line 340 "../fastd-23/src/config.y"
                          {
			(yyval.addr) = (fastd_peer_address_t){ .in6 = { .sin6_family = AF_INET6, .sin6_addr = (yyvsp[0].addr6) } };
		}
#line 1893 "src/config.yy.c"
    break;

  case 74: /* bind_address: TOK_ANY  */
#line 343 "../fastd-23/src/config.y"
                        {
			(yyval.addr) = (fastd_peer_address_t){ .in = { .sin_family = AF_UNSPEC } };
		}
#line 1901 "src/config.yy.c"
    break;

  case 75: /* maybe_bind_interface: TOK_INTERFACE TOK_STRING  */
#line 349 "../fastd-23/src/config.y"
                                         {
			(yyval.str) = (yyvsp[0].str);
		}
#line 1909 "src/config.yy.c"
    break;

  case 76: /* maybe_bind_interface: %empty  */
#line 352 "../fastd-23/src/config.y"
                {
			(yyval.str) = NULL;
		}
#line 1917 "src/config.yy.c"
    break;

  case 77: /* maybe_bind_default: TOK_DEFAULT bind_default  */
#line 358 "../fastd-23/src/config.y"
                                         {
			(yyval.uint64) = (yyvsp[0].uint64);
		}
#line 1925 "src/config.yy.c"
    break;

  case 78: /* maybe_bind_default: %empty  */
#line 361 "../fastd-23/src/config.y"
                {
			(yyval.uint64) = 0;
		}
#line 1933 "src/config.yy.c"
    break;

  case 79: /* bind_default: TOK_IPV4  */
#line 367 "../fastd-23/src/config.y"
                         {
			(yyval.uint64) = FASTD_BIND_DEFAULT_IPV4;
		}
#line 1941 "src/config.yy.c"
    break;

  case 80: /* bind_default: TOK_IPV6  */
#line 370 "../fastd-23/src/config.y"
                         {
			(yyval.uint64) = FASTD_BIND_DEFAULT_IPV6;
		}
#line 1949 "src/config.yy.c"
    break;

  case 81: /* bind_default: %empty  */
#line 373 "../fastd-23/src/config.y"
                {
			(yyval.uint64) = FASTD_BIND_DEFAULT_IPV4 | FASTD_BIND_DEFAULT_IPV6;
		}
#line 1957 "src/config.yy.c"
    break;

  case 82: /* packet_mark: TOK_UINT  */
#line 378 "../fastd-23/src/config.y"
                         {
#ifdef USE_PACKET_MARK
			conf.packet_mark = (yyvsp[0].uint64);
#else
			fastd_config_error(&(yyloc), state, "setting a packet mark is not supported on this system");
			YYERROR;
#endif
		}
#line 1970 "src/config.yy.c"
    break;

  case 83: /* mtu: TOK_UINT  */
#line 387 "../fastd-23/src/config.y"
                         {
			if ((yyvsp[0].uint64) < 576 || (yyvsp[0].uint64) > 65535) {
				fastd_config_error(&(yyloc), state, "invalid MTU");
				YYERROR;
			}

			conf.mtu = (yyvsp[0].uint64);
		}
#line 1983 "src/config.yy.c"
    break;

  case 85: /* mode: TOK_TAP  */
#line 400 "../fastd-23/src/config.y"
                                { conf.mode = MODE_TAP; }
#line 1989 "src/config.yy.c"
    break;

  case 86: /* mode: TOK_MULTITAP  */
#line 401 "../fastd-23/src/config.y"
                                { conf.mode = MODE_MULTITAP; }
#line 1995 "src/config.yy.c"
    break;

  case 87: /* mode: TOK_TUN  */
#line 402 "../fastd-23/src/config.y"
                                { conf.mode = MODE_TUN; }
#line 2001 "src/config.yy.c"
    break;

  case 88: /* protocol: TOK_STRING  */
#line 405 "../fastd-23/src/config.y"
                           {
			fastd_config_protocol((yyvsp[0].str)->str);
		}
#line 2009 "src/config.yy.c"
    break;

  case 89: /* secret: TOK_STRING  */
#line 410 "../fastd-23/src/config.y"
                                { free(conf.secret); conf.secret = fastd_strdup((yyvsp[0].str)->str); }
#line 2015 "src/config.yy.c"
    break;

  case 90: /* on_pre_up: TOK_STRING  */
#line 413 "../fastd-23/src/config.y"
                           {
			fastd_shell_command_set(&conf.on_pre_up, (yyvsp[0].str)->str, true);
		}
#line 2023 "src/config.yy.c"
    break;

  case 91: /* on_post_down: TOK_STRING  */
#line 418 "../fastd-23/src/config.y"
                           {
			fastd_shell_command_set(&conf.on_post_down, (yyvsp[0].str)->str, true);
		}
#line 2031 "src/config.yy.c"
    break;

  case 92: /* status_socket: TOK_STRING  */
#line 423 "../fastd-23/src/config.y"
                           {
#ifdef WITH_STATUS_SOCKET
			free(conf.status_socket); conf.status_socket = fastd_strdup((yyvsp[0].str)->str);
#else
			fastd_config_error(&(yyloc), state, "status sockets aren't supported by this version of fastd");
			YYERROR;
#endif
		}
#line 2044 "src/config.yy.c"
    break;

  case 93: /* peer: TOK_STRING  */
#line 433 "../fastd-23/src/config.y"
                           {
			state->peer = fastd_new0(fastd_peer_t);
			state->peer->name = fastd_strdup((yyvsp[0].str)->str);
			state->peer->group = state->peer_group;
		}
#line 2054 "src/config.yy.c"
    break;

  case 94: /* peer_after: %empty  */
#line 440 "../fastd-23/src/config.y"
                {
			if (!fastd_peer_add(state->peer)) {
				fastd_config_error(&(yyloc), state, "invalid peer definition");
				YYERROR;
			}
		}
#line 2065 "src/config.yy.c"
    break;

  case 103: /* peer_remote: maybe_ipv4 TOK_ADDR4 port  */
#line 459 "../fastd-23/src/config.y"
                                          {
			fastd_remote_t remote = {};

			remote.address.in.sin_family = AF_INET;
			remote.address.in.sin_addr = (yyvsp[-1].addr4);
			remote.address.in.sin_port = htons((yyvsp[0].uint64));
			fastd_peer_address_simplify(&remote.address);

			VECTOR_ADD(state->peer->remotes, remote);
		}
#line 2080 "src/config.yy.c"
    break;

  case 104: /* peer_remote: maybe_ipv6 TOK_ADDR6 port  */
#line 469 "../fastd-23/src/config.y"
                                          {
			fastd_remote_t remote = {};

			remote.address.in6.sin6_family = AF_INET6;
			remote.address.in6.sin6_addr = (yyvsp[-1].addr6);
			remote.address.in6.sin6_port = htons((yyvsp[0].uint64));
			fastd_peer_address_simplify(&remote.address);

			VECTOR_ADD(state->peer->remotes, remote);
		}
#line 2095 "src/config.yy.c"
    break;

  case 105: /* peer_remote: maybe_ipv6 TOK_ADDR6_SCOPED port  */
#line 479 "../fastd-23/src/config.y"
                                                 {
			char addrbuf[INET6_ADDRSTRLEN];
			size_t addrlen;

			inet_ntop(AF_INET6, &(yyvsp[-1].addr6_scoped).addr, addrbuf, sizeof(addrbuf));
			addrlen = strlen(addrbuf);

			fastd_remote_t remote = {};
			size_t ifname_len = strlen((yyvsp[-1].addr6_scoped).ifname);
			remote.hostname = fastd_alloc(addrlen + ifname_len + 2);
			memcpy(remote.hostname, addrbuf, addrlen);
			remote.hostname[addrlen] = '%';
			memcpy(remote.hostname+addrlen+1, (yyvsp[-1].addr6_scoped).ifname, ifname_len+1);

			remote.address.sa.sa_family = AF_INET6;
			remote.address.in.sin_port = htons((yyvsp[0].uint64));

			VECTOR_ADD(state->peer->remotes, remote);
		}
#line 2119 "src/config.yy.c"
    break;

  case 106: /* peer_remote: maybe_af TOK_STRING port  */
#line 498 "../fastd-23/src/config.y"
                                         {
			fastd_remote_t remote = {};

			remote.hostname = fastd_strdup((yyvsp[-1].str)->str);
			remote.address.sa.sa_family = (yyvsp[-2].uint64);
			remote.address.in.sin_port = htons((yyvsp[0].uint64));

			VECTOR_ADD(state->peer->remotes, remote);
		}
#line 2133 "src/config.yy.c"
    break;

  case 107: /* peer_float: boolean  */
#line 509 "../fastd-23/src/config.y"
                        {
			state->peer->floating = (yyvsp[0].boolean);
		}
#line 2141 "src/config.yy.c"
    break;

  case 108: /* peer_key: TOK_STRING  */
#line 514 "../fastd-23/src/config.y"
                           {
			free(state->peer->key);
			state->peer->key = conf.protocol->read_key((yyvsp[0].str)->str);
		}
#line 2150 "src/config.yy.c"
    break;

  case 109: /* peer_interface: TOK_STRING  */
#line 520 "../fastd-23/src/config.y"
                           {
			if (!fastd_config_ifname(state->peer, (yyvsp[0].str)->str)) {
				fastd_config_error(&(yyloc), state, "invalid interface name");
				YYERROR;
			}
		}
#line 2161 "src/config.yy.c"
    break;

  case 110: /* peer_mtu: TOK_UINT  */
#line 528 "../fastd-23/src/config.y"
                         {
			if ((yyvsp[0].uint64) < 576 || (yyvsp[0].uint64) > 65535) {
				fastd_config_error(&(yyloc), state, "invalid MTU");
				YYERROR;
			}

			state->peer->mtu = (yyvsp[0].uint64);
		}
#line 2174 "src/config.yy.c"
    break;

  case 111: /* peer_include: TOK_STRING  */
#line 537 "../fastd-23/src/config.y"
                           {
			if (!fastd_config_read((yyvsp[0].str)->str, state->peer_group, state->peer, state->depth))
				YYERROR;
		}
#line 2183 "src/config.yy.c"
    break;

  case 112: /* peer_group: TOK_STRING  */
#line 544 "../fastd-23/src/config.y"
                           {
			fastd_config_peer_group_push(state, (yyvsp[0].str)->str);
		}
#line 2191 "src/config.yy.c"
    break;

  case 113: /* peer_group_after: %empty  */
#line 550 "../fastd-23/src/config.y"
                {
			fastd_config_peer_group_pop(state);
		}
#line 2199 "src/config.yy.c"
    break;

  case 114: /* peer_limit: TOK_UINT  */
#line 555 "../fastd-23/src/config.y"
                         {
			if ((yyvsp[0].uint64) > INT_MAX) {
				fastd_config_error(&(yyloc), state, "invalid peer limit");
				YYERROR;
			}

			state->peer_group->max_connections = (yyvsp[0].uint64);
		}
#line 2212 "src/config.yy.c"
    break;

  case 115: /* method: TOK_STRING  */
#line 565 "../fastd-23/src/config.y"
                           {
			fastd_config_method(state->peer_group, (yyvsp[0].str)->str);
		}
#line 2220 "src/config.yy.c"
    break;

  case 116: /* on_up: sync TOK_STRING  */
#line 570 "../fastd-23/src/config.y"
                                {
			fastd_shell_command_set(&state->peer_group->on_up, (yyvsp[0].str)->str, (yyvsp[-1].boolean));
		}
#line 2228 "src/config.yy.c"
    break;

  case 117: /* on_down: sync TOK_STRING  */
#line 575 "../fastd-23/src/config.y"
                                {
			fastd_shell_command_set(&state->peer_group->on_down, (yyvsp[0].str)->str, (yyvsp[-1].boolean));
		}
#line 2236 "src/config.yy.c"
    break;

  case 118: /* on_connect: sync TOK_STRING  */
#line 580 "../fastd-23/src/config.y"
                                {
			fastd_shell_command_set(&state->peer_group->on_connect, (yyvsp[0].str)->str, (yyvsp[-1].boolean));
		}
#line 2244 "src/config.yy.c"
    break;

  case 119: /* on_establish: sync TOK_STRING  */
#line 585 "../fastd-23/src/config.y"
                                {
			fastd_shell_command_set(&state->peer_group->on_establish, (yyvsp[0].str)->str, (yyvsp[-1].boolean));
		}
#line 2252 "src/config.yy.c"
    break;

  case 120: /* on_disestablish: sync TOK_STRING  */
#line 590 "../fastd-23/src/config.y"
                                 {
			fastd_shell_command_set(&state->peer_group->on_disestablish, (yyvsp[0].str)->str, (yyvsp[-1].boolean));
		}
#line 2260 "src/config.yy.c"
    break;

  case 121: /* on_verify: sync TOK_STRING  */
#line 595 "../fastd-23/src/config.y"
                                {
#ifdef WITH_DYNAMIC_PEERS
			fastd_shell_command_set(&conf.on_verify, (yyvsp[0].str)->str, (yyvsp[-1].boolean));
			conf.on_verify_group = state->peer_group;
#else
			fastd_config_error(&(yyloc), state, "`on verify' is not supported by this version of fastd");
			YYERROR;
#endif
		}
#line 2274 "src/config.yy.c"
    break;

  case 122: /* forward: boolean  */
#line 606 "../fastd-23/src/config.y"
                                { conf.forward = (yyvsp[0].boolean); }
#line 2280 "src/config.yy.c"
    break;

  case 123: /* include: TOK_PEER TOK_STRING maybe_as  */
#line 610 "../fastd-23/src/config.y"
                                             {
			fastd_peer_t *peer = fastd_new0(fastd_peer_t);
			peer->name = fastd_strdup(fastd_string_stack_get((yyvsp[0].str)));

			if (!fastd_config_read((yyvsp[-1].str)->str, state->peer_group, peer, state->depth))
				YYERROR;

			if (!fastd_peer_add(peer)) {
				fastd_config_error(&(yyloc), state, "invalid peer definition");
				YYERROR;
			}
		}
#line 2297 "src/config.yy.c"
    break;

  case 124: /* include: TOK_PEERS TOK_FROM TOK_STRING  */
#line 622 "../fastd-23/src/config.y"
                                              {
			fastd_config_add_peer_dir(state->peer_group, (yyvsp[0].str)->str);
		}
#line 2305 "src/config.yy.c"
    break;

  case 125: /* include: TOK_STRING  */
#line 625 "../fastd-23/src/config.y"
                           {
			if (!fastd_config_read((yyvsp[0].str)->str, state->peer_group, NULL, state->depth))
				YYERROR;
		}
#line 2314 "src/config.yy.c"
    break;

  case 126: /* maybe_bind_port: bind_port  */
#line 633 "../fastd-23/src/config.y"
                                { (yyval.int64) = (yyvsp[0].uint64); }
#line 2320 "src/config.yy.c"
    break;

  case 127: /* maybe_bind_port: %empty  */
#line 634 "../fastd-23/src/config.y"
                                { (yyval.int64) = -1; }
#line 2326 "src/config.yy.c"
    break;

  case 128: /* maybe_as: TOK_AS TOK_STRING  */
#line 637 "../fastd-23/src/config.y"
                                  {
			(yyval.str) = (yyvsp[0].str);
		}
#line 2334 "src/config.yy.c"
    break;

  case 129: /* maybe_as: %empty  */
#line 640 "../fastd-23/src/config.y"
                                { (yyval.str) = NULL; }
#line 2340 "src/config.yy.c"
    break;

  case 130: /* maybe_af: TOK_IPV4  */
#line 643 "../fastd-23/src/config.y"
                                { (yyval.uint64) = AF_INET; }
#line 2346 "src/config.yy.c"
    break;

  case 131: /* maybe_af: TOK_IPV6  */
#line 644 "../fastd-23/src/config.y"
                                { (yyval.uint64) = AF_INET6; }
#line 2352 "src/config.yy.c"
    break;

  case 132: /* maybe_af: %empty  */
#line 645 "../fastd-23/src/config.y"
                                { (yyval.uint64) = AF_UNSPEC; }
#line 2358 "src/config.yy.c"
    break;

  case 137: /* sync: TOK_SYNC  */
#line 656 "../fastd-23/src/config.y"
                                { (yyval.boolean) = true; }
#line 2364 "src/config.yy.c"
    break;

  case 138: /* sync: TOK_ASYNC  */
#line 657 "../fastd-23/src/config.y"
                                { (yyval.boolean) = false; }
#line 2370 "src/config.yy.c"
    break;

  case 139: /* sync: %empty  */
#line 658 "../fastd-23/src/config.y"
                                { (yyval.boolean) = false; }
#line 2376 "src/config.yy.c"
    break;

  case 140: /* boolean: TOK_YES  */
#line 660 "../fastd-23/src/config.y"
                                { (yyval.boolean) = true; }
#line 2382 "src/config.yy.c"
    break;

  case 141: /* boolean: TOK_NO  */
#line 661 "../fastd-23/src/config.y"
                                { (yyval.boolean) = false; }
#line 2388 "src/config.yy.c"
    break;

  case 142: /* autobool: TOK_AUTO  */
#line 664 "../fastd-23/src/config.y"
                                { (yyval.tristate) = FASTD_TRISTATE_UNDEF; }
#line 2394 "src/config.yy.c"
    break;

  case 143: /* autobool: boolean  */
#line 665 "../fastd-23/src/config.y"
                                { (yyval.tristate) = (yyvsp[0].boolean) ? FASTD_TRISTATE_TRUE : FASTD_TRISTATE_FALSE; }
#line 2400 "src/config.yy.c"
    break;

  case 146: /* port: colon_or_port TOK_UINT  */
#line 672 "../fastd-23/src/config.y"
                                       {
			if ((yyvsp[0].uint64) < 1 || (yyvsp[0].uint64) > 65535) {
				fastd_config_error(&(yyloc), state, "invalid port");
				YYERROR;
			}
			(yyval.uint64) = (yyvsp[0].uint64);
		}
#line 2412 "src/config.yy.c"
    break;

  case 147: /* bind_port: colon_or_port TOK_UINT  */
#line 681 "../fastd-23/src/config.y"
                                       {
			if ((yyvsp[0].uint64) > 65535) {
				fastd_config_error(&(yyloc), state, "invalid port");
				YYERROR;
			}
			(yyval.uint64) = (yyvsp[0].uint64);
		}
#line 2424 "src/config.yy.c"
    break;


#line 2428 "src/config.yy.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;
  *++yylsp = yyloc;

  /* 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 == FASTD_CONFIG_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (&yylloc, state, YY_("syntax error"));
    }

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

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

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

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

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  yyerror_range[2] = yylloc;
  ++yylsp;
  YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);

  /* 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 (&yylloc, state, YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  if (yychar != FASTD_CONFIG_EMPTY)
    {
      /* 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, &yylloc, state);
    }
  /* 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, yylsp, state);
      YYPOPSTACK (1);
    }
  yyps->yynew = 2;
  goto yypushreturn;


/*-------------------------.
| yypushreturn -- return.  |
`-------------------------*/
yypushreturn:

  return yyresult;
}
#undef fastd_config_nerrs
#undef yystate
#undef yyerrstatus
#undef yyssa
#undef yyss
#undef yyssp
#undef yyvsa
#undef yyvs
#undef yyvsp
#undef yylsa
#undef yyls
#undef yylsp
#undef yystacksize
#line 690 "../fastd-23/src/config.y"

static void fastd_config_handle_bind_address(
	fastd_peer_address_t address, int64_t maybe_port, const char *bindtodevice, unsigned bind_default) {

	unsigned flags = bind_default;
	uint16_t port = 0;

	if (maybe_port < 0)
		flags |= FASTD_BIND_DYNAMIC;
	else
		port = htons(maybe_port);

	if (address.sa.sa_family != AF_INET6)
		address.in.sin_port = port;
	else
		address.in6.sin6_port = port;

	fastd_config_bind_address(&address, bindtodevice, flags);
}

static void fastd_config_error(YYLTYPE *loc, fastd_parser_state_t *state, const char *s) {
	pr_error("config error: %s at %s:%i:%i", s, state->filename, loc->first_line, loc->first_column);
}
