45 #ifndef YY_D2_PARSER_D2_PARSER_H_INCLUDED
46 # define YY_D2_PARSER_D2_PARSER_H_INCLUDED
48 #line 17 "d2_parser.yy"
53 #include <boost/lexical_cast.hpp>
60 #line 61 "d2_parser.h"
69 #if defined __cplusplus
70 # define YY_CPLUSPLUS __cplusplus
72 # define YY_CPLUSPLUS 199711L
76 #if 201103L <= YY_CPLUSPLUS
77 # define YY_MOVE std::move
78 # define YY_MOVE_OR_COPY move
79 # define YY_MOVE_REF(Type) Type&&
80 # define YY_RVREF(Type) Type&&
81 # define YY_COPY(Type) Type
84 # define YY_MOVE_OR_COPY copy
85 # define YY_MOVE_REF(Type) Type&
86 # define YY_RVREF(Type) const Type&
87 # define YY_COPY(Type) const Type&
91 #if 201103L <= YY_CPLUSPLUS
92 # define YY_NOEXCEPT noexcept
96 # define YY_NOTHROW throw ()
100 #if 201703 <= YY_CPLUSPLUS
101 # define YY_CONSTEXPR constexpr
103 # define YY_CONSTEXPR
105 # include "location.hh"
107 #ifndef D2_PARSER__ASSERT
109 # define D2_PARSER__ASSERT assert
113 #ifndef YY_ATTRIBUTE_PURE
114 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
115 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
117 # define YY_ATTRIBUTE_PURE
121 #ifndef YY_ATTRIBUTE_UNUSED
122 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
123 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
125 # define YY_ATTRIBUTE_UNUSED
130 #if ! defined lint || defined __GNUC__
131 # define YY_USE(E) ((void) (E))
136 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
138 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
139 _Pragma ("GCC diagnostic push") \
140 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
141 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
142 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
143 _Pragma ("GCC diagnostic pop")
145 # define YY_INITIAL_VALUE(Value) Value
147 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
148 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
149 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
151 #ifndef YY_INITIAL_VALUE
152 # define YY_INITIAL_VALUE(Value)
155 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
156 # define YY_IGNORE_USELESS_CAST_BEGIN \
157 _Pragma ("GCC diagnostic push") \
158 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
159 # define YY_IGNORE_USELESS_CAST_END \
160 _Pragma ("GCC diagnostic pop")
162 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
163 # define YY_IGNORE_USELESS_CAST_BEGIN
164 # define YY_IGNORE_USELESS_CAST_END
169 # define YY_CAST(Type, Val) static_cast<Type> (Val)
170 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
172 # define YY_CAST(Type, Val) ((Type) (Val))
173 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
177 # if defined __cplusplus
178 # if 201103L <= __cplusplus
179 # define YY_NULLPTR nullptr
181 # define YY_NULLPTR 0
184 # define YY_NULLPTR ((void*)0)
189 #ifndef D2_PARSER_DEBUG
192 # define D2_PARSER_DEBUG 1
194 # define D2_PARSER_DEBUG 0
197 # define D2_PARSER_DEBUG 1
201 #line 14 "d2_parser.yy"
202 namespace isc {
namespace d2 {
203 #line 204 "d2_parser.h"
212 #ifndef D2_PARSER_STYPE
227 , yytypeid_ (YY_NULLPTR)
231 template <
typename T>
233 : yytypeid_ (&typeid (T))
236 new (yyas_<T> ()) T (
YY_MOVE (t));
239 #if 201103L <= YY_CPLUSPLUS
243 self_type& operator= (
const self_type&) =
delete;
252 # if 201103L <= YY_CPLUSPLUS
253 template <
typename T,
typename... U>
260 yytypeid_ = &
typeid (T);
261 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
264 template <
typename T>
271 yytypeid_ = &
typeid (T);
272 return *
new (yyas_<T> ()) T ();
276 template <
typename T>
282 yytypeid_ = &
typeid (T);
283 return *
new (yyas_<T> ()) T (t);
289 template <
typename T>
293 return emplace<T> ();
298 template <
typename T>
302 return emplace<T> (t);
306 template <
typename T>
317 template <
typename T>
335 template <
typename T>
341 std::swap (as<T> (), that.as<T> ());
347 template <
typename T>
351 # if 201103L <= YY_CPLUSPLUS
352 emplace<T> (std::move (that.
as<T> ()));
360 # if 201103L <= YY_CPLUSPLUS
361 template <
typename T>
364 move (self_type&& that)
366 emplace<T> (std::move (that.as<T> ()));
372 template <
typename T>
376 emplace<T> (that.
as<T> ());
380 template <
typename T>
385 yytypeid_ = YY_NULLPTR;
389 #if YY_CPLUSPLUS < 201103L
393 self_type& operator= (
const self_type&);
397 template <
typename T>
401 void *yyp = yybuffer_.yyraw;
402 return static_cast<T*
> (yyp);
406 template <
typename T>
410 const void *yyp = yybuffer_.yyraw;
411 return static_cast<const T*
> (yyp);
423 char dummy2[
sizeof (bool)];
426 char dummy3[
sizeof (double)];
429 char dummy4[
sizeof (int64_t)];
432 char dummy5[
sizeof (std::string)];
436 enum { size =
sizeof (union_type) };
448 const std::type_info *yytypeid_;
452 typedef D2_PARSER_STYPE semantic_type;
454 typedef location location_type;
461 :
std::runtime_error (m)
466 :
std::runtime_error (s.what ())
467 , location (s.location)
472 location_type location;
480 TOKEN_D2_PARSER_EMPTY = -2,
482 TOKEN_D2_PARSER_error = 256,
483 TOKEN_D2_PARSER_UNDEF = 257,
486 TOKEN_LSQUARE_BRACKET = 260,
487 TOKEN_RSQUARE_BRACKET = 261,
488 TOKEN_LCURLY_BRACKET = 262,
489 TOKEN_RCURLY_BRACKET = 263,
490 TOKEN_NULL_TYPE = 264,
491 TOKEN_DHCPDDNS = 265,
492 TOKEN_IP_ADDRESS = 266,
494 TOKEN_DNS_SERVER_TIMEOUT = 268,
495 TOKEN_NCR_PROTOCOL = 269,
498 TOKEN_NCR_FORMAT = 272,
500 TOKEN_USER_CONTEXT = 274,
502 TOKEN_FORWARD_DDNS = 276,
503 TOKEN_REVERSE_DDNS = 277,
504 TOKEN_DDNS_DOMAINS = 278,
505 TOKEN_KEY_NAME = 279,
506 TOKEN_DNS_SERVERS = 280,
507 TOKEN_HOSTNAME = 281,
508 TOKEN_TSIG_KEYS = 282,
509 TOKEN_ALGORITHM = 283,
510 TOKEN_DIGEST_BITS = 284,
512 TOKEN_CONTROL_SOCKET = 286,
513 TOKEN_SOCKET_TYPE = 287,
514 TOKEN_SOCKET_NAME = 288,
515 TOKEN_HOOKS_LIBRARIES = 289,
517 TOKEN_PARAMETERS = 291,
520 TOKEN_OUTPUT_OPTIONS = 294,
522 TOKEN_DEBUGLEVEL = 296,
523 TOKEN_SEVERITY = 297,
528 TOKEN_TOPLEVEL_JSON = 302,
529 TOKEN_TOPLEVEL_DHCPDDNS = 303,
530 TOKEN_SUB_DHCPDDNS = 304,
531 TOKEN_SUB_TSIG_KEY = 305,
532 TOKEN_SUB_TSIG_KEYS = 306,
533 TOKEN_SUB_DDNS_DOMAIN = 307,
534 TOKEN_SUB_DDNS_DOMAINS = 308,
535 TOKEN_SUB_DNS_SERVER = 309,
536 TOKEN_SUB_DNS_SERVERS = 310,
537 TOKEN_SUB_HOOKS_LIBRARY = 311,
565 S_LSQUARE_BRACKET = 5,
566 S_RSQUARE_BRACKET = 6,
567 S_LCURLY_BRACKET = 7,
568 S_RCURLY_BRACKET = 8,
573 S_DNS_SERVER_TIMEOUT = 13,
591 S_CONTROL_SOCKET = 31,
594 S_HOOKS_LIBRARIES = 34,
599 S_OUTPUT_OPTIONS = 39,
607 S_TOPLEVEL_JSON = 47,
608 S_TOPLEVEL_DHCPDDNS = 48,
611 S_SUB_TSIG_KEYS = 51,
612 S_SUB_DDNS_DOMAIN = 52,
613 S_SUB_DDNS_DOMAINS = 53,
614 S_SUB_DNS_SERVER = 54,
615 S_SUB_DNS_SERVERS = 55,
616 S_SUB_HOOKS_LIBRARY = 56,
639 S_not_empty_map = 79,
643 S_not_empty_list = 83,
644 S_unknown_map_entry = 84,
647 S_global_object = 87,
651 S_dhcpddns_params = 91,
652 S_dhcpddns_param = 92,
656 S_dns_server_timeout = 96,
659 S_ncr_protocol_value = 99,
662 S_user_context = 102,
666 S_forward_ddns = 106,
668 S_reverse_ddns = 108,
670 S_ddns_mgr_params = 110,
671 S_not_empty_ddns_mgr_params = 111,
672 S_ddns_mgr_param = 112,
673 S_ddns_domains = 113,
675 S_sub_ddns_domains = 115,
677 S_ddns_domain_list = 117,
678 S_not_empty_ddns_domain_list = 118,
681 S_sub_ddns_domain = 121,
683 S_ddns_domain_params = 123,
684 S_ddns_domain_param = 124,
685 S_ddns_domain_name = 125,
687 S_ddns_domain_key_name = 127,
691 S_sub_dns_servers = 131,
693 S_dns_server_list = 133,
696 S_sub_dns_server = 136,
698 S_dns_server_params = 138,
699 S_dns_server_param = 139,
700 S_dns_server_hostname = 140,
702 S_dns_server_ip_address = 142,
704 S_dns_server_port = 144,
707 S_sub_tsig_keys = 147,
709 S_tsig_keys_list = 149,
710 S_not_empty_tsig_keys_list = 150,
713 S_sub_tsig_key = 153,
715 S_tsig_key_params = 155,
716 S_tsig_key_param = 156,
717 S_tsig_key_name = 157,
719 S_tsig_key_algorithm = 159,
721 S_tsig_key_digest_bits = 161,
722 S_tsig_key_secret = 162,
724 S_control_socket = 164,
726 S_control_socket_params = 166,
727 S_control_socket_param = 167,
728 S_control_socket_type = 168,
730 S_control_socket_name = 170,
732 S_hooks_libraries = 172,
734 S_hooks_libraries_list = 174,
735 S_not_empty_hooks_libraries_list = 175,
736 S_hooks_library = 176,
738 S_sub_hooks_library = 178,
740 S_hooks_params = 180,
748 S_loggers_entries = 188,
749 S_logger_entry = 189,
751 S_logger_params = 191,
752 S_logger_param = 192,
758 S_output_options_list = 198,
760 S_output_options_list_content = 200,
761 S_output_entry = 201,
763 S_output_params_list = 203,
764 S_output_params = 204,
779 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
787 template <
typename Base>
799 #if 201103L <= YY_CPLUSPLUS
802 : Base (
std::move (that))
804 , location (
std::move (that.location))
806 switch (this->kind ())
808 case symbol_kind::S_value:
809 case symbol_kind::S_map_value:
810 case symbol_kind::S_ncr_protocol_value:
811 value.move<
ElementPtr > (std::move (that.value));
814 case symbol_kind::S_BOOLEAN:
815 value.move<
bool > (std::move (that.value));
818 case symbol_kind::S_FLOAT:
819 value.move<
double > (std::move (that.value));
822 case symbol_kind::S_INTEGER:
823 value.move< int64_t > (std::move (that.value));
826 case symbol_kind::S_STRING:
827 value.move< std::string > (std::move (that.value));
838 basic_symbol (
const basic_symbol& that);
841 #if 201103L <= YY_CPLUSPLUS
842 basic_symbol (
typename Base::kind_type t, location_type&& l)
844 , location (
std::move (l))
853 #if 201103L <= YY_CPLUSPLUS
856 , value (
std::move (v))
857 , location (
std::move (l))
867 #if 201103L <= YY_CPLUSPLUS
868 basic_symbol (
typename Base::kind_type t,
bool&& v, location_type&& l)
870 , value (
std::move (v))
871 , location (
std::move (l))
874 basic_symbol (
typename Base::kind_type t,
const bool& v,
const location_type& l)
881 #if 201103L <= YY_CPLUSPLUS
882 basic_symbol (
typename Base::kind_type t,
double&& v, location_type&& l)
884 , value (
std::move (v))
885 , location (
std::move (l))
888 basic_symbol (
typename Base::kind_type t,
const double& v,
const location_type& l)
895 #if 201103L <= YY_CPLUSPLUS
896 basic_symbol (
typename Base::kind_type t, int64_t&& v, location_type&& l)
898 , value (
std::move (v))
899 , location (
std::move (l))
902 basic_symbol (
typename Base::kind_type t,
const int64_t& v,
const location_type& l)
909 #if 201103L <= YY_CPLUSPLUS
910 basic_symbol (
typename Base::kind_type t, std::string&& v, location_type&& l)
912 , value (
std::move (v))
913 , location (
std::move (l))
916 basic_symbol (
typename Base::kind_type t,
const std::string& v,
const location_type& l)
933 symbol_kind_type yykind = this->kind ();
945 case symbol_kind::S_value:
946 case symbol_kind::S_map_value:
947 case symbol_kind::S_ncr_protocol_value:
948 value.template destroy< ElementPtr > ();
951 case symbol_kind::S_BOOLEAN:
952 value.template destroy< bool > ();
955 case symbol_kind::S_FLOAT:
956 value.template destroy< double > ();
959 case symbol_kind::S_INTEGER:
960 value.template destroy< int64_t > ();
963 case symbol_kind::S_STRING:
964 value.template destroy< std::string > ();
993 location_type location;
996 #if YY_CPLUSPLUS < 201103L
1008 #if 201103L <= YY_CPLUSPLUS
1033 symbol_kind_type type_get () const YY_NOEXCEPT;
1037 symbol_kind_type kind_;
1053 #if 201103L <= YY_CPLUSPLUS
1055 : super_type(token_type (tok),
std::move (l))
1058 : super_type(token_type (tok), l)
1062 || (token::TOKEN_D2_PARSER_error <= tok && tok <= token::TOKEN_SUB_HOOKS_LIBRARY));
1064 #if 201103L <= YY_CPLUSPLUS
1066 : super_type(token_type (tok),
std::move (v),
std::move (l))
1069 : super_type(token_type (tok), v, l)
1074 #if 201103L <= YY_CPLUSPLUS
1076 : super_type(token_type (tok),
std::move (v),
std::move (l))
1079 : super_type(token_type (tok), v, l)
1084 #if 201103L <= YY_CPLUSPLUS
1086 : super_type(token_type (tok),
std::move (v),
std::move (l))
1089 : super_type(token_type (tok), v, l)
1094 #if 201103L <= YY_CPLUSPLUS
1095 symbol_type (
int tok, std::string v, location_type l)
1096 : super_type(token_type (tok),
std::move (v),
std::move (l))
1099 : super_type(token_type (tok), v, l)
1110 #if 201103L <= YY_CPLUSPLUS
1123 virtual int parse ();
1129 void set_debug_stream (
std::ostream &);
1136 void set_debug_level (debug_level_type l);
1142 virtual void error (
const location_type& loc,
const std::string& msg);
1149 static std::string symbol_name (symbol_kind_type yysymbol);
1152 #if 201103L <= YY_CPLUSPLUS
1155 make_END (location_type l)
1157 return symbol_type (token::TOKEN_END, std::move (l));
1167 #if 201103L <= YY_CPLUSPLUS
1170 make_D2_PARSER_error (location_type l)
1172 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1179 return symbol_type (token::TOKEN_D2_PARSER_error, l);
1182 #if 201103L <= YY_CPLUSPLUS
1185 make_D2_PARSER_UNDEF (location_type l)
1187 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1194 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, l);
1197 #if 201103L <= YY_CPLUSPLUS
1200 make_COMMA (location_type l)
1202 return symbol_type (token::TOKEN_COMMA, std::move (l));
1212 #if 201103L <= YY_CPLUSPLUS
1215 make_COLON (location_type l)
1217 return symbol_type (token::TOKEN_COLON, std::move (l));
1227 #if 201103L <= YY_CPLUSPLUS
1230 make_LSQUARE_BRACKET (location_type l)
1232 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1239 return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
1242 #if 201103L <= YY_CPLUSPLUS
1245 make_RSQUARE_BRACKET (location_type l)
1247 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1254 return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
1257 #if 201103L <= YY_CPLUSPLUS
1260 make_LCURLY_BRACKET (location_type l)
1262 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1269 return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
1272 #if 201103L <= YY_CPLUSPLUS
1275 make_RCURLY_BRACKET (location_type l)
1277 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1284 return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
1287 #if 201103L <= YY_CPLUSPLUS
1290 make_NULL_TYPE (location_type l)
1292 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1302 #if 201103L <= YY_CPLUSPLUS
1305 make_DHCPDDNS (location_type l)
1307 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1317 #if 201103L <= YY_CPLUSPLUS
1320 make_IP_ADDRESS (location_type l)
1322 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1332 #if 201103L <= YY_CPLUSPLUS
1335 make_PORT (location_type l)
1337 return symbol_type (token::TOKEN_PORT, std::move (l));
1347 #if 201103L <= YY_CPLUSPLUS
1350 make_DNS_SERVER_TIMEOUT (location_type l)
1352 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1359 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l);
1362 #if 201103L <= YY_CPLUSPLUS
1365 make_NCR_PROTOCOL (location_type l)
1367 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1374 return symbol_type (token::TOKEN_NCR_PROTOCOL, l);
1377 #if 201103L <= YY_CPLUSPLUS
1380 make_UDP (location_type l)
1382 return symbol_type (token::TOKEN_UDP, std::move (l));
1392 #if 201103L <= YY_CPLUSPLUS
1395 make_TCP (location_type l)
1397 return symbol_type (token::TOKEN_TCP, std::move (l));
1407 #if 201103L <= YY_CPLUSPLUS
1410 make_NCR_FORMAT (location_type l)
1412 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1422 #if 201103L <= YY_CPLUSPLUS
1425 make_JSON (location_type l)
1427 return symbol_type (token::TOKEN_JSON, std::move (l));
1437 #if 201103L <= YY_CPLUSPLUS
1440 make_USER_CONTEXT (location_type l)
1442 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1449 return symbol_type (token::TOKEN_USER_CONTEXT, l);
1452 #if 201103L <= YY_CPLUSPLUS
1455 make_COMMENT (location_type l)
1457 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1467 #if 201103L <= YY_CPLUSPLUS
1470 make_FORWARD_DDNS (location_type l)
1472 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1479 return symbol_type (token::TOKEN_FORWARD_DDNS, l);
1482 #if 201103L <= YY_CPLUSPLUS
1485 make_REVERSE_DDNS (location_type l)
1487 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1494 return symbol_type (token::TOKEN_REVERSE_DDNS, l);
1497 #if 201103L <= YY_CPLUSPLUS
1500 make_DDNS_DOMAINS (location_type l)
1502 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1509 return symbol_type (token::TOKEN_DDNS_DOMAINS, l);
1512 #if 201103L <= YY_CPLUSPLUS
1515 make_KEY_NAME (location_type l)
1517 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1527 #if 201103L <= YY_CPLUSPLUS
1530 make_DNS_SERVERS (location_type l)
1532 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1542 #if 201103L <= YY_CPLUSPLUS
1545 make_HOSTNAME (location_type l)
1547 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1557 #if 201103L <= YY_CPLUSPLUS
1560 make_TSIG_KEYS (location_type l)
1562 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1572 #if 201103L <= YY_CPLUSPLUS
1575 make_ALGORITHM (location_type l)
1577 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1587 #if 201103L <= YY_CPLUSPLUS
1590 make_DIGEST_BITS (location_type l)
1592 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1602 #if 201103L <= YY_CPLUSPLUS
1605 make_SECRET (location_type l)
1607 return symbol_type (token::TOKEN_SECRET, std::move (l));
1617 #if 201103L <= YY_CPLUSPLUS
1620 make_CONTROL_SOCKET (location_type l)
1622 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1629 return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
1632 #if 201103L <= YY_CPLUSPLUS
1635 make_SOCKET_TYPE (location_type l)
1637 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1647 #if 201103L <= YY_CPLUSPLUS
1650 make_SOCKET_NAME (location_type l)
1652 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1662 #if 201103L <= YY_CPLUSPLUS
1665 make_HOOKS_LIBRARIES (location_type l)
1667 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1674 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
1677 #if 201103L <= YY_CPLUSPLUS
1680 make_LIBRARY (location_type l)
1682 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1692 #if 201103L <= YY_CPLUSPLUS
1695 make_PARAMETERS (location_type l)
1697 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1707 #if 201103L <= YY_CPLUSPLUS
1710 make_LOGGERS (location_type l)
1712 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1722 #if 201103L <= YY_CPLUSPLUS
1725 make_NAME (location_type l)
1727 return symbol_type (token::TOKEN_NAME, std::move (l));
1737 #if 201103L <= YY_CPLUSPLUS
1740 make_OUTPUT_OPTIONS (location_type l)
1742 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1749 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
1752 #if 201103L <= YY_CPLUSPLUS
1755 make_OUTPUT (location_type l)
1757 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1767 #if 201103L <= YY_CPLUSPLUS
1770 make_DEBUGLEVEL (location_type l)
1772 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1782 #if 201103L <= YY_CPLUSPLUS
1785 make_SEVERITY (location_type l)
1787 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1797 #if 201103L <= YY_CPLUSPLUS
1800 make_FLUSH (location_type l)
1802 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1812 #if 201103L <= YY_CPLUSPLUS
1815 make_MAXSIZE (location_type l)
1817 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1827 #if 201103L <= YY_CPLUSPLUS
1830 make_MAXVER (location_type l)
1832 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1842 #if 201103L <= YY_CPLUSPLUS
1845 make_PATTERN (location_type l)
1847 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1857 #if 201103L <= YY_CPLUSPLUS
1860 make_TOPLEVEL_JSON (location_type l)
1862 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
1869 return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
1872 #if 201103L <= YY_CPLUSPLUS
1875 make_TOPLEVEL_DHCPDDNS (location_type l)
1877 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
1884 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l);
1887 #if 201103L <= YY_CPLUSPLUS
1890 make_SUB_DHCPDDNS (location_type l)
1892 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
1899 return symbol_type (token::TOKEN_SUB_DHCPDDNS, l);
1902 #if 201103L <= YY_CPLUSPLUS
1905 make_SUB_TSIG_KEY (location_type l)
1907 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
1914 return symbol_type (token::TOKEN_SUB_TSIG_KEY, l);
1917 #if 201103L <= YY_CPLUSPLUS
1920 make_SUB_TSIG_KEYS (location_type l)
1922 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
1929 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l);
1932 #if 201103L <= YY_CPLUSPLUS
1935 make_SUB_DDNS_DOMAIN (location_type l)
1937 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
1944 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l);
1947 #if 201103L <= YY_CPLUSPLUS
1950 make_SUB_DDNS_DOMAINS (location_type l)
1952 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
1959 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l);
1962 #if 201103L <= YY_CPLUSPLUS
1965 make_SUB_DNS_SERVER (location_type l)
1967 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
1974 return symbol_type (token::TOKEN_SUB_DNS_SERVER, l);
1977 #if 201103L <= YY_CPLUSPLUS
1980 make_SUB_DNS_SERVERS (location_type l)
1982 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
1989 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l);
1992 #if 201103L <= YY_CPLUSPLUS
1995 make_SUB_HOOKS_LIBRARY (location_type l)
1997 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2004 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l);
2007 #if 201103L <= YY_CPLUSPLUS
2010 make_STRING (std::string v, location_type l)
2012 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2022 #if 201103L <= YY_CPLUSPLUS
2025 make_INTEGER (int64_t v, location_type l)
2027 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2037 #if 201103L <= YY_CPLUSPLUS
2040 make_FLOAT (
double v, location_type l)
2042 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2052 #if 201103L <= YY_CPLUSPLUS
2055 make_BOOLEAN (
bool v, location_type l)
2057 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2080 int expected_tokens (symbol_kind_type yyarg[],
int yyargn)
const;
2088 #if YY_CPLUSPLUS < 201103L
2097 typedef short state_type;
2100 int yy_syntax_error_arguments_ (
const context& yyctx,
2101 symbol_kind_type yyarg[],
int yyargn)
const;
2105 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2109 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2113 static bool yy_pact_value_is_default_ (
int yyvalue);
2117 static bool yy_table_value_is_error_ (
int yyvalue);
2119 static const short yypact_ninf_;
2120 static const signed char yytable_ninf_;
2125 static symbol_kind_type yytranslate_ (
int t);
2128 static std::string yytnamerr_ (
const char *yystr);
2131 static const char*
const yytname_[];
2137 static const short yypact_[];
2142 static const unsigned char yydefact_[];
2145 static const short yypgoto_[];
2148 static const short yydefgoto_[];
2153 static const short yytable_[];
2155 static const short yycheck_[];
2159 static const unsigned char yystos_[];
2162 static const unsigned char yyr1_[];
2165 static const signed char yyr2_[];
2170 static const short yyrline_[];
2172 virtual void yy_reduce_print_ (
int r)
const;
2174 virtual void yy_stack_print_ ()
const;
2179 std::ostream* yycdebug_;
2184 template <
typename Base>
2185 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
2192 template <
typename Base>
2193 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
2203 typedef state_type kind_type;
2209 by_state (const by_state& that) YY_NOEXCEPT;
2212 void clear () YY_NOEXCEPT;
2215 void move (by_state& that);
2219 symbol_kind_type kind () const YY_NOEXCEPT;
2223 enum { empty_state = 0 };
2231 struct stack_symbol_type : basic_symbol<by_state>
2234 typedef basic_symbol<by_state> super_type;
2236 stack_symbol_type ();
2238 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2240 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
2241 #if YY_CPLUSPLUS < 201103L
2242 stack_symbol_type& operator= (stack_symbol_type& that);
2248 stack_symbol_type& operator= (
const stack_symbol_type& that);
2253 template <
typename T,
typename S = std::vector<T> >
2258 typedef typename S::iterator iterator;
2259 typedef typename S::const_iterator const_iterator;
2260 typedef typename S::size_type size_type;
2261 typedef typename std::ptrdiff_t index_type;
2263 stack (size_type n = 200)
2267 #if 201103L <= YY_CPLUSPLUS
2268 stack (
const stack&) =
delete;
2271 stack& operator= (
const stack&) =
delete;
2278 operator[] (index_type i)
const
2280 return seq_[size_type (size () - 1 - i)];
2287 operator[] (index_type i)
2289 return seq_[size_type (size () - 1 - i)];
2298 seq_.push_back (T ());
2299 operator[] (0).move (t);
2321 return index_type (seq_.size ());
2328 return seq_.begin ();
2342 slice (
const stack& stack, index_type range)
2348 operator[] (index_type i)
const
2350 return stack_[range_ - i];
2354 const stack& stack_;
2359 #if YY_CPLUSPLUS < 201103L
2360 stack (
const stack&);
2363 stack& operator= (
const stack&);
2371 typedef stack<stack_symbol_type> stack_type;
2374 stack_type yystack_;
2381 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2389 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
2392 void yypop_ (
int n = 1);
2410 D2Parser::yytranslate_ (
int t)
2418 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2443 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2444 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2445 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2446 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2447 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2448 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2449 55, 56, 57, 58, 59, 60
2452 const int code_max = 315;
2455 return symbol_kind::S_YYEOF;
2456 else if (t <= code_max)
2457 return YY_CAST (symbol_kind_type, translate_table[t]);
2459 return symbol_kind::S_YYUNDEF;
2463 template <
typename Base>
2467 , location (that.location)
2469 switch (this->kind ())
2501 template <
typename Base>
2505 return this->kind ();
2508 template <
typename Base>
2515 template <
typename Base>
2519 super_type::move (s);
2520 switch (this->kind ())
2557 #if 201103L <= YY_CPLUSPLUS
2560 : kind_ (that.kind_)
2568 : kind_ (that.kind_)
2573 : kind_ (yytranslate_ (t))
2602 return this->kind ();
2605 #line 14 "d2_parser.yy"
2607 #line 2608 "d2_parser.h"
2612 #endif // !YY_D2_PARSER_D2_PARSER_H_INCLUDED
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Syntax errors thrown from user actions.
static symbol_type make_PATTERN(const location_type &l)
static symbol_type make_DNS_SERVERS(const location_type &l)
void move(by_kind &that)
Steal the symbol kind from that.
symbol_type()
Empty symbol.
const location_type & location() const YY_NOEXCEPT
static symbol_type make_SOCKET_TYPE(const location_type &l)
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
Evaluation context, an interface to the expression evaluation.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
syntax_error(const syntax_error &s)
static symbol_type make_PORT(const location_type &l)
semantic_type self_type
Type of *this.
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
T & build()
Instantiate an empty T in here.
T & as() YY_NOEXCEPT
Accessor to a built T.
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
#define YY_ATTRIBUTE_PURE
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
static symbol_type make_LCURLY_BRACKET(const location_type &l)
static symbol_type make_COLON(const location_type &l)
int debug_level_type
Type for debugging levels.
semantic_type value
The semantic value.
static symbol_type make_DHCPDDNS(const location_type &l)
static symbol_type make_NAME(const location_type &l)
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
static symbol_type make_DIGEST_BITS(const location_type &l)
boost::shared_ptr< Element > ElementPtr
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
"External" symbols: returned by the scanner.
static symbol_type make_SECRET(const location_type &l)
Base super_type
Alias to Base.
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
static symbol_type make_NCR_PROTOCOL(const location_type &l)
void move(basic_symbol &s)
Destructive move, s is emptied into this.
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
by_kind()
Default constructor.
Type access provider for token (enum) based symbols.
static symbol_type make_USER_CONTEXT(const location_type &l)
semantic_type() YY_NOEXCEPT
Empty construction.
static symbol_type make_FORWARD_DDNS(const location_type &l)
~basic_symbol()
Destroy the symbol.
static symbol_type make_CONTROL_SOCKET(const location_type &l)
static symbol_type make_ALGORITHM(const location_type &l)
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
#define YY_MOVE_REF(Type)
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
void destroy()
Destroy the stored T.
syntax_error(const location_type &l, const std::string &m)
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
static symbol_type make_TCP(const location_type &l)
basic_symbol< by_kind > super_type
Superclass.
static symbol_type make_D2_PARSER_error(const location_type &l)
bool empty() const YY_NOEXCEPT
Whether empty.
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
static symbol_type make_REVERSE_DDNS(const location_type &l)
static symbol_type make_LIBRARY(const location_type &l)
static symbol_type make_END(const location_type &l)
static symbol_type make_IP_ADDRESS(const location_type &l)
void move(self_type &that)
Move the content of that to this.
void clear() YY_NOEXCEPT
Record that this symbol is empty.
static symbol_type make_DDNS_DOMAINS(const location_type &l)
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
T & emplace(const T &t)
Instantiate a T in here from t.
Defines the logger used by the top-level component of kea-dhcp-ddns.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
static symbol_type make_COMMA(const location_type &l)
T & build(const T &t)
Instantiate a T in here from t.
const symbol_type & lookahead() const YY_NOEXCEPT
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
A buffer to store and retrieve objects.
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
static symbol_type make_NCR_FORMAT(const location_type &l)
T & emplace()
Instantiate an empty T in here.
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
symbol_kind_type kind_
The symbol kind.
Forward declaration of the ParserContext class.
basic_symbol()
Default constructor.
#define YY_CAST(Type, Val)
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
static symbol_type make_NULL_TYPE(const location_type &l)
token_kind_type kind_type
The symbol kind as needed by the constructor.
static symbol_type make_LOGGERS(const location_type &l)
static symbol_type make_FLUSH(const location_type &l)
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
symbol_kind_type token() const YY_NOEXCEPT
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
void copy(const self_type &that)
Copy the content of that to this.
token::yytokentype token_kind_type
Token kind, as returned by yylex.
static symbol_type make_UDP(const location_type &l)
static symbol_type make_PARAMETERS(const location_type &l)
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
static symbol_type make_DEBUGLEVEL(const location_type &l)
static symbol_type make_JSON(const location_type &l)
static symbol_type make_FLOAT(const double &v, const location_type &l)
static symbol_type make_HOSTNAME(const location_type &l)
Present a slice of the top of a stack.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
static symbol_type make_COMMENT(const location_type &l)
static symbol_type make_TSIG_KEYS(const location_type &l)
static symbol_type make_OUTPUT(const location_type &l)
~semantic_type() YY_NOEXCEPT
Destruction, allowed only if empty.
static symbol_type make_MAXSIZE(const location_type &l)
static std::string symbol_name(symbol_kind_type yysymbol)
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
A collection of classes for housing and parsing the application configuration necessary for the DHCP-...
location_type location
The location.
slice(const stack &stack, index_type range)
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
static symbol_type make_SEVERITY(const location_type &l)
#define D2_PARSER__ASSERT
static symbol_type make_SOCKET_NAME(const location_type &l)
long double yyalign_me
Strongest alignment constraints.
static symbol_type make_MAXVER(const location_type &l)
static symbol_type make_KEY_NAME(const location_type &l)
semantic_type(YY_RVREF(T) t)
Construct and fill.
static symbol_type make_STRING(const std::string &v, const location_type &l)
static symbol_type make_D2_PARSER_UNDEF(const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)