summaryrefslogtreecommitdiffstats
path: root/src/bin/netconf
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2019-08-14 11:36:46 +0200
committerTomek Mrugalski <tomasz@isc.org>2019-08-14 11:36:46 +0200
commit2add51ecf0d91d2a9ac797594c38472190c18460 (patch)
tree7a1dccc707832d9cec93ee51d9c1c34e38f72f67 /src/bin/netconf
parent[#665,!460] Added ChangeLog entry (diff)
downloadkea-2add51ecf0d91d2a9ac797594c38472190c18460.tar.xz
kea-2add51ecf0d91d2a9ac797594c38472190c18460.zip
[#665] Regenerated parsers using bison 3.4.1
Diffstat (limited to 'src/bin/netconf')
-rw-r--r--src/bin/netconf/location.hh14
-rw-r--r--src/bin/netconf/netconf_lexer.cc1174
-rw-r--r--src/bin/netconf/netconf_parser.cc572
-rw-r--r--src/bin/netconf/netconf_parser.h2080
-rw-r--r--src/bin/netconf/position.hh2
-rw-r--r--src/bin/netconf/stack.hh2
6 files changed, 1997 insertions, 1847 deletions
diff --git a/src/bin/netconf/location.hh b/src/bin/netconf/location.hh
index 69c2cf2caf..d203990043 100644
--- a/src/bin/netconf/location.hh
+++ b/src/bin/netconf/location.hh
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.2.1.
+// A Bison parser, made by GNU Bison 3.4.1.
// Locations for Bison parsers in C++
-// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018-2019 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
@@ -54,9 +54,10 @@
# endif
# endif
-#line 14 "netconf_parser.yy" // location.cc:339
+#line 14 "netconf_parser.yy"
namespace isc { namespace netconf {
-#line 60 "location.hh" // location.cc:339
+#line 60 "location.hh"
+
/// A point in a source file.
class position
{
@@ -316,7 +317,8 @@ namespace isc { namespace netconf {
return ostr;
}
-#line 14 "netconf_parser.yy" // location.cc:339
+#line 14 "netconf_parser.yy"
} } // isc::netconf
-#line 322 "location.hh" // location.cc:339
+#line 323 "location.hh"
+
#endif // !YY_NETCONF_LOCATION_HH_INCLUDED
diff --git a/src/bin/netconf/netconf_lexer.cc b/src/bin/netconf/netconf_lexer.cc
index 0492a387e7..1b944f3590 100644
--- a/src/bin/netconf/netconf_lexer.cc
+++ b/src/bin/netconf/netconf_lexer.cc
@@ -7,21 +7,16 @@
/* A lexical scanner generated by flex */
/* %not-for-header */
+
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer netconf__create_buffer
#define yy_delete_buffer netconf__delete_buffer
-#define yy_scan_buffer netconf__scan_buffer
-#define yy_scan_string netconf__scan_string
-#define yy_scan_bytes netconf__scan_bytes
+#define yy_flex_debug netconf__flex_debug
#define yy_init_buffer netconf__init_buffer
#define yy_flush_buffer netconf__flush_buffer
#define yy_load_buffer_state netconf__load_buffer_state
#define yy_switch_to_buffer netconf__switch_to_buffer
-#define yypush_buffer_state netconf_push_buffer_state
-#define yypop_buffer_state netconf_pop_buffer_state
-#define yyensure_buffer_stack netconf_ensure_buffer_stack
-#define yy_flex_debug netconf__flex_debug
#define yyin netconf_in
#define yyleng netconf_leng
#define yylex netconf_lex
@@ -40,8 +35,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -50,244 +45,11 @@
/* %endif */
/* %if-c-only */
-#ifdef yy_create_buffer
-#define netconf__create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer netconf__create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define netconf__delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer netconf__delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define netconf__scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer netconf__scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define netconf__scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string netconf__scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define netconf__scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes netconf__scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define netconf__init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer netconf__init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define netconf__flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer netconf__flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define netconf__load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state netconf__load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define netconf__switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer netconf__switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define netconf_push_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state netconf_push_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define netconf_pop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state netconf_pop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define netconf_ensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack netconf_ensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define netconf_lex_ALREADY_DEFINED
-#else
-#define yylex netconf_lex
-#endif
-
-#ifdef yyrestart
-#define netconf_restart_ALREADY_DEFINED
-#else
-#define yyrestart netconf_restart
-#endif
-
-#ifdef yylex_init
-#define netconf_lex_init_ALREADY_DEFINED
-#else
-#define yylex_init netconf_lex_init
-#endif
-
-#ifdef yylex_init_extra
-#define netconf_lex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra netconf_lex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define netconf_lex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy netconf_lex_destroy
-#endif
-
-#ifdef yyget_debug
-#define netconf_get_debug_ALREADY_DEFINED
-#else
-#define yyget_debug netconf_get_debug
-#endif
-
-#ifdef yyset_debug
-#define netconf_set_debug_ALREADY_DEFINED
-#else
-#define yyset_debug netconf_set_debug
-#endif
-
-#ifdef yyget_extra
-#define netconf_get_extra_ALREADY_DEFINED
-#else
-#define yyget_extra netconf_get_extra
-#endif
-
-#ifdef yyset_extra
-#define netconf_set_extra_ALREADY_DEFINED
-#else
-#define yyset_extra netconf_set_extra
-#endif
-
-#ifdef yyget_in
-#define netconf_get_in_ALREADY_DEFINED
-#else
-#define yyget_in netconf_get_in
-#endif
-
-#ifdef yyset_in
-#define netconf_set_in_ALREADY_DEFINED
-#else
-#define yyset_in netconf_set_in
-#endif
-
-#ifdef yyget_out
-#define netconf_get_out_ALREADY_DEFINED
-#else
-#define yyget_out netconf_get_out
-#endif
-
-#ifdef yyset_out
-#define netconf_set_out_ALREADY_DEFINED
-#else
-#define yyset_out netconf_set_out
-#endif
-
-#ifdef yyget_leng
-#define netconf_get_leng_ALREADY_DEFINED
-#else
-#define yyget_leng netconf_get_leng
-#endif
-
-#ifdef yyget_text
-#define netconf_get_text_ALREADY_DEFINED
-#else
-#define yyget_text netconf_get_text
-#endif
-
-#ifdef yyget_lineno
-#define netconf_get_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno netconf_get_lineno
-#endif
-
-#ifdef yyset_lineno
-#define netconf_set_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno netconf_set_lineno
-#endif
-
-#ifdef yywrap
-#define netconf_wrap_ALREADY_DEFINED
-#else
-#define yywrap netconf_wrap
-#endif
-
+
/* %endif */
-#ifdef yyalloc
-#define netconf_alloc_ALREADY_DEFINED
-#else
-#define yyalloc netconf_alloc
-#endif
-
-#ifdef yyrealloc
-#define netconf_realloc_ALREADY_DEFINED
-#else
-#define yyrealloc netconf_realloc
-#endif
-
-#ifdef yyfree
-#define netconf_free_ALREADY_DEFINED
-#else
-#define yyfree netconf_free
-#endif
-
/* %if-c-only */
-#ifdef yytext
-#define netconf_text_ALREADY_DEFINED
-#else
-#define yytext netconf_text
-#endif
-
-#ifdef yyleng
-#define netconf_leng_ALREADY_DEFINED
-#else
-#define yyleng netconf_leng
-#endif
-
-#ifdef yyin
-#define netconf_in_ALREADY_DEFINED
-#else
-#define yyin netconf_in
-#endif
-
-#ifdef yyout
-#define netconf_out_ALREADY_DEFINED
-#else
-#define yyout netconf_out
-#endif
-
-#ifdef yy_flex_debug
-#define netconf__flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug netconf__flex_debug
-#endif
-
-#ifdef yylineno
-#define netconf_lineno_ALREADY_DEFINED
-#else
-#define yylineno netconf_lineno
-#endif
-
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
@@ -328,6 +90,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -335,6 +98,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -365,39 +129,48 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
/* %endif */
-/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */
-/* TODO: this is always defined, so inline it */
-#define yyconst const
+#ifdef __cplusplus
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
#else
-#define yynoreturn
+#define yyconst
#endif
/* %not-for-header */
+
/* Returned upon end-of-file. */
#define YY_NULL 0
/* %ok-for-header */
/* %not-for-header */
-/* Promotes a possibly negative, possibly signed char to an
- * integer in range [0..255] for use as an array index.
+
+/* 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) ((YY_CHAR) (c))
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* %ok-for-header */
/* %if-reentrant */
@@ -412,29 +185,25 @@ typedef unsigned int flex_uint32_t;
* 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_NEW_FILE netconf_restart(netconf_in )
+
#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.
@@ -452,35 +221,35 @@ typedef size_t yy_size_t;
#endif
/* %if-not-reentrant */
-extern int yyleng;
+extern yy_size_t netconf_leng;
/* %endif */
/* %if-c-only */
/* %if-not-reentrant */
-extern FILE *yyin, *yyout;
+extern FILE *netconf_in, *netconf_out;
/* %endif */
/* %endif */
#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. */ \
+ /* Undo effects of setting up netconf_text. */ \
int 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 */ \
+ YY_DO_BEFORE_ACTION; /* set up netconf_text again */ \
} \
while ( 0 )
+
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -500,12 +269,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- int yy_buf_size;
+ yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t 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
@@ -528,7 +297,7 @@ struct yy_buffer_state
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.
*/
@@ -545,8 +314,8 @@ struct yy_buffer_state
* 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.
+ * (via netconf_restart()), so that the user can continue scanning by
+ * just pointing netconf_in at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -555,12 +324,13 @@ struct yy_buffer_state
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
+
/* %if-not-reentrant */
/* 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. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* %endif */
/* %ok-for-header */
@@ -575,6 +345,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
#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.
*/
@@ -584,112 +355,115 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %if-not-reentrant */
/* %not-for-header */
-/* yy_hold_char holds the character lost when yytext is formed. */
+
+/* yy_hold_char holds the character lost when netconf_text is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t netconf_leng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+static char *yy_c_buf_p = (char *) 0;
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 ...
+/* Flag which is used to allow netconf_wrap()'s to do buffer switches
+ * instead of setting up a fresh netconf_in. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
/* %ok-for-header */
/* %endif */
-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 );
+void netconf_restart (FILE *input_file );
+void netconf__switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE netconf__create_buffer (FILE *file,int size );
+void netconf__delete_buffer (YY_BUFFER_STATE b );
+void netconf__flush_buffer (YY_BUFFER_STATE b );
+void netconf_push_buffer_state (YY_BUFFER_STATE new_buffer );
+void netconf_pop_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 )
+static void netconf_ensure_buffer_stack (void );
+static void netconf__load_buffer_state (void );
+static void netconf__init_buffer (YY_BUFFER_STATE b,FILE *file );
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+#define YY_FLUSH_BUFFER netconf__flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE netconf__scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE netconf__scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE netconf__scan_bytes (yyconst char *bytes,yy_size_t len );
/* %endif */
-void *yyalloc ( yy_size_t );
-void *yyrealloc ( void *, yy_size_t );
-void yyfree ( void * );
+void *netconf_alloc (yy_size_t );
+void *netconf_realloc (void *,yy_size_t );
+void netconf_free (void * );
+
+#define yy_new_buffer netconf__create_buffer
-#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ netconf_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ netconf__create_buffer(netconf_in,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 (); \
+ netconf_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ netconf__create_buffer(netconf_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
+
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
+/* %% [1.0] netconf_text/netconf_in/netconf_out/yy_state_type/netconf_lineno etc. def's & init go here */
/* Begin user sect3 */
-#define netconf_wrap() (/*CONSTCOND*/1)
+#define netconf_wrap(n) 1
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
-typedef flex_uint8_t YY_CHAR;
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *netconf_in = (FILE *) 0, *netconf_out = (FILE *) 0;
typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
+extern int netconf_lineno;
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
+int netconf_lineno = 1;
-/* %% [1.5] DFA */
+extern char *netconf_text;
+#define yytext_ptr netconf_text
/* %if-c-only Standard (non-C++) definition */
-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 ( const char* msg );
+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 yy_fatal_error (yyconst char msg[] );
/* %endif */
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up netconf_text.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
- yyleng = (int) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle netconf_text and netconf_leng for yymore() goes here \ */\
+ netconf_leng = (yy_size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
+/* %% [3.0] code to copy yytext_ptr to netconf_text[] goes here, if %array \ */\
(yy_c_buf_p) = yy_cp;
+
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 63
#define YY_END_OF_BUFFER 64
@@ -700,7 +474,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[373] =
+static yyconst flex_int16_t yy_accept[373] =
{ 0,
56, 56, 0, 0, 0, 0, 0, 0, 0, 0,
64, 62, 10, 11, 62, 1, 56, 53, 56, 56,
@@ -745,7 +519,7 @@ static const flex_int16_t yy_accept[373] =
16, 0
} ;
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
@@ -777,7 +551,7 @@ static const YY_CHAR yy_ec[256] =
5, 5, 5, 5, 5
} ;
-static const YY_CHAR yy_meta[61] =
+static yyconst flex_int32_t yy_meta[61] =
{ 0,
1, 1, 2, 3, 3, 4, 3, 3, 3, 3,
3, 3, 5, 6, 6, 6, 6, 3, 3, 3,
@@ -787,7 +561,7 @@ static const YY_CHAR yy_meta[61] =
5, 3, 5, 5, 3, 3, 3, 3, 3, 3
} ;
-static const flex_int16_t yy_base[386] =
+static yyconst flex_int16_t yy_base[386] =
{ 0,
0, 0, 59, 62, 65, 0, 63, 67, 47, 64,
291, 2525, 84, 286, 125, 0, 105, 2525, 120, 125,
@@ -833,7 +607,7 @@ static const flex_int16_t yy_base[386] =
2509, 2511, 2513, 2515, 2517
} ;
-static const flex_int16_t yy_def[386] =
+static yyconst flex_int16_t yy_def[386] =
{ 0,
372, 1, 373, 373, 1, 5, 5, 5, 5, 5,
372, 372, 372, 372, 374, 375, 372, 372, 372, 372,
@@ -879,7 +653,7 @@ static const flex_int16_t yy_def[386] =
372, 372, 372, 372, 372
} ;
-static const flex_int16_t yy_nxt[2586] =
+static yyconst flex_int16_t yy_nxt[2586] =
{ 0,
12, 13, 14, 13, 12, 15, 16, 12, 17, 18,
19, 20, 21, 22, 22, 22, 22, 23, 24, 12,
@@ -1167,7 +941,7 @@ static const flex_int16_t yy_nxt[2586] =
372, 372, 372, 372, 372
} ;
-static const flex_int16_t yy_chk[2586] =
+static yyconst flex_int16_t yy_chk[2586] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1458,18 +1232,18 @@ static const flex_int16_t yy_chk[2586] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 1;
+extern int netconf__flex_debug;
+int netconf__flex_debug = 1;
-static const flex_int16_t yy_rule_linenum[63] =
+static yyconst flex_int16_t yy_rule_linenum[63] =
{ 0,
- 133, 135, 137, 142, 143, 148, 149, 150, 162, 165,
- 170, 177, 186, 198, 210, 220, 230, 240, 249, 258,
- 267, 276, 285, 294, 303, 312, 321, 330, 339, 348,
- 357, 366, 375, 384, 393, 403, 412, 421, 430, 439,
- 448, 457, 466, 475, 484, 583, 588, 593, 598, 599,
- 600, 601, 602, 603, 605, 623, 636, 641, 645, 647,
- 649, 651
+ 132, 134, 136, 141, 142, 147, 148, 149, 161, 164,
+ 169, 176, 185, 197, 209, 219, 229, 239, 248, 257,
+ 266, 275, 284, 293, 302, 311, 320, 329, 338, 347,
+ 356, 365, 374, 383, 392, 402, 411, 420, 429, 438,
+ 447, 456, 465, 474, 483, 582, 587, 592, 597, 598,
+ 599, 600, 601, 602, 604, 622, 635, 640, 644, 646,
+ 648, 650
} ;
/* The intent behind this definition is that it'll catch
@@ -1479,7 +1253,7 @@ static const flex_int16_t yy_rule_linenum[63] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+char *netconf_text;
#line 1 "netconf_lexer.ll"
/* Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
@@ -1507,8 +1281,8 @@ char *yytext;
2.5.31 through 2.5.33): it generates code that does
not conform to C89. See Debian bug 333231
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
-# undef yywrap
-# define yywrap() 1
+# undef netconf_wrap
+# define netconf_wrap() 1
namespace {
@@ -1524,10 +1298,9 @@ using isc::netconf::NetconfParser;
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::netconf::ParserContext::fatal(msg)
-#line 1528 "netconf_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
- using yywrap requires linking with -lfl, which provides the default yywrap
+ using netconf_wrap requires linking with -lfl, which provides the default netconf_wrap
implementation that always returns 1 anyway. */
/* nounput simplifies the lexer, by removing support for putting a character
back into the input stream. We never use such capability anyway. */
@@ -1535,23 +1308,23 @@ using isc::netconf::NetconfParser;
/* avoid to get static global variables to remain with C++. */
/* in last resort %option reentrant */
/* Enables debug mode. To see the debug messages, one needs to also set
- yy_flex_debug to 1, then the debug messages will be printed on stderr. */
+ netconf__flex_debug to 1, then the debug messages will be printed on stderr. */
/* I have no idea what this option does, except it was specified in the bison
examples and Postgres folks added it to remove gcc 4.3 warnings. Let's
be on the safe side and keep it. */
#define YY_NO_INPUT 1
+
/* These are not token expressions yet, just convenience expressions that
can be used during actual token definitions. Note some can match
incorrect inputs (e.g., IP addresses) which must be checked. */
/* for errors */
#line 96 "netconf_lexer.ll"
/* This code run each time a pattern is matched. It updates the location
- by moving it ahead by yyleng bytes. yyleng specifies the length of the
+ by moving it ahead by netconf_leng bytes. netconf_leng specifies the length of the
currently matched token. */
-#define YY_USER_ACTION driver.loc_.columns(yyleng);
-#line 1554 "netconf_lexer.cc"
-#line 1555 "netconf_lexer.cc"
+#define YY_USER_ACTION driver.loc_.columns(netconf_leng);
+#line 1328 "netconf_lexer.cc"
#define INITIAL 0
#define COMMENT 1
@@ -1579,7 +1352,7 @@ using isc::netconf::NetconfParser;
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
/* %endif */
/* %if-reentrant */
@@ -1589,31 +1362,31 @@ 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 netconf_lex_destroy (void );
-int yyget_debug ( void );
+int netconf_get_debug (void );
-void yyset_debug ( int debug_flag );
+void netconf_set_debug (int debug_flag );
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE netconf_get_extra (void );
-void yyset_extra ( YY_EXTRA_TYPE user_defined );
+void netconf_set_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in ( void );
+FILE *netconf_get_in (void );
-void yyset_in ( FILE * _in_str );
+void netconf_set_in (FILE * in_str );
-FILE *yyget_out ( void );
+FILE *netconf_get_out (void );
-void yyset_out ( FILE * _out_str );
+void netconf_set_out (FILE * out_str );
- int yyget_leng ( void );
+yy_size_t netconf_get_leng (void );
-char *yyget_text ( void );
+char *netconf_get_text (void );
-int yyget_lineno ( void );
+int netconf_get_lineno (void );
-void yyset_lineno ( int _line_number );
+void netconf_set_lineno (int line_number );
/* %if-bison-bridge */
/* %endif */
@@ -1624,35 +1397,34 @@ void yyset_lineno ( int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int netconf_wrap (void );
#else
-extern int yywrap ( void );
+extern int netconf_wrap (void );
#endif
#endif
/* %not-for-header */
-#ifndef YY_NO_UNPUT
-
-#endif
+
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
+
#ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
#else
-static int input ( void );
+static int input (void );
#endif
/* %ok-for-header */
@@ -1665,12 +1437,7 @@ static int input ( void );
/* 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. */
@@ -1679,7 +1446,7 @@ static int input ( void );
/* 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)
+#define ECHO fwrite( netconf_text, netconf_leng, 1, netconf_out )
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
@@ -1694,20 +1461,20 @@ static int input ( void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( netconf_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
+ if ( c == EOF && ferror( netconf_in ) ) \
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)) \
+ while ( (result = fread(buf, 1, max_size, netconf_in))==0 && ferror(netconf_in)) \
{ \
if( errno != EINTR) \
{ \
@@ -1715,7 +1482,7 @@ static int input ( void );
break; \
} \
errno=0; \
- clearerr(yyin); \
+ clearerr(netconf_in); \
} \
}\
\
@@ -1748,9 +1515,11 @@ static int input ( void );
/* %if-tables-serialization structures and prototypes */
/* %not-for-header */
+
/* %ok-for-header */
/* %not-for-header */
+
/* %tables-yydmap generated elements */
/* %endif */
/* end tables serialization structures and prototypes */
@@ -1764,15 +1533,15 @@ static int input ( void );
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */
-extern int yylex (void);
+extern int netconf_lex (void);
-#define YY_DECL int yylex (void)
+#define YY_DECL int netconf_lex (void)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after netconf_text and netconf_leng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1781,7 +1550,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
@@ -1789,60 +1558,25 @@ extern int yylex (void);
YY_USER_ACTION
/* %not-for-header */
+
/** 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;
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register 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 )
-/* %if-c-only */
- yyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! yyout )
-/* %if-c-only */
- yyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
- }
-
- yy_load_buffer_state( );
- }
-
- {
/* %% [7.0] user's declarations go here */
#line 102 "netconf_lexer.ll"
-#line 106 "netconf_lexer.ll"
/* This part of the code is copied over to the verbatim to the top
- of the generated yylex function. Explanation:
+ of the generated netconf_lex function. Explanation:
http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html */
- /* Code run each time yylex is called. */
+ /* Code run each time netconf_lex is called. */
driver.loc_.step();
/* We currently have 3 points of entries defined:
@@ -1865,14 +1599,48 @@ YY_DECL
}
-#line 1869 "netconf_lexer.cc"
+#line 1603 "netconf_lexer.cc"
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! netconf_in )
+/* %if-c-only */
+ netconf_in = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! netconf_out )
+/* %if-c-only */
+ netconf_out = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ netconf_ensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ netconf__create_buffer(netconf_in,YY_BUF_SIZE );
+ }
+
+ netconf__load_buffer_state( );
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
+ /* Support of netconf_text. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1885,7 +1653,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ register 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;
@@ -1895,9 +1663,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 373 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 372 );
@@ -1910,21 +1678,21 @@ yy_find_action:
YY_DO_BEFORE_ACTION;
-/* %% [11.0] code for yylineno update goes here */
+/* %% [11.0] code for netconf_lineno update goes here */
do_action: /* This label is used only to access EOF actions. */
/* %% [12.0] debug code goes here */
- if ( yy_flex_debug )
+ if ( netconf__flex_debug )
{
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
else if ( yy_act < 63 )
fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], yytext );
+ (long)yy_rule_linenum[yy_act], netconf_text );
else if ( yy_act == 63 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
- yytext );
+ netconf_text );
else if ( yy_act == 64 )
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
@@ -1943,17 +1711,17 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 133 "netconf_lexer.ll"
+#line 132 "netconf_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 135 "netconf_lexer.ll"
+#line 134 "netconf_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 137 "netconf_lexer.ll"
+#line 136 "netconf_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
@@ -1961,38 +1729,38 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 142 "netconf_lexer.ll"
+#line 141 "netconf_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 143 "netconf_lexer.ll"
+#line 142 "netconf_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 144 "netconf_lexer.ll"
+#line 143 "netconf_lexer.ll"
{
isc_throw(ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 148 "netconf_lexer.ll"
+#line 147 "netconf_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 149 "netconf_lexer.ll"
+#line 148 "netconf_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 150 "netconf_lexer.ll"
+#line 149 "netconf_lexer.ll"
{
/* Include directive. */
/* Extract the filename. */
- std::string tmp(yytext+1);
+ std::string tmp(netconf_text+1);
tmp.resize(tmp.size() - 1);
driver.includeFile(tmp);
@@ -2001,19 +1769,19 @@ YY_RULE_SETUP
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 159 "netconf_lexer.ll"
+#line 158 "netconf_lexer.ll"
{
isc_throw(ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 162 "netconf_lexer.ll"
+#line 161 "netconf_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 165 "netconf_lexer.ll"
+#line 164 "netconf_lexer.ll"
{
/* Ok, we found a with space. Let's ignore it and update loc variable. */
driver.loc_.step();
@@ -2022,16 +1790,16 @@ YY_RULE_SETUP
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 170 "netconf_lexer.ll"
+#line 169 "netconf_lexer.ll"
{
/* Newline found. Let's update the location and continue. */
- driver.loc_.lines(yyleng);
+ driver.loc_.lines(netconf_leng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 177 "netconf_lexer.ll"
+#line 176 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
@@ -2043,7 +1811,7 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 186 "netconf_lexer.ll"
+#line 185 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2058,7 +1826,7 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 198 "netconf_lexer.ll"
+#line 197 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2073,7 +1841,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 210 "netconf_lexer.ll"
+#line 209 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2086,7 +1854,7 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 220 "netconf_lexer.ll"
+#line 219 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2099,7 +1867,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 230 "netconf_lexer.ll"
+#line 229 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2112,7 +1880,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 240 "netconf_lexer.ll"
+#line 239 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2124,7 +1892,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 249 "netconf_lexer.ll"
+#line 248 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
@@ -2136,7 +1904,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 258 "netconf_lexer.ll"
+#line 257 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
@@ -2148,7 +1916,7 @@ YY_RULE_SETUP
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 267 "netconf_lexer.ll"
+#line 266 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
@@ -2160,7 +1928,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 276 "netconf_lexer.ll"
+#line 275 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
@@ -2172,7 +1940,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 285 "netconf_lexer.ll"
+#line 284 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
@@ -2184,7 +1952,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 294 "netconf_lexer.ll"
+#line 293 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
@@ -2196,7 +1964,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 303 "netconf_lexer.ll"
+#line 302 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
@@ -2208,7 +1976,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 312 "netconf_lexer.ll"
+#line 311 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
@@ -2220,7 +1988,7 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 321 "netconf_lexer.ll"
+#line 320 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
@@ -2232,7 +2000,7 @@ YY_RULE_SETUP
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 330 "netconf_lexer.ll"
+#line 329 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKET:
@@ -2244,7 +2012,7 @@ YY_RULE_SETUP
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 339 "netconf_lexer.ll"
+#line 338 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKET:
@@ -2256,7 +2024,7 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 348 "netconf_lexer.ll"
+#line 347 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKET:
@@ -2268,7 +2036,7 @@ YY_RULE_SETUP
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 357 "netconf_lexer.ll"
+#line 356 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2280,7 +2048,7 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 366 "netconf_lexer.ll"
+#line 365 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
@@ -2292,7 +2060,7 @@ YY_RULE_SETUP
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 375 "netconf_lexer.ll"
+#line 374 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
@@ -2304,7 +2072,7 @@ YY_RULE_SETUP
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 384 "netconf_lexer.ll"
+#line 383 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
@@ -2316,7 +2084,7 @@ YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 393 "netconf_lexer.ll"
+#line 392 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
@@ -2329,7 +2097,7 @@ YY_RULE_SETUP
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 403 "netconf_lexer.ll"
+#line 402 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
@@ -2341,7 +2109,7 @@ YY_RULE_SETUP
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 412 "netconf_lexer.ll"
+#line 411 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
@@ -2353,7 +2121,7 @@ YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 421 "netconf_lexer.ll"
+#line 420 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
@@ -2365,7 +2133,7 @@ YY_RULE_SETUP
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 430 "netconf_lexer.ll"
+#line 429 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
@@ -2377,7 +2145,7 @@ YY_RULE_SETUP
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 439 "netconf_lexer.ll"
+#line 438 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
@@ -2389,7 +2157,7 @@ YY_RULE_SETUP
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 448 "netconf_lexer.ll"
+#line 447 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
@@ -2401,7 +2169,7 @@ YY_RULE_SETUP
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 457 "netconf_lexer.ll"
+#line 456 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
@@ -2413,7 +2181,7 @@ YY_RULE_SETUP
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 466 "netconf_lexer.ll"
+#line 465 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
@@ -2425,7 +2193,7 @@ YY_RULE_SETUP
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 475 "netconf_lexer.ll"
+#line 474 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
@@ -2437,12 +2205,12 @@ YY_RULE_SETUP
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 484 "netconf_lexer.ll"
+#line 483 "netconf_lexer.ll"
{
/* A string has been matched. It contains the actual string and single quotes.
We need to get those quotes out of the way and just use its content, e.g.
for 'foo' we should get foo */
- std::string raw(yytext+1);
+ std::string raw(netconf_text+1);
size_t len = raw.size() - 1;
raw.resize(len);
std::string decoded;
@@ -2540,65 +2308,65 @@ YY_RULE_SETUP
case 46:
/* rule 46 can match eol */
YY_RULE_SETUP
-#line 583 "netconf_lexer.ll"
+#line 582 "netconf_lexer.ll"
{
/* Bad string with a forbidden control character inside */
- driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
+ driver.error(driver.loc_, "Invalid control in " + std::string(netconf_text));
}
YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
-#line 588 "netconf_lexer.ll"
+#line 587 "netconf_lexer.ll"
{
/* Bad string with a bad escape inside */
- driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
+ driver.error(driver.loc_, "Bad escape in " + std::string(netconf_text));
}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 593 "netconf_lexer.ll"
+#line 592 "netconf_lexer.ll"
{
/* Bad string with an open escape at the end */
- driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
+ driver.error(driver.loc_, "Overflow escape in " + std::string(netconf_text));
}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 598 "netconf_lexer.ll"
+#line 597 "netconf_lexer.ll"
{ return NetconfParser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 599 "netconf_lexer.ll"
+#line 598 "netconf_lexer.ll"
{ return NetconfParser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 600 "netconf_lexer.ll"
+#line 599 "netconf_lexer.ll"
{ return NetconfParser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 601 "netconf_lexer.ll"
+#line 600 "netconf_lexer.ll"
{ return NetconfParser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 602 "netconf_lexer.ll"
+#line 601 "netconf_lexer.ll"
{ return NetconfParser::make_COMMA(driver.loc_); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 603 "netconf_lexer.ll"
+#line 602 "netconf_lexer.ll"
{ return NetconfParser::make_COLON(driver.loc_); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 605 "netconf_lexer.ll"
+#line 604 "netconf_lexer.ll"
{
/* An integer was found. */
- std::string tmp(yytext);
+ std::string tmp(netconf_text);
int64_t integer = 0;
try {
/* In substring we want to use negative values (e.g. -1).
@@ -2616,10 +2384,10 @@ YY_RULE_SETUP
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 623 "netconf_lexer.ll"
+#line 622 "netconf_lexer.ll"
{
/* A floating point was found. */
- std::string tmp(yytext);
+ std::string tmp(netconf_text);
double fp = 0.0;
try {
fp = boost::lexical_cast<double>(tmp);
@@ -2632,41 +2400,41 @@ YY_RULE_SETUP
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 636 "netconf_lexer.ll"
+#line 635 "netconf_lexer.ll"
{
- string tmp(yytext);
+ string tmp(netconf_text);
return NetconfParser::make_BOOLEAN(tmp == "true", driver.loc_);
}
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 641 "netconf_lexer.ll"
+#line 640 "netconf_lexer.ll"
{
return NetconfParser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 645 "netconf_lexer.ll"
+#line 644 "netconf_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 647 "netconf_lexer.ll"
+#line 646 "netconf_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 649 "netconf_lexer.ll"
+#line 648 "netconf_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 651 "netconf_lexer.ll"
-driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
+#line 650 "netconf_lexer.ll"
+driver.error (driver.loc_, "Invalid character: " + std::string(netconf_text));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 653 "netconf_lexer.ll"
+#line 652 "netconf_lexer.ll"
{
if (driver.states_.empty()) {
return NetconfParser::make_END(driver.loc_);
@@ -2692,10 +2460,10 @@ case YY_STATE_EOF(INITIAL):
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 676 "netconf_lexer.ll"
+#line 675 "netconf_lexer.ll"
ECHO;
YY_BREAK
-#line 2699 "netconf_lexer.cc"
+#line 2467 "netconf_lexer.cc"
case YY_END_OF_BUFFER:
{
@@ -2710,19 +2478,15 @@ ECHO;
{
/* 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
+ * just pointed netconf_in at a new source and called
+ * netconf_lex(). 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;
-/* %if-c-only */
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = netconf_in;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -2777,11 +2541,11 @@ ECHO;
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( netconf_wrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * yytext, we can now set up
+ * netconf_text, 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
@@ -2830,12 +2594,12 @@ ECHO;
"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 */
+} /* end of netconf_lex */
/* %ok-for-header */
/* %if-c++-only */
/* %not-for-header */
+
/* %ok-for-header */
/* %endif */
@@ -2853,9 +2617,9 @@ static int yy_get_next_buffer (void)
/* %if-c++-only */
/* %endif */
{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- char *source = (yytext_ptr);
- int number_to_move, i;
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
+ register int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -2884,7 +2648,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -2897,21 +2661,21 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read =
+ yy_size_t 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;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
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;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2920,12 +2684,11 @@ static int yy_get_next_buffer (void)
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) );
+ netconf_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = NULL;
+ b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -2953,7 +2716,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ netconf_restart(netconf_in );
}
else
@@ -2967,15 +2730,12 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yy_size_t) ((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 );
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) netconf_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- /* "- 2" to take care of EOB's */
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -2991,13 +2751,14 @@ static int yy_get_next_buffer (void)
/* %if-c-only */
/* %not-for-header */
+
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- yy_state_type yy_current_state;
- char *yy_cp;
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = (yy_start);
@@ -3005,7 +2766,7 @@ static int yy_get_next_buffer (void)
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
/* %% [16.0] code to find the next state goes here */
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ register 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;
@@ -3015,9 +2776,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 373 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
@@ -3034,11 +2795,11 @@ static int yy_get_next_buffer (void)
/* %if-c++-only */
/* %endif */
{
- int yy_is_jam;
+ register int yy_is_jam;
/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
- char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = (yy_c_buf_p);
- YY_CHAR yy_c = 1;
+ register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -3048,19 +2809,17 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 373 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 372);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
-#ifndef YY_NO_UNPUT
/* %if-c-only */
/* %endif */
-#endif
/* %if-c-only */
#ifndef YY_NO_INPUT
@@ -3090,7 +2849,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -3107,13 +2866,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ netconf_restart(netconf_in );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( netconf_wrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -3133,10 +2892,10 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ *(yy_c_buf_p) = '\0'; /* preserve netconf_text */
(yy_hold_char) = *++(yy_c_buf_p);
-/* %% [19.0] update BOL and yylineno */
+/* %% [19.0] update BOL and netconf_lineno */
return c;
}
@@ -3150,31 +2909,28 @@ static int yy_get_next_buffer (void)
* @note This function does not reset the start condition to @c INITIAL .
*/
/* %if-c-only */
- void yyrestart (FILE * input_file )
+ void netconf_restart (FILE * input_file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+ netconf_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ netconf__create_buffer(netconf_in,YY_BUF_SIZE );
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
- yy_load_buffer_state( );
+ netconf__init_buffer(YY_CURRENT_BUFFER,input_file );
+ netconf__load_buffer_state( );
}
-/* %if-c++-only */
-/* %endif */
-
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
/* %if-c-only */
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void netconf__switch_to_buffer (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3182,10 +2938,10 @@ static int yy_get_next_buffer (void)
/* TODO. We should be able to replace this entire function body
* with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
+ * netconf_pop_buffer_state();
+ * netconf_push_buffer_state(new_buffer);
*/
- yyensure_buffer_stack ();
+ netconf_ensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -3198,29 +2954,25 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ netconf__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
+ * EOF (netconf_wrap()) processing, but the only time this flag
+ * is looked at is after netconf_wrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
/* %if-c-only */
-static void yy_load_buffer_state (void)
+static void netconf__load_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-/* %if-c-only */
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ netconf_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -3231,42 +2983,39 @@ static void yy_load_buffer_state (void)
* @return the allocated buffer state.
*/
/* %if-c-only */
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE netconf__create_buffer (FILE * file, int size )
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) netconf_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in netconf__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) );
+ b->yy_ch_buf = (char *) netconf_alloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in netconf__create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ netconf__init_buffer(b,file );
return b;
}
-/* %if-c++-only */
-/* %endif */
-
/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with netconf__create_buffer()
*
*/
/* %if-c-only */
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ void netconf__delete_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3279,17 +3028,28 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
+ netconf_free((void *) b->yy_ch_buf );
- yyfree( (void *) b );
+ netconf_free((void *) b );
}
+/* %if-c-only */
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
/* 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.
+ * such as during a netconf_restart() or at EOF.
*/
/* %if-c-only */
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void netconf__init_buffer (YY_BUFFER_STATE b, FILE * file )
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3297,17 +3057,13 @@ static void yy_load_buffer_state (void)
{
int oerrno = errno;
- yy_flush_buffer( b );
+ netconf__flush_buffer(b );
-/* %if-c-only */
b->yy_input_file = file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
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.
+ /* If b is the current buffer, then netconf__init_buffer was _probably_
+ * called from netconf_restart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -3330,7 +3086,7 @@ static void yy_load_buffer_state (void)
*
*/
/* %if-c-only */
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ void netconf__flush_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3353,7 +3109,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ netconf__load_buffer_state( );
}
/* %if-c-or-c++ */
@@ -3364,7 +3120,7 @@ static void yy_load_buffer_state (void)
*
*/
/* %if-c-only */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void netconf_push_buffer_state (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3372,9 +3128,9 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
if (new_buffer == NULL)
return;
- yyensure_buffer_stack();
+ netconf_ensure_buffer_stack();
- /* This block is copied from yy_switch_to_buffer. */
+ /* This block is copied from netconf__switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -3388,8 +3144,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ /* copied from netconf__switch_to_buffer. */
+ netconf__load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */
@@ -3400,7 +3156,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
*
*/
/* %if-c-only */
-void yypop_buffer_state (void)
+void netconf_pop_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3408,13 +3164,13 @@ void yypop_buffer_state (void)
if (!YY_CURRENT_BUFFER)
return;
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ netconf__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( );
+ netconf__load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -3425,7 +3181,7 @@ void yypop_buffer_state (void)
* Guarantees space for at least one push.
*/
/* %if-c-only */
-static void yyensure_buffer_stack (void)
+static void netconf_ensure_buffer_stack (void)
/* %endif */
/* %if-c++-only */
/* %endif */
@@ -3438,15 +3194,15 @@ static void yyensure_buffer_stack (void)
* 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 = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)netconf_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in netconf_ensure_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;
@@ -3455,15 +3211,15 @@ static void yyensure_buffer_stack (void)
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 */;
+ int 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) = (struct yy_buffer_state**)netconf_realloc
((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()" );
+ YY_FATAL_ERROR( "out of dynamic memory in netconf_ensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -3477,9 +3233,9 @@ static void yyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE netconf__scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -3487,73 +3243,72 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
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;
+ return 0;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) netconf_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in netconf__scan_buffer()" );
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_size = 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_input_file = 0;
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 );
+ netconf__switch_to_buffer(b );
return b;
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to netconf_lex() 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.
+ * netconf__scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE netconf__scan_string (yyconst char * yystr )
{
- return yy_scan_bytes( yystr, (int) strlen(yystr) );
+ return netconf__scan_bytes(yystr,strlen(yystr) );
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to netconf_lex() 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.
+ * @param bytes the byte buffer to scan
+ * @param 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 (const char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE netconf__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) netconf_alloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in netconf__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 );
+ b = netconf__scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in netconf__scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -3569,9 +3324,9 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
#endif
/* %if-c-only */
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
{
- fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
@@ -3584,14 +3339,14 @@ static void yynoreturn yy_fatal_error (const char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up netconf_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ netconf_text[netconf_leng] = (yy_hold_char); \
+ (yy_c_buf_p) = netconf_text + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
+ netconf_leng = yyless_macro_arg; \
} \
while ( 0 )
@@ -3604,82 +3359,82 @@ static void yynoreturn yy_fatal_error (const char* msg )
/** Get the current line number.
*
*/
-int yyget_lineno (void)
+int netconf_get_lineno (void)
{
-
- return yylineno;
+
+ return netconf_lineno;
}
/** Get the input stream.
*
*/
-FILE *yyget_in (void)
+FILE *netconf_get_in (void)
{
- return yyin;
+ return netconf_in;
}
/** Get the output stream.
*
*/
-FILE *yyget_out (void)
+FILE *netconf_get_out (void)
{
- return yyout;
+ return netconf_out;
}
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+yy_size_t netconf_get_leng (void)
{
- return yyleng;
+ return netconf_leng;
}
/** Get the current token.
*
*/
-char *yyget_text (void)
+char *netconf_get_text (void)
{
- return yytext;
+ return netconf_text;
}
/* %if-reentrant */
/* %endif */
/** Set the current line number.
- * @param _line_number line number
+ * @param line_number
*
*/
-void yyset_lineno (int _line_number )
+void netconf_set_lineno (int line_number )
{
- yylineno = _line_number;
+ netconf_lineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
*
- * @see yy_switch_to_buffer
+ * @see netconf__switch_to_buffer
*/
-void yyset_in (FILE * _in_str )
+void netconf_set_in (FILE * in_str )
{
- yyin = _in_str ;
+ netconf_in = in_str ;
}
-void yyset_out (FILE * _out_str )
+void netconf_set_out (FILE * out_str )
{
- yyout = _out_str ;
+ netconf_out = out_str ;
}
-int yyget_debug (void)
+int netconf_get_debug (void)
{
- return yy_flex_debug;
+ return netconf__flex_debug;
}
-void yyset_debug (int _bdebug )
+void netconf_set_debug (int bdebug )
{
- yy_flex_debug = _bdebug ;
+ netconf__flex_debug = bdebug ;
}
/* %endif */
@@ -3693,50 +3448,50 @@ void yyset_debug (int _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.
+ * This function is called from netconf_lex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = NULL;
+ (yy_buffer_stack) = 0;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = NULL;
+ (yy_c_buf_p) = (char *) 0;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ netconf_in = stdin;
+ netconf_out = stdout;
#else
- yyin = NULL;
- yyout = NULL;
+ netconf_in = (FILE *) 0;
+ netconf_out = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * yylex_init()
+ * netconf_lex_init()
*/
return 0;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
+/* netconf_lex_destroy is for both reentrant and non-reentrant scanners. */
+int netconf_lex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer( YY_CURRENT_BUFFER );
+ netconf__delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
+ netconf_pop_buffer_state();
}
/* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
+ netconf_free((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. */
+ * netconf_lex() is called, initialization will occur. */
yy_init_globals( );
/* %if-reentrant */
@@ -3750,19 +3505,18 @@ int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
-
- int i;
+ register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
{
- int n;
+ register int n;
for ( n = 0; s[n]; ++n )
;
@@ -3770,14 +3524,13 @@ static int yy_flex_strlen (const char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+void *netconf_alloc (yy_size_t size )
{
- return malloc(size);
+ return (void *) malloc( size );
}
-void *yyrealloc (void * ptr, yy_size_t size )
+void *netconf_realloc (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
@@ -3785,12 +3538,12 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return realloc(ptr, size);
+ return (void *) realloc( (char *) ptr, size );
}
-void yyfree (void * ptr )
+void netconf_free (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see netconf_realloc() for (char *) cast */
}
/* %if-tables-serialization definitions */
@@ -3800,7 +3553,8 @@ void yyfree (void * ptr )
/* %ok-for-header */
-#line 676 "netconf_lexer.ll"
+#line 675 "netconf_lexer.ll"
+
using namespace isc::dhcp;
@@ -3814,7 +3568,7 @@ ParserContext::scanStringBegin(const std::string& str, ParserType parser_type)
file_ = "<string>";
sfile_ = 0;
loc_.initialize(&file_);
- yy_flex_debug = trace_scanning_;
+ netconf__flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
buffer = netconf__scan_bytes(str.c_str(), str.size());
if (!buffer) {
@@ -3834,7 +3588,7 @@ ParserContext::scanFileBegin(FILE * f,
file_ = filename;
sfile_ = f;
loc_.initialize(&file_);
- yy_flex_debug = trace_scanning_;
+ netconf__flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
/* See netconf_lexer.cc header for available definitions */
diff --git a/src/bin/netconf/netconf_parser.cc b/src/bin/netconf/netconf_parser.cc
index 792d1e917f..6354d81874 100644
--- a/src/bin/netconf/netconf_parser.cc
+++ b/src/bin/netconf/netconf_parser.cc
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.2.1.
+// A Bison parser, made by GNU Bison 3.4.1.
// Skeleton implementation for Bison LALR(1) parsers in C++
-// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018-2019 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
@@ -43,11 +43,11 @@
// Unqualified %code blocks.
-#line 33 "netconf_parser.yy" // lalr1.cc:438
+#line 33 "netconf_parser.yy"
#include <netconf/parser_context.h>
-#line 51 "netconf_parser.cc" // lalr1.cc:438
+#line 51 "netconf_parser.cc"
#ifndef YY_
@@ -88,7 +88,7 @@
{ \
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
} \
- while (/*CONSTCOND*/ false)
+ while (false)
# endif
@@ -140,9 +140,10 @@
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus_)
-#line 14 "netconf_parser.yy" // lalr1.cc:513
+#line 14 "netconf_parser.yy"
namespace isc { namespace netconf {
-#line 146 "netconf_parser.cc" // lalr1.cc:513
+#line 146 "netconf_parser.cc"
+
/* Return YYSTR after stripping away unnecessary quotes and
backslashes, so that it's suitable for yyerror. The heuristic is
@@ -154,7 +155,7 @@ namespace isc { namespace netconf {
{
if (*yystr == '"')
{
- std::string yyr = "";
+ std::string yyr;
char const *yyp = yystr;
for (;;)
@@ -167,7 +168,10 @@ namespace isc { namespace netconf {
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
- // Fall through.
+ else
+ goto append;
+
+ append:
default:
yyr += *yyp;
break;
@@ -195,6 +199,8 @@ namespace isc { namespace netconf {
NetconfParser::~NetconfParser ()
{}
+ NetconfParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
+ {}
/*---------------.
| Symbol types. |
@@ -203,16 +209,16 @@ namespace isc { namespace netconf {
// by_state.
- NetconfParser::by_state::by_state ()
+ NetconfParser::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
{}
- NetconfParser::by_state::by_state (const by_state& other)
- : state (other.state)
+ NetconfParser::by_state::by_state (const by_state& that) YY_NOEXCEPT
+ : state (that.state)
{}
void
- NetconfParser::by_state::clear ()
+ NetconfParser::by_state::clear () YY_NOEXCEPT
{
state = empty_state;
}
@@ -224,12 +230,12 @@ namespace isc { namespace netconf {
that.clear ();
}
- NetconfParser::by_state::by_state (state_type s)
+ NetconfParser::by_state::by_state (state_type s) YY_NOEXCEPT
: state (s)
{}
NetconfParser::symbol_number_type
- NetconfParser::by_state::type_get () const
+ NetconfParser::by_state::type_get () const YY_NOEXCEPT
{
if (state == empty_state)
return empty_symbol;
@@ -271,7 +277,7 @@ namespace isc { namespace netconf {
break;
}
-#if defined __cplusplus && 201103L <= __cplusplus
+#if 201103L <= YY_CPLUSPLUS
// that is emptied.
that.state = empty_state;
#endif
@@ -312,7 +318,7 @@ namespace isc { namespace netconf {
that.type = empty_symbol;
}
-#if !defined __cplusplus || __cplusplus < 201103L
+#if YY_CPLUSPLUS < 201103L
NetconfParser::stack_symbol_type&
NetconfParser::stack_symbol_type::operator= (stack_symbol_type& that)
{
@@ -369,65 +375,59 @@ namespace isc { namespace netconf {
std::ostream& yyoutput = yyo;
YYUSE (yyoutput);
symbol_number_type yytype = yysym.type_get ();
+#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408
// Avoid a (spurious) G++ 4.8 warning about "array subscript is
// below array bounds".
if (yysym.empty ())
std::abort ();
+#endif
yyo << (yytype < yyntokens_ ? "token" : "nterm")
<< ' ' << yytname_[yytype] << " ("
<< yysym.location << ": ";
switch (yytype)
{
- case 46: // "constant string"
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< std::string > (); }
-#line 386 "netconf_parser.cc" // lalr1.cc:672
+ case 46: // "constant string"
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < std::string > (); }
+#line 393 "netconf_parser.cc"
break;
case 47: // "integer"
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< int64_t > (); }
-#line 393 "netconf_parser.cc" // lalr1.cc:672
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < int64_t > (); }
+#line 399 "netconf_parser.cc"
break;
case 48: // "floating point"
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< double > (); }
-#line 400 "netconf_parser.cc" // lalr1.cc:672
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < double > (); }
+#line 405 "netconf_parser.cc"
break;
case 49: // "boolean"
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< bool > (); }
-#line 407 "netconf_parser.cc" // lalr1.cc:672
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < bool > (); }
+#line 411 "netconf_parser.cc"
break;
case 58: // value
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< ElementPtr > (); }
-#line 414 "netconf_parser.cc" // lalr1.cc:672
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < ElementPtr > (); }
+#line 417 "netconf_parser.cc"
break;
case 61: // map_value
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< ElementPtr > (); }
-#line 421 "netconf_parser.cc" // lalr1.cc:672
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < ElementPtr > (); }
+#line 423 "netconf_parser.cc"
break;
case 120: // socket_type_value
-
-#line 108 "netconf_parser.yy" // lalr1.cc:672
- { yyoutput << yysym.value.template as< ElementPtr > (); }
-#line 428 "netconf_parser.cc" // lalr1.cc:672
+#line 108 "netconf_parser.yy"
+ { yyoutput << yysym.value.template as < ElementPtr > (); }
+#line 429 "netconf_parser.cc"
break;
-
default:
break;
}
@@ -446,7 +446,7 @@ namespace isc { namespace netconf {
void
NetconfParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym)
{
-#if defined __cplusplus && 201103L <= __cplusplus
+#if 201103L <= YY_CPLUSPLUS
yypush_ (m, stack_symbol_type (s, std::move (sym)));
#else
stack_symbol_type ss (s, sym);
@@ -550,17 +550,22 @@ namespace isc { namespace netconf {
yystack_.clear ();
yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla));
- // A new symbol was pushed on the stack.
+ /*-----------------------------------------------.
+ | yynewstate -- push a new symbol on the stack. |
+ `-----------------------------------------------*/
yynewstate:
YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
// Accept?
if (yystack_[0].state == yyfinal_)
- goto yyacceptlab;
+ YYACCEPT;
goto yybackup;
- // Backup.
+
+ /*-----------.
+ | yybackup. |
+ `-----------*/
yybackup:
// Try to take a decision without lookahead.
yyn = yypact_[yystack_[0].state];
@@ -581,6 +586,7 @@ namespace isc { namespace netconf {
#if YY_EXCEPTIONS
catch (const syntax_error& yyexc)
{
+ YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
error (yyexc);
goto yyerrlab1;
}
@@ -612,6 +618,7 @@ namespace isc { namespace netconf {
yypush_ ("Shifting", yyn, YY_MOVE (yyla));
goto yynewstate;
+
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
@@ -621,8 +628,9 @@ namespace isc { namespace netconf {
goto yyerrlab;
goto yyreduce;
+
/*-----------------------------.
- | yyreduce -- Do a reduction. |
+ | yyreduce -- do a reduction. |
`-----------------------------*/
yyreduce:
yylen = yyr2_[yyn];
@@ -663,8 +671,8 @@ namespace isc { namespace netconf {
// Default location.
{
- slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
- YYLLOC_DEFAULT (yylhs.location, slice, yylen);
+ stack_type::slice range (yystack_, yylen);
+ YYLLOC_DEFAULT (yylhs.location, range, yylen);
yyerror_range[1].location = yylhs.location;
}
@@ -677,206 +685,206 @@ namespace isc { namespace netconf {
switch (yyn)
{
case 2:
-#line 119 "netconf_parser.yy" // lalr1.cc:907
+#line 119 "netconf_parser.yy"
{ ctx.ctx_ = ctx.NO_KEYWORDS; }
-#line 683 "netconf_parser.cc" // lalr1.cc:907
+#line 691 "netconf_parser.cc"
break;
case 4:
-#line 120 "netconf_parser.yy" // lalr1.cc:907
+#line 120 "netconf_parser.yy"
{ ctx.ctx_ = ctx.CONFIG; }
-#line 689 "netconf_parser.cc" // lalr1.cc:907
+#line 697 "netconf_parser.cc"
break;
case 6:
-#line 121 "netconf_parser.yy" // lalr1.cc:907
+#line 121 "netconf_parser.yy"
{ ctx.ctx_ = ctx.NETCONF; }
-#line 695 "netconf_parser.cc" // lalr1.cc:907
+#line 703 "netconf_parser.cc"
break;
case 8:
-#line 129 "netconf_parser.yy" // lalr1.cc:907
+#line 129 "netconf_parser.yy"
{
// Parse the Netconf map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 705 "netconf_parser.cc" // lalr1.cc:907
+#line 713 "netconf_parser.cc"
break;
case 9:
-#line 133 "netconf_parser.yy" // lalr1.cc:907
+#line 133 "netconf_parser.yy"
{
// parsing completed
}
-#line 713 "netconf_parser.cc" // lalr1.cc:907
+#line 721 "netconf_parser.cc"
break;
case 10:
-#line 140 "netconf_parser.yy" // lalr1.cc:907
+#line 140 "netconf_parser.yy"
{
// Push back the JSON value on the stack
- ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ());
}
-#line 722 "netconf_parser.cc" // lalr1.cc:907
+#line 730 "netconf_parser.cc"
break;
case 11:
-#line 146 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
-#line 728 "netconf_parser.cc" // lalr1.cc:907
+#line 146 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); }
+#line 736 "netconf_parser.cc"
break;
case 12:
-#line 147 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); }
-#line 734 "netconf_parser.cc" // lalr1.cc:907
+#line 147 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); }
+#line 742 "netconf_parser.cc"
break;
case 13:
-#line 148 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); }
-#line 740 "netconf_parser.cc" // lalr1.cc:907
+#line 148 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); }
+#line 748 "netconf_parser.cc"
break;
case 14:
-#line 149 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); }
-#line 746 "netconf_parser.cc" // lalr1.cc:907
+#line 149 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); }
+#line 754 "netconf_parser.cc"
break;
case 15:
-#line 150 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
-#line 752 "netconf_parser.cc" // lalr1.cc:907
+#line 150 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
+#line 760 "netconf_parser.cc"
break;
case 16:
-#line 151 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 758 "netconf_parser.cc" // lalr1.cc:907
+#line 151 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
+#line 766 "netconf_parser.cc"
break;
case 17:
-#line 152 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 764 "netconf_parser.cc" // lalr1.cc:907
+#line 152 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
+#line 772 "netconf_parser.cc"
break;
case 18:
-#line 156 "netconf_parser.yy" // lalr1.cc:907
+#line 156 "netconf_parser.yy"
{
// This code is executed when we're about to start parsing
// the content of the map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 775 "netconf_parser.cc" // lalr1.cc:907
+#line 783 "netconf_parser.cc"
break;
case 19:
-#line 161 "netconf_parser.yy" // lalr1.cc:907
+#line 161 "netconf_parser.yy"
{
// map parsing completed. If we ever want to do any wrap up
// (maybe some sanity checking), this would be the best place
// for it.
}
-#line 785 "netconf_parser.cc" // lalr1.cc:907
+#line 793 "netconf_parser.cc"
break;
case 20:
-#line 167 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
-#line 791 "netconf_parser.cc" // lalr1.cc:907
+#line 167 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
+#line 799 "netconf_parser.cc"
break;
case 23:
-#line 181 "netconf_parser.yy" // lalr1.cc:907
+#line 181 "netconf_parser.yy"
{
// map containing a single entry
- ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
}
-#line 800 "netconf_parser.cc" // lalr1.cc:907
+#line 808 "netconf_parser.cc"
break;
case 24:
-#line 185 "netconf_parser.yy" // lalr1.cc:907
+#line 185 "netconf_parser.yy"
{
// map consisting of a shorter map followed by
// comma and string:value
- ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
}
-#line 810 "netconf_parser.cc" // lalr1.cc:907
+#line 818 "netconf_parser.cc"
break;
case 25:
-#line 192 "netconf_parser.yy" // lalr1.cc:907
+#line 192 "netconf_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 819 "netconf_parser.cc" // lalr1.cc:907
+#line 827 "netconf_parser.cc"
break;
case 26:
-#line 195 "netconf_parser.yy" // lalr1.cc:907
+#line 195 "netconf_parser.yy"
{
}
-#line 826 "netconf_parser.cc" // lalr1.cc:907
+#line 834 "netconf_parser.cc"
break;
case 29:
-#line 202 "netconf_parser.yy" // lalr1.cc:907
+#line 202 "netconf_parser.yy"
{
// List consisting of a single element.
- ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
}
-#line 835 "netconf_parser.cc" // lalr1.cc:907
+#line 843 "netconf_parser.cc"
break;
case 30:
-#line 206 "netconf_parser.yy" // lalr1.cc:907
+#line 206 "netconf_parser.yy"
{
// List ending with , and a value.
- ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
}
-#line 844 "netconf_parser.cc" // lalr1.cc:907
+#line 852 "netconf_parser.cc"
break;
case 31:
-#line 219 "netconf_parser.yy" // lalr1.cc:907
+#line 219 "netconf_parser.yy"
{
const std::string& where = ctx.contextName();
- const std::string& keyword = yystack_[1].value.as< std::string > ();
+ const std::string& keyword = yystack_[1].value.as < std::string > ();
error(yystack_[1].location,
"got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
-#line 855 "netconf_parser.cc" // lalr1.cc:907
+#line 863 "netconf_parser.cc"
break;
case 32:
-#line 227 "netconf_parser.yy" // lalr1.cc:907
+#line 227 "netconf_parser.yy"
{
// This code is executed when we're about to start parsing
// the content of the map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 866 "netconf_parser.cc" // lalr1.cc:907
+#line 874 "netconf_parser.cc"
break;
case 33:
-#line 232 "netconf_parser.yy" // lalr1.cc:907
+#line 232 "netconf_parser.yy"
{
// map parsing completed. If we ever want to do any wrap up
// (maybe some sanity checking), this would be the best place
// for it.
}
-#line 876 "netconf_parser.cc" // lalr1.cc:907
+#line 884 "netconf_parser.cc"
break;
case 38:
-#line 249 "netconf_parser.yy" // lalr1.cc:907
+#line 249 "netconf_parser.yy"
{
// Let's create a MapElement that will represent it, add it to the
@@ -888,60 +896,60 @@ namespace isc { namespace netconf {
ctx.stack_.push_back(m);
ctx.enter(ctx.NETCONF);
}
-#line 892 "netconf_parser.cc" // lalr1.cc:907
+#line 900 "netconf_parser.cc"
break;
case 39:
-#line 259 "netconf_parser.yy" // lalr1.cc:907
+#line 259 "netconf_parser.yy"
{
// Ok, we're done with parsing Netconf. Let's take the map
// off the stack.
ctx.stack_.pop_back();
ctx.leave();
}
-#line 903 "netconf_parser.cc" // lalr1.cc:907
+#line 911 "netconf_parser.cc"
break;
case 53:
-#line 287 "netconf_parser.yy" // lalr1.cc:907
+#line 287 "netconf_parser.yy"
{
- ElementPtr flag(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("boot-update", flag);
}
-#line 912 "netconf_parser.cc" // lalr1.cc:907
+#line 920 "netconf_parser.cc"
break;
case 54:
-#line 292 "netconf_parser.yy" // lalr1.cc:907
+#line 292 "netconf_parser.yy"
{
- ElementPtr flag(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("subscribe-changes", flag);
}
-#line 921 "netconf_parser.cc" // lalr1.cc:907
+#line 929 "netconf_parser.cc"
break;
case 55:
-#line 297 "netconf_parser.yy" // lalr1.cc:907
+#line 297 "netconf_parser.yy"
{
- ElementPtr flag(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("validate-changes", flag);
}
-#line 930 "netconf_parser.cc" // lalr1.cc:907
+#line 938 "netconf_parser.cc"
break;
case 56:
-#line 302 "netconf_parser.yy" // lalr1.cc:907
+#line 302 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 938 "netconf_parser.cc" // lalr1.cc:907
+#line 946 "netconf_parser.cc"
break;
case 57:
-#line 304 "netconf_parser.yy" // lalr1.cc:907
+#line 304 "netconf_parser.yy"
{
ElementPtr parent = ctx.stack_.back();
- ElementPtr user_context = yystack_[0].value.as< ElementPtr > ();
+ ElementPtr user_context = yystack_[0].value.as < ElementPtr > ();
ConstElementPtr old = parent->get("user-context");
// Handle already existing user context
@@ -961,23 +969,23 @@ namespace isc { namespace netconf {
parent->set("user-context", user_context);
ctx.leave();
}
-#line 965 "netconf_parser.cc" // lalr1.cc:907
+#line 973 "netconf_parser.cc"
break;
case 58:
-#line 327 "netconf_parser.yy" // lalr1.cc:907
+#line 327 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 973 "netconf_parser.cc" // lalr1.cc:907
+#line 981 "netconf_parser.cc"
break;
case 59:
-#line 329 "netconf_parser.yy" // lalr1.cc:907
+#line 329 "netconf_parser.yy"
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
- ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
user_context->set("comment", comment);
// Handle already existing user context
@@ -998,497 +1006,498 @@ namespace isc { namespace netconf {
parent->set("user-context", user_context);
ctx.leave();
}
-#line 1002 "netconf_parser.cc" // lalr1.cc:907
+#line 1010 "netconf_parser.cc"
break;
case 60:
-#line 355 "netconf_parser.yy" // lalr1.cc:907
+#line 355 "netconf_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("hooks-libraries", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.HOOKS_LIBRARIES);
}
-#line 1013 "netconf_parser.cc" // lalr1.cc:907
+#line 1021 "netconf_parser.cc"
break;
case 61:
-#line 360 "netconf_parser.yy" // lalr1.cc:907
+#line 360 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1022 "netconf_parser.cc" // lalr1.cc:907
+#line 1030 "netconf_parser.cc"
break;
case 66:
-#line 373 "netconf_parser.yy" // lalr1.cc:907
+#line 373 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1032 "netconf_parser.cc" // lalr1.cc:907
+#line 1040 "netconf_parser.cc"
break;
case 67:
-#line 377 "netconf_parser.yy" // lalr1.cc:907
+#line 377 "netconf_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1040 "netconf_parser.cc" // lalr1.cc:907
+#line 1048 "netconf_parser.cc"
break;
case 73:
-#line 390 "netconf_parser.yy" // lalr1.cc:907
+#line 390 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1048 "netconf_parser.cc" // lalr1.cc:907
+#line 1056 "netconf_parser.cc"
break;
case 74:
-#line 392 "netconf_parser.yy" // lalr1.cc:907
+#line 392 "netconf_parser.yy"
{
- ElementPtr lib(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("library", lib);
ctx.leave();
}
-#line 1058 "netconf_parser.cc" // lalr1.cc:907
+#line 1066 "netconf_parser.cc"
break;
case 75:
-#line 398 "netconf_parser.yy" // lalr1.cc:907
+#line 398 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1066 "netconf_parser.cc" // lalr1.cc:907
+#line 1074 "netconf_parser.cc"
break;
case 76:
-#line 400 "netconf_parser.yy" // lalr1.cc:907
+#line 400 "netconf_parser.yy"
{
- ctx.stack_.back()->set("parameters", yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ());
ctx.leave();
}
-#line 1075 "netconf_parser.cc" // lalr1.cc:907
+#line 1083 "netconf_parser.cc"
break;
case 77:
-#line 408 "netconf_parser.yy" // lalr1.cc:907
+#line 408 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[2].location)));
ctx.stack_.back()->set("managed-servers", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.MANAGED_SERVERS);
}
-#line 1086 "netconf_parser.cc" // lalr1.cc:907
+#line 1094 "netconf_parser.cc"
break;
case 78:
-#line 413 "netconf_parser.yy" // lalr1.cc:907
+#line 413 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1095 "netconf_parser.cc" // lalr1.cc:907
+#line 1103 "netconf_parser.cc"
break;
case 88:
-#line 437 "netconf_parser.yy" // lalr1.cc:907
+#line 437 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp4", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1106 "netconf_parser.cc" // lalr1.cc:907
+#line 1114 "netconf_parser.cc"
break;
case 89:
-#line 442 "netconf_parser.yy" // lalr1.cc:907
+#line 442 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1115 "netconf_parser.cc" // lalr1.cc:907
+#line 1123 "netconf_parser.cc"
break;
case 90:
-#line 448 "netconf_parser.yy" // lalr1.cc:907
+#line 448 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp6", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1126 "netconf_parser.cc" // lalr1.cc:907
+#line 1134 "netconf_parser.cc"
break;
case 91:
-#line 453 "netconf_parser.yy" // lalr1.cc:907
+#line 453 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1135 "netconf_parser.cc" // lalr1.cc:907
+#line 1143 "netconf_parser.cc"
break;
case 92:
-#line 459 "netconf_parser.yy" // lalr1.cc:907
+#line 459 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("d2", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1146 "netconf_parser.cc" // lalr1.cc:907
+#line 1154 "netconf_parser.cc"
break;
case 93:
-#line 464 "netconf_parser.yy" // lalr1.cc:907
+#line 464 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1155 "netconf_parser.cc" // lalr1.cc:907
+#line 1163 "netconf_parser.cc"
break;
case 94:
-#line 470 "netconf_parser.yy" // lalr1.cc:907
+#line 470 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ca", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1166 "netconf_parser.cc" // lalr1.cc:907
+#line 1174 "netconf_parser.cc"
break;
case 95:
-#line 475 "netconf_parser.yy" // lalr1.cc:907
+#line 475 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1175 "netconf_parser.cc" // lalr1.cc:907
+#line 1183 "netconf_parser.cc"
break;
case 106:
-#line 497 "netconf_parser.yy" // lalr1.cc:907
+#line 497 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1183 "netconf_parser.cc" // lalr1.cc:907
+#line 1191 "netconf_parser.cc"
break;
case 107:
-#line 499 "netconf_parser.yy" // lalr1.cc:907
+#line 499 "netconf_parser.yy"
{
- ElementPtr model(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr model(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("model", model);
ctx.leave();
}
-#line 1193 "netconf_parser.cc" // lalr1.cc:907
+#line 1201 "netconf_parser.cc"
break;
case 108:
-#line 506 "netconf_parser.yy" // lalr1.cc:907
+#line 506 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("control-socket", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.CONTROL_SOCKET);
}
-#line 1204 "netconf_parser.cc" // lalr1.cc:907
+#line 1212 "netconf_parser.cc"
break;
case 109:
-#line 511 "netconf_parser.yy" // lalr1.cc:907
+#line 511 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1213 "netconf_parser.cc" // lalr1.cc:907
+#line 1221 "netconf_parser.cc"
break;
case 118:
-#line 529 "netconf_parser.yy" // lalr1.cc:907
+#line 529 "netconf_parser.yy"
{
ctx.enter(ctx.SOCKET_TYPE);
}
-#line 1221 "netconf_parser.cc" // lalr1.cc:907
+#line 1229 "netconf_parser.cc"
break;
case 119:
-#line 531 "netconf_parser.yy" // lalr1.cc:907
+#line 531 "netconf_parser.yy"
{
- ctx.stack_.back()->set("socket-type", yystack_[0].value.as< ElementPtr > ());
+ ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ());
ctx.leave();
}
-#line 1230 "netconf_parser.cc" // lalr1.cc:907
+#line 1238 "netconf_parser.cc"
break;
case 120:
-#line 537 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); }
-#line 1236 "netconf_parser.cc" // lalr1.cc:907
+#line 537 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); }
+#line 1244 "netconf_parser.cc"
break;
case 121:
-#line 538 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("http", ctx.loc2pos(yystack_[0].location))); }
-#line 1242 "netconf_parser.cc" // lalr1.cc:907
+#line 538 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("http", ctx.loc2pos(yystack_[0].location))); }
+#line 1250 "netconf_parser.cc"
break;
case 122:
-#line 539 "netconf_parser.yy" // lalr1.cc:907
- { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("stdout", ctx.loc2pos(yystack_[0].location))); }
-#line 1248 "netconf_parser.cc" // lalr1.cc:907
+#line 539 "netconf_parser.yy"
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stdout", ctx.loc2pos(yystack_[0].location))); }
+#line 1256 "netconf_parser.cc"
break;
case 123:
-#line 542 "netconf_parser.yy" // lalr1.cc:907
+#line 542 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1256 "netconf_parser.cc" // lalr1.cc:907
+#line 1264 "netconf_parser.cc"
break;
case 124:
-#line 544 "netconf_parser.yy" // lalr1.cc:907
+#line 544 "netconf_parser.yy"
{
- ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-name", name);
ctx.leave();
}
-#line 1266 "netconf_parser.cc" // lalr1.cc:907
+#line 1274 "netconf_parser.cc"
break;
case 125:
-#line 551 "netconf_parser.yy" // lalr1.cc:907
+#line 551 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1274 "netconf_parser.cc" // lalr1.cc:907
+#line 1282 "netconf_parser.cc"
break;
case 126:
-#line 553 "netconf_parser.yy" // lalr1.cc:907
+#line 553 "netconf_parser.yy"
{
- ElementPtr url(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr url(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-url", url);
ctx.leave();
}
-#line 1284 "netconf_parser.cc" // lalr1.cc:907
+#line 1292 "netconf_parser.cc"
break;
case 127:
-#line 566 "netconf_parser.yy" // lalr1.cc:907
+#line 566 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("Logging", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.LOGGING);
}
-#line 1295 "netconf_parser.cc" // lalr1.cc:907
+#line 1303 "netconf_parser.cc"
break;
case 128:
-#line 571 "netconf_parser.yy" // lalr1.cc:907
+#line 571 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1304 "netconf_parser.cc" // lalr1.cc:907
+#line 1312 "netconf_parser.cc"
break;
case 132:
-#line 588 "netconf_parser.yy" // lalr1.cc:907
+#line 588 "netconf_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("loggers", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.LOGGERS);
}
-#line 1315 "netconf_parser.cc" // lalr1.cc:907
+#line 1323 "netconf_parser.cc"
break;
case 133:
-#line 593 "netconf_parser.yy" // lalr1.cc:907
+#line 593 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1324 "netconf_parser.cc" // lalr1.cc:907
+#line 1332 "netconf_parser.cc"
break;
case 136:
-#line 605 "netconf_parser.yy" // lalr1.cc:907
+#line 605 "netconf_parser.yy"
{
ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(l);
ctx.stack_.push_back(l);
}
-#line 1334 "netconf_parser.cc" // lalr1.cc:907
+#line 1342 "netconf_parser.cc"
break;
case 137:
-#line 609 "netconf_parser.yy" // lalr1.cc:907
+#line 609 "netconf_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1342 "netconf_parser.cc" // lalr1.cc:907
+#line 1350 "netconf_parser.cc"
break;
case 147:
-#line 626 "netconf_parser.yy" // lalr1.cc:907
+#line 626 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1350 "netconf_parser.cc" // lalr1.cc:907
+#line 1358 "netconf_parser.cc"
break;
case 148:
-#line 628 "netconf_parser.yy" // lalr1.cc:907
+#line 628 "netconf_parser.yy"
{
- ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("name", name);
ctx.leave();
}
-#line 1360 "netconf_parser.cc" // lalr1.cc:907
+#line 1368 "netconf_parser.cc"
break;
case 149:
-#line 634 "netconf_parser.yy" // lalr1.cc:907
+#line 634 "netconf_parser.yy"
{
- ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("debuglevel", dl);
}
-#line 1369 "netconf_parser.cc" // lalr1.cc:907
+#line 1377 "netconf_parser.cc"
break;
case 150:
-#line 639 "netconf_parser.yy" // lalr1.cc:907
+#line 639 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1377 "netconf_parser.cc" // lalr1.cc:907
+#line 1385 "netconf_parser.cc"
break;
case 151:
-#line 641 "netconf_parser.yy" // lalr1.cc:907
+#line 641 "netconf_parser.yy"
{
- ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("severity", sev);
ctx.leave();
}
-#line 1387 "netconf_parser.cc" // lalr1.cc:907
+#line 1395 "netconf_parser.cc"
break;
case 152:
-#line 647 "netconf_parser.yy" // lalr1.cc:907
+#line 647 "netconf_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output_options", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.OUTPUT_OPTIONS);
}
-#line 1398 "netconf_parser.cc" // lalr1.cc:907
+#line 1406 "netconf_parser.cc"
break;
case 153:
-#line 652 "netconf_parser.yy" // lalr1.cc:907
+#line 652 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1407 "netconf_parser.cc" // lalr1.cc:907
+#line 1415 "netconf_parser.cc"
break;
case 156:
-#line 661 "netconf_parser.yy" // lalr1.cc:907
+#line 661 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1417 "netconf_parser.cc" // lalr1.cc:907
+#line 1425 "netconf_parser.cc"
break;
case 157:
-#line 665 "netconf_parser.yy" // lalr1.cc:907
+#line 665 "netconf_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1425 "netconf_parser.cc" // lalr1.cc:907
+#line 1433 "netconf_parser.cc"
break;
case 165:
-#line 680 "netconf_parser.yy" // lalr1.cc:907
+#line 680 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1433 "netconf_parser.cc" // lalr1.cc:907
+#line 1441 "netconf_parser.cc"
break;
case 166:
-#line 682 "netconf_parser.yy" // lalr1.cc:907
+#line 682 "netconf_parser.yy"
{
- ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output", sev);
ctx.leave();
}
-#line 1443 "netconf_parser.cc" // lalr1.cc:907
+#line 1451 "netconf_parser.cc"
break;
case 167:
-#line 688 "netconf_parser.yy" // lalr1.cc:907
+#line 688 "netconf_parser.yy"
{
- ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("flush", flush);
}
-#line 1452 "netconf_parser.cc" // lalr1.cc:907
+#line 1460 "netconf_parser.cc"
break;
case 168:
-#line 693 "netconf_parser.yy" // lalr1.cc:907
+#line 693 "netconf_parser.yy"
{
- ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxsize", maxsize);
}
-#line 1461 "netconf_parser.cc" // lalr1.cc:907
+#line 1469 "netconf_parser.cc"
break;
case 169:
-#line 698 "netconf_parser.yy" // lalr1.cc:907
+#line 698 "netconf_parser.yy"
{
- ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxver", maxver);
}
-#line 1470 "netconf_parser.cc" // lalr1.cc:907
+#line 1478 "netconf_parser.cc"
break;
case 170:
-#line 703 "netconf_parser.yy" // lalr1.cc:907
+#line 703 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1478 "netconf_parser.cc" // lalr1.cc:907
+#line 1486 "netconf_parser.cc"
break;
case 171:
-#line 705 "netconf_parser.yy" // lalr1.cc:907
+#line 705 "netconf_parser.yy"
{
- ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("pattern", sev);
ctx.leave();
}
-#line 1488 "netconf_parser.cc" // lalr1.cc:907
+#line 1496 "netconf_parser.cc"
break;
-#line 1492 "netconf_parser.cc" // lalr1.cc:907
+#line 1500 "netconf_parser.cc"
+
default:
break;
}
@@ -1496,6 +1505,7 @@ namespace isc { namespace netconf {
#if YY_EXCEPTIONS
catch (const syntax_error& yyexc)
{
+ YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
error (yyexc);
YYERROR;
}
@@ -1510,6 +1520,7 @@ namespace isc { namespace netconf {
}
goto yynewstate;
+
/*--------------------------------------.
| yyerrlab -- here on detecting error. |
`--------------------------------------*/
@@ -1546,18 +1557,18 @@ namespace isc { namespace netconf {
| 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. */
+ /* Pacify compilers when the user code never invokes YYERROR and
+ the label yyerrorlab therefore never appears in user code. */
if (false)
- goto yyerrorlab;
+ YYERROR;
+
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
yypop_ (yylen);
yylen = 0;
goto yyerrlab1;
+
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
@@ -1598,16 +1609,26 @@ namespace isc { namespace netconf {
}
goto yynewstate;
- // Accept.
+
+ /*-------------------------------------.
+ | yyacceptlab -- YYACCEPT comes here. |
+ `-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
- // Abort.
+
+ /*-----------------------------------.
+ | yyabortlab -- YYABORT comes here. |
+ `-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
+
+ /*-----------------------------------------------------.
+ | yyreturn -- parsing is finished, return the result. |
+ `-----------------------------------------------------*/
yyreturn:
if (!yyla.empty ())
yy_destroy_ ("Cleanup: discarding lookahead", yyla);
@@ -2085,10 +2106,11 @@ namespace isc { namespace netconf {
#endif // NETCONF_DEBUG
-#line 14 "netconf_parser.yy" // lalr1.cc:1218
+#line 14 "netconf_parser.yy"
} } // isc::netconf
-#line 2091 "netconf_parser.cc" // lalr1.cc:1218
-#line 711 "netconf_parser.yy" // lalr1.cc:1219
+#line 2112 "netconf_parser.cc"
+
+#line 711 "netconf_parser.yy"
void
diff --git a/src/bin/netconf/netconf_parser.h b/src/bin/netconf/netconf_parser.h
index f2658b9796..40029e5945 100644
--- a/src/bin/netconf/netconf_parser.h
+++ b/src/bin/netconf/netconf_parser.h
@@ -1,8 +1,8 @@
-// A Bison parser, made by GNU Bison 3.2.1.
+// A Bison parser, made by GNU Bison 3.4.1.
// Skeleton interface for Bison LALR(1) parsers in C++
-// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015, 2018-2019 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
@@ -44,7 +44,7 @@
#ifndef YY_NETCONF_NETCONF_PARSER_H_INCLUDED
# define YY_NETCONF_NETCONF_PARSER_H_INCLUDED
// // "%code requires" blocks.
-#line 17 "netconf_parser.yy" // lalr1.cc:404
+#line 17 "netconf_parser.yy"
#include <string>
#include <cc/data.h>
@@ -55,7 +55,7 @@ using namespace isc::netconf;
using namespace isc::data;
using namespace std;
-#line 59 "netconf_parser.h" // lalr1.cc:404
+#line 59 "netconf_parser.h"
# include <cassert>
# include <cstdlib> // std::abort
@@ -64,8 +64,14 @@ using namespace std;
# include <string>
# include <vector>
+#if defined __cplusplus
+# define YY_CPLUSPLUS __cplusplus
+#else
+# define YY_CPLUSPLUS 199711L
+#endif
+
// Support move semantics when possible.
-#if defined __cplusplus && 201103L <= __cplusplus
+#if 201103L <= YY_CPLUSPLUS
# define YY_MOVE std::move
# define YY_MOVE_OR_COPY move
# define YY_MOVE_REF(Type) Type&&
@@ -78,6 +84,22 @@ using namespace std;
# define YY_RVREF(Type) const Type&
# define YY_COPY(Type) const Type&
#endif
+
+// Support noexcept when possible.
+#if 201103L <= YY_CPLUSPLUS
+# define YY_NOEXCEPT noexcept
+# define YY_NOTHROW
+#else
+# define YY_NOEXCEPT
+# define YY_NOTHROW throw ()
+#endif
+
+// Support constexpr when possible.
+#if 201703 <= YY_CPLUSPLUS
+# define YY_CONSTEXPR constexpr
+#else
+# define YY_CONSTEXPR
+#endif
# include "location.hh"
#include <typeinfo>
#ifndef YYASSERT
@@ -155,193 +177,80 @@ using namespace std;
# endif /* ! defined YYDEBUG */
#endif /* ! defined NETCONF_DEBUG */
-#line 14 "netconf_parser.yy" // lalr1.cc:404
+#line 14 "netconf_parser.yy"
namespace isc { namespace netconf {
-#line 161 "netconf_parser.h" // lalr1.cc:404
-
- /// A stack with random access from its top.
- template <typename T, typename S = std::vector<T> >
- class stack
- {
- public:
- // Hide our reversed order.
- typedef typename S::reverse_iterator iterator;
- typedef typename S::const_reverse_iterator const_iterator;
- typedef typename S::size_type size_type;
-
- stack (size_type n = 200)
- : seq_ (n)
- {}
-
- /// Random access.
- ///
- /// Index 0 returns the topmost element.
- T&
- operator[] (size_type i)
- {
- return seq_[size () - 1 - i];
- }
-
- /// Random access.
- ///
- /// Index 0 returns the topmost element.
- T&
- operator[] (int i)
- {
- return operator[] (size_type (i));
- }
-
- /// Random access.
- ///
- /// Index 0 returns the topmost element.
- const T&
- operator[] (size_type i) const
- {
- return seq_[size () - 1 - i];
- }
-
- /// Random access.
- ///
- /// Index 0 returns the topmost element.
- const T&
- operator[] (int i) const
- {
- return operator[] (size_type (i));
- }
-
- /// Steal the contents of \a t.
- ///
- /// Close to move-semantics.
- void
- push (YY_MOVE_REF (T) t)
- {
- seq_.push_back (T ());
- operator[](0).move (t);
- }
-
- void
- pop (int n = 1)
- {
- for (; 0 < n; --n)
- seq_.pop_back ();
- }
-
- void
- clear ()
- {
- seq_.clear ();
- }
+#line 183 "netconf_parser.h"
- size_type
- size () const
- {
- return seq_.size ();
- }
-
- const_iterator
- begin () const
- {
- return seq_.rbegin ();
- }
- const_iterator
- end () const
- {
- return seq_.rend ();
- }
- private:
- stack (const stack&);
- stack& operator= (const stack&);
- /// The wrapped container.
- S seq_;
- };
- /// Present a slice of the top of a stack.
- template <typename T, typename S = stack<T> >
- class slice
+ /// A Bison parser.
+ class NetconfParser
{
public:
- slice (const S& stack, int range)
- : stack_ (stack)
- , range_ (range)
- {}
-
- const T&
- operator[] (int i) const
- {
- return stack_[range_ - i];
- }
-
- private:
- const S& stack_;
- int range_;
- };
-
-
-
- /// A char[S] buffer to store and retrieve objects.
+#ifndef NETCONF_STYPE
+ /// A buffer to store and retrieve objects.
///
/// Sort of a variant, but does not keep track of the nature
/// of the stored data, since that knowledge is available
- /// via the current state.
- template <size_t S>
- struct variant
+ /// via the current parser state.
+ class semantic_type
{
+ public:
/// Type of *this.
- typedef variant<S> self_type;
+ typedef semantic_type self_type;
/// Empty construction.
- variant ()
+ semantic_type () YY_NOEXCEPT
: yybuffer_ ()
, yytypeid_ (YY_NULLPTR)
{}
/// Construct and fill.
template <typename T>
- variant (YY_RVREF (T) t)
+ semantic_type (YY_RVREF (T) t)
: yytypeid_ (&typeid (T))
{
- YYASSERT (sizeof (T) <= S);
+ YYASSERT (sizeof (T) <= size);
new (yyas_<T> ()) T (YY_MOVE (t));
}
/// Destruction, allowed only if empty.
- ~variant ()
+ ~semantic_type () YY_NOEXCEPT
{
YYASSERT (!yytypeid_);
}
- /// Instantiate an empty \a T in here.
- template <typename T>
+# if 201103L <= YY_CPLUSPLUS
+ /// Instantiate a \a T in here from \a t.
+ template <typename T, typename... U>
T&
- emplace ()
+ emplace (U&&... u)
{
YYASSERT (!yytypeid_);
- YYASSERT (sizeof (T) <= S);
+ YYASSERT (sizeof (T) <= size);
yytypeid_ = & typeid (T);
- return *new (yyas_<T> ()) T ();
+ return *new (yyas_<T> ()) T (std::forward <U>(u)...);
}
-
-# if defined __cplusplus && 201103L <= __cplusplus
- /// Instantiate a \a T in here from \a t.
- template <typename T, typename U>
+# else
+ /// Instantiate an empty \a T in here.
+ template <typename T>
T&
- emplace (U&& u)
+ emplace ()
{
YYASSERT (!yytypeid_);
- YYASSERT (sizeof (T) <= S);
+ YYASSERT (sizeof (T) <= size);
yytypeid_ = & typeid (T);
- return *new (yyas_<T> ()) T (std::forward <U>(u));
+ return *new (yyas_<T> ()) T ();
}
-# else
+
/// Instantiate a \a T in here from \a t.
template <typename T>
T&
emplace (const T& t)
{
YYASSERT (!yytypeid_);
- YYASSERT (sizeof (T) <= S);
+ YYASSERT (sizeof (T) <= size);
yytypeid_ = & typeid (T);
return *new (yyas_<T> ()) T (t);
}
@@ -368,75 +277,75 @@ namespace isc { namespace netconf {
/// Accessor to a built \a T.
template <typename T>
T&
- as ()
+ as () YY_NOEXCEPT
{
YYASSERT (yytypeid_);
YYASSERT (*yytypeid_ == typeid (T));
- YYASSERT (sizeof (T) <= S);
+ YYASSERT (sizeof (T) <= size);
return *yyas_<T> ();
}
/// Const accessor to a built \a T (for %printer).
template <typename T>
const T&
- as () const
+ as () const YY_NOEXCEPT
{
YYASSERT (yytypeid_);
YYASSERT (*yytypeid_ == typeid (T));
- YYASSERT (sizeof (T) <= S);
+ YYASSERT (sizeof (T) <= size);
return *yyas_<T> ();
}
- /// Swap the content with \a other, of same type.
+ /// Swap the content with \a that, of same type.
///
/// Both variants must be built beforehand, because swapping the actual
/// data requires reading it (with as()), and this is not possible on
/// unconstructed variants: it would require some dynamic testing, which
/// should not be the variant's responsibility.
/// Swapping between built and (possibly) non-built is done with
- /// variant::move ().
+ /// self_type::move ().
template <typename T>
void
- swap (self_type& other)
+ swap (self_type& that) YY_NOEXCEPT
{
YYASSERT (yytypeid_);
- YYASSERT (*yytypeid_ == *other.yytypeid_);
- std::swap (as<T> (), other.as<T> ());
+ YYASSERT (*yytypeid_ == *that.yytypeid_);
+ std::swap (as<T> (), that.as<T> ());
}
- /// Move the content of \a other to this.
+ /// Move the content of \a that to this.
///
- /// Destroys \a other.
+ /// Destroys \a that.
template <typename T>
void
- move (self_type& other)
+ move (self_type& that)
{
-# if defined __cplusplus && 201103L <= __cplusplus
- emplace<T> (std::move (other.as<T> ()));
+# if 201103L <= YY_CPLUSPLUS
+ emplace<T> (std::move (that.as<T> ()));
# else
emplace<T> ();
- swap<T> (other);
+ swap<T> (that);
# endif
- other.destroy<T> ();
+ that.destroy<T> ();
}
-# if defined __cplusplus && 201103L <= __cplusplus
- /// Move the content of \a other to this.
+# if 201103L <= YY_CPLUSPLUS
+ /// Move the content of \a that to this.
template <typename T>
void
- move (self_type&& other)
+ move (self_type&& that)
{
- emplace<T> (std::move (other.as<T> ()));
- other.destroy<T> ();
+ emplace<T> (std::move (that.as<T> ()));
+ that.destroy<T> ();
}
#endif
- /// Copy the content of \a other to this.
+ /// Copy the content of \a that to this.
template <typename T>
void
- copy (const self_type& other)
+ copy (const self_type& that)
{
- emplace<T> (other.as<T> ());
+ emplace<T> (that.as<T> ());
}
/// Destroy the stored \a T.
@@ -451,12 +360,12 @@ namespace isc { namespace netconf {
private:
/// Prohibit blind copies.
self_type& operator= (const self_type&);
- variant (const self_type&);
+ semantic_type (const self_type&);
/// Accessor to raw memory as \a T.
template <typename T>
T*
- yyas_ ()
+ yyas_ () YY_NOEXCEPT
{
void *yyp = yybuffer_.yyraw;
return static_cast<T*> (yyp);
@@ -465,30 +374,12 @@ namespace isc { namespace netconf {
/// Const accessor to raw memory as \a T.
template <typename T>
const T*
- yyas_ () const
+ yyas_ () const YY_NOEXCEPT
{
const void *yyp = yybuffer_.yyraw;
return static_cast<const T*> (yyp);
}
- union
- {
- /// Strongest alignment constraints.
- long double yyalign_me;
- /// A buffer large enough to store any of the semantic values.
- char yyraw[S];
- } yybuffer_;
-
- /// Whether the content is built: if defined, the name of the stored type.
- const std::type_info *yytypeid_;
- };
-
-
- /// A Bison parser.
- class NetconfParser
- {
- public:
-#ifndef NETCONF_STYPE
/// An auxiliary type to compute the largest semantic type.
union union_type
{
@@ -508,10 +399,24 @@ namespace isc { namespace netconf {
// "constant string"
char dummy5[sizeof (std::string)];
-};
+ };
+
+ /// The size of the largest semantic type.
+ enum { size = sizeof (union_type) };
+
+ /// A buffer to store semantic values.
+ union
+ {
+ /// Strongest alignment constraints.
+ long double yyalign_me;
+ /// A buffer large enough to store any of the semantic values.
+ char yyraw[size];
+ } yybuffer_;
+
+ /// Whether the content is built: if defined, the name of the stored type.
+ const std::type_info *yytypeid_;
+ };
- /// Symbol semantic values.
- typedef variant<sizeof (union_type)> semantic_type;
#else
typedef NETCONF_STYPE semantic_type;
#endif
@@ -521,7 +426,18 @@ namespace isc { namespace netconf {
/// Syntax errors thrown from user actions.
struct syntax_error : std::runtime_error
{
- syntax_error (const location_type& l, const std::string& m);
+ syntax_error (const location_type& l, const std::string& m)
+ : std::runtime_error (m)
+ , location (l)
+ {}
+
+ syntax_error (const syntax_error& s)
+ : std::runtime_error (s.what ())
+ , location (s.location)
+ {}
+
+ ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
+
location_type location;
};
@@ -606,29 +522,150 @@ namespace isc { namespace netconf {
typedef Base super_type;
/// Default constructor.
- basic_symbol ();
-
- /// Move or copy constructor.
- basic_symbol (YY_RVREF (basic_symbol) other);
+ basic_symbol ()
+ : value ()
+ , location ()
+ {}
+
+#if 201103L <= YY_CPLUSPLUS
+ /// Move constructor.
+ basic_symbol (basic_symbol&& that);
+#endif
+ /// Copy constructor.
+ basic_symbol (const basic_symbol& that);
/// Constructor for valueless symbols, and symbols from each type.
- basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l);
- basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l);
- basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l);
- basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l);
- basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l);
- basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l);
-
+#if 201103L <= YY_CPLUSPLUS
+ basic_symbol (typename Base::kind_type t, location_type&& l)
+ : Base (t)
+ , location (std::move (l))
+ {}
+#else
+ basic_symbol (typename Base::kind_type t, const location_type& l)
+ : Base (t)
+ , location (l)
+ {}
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l)
+ : Base (t)
+ , value (std::move (v))
+ , location (std::move (l))
+ {}
+#else
+ basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l)
+ : Base (t)
+ , value (v)
+ , location (l)
+ {}
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l)
+ : Base (t)
+ , value (std::move (v))
+ , location (std::move (l))
+ {}
+#else
+ basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l)
+ : Base (t)
+ , value (v)
+ , location (l)
+ {}
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ basic_symbol (typename Base::kind_type t, double&& v, location_type&& l)
+ : Base (t)
+ , value (std::move (v))
+ , location (std::move (l))
+ {}
+#else
+ basic_symbol (typename Base::kind_type t, const double& v, const location_type& l)
+ : Base (t)
+ , value (v)
+ , location (l)
+ {}
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l)
+ : Base (t)
+ , value (std::move (v))
+ , location (std::move (l))
+ {}
+#else
+ basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l)
+ : Base (t)
+ , value (v)
+ , location (l)
+ {}
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
+ : Base (t)
+ , value (std::move (v))
+ , location (std::move (l))
+ {}
+#else
+ basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
+ : Base (t)
+ , value (v)
+ , location (l)
+ {}
+#endif
/// Destroy the symbol.
- ~basic_symbol ();
+ ~basic_symbol ()
+ {
+ clear ();
+ }
/// Destroy contents, and record that is empty.
- void clear ();
+ void clear ()
+ {
+ // User destructor.
+ symbol_number_type yytype = this->type_get ();
+ basic_symbol<Base>& yysym = *this;
+ (void) yysym;
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+
+ // Type destructor.
+switch (yytype)
+ {
+ case 58: // value
+ case 61: // map_value
+ case 120: // socket_type_value
+ value.template destroy< ElementPtr > ();
+ break;
+
+ case 49: // "boolean"
+ value.template destroy< bool > ();
+ break;
+
+ case 48: // "floating point"
+ value.template destroy< double > ();
+ break;
+
+ case 47: // "integer"
+ value.template destroy< int64_t > ();
+ break;
+
+ case 46: // "constant string"
+ value.template destroy< std::string > ();
+ break;
+
+ default:
+ break;
+ }
+
+ Base::clear ();
+ }
/// Whether empty.
- bool empty () const;
+ bool empty () const YY_NOEXCEPT;
/// Destructive move, \a s is emptied into this.
void move (basic_symbol& s);
@@ -640,9 +677,9 @@ namespace isc { namespace netconf {
location_type location;
private:
-#if !defined __cplusplus || __cplusplus < 201103L
+#if YY_CPLUSPLUS < 201103L
/// Assignment operator.
- basic_symbol& operator= (const basic_symbol& other);
+ basic_symbol& operator= (const basic_symbol& that);
#endif
};
@@ -652,8 +689,13 @@ namespace isc { namespace netconf {
/// Default constructor.
by_type ();
+#if 201103L <= YY_CPLUSPLUS
+ /// Move constructor.
+ by_type (by_type&& that);
+#endif
+
/// Copy constructor.
- by_type (const by_type& other);
+ by_type (const by_type& that);
/// The symbol type as needed by the constructor.
typedef token_type kind_type;
@@ -669,10 +711,10 @@ namespace isc { namespace netconf {
/// The (internal) type number (corresponding to \a type).
/// \a empty when empty.
- symbol_number_type type_get () const;
+ symbol_number_type type_get () const YY_NOEXCEPT;
/// The token.
- token_type token () const;
+ token_type token () const YY_NOEXCEPT;
/// The symbol type.
/// \a empty_symbol when empty.
@@ -681,7 +723,81 @@ namespace isc { namespace netconf {
};
/// "External" symbols: returned by the scanner.
- typedef basic_symbol<by_type> symbol_type;
+ struct symbol_type : basic_symbol<by_type>
+ {
+ /// Superclass.
+ typedef basic_symbol<by_type> super_type;
+
+ /// Empty symbol.
+ symbol_type () {}
+
+ /// Constructor for valueless symbols, and symbols from each type.
+#if 201103L <= YY_CPLUSPLUS
+ symbol_type (int tok, location_type l)
+ : super_type(token_type (tok), std::move (l))
+ {
+ YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_NETCONF || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_BOOT_UPDATE || tok == token::TOKEN_SUBSCRIBE_CHANGES || tok == token::TOKEN_VALIDATE_CHANGES || tok == token::TOKEN_MANAGED_SERVERS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_CA_SERVER || tok == token::TOKEN_MODEL || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HTTP || tok == token::TOKEN_STDOUT || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_URL || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_NETCONF || tok == token::TOKEN_START_SUB_NETCONF);
+ }
+#else
+ symbol_type (int tok, const location_type& l)
+ : super_type(token_type (tok), l)
+ {
+ YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_NETCONF || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_BOOT_UPDATE || tok == token::TOKEN_SUBSCRIBE_CHANGES || tok == token::TOKEN_VALIDATE_CHANGES || tok == token::TOKEN_MANAGED_SERVERS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_CA_SERVER || tok == token::TOKEN_MODEL || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HTTP || tok == token::TOKEN_STDOUT || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_URL || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_PATTERN || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_NETCONF || tok == token::TOKEN_START_SUB_NETCONF);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ symbol_type (int tok, bool v, location_type l)
+ : super_type(token_type (tok), std::move (v), std::move (l))
+ {
+ YYASSERT (tok == token::TOKEN_BOOLEAN);
+ }
+#else
+ symbol_type (int tok, const bool& v, const location_type& l)
+ : super_type(token_type (tok), v, l)
+ {
+ YYASSERT (tok == token::TOKEN_BOOLEAN);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ symbol_type (int tok, double v, location_type l)
+ : super_type(token_type (tok), std::move (v), std::move (l))
+ {
+ YYASSERT (tok == token::TOKEN_FLOAT);
+ }
+#else
+ symbol_type (int tok, const double& v, const location_type& l)
+ : super_type(token_type (tok), v, l)
+ {
+ YYASSERT (tok == token::TOKEN_FLOAT);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ symbol_type (int tok, int64_t v, location_type l)
+ : super_type(token_type (tok), std::move (v), std::move (l))
+ {
+ YYASSERT (tok == token::TOKEN_INTEGER);
+ }
+#else
+ symbol_type (int tok, const int64_t& v, const location_type& l)
+ : super_type(token_type (tok), v, l)
+ {
+ YYASSERT (tok == token::TOKEN_INTEGER);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ symbol_type (int tok, std::string v, location_type l)
+ : super_type(token_type (tok), std::move (v), std::move (l))
+ {
+ YYASSERT (tok == token::TOKEN_STRING);
+ }
+#else
+ symbol_type (int tok, const std::string& v, const location_type& l)
+ : super_type(token_type (tok), v, l)
+ {
+ YYASSERT (tok == token::TOKEN_STRING);
+ }
+#endif
+ };
/// Build a parser object.
NetconfParser (isc::netconf::ParserContext& ctx_yyarg);
@@ -717,199 +833,727 @@ namespace isc { namespace netconf {
/// Report a syntax error.
void error (const syntax_error& err);
- // Symbol constructors declarations.
- static
- symbol_type
- make_END (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_COMMA (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_COLON (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_LSQUARE_BRACKET (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_RSQUARE_BRACKET (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_LCURLY_BRACKET (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_RCURLY_BRACKET (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_NULL_TYPE (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_NETCONF (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_USER_CONTEXT (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_COMMENT (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_BOOT_UPDATE (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_SUBSCRIBE_CHANGES (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_VALIDATE_CHANGES (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_MANAGED_SERVERS (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_DHCP4_SERVER (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_DHCP6_SERVER (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_D2_SERVER (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_CA_SERVER (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_MODEL (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_CONTROL_SOCKET (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_SOCKET_TYPE (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_UNIX (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_HTTP (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_STDOUT (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_SOCKET_NAME (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_SOCKET_URL (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_HOOKS_LIBRARIES (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_LIBRARY (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_PARAMETERS (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_LOGGING (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_LOGGERS (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_NAME (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_OUTPUT_OPTIONS (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_OUTPUT (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_DEBUGLEVEL (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_SEVERITY (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_FLUSH (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_MAXSIZE (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_MAXVER (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_PATTERN (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_START_JSON (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_START_NETCONF (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_START_SUB_NETCONF (YY_COPY (location_type) l);
-
- static
- symbol_type
- make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l);
-
- static
- symbol_type
- make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l);
-
- static
- symbol_type
- make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l);
-
- static
- symbol_type
- make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l);
-
+ // Implementation of make_symbol for each symbol type.
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_END (location_type l)
+ {
+ return symbol_type (token::TOKEN_END, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_END (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_END, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_COMMA (location_type l)
+ {
+ return symbol_type (token::TOKEN_COMMA, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_COMMA (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_COMMA, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_COLON (location_type l)
+ {
+ return symbol_type (token::TOKEN_COLON, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_COLON (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_COLON, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_LSQUARE_BRACKET (location_type l)
+ {
+ return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_LSQUARE_BRACKET (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_RSQUARE_BRACKET (location_type l)
+ {
+ return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_RSQUARE_BRACKET (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_LCURLY_BRACKET (location_type l)
+ {
+ return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_LCURLY_BRACKET (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_RCURLY_BRACKET (location_type l)
+ {
+ return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_RCURLY_BRACKET (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_NULL_TYPE (location_type l)
+ {
+ return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_NULL_TYPE (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_NULL_TYPE, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_NETCONF (location_type l)
+ {
+ return symbol_type (token::TOKEN_NETCONF, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_NETCONF (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_NETCONF, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_USER_CONTEXT (location_type l)
+ {
+ return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_USER_CONTEXT (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_USER_CONTEXT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_COMMENT (location_type l)
+ {
+ return symbol_type (token::TOKEN_COMMENT, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_COMMENT (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_COMMENT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_BOOT_UPDATE (location_type l)
+ {
+ return symbol_type (token::TOKEN_BOOT_UPDATE, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_BOOT_UPDATE (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_BOOT_UPDATE, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_SUBSCRIBE_CHANGES (location_type l)
+ {
+ return symbol_type (token::TOKEN_SUBSCRIBE_CHANGES, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_SUBSCRIBE_CHANGES (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_SUBSCRIBE_CHANGES, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_VALIDATE_CHANGES (location_type l)
+ {
+ return symbol_type (token::TOKEN_VALIDATE_CHANGES, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_VALIDATE_CHANGES (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_VALIDATE_CHANGES, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_MANAGED_SERVERS (location_type l)
+ {
+ return symbol_type (token::TOKEN_MANAGED_SERVERS, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_MANAGED_SERVERS (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_MANAGED_SERVERS, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_DHCP4_SERVER (location_type l)
+ {
+ return symbol_type (token::TOKEN_DHCP4_SERVER, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_DHCP4_SERVER (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_DHCP4_SERVER, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_DHCP6_SERVER (location_type l)
+ {
+ return symbol_type (token::TOKEN_DHCP6_SERVER, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_DHCP6_SERVER (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_DHCP6_SERVER, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_D2_SERVER (location_type l)
+ {
+ return symbol_type (token::TOKEN_D2_SERVER, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_D2_SERVER (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_D2_SERVER, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_CA_SERVER (location_type l)
+ {
+ return symbol_type (token::TOKEN_CA_SERVER, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_CA_SERVER (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_CA_SERVER, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_MODEL (location_type l)
+ {
+ return symbol_type (token::TOKEN_MODEL, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_MODEL (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_MODEL, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_CONTROL_SOCKET (location_type l)
+ {
+ return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_CONTROL_SOCKET (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_SOCKET_TYPE (location_type l)
+ {
+ return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_SOCKET_TYPE (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_SOCKET_TYPE, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_UNIX (location_type l)
+ {
+ return symbol_type (token::TOKEN_UNIX, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_UNIX (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_UNIX, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_HTTP (location_type l)
+ {
+ return symbol_type (token::TOKEN_HTTP, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_HTTP (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_HTTP, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_STDOUT (location_type l)
+ {
+ return symbol_type (token::TOKEN_STDOUT, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_STDOUT (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_STDOUT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_SOCKET_NAME (location_type l)
+ {
+ return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_SOCKET_NAME (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_SOCKET_NAME, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_SOCKET_URL (location_type l)
+ {
+ return symbol_type (token::TOKEN_SOCKET_URL, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_SOCKET_URL (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_SOCKET_URL, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_HOOKS_LIBRARIES (location_type l)
+ {
+ return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_HOOKS_LIBRARIES (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_LIBRARY (location_type l)
+ {
+ return symbol_type (token::TOKEN_LIBRARY, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_LIBRARY (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_LIBRARY, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_PARAMETERS (location_type l)
+ {
+ return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_PARAMETERS (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_PARAMETERS, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_LOGGING (location_type l)
+ {
+ return symbol_type (token::TOKEN_LOGGING, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_LOGGING (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_LOGGING, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_LOGGERS (location_type l)
+ {
+ return symbol_type (token::TOKEN_LOGGERS, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_LOGGERS (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_LOGGERS, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_NAME (location_type l)
+ {
+ return symbol_type (token::TOKEN_NAME, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_NAME (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_NAME, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_OUTPUT_OPTIONS (location_type l)
+ {
+ return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_OUTPUT_OPTIONS (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_OUTPUT (location_type l)
+ {
+ return symbol_type (token::TOKEN_OUTPUT, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_OUTPUT (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_OUTPUT, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_DEBUGLEVEL (location_type l)
+ {
+ return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_DEBUGLEVEL (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_DEBUGLEVEL, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_SEVERITY (location_type l)
+ {
+ return symbol_type (token::TOKEN_SEVERITY, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_SEVERITY (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_SEVERITY, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_FLUSH (location_type l)
+ {
+ return symbol_type (token::TOKEN_FLUSH, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_FLUSH (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_FLUSH, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_MAXSIZE (location_type l)
+ {
+ return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_MAXSIZE (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_MAXSIZE, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_MAXVER (location_type l)
+ {
+ return symbol_type (token::TOKEN_MAXVER, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_MAXVER (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_MAXVER, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_PATTERN (location_type l)
+ {
+ return symbol_type (token::TOKEN_PATTERN, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_PATTERN (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_PATTERN, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_START_JSON (location_type l)
+ {
+ return symbol_type (token::TOKEN_START_JSON, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_START_JSON (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_START_JSON, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_START_NETCONF (location_type l)
+ {
+ return symbol_type (token::TOKEN_START_NETCONF, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_START_NETCONF (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_START_NETCONF, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_START_SUB_NETCONF (location_type l)
+ {
+ return symbol_type (token::TOKEN_START_SUB_NETCONF, std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_START_SUB_NETCONF (const location_type& l)
+ {
+ return symbol_type (token::TOKEN_START_SUB_NETCONF, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_STRING (std::string v, location_type l)
+ {
+ return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_STRING (const std::string& v, const location_type& l)
+ {
+ return symbol_type (token::TOKEN_STRING, v, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_INTEGER (int64_t v, location_type l)
+ {
+ return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_INTEGER (const int64_t& v, const location_type& l)
+ {
+ return symbol_type (token::TOKEN_INTEGER, v, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_FLOAT (double v, location_type l)
+ {
+ return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_FLOAT (const double& v, const location_type& l)
+ {
+ return symbol_type (token::TOKEN_FLOAT, v, l);
+ }
+#endif
+#if 201103L <= YY_CPLUSPLUS
+ static
+ symbol_type
+ make_BOOLEAN (bool v, location_type l)
+ {
+ return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
+ }
+#else
+ static
+ symbol_type
+ make_BOOLEAN (const bool& v, const location_type& l)
+ {
+ return symbol_type (token::TOKEN_BOOLEAN, v, l);
+ }
+#endif
private:
@@ -1017,26 +1661,26 @@ namespace isc { namespace netconf {
struct by_state
{
/// Default constructor.
- by_state ();
+ by_state () YY_NOEXCEPT;
/// The symbol type as needed by the constructor.
typedef state_type kind_type;
/// Constructor.
- by_state (kind_type s);
+ by_state (kind_type s) YY_NOEXCEPT;
/// Copy constructor.
- by_state (const by_state& other);
+ by_state (const by_state& that) YY_NOEXCEPT;
/// Record that this symbol is empty.
- void clear ();
+ void clear () YY_NOEXCEPT;
/// Steal the symbol type from \a that.
void move (by_state& that);
/// The (internal) type number (corresponding to \a state).
/// \a empty_symbol when empty.
- symbol_number_type type_get () const;
+ symbol_number_type type_get () const YY_NOEXCEPT;
/// The state number used to denote an empty symbol.
enum { empty_state = -1 };
@@ -1057,13 +1701,137 @@ namespace isc { namespace netconf {
stack_symbol_type (YY_RVREF (stack_symbol_type) that);
/// Steal the contents from \a sym to build this.
stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
-#if !defined __cplusplus || __cplusplus < 201103L
+#if YY_CPLUSPLUS < 201103L
/// Assignment, needed by push_back by some old implementations.
/// Moves the contents of that.
stack_symbol_type& operator= (stack_symbol_type& that);
#endif
};
+ /// A stack with random access from its top.
+ template <typename T, typename S = std::vector<T> >
+ class stack
+ {
+ public:
+ // Hide our reversed order.
+ typedef typename S::reverse_iterator iterator;
+ typedef typename S::const_reverse_iterator const_iterator;
+ typedef typename S::size_type size_type;
+
+ stack (size_type n = 200)
+ : seq_ (n)
+ {}
+
+ /// Random access.
+ ///
+ /// Index 0 returns the topmost element.
+ T&
+ operator[] (size_type i)
+ {
+ return seq_[size () - 1 - i];
+ }
+
+ /// Random access.
+ ///
+ /// Index 0 returns the topmost element.
+ T&
+ operator[] (int i)
+ {
+ return operator[] (size_type (i));
+ }
+
+ /// Random access.
+ ///
+ /// Index 0 returns the topmost element.
+ const T&
+ operator[] (size_type i) const
+ {
+ return seq_[size () - 1 - i];
+ }
+
+ /// Random access.
+ ///
+ /// Index 0 returns the topmost element.
+ const T&
+ operator[] (int i) const
+ {
+ return operator[] (size_type (i));
+ }
+
+ /// Steal the contents of \a t.
+ ///
+ /// Close to move-semantics.
+ void
+ push (YY_MOVE_REF (T) t)
+ {
+ seq_.push_back (T ());
+ operator[] (0).move (t);
+ }
+
+ /// Pop elements from the stack.
+ void
+ pop (int n = 1) YY_NOEXCEPT
+ {
+ for (; 0 < n; --n)
+ seq_.pop_back ();
+ }
+
+ /// Pop all elements from the stack.
+ void
+ clear () YY_NOEXCEPT
+ {
+ seq_.clear ();
+ }
+
+ /// Number of elements on the stack.
+ size_type
+ size () const YY_NOEXCEPT
+ {
+ return seq_.size ();
+ }
+
+ /// Iterator on top of the stack (going downwards).
+ const_iterator
+ begin () const YY_NOEXCEPT
+ {
+ return seq_.rbegin ();
+ }
+
+ /// Bottom of the stack.
+ const_iterator
+ end () const YY_NOEXCEPT
+ {
+ return seq_.rend ();
+ }
+
+ /// Present a slice of the top of a stack.
+ class slice
+ {
+ public:
+ slice (const stack& stack, int range)
+ : stack_ (stack)
+ , range_ (range)
+ {}
+
+ const T&
+ operator[] (int i) const
+ {
+ return stack_[range_ - i];
+ }
+
+ private:
+ const stack& stack_;
+ int range_;
+ };
+
+ private:
+ stack (const stack&);
+ stack& operator= (const stack&);
+ /// The wrapped container.
+ S seq_;
+ };
+
+
/// Stack type.
typedef stack<stack_symbol_type> stack_type;
@@ -1105,16 +1873,17 @@ namespace isc { namespace netconf {
isc::netconf::ParserContext& ctx;
};
- // Symbol number corresponding to token number t.
inline
NetconfParser::token_number_type
NetconfParser::yytranslate_ (token_type t)
{
+ // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
+ // TOKEN-NUM as returned by yylex.
static
const token_number_type
translate_table[] =
{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 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,
@@ -1157,47 +1926,36 @@ namespace isc { namespace netconf {
return undef_token_;
}
- inline
- NetconfParser::syntax_error::syntax_error (const location_type& l, const std::string& m)
- : std::runtime_error (m)
- , location (l)
- {}
-
// basic_symbol.
+#if 201103L <= YY_CPLUSPLUS
template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol ()
- : value ()
- , location ()
- {}
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (YY_RVREF (basic_symbol) other)
- : Base (YY_MOVE (other))
+ NetconfParser::basic_symbol<Base>::basic_symbol (basic_symbol&& that)
+ : Base (std::move (that))
, value ()
- , location (YY_MOVE (other.location))
+ , location (std::move (that.location))
{
- switch (other.type_get ())
+ switch (this->type_get ())
{
case 58: // value
case 61: // map_value
case 120: // socket_type_value
- value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (other.value));
+ value.move< ElementPtr > (std::move (that.value));
break;
case 49: // "boolean"
- value.YY_MOVE_OR_COPY< bool > (YY_MOVE (other.value));
+ value.move< bool > (std::move (that.value));
break;
case 48: // "floating point"
- value.YY_MOVE_OR_COPY< double > (YY_MOVE (other.value));
+ value.move< double > (std::move (that.value));
break;
case 47: // "integer"
- value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (other.value));
+ value.move< int64_t > (std::move (that.value));
break;
case 46: // "constant string"
- value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (other.value));
+ value.move< std::string > (std::move (that.value));
break;
default:
@@ -1205,107 +1963,49 @@ namespace isc { namespace netconf {
}
}
-
-
- // Implementation of basic_symbol constructor for each type.
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l)
- : Base (t)
- , location (YY_MOVE (l))
- {}
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l)
- : Base (t)
- , value (YY_MOVE (v))
- , location (YY_MOVE (l))
- {}
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l)
- : Base (t)
- , value (YY_MOVE (v))
- , location (YY_MOVE (l))
- {}
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l)
- : Base (t)
- , value (YY_MOVE (v))
- , location (YY_MOVE (l))
- {}
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l)
- : Base (t)
- , value (YY_MOVE (v))
- , location (YY_MOVE (l))
- {}
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l)
- : Base (t)
- , value (YY_MOVE (v))
- , location (YY_MOVE (l))
- {}
-
-
-
- template <typename Base>
- NetconfParser::basic_symbol<Base>::~basic_symbol ()
- {
- clear ();
- }
+#endif
template <typename Base>
- void
- NetconfParser::basic_symbol<Base>::clear ()
+ NetconfParser::basic_symbol<Base>::basic_symbol (const basic_symbol& that)
+ : Base (that)
+ , value ()
+ , location (that.location)
{
- // User destructor.
- symbol_number_type yytype = this->type_get ();
- basic_symbol<Base>& yysym = *this;
- (void) yysym;
- switch (yytype)
- {
- default:
- break;
- }
-
- // Type destructor.
- switch (yytype)
+ switch (this->type_get ())
{
case 58: // value
case 61: // map_value
case 120: // socket_type_value
- value.template destroy< ElementPtr > ();
+ value.copy< ElementPtr > (YY_MOVE (that.value));
break;
case 49: // "boolean"
- value.template destroy< bool > ();
+ value.copy< bool > (YY_MOVE (that.value));
break;
case 48: // "floating point"
- value.template destroy< double > ();
+ value.copy< double > (YY_MOVE (that.value));
break;
case 47: // "integer"
- value.template destroy< int64_t > ();
+ value.copy< int64_t > (YY_MOVE (that.value));
break;
case 46: // "constant string"
- value.template destroy< std::string > ();
+ value.copy< std::string > (YY_MOVE (that.value));
break;
default:
break;
}
- Base::clear ();
}
+
+
template <typename Base>
bool
- NetconfParser::basic_symbol<Base>::empty () const
+ NetconfParser::basic_symbol<Base>::empty () const YY_NOEXCEPT
{
return Base::type_get () == empty_symbol;
}
@@ -1352,9 +2052,18 @@ namespace isc { namespace netconf {
: type (empty_symbol)
{}
+#if 201103L <= YY_CPLUSPLUS
inline
- NetconfParser::by_type::by_type (const by_type& other)
- : type (other.type)
+ NetconfParser::by_type::by_type (by_type&& that)
+ : type (that.type)
+ {
+ that.clear ();
+ }
+#endif
+
+ inline
+ NetconfParser::by_type::by_type (const by_type& that)
+ : type (that.type)
{}
inline
@@ -1379,14 +2088,14 @@ namespace isc { namespace netconf {
inline
int
- NetconfParser::by_type::type_get () const
+ NetconfParser::by_type::type_get () const YY_NOEXCEPT
{
return type;
}
inline
NetconfParser::token_type
- NetconfParser::by_type::token () const
+ NetconfParser::by_type::token () const YY_NOEXCEPT
{
// YYTOKNUM[NUM] -- (External) token number corresponding to the
// (internal) symbol number NUM (which must be that of a token). */
@@ -1400,350 +2109,13 @@ namespace isc { namespace netconf {
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304
};
- return static_cast<token_type> (yytoken_number_[type]);
+ return token_type (yytoken_number_[type]);
}
- // Implementation of make_symbol for each symbol type.
- inline
- NetconfParser::symbol_type
- NetconfParser::make_END (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_END, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_COMMA (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_COMMA, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_COLON (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_COLON, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_LSQUARE_BRACKET (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_LSQUARE_BRACKET, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_RSQUARE_BRACKET (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_RSQUARE_BRACKET, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_LCURLY_BRACKET (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_LCURLY_BRACKET, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_RCURLY_BRACKET (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_RCURLY_BRACKET, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_NULL_TYPE (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_NULL_TYPE, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_NETCONF (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_NETCONF, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_USER_CONTEXT (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_USER_CONTEXT, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_COMMENT (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_COMMENT, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_BOOT_UPDATE (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_BOOT_UPDATE, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_SUBSCRIBE_CHANGES (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_SUBSCRIBE_CHANGES, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_VALIDATE_CHANGES (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_VALIDATE_CHANGES, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_MANAGED_SERVERS (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_MANAGED_SERVERS, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_DHCP4_SERVER (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_DHCP4_SERVER, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_DHCP6_SERVER (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_DHCP6_SERVER, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_D2_SERVER (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_D2_SERVER, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_CA_SERVER (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_CA_SERVER, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_MODEL (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_MODEL, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_CONTROL_SOCKET (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_CONTROL_SOCKET, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_SOCKET_TYPE (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_SOCKET_TYPE, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_UNIX (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_UNIX, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_HTTP (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_HTTP, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_STDOUT (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_STDOUT, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_SOCKET_NAME (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_SOCKET_NAME, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_SOCKET_URL (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_SOCKET_URL, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_HOOKS_LIBRARIES (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_HOOKS_LIBRARIES, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_LIBRARY (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_LIBRARY, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_PARAMETERS (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_PARAMETERS, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_LOGGING (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_LOGGING, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_LOGGERS (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_LOGGERS, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_NAME (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_NAME, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_OUTPUT_OPTIONS (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_OUTPUT_OPTIONS, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_OUTPUT (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_OUTPUT, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_DEBUGLEVEL (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_DEBUGLEVEL, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_SEVERITY (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_SEVERITY, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_FLUSH (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_FLUSH, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_MAXSIZE (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_MAXSIZE, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_MAXVER (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_MAXVER, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_PATTERN (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_PATTERN, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_START_JSON (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_START_JSON, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_START_NETCONF (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_START_NETCONF, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_START_SUB_NETCONF (YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_START_SUB_NETCONF, YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_STRING, YY_MOVE (v), YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_INTEGER, YY_MOVE (v), YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_FLOAT, YY_MOVE (v), YY_MOVE (l));
- }
-
- inline
- NetconfParser::symbol_type
- NetconfParser::make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l)
- {
- return symbol_type (token::TOKEN_BOOLEAN, YY_MOVE (v), YY_MOVE (l));
- }
-
-
-#line 14 "netconf_parser.yy" // lalr1.cc:404
+#line 14 "netconf_parser.yy"
} } // isc::netconf
-#line 1747 "netconf_parser.h" // lalr1.cc:404
+#line 2118 "netconf_parser.h"
+
diff --git a/src/bin/netconf/position.hh b/src/bin/netconf/position.hh
index 22ef35f744..c1280f1a34 100644
--- a/src/bin/netconf/position.hh
+++ b/src/bin/netconf/position.hh
@@ -1,4 +1,4 @@
-// A Bison parser, made by GNU Bison 3.2.1.
+// A Bison parser, made by GNU Bison 3.4.1.
// Starting with Bison 3.2, this file is useless: the structure it
// used to define is now defined in "location.hh".
diff --git a/src/bin/netconf/stack.hh b/src/bin/netconf/stack.hh
index 81e152d836..0f7aafe529 100644
--- a/src/bin/netconf/stack.hh
+++ b/src/bin/netconf/stack.hh
@@ -1,4 +1,4 @@
-// A Bison parser, made by GNU Bison 3.2.1.
+// A Bison parser, made by GNU Bison 3.4.1.
// Starting with Bison 3.2, this file is useless: the structure it
// used to define is now defined with the parser itself.