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