44 #ifndef YY_NETCONF_NETCONF_PARSER_H_INCLUDED
45 # define YY_NETCONF_NETCONF_PARSER_H_INCLUDED
47 #line 17 "netconf_parser.yy" // lalr1.cc:404
51 #include <boost/lexical_cast.hpp>
58 #line 59 "netconf_parser.h" // lalr1.cc:404
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
144 # define YY_NULLPTR 0
147 # define YY_NULLPTR ((void*)0)
152 #ifndef NETCONF_DEBUG
155 # define NETCONF_DEBUG 1
157 # define NETCONF_DEBUG 0
160 # define NETCONF_DEBUG 1
164 #line 14 "netconf_parser.yy" // lalr1.cc:404
165 namespace isc {
namespace netconf {
166 #line 167 "netconf_parser.h" // lalr1.cc:404
169 template <
typename T,
typename S = std::vector<T> >
188 return seq_[size () - 1 - i];
206 return seq_[size () - 1 - i];
213 operator[] (
int i)
const
224 seq_.push_back (T ());
225 operator[](0).move (t);
250 return seq_.rbegin ();
267 template <
typename T,
typename S = stack<T> >
277 operator[] (
int i)
const
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
333 template <
typename T,
typename U>
340 yytypeid_ = &
typeid (T);
341 return *
new (yyas_<T> ()) T (std::forward <U>(u));
344 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
430 template <
typename T>
433 move (self_type&& other)
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;
459 self_type& operator= (
const self_type&);
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_;
497 #ifndef NETCONF_STYPE
507 char dummy2[
sizeof (bool)];
510 char dummy3[
sizeof (double)];
513 char dummy4[
sizeof (int64_t)];
516 char dummy5[
sizeof (std::string)];
542 TOKEN_LSQUARE_BRACKET = 260,
543 TOKEN_RSQUARE_BRACKET = 261,
544 TOKEN_LCURLY_BRACKET = 262,
545 TOKEN_RCURLY_BRACKET = 263,
546 TOKEN_NULL_TYPE = 264,
548 TOKEN_USER_CONTEXT = 266,
550 TOKEN_BOOT_UPDATE = 268,
551 TOKEN_SUBSCRIBE_CHANGES = 269,
552 TOKEN_VALIDATE_CHANGES = 270,
553 TOKEN_MANAGED_SERVERS = 271,
554 TOKEN_DHCP4_SERVER = 272,
555 TOKEN_DHCP6_SERVER = 273,
556 TOKEN_D2_SERVER = 274,
557 TOKEN_CA_SERVER = 275,
559 TOKEN_CONTROL_SOCKET = 277,
560 TOKEN_SOCKET_TYPE = 278,
564 TOKEN_SOCKET_NAME = 282,
565 TOKEN_SOCKET_URL = 283,
566 TOKEN_HOOKS_LIBRARIES = 284,
568 TOKEN_PARAMETERS = 286,
572 TOKEN_OUTPUT_OPTIONS = 290,
574 TOKEN_DEBUGLEVEL = 292,
575 TOKEN_SEVERITY = 293,
579 TOKEN_START_JSON = 297,
580 TOKEN_START_NETCONF = 298,
581 TOKEN_START_SUB_NETCONF = 299,
596 enum { empty_symbol = -2 };
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 &);
744 virtual void error (
const location_type& loc,
const std::string& msg);
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);
1084 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
1085 #if YY_CPLUSPLUS < 201103L
1086 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);
1111 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
1114 void yypop_ (
int n = 1);
1136 NetconfParser::yytranslate_ (token_type t)
1139 const token_number_type
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;
1175 const token_number_type undef_token_ = 2;
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" // lalr1.cc:404
1811 #line 1812 "netconf_parser.h" // lalr1.cc:404
1816 #endif // !YY_NETCONF_NETCONF_PARSER_H_INCLUDED