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 ())
1196 value.YY_MOVE_OR_COPY<
double > (
YY_MOVE (other.
value));
1200 value.YY_MOVE_OR_COPY< int64_t > (
YY_MOVE (other.
value));
1204 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (other.
value));
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>
1361 return Base::type_get () == empty_symbol;
1364 template <
typename Base>
1368 super_type::move (s);
1369 switch (this->type_get ())
1402 AgentParser::by_type::by_type ()
1403 : type (empty_symbol)
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
static symbol_type make_LIBRARY(YY_COPY(location_type) l)
int symbol_number_type
Symbol type: an internal symbol number.
A char[S] buffer to store and retrieve objects.
static symbol_type make_DHCP4_SERVER(YY_COPY(location_type) l)
token_type token() const
The token.
token::yytokentype token_type
(External) token type, as returned by yylex.
void copy(const self_type &other)
Copy the content of other to this.
void move(by_type &that)
Steal the symbol type from that.
T & build()
Instantiate an empty T in here.
static symbol_type make_NAME(YY_COPY(location_type) l)
Present a slice of the top of a stack.
void destroy()
Destroy the stored T.
static symbol_type make_USER_CONTEXT(YY_COPY(location_type) l)
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
static symbol_type make_LSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_OUTPUT(YY_COPY(location_type) l)
static symbol_type make_SEVERITY(YY_COPY(location_type) l)
T & emplace()
Instantiate an empty T in here.
static symbol_type make_FLUSH(YY_COPY(location_type) l)
const_iterator end() const
T & build(const T &t)
Instantiate a T in here from t.
#define YY_MOVE_REF(Type)
syntax_error(const location_type &l, const std::string &m)
boost::shared_ptr< Element > ElementPtr
Syntax errors thrown from user actions.
static symbol_type make_CONTROL_SOCKETS(YY_COPY(location_type) l)
static symbol_type make_DHCP4(YY_COPY(location_type) l)
void move(self_type &other)
Move the content of other to this.
static symbol_type make_MAXVER(YY_COPY(location_type) l)
static symbol_type make_HTTP_PORT(YY_COPY(location_type) l)
static symbol_type make_START_SUB_AGENT(YY_COPY(location_type) l)
static symbol_type make_OUTPUT_OPTIONS(YY_COPY(location_type) l)
static symbol_type make_HTTP_HOST(YY_COPY(location_type) l)
static symbol_type make_START_AGENT(YY_COPY(location_type) l)
variant(YY_RVREF(T) t)
Construct and fill.
An auxiliary type to compute the largest semantic type.
variant()
Empty construction.
Forward declaration of the ParserContext class.
static symbol_type make_HOOKS_LIBRARIES(YY_COPY(location_type) l)
void clear()
Record that this symbol is empty.
Type access provider for token (enum) based symbols.
location_type location
The location.
void swap(self_type &other)
Swap the content with other, of same type.
static symbol_type make_MAXSIZE(YY_COPY(location_type) l)
const_iterator begin() const
static symbol_type make_SOCKET_NAME(YY_COPY(location_type) l)
static symbol_type make_DHCP6(YY_COPY(location_type) l)
static symbol_type make_STRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_UNIX(YY_COPY(location_type) l)
slice(const S &stack, int range)
T & emplace(const T &t)
Instantiate a T in here from t.
static symbol_type make_FLOAT(YY_COPY(double) v, YY_COPY(location_type) l)
static symbol_type make_DHCP6_SERVER(YY_COPY(location_type) l)
static symbol_type make_DEBUGLEVEL(YY_COPY(location_type) l)
A stack with random access from its top.
~variant()
Destruction, allowed only if empty.
static symbol_type make_DHCPDDNS(YY_COPY(location_type) l)
token_type kind_type
The symbol type as needed by the constructor.
static symbol_type make_START_JSON(YY_COPY(location_type) l)
basic_symbol()
Default constructor.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static symbol_type make_NULL_TYPE(YY_COPY(location_type) l)
static symbol_type make_RSQUARE_BRACKET(YY_COPY(location_type) l)
long double yyalign_me
Strongest alignment constraints.
T & as()
Accessor to a built T.
static symbol_type make_SOCKET_TYPE(YY_COPY(location_type) l)
const T & as() const
Const accessor to a built T (for printer).
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
static symbol_type make_COMMA(YY_COPY(location_type) l)
static symbol_type make_COMMENT(YY_COPY(location_type) l)
static symbol_type make_LOGGERS(YY_COPY(location_type) l)
int debug_level_type
Type for debugging levels.
variant< S > self_type
Type of *this.
static symbol_type make_COLON(YY_COPY(location_type) l)
static symbol_type make_D2_SERVER(YY_COPY(location_type) l)
location location_type
Symbol locations.
#define YY_ATTRIBUTE_PURE
static symbol_type make_BOOLEAN(YY_COPY(bool) v, YY_COPY(location_type) l)
static symbol_type make_CONTROL_AGENT(YY_COPY(location_type) l)
static symbol_type make_LCURLY_BRACKET(YY_COPY(location_type) l)
S::reverse_iterator iterator
by_type()
Default constructor.
Parser context is a wrapper around flex/bison instances dedicated to Control-agent config file parser...
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
static symbol_type make_INTEGER(YY_COPY(int64_t) v, YY_COPY(location_type) l)
static symbol_type make_RCURLY_BRACKET(YY_COPY(location_type) l)
static symbol_type make_LOGGING(YY_COPY(location_type) l)
static symbol_type make_END(YY_COPY(location_type) l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
semantic_type value
The semantic value.
Base super_type
Alias to Base.
S::const_reverse_iterator const_iterator
static symbol_type make_PARAMETERS(YY_COPY(location_type) l)