44#ifndef YY_D2_PARSER_D2_PARSER_H_INCLUDED
45# define YY_D2_PARSER_D2_PARSER_H_INCLUDED
47#line 17 "d2_parser.yy"
52#include <boost/lexical_cast.hpp>
68#if defined __cplusplus
69# define YY_CPLUSPLUS __cplusplus
71# define YY_CPLUSPLUS 199711L
75#if 201103L <= YY_CPLUSPLUS
76# define YY_MOVE std::move
77# define YY_MOVE_OR_COPY move
78# define YY_MOVE_REF(Type) Type&&
79# define YY_RVREF(Type) Type&&
80# define YY_COPY(Type) Type
83# define YY_MOVE_OR_COPY copy
84# define YY_MOVE_REF(Type) Type&
85# define YY_RVREF(Type) const Type&
86# define YY_COPY(Type) const Type&
88# include "location.hh"
92# define YYASSERT assert
97# if (defined __GNUC__ \
98 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
99 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
100# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
102# define YY_ATTRIBUTE(Spec)
106#ifndef YY_ATTRIBUTE_PURE
107# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
110#ifndef YY_ATTRIBUTE_UNUSED
111# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
115#if ! defined lint || defined __GNUC__
116# define YYUSE(E) ((void) (E))
121#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
123# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
124 _Pragma ("GCC diagnostic push") \
125 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
126 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
127# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
128 _Pragma ("GCC diagnostic pop")
130# define YY_INITIAL_VALUE(Value) Value
132#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
133# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
134# define YY_IGNORE_MAYBE_UNINITIALIZED_END
136#ifndef YY_INITIAL_VALUE
137# define YY_INITIAL_VALUE(Value)
141# if defined __cplusplus
142# if 201103L <= __cplusplus
143# define YY_NULLPTR nullptr
148# define YY_NULLPTR ((void*)0)
153#ifndef D2_PARSER_DEBUG
156# define D2_PARSER_DEBUG 1
158# define D2_PARSER_DEBUG 0
161# define D2_PARSER_DEBUG 1
165#line 14 "d2_parser.yy"
166namespace isc {
namespace d2 {
167#line 168 "d2_parser.h"
170 template <
typename T,
typename S = std::vector<T> >
189 return seq_[
size () - 1 - i];
207 return seq_[
size () - 1 - i];
225 seq_.push_back (T ());
251 return seq_.rbegin ();
268 template <
typename T,
typename S = stack<T> >
280 return stack_[range_ - i];
304 , yytypeid_ (YY_NULLPTR)
308 template <
typename T>
310 : yytypeid_ (&typeid (T))
313 new (yyas_<T> ()) T (
YY_MOVE (t));
323 template <
typename T>
329 yytypeid_ = &
typeid (T);
330 return *
new (yyas_<T> ()) T ();
333# if 201103L <= YY_CPLUSPLUS
335 template <
typename T,
typename U>
341 yytypeid_ = &
typeid (T);
342 return *
new (yyas_<T> ()) T (std::forward <U>(u));
346 template <
typename T>
352 yytypeid_ = &
typeid (T);
353 return *
new (yyas_<T> ()) T (t);
359 template <
typename T>
363 return emplace<T> ();
368 template <
typename T>
372 return emplace<T> (t);
376 template <
typename T>
381 YYASSERT (*yytypeid_ ==
typeid (T));
387 template <
typename T>
392 YYASSERT (*yytypeid_ ==
typeid (T));
405 template <
typename T>
410 YYASSERT (*yytypeid_ == *other.yytypeid_);
411 std::swap (as<T> (), other.
as<T> ());
417 template <
typename T>
421# if 201103L <= YY_CPLUSPLUS
422 emplace<T> (std::move (other.
as<T> ()));
430# if 201103L <= YY_CPLUSPLUS
432 template <
typename T>
436 emplace<T> (std::move (other.as<T> ()));
442 template <
typename T>
446 emplace<T> (other.
as<T> ());
450 template <
typename T>
455 yytypeid_ = YY_NULLPTR;
464 template <
typename T>
468 void *yyp = yybuffer_.yyraw;
469 return static_cast<T*
> (yyp);
473 template <
typename T>
477 const void *yyp = yybuffer_.yyraw;
478 return static_cast<const T*
> (yyp);
490 const std::type_info *yytypeid_;
498#ifndef D2_PARSER_STYPE
616 template <
typename Base>
630# if 201103L <= YY_CPLUSPLUS
635# if 201103L <= YY_CPLUSPLUS
640# if 201103L <= YY_CPLUSPLUS
645# if 201103L <= YY_CPLUSPLUS
650# if 201103L <= YY_CPLUSPLUS
655# if 201103L <= YY_CPLUSPLUS
681#if YY_CPLUSPLUS < 201103L
734 virtual int parse ();
740 void set_debug_stream (std::ostream &);
743 typedef
int debug_level_type;
747 void set_debug_level (debug_level_type l);
987 typedef int state_type;
992 virtual std::string yysyntax_error_ (state_type yystate,
998 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
1002 static bool yy_pact_value_is_default_ (
int yyvalue);
1006 static bool yy_table_value_is_error_ (
int yyvalue);
1008 static const signed char yypact_ninf_;
1009 static const signed char yytable_ninf_;
1017 static const short yypact_[];
1022 static const unsigned char yydefact_[];
1025 static const signed char yypgoto_[];
1028 static const short yydefgoto_[];
1033 static const unsigned short yytable_[];
1035 static const short yycheck_[];
1039 static const unsigned char yystos_[];
1042 static const unsigned char yyr1_[];
1045 static const unsigned char yyr2_[];
1049 static std::string yytnamerr_ (
const char *n);
1053 static const char*
const yytname_[];
1056 static const unsigned short yyrline_[];
1058 virtual void yy_reduce_print_ (
int r);
1060 virtual void yystack_print_ ();
1065 std::ostream* yycdebug_;
1070 template <
typename Base>
1078 template <
typename Base>
1089 typedef state_type kind_type;
1092 by_state (kind_type s);
1095 by_state (
const by_state& other);
1101 void move (by_state& that);
1108 enum { empty_state = -1 };
1116 struct stack_symbol_type : basic_symbol<by_state>
1119 typedef basic_symbol<by_state> super_type;
1121 stack_symbol_type ();
1123 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
1126#if YY_CPLUSPLUS < 201103L
1129 stack_symbol_type& operator= (stack_symbol_type& that);
1137 stack_type yystack_;
1144 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
1155 void yypop_ (
int n = 1);
1177 D2Parser::yytranslate_ (token_type t)
1183 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1184 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1187 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1196 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1197 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1198 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1199 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1202 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1203 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1205 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1208 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1209 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1210 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1211 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1212 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1213 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1216 const unsigned user_token_number_max_ = 311;
1219 if (
static_cast<int> (t) <= yyeof_)
1221 else if (
static_cast<unsigned> (t) <= user_token_number_max_)
1222 return translate_table[t];
1224 return undef_token_;
1229 : std::runtime_error (m)
1234 template <
typename Base>
1240 template <
typename Base>
1244 , location (
YY_MOVE (other.location))
1246 switch (other.type_get ())
1278# if 201103L <= YY_CPLUSPLUS
1279 template <
typename Base>
1282 , location (std::move (l))
1285 template <
typename Base>
1291# if 201103L <= YY_CPLUSPLUS
1292 template <
typename Base>
1295 , value (std::move (v))
1296 , location (std::move (l))
1299 template <
typename Base>
1306# if 201103L <= YY_CPLUSPLUS
1307 template <
typename Base>
1310 , value (std::move (v))
1311 , location (std::move (l))
1314 template <
typename Base>
1321# if 201103L <= YY_CPLUSPLUS
1322 template <
typename Base>
1325 , value (std::move (v))
1326 , location (std::move (l))
1329 template <
typename Base>
1336# if 201103L <= YY_CPLUSPLUS
1337 template <
typename Base>
1340 , value (std::move (v))
1341 , location (std::move (l))
1344 template <
typename Base>
1351# if 201103L <= YY_CPLUSPLUS
1352 template <
typename Base>
1355 , value (std::move (v))
1356 , location (std::move (l))
1359 template <
typename Base>
1368 template <
typename Base>
1374 template <
typename Base>
1394 value.template destroy< ElementPtr > ();
1398 value.template destroy< bool > ();
1402 value.template destroy< double > ();
1406 value.template destroy< int64_t > ();
1410 value.template destroy< std::string > ();
1420 template <
typename Base>
1427 template <
typename Base>
1431 super_type::move (s);
1432 switch (this->type_get ())
1476 : type (yytranslate_ (t))
1508 const unsigned short
1511 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1512 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1513 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1514 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1515 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1516 305, 306, 307, 308, 309, 310, 311
1518 return static_cast<token_type> (yytoken_number_[type]);
1908#line 14 "d2_parser.yy"
1910#line 1911 "d2_parser.h"
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
Evaluation context, an interface to the expression evaluation.
static symbol_type make_DHCP6(YY_COPY(location_type) l)
static symbol_type make_SUB_DHCPDDNS(YY_COPY(location_type) l)
static symbol_type make_FLUSH(YY_COPY(location_type) l)
static symbol_type make_SUB_DDNS_DOMAIN(YY_COPY(location_type) l)
static symbol_type make_NULL_TYPE(YY_COPY(location_type) l)
static symbol_type make_UDP(YY_COPY(location_type) l)
static symbol_type make_LCURLY_BRACKET(YY_COPY(location_type) l)
static symbol_type make_RSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_LSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_DDNS_DOMAINS(YY_COPY(location_type) l)
static symbol_type make_HOSTNAME(YY_COPY(location_type) l)
static symbol_type make_CONTROL_AGENT(YY_COPY(location_type) l)
static symbol_type make_DHCPDDNS(YY_COPY(location_type) l)
static symbol_type make_PORT(YY_COPY(location_type) l)
location location_type
Symbol locations.
static symbol_type make_TOPLEVEL_DHCPDDNS(YY_COPY(location_type) l)
static symbol_type make_IP_ADDRESS(YY_COPY(location_type) l)
static symbol_type make_TSIG_KEYS(YY_COPY(location_type) l)
int symbol_number_type
Symbol type: an internal symbol number.
static symbol_type make_OUTPUT(YY_COPY(location_type) l)
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
static symbol_type make_COMMENT(YY_COPY(location_type) l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
static symbol_type make_USER_CONTEXT(YY_COPY(location_type) l)
static symbol_type make_FORWARD_DDNS(YY_COPY(location_type) l)
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
static symbol_type make_DHCP4(YY_COPY(location_type) l)
static symbol_type make_BOOLEAN(YY_COPY(bool) v, YY_COPY(location_type) l)
static symbol_type make_DNS_SERVER_TIMEOUT(YY_COPY(location_type) l)
static symbol_type make_LOGGERS(YY_COPY(location_type) l)
static symbol_type make_SECRET(YY_COPY(location_type) l)
static symbol_type make_SUB_DNS_SERVER(YY_COPY(location_type) l)
static symbol_type make_COLON(YY_COPY(location_type) l)
static symbol_type make_COMMA(YY_COPY(location_type) l)
static symbol_type make_ALGORITHM(YY_COPY(location_type) l)
static symbol_type make_NCR_PROTOCOL(YY_COPY(location_type) l)
static symbol_type make_JSON(YY_COPY(location_type) l)
static symbol_type make_DEBUGLEVEL(YY_COPY(location_type) l)
static symbol_type make_SUB_TSIG_KEY(YY_COPY(location_type) l)
static symbol_type make_SUB_TSIG_KEYS(YY_COPY(location_type) l)
static symbol_type make_LOGGING(YY_COPY(location_type) l)
virtual int parse()
Parse.
static symbol_type make_DNS_SERVERS(YY_COPY(location_type) l)
static symbol_type make_KEY_NAME(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_SUB_DNS_SERVERS(YY_COPY(location_type) l)
static symbol_type make_NCR_FORMAT(YY_COPY(location_type) l)
static symbol_type make_INTEGER(YY_COPY(int64_t) v, YY_COPY(location_type) l)
static symbol_type make_MAXVER(YY_COPY(location_type) l)
static symbol_type make_NAME(YY_COPY(location_type) l)
static symbol_type make_DIGEST_BITS(YY_COPY(location_type) l)
token::yytokentype token_type
(External) token type, as returned by yylex.
static symbol_type make_END(YY_COPY(location_type) l)
static symbol_type make_SEVERITY(YY_COPY(location_type) l)
static symbol_type make_OUTPUT_OPTIONS(YY_COPY(location_type) l)
static symbol_type make_SUB_DDNS_DOMAINS(YY_COPY(location_type) l)
static symbol_type make_TOPLEVEL_JSON(YY_COPY(location_type) l)
static symbol_type make_TCP(YY_COPY(location_type) l)
static symbol_type make_REVERSE_DDNS(YY_COPY(location_type) l)
static symbol_type make_FLOAT(YY_COPY(double) v, YY_COPY(location_type) l)
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static symbol_type make_STRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
Present a slice of the top of a stack.
const T & operator[](int i) const
slice(const S &stack, int range)
A stack with random access from its top.
T & operator[](size_type i)
Random access.
S::const_reverse_iterator const_iterator
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
const_iterator begin() const
S::reverse_iterator iterator
const_iterator end() const
Forward declaration of the ParserContext class.
A collection of classes for housing and parsing the application configuration necessary for the DHCP-...
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-dhcp-ddns.
semantic_type value
The semantic value.
void clear()
Destroy contents, and record that is empty.
bool empty() const
Whether empty.
Base super_type
Alias to Base.
basic_symbol()
Default constructor.
location_type location
The location.
~basic_symbol()
Destroy the symbol.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
Type access provider for token (enum) based symbols.
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
void move(by_type &that)
Steal the symbol type from that.
token_type kind_type
The symbol type as needed by the constructor.
void clear()
Record that this symbol is empty.
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)
@ TOKEN_TOPLEVEL_DHCPDDNS
@ TOKEN_DNS_SERVER_TIMEOUT
A char[S] buffer to store and retrieve objects.
void swap(self_type &other)
Swap the content with other, of same type.
~variant()
Destruction, allowed only if empty.
T & as()
Accessor to a built T.
const T & as() const
Const accessor to a built T (for printer).
T & build()
Instantiate an empty T in here.
void move(self_type &other)
Move the content of other to this.
char yyraw[S]
A buffer large enough to store any of the semantic values.
T & emplace(const T &t)
Instantiate a T in here from t.
T & emplace()
Instantiate an empty T in here.
variant(YY_RVREF(T) t)
Construct and fill.
long double yyalign_me
Strongest alignment constraints.
void destroy()
Destroy the stored T.
void copy(const self_type &other)
Copy the content of other to this.
T & build(const T &t)
Instantiate a T in here from t.
variant()
Empty construction.
variant< S > self_type
Type of *this.
An auxiliary type to compute the largest semantic type.
char dummy1[sizeof(ElementPtr)]
char dummy4[sizeof(int64_t)]
char dummy5[sizeof(std::string)]
char dummy3[sizeof(double)]
char dummy2[sizeof(bool)]