From a0034603e3a1b8b44f85b990dfbf019c5bfbebd7 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 4 Sep 2018 22:38:55 +0000 Subject: [PATCH] add back the yacc and lex generated files --- external/bsd/nsd/dist/configlexer.c | 3227 ++++++++++++++++++++++ external/bsd/nsd/dist/configparser.c | 3021 +++++++++++++++++++++ external/bsd/nsd/dist/configparser.h | 254 ++ external/bsd/nsd/dist/zlexer.c | 2317 ++++++++++++++++ external/bsd/nsd/dist/zparser.c | 3724 ++++++++++++++++++++++++++ external/bsd/nsd/dist/zparser.h | 258 ++ 6 files changed, 12801 insertions(+) create mode 100644 external/bsd/nsd/dist/configlexer.c create mode 100644 external/bsd/nsd/dist/configparser.c create mode 100644 external/bsd/nsd/dist/configparser.h create mode 100644 external/bsd/nsd/dist/zlexer.c create mode 100644 external/bsd/nsd/dist/zparser.c create mode 100644 external/bsd/nsd/dist/zparser.h diff --git a/external/bsd/nsd/dist/configlexer.c b/external/bsd/nsd/dist/configlexer.c new file mode 100644 index 000000000000..84f98a9e37af --- /dev/null +++ b/external/bsd/nsd/dist/configlexer.c @@ -0,0 +1,3227 @@ +#include "configyyrename.h" + +#line 3 "" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +typedef unsigned char YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + +typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yynoreturn yy_fatal_error (yyconst char* msg ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + (yytext_ptr) -= (yy_more_len); \ + yyleng = (int) (yy_cp - (yytext_ptr)); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 100 +#define YY_END_OF_BUFFER 101 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[808] = + { 0, + 1, 1, 88, 88, 92, 92, 96, 96, 101, 99, + 1, 86, 87, 2, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 100, 88, 89, 100, 90, 100, 95, 92, + 93, 94, 100, 96, 97, 98, 100, 99, 0, 1, + 2, 2, 2, 2, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 88, 0, 95, 0, 92, 96, 0, 99, 99, + + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 67, + 99, 99, 99, 99, 99, 99, 66, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 53, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 4, 99, 19, 99, 99, 99, 30, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 42, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 33, 99, 99, 99, 99, 14, 15, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 48, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 55, 99, 3, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 39, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 91, 99, 99, 99, 99, 99, 99, 99, + + 99, 99, 20, 99, 99, 99, 99, 99, 99, 99, + 99, 56, 29, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 25, 99, 99, 99, 99, 99, 18, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 16, 99, 37, 99, 17, 99, 99, 99, 99, + 99, 12, 13, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 68, 70, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 34, 99, 99, 38, 43, + + 99, 99, 35, 99, 54, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 6, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 31, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 22, 99, 99, 99, + 41, 99, 99, 99, 44, 99, 99, 99, 99, 99, + 99, 99, 9, 99, 99, 5, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 80, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 32, 99, 99, 99, 99, 99, 99, + + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 8, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 50, 99, 47, 78, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 24, 10, 99, + 99, 99, 99, 99, 45, 99, 99, 99, 99, 61, + 11, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 49, 99, 99, 99, 99, 99, 99, 99, + 99, 21, 99, 99, 99, 99, 99, 99, 36, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + + 69, 99, 74, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 59, 99, 99, 99, 7, 27, 28, 77, + 99, 83, 99, 84, 99, 99, 99, 99, 58, 99, + 99, 99, 99, 99, 46, 99, 99, 99, 99, 99, + 99, 99, 99, 57, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 62, 23, 99, 75, 76, 99, + 99, 99, 64, 81, 82, 99, 99, 99, 26, 99, + 99, 99, 63, 99, 99, 65, 60, 79, 99, 99, + 99, 99, 99, 99, 99, 85, 51, 99, 99, 99, + 99, 52, 99, 99, 99, 40, 99, 99, 99, 99, + + 99, 99, 71, 72, 99, 73, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, + 1, 8, 1, 9, 1, 1, 1, 10, 1, 1, + 1, 1, 1, 1, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 1, 36, 1, 1, 1, 1, 37, 38, 39, 40, + + 41, 42, 43, 44, 45, 1, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[62] = + { 0, + 1, 2, 3, 4, 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 + } ; + +static yyconst flex_uint16_t yy_base[817] = + { 0, + 0, 0, 59, 62, 66, 70, 73, 76, 2242, 2205, + 80, 2278, 2278, 83, 63, 79, 89, 71, 110, 96, + 81, 117, 127, 84, 133, 152, 153, 135, 171, 151, + 85, 160, 87, 2203, 2278, 2278, 2278, 89, 2202, 2235, + 2278, 2278, 199, 2200, 2278, 2278, 137, 2197, 210, 143, + 0, 214, 0, 0, 192, 164, 190, 197, 193, 185, + 211, 188, 216, 219, 225, 250, 206, 227, 229, 246, + 247, 249, 238, 253, 248, 263, 264, 260, 255, 286, + 279, 254, 293, 275, 154, 289, 294, 308, 290, 297, + 316, 2195, 227, 2194, 349, 2226, 2186, 232, 323, 324, + + 328, 332, 333, 330, 301, 342, 344, 355, 349, 340, + 356, 379, 368, 370, 391, 369, 386, 376, 394, 374, + 396, 388, 395, 400, 389, 378, 390, 410, 412, 414, + 417, 421, 429, 433, 424, 423, 440, 427, 451, 2181, + 459, 460, 457, 464, 456, 453, 2162, 466, 467, 472, + 482, 485, 479, 455, 477, 487, 492, 493, 495, 499, + 500, 510, 530, 531, 2110, 513, 520, 517, 527, 525, + 536, 541, 542, 547, 535, 554, 543, 564, 556, 558, + 553, 561, 578, 573, 579, 581, 584, 598, 585, 613, + 582, 580, 604, 608, 631, 635, 612, 634, 626, 622, + + 648, 657, 624, 666, 647, 660, 652, 664, 672, 675, + 683, 674, 678, 688, 692, 690, 694, 698, 702, 710, + 715, 2109, 706, 2107, 712, 709, 716, 2074, 718, 729, + 735, 725, 724, 748, 731, 753, 759, 741, 745, 756, + 751, 758, 767, 760, 763, 782, 771, 786, 774, 784, + 788, 794, 789, 2058, 802, 807, 815, 804, 825, 689, + 824, 818, 827, 829, 801, 822, 841, 828, 851, 842, + 853, 852, 845, 848, 864, 872, 877, 868, 882, 885, + 886, 884, 888, 889, 896, 903, 894, 914, 926, 927, + 913, 920, 911, 912, 917, 922, 935, 940, 941, 968, + + 946, 931, 943, 938, 966, 962, 959, 967, 969, 970, + 975, 973, 986, 976, 972, 982, 1006, 1003, 992, 1000, + 2057, 1022, 1016, 1009, 1019, 2052, 2045, 1008, 996, 1030, + 1028, 1033, 1034, 1026, 1029, 1037, 1045, 1052, 1062, 1043, + 1049, 1051, 1055, 1056, 1077, 1075, 1063, 2000, 1078, 1083, + 1086, 1093, 1094, 1097, 1099, 1088, 1096, 1109, 1108, 1111, + 1102, 1114, 1976, 1135, 1964, 1103, 1118, 1134, 1124, 1129, + 1125, 1139, 1143, 1144, 1149, 1141, 1157, 1883, 1161, 1160, + 1151, 1171, 1169, 1170, 1172, 1215, 1154, 1178, 1185, 1175, + 1200, 1188, 1864, 1201, 1195, 1214, 1207, 1209, 1210, 1216, + + 1219, 1202, 1833, 1226, 1229, 1233, 1241, 1244, 1236, 1242, + 1246, 1832, 1831, 1243, 1245, 1260, 1252, 1257, 1279, 1280, + 1285, 1277, 1289, 1290, 1291, 1294, 1292, 1284, 1295, 1307, + 1830, 1303, 1314, 1304, 1312, 1313, 1822, 1317, 1332, 1341, + 1330, 1342, 1329, 1344, 1334, 1339, 1340, 1356, 1362, 1367, + 1350, 1773, 1373, 1743, 1370, 1737, 1360, 1380, 1363, 1371, + 1382, 1699, 1688, 1394, 1395, 1399, 1385, 1397, 1396, 1405, + 1407, 1398, 1408, 1409, 1410, 1389, 1406, 1424, 1437, 1432, + 1431, 1433, 1438, 1597, 1581, 1440, 1435, 1429, 1436, 1450, + 1453, 1465, 1473, 1461, 1456, 1541, 1480, 1482, 1508, 1507, + + 1487, 1476, 1466, 1488, 1324, 1492, 1484, 1479, 1497, 1474, + 1477, 1495, 1504, 1503, 1506, 1323, 1515, 1516, 1509, 1510, + 1513, 1519, 1532, 1529, 1536, 1530, 1535, 1542, 1533, 1551, + 1557, 1552, 1565, 1561, 1555, 1320, 1558, 1568, 1575, 1570, + 1579, 1574, 1576, 1602, 1606, 1604, 1287, 1607, 1590, 1608, + 1278, 1613, 1618, 1611, 1269, 1619, 1600, 1601, 1627, 1626, + 1616, 1630, 1268, 1628, 1639, 1259, 1659, 1655, 1652, 1653, + 1665, 1666, 1663, 1667, 1664, 1654, 1657, 1677, 1651, 1656, + 1676, 1189, 1687, 1705, 1706, 1702, 1703, 1700, 1692, 1714, + 1693, 1711, 1697, 1186, 1725, 1715, 1716, 1724, 1736, 1728, + + 1742, 1748, 1722, 1727, 1741, 1738, 1750, 1757, 1758, 1754, + 1131, 1753, 1735, 1762, 1763, 1771, 1765, 1774, 1782, 1781, + 1799, 1801, 1797, 1807, 1106, 1791, 1092, 1071, 1800, 1803, + 1792, 1796, 1804, 1812, 1825, 1818, 1819, 1013, 1002, 1821, + 1837, 1843, 1846, 1838, 925, 1847, 1850, 1848, 1858, 901, + 871, 1844, 1863, 1857, 1866, 1868, 1876, 1881, 1887, 1890, + 1878, 1897, 867, 1884, 1893, 1888, 1889, 1909, 1906, 1933, + 1911, 862, 1917, 1912, 1921, 1927, 1937, 1922, 837, 1931, + 1930, 1945, 1948, 1947, 1938, 1950, 1952, 1961, 1969, 1960, + 1970, 1967, 1980, 1963, 1974, 1977, 1973, 1985, 1971, 1978, + + 799, 1993, 737, 2002, 2007, 1988, 1996, 2004, 2008, 2019, + 2021, 2014, 733, 2026, 2027, 2031, 732, 682, 662, 659, + 2030, 655, 2038, 651, 2041, 2049, 2036, 2042, 587, 1817, + 1995, 2047, 2061, 2059, 555, 2065, 2071, 2070, 2077, 2078, + 2083, 2084, 2081, 528, 2082, 2090, 2075, 2091, 2092, 2098, + 2100, 2101, 2080, 2113, 505, 504, 2108, 438, 434, 2120, + 2128, 2129, 425, 387, 350, 2130, 2121, 2127, 291, 2135, + 2136, 2137, 285, 2124, 2133, 240, 237, 215, 2145, 2151, + 2139, 2147, 2153, 2155, 2172, 213, 209, 2168, 2169, 2171, + 2182, 205, 2165, 2166, 2177, 139, 2179, 2188, 2190, 2183, + + 2193, 2198, 122, 120, 2204, 107, 2278, 2253, 2257, 2261, + 117, 2265, 2269, 82, 2271, 2273 + } ; + +static yyconst flex_int16_t yy_def[817] = + { 0, + 807, 1, 808, 808, 809, 809, 810, 810, 807, 811, + 807, 807, 807, 812, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 813, 807, 807, 807, 813, 814, 807, + 807, 807, 814, 815, 807, 807, 815, 811, 811, 807, + 816, 812, 816, 812, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 813, 813, 814, 814, 807, 815, 815, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 811, 811, 811, 811, 811, 811, 811, + + 811, 811, 811, 811, 811, 811, 0, 807, 807, 807, + 807, 807, 807, 807, 807, 807 + } ; + +static yyconst flex_uint16_t yy_nxt[2340] = + { 0, + 10, 11, 12, 12, 13, 14, 10, 10, 10, 10, + 15, 10, 16, 17, 10, 10, 10, 18, 19, 20, + 21, 22, 23, 24, 25, 10, 26, 27, 28, 29, + 30, 10, 31, 10, 32, 33, 15, 10, 16, 17, + 10, 10, 10, 18, 19, 20, 21, 22, 23, 24, + 25, 10, 26, 27, 28, 29, 30, 10, 31, 10, + 32, 35, 36, 37, 35, 36, 37, 40, 41, 41, + 42, 40, 41, 41, 42, 45, 45, 46, 45, 45, + 46, 50, 94, 55, 53, 51, 53, 53, 48, 63, + 48, 48, 92, 92, 38, 56, 57, 38, 49, 59, + + 90, 43, 58, 60, 68, 43, 49, 61, 47, 55, + 67, 47, 62, 75, 49, 63, 49, 48, 54, 49, + 49, 56, 57, 64, 49, 59, 90, 69, 58, 60, + 68, 49, 65, 61, 66, 70, 67, 72, 62, 75, + 97, 97, 49, 76, 50, 49, 71, 86, 51, 64, + 73, 77, 49, 69, 74, 49, 78, 49, 65, 79, + 66, 70, 49, 72, 138, 89, 80, 83, 49, 76, + 49, 84, 71, 86, 49, 81, 73, 77, 82, 101, + 74, 85, 78, 91, 87, 79, 49, 49, 49, 49, + 138, 89, 80, 83, 107, 49, 105, 84, 88, 49, + + 94, 81, 94, 94, 82, 101, 49, 85, 99, 91, + 87, 48, 100, 48, 48, 53, 102, 53, 53, 103, + 49, 104, 105, 49, 88, 49, 106, 49, 49, 108, + 92, 92, 49, 109, 99, 97, 97, 110, 100, 116, + 49, 49, 102, 117, 49, 103, 49, 104, 49, 54, + 49, 49, 106, 111, 49, 108, 112, 113, 114, 109, + 49, 118, 49, 110, 49, 116, 122, 120, 119, 117, + 121, 123, 49, 49, 134, 49, 124, 126, 128, 111, + 115, 49, 49, 49, 49, 49, 127, 118, 49, 49, + 49, 125, 122, 120, 119, 49, 121, 123, 49, 49, + + 134, 129, 124, 126, 128, 135, 115, 130, 133, 137, + 49, 131, 127, 139, 49, 132, 142, 125, 140, 136, + 49, 49, 141, 143, 49, 49, 49, 129, 49, 49, + 151, 135, 49, 130, 133, 137, 49, 131, 144, 139, + 150, 132, 142, 49, 140, 136, 145, 146, 141, 143, + 94, 49, 94, 94, 147, 148, 151, 152, 49, 49, + 156, 149, 153, 49, 144, 49, 150, 49, 49, 154, + 157, 155, 145, 146, 161, 49, 162, 49, 165, 49, + 147, 148, 168, 152, 49, 49, 156, 149, 153, 158, + 49, 49, 166, 177, 159, 154, 157, 155, 163, 164, + + 169, 167, 171, 49, 49, 49, 173, 160, 174, 49, + 172, 49, 170, 49, 49, 158, 175, 176, 178, 177, + 159, 49, 49, 49, 49, 49, 49, 167, 171, 49, + 49, 49, 173, 160, 174, 49, 172, 181, 170, 185, + 179, 180, 175, 176, 178, 49, 182, 49, 183, 49, + 186, 184, 49, 187, 188, 189, 49, 190, 49, 49, + 49, 205, 49, 181, 49, 191, 179, 180, 49, 49, + 195, 193, 182, 49, 183, 49, 186, 184, 196, 187, + 188, 189, 197, 201, 198, 192, 49, 194, 49, 199, + 49, 49, 49, 200, 49, 49, 195, 193, 202, 49, + + 203, 49, 49, 204, 196, 206, 209, 49, 197, 201, + 198, 192, 49, 194, 49, 199, 207, 49, 208, 200, + 49, 210, 49, 212, 202, 211, 203, 49, 49, 204, + 49, 206, 209, 213, 49, 49, 214, 215, 217, 49, + 49, 216, 207, 218, 208, 49, 220, 210, 49, 212, + 222, 211, 49, 219, 221, 49, 224, 223, 225, 213, + 49, 227, 49, 49, 217, 49, 49, 216, 226, 218, + 49, 49, 220, 228, 229, 232, 49, 49, 49, 219, + 221, 231, 49, 223, 225, 230, 234, 227, 49, 49, + 49, 49, 233, 49, 226, 239, 49, 235, 240, 49, + + 229, 232, 248, 242, 241, 236, 237, 231, 49, 247, + 238, 230, 234, 49, 49, 49, 49, 49, 233, 49, + 49, 239, 49, 235, 240, 243, 250, 249, 248, 242, + 258, 236, 237, 49, 244, 247, 238, 251, 245, 49, + 259, 246, 264, 49, 254, 261, 252, 49, 49, 253, + 255, 243, 250, 249, 260, 256, 258, 49, 262, 49, + 244, 49, 257, 263, 245, 269, 49, 246, 264, 49, + 49, 261, 252, 265, 266, 253, 255, 267, 268, 270, + 260, 256, 49, 49, 262, 271, 49, 49, 257, 272, + 49, 269, 49, 273, 49, 49, 274, 49, 321, 49, + + 275, 49, 276, 267, 268, 270, 277, 49, 278, 49, + 49, 271, 280, 49, 279, 272, 281, 49, 49, 273, + 282, 283, 274, 49, 49, 49, 275, 49, 276, 49, + 285, 288, 277, 49, 278, 286, 287, 49, 280, 284, + 279, 49, 281, 289, 49, 49, 282, 49, 292, 290, + 49, 49, 291, 49, 293, 294, 285, 288, 298, 49, + 49, 286, 287, 295, 49, 284, 49, 49, 49, 289, + 49, 301, 49, 299, 292, 290, 49, 296, 291, 297, + 49, 294, 300, 49, 298, 302, 49, 304, 49, 295, + 303, 49, 305, 49, 49, 49, 308, 301, 49, 299, + + 306, 309, 49, 296, 307, 297, 49, 310, 300, 49, + 326, 302, 312, 304, 311, 313, 303, 49, 305, 49, + 314, 49, 308, 49, 49, 315, 306, 309, 316, 49, + 307, 327, 318, 310, 49, 319, 49, 49, 312, 49, + 311, 313, 49, 317, 322, 323, 314, 320, 324, 325, + 49, 315, 331, 49, 316, 328, 329, 49, 318, 49, + 49, 319, 49, 49, 49, 330, 333, 334, 335, 317, + 322, 323, 49, 320, 324, 325, 49, 49, 331, 332, + 49, 328, 329, 49, 336, 337, 49, 49, 49, 339, + 338, 330, 333, 334, 335, 347, 340, 49, 348, 49, + + 341, 343, 49, 49, 345, 332, 49, 49, 351, 346, + 336, 337, 49, 342, 344, 339, 338, 49, 349, 49, + 49, 49, 340, 49, 49, 350, 341, 343, 352, 49, + 345, 49, 353, 354, 351, 346, 49, 357, 49, 342, + 344, 355, 358, 356, 349, 359, 49, 49, 49, 49, + 363, 350, 49, 361, 352, 49, 360, 49, 362, 367, + 49, 49, 49, 357, 366, 369, 49, 355, 358, 356, + 49, 359, 368, 49, 364, 49, 49, 365, 49, 361, + 370, 49, 360, 371, 362, 367, 372, 374, 373, 376, + 366, 369, 375, 377, 49, 378, 379, 49, 368, 380, + + 381, 49, 49, 49, 49, 49, 370, 49, 49, 371, + 49, 49, 372, 374, 373, 376, 382, 49, 375, 377, + 383, 49, 379, 385, 384, 380, 381, 49, 386, 391, + 387, 49, 388, 389, 390, 49, 392, 49, 49, 393, + 394, 49, 382, 49, 49, 396, 383, 395, 49, 385, + 384, 49, 403, 397, 49, 391, 387, 49, 388, 389, + 390, 49, 398, 49, 49, 49, 394, 400, 49, 49, + 399, 396, 49, 395, 401, 404, 402, 405, 49, 397, + 49, 406, 407, 408, 49, 409, 49, 49, 398, 410, + 49, 49, 412, 400, 411, 413, 399, 49, 49, 414, + + 401, 404, 402, 405, 415, 417, 49, 406, 407, 416, + 49, 409, 49, 49, 418, 410, 420, 421, 49, 419, + 411, 49, 422, 49, 428, 423, 424, 49, 49, 49, + 415, 49, 49, 431, 49, 416, 429, 49, 49, 433, + 418, 49, 425, 49, 49, 419, 49, 426, 422, 49, + 428, 423, 424, 49, 427, 432, 430, 435, 437, 49, + 49, 438, 429, 452, 49, 433, 49, 434, 425, 49, + 49, 439, 436, 426, 49, 440, 49, 442, 49, 49, + 427, 432, 430, 435, 49, 445, 49, 438, 441, 49, + 444, 453, 49, 434, 454, 49, 49, 439, 436, 443, + + 446, 440, 455, 442, 49, 49, 49, 49, 466, 456, + 49, 445, 457, 49, 441, 458, 444, 453, 462, 463, + 49, 49, 459, 49, 49, 443, 446, 447, 455, 448, + 49, 461, 460, 449, 450, 49, 49, 49, 457, 451, + 467, 458, 49, 464, 49, 49, 465, 469, 459, 49, + 49, 49, 474, 447, 49, 448, 473, 461, 460, 449, + 450, 49, 468, 472, 49, 451, 467, 476, 49, 464, + 471, 49, 465, 469, 470, 475, 49, 49, 49, 49, + 49, 49, 473, 477, 478, 479, 481, 49, 468, 472, + 480, 482, 49, 476, 49, 49, 471, 483, 484, 485, + + 470, 475, 490, 49, 49, 486, 489, 491, 487, 477, + 478, 479, 49, 49, 49, 49, 480, 488, 495, 49, + 49, 496, 49, 483, 49, 49, 49, 49, 490, 49, + 49, 486, 489, 491, 487, 492, 493, 494, 49, 49, + 498, 499, 49, 488, 495, 502, 497, 49, 49, 49, + 500, 503, 49, 505, 508, 49, 504, 507, 49, 49, + 506, 492, 493, 494, 49, 49, 498, 49, 501, 49, + 515, 502, 497, 512, 49, 49, 49, 49, 509, 49, + 508, 511, 504, 507, 510, 49, 506, 513, 514, 516, + 517, 49, 519, 518, 501, 49, 515, 49, 49, 512, + + 520, 521, 49, 524, 509, 49, 49, 511, 49, 522, + 510, 526, 523, 513, 514, 49, 517, 49, 519, 518, + 49, 527, 533, 525, 49, 532, 528, 530, 534, 49, + 49, 49, 49, 49, 49, 522, 529, 531, 523, 535, + 49, 49, 49, 49, 49, 49, 536, 527, 533, 525, + 537, 532, 528, 530, 534, 538, 540, 539, 543, 49, + 541, 542, 529, 531, 49, 535, 49, 49, 49, 544, + 49, 49, 49, 49, 547, 49, 537, 550, 545, 548, + 546, 538, 540, 539, 543, 49, 541, 542, 49, 551, + 549, 49, 552, 553, 554, 544, 49, 555, 556, 557, + + 49, 49, 560, 550, 545, 558, 546, 559, 49, 49, + 561, 49, 49, 563, 49, 49, 549, 49, 552, 49, + 554, 562, 49, 49, 566, 557, 564, 49, 560, 567, + 49, 558, 49, 559, 565, 568, 561, 569, 49, 49, + 570, 49, 49, 49, 49, 49, 571, 562, 49, 572, + 49, 49, 564, 574, 49, 567, 577, 573, 575, 578, + 565, 568, 576, 569, 49, 49, 570, 49, 49, 580, + 49, 49, 571, 579, 582, 572, 49, 49, 581, 574, + 585, 584, 577, 573, 575, 578, 49, 49, 576, 583, + 49, 588, 49, 49, 586, 580, 49, 589, 591, 579, + + 49, 587, 590, 49, 581, 49, 585, 584, 592, 49, + 49, 49, 593, 594, 49, 583, 49, 588, 596, 595, + 586, 597, 607, 589, 591, 49, 598, 587, 590, 604, + 599, 601, 49, 603, 602, 49, 49, 49, 605, 49, + 606, 49, 49, 49, 596, 595, 49, 597, 49, 600, + 609, 49, 598, 49, 49, 604, 599, 601, 608, 603, + 602, 49, 49, 49, 605, 49, 606, 610, 611, 612, + 613, 614, 616, 618, 49, 600, 609, 615, 620, 623, + 624, 617, 619, 621, 608, 625, 49, 49, 49, 49, + 49, 49, 49, 610, 49, 612, 613, 614, 49, 49, + + 49, 49, 49, 615, 620, 623, 624, 617, 619, 621, + 622, 49, 49, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 49, 49, 638, 639, 635, 49, 49, 636, + 640, 645, 49, 646, 49, 49, 622, 49, 49, 626, + 49, 49, 629, 630, 631, 632, 49, 634, 637, 49, + 49, 49, 635, 641, 642, 636, 643, 49, 644, 49, + 49, 647, 49, 49, 648, 649, 650, 651, 652, 654, + 49, 49, 49, 49, 637, 653, 49, 49, 49, 641, + 642, 656, 643, 49, 644, 49, 658, 647, 49, 49, + 648, 649, 49, 49, 652, 654, 655, 49, 49, 657, + + 49, 653, 659, 660, 661, 662, 49, 656, 49, 49, + 663, 664, 658, 665, 666, 667, 49, 49, 668, 671, + 669, 672, 655, 751, 670, 657, 49, 49, 659, 660, + 661, 49, 49, 674, 49, 49, 49, 664, 49, 49, + 666, 667, 49, 673, 668, 671, 669, 49, 675, 676, + 670, 677, 49, 49, 49, 679, 49, 49, 680, 674, + 49, 678, 681, 683, 682, 49, 49, 49, 49, 673, + 685, 687, 49, 49, 675, 676, 684, 677, 49, 49, + 688, 49, 49, 49, 680, 49, 689, 678, 681, 683, + 682, 686, 49, 49, 690, 691, 685, 687, 49, 49, + + 694, 49, 684, 49, 693, 692, 688, 699, 698, 695, + 696, 49, 689, 49, 697, 701, 49, 686, 49, 49, + 690, 691, 49, 49, 49, 49, 694, 700, 49, 704, + 693, 692, 49, 699, 698, 695, 696, 705, 706, 702, + 697, 49, 703, 707, 49, 708, 49, 49, 712, 709, + 710, 711, 49, 700, 713, 704, 49, 49, 714, 717, + 716, 718, 49, 705, 706, 49, 49, 715, 49, 707, + 719, 708, 49, 49, 712, 709, 710, 711, 720, 722, + 49, 721, 49, 49, 714, 49, 716, 49, 723, 724, + 725, 726, 727, 715, 729, 49, 49, 735, 49, 49, + + 728, 752, 49, 730, 49, 49, 49, 721, 49, 49, + 731, 49, 49, 49, 723, 49, 725, 726, 727, 732, + 49, 734, 733, 49, 736, 737, 728, 738, 49, 730, + 49, 49, 740, 739, 741, 49, 731, 49, 742, 49, + 744, 743, 49, 49, 745, 732, 749, 734, 733, 49, + 736, 737, 746, 738, 49, 747, 49, 753, 740, 739, + 741, 49, 49, 748, 742, 49, 49, 743, 755, 750, + 745, 49, 749, 49, 756, 754, 49, 49, 746, 758, + 49, 747, 49, 753, 49, 757, 759, 49, 760, 748, + 763, 764, 49, 49, 49, 750, 49, 761, 762, 765, + + 49, 754, 766, 767, 768, 49, 49, 769, 772, 49, + 49, 757, 49, 49, 760, 49, 49, 49, 49, 49, + 770, 771, 773, 761, 762, 49, 49, 49, 766, 767, + 768, 774, 775, 49, 772, 49, 49, 776, 777, 778, + 779, 780, 49, 49, 49, 49, 770, 771, 49, 781, + 782, 783, 785, 784, 786, 49, 49, 774, 775, 49, + 787, 788, 49, 49, 49, 49, 779, 780, 49, 789, + 49, 49, 49, 790, 49, 781, 782, 783, 785, 784, + 49, 792, 49, 791, 793, 794, 49, 788, 49, 795, + 49, 796, 803, 797, 798, 789, 800, 49, 799, 790, + + 49, 49, 804, 49, 49, 801, 49, 49, 802, 791, + 793, 794, 49, 806, 49, 795, 49, 49, 49, 797, + 798, 98, 800, 49, 799, 49, 805, 96, 49, 95, + 93, 801, 49, 49, 802, 98, 96, 95, 93, 49, + 49, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 805, 34, 34, 34, 34, 39, 39, 39, + 39, 44, 44, 44, 44, 52, 52, 807, 52, 92, + 92, 97, 97, 53, 53, 807, 53, 9, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807 + } ; + +static yyconst flex_int16_t yy_chk[2340] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 3, 3, 4, 4, 4, 5, 5, 5, + 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, + 8, 11, 814, 15, 14, 11, 14, 14, 33, 18, + 33, 33, 38, 38, 3, 15, 16, 4, 15, 17, + + 31, 5, 16, 17, 21, 6, 18, 17, 7, 15, + 20, 8, 17, 24, 16, 18, 21, 811, 14, 24, + 31, 15, 16, 19, 17, 17, 31, 22, 16, 17, + 21, 20, 19, 17, 19, 22, 20, 23, 17, 24, + 47, 47, 806, 25, 50, 19, 22, 28, 50, 19, + 23, 25, 22, 22, 23, 804, 25, 803, 19, 25, + 19, 22, 23, 23, 85, 30, 26, 27, 25, 25, + 28, 27, 22, 28, 796, 26, 23, 25, 26, 56, + 23, 27, 25, 32, 29, 25, 30, 26, 27, 85, + 85, 30, 26, 27, 62, 32, 60, 27, 29, 56, + + 43, 26, 43, 43, 26, 56, 29, 27, 55, 32, + 29, 49, 55, 49, 49, 52, 57, 52, 52, 58, + 60, 59, 60, 62, 29, 57, 61, 55, 59, 63, + 93, 93, 58, 64, 55, 98, 98, 65, 55, 67, + 792, 67, 57, 68, 787, 58, 61, 59, 786, 52, + 778, 63, 61, 65, 64, 63, 66, 66, 66, 64, + 65, 69, 68, 65, 69, 67, 73, 71, 70, 68, + 72, 74, 777, 73, 82, 776, 75, 77, 79, 65, + 66, 70, 71, 75, 72, 66, 78, 69, 74, 82, + 79, 76, 73, 71, 70, 78, 72, 74, 76, 77, + + 82, 80, 75, 77, 79, 83, 66, 80, 81, 84, + 84, 80, 78, 86, 81, 80, 89, 76, 87, 83, + 773, 80, 88, 90, 86, 89, 769, 80, 83, 87, + 105, 83, 90, 80, 81, 84, 105, 80, 91, 86, + 104, 80, 89, 88, 87, 83, 99, 100, 88, 90, + 95, 91, 95, 95, 101, 102, 105, 106, 99, 100, + 110, 103, 107, 101, 91, 104, 104, 102, 103, 108, + 111, 109, 99, 100, 113, 110, 114, 106, 116, 107, + 101, 102, 118, 106, 109, 765, 110, 103, 107, 112, + 108, 111, 117, 126, 112, 108, 111, 109, 115, 115, + + 119, 117, 120, 113, 116, 114, 122, 112, 123, 120, + 121, 118, 119, 126, 112, 112, 124, 125, 127, 126, + 112, 117, 764, 122, 125, 127, 115, 117, 120, 119, + 123, 121, 122, 112, 123, 124, 121, 130, 119, 134, + 128, 129, 124, 125, 127, 128, 131, 129, 132, 130, + 135, 133, 131, 136, 137, 138, 132, 139, 136, 135, + 763, 154, 138, 130, 133, 141, 128, 129, 134, 759, + 143, 142, 131, 758, 132, 137, 135, 133, 144, 136, + 137, 138, 145, 150, 146, 141, 139, 142, 146, 148, + 154, 145, 143, 149, 141, 142, 143, 142, 151, 144, + + 152, 148, 149, 153, 144, 155, 158, 150, 145, 150, + 146, 141, 155, 142, 153, 148, 156, 151, 157, 149, + 152, 159, 156, 161, 151, 160, 152, 157, 158, 153, + 159, 155, 158, 162, 160, 161, 163, 164, 167, 756, + 755, 166, 156, 168, 157, 162, 170, 159, 166, 161, + 172, 160, 168, 169, 171, 167, 174, 173, 175, 162, + 170, 177, 169, 744, 167, 163, 164, 166, 176, 168, + 175, 171, 170, 178, 179, 182, 172, 173, 177, 169, + 171, 181, 174, 173, 175, 180, 184, 177, 181, 176, + 735, 179, 183, 180, 176, 186, 182, 185, 187, 178, + + 179, 182, 192, 189, 188, 185, 185, 181, 184, 191, + 185, 180, 184, 183, 185, 192, 186, 191, 183, 187, + 189, 186, 729, 185, 187, 190, 194, 193, 192, 189, + 197, 185, 185, 188, 190, 191, 185, 195, 190, 193, + 198, 190, 203, 194, 196, 200, 195, 197, 190, 195, + 196, 190, 194, 193, 199, 196, 197, 200, 201, 203, + 190, 199, 196, 202, 190, 207, 195, 190, 203, 198, + 196, 200, 195, 204, 204, 195, 196, 205, 206, 208, + 199, 196, 205, 201, 201, 209, 724, 207, 196, 210, + 722, 207, 202, 211, 720, 206, 212, 719, 260, 208, + + 213, 204, 214, 205, 206, 208, 215, 209, 216, 212, + 210, 209, 218, 213, 217, 210, 219, 718, 211, 211, + 220, 221, 212, 214, 260, 216, 213, 215, 214, 217, + 225, 229, 215, 218, 216, 226, 227, 219, 218, 223, + 217, 223, 219, 230, 226, 220, 220, 225, 233, 231, + 221, 227, 232, 229, 234, 235, 225, 229, 238, 233, + 232, 226, 227, 236, 230, 223, 235, 717, 713, 230, + 231, 241, 703, 239, 233, 231, 238, 237, 232, 237, + 239, 235, 240, 234, 238, 242, 241, 244, 236, 236, + 243, 240, 245, 242, 237, 244, 248, 241, 245, 239, + + 246, 249, 243, 237, 247, 237, 247, 250, 240, 249, + 265, 242, 252, 244, 251, 253, 243, 246, 245, 250, + 255, 248, 248, 251, 253, 256, 246, 249, 257, 252, + 247, 266, 258, 250, 701, 259, 265, 255, 252, 258, + 251, 253, 256, 257, 261, 262, 255, 259, 263, 264, + 257, 256, 270, 262, 257, 267, 268, 266, 258, 261, + 259, 259, 263, 268, 264, 269, 272, 273, 274, 257, + 261, 262, 679, 259, 263, 264, 267, 270, 270, 271, + 273, 267, 268, 274, 275, 276, 269, 272, 271, 278, + 277, 269, 272, 273, 274, 284, 279, 672, 284, 275, + + 280, 281, 663, 278, 282, 271, 651, 276, 287, 283, + 275, 276, 277, 280, 281, 278, 277, 279, 285, 282, + 280, 281, 279, 283, 284, 286, 280, 281, 288, 287, + 282, 285, 289, 290, 287, 283, 650, 293, 286, 280, + 281, 291, 294, 292, 285, 295, 293, 294, 291, 288, + 299, 286, 295, 297, 288, 292, 296, 296, 298, 302, + 645, 289, 290, 293, 301, 304, 302, 291, 294, 292, + 297, 295, 303, 304, 300, 298, 299, 300, 303, 297, + 305, 301, 296, 306, 298, 302, 307, 309, 308, 311, + 301, 304, 310, 312, 307, 313, 314, 306, 303, 315, + + 316, 305, 308, 300, 309, 310, 305, 315, 312, 306, + 311, 314, 307, 309, 308, 311, 317, 316, 310, 312, + 318, 313, 314, 320, 319, 315, 316, 319, 322, 329, + 323, 329, 324, 325, 328, 320, 330, 639, 318, 330, + 331, 317, 317, 328, 324, 333, 318, 332, 638, 320, + 319, 323, 340, 334, 325, 329, 323, 322, 324, 325, + 328, 334, 335, 331, 335, 330, 331, 337, 332, 333, + 336, 333, 336, 332, 338, 341, 339, 342, 340, 334, + 337, 343, 344, 345, 341, 346, 342, 338, 335, 347, + 343, 344, 350, 337, 349, 351, 336, 339, 347, 352, + + 338, 341, 339, 342, 353, 355, 628, 343, 344, 354, + 346, 346, 345, 349, 356, 347, 358, 358, 350, 357, + 349, 351, 359, 356, 366, 360, 361, 627, 352, 353, + 353, 357, 354, 369, 355, 354, 367, 361, 366, 371, + 356, 625, 362, 359, 358, 357, 360, 364, 359, 362, + 366, 360, 361, 367, 364, 370, 368, 373, 375, 369, + 371, 376, 367, 387, 370, 371, 611, 372, 362, 368, + 364, 377, 374, 364, 372, 379, 376, 381, 373, 374, + 364, 370, 368, 373, 375, 384, 381, 376, 380, 387, + 383, 388, 377, 372, 389, 380, 379, 377, 374, 382, + + 385, 379, 390, 381, 383, 384, 382, 385, 402, 391, + 390, 384, 392, 388, 380, 394, 383, 388, 398, 399, + 389, 594, 395, 392, 582, 382, 385, 386, 390, 386, + 395, 397, 396, 386, 386, 391, 394, 402, 392, 386, + 404, 394, 397, 400, 398, 399, 401, 406, 395, 396, + 386, 400, 411, 386, 401, 386, 410, 397, 396, 386, + 386, 404, 405, 409, 405, 386, 404, 415, 406, 400, + 408, 409, 401, 406, 407, 414, 407, 410, 414, 408, + 415, 411, 410, 416, 417, 418, 420, 417, 405, 409, + 419, 421, 418, 415, 566, 416, 408, 422, 423, 424, + + 407, 414, 428, 563, 555, 425, 427, 429, 426, 416, + 417, 418, 422, 551, 419, 420, 419, 426, 434, 428, + 421, 435, 547, 422, 423, 424, 425, 427, 428, 426, + 429, 425, 427, 429, 426, 430, 432, 433, 432, 434, + 438, 439, 430, 426, 434, 441, 436, 435, 436, 433, + 440, 442, 438, 444, 447, 536, 443, 446, 516, 505, + 445, 430, 432, 433, 443, 441, 438, 439, 440, 445, + 457, 441, 436, 451, 446, 447, 440, 442, 448, 444, + 447, 450, 443, 446, 449, 451, 445, 453, 455, 458, + 459, 448, 461, 460, 440, 457, 457, 449, 459, 451, + + 464, 465, 450, 468, 448, 455, 460, 450, 453, 466, + 449, 470, 467, 453, 455, 458, 459, 461, 461, 460, + 467, 471, 476, 469, 476, 475, 472, 474, 477, 464, + 465, 469, 468, 472, 466, 466, 473, 474, 467, 478, + 470, 477, 471, 473, 474, 475, 479, 471, 476, 469, + 480, 475, 472, 474, 477, 481, 483, 482, 488, 478, + 486, 487, 473, 474, 488, 478, 481, 480, 482, 489, + 487, 489, 479, 483, 492, 486, 480, 495, 490, 493, + 491, 481, 483, 482, 488, 490, 486, 487, 491, 497, + 494, 495, 498, 501, 502, 489, 494, 504, 506, 507, + + 492, 503, 510, 495, 490, 508, 491, 509, 493, 510, + 511, 502, 511, 513, 508, 497, 494, 498, 498, 507, + 502, 512, 501, 504, 517, 507, 514, 506, 510, 518, + 512, 508, 509, 509, 515, 519, 511, 520, 514, 513, + 521, 515, 500, 499, 519, 520, 522, 512, 521, 523, + 517, 518, 514, 525, 522, 518, 528, 524, 526, 529, + 515, 519, 527, 520, 524, 526, 521, 523, 529, 531, + 527, 525, 522, 530, 533, 523, 496, 528, 532, 525, + 537, 535, 528, 524, 526, 529, 530, 532, 527, 534, + 535, 540, 531, 537, 538, 531, 534, 541, 543, 530, + + 533, 539, 542, 538, 532, 540, 537, 535, 544, 542, + 539, 543, 545, 546, 541, 534, 485, 540, 549, 548, + 538, 550, 561, 541, 543, 549, 552, 539, 542, 558, + 553, 554, 484, 557, 556, 557, 558, 544, 559, 546, + 560, 545, 548, 550, 549, 548, 554, 550, 552, 553, + 564, 561, 552, 553, 556, 558, 553, 554, 562, 557, + 556, 560, 559, 564, 559, 562, 560, 565, 567, 568, + 569, 570, 572, 574, 565, 553, 564, 571, 576, 579, + 580, 573, 575, 577, 562, 581, 579, 569, 570, 576, + 568, 580, 577, 565, 567, 568, 569, 570, 573, 575, + + 571, 572, 574, 571, 576, 579, 580, 573, 575, 577, + 578, 581, 578, 583, 584, 585, 586, 587, 588, 589, + 590, 591, 583, 463, 596, 597, 592, 589, 591, 593, + 598, 603, 593, 604, 462, 588, 578, 586, 587, 583, + 584, 585, 586, 587, 588, 589, 592, 591, 595, 590, + 596, 597, 592, 599, 600, 593, 601, 603, 602, 598, + 595, 605, 604, 600, 606, 607, 608, 609, 610, 613, + 613, 599, 456, 606, 595, 612, 605, 601, 454, 599, + 600, 615, 601, 602, 602, 607, 617, 605, 612, 610, + 606, 607, 608, 609, 610, 613, 614, 614, 615, 616, + + 617, 612, 618, 619, 620, 621, 616, 615, 452, 618, + 622, 623, 617, 624, 626, 629, 620, 619, 630, 633, + 631, 634, 614, 730, 632, 616, 626, 631, 618, 619, + 620, 632, 623, 636, 621, 629, 622, 623, 630, 633, + 626, 629, 624, 635, 630, 633, 631, 634, 637, 640, + 632, 641, 730, 636, 637, 643, 640, 437, 644, 636, + 635, 642, 646, 648, 647, 431, 413, 412, 403, 635, + 652, 654, 641, 644, 637, 640, 649, 641, 642, 652, + 655, 643, 646, 648, 644, 647, 656, 642, 646, 648, + 647, 653, 654, 649, 657, 658, 652, 654, 653, 393, + + 661, 655, 649, 656, 660, 659, 655, 667, 666, 662, + 664, 657, 656, 661, 665, 669, 658, 653, 378, 664, + 657, 658, 659, 666, 667, 660, 661, 668, 665, 671, + 660, 659, 662, 667, 666, 662, 664, 673, 674, 670, + 665, 669, 670, 675, 668, 676, 671, 674, 681, 677, + 678, 680, 673, 668, 682, 671, 675, 678, 683, 686, + 685, 687, 676, 673, 674, 681, 680, 684, 670, 675, + 688, 676, 677, 685, 681, 677, 678, 680, 689, 691, + 682, 690, 684, 683, 683, 686, 685, 687, 692, 693, + 694, 695, 696, 684, 698, 690, 688, 706, 694, 365, + + 697, 731, 692, 699, 689, 691, 699, 690, 697, 695, + 700, 363, 696, 700, 692, 693, 694, 695, 696, 702, + 698, 705, 704, 706, 707, 708, 697, 709, 702, 699, + 731, 707, 711, 710, 712, 348, 700, 704, 714, 708, + 716, 715, 705, 709, 721, 702, 727, 705, 704, 712, + 707, 708, 723, 709, 710, 725, 711, 732, 711, 710, + 712, 714, 715, 726, 714, 721, 716, 715, 734, 728, + 721, 727, 727, 723, 736, 733, 725, 728, 723, 738, + 327, 725, 732, 732, 726, 737, 739, 326, 740, 726, + 743, 745, 321, 254, 734, 728, 733, 741, 742, 746, + + 736, 733, 747, 748, 749, 738, 737, 750, 753, 228, + 747, 737, 739, 740, 740, 753, 743, 745, 741, 742, + 751, 752, 754, 741, 742, 746, 748, 749, 747, 748, + 749, 757, 760, 750, 753, 751, 752, 761, 762, 766, + 767, 768, 224, 757, 222, 165, 751, 752, 754, 770, + 771, 772, 775, 774, 779, 760, 767, 757, 760, 774, + 780, 781, 768, 761, 762, 766, 767, 768, 775, 782, + 770, 771, 772, 783, 781, 770, 771, 772, 775, 774, + 779, 785, 782, 784, 788, 789, 780, 781, 783, 790, + 784, 791, 800, 793, 794, 782, 797, 147, 795, 783, + + 793, 794, 801, 788, 789, 798, 790, 785, 799, 784, + 788, 789, 795, 805, 797, 790, 140, 791, 800, 793, + 794, 97, 797, 798, 795, 799, 802, 96, 801, 94, + 92, 798, 48, 802, 799, 44, 40, 39, 34, 805, + 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 802, 808, 808, 808, 808, 809, 809, 809, + 809, 810, 810, 810, 810, 812, 812, 0, 812, 813, + 813, 815, 815, 816, 816, 0, 816, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +static int yy_more_flag = 0; +static int yy_more_len = 0; +#define yymore() ((yy_more_flag) = 1) +#define YY_MORE_ADJ (yy_more_len) +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "configlexer.lex" +#line 2 "configlexer.lex" +/* + * configlexer.lex - lexical analyzer for NSD config file + * + * Copyright (c) 2001-2006, NLnet Labs. All rights reserved + * + * See LICENSE for the license. + * + */ +/* because flex keeps having sign-unsigned compare problems that are unfixed*/ +#if defined(__clang__)||(defined(__GNUC__)&&((__GNUC__ >4)||(defined(__GNUC_MINOR__)&&(__GNUC__ ==4)&&(__GNUC_MINOR__ >=2)))) +#pragma GCC diagnostic ignored "-Wsign-compare" +#endif + +#include "config.h" + +#include +#include +#include +#include +#ifdef HAVE_GLOB_H +# include +#endif + +#include "options.h" +#include "configyyrename.h" +#include "configparser.h" +void c_error(const char *message); + +#if 0 +#define LEXOUT(s) printf s /* used ONLY when debugging */ +#else +#define LEXOUT(s) +#endif + +struct inc_state { + char* filename; + int line; + YY_BUFFER_STATE buffer; + struct inc_state* next; +}; +static struct inc_state* config_include_stack = NULL; +static int inc_depth = 0; +static int inc_prev = 0; +static int num_args = 0; + +void init_cfg_parse(void) +{ + config_include_stack = NULL; + inc_depth = 0; + inc_prev = 0; + num_args = 0; +} + +static void config_start_include(const char* filename) +{ + FILE *input; + struct inc_state* s; + char* nm; + if(inc_depth++ > 10000000) { + c_error_msg("too many include files"); + return; + } + if(strlen(filename) == 0) { + c_error_msg("empty include file name"); + return; + } + s = (struct inc_state*)malloc(sizeof(*s)); + if(!s) { + c_error_msg("include %s: malloc failure", filename); + return; + } + nm = strdup(filename); + if(!nm) { + c_error_msg("include %s: strdup failure", filename); + free(s); + return; + } + input = fopen(filename, "r"); + if(!input) { + c_error_msg("cannot open include file '%s': %s", + filename, strerror(errno)); + free(s); + free(nm); + return; + } + LEXOUT(("switch_to_include_file(%s) ", filename)); + s->filename = cfg_parser->filename; + s->line = cfg_parser->line; + s->buffer = YY_CURRENT_BUFFER; + s->next = config_include_stack; + config_include_stack = s; + + cfg_parser->filename = nm; + cfg_parser->line = 1; + yy_switch_to_buffer(yy_create_buffer(input,YY_BUF_SIZE)); +} + +static void config_start_include_glob(const char* filename) +{ + /* check for wildcards */ +#ifdef HAVE_GLOB + glob_t g; + size_t i; + int r, flags; +#endif /* HAVE_GLOB */ + if (cfg_parser->chroot) { + int l = strlen(cfg_parser->chroot); /* chroot has trailing slash */ + if (strncmp(cfg_parser->chroot, filename, l) != 0) { + c_error_msg("include file '%s' is not relative to chroot '%s'", + filename, cfg_parser->chroot); + return; + } + filename += l - 1; /* strip chroot without trailing slash */ + } +#ifdef HAVE_GLOB + if(!(!strchr(filename, '*') && !strchr(filename, '?') && + !strchr(filename, '[') && !strchr(filename, '{') && + !strchr(filename, '~'))) { + flags = 0 +#ifdef GLOB_ERR + | GLOB_ERR +#endif +#ifdef GLOB_NOSORT + | GLOB_NOSORT +#endif +#ifdef GLOB_BRACE + | GLOB_BRACE +#endif +#ifdef GLOB_TILDE + | GLOB_TILDE +#endif + ; + memset(&g, 0, sizeof(g)); + r = glob(filename, flags, NULL, &g); + if(r) { + /* some error */ + globfree(&g); + if(r == GLOB_NOMATCH) + return; /* no matches for pattern */ + config_start_include(filename); /* let original deal with it */ + return; + } + /* process files found, if any */ + for(i=0; i<(size_t)g.gl_pathc; i++) { + config_start_include(g.gl_pathv[i]); + } + globfree(&g); + return; + } +#endif /* HAVE_GLOB */ + config_start_include(filename); +} + +static void config_end_include(void) +{ + struct inc_state* s = config_include_stack; + --inc_depth; + if(!s) return; + free(cfg_parser->filename); + cfg_parser->filename = s->filename; + cfg_parser->line = s->line; + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(s->buffer); + config_include_stack = s->next; + free(s); +} + +#ifndef yy_set_bol /* compat definition, for flex 2.4.6 */ +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_current_buffer->yy_ch_buf[0] = ((at_bol)?'\n':' '); \ + } +#endif + +#define YY_NO_INPUT 1 +#line 182 "configlexer.lex" +#ifndef YY_NO_UNPUT +#define YY_NO_UNPUT 1 +#endif +#ifndef YY_NO_INPUT +#define YY_NO_INPUT 1 +#endif + +#line 1423 "" + +#define INITIAL 0 +#define quotedstring 1 +#define include 2 +#define include_quoted 3 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * _in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * _out_str ); + + int yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int _line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +#line 200 "configlexer.lex" + +#line 1644 "" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + (yy_more_len) = 0; + if ( (yy_more_flag) ) + { + (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); + (yy_more_flag) = 0; + } + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 808 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 2278 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 201 "configlexer.lex" +{ LEXOUT(("SP ")); /* ignore */ } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 202 "configlexer.lex" +{ LEXOUT(("comment(%s) ", yytext)); /* ignore */ } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 203 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_SERVER;} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 204 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_NAME;} + YY_BREAK +case 5: +YY_RULE_SETUP +#line 205 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IP_ADDRESS;} + YY_BREAK +case 6: +YY_RULE_SETUP +#line 206 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IP_ADDRESS;} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 207 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IP_TRANSPARENT;} + YY_BREAK +case 8: +YY_RULE_SETUP +#line 208 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IP_FREEBIND;} + YY_BREAK +case 9: +YY_RULE_SETUP +#line 209 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_DEBUG_MODE;} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 210 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_USE_SYSTEMD;} + YY_BREAK +case 11: +YY_RULE_SETUP +#line 211 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_HIDE_VERSION;} + YY_BREAK +case 12: +YY_RULE_SETUP +#line 212 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IP4_ONLY;} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 213 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IP6_ONLY;} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 214 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_DO_IP4;} + YY_BREAK +case 15: +YY_RULE_SETUP +#line 215 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_DO_IP6;} + YY_BREAK +case 16: +YY_RULE_SETUP +#line 216 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_DATABASE;} + YY_BREAK +case 17: +YY_RULE_SETUP +#line 217 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IDENTITY;} + YY_BREAK +case 18: +YY_RULE_SETUP +#line 218 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_VERSION;} + YY_BREAK +case 19: +YY_RULE_SETUP +#line 219 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_NSID;} + YY_BREAK +case 20: +YY_RULE_SETUP +#line 220 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_LOGFILE;} + YY_BREAK +case 21: +YY_RULE_SETUP +#line 221 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_SERVER_COUNT;} + YY_BREAK +case 22: +YY_RULE_SETUP +#line 222 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_TCP_COUNT;} + YY_BREAK +case 23: +YY_RULE_SETUP +#line 223 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_TCP_QUERY_COUNT;} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 224 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_TCP_TIMEOUT;} + YY_BREAK +case 25: +YY_RULE_SETUP +#line 225 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_TCP_MSS;} + YY_BREAK +case 26: +YY_RULE_SETUP +#line 226 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_OUTGOING_TCP_MSS;} + YY_BREAK +case 27: +YY_RULE_SETUP +#line 227 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IPV4_EDNS_SIZE;} + YY_BREAK +case 28: +YY_RULE_SETUP +#line 228 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_IPV6_EDNS_SIZE;} + YY_BREAK +case 29: +YY_RULE_SETUP +#line 229 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_PIDFILE;} + YY_BREAK +case 30: +YY_RULE_SETUP +#line 230 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_PORT;} + YY_BREAK +case 31: +YY_RULE_SETUP +#line 231 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_REUSEPORT;} + YY_BREAK +case 32: +YY_RULE_SETUP +#line 232 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_STATISTICS;} + YY_BREAK +case 33: +YY_RULE_SETUP +#line 233 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_CHROOT;} + YY_BREAK +case 34: +YY_RULE_SETUP +#line 234 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_USERNAME;} + YY_BREAK +case 35: +YY_RULE_SETUP +#line 235 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONESDIR;} + YY_BREAK +case 36: +YY_RULE_SETUP +#line 236 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONELISTFILE;} + YY_BREAK +case 37: +YY_RULE_SETUP +#line 237 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_DIFFFILE;} + YY_BREAK +case 38: +YY_RULE_SETUP +#line 238 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_XFRDFILE;} + YY_BREAK +case 39: +YY_RULE_SETUP +#line 239 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_XFRDIR;} + YY_BREAK +case 40: +YY_RULE_SETUP +#line 240 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_XFRD_RELOAD_TIMEOUT;} + YY_BREAK +case 41: +YY_RULE_SETUP +#line 241 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_VERBOSITY;} + YY_BREAK +case 42: +YY_RULE_SETUP +#line 242 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONE;} + YY_BREAK +case 43: +YY_RULE_SETUP +#line 243 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONEFILE;} + YY_BREAK +case 44: +YY_RULE_SETUP +#line 244 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONESTATS;} + YY_BREAK +case 45: +YY_RULE_SETUP +#line 245 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ALLOW_NOTIFY;} + YY_BREAK +case 46: +YY_RULE_SETUP +#line 246 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_SIZE_LIMIT_XFR;} + YY_BREAK +case 47: +YY_RULE_SETUP +#line 247 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_REQUEST_XFR;} + YY_BREAK +case 48: +YY_RULE_SETUP +#line 248 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_NOTIFY;} + YY_BREAK +case 49: +YY_RULE_SETUP +#line 249 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_NOTIFY_RETRY;} + YY_BREAK +case 50: +YY_RULE_SETUP +#line 250 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_PROVIDE_XFR;} + YY_BREAK +case 51: +YY_RULE_SETUP +#line 251 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_OUTGOING_INTERFACE;} + YY_BREAK +case 52: +YY_RULE_SETUP +#line 252 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ALLOW_AXFR_FALLBACK;} + YY_BREAK +case 53: +YY_RULE_SETUP +#line 253 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_KEY;} + YY_BREAK +case 54: +YY_RULE_SETUP +#line 254 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ALGORITHM;} + YY_BREAK +case 55: +YY_RULE_SETUP +#line 255 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_SECRET;} + YY_BREAK +case 56: +YY_RULE_SETUP +#line 256 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_PATTERN;} + YY_BREAK +case 57: +YY_RULE_SETUP +#line 257 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_INCLUDEPATTERN;} + YY_BREAK +case 58: +YY_RULE_SETUP +#line 258 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_REMOTE_CONTROL;} + YY_BREAK +case 59: +YY_RULE_SETUP +#line 259 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_CONTROL_ENABLE;} + YY_BREAK +case 60: +YY_RULE_SETUP +#line 260 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_CONTROL_INTERFACE;} + YY_BREAK +case 61: +YY_RULE_SETUP +#line 261 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_CONTROL_PORT;} + YY_BREAK +case 62: +YY_RULE_SETUP +#line 262 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_SERVER_KEY_FILE;} + YY_BREAK +case 63: +YY_RULE_SETUP +#line 263 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_SERVER_CERT_FILE;} + YY_BREAK +case 64: +YY_RULE_SETUP +#line 264 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_CONTROL_KEY_FILE;} + YY_BREAK +case 65: +YY_RULE_SETUP +#line 265 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_CONTROL_CERT_FILE;} + YY_BREAK +case 66: +YY_RULE_SETUP +#line 266 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_AXFR;} + YY_BREAK +case 67: +YY_RULE_SETUP +#line 267 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_UDP;} + YY_BREAK +case 68: +YY_RULE_SETUP +#line 268 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_SIZE;} + YY_BREAK +case 69: +YY_RULE_SETUP +#line 269 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_RATELIMIT;} + YY_BREAK +case 70: +YY_RULE_SETUP +#line 270 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_SLIP;} + YY_BREAK +case 71: +YY_RULE_SETUP +#line 271 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_IPV4_PREFIX_LENGTH;} + YY_BREAK +case 72: +YY_RULE_SETUP +#line 272 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_IPV6_PREFIX_LENGTH;} + YY_BREAK +case 73: +YY_RULE_SETUP +#line 273 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_WHITELIST_RATELIMIT;} + YY_BREAK +case 74: +YY_RULE_SETUP +#line 274 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_RRL_WHITELIST;} + YY_BREAK +case 75: +YY_RULE_SETUP +#line 275 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONEFILES_CHECK;} + YY_BREAK +case 76: +YY_RULE_SETUP +#line 276 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ZONEFILES_WRITE;} + YY_BREAK +case 77: +YY_RULE_SETUP +#line 277 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_LOG_TIME_ASCII;} + YY_BREAK +case 78: +YY_RULE_SETUP +#line 278 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_ROUND_ROBIN;} + YY_BREAK +case 79: +YY_RULE_SETUP +#line 279 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_MINIMAL_RESPONSES;} + YY_BREAK +case 80: +YY_RULE_SETUP +#line 280 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_REFUSE_ANY;} + YY_BREAK +case 81: +YY_RULE_SETUP +#line 281 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_MAX_REFRESH_TIME;} + YY_BREAK +case 82: +YY_RULE_SETUP +#line 282 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_MIN_REFRESH_TIME;} + YY_BREAK +case 83: +YY_RULE_SETUP +#line 283 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_MAX_RETRY_TIME;} + YY_BREAK +case 84: +YY_RULE_SETUP +#line 284 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_MIN_RETRY_TIME;} + YY_BREAK +case 85: +YY_RULE_SETUP +#line 285 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); return VAR_MULTI_MASTER_CHECK;} + YY_BREAK +case 86: +/* rule 86 can match eol */ +YY_RULE_SETUP +#line 286 "configlexer.lex" +{ LEXOUT(("NL\n")); cfg_parser->line++;} + YY_BREAK +/* Quoted strings. Strip leading and ending quotes */ +case 87: +YY_RULE_SETUP +#line 289 "configlexer.lex" +{ BEGIN(quotedstring); LEXOUT(("QS ")); } + YY_BREAK +case YY_STATE_EOF(quotedstring): +#line 290 "configlexer.lex" +{ + yyerror("EOF inside quoted string"); + BEGIN(INITIAL); +} + YY_BREAK +case 88: +YY_RULE_SETUP +#line 294 "configlexer.lex" +{ LEXOUT(("STR(%s) ", yytext)); yymore(); } + YY_BREAK +case 89: +/* rule 89 can match eol */ +YY_RULE_SETUP +#line 295 "configlexer.lex" +{ cfg_parser->line++; yymore(); } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 296 "configlexer.lex" +{ + LEXOUT(("QE ")); + BEGIN(INITIAL); + yytext[yyleng - 1] = '\0'; + yylval.str = region_strdup(cfg_parser->opt->region, yytext); + return STRING; +} + YY_BREAK +/* include: directive */ +case 91: +YY_RULE_SETUP +#line 305 "configlexer.lex" +{ LEXOUT(("v(%s) ", yytext)); BEGIN(include); } + YY_BREAK +case YY_STATE_EOF(include): +#line 306 "configlexer.lex" +{ + yyerror("EOF inside include directive"); + BEGIN(INITIAL); +} + YY_BREAK +case 92: +YY_RULE_SETUP +#line 310 "configlexer.lex" +{ LEXOUT(("ISP ")); /* ignore */ } + YY_BREAK +case 93: +/* rule 93 can match eol */ +YY_RULE_SETUP +#line 311 "configlexer.lex" +{ LEXOUT(("NL\n")); cfg_parser->line++;} + YY_BREAK +case 94: +YY_RULE_SETUP +#line 312 "configlexer.lex" +{ LEXOUT(("IQS ")); BEGIN(include_quoted); } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 313 "configlexer.lex" +{ + LEXOUT(("Iunquotedstr(%s) ", yytext)); + config_start_include_glob(yytext); + BEGIN(INITIAL); +} + YY_BREAK +case YY_STATE_EOF(include_quoted): +#line 318 "configlexer.lex" +{ + yyerror("EOF inside quoted string"); + BEGIN(INITIAL); +} + YY_BREAK +case 96: +YY_RULE_SETUP +#line 322 "configlexer.lex" +{ LEXOUT(("ISTR(%s) ", yytext)); yymore(); } + YY_BREAK +case 97: +/* rule 97 can match eol */ +YY_RULE_SETUP +#line 323 "configlexer.lex" +{ cfg_parser->line++; yymore(); } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 324 "configlexer.lex" +{ + LEXOUT(("IQE ")); + yytext[yyleng - 1] = '\0'; + config_start_include_glob(yytext); + BEGIN(INITIAL); +} + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 330 "configlexer.lex" +{ + yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ + if (!config_include_stack) { + yyterminate(); + } else { + fclose(yyin); + config_end_include(); + } +} + YY_BREAK +case 99: +YY_RULE_SETUP +#line 340 "configlexer.lex" +{ LEXOUT(("unquotedstr(%s) ", yytext)); + yylval.str = region_strdup(cfg_parser->opt->region, yytext); return STRING; } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 343 "configlexer.lex" +ECHO; + YY_BREAK +#line 2262 "" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + yy_size_t number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 808 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 808 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 807); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); + + yyfree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,(int) strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 343 "configlexer.lex" + + + diff --git a/external/bsd/nsd/dist/configparser.c b/external/bsd/nsd/dist/configparser.c new file mode 100644 index 000000000000..fa39d6e76933 --- /dev/null +++ b/external/bsd/nsd/dist/configparser.c @@ -0,0 +1,3021 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* Copy the first part of user declarations. */ +#line 10 "configparser.y" /* yacc.c:339 */ + +#include "config.h" + +#include +#include +#include +#include +#include + +#include "options.h" +#include "util.h" +#include "dname.h" +#include "tsig.h" +#include "rrl.h" +#include "configyyrename.h" +int c_lex(void); +void c_error(const char *message); + +#ifdef __cplusplus +extern "C" +#endif /* __cplusplus */ + +/* these need to be global, otherwise they cannot be used inside yacc */ +extern config_parser_state_type* cfg_parser; + +#if 0 +#define OUTYY(s) printf s /* used ONLY when debugging */ +#else +#define OUTYY(s) +#endif + + +#line 99 "configparser.c" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "configparser.h". */ +#ifndef YY_YY_CONFIGPARSER_H_INCLUDED +# define YY_YY_CONFIGPARSER_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + SPACE = 258, + LETTER = 259, + NEWLINE = 260, + COMMENT = 261, + COLON = 262, + ANY = 263, + ZONESTR = 264, + STRING = 265, + VAR_SERVER = 266, + VAR_NAME = 267, + VAR_IP_ADDRESS = 268, + VAR_IP_TRANSPARENT = 269, + VAR_DEBUG_MODE = 270, + VAR_IP4_ONLY = 271, + VAR_IP6_ONLY = 272, + VAR_DATABASE = 273, + VAR_IDENTITY = 274, + VAR_NSID = 275, + VAR_LOGFILE = 276, + VAR_SERVER_COUNT = 277, + VAR_TCP_COUNT = 278, + VAR_PIDFILE = 279, + VAR_PORT = 280, + VAR_STATISTICS = 281, + VAR_CHROOT = 282, + VAR_USERNAME = 283, + VAR_ZONESDIR = 284, + VAR_XFRDFILE = 285, + VAR_DIFFFILE = 286, + VAR_XFRD_RELOAD_TIMEOUT = 287, + VAR_TCP_QUERY_COUNT = 288, + VAR_TCP_TIMEOUT = 289, + VAR_IPV4_EDNS_SIZE = 290, + VAR_IPV6_EDNS_SIZE = 291, + VAR_DO_IP4 = 292, + VAR_DO_IP6 = 293, + VAR_TCP_MSS = 294, + VAR_OUTGOING_TCP_MSS = 295, + VAR_IP_FREEBIND = 296, + VAR_ZONEFILE = 297, + VAR_ZONE = 298, + VAR_ALLOW_NOTIFY = 299, + VAR_REQUEST_XFR = 300, + VAR_NOTIFY = 301, + VAR_PROVIDE_XFR = 302, + VAR_SIZE_LIMIT_XFR = 303, + VAR_NOTIFY_RETRY = 304, + VAR_OUTGOING_INTERFACE = 305, + VAR_ALLOW_AXFR_FALLBACK = 306, + VAR_KEY = 307, + VAR_ALGORITHM = 308, + VAR_SECRET = 309, + VAR_AXFR = 310, + VAR_UDP = 311, + VAR_VERBOSITY = 312, + VAR_HIDE_VERSION = 313, + VAR_PATTERN = 314, + VAR_INCLUDEPATTERN = 315, + VAR_ZONELISTFILE = 316, + VAR_REMOTE_CONTROL = 317, + VAR_CONTROL_ENABLE = 318, + VAR_CONTROL_INTERFACE = 319, + VAR_CONTROL_PORT = 320, + VAR_SERVER_KEY_FILE = 321, + VAR_SERVER_CERT_FILE = 322, + VAR_CONTROL_KEY_FILE = 323, + VAR_CONTROL_CERT_FILE = 324, + VAR_XFRDIR = 325, + VAR_RRL_SIZE = 326, + VAR_RRL_RATELIMIT = 327, + VAR_RRL_SLIP = 328, + VAR_RRL_IPV4_PREFIX_LENGTH = 329, + VAR_RRL_IPV6_PREFIX_LENGTH = 330, + VAR_RRL_WHITELIST_RATELIMIT = 331, + VAR_RRL_WHITELIST = 332, + VAR_ZONEFILES_CHECK = 333, + VAR_ZONEFILES_WRITE = 334, + VAR_LOG_TIME_ASCII = 335, + VAR_ROUND_ROBIN = 336, + VAR_ZONESTATS = 337, + VAR_REUSEPORT = 338, + VAR_VERSION = 339, + VAR_MAX_REFRESH_TIME = 340, + VAR_MIN_REFRESH_TIME = 341, + VAR_MAX_RETRY_TIME = 342, + VAR_MIN_RETRY_TIME = 343, + VAR_MULTI_MASTER_CHECK = 344, + VAR_MINIMAL_RESPONSES = 345, + VAR_REFUSE_ANY = 346, + VAR_USE_SYSTEMD = 347 + }; +#endif +/* Tokens. */ +#define SPACE 258 +#define LETTER 259 +#define NEWLINE 260 +#define COMMENT 261 +#define COLON 262 +#define ANY 263 +#define ZONESTR 264 +#define STRING 265 +#define VAR_SERVER 266 +#define VAR_NAME 267 +#define VAR_IP_ADDRESS 268 +#define VAR_IP_TRANSPARENT 269 +#define VAR_DEBUG_MODE 270 +#define VAR_IP4_ONLY 271 +#define VAR_IP6_ONLY 272 +#define VAR_DATABASE 273 +#define VAR_IDENTITY 274 +#define VAR_NSID 275 +#define VAR_LOGFILE 276 +#define VAR_SERVER_COUNT 277 +#define VAR_TCP_COUNT 278 +#define VAR_PIDFILE 279 +#define VAR_PORT 280 +#define VAR_STATISTICS 281 +#define VAR_CHROOT 282 +#define VAR_USERNAME 283 +#define VAR_ZONESDIR 284 +#define VAR_XFRDFILE 285 +#define VAR_DIFFFILE 286 +#define VAR_XFRD_RELOAD_TIMEOUT 287 +#define VAR_TCP_QUERY_COUNT 288 +#define VAR_TCP_TIMEOUT 289 +#define VAR_IPV4_EDNS_SIZE 290 +#define VAR_IPV6_EDNS_SIZE 291 +#define VAR_DO_IP4 292 +#define VAR_DO_IP6 293 +#define VAR_TCP_MSS 294 +#define VAR_OUTGOING_TCP_MSS 295 +#define VAR_IP_FREEBIND 296 +#define VAR_ZONEFILE 297 +#define VAR_ZONE 298 +#define VAR_ALLOW_NOTIFY 299 +#define VAR_REQUEST_XFR 300 +#define VAR_NOTIFY 301 +#define VAR_PROVIDE_XFR 302 +#define VAR_SIZE_LIMIT_XFR 303 +#define VAR_NOTIFY_RETRY 304 +#define VAR_OUTGOING_INTERFACE 305 +#define VAR_ALLOW_AXFR_FALLBACK 306 +#define VAR_KEY 307 +#define VAR_ALGORITHM 308 +#define VAR_SECRET 309 +#define VAR_AXFR 310 +#define VAR_UDP 311 +#define VAR_VERBOSITY 312 +#define VAR_HIDE_VERSION 313 +#define VAR_PATTERN 314 +#define VAR_INCLUDEPATTERN 315 +#define VAR_ZONELISTFILE 316 +#define VAR_REMOTE_CONTROL 317 +#define VAR_CONTROL_ENABLE 318 +#define VAR_CONTROL_INTERFACE 319 +#define VAR_CONTROL_PORT 320 +#define VAR_SERVER_KEY_FILE 321 +#define VAR_SERVER_CERT_FILE 322 +#define VAR_CONTROL_KEY_FILE 323 +#define VAR_CONTROL_CERT_FILE 324 +#define VAR_XFRDIR 325 +#define VAR_RRL_SIZE 326 +#define VAR_RRL_RATELIMIT 327 +#define VAR_RRL_SLIP 328 +#define VAR_RRL_IPV4_PREFIX_LENGTH 329 +#define VAR_RRL_IPV6_PREFIX_LENGTH 330 +#define VAR_RRL_WHITELIST_RATELIMIT 331 +#define VAR_RRL_WHITELIST 332 +#define VAR_ZONEFILES_CHECK 333 +#define VAR_ZONEFILES_WRITE 334 +#define VAR_LOG_TIME_ASCII 335 +#define VAR_ROUND_ROBIN 336 +#define VAR_ZONESTATS 337 +#define VAR_REUSEPORT 338 +#define VAR_VERSION 339 +#define VAR_MAX_REFRESH_TIME 340 +#define VAR_MIN_REFRESH_TIME 341 +#define VAR_MAX_RETRY_TIME 342 +#define VAR_MIN_RETRY_TIME 343 +#define VAR_MULTI_MASTER_CHECK 344 +#define VAR_MINIMAL_RESPONSES 345 +#define VAR_REFUSE_ANY 346 +#define VAR_USE_SYSTEMD 347 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ +#line 42 "configparser.y" /* yacc.c:355 */ + + char* str; + +#line 327 "configparser.c" /* yacc.c:355 */ +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_CONFIGPARSER_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 344 "configparser.c" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 192 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 93 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 97 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 182 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 271 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 347 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 78, 78, 78, 79, 79, 80, 80, 81, 84, + 92, 92, 93, 93, 93, 93, 94, 94, 94, 94, + 94, 95, 95, 95, 95, 96, 96, 96, 96, 97, + 97, 97, 98, 98, 98, 99, 99, 99, 100, 100, + 101, 101, 102, 102, 102, 103, 103, 103, 104, 104, + 104, 105, 105, 105, 106, 106, 106, 107, 107, 107, + 108, 130, 138, 146, 154, 162, 170, 178, 190, 202, + 210, 218, 226, 235, 241, 247, 277, 283, 294, 305, + 316, 326, 334, 342, 348, 354, 362, 368, 374, 380, + 386, 392, 398, 404, 412, 420, 428, 436, 444, 452, + 460, 470, 478, 488, 498, 508, 516, 524, 533, 538, + 539, 540, 540, 540, 541, 541, 541, 542, 544, 552, + 560, 577, 583, 589, 595, 603, 637, 637, 638, 638, + 639, 639, 639, 640, 640, 640, 641, 641, 641, 642, + 642, 642, 643, 643, 643, 644, 644, 645, 657, 668, + 705, 705, 706, 706, 707, 727, 736, 745, 756, 760, + 768, 780, 793, 807, 820, 831, 842, 854, 865, 873, + 883, 893, 903, 913, 922, 935, 935, 936, 936, 936, + 937, 951, 964 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 0 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "SPACE", "LETTER", "NEWLINE", "COMMENT", + "COLON", "ANY", "ZONESTR", "STRING", "VAR_SERVER", "VAR_NAME", + "VAR_IP_ADDRESS", "VAR_IP_TRANSPARENT", "VAR_DEBUG_MODE", "VAR_IP4_ONLY", + "VAR_IP6_ONLY", "VAR_DATABASE", "VAR_IDENTITY", "VAR_NSID", + "VAR_LOGFILE", "VAR_SERVER_COUNT", "VAR_TCP_COUNT", "VAR_PIDFILE", + "VAR_PORT", "VAR_STATISTICS", "VAR_CHROOT", "VAR_USERNAME", + "VAR_ZONESDIR", "VAR_XFRDFILE", "VAR_DIFFFILE", + "VAR_XFRD_RELOAD_TIMEOUT", "VAR_TCP_QUERY_COUNT", "VAR_TCP_TIMEOUT", + "VAR_IPV4_EDNS_SIZE", "VAR_IPV6_EDNS_SIZE", "VAR_DO_IP4", "VAR_DO_IP6", + "VAR_TCP_MSS", "VAR_OUTGOING_TCP_MSS", "VAR_IP_FREEBIND", "VAR_ZONEFILE", + "VAR_ZONE", "VAR_ALLOW_NOTIFY", "VAR_REQUEST_XFR", "VAR_NOTIFY", + "VAR_PROVIDE_XFR", "VAR_SIZE_LIMIT_XFR", "VAR_NOTIFY_RETRY", + "VAR_OUTGOING_INTERFACE", "VAR_ALLOW_AXFR_FALLBACK", "VAR_KEY", + "VAR_ALGORITHM", "VAR_SECRET", "VAR_AXFR", "VAR_UDP", "VAR_VERBOSITY", + "VAR_HIDE_VERSION", "VAR_PATTERN", "VAR_INCLUDEPATTERN", + "VAR_ZONELISTFILE", "VAR_REMOTE_CONTROL", "VAR_CONTROL_ENABLE", + "VAR_CONTROL_INTERFACE", "VAR_CONTROL_PORT", "VAR_SERVER_KEY_FILE", + "VAR_SERVER_CERT_FILE", "VAR_CONTROL_KEY_FILE", "VAR_CONTROL_CERT_FILE", + "VAR_XFRDIR", "VAR_RRL_SIZE", "VAR_RRL_RATELIMIT", "VAR_RRL_SLIP", + "VAR_RRL_IPV4_PREFIX_LENGTH", "VAR_RRL_IPV6_PREFIX_LENGTH", + "VAR_RRL_WHITELIST_RATELIMIT", "VAR_RRL_WHITELIST", + "VAR_ZONEFILES_CHECK", "VAR_ZONEFILES_WRITE", "VAR_LOG_TIME_ASCII", + "VAR_ROUND_ROBIN", "VAR_ZONESTATS", "VAR_REUSEPORT", "VAR_VERSION", + "VAR_MAX_REFRESH_TIME", "VAR_MIN_REFRESH_TIME", "VAR_MAX_RETRY_TIME", + "VAR_MIN_RETRY_TIME", "VAR_MULTI_MASTER_CHECK", "VAR_MINIMAL_RESPONSES", + "VAR_REFUSE_ANY", "VAR_USE_SYSTEMD", "$accept", "toplevelvars", + "toplevelvar", "serverstart", "contents_server", "content_server", + "server_ip_address", "server_ip_transparent", "server_ip_freebind", + "server_debug_mode", "server_use_systemd", "server_verbosity", + "server_hide_version", "server_ip4_only", "server_ip6_only", + "server_do_ip4", "server_do_ip6", "server_reuseport", "server_database", + "server_identity", "server_version", "server_nsid", "server_logfile", + "server_log_time_ascii", "server_round_robin", + "server_minimal_responses", "server_refuse_any", "server_server_count", + "server_tcp_count", "server_pidfile", "server_port", "server_statistics", + "server_chroot", "server_username", "server_zonesdir", + "server_zonelistfile", "server_xfrdir", "server_difffile", + "server_xfrdfile", "server_xfrd_reload_timeout", + "server_tcp_query_count", "server_tcp_timeout", "server_tcp_mss", + "server_outgoing_tcp_mss", "server_ipv4_edns_size", + "server_ipv6_edns_size", "server_rrl_size", "server_rrl_ratelimit", + "server_rrl_slip", "server_rrl_ipv4_prefix_length", + "server_rrl_ipv6_prefix_length", "server_rrl_whitelist_ratelimit", + "server_zonefiles_check", "server_zonefiles_write", "rcstart", + "contents_rc", "content_rc", "rc_control_enable", "rc_control_port", + "rc_control_interface", "rc_server_key_file", "rc_server_cert_file", + "rc_control_key_file", "rc_control_cert_file", "patternstart", + "contents_pattern", "content_pattern", "zone_config_item", + "pattern_name", "include_pattern", "zonestart", "contents_zone", + "content_zone", "zone_name", "zone_zonefile", "zone_zonestats", + "zone_allow_notify", "zone_request_xfr", "zone_size_limit_xfr", + "zone_request_xfr_data", "zone_notify", "zone_notify_retry", + "zone_provide_xfr", "zone_outgoing_interface", + "zone_allow_axfr_fallback", "zone_rrl_whitelist", + "zone_max_refresh_time", "zone_min_refresh_time", "zone_max_retry_time", + "zone_min_retry_time", "zone_multi_master_check", "keystart", + "contents_key", "content_key", "key_name", "key_algorithm", "key_secret", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347 +}; +# endif + +#define YYPACT_NINF -27 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-27))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + -27, 110, -27, -27, -27, -27, -27, -27, -27, -27, + -27, 38, 57, 37, -13, -26, 20, 21, 22, 19, + 23, 25, 36, 41, 42, 43, 44, 45, 46, 54, + 62, 63, 66, 82, 38, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, 83, -27, 57, -27, -27, + 84, 85, 86, 37, -27, -27, -27, -27, 87, 90, + 99, 101, 102, 103, 104, 106, 108, 109, 112, 118, + 119, 120, 121, 122, 123, 125, 126, 127, 128, 130, + 131, 137, 138, 139, 140, 141, 142, 144, 145, 146, + 147, 148, 149, 150, 151, 153, 154, 155, 156, 157, + 158, 160, 161, 163, 164, 165, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, 166, 167, 168, 169, 170, + 171, 172, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, 173, 174, 175, 176, -27, 177, 178, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, 179, 180, -27, -27, -27, + -27 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 9, 149, 174, 125, 108, 3, 11, + 110, 0, 0, 0, 4, 8, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 127, 129, 128, 138, 130, + 140, 131, 132, 145, 133, 134, 135, 136, 137, 139, + 141, 142, 143, 144, 146, 0, 153, 5, 151, 152, + 0, 0, 0, 6, 176, 177, 178, 179, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 10, 12, 13, 56, + 14, 59, 36, 37, 15, 16, 49, 50, 54, 17, + 18, 55, 19, 20, 52, 53, 57, 58, 21, 22, + 23, 24, 25, 26, 27, 28, 38, 39, 29, 30, + 31, 32, 33, 40, 41, 34, 35, 42, 43, 44, + 45, 46, 47, 48, 51, 0, 0, 0, 0, 0, + 0, 0, 109, 111, 113, 112, 114, 115, 116, 117, + 147, 155, 0, 0, 0, 0, 158, 0, 0, 159, + 164, 166, 167, 148, 168, 156, 169, 170, 171, 172, + 173, 126, 154, 150, 180, 181, 182, 175, 60, 61, + 63, 67, 68, 72, 73, 75, 76, 81, 82, 83, + 84, 85, 86, 87, 88, 92, 91, 93, 94, 95, + 98, 99, 69, 70, 96, 97, 62, 65, 66, 89, + 90, 100, 101, 102, 103, 104, 105, 106, 107, 77, + 78, 71, 74, 79, 80, 64, 118, 120, 119, 121, + 122, 123, 124, 157, 160, 0, 0, 163, 165, 161, + 162 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, 0, 24, -27, -27, + -27, -27, -10, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, 129, -27, -27, -27 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 8, 9, 14, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 10, 15, 172, 173, 174, 175, + 176, 177, 178, 179, 11, 34, 35, 36, 37, 38, + 12, 57, 58, 59, 39, 40, 41, 42, 43, 186, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 13, 63, 64, 65, 66, 67 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint16 yytable[] = +{ + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 183, + 180, 181, 182, 187, 201, 188, 56, 165, 166, 167, + 168, 169, 170, 171, 97, 98, 189, 203, 99, 60, + 16, 190, 191, 192, 193, 194, 195, 100, 101, 102, + 103, 104, 105, 106, 196, 107, 108, 109, 110, 55, + 111, 112, 197, 198, 184, 185, 199, 113, 114, 115, + 17, 56, 18, 19, 20, 21, 22, 23, 24, 25, + 61, 62, 200, 202, 204, 205, 206, 208, 26, 17, + 209, 18, 19, 20, 21, 22, 23, 24, 25, 210, + 2, 211, 212, 213, 214, 27, 215, 26, 216, 217, + 28, 3, 218, 29, 30, 31, 32, 33, 219, 220, + 221, 222, 223, 224, 27, 225, 226, 227, 228, 28, + 229, 230, 29, 30, 31, 32, 33, 231, 232, 233, + 234, 235, 236, 4, 237, 238, 239, 240, 241, 242, + 243, 244, 5, 245, 246, 247, 248, 249, 250, 6, + 251, 252, 7, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 0, 207 +}; + +static const yytype_int8 yycheck[] = +{ + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 10, + 10, 10, 10, 10, 34, 10, 12, 63, 64, 65, + 66, 67, 68, 69, 57, 58, 10, 57, 61, 12, + 12, 10, 10, 10, 10, 10, 10, 70, 71, 72, + 73, 74, 75, 76, 10, 78, 79, 80, 81, 12, + 83, 84, 10, 10, 55, 56, 10, 90, 91, 92, + 42, 57, 44, 45, 46, 47, 48, 49, 50, 51, + 53, 54, 10, 10, 10, 10, 10, 10, 60, 42, + 10, 44, 45, 46, 47, 48, 49, 50, 51, 10, + 0, 10, 10, 10, 10, 77, 10, 60, 10, 10, + 82, 11, 10, 85, 86, 87, 88, 89, 10, 10, + 10, 10, 10, 10, 77, 10, 10, 10, 10, 82, + 10, 10, 85, 86, 87, 88, 89, 10, 10, 10, + 10, 10, 10, 43, 10, 10, 10, 10, 10, 10, + 10, 10, 52, 10, 10, 10, 10, 10, 10, 59, + 10, 10, 62, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, -1, 63 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 94, 0, 11, 43, 52, 59, 62, 95, 96, + 147, 157, 163, 184, 97, 148, 12, 42, 44, 45, + 46, 47, 48, 49, 50, 51, 60, 77, 82, 85, + 86, 87, 88, 89, 158, 159, 160, 161, 162, 167, + 168, 169, 170, 171, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 12, 160, 164, 165, 166, + 12, 53, 54, 185, 186, 187, 188, 189, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 57, 58, 61, + 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, + 81, 83, 84, 90, 91, 92, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 63, 64, 65, 66, 67, + 68, 69, 149, 150, 151, 152, 153, 154, 155, 156, + 10, 10, 10, 10, 55, 56, 172, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 159, 10, 165, 10, 10, 10, 186, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 93, 94, 94, 95, 95, 95, 95, 95, 96, + 97, 97, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 148, 149, 149, 149, 149, 149, 149, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 158, 159, 159, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 161, 162, 163, + 164, 164, 165, 165, 166, 167, 168, 169, 170, 171, + 172, 172, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 185, 186, 186, 186, + 187, 188, 189 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 2, 2, 2, 2, 2, 1, + 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, + 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, + 2, 1, 1, 1, 2, 2, 2, 3, 2, 2, + 2, 3, 3, 3, 2, 3, 2, 2, 2, 2, + 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, + 2, 2, 2 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +{ + YYUSE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (void) +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 9: +#line 85 "configparser.y" /* yacc.c:1646 */ + { OUTYY(("\nP(server:)\n")); + if(cfg_parser->server_settings_seen) { + yyerror("duplicate server: element."); + } + cfg_parser->server_settings_seen = 1; + } +#line 1678 "configparser.c" /* yacc.c:1646 */ + break; + + case 60: +#line 109 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_ip_address:%s)\n", (yyvsp[0].str))); + if(cfg_parser->current_ip_address_option) { + cfg_parser->current_ip_address_option->next = + (ip_address_option_type*)region_alloc( + cfg_parser->opt->region, sizeof(ip_address_option_type)); + cfg_parser->current_ip_address_option = + cfg_parser->current_ip_address_option->next; + cfg_parser->current_ip_address_option->next=0; + } else { + cfg_parser->current_ip_address_option = + (ip_address_option_type*)region_alloc( + cfg_parser->opt->region, sizeof(ip_address_option_type)); + cfg_parser->current_ip_address_option->next=0; + cfg_parser->opt->ip_addresses = cfg_parser->current_ip_address_option; + } + + cfg_parser->current_ip_address_option->address = + region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 1703 "configparser.c" /* yacc.c:1646 */ + break; + + case 61: +#line 131 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_ip_transparent:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->ip_transparent = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1714 "configparser.c" /* yacc.c:1646 */ + break; + + case 62: +#line 139 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_ip_freebind:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->ip_freebind = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1725 "configparser.c" /* yacc.c:1646 */ + break; + + case 63: +#line 147 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_debug_mode:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->debug_mode = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1736 "configparser.c" /* yacc.c:1646 */ + break; + + case 64: +#line 155 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_use_systemd:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->use_systemd = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1747 "configparser.c" /* yacc.c:1646 */ + break; + + case 65: +#line 163 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_verbosity:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else cfg_parser->opt->verbosity = atoi((yyvsp[0].str)); + } +#line 1758 "configparser.c" /* yacc.c:1646 */ + break; + + case 66: +#line 171 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_hide_version:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->hide_version = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1769 "configparser.c" /* yacc.c:1646 */ + break; + + case 67: +#line 179 "configparser.y" /* yacc.c:1646 */ + { + /* for backwards compatibility in config file with NSD3 */ + OUTYY(("P(server_ip4_only:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else if(strcmp((yyvsp[0].str), "yes")==0) { + cfg_parser->opt->do_ip4 = 1; + cfg_parser->opt->do_ip6 = 0; + } + } +#line 1784 "configparser.c" /* yacc.c:1646 */ + break; + + case 68: +#line 191 "configparser.y" /* yacc.c:1646 */ + { + /* for backwards compatibility in config file with NSD3 */ + OUTYY(("P(server_ip6_only:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else if(strcmp((yyvsp[0].str), "yes")==0) { + cfg_parser->opt->do_ip6 = 1; + cfg_parser->opt->do_ip4 = 0; + } + } +#line 1799 "configparser.c" /* yacc.c:1646 */ + break; + + case 69: +#line 203 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->do_ip4 = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1810 "configparser.c" /* yacc.c:1646 */ + break; + + case 70: +#line 211 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->do_ip6 = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1821 "configparser.c" /* yacc.c:1646 */ + break; + + case 71: +#line 219 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_reuseport:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->reuseport = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 1832 "configparser.c" /* yacc.c:1646 */ + break; + + case 72: +#line 227 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_database:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->database = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + if(cfg_parser->opt->database[0] == 0 && + cfg_parser->opt->zonefiles_write == 0) + cfg_parser->opt->zonefiles_write = ZONEFILES_WRITE_INTERVAL; + } +#line 1844 "configparser.c" /* yacc.c:1646 */ + break; + + case 73: +#line 236 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_identity:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->identity = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 1853 "configparser.c" /* yacc.c:1646 */ + break; + + case 74: +#line 242 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_version:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->version = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 1862 "configparser.c" /* yacc.c:1646 */ + break; + + case 75: +#line 248 "configparser.y" /* yacc.c:1646 */ + { + unsigned char* nsid = 0; + size_t nsid_len = 0; + + OUTYY(("P(server_nsid:%s)\n", (yyvsp[0].str))); + + if (strncasecmp((yyvsp[0].str), "ascii_", 6) == 0) { + nsid_len = strlen((yyvsp[0].str)+6); + if(nsid_len < 65535) { + cfg_parser->opt->nsid = region_alloc(cfg_parser->opt->region, nsid_len*2+1); + hex_ntop((uint8_t*)(yyvsp[0].str)+6, nsid_len, (char*)cfg_parser->opt->nsid, nsid_len*2+1); + } else + yyerror("NSID too long"); + } else if (strlen((yyvsp[0].str)) % 2 != 0) { + yyerror("the NSID must be a hex string of an even length."); + } else { + nsid_len = strlen((yyvsp[0].str)) / 2; + if(nsid_len < 65535) { + nsid = xalloc(nsid_len); + if (hex_pton((yyvsp[0].str), nsid, nsid_len) == -1) + yyerror("hex string cannot be parsed in NSID."); + else + cfg_parser->opt->nsid = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + free(nsid); + } else + yyerror("NSID too long"); + } + } +#line 1895 "configparser.c" /* yacc.c:1646 */ + break; + + case 76: +#line 278 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_logfile:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->logfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 1904 "configparser.c" /* yacc.c:1646 */ + break; + + case 77: +#line 284 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else { + cfg_parser->opt->log_time_ascii = (strcmp((yyvsp[0].str), "yes")==0); + log_time_asc = cfg_parser->opt->log_time_ascii; + } + } +#line 1918 "configparser.c" /* yacc.c:1646 */ + break; + + case 78: +#line 295 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_round_robin:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else { + cfg_parser->opt->round_robin = (strcmp((yyvsp[0].str), "yes")==0); + round_robin = cfg_parser->opt->round_robin; + } + } +#line 1932 "configparser.c" /* yacc.c:1646 */ + break; + + case 79: +#line 306 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else { + cfg_parser->opt->minimal_responses = (strcmp((yyvsp[0].str), "yes")==0); + minimal_responses = cfg_parser->opt->minimal_responses; + } + } +#line 1946 "configparser.c" /* yacc.c:1646 */ + break; + + case 80: +#line 317 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_refuse_any:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else { + cfg_parser->opt->refuse_any = (strcmp((yyvsp[0].str), "yes")==0); + } + } +#line 1959 "configparser.c" /* yacc.c:1646 */ + break; + + case 81: +#line 327 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_server_count:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) <= 0) + yyerror("number greater than zero expected"); + else cfg_parser->opt->server_count = atoi((yyvsp[0].str)); + } +#line 1970 "configparser.c" /* yacc.c:1646 */ + break; + + case 82: +#line 335 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_tcp_count:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) <= 0) + yyerror("number greater than zero expected"); + else cfg_parser->opt->tcp_count = atoi((yyvsp[0].str)); + } +#line 1981 "configparser.c" /* yacc.c:1646 */ + break; + + case 83: +#line 343 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_pidfile:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->pidfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 1990 "configparser.c" /* yacc.c:1646 */ + break; + + case 84: +#line 349 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_port:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->port = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 1999 "configparser.c" /* yacc.c:1646 */ + break; + + case 85: +#line 355 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_statistics:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else cfg_parser->opt->statistics = atoi((yyvsp[0].str)); + } +#line 2010 "configparser.c" /* yacc.c:1646 */ + break; + + case 86: +#line 363 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_chroot:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->chroot = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2019 "configparser.c" /* yacc.c:1646 */ + break; + + case 87: +#line 369 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_username:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->username = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2028 "configparser.c" /* yacc.c:1646 */ + break; + + case 88: +#line 375 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_zonesdir:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->zonesdir = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2037 "configparser.c" /* yacc.c:1646 */ + break; + + case 89: +#line 381 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_zonelistfile:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->zonelistfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2046 "configparser.c" /* yacc.c:1646 */ + break; + + case 90: +#line 387 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_xfrdir:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->xfrdir = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2055 "configparser.c" /* yacc.c:1646 */ + break; + + case 91: +#line 393 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_difffile:%s)\n", (yyvsp[0].str))); + /* ignore the value for backwards compatibility in config file*/ + } +#line 2064 "configparser.c" /* yacc.c:1646 */ + break; + + case 92: +#line 399 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_xfrdfile:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->xfrdfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2073 "configparser.c" /* yacc.c:1646 */ + break; + + case 93: +#line 405 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_xfrd_reload_timeout:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->xfrd_reload_timeout = atoi((yyvsp[0].str)); + } +#line 2084 "configparser.c" /* yacc.c:1646 */ + break; + + case 94: +#line 413 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_tcp_query_count:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->tcp_query_count = atoi((yyvsp[0].str)); + } +#line 2095 "configparser.c" /* yacc.c:1646 */ + break; + + case 95: +#line 421 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_tcp_timeout:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->tcp_timeout = atoi((yyvsp[0].str)); + } +#line 2106 "configparser.c" /* yacc.c:1646 */ + break; + + case 96: +#line 429 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_tcp_mss:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->tcp_mss = atoi((yyvsp[0].str)); + } +#line 2117 "configparser.c" /* yacc.c:1646 */ + break; + + case 97: +#line 437 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_outgoing_tcp_mss:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->outgoing_tcp_mss = atoi((yyvsp[0].str)); + } +#line 2128 "configparser.c" /* yacc.c:1646 */ + break; + + case 98: +#line 445 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_ipv4_edns_size:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->ipv4_edns_size = atoi((yyvsp[0].str)); + } +#line 2139 "configparser.c" /* yacc.c:1646 */ + break; + + case 99: +#line 453 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_ipv6_edns_size:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + cfg_parser->opt->ipv6_edns_size = atoi((yyvsp[0].str)); + } +#line 2150 "configparser.c" /* yacc.c:1646 */ + break; + + case 100: +#line 461 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_rrl_size:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + if(atoi((yyvsp[0].str)) <= 0) + yyerror("number greater than zero expected"); + cfg_parser->opt->rrl_size = atoi((yyvsp[0].str)); +#endif + } +#line 2163 "configparser.c" /* yacc.c:1646 */ + break; + + case 101: +#line 471 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_rrl_ratelimit:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + cfg_parser->opt->rrl_ratelimit = atoi((yyvsp[0].str)); +#endif + } +#line 2174 "configparser.c" /* yacc.c:1646 */ + break; + + case 102: +#line 479 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_rrl_slip:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + if(atoi((yyvsp[0].str)) < 0) + yyerror("number equal or greater than zero expected"); + cfg_parser->opt->rrl_slip = atoi((yyvsp[0].str)); +#endif + } +#line 2187 "configparser.c" /* yacc.c:1646 */ + break; + + case 103: +#line 489 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_rrl_ipv4_prefix_length:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + if(atoi((yyvsp[0].str)) < 0 || atoi((yyvsp[0].str)) > 32) + yyerror("invalid IPv4 prefix length"); + cfg_parser->opt->rrl_ipv4_prefix_length = atoi((yyvsp[0].str)); +#endif + } +#line 2200 "configparser.c" /* yacc.c:1646 */ + break; + + case 104: +#line 499 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_rrl_ipv6_prefix_length:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + if(atoi((yyvsp[0].str)) < 0 || atoi((yyvsp[0].str)) > 64) + yyerror("invalid IPv6 prefix length"); + cfg_parser->opt->rrl_ipv6_prefix_length = atoi((yyvsp[0].str)); +#endif + } +#line 2213 "configparser.c" /* yacc.c:1646 */ + break; + + case 105: +#line 509 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_rrl_whitelist_ratelimit:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + cfg_parser->opt->rrl_whitelist_ratelimit = atoi((yyvsp[0].str)); +#endif + } +#line 2224 "configparser.c" /* yacc.c:1646 */ + break; + + case 106: +#line 517 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_zonefiles_check:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->zonefiles_check = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 2235 "configparser.c" /* yacc.c:1646 */ + break; + + case 107: +#line 525 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(server_zonefiles_write:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else cfg_parser->opt->zonefiles_write = atoi((yyvsp[0].str)); + } +#line 2246 "configparser.c" /* yacc.c:1646 */ + break; + + case 108: +#line 534 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("\nP(remote-control:)\n")); + } +#line 2254 "configparser.c" /* yacc.c:1646 */ + break; + + case 118: +#line 545 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(control_enable:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->opt->control_enable = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 2265 "configparser.c" /* yacc.c:1646 */ + break; + + case 119: +#line 553 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(control_port:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0) + yyerror("control port number expected"); + else cfg_parser->opt->control_port = atoi((yyvsp[0].str)); + } +#line 2276 "configparser.c" /* yacc.c:1646 */ + break; + + case 120: +#line 561 "configparser.y" /* yacc.c:1646 */ + { + ip_address_option_type* last = NULL; + ip_address_option_type* o = (ip_address_option_type*)region_alloc( + cfg_parser->opt->region, sizeof(ip_address_option_type)); + OUTYY(("P(control_interface:%s)\n", (yyvsp[0].str))); + /* append at end */ + last = cfg_parser->opt->control_interface; + while(last && last->next) + last = last->next; + if(last == NULL) + cfg_parser->opt->control_interface = o; + else last->next = o; + o->next = NULL; + o->address = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2296 "configparser.c" /* yacc.c:1646 */ + break; + + case 121: +#line 578 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->server_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2305 "configparser.c" /* yacc.c:1646 */ + break; + + case 122: +#line 584 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->server_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2314 "configparser.c" /* yacc.c:1646 */ + break; + + case 123: +#line 590 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->control_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2323 "configparser.c" /* yacc.c:1646 */ + break; + + case 124: +#line 596 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[0].str))); + cfg_parser->opt->control_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2332 "configparser.c" /* yacc.c:1646 */ + break; + + case 125: +#line 604 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("\nP(pattern:)\n")); + if(cfg_parser->current_zone) { + if(!cfg_parser->current_zone->name) + c_error("previous zone has no name"); + else { + if(!nsd_options_insert_zone(cfg_parser->opt, + cfg_parser->current_zone)) + c_error("duplicate zone"); + } + if(!cfg_parser->current_zone->pattern) + c_error("previous zone has no pattern"); + cfg_parser->current_zone = NULL; + } + if(cfg_parser->current_pattern) { + if(!cfg_parser->current_pattern->pname) + c_error("previous pattern has no name"); + else { + if(!nsd_options_insert_pattern(cfg_parser->opt, + cfg_parser->current_pattern)) + c_error_msg("duplicate pattern %s", + cfg_parser->current_pattern->pname); + } + } + cfg_parser->current_pattern = pattern_options_create( + cfg_parser->opt->region); + cfg_parser->current_allow_notify = 0; + cfg_parser->current_request_xfr = 0; + cfg_parser->current_notify = 0; + cfg_parser->current_provide_xfr = 0; + cfg_parser->current_outgoing_interface = 0; + } +#line 2369 "configparser.c" /* yacc.c:1646 */ + break; + + case 147: +#line 646 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(pattern_name:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_pattern); +#endif + if(strchr((yyvsp[0].str), ' ')) + c_error_msg("space is not allowed in pattern name: " + "'%s'", (yyvsp[0].str)); + cfg_parser->current_pattern->pname = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2384 "configparser.c" /* yacc.c:1646 */ + break; + + case 148: +#line 658 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(include-pattern:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_pattern); +#endif + config_apply_pattern((yyvsp[0].str)); + } +#line 2396 "configparser.c" /* yacc.c:1646 */ + break; + + case 149: +#line 669 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("\nP(zone:)\n")); + if(cfg_parser->current_zone) { + if(!cfg_parser->current_zone->name) + c_error("previous zone has no name"); + else { + if(!nsd_options_insert_zone(cfg_parser->opt, + cfg_parser->current_zone)) + c_error("duplicate zone"); + } + if(!cfg_parser->current_zone->pattern) + c_error("previous zone has no pattern"); + } + if(cfg_parser->current_pattern) { + if(!cfg_parser->current_pattern->pname) + c_error("previous pattern has no name"); + else { + if(!nsd_options_insert_pattern(cfg_parser->opt, + cfg_parser->current_pattern)) + c_error_msg("duplicate pattern %s", + cfg_parser->current_pattern->pname); + } + } + cfg_parser->current_zone = zone_options_create(cfg_parser->opt->region); + cfg_parser->current_zone->part_of_config = 1; + cfg_parser->current_pattern = pattern_options_create( + cfg_parser->opt->region); + cfg_parser->current_pattern->implicit = 1; + cfg_parser->current_zone->pattern = cfg_parser->current_pattern; + cfg_parser->current_allow_notify = 0; + cfg_parser->current_request_xfr = 0; + cfg_parser->current_notify = 0; + cfg_parser->current_provide_xfr = 0; + cfg_parser->current_outgoing_interface = 0; + } +#line 2436 "configparser.c" /* yacc.c:1646 */ + break; + + case 154: +#line 708 "configparser.y" /* yacc.c:1646 */ + { + char* s; + OUTYY(("P(zone_name:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_zone); + assert(cfg_parser->current_pattern); +#endif + cfg_parser->current_zone->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + s = (char*)region_alloc(cfg_parser->opt->region, + strlen((yyvsp[0].str))+strlen(PATTERN_IMPLICIT_MARKER)+1); + memmove(s, PATTERN_IMPLICIT_MARKER, + strlen(PATTERN_IMPLICIT_MARKER)); + memmove(s+strlen(PATTERN_IMPLICIT_MARKER), (yyvsp[0].str), strlen((yyvsp[0].str))+1); + if(pattern_options_find(cfg_parser->opt, s)) + c_error_msg("zone %s cannot be created because " + "implicit pattern %s already exists", (yyvsp[0].str), s); + cfg_parser->current_pattern->pname = s; + } +#line 2459 "configparser.c" /* yacc.c:1646 */ + break; + + case 155: +#line 728 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zonefile:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_pattern); +#endif + cfg_parser->current_pattern->zonefile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2471 "configparser.c" /* yacc.c:1646 */ + break; + + case 156: +#line 737 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zonestats:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_pattern); +#endif + cfg_parser->current_pattern->zonestats = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + } +#line 2483 "configparser.c" /* yacc.c:1646 */ + break; + + case 157: +#line 746 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str)); + OUTYY(("P(allow_notify:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); + if(cfg_parser->current_allow_notify) + cfg_parser->current_allow_notify->next = acl; + else + cfg_parser->current_pattern->allow_notify = acl; + cfg_parser->current_allow_notify = acl; + } +#line 2497 "configparser.c" /* yacc.c:1646 */ + break; + + case 158: +#line 757 "configparser.y" /* yacc.c:1646 */ + { + } +#line 2504 "configparser.c" /* yacc.c:1646 */ + break; + + case 159: +#line 761 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(size_limit_xfr:%s)\n", (yyvsp[0].str))); + if(atoll((yyvsp[0].str)) < 0) + yyerror("number >= 0 expected"); + else cfg_parser->current_pattern->size_limit_xfr = atoll((yyvsp[0].str)); + } +#line 2515 "configparser.c" /* yacc.c:1646 */ + break; + + case 160: +#line 769 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str)); + OUTYY(("P(request_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); + if(acl->blocked) c_error("blocked address used for request-xfr"); + if(acl->rangetype!=acl_range_single) c_error("address range used for request-xfr"); + if(cfg_parser->current_request_xfr) + cfg_parser->current_request_xfr->next = acl; + else + cfg_parser->current_pattern->request_xfr = acl; + cfg_parser->current_request_xfr = acl; + } +#line 2531 "configparser.c" /* yacc.c:1646 */ + break; + + case 161: +#line 781 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str)); + acl->use_axfr_only = 1; + OUTYY(("P(request_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); + if(acl->blocked) c_error("blocked address used for request-xfr"); + if(acl->rangetype!=acl_range_single) c_error("address range used for request-xfr"); + if(cfg_parser->current_request_xfr) + cfg_parser->current_request_xfr->next = acl; + else + cfg_parser->current_pattern->request_xfr = acl; + cfg_parser->current_request_xfr = acl; + } +#line 2548 "configparser.c" /* yacc.c:1646 */ + break; + + case 162: +#line 794 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str)); + acl->allow_udp = 1; + OUTYY(("P(request_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); + if(acl->blocked) c_error("blocked address used for request-xfr"); + if(acl->rangetype!=acl_range_single) c_error("address range used for request-xfr"); + if(cfg_parser->current_request_xfr) + cfg_parser->current_request_xfr->next = acl; + else + cfg_parser->current_pattern->request_xfr = acl; + cfg_parser->current_request_xfr = acl; + } +#line 2565 "configparser.c" /* yacc.c:1646 */ + break; + + case 163: +#line 808 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str)); + OUTYY(("P(notify:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); + if(acl->blocked) c_error("blocked address used for notify"); + if(acl->rangetype!=acl_range_single) c_error("address range used for notify"); + if(cfg_parser->current_notify) + cfg_parser->current_notify->next = acl; + else + cfg_parser->current_pattern->notify = acl; + cfg_parser->current_notify = acl; + } +#line 2581 "configparser.c" /* yacc.c:1646 */ + break; + + case 164: +#line 821 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(notify_retry:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else { + cfg_parser->current_pattern->notify_retry = atoi((yyvsp[0].str)); + cfg_parser->current_pattern->notify_retry_is_default=0; + } + } +#line 2595 "configparser.c" /* yacc.c:1646 */ + break; + + case 165: +#line 832 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str)); + OUTYY(("P(provide_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); + if(cfg_parser->current_provide_xfr) + cfg_parser->current_provide_xfr->next = acl; + else + cfg_parser->current_pattern->provide_xfr = acl; + cfg_parser->current_provide_xfr = acl; + } +#line 2609 "configparser.c" /* yacc.c:1646 */ + break; + + case 166: +#line 843 "configparser.y" /* yacc.c:1646 */ + { + acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[0].str), "NOKEY"); + OUTYY(("P(outgoing_interface:%s)\n", (yyvsp[0].str))); + if(acl->rangetype!=acl_range_single) c_error("address range used for outgoing interface"); + if(cfg_parser->current_outgoing_interface) + cfg_parser->current_outgoing_interface->next = acl; + else + cfg_parser->current_pattern->outgoing_interface = acl; + cfg_parser->current_outgoing_interface = acl; + } +#line 2624 "configparser.c" /* yacc.c:1646 */ + break; + + case 167: +#line 855 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(allow_axfr_fallback:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else { + cfg_parser->current_pattern->allow_axfr_fallback = (strcmp((yyvsp[0].str), "yes")==0); + cfg_parser->current_pattern->allow_axfr_fallback_is_default = 0; + } + } +#line 2638 "configparser.c" /* yacc.c:1646 */ + break; + + case 168: +#line 866 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zone_rrl_whitelist:%s)\n", (yyvsp[0].str))); +#ifdef RATELIMIT + cfg_parser->current_pattern->rrl_whitelist |= rrlstr2type((yyvsp[0].str)); +#endif + } +#line 2649 "configparser.c" /* yacc.c:1646 */ + break; + + case 169: +#line 874 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zone_max_refresh_time:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else { + cfg_parser->current_pattern->max_refresh_time = atoi((yyvsp[0].str)); + cfg_parser->current_pattern->max_refresh_time_is_default = 0; + } +} +#line 2663 "configparser.c" /* yacc.c:1646 */ + break; + + case 170: +#line 884 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zone_min_refresh_time:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else { + cfg_parser->current_pattern->min_refresh_time = atoi((yyvsp[0].str)); + cfg_parser->current_pattern->min_refresh_time_is_default = 0; + } +} +#line 2677 "configparser.c" /* yacc.c:1646 */ + break; + + case 171: +#line 894 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zone_max_retry_time:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else { + cfg_parser->current_pattern->max_retry_time = atoi((yyvsp[0].str)); + cfg_parser->current_pattern->max_retry_time_is_default = 0; + } +} +#line 2691 "configparser.c" /* yacc.c:1646 */ + break; + + case 172: +#line 904 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zone_min_retry_time:%s)\n", (yyvsp[0].str))); + if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) + yyerror("number expected"); + else { + cfg_parser->current_pattern->min_retry_time = atoi((yyvsp[0].str)); + cfg_parser->current_pattern->min_retry_time_is_default = 0; + } +} +#line 2705 "configparser.c" /* yacc.c:1646 */ + break; + + case 173: +#line 914 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(zone_multi_master_check:%s)\n", (yyvsp[0].str))); + if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->current_pattern->multi_master_check = (strcmp((yyvsp[0].str), "yes")==0); + } +#line 2716 "configparser.c" /* yacc.c:1646 */ + break; + + case 174: +#line 923 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("\nP(key:)\n")); + if(cfg_parser->current_key) { + if(!cfg_parser->current_key->name) c_error("previous key has no name"); + if(!cfg_parser->current_key->algorithm) c_error("previous key has no algorithm"); + if(!cfg_parser->current_key->secret) c_error("previous key has no secret blob"); + key_options_insert(cfg_parser->opt, cfg_parser->current_key); + } + cfg_parser->current_key = key_options_create(cfg_parser->opt->region); + cfg_parser->current_key->algorithm = region_strdup(cfg_parser->opt->region, "sha256"); + } +#line 2732 "configparser.c" /* yacc.c:1646 */ + break; + + case 180: +#line 938 "configparser.y" /* yacc.c:1646 */ + { + const dname_type* d; + OUTYY(("P(key_name:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_key); +#endif + cfg_parser->current_key->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + d = dname_parse(cfg_parser->opt->region, (yyvsp[0].str)); + if(!d) c_error_msg("Failed to parse tsig key name %s", (yyvsp[0].str)); + else region_recycle(cfg_parser->opt->region, (void*)d, + dname_total_size(d)); + } +#line 2749 "configparser.c" /* yacc.c:1646 */ + break; + + case 181: +#line 952 "configparser.y" /* yacc.c:1646 */ + { + OUTYY(("P(key_algorithm:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_key); +#endif + if(cfg_parser->current_key->algorithm) + region_recycle(cfg_parser->opt->region, cfg_parser->current_key->algorithm, strlen(cfg_parser->current_key->algorithm)+1); + cfg_parser->current_key->algorithm = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + if(tsig_get_algorithm_by_name((yyvsp[0].str)) == NULL) + c_error_msg("Bad tsig algorithm %s", (yyvsp[0].str)); + } +#line 2765 "configparser.c" /* yacc.c:1646 */ + break; + + case 182: +#line 965 "configparser.y" /* yacc.c:1646 */ + { + uint8_t data[16384]; + int size; + OUTYY(("key_secret:%s)\n", (yyvsp[0].str))); +#ifndef NDEBUG + assert(cfg_parser->current_key); +#endif + cfg_parser->current_key->secret = region_strdup(cfg_parser->opt->region, (yyvsp[0].str)); + size = b64_pton((yyvsp[0].str), data, sizeof(data)); + if(size == -1) { + c_error_msg("Cannot base64 decode tsig secret %s", + cfg_parser->current_key->name? + cfg_parser->current_key->name:""); + } else if(size != 0) { + memset(data, 0xdd, size); /* wipe secret */ + } + } +#line 2787 "configparser.c" /* yacc.c:1646 */ + break; + + +#line 2791 "configparser.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} +#line 984 "configparser.y" /* yacc.c:1906 */ + + +/* parse helper routines could be here */ diff --git a/external/bsd/nsd/dist/configparser.h b/external/bsd/nsd/dist/configparser.h new file mode 100644 index 000000000000..8592a0d7a026 --- /dev/null +++ b/external/bsd/nsd/dist/configparser.h @@ -0,0 +1,254 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_YY_CONFIGPARSER_H_INCLUDED +# define YY_YY_CONFIGPARSER_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + SPACE = 258, + LETTER = 259, + NEWLINE = 260, + COMMENT = 261, + COLON = 262, + ANY = 263, + ZONESTR = 264, + STRING = 265, + VAR_SERVER = 266, + VAR_NAME = 267, + VAR_IP_ADDRESS = 268, + VAR_IP_TRANSPARENT = 269, + VAR_DEBUG_MODE = 270, + VAR_IP4_ONLY = 271, + VAR_IP6_ONLY = 272, + VAR_DATABASE = 273, + VAR_IDENTITY = 274, + VAR_NSID = 275, + VAR_LOGFILE = 276, + VAR_SERVER_COUNT = 277, + VAR_TCP_COUNT = 278, + VAR_PIDFILE = 279, + VAR_PORT = 280, + VAR_STATISTICS = 281, + VAR_CHROOT = 282, + VAR_USERNAME = 283, + VAR_ZONESDIR = 284, + VAR_XFRDFILE = 285, + VAR_DIFFFILE = 286, + VAR_XFRD_RELOAD_TIMEOUT = 287, + VAR_TCP_QUERY_COUNT = 288, + VAR_TCP_TIMEOUT = 289, + VAR_IPV4_EDNS_SIZE = 290, + VAR_IPV6_EDNS_SIZE = 291, + VAR_DO_IP4 = 292, + VAR_DO_IP6 = 293, + VAR_TCP_MSS = 294, + VAR_OUTGOING_TCP_MSS = 295, + VAR_IP_FREEBIND = 296, + VAR_ZONEFILE = 297, + VAR_ZONE = 298, + VAR_ALLOW_NOTIFY = 299, + VAR_REQUEST_XFR = 300, + VAR_NOTIFY = 301, + VAR_PROVIDE_XFR = 302, + VAR_SIZE_LIMIT_XFR = 303, + VAR_NOTIFY_RETRY = 304, + VAR_OUTGOING_INTERFACE = 305, + VAR_ALLOW_AXFR_FALLBACK = 306, + VAR_KEY = 307, + VAR_ALGORITHM = 308, + VAR_SECRET = 309, + VAR_AXFR = 310, + VAR_UDP = 311, + VAR_VERBOSITY = 312, + VAR_HIDE_VERSION = 313, + VAR_PATTERN = 314, + VAR_INCLUDEPATTERN = 315, + VAR_ZONELISTFILE = 316, + VAR_REMOTE_CONTROL = 317, + VAR_CONTROL_ENABLE = 318, + VAR_CONTROL_INTERFACE = 319, + VAR_CONTROL_PORT = 320, + VAR_SERVER_KEY_FILE = 321, + VAR_SERVER_CERT_FILE = 322, + VAR_CONTROL_KEY_FILE = 323, + VAR_CONTROL_CERT_FILE = 324, + VAR_XFRDIR = 325, + VAR_RRL_SIZE = 326, + VAR_RRL_RATELIMIT = 327, + VAR_RRL_SLIP = 328, + VAR_RRL_IPV4_PREFIX_LENGTH = 329, + VAR_RRL_IPV6_PREFIX_LENGTH = 330, + VAR_RRL_WHITELIST_RATELIMIT = 331, + VAR_RRL_WHITELIST = 332, + VAR_ZONEFILES_CHECK = 333, + VAR_ZONEFILES_WRITE = 334, + VAR_LOG_TIME_ASCII = 335, + VAR_ROUND_ROBIN = 336, + VAR_ZONESTATS = 337, + VAR_REUSEPORT = 338, + VAR_VERSION = 339, + VAR_MAX_REFRESH_TIME = 340, + VAR_MIN_REFRESH_TIME = 341, + VAR_MAX_RETRY_TIME = 342, + VAR_MIN_RETRY_TIME = 343, + VAR_MULTI_MASTER_CHECK = 344, + VAR_MINIMAL_RESPONSES = 345, + VAR_REFUSE_ANY = 346, + VAR_USE_SYSTEMD = 347 + }; +#endif +/* Tokens. */ +#define SPACE 258 +#define LETTER 259 +#define NEWLINE 260 +#define COMMENT 261 +#define COLON 262 +#define ANY 263 +#define ZONESTR 264 +#define STRING 265 +#define VAR_SERVER 266 +#define VAR_NAME 267 +#define VAR_IP_ADDRESS 268 +#define VAR_IP_TRANSPARENT 269 +#define VAR_DEBUG_MODE 270 +#define VAR_IP4_ONLY 271 +#define VAR_IP6_ONLY 272 +#define VAR_DATABASE 273 +#define VAR_IDENTITY 274 +#define VAR_NSID 275 +#define VAR_LOGFILE 276 +#define VAR_SERVER_COUNT 277 +#define VAR_TCP_COUNT 278 +#define VAR_PIDFILE 279 +#define VAR_PORT 280 +#define VAR_STATISTICS 281 +#define VAR_CHROOT 282 +#define VAR_USERNAME 283 +#define VAR_ZONESDIR 284 +#define VAR_XFRDFILE 285 +#define VAR_DIFFFILE 286 +#define VAR_XFRD_RELOAD_TIMEOUT 287 +#define VAR_TCP_QUERY_COUNT 288 +#define VAR_TCP_TIMEOUT 289 +#define VAR_IPV4_EDNS_SIZE 290 +#define VAR_IPV6_EDNS_SIZE 291 +#define VAR_DO_IP4 292 +#define VAR_DO_IP6 293 +#define VAR_TCP_MSS 294 +#define VAR_OUTGOING_TCP_MSS 295 +#define VAR_IP_FREEBIND 296 +#define VAR_ZONEFILE 297 +#define VAR_ZONE 298 +#define VAR_ALLOW_NOTIFY 299 +#define VAR_REQUEST_XFR 300 +#define VAR_NOTIFY 301 +#define VAR_PROVIDE_XFR 302 +#define VAR_SIZE_LIMIT_XFR 303 +#define VAR_NOTIFY_RETRY 304 +#define VAR_OUTGOING_INTERFACE 305 +#define VAR_ALLOW_AXFR_FALLBACK 306 +#define VAR_KEY 307 +#define VAR_ALGORITHM 308 +#define VAR_SECRET 309 +#define VAR_AXFR 310 +#define VAR_UDP 311 +#define VAR_VERBOSITY 312 +#define VAR_HIDE_VERSION 313 +#define VAR_PATTERN 314 +#define VAR_INCLUDEPATTERN 315 +#define VAR_ZONELISTFILE 316 +#define VAR_REMOTE_CONTROL 317 +#define VAR_CONTROL_ENABLE 318 +#define VAR_CONTROL_INTERFACE 319 +#define VAR_CONTROL_PORT 320 +#define VAR_SERVER_KEY_FILE 321 +#define VAR_SERVER_CERT_FILE 322 +#define VAR_CONTROL_KEY_FILE 323 +#define VAR_CONTROL_CERT_FILE 324 +#define VAR_XFRDIR 325 +#define VAR_RRL_SIZE 326 +#define VAR_RRL_RATELIMIT 327 +#define VAR_RRL_SLIP 328 +#define VAR_RRL_IPV4_PREFIX_LENGTH 329 +#define VAR_RRL_IPV6_PREFIX_LENGTH 330 +#define VAR_RRL_WHITELIST_RATELIMIT 331 +#define VAR_RRL_WHITELIST 332 +#define VAR_ZONEFILES_CHECK 333 +#define VAR_ZONEFILES_WRITE 334 +#define VAR_LOG_TIME_ASCII 335 +#define VAR_ROUND_ROBIN 336 +#define VAR_ZONESTATS 337 +#define VAR_REUSEPORT 338 +#define VAR_VERSION 339 +#define VAR_MAX_REFRESH_TIME 340 +#define VAR_MIN_REFRESH_TIME 341 +#define VAR_MAX_RETRY_TIME 342 +#define VAR_MIN_RETRY_TIME 343 +#define VAR_MULTI_MASTER_CHECK 344 +#define VAR_MINIMAL_RESPONSES 345 +#define VAR_REFUSE_ANY 346 +#define VAR_USE_SYSTEMD 347 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ +#line 42 "configparser.y" /* yacc.c:1909 */ + + char* str; + +#line 242 "configparser.h" /* yacc.c:1909 */ +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_CONFIGPARSER_H_INCLUDED */ diff --git a/external/bsd/nsd/dist/zlexer.c b/external/bsd/nsd/dist/zlexer.c new file mode 100644 index 000000000000..aa3140a6d0fa --- /dev/null +++ b/external/bsd/nsd/dist/zlexer.c @@ -0,0 +1,2317 @@ +#include "config.h" + +#line 3 "" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +typedef unsigned char YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + +typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yynoreturn yy_fatal_error (yyconst char* msg ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + (yytext_ptr) -= (yy_more_len); \ + yyleng = (int) (yy_cp - (yytext_ptr)); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 25 +#define YY_END_OF_BUFFER 26 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[70] = + { 0, + 0, 0, 0, 0, 16, 16, 20, 20, 26, 23, + 14, 11, 11, 19, 24, 12, 13, 8, 1, 9, + 23, 24, 6, 5, 16, 17, 16, 18, 20, 21, + 22, 25, 23, 23, 14, 1, 1, 23, 23, 10, + 15, 23, 7, 7, 7, 7, 6, 16, 16, 16, + 16, 20, 0, 23, 23, 7, 7, 7, 7, 7, + 2, 7, 7, 7, 7, 7, 3, 4, 0 + } ; + +static yyconst YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 7, 1, 1, 1, 8, + 9, 1, 1, 1, 1, 10, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, + 1, 1, 1, 12, 13, 13, 14, 15, 16, 13, + 17, 13, 18, 13, 13, 19, 13, 20, 21, 13, + 13, 22, 13, 23, 24, 13, 13, 13, 13, 13, + 25, 26, 27, 1, 1, 1, 13, 13, 28, 29, + + 30, 13, 31, 13, 32, 13, 13, 33, 13, 34, + 35, 13, 13, 36, 13, 37, 38, 13, 13, 13, + 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst YY_CHAR yy_meta[39] = + { 0, + 1, 2, 3, 2, 4, 1, 1, 2, 2, 2, + 2, 1, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 1, 1, 6, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5 + } ; + +static yyconst flex_uint16_t yy_base[83] = + { 0, + 0, 25, 113, 112, 12, 14, 16, 17, 114, 87, + 12, 218, 218, 218, 218, 218, 218, 218, 0, 86, + 50, 59, 0, 218, 85, 218, 18, 218, 84, 218, + 218, 103, 81, 95, 14, 0, 0, 76, 75, 74, + 64, 120, 0, 28, 27, 27, 0, 63, 20, 59, + 39, 57, 63, 5, 0, 41, 39, 48, 51, 55, + 0, 49, 56, 63, 59, 79, 0, 0, 218, 146, + 152, 158, 164, 170, 176, 182, 1, 188, 194, 199, + 205, 211 + } ; + +static yyconst flex_int16_t yy_def[83] = + { 0, + 70, 70, 71, 71, 72, 72, 73, 73, 69, 74, + 69, 69, 69, 69, 69, 69, 69, 69, 75, 74, + 76, 77, 78, 69, 79, 69, 80, 69, 81, 69, + 69, 81, 74, 82, 69, 75, 75, 74, 74, 74, + 74, 82, 77, 77, 77, 77, 78, 79, 80, 79, + 80, 81, 81, 74, 42, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 0, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69 + } ; + +static yyconst flex_uint16_t yy_nxt[257] = + { 0, + 69, 11, 12, 13, 14, 43, 15, 16, 17, 18, + 19, 20, 69, 35, 26, 35, 26, 69, 30, 30, + 31, 31, 36, 69, 36, 21, 11, 12, 13, 14, + 34, 22, 16, 17, 18, 19, 20, 27, 28, 27, + 28, 32, 32, 51, 48, 51, 48, 56, 57, 58, + 21, 39, 39, 39, 59, 40, 60, 39, 39, 39, + 39, 56, 57, 58, 51, 48, 61, 52, 59, 62, + 60, 63, 64, 65, 41, 42, 44, 66, 67, 45, + 61, 46, 53, 62, 49, 63, 64, 65, 49, 34, + 44, 66, 67, 45, 68, 46, 33, 33, 33, 34, + + 34, 34, 33, 33, 33, 33, 34, 52, 68, 53, + 49, 34, 34, 69, 24, 24, 69, 69, 69, 69, + 55, 33, 33, 33, 69, 69, 69, 33, 33, 33, + 33, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 55, 10, 10, 10, 10, + 10, 10, 23, 23, 23, 23, 23, 23, 25, 25, + 25, 25, 25, 25, 29, 29, 29, 29, 29, 29, + 33, 69, 69, 33, 33, 33, 37, 37, 69, 37, + 37, 37, 38, 38, 38, 38, 38, 38, 47, 47, + 69, 47, 47, 47, 48, 48, 69, 48, 48, 50, + + 50, 69, 50, 50, 50, 52, 52, 69, 69, 52, + 52, 54, 54, 54, 54, 54, 54, 9, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69 + } ; + +static yyconst flex_int16_t yy_chk[257] = + { 0, + 0, 1, 1, 1, 1, 77, 1, 1, 1, 1, + 1, 1, 0, 11, 5, 35, 6, 0, 7, 8, + 7, 8, 11, 0, 35, 1, 2, 2, 2, 2, + 54, 2, 2, 2, 2, 2, 2, 5, 5, 6, + 6, 7, 8, 27, 27, 49, 49, 44, 45, 46, + 2, 21, 21, 21, 56, 21, 57, 21, 21, 21, + 21, 44, 45, 46, 51, 51, 58, 53, 56, 59, + 57, 60, 62, 63, 21, 21, 22, 64, 65, 22, + 58, 22, 52, 59, 50, 60, 62, 63, 48, 41, + 22, 64, 65, 22, 66, 22, 34, 34, 34, 40, + + 39, 38, 34, 34, 34, 34, 33, 32, 66, 29, + 25, 20, 10, 9, 4, 3, 0, 0, 0, 0, + 34, 42, 42, 42, 0, 0, 0, 42, 42, 42, + 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 42, 70, 70, 70, 70, + 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, + 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, + 74, 0, 0, 74, 74, 74, 75, 75, 0, 75, + 75, 75, 76, 76, 76, 76, 76, 76, 78, 78, + 0, 78, 78, 78, 79, 79, 0, 79, 79, 80, + + 80, 0, 80, 80, 80, 81, 81, 0, 0, 81, + 81, 82, 82, 82, 82, 82, 82, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +static int yy_more_flag = 0; +static int yy_more_len = 0; +#define yymore() ((yy_more_flag) = 1) +#define YY_MORE_ADJ (yy_more_len) +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "zlexer.lex" +#line 2 "zlexer.lex" +/* + * zlexer.lex - lexical analyzer for (DNS) zone files + * + * Copyright (c) 2001-2006, NLnet Labs. All rights reserved + * + * See LICENSE for the license. + * + */ +/* because flex keeps having sign-unsigned compare problems that are unfixed*/ +#if defined(__clang__)||(defined(__GNUC__)&&((__GNUC__ >4)||(defined(__GNUC_MINOR__)&&(__GNUC__ ==4)&&(__GNUC_MINOR__ >=2)))) +#pragma GCC diagnostic ignored "-Wsign-compare" +#endif +/* ignore fallthrough warnings in the generated parse code case statements */ +#if defined(__clang__)||(defined(__GNUC__)&&(__GNUC__ >=7)) +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#endif + +#include "config.h" + +#include +#include +#include +#include + +#include "zonec.h" +#include "dname.h" +#include "zparser.h" + +#if 0 +#define LEXOUT(s) printf s /* used ONLY when debugging */ +#else +#define LEXOUT(s) +#endif + +enum lexer_state { + EXPECT_OWNER, + PARSING_OWNER, + PARSING_TTL_CLASS_TYPE, + PARSING_RDATA +}; + +static int parse_token(int token, char *yytext, enum lexer_state *lexer_state); + +static YY_BUFFER_STATE include_stack[MAXINCLUDES]; +static zparser_type zparser_stack[MAXINCLUDES]; +static int include_stack_ptr = 0; + +/* + * Saves the file specific variables on the include stack. + */ +static void +push_parser_state(FILE *input) +{ + zparser_stack[include_stack_ptr].filename = parser->filename; + zparser_stack[include_stack_ptr].line = parser->line; + zparser_stack[include_stack_ptr].origin = parser->origin; + include_stack[include_stack_ptr] = YY_CURRENT_BUFFER; + yy_switch_to_buffer(yy_create_buffer(input,YY_BUF_SIZE)); + ++include_stack_ptr; +} + +/* + * Restores the file specific variables from the include stack. + */ +static void +pop_parser_state(void) +{ + --include_stack_ptr; + parser->filename = zparser_stack[include_stack_ptr].filename; + parser->line = zparser_stack[include_stack_ptr].line; + parser->origin = zparser_stack[include_stack_ptr].origin; + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(include_stack[include_stack_ptr]); +} + +static YY_BUFFER_STATE oldstate; +/* Start string scan */ +void +parser_push_stringbuf(char* str) +{ + oldstate = YY_CURRENT_BUFFER; + yy_switch_to_buffer(yy_scan_string(str)); +} + +void +parser_pop_stringbuf(void) +{ + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(oldstate); + oldstate = NULL; +} + + static int paren_open = 0; + static enum lexer_state lexer_state = EXPECT_OWNER; +void +parser_flush(void) +{ + YY_FLUSH_BUFFER; + paren_open = 0; + lexer_state = EXPECT_OWNER; +} + +#ifndef yy_set_bol /* compat definition, for flex 2.4.6 */ +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_current_buffer->yy_ch_buf[0] = ((at_bol)?'\n':' '); \ + } +#endif + +#define YY_NO_INPUT 1 +#line 117 "zlexer.lex" +#ifndef YY_NO_UNPUT +#define YY_NO_UNPUT 1 +#endif +#ifndef YY_NO_INPUT +#define YY_NO_INPUT 1 +#endif + +#line 653 "" + +#define INITIAL 0 +#define incl 1 +#define bitlabel 2 +#define quotedstring 3 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * _in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * _out_str ); + + int yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int _line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +#line 139 "zlexer.lex" + +#line 877 "" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + (yy_more_len) = 0; + if ( (yy_more_flag) ) + { + (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); + (yy_more_flag) = 0; + } + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 70 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 218 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 140 "zlexer.lex" +/* ignore */ + YY_BREAK +case 2: +YY_RULE_SETUP +#line 141 "zlexer.lex" +{ lexer_state = PARSING_RDATA; return DOLLAR_TTL; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 142 "zlexer.lex" +{ lexer_state = PARSING_RDATA; return DOLLAR_ORIGIN; } + YY_BREAK +/* + * Handle $INCLUDE directives. See + * http://dinosaur.compilertools.net/flex/flex_12.html#SEC12. + */ +case 4: +YY_RULE_SETUP +#line 148 "zlexer.lex" +{ + BEGIN(incl); + /* ignore case statement fallthrough on incl flex rule */ +} + YY_BREAK +case 5: +/* rule 5 can match eol */ +#line 153 "zlexer.lex" +YY_RULE_SETUP +case YY_STATE_EOF(incl): +#line 153 "zlexer.lex" +{ + int error_occurred = parser->error_occurred; + BEGIN(INITIAL); + zc_error("missing file name in $INCLUDE directive"); + yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ + ++parser->line; + parser->error_occurred = error_occurred; +} + YY_BREAK +case 6: +YY_RULE_SETUP +#line 161 "zlexer.lex" +{ + char *tmp; + domain_type *origin = parser->origin; + int error_occurred = parser->error_occurred; + + BEGIN(INITIAL); + if (include_stack_ptr >= MAXINCLUDES ) { + zc_error("includes nested too deeply, skipped (>%d)", + MAXINCLUDES); + } else { + FILE *input; + + /* Remove trailing comment. */ + tmp = strrchr(yytext, ';'); + if (tmp) { + *tmp = '\0'; + } + strip_string(yytext); + + /* Parse origin for include file. */ + tmp = strrchr(yytext, ' '); + if (!tmp) { + tmp = strrchr(yytext, '\t'); + } + if (tmp) { + const dname_type *dname; + + /* split the original yytext */ + *tmp = '\0'; + strip_string(yytext); + + dname = dname_parse(parser->region, tmp + 1); + if (!dname) { + zc_error("incorrect include origin '%s'", + tmp + 1); + } else if (*(tmp + strlen(tmp + 1)) != '.') { + zc_error("$INCLUDE directive requires absolute domain name"); + } else { + origin = domain_table_insert( + parser->db->domains, dname); + } + } + + if (strlen(yytext) == 0) { + zc_error("missing file name in $INCLUDE directive"); + } else if (!(input = fopen(yytext, "r"))) { + zc_error("cannot open include file '%s': %s", + yytext, strerror(errno)); + } else { + /* Initialize parser for include file. */ + char *filename = region_strdup(parser->region, yytext); + push_parser_state(input); /* Destroys yytext. */ + parser->filename = filename; + parser->line = 1; + parser->origin = origin; + lexer_state = EXPECT_OWNER; + } + } + + parser->error_occurred = error_occurred; +} + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 222 "zlexer.lex" +{ + yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ + if (include_stack_ptr == 0) { + yyterminate(); + } else { + fclose(yyin); + pop_parser_state(); + } +} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 231 "zlexer.lex" +{ zc_warning("Unknown directive: %s", yytext); } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 232 "zlexer.lex" +{ + LEXOUT((". ")); + return parse_token('.', yytext, &lexer_state); +} + YY_BREAK +case 9: +YY_RULE_SETUP +#line 236 "zlexer.lex" +{ + LEXOUT(("@ ")); + return parse_token('@', yytext, &lexer_state); +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 240 "zlexer.lex" +{ + LEXOUT(("\\# ")); + return parse_token(URR, yytext, &lexer_state); +} + YY_BREAK +case 11: +/* rule 11 can match eol */ +YY_RULE_SETUP +#line 244 "zlexer.lex" +{ + ++parser->line; + if (!paren_open) { + lexer_state = EXPECT_OWNER; + LEXOUT(("NL\n")); + return NL; + } else { + LEXOUT(("SP ")); + return SP; + } +} + YY_BREAK +case 12: +YY_RULE_SETUP +#line 255 "zlexer.lex" +{ + if (paren_open) { + zc_error("nested parentheses"); + yyterminate(); + } + LEXOUT(("( ")); + paren_open = 1; + return SP; +} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 264 "zlexer.lex" +{ + if (!paren_open) { + zc_error("closing parentheses without opening parentheses"); + yyterminate(); + } + LEXOUT((") ")); + paren_open = 0; + return SP; +} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 273 "zlexer.lex" +{ + if (!paren_open && lexer_state == EXPECT_OWNER) { + lexer_state = PARSING_TTL_CLASS_TYPE; + LEXOUT(("PREV ")); + return PREV; + } + if (lexer_state == PARSING_OWNER) { + lexer_state = PARSING_TTL_CLASS_TYPE; + } + LEXOUT(("SP ")); + return SP; +} + YY_BREAK +/* Bitlabels. Strip leading and ending brackets. */ +case 15: +YY_RULE_SETUP +#line 287 "zlexer.lex" +{ BEGIN(bitlabel); } + YY_BREAK +case YY_STATE_EOF(bitlabel): +#line 288 "zlexer.lex" +{ + zc_error("EOF inside bitlabel"); + BEGIN(INITIAL); + yyrestart(yyin); /* this is so that lex does not give an internal err */ + yyterminate(); +} + YY_BREAK +case 16: +YY_RULE_SETUP +#line 294 "zlexer.lex" +{ yymore(); } + YY_BREAK +case 17: +/* rule 17 can match eol */ +YY_RULE_SETUP +#line 295 "zlexer.lex" +{ ++parser->line; yymore(); } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 296 "zlexer.lex" +{ + BEGIN(INITIAL); + yytext[yyleng - 1] = '\0'; + return parse_token(BITLAB, yytext, &lexer_state); +} + YY_BREAK +/* Quoted strings. Strip leading and ending quotes. */ +case 19: +YY_RULE_SETUP +#line 303 "zlexer.lex" +{ BEGIN(quotedstring); LEXOUT(("\" ")); } + YY_BREAK +case YY_STATE_EOF(quotedstring): +#line 304 "zlexer.lex" +{ + zc_error("EOF inside quoted string"); + BEGIN(INITIAL); + yyrestart(yyin); /* this is so that lex does not give an internal err */ + yyterminate(); +} + YY_BREAK +case 20: +YY_RULE_SETUP +#line 310 "zlexer.lex" +{ LEXOUT(("STR ")); yymore(); } + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +#line 311 "zlexer.lex" +{ ++parser->line; yymore(); } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 312 "zlexer.lex" +{ + LEXOUT(("\" ")); + BEGIN(INITIAL); + yytext[yyleng - 1] = '\0'; + return parse_token(STR, yytext, &lexer_state); +} + YY_BREAK +case 23: +/* rule 23 can match eol */ +YY_RULE_SETUP +#line 319 "zlexer.lex" +{ + /* Any allowed word. */ + return parse_token(STR, yytext, &lexer_state); +} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 323 "zlexer.lex" +{ + zc_error("unknown character '%c' (\\%03d) seen - is this a zonefile?", + (int) yytext[0], (int) yytext[0]); +} + YY_BREAK +case 25: +YY_RULE_SETUP +#line 327 "zlexer.lex" +ECHO; + YY_BREAK +#line 1240 "" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + yy_size_t number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 70 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 70 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 69); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); + + yyfree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,(int) strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yy_size_t yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 327 "zlexer.lex" + + + +/* + * Analyze "word" to see if it matches an RR type, possibly by using + * the "TYPExxx" notation. If it matches, the corresponding token is + * returned and the TYPE parameter is set to the RR type value. + */ +static int +rrtype_to_token(const char *word, uint16_t *type) +{ + uint16_t t = rrtype_from_string(word); + if (t != 0) { + rrtype_descriptor_type *entry = rrtype_descriptor_by_type(t); + *type = t; + return entry->token; + } + + return 0; +} + + +/* + * Remove \DDD constructs from the input. See RFC 1035, section 5.1. + */ +static size_t +zoctet(char *text) +{ + /* + * s follows the string, p lags behind and rebuilds the new + * string + */ + char *s; + char *p; + + for (s = p = text; *s; ++s, ++p) { + assert(p <= s); + if (s[0] != '\\') { + /* Ordinary character. */ + *p = *s; + } else if (isdigit((unsigned char)s[1]) && isdigit((unsigned char)s[2]) && isdigit((unsigned char)s[3])) { + /* \DDD escape. */ + int val = (hexdigit_to_int(s[1]) * 100 + + hexdigit_to_int(s[2]) * 10 + + hexdigit_to_int(s[3])); + if (0 <= val && val <= 255) { + s += 3; + *p = val; + } else { + zc_warning("text escape \\DDD overflow"); + *p = *++s; + } + } else if (s[1] != '\0') { + /* \X where X is any character, keep X. */ + *p = *++s; + } else { + /* Trailing backslash, ignore it. */ + zc_warning("trailing backslash ignored"); + --p; + } + } + *p = '\0'; + return p - text; +} + +static int +parse_token(int token, char *yytext, enum lexer_state *lexer_state) +{ + size_t len; + char *str; + + if (*lexer_state == EXPECT_OWNER) { + *lexer_state = PARSING_OWNER; + } else if (*lexer_state == PARSING_TTL_CLASS_TYPE) { + const char *t; + int token; + uint16_t rrclass; + + /* type */ + token = rrtype_to_token(yytext, &yylval.type); + if (token != 0) { + *lexer_state = PARSING_RDATA; + LEXOUT(("%d[%s] ", token, yytext)); + return token; + } + + /* class */ + rrclass = rrclass_from_string(yytext); + if (rrclass != 0) { + yylval.klass = rrclass; + LEXOUT(("CLASS ")); + return T_RRCLASS; + } + + /* ttl */ + yylval.ttl = strtottl(yytext, &t); + if (*t == '\0') { + LEXOUT(("TTL ")); + return T_TTL; + } + } + + str = region_strdup(parser->rr_region, yytext); + len = zoctet(str); + + yylval.data.str = str; + yylval.data.len = len; + + LEXOUT(("%d[%s] ", token, yytext)); + return token; +} + diff --git a/external/bsd/nsd/dist/zparser.c b/external/bsd/nsd/dist/zparser.c new file mode 100644 index 000000000000..5f157a5c3eb6 --- /dev/null +++ b/external/bsd/nsd/dist/zparser.c @@ -0,0 +1,3724 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* Copy the first part of user declarations. */ +#line 1 "zparser.y" /* yacc.c:339 */ + +/* + * zyparser.y -- yacc grammar for (DNS) zone files + * + * Copyright (c) 2001-2006, NLnet Labs. All rights reserved. + * + * See LICENSE for the license. + * + */ + +#include "config.h" + +#include +#include +#include + +#include "dname.h" +#include "namedb.h" +#include "zonec.h" + +/* these need to be global, otherwise they cannot be used inside yacc */ +zparser_type *parser; + +#ifdef __cplusplus +extern "C" +#endif /* __cplusplus */ +int yywrap(void); + +/* this hold the nxt bits */ +static uint8_t nxtbits[16]; +static int dlv_warn = 1; + +/* 256 windows of 256 bits (32 bytes) */ +/* still need to reset the bastard somewhere */ +static uint8_t nsecbits[NSEC_WINDOW_COUNT][NSEC_WINDOW_BITS_SIZE]; + +/* hold the highest rcode seen in a NSEC rdata , BUG #106 */ +uint16_t nsec_highest_rcode; + +void yyerror(const char *message); + +#ifdef NSEC3 +/* parse nsec3 parameters and add the (first) rdata elements */ +static void +nsec3_add_params(const char* hash_algo_str, const char* flag_str, + const char* iter_str, const char* salt_str, int salt_len); +#endif /* NSEC3 */ + + +#line 116 "zparser.c" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "zparser.h". */ +#ifndef YY_YY_ZPARSER_H_INCLUDED +# define YY_YY_ZPARSER_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + T_A = 258, + T_NS = 259, + T_MX = 260, + T_TXT = 261, + T_CNAME = 262, + T_AAAA = 263, + T_PTR = 264, + T_NXT = 265, + T_KEY = 266, + T_SOA = 267, + T_SIG = 268, + T_SRV = 269, + T_CERT = 270, + T_LOC = 271, + T_MD = 272, + T_MF = 273, + T_MB = 274, + T_MG = 275, + T_MR = 276, + T_NULL = 277, + T_WKS = 278, + T_HINFO = 279, + T_MINFO = 280, + T_RP = 281, + T_AFSDB = 282, + T_X25 = 283, + T_ISDN = 284, + T_RT = 285, + T_NSAP = 286, + T_NSAP_PTR = 287, + T_PX = 288, + T_GPOS = 289, + T_EID = 290, + T_NIMLOC = 291, + T_ATMA = 292, + T_NAPTR = 293, + T_KX = 294, + T_A6 = 295, + T_DNAME = 296, + T_SINK = 297, + T_OPT = 298, + T_APL = 299, + T_UINFO = 300, + T_UID = 301, + T_GID = 302, + T_UNSPEC = 303, + T_TKEY = 304, + T_TSIG = 305, + T_IXFR = 306, + T_AXFR = 307, + T_MAILB = 308, + T_MAILA = 309, + T_DS = 310, + T_DLV = 311, + T_SSHFP = 312, + T_RRSIG = 313, + T_NSEC = 314, + T_DNSKEY = 315, + T_SPF = 316, + T_NSEC3 = 317, + T_IPSECKEY = 318, + T_DHCID = 319, + T_NSEC3PARAM = 320, + T_TLSA = 321, + T_URI = 322, + T_NID = 323, + T_L32 = 324, + T_L64 = 325, + T_LP = 326, + T_EUI48 = 327, + T_EUI64 = 328, + T_CAA = 329, + T_CDS = 330, + T_CDNSKEY = 331, + T_OPENPGPKEY = 332, + T_CSYNC = 333, + T_AVC = 334, + T_SMIMEA = 335, + DOLLAR_TTL = 336, + DOLLAR_ORIGIN = 337, + NL = 338, + SP = 339, + STR = 340, + PREV = 341, + BITLAB = 342, + T_TTL = 343, + T_RRCLASS = 344, + URR = 345, + T_UTYPE = 346 + }; +#endif +/* Tokens. */ +#define T_A 258 +#define T_NS 259 +#define T_MX 260 +#define T_TXT 261 +#define T_CNAME 262 +#define T_AAAA 263 +#define T_PTR 264 +#define T_NXT 265 +#define T_KEY 266 +#define T_SOA 267 +#define T_SIG 268 +#define T_SRV 269 +#define T_CERT 270 +#define T_LOC 271 +#define T_MD 272 +#define T_MF 273 +#define T_MB 274 +#define T_MG 275 +#define T_MR 276 +#define T_NULL 277 +#define T_WKS 278 +#define T_HINFO 279 +#define T_MINFO 280 +#define T_RP 281 +#define T_AFSDB 282 +#define T_X25 283 +#define T_ISDN 284 +#define T_RT 285 +#define T_NSAP 286 +#define T_NSAP_PTR 287 +#define T_PX 288 +#define T_GPOS 289 +#define T_EID 290 +#define T_NIMLOC 291 +#define T_ATMA 292 +#define T_NAPTR 293 +#define T_KX 294 +#define T_A6 295 +#define T_DNAME 296 +#define T_SINK 297 +#define T_OPT 298 +#define T_APL 299 +#define T_UINFO 300 +#define T_UID 301 +#define T_GID 302 +#define T_UNSPEC 303 +#define T_TKEY 304 +#define T_TSIG 305 +#define T_IXFR 306 +#define T_AXFR 307 +#define T_MAILB 308 +#define T_MAILA 309 +#define T_DS 310 +#define T_DLV 311 +#define T_SSHFP 312 +#define T_RRSIG 313 +#define T_NSEC 314 +#define T_DNSKEY 315 +#define T_SPF 316 +#define T_NSEC3 317 +#define T_IPSECKEY 318 +#define T_DHCID 319 +#define T_NSEC3PARAM 320 +#define T_TLSA 321 +#define T_URI 322 +#define T_NID 323 +#define T_L32 324 +#define T_L64 325 +#define T_LP 326 +#define T_EUI48 327 +#define T_EUI64 328 +#define T_CAA 329 +#define T_CDS 330 +#define T_CDNSKEY 331 +#define T_OPENPGPKEY 332 +#define T_CSYNC 333 +#define T_AVC 334 +#define T_SMIMEA 335 +#define DOLLAR_TTL 336 +#define DOLLAR_ORIGIN 337 +#define NL 338 +#define SP 339 +#define STR 340 +#define PREV 341 +#define BITLAB 342 +#define T_TTL 343 +#define T_RRCLASS 344 +#define URR 345 +#define T_UTYPE 346 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ +#line 50 "zparser.y" /* yacc.c:355 */ + + domain_type *domain; + const dname_type *dname; + struct lex_data data; + uint32_t ttl; + uint16_t klass; + uint16_t type; + uint16_t *unknown; + +#line 348 "zparser.c" /* yacc.c:355 */ +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_ZPARSER_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 365 "zparser.c" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 960 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 94 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 75 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 236 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 586 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 346 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 92, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 93, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 92, 92, 93, 96, 97, 98, 99, 107, 115, + 135, 139, 140, 143, 144, 147, 157, 168, 174, 181, + 186, 193, 197, 202, 207, 212, 219, 220, 241, 245, + 249, 259, 273, 280, 281, 299, 300, 303, 311, 323, + 340, 341, 356, 360, 370, 371, 376, 385, 397, 406, + 417, 420, 423, 437, 438, 445, 446, 462, 463, 478, + 479, 484, 494, 512, 513, 514, 515, 516, 517, 522, + 523, 529, 530, 531, 532, 533, 534, 540, 541, 542, + 543, 545, 546, 547, 548, 549, 550, 551, 552, 553, + 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, + 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, + 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, + 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, + 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, + 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, + 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, + 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, + 644, 645, 646, 647, 659, 665, 672, 685, 692, 699, + 707, 714, 721, 729, 737, 744, 748, 756, 764, 776, + 784, 790, 796, 804, 814, 826, 834, 844, 847, 851, + 857, 866, 875, 883, 889, 904, 914, 929, 939, 948, + 957, 966, 1005, 1009, 1013, 1020, 1027, 1034, 1041, 1047, + 1054, 1063, 1072, 1079, 1089, 1095, 1099 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 0 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "T_A", "T_NS", "T_MX", "T_TXT", + "T_CNAME", "T_AAAA", "T_PTR", "T_NXT", "T_KEY", "T_SOA", "T_SIG", + "T_SRV", "T_CERT", "T_LOC", "T_MD", "T_MF", "T_MB", "T_MG", "T_MR", + "T_NULL", "T_WKS", "T_HINFO", "T_MINFO", "T_RP", "T_AFSDB", "T_X25", + "T_ISDN", "T_RT", "T_NSAP", "T_NSAP_PTR", "T_PX", "T_GPOS", "T_EID", + "T_NIMLOC", "T_ATMA", "T_NAPTR", "T_KX", "T_A6", "T_DNAME", "T_SINK", + "T_OPT", "T_APL", "T_UINFO", "T_UID", "T_GID", "T_UNSPEC", "T_TKEY", + "T_TSIG", "T_IXFR", "T_AXFR", "T_MAILB", "T_MAILA", "T_DS", "T_DLV", + "T_SSHFP", "T_RRSIG", "T_NSEC", "T_DNSKEY", "T_SPF", "T_NSEC3", + "T_IPSECKEY", "T_DHCID", "T_NSEC3PARAM", "T_TLSA", "T_URI", "T_NID", + "T_L32", "T_L64", "T_LP", "T_EUI48", "T_EUI64", "T_CAA", "T_CDS", + "T_CDNSKEY", "T_OPENPGPKEY", "T_CSYNC", "T_AVC", "T_SMIMEA", + "DOLLAR_TTL", "DOLLAR_ORIGIN", "NL", "SP", "STR", "PREV", "BITLAB", + "T_TTL", "T_RRCLASS", "URR", "T_UTYPE", "'.'", "'@'", "$accept", "lines", + "line", "sp", "trail", "ttl_directive", "origin_directive", "rr", + "owner", "classttl", "dname", "abs_dname", "label", "rel_dname", + "wire_dname", "wire_abs_dname", "wire_label", "wire_rel_dname", + "str_seq", "concatenated_str_seq", "nxt_seq", "nsec_more", "nsec_seq", + "str_sp_seq", "str_dot_seq", "dotted_str", "type_and_rdata", "rdata_a", + "rdata_domain_name", "rdata_soa", "rdata_wks", "rdata_hinfo", + "rdata_minfo", "rdata_mx", "rdata_txt", "rdata_rp", "rdata_afsdb", + "rdata_x25", "rdata_isdn", "rdata_rt", "rdata_nsap", "rdata_px", + "rdata_aaaa", "rdata_loc", "rdata_nxt", "rdata_srv", "rdata_naptr", + "rdata_kx", "rdata_cert", "rdata_apl", "rdata_apl_seq", "rdata_ds", + "rdata_dlv", "rdata_sshfp", "rdata_dhcid", "rdata_rrsig", "rdata_nsec", + "rdata_nsec3", "rdata_nsec3_param", "rdata_tlsa", "rdata_smimea", + "rdata_dnskey", "rdata_ipsec_base", "rdata_ipseckey", "rdata_nid", + "rdata_l32", "rdata_l64", "rdata_lp", "rdata_eui48", "rdata_eui64", + "rdata_uri", "rdata_caa", "rdata_openpgpkey", "rdata_csync", + "rdata_unknown", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 46, 64 +}; +# endif + +#define YYPACT_NINF -444 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-444))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + -444, 108, -444, -77, -75, -75, -444, -444, -444, -67, + -444, -444, -444, -444, 104, -444, -444, -444, 166, -75, + -444, -444, -73, -444, 192, -72, -444, -444, -444, -75, + -75, 808, 19, -52, 210, 210, -61, 15, 17, -75, + -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, + -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, + -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, + -75, 210, -75, -75, -75, -75, -75, -75, -75, -75, + -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, + -75, -75, -75, -75, -75, -75, -75, -75, 31, -75, + -444, -444, -444, 227, -444, -444, -444, -75, -75, 65, + 36, 94, 65, 36, 65, 36, 36, 96, 36, 113, + 122, 125, 68, 36, 36, 36, 36, 36, 65, 129, + 36, 36, 133, 136, 140, 143, 152, 159, 161, 168, + 36, 49, -444, 181, 183, 195, 113, 77, 96, 65, + 199, 202, 206, 223, 232, 235, 244, 246, 254, 257, + 261, 265, 268, 181, 96, 206, 272, 65, 276, 32, + -54, -444, 19, 19, -444, 13, -444, 59, -444, -444, + 210, -444, -444, -75, -444, -444, 210, 25, -444, -444, + -444, -444, 59, -444, -444, -444, -444, -75, -444, -444, + -75, -444, -444, -75, -444, -444, -75, -444, -444, -75, + -444, -444, -75, -444, -444, -444, -444, 62, -444, -444, + -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, + -58, -444, -444, -75, -444, -444, -75, -444, -444, -75, + -444, -444, -75, -444, -444, 210, -444, -444, 210, -444, + -444, -75, -444, -444, -444, 64, -444, -444, -75, -444, + -444, -75, -444, -444, -75, -444, -444, -444, -444, 25, + -444, 210, -444, -75, -444, -444, -75, -444, -444, -75, + -444, -444, -444, -444, -444, -444, 303, -444, -444, 27, + -444, -444, -444, -444, -444, -444, -75, -444, -444, -75, + 210, -444, -444, -444, 210, -444, -444, -75, -444, -444, + -75, -444, -444, -75, -444, -444, -75, -444, -444, -75, + -444, -444, -75, -444, -444, -75, -444, -444, 210, -444, + -444, 210, -444, -444, -75, -444, -444, -444, -444, -444, + -444, 210, -444, -444, -75, -444, -444, -444, -444, -75, + -444, -444, -444, -444, 39, 320, 40, -444, -444, -72, + 52, -444, -444, 331, 346, -72, 348, 353, 360, 53, + 286, -444, 370, 372, -72, -72, -72, -444, 306, -444, + -72, 55, -444, -72, 377, -72, 52, -444, 379, 381, + 383, -444, 311, -444, 74, 385, 388, 314, -444, 317, + -444, 391, 393, 398, 79, 79, 79, -72, -444, -444, + 400, -444, 402, 404, -444, 210, -444, 210, 25, -444, + 210, -75, -75, -75, -75, -75, -444, -444, -75, 210, + 210, 210, 210, 210, 210, -444, -75, -75, 210, 25, + -75, -75, -75, -444, 311, 303, -444, -444, -75, -75, + 210, -444, -75, -75, -75, 59, 59, 59, 210, -75, + 303, -75, 314, -444, -444, 325, -444, 406, 408, 410, + 432, 435, 81, -444, -444, -444, -444, -444, -444, -72, + 437, -444, 443, 447, 449, -444, -444, 451, 463, -444, + 467, 471, 79, -444, -444, -444, -444, 79, -444, 474, + 210, -444, -75, -75, -75, -75, -75, 62, 210, -75, + -75, -75, 210, -75, -75, -75, -75, 59, 59, -75, + -444, 449, 476, 484, -72, 449, -444, -444, 489, 449, + 449, -444, 491, 79, 495, 449, -444, -444, 449, 210, + -75, -75, 210, 210, -75, 210, 210, -75, 25, 210, + 210, 210, -444, 500, 502, -444, -444, 504, -444, -444, + 506, -444, -444, -444, -75, -75, -75, 303, 508, 510, + -72, -444, -75, -75, 210, 512, 514, -444, 210, -75, + -444, 91, -75, 449, 210, -444 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 0, 0, 0, 4, 11, 31, 20, + 32, 28, 29, 3, 0, 7, 8, 9, 21, 0, + 26, 33, 27, 10, 0, 0, 6, 5, 12, 0, + 0, 0, 19, 30, 0, 0, 0, 23, 22, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 34, 13, 0, 15, 16, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 24, 25, 59, 0, 60, 0, 63, 64, + 0, 65, 66, 0, 89, 90, 0, 42, 91, 92, + 71, 72, 0, 119, 120, 83, 84, 0, 123, 124, + 0, 115, 116, 0, 73, 74, 0, 113, 114, 0, + 125, 126, 0, 131, 132, 44, 45, 0, 121, 122, + 67, 68, 69, 70, 75, 76, 77, 78, 79, 80, + 0, 81, 82, 0, 85, 86, 0, 87, 88, 0, + 97, 98, 0, 99, 100, 0, 101, 102, 0, 103, + 104, 0, 109, 110, 57, 0, 111, 112, 0, 117, + 118, 0, 127, 128, 0, 129, 130, 133, 134, 208, + 136, 0, 137, 0, 138, 139, 0, 140, 141, 0, + 142, 143, 144, 145, 39, 37, 0, 35, 40, 36, + 146, 147, 152, 153, 93, 94, 0, 148, 149, 0, + 0, 105, 106, 55, 0, 107, 108, 0, 150, 151, + 0, 154, 155, 0, 180, 181, 0, 158, 159, 0, + 160, 161, 0, 162, 163, 0, 164, 165, 0, 166, + 167, 0, 168, 169, 0, 170, 171, 172, 173, 174, + 175, 0, 176, 177, 0, 178, 179, 95, 96, 0, + 156, 157, 183, 182, 0, 0, 61, 184, 185, 0, + 0, 191, 200, 0, 0, 0, 0, 0, 0, 0, + 0, 201, 0, 0, 0, 0, 0, 194, 0, 195, + 0, 0, 198, 0, 0, 0, 0, 207, 0, 0, + 0, 53, 0, 215, 38, 0, 0, 0, 223, 0, + 213, 0, 0, 0, 0, 0, 0, 0, 228, 229, + 0, 232, 0, 0, 236, 0, 62, 0, 43, 48, + 0, 0, 0, 0, 0, 0, 47, 46, 0, 0, + 0, 0, 0, 0, 0, 58, 0, 0, 0, 209, + 0, 0, 0, 51, 0, 0, 54, 41, 0, 0, + 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 235, 190, 0, 202, 0, 0, 0, + 0, 0, 0, 188, 189, 192, 193, 196, 197, 0, + 0, 205, 0, 0, 0, 50, 52, 0, 0, 222, + 0, 0, 0, 224, 225, 226, 227, 0, 233, 0, + 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 234, 0, 0, 0, 0, 0, 187, 199, 0, 0, + 0, 212, 0, 0, 0, 0, 230, 231, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 221, 0, + 0, 0, 220, 0, 0, 203, 206, 0, 210, 211, + 0, 217, 218, 219, 0, 0, 0, 0, 0, 0, + 0, 216, 0, 0, 0, 0, 0, 204, 0, 0, + 186, 0, 0, 0, 0, 214 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -444, -444, -444, -1, 226, -444, -444, -444, -444, -444, + 0, 145, 135, 147, -404, -444, -190, -444, -444, -250, + -444, -213, -443, -157, -444, -104, -444, -444, -13, -444, + -444, -444, -444, -444, -142, -444, -444, -444, -444, -444, + -444, -444, -444, -444, -444, -444, -444, -444, -444, -444, + -444, 71, -444, -444, -444, 93, -444, -444, -444, -444, + -444, -137, -444, -444, -444, -444, -444, -444, -444, -444, + -444, -444, -444, -444, 790 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 13, 103, 104, 15, 16, 17, 18, 31, + 180, 20, 21, 22, 286, 287, 288, 289, 186, 217, + 420, 446, 393, 304, 255, 187, 100, 178, 181, 204, + 231, 234, 237, 184, 188, 240, 243, 246, 249, 252, + 256, 259, 193, 218, 198, 210, 262, 265, 213, 270, + 271, 274, 277, 280, 305, 207, 290, 297, 308, 311, + 350, 201, 300, 301, 317, 320, 323, 326, 329, 332, + 314, 335, 342, 345, 179 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint16 yytable[] = +{ + 14, 19, 486, 24, 25, 177, 23, 294, 341, 7, + 192, 292, 28, 8, 354, 10, 26, 498, 32, 33, + 11, 12, 102, 7, 230, 347, 7, 339, 37, 38, + 28, 33, 169, 8, 356, 10, 175, 269, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 7, 170, 28, + 190, 28, 195, 28, 107, 108, 172, 173, 2, 3, + 220, 222, 224, 226, 228, 352, 197, 356, 203, 394, + 28, 8, 414, 10, 571, 416, 175, 267, 11, 12, + 236, 239, 171, 28, 174, 171, 28, 174, 426, 175, + 435, 176, 102, 7, 176, 102, 7, 102, 7, 28, + 174, 356, 28, 215, 369, 175, 381, 176, 175, 284, + 216, 28, 284, 28, 174, 28, 215, 175, 101, 285, + 35, 176, 36, 216, 355, 28, 284, 582, 28, 183, + 28, 200, 359, 285, 175, 360, 175, 27, 28, 4, + 5, 6, 7, 8, 9, 10, 363, 28, 206, 364, + 11, 12, 365, 175, 447, 366, 28, 209, 367, 28, + 212, 368, 175, 28, 233, 175, 370, 28, 242, 175, + 28, 245, 507, 175, 28, 248, 175, 28, 251, 372, + 175, 485, 373, 175, 337, 374, 28, 254, 375, 282, + 450, 376, 175, 28, 258, 28, 261, 378, 0, 175, + 380, 175, 28, 264, 29, 30, 418, 383, 175, 0, + 384, 105, 106, 385, 0, 28, 273, 28, 276, 0, + 386, 175, 388, 175, 0, 389, 28, 34, 390, 28, + 279, 0, 439, 28, 296, 175, 28, 299, 0, 175, + 28, 303, 175, 102, 7, 395, 175, 142, 396, 397, + 455, 456, 457, 399, 0, 500, 401, 28, 307, 402, + 171, 28, 403, 175, 0, 404, 28, 310, 405, 28, + 313, 406, 175, 0, 407, 175, 0, 512, 28, 316, + 28, 319, 0, 410, 175, 0, 175, 0, 28, 322, + 399, 28, 325, 412, 175, 28, 328, 175, 413, 28, + 331, 175, 28, 334, 0, 175, 28, 344, 175, 417, + 28, 349, 175, 0, 539, 422, 175, 0, 543, 171, + 28, 427, 545, 546, 430, 431, 432, 0, 550, 0, + 434, 551, 0, 436, 0, 438, 391, 392, 517, 171, + 28, 433, 0, 518, 443, 444, 445, 171, 28, 303, + 171, 28, 451, 357, 28, 415, 358, 458, 171, 28, + 501, 0, 361, 0, 462, 28, 419, 0, 362, 465, + 467, 468, 469, 470, 471, 0, 584, 472, 0, 548, + 28, 421, 28, 423, 0, 479, 480, 28, 424, 482, + 483, 484, 0, 371, 28, 425, 0, 487, 488, 399, + 0, 490, 491, 492, 28, 428, 28, 429, 497, 0, + 499, 28, 437, 28, 440, 28, 441, 28, 442, 28, + 448, 377, 28, 449, 379, 28, 452, 28, 453, 508, + 0, 382, 28, 454, 28, 459, 28, 460, 28, 461, + 28, 502, 28, 503, 28, 504, 0, 387, 0, 399, + 0, 521, 522, 523, 524, 525, 370, 0, 528, 529, + 530, 399, 532, 533, 534, 535, 28, 505, 538, 28, + 506, 28, 509, 0, 542, 0, 398, 28, 510, 0, + 400, 28, 511, 28, 303, 28, 513, 0, 399, 553, + 554, 0, 399, 557, 399, 399, 560, 28, 514, 399, + 399, 28, 515, 0, 408, 28, 516, 409, 28, 519, + 28, 540, 0, 568, 569, 570, 0, 411, 28, 541, + 574, 575, 576, 28, 544, 28, 547, 0, 581, 28, + 549, 583, 0, 399, 28, 564, 28, 565, 28, 566, + 28, 567, 28, 572, 28, 573, 28, 578, 28, 579, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 463, 0, 464, 0, 0, 466, 0, 0, 0, + 0, 0, 0, 0, 0, 473, 474, 475, 476, 477, + 478, 0, 0, 0, 481, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 489, 0, 0, 0, + 0, 493, 494, 495, 496, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 520, 0, 0, 0, + 0, 0, 0, 526, 527, 0, 0, 0, 531, 0, + 0, 0, 0, 536, 537, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 552, 0, 0, 555, 556, + 0, 558, 559, 0, 0, 561, 562, 563, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 577, 0, 0, 0, 580, 0, 0, 0, 0, 0, + 585, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 0, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 0, 67, 0, 0, 0, 0, 68, 69, 0, 70, + 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 0, + 0, 0, 0, 98, 0, 0, 0, 0, 0, 99, + 182, 185, 189, 191, 194, 196, 199, 202, 205, 208, + 211, 214, 219, 221, 223, 225, 227, 229, 232, 235, + 238, 241, 244, 247, 250, 253, 257, 260, 263, 266, + 268, 272, 0, 275, 278, 281, 283, 291, 293, 295, + 298, 302, 306, 309, 312, 315, 318, 321, 324, 327, + 330, 333, 336, 338, 340, 343, 346, 348, 351, 0, + 353 +}; + +static const yytype_int16 yycheck[] = +{ + 1, 1, 445, 4, 5, 109, 83, 149, 165, 84, + 114, 148, 84, 85, 1, 87, 83, 460, 19, 92, + 92, 93, 83, 84, 128, 167, 84, 164, 29, 30, + 84, 92, 1, 85, 92, 87, 90, 141, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 84, 99, 84, + 113, 84, 115, 84, 89, 88, 107, 108, 0, 1, + 123, 124, 125, 126, 127, 83, 116, 92, 118, 92, + 84, 85, 83, 87, 567, 85, 90, 140, 92, 93, + 130, 131, 83, 84, 85, 83, 84, 85, 85, 90, + 85, 92, 83, 84, 92, 83, 84, 83, 84, 84, + 85, 92, 84, 85, 92, 90, 92, 92, 90, 85, + 92, 84, 85, 84, 85, 84, 85, 90, 33, 92, + 25, 92, 25, 92, 175, 84, 85, 581, 84, 85, + 84, 85, 183, 92, 90, 186, 90, 83, 84, 81, + 82, 83, 84, 85, 86, 87, 197, 84, 85, 200, + 92, 93, 203, 90, 394, 206, 84, 85, 209, 84, + 85, 212, 90, 84, 85, 90, 217, 84, 85, 90, + 84, 85, 472, 90, 84, 85, 90, 84, 85, 230, + 90, 444, 233, 90, 163, 236, 84, 85, 239, 146, + 397, 242, 90, 84, 85, 84, 85, 248, -1, 90, + 251, 90, 84, 85, 88, 89, 360, 258, 90, -1, + 261, 35, 36, 264, -1, 84, 85, 84, 85, -1, + 271, 90, 273, 90, -1, 276, 84, 85, 279, 84, + 85, -1, 386, 84, 85, 90, 84, 85, -1, 90, + 84, 85, 90, 83, 84, 296, 90, 71, 299, 300, + 404, 405, 406, 304, -1, 462, 307, 84, 85, 310, + 83, 84, 313, 90, -1, 316, 84, 85, 319, 84, + 85, 322, 90, -1, 325, 90, -1, 484, 84, 85, + 84, 85, -1, 334, 90, -1, 90, -1, 84, 85, + 341, 84, 85, 344, 90, 84, 85, 90, 349, 84, + 85, 90, 84, 85, -1, 90, 84, 85, 90, 359, + 84, 85, 90, -1, 521, 365, 90, -1, 525, 83, + 84, 85, 529, 530, 374, 375, 376, -1, 535, -1, + 380, 538, -1, 383, -1, 385, 83, 84, 492, 83, + 84, 85, -1, 497, 83, 84, 85, 83, 84, 85, + 83, 84, 85, 177, 84, 85, 180, 407, 83, 84, + 85, -1, 186, -1, 415, 84, 85, -1, 192, 420, + 421, 422, 423, 424, 425, -1, 583, 428, -1, 533, + 84, 85, 84, 85, -1, 436, 437, 84, 85, 440, + 441, 442, -1, 217, 84, 85, -1, 448, 449, 450, + -1, 452, 453, 454, 84, 85, 84, 85, 459, -1, + 461, 84, 85, 84, 85, 84, 85, 84, 85, 84, + 85, 245, 84, 85, 248, 84, 85, 84, 85, 479, + -1, 255, 84, 85, 84, 85, 84, 85, 84, 85, + 84, 85, 84, 85, 84, 85, -1, 271, -1, 500, + -1, 502, 503, 504, 505, 506, 507, -1, 509, 510, + 511, 512, 513, 514, 515, 516, 84, 85, 519, 84, + 85, 84, 85, -1, 524, -1, 300, 84, 85, -1, + 304, 84, 85, 84, 85, 84, 85, -1, 539, 540, + 541, -1, 543, 544, 545, 546, 547, 84, 85, 550, + 551, 84, 85, -1, 328, 84, 85, 331, 84, 85, + 84, 85, -1, 564, 565, 566, -1, 341, 84, 85, + 570, 572, 573, 84, 85, 84, 85, -1, 579, 84, + 85, 582, -1, 584, 84, 85, 84, 85, 84, 85, + 84, 85, 84, 85, 84, 85, 84, 85, 84, 85, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 415, -1, 417, -1, -1, 420, -1, -1, -1, + -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, + 434, -1, -1, -1, 438, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 450, -1, -1, -1, + -1, 455, 456, 457, 458, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 500, -1, -1, -1, + -1, -1, -1, 507, 508, -1, -1, -1, 512, -1, + -1, -1, -1, 517, 518, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 539, -1, -1, 542, 543, + -1, 545, 546, -1, -1, 549, 550, 551, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 574, -1, -1, -1, 578, -1, -1, -1, -1, -1, + 584, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, + -1, 33, -1, -1, -1, -1, 38, 39, -1, 41, + -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, + -1, -1, -1, 85, -1, -1, -1, -1, -1, 91, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, -1, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, -1, + 170 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 95, 0, 1, 81, 82, 83, 84, 85, 86, + 87, 92, 93, 96, 97, 99, 100, 101, 102, 104, + 105, 106, 107, 83, 97, 97, 83, 83, 84, 88, + 89, 103, 97, 92, 85, 105, 107, 97, 97, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 33, 38, 39, + 41, 44, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 85, 91, + 120, 106, 83, 97, 98, 98, 98, 89, 88, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 98, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 1, + 97, 83, 97, 97, 85, 90, 92, 119, 121, 168, + 104, 122, 168, 85, 127, 168, 112, 119, 128, 168, + 122, 168, 119, 136, 168, 122, 168, 104, 138, 168, + 85, 155, 168, 104, 123, 168, 85, 149, 168, 85, + 139, 168, 85, 142, 168, 85, 92, 113, 137, 168, + 122, 168, 122, 168, 122, 168, 122, 168, 122, 168, + 119, 124, 168, 85, 125, 168, 104, 126, 168, 104, + 129, 168, 85, 130, 168, 85, 131, 168, 85, 132, + 168, 85, 133, 168, 85, 118, 134, 168, 85, 135, + 168, 85, 140, 168, 85, 141, 168, 122, 168, 119, + 143, 144, 168, 85, 145, 168, 85, 146, 168, 85, + 147, 168, 149, 168, 85, 92, 108, 109, 110, 111, + 150, 168, 155, 168, 128, 168, 85, 151, 168, 85, + 156, 157, 168, 85, 117, 148, 168, 85, 152, 168, + 85, 153, 168, 85, 164, 168, 85, 158, 168, 85, + 159, 168, 85, 160, 168, 85, 161, 168, 85, 162, + 168, 85, 163, 168, 85, 165, 168, 145, 168, 155, + 168, 117, 166, 168, 85, 167, 168, 128, 168, 85, + 154, 168, 83, 168, 1, 97, 92, 98, 98, 97, + 97, 98, 98, 97, 97, 97, 97, 97, 97, 92, + 97, 98, 97, 97, 97, 97, 97, 98, 97, 98, + 97, 92, 98, 97, 97, 97, 97, 98, 97, 97, + 97, 83, 84, 116, 92, 97, 97, 97, 98, 97, + 98, 97, 97, 97, 97, 97, 97, 97, 98, 98, + 97, 98, 97, 97, 83, 85, 85, 104, 119, 85, + 114, 85, 104, 85, 85, 85, 85, 85, 85, 85, + 104, 104, 104, 85, 104, 85, 104, 85, 104, 119, + 85, 85, 85, 83, 84, 85, 115, 110, 85, 85, + 117, 85, 85, 85, 85, 119, 119, 119, 104, 85, + 85, 85, 97, 98, 98, 97, 98, 97, 97, 97, + 97, 97, 97, 98, 98, 98, 98, 98, 98, 97, + 97, 98, 97, 97, 97, 115, 116, 97, 97, 98, + 97, 97, 97, 98, 98, 98, 98, 97, 116, 97, + 117, 85, 85, 85, 85, 85, 85, 113, 104, 85, + 85, 85, 117, 85, 85, 85, 85, 119, 119, 85, + 98, 97, 97, 97, 97, 97, 98, 98, 97, 97, + 97, 98, 97, 97, 97, 97, 98, 98, 97, 117, + 85, 85, 104, 117, 85, 117, 117, 85, 119, 85, + 117, 117, 98, 97, 97, 98, 98, 97, 98, 98, + 97, 98, 98, 98, 85, 85, 85, 85, 97, 97, + 97, 116, 85, 85, 104, 97, 97, 98, 85, 85, + 98, 97, 108, 97, 117, 98 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 94, 95, 95, 96, 96, 96, 96, 96, 96, + 96, 97, 97, 98, 98, 99, 100, 100, 101, 102, + 102, 103, 103, 103, 103, 103, 104, 104, 105, 105, + 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, + 111, 111, 112, 112, 113, 113, 113, 113, 114, 114, + 115, 115, 115, 116, 116, 117, 117, 118, 118, 119, + 119, 119, 119, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 168, 168 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 2, 2, 1, 1, 1, + 2, 1, 2, 1, 2, 4, 4, 4, 3, 2, + 1, 0, 2, 2, 4, 4, 1, 1, 1, 1, + 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, + 1, 3, 1, 3, 1, 1, 3, 3, 1, 3, + 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, + 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 2, 2, 14, 6, 4, 4, + 4, 2, 4, 4, 2, 2, 4, 4, 2, 6, + 2, 2, 4, 8, 12, 4, 8, 2, 1, 3, + 8, 8, 6, 2, 18, 2, 10, 8, 8, 8, + 8, 7, 4, 2, 4, 4, 4, 4, 2, 2, + 6, 6, 2, 4, 6, 4, 3 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +{ + YYUSE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (void) +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 6: +#line 98 "zparser.y" /* yacc.c:1646 */ + {} +#line 1925 "zparser.c" /* yacc.c:1646 */ + break; + + case 7: +#line 100 "zparser.y" /* yacc.c:1646 */ + { + region_free_all(parser->rr_region); + parser->current_rr.type = 0; + parser->current_rr.rdata_count = 0; + parser->current_rr.rdatas = parser->temporary_rdatas; + parser->error_occurred = 0; + } +#line 1937 "zparser.c" /* yacc.c:1646 */ + break; + + case 8: +#line 108 "zparser.y" /* yacc.c:1646 */ + { + region_free_all(parser->rr_region); + parser->current_rr.type = 0; + parser->current_rr.rdata_count = 0; + parser->current_rr.rdatas = parser->temporary_rdatas; + parser->error_occurred = 0; + } +#line 1949 "zparser.c" /* yacc.c:1646 */ + break; + + case 9: +#line 116 "zparser.y" /* yacc.c:1646 */ + { /* rr should be fully parsed */ + if (!parser->error_occurred) { + parser->current_rr.rdatas + =(rdata_atom_type *)region_alloc_array_init( + parser->region, + parser->current_rr.rdatas, + parser->current_rr.rdata_count, + sizeof(rdata_atom_type)); + + process_rr(); + } + + region_free_all(parser->rr_region); + + parser->current_rr.type = 0; + parser->current_rr.rdata_count = 0; + parser->current_rr.rdatas = parser->temporary_rdatas; + parser->error_occurred = 0; + } +#line 1973 "zparser.c" /* yacc.c:1646 */ + break; + + case 15: +#line 148 "zparser.y" /* yacc.c:1646 */ + { + parser->default_ttl = zparser_ttl2int((yyvsp[-1].data).str, &(parser->error_occurred)); + if (parser->error_occurred == 1) { + parser->default_ttl = DEFAULT_TTL; + parser->error_occurred = 0; + } + } +#line 1985 "zparser.c" /* yacc.c:1646 */ + break; + + case 16: +#line 158 "zparser.y" /* yacc.c:1646 */ + { + /* if previous origin is unused, remove it, do not leak it */ + if(parser->origin != error_domain && parser->origin != (yyvsp[-1].domain)) { + /* protect $3 from deletion, because deldomain walks up */ + (yyvsp[-1].domain)->usage ++; + domain_table_deldomain(parser->db, parser->origin); + (yyvsp[-1].domain)->usage --; + } + parser->origin = (yyvsp[-1].domain); + } +#line 2000 "zparser.c" /* yacc.c:1646 */ + break; + + case 17: +#line 169 "zparser.y" /* yacc.c:1646 */ + { + zc_error_prev_line("$ORIGIN directive requires absolute domain name"); + } +#line 2008 "zparser.c" /* yacc.c:1646 */ + break; + + case 18: +#line 175 "zparser.y" /* yacc.c:1646 */ + { + parser->current_rr.owner = (yyvsp[-2].domain); + parser->current_rr.type = (yyvsp[0].type); + } +#line 2017 "zparser.c" /* yacc.c:1646 */ + break; + + case 19: +#line 182 "zparser.y" /* yacc.c:1646 */ + { + parser->prev_dname = (yyvsp[-1].domain); + (yyval.domain) = (yyvsp[-1].domain); + } +#line 2026 "zparser.c" /* yacc.c:1646 */ + break; + + case 20: +#line 187 "zparser.y" /* yacc.c:1646 */ + { + (yyval.domain) = parser->prev_dname; + } +#line 2034 "zparser.c" /* yacc.c:1646 */ + break; + + case 21: +#line 193 "zparser.y" /* yacc.c:1646 */ + { + parser->current_rr.ttl = parser->default_ttl; + parser->current_rr.klass = parser->default_class; + } +#line 2043 "zparser.c" /* yacc.c:1646 */ + break; + + case 22: +#line 198 "zparser.y" /* yacc.c:1646 */ + { + parser->current_rr.ttl = parser->default_ttl; + parser->current_rr.klass = (yyvsp[-1].klass); + } +#line 2052 "zparser.c" /* yacc.c:1646 */ + break; + + case 23: +#line 203 "zparser.y" /* yacc.c:1646 */ + { + parser->current_rr.ttl = (yyvsp[-1].ttl); + parser->current_rr.klass = parser->default_class; + } +#line 2061 "zparser.c" /* yacc.c:1646 */ + break; + + case 24: +#line 208 "zparser.y" /* yacc.c:1646 */ + { + parser->current_rr.ttl = (yyvsp[-3].ttl); + parser->current_rr.klass = (yyvsp[-1].klass); + } +#line 2070 "zparser.c" /* yacc.c:1646 */ + break; + + case 25: +#line 213 "zparser.y" /* yacc.c:1646 */ + { + parser->current_rr.ttl = (yyvsp[-1].ttl); + parser->current_rr.klass = (yyvsp[-3].klass); + } +#line 2079 "zparser.c" /* yacc.c:1646 */ + break; + + case 27: +#line 221 "zparser.y" /* yacc.c:1646 */ + { + if ((yyvsp[0].dname) == error_dname) { + (yyval.domain) = error_domain; + } else if(parser->origin == error_domain) { + zc_error("cannot concatenate origin to domain name, because origin failed to parse"); + (yyval.domain) = error_domain; + } else if ((yyvsp[0].dname)->name_size + domain_dname(parser->origin)->name_size - 1 > MAXDOMAINLEN) { + zc_error("domain name exceeds %d character limit", MAXDOMAINLEN); + (yyval.domain) = error_domain; + } else { + (yyval.domain) = domain_table_insert( + parser->db->domains, + dname_concatenate( + parser->rr_region, + (yyvsp[0].dname), + domain_dname(parser->origin))); + } + } +#line 2102 "zparser.c" /* yacc.c:1646 */ + break; + + case 28: +#line 242 "zparser.y" /* yacc.c:1646 */ + { + (yyval.domain) = parser->db->domains->root; + } +#line 2110 "zparser.c" /* yacc.c:1646 */ + break; + + case 29: +#line 246 "zparser.y" /* yacc.c:1646 */ + { + (yyval.domain) = parser->origin; + } +#line 2118 "zparser.c" /* yacc.c:1646 */ + break; + + case 30: +#line 250 "zparser.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].dname) != error_dname) { + (yyval.domain) = domain_table_insert(parser->db->domains, (yyvsp[-1].dname)); + } else { + (yyval.domain) = error_domain; + } + } +#line 2130 "zparser.c" /* yacc.c:1646 */ + break; + + case 31: +#line 260 "zparser.y" /* yacc.c:1646 */ + { + if ((yyvsp[0].data).len > MAXLABELLEN) { + zc_error("label exceeds %d character limit", MAXLABELLEN); + (yyval.dname) = error_dname; + } else if ((yyvsp[0].data).len <= 0) { + zc_error("zero label length"); + (yyval.dname) = error_dname; + } else { + (yyval.dname) = dname_make_from_label(parser->rr_region, + (uint8_t *) (yyvsp[0].data).str, + (yyvsp[0].data).len); + } + } +#line 2148 "zparser.c" /* yacc.c:1646 */ + break; + + case 32: +#line 274 "zparser.y" /* yacc.c:1646 */ + { + zc_error("bitlabels are now deprecated. RFC2673 is obsoleted."); + (yyval.dname) = error_dname; + } +#line 2157 "zparser.c" /* yacc.c:1646 */ + break; + + case 34: +#line 282 "zparser.y" /* yacc.c:1646 */ + { + if ((yyvsp[-2].dname) == error_dname || (yyvsp[0].dname) == error_dname) { + (yyval.dname) = error_dname; + } else if ((yyvsp[-2].dname)->name_size + (yyvsp[0].dname)->name_size - 1 > MAXDOMAINLEN) { + zc_error("domain name exceeds %d character limit", + MAXDOMAINLEN); + (yyval.dname) = error_dname; + } else { + (yyval.dname) = dname_concatenate(parser->rr_region, (yyvsp[-2].dname), (yyvsp[0].dname)); + } + } +#line 2173 "zparser.c" /* yacc.c:1646 */ + break; + + case 37: +#line 304 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, 2); + result[0] = 0; + result[1] = '\0'; + (yyval.data).str = result; + (yyval.data).len = 1; + } +#line 2185 "zparser.c" /* yacc.c:1646 */ + break; + + case 38: +#line 312 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, + (yyvsp[-1].data).len + 2); + memcpy(result, (yyvsp[-1].data).str, (yyvsp[-1].data).len); + result[(yyvsp[-1].data).len] = 0; + result[(yyvsp[-1].data).len+1] = '\0'; + (yyval.data).str = result; + (yyval.data).len = (yyvsp[-1].data).len + 1; + } +#line 2199 "zparser.c" /* yacc.c:1646 */ + break; + + case 39: +#line 324 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, + (yyvsp[0].data).len + 1); + + if ((yyvsp[0].data).len > MAXLABELLEN) + zc_error("label exceeds %d character limit", MAXLABELLEN); + + /* make label anyway */ + result[0] = (yyvsp[0].data).len; + memcpy(result+1, (yyvsp[0].data).str, (yyvsp[0].data).len); + + (yyval.data).str = result; + (yyval.data).len = (yyvsp[0].data).len + 1; + } +#line 2218 "zparser.c" /* yacc.c:1646 */ + break; + + case 41: +#line 342 "zparser.y" /* yacc.c:1646 */ + { + if ((yyvsp[-2].data).len + (yyvsp[0].data).len - 3 > MAXDOMAINLEN) + zc_error("domain name exceeds %d character limit", + MAXDOMAINLEN); + + /* make dname anyway */ + (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len; + (yyval.data).str = (char *) region_alloc(parser->rr_region, (yyval.data).len + 1); + memcpy((yyval.data).str, (yyvsp[-2].data).str, (yyvsp[-2].data).len); + memcpy((yyval.data).str + (yyvsp[-2].data).len, (yyvsp[0].data).str, (yyvsp[0].data).len); + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2235 "zparser.c" /* yacc.c:1646 */ + break; + + case 42: +#line 357 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, (yyvsp[0].data).str, (yyvsp[0].data).len), 1); + } +#line 2243 "zparser.c" /* yacc.c:1646 */ + break; + + case 43: +#line 361 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, (yyvsp[0].data).str, (yyvsp[0].data).len), 0); + } +#line 2251 "zparser.c" /* yacc.c:1646 */ + break; + + case 45: +#line 372 "zparser.y" /* yacc.c:1646 */ + { + (yyval.data).len = 1; + (yyval.data).str = region_strdup(parser->rr_region, "."); + } +#line 2260 "zparser.c" /* yacc.c:1646 */ + break; + + case 46: +#line 377 "zparser.y" /* yacc.c:1646 */ + { + (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len + 1; + (yyval.data).str = (char *) region_alloc(parser->rr_region, (yyval.data).len + 1); + memcpy((yyval.data).str, (yyvsp[-2].data).str, (yyvsp[-2].data).len); + memcpy((yyval.data).str + (yyvsp[-2].data).len, " ", 1); + memcpy((yyval.data).str + (yyvsp[-2].data).len + 1, (yyvsp[0].data).str, (yyvsp[0].data).len); + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2273 "zparser.c" /* yacc.c:1646 */ + break; + + case 47: +#line 386 "zparser.y" /* yacc.c:1646 */ + { + (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len + 1; + (yyval.data).str = (char *) region_alloc(parser->rr_region, (yyval.data).len + 1); + memcpy((yyval.data).str, (yyvsp[-2].data).str, (yyvsp[-2].data).len); + memcpy((yyval.data).str + (yyvsp[-2].data).len, ".", 1); + memcpy((yyval.data).str + (yyvsp[-2].data).len + 1, (yyvsp[0].data).str, (yyvsp[0].data).len); + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2286 "zparser.c" /* yacc.c:1646 */ + break; + + case 48: +#line 398 "zparser.y" /* yacc.c:1646 */ + { + uint16_t type = rrtype_from_string((yyvsp[0].data).str); + if (type != 0 && type < 128) { + set_bit(nxtbits, type); + } else { + zc_error("bad type %d in NXT record", (int) type); + } + } +#line 2299 "zparser.c" /* yacc.c:1646 */ + break; + + case 49: +#line 407 "zparser.y" /* yacc.c:1646 */ + { + uint16_t type = rrtype_from_string((yyvsp[0].data).str); + if (type != 0 && type < 128) { + set_bit(nxtbits, type); + } else { + zc_error("bad type %d in NXT record", (int) type); + } + } +#line 2312 "zparser.c" /* yacc.c:1646 */ + break; + + case 50: +#line 418 "zparser.y" /* yacc.c:1646 */ + { + } +#line 2319 "zparser.c" /* yacc.c:1646 */ + break; + + case 51: +#line 421 "zparser.y" /* yacc.c:1646 */ + { + } +#line 2326 "zparser.c" /* yacc.c:1646 */ + break; + + case 52: +#line 424 "zparser.y" /* yacc.c:1646 */ + { + uint16_t type = rrtype_from_string((yyvsp[-1].data).str); + if (type != 0) { + if (type > nsec_highest_rcode) { + nsec_highest_rcode = type; + } + set_bitnsec(nsecbits, type); + } else { + zc_error("bad type %d in NSEC record", (int) type); + } + } +#line 2342 "zparser.c" /* yacc.c:1646 */ + break; + + case 56: +#line 447 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, + (yyvsp[-2].data).len + (yyvsp[0].data).len + 1); + memcpy(result, (yyvsp[-2].data).str, (yyvsp[-2].data).len); + memcpy(result + (yyvsp[-2].data).len, (yyvsp[0].data).str, (yyvsp[0].data).len); + (yyval.data).str = result; + (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len; + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2356 "zparser.c" /* yacc.c:1646 */ + break; + + case 58: +#line 464 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, + (yyvsp[-2].data).len + (yyvsp[0].data).len + 1); + memcpy(result, (yyvsp[-2].data).str, (yyvsp[-2].data).len); + memcpy(result + (yyvsp[-2].data).len, (yyvsp[0].data).str, (yyvsp[0].data).len); + (yyval.data).str = result; + (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len; + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2370 "zparser.c" /* yacc.c:1646 */ + break; + + case 60: +#line 480 "zparser.y" /* yacc.c:1646 */ + { + (yyval.data).str = "."; + (yyval.data).len = 1; + } +#line 2379 "zparser.c" /* yacc.c:1646 */ + break; + + case 61: +#line 485 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, + (yyvsp[-1].data).len + 2); + memcpy(result, (yyvsp[-1].data).str, (yyvsp[-1].data).len); + result[(yyvsp[-1].data).len] = '.'; + (yyval.data).str = result; + (yyval.data).len = (yyvsp[-1].data).len + 1; + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2393 "zparser.c" /* yacc.c:1646 */ + break; + + case 62: +#line 495 "zparser.y" /* yacc.c:1646 */ + { + char *result = (char *) region_alloc(parser->rr_region, + (yyvsp[-2].data).len + (yyvsp[0].data).len + 2); + memcpy(result, (yyvsp[-2].data).str, (yyvsp[-2].data).len); + result[(yyvsp[-2].data).len] = '.'; + memcpy(result + (yyvsp[-2].data).len + 1, (yyvsp[0].data).str, (yyvsp[0].data).len); + (yyval.data).str = result; + (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len + 1; + (yyval.data).str[(yyval.data).len] = '\0'; + } +#line 2408 "zparser.c" /* yacc.c:1646 */ + break; + + case 64: +#line 513 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2414 "zparser.c" /* yacc.c:1646 */ + break; + + case 66: +#line 515 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2420 "zparser.c" /* yacc.c:1646 */ + break; + + case 67: +#line 516 "zparser.y" /* yacc.c:1646 */ + { zc_warning_prev_line("MD is obsolete"); } +#line 2426 "zparser.c" /* yacc.c:1646 */ + break; + + case 68: +#line 518 "zparser.y" /* yacc.c:1646 */ + { + zc_warning_prev_line("MD is obsolete"); + (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); + } +#line 2435 "zparser.c" /* yacc.c:1646 */ + break; + + case 69: +#line 522 "zparser.y" /* yacc.c:1646 */ + { zc_warning_prev_line("MF is obsolete"); } +#line 2441 "zparser.c" /* yacc.c:1646 */ + break; + + case 70: +#line 524 "zparser.y" /* yacc.c:1646 */ + { + zc_warning_prev_line("MF is obsolete"); + (yyval.type) = (yyvsp[-2].type); + parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); + } +#line 2451 "zparser.c" /* yacc.c:1646 */ + break; + + case 72: +#line 530 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2457 "zparser.c" /* yacc.c:1646 */ + break; + + case 74: +#line 532 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2463 "zparser.c" /* yacc.c:1646 */ + break; + + case 75: +#line 533 "zparser.y" /* yacc.c:1646 */ + { zc_warning_prev_line("MB is obsolete"); } +#line 2469 "zparser.c" /* yacc.c:1646 */ + break; + + case 76: +#line 535 "zparser.y" /* yacc.c:1646 */ + { + zc_warning_prev_line("MB is obsolete"); + (yyval.type) = (yyvsp[-2].type); + parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); + } +#line 2479 "zparser.c" /* yacc.c:1646 */ + break; + + case 78: +#line 541 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2485 "zparser.c" /* yacc.c:1646 */ + break; + + case 80: +#line 543 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2491 "zparser.c" /* yacc.c:1646 */ + break; + + case 82: +#line 546 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2497 "zparser.c" /* yacc.c:1646 */ + break; + + case 84: +#line 548 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2503 "zparser.c" /* yacc.c:1646 */ + break; + + case 86: +#line 550 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2509 "zparser.c" /* yacc.c:1646 */ + break; + + case 88: +#line 552 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2515 "zparser.c" /* yacc.c:1646 */ + break; + + case 90: +#line 554 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2521 "zparser.c" /* yacc.c:1646 */ + break; + + case 92: +#line 556 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2527 "zparser.c" /* yacc.c:1646 */ + break; + + case 94: +#line 558 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2533 "zparser.c" /* yacc.c:1646 */ + break; + + case 96: +#line 560 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2539 "zparser.c" /* yacc.c:1646 */ + break; + + case 98: +#line 562 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2545 "zparser.c" /* yacc.c:1646 */ + break; + + case 100: +#line 564 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2551 "zparser.c" /* yacc.c:1646 */ + break; + + case 102: +#line 566 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2557 "zparser.c" /* yacc.c:1646 */ + break; + + case 104: +#line 568 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2563 "zparser.c" /* yacc.c:1646 */ + break; + + case 106: +#line 570 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2569 "zparser.c" /* yacc.c:1646 */ + break; + + case 108: +#line 572 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2575 "zparser.c" /* yacc.c:1646 */ + break; + + case 110: +#line 574 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2581 "zparser.c" /* yacc.c:1646 */ + break; + + case 112: +#line 576 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2587 "zparser.c" /* yacc.c:1646 */ + break; + + case 114: +#line 578 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2593 "zparser.c" /* yacc.c:1646 */ + break; + + case 116: +#line 580 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2599 "zparser.c" /* yacc.c:1646 */ + break; + + case 118: +#line 582 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2605 "zparser.c" /* yacc.c:1646 */ + break; + + case 120: +#line 584 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2611 "zparser.c" /* yacc.c:1646 */ + break; + + case 122: +#line 586 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2617 "zparser.c" /* yacc.c:1646 */ + break; + + case 124: +#line 588 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2623 "zparser.c" /* yacc.c:1646 */ + break; + + case 126: +#line 590 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2629 "zparser.c" /* yacc.c:1646 */ + break; + + case 128: +#line 592 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2635 "zparser.c" /* yacc.c:1646 */ + break; + + case 130: +#line 594 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2641 "zparser.c" /* yacc.c:1646 */ + break; + + case 132: +#line 596 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2647 "zparser.c" /* yacc.c:1646 */ + break; + + case 134: +#line 598 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2653 "zparser.c" /* yacc.c:1646 */ + break; + + case 137: +#line 601 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2659 "zparser.c" /* yacc.c:1646 */ + break; + + case 139: +#line 603 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2665 "zparser.c" /* yacc.c:1646 */ + break; + + case 140: +#line 604 "zparser.y" /* yacc.c:1646 */ + { if (dlv_warn) { dlv_warn = 0; zc_warning_prev_line("DLV is experimental"); } } +#line 2671 "zparser.c" /* yacc.c:1646 */ + break; + + case 141: +#line 605 "zparser.y" /* yacc.c:1646 */ + { if (dlv_warn) { dlv_warn = 0; zc_warning_prev_line("DLV is experimental"); } (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2677 "zparser.c" /* yacc.c:1646 */ + break; + + case 143: +#line 607 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2683 "zparser.c" /* yacc.c:1646 */ + break; + + case 145: +#line 609 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2689 "zparser.c" /* yacc.c:1646 */ + break; + + case 147: +#line 611 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2695 "zparser.c" /* yacc.c:1646 */ + break; + + case 149: +#line 613 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2701 "zparser.c" /* yacc.c:1646 */ + break; + + case 151: +#line 615 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2707 "zparser.c" /* yacc.c:1646 */ + break; + + case 153: +#line 617 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2713 "zparser.c" /* yacc.c:1646 */ + break; + + case 155: +#line 619 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2719 "zparser.c" /* yacc.c:1646 */ + break; + + case 157: +#line 621 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2725 "zparser.c" /* yacc.c:1646 */ + break; + + case 159: +#line 623 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2731 "zparser.c" /* yacc.c:1646 */ + break; + + case 161: +#line 625 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2737 "zparser.c" /* yacc.c:1646 */ + break; + + case 163: +#line 627 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2743 "zparser.c" /* yacc.c:1646 */ + break; + + case 165: +#line 629 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2749 "zparser.c" /* yacc.c:1646 */ + break; + + case 167: +#line 631 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2755 "zparser.c" /* yacc.c:1646 */ + break; + + case 169: +#line 633 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2761 "zparser.c" /* yacc.c:1646 */ + break; + + case 171: +#line 635 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2767 "zparser.c" /* yacc.c:1646 */ + break; + + case 173: +#line 637 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2773 "zparser.c" /* yacc.c:1646 */ + break; + + case 175: +#line 639 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2779 "zparser.c" /* yacc.c:1646 */ + break; + + case 177: +#line 641 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2785 "zparser.c" /* yacc.c:1646 */ + break; + + case 179: +#line 643 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2791 "zparser.c" /* yacc.c:1646 */ + break; + + case 181: +#line 645 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2797 "zparser.c" /* yacc.c:1646 */ + break; + + case 182: +#line 646 "zparser.y" /* yacc.c:1646 */ + { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } +#line 2803 "zparser.c" /* yacc.c:1646 */ + break; + + case 183: +#line 648 "zparser.y" /* yacc.c:1646 */ + { + zc_error_prev_line("unrecognized RR type '%s'", (yyvsp[-2].data).str); + } +#line 2811 "zparser.c" /* yacc.c:1646 */ + break; + + case 184: +#line 660 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[-1].data).str)); + } +#line 2819 "zparser.c" /* yacc.c:1646 */ + break; + + case 185: +#line 666 "zparser.y" /* yacc.c:1646 */ + { + /* convert a single dname record */ + zadd_rdata_domain((yyvsp[-1].domain)); + } +#line 2828 "zparser.c" /* yacc.c:1646 */ + break; + + case 186: +#line 673 "zparser.y" /* yacc.c:1646 */ + { + /* convert the soa data */ + zadd_rdata_domain((yyvsp[-13].domain)); /* prim. ns */ + zadd_rdata_domain((yyvsp[-11].domain)); /* email */ + zadd_rdata_wireformat(zparser_conv_serial(parser->region, (yyvsp[-9].data).str)); /* serial */ + zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-7].data).str)); /* refresh */ + zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-5].data).str)); /* retry */ + zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-3].data).str)); /* expire */ + zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-1].data).str)); /* minimum */ + } +#line 2843 "zparser.c" /* yacc.c:1646 */ + break; + + case 187: +#line 686 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[-5].data).str)); /* address */ + zadd_rdata_wireformat(zparser_conv_services(parser->region, (yyvsp[-3].data).str, (yyvsp[-1].data).str)); /* protocol and services */ + } +#line 2852 "zparser.c" /* yacc.c:1646 */ + break; + + case 188: +#line 693 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* CPU */ + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* OS*/ + } +#line 2861 "zparser.c" /* yacc.c:1646 */ + break; + + case 189: +#line 700 "zparser.y" /* yacc.c:1646 */ + { + /* convert a single dname record */ + zadd_rdata_domain((yyvsp[-3].domain)); + zadd_rdata_domain((yyvsp[-1].domain)); + } +#line 2871 "zparser.c" /* yacc.c:1646 */ + break; + + case 190: +#line 708 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* priority */ + zadd_rdata_domain((yyvsp[-1].domain)); /* MX host */ + } +#line 2880 "zparser.c" /* yacc.c:1646 */ + break; + + case 191: +#line 715 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_txt_clean_wireformat(); + } +#line 2888 "zparser.c" /* yacc.c:1646 */ + break; + + case 192: +#line 722 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_domain((yyvsp[-3].domain)); /* mbox d-name */ + zadd_rdata_domain((yyvsp[-1].domain)); /* txt d-name */ + } +#line 2897 "zparser.c" /* yacc.c:1646 */ + break; + + case 193: +#line 730 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* subtype */ + zadd_rdata_domain((yyvsp[-1].domain)); /* domain name */ + } +#line 2906 "zparser.c" /* yacc.c:1646 */ + break; + + case 194: +#line 738 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* X.25 address. */ + } +#line 2914 "zparser.c" /* yacc.c:1646 */ + break; + + case 195: +#line 745 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* address */ + } +#line 2922 "zparser.c" /* yacc.c:1646 */ + break; + + case 196: +#line 749 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* address */ + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* sub-address */ + } +#line 2931 "zparser.c" /* yacc.c:1646 */ + break; + + case 197: +#line 757 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ + zadd_rdata_domain((yyvsp[-1].domain)); /* intermediate host */ + } +#line 2940 "zparser.c" /* yacc.c:1646 */ + break; + + case 198: +#line 765 "zparser.y" /* yacc.c:1646 */ + { + /* String must start with "0x" or "0X". */ + if (strncasecmp((yyvsp[-1].data).str, "0x", 2) != 0) { + zc_error_prev_line("NSAP rdata must start with '0x'"); + } else { + zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str + 2, (yyvsp[-1].data).len - 2)); /* NSAP */ + } + } +#line 2953 "zparser.c" /* yacc.c:1646 */ + break; + + case 199: +#line 777 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* preference */ + zadd_rdata_domain((yyvsp[-3].domain)); /* MAP822 */ + zadd_rdata_domain((yyvsp[-1].domain)); /* MAPX400 */ + } +#line 2963 "zparser.c" /* yacc.c:1646 */ + break; + + case 200: +#line 785 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_aaaa(parser->region, (yyvsp[-1].data).str)); /* IPv6 address */ + } +#line 2971 "zparser.c" /* yacc.c:1646 */ + break; + + case 201: +#line 791 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_loc(parser->region, (yyvsp[-1].data).str)); /* Location */ + } +#line 2979 "zparser.c" /* yacc.c:1646 */ + break; + + case 202: +#line 797 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_domain((yyvsp[-3].domain)); /* nxt name */ + zadd_rdata_wireformat(zparser_conv_nxt(parser->region, nxtbits)); /* nxt bitlist */ + memset(nxtbits, 0, sizeof(nxtbits)); + } +#line 2989 "zparser.c" /* yacc.c:1646 */ + break; + + case 203: +#line 805 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* prio */ + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* weight */ + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* port */ + zadd_rdata_domain((yyvsp[-1].domain)); /* target name */ + } +#line 3000 "zparser.c" /* yacc.c:1646 */ + break; + + case 204: +#line 815 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-11].data).str)); /* order */ + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-9].data).str)); /* preference */ + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-7].data).str, (yyvsp[-7].data).len)); /* flags */ + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-5].data).str, (yyvsp[-5].data).len)); /* service */ + zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* regexp */ + zadd_rdata_domain((yyvsp[-1].domain)); /* target name */ + } +#line 3013 "zparser.c" /* yacc.c:1646 */ + break; + + case 205: +#line 827 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ + zadd_rdata_domain((yyvsp[-1].domain)); /* exchanger */ + } +#line 3022 "zparser.c" /* yacc.c:1646 */ + break; + + case 206: +#line 835 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_certificate_type(parser->region, (yyvsp[-7].data).str)); /* type */ + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* key tag */ + zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-3].data).str)); /* algorithm */ + zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* certificate or CRL */ + } +#line 3033 "zparser.c" /* yacc.c:1646 */ + break; + + case 208: +#line 848 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, (yyvsp[0].data).str)); + } +#line 3041 "zparser.c" /* yacc.c:1646 */ + break; + + case 209: +#line 852 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, (yyvsp[0].data).str)); + } +#line 3049 "zparser.c" /* yacc.c:1646 */ + break; + + case 210: +#line 858 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* keytag */ + zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-5].data).str)); /* alg */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* type */ + zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* hash */ + } +#line 3060 "zparser.c" /* yacc.c:1646 */ + break; + + case 211: +#line 867 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* keytag */ + zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-5].data).str)); /* alg */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* type */ + zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* hash */ + } +#line 3071 "zparser.c" /* yacc.c:1646 */ + break; + + case 212: +#line 876 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* alg */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* fp type */ + zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* hash */ + } +#line 3081 "zparser.c" /* yacc.c:1646 */ + break; + + case 213: +#line 884 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* data blob */ + } +#line 3089 "zparser.c" /* yacc.c:1646 */ + break; + + case 214: +#line 890 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_rrtype(parser->region, (yyvsp[-17].data).str)); /* rr covered */ + zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-15].data).str)); /* alg */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-13].data).str)); /* # labels */ + zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-11].data).str)); /* # orig TTL */ + zadd_rdata_wireformat(zparser_conv_time(parser->region, (yyvsp[-9].data).str)); /* sig exp */ + zadd_rdata_wireformat(zparser_conv_time(parser->region, (yyvsp[-7].data).str)); /* sig inc */ + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* key id */ + zadd_rdata_wireformat(zparser_conv_dns_name(parser->region, + (const uint8_t*) (yyvsp[-3].data).str,(yyvsp[-3].data).len)); /* sig name */ + zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* sig data */ + } +#line 3106 "zparser.c" /* yacc.c:1646 */ + break; + + case 215: +#line 905 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_dns_name(parser->region, + (const uint8_t*) (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* nsec name */ + zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); /* nsec bitlist */ + memset(nsecbits, 0, sizeof(nsecbits)); + nsec_highest_rcode = 0; + } +#line 3118 "zparser.c" /* yacc.c:1646 */ + break; + + case 216: +#line 915 "zparser.y" /* yacc.c:1646 */ + { +#ifdef NSEC3 + nsec3_add_params((yyvsp[-9].data).str, (yyvsp[-7].data).str, (yyvsp[-5].data).str, (yyvsp[-3].data).str, (yyvsp[-3].data).len); + + zadd_rdata_wireformat(zparser_conv_b32(parser->region, (yyvsp[-1].data).str)); /* next hashed name */ + zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); /* nsec bitlist */ + memset(nsecbits, 0, sizeof(nsecbits)); + nsec_highest_rcode = 0; +#else + zc_error_prev_line("nsec3 not supported"); +#endif /* NSEC3 */ + } +#line 3135 "zparser.c" /* yacc.c:1646 */ + break; + + case 217: +#line 930 "zparser.y" /* yacc.c:1646 */ + { +#ifdef NSEC3 + nsec3_add_params((yyvsp[-7].data).str, (yyvsp[-5].data).str, (yyvsp[-3].data).str, (yyvsp[-1].data).str, (yyvsp[-1].data).len); +#else + zc_error_prev_line("nsec3 not supported"); +#endif /* NSEC3 */ + } +#line 3147 "zparser.c" /* yacc.c:1646 */ + break; + + case 218: +#line 940 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-7].data).str)); /* usage */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* selector */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* matching type */ + zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* ca data */ + } +#line 3158 "zparser.c" /* yacc.c:1646 */ + break; + + case 219: +#line 949 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-7].data).str)); /* usage */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* selector */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* matching type */ + zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* ca data */ + } +#line 3169 "zparser.c" /* yacc.c:1646 */ + break; + + case 220: +#line 958 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* flags */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* proto */ + zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-3].data).str)); /* alg */ + zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* hash */ + } +#line 3180 "zparser.c" /* yacc.c:1646 */ + break; + + case 221: +#line 967 "zparser.y" /* yacc.c:1646 */ + { + const dname_type* name = 0; + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-6].data).str)); /* precedence */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-4].data).str)); /* gateway type */ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-2].data).str)); /* algorithm */ + switch(atoi((yyvsp[-4].data).str)) { + case IPSECKEY_NOGATEWAY: + zadd_rdata_wireformat(alloc_rdata_init(parser->region, "", 0)); + break; + case IPSECKEY_IP4: + zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[0].data).str)); + break; + case IPSECKEY_IP6: + zadd_rdata_wireformat(zparser_conv_aaaa(parser->region, (yyvsp[0].data).str)); + break; + case IPSECKEY_DNAME: + /* convert and insert the dname */ + if(strlen((yyvsp[0].data).str) == 0) + zc_error_prev_line("IPSECKEY must specify gateway name"); + if(!(name = dname_parse(parser->region, (yyvsp[0].data).str))) + zc_error_prev_line("IPSECKEY bad gateway dname %s", (yyvsp[0].data).str); + if((yyvsp[0].data).str[strlen((yyvsp[0].data).str)-1] != '.') { + if(parser->origin == error_domain) { + zc_error("cannot concatenate origin to domain name, because origin failed to parse"); + break; + } + name = dname_concatenate(parser->rr_region, name, + domain_dname(parser->origin)); + } + zadd_rdata_wireformat(alloc_rdata_init(parser->region, + dname_name(name), name->name_size)); + break; + default: + zc_error_prev_line("unknown IPSECKEY gateway type"); + } + } +#line 3221 "zparser.c" /* yacc.c:1646 */ + break; + + case 222: +#line 1006 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* public key */ + } +#line 3229 "zparser.c" /* yacc.c:1646 */ + break; + + case 224: +#line 1014 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ + zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, (yyvsp[-1].data).str)); /* NodeID */ + } +#line 3238 "zparser.c" /* yacc.c:1646 */ + break; + + case 225: +#line 1021 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ + zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[-1].data).str)); /* Locator32 */ + } +#line 3247 "zparser.c" /* yacc.c:1646 */ + break; + + case 226: +#line 1028 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ + zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, (yyvsp[-1].data).str)); /* Locator64 */ + } +#line 3256 "zparser.c" /* yacc.c:1646 */ + break; + + case 227: +#line 1035 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ + zadd_rdata_domain((yyvsp[-1].domain)); /* FQDN */ + } +#line 3265 "zparser.c" /* yacc.c:1646 */ + break; + + case 228: +#line 1042 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_eui(parser->region, (yyvsp[-1].data).str, 48)); + } +#line 3273 "zparser.c" /* yacc.c:1646 */ + break; + + case 229: +#line 1048 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_eui(parser->region, (yyvsp[-1].data).str, 64)); + } +#line 3281 "zparser.c" /* yacc.c:1646 */ + break; + + case 230: +#line 1055 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* priority */ + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* weight */ + zadd_rdata_wireformat(zparser_conv_long_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* target */ + } +#line 3291 "zparser.c" /* yacc.c:1646 */ + break; + + case 231: +#line 1064 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* Flags */ + zadd_rdata_wireformat(zparser_conv_tag(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* Tag */ + zadd_rdata_wireformat(zparser_conv_long_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* Value */ + } +#line 3301 "zparser.c" /* yacc.c:1646 */ + break; + + case 232: +#line 1073 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); + } +#line 3309 "zparser.c" /* yacc.c:1646 */ + break; + + case 233: +#line 1080 "zparser.y" /* yacc.c:1646 */ + { + zadd_rdata_wireformat(zparser_conv_serial(parser->region, (yyvsp[-3].data).str)); + zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-1].data).str)); + zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); /* nsec bitlist */ + memset(nsecbits, 0, sizeof(nsecbits)); + nsec_highest_rcode = 0; + } +#line 3321 "zparser.c" /* yacc.c:1646 */ + break; + + case 234: +#line 1090 "zparser.y" /* yacc.c:1646 */ + { + /* $2 is the number of octets, currently ignored */ + (yyval.unknown) = zparser_conv_hex(parser->rr_region, (yyvsp[-1].data).str, (yyvsp[-1].data).len); + + } +#line 3331 "zparser.c" /* yacc.c:1646 */ + break; + + case 235: +#line 1096 "zparser.y" /* yacc.c:1646 */ + { + (yyval.unknown) = zparser_conv_hex(parser->rr_region, "", 0); + } +#line 3339 "zparser.c" /* yacc.c:1646 */ + break; + + case 236: +#line 1100 "zparser.y" /* yacc.c:1646 */ + { + (yyval.unknown) = zparser_conv_hex(parser->rr_region, "", 0); + } +#line 3347 "zparser.c" /* yacc.c:1646 */ + break; + + +#line 3351 "zparser.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} +#line 1104 "zparser.y" /* yacc.c:1906 */ + + +int +yywrap(void) +{ + return 1; +} + +/* + * Create the parser. + */ +zparser_type * +zparser_create(region_type *region, region_type *rr_region, namedb_type *db) +{ + zparser_type *result; + + result = (zparser_type *) region_alloc(region, sizeof(zparser_type)); + result->region = region; + result->rr_region = rr_region; + result->db = db; + + result->filename = NULL; + result->current_zone = NULL; + result->origin = NULL; + result->prev_dname = NULL; + result->default_apex = NULL; + + result->temporary_rdatas = (rdata_atom_type *) region_alloc_array( + result->region, MAXRDATALEN, sizeof(rdata_atom_type)); + + return result; +} + +/* + * Initialize the parser for a new zone file. + */ +void +zparser_init(const char *filename, uint32_t ttl, uint16_t klass, + const dname_type *origin) +{ + memset(nxtbits, 0, sizeof(nxtbits)); + memset(nsecbits, 0, sizeof(nsecbits)); + nsec_highest_rcode = 0; + + parser->default_ttl = ttl; + parser->default_class = klass; + parser->current_zone = NULL; + parser->origin = domain_table_insert(parser->db->domains, origin); + parser->prev_dname = parser->origin; + parser->default_apex = parser->origin; + parser->error_occurred = 0; + parser->errors = 0; + parser->line = 1; + parser->filename = filename; + parser->current_rr.rdata_count = 0; + parser->current_rr.rdatas = parser->temporary_rdatas; +} + +void +yyerror(const char *message) +{ + zc_error("%s", message); +} + +static void +error_va_list(unsigned line, const char *fmt, va_list args) +{ + if (parser->filename) { + char message[MAXSYSLOGMSGLEN]; + vsnprintf(message, sizeof(message), fmt, args); + log_msg(LOG_ERR, "%s:%u: %s", parser->filename, line, message); + } + else log_vmsg(LOG_ERR, fmt, args); + + ++parser->errors; + parser->error_occurred = 1; +} + +/* the line counting sux, to say the least + * with this grose hack we try do give sane + * numbers back */ +void +zc_error_prev_line(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + error_va_list(parser->line - 1, fmt, args); + va_end(args); +} + +void +zc_error(const char *fmt, ...) +{ + /* send an error message to stderr */ + va_list args; + va_start(args, fmt); + error_va_list(parser->line, fmt, args); + va_end(args); +} + +static void +warning_va_list(unsigned line, const char *fmt, va_list args) +{ + if (parser->filename) { + char m[MAXSYSLOGMSGLEN]; + vsnprintf(m, sizeof(m), fmt, args); + log_msg(LOG_WARNING, "%s:%u: %s", parser->filename, line, m); + } + else log_vmsg(LOG_WARNING, fmt, args); +} + +void +zc_warning_prev_line(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + warning_va_list(parser->line - 1, fmt, args); + va_end(args); +} + +void +zc_warning(const char *fmt, ... ) +{ + va_list args; + va_start(args, fmt); + warning_va_list(parser->line, fmt, args); + va_end(args); +} + +#ifdef NSEC3 +static void +nsec3_add_params(const char* hashalgo_str, const char* flag_str, + const char* iter_str, const char* salt_str, int salt_len) +{ + zadd_rdata_wireformat(zparser_conv_byte(parser->region, hashalgo_str)); + zadd_rdata_wireformat(zparser_conv_byte(parser->region, flag_str)); + zadd_rdata_wireformat(zparser_conv_short(parser->region, iter_str)); + + /* salt */ + if(strcmp(salt_str, "-") != 0) + zadd_rdata_wireformat(zparser_conv_hex_length(parser->region, + salt_str, salt_len)); + else + zadd_rdata_wireformat(alloc_rdata_init(parser->region, "", 1)); +} +#endif /* NSEC3 */ diff --git a/external/bsd/nsd/dist/zparser.h b/external/bsd/nsd/dist/zparser.h new file mode 100644 index 000000000000..b8096501cd7f --- /dev/null +++ b/external/bsd/nsd/dist/zparser.h @@ -0,0 +1,258 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_YY_ZPARSER_H_INCLUDED +# define YY_YY_ZPARSER_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + T_A = 258, + T_NS = 259, + T_MX = 260, + T_TXT = 261, + T_CNAME = 262, + T_AAAA = 263, + T_PTR = 264, + T_NXT = 265, + T_KEY = 266, + T_SOA = 267, + T_SIG = 268, + T_SRV = 269, + T_CERT = 270, + T_LOC = 271, + T_MD = 272, + T_MF = 273, + T_MB = 274, + T_MG = 275, + T_MR = 276, + T_NULL = 277, + T_WKS = 278, + T_HINFO = 279, + T_MINFO = 280, + T_RP = 281, + T_AFSDB = 282, + T_X25 = 283, + T_ISDN = 284, + T_RT = 285, + T_NSAP = 286, + T_NSAP_PTR = 287, + T_PX = 288, + T_GPOS = 289, + T_EID = 290, + T_NIMLOC = 291, + T_ATMA = 292, + T_NAPTR = 293, + T_KX = 294, + T_A6 = 295, + T_DNAME = 296, + T_SINK = 297, + T_OPT = 298, + T_APL = 299, + T_UINFO = 300, + T_UID = 301, + T_GID = 302, + T_UNSPEC = 303, + T_TKEY = 304, + T_TSIG = 305, + T_IXFR = 306, + T_AXFR = 307, + T_MAILB = 308, + T_MAILA = 309, + T_DS = 310, + T_DLV = 311, + T_SSHFP = 312, + T_RRSIG = 313, + T_NSEC = 314, + T_DNSKEY = 315, + T_SPF = 316, + T_NSEC3 = 317, + T_IPSECKEY = 318, + T_DHCID = 319, + T_NSEC3PARAM = 320, + T_TLSA = 321, + T_URI = 322, + T_NID = 323, + T_L32 = 324, + T_L64 = 325, + T_LP = 326, + T_EUI48 = 327, + T_EUI64 = 328, + T_CAA = 329, + T_CDS = 330, + T_CDNSKEY = 331, + T_OPENPGPKEY = 332, + T_CSYNC = 333, + T_AVC = 334, + T_SMIMEA = 335, + DOLLAR_TTL = 336, + DOLLAR_ORIGIN = 337, + NL = 338, + SP = 339, + STR = 340, + PREV = 341, + BITLAB = 342, + T_TTL = 343, + T_RRCLASS = 344, + URR = 345, + T_UTYPE = 346 + }; +#endif +/* Tokens. */ +#define T_A 258 +#define T_NS 259 +#define T_MX 260 +#define T_TXT 261 +#define T_CNAME 262 +#define T_AAAA 263 +#define T_PTR 264 +#define T_NXT 265 +#define T_KEY 266 +#define T_SOA 267 +#define T_SIG 268 +#define T_SRV 269 +#define T_CERT 270 +#define T_LOC 271 +#define T_MD 272 +#define T_MF 273 +#define T_MB 274 +#define T_MG 275 +#define T_MR 276 +#define T_NULL 277 +#define T_WKS 278 +#define T_HINFO 279 +#define T_MINFO 280 +#define T_RP 281 +#define T_AFSDB 282 +#define T_X25 283 +#define T_ISDN 284 +#define T_RT 285 +#define T_NSAP 286 +#define T_NSAP_PTR 287 +#define T_PX 288 +#define T_GPOS 289 +#define T_EID 290 +#define T_NIMLOC 291 +#define T_ATMA 292 +#define T_NAPTR 293 +#define T_KX 294 +#define T_A6 295 +#define T_DNAME 296 +#define T_SINK 297 +#define T_OPT 298 +#define T_APL 299 +#define T_UINFO 300 +#define T_UID 301 +#define T_GID 302 +#define T_UNSPEC 303 +#define T_TKEY 304 +#define T_TSIG 305 +#define T_IXFR 306 +#define T_AXFR 307 +#define T_MAILB 308 +#define T_MAILA 309 +#define T_DS 310 +#define T_DLV 311 +#define T_SSHFP 312 +#define T_RRSIG 313 +#define T_NSEC 314 +#define T_DNSKEY 315 +#define T_SPF 316 +#define T_NSEC3 317 +#define T_IPSECKEY 318 +#define T_DHCID 319 +#define T_NSEC3PARAM 320 +#define T_TLSA 321 +#define T_URI 322 +#define T_NID 323 +#define T_L32 324 +#define T_L64 325 +#define T_LP 326 +#define T_EUI48 327 +#define T_EUI64 328 +#define T_CAA 329 +#define T_CDS 330 +#define T_CDNSKEY 331 +#define T_OPENPGPKEY 332 +#define T_CSYNC 333 +#define T_AVC 334 +#define T_SMIMEA 335 +#define DOLLAR_TTL 336 +#define DOLLAR_ORIGIN 337 +#define NL 338 +#define SP 339 +#define STR 340 +#define PREV 341 +#define BITLAB 342 +#define T_TTL 343 +#define T_RRCLASS 344 +#define URR 345 +#define T_UTYPE 346 + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ +#line 50 "zparser.y" /* yacc.c:1909 */ + + domain_type *domain; + const dname_type *dname; + struct lex_data data; + uint32_t ttl; + uint16_t klass; + uint16_t type; + uint16_t *unknown; + +#line 246 "zparser.h" /* yacc.c:1909 */ +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_ZPARSER_H_INCLUDED */