44#ifndef YY_AGENT_AGENT_PARSER_H_INCLUDED
45# define YY_AGENT_AGENT_PARSER_H_INCLUDED
47#line 17 "agent_parser.yy"
51#include <boost/lexical_cast.hpp>
58#line 59 "agent_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 AGENT_DEBUG 1
157# define AGENT_DEBUG 0
160# define AGENT_DEBUG 1
164#line 14 "agent_parser.yy"
165namespace isc {
namespace agent {
166#line 167 "agent_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_;
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 &);
730 typedef
int debug_level_type;
734 void set_debug_level (debug_level_type l);
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);
1065#if YY_CPLUSPLUS < 201103L
1068 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);
1094 void yypop_ (
int n = 1);
1116 AgentParser::yytranslate_ (token_type t)
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;
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"
1762#line 1763 "agent_parser.h"
Forward declaration of the ParserContext class.
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
static symbol_type make_OUTPUT_OPTIONS(YY_COPY(location_type) l)
static symbol_type make_DEBUGLEVEL(YY_COPY(location_type) l)
static symbol_type make_FLUSH(YY_COPY(location_type) l)
static symbol_type make_LOGGING(YY_COPY(location_type) l)
static symbol_type make_USER_CONTEXT(YY_COPY(location_type) l)
static symbol_type make_DHCP4(YY_COPY(location_type) l)
static symbol_type make_SOCKET_NAME(YY_COPY(location_type) l)
static symbol_type make_START_JSON(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_SUB_AGENT(YY_COPY(location_type) l)
static symbol_type make_COMMENT(YY_COPY(location_type) l)
location location_type
Symbol locations.
static symbol_type make_CONTROL_SOCKETS(YY_COPY(location_type) l)
static symbol_type make_STRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_D2_SERVER(YY_COPY(location_type) l)
virtual int parse()
Parse.
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
static symbol_type make_BOOLEAN(YY_COPY(bool) v, YY_COPY(location_type) l)
static symbol_type make_START_AGENT(YY_COPY(location_type) l)
static symbol_type make_DHCP6(YY_COPY(location_type) l)
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
static symbol_type make_HTTP_HOST(YY_COPY(location_type) l)
static symbol_type make_END(YY_COPY(location_type) l)
static symbol_type make_LSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_MAXSIZE(YY_COPY(location_type) l)
static symbol_type make_RCURLY_BRACKET(YY_COPY(location_type) l)
static symbol_type make_DHCP6_SERVER(YY_COPY(location_type) l)
static symbol_type make_COMMA(YY_COPY(location_type) l)
static symbol_type make_HTTP_PORT(YY_COPY(location_type) l)
static symbol_type make_OUTPUT(YY_COPY(location_type) l)
int symbol_number_type
Symbol type: an internal symbol number.
static symbol_type make_DHCP4_SERVER(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_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_MAXVER(YY_COPY(location_type) l)
static symbol_type make_UNIX(YY_COPY(location_type) l)
static symbol_type make_INTEGER(YY_COPY(int64_t) v, YY_COPY(location_type) l)
static symbol_type make_PARAMETERS(YY_COPY(location_type) l)
static symbol_type make_COLON(YY_COPY(location_type) l)
token::yytokentype token_type
(External) token type, as returned by yylex.
static symbol_type make_SOCKET_TYPE(YY_COPY(location_type) l)
static symbol_type make_CONTROL_AGENT(YY_COPY(location_type) l)
static symbol_type make_NAME(YY_COPY(location_type) l)
static symbol_type make_LOGGERS(YY_COPY(location_type) l)
static symbol_type make_NULL_TYPE(YY_COPY(location_type) l)
static symbol_type make_DHCPDDNS(YY_COPY(location_type) l)
static symbol_type make_RSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_SEVERITY(YY_COPY(location_type) l)
Parser context is a wrapper around flex/bison instances dedicated to Control-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.
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
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-dhcp-ddns.
Base super_type
Alias to Base.
semantic_type value
The semantic value.
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
location_type location
The location.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructor for valueless symbols, and symbols from each type.
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
void clear()
Destroy contents, and record that is empty.
~basic_symbol()
Destroy the symbol.
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
basic_symbol(YY_RVREF(basic_symbol) other)
Move or copy constructor.
basic_symbol()
Default constructor.
bool empty() const
Whether empty.
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
Type access provider for token (enum) based symbols.
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.
void clear()
Record that this symbol is empty.
void move(by_type &that)
Steal the symbol type from that.
by_type()
Default constructor.
token_type token() const
The token.
Syntax errors thrown from user actions.
syntax_error(const location_type &l, const std::string &m)
A char[S] buffer to store and retrieve objects.
variant()
Empty construction.
variant< S > self_type
Type of *this.
T & build()
Instantiate an empty T in here.
T & emplace(const T &t)
Instantiate a T in here from t.
void destroy()
Destroy the stored T.
const T & as() const
Const accessor to a built T (for printer).
void copy(const self_type &other)
Copy the content of other to this.
variant(YY_RVREF(T) t)
Construct and fill.
T & as()
Accessor to a built T.
void move(self_type &other)
Move the content of other to this.
long double yyalign_me
Strongest alignment constraints.
T & emplace()
Instantiate an empty T in here.
char yyraw[S]
A buffer large enough to store any of the semantic values.
~variant()
Destruction, allowed only if empty.
T & build(const T &t)
Instantiate a T in here from t.
void swap(self_type &other)
Swap the content with other, of same type.
An auxiliary type to compute the largest semantic type.
char dummy3[sizeof(double)]
char dummy2[sizeof(bool)]
char dummy1[sizeof(ElementPtr)]
char dummy4[sizeof(int64_t)]
char dummy5[sizeof(std::string)]