Home | History | Annotate | Line # | Download | only in dist
configparser.c revision 1.1.1.9
      1 /* A Bison parser, made by GNU Bison 3.8.2.  */
      2 
      3 /* Bison implementation for Yacc-like parsers in C
      4 
      5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
      6    Inc.
      7 
      8    This program is free software: you can redistribute it and/or modify
      9    it under the terms of the GNU General Public License as published by
     10    the Free Software Foundation, either version 3 of the License, or
     11    (at your option) any later version.
     12 
     13    This program is distributed in the hope that it will be useful,
     14    but WITHOUT ANY WARRANTY; without even the implied warranty of
     15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16    GNU General Public License for more details.
     17 
     18    You should have received a copy of the GNU General Public License
     19    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
     20 
     21 /* As a special exception, you may create a larger work that contains
     22    part or all of the Bison parser skeleton and distribute that work
     23    under terms of your choice, so long as that work isn't itself a
     24    parser generator using the skeleton or a modified version thereof
     25    as a parser skeleton.  Alternatively, if you modify or redistribute
     26    the parser skeleton itself, you may (at your option) remove this
     27    special exception, which will cause the skeleton and the resulting
     28    Bison output files to be licensed under the GNU General Public
     29    License without this special exception.
     30 
     31    This special exception was added by the Free Software Foundation in
     32    version 2.2 of Bison.  */
     33 
     34 /* C LALR(1) parser skeleton written by Richard Stallman, by
     35    simplifying the original so-called "semantic" parser.  */
     36 
     37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
     38    especially those whose name start with YY_ or yy_.  They are
     39    private implementation details that can be changed or removed.  */
     40 
     41 /* All symbols defined below should begin with yy or YY, to avoid
     42    infringing on user name space.  This should be done even for local
     43    variables, as they might otherwise be expanded by user macros.
     44    There are some unavoidable exceptions within include files to
     45    define necessary library symbols; they are noted "INFRINGES ON
     46    USER NAME SPACE" below.  */
     47 
     48 /* Identify Bison output, and Bison version.  */
     49 #define YYBISON 30802
     50 
     51 /* Bison version string.  */
     52 #define YYBISON_VERSION "3.8.2"
     53 
     54 /* Skeleton name.  */
     55 #define YYSKELETON_NAME "yacc.c"
     56 
     57 /* Pure parsers.  */
     58 #define YYPURE 0
     59 
     60 /* Push parsers.  */
     61 #define YYPUSH 0
     62 
     63 /* Pull parsers.  */
     64 #define YYPULL 1
     65 
     66 
     67 /* Substitute the variable and function names.  */
     68 #define yyparse         c_parse
     69 #define yylex           c_lex
     70 #define yyerror         c_error
     71 #define yydebug         c_debug
     72 #define yynerrs         c_nerrs
     73 #define yylval          c_lval
     74 #define yychar          c_char
     75 
     76 /* First part of user prologue.  */
     77 #line 10 "configparser.y"
     78 
     79 #include "config.h"
     80 
     81 #include <assert.h>
     82 #include <errno.h>
     83 #include <stdio.h>
     84 #include <string.h>
     85 
     86 #include "options.h"
     87 #include "util.h"
     88 #include "dname.h"
     89 #include "tsig.h"
     90 #include "rrl.h"
     91 
     92 int yylex(void);
     93 
     94 #ifdef __cplusplus
     95 extern "C"
     96 #endif
     97 
     98 /* these need to be global, otherwise they cannot be used inside yacc */
     99 extern config_parser_state_type *cfg_parser;
    100 
    101 static void append_acl(struct acl_options **list, struct acl_options *acl);
    102 static void add_to_last_acl(struct acl_options **list, char *ac);
    103 static int parse_boolean(const char *str, int *bln);
    104 static int parse_catalog_role(const char *str, int *role);
    105 static int parse_expire_expr(const char *str, long long *num, uint8_t *expr);
    106 static int parse_number(const char *str, long long *num);
    107 static int parse_range(const char *str, long long *low, long long *high);
    108 
    109 struct component {
    110 	struct component *next;
    111 	char *str;
    112 };
    113 
    114 
    115 #line 116 "configparser.c"
    116 
    117 # ifndef YY_CAST
    118 #  ifdef __cplusplus
    119 #   define YY_CAST(Type, Val) static_cast<Type> (Val)
    120 #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
    121 #  else
    122 #   define YY_CAST(Type, Val) ((Type) (Val))
    123 #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
    124 #  endif
    125 # endif
    126 # ifndef YY_NULLPTR
    127 #  if defined __cplusplus
    128 #   if 201103L <= __cplusplus
    129 #    define YY_NULLPTR nullptr
    130 #   else
    131 #    define YY_NULLPTR 0
    132 #   endif
    133 #  else
    134 #   define YY_NULLPTR ((void*)0)
    135 #  endif
    136 # endif
    137 
    138 #include "configparser.h"
    139 /* Symbol kind.  */
    140 enum yysymbol_kind_t
    141 {
    142   YYSYMBOL_YYEMPTY = -2,
    143   YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
    144   YYSYMBOL_YYerror = 1,                    /* error  */
    145   YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
    146   YYSYMBOL_STRING = 3,                     /* STRING  */
    147   YYSYMBOL_VAR_SERVER = 4,                 /* VAR_SERVER  */
    148   YYSYMBOL_VAR_SERVER_COUNT = 5,           /* VAR_SERVER_COUNT  */
    149   YYSYMBOL_VAR_IP_ADDRESS = 6,             /* VAR_IP_ADDRESS  */
    150   YYSYMBOL_VAR_IP_TRANSPARENT = 7,         /* VAR_IP_TRANSPARENT  */
    151   YYSYMBOL_VAR_IP_FREEBIND = 8,            /* VAR_IP_FREEBIND  */
    152   YYSYMBOL_VAR_REUSEPORT = 9,              /* VAR_REUSEPORT  */
    153   YYSYMBOL_VAR_SEND_BUFFER_SIZE = 10,      /* VAR_SEND_BUFFER_SIZE  */
    154   YYSYMBOL_VAR_RECEIVE_BUFFER_SIZE = 11,   /* VAR_RECEIVE_BUFFER_SIZE  */
    155   YYSYMBOL_VAR_DEBUG_MODE = 12,            /* VAR_DEBUG_MODE  */
    156   YYSYMBOL_VAR_IP4_ONLY = 13,              /* VAR_IP4_ONLY  */
    157   YYSYMBOL_VAR_IP6_ONLY = 14,              /* VAR_IP6_ONLY  */
    158   YYSYMBOL_VAR_DO_IP4 = 15,                /* VAR_DO_IP4  */
    159   YYSYMBOL_VAR_DO_IP6 = 16,                /* VAR_DO_IP6  */
    160   YYSYMBOL_VAR_PORT = 17,                  /* VAR_PORT  */
    161   YYSYMBOL_VAR_USE_SYSTEMD = 18,           /* VAR_USE_SYSTEMD  */
    162   YYSYMBOL_VAR_VERBOSITY = 19,             /* VAR_VERBOSITY  */
    163   YYSYMBOL_VAR_USERNAME = 20,              /* VAR_USERNAME  */
    164   YYSYMBOL_VAR_CHROOT = 21,                /* VAR_CHROOT  */
    165   YYSYMBOL_VAR_ZONESDIR = 22,              /* VAR_ZONESDIR  */
    166   YYSYMBOL_VAR_ZONELISTFILE = 23,          /* VAR_ZONELISTFILE  */
    167   YYSYMBOL_VAR_DATABASE = 24,              /* VAR_DATABASE  */
    168   YYSYMBOL_VAR_LOGFILE = 25,               /* VAR_LOGFILE  */
    169   YYSYMBOL_VAR_LOG_ONLY_SYSLOG = 26,       /* VAR_LOG_ONLY_SYSLOG  */
    170   YYSYMBOL_VAR_PIDFILE = 27,               /* VAR_PIDFILE  */
    171   YYSYMBOL_VAR_DIFFFILE = 28,              /* VAR_DIFFFILE  */
    172   YYSYMBOL_VAR_XFRDFILE = 29,              /* VAR_XFRDFILE  */
    173   YYSYMBOL_VAR_XFRDIR = 30,                /* VAR_XFRDIR  */
    174   YYSYMBOL_VAR_HIDE_VERSION = 31,          /* VAR_HIDE_VERSION  */
    175   YYSYMBOL_VAR_HIDE_IDENTITY = 32,         /* VAR_HIDE_IDENTITY  */
    176   YYSYMBOL_VAR_VERSION = 33,               /* VAR_VERSION  */
    177   YYSYMBOL_VAR_IDENTITY = 34,              /* VAR_IDENTITY  */
    178   YYSYMBOL_VAR_NSID = 35,                  /* VAR_NSID  */
    179   YYSYMBOL_VAR_TCP_COUNT = 36,             /* VAR_TCP_COUNT  */
    180   YYSYMBOL_VAR_TCP_REJECT_OVERFLOW = 37,   /* VAR_TCP_REJECT_OVERFLOW  */
    181   YYSYMBOL_VAR_TCP_QUERY_COUNT = 38,       /* VAR_TCP_QUERY_COUNT  */
    182   YYSYMBOL_VAR_TCP_TIMEOUT = 39,           /* VAR_TCP_TIMEOUT  */
    183   YYSYMBOL_VAR_TCP_MSS = 40,               /* VAR_TCP_MSS  */
    184   YYSYMBOL_VAR_OUTGOING_TCP_MSS = 41,      /* VAR_OUTGOING_TCP_MSS  */
    185   YYSYMBOL_VAR_TCP_LISTEN_QUEUE = 42,      /* VAR_TCP_LISTEN_QUEUE  */
    186   YYSYMBOL_VAR_IPV4_EDNS_SIZE = 43,        /* VAR_IPV4_EDNS_SIZE  */
    187   YYSYMBOL_VAR_IPV6_EDNS_SIZE = 44,        /* VAR_IPV6_EDNS_SIZE  */
    188   YYSYMBOL_VAR_STATISTICS = 45,            /* VAR_STATISTICS  */
    189   YYSYMBOL_VAR_XFRD_RELOAD_TIMEOUT = 46,   /* VAR_XFRD_RELOAD_TIMEOUT  */
    190   YYSYMBOL_VAR_LOG_TIME_ASCII = 47,        /* VAR_LOG_TIME_ASCII  */
    191   YYSYMBOL_VAR_LOG_TIME_ISO = 48,          /* VAR_LOG_TIME_ISO  */
    192   YYSYMBOL_VAR_ROUND_ROBIN = 49,           /* VAR_ROUND_ROBIN  */
    193   YYSYMBOL_VAR_MINIMAL_RESPONSES = 50,     /* VAR_MINIMAL_RESPONSES  */
    194   YYSYMBOL_VAR_CONFINE_TO_ZONE = 51,       /* VAR_CONFINE_TO_ZONE  */
    195   YYSYMBOL_VAR_REFUSE_ANY = 52,            /* VAR_REFUSE_ANY  */
    196   YYSYMBOL_VAR_RELOAD_CONFIG = 53,         /* VAR_RELOAD_CONFIG  */
    197   YYSYMBOL_VAR_ZONEFILES_CHECK = 54,       /* VAR_ZONEFILES_CHECK  */
    198   YYSYMBOL_VAR_ZONEFILES_WRITE = 55,       /* VAR_ZONEFILES_WRITE  */
    199   YYSYMBOL_VAR_RRL_SIZE = 56,              /* VAR_RRL_SIZE  */
    200   YYSYMBOL_VAR_RRL_RATELIMIT = 57,         /* VAR_RRL_RATELIMIT  */
    201   YYSYMBOL_VAR_RRL_SLIP = 58,              /* VAR_RRL_SLIP  */
    202   YYSYMBOL_VAR_RRL_IPV4_PREFIX_LENGTH = 59, /* VAR_RRL_IPV4_PREFIX_LENGTH  */
    203   YYSYMBOL_VAR_RRL_IPV6_PREFIX_LENGTH = 60, /* VAR_RRL_IPV6_PREFIX_LENGTH  */
    204   YYSYMBOL_VAR_RRL_WHITELIST_RATELIMIT = 61, /* VAR_RRL_WHITELIST_RATELIMIT  */
    205   YYSYMBOL_VAR_TLS_SERVICE_KEY = 62,       /* VAR_TLS_SERVICE_KEY  */
    206   YYSYMBOL_VAR_TLS_SERVICE_PEM = 63,       /* VAR_TLS_SERVICE_PEM  */
    207   YYSYMBOL_VAR_TLS_SERVICE_OCSP = 64,      /* VAR_TLS_SERVICE_OCSP  */
    208   YYSYMBOL_VAR_TLS_PORT = 65,              /* VAR_TLS_PORT  */
    209   YYSYMBOL_VAR_TLS_AUTH_PORT = 66,         /* VAR_TLS_AUTH_PORT  */
    210   YYSYMBOL_VAR_TLS_AUTH_XFR_ONLY = 67,     /* VAR_TLS_AUTH_XFR_ONLY  */
    211   YYSYMBOL_VAR_TLS_CERT_BUNDLE = 68,       /* VAR_TLS_CERT_BUNDLE  */
    212   YYSYMBOL_VAR_PROXY_PROTOCOL_PORT = 69,   /* VAR_PROXY_PROTOCOL_PORT  */
    213   YYSYMBOL_VAR_CPU_AFFINITY = 70,          /* VAR_CPU_AFFINITY  */
    214   YYSYMBOL_VAR_XFRD_CPU_AFFINITY = 71,     /* VAR_XFRD_CPU_AFFINITY  */
    215   YYSYMBOL_VAR_SERVER_CPU_AFFINITY = 72,   /* VAR_SERVER_CPU_AFFINITY  */
    216   YYSYMBOL_VAR_DROP_UPDATES = 73,          /* VAR_DROP_UPDATES  */
    217   YYSYMBOL_VAR_XFRD_TCP_MAX = 74,          /* VAR_XFRD_TCP_MAX  */
    218   YYSYMBOL_VAR_XFRD_TCP_PIPELINE = 75,     /* VAR_XFRD_TCP_PIPELINE  */
    219   YYSYMBOL_VAR_METRICS_ENABLE = 76,        /* VAR_METRICS_ENABLE  */
    220   YYSYMBOL_VAR_METRICS_INTERFACE = 77,     /* VAR_METRICS_INTERFACE  */
    221   YYSYMBOL_VAR_METRICS_PORT = 78,          /* VAR_METRICS_PORT  */
    222   YYSYMBOL_VAR_METRICS_PATH = 79,          /* VAR_METRICS_PATH  */
    223   YYSYMBOL_VAR_DNSTAP = 80,                /* VAR_DNSTAP  */
    224   YYSYMBOL_VAR_DNSTAP_ENABLE = 81,         /* VAR_DNSTAP_ENABLE  */
    225   YYSYMBOL_VAR_DNSTAP_SOCKET_PATH = 82,    /* VAR_DNSTAP_SOCKET_PATH  */
    226   YYSYMBOL_VAR_DNSTAP_IP = 83,             /* VAR_DNSTAP_IP  */
    227   YYSYMBOL_VAR_DNSTAP_TLS = 84,            /* VAR_DNSTAP_TLS  */
    228   YYSYMBOL_VAR_DNSTAP_TLS_SERVER_NAME = 85, /* VAR_DNSTAP_TLS_SERVER_NAME  */
    229   YYSYMBOL_VAR_DNSTAP_TLS_CERT_BUNDLE = 86, /* VAR_DNSTAP_TLS_CERT_BUNDLE  */
    230   YYSYMBOL_VAR_DNSTAP_TLS_CLIENT_KEY_FILE = 87, /* VAR_DNSTAP_TLS_CLIENT_KEY_FILE  */
    231   YYSYMBOL_VAR_DNSTAP_TLS_CLIENT_CERT_FILE = 88, /* VAR_DNSTAP_TLS_CLIENT_CERT_FILE  */
    232   YYSYMBOL_VAR_DNSTAP_SEND_IDENTITY = 89,  /* VAR_DNSTAP_SEND_IDENTITY  */
    233   YYSYMBOL_VAR_DNSTAP_SEND_VERSION = 90,   /* VAR_DNSTAP_SEND_VERSION  */
    234   YYSYMBOL_VAR_DNSTAP_IDENTITY = 91,       /* VAR_DNSTAP_IDENTITY  */
    235   YYSYMBOL_VAR_DNSTAP_VERSION = 92,        /* VAR_DNSTAP_VERSION  */
    236   YYSYMBOL_VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES = 93, /* VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES  */
    237   YYSYMBOL_VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES = 94, /* VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES  */
    238   YYSYMBOL_VAR_REMOTE_CONTROL = 95,        /* VAR_REMOTE_CONTROL  */
    239   YYSYMBOL_VAR_CONTROL_ENABLE = 96,        /* VAR_CONTROL_ENABLE  */
    240   YYSYMBOL_VAR_CONTROL_INTERFACE = 97,     /* VAR_CONTROL_INTERFACE  */
    241   YYSYMBOL_VAR_CONTROL_PORT = 98,          /* VAR_CONTROL_PORT  */
    242   YYSYMBOL_VAR_SERVER_KEY_FILE = 99,       /* VAR_SERVER_KEY_FILE  */
    243   YYSYMBOL_VAR_SERVER_CERT_FILE = 100,     /* VAR_SERVER_CERT_FILE  */
    244   YYSYMBOL_VAR_CONTROL_KEY_FILE = 101,     /* VAR_CONTROL_KEY_FILE  */
    245   YYSYMBOL_VAR_CONTROL_CERT_FILE = 102,    /* VAR_CONTROL_CERT_FILE  */
    246   YYSYMBOL_VAR_KEY = 103,                  /* VAR_KEY  */
    247   YYSYMBOL_VAR_ALGORITHM = 104,            /* VAR_ALGORITHM  */
    248   YYSYMBOL_VAR_SECRET = 105,               /* VAR_SECRET  */
    249   YYSYMBOL_VAR_TLS_AUTH = 106,             /* VAR_TLS_AUTH  */
    250   YYSYMBOL_VAR_TLS_AUTH_DOMAIN_NAME = 107, /* VAR_TLS_AUTH_DOMAIN_NAME  */
    251   YYSYMBOL_VAR_TLS_AUTH_CLIENT_CERT = 108, /* VAR_TLS_AUTH_CLIENT_CERT  */
    252   YYSYMBOL_VAR_TLS_AUTH_CLIENT_KEY = 109,  /* VAR_TLS_AUTH_CLIENT_KEY  */
    253   YYSYMBOL_VAR_TLS_AUTH_CLIENT_KEY_PW = 110, /* VAR_TLS_AUTH_CLIENT_KEY_PW  */
    254   YYSYMBOL_VAR_PATTERN = 111,              /* VAR_PATTERN  */
    255   YYSYMBOL_VAR_NAME = 112,                 /* VAR_NAME  */
    256   YYSYMBOL_VAR_ZONEFILE = 113,             /* VAR_ZONEFILE  */
    257   YYSYMBOL_VAR_NOTIFY = 114,               /* VAR_NOTIFY  */
    258   YYSYMBOL_VAR_PROVIDE_XFR = 115,          /* VAR_PROVIDE_XFR  */
    259   YYSYMBOL_VAR_ALLOW_QUERY = 116,          /* VAR_ALLOW_QUERY  */
    260   YYSYMBOL_VAR_AXFR = 117,                 /* VAR_AXFR  */
    261   YYSYMBOL_VAR_UDP = 118,                  /* VAR_UDP  */
    262   YYSYMBOL_VAR_NOTIFY_RETRY = 119,         /* VAR_NOTIFY_RETRY  */
    263   YYSYMBOL_VAR_ALLOW_NOTIFY = 120,         /* VAR_ALLOW_NOTIFY  */
    264   YYSYMBOL_VAR_REQUEST_XFR = 121,          /* VAR_REQUEST_XFR  */
    265   YYSYMBOL_VAR_ALLOW_AXFR_FALLBACK = 122,  /* VAR_ALLOW_AXFR_FALLBACK  */
    266   YYSYMBOL_VAR_OUTGOING_INTERFACE = 123,   /* VAR_OUTGOING_INTERFACE  */
    267   YYSYMBOL_VAR_ANSWER_COOKIE = 124,        /* VAR_ANSWER_COOKIE  */
    268   YYSYMBOL_VAR_COOKIE_SECRET = 125,        /* VAR_COOKIE_SECRET  */
    269   YYSYMBOL_VAR_COOKIE_SECRET_FILE = 126,   /* VAR_COOKIE_SECRET_FILE  */
    270   YYSYMBOL_VAR_COOKIE_STAGING_SECRET = 127, /* VAR_COOKIE_STAGING_SECRET  */
    271   YYSYMBOL_VAR_MAX_REFRESH_TIME = 128,     /* VAR_MAX_REFRESH_TIME  */
    272   YYSYMBOL_VAR_MIN_REFRESH_TIME = 129,     /* VAR_MIN_REFRESH_TIME  */
    273   YYSYMBOL_VAR_MAX_RETRY_TIME = 130,       /* VAR_MAX_RETRY_TIME  */
    274   YYSYMBOL_VAR_MIN_RETRY_TIME = 131,       /* VAR_MIN_RETRY_TIME  */
    275   YYSYMBOL_VAR_MIN_EXPIRE_TIME = 132,      /* VAR_MIN_EXPIRE_TIME  */
    276   YYSYMBOL_VAR_MULTI_PRIMARY_CHECK = 133,  /* VAR_MULTI_PRIMARY_CHECK  */
    277   YYSYMBOL_VAR_SIZE_LIMIT_XFR = 134,       /* VAR_SIZE_LIMIT_XFR  */
    278   YYSYMBOL_VAR_ZONESTATS = 135,            /* VAR_ZONESTATS  */
    279   YYSYMBOL_VAR_INCLUDE_PATTERN = 136,      /* VAR_INCLUDE_PATTERN  */
    280   YYSYMBOL_VAR_STORE_IXFR = 137,           /* VAR_STORE_IXFR  */
    281   YYSYMBOL_VAR_IXFR_SIZE = 138,            /* VAR_IXFR_SIZE  */
    282   YYSYMBOL_VAR_IXFR_NUMBER = 139,          /* VAR_IXFR_NUMBER  */
    283   YYSYMBOL_VAR_CREATE_IXFR = 140,          /* VAR_CREATE_IXFR  */
    284   YYSYMBOL_VAR_CATALOG = 141,              /* VAR_CATALOG  */
    285   YYSYMBOL_VAR_CATALOG_MEMBER_PATTERN = 142, /* VAR_CATALOG_MEMBER_PATTERN  */
    286   YYSYMBOL_VAR_CATALOG_PRODUCER_ZONE = 143, /* VAR_CATALOG_PRODUCER_ZONE  */
    287   YYSYMBOL_VAR_XDP_INTERFACE = 144,        /* VAR_XDP_INTERFACE  */
    288   YYSYMBOL_VAR_XDP_PROGRAM_PATH = 145,     /* VAR_XDP_PROGRAM_PATH  */
    289   YYSYMBOL_VAR_XDP_PROGRAM_LOAD = 146,     /* VAR_XDP_PROGRAM_LOAD  */
    290   YYSYMBOL_VAR_XDP_BPFFS_PATH = 147,       /* VAR_XDP_BPFFS_PATH  */
    291   YYSYMBOL_VAR_XDP_FORCE_COPY = 148,       /* VAR_XDP_FORCE_COPY  */
    292   YYSYMBOL_VAR_ZONE = 149,                 /* VAR_ZONE  */
    293   YYSYMBOL_VAR_RRL_WHITELIST = 150,        /* VAR_RRL_WHITELIST  */
    294   YYSYMBOL_VAR_SERVERS = 151,              /* VAR_SERVERS  */
    295   YYSYMBOL_VAR_BINDTODEVICE = 152,         /* VAR_BINDTODEVICE  */
    296   YYSYMBOL_VAR_SETFIB = 153,               /* VAR_SETFIB  */
    297   YYSYMBOL_VAR_VERIFY = 154,               /* VAR_VERIFY  */
    298   YYSYMBOL_VAR_ENABLE = 155,               /* VAR_ENABLE  */
    299   YYSYMBOL_VAR_VERIFY_ZONE = 156,          /* VAR_VERIFY_ZONE  */
    300   YYSYMBOL_VAR_VERIFY_ZONES = 157,         /* VAR_VERIFY_ZONES  */
    301   YYSYMBOL_VAR_VERIFIER = 158,             /* VAR_VERIFIER  */
    302   YYSYMBOL_VAR_VERIFIER_COUNT = 159,       /* VAR_VERIFIER_COUNT  */
    303   YYSYMBOL_VAR_VERIFIER_FEED_ZONE = 160,   /* VAR_VERIFIER_FEED_ZONE  */
    304   YYSYMBOL_VAR_VERIFIER_TIMEOUT = 161,     /* VAR_VERIFIER_TIMEOUT  */
    305   YYSYMBOL_YYACCEPT = 162,                 /* $accept  */
    306   YYSYMBOL_blocks = 163,                   /* blocks  */
    307   YYSYMBOL_block = 164,                    /* block  */
    308   YYSYMBOL_server = 165,                   /* server  */
    309   YYSYMBOL_server_block = 166,             /* server_block  */
    310   YYSYMBOL_server_option = 167,            /* server_option  */
    311   YYSYMBOL_168_1 = 168,                    /* $@1  */
    312   YYSYMBOL_socket_options = 169,           /* socket_options  */
    313   YYSYMBOL_socket_option = 170,            /* socket_option  */
    314   YYSYMBOL_cpus = 171,                     /* cpus  */
    315   YYSYMBOL_service_cpu_affinity = 172,     /* service_cpu_affinity  */
    316   YYSYMBOL_dnstap = 173,                   /* dnstap  */
    317   YYSYMBOL_dnstap_block = 174,             /* dnstap_block  */
    318   YYSYMBOL_dnstap_option = 175,            /* dnstap_option  */
    319   YYSYMBOL_remote_control = 176,           /* remote_control  */
    320   YYSYMBOL_remote_control_block = 177,     /* remote_control_block  */
    321   YYSYMBOL_remote_control_option = 178,    /* remote_control_option  */
    322   YYSYMBOL_tls_auth = 179,                 /* tls_auth  */
    323   YYSYMBOL_180_2 = 180,                    /* $@2  */
    324   YYSYMBOL_tls_auth_block = 181,           /* tls_auth_block  */
    325   YYSYMBOL_tls_auth_option = 182,          /* tls_auth_option  */
    326   YYSYMBOL_key = 183,                      /* key  */
    327   YYSYMBOL_184_3 = 184,                    /* $@3  */
    328   YYSYMBOL_key_block = 185,                /* key_block  */
    329   YYSYMBOL_key_option = 186,               /* key_option  */
    330   YYSYMBOL_zone = 187,                     /* zone  */
    331   YYSYMBOL_188_4 = 188,                    /* $@4  */
    332   YYSYMBOL_zone_block = 189,               /* zone_block  */
    333   YYSYMBOL_zone_option = 190,              /* zone_option  */
    334   YYSYMBOL_pattern = 191,                  /* pattern  */
    335   YYSYMBOL_192_5 = 192,                    /* $@5  */
    336   YYSYMBOL_pattern_block = 193,            /* pattern_block  */
    337   YYSYMBOL_pattern_option = 194,           /* pattern_option  */
    338   YYSYMBOL_pattern_or_zone_option = 195,   /* pattern_or_zone_option  */
    339   YYSYMBOL_196_6 = 196,                    /* $@6  */
    340   YYSYMBOL_197_7 = 197,                    /* $@7  */
    341   YYSYMBOL_198_8 = 198,                    /* $@8  */
    342   YYSYMBOL_verify = 199,                   /* verify  */
    343   YYSYMBOL_verify_block = 200,             /* verify_block  */
    344   YYSYMBOL_verify_option = 201,            /* verify_option  */
    345   YYSYMBOL_command = 202,                  /* command  */
    346   YYSYMBOL_arguments = 203,                /* arguments  */
    347   YYSYMBOL_ip_address = 204,               /* ip_address  */
    348   YYSYMBOL_number = 205,                   /* number  */
    349   YYSYMBOL_boolean = 206,                  /* boolean  */
    350   YYSYMBOL_request_xfr_tlsauth_option = 207, /* request_xfr_tlsauth_option  */
    351   YYSYMBOL_provide_xfr_tlsauth_option = 208, /* provide_xfr_tlsauth_option  */
    352   YYSYMBOL_catalog_role = 209              /* catalog_role  */
    353 };
    354 typedef enum yysymbol_kind_t yysymbol_kind_t;
    355 
    356 
    357 
    358 
    359 #ifdef short
    360 # undef short
    361 #endif
    362 
    363 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
    364    <limits.h> and (if available) <stdint.h> are included
    365    so that the code can choose integer types of a good width.  */
    366 
    367 #ifndef __PTRDIFF_MAX__
    368 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
    369 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
    370 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
    371 #  define YY_STDINT_H
    372 # endif
    373 #endif
    374 
    375 /* Narrow types that promote to a signed type and that can represent a
    376    signed or unsigned integer of at least N bits.  In tables they can
    377    save space and decrease cache pressure.  Promoting to a signed type
    378    helps avoid bugs in integer arithmetic.  */
    379 
    380 #ifdef __INT_LEAST8_MAX__
    381 typedef __INT_LEAST8_TYPE__ yytype_int8;
    382 #elif defined YY_STDINT_H
    383 typedef int_least8_t yytype_int8;
    384 #else
    385 typedef signed char yytype_int8;
    386 #endif
    387 
    388 #ifdef __INT_LEAST16_MAX__
    389 typedef __INT_LEAST16_TYPE__ yytype_int16;
    390 #elif defined YY_STDINT_H
    391 typedef int_least16_t yytype_int16;
    392 #else
    393 typedef short yytype_int16;
    394 #endif
    395 
    396 /* Work around bug in HP-UX 11.23, which defines these macros
    397    incorrectly for preprocessor constants.  This workaround can likely
    398    be removed in 2023, as HPE has promised support for HP-UX 11.23
    399    (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
    400    <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
    401 #ifdef __hpux
    402 # undef UINT_LEAST8_MAX
    403 # undef UINT_LEAST16_MAX
    404 # define UINT_LEAST8_MAX 255
    405 # define UINT_LEAST16_MAX 65535
    406 #endif
    407 
    408 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
    409 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
    410 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
    411        && UINT_LEAST8_MAX <= INT_MAX)
    412 typedef uint_least8_t yytype_uint8;
    413 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
    414 typedef unsigned char yytype_uint8;
    415 #else
    416 typedef short yytype_uint8;
    417 #endif
    418 
    419 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
    420 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
    421 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
    422        && UINT_LEAST16_MAX <= INT_MAX)
    423 typedef uint_least16_t yytype_uint16;
    424 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
    425 typedef unsigned short yytype_uint16;
    426 #else
    427 typedef int yytype_uint16;
    428 #endif
    429 
    430 #ifndef YYPTRDIFF_T
    431 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
    432 #  define YYPTRDIFF_T __PTRDIFF_TYPE__
    433 #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
    434 # elif defined PTRDIFF_MAX
    435 #  ifndef ptrdiff_t
    436 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    437 #  endif
    438 #  define YYPTRDIFF_T ptrdiff_t
    439 #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
    440 # else
    441 #  define YYPTRDIFF_T long
    442 #  define YYPTRDIFF_MAXIMUM LONG_MAX
    443 # endif
    444 #endif
    445 
    446 #ifndef YYSIZE_T
    447 # ifdef __SIZE_TYPE__
    448 #  define YYSIZE_T __SIZE_TYPE__
    449 # elif defined size_t
    450 #  define YYSIZE_T size_t
    451 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
    452 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
    453 #  define YYSIZE_T size_t
    454 # else
    455 #  define YYSIZE_T unsigned
    456 # endif
    457 #endif
    458 
    459 #define YYSIZE_MAXIMUM                                  \
    460   YY_CAST (YYPTRDIFF_T,                                 \
    461            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
    462             ? YYPTRDIFF_MAXIMUM                         \
    463             : YY_CAST (YYSIZE_T, -1)))
    464 
    465 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
    466 
    467 
    468 /* Stored state numbers (used for stacks). */
    469 typedef yytype_int16 yy_state_t;
    470 
    471 /* State numbers in computations.  */
    472 typedef int yy_state_fast_t;
    473 
    474 #ifndef YY_
    475 # if defined YYENABLE_NLS && YYENABLE_NLS
    476 #  if ENABLE_NLS
    477 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
    478 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
    479 #  endif
    480 # endif
    481 # ifndef YY_
    482 #  define YY_(Msgid) Msgid
    483 # endif
    484 #endif
    485 
    486 
    487 #ifndef YY_ATTRIBUTE_PURE
    488 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
    489 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
    490 # else
    491 #  define YY_ATTRIBUTE_PURE
    492 # endif
    493 #endif
    494 
    495 #ifndef YY_ATTRIBUTE_UNUSED
    496 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
    497 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
    498 # else
    499 #  define YY_ATTRIBUTE_UNUSED
    500 # endif
    501 #endif
    502 
    503 /* Suppress unused-variable warnings by "using" E.  */
    504 #if ! defined lint || defined __GNUC__
    505 # define YY_USE(E) ((void) (E))
    506 #else
    507 # define YY_USE(E) /* empty */
    508 #endif
    509 
    510 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
    511 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
    512 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
    513 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    514     _Pragma ("GCC diagnostic push")                                     \
    515     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
    516 # else
    517 #  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    518     _Pragma ("GCC diagnostic push")                                     \
    519     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    520     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
    521 # endif
    522 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    523     _Pragma ("GCC diagnostic pop")
    524 #else
    525 # define YY_INITIAL_VALUE(Value) Value
    526 #endif
    527 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    528 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
    529 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
    530 #endif
    531 #ifndef YY_INITIAL_VALUE
    532 # define YY_INITIAL_VALUE(Value) /* Nothing. */
    533 #endif
    534 
    535 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
    536 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
    537     _Pragma ("GCC diagnostic push")                            \
    538     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
    539 # define YY_IGNORE_USELESS_CAST_END            \
    540     _Pragma ("GCC diagnostic pop")
    541 #endif
    542 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
    543 # define YY_IGNORE_USELESS_CAST_BEGIN
    544 # define YY_IGNORE_USELESS_CAST_END
    545 #endif
    546 
    547 
    548 #define YY_ASSERT(E) ((void) (0 && (E)))
    549 
    550 #if !defined yyoverflow
    551 
    552 /* The parser invokes alloca or malloc; define the necessary symbols.  */
    553 
    554 # ifdef YYSTACK_USE_ALLOCA
    555 #  if YYSTACK_USE_ALLOCA
    556 #   ifdef __GNUC__
    557 #    define YYSTACK_ALLOC __builtin_alloca
    558 #   elif defined __BUILTIN_VA_ARG_INCR
    559 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
    560 #   elif defined _AIX
    561 #    define YYSTACK_ALLOC __alloca
    562 #   elif defined _MSC_VER
    563 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
    564 #    define alloca _alloca
    565 #   else
    566 #    define YYSTACK_ALLOC alloca
    567 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
    568 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    569       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
    570 #     ifndef EXIT_SUCCESS
    571 #      define EXIT_SUCCESS 0
    572 #     endif
    573 #    endif
    574 #   endif
    575 #  endif
    576 # endif
    577 
    578 # ifdef YYSTACK_ALLOC
    579    /* Pacify GCC's 'empty if-body' warning.  */
    580 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
    581 #  ifndef YYSTACK_ALLOC_MAXIMUM
    582     /* The OS might guarantee only one guard page at the bottom of the stack,
    583        and a page size can be as small as 4096 bytes.  So we cannot safely
    584        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
    585        to allow for a few compiler-allocated temporary stack slots.  */
    586 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
    587 #  endif
    588 # else
    589 #  define YYSTACK_ALLOC YYMALLOC
    590 #  define YYSTACK_FREE YYFREE
    591 #  ifndef YYSTACK_ALLOC_MAXIMUM
    592 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
    593 #  endif
    594 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
    595        && ! ((defined YYMALLOC || defined malloc) \
    596              && (defined YYFREE || defined free)))
    597 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
    598 #   ifndef EXIT_SUCCESS
    599 #    define EXIT_SUCCESS 0
    600 #   endif
    601 #  endif
    602 #  ifndef YYMALLOC
    603 #   define YYMALLOC malloc
    604 #   if ! defined malloc && ! defined EXIT_SUCCESS
    605 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
    606 #   endif
    607 #  endif
    608 #  ifndef YYFREE
    609 #   define YYFREE free
    610 #   if ! defined free && ! defined EXIT_SUCCESS
    611 void free (void *); /* INFRINGES ON USER NAME SPACE */
    612 #   endif
    613 #  endif
    614 # endif
    615 #endif /* !defined yyoverflow */
    616 
    617 #if (! defined yyoverflow \
    618      && (! defined __cplusplus \
    619          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
    620 
    621 /* A type that is properly aligned for any stack member.  */
    622 union yyalloc
    623 {
    624   yy_state_t yyss_alloc;
    625   YYSTYPE yyvs_alloc;
    626 };
    627 
    628 /* The size of the maximum gap between one aligned stack and the next.  */
    629 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
    630 
    631 /* The size of an array large to enough to hold all stacks, each with
    632    N elements.  */
    633 # define YYSTACK_BYTES(N) \
    634      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
    635       + YYSTACK_GAP_MAXIMUM)
    636 
    637 # define YYCOPY_NEEDED 1
    638 
    639 /* Relocate STACK from its old location to the new one.  The
    640    local variables YYSIZE and YYSTACKSIZE give the old and new number of
    641    elements in the stack, and YYPTR gives the new location of the
    642    stack.  Advance YYPTR to a properly aligned location for the next
    643    stack.  */
    644 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    645     do                                                                  \
    646       {                                                                 \
    647         YYPTRDIFF_T yynewbytes;                                         \
    648         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
    649         Stack = &yyptr->Stack_alloc;                                    \
    650         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
    651         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
    652       }                                                                 \
    653     while (0)
    654 
    655 #endif
    656 
    657 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
    658 /* Copy COUNT objects from SRC to DST.  The source and destination do
    659    not overlap.  */
    660 # ifndef YYCOPY
    661 #  if defined __GNUC__ && 1 < __GNUC__
    662 #   define YYCOPY(Dst, Src, Count) \
    663       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
    664 #  else
    665 #   define YYCOPY(Dst, Src, Count)              \
    666       do                                        \
    667         {                                       \
    668           YYPTRDIFF_T yyi;                      \
    669           for (yyi = 0; yyi < (Count); yyi++)   \
    670             (Dst)[yyi] = (Src)[yyi];            \
    671         }                                       \
    672       while (0)
    673 #  endif
    674 # endif
    675 #endif /* !YYCOPY_NEEDED */
    676 
    677 /* YYFINAL -- State number of the termination state.  */
    678 #define YYFINAL  2
    679 /* YYLAST -- Last index in YYTABLE.  */
    680 #define YYLAST   555
    681 
    682 /* YYNTOKENS -- Number of terminals.  */
    683 #define YYNTOKENS  162
    684 /* YYNNTS -- Number of nonterminals.  */
    685 #define YYNNTS  48
    686 /* YYNRULES -- Number of rules.  */
    687 #define YYNRULES  219
    688 /* YYNSTATES -- Number of states.  */
    689 #define YYNSTATES  384
    690 
    691 /* YYMAXUTOK -- Last valid token kind.  */
    692 #define YYMAXUTOK   416
    693 
    694 
    695 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
    696    as returned by yylex, with out-of-bounds checking.  */
    697 #define YYTRANSLATE(YYX)                                \
    698   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
    699    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
    700    : YYSYMBOL_YYUNDEF)
    701 
    702 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
    703    as returned by yylex.  */
    704 static const yytype_uint8 yytranslate[] =
    705 {
    706        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    707        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    708        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    709        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    710        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    711        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    712        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    713        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    714        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    715        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    716        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    717        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    718        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    719        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    720        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    721        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    722        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    723        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    724        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    725        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    726        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    727        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    728        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    729        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    730        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    731        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
    732        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
    733       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
    734       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
    735       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
    736       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
    737       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
    738       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
    739       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
    740       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
    741       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
    742      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
    743      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
    744      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
    745      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
    746      145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
    747      155,   156,   157,   158,   159,   160,   161
    748 };
    749 
    750 #if YYDEBUG
    751 /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
    752 static const yytype_int16 yyrline[] =
    753 {
    754        0,   248,   248,   250,   253,   254,   255,   256,   257,   258,
    755      259,   260,   263,   266,   266,   270,   269,   286,   294,   296,
    756      298,   308,   318,   320,   322,   324,   326,   328,   330,   332,
    757      334,   336,   338,   340,   342,   372,   374,   376,   384,   386,
    758      388,   390,   392,   394,   397,   399,   401,   403,   410,   412,
    759      414,   416,   418,   420,   422,   424,   426,   428,   430,   432,
    760      442,   448,   454,   464,   474,   480,   482,   484,   486,   491,
    761      496,   501,   506,   508,   510,   512,   514,   516,   523,   530,
    762      538,   540,   548,   550,   561,   572,   584,   586,   588,   592,
    763      620,   626,   632,   638,   644,   650,   656,   668,   678,   686,
    764      687,   690,   717,   719,   724,   725,   759,   761,   772,   775,
    765      775,   778,   780,   782,   784,   786,   788,   790,   792,   794,
    766      796,   798,   800,   802,   804,   809,   812,   812,   815,   817,
    767      827,   835,   837,   839,   841,   847,   846,   868,   868,   871,
    768      882,   886,   890,   894,   902,   901,   926,   926,   929,   941,
    769      949,   968,   967,   992,   992,   995,  1008,  1012,  1011,  1028,
    770     1028,  1031,  1038,  1041,  1047,  1049,  1051,  1059,  1061,  1064,
    771     1063,  1077,  1076,  1088,  1098,  1103,  1113,  1112,  1119,  1124,
    772     1129,  1134,  1139,  1144,  1149,  1154,  1159,  1171,  1176,  1181,
    773     1186,  1191,  1193,  1195,  1197,  1199,  1206,  1210,  1226,  1229,
    774     1229,  1232,  1234,  1244,  1251,  1253,  1255,  1257,  1259,  1263,
    775     1283,  1284,  1302,  1312,  1321,  1329,  1330,  1334,  1335,  1340
    776 };
    777 #endif
    778 
    779 /** Accessing symbol of state STATE.  */
    780 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
    781 
    782 #if YYDEBUG || 0
    783 /* The user-facing name of the symbol whose (internal) number is
    784    YYSYMBOL.  No bounds checking.  */
    785 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
    786 
    787 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    788    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
    789 static const char *const yytname[] =
    790 {
    791   "\"end of file\"", "error", "\"invalid token\"", "STRING", "VAR_SERVER",
    792   "VAR_SERVER_COUNT", "VAR_IP_ADDRESS", "VAR_IP_TRANSPARENT",
    793   "VAR_IP_FREEBIND", "VAR_REUSEPORT", "VAR_SEND_BUFFER_SIZE",
    794   "VAR_RECEIVE_BUFFER_SIZE", "VAR_DEBUG_MODE", "VAR_IP4_ONLY",
    795   "VAR_IP6_ONLY", "VAR_DO_IP4", "VAR_DO_IP6", "VAR_PORT",
    796   "VAR_USE_SYSTEMD", "VAR_VERBOSITY", "VAR_USERNAME", "VAR_CHROOT",
    797   "VAR_ZONESDIR", "VAR_ZONELISTFILE", "VAR_DATABASE", "VAR_LOGFILE",
    798   "VAR_LOG_ONLY_SYSLOG", "VAR_PIDFILE", "VAR_DIFFFILE", "VAR_XFRDFILE",
    799   "VAR_XFRDIR", "VAR_HIDE_VERSION", "VAR_HIDE_IDENTITY", "VAR_VERSION",
    800   "VAR_IDENTITY", "VAR_NSID", "VAR_TCP_COUNT", "VAR_TCP_REJECT_OVERFLOW",
    801   "VAR_TCP_QUERY_COUNT", "VAR_TCP_TIMEOUT", "VAR_TCP_MSS",
    802   "VAR_OUTGOING_TCP_MSS", "VAR_TCP_LISTEN_QUEUE", "VAR_IPV4_EDNS_SIZE",
    803   "VAR_IPV6_EDNS_SIZE", "VAR_STATISTICS", "VAR_XFRD_RELOAD_TIMEOUT",
    804   "VAR_LOG_TIME_ASCII", "VAR_LOG_TIME_ISO", "VAR_ROUND_ROBIN",
    805   "VAR_MINIMAL_RESPONSES", "VAR_CONFINE_TO_ZONE", "VAR_REFUSE_ANY",
    806   "VAR_RELOAD_CONFIG", "VAR_ZONEFILES_CHECK", "VAR_ZONEFILES_WRITE",
    807   "VAR_RRL_SIZE", "VAR_RRL_RATELIMIT", "VAR_RRL_SLIP",
    808   "VAR_RRL_IPV4_PREFIX_LENGTH", "VAR_RRL_IPV6_PREFIX_LENGTH",
    809   "VAR_RRL_WHITELIST_RATELIMIT", "VAR_TLS_SERVICE_KEY",
    810   "VAR_TLS_SERVICE_PEM", "VAR_TLS_SERVICE_OCSP", "VAR_TLS_PORT",
    811   "VAR_TLS_AUTH_PORT", "VAR_TLS_AUTH_XFR_ONLY", "VAR_TLS_CERT_BUNDLE",
    812   "VAR_PROXY_PROTOCOL_PORT", "VAR_CPU_AFFINITY", "VAR_XFRD_CPU_AFFINITY",
    813   "VAR_SERVER_CPU_AFFINITY", "VAR_DROP_UPDATES", "VAR_XFRD_TCP_MAX",
    814   "VAR_XFRD_TCP_PIPELINE", "VAR_METRICS_ENABLE", "VAR_METRICS_INTERFACE",
    815   "VAR_METRICS_PORT", "VAR_METRICS_PATH", "VAR_DNSTAP",
    816   "VAR_DNSTAP_ENABLE", "VAR_DNSTAP_SOCKET_PATH", "VAR_DNSTAP_IP",
    817   "VAR_DNSTAP_TLS", "VAR_DNSTAP_TLS_SERVER_NAME",
    818   "VAR_DNSTAP_TLS_CERT_BUNDLE", "VAR_DNSTAP_TLS_CLIENT_KEY_FILE",
    819   "VAR_DNSTAP_TLS_CLIENT_CERT_FILE", "VAR_DNSTAP_SEND_IDENTITY",
    820   "VAR_DNSTAP_SEND_VERSION", "VAR_DNSTAP_IDENTITY", "VAR_DNSTAP_VERSION",
    821   "VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES",
    822   "VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES", "VAR_REMOTE_CONTROL",
    823   "VAR_CONTROL_ENABLE", "VAR_CONTROL_INTERFACE", "VAR_CONTROL_PORT",
    824   "VAR_SERVER_KEY_FILE", "VAR_SERVER_CERT_FILE", "VAR_CONTROL_KEY_FILE",
    825   "VAR_CONTROL_CERT_FILE", "VAR_KEY", "VAR_ALGORITHM", "VAR_SECRET",
    826   "VAR_TLS_AUTH", "VAR_TLS_AUTH_DOMAIN_NAME", "VAR_TLS_AUTH_CLIENT_CERT",
    827   "VAR_TLS_AUTH_CLIENT_KEY", "VAR_TLS_AUTH_CLIENT_KEY_PW", "VAR_PATTERN",
    828   "VAR_NAME", "VAR_ZONEFILE", "VAR_NOTIFY", "VAR_PROVIDE_XFR",
    829   "VAR_ALLOW_QUERY", "VAR_AXFR", "VAR_UDP", "VAR_NOTIFY_RETRY",
    830   "VAR_ALLOW_NOTIFY", "VAR_REQUEST_XFR", "VAR_ALLOW_AXFR_FALLBACK",
    831   "VAR_OUTGOING_INTERFACE", "VAR_ANSWER_COOKIE", "VAR_COOKIE_SECRET",
    832   "VAR_COOKIE_SECRET_FILE", "VAR_COOKIE_STAGING_SECRET",
    833   "VAR_MAX_REFRESH_TIME", "VAR_MIN_REFRESH_TIME", "VAR_MAX_RETRY_TIME",
    834   "VAR_MIN_RETRY_TIME", "VAR_MIN_EXPIRE_TIME", "VAR_MULTI_PRIMARY_CHECK",
    835   "VAR_SIZE_LIMIT_XFR", "VAR_ZONESTATS", "VAR_INCLUDE_PATTERN",
    836   "VAR_STORE_IXFR", "VAR_IXFR_SIZE", "VAR_IXFR_NUMBER", "VAR_CREATE_IXFR",
    837   "VAR_CATALOG", "VAR_CATALOG_MEMBER_PATTERN", "VAR_CATALOG_PRODUCER_ZONE",
    838   "VAR_XDP_INTERFACE", "VAR_XDP_PROGRAM_PATH", "VAR_XDP_PROGRAM_LOAD",
    839   "VAR_XDP_BPFFS_PATH", "VAR_XDP_FORCE_COPY", "VAR_ZONE",
    840   "VAR_RRL_WHITELIST", "VAR_SERVERS", "VAR_BINDTODEVICE", "VAR_SETFIB",
    841   "VAR_VERIFY", "VAR_ENABLE", "VAR_VERIFY_ZONE", "VAR_VERIFY_ZONES",
    842   "VAR_VERIFIER", "VAR_VERIFIER_COUNT", "VAR_VERIFIER_FEED_ZONE",
    843   "VAR_VERIFIER_TIMEOUT", "$accept", "blocks", "block", "server",
    844   "server_block", "server_option", "$@1", "socket_options",
    845   "socket_option", "cpus", "service_cpu_affinity", "dnstap",
    846   "dnstap_block", "dnstap_option", "remote_control",
    847   "remote_control_block", "remote_control_option", "tls_auth", "$@2",
    848   "tls_auth_block", "tls_auth_option", "key", "$@3", "key_block",
    849   "key_option", "zone", "$@4", "zone_block", "zone_option", "pattern",
    850   "$@5", "pattern_block", "pattern_option", "pattern_or_zone_option",
    851   "$@6", "$@7", "$@8", "verify", "verify_block", "verify_option",
    852   "command", "arguments", "ip_address", "number", "boolean",
    853   "request_xfr_tlsauth_option", "provide_xfr_tlsauth_option",
    854   "catalog_role", YY_NULLPTR
    855 };
    856 
    857 static const char *
    858 yysymbol_name (yysymbol_kind_t yysymbol)
    859 {
    860   return yytname[yysymbol];
    861 }
    862 #endif
    863 
    864 #define YYPACT_NINF (-205)
    865 
    866 #define yypact_value_is_default(Yyn) \
    867   ((Yyn) == YYPACT_NINF)
    868 
    869 #define YYTABLE_NINF (-1)
    870 
    871 #define yytable_value_is_error(Yyn) \
    872   0
    873 
    874 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    875    STATE-NUM.  */
    876 static const yytype_int16 yypact[] =
    877 {
    878     -205,   115,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    879     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    880      407,   146,   -66,  -205,  -205,  -205,  -205,     3,    -1,    13,
    881       18,    18,    18,    -1,    -1,    18,    18,    18,    18,    18,
    882       -1,    18,    -1,    19,    22,    23,    24,    25,    34,    18,
    883       35,    49,    51,    52,    18,    18,    53,    54,    57,    -1,
    884       18,    -1,    -1,    -1,    -1,    58,    -1,    -1,    -1,    -1,
    885       18,    18,    18,    18,    18,    18,    18,    18,    -1,    -1,
    886       -1,    -1,    -1,    -1,    -1,    59,    60,    61,    -1,    -1,
    887       18,    63,    -1,  -205,  -205,  -205,    18,    -1,    -1,    18,
    888       13,    -1,    64,    18,    66,    67,    68,    70,    71,    18,
    889       74,    18,  -205,    -1,    18,    76,    78,    18,    82,    84,
    890       85,    86,    18,    18,    87,    90,    18,    18,  -205,    18,
    891       13,    -1,    91,    94,    96,    97,  -205,   -93,   -59,   228,
    892      379,    13,    -1,    18,    18,    99,    -1,    18,    -1,  -205,
    893     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    894     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    895     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    896     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    897     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    898     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    899     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,   104,  -205,
    900     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    901     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    902     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    903     -205,  -205,  -205,  -205,  -205,  -205,  -205,   111,   124,   125,
    904     -205,   126,   129,   130,   132,   133,  -205,   134,   135,   138,
    905      139,   141,    -1,   142,     0,    18,   143,    -1,    -1,    -1,
    906       -1,   144,    18,    -1,   145,   147,    18,    -1,    -1,    18,
    907      148,   149,   150,   151,    18,    99,    18,    -1,  -205,  -205,
    908      153,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    909     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    910     -205,  -205,  -205,  -205,   154,   156,   162,  -205,   163,   164,
    911      165,   166,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    912     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    913     -205,  -205,  -205,  -205,  -205,  -205,  -205,   167,  -138,  -205,
    914     -205,  -205,  -205,  -205,   168,   169,  -205,   171,    18,    -1,
    915     -205,   172,   173,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    916     -205,  -205,   173,  -205
    917 };
    918 
    919 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
    920    Performed when YYTABLE does not specify something else to do.  Zero
    921    means the default is an error.  */
    922 static const yytype_uint8 yydefact[] =
    923 {
    924        2,     0,     1,    14,   110,   127,   144,   135,   157,   151,
    925      200,     3,     4,     5,     6,     8,     7,    10,     9,    11,
    926       12,   108,   125,   147,   138,   160,   154,   198,     0,     0,
    927        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    928        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    929        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    930        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    931        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    932        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    933        0,     0,     0,   104,   106,   107,     0,     0,     0,     0,
    934        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    935        0,     0,    13,     0,     0,     0,     0,     0,     0,     0,
    936        0,     0,     0,     0,     0,     0,     0,     0,   109,     0,
    937        0,     0,     0,     0,     0,     0,   126,   145,   136,   158,
    938      152,     0,     0,     0,     0,     0,     0,     0,     0,   199,
    939      213,    17,   212,    15,   214,    18,    19,    48,    20,    21,
    940       22,    27,    28,    29,    30,    47,    23,    58,    51,    50,
    941       52,    53,    31,    35,    36,    46,    54,    55,    56,    24,
    942       25,    33,    32,    34,    37,    38,    39,    40,    41,    42,
    943       43,    44,    45,    49,    57,    68,    69,    70,    71,    72,
    944       73,    65,    66,    67,    59,    60,    61,    62,    63,    64,
    945       74,    76,    75,    77,    78,    79,    80,    81,    88,    26,
    946       86,    87,    95,    96,    97,    98,    82,    83,    85,    84,
    947       90,    91,    92,    93,    94,    89,   111,   112,   113,   114,
    948      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
    949      128,   129,   130,   131,   132,   133,   134,     0,     0,     0,
    950      146,     0,     0,     0,     0,     0,   137,     0,     0,     0,
    951        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    952        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    953        0,     0,     0,     0,     0,     0,     0,     0,   159,   162,
    954        0,   153,   156,   202,   203,   201,   204,   210,   205,   206,
    955      208,   207,    99,   105,   149,   150,   148,   140,   141,   142,
    956      143,   139,   161,   164,     0,     0,     0,   181,     0,     0,
    957        0,     0,   180,   179,   182,   183,   184,   185,   186,   167,
    958      166,   165,   168,   187,   188,   189,   190,   219,   195,   196,
    959      197,   163,   191,   192,   193,   194,   155,   209,    16,   175,
    960      176,   178,   174,   169,     0,     0,   211,     0,     0,     0,
    961      100,   217,   215,   171,   173,   101,   102,   103,   218,   177,
    962      216,   170,   215,   172
    963 };
    964 
    965 /* YYPGOTO[NTERM-NUM].  */
    966 static const yytype_int16 yypgoto[] =
    967 {
    968     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    969     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    970     -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,  -205,
    971     -205,  -205,  -205,     9,  -205,  -205,  -205,  -205,  -205,  -205,
    972     -118,  -205,   -83,    42,   -31,  -204,  -205,  -205
    973 };
    974 
    975 /* YYDEFGOTO[NTERM-NUM].  */
    976 static const yytype_int16 yydefgoto[] =
    977 {
    978        0,     1,    11,    12,    20,   112,   312,   358,   370,   218,
    979      113,    13,    21,   128,    14,    22,   136,    15,    24,   138,
    980      266,    16,    23,   137,   260,    17,    26,   140,   301,    18,
    981       25,   139,   298,   299,   372,   382,   371,    19,    27,   149,
    982      308,   357,   153,   151,   155,   381,   379,   348
    983 };
    984 
    985 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
    986    positive, shift that token.  If negative, reduce the rule whose
    987    number is the opposite.  If YYTABLE_NINF, syntax error.  */
    988 static const yytype_int16 yytable[] =
    989 {
    990      156,   157,   150,   329,   160,   161,   162,   163,   164,   141,
    991      166,   257,   258,   367,   368,   369,   152,   223,   174,   259,
    992      142,   154,   168,   179,   180,   169,   170,   171,   172,   185,
    993      129,   130,   131,   132,   133,   134,   135,   173,   175,   195,
    994      196,   197,   198,   199,   200,   201,   202,   251,   261,   262,
    995      263,   264,   176,   265,   177,   178,   181,   182,   303,   215,
    996      183,   190,   210,   211,   212,   219,   216,   225,   222,   227,
    997      228,   229,   226,   230,   231,   158,   159,   233,   232,   237,
    998      234,   238,   165,   236,   167,   240,   239,   241,   242,   243,
    999      246,   244,   245,   247,   253,   248,   249,   254,   250,   255,
   1000      256,   184,   307,   186,   187,   188,   189,   313,   191,   192,
   1001      193,   194,   305,   306,   314,     2,   310,   330,   331,     3,
   1002      203,   204,   205,   206,   207,   208,   209,   315,   316,   317,
   1003      213,   214,   318,   319,   217,   320,   321,   322,   323,   220,
   1004      221,   324,   325,   224,   326,   328,   333,   338,   341,   302,
   1005      342,   347,   349,   350,   351,   235,   356,   359,   143,   360,
   1006      144,   145,   146,   147,   148,   361,   362,   363,   364,   365,
   1007      366,   373,   374,   252,   375,   378,   380,   353,   383,     0,
   1008        0,     0,     0,     0,   304,     0,     0,     0,   309,     0,
   1009      311,     0,     0,     0,     0,     4,     0,     0,     0,     0,
   1010        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1011        5,     0,     0,     0,     0,     0,     0,     0,     6,     0,
   1012        0,     7,     0,     0,     0,     0,     8,   114,   115,   116,
   1013      117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
   1014      127,     0,     0,     0,   332,     0,     0,     0,     0,     0,
   1015        0,   339,     0,     0,     0,   343,     0,     0,   346,     0,
   1016        0,     0,     0,   352,     9,   354,     0,     0,     0,    10,
   1017        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1018        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1019        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1020        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1021        0,     0,     0,     0,   327,     0,     0,     0,     0,   334,
   1022      335,   336,   337,     0,     0,   340,     0,     0,     0,   344,
   1023      345,     0,     0,     0,     0,     0,     0,   376,     0,   355,
   1024      267,   268,   269,   270,   271,     0,     0,   272,   273,   274,
   1025      275,   276,     0,     0,     0,     0,   277,   278,   279,   280,
   1026      281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
   1027      291,   292,     0,     0,     0,     0,     0,     0,   293,     0,
   1028        0,     0,     0,     0,   294,     0,   295,     0,   296,   297,
   1029        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1030        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1031        0,   377,    28,    29,    30,    31,    32,    33,    34,    35,
   1032       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
   1033       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
   1034       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
   1035       66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
   1036       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
   1037       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
   1038       96,    97,    98,    99,   100,   101,   102,     0,     0,     0,
   1039        0,   300,   268,   269,   270,   271,     0,     0,   272,   273,
   1040      274,   275,   276,     0,     0,     0,     0,   277,   278,   279,
   1041      280,   281,   282,   283,   284,   285,   286,   287,   288,   289,
   1042      290,   291,   292,     0,     0,     0,     0,     0,     0,   293,
   1043        0,   103,   104,   105,   106,   294,     0,   295,     0,   296,
   1044      297,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   1045        0,   107,   108,   109,   110,   111
   1046 };
   1047 
   1048 static const yytype_int16 yycheck[] =
   1049 {
   1050       31,    32,     3,     3,    35,    36,    37,    38,    39,     6,
   1051       41,   104,   105,   151,   152,   153,     3,   100,    49,   112,
   1052       17,     3,     3,    54,    55,     3,     3,     3,     3,    60,
   1053       96,    97,    98,    99,   100,   101,   102,     3,     3,    70,
   1054       71,    72,    73,    74,    75,    76,    77,   130,   107,   108,
   1055      109,   110,     3,   112,     3,     3,     3,     3,   141,    90,
   1056        3,     3,     3,     3,     3,    96,     3,     3,    99,     3,
   1057        3,     3,   103,     3,     3,    33,    34,     3,   109,     3,
   1058      111,     3,    40,   114,    42,     3,   117,     3,     3,     3,
   1059        3,   122,   123,     3,     3,   126,   127,     3,   129,     3,
   1060        3,    59,     3,    61,    62,    63,    64,     3,    66,    67,
   1061       68,    69,   143,   144,     3,     0,   147,   117,   118,     4,
   1062       78,    79,    80,    81,    82,    83,    84,     3,     3,     3,
   1063       88,    89,     3,     3,    92,     3,     3,     3,     3,    97,
   1064       98,     3,     3,   101,     3,     3,     3,     3,     3,   140,
   1065        3,     3,     3,     3,     3,   113,     3,     3,   155,     3,
   1066      157,   158,   159,   160,   161,     3,     3,     3,     3,     3,
   1067        3,     3,     3,   131,     3,     3,     3,   295,   382,    -1,
   1068       -1,    -1,    -1,    -1,   142,    -1,    -1,    -1,   146,    -1,
   1069      148,    -1,    -1,    -1,    -1,    80,    -1,    -1,    -1,    -1,
   1070       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1071       95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   103,    -1,
   1072       -1,   106,    -1,    -1,    -1,    -1,   111,    81,    82,    83,
   1073       84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
   1074       94,    -1,    -1,    -1,   275,    -1,    -1,    -1,    -1,    -1,
   1075       -1,   282,    -1,    -1,    -1,   286,    -1,    -1,   289,    -1,
   1076       -1,    -1,    -1,   294,   149,   296,    -1,    -1,    -1,   154,
   1077       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1078       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1079       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1080       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1081       -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,   277,
   1082      278,   279,   280,    -1,    -1,   283,    -1,    -1,    -1,   287,
   1083      288,    -1,    -1,    -1,    -1,    -1,    -1,   368,    -1,   297,
   1084      112,   113,   114,   115,   116,    -1,    -1,   119,   120,   121,
   1085      122,   123,    -1,    -1,    -1,    -1,   128,   129,   130,   131,
   1086      132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
   1087      142,   143,    -1,    -1,    -1,    -1,    -1,    -1,   150,    -1,
   1088       -1,    -1,    -1,    -1,   156,    -1,   158,    -1,   160,   161,
   1089       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1090       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1091       -1,   369,     5,     6,     7,     8,     9,    10,    11,    12,
   1092       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
   1093       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
   1094       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
   1095       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
   1096       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
   1097       63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
   1098       73,    74,    75,    76,    77,    78,    79,    -1,    -1,    -1,
   1099       -1,   112,   113,   114,   115,   116,    -1,    -1,   119,   120,
   1100      121,   122,   123,    -1,    -1,    -1,    -1,   128,   129,   130,
   1101      131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
   1102      141,   142,   143,    -1,    -1,    -1,    -1,    -1,    -1,   150,
   1103       -1,   124,   125,   126,   127,   156,    -1,   158,    -1,   160,
   1104      161,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
   1105       -1,   144,   145,   146,   147,   148
   1106 };
   1107 
   1108 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   1109    state STATE-NUM.  */
   1110 static const yytype_uint8 yystos[] =
   1111 {
   1112        0,   163,     0,     4,    80,    95,   103,   106,   111,   149,
   1113      154,   164,   165,   173,   176,   179,   183,   187,   191,   199,
   1114      166,   174,   177,   184,   180,   192,   188,   200,     5,     6,
   1115        7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
   1116       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
   1117       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
   1118       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
   1119       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
   1120       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
   1121       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
   1122       77,    78,    79,   124,   125,   126,   127,   144,   145,   146,
   1123      147,   148,   167,   172,    81,    82,    83,    84,    85,    86,
   1124       87,    88,    89,    90,    91,    92,    93,    94,   175,    96,
   1125       97,    98,    99,   100,   101,   102,   178,   185,   181,   193,
   1126      189,     6,    17,   155,   157,   158,   159,   160,   161,   201,
   1127        3,   205,     3,   204,     3,   206,   206,   206,   205,   205,
   1128      206,   206,   206,   206,   206,   205,   206,   205,     3,     3,
   1129        3,     3,     3,     3,   206,     3,     3,     3,     3,   206,
   1130      206,     3,     3,     3,   205,   206,   205,   205,   205,   205,
   1131        3,   205,   205,   205,   205,   206,   206,   206,   206,   206,
   1132      206,   206,   206,   205,   205,   205,   205,   205,   205,   205,
   1133        3,     3,     3,   205,   205,   206,     3,   205,   171,   206,
   1134      205,   205,   206,   204,   205,     3,   206,     3,     3,     3,
   1135        3,     3,   206,     3,   206,   205,   206,     3,     3,   206,
   1136        3,     3,     3,     3,   206,   206,     3,     3,   206,   206,
   1137      206,   204,   205,     3,     3,     3,     3,   104,   105,   112,
   1138      186,   107,   108,   109,   110,   112,   182,   112,   113,   114,
   1139      115,   116,   119,   120,   121,   122,   123,   128,   129,   130,
   1140      131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
   1141      141,   142,   143,   150,   156,   158,   160,   161,   194,   195,
   1142      112,   190,   195,   204,   205,   206,   206,     3,   202,   205,
   1143      206,   205,   168,     3,     3,     3,     3,     3,     3,     3,
   1144        3,     3,     3,     3,     3,     3,     3,   205,     3,     3,
   1145      117,   118,   206,     3,   205,   205,   205,   205,     3,   206,
   1146      205,     3,     3,   206,   205,   205,   206,     3,   209,     3,
   1147        3,     3,   206,   202,   206,   205,     3,   203,   169,     3,
   1148        3,     3,     3,     3,     3,     3,     3,   151,   152,   153,
   1149      170,   198,   196,     3,     3,     3,   206,   205,     3,   208,
   1150        3,   207,   197,   207
   1151 };
   1152 
   1153 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
   1154 static const yytype_uint8 yyr1[] =
   1155 {
   1156        0,   162,   163,   163,   164,   164,   164,   164,   164,   164,
   1157      164,   164,   165,   166,   166,   168,   167,   167,   167,   167,
   1158      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1159      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1160      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1161      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1162      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1163      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1164      167,   167,   167,   167,   167,   167,   167,   167,   167,   167,
   1165      167,   167,   167,   167,   167,   167,   167,   167,   167,   169,
   1166      169,   170,   170,   170,   171,   171,   172,   172,   173,   174,
   1167      174,   175,   175,   175,   175,   175,   175,   175,   175,   175,
   1168      175,   175,   175,   175,   175,   176,   177,   177,   178,   178,
   1169      178,   178,   178,   178,   178,   180,   179,   181,   181,   182,
   1170      182,   182,   182,   182,   184,   183,   185,   185,   186,   186,
   1171      186,   188,   187,   189,   189,   190,   190,   192,   191,   193,
   1172      193,   194,   194,   195,   195,   195,   195,   195,   195,   196,
   1173      195,   197,   195,   195,   195,   195,   198,   195,   195,   195,
   1174      195,   195,   195,   195,   195,   195,   195,   195,   195,   195,
   1175      195,   195,   195,   195,   195,   195,   195,   195,   199,   200,
   1176      200,   201,   201,   201,   201,   201,   201,   201,   201,   202,
   1177      203,   203,   204,   205,   206,   207,   207,   208,   208,   209
   1178 };
   1179 
   1180 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
   1181 static const yytype_int8 yyr2[] =
   1182 {
   1183        0,     2,     0,     2,     1,     1,     1,     1,     1,     1,
   1184        1,     1,     2,     2,     0,     0,     4,     2,     2,     2,
   1185        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1186        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1187        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1188        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1189        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1190        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1191        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1192        2,     2,     2,     2,     2,     2,     2,     2,     2,     0,
   1193        2,     2,     2,     2,     0,     2,     1,     1,     2,     2,
   1194        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1195        2,     2,     2,     2,     2,     2,     2,     0,     2,     2,
   1196        2,     2,     2,     2,     2,     0,     3,     2,     0,     2,
   1197        2,     2,     2,     2,     0,     3,     2,     0,     2,     2,
   1198        2,     0,     3,     2,     0,     2,     1,     0,     3,     2,
   1199        0,     2,     1,     2,     2,     2,     2,     2,     2,     0,
   1200        5,     0,     6,     4,     3,     3,     0,     5,     3,     2,
   1201        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1202        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1203        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   1204        0,     2,     1,     1,     1,     0,     1,     0,     1,     1
   1205 };
   1206 
   1207 
   1208 enum { YYENOMEM = -2 };
   1209 
   1210 #define yyerrok         (yyerrstatus = 0)
   1211 #define yyclearin       (yychar = YYEMPTY)
   1212 
   1213 #define YYACCEPT        goto yyacceptlab
   1214 #define YYABORT         goto yyabortlab
   1215 #define YYERROR         goto yyerrorlab
   1216 #define YYNOMEM         goto yyexhaustedlab
   1217 
   1218 
   1219 #define YYRECOVERING()  (!!yyerrstatus)
   1220 
   1221 #define YYBACKUP(Token, Value)                                    \
   1222   do                                                              \
   1223     if (yychar == YYEMPTY)                                        \
   1224       {                                                           \
   1225         yychar = (Token);                                         \
   1226         yylval = (Value);                                         \
   1227         YYPOPSTACK (yylen);                                       \
   1228         yystate = *yyssp;                                         \
   1229         goto yybackup;                                            \
   1230       }                                                           \
   1231     else                                                          \
   1232       {                                                           \
   1233         yyerror (YY_("syntax error: cannot back up")); \
   1234         YYERROR;                                                  \
   1235       }                                                           \
   1236   while (0)
   1237 
   1238 /* Backward compatibility with an undocumented macro.
   1239    Use YYerror or YYUNDEF. */
   1240 #define YYERRCODE YYUNDEF
   1241 
   1242 
   1243 /* Enable debugging if requested.  */
   1244 #if YYDEBUG
   1245 
   1246 # ifndef YYFPRINTF
   1247 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
   1248 #  define YYFPRINTF fprintf
   1249 # endif
   1250 
   1251 # define YYDPRINTF(Args)                        \
   1252 do {                                            \
   1253   if (yydebug)                                  \
   1254     YYFPRINTF Args;                             \
   1255 } while (0)
   1256 
   1257 
   1258 
   1259 
   1260 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
   1261 do {                                                                      \
   1262   if (yydebug)                                                            \
   1263     {                                                                     \
   1264       YYFPRINTF (stderr, "%s ", Title);                                   \
   1265       yy_symbol_print (stderr,                                            \
   1266                   Kind, Value); \
   1267       YYFPRINTF (stderr, "\n");                                           \
   1268     }                                                                     \
   1269 } while (0)
   1270 
   1271 
   1272 /*-----------------------------------.
   1273 | Print this symbol's value on YYO.  |
   1274 `-----------------------------------*/
   1275 
   1276 static void
   1277 yy_symbol_value_print (FILE *yyo,
   1278                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
   1279 {
   1280   FILE *yyoutput = yyo;
   1281   YY_USE (yyoutput);
   1282   if (!yyvaluep)
   1283     return;
   1284   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1285   YY_USE (yykind);
   1286   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1287 }
   1288 
   1289 
   1290 /*---------------------------.
   1291 | Print this symbol on YYO.  |
   1292 `---------------------------*/
   1293 
   1294 static void
   1295 yy_symbol_print (FILE *yyo,
   1296                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
   1297 {
   1298   YYFPRINTF (yyo, "%s %s (",
   1299              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
   1300 
   1301   yy_symbol_value_print (yyo, yykind, yyvaluep);
   1302   YYFPRINTF (yyo, ")");
   1303 }
   1304 
   1305 /*------------------------------------------------------------------.
   1306 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
   1307 | TOP (included).                                                   |
   1308 `------------------------------------------------------------------*/
   1309 
   1310 static void
   1311 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
   1312 {
   1313   YYFPRINTF (stderr, "Stack now");
   1314   for (; yybottom <= yytop; yybottom++)
   1315     {
   1316       int yybot = *yybottom;
   1317       YYFPRINTF (stderr, " %d", yybot);
   1318     }
   1319   YYFPRINTF (stderr, "\n");
   1320 }
   1321 
   1322 # define YY_STACK_PRINT(Bottom, Top)                            \
   1323 do {                                                            \
   1324   if (yydebug)                                                  \
   1325     yy_stack_print ((Bottom), (Top));                           \
   1326 } while (0)
   1327 
   1328 
   1329 /*------------------------------------------------.
   1330 | Report that the YYRULE is going to be reduced.  |
   1331 `------------------------------------------------*/
   1332 
   1333 static void
   1334 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
   1335                  int yyrule)
   1336 {
   1337   int yylno = yyrline[yyrule];
   1338   int yynrhs = yyr2[yyrule];
   1339   int yyi;
   1340   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
   1341              yyrule - 1, yylno);
   1342   /* The symbols being reduced.  */
   1343   for (yyi = 0; yyi < yynrhs; yyi++)
   1344     {
   1345       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
   1346       yy_symbol_print (stderr,
   1347                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
   1348                        &yyvsp[(yyi + 1) - (yynrhs)]);
   1349       YYFPRINTF (stderr, "\n");
   1350     }
   1351 }
   1352 
   1353 # define YY_REDUCE_PRINT(Rule)          \
   1354 do {                                    \
   1355   if (yydebug)                          \
   1356     yy_reduce_print (yyssp, yyvsp, Rule); \
   1357 } while (0)
   1358 
   1359 /* Nonzero means print parse trace.  It is left uninitialized so that
   1360    multiple parsers can coexist.  */
   1361 int yydebug;
   1362 #else /* !YYDEBUG */
   1363 # define YYDPRINTF(Args) ((void) 0)
   1364 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
   1365 # define YY_STACK_PRINT(Bottom, Top)
   1366 # define YY_REDUCE_PRINT(Rule)
   1367 #endif /* !YYDEBUG */
   1368 
   1369 
   1370 /* YYINITDEPTH -- initial size of the parser's stacks.  */
   1371 #ifndef YYINITDEPTH
   1372 # define YYINITDEPTH 200
   1373 #endif
   1374 
   1375 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   1376    if the built-in stack extension method is used).
   1377 
   1378    Do not make this value too large; the results are undefined if
   1379    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   1380    evaluated with infinite-precision integer arithmetic.  */
   1381 
   1382 #ifndef YYMAXDEPTH
   1383 # define YYMAXDEPTH 10000
   1384 #endif
   1385 
   1386 
   1387 
   1388 
   1389 
   1390 
   1391 /*-----------------------------------------------.
   1392 | Release the memory associated to this symbol.  |
   1393 `-----------------------------------------------*/
   1394 
   1395 static void
   1396 yydestruct (const char *yymsg,
   1397             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
   1398 {
   1399   YY_USE (yyvaluep);
   1400   if (!yymsg)
   1401     yymsg = "Deleting";
   1402   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
   1403 
   1404   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1405   YY_USE (yykind);
   1406   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1407 }
   1408 
   1409 
   1410 /* Lookahead token kind.  */
   1411 int yychar;
   1412 
   1413 /* The semantic value of the lookahead symbol.  */
   1414 YYSTYPE yylval;
   1415 /* Number of syntax errors so far.  */
   1416 int yynerrs;
   1417 
   1418 
   1419 
   1420 
   1421 /*----------.
   1422 | yyparse.  |
   1423 `----------*/
   1424 
   1425 int
   1426 yyparse (void)
   1427 {
   1428     yy_state_fast_t yystate = 0;
   1429     /* Number of tokens to shift before error messages enabled.  */
   1430     int yyerrstatus = 0;
   1431 
   1432     /* Refer to the stacks through separate pointers, to allow yyoverflow
   1433        to reallocate them elsewhere.  */
   1434 
   1435     /* Their size.  */
   1436     YYPTRDIFF_T yystacksize = YYINITDEPTH;
   1437 
   1438     /* The state stack: array, bottom, top.  */
   1439     yy_state_t yyssa[YYINITDEPTH];
   1440     yy_state_t *yyss = yyssa;
   1441     yy_state_t *yyssp = yyss;
   1442 
   1443     /* The semantic value stack: array, bottom, top.  */
   1444     YYSTYPE yyvsa[YYINITDEPTH];
   1445     YYSTYPE *yyvs = yyvsa;
   1446     YYSTYPE *yyvsp = yyvs;
   1447 
   1448   int yyn;
   1449   /* The return value of yyparse.  */
   1450   int yyresult;
   1451   /* Lookahead symbol kind.  */
   1452   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
   1453   /* The variables used to return semantic value and location from the
   1454      action routines.  */
   1455   YYSTYPE yyval;
   1456 
   1457 
   1458 
   1459 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
   1460 
   1461   /* The number of symbols on the RHS of the reduced rule.
   1462      Keep to zero when no symbol should be popped.  */
   1463   int yylen = 0;
   1464 
   1465   YYDPRINTF ((stderr, "Starting parse\n"));
   1466 
   1467   yychar = YYEMPTY; /* Cause a token to be read.  */
   1468 
   1469   goto yysetstate;
   1470 
   1471 
   1472 /*------------------------------------------------------------.
   1473 | yynewstate -- push a new state, which is found in yystate.  |
   1474 `------------------------------------------------------------*/
   1475 yynewstate:
   1476   /* In all cases, when you get here, the value and location stacks
   1477      have just been pushed.  So pushing a state here evens the stacks.  */
   1478   yyssp++;
   1479 
   1480 
   1481 /*--------------------------------------------------------------------.
   1482 | yysetstate -- set current state (the top of the stack) to yystate.  |
   1483 `--------------------------------------------------------------------*/
   1484 yysetstate:
   1485   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
   1486   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
   1487   YY_IGNORE_USELESS_CAST_BEGIN
   1488   *yyssp = YY_CAST (yy_state_t, yystate);
   1489   YY_IGNORE_USELESS_CAST_END
   1490   YY_STACK_PRINT (yyss, yyssp);
   1491 
   1492   if (yyss + yystacksize - 1 <= yyssp)
   1493 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
   1494     YYNOMEM;
   1495 #else
   1496     {
   1497       /* Get the current used size of the three stacks, in elements.  */
   1498       YYPTRDIFF_T yysize = yyssp - yyss + 1;
   1499 
   1500 # if defined yyoverflow
   1501       {
   1502         /* Give user a chance to reallocate the stack.  Use copies of
   1503            these so that the &'s don't force the real ones into
   1504            memory.  */
   1505         yy_state_t *yyss1 = yyss;
   1506         YYSTYPE *yyvs1 = yyvs;
   1507 
   1508         /* Each stack pointer address is followed by the size of the
   1509            data in use in that stack, in bytes.  This used to be a
   1510            conditional around just the two extra args, but that might
   1511            be undefined if yyoverflow is a macro.  */
   1512         yyoverflow (YY_("memory exhausted"),
   1513                     &yyss1, yysize * YYSIZEOF (*yyssp),
   1514                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
   1515                     &yystacksize);
   1516         yyss = yyss1;
   1517         yyvs = yyvs1;
   1518       }
   1519 # else /* defined YYSTACK_RELOCATE */
   1520       /* Extend the stack our own way.  */
   1521       if (YYMAXDEPTH <= yystacksize)
   1522         YYNOMEM;
   1523       yystacksize *= 2;
   1524       if (YYMAXDEPTH < yystacksize)
   1525         yystacksize = YYMAXDEPTH;
   1526 
   1527       {
   1528         yy_state_t *yyss1 = yyss;
   1529         union yyalloc *yyptr =
   1530           YY_CAST (union yyalloc *,
   1531                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
   1532         if (! yyptr)
   1533           YYNOMEM;
   1534         YYSTACK_RELOCATE (yyss_alloc, yyss);
   1535         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
   1536 #  undef YYSTACK_RELOCATE
   1537         if (yyss1 != yyssa)
   1538           YYSTACK_FREE (yyss1);
   1539       }
   1540 # endif
   1541 
   1542       yyssp = yyss + yysize - 1;
   1543       yyvsp = yyvs + yysize - 1;
   1544 
   1545       YY_IGNORE_USELESS_CAST_BEGIN
   1546       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
   1547                   YY_CAST (long, yystacksize)));
   1548       YY_IGNORE_USELESS_CAST_END
   1549 
   1550       if (yyss + yystacksize - 1 <= yyssp)
   1551         YYABORT;
   1552     }
   1553 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
   1554 
   1555 
   1556   if (yystate == YYFINAL)
   1557     YYACCEPT;
   1558 
   1559   goto yybackup;
   1560 
   1561 
   1562 /*-----------.
   1563 | yybackup.  |
   1564 `-----------*/
   1565 yybackup:
   1566   /* Do appropriate processing given the current state.  Read a
   1567      lookahead token if we need one and don't already have one.  */
   1568 
   1569   /* First try to decide what to do without reference to lookahead token.  */
   1570   yyn = yypact[yystate];
   1571   if (yypact_value_is_default (yyn))
   1572     goto yydefault;
   1573 
   1574   /* Not known => get a lookahead token if don't already have one.  */
   1575 
   1576   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
   1577   if (yychar == YYEMPTY)
   1578     {
   1579       YYDPRINTF ((stderr, "Reading a token\n"));
   1580       yychar = yylex ();
   1581     }
   1582 
   1583   if (yychar <= YYEOF)
   1584     {
   1585       yychar = YYEOF;
   1586       yytoken = YYSYMBOL_YYEOF;
   1587       YYDPRINTF ((stderr, "Now at end of input.\n"));
   1588     }
   1589   else if (yychar == YYerror)
   1590     {
   1591       /* The scanner already issued an error message, process directly
   1592          to error recovery.  But do not keep the error token as
   1593          lookahead, it is too special and may lead us to an endless
   1594          loop in error recovery. */
   1595       yychar = YYUNDEF;
   1596       yytoken = YYSYMBOL_YYerror;
   1597       goto yyerrlab1;
   1598     }
   1599   else
   1600     {
   1601       yytoken = YYTRANSLATE (yychar);
   1602       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
   1603     }
   1604 
   1605   /* If the proper action on seeing token YYTOKEN is to reduce or to
   1606      detect an error, take that action.  */
   1607   yyn += yytoken;
   1608   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
   1609     goto yydefault;
   1610   yyn = yytable[yyn];
   1611   if (yyn <= 0)
   1612     {
   1613       if (yytable_value_is_error (yyn))
   1614         goto yyerrlab;
   1615       yyn = -yyn;
   1616       goto yyreduce;
   1617     }
   1618 
   1619   /* Count tokens shifted since error; after three, turn off error
   1620      status.  */
   1621   if (yyerrstatus)
   1622     yyerrstatus--;
   1623 
   1624   /* Shift the lookahead token.  */
   1625   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
   1626   yystate = yyn;
   1627   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   1628   *++yyvsp = yylval;
   1629   YY_IGNORE_MAYBE_UNINITIALIZED_END
   1630 
   1631   /* Discard the shifted token.  */
   1632   yychar = YYEMPTY;
   1633   goto yynewstate;
   1634 
   1635 
   1636 /*-----------------------------------------------------------.
   1637 | yydefault -- do the default action for the current state.  |
   1638 `-----------------------------------------------------------*/
   1639 yydefault:
   1640   yyn = yydefact[yystate];
   1641   if (yyn == 0)
   1642     goto yyerrlab;
   1643   goto yyreduce;
   1644 
   1645 
   1646 /*-----------------------------.
   1647 | yyreduce -- do a reduction.  |
   1648 `-----------------------------*/
   1649 yyreduce:
   1650   /* yyn is the number of a rule to reduce with.  */
   1651   yylen = yyr2[yyn];
   1652 
   1653   /* If YYLEN is nonzero, implement the default value of the action:
   1654      '$$ = $1'.
   1655 
   1656      Otherwise, the following line sets YYVAL to garbage.
   1657      This behavior is undocumented and Bison
   1658      users should not rely upon it.  Assigning to YYVAL
   1659      unconditionally makes the parser a bit smaller, and it avoids a
   1660      GCC warning that YYVAL may be used uninitialized.  */
   1661   yyval = yyvsp[1-yylen];
   1662 
   1663 
   1664   YY_REDUCE_PRINT (yyn);
   1665   switch (yyn)
   1666     {
   1667   case 15: /* $@1: %empty  */
   1668 #line 270 "configparser.y"
   1669       {
   1670         struct ip_address_option *ip = cfg_parser->opt->ip_addresses;
   1671 
   1672         if(ip == NULL) {
   1673           cfg_parser->opt->ip_addresses = (yyvsp[0].ip);
   1674         } else {
   1675           while(ip->next) { ip = ip->next; }
   1676           ip->next = (yyvsp[0].ip);
   1677         }
   1678 
   1679         cfg_parser->ip = (yyvsp[0].ip);
   1680       }
   1681 #line 1682 "configparser.c"
   1682     break;
   1683 
   1684   case 16: /* server_option: VAR_IP_ADDRESS ip_address $@1 socket_options  */
   1685 #line 283 "configparser.y"
   1686     {
   1687       cfg_parser->ip = NULL;
   1688     }
   1689 #line 1690 "configparser.c"
   1690     break;
   1691 
   1692   case 17: /* server_option: VAR_SERVER_COUNT number  */
   1693 #line 287 "configparser.y"
   1694     {
   1695       if ((yyvsp[0].llng) > 0) {
   1696         cfg_parser->opt->server_count = (int)(yyvsp[0].llng);
   1697       } else {
   1698         yyerror("expected a number greater than zero");
   1699       }
   1700     }
   1701 #line 1702 "configparser.c"
   1702     break;
   1703 
   1704   case 18: /* server_option: VAR_IP_TRANSPARENT boolean  */
   1705 #line 295 "configparser.y"
   1706     { cfg_parser->opt->ip_transparent = (yyvsp[0].bln); }
   1707 #line 1708 "configparser.c"
   1708     break;
   1709 
   1710   case 19: /* server_option: VAR_IP_FREEBIND boolean  */
   1711 #line 297 "configparser.y"
   1712     { cfg_parser->opt->ip_freebind = (yyvsp[0].bln); }
   1713 #line 1714 "configparser.c"
   1714     break;
   1715 
   1716   case 20: /* server_option: VAR_SEND_BUFFER_SIZE number  */
   1717 #line 299 "configparser.y"
   1718     {
   1719       if ((yyvsp[0].llng) > 0) {
   1720         cfg_parser->opt->send_buffer_size = (int)(yyvsp[0].llng);
   1721       } else if ((yyvsp[0].llng) == 0) {
   1722         /* do nothing and use the default value */
   1723       } else {
   1724         yyerror("expected a number equal to or greater than zero");
   1725       }
   1726     }
   1727 #line 1728 "configparser.c"
   1728     break;
   1729 
   1730   case 21: /* server_option: VAR_RECEIVE_BUFFER_SIZE number  */
   1731 #line 309 "configparser.y"
   1732     {
   1733       if ((yyvsp[0].llng) > 0) {
   1734         cfg_parser->opt->receive_buffer_size = (int)(yyvsp[0].llng);
   1735       } else if ((yyvsp[0].llng) == 0) {
   1736         /* do nothing and use the default value */
   1737       } else {
   1738         yyerror("expected a number equal to or greater than zero");
   1739       }
   1740     }
   1741 #line 1742 "configparser.c"
   1742     break;
   1743 
   1744   case 22: /* server_option: VAR_DEBUG_MODE boolean  */
   1745 #line 319 "configparser.y"
   1746     { cfg_parser->opt->debug_mode = (yyvsp[0].bln); }
   1747 #line 1748 "configparser.c"
   1748     break;
   1749 
   1750   case 23: /* server_option: VAR_USE_SYSTEMD boolean  */
   1751 #line 321 "configparser.y"
   1752     { /* ignored, obsolete */ }
   1753 #line 1754 "configparser.c"
   1754     break;
   1755 
   1756   case 24: /* server_option: VAR_HIDE_VERSION boolean  */
   1757 #line 323 "configparser.y"
   1758     { cfg_parser->opt->hide_version = (yyvsp[0].bln); }
   1759 #line 1760 "configparser.c"
   1760     break;
   1761 
   1762   case 25: /* server_option: VAR_HIDE_IDENTITY boolean  */
   1763 #line 325 "configparser.y"
   1764     { cfg_parser->opt->hide_identity = (yyvsp[0].bln); }
   1765 #line 1766 "configparser.c"
   1766     break;
   1767 
   1768   case 26: /* server_option: VAR_DROP_UPDATES boolean  */
   1769 #line 327 "configparser.y"
   1770     { cfg_parser->opt->drop_updates = (yyvsp[0].bln); }
   1771 #line 1772 "configparser.c"
   1772     break;
   1773 
   1774   case 27: /* server_option: VAR_IP4_ONLY boolean  */
   1775 #line 329 "configparser.y"
   1776     { if((yyvsp[0].bln)) { cfg_parser->opt->do_ip4 = 1; cfg_parser->opt->do_ip6 = 0; } }
   1777 #line 1778 "configparser.c"
   1778     break;
   1779 
   1780   case 28: /* server_option: VAR_IP6_ONLY boolean  */
   1781 #line 331 "configparser.y"
   1782     { if((yyvsp[0].bln)) { cfg_parser->opt->do_ip4 = 0; cfg_parser->opt->do_ip6 = 1; } }
   1783 #line 1784 "configparser.c"
   1784     break;
   1785 
   1786   case 29: /* server_option: VAR_DO_IP4 boolean  */
   1787 #line 333 "configparser.y"
   1788     { cfg_parser->opt->do_ip4 = (yyvsp[0].bln); }
   1789 #line 1790 "configparser.c"
   1790     break;
   1791 
   1792   case 30: /* server_option: VAR_DO_IP6 boolean  */
   1793 #line 335 "configparser.y"
   1794     { cfg_parser->opt->do_ip6 = (yyvsp[0].bln); }
   1795 #line 1796 "configparser.c"
   1796     break;
   1797 
   1798   case 31: /* server_option: VAR_DATABASE STRING  */
   1799 #line 337 "configparser.y"
   1800     { /* ignored, obsolete */ }
   1801 #line 1802 "configparser.c"
   1802     break;
   1803 
   1804   case 32: /* server_option: VAR_IDENTITY STRING  */
   1805 #line 339 "configparser.y"
   1806     { cfg_parser->opt->identity = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1807 #line 1808 "configparser.c"
   1808     break;
   1809 
   1810   case 33: /* server_option: VAR_VERSION STRING  */
   1811 #line 341 "configparser.y"
   1812     { cfg_parser->opt->version = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1813 #line 1814 "configparser.c"
   1814     break;
   1815 
   1816   case 34: /* server_option: VAR_NSID STRING  */
   1817 #line 343 "configparser.y"
   1818     {
   1819       unsigned char* nsid = 0;
   1820       size_t nsid_len = strlen((yyvsp[0].str));
   1821 
   1822       if (strncasecmp((yyvsp[0].str), "ascii_", 6) == 0) {
   1823         nsid_len -= 6; /* discard "ascii_" */
   1824         if(nsid_len < 65535) {
   1825           cfg_parser->opt->nsid = region_alloc(cfg_parser->opt->region, nsid_len*2+1);
   1826           hex_ntop((uint8_t*)(yyvsp[0].str)+6, nsid_len, (char*)cfg_parser->opt->nsid, nsid_len*2+1);
   1827         } else {
   1828           yyerror("NSID too long");
   1829         }
   1830       } else if (nsid_len % 2 != 0) {
   1831         yyerror("the NSID must be a hex string of an even length.");
   1832       } else {
   1833         nsid_len = nsid_len / 2;
   1834         if(nsid_len < 65535) {
   1835           nsid = xalloc(nsid_len);
   1836           if (hex_pton((yyvsp[0].str), nsid, nsid_len) == -1) {
   1837             yyerror("hex string cannot be parsed in NSID.");
   1838           } else {
   1839             cfg_parser->opt->nsid = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   1840           }
   1841           free(nsid);
   1842         } else {
   1843           yyerror("NSID too long");
   1844         }
   1845       }
   1846     }
   1847 #line 1848 "configparser.c"
   1848     break;
   1849 
   1850   case 35: /* server_option: VAR_LOGFILE STRING  */
   1851 #line 373 "configparser.y"
   1852     { cfg_parser->opt->logfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1853 #line 1854 "configparser.c"
   1854     break;
   1855 
   1856   case 36: /* server_option: VAR_LOG_ONLY_SYSLOG boolean  */
   1857 #line 375 "configparser.y"
   1858     { cfg_parser->opt->log_only_syslog = (yyvsp[0].bln); }
   1859 #line 1860 "configparser.c"
   1860     break;
   1861 
   1862   case 37: /* server_option: VAR_TCP_COUNT number  */
   1863 #line 377 "configparser.y"
   1864     {
   1865       if ((yyvsp[0].llng) > 0) {
   1866         cfg_parser->opt->tcp_count = (int)(yyvsp[0].llng);
   1867       } else {
   1868         yyerror("expected a number greater than zero");
   1869       }
   1870     }
   1871 #line 1872 "configparser.c"
   1872     break;
   1873 
   1874   case 38: /* server_option: VAR_TCP_REJECT_OVERFLOW boolean  */
   1875 #line 385 "configparser.y"
   1876     { cfg_parser->opt->tcp_reject_overflow = (yyvsp[0].bln); }
   1877 #line 1878 "configparser.c"
   1878     break;
   1879 
   1880   case 39: /* server_option: VAR_TCP_QUERY_COUNT number  */
   1881 #line 387 "configparser.y"
   1882     { cfg_parser->opt->tcp_query_count = (int)(yyvsp[0].llng); }
   1883 #line 1884 "configparser.c"
   1884     break;
   1885 
   1886   case 40: /* server_option: VAR_TCP_TIMEOUT number  */
   1887 #line 389 "configparser.y"
   1888     { cfg_parser->opt->tcp_timeout = (int)(yyvsp[0].llng); }
   1889 #line 1890 "configparser.c"
   1890     break;
   1891 
   1892   case 41: /* server_option: VAR_TCP_MSS number  */
   1893 #line 391 "configparser.y"
   1894     { cfg_parser->opt->tcp_mss = (int)(yyvsp[0].llng); }
   1895 #line 1896 "configparser.c"
   1896     break;
   1897 
   1898   case 42: /* server_option: VAR_OUTGOING_TCP_MSS number  */
   1899 #line 393 "configparser.y"
   1900     { cfg_parser->opt->outgoing_tcp_mss = (int)(yyvsp[0].llng); }
   1901 #line 1902 "configparser.c"
   1902     break;
   1903 
   1904   case 43: /* server_option: VAR_TCP_LISTEN_QUEUE STRING  */
   1905 #line 395 "configparser.y"
   1906     { /* With atoi is it allowed to be negative, for system chosen result. */
   1907       cfg_parser->opt->tcp_listen_queue = atoi((yyvsp[0].str)); }
   1908 #line 1909 "configparser.c"
   1909     break;
   1910 
   1911   case 44: /* server_option: VAR_IPV4_EDNS_SIZE number  */
   1912 #line 398 "configparser.y"
   1913     { cfg_parser->opt->ipv4_edns_size = (size_t)(yyvsp[0].llng); }
   1914 #line 1915 "configparser.c"
   1915     break;
   1916 
   1917   case 45: /* server_option: VAR_IPV6_EDNS_SIZE number  */
   1918 #line 400 "configparser.y"
   1919     { cfg_parser->opt->ipv6_edns_size = (size_t)(yyvsp[0].llng); }
   1920 #line 1921 "configparser.c"
   1921     break;
   1922 
   1923   case 46: /* server_option: VAR_PIDFILE STRING  */
   1924 #line 402 "configparser.y"
   1925     { cfg_parser->opt->pidfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1926 #line 1927 "configparser.c"
   1927     break;
   1928 
   1929   case 47: /* server_option: VAR_PORT number  */
   1930 #line 404 "configparser.y"
   1931     {
   1932       /* port number, stored as a string */
   1933       char buf[16];
   1934       (void)snprintf(buf, sizeof(buf), "%lld", (yyvsp[0].llng));
   1935       cfg_parser->opt->port = region_strdup(cfg_parser->opt->region, buf);
   1936     }
   1937 #line 1938 "configparser.c"
   1938     break;
   1939 
   1940   case 48: /* server_option: VAR_REUSEPORT boolean  */
   1941 #line 411 "configparser.y"
   1942     { cfg_parser->opt->reuseport = (yyvsp[0].bln); }
   1943 #line 1944 "configparser.c"
   1944     break;
   1945 
   1946   case 49: /* server_option: VAR_STATISTICS number  */
   1947 #line 413 "configparser.y"
   1948     { cfg_parser->opt->statistics = (int)(yyvsp[0].llng); }
   1949 #line 1950 "configparser.c"
   1950     break;
   1951 
   1952   case 50: /* server_option: VAR_CHROOT STRING  */
   1953 #line 415 "configparser.y"
   1954     { cfg_parser->opt->chroot = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1955 #line 1956 "configparser.c"
   1956     break;
   1957 
   1958   case 51: /* server_option: VAR_USERNAME STRING  */
   1959 #line 417 "configparser.y"
   1960     { cfg_parser->opt->username = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1961 #line 1962 "configparser.c"
   1962     break;
   1963 
   1964   case 52: /* server_option: VAR_ZONESDIR STRING  */
   1965 #line 419 "configparser.y"
   1966     { cfg_parser->opt->zonesdir = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1967 #line 1968 "configparser.c"
   1968     break;
   1969 
   1970   case 53: /* server_option: VAR_ZONELISTFILE STRING  */
   1971 #line 421 "configparser.y"
   1972     { cfg_parser->opt->zonelistfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1973 #line 1974 "configparser.c"
   1974     break;
   1975 
   1976   case 54: /* server_option: VAR_DIFFFILE STRING  */
   1977 #line 423 "configparser.y"
   1978     { /* ignored, obsolete */ }
   1979 #line 1980 "configparser.c"
   1980     break;
   1981 
   1982   case 55: /* server_option: VAR_XFRDFILE STRING  */
   1983 #line 425 "configparser.y"
   1984     { cfg_parser->opt->xfrdfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1985 #line 1986 "configparser.c"
   1986     break;
   1987 
   1988   case 56: /* server_option: VAR_XFRDIR STRING  */
   1989 #line 427 "configparser.y"
   1990     { cfg_parser->opt->xfrdir = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   1991 #line 1992 "configparser.c"
   1992     break;
   1993 
   1994   case 57: /* server_option: VAR_XFRD_RELOAD_TIMEOUT number  */
   1995 #line 429 "configparser.y"
   1996     { cfg_parser->opt->xfrd_reload_timeout = (int)(yyvsp[0].llng); }
   1997 #line 1998 "configparser.c"
   1998     break;
   1999 
   2000   case 58: /* server_option: VAR_VERBOSITY number  */
   2001 #line 431 "configparser.y"
   2002     { cfg_parser->opt->verbosity = (int)(yyvsp[0].llng); }
   2003 #line 2004 "configparser.c"
   2004     break;
   2005 
   2006   case 59: /* server_option: VAR_RRL_SIZE number  */
   2007 #line 433 "configparser.y"
   2008     {
   2009 #ifdef RATELIMIT
   2010       if ((yyvsp[0].llng) > 0) {
   2011         cfg_parser->opt->rrl_size = (size_t)(yyvsp[0].llng);
   2012       } else {
   2013         yyerror("expected a number greater than zero");
   2014       }
   2015 #endif
   2016     }
   2017 #line 2018 "configparser.c"
   2018     break;
   2019 
   2020   case 60: /* server_option: VAR_RRL_RATELIMIT number  */
   2021 #line 443 "configparser.y"
   2022     {
   2023 #ifdef RATELIMIT
   2024       cfg_parser->opt->rrl_ratelimit = (size_t)(yyvsp[0].llng);
   2025 #endif
   2026     }
   2027 #line 2028 "configparser.c"
   2028     break;
   2029 
   2030   case 61: /* server_option: VAR_RRL_SLIP number  */
   2031 #line 449 "configparser.y"
   2032     {
   2033 #ifdef RATELIMIT
   2034       cfg_parser->opt->rrl_slip = (size_t)(yyvsp[0].llng);
   2035 #endif
   2036     }
   2037 #line 2038 "configparser.c"
   2038     break;
   2039 
   2040   case 62: /* server_option: VAR_RRL_IPV4_PREFIX_LENGTH number  */
   2041 #line 455 "configparser.y"
   2042     {
   2043 #ifdef RATELIMIT
   2044       if ((yyvsp[0].llng) > 32) {
   2045         yyerror("invalid IPv4 prefix length");
   2046       } else {
   2047         cfg_parser->opt->rrl_ipv4_prefix_length = (size_t)(yyvsp[0].llng);
   2048       }
   2049 #endif
   2050     }
   2051 #line 2052 "configparser.c"
   2052     break;
   2053 
   2054   case 63: /* server_option: VAR_RRL_IPV6_PREFIX_LENGTH number  */
   2055 #line 465 "configparser.y"
   2056     {
   2057 #ifdef RATELIMIT
   2058       if ((yyvsp[0].llng) > 64) {
   2059         yyerror("invalid IPv6 prefix length");
   2060       } else {
   2061         cfg_parser->opt->rrl_ipv6_prefix_length = (size_t)(yyvsp[0].llng);
   2062       }
   2063 #endif
   2064     }
   2065 #line 2066 "configparser.c"
   2066     break;
   2067 
   2068   case 64: /* server_option: VAR_RRL_WHITELIST_RATELIMIT number  */
   2069 #line 475 "configparser.y"
   2070     {
   2071 #ifdef RATELIMIT
   2072       cfg_parser->opt->rrl_whitelist_ratelimit = (size_t)(yyvsp[0].llng);
   2073 #endif
   2074     }
   2075 #line 2076 "configparser.c"
   2076     break;
   2077 
   2078   case 65: /* server_option: VAR_RELOAD_CONFIG boolean  */
   2079 #line 481 "configparser.y"
   2080     { cfg_parser->opt->reload_config = (yyvsp[0].bln); }
   2081 #line 2082 "configparser.c"
   2082     break;
   2083 
   2084   case 66: /* server_option: VAR_ZONEFILES_CHECK boolean  */
   2085 #line 483 "configparser.y"
   2086     { cfg_parser->opt->zonefiles_check = (yyvsp[0].bln); }
   2087 #line 2088 "configparser.c"
   2088     break;
   2089 
   2090   case 67: /* server_option: VAR_ZONEFILES_WRITE number  */
   2091 #line 485 "configparser.y"
   2092     { cfg_parser->opt->zonefiles_write = (int)(yyvsp[0].llng); }
   2093 #line 2094 "configparser.c"
   2094     break;
   2095 
   2096   case 68: /* server_option: VAR_LOG_TIME_ASCII boolean  */
   2097 #line 487 "configparser.y"
   2098     {
   2099       cfg_parser->opt->log_time_ascii = (yyvsp[0].bln);
   2100       log_time_asc = cfg_parser->opt->log_time_ascii;
   2101     }
   2102 #line 2103 "configparser.c"
   2103     break;
   2104 
   2105   case 69: /* server_option: VAR_LOG_TIME_ISO boolean  */
   2106 #line 492 "configparser.y"
   2107     {
   2108       cfg_parser->opt->log_time_iso = (yyvsp[0].bln);
   2109       log_time_iso = cfg_parser->opt->log_time_iso;
   2110     }
   2111 #line 2112 "configparser.c"
   2112     break;
   2113 
   2114   case 70: /* server_option: VAR_ROUND_ROBIN boolean  */
   2115 #line 497 "configparser.y"
   2116     {
   2117       cfg_parser->opt->round_robin = (yyvsp[0].bln);
   2118       round_robin = cfg_parser->opt->round_robin;
   2119     }
   2120 #line 2121 "configparser.c"
   2121     break;
   2122 
   2123   case 71: /* server_option: VAR_MINIMAL_RESPONSES boolean  */
   2124 #line 502 "configparser.y"
   2125     {
   2126       cfg_parser->opt->minimal_responses = (yyvsp[0].bln);
   2127       minimal_responses = cfg_parser->opt->minimal_responses;
   2128     }
   2129 #line 2130 "configparser.c"
   2130     break;
   2131 
   2132   case 72: /* server_option: VAR_CONFINE_TO_ZONE boolean  */
   2133 #line 507 "configparser.y"
   2134     { cfg_parser->opt->confine_to_zone = (yyvsp[0].bln); }
   2135 #line 2136 "configparser.c"
   2136     break;
   2137 
   2138   case 73: /* server_option: VAR_REFUSE_ANY boolean  */
   2139 #line 509 "configparser.y"
   2140     { cfg_parser->opt->refuse_any = (yyvsp[0].bln); }
   2141 #line 2142 "configparser.c"
   2142     break;
   2143 
   2144   case 74: /* server_option: VAR_TLS_SERVICE_KEY STRING  */
   2145 #line 511 "configparser.y"
   2146     { cfg_parser->opt->tls_service_key = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2147 #line 2148 "configparser.c"
   2148     break;
   2149 
   2150   case 75: /* server_option: VAR_TLS_SERVICE_OCSP STRING  */
   2151 #line 513 "configparser.y"
   2152     { cfg_parser->opt->tls_service_ocsp = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2153 #line 2154 "configparser.c"
   2154     break;
   2155 
   2156   case 76: /* server_option: VAR_TLS_SERVICE_PEM STRING  */
   2157 #line 515 "configparser.y"
   2158     { cfg_parser->opt->tls_service_pem = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2159 #line 2160 "configparser.c"
   2160     break;
   2161 
   2162   case 77: /* server_option: VAR_TLS_PORT number  */
   2163 #line 517 "configparser.y"
   2164     {
   2165       /* port number, stored as string */
   2166       char buf[16];
   2167       (void)snprintf(buf, sizeof(buf), "%lld", (yyvsp[0].llng));
   2168       cfg_parser->opt->tls_port = region_strdup(cfg_parser->opt->region, buf);
   2169     }
   2170 #line 2171 "configparser.c"
   2171     break;
   2172 
   2173   case 78: /* server_option: VAR_TLS_AUTH_PORT number  */
   2174 #line 524 "configparser.y"
   2175     {
   2176       /* port number, stored as string */
   2177       char buf[16];
   2178       (void)snprintf(buf, sizeof(buf), "%lld", (yyvsp[0].llng));
   2179       cfg_parser->opt->tls_auth_port = region_strdup(cfg_parser->opt->region, buf);
   2180     }
   2181 #line 2182 "configparser.c"
   2182     break;
   2183 
   2184   case 79: /* server_option: VAR_TLS_AUTH_XFR_ONLY boolean  */
   2185 #line 531 "configparser.y"
   2186     {
   2187       if (!cfg_parser->opt->tls_auth_port) {
   2188         yyerror("tls-auth-xfr-only set without or before tls-auth-port");
   2189         YYABORT;
   2190       }
   2191       cfg_parser->opt->tls_auth_xfr_only = (yyvsp[0].bln);
   2192     }
   2193 #line 2194 "configparser.c"
   2194     break;
   2195 
   2196   case 80: /* server_option: VAR_TLS_CERT_BUNDLE STRING  */
   2197 #line 539 "configparser.y"
   2198     { cfg_parser->opt->tls_cert_bundle = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2199 #line 2200 "configparser.c"
   2200     break;
   2201 
   2202   case 81: /* server_option: VAR_PROXY_PROTOCOL_PORT number  */
   2203 #line 541 "configparser.y"
   2204     {
   2205       struct proxy_protocol_port_list* elem = region_alloc_zero(
   2206 	cfg_parser->opt->region, sizeof(*elem));
   2207       elem->port = (yyvsp[0].llng);
   2208       elem->next = cfg_parser->opt->proxy_protocol_port;
   2209       cfg_parser->opt->proxy_protocol_port = elem;
   2210     }
   2211 #line 2212 "configparser.c"
   2212     break;
   2213 
   2214   case 82: /* server_option: VAR_ANSWER_COOKIE boolean  */
   2215 #line 549 "configparser.y"
   2216     { cfg_parser->opt->answer_cookie = (yyvsp[0].bln); }
   2217 #line 2218 "configparser.c"
   2218     break;
   2219 
   2220   case 83: /* server_option: VAR_COOKIE_SECRET STRING  */
   2221 #line 551 "configparser.y"
   2222     {
   2223       uint8_t secret[32];
   2224       ssize_t len = hex_pton((yyvsp[0].str), secret, NSD_COOKIE_SECRET_SIZE);
   2225 
   2226       if(len != NSD_COOKIE_SECRET_SIZE) {
   2227         yyerror("expected a 128 bit hex string");
   2228       } else {
   2229         cfg_parser->opt->cookie_secret = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2230       }
   2231     }
   2232 #line 2233 "configparser.c"
   2233     break;
   2234 
   2235   case 84: /* server_option: VAR_COOKIE_STAGING_SECRET STRING  */
   2236 #line 562 "configparser.y"
   2237     {
   2238       uint8_t secret[32];
   2239       ssize_t len = hex_pton((yyvsp[0].str), secret, NSD_COOKIE_SECRET_SIZE);
   2240 
   2241       if(len != NSD_COOKIE_SECRET_SIZE) {
   2242         yyerror("expected a 128 bit hex string");
   2243       } else {
   2244         cfg_parser->opt->cookie_staging_secret = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2245       }
   2246     }
   2247 #line 2248 "configparser.c"
   2248     break;
   2249 
   2250   case 85: /* server_option: VAR_COOKIE_SECRET_FILE STRING  */
   2251 #line 573 "configparser.y"
   2252     {
   2253       /* Empty filename means explicitly disabled cookies from file, internally
   2254        * represented as NULL.
   2255        * Note that after parsing, if no value was configured, then
   2256        * cookie_secret_file_is_default is still 1, then the default cookie
   2257        * secret file value will be assigned to cookie_secret_file.
   2258        */
   2259       if(*(yyvsp[0].str)) cfg_parser->opt->cookie_secret_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2260       cfg_parser->opt->cookie_secret_file_is_default = 0;
   2261     }
   2262 #line 2263 "configparser.c"
   2263     break;
   2264 
   2265   case 86: /* server_option: VAR_XFRD_TCP_MAX number  */
   2266 #line 585 "configparser.y"
   2267     { cfg_parser->opt->xfrd_tcp_max = (int)(yyvsp[0].llng); }
   2268 #line 2269 "configparser.c"
   2269     break;
   2270 
   2271   case 87: /* server_option: VAR_XFRD_TCP_PIPELINE number  */
   2272 #line 587 "configparser.y"
   2273     { cfg_parser->opt->xfrd_tcp_pipeline = (int)(yyvsp[0].llng); }
   2274 #line 2275 "configparser.c"
   2275     break;
   2276 
   2277   case 88: /* server_option: VAR_CPU_AFFINITY cpus  */
   2278 #line 589 "configparser.y"
   2279     {
   2280       cfg_parser->opt->cpu_affinity = (yyvsp[0].cpu);
   2281     }
   2282 #line 2283 "configparser.c"
   2283     break;
   2284 
   2285   case 89: /* server_option: service_cpu_affinity number  */
   2286 #line 593 "configparser.y"
   2287     {
   2288       if((yyvsp[0].llng) < 0) {
   2289         yyerror("expected a non-negative number");
   2290         YYABORT;
   2291       } else {
   2292         struct cpu_map_option *opt, *tail;
   2293 
   2294         opt = cfg_parser->opt->service_cpu_affinity;
   2295         while(opt && opt->service != (yyvsp[-1].llng)) { opt = opt->next; }
   2296 
   2297         if(opt) {
   2298           opt->cpu = (yyvsp[0].llng);
   2299         } else {
   2300           opt = region_alloc_zero(cfg_parser->opt->region, sizeof(*opt));
   2301           opt->service = (int)(yyvsp[-1].llng);
   2302           opt->cpu = (int)(yyvsp[0].llng);
   2303 
   2304           tail = cfg_parser->opt->service_cpu_affinity;
   2305           if(tail) {
   2306             while(tail->next) { tail = tail->next; }
   2307             tail->next = opt;
   2308           } else {
   2309             cfg_parser->opt->service_cpu_affinity = opt;
   2310           }
   2311         }
   2312       }
   2313     }
   2314 #line 2315 "configparser.c"
   2315     break;
   2316 
   2317   case 90: /* server_option: VAR_XDP_INTERFACE STRING  */
   2318 #line 621 "configparser.y"
   2319     {
   2320 #ifdef USE_XDP
   2321       cfg_parser->opt->xdp_interface = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2322 #endif
   2323     }
   2324 #line 2325 "configparser.c"
   2325     break;
   2326 
   2327   case 91: /* server_option: VAR_XDP_PROGRAM_PATH STRING  */
   2328 #line 627 "configparser.y"
   2329     {
   2330 #ifdef USE_XDP
   2331       cfg_parser->opt->xdp_program_path = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2332 #endif
   2333     }
   2334 #line 2335 "configparser.c"
   2335     break;
   2336 
   2337   case 92: /* server_option: VAR_XDP_PROGRAM_LOAD boolean  */
   2338 #line 633 "configparser.y"
   2339     {
   2340 #ifdef USE_XDP
   2341       cfg_parser->opt->xdp_program_load = (yyvsp[0].bln);
   2342 #endif
   2343     }
   2344 #line 2345 "configparser.c"
   2345     break;
   2346 
   2347   case 93: /* server_option: VAR_XDP_BPFFS_PATH STRING  */
   2348 #line 639 "configparser.y"
   2349     {
   2350 #ifdef USE_XDP
   2351       cfg_parser->opt->xdp_bpffs_path = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2352 #endif
   2353 	}
   2354 #line 2355 "configparser.c"
   2355     break;
   2356 
   2357   case 94: /* server_option: VAR_XDP_FORCE_COPY boolean  */
   2358 #line 645 "configparser.y"
   2359     {
   2360 #ifdef USE_XDP
   2361       cfg_parser->opt->xdp_force_copy = (yyvsp[0].bln);
   2362 #endif
   2363     }
   2364 #line 2365 "configparser.c"
   2365     break;
   2366 
   2367   case 95: /* server_option: VAR_METRICS_ENABLE boolean  */
   2368 #line 651 "configparser.y"
   2369     {
   2370 #ifdef USE_METRICS
   2371       cfg_parser->opt->metrics_enable = (yyvsp[0].bln);
   2372 #endif /* USE_METRICS */
   2373     }
   2374 #line 2375 "configparser.c"
   2375     break;
   2376 
   2377   case 96: /* server_option: VAR_METRICS_INTERFACE ip_address  */
   2378 #line 657 "configparser.y"
   2379     {
   2380 #ifdef USE_METRICS
   2381       struct ip_address_option *ip = cfg_parser->opt->metrics_interface;
   2382       if(ip == NULL) {
   2383         cfg_parser->opt->metrics_interface = (yyvsp[0].ip);
   2384       } else {
   2385         while(ip->next != NULL) { ip = ip->next; }
   2386         ip->next = (yyvsp[0].ip);
   2387       }
   2388 #endif /* USE_METRICS */
   2389     }
   2390 #line 2391 "configparser.c"
   2391     break;
   2392 
   2393   case 97: /* server_option: VAR_METRICS_PORT number  */
   2394 #line 669 "configparser.y"
   2395     {
   2396 #ifdef USE_METRICS
   2397       if((yyvsp[0].llng) == 0) {
   2398         yyerror("metrics port number expected");
   2399       } else {
   2400         cfg_parser->opt->metrics_port = (int)(yyvsp[0].llng);
   2401       }
   2402 #endif /* USE_METRICS */
   2403     }
   2404 #line 2405 "configparser.c"
   2405     break;
   2406 
   2407   case 98: /* server_option: VAR_METRICS_PATH STRING  */
   2408 #line 679 "configparser.y"
   2409     {
   2410 #ifdef USE_METRICS
   2411       cfg_parser->opt->metrics_path = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2412 #endif /* USE_METRICS */
   2413     }
   2414 #line 2415 "configparser.c"
   2415     break;
   2416 
   2417   case 101: /* socket_option: VAR_SERVERS STRING  */
   2418 #line 691 "configparser.y"
   2419     {
   2420       char *tok, *ptr, *str;
   2421       struct range_option *servers = NULL;
   2422       long long first, last;
   2423 
   2424       /* user may specify "0 1", "0" "1", 0 1 or a combination thereof */
   2425       for(str = (yyvsp[0].str); (tok = strtok_r(str, " \t", &ptr)); str = NULL) {
   2426         struct range_option *opt =
   2427           region_alloc(cfg_parser->opt->region, sizeof(*opt));
   2428         first = last = 0;
   2429         if(!parse_range(tok, &first, &last)) {
   2430           yyerror("invalid server range '%s'", tok);
   2431           YYABORT;
   2432         }
   2433         assert(first >= 0);
   2434         assert(last >= 0);
   2435         opt->next = NULL;
   2436         opt->first = (int)first;
   2437         opt->last = (int)last;
   2438         if(servers) {
   2439           servers = servers->next = opt;
   2440         } else {
   2441           servers = cfg_parser->ip->servers = opt;
   2442         }
   2443       }
   2444     }
   2445 #line 2446 "configparser.c"
   2446     break;
   2447 
   2448   case 102: /* socket_option: VAR_BINDTODEVICE boolean  */
   2449 #line 718 "configparser.y"
   2450     { cfg_parser->ip->dev = (yyvsp[0].bln); }
   2451 #line 2452 "configparser.c"
   2452     break;
   2453 
   2454   case 103: /* socket_option: VAR_SETFIB number  */
   2455 #line 720 "configparser.y"
   2456     { cfg_parser->ip->fib = (yyvsp[0].llng); }
   2457 #line 2458 "configparser.c"
   2458     break;
   2459 
   2460   case 104: /* cpus: %empty  */
   2461 #line 724 "configparser.y"
   2462     { (yyval.cpu) = NULL; }
   2463 #line 2464 "configparser.c"
   2464     break;
   2465 
   2466   case 105: /* cpus: cpus STRING  */
   2467 #line 726 "configparser.y"
   2468     {
   2469       char *tok, *ptr, *str;
   2470       struct cpu_option *tail;
   2471       long long cpu;
   2472 
   2473       str = (yyvsp[0].str);
   2474       (yyval.cpu) = tail = (yyvsp[-1].cpu);
   2475       if(tail) {
   2476         while(tail->next) { tail = tail->next; }
   2477       }
   2478 
   2479       /* Users may specify "0 1", "0" "1", 0 1 or a combination thereof. */
   2480       for(str = (yyvsp[0].str); (tok = strtok_r(str, " \t", &ptr)); str = NULL) {
   2481         struct cpu_option *opt =
   2482           region_alloc_zero(cfg_parser->opt->region, sizeof(*opt));
   2483         cpu = 0;
   2484         if(!parse_number(tok, &cpu) || cpu < 0) {
   2485           yyerror("expected a positive number");
   2486           YYABORT;
   2487         }
   2488         assert(cpu >=0);
   2489         opt->cpu = (int)cpu;
   2490         if(tail) {
   2491           tail->next = opt;
   2492           tail = opt;
   2493         } else {
   2494           (yyval.cpu) = tail = opt;
   2495         }
   2496       }
   2497     }
   2498 #line 2499 "configparser.c"
   2499     break;
   2500 
   2501   case 106: /* service_cpu_affinity: VAR_XFRD_CPU_AFFINITY  */
   2502 #line 760 "configparser.y"
   2503     { (yyval.llng) = -1; }
   2504 #line 2505 "configparser.c"
   2505     break;
   2506 
   2507   case 107: /* service_cpu_affinity: VAR_SERVER_CPU_AFFINITY  */
   2508 #line 762 "configparser.y"
   2509     {
   2510       if((yyvsp[0].llng) <= 0) {
   2511         yyerror("invalid server identifier");
   2512         YYABORT;
   2513       }
   2514       (yyval.llng) = (yyvsp[0].llng);
   2515     }
   2516 #line 2517 "configparser.c"
   2517     break;
   2518 
   2519   case 111: /* dnstap_option: VAR_DNSTAP_ENABLE boolean  */
   2520 #line 779 "configparser.y"
   2521     { cfg_parser->opt->dnstap_enable = (yyvsp[0].bln); }
   2522 #line 2523 "configparser.c"
   2523     break;
   2524 
   2525   case 112: /* dnstap_option: VAR_DNSTAP_SOCKET_PATH STRING  */
   2526 #line 781 "configparser.y"
   2527     { cfg_parser->opt->dnstap_socket_path = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2528 #line 2529 "configparser.c"
   2529     break;
   2530 
   2531   case 113: /* dnstap_option: VAR_DNSTAP_IP STRING  */
   2532 #line 783 "configparser.y"
   2533     { cfg_parser->opt->dnstap_ip = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2534 #line 2535 "configparser.c"
   2535     break;
   2536 
   2537   case 114: /* dnstap_option: VAR_DNSTAP_TLS boolean  */
   2538 #line 785 "configparser.y"
   2539     { cfg_parser->opt->dnstap_tls = (yyvsp[0].bln); }
   2540 #line 2541 "configparser.c"
   2541     break;
   2542 
   2543   case 115: /* dnstap_option: VAR_DNSTAP_TLS_SERVER_NAME STRING  */
   2544 #line 787 "configparser.y"
   2545     { cfg_parser->opt->dnstap_tls_server_name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2546 #line 2547 "configparser.c"
   2547     break;
   2548 
   2549   case 116: /* dnstap_option: VAR_DNSTAP_TLS_CERT_BUNDLE STRING  */
   2550 #line 789 "configparser.y"
   2551     { cfg_parser->opt->dnstap_tls_cert_bundle = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2552 #line 2553 "configparser.c"
   2553     break;
   2554 
   2555   case 117: /* dnstap_option: VAR_DNSTAP_TLS_CLIENT_KEY_FILE STRING  */
   2556 #line 791 "configparser.y"
   2557     { cfg_parser->opt->dnstap_tls_client_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2558 #line 2559 "configparser.c"
   2559     break;
   2560 
   2561   case 118: /* dnstap_option: VAR_DNSTAP_TLS_CLIENT_CERT_FILE STRING  */
   2562 #line 793 "configparser.y"
   2563     { cfg_parser->opt->dnstap_tls_client_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2564 #line 2565 "configparser.c"
   2565     break;
   2566 
   2567   case 119: /* dnstap_option: VAR_DNSTAP_SEND_IDENTITY boolean  */
   2568 #line 795 "configparser.y"
   2569     { cfg_parser->opt->dnstap_send_identity = (yyvsp[0].bln); }
   2570 #line 2571 "configparser.c"
   2571     break;
   2572 
   2573   case 120: /* dnstap_option: VAR_DNSTAP_SEND_VERSION boolean  */
   2574 #line 797 "configparser.y"
   2575     { cfg_parser->opt->dnstap_send_version = (yyvsp[0].bln); }
   2576 #line 2577 "configparser.c"
   2577     break;
   2578 
   2579   case 121: /* dnstap_option: VAR_DNSTAP_IDENTITY STRING  */
   2580 #line 799 "configparser.y"
   2581     { cfg_parser->opt->dnstap_identity = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2582 #line 2583 "configparser.c"
   2583     break;
   2584 
   2585   case 122: /* dnstap_option: VAR_DNSTAP_VERSION STRING  */
   2586 #line 801 "configparser.y"
   2587     { cfg_parser->opt->dnstap_version = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2588 #line 2589 "configparser.c"
   2589     break;
   2590 
   2591   case 123: /* dnstap_option: VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES boolean  */
   2592 #line 803 "configparser.y"
   2593     { cfg_parser->opt->dnstap_log_auth_query_messages = (yyvsp[0].bln); }
   2594 #line 2595 "configparser.c"
   2595     break;
   2596 
   2597   case 124: /* dnstap_option: VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES boolean  */
   2598 #line 805 "configparser.y"
   2599     { cfg_parser->opt->dnstap_log_auth_response_messages = (yyvsp[0].bln); }
   2600 #line 2601 "configparser.c"
   2601     break;
   2602 
   2603   case 128: /* remote_control_option: VAR_CONTROL_ENABLE boolean  */
   2604 #line 816 "configparser.y"
   2605     { cfg_parser->opt->control_enable = (yyvsp[0].bln); }
   2606 #line 2607 "configparser.c"
   2607     break;
   2608 
   2609   case 129: /* remote_control_option: VAR_CONTROL_INTERFACE ip_address  */
   2610 #line 818 "configparser.y"
   2611     {
   2612       struct ip_address_option *ip = cfg_parser->opt->control_interface;
   2613       if(ip == NULL) {
   2614         cfg_parser->opt->control_interface = (yyvsp[0].ip);
   2615       } else {
   2616         while(ip->next != NULL) { ip = ip->next; }
   2617         ip->next = (yyvsp[0].ip);
   2618       }
   2619     }
   2620 #line 2621 "configparser.c"
   2621     break;
   2622 
   2623   case 130: /* remote_control_option: VAR_CONTROL_PORT number  */
   2624 #line 828 "configparser.y"
   2625     {
   2626       if((yyvsp[0].llng) == 0) {
   2627         yyerror("control port number expected");
   2628       } else {
   2629         cfg_parser->opt->control_port = (int)(yyvsp[0].llng);
   2630       }
   2631     }
   2632 #line 2633 "configparser.c"
   2633     break;
   2634 
   2635   case 131: /* remote_control_option: VAR_SERVER_KEY_FILE STRING  */
   2636 #line 836 "configparser.y"
   2637     { cfg_parser->opt->server_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2638 #line 2639 "configparser.c"
   2639     break;
   2640 
   2641   case 132: /* remote_control_option: VAR_SERVER_CERT_FILE STRING  */
   2642 #line 838 "configparser.y"
   2643     { cfg_parser->opt->server_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2644 #line 2645 "configparser.c"
   2645     break;
   2646 
   2647   case 133: /* remote_control_option: VAR_CONTROL_KEY_FILE STRING  */
   2648 #line 840 "configparser.y"
   2649     { cfg_parser->opt->control_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2650 #line 2651 "configparser.c"
   2651     break;
   2652 
   2653   case 134: /* remote_control_option: VAR_CONTROL_CERT_FILE STRING  */
   2654 #line 842 "configparser.y"
   2655     { cfg_parser->opt->control_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2656 #line 2657 "configparser.c"
   2657     break;
   2658 
   2659   case 135: /* $@2: %empty  */
   2660 #line 847 "configparser.y"
   2661       {
   2662         tls_auth_options_type *tls_auth = tls_auth_options_create(cfg_parser->opt->region);
   2663         assert(cfg_parser->tls_auth == NULL);
   2664         cfg_parser->tls_auth = tls_auth;
   2665       }
   2666 #line 2667 "configparser.c"
   2667     break;
   2668 
   2669   case 136: /* tls_auth: VAR_TLS_AUTH $@2 tls_auth_block  */
   2670 #line 853 "configparser.y"
   2671     {
   2672       struct tls_auth_options *tls_auth = cfg_parser->tls_auth;
   2673       if(tls_auth->name == NULL) {
   2674         yyerror("tls-auth has no name");
   2675       } else if(tls_auth->auth_domain_name == NULL) {
   2676         yyerror("tls-auth %s has no auth-domain-name", tls_auth->name);
   2677       } else if(tls_auth_options_find(cfg_parser->opt, tls_auth->name)) {
   2678         yyerror("duplicate tls-auth %s", tls_auth->name);
   2679       } else {
   2680       	tls_auth_options_insert(cfg_parser->opt, tls_auth);
   2681         cfg_parser->tls_auth = NULL;
   2682       }
   2683     }
   2684 #line 2685 "configparser.c"
   2685     break;
   2686 
   2687   case 139: /* tls_auth_option: VAR_NAME STRING  */
   2688 #line 872 "configparser.y"
   2689     {
   2690       dname_type *dname;
   2691       dname = (dname_type *)dname_parse(cfg_parser->opt->region, (yyvsp[0].str));
   2692       cfg_parser->tls_auth->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2693       if(dname == NULL) {
   2694         yyerror("bad tls-auth name %s", (yyvsp[0].str));
   2695       } else {
   2696         region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname));
   2697       }
   2698     }
   2699 #line 2700 "configparser.c"
   2700     break;
   2701 
   2702   case 140: /* tls_auth_option: VAR_TLS_AUTH_DOMAIN_NAME STRING  */
   2703 #line 883 "configparser.y"
   2704     {
   2705       cfg_parser->tls_auth->auth_domain_name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2706     }
   2707 #line 2708 "configparser.c"
   2708     break;
   2709 
   2710   case 141: /* tls_auth_option: VAR_TLS_AUTH_CLIENT_CERT STRING  */
   2711 #line 887 "configparser.y"
   2712     {
   2713 	    cfg_parser->tls_auth->client_cert = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2714     }
   2715 #line 2716 "configparser.c"
   2716     break;
   2717 
   2718   case 142: /* tls_auth_option: VAR_TLS_AUTH_CLIENT_KEY STRING  */
   2719 #line 891 "configparser.y"
   2720     {
   2721 	    cfg_parser->tls_auth->client_key = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2722     }
   2723 #line 2724 "configparser.c"
   2724     break;
   2725 
   2726   case 143: /* tls_auth_option: VAR_TLS_AUTH_CLIENT_KEY_PW STRING  */
   2727 #line 895 "configparser.y"
   2728     {
   2729 	    cfg_parser->tls_auth->client_key_pw = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2730     }
   2731 #line 2732 "configparser.c"
   2732     break;
   2733 
   2734   case 144: /* $@3: %empty  */
   2735 #line 902 "configparser.y"
   2736       {
   2737         key_options_type *key = key_options_create(cfg_parser->opt->region);
   2738         key->algorithm = region_strdup(cfg_parser->opt->region, "sha256");
   2739         assert(cfg_parser->key == NULL);
   2740         cfg_parser->key = key;
   2741       }
   2742 #line 2743 "configparser.c"
   2743     break;
   2744 
   2745   case 145: /* key: VAR_KEY $@3 key_block  */
   2746 #line 909 "configparser.y"
   2747     {
   2748       struct key_options *key = cfg_parser->key;
   2749       if(key->name == NULL) {
   2750         yyerror("tsig key has no name");
   2751       } else if(key->algorithm == NULL) {
   2752         yyerror("tsig key %s has no algorithm", key->name);
   2753       } else if(key->secret == NULL) {
   2754         yyerror("tsig key %s has no secret blob", key->name);
   2755       } else if(key_options_find(cfg_parser->opt, key->name)) {
   2756         yyerror("duplicate tsig key %s", key->name);
   2757       } else {
   2758         key_options_insert(cfg_parser->opt, key);
   2759         cfg_parser->key = NULL;
   2760       }
   2761     }
   2762 #line 2763 "configparser.c"
   2763     break;
   2764 
   2765   case 148: /* key_option: VAR_NAME STRING  */
   2766 #line 930 "configparser.y"
   2767     {
   2768       dname_type *dname;
   2769 
   2770       dname = (dname_type *)dname_parse(cfg_parser->opt->region, (yyvsp[0].str));
   2771       cfg_parser->key->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2772       if(dname == NULL) {
   2773         yyerror("bad tsig key name %s", (yyvsp[0].str));
   2774       } else {
   2775         region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname));
   2776       }
   2777     }
   2778 #line 2779 "configparser.c"
   2779     break;
   2780 
   2781   case 149: /* key_option: VAR_ALGORITHM STRING  */
   2782 #line 942 "configparser.y"
   2783     {
   2784       if(tsig_get_algorithm_by_name((yyvsp[0].str)) == NULL) {
   2785         yyerror("bad tsig key algorithm %s", (yyvsp[0].str));
   2786       } else {
   2787         cfg_parser->key->algorithm = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2788       }
   2789     }
   2790 #line 2791 "configparser.c"
   2791     break;
   2792 
   2793   case 150: /* key_option: VAR_SECRET STRING  */
   2794 #line 950 "configparser.y"
   2795     {
   2796       uint8_t data[16384];
   2797       int size;
   2798 
   2799       cfg_parser->key->secret = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2800       size = b64_pton((yyvsp[0].str), data, sizeof(data));
   2801       if(size == -1) {
   2802         yyerror("cannot base64 decode tsig secret %s",
   2803           cfg_parser->key->name?
   2804           cfg_parser->key->name:"");
   2805       } else if(size != 0) {
   2806         memset(data, 0xdd, size); /* wipe secret */
   2807       }
   2808     }
   2809 #line 2810 "configparser.c"
   2810     break;
   2811 
   2812   case 151: /* $@4: %empty  */
   2813 #line 968 "configparser.y"
   2814       {
   2815         assert(cfg_parser->pattern == NULL);
   2816         assert(cfg_parser->zone == NULL);
   2817         cfg_parser->zone = zone_options_create(cfg_parser->opt->region);
   2818         cfg_parser->zone->part_of_config = 1;
   2819         cfg_parser->zone->pattern = cfg_parser->pattern =
   2820           pattern_options_create(cfg_parser->opt->region);
   2821         cfg_parser->zone->pattern->implicit = 1;
   2822       }
   2823 #line 2824 "configparser.c"
   2824     break;
   2825 
   2826   case 152: /* zone: VAR_ZONE $@4 zone_block  */
   2827 #line 978 "configparser.y"
   2828     {
   2829       assert(cfg_parser->zone != NULL);
   2830       if(cfg_parser->zone->name == NULL) {
   2831         yyerror("zone has no name");
   2832       } else if(!nsd_options_insert_zone(cfg_parser->opt, cfg_parser->zone)) {
   2833         yyerror("duplicate zone %s", cfg_parser->zone->name);
   2834       } else if(!nsd_options_insert_pattern(cfg_parser->opt, cfg_parser->zone->pattern)) {
   2835         yyerror("duplicate pattern %s", cfg_parser->zone->pattern->pname);
   2836       }
   2837       cfg_parser->pattern = NULL;
   2838       cfg_parser->zone = NULL;
   2839     }
   2840 #line 2841 "configparser.c"
   2841     break;
   2842 
   2843   case 155: /* zone_option: VAR_NAME STRING  */
   2844 #line 996 "configparser.y"
   2845     {
   2846       const char *marker = PATTERN_IMPLICIT_MARKER;
   2847       char *pname = region_alloc(cfg_parser->opt->region, strlen((yyvsp[0].str)) + strlen(marker) + 1);
   2848       memmove(pname, marker, strlen(marker));
   2849       memmove(pname + strlen(marker), (yyvsp[0].str), strlen((yyvsp[0].str)) + 1);
   2850       cfg_parser->zone->pattern->pname = pname;
   2851       cfg_parser->zone->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2852       if(pattern_options_find(cfg_parser->opt, pname)) {
   2853         yyerror("zone %s cannot be created because implicit pattern %s "
   2854                     "already exists", (yyvsp[0].str), pname);
   2855       }
   2856     }
   2857 #line 2858 "configparser.c"
   2858     break;
   2859 
   2860   case 157: /* $@5: %empty  */
   2861 #line 1012 "configparser.y"
   2862       {
   2863         assert(cfg_parser->pattern == NULL);
   2864         cfg_parser->pattern = pattern_options_create(cfg_parser->opt->region);
   2865       }
   2866 #line 2867 "configparser.c"
   2867     break;
   2868 
   2869   case 158: /* pattern: VAR_PATTERN $@5 pattern_block  */
   2870 #line 1017 "configparser.y"
   2871     {
   2872       pattern_options_type *pattern = cfg_parser->pattern;
   2873       if(pattern->pname == NULL) {
   2874         yyerror("pattern has no name");
   2875       } else if(!nsd_options_insert_pattern(cfg_parser->opt, pattern)) {
   2876         yyerror("duplicate pattern %s", pattern->pname);
   2877       }
   2878       cfg_parser->pattern = NULL;
   2879     }
   2880 #line 2881 "configparser.c"
   2881     break;
   2882 
   2883   case 161: /* pattern_option: VAR_NAME STRING  */
   2884 #line 1032 "configparser.y"
   2885     {
   2886       if(strchr((yyvsp[0].str), ' ')) {
   2887         yyerror("space is not allowed in pattern name: '%s'", (yyvsp[0].str));
   2888       }
   2889       cfg_parser->pattern->pname = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   2890     }
   2891 #line 2892 "configparser.c"
   2892     break;
   2893 
   2894   case 163: /* pattern_or_zone_option: VAR_RRL_WHITELIST STRING  */
   2895 #line 1042 "configparser.y"
   2896     {
   2897 #ifdef RATELIMIT
   2898       cfg_parser->pattern->rrl_whitelist |= rrlstr2type((yyvsp[0].str));
   2899 #endif
   2900     }
   2901 #line 2902 "configparser.c"
   2902     break;
   2903 
   2904   case 164: /* pattern_or_zone_option: VAR_ZONEFILE STRING  */
   2905 #line 1048 "configparser.y"
   2906     { cfg_parser->pattern->zonefile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2907 #line 2908 "configparser.c"
   2908     break;
   2909 
   2910   case 165: /* pattern_or_zone_option: VAR_ZONESTATS STRING  */
   2911 #line 1050 "configparser.y"
   2912     { cfg_parser->pattern->zonestats = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); }
   2913 #line 2914 "configparser.c"
   2914     break;
   2915 
   2916   case 166: /* pattern_or_zone_option: VAR_SIZE_LIMIT_XFR number  */
   2917 #line 1052 "configparser.y"
   2918     {
   2919       if((yyvsp[0].llng) > 0) {
   2920         cfg_parser->pattern->size_limit_xfr = (int)(yyvsp[0].llng);
   2921       } else {
   2922         yyerror("expected a number greater than zero");
   2923       }
   2924     }
   2925 #line 2926 "configparser.c"
   2926     break;
   2927 
   2928   case 167: /* pattern_or_zone_option: VAR_MULTI_PRIMARY_CHECK boolean  */
   2929 #line 1060 "configparser.y"
   2930     { cfg_parser->pattern->multi_primary_check = (int)(yyvsp[0].bln); }
   2931 #line 2932 "configparser.c"
   2932     break;
   2933 
   2934   case 168: /* pattern_or_zone_option: VAR_INCLUDE_PATTERN STRING  */
   2935 #line 1062 "configparser.y"
   2936     { config_apply_pattern(cfg_parser->pattern, (yyvsp[0].str)); }
   2937 #line 2938 "configparser.c"
   2938     break;
   2939 
   2940   case 169: /* $@6: %empty  */
   2941 #line 1064 "configparser.y"
   2942     {
   2943       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   2944       if(cfg_parser->pattern->catalog_role == CATALOG_ROLE_PRODUCER)
   2945         yyerror("catalog producer zones cannot be secondary zones");
   2946       if(acl->blocked)
   2947         yyerror("blocked address used for request-xfr");
   2948       if(acl->rangetype != acl_range_single)
   2949         yyerror("address range used for request-xfr");
   2950       append_acl(&cfg_parser->pattern->request_xfr, acl);
   2951     }
   2952 #line 2953 "configparser.c"
   2953     break;
   2954 
   2955   case 170: /* pattern_or_zone_option: VAR_REQUEST_XFR STRING STRING $@6 request_xfr_tlsauth_option  */
   2956 #line 1075 "configparser.y"
   2957         { }
   2958 #line 2959 "configparser.c"
   2959     break;
   2960 
   2961   case 171: /* $@7: %empty  */
   2962 #line 1077 "configparser.y"
   2963     {
   2964       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   2965       acl->use_axfr_only = 1;
   2966       if(acl->blocked)
   2967         yyerror("blocked address used for request-xfr");
   2968       if(acl->rangetype != acl_range_single)
   2969         yyerror("address range used for request-xfr");
   2970       append_acl(&cfg_parser->pattern->request_xfr, acl);
   2971     }
   2972 #line 2973 "configparser.c"
   2973     break;
   2974 
   2975   case 172: /* pattern_or_zone_option: VAR_REQUEST_XFR VAR_AXFR STRING STRING $@7 request_xfr_tlsauth_option  */
   2976 #line 1087 "configparser.y"
   2977         { }
   2978 #line 2979 "configparser.c"
   2979     break;
   2980 
   2981   case 173: /* pattern_or_zone_option: VAR_REQUEST_XFR VAR_UDP STRING STRING  */
   2982 #line 1089 "configparser.y"
   2983     {
   2984       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   2985       acl->allow_udp = 1;
   2986       if(acl->blocked)
   2987         yyerror("blocked address used for request-xfr");
   2988       if(acl->rangetype != acl_range_single)
   2989         yyerror("address range used for request-xfr");
   2990       append_acl(&cfg_parser->pattern->request_xfr, acl);
   2991     }
   2992 #line 2993 "configparser.c"
   2993     break;
   2994 
   2995   case 174: /* pattern_or_zone_option: VAR_ALLOW_NOTIFY STRING STRING  */
   2996 #line 1099 "configparser.y"
   2997     {
   2998       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   2999       append_acl(&cfg_parser->pattern->allow_notify, acl);
   3000     }
   3001 #line 3002 "configparser.c"
   3002     break;
   3003 
   3004   case 175: /* pattern_or_zone_option: VAR_NOTIFY STRING STRING  */
   3005 #line 1104 "configparser.y"
   3006     {
   3007       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   3008       if(acl->blocked)
   3009         yyerror("blocked address used for notify");
   3010       if(acl->rangetype != acl_range_single)
   3011         yyerror("address range used for notify");
   3012       append_acl(&cfg_parser->pattern->notify, acl);
   3013     }
   3014 #line 3015 "configparser.c"
   3015     break;
   3016 
   3017   case 176: /* $@8: %empty  */
   3018 #line 1113 "configparser.y"
   3019     {
   3020       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   3021       append_acl(&cfg_parser->pattern->provide_xfr, acl);
   3022     }
   3023 #line 3024 "configparser.c"
   3024     break;
   3025 
   3026   case 177: /* pattern_or_zone_option: VAR_PROVIDE_XFR STRING STRING $@8 provide_xfr_tlsauth_option  */
   3027 #line 1118 "configparser.y"
   3028         { }
   3029 #line 3030 "configparser.c"
   3030     break;
   3031 
   3032   case 178: /* pattern_or_zone_option: VAR_ALLOW_QUERY STRING STRING  */
   3033 #line 1120 "configparser.y"
   3034     {
   3035       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
   3036       append_acl(&cfg_parser->pattern->allow_query, acl);
   3037     }
   3038 #line 3039 "configparser.c"
   3039     break;
   3040 
   3041   case 179: /* pattern_or_zone_option: VAR_OUTGOING_INTERFACE STRING  */
   3042 #line 1125 "configparser.y"
   3043     {
   3044       acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[0].str), "NOKEY");
   3045       append_acl(&cfg_parser->pattern->outgoing_interface, acl);
   3046     }
   3047 #line 3048 "configparser.c"
   3048     break;
   3049 
   3050   case 180: /* pattern_or_zone_option: VAR_ALLOW_AXFR_FALLBACK boolean  */
   3051 #line 1130 "configparser.y"
   3052     {
   3053       cfg_parser->pattern->allow_axfr_fallback = (yyvsp[0].bln);
   3054       cfg_parser->pattern->allow_axfr_fallback_is_default = 0;
   3055     }
   3056 #line 3057 "configparser.c"
   3057     break;
   3058 
   3059   case 181: /* pattern_or_zone_option: VAR_NOTIFY_RETRY number  */
   3060 #line 1135 "configparser.y"
   3061     {
   3062       cfg_parser->pattern->notify_retry = (yyvsp[0].llng);
   3063       cfg_parser->pattern->notify_retry_is_default = 0;
   3064     }
   3065 #line 3066 "configparser.c"
   3066     break;
   3067 
   3068   case 182: /* pattern_or_zone_option: VAR_MAX_REFRESH_TIME number  */
   3069 #line 1140 "configparser.y"
   3070     {
   3071       cfg_parser->pattern->max_refresh_time = (yyvsp[0].llng);
   3072       cfg_parser->pattern->max_refresh_time_is_default = 0;
   3073     }
   3074 #line 3075 "configparser.c"
   3075     break;
   3076 
   3077   case 183: /* pattern_or_zone_option: VAR_MIN_REFRESH_TIME number  */
   3078 #line 1145 "configparser.y"
   3079     {
   3080       cfg_parser->pattern->min_refresh_time = (yyvsp[0].llng);
   3081       cfg_parser->pattern->min_refresh_time_is_default = 0;
   3082     }
   3083 #line 3084 "configparser.c"
   3084     break;
   3085 
   3086   case 184: /* pattern_or_zone_option: VAR_MAX_RETRY_TIME number  */
   3087 #line 1150 "configparser.y"
   3088     {
   3089       cfg_parser->pattern->max_retry_time = (yyvsp[0].llng);
   3090       cfg_parser->pattern->max_retry_time_is_default = 0;
   3091     }
   3092 #line 3093 "configparser.c"
   3093     break;
   3094 
   3095   case 185: /* pattern_or_zone_option: VAR_MIN_RETRY_TIME number  */
   3096 #line 1155 "configparser.y"
   3097     {
   3098       cfg_parser->pattern->min_retry_time = (yyvsp[0].llng);
   3099       cfg_parser->pattern->min_retry_time_is_default = 0;
   3100     }
   3101 #line 3102 "configparser.c"
   3102     break;
   3103 
   3104   case 186: /* pattern_or_zone_option: VAR_MIN_EXPIRE_TIME STRING  */
   3105 #line 1160 "configparser.y"
   3106     {
   3107       long long num;
   3108       uint8_t expr;
   3109 
   3110       if (!parse_expire_expr((yyvsp[0].str), &num, &expr)) {
   3111         yyerror("expected an expire time in seconds or \"refresh+retry+1\"");
   3112         YYABORT; /* trigger a parser error */
   3113       }
   3114       cfg_parser->pattern->min_expire_time = num;
   3115       cfg_parser->pattern->min_expire_time_expr = expr;
   3116     }
   3117 #line 3118 "configparser.c"
   3118     break;
   3119 
   3120   case 187: /* pattern_or_zone_option: VAR_STORE_IXFR boolean  */
   3121 #line 1172 "configparser.y"
   3122     {
   3123       cfg_parser->pattern->store_ixfr = (yyvsp[0].bln);
   3124       cfg_parser->pattern->store_ixfr_is_default = 0;
   3125     }
   3126 #line 3127 "configparser.c"
   3127     break;
   3128 
   3129   case 188: /* pattern_or_zone_option: VAR_IXFR_SIZE number  */
   3130 #line 1177 "configparser.y"
   3131     {
   3132       cfg_parser->pattern->ixfr_size = (yyvsp[0].llng);
   3133       cfg_parser->pattern->ixfr_size_is_default = 0;
   3134     }
   3135 #line 3136 "configparser.c"
   3136     break;
   3137 
   3138   case 189: /* pattern_or_zone_option: VAR_IXFR_NUMBER number  */
   3139 #line 1182 "configparser.y"
   3140     {
   3141       cfg_parser->pattern->ixfr_number = (yyvsp[0].llng);
   3142       cfg_parser->pattern->ixfr_number_is_default = 0;
   3143     }
   3144 #line 3145 "configparser.c"
   3145     break;
   3146 
   3147   case 190: /* pattern_or_zone_option: VAR_CREATE_IXFR boolean  */
   3148 #line 1187 "configparser.y"
   3149     {
   3150       cfg_parser->pattern->create_ixfr = (yyvsp[0].bln);
   3151       cfg_parser->pattern->create_ixfr_is_default = 0;
   3152     }
   3153 #line 3154 "configparser.c"
   3154     break;
   3155 
   3156   case 191: /* pattern_or_zone_option: VAR_VERIFY_ZONE boolean  */
   3157 #line 1192 "configparser.y"
   3158     { cfg_parser->pattern->verify_zone = (yyvsp[0].bln); }
   3159 #line 3160 "configparser.c"
   3160     break;
   3161 
   3162   case 192: /* pattern_or_zone_option: VAR_VERIFIER command  */
   3163 #line 1194 "configparser.y"
   3164     { cfg_parser->pattern->verifier = (yyvsp[0].strv); }
   3165 #line 3166 "configparser.c"
   3166     break;
   3167 
   3168   case 193: /* pattern_or_zone_option: VAR_VERIFIER_FEED_ZONE boolean  */
   3169 #line 1196 "configparser.y"
   3170     { cfg_parser->pattern->verifier_feed_zone = (yyvsp[0].bln); }
   3171 #line 3172 "configparser.c"
   3172     break;
   3173 
   3174   case 194: /* pattern_or_zone_option: VAR_VERIFIER_TIMEOUT number  */
   3175 #line 1198 "configparser.y"
   3176     { cfg_parser->pattern->verifier_timeout = (yyvsp[0].llng); }
   3177 #line 3178 "configparser.c"
   3178     break;
   3179 
   3180   case 195: /* pattern_or_zone_option: VAR_CATALOG catalog_role  */
   3181 #line 1200 "configparser.y"
   3182     {
   3183       if((yyvsp[0].role) == CATALOG_ROLE_PRODUCER && cfg_parser->pattern->request_xfr)
   3184         yyerror("catalog producer zones cannot be secondary zones");
   3185       cfg_parser->pattern->catalog_role = (yyvsp[0].role);
   3186       cfg_parser->pattern->catalog_role_is_default = 0;
   3187     }
   3188 #line 3189 "configparser.c"
   3189     break;
   3190 
   3191   case 196: /* pattern_or_zone_option: VAR_CATALOG_MEMBER_PATTERN STRING  */
   3192 #line 1207 "configparser.y"
   3193     {
   3194       cfg_parser->pattern->catalog_member_pattern = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   3195     }
   3196 #line 3197 "configparser.c"
   3197     break;
   3198 
   3199   case 197: /* pattern_or_zone_option: VAR_CATALOG_PRODUCER_ZONE STRING  */
   3200 #line 1211 "configparser.y"
   3201     {
   3202       dname_type *dname;
   3203 
   3204       if(cfg_parser->zone) {
   3205         yyerror("catalog-producer-zone option is for patterns only and cannot "
   3206                 "be used in a zone clause");
   3207       } else if(!(dname = (dname_type *)dname_parse(cfg_parser->opt->region, (yyvsp[0].str)))) {
   3208         yyerror("bad catalog producer name %s", (yyvsp[0].str));
   3209       } else {
   3210         region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname));
   3211         cfg_parser->pattern->catalog_producer_zone = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   3212       }
   3213     }
   3214 #line 3215 "configparser.c"
   3215     break;
   3216 
   3217   case 201: /* verify_option: VAR_ENABLE boolean  */
   3218 #line 1233 "configparser.y"
   3219     { cfg_parser->opt->verify_enable = (yyvsp[0].bln); }
   3220 #line 3221 "configparser.c"
   3221     break;
   3222 
   3223   case 202: /* verify_option: VAR_IP_ADDRESS ip_address  */
   3224 #line 1235 "configparser.y"
   3225     {
   3226       struct ip_address_option *ip = cfg_parser->opt->verify_ip_addresses;
   3227       if(!ip) {
   3228         cfg_parser->opt->verify_ip_addresses = (yyvsp[0].ip);
   3229       } else {
   3230         while(ip->next) { ip = ip->next; }
   3231         ip->next = (yyvsp[0].ip);
   3232       }
   3233     }
   3234 #line 3235 "configparser.c"
   3235     break;
   3236 
   3237   case 203: /* verify_option: VAR_PORT number  */
   3238 #line 1245 "configparser.y"
   3239     {
   3240       /* port number, stored as a string */
   3241       char buf[16];
   3242       (void)snprintf(buf, sizeof(buf), "%lld", (yyvsp[0].llng));
   3243       cfg_parser->opt->verify_port = region_strdup(cfg_parser->opt->region, buf);
   3244     }
   3245 #line 3246 "configparser.c"
   3246     break;
   3247 
   3248   case 204: /* verify_option: VAR_VERIFY_ZONES boolean  */
   3249 #line 1252 "configparser.y"
   3250     { cfg_parser->opt->verify_zones = (yyvsp[0].bln); }
   3251 #line 3252 "configparser.c"
   3252     break;
   3253 
   3254   case 205: /* verify_option: VAR_VERIFIER command  */
   3255 #line 1254 "configparser.y"
   3256     { cfg_parser->opt->verifier = (yyvsp[0].strv); }
   3257 #line 3258 "configparser.c"
   3258     break;
   3259 
   3260   case 206: /* verify_option: VAR_VERIFIER_COUNT number  */
   3261 #line 1256 "configparser.y"
   3262     { cfg_parser->opt->verifier_count = (int)(yyvsp[0].llng); }
   3263 #line 3264 "configparser.c"
   3264     break;
   3265 
   3266   case 207: /* verify_option: VAR_VERIFIER_TIMEOUT number  */
   3267 #line 1258 "configparser.y"
   3268     { cfg_parser->opt->verifier_timeout = (int)(yyvsp[0].llng); }
   3269 #line 3270 "configparser.c"
   3270     break;
   3271 
   3272   case 208: /* verify_option: VAR_VERIFIER_FEED_ZONE boolean  */
   3273 #line 1260 "configparser.y"
   3274     { cfg_parser->opt->verifier_feed_zone = (yyvsp[0].bln); }
   3275 #line 3276 "configparser.c"
   3276     break;
   3277 
   3278   case 209: /* command: STRING arguments  */
   3279 #line 1264 "configparser.y"
   3280     {
   3281       char **argv;
   3282       size_t argc = 1;
   3283       for(struct component *i = (yyvsp[0].comp); i; i = i->next) {
   3284         argc++;
   3285       }
   3286       argv = region_alloc_zero(
   3287         cfg_parser->opt->region, (argc + 1) * sizeof(char *));
   3288       argc = 0;
   3289       argv[argc++] = (yyvsp[-1].str);
   3290       for(struct component *j, *i = (yyvsp[0].comp); i; i = j) {
   3291         j = i->next;
   3292         argv[argc++] = i->str;
   3293         region_recycle(cfg_parser->opt->region, i, sizeof(*i));
   3294       }
   3295       (yyval.strv) = argv;
   3296     }
   3297 #line 3298 "configparser.c"
   3298     break;
   3299 
   3300   case 210: /* arguments: %empty  */
   3301 #line 1283 "configparser.y"
   3302     { (yyval.comp) = NULL; }
   3303 #line 3304 "configparser.c"
   3304     break;
   3305 
   3306   case 211: /* arguments: arguments STRING  */
   3307 #line 1285 "configparser.y"
   3308     {
   3309       struct component *comp = region_alloc_zero(
   3310         cfg_parser->opt->region, sizeof(*comp));
   3311       comp->str = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   3312       if((yyvsp[-1].comp)) {
   3313         struct component *tail = (yyvsp[-1].comp);
   3314         while(tail->next) {
   3315          tail = tail->next;
   3316         }
   3317         tail->next = comp;
   3318         (yyval.comp) = (yyvsp[-1].comp);
   3319       } else {
   3320         (yyval.comp) = comp;
   3321       }
   3322     }
   3323 #line 3324 "configparser.c"
   3324     break;
   3325 
   3326   case 212: /* ip_address: STRING  */
   3327 #line 1303 "configparser.y"
   3328     {
   3329       struct ip_address_option *ip = region_alloc_zero(
   3330         cfg_parser->opt->region, sizeof(*ip));
   3331       ip->address = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   3332       ip->fib = -1;
   3333       (yyval.ip) = ip;
   3334     }
   3335 #line 3336 "configparser.c"
   3336     break;
   3337 
   3338   case 213: /* number: STRING  */
   3339 #line 1313 "configparser.y"
   3340     {
   3341       if(!parse_number((yyvsp[0].str), &(yyval.llng))) {
   3342         yyerror("expected a number");
   3343         YYABORT; /* trigger a parser error */
   3344       }
   3345     }
   3346 #line 3347 "configparser.c"
   3347     break;
   3348 
   3349   case 214: /* boolean: STRING  */
   3350 #line 1322 "configparser.y"
   3351     {
   3352       if(!parse_boolean((yyvsp[0].str), &(yyval.bln))) {
   3353         yyerror("expected yes or no");
   3354         YYABORT; /* trigger a parser error */
   3355       }
   3356     }
   3357 #line 3358 "configparser.c"
   3358     break;
   3359 
   3360   case 216: /* request_xfr_tlsauth_option: STRING  */
   3361 #line 1331 "configparser.y"
   3362         { char *tls_auth_name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   3363 	  add_to_last_acl(&cfg_parser->pattern->request_xfr, tls_auth_name);}
   3364 #line 3365 "configparser.c"
   3365     break;
   3366 
   3367   case 218: /* provide_xfr_tlsauth_option: STRING  */
   3368 #line 1336 "configparser.y"
   3369         { char *tls_auth_name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
   3370 	  add_to_last_acl(&cfg_parser->pattern->provide_xfr, tls_auth_name);}
   3371 #line 3372 "configparser.c"
   3372     break;
   3373 
   3374   case 219: /* catalog_role: STRING  */
   3375 #line 1341 "configparser.y"
   3376     {
   3377       if(!parse_catalog_role((yyvsp[0].str), &(yyval.role))) {
   3378         yyerror("expected consumer or producer");
   3379         YYABORT; /* trigger a parser error */
   3380       }
   3381     }
   3382 #line 3383 "configparser.c"
   3383     break;
   3384 
   3385 
   3386 #line 3387 "configparser.c"
   3387 
   3388       default: break;
   3389     }
   3390   /* User semantic actions sometimes alter yychar, and that requires
   3391      that yytoken be updated with the new translation.  We take the
   3392      approach of translating immediately before every use of yytoken.
   3393      One alternative is translating here after every semantic action,
   3394      but that translation would be missed if the semantic action invokes
   3395      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
   3396      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
   3397      incorrect destructor might then be invoked immediately.  In the
   3398      case of YYERROR or YYBACKUP, subsequent parser actions might lead
   3399      to an incorrect destructor call or verbose syntax error message
   3400      before the lookahead is translated.  */
   3401   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
   3402 
   3403   YYPOPSTACK (yylen);
   3404   yylen = 0;
   3405 
   3406   *++yyvsp = yyval;
   3407 
   3408   /* Now 'shift' the result of the reduction.  Determine what state
   3409      that goes to, based on the state we popped back to and the rule
   3410      number reduced by.  */
   3411   {
   3412     const int yylhs = yyr1[yyn] - YYNTOKENS;
   3413     const int yyi = yypgoto[yylhs] + *yyssp;
   3414     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
   3415                ? yytable[yyi]
   3416                : yydefgoto[yylhs]);
   3417   }
   3418 
   3419   goto yynewstate;
   3420 
   3421 
   3422 /*--------------------------------------.
   3423 | yyerrlab -- here on detecting error.  |
   3424 `--------------------------------------*/
   3425 yyerrlab:
   3426   /* Make sure we have latest lookahead translation.  See comments at
   3427      user semantic actions for why this is necessary.  */
   3428   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
   3429   /* If not already recovering from an error, report this error.  */
   3430   if (!yyerrstatus)
   3431     {
   3432       ++yynerrs;
   3433       yyerror (YY_("syntax error"));
   3434     }
   3435 
   3436   if (yyerrstatus == 3)
   3437     {
   3438       /* If just tried and failed to reuse lookahead token after an
   3439          error, discard it.  */
   3440 
   3441       if (yychar <= YYEOF)
   3442         {
   3443           /* Return failure if at end of input.  */
   3444           if (yychar == YYEOF)
   3445             YYABORT;
   3446         }
   3447       else
   3448         {
   3449           yydestruct ("Error: discarding",
   3450                       yytoken, &yylval);
   3451           yychar = YYEMPTY;
   3452         }
   3453     }
   3454 
   3455   /* Else will try to reuse lookahead token after shifting the error
   3456      token.  */
   3457   goto yyerrlab1;
   3458 
   3459 
   3460 /*---------------------------------------------------.
   3461 | yyerrorlab -- error raised explicitly by YYERROR.  |
   3462 `---------------------------------------------------*/
   3463 yyerrorlab:
   3464   /* Pacify compilers when the user code never invokes YYERROR and the
   3465      label yyerrorlab therefore never appears in user code.  */
   3466   if (0)
   3467     YYERROR;
   3468   ++yynerrs;
   3469 
   3470   /* Do not reclaim the symbols of the rule whose action triggered
   3471      this YYERROR.  */
   3472   YYPOPSTACK (yylen);
   3473   yylen = 0;
   3474   YY_STACK_PRINT (yyss, yyssp);
   3475   yystate = *yyssp;
   3476   goto yyerrlab1;
   3477 
   3478 
   3479 /*-------------------------------------------------------------.
   3480 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
   3481 `-------------------------------------------------------------*/
   3482 yyerrlab1:
   3483   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
   3484 
   3485   /* Pop stack until we find a state that shifts the error token.  */
   3486   for (;;)
   3487     {
   3488       yyn = yypact[yystate];
   3489       if (!yypact_value_is_default (yyn))
   3490         {
   3491           yyn += YYSYMBOL_YYerror;
   3492           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
   3493             {
   3494               yyn = yytable[yyn];
   3495               if (0 < yyn)
   3496                 break;
   3497             }
   3498         }
   3499 
   3500       /* Pop the current state because it cannot handle the error token.  */
   3501       if (yyssp == yyss)
   3502         YYABORT;
   3503 
   3504 
   3505       yydestruct ("Error: popping",
   3506                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
   3507       YYPOPSTACK (1);
   3508       yystate = *yyssp;
   3509       YY_STACK_PRINT (yyss, yyssp);
   3510     }
   3511 
   3512   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   3513   *++yyvsp = yylval;
   3514   YY_IGNORE_MAYBE_UNINITIALIZED_END
   3515 
   3516 
   3517   /* Shift the error token.  */
   3518   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
   3519 
   3520   yystate = yyn;
   3521   goto yynewstate;
   3522 
   3523 
   3524 /*-------------------------------------.
   3525 | yyacceptlab -- YYACCEPT comes here.  |
   3526 `-------------------------------------*/
   3527 yyacceptlab:
   3528   yyresult = 0;
   3529   goto yyreturnlab;
   3530 
   3531 
   3532 /*-----------------------------------.
   3533 | yyabortlab -- YYABORT comes here.  |
   3534 `-----------------------------------*/
   3535 yyabortlab:
   3536   yyresult = 1;
   3537   goto yyreturnlab;
   3538 
   3539 
   3540 /*-----------------------------------------------------------.
   3541 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
   3542 `-----------------------------------------------------------*/
   3543 yyexhaustedlab:
   3544   yyerror (YY_("memory exhausted"));
   3545   yyresult = 2;
   3546   goto yyreturnlab;
   3547 
   3548 
   3549 /*----------------------------------------------------------.
   3550 | yyreturnlab -- parsing is finished, clean up and return.  |
   3551 `----------------------------------------------------------*/
   3552 yyreturnlab:
   3553   if (yychar != YYEMPTY)
   3554     {
   3555       /* Make sure we have latest lookahead translation.  See comments at
   3556          user semantic actions for why this is necessary.  */
   3557       yytoken = YYTRANSLATE (yychar);
   3558       yydestruct ("Cleanup: discarding lookahead",
   3559                   yytoken, &yylval);
   3560     }
   3561   /* Do not reclaim the symbols of the rule whose action triggered
   3562      this YYABORT or YYACCEPT.  */
   3563   YYPOPSTACK (yylen);
   3564   YY_STACK_PRINT (yyss, yyssp);
   3565   while (yyssp != yyss)
   3566     {
   3567       yydestruct ("Cleanup: popping",
   3568                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
   3569       YYPOPSTACK (1);
   3570     }
   3571 #ifndef yyoverflow
   3572   if (yyss != yyssa)
   3573     YYSTACK_FREE (yyss);
   3574 #endif
   3575 
   3576   return yyresult;
   3577 }
   3578 
   3579 #line 1348 "configparser.y"
   3580 
   3581 
   3582 static void
   3583 append_acl(struct acl_options **list, struct acl_options *acl)
   3584 {
   3585 	assert(list != NULL);
   3586 
   3587 	if(*list == NULL) {
   3588 		*list = acl;
   3589 	} else {
   3590 		struct acl_options *tail = *list;
   3591 		while(tail->next != NULL)
   3592 			tail = tail->next;
   3593 		tail->next = acl;
   3594 	}
   3595 }
   3596 
   3597 static void
   3598 add_to_last_acl(struct acl_options **list, char *tls_auth_name)
   3599 {
   3600 	struct acl_options *tail = *list;
   3601 	assert(list != NULL);
   3602 	assert(*list != NULL);
   3603 	while(tail->next != NULL)
   3604 		tail = tail->next;
   3605 	tail->tls_auth_name = tls_auth_name;
   3606 }
   3607 
   3608 static int
   3609 parse_boolean(const char *str, int *bln)
   3610 {
   3611 	if(strcmp(str, "yes") == 0) {
   3612 		*bln = 1;
   3613 	} else if(strcmp(str, "no") == 0) {
   3614 		*bln = 0;
   3615 	} else {
   3616 		return 0;
   3617 	}
   3618 
   3619 	return 1;
   3620 }
   3621 
   3622 static int
   3623 parse_expire_expr(const char *str, long long *num, uint8_t *expr)
   3624 {
   3625 	if(parse_number(str, num)) {
   3626 		*expr = EXPIRE_TIME_HAS_VALUE;
   3627 		return 1;
   3628 	}
   3629 	if(strcmp(str, REFRESHPLUSRETRYPLUS1_STR) == 0) {
   3630 		*num = 0;
   3631 		*expr = REFRESHPLUSRETRYPLUS1;
   3632 		return 1;
   3633 	}
   3634 	return 0;
   3635 }
   3636 
   3637 static int
   3638 parse_number(const char *str, long long *num)
   3639 {
   3640 	/* ensure string consists entirely of digits */
   3641 	size_t pos = 0;
   3642 	while(str[pos] >= '0' && str[pos] <= '9') {
   3643 		pos++;
   3644 	}
   3645 
   3646 	if(pos != 0 && str[pos] == '\0') {
   3647 		*num = strtoll(str, NULL, 10);
   3648 		return 1;
   3649 	}
   3650 
   3651 	return 0;
   3652 }
   3653 
   3654 static int
   3655 parse_range(const char *str, long long *low, long long *high)
   3656 {
   3657 	const char *ptr = str;
   3658 	long long num[2];
   3659 
   3660 	/* require range to begin with a number */
   3661 	if(*ptr < '0' || *ptr > '9') {
   3662 		return 0;
   3663 	}
   3664 
   3665 	num[0] = strtoll(ptr, (char **)&ptr, 10);
   3666 
   3667 	/* require number to be followed by nothing at all or a dash */
   3668 	if(*ptr == '\0') {
   3669 		*low = num[0];
   3670 		*high = num[0];
   3671 		return 1;
   3672 	} else if(*ptr != '-') {
   3673 		return 0;
   3674 	}
   3675 
   3676 	++ptr;
   3677 	/* require dash to be followed by a number */
   3678 	if(*ptr < '0' || *ptr > '9') {
   3679 		return 0;
   3680 	}
   3681 
   3682 	num[1] = strtoll(ptr, (char **)&ptr, 10);
   3683 
   3684 	/* require number to be followed by nothing at all */
   3685 	if(*ptr == '\0') {
   3686 		if(num[0] < num[1]) {
   3687 			*low = num[0];
   3688 			*high = num[1];
   3689 		} else {
   3690 			*low = num[1];
   3691 			*high = num[0];
   3692 		}
   3693 		return 1;
   3694 	}
   3695 
   3696 	return 0;
   3697 }
   3698 
   3699 static int
   3700 parse_catalog_role(const char *str, int *role)
   3701 {
   3702 	if(strcasecmp(str, "consumer") == 0) {
   3703 		*role = CATALOG_ROLE_CONSUMER;
   3704 	} else if(strcmp(str, "producer") == 0) {
   3705 		*role = CATALOG_ROLE_PRODUCER;
   3706 	} else {
   3707 		return 0;
   3708 	}
   3709 	return 1;
   3710 }
   3711 
   3712 
   3713