44 #ifndef YY_D2_PARSER_D2_PARSER_H_INCLUDED 45 # define YY_D2_PARSER_D2_PARSER_H_INCLUDED 47 #line 17 "d2_parser.yy" // lalr1.cc:404 52 #include <boost/lexical_cast.hpp> 59 #line 60 "d2_parser.h" // lalr1.cc:404 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 145 # define YY_NULLPTR 0 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" // lalr1.cc:404 166 namespace isc {
namespace d2 {
167 #line 168 "d2_parser.h" // lalr1.cc:404 170 template <
typename T,
typename S = std::vector<T> >
189 return seq_[size () - 1 - i];
207 return seq_[size () - 1 - i];
214 operator[] (
int i)
const 225 seq_.push_back (T ());
226 operator[](0).move (t);
251 return seq_.rbegin ();
268 template <
typename T,
typename S = stack<T> >
278 operator[] (
int i)
const 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 334 template <
typename T,
typename U>
341 yytypeid_ = &
typeid (T);
342 return *
new (yyas_<T> ()) T (std::forward <U>(u));
345 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 431 template <
typename T>
434 move (self_type&& other)
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;
460 self_type& operator= (
const self_type&);
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 508 char dummy2[
sizeof (bool)];
511 char dummy3[
sizeof (double)];
514 char dummy4[
sizeof (int64_t)];
517 char dummy5[
sizeof (std::string)];
543 TOKEN_LSQUARE_BRACKET = 260,
544 TOKEN_RSQUARE_BRACKET = 261,
545 TOKEN_LCURLY_BRACKET = 262,
546 TOKEN_RCURLY_BRACKET = 263,
547 TOKEN_NULL_TYPE = 264,
550 TOKEN_CONTROL_AGENT = 267,
551 TOKEN_DHCPDDNS = 268,
552 TOKEN_IP_ADDRESS = 269,
554 TOKEN_DNS_SERVER_TIMEOUT = 271,
555 TOKEN_NCR_PROTOCOL = 272,
558 TOKEN_NCR_FORMAT = 275,
560 TOKEN_USER_CONTEXT = 277,
562 TOKEN_FORWARD_DDNS = 279,
563 TOKEN_REVERSE_DDNS = 280,
564 TOKEN_DDNS_DOMAINS = 281,
565 TOKEN_KEY_NAME = 282,
566 TOKEN_DNS_SERVERS = 283,
567 TOKEN_HOSTNAME = 284,
568 TOKEN_TSIG_KEYS = 285,
569 TOKEN_ALGORITHM = 286,
570 TOKEN_DIGEST_BITS = 287,
575 TOKEN_OUTPUT_OPTIONS = 292,
577 TOKEN_DEBUGLEVEL = 294,
578 TOKEN_SEVERITY = 295,
582 TOKEN_TOPLEVEL_JSON = 299,
583 TOKEN_TOPLEVEL_DHCPDDNS = 300,
584 TOKEN_SUB_DHCPDDNS = 301,
585 TOKEN_SUB_TSIG_KEY = 302,
586 TOKEN_SUB_TSIG_KEYS = 303,
587 TOKEN_SUB_DDNS_DOMAIN = 304,
588 TOKEN_SUB_DDNS_DOMAINS = 305,
589 TOKEN_SUB_DNS_SERVER = 306,
590 TOKEN_SUB_DNS_SERVERS = 307,
605 enum { empty_symbol = -2 };
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 &);
753 virtual void error (
const location_type& loc,
const std::string& msg);
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);
1125 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
1126 #if YY_CPLUSPLUS < 201103L 1127 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);
1152 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
1155 void yypop_ (
int n = 1);
1177 D2Parser::yytranslate_ (token_type t)
1180 const token_number_type
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;
1217 const token_number_type undef_token_ = 2;
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 ())
1259 value.YY_MOVE_OR_COPY<
double > (
YY_MOVE (other.
value));
1263 value.YY_MOVE_OR_COPY< int64_t > (
YY_MOVE (other.
value));
1267 value.YY_MOVE_OR_COPY< std::string > (
YY_MOVE (other.
value));
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>
1424 return Base::type_get () == empty_symbol;
1427 template <
typename Base>
1431 super_type::move (s);
1432 switch (this->type_get ())
1465 D2Parser::by_type::by_type ()
1466 : type (empty_symbol)
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" // lalr1.cc:404 1910 #line 1911 "d2_parser.h" // lalr1.cc:404 1915 #endif // !YY_D2_PARSER_D2_PARSER_H_INCLUDED A char[S] buffer to store and retrieve objects.
by_type()
Default constructor.
static symbol_type make_COMMENT(YY_COPY(location_type) l)
T & emplace()
Instantiate an empty T in here.
~variant()
Destruction, allowed only if empty.
Syntax errors thrown from user actions.
static symbol_type make_COLON(YY_COPY(location_type) l)
token_type kind_type
The symbol type as needed by the constructor.
static symbol_type make_SUB_TSIG_KEYS(YY_COPY(location_type) l)
static symbol_type make_NAME(YY_COPY(location_type) l)
static symbol_type make_DNS_SERVER_TIMEOUT(YY_COPY(location_type) l)
Evaluation context, an interface to the expression evaluation.
static symbol_type make_INTEGER(YY_COPY(int64_t) v, YY_COPY(location_type) l)
T & build()
Instantiate an empty T in here.
S::reverse_iterator iterator
static symbol_type make_TOPLEVEL_DHCPDDNS(YY_COPY(location_type) l)
void clear()
Record that this symbol is empty.
static symbol_type make_DIGEST_BITS(YY_COPY(location_type) l)
T & build(const T &t)
Instantiate a T in here from t.
#define YY_ATTRIBUTE_PURE
int debug_level_type
Type for debugging levels.
slice(const S &stack, int range)
semantic_type value
The semantic value.
static symbol_type make_SUB_DDNS_DOMAINS(YY_COPY(location_type) l)
static symbol_type make_DEBUGLEVEL(YY_COPY(location_type) l)
boost::shared_ptr< Element > ElementPtr
static symbol_type make_SUB_DDNS_DOMAIN(YY_COPY(location_type) l)
static symbol_type make_END(YY_COPY(location_type) l)
static symbol_type make_COMMA(YY_COPY(location_type) l)
token_type token() const
The token.
A stack with random access from its top.
static symbol_type make_OUTPUT(YY_COPY(location_type) l)
static symbol_type make_OUTPUT_OPTIONS(YY_COPY(location_type) l)
Base super_type
Alias to Base.
static symbol_type make_MAXVER(YY_COPY(location_type) l)
static symbol_type make_HOSTNAME(YY_COPY(location_type) l)
static symbol_type make_DHCPDDNS(YY_COPY(location_type) l)
static symbol_type make_DDNS_DOMAINS(YY_COPY(location_type) l)
T & emplace(const T &t)
Instantiate a T in here from t.
static symbol_type make_BOOLEAN(YY_COPY(bool) v, YY_COPY(location_type) l)
void copy(const self_type &other)
Copy the content of other to this.
An auxiliary type to compute the largest semantic type.
static symbol_type make_NCR_FORMAT(YY_COPY(location_type) l)
static symbol_type make_SECRET(YY_COPY(location_type) l)
static symbol_type make_RSQUARE_BRACKET(YY_COPY(location_type) l)
static symbol_type make_STRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
long double yyalign_me
Strongest alignment constraints.
static symbol_type make_DNS_SERVERS(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_FORWARD_DDNS(YY_COPY(location_type) l)
static symbol_type make_SUB_DHCPDDNS(YY_COPY(location_type) l)
#define YY_MOVE_REF(Type)
variant(YY_RVREF(T) t)
Construct and fill.
syntax_error(const location_type &l, const std::string &m)
void swap(self_type &other)
Swap the content with other, of same type.
Type access provider for token (enum) based symbols.
static symbol_type make_SUB_TSIG_KEY(YY_COPY(location_type) l)
static symbol_type make_SEVERITY(YY_COPY(location_type) l)
token::yytokentype token_type
(External) token type, as returned by yylex.
static symbol_type make_DHCP4(YY_COPY(location_type) l)
static symbol_type make_KEY_NAME(YY_COPY(location_type) l)
const T & as() const
Const accessor to a built T (for printer).
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
static symbol_type make_MAXSIZE(YY_COPY(location_type) l)
static symbol_type make_FLUSH(YY_COPY(location_type) l)
S::const_reverse_iterator const_iterator
T & as()
Accessor to a built T.
variant< S > self_type
Type of *this.
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static symbol_type make_IP_ADDRESS(YY_COPY(location_type) l)
static symbol_type make_TOPLEVEL_JSON(YY_COPY(location_type) l)
Present a slice of the top of a stack.
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
Forward declaration of the ParserContext class.
basic_symbol()
Default constructor.
static symbol_type make_REVERSE_DDNS(YY_COPY(location_type) l)
variant()
Empty construction.
static symbol_type make_TCP(YY_COPY(location_type) l)
static symbol_type make_FLOAT(YY_COPY(double) v, YY_COPY(location_type) l)
static symbol_type make_DHCP6(YY_COPY(location_type) l)
static symbol_type make_ALGORITHM(YY_COPY(location_type) l)
void destroy()
Destroy the stored T.
void move(self_type &other)
Move the content of other to this.
static symbol_type make_CONTROL_AGENT(YY_COPY(location_type) l)
static symbol_type make_LOGGING(YY_COPY(location_type) l)
int symbol_number_type
Symbol type: an internal symbol number.
static symbol_type make_LOGGERS(YY_COPY(location_type) l)
static symbol_type make_JSON(YY_COPY(location_type) l)
const_iterator end() const
static symbol_type make_USER_CONTEXT(YY_COPY(location_type) l)
static symbol_type make_RCURLY_BRACKET(YY_COPY(location_type) l)
const_iterator begin() const
void move(by_type &that)
Steal the symbol type from that.
A collection of classes for housing and parsing the application configuration necessary for the DHCP-...
location_type location
The location.
static symbol_type make_UDP(YY_COPY(location_type) l)
static symbol_type make_SUB_DNS_SERVERS(YY_COPY(location_type) l)
static symbol_type make_NULL_TYPE(YY_COPY(location_type) l)
location location_type
Symbol locations.
static symbol_type make_PORT(YY_COPY(location_type) l)
static symbol_type make_NCR_PROTOCOL(YY_COPY(location_type) l)
static symbol_type make_LCURLY_BRACKET(YY_COPY(location_type) l)
static symbol_type make_SUB_DNS_SERVER(YY_COPY(location_type) l)
static symbol_type make_TSIG_KEYS(YY_COPY(location_type) l)