44 #ifndef YY_AGENT_AGENT_PARSER_H_INCLUDED
45 # define YY_AGENT_AGENT_PARSER_H_INCLUDED
47 #line 17 "agent_parser.yy" // lalr1.cc:404
51 #include <boost/lexical_cast.hpp>
58 #line 59 "agent_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)
155 # define AGENT_DEBUG 1
157 # define AGENT_DEBUG 0
160 # define AGENT_DEBUG 1
164 #line 14 "agent_parser.yy" // lalr1.cc:404
165 namespace isc {
namespace agent {
166 #line 167 "agent_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_;
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,
547 TOKEN_CONTROL_AGENT = 265,
548 TOKEN_HTTP_HOST = 266,
549 TOKEN_HTTP_PORT = 267,
550 TOKEN_USER_CONTEXT = 268,
552 TOKEN_CONTROL_SOCKETS = 270,
553 TOKEN_DHCP4_SERVER = 271,
554 TOKEN_DHCP6_SERVER = 272,
555 TOKEN_D2_SERVER = 273,
556 TOKEN_SOCKET_NAME = 274,
557 TOKEN_SOCKET_TYPE = 275,
559 TOKEN_HOOKS_LIBRARIES = 277,
561 TOKEN_PARAMETERS = 279,
565 TOKEN_OUTPUT_OPTIONS = 283,
567 TOKEN_DEBUGLEVEL = 285,
568 TOKEN_SEVERITY = 286,
574 TOKEN_DHCPDDNS = 292,
575 TOKEN_START_JSON = 293,
576 TOKEN_START_AGENT = 294,
577 TOKEN_START_SUB_AGENT = 295,
592 enum { empty_symbol = -2 };
603 template <
typename Base>
617 # if 201103L <= YY_CPLUSPLUS
622 # if 201103L <= YY_CPLUSPLUS
627 # if 201103L <= YY_CPLUSPLUS
632 # if 201103L <= YY_CPLUSPLUS
637 # if 201103L <= YY_CPLUSPLUS
642 # if 201103L <= YY_CPLUSPLUS
668 #if YY_CPLUSPLUS < 201103L
721 virtual int parse ();
727 void set_debug_stream (std::ostream &);
740 virtual void error (
const location_type& loc,
const std::string& msg);
926 typedef int state_type;
931 virtual std::string yysyntax_error_ (state_type yystate,
937 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
941 static bool yy_pact_value_is_default_ (
int yyvalue);
945 static bool yy_table_value_is_error_ (
int yyvalue);
947 static const signed char yypact_ninf_;
948 static const signed char yytable_ninf_;
956 static const short yypact_[];
961 static const unsigned char yydefact_[];
964 static const signed char yypgoto_[];
967 static const short yydefgoto_[];
972 static const unsigned char yytable_[];
974 static const short yycheck_[];
978 static const unsigned char yystos_[];
981 static const unsigned char yyr1_[];
984 static const unsigned char yyr2_[];
988 static std::string yytnamerr_ (
const char *n);
992 static const char*
const yytname_[];
995 static const unsigned short yyrline_[];
997 virtual void yy_reduce_print_ (
int r);
999 virtual void yystack_print_ ();
1004 std::ostream* yycdebug_;
1009 template <
typename Base>
1017 template <
typename Base>
1028 typedef state_type kind_type;
1031 by_state (kind_type s);
1034 by_state (
const by_state& other);
1040 void move (by_state& that);
1047 enum { empty_state = -1 };
1055 struct stack_symbol_type : basic_symbol<by_state>
1058 typedef basic_symbol<by_state> super_type;
1060 stack_symbol_type ();
1062 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
1064 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
1065 #if YY_CPLUSPLUS < 201103L
1066 stack_symbol_type& operator= (stack_symbol_type& that);
1076 stack_type yystack_;
1083 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
1091 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
1094 void yypop_ (
int n = 1);
1116 AgentParser::yytranslate_ (token_type t)
1119 const token_number_type
1122 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1123 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1124 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1125 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1126 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1127 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1128 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1129 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1130 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1131 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1132 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1133 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1134 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1135 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1137 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1138 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1139 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1140 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1141 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1142 2, 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, 1, 2, 3, 4,
1148 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1149 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1150 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1151 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
1153 const unsigned user_token_number_max_ = 299;
1154 const token_number_type undef_token_ = 2;
1156 if (
static_cast<int> (t) <= yyeof_)
1158 else if (
static_cast<unsigned> (t) <= user_token_number_max_)
1159 return translate_table[t];
1161 return undef_token_;
1166 : std::runtime_error (m)
1171 template <
typename Base>
1177 template <
typename Base>
1181 , location (
YY_MOVE (other.location))
1183 switch (other.type_get ())
1215 # if 201103L <= YY_CPLUSPLUS
1216 template <
typename Base>
1219 , location (std::move (l))
1222 template <
typename Base>
1228 # if 201103L <= YY_CPLUSPLUS
1229 template <
typename Base>
1232 , value (std::move (v))
1233 , location (std::move (l))
1236 template <
typename Base>
1243 # if 201103L <= YY_CPLUSPLUS
1244 template <
typename Base>
1247 , value (std::move (v))
1248 , location (std::move (l))
1251 template <
typename Base>
1258 # if 201103L <= YY_CPLUSPLUS
1259 template <
typename Base>
1262 , value (std::move (v))
1263 , location (std::move (l))
1266 template <
typename Base>
1273 # if 201103L <= YY_CPLUSPLUS
1274 template <
typename Base>
1277 , value (std::move (v))
1278 , location (std::move (l))
1281 template <
typename Base>
1288 # if 201103L <= YY_CPLUSPLUS
1289 template <
typename Base>
1292 , value (std::move (v))
1293 , location (std::move (l))
1296 template <
typename Base>
1305 template <
typename Base>
1311 template <
typename Base>
1331 value.template destroy< ElementPtr > ();
1335 value.template destroy< bool > ();
1339 value.template destroy< double > ();
1343 value.template destroy< int64_t > ();
1347 value.template destroy< std::string > ();
1357 template <
typename Base>
1364 template <
typename Base>
1368 super_type::move (s);
1369 switch (this->type_get ())
1413 : type (yytranslate_ (t))
1445 const unsigned short
1448 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1449 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1450 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1451 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1452 295, 296, 297, 298, 299
1454 return static_cast<token_type> (yytoken_number_[type]);
1760 #line 14 "agent_parser.yy" // lalr1.cc:404
1762 #line 1763 "agent_parser.h" // lalr1.cc:404
1767 #endif // !YY_AGENT_AGENT_PARSER_H_INCLUDED