44#ifndef YY_NETCONF_NETCONF_PARSER_H_INCLUDED
45# define YY_NETCONF_NETCONF_PARSER_H_INCLUDED
47#line 17 "netconf_parser.yy"
51#include <boost/lexical_cast.hpp>
58#line 59 "netconf_parser.h"
67#if defined __cplusplus
68# define YY_CPLUSPLUS __cplusplus
70# define YY_CPLUSPLUS 199711L
74#if 201103L <= YY_CPLUSPLUS
75# define YY_MOVE std::move
76# define YY_MOVE_OR_COPY move
77# define YY_MOVE_REF(Type) Type&&
78# define YY_RVREF(Type) Type&&
79# define YY_COPY(Type) Type
82# define YY_MOVE_OR_COPY copy
83# define YY_MOVE_REF(Type) Type&
84# define YY_RVREF(Type) const Type&
85# define YY_COPY(Type) const Type&
87# include "location.hh"
91# define YYASSERT assert
96# if (defined __GNUC__ \
97 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
98 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
99# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
101# define YY_ATTRIBUTE(Spec)
105#ifndef YY_ATTRIBUTE_PURE
106# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
109#ifndef YY_ATTRIBUTE_UNUSED
110# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
114#if ! defined lint || defined __GNUC__
115# define YYUSE(E) ((void) (E))
120#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
122# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
123 _Pragma ("GCC diagnostic push") \
124 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
125 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
126# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
127 _Pragma ("GCC diagnostic pop")
129# define YY_INITIAL_VALUE(Value) Value
131#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
132# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
133# define YY_IGNORE_MAYBE_UNINITIALIZED_END
135#ifndef YY_INITIAL_VALUE
136# define YY_INITIAL_VALUE(Value)
140# if defined __cplusplus
141# if 201103L <= __cplusplus
142# define YY_NULLPTR nullptr
147# define YY_NULLPTR ((void*)0)
155# define NETCONF_DEBUG 1
157# define NETCONF_DEBUG 0
160# define NETCONF_DEBUG 1
164#line 14 "netconf_parser.yy"
165namespace isc {
namespace netconf {
166#line 167 "netconf_parser.h"
169 template <
typename T,
typename S = std::vector<T> >
188 return seq_[
size () - 1 - i];
206 return seq_[
size () - 1 - i];
224 seq_.push_back (T ());
250 return seq_.rbegin ();
267 template <
typename T,
typename S = stack<T> >
279 return stack_[range_ - i];
303 , yytypeid_ (YY_NULLPTR)
307 template <
typename T>
309 : yytypeid_ (&typeid (T))
312 new (yyas_<T> ()) T (
YY_MOVE (t));
322 template <
typename T>
328 yytypeid_ = &
typeid (T);
329 return *
new (yyas_<T> ()) T ();
332# if 201103L <= YY_CPLUSPLUS
334 template <
typename T,
typename U>
340 yytypeid_ = &
typeid (T);
341 return *
new (yyas_<T> ()) T (std::forward <U>(u));
345 template <
typename T>
351 yytypeid_ = &
typeid (T);
352 return *
new (yyas_<T> ()) T (t);
358 template <
typename T>
362 return emplace<T> ();
367 template <
typename T>
371 return emplace<T> (t);
375 template <
typename T>
380 YYASSERT (*yytypeid_ ==
typeid (T));
386 template <
typename T>
391 YYASSERT (*yytypeid_ ==
typeid (T));
404 template <
typename T>
409 YYASSERT (*yytypeid_ == *other.yytypeid_);
410 std::swap (as<T> (), other.
as<T> ());
416 template <
typename T>
420# if 201103L <= YY_CPLUSPLUS
421 emplace<T> (std::move (other.
as<T> ()));
429# if 201103L <= YY_CPLUSPLUS
431 template <
typename T>
435 emplace<T> (std::move (other.as<T> ()));
441 template <
typename T>
445 emplace<T> (other.
as<T> ());
449 template <
typename T>
454 yytypeid_ = YY_NULLPTR;
463 template <
typename T>
467 void *yyp = yybuffer_.yyraw;
468 return static_cast<T*
> (yyp);
472 template <
typename T>
476 const void *yyp = yybuffer_.yyraw;
477 return static_cast<const T*
> (yyp);
489 const std::type_info *yytypeid_;
607 template <
typename Base>
621# if 201103L <= YY_CPLUSPLUS
626# if 201103L <= YY_CPLUSPLUS
631# if 201103L <= YY_CPLUSPLUS
636# if 201103L <= YY_CPLUSPLUS
641# if 201103L <= YY_CPLUSPLUS
646# if 201103L <= YY_CPLUSPLUS
672#if YY_CPLUSPLUS < 201103L
725 virtual int parse ();
731 void set_debug_stream (std::ostream &);
734 typedef
int debug_level_type;
738 void set_debug_level (debug_level_type l);
946 typedef int state_type;
951 virtual std::string yysyntax_error_ (state_type yystate,
957 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
961 static bool yy_pact_value_is_default_ (
int yyvalue);
965 static bool yy_table_value_is_error_ (
int yyvalue);
967 static const signed char yypact_ninf_;
968 static const signed char yytable_ninf_;
976 static const short yypact_[];
981 static const unsigned char yydefact_[];
984 static const short yypgoto_[];
987 static const short yydefgoto_[];
992 static const unsigned short yytable_[];
994 static const short yycheck_[];
998 static const unsigned char yystos_[];
1001 static const unsigned char yyr1_[];
1004 static const unsigned char yyr2_[];
1008 static std::string yytnamerr_ (
const char *n);
1012 static const char*
const yytname_[];
1015 static const unsigned short yyrline_[];
1017 virtual void yy_reduce_print_ (
int r);
1019 virtual void yystack_print_ ();
1024 std::ostream* yycdebug_;
1029 template <
typename Base>
1037 template <
typename Base>
1048 typedef state_type kind_type;
1051 by_state (kind_type s);
1054 by_state (
const by_state& other);
1060 void move (by_state& that);
1067 enum { empty_state = -1 };
1075 struct stack_symbol_type : basic_symbol<by_state>
1078 typedef basic_symbol<by_state> super_type;
1080 stack_symbol_type ();
1082 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
1085#if YY_CPLUSPLUS < 201103L
1088 stack_symbol_type& operator= (stack_symbol_type& that);
1096 stack_type yystack_;
1103 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
1114 void yypop_ (
int n = 1);
1136 NetconfParser::yytranslate_ (token_type t)
1142 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1146 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1147 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1148 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1149 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1150 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1151 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1152 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1153 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1154 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1155 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1156 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1157 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1158 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1159 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1160 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1161 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1162 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1163 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1164 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1165 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1166 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1167 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1168 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1169 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1170 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1171 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1174 const unsigned user_token_number_max_ = 303;
1177 if (
static_cast<int> (t) <= yyeof_)
1179 else if (
static_cast<unsigned> (t) <= user_token_number_max_)
1180 return translate_table[t];
1182 return undef_token_;
1187 : std::runtime_error (m)
1192 template <
typename Base>
1198 template <
typename Base>
1202 , location (
YY_MOVE (other.location))
1204 switch (other.type_get ())
1236# if 201103L <= YY_CPLUSPLUS
1237 template <
typename Base>
1240 , location (std::move (l))
1243 template <
typename Base>
1249# if 201103L <= YY_CPLUSPLUS
1250 template <
typename Base>
1253 , value (std::move (v))
1254 , location (std::move (l))
1257 template <
typename Base>
1264# if 201103L <= YY_CPLUSPLUS
1265 template <
typename Base>
1268 , value (std::move (v))
1269 , location (std::move (l))
1272 template <
typename Base>
1279# if 201103L <= YY_CPLUSPLUS
1280 template <
typename Base>
1283 , value (std::move (v))
1284 , location (std::move (l))
1287 template <
typename Base>
1294# if 201103L <= YY_CPLUSPLUS
1295 template <
typename Base>
1298 , value (std::move (v))
1299 , location (std::move (l))
1302 template <
typename Base>
1309# if 201103L <= YY_CPLUSPLUS
1310 template <
typename Base>
1313 , value (std::move (v))
1314 , location (std::move (l))
1317 template <
typename Base>
1326 template <
typename Base>
1332 template <
typename Base>
1352 value.template destroy< ElementPtr > ();
1356 value.template destroy< bool > ();
1360 value.template destroy< double > ();
1364 value.template destroy< int64_t > ();
1368 value.template destroy< std::string > ();
1378 template <
typename Base>
1385 template <
typename Base>
1389 super_type::move (s);
1390 switch (this->type_get ())
1434 : type (yytranslate_ (t))
1466 const unsigned short
1469 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1470 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1471 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1472 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1473 295, 296, 297, 298, 299, 300, 301, 302, 303
1475 return static_cast<token_type> (yytoken_number_[type]);
1809#line 14 "netconf_parser.yy"
1811#line 1812 "netconf_parser.h"
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
static symbol_type make_HOOKS_LIBRARIES(YY_COPY(location_type) l)
static symbol_type make_COMMA(YY_COPY(location_type) l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
static symbol_type make_NAME(YY_COPY(location_type) l)
static symbol_type make_LOGGING(YY_COPY(location_type) l)
static symbol_type make_HTTP(YY_COPY(location_type) l)
virtual int parse()
Parse.
static symbol_type make_LCURLY_BRACKET(YY_COPY(location_type) l)
static symbol_type make_FLOAT(YY_COPY(double) v, YY_COPY(location_type) l)
static symbol_type make_DHCP4_SERVER(YY_COPY(location_type) l)
static symbol_type make_SOCKET_URL(YY_COPY(location_type) l)
static symbol_type make_BOOT_UPDATE(YY_COPY(location_type) l)
static symbol_type make_LOGGERS(YY_COPY(location_type) l)
static symbol_type make_LSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_START_JSON(YY_COPY(location_type) l)
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
static symbol_type make_START_SUB_NETCONF(YY_COPY(location_type) l)
static symbol_type make_MAXSIZE(YY_COPY(location_type) l)
static symbol_type make_STDOUT(YY_COPY(location_type) l)
static symbol_type make_END(YY_COPY(location_type) l)
static symbol_type make_VALIDATE_CHANGES(YY_COPY(location_type) l)
static symbol_type make_BOOLEAN(YY_COPY(bool) v, YY_COPY(location_type) l)
token::yytokentype token_type
(External) token type, as returned by yylex.
static symbol_type make_INTEGER(YY_COPY(int64_t) v, YY_COPY(location_type) l)
int symbol_number_type
Symbol type: an internal symbol number.
static symbol_type make_SUBSCRIBE_CHANGES(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)
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static symbol_type make_START_NETCONF(YY_COPY(location_type) l)
static symbol_type make_DEBUGLEVEL(YY_COPY(location_type) l)
static symbol_type make_UNIX(YY_COPY(location_type) l)
static symbol_type make_COLON(YY_COPY(location_type) l)
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
static symbol_type make_COMMENT(YY_COPY(location_type) l)
static symbol_type make_SOCKET_TYPE(YY_COPY(location_type) l)
static symbol_type make_CA_SERVER(YY_COPY(location_type) l)
static symbol_type make_DHCP6_SERVER(YY_COPY(location_type) l)
static symbol_type make_FLUSH(YY_COPY(location_type) l)
static symbol_type make_NETCONF(YY_COPY(location_type) l)
static symbol_type make_NULL_TYPE(YY_COPY(location_type) l)
static symbol_type make_MAXVER(YY_COPY(location_type) l)
static symbol_type make_MODEL(YY_COPY(location_type) l)
static symbol_type make_STRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_RSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_D2_SERVER(YY_COPY(location_type) l)
location location_type
Symbol locations.
static symbol_type make_SOCKET_NAME(YY_COPY(location_type) l)
static symbol_type make_MANAGED_SERVERS(YY_COPY(location_type) l)
static symbol_type make_RCURLY_BRACKET(YY_COPY(location_type) l)
static symbol_type make_CONTROL_SOCKET(YY_COPY(location_type) l)
static symbol_type make_SEVERITY(YY_COPY(location_type) l)
static symbol_type make_USER_CONTEXT(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)
Parser context is a wrapper around flex/bison instances dedicated to Netconf-agent config file parser...
Present a slice of the top of a stack.
slice(const S &stack, int range)
const T & operator[](int i) const
A stack with random access from its top.
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
const_iterator begin() const
T & operator[](size_type i)
Random access.
S::reverse_iterator iterator
S::const_reverse_iterator const_iterator
const_iterator end() const
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-dhcp-ddns.
Forward declaration of the ParserContext class.
semantic_type value
The semantic value.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Base super_type
Alias to Base.
void clear()
Destroy contents, and record that is empty.
basic_symbol()
Default constructor.
location_type location
The location.
~basic_symbol()
Destroy the symbol.
bool empty() const
Whether empty.
Type access provider for token (enum) based symbols.
token_type token() const
The token.
void move(by_type &that)
Steal the symbol type from that.
void clear()
Record that this symbol is empty.
by_type()
Default constructor.
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
token_type kind_type
The symbol type as needed by the constructor.
Syntax errors thrown from user actions.
syntax_error(const location_type &l, const std::string &m)
@ TOKEN_SUBSCRIBE_CHANGES
@ TOKEN_START_SUB_NETCONF
A char[S] buffer to store and retrieve objects.
variant(YY_RVREF(T) t)
Construct and fill.
long double yyalign_me
Strongest alignment constraints.
variant< S > self_type
Type of *this.
T & emplace()
Instantiate an empty T in here.
void move(self_type &other)
Move the content of other to this.
T & emplace(const T &t)
Instantiate a T in here from t.
T & build()
Instantiate an empty T in here.
void swap(self_type &other)
Swap the content with other, of same type.
void copy(const self_type &other)
Copy the content of other to this.
~variant()
Destruction, allowed only if empty.
T & build(const T &t)
Instantiate a T in here from t.
const T & as() const
Const accessor to a built T (for printer).
char yyraw[S]
A buffer large enough to store any of the semantic values.
variant()
Empty construction.
void destroy()
Destroy the stored T.
T & as()
Accessor to a built T.
An auxiliary type to compute the largest semantic type.
char dummy4[sizeof(int64_t)]
char dummy2[sizeof(bool)]
char dummy3[sizeof(double)]
char dummy5[sizeof(std::string)]
char dummy1[sizeof(ElementPtr)]