"Fossies" - the Fresh Open Source Software Archive

Member "nsd-4.3.6/configparser.c" (6 Apr 2021, 108838 Bytes) of package /linux/misc/dns/nsd-4.3.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "configparser.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 4.3.5_vs_4.3.6.

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