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)) 137 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ 138 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407 139 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 140 _Pragma ("GCC diagnostic push") \ 141 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") 143 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 144 _Pragma ("GCC diagnostic push") \ 145 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ 146 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 148 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 149 _Pragma ("GCC diagnostic pop") 151 # define YY_INITIAL_VALUE(Value) Value 153 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 154 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 155 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 157 #ifndef YY_INITIAL_VALUE 158 # define YY_INITIAL_VALUE(Value) 161 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ 162 # define YY_IGNORE_USELESS_CAST_BEGIN \ 163 _Pragma ("GCC diagnostic push") \ 164 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") 165 # define YY_IGNORE_USELESS_CAST_END \ 166 _Pragma ("GCC diagnostic pop") 168 #ifndef YY_IGNORE_USELESS_CAST_BEGIN 169 # define YY_IGNORE_USELESS_CAST_BEGIN 170 # define YY_IGNORE_USELESS_CAST_END 175 # define YY_CAST(Type, Val) static_cast<Type> (Val) 176 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) 178 # define YY_CAST(Type, Val) ((Type) (Val)) 179 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) 183 # if defined __cplusplus 184 # if 201103L <= __cplusplus 185 # define YY_NULLPTR nullptr 187 # define YY_NULLPTR 0 190 # define YY_NULLPTR ((void*)0) 195 #ifndef D2_PARSER_DEBUG 198 # define D2_PARSER_DEBUG 1 200 # define D2_PARSER_DEBUG 0 203 # define D2_PARSER_DEBUG 1 207 #line 14 "d2_parser.yy" 208 namespace isc {
namespace d2 {
209 #line 210 "d2_parser.h" 218 #ifdef D2_PARSER_STYPE 220 # pragma GCC message "bison: do not #define D2_PARSER_STYPE in C++, use %define api.value.type" 238 , yytypeid_ (YY_NULLPTR)
242 template <
typename T>
244 : yytypeid_ (&typeid (T))
247 new (yyas_<T> ()) T (
YY_MOVE (t));
250 #if 201103L <= YY_CPLUSPLUS 251 value_type (
const self_type&) =
delete;
254 self_type& operator= (
const self_type&) =
delete;
263 # if 201103L <= YY_CPLUSPLUS 264 template <
typename T,
typename... U>
271 yytypeid_ = &
typeid (T);
272 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
275 template <
typename T>
282 yytypeid_ = &
typeid (T);
283 return *
new (yyas_<T> ()) T ();
287 template <
typename T>
293 yytypeid_ = &
typeid (T);
294 return *
new (yyas_<T> ()) T (t);
300 template <
typename T>
304 return emplace<T> ();
309 template <
typename T>
313 return emplace<T> (t);
317 template <
typename T>
328 template <
typename T>
346 template <
typename T>
352 std::swap (as<T> (), that.as<T> ());
358 template <
typename T>
362 # if 201103L <= YY_CPLUSPLUS 363 emplace<T> (std::move (that.
as<T> ()));
371 # if 201103L <= YY_CPLUSPLUS 372 template <
typename T>
375 move (self_type&& that)
377 emplace<T> (std::move (that.as<T> ()));
383 template <
typename T>
387 emplace<T> (that.
as<T> ());
391 template <
typename T>
396 yytypeid_ = YY_NULLPTR;
400 #if YY_CPLUSPLUS < 201103L 401 value_type (
const self_type&);
404 self_type& operator= (
const self_type&);
408 template <
typename T>
413 return static_cast<T*
> (yyp);
417 template <
typename T>
421 const void *yyp = yyraw_;
422 return static_cast<const T*
> (yyp);
434 char dummy2[
sizeof (bool)];
437 char dummy3[
sizeof (double)];
440 char dummy4[
sizeof (int64_t)];
443 char dummy5[
sizeof (std::string)];
447 enum { size =
sizeof (union_type) };
459 const std::type_info *yytypeid_;
473 :
std::runtime_error (m)
478 :
std::runtime_error (s.what ())
479 , location (s.location)
492 TOKEN_D2_PARSER_EMPTY = -2,
494 TOKEN_D2_PARSER_error = 256,
495 TOKEN_D2_PARSER_UNDEF = 257,
498 TOKEN_LSQUARE_BRACKET = 260,
499 TOKEN_RSQUARE_BRACKET = 261,
500 TOKEN_LCURLY_BRACKET = 262,
501 TOKEN_RCURLY_BRACKET = 263,
502 TOKEN_NULL_TYPE = 264,
503 TOKEN_DHCPDDNS = 265,
504 TOKEN_IP_ADDRESS = 266,
506 TOKEN_DNS_SERVER_TIMEOUT = 268,
507 TOKEN_NCR_PROTOCOL = 269,
510 TOKEN_NCR_FORMAT = 272,
512 TOKEN_USER_CONTEXT = 274,
514 TOKEN_FORWARD_DDNS = 276,
515 TOKEN_REVERSE_DDNS = 277,
516 TOKEN_DDNS_DOMAINS = 278,
517 TOKEN_KEY_NAME = 279,
518 TOKEN_DNS_SERVERS = 280,
519 TOKEN_HOSTNAME = 281,
520 TOKEN_TSIG_KEYS = 282,
521 TOKEN_ALGORITHM = 283,
522 TOKEN_DIGEST_BITS = 284,
524 TOKEN_CONTROL_SOCKET = 286,
525 TOKEN_SOCKET_TYPE = 287,
526 TOKEN_SOCKET_NAME = 288,
527 TOKEN_HOOKS_LIBRARIES = 289,
529 TOKEN_PARAMETERS = 291,
532 TOKEN_OUTPUT_OPTIONS = 294,
534 TOKEN_DEBUGLEVEL = 296,
535 TOKEN_SEVERITY = 297,
540 TOKEN_TOPLEVEL_JSON = 302,
541 TOKEN_TOPLEVEL_DHCPDDNS = 303,
542 TOKEN_SUB_DHCPDDNS = 304,
543 TOKEN_SUB_TSIG_KEY = 305,
544 TOKEN_SUB_TSIG_KEYS = 306,
545 TOKEN_SUB_DDNS_DOMAIN = 307,
546 TOKEN_SUB_DDNS_DOMAINS = 308,
547 TOKEN_SUB_DNS_SERVER = 309,
548 TOKEN_SUB_DNS_SERVERS = 310,
549 TOKEN_SUB_HOOKS_LIBRARY = 311,
577 S_LSQUARE_BRACKET = 5,
578 S_RSQUARE_BRACKET = 6,
579 S_LCURLY_BRACKET = 7,
580 S_RCURLY_BRACKET = 8,
585 S_DNS_SERVER_TIMEOUT = 13,
603 S_CONTROL_SOCKET = 31,
606 S_HOOKS_LIBRARIES = 34,
611 S_OUTPUT_OPTIONS = 39,
619 S_TOPLEVEL_JSON = 47,
620 S_TOPLEVEL_DHCPDDNS = 48,
623 S_SUB_TSIG_KEYS = 51,
624 S_SUB_DDNS_DOMAIN = 52,
625 S_SUB_DDNS_DOMAINS = 53,
626 S_SUB_DNS_SERVER = 54,
627 S_SUB_DNS_SERVERS = 55,
628 S_SUB_HOOKS_LIBRARY = 56,
651 S_not_empty_map = 79,
655 S_not_empty_list = 83,
656 S_unknown_map_entry = 84,
659 S_global_object = 87,
661 S_global_object_comma = 89,
664 S_dhcpddns_params = 92,
665 S_dhcpddns_param = 93,
669 S_dns_server_timeout = 97,
672 S_ncr_protocol_value = 100,
675 S_user_context = 103,
679 S_forward_ddns = 107,
681 S_reverse_ddns = 109,
683 S_ddns_mgr_params = 111,
684 S_not_empty_ddns_mgr_params = 112,
685 S_ddns_mgr_param = 113,
686 S_ddns_domains = 114,
688 S_sub_ddns_domains = 116,
690 S_ddns_domain_list = 118,
691 S_not_empty_ddns_domain_list = 119,
694 S_sub_ddns_domain = 122,
696 S_ddns_domain_params = 124,
697 S_ddns_domain_param = 125,
698 S_ddns_domain_name = 126,
700 S_ddns_key_name = 128,
704 S_sub_dns_servers = 132,
706 S_dns_server_list = 134,
709 S_sub_dns_server = 137,
711 S_dns_server_params = 139,
712 S_dns_server_param = 140,
713 S_dns_server_hostname = 141,
715 S_dns_server_ip_address = 143,
717 S_dns_server_port = 145,
720 S_sub_tsig_keys = 148,
722 S_tsig_keys_list = 150,
723 S_not_empty_tsig_keys_list = 151,
726 S_sub_tsig_key = 154,
728 S_tsig_key_params = 156,
729 S_tsig_key_param = 157,
730 S_tsig_key_name = 158,
732 S_tsig_key_algorithm = 160,
734 S_tsig_key_digest_bits = 162,
735 S_tsig_key_secret = 163,
737 S_control_socket = 165,
739 S_control_socket_params = 167,
740 S_control_socket_param = 168,
741 S_control_socket_type = 169,
743 S_control_socket_name = 171,
745 S_hooks_libraries = 173,
747 S_hooks_libraries_list = 175,
748 S_not_empty_hooks_libraries_list = 176,
749 S_hooks_library = 177,
751 S_sub_hooks_library = 179,
753 S_hooks_params = 181,
761 S_loggers_entries = 189,
762 S_logger_entry = 190,
764 S_logger_params = 192,
765 S_logger_param = 193,
771 S_output_options_list = 199,
773 S_output_options_list_content = 201,
774 S_output_entry = 202,
776 S_output_params_list = 204,
777 S_output_params = 205,
792 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
800 template <
typename Base>
812 #if 201103L <= YY_CPLUSPLUS 815 : Base (std::move (that))
817 , location (std::move (that.location))
819 switch (this->kind ())
821 case symbol_kind::S_value:
822 case symbol_kind::S_map_value:
823 case symbol_kind::S_ncr_protocol_value:
824 value.move<
ElementPtr > (std::move (that.value));
827 case symbol_kind::S_BOOLEAN:
828 value.move<
bool > (std::move (that.value));
831 case symbol_kind::S_FLOAT:
832 value.move<
double > (std::move (that.value));
835 case symbol_kind::S_INTEGER:
836 value.move< int64_t > (std::move (that.value));
839 case symbol_kind::S_STRING:
840 value.move< std::string > (std::move (that.value));
854 #if 201103L <= YY_CPLUSPLUS 855 basic_symbol (
typename Base::kind_type t, location_type&& l)
857 , location (std::move (l))
866 #if 201103L <= YY_CPLUSPLUS 869 , value (std::move (v))
870 , location (std::move (l))
880 #if 201103L <= YY_CPLUSPLUS 881 basic_symbol (
typename Base::kind_type t,
bool&& v, location_type&& l)
883 , value (std::move (v))
884 , location (std::move (l))
887 basic_symbol (
typename Base::kind_type t,
const bool& v,
const location_type& l)
894 #if 201103L <= YY_CPLUSPLUS 895 basic_symbol (
typename Base::kind_type t,
double&& v, location_type&& l)
897 , value (std::move (v))
898 , location (std::move (l))
901 basic_symbol (
typename Base::kind_type t,
const double& v,
const location_type& l)
908 #if 201103L <= YY_CPLUSPLUS 909 basic_symbol (
typename Base::kind_type t, int64_t&& v, location_type&& l)
911 , value (std::move (v))
912 , location (std::move (l))
915 basic_symbol (
typename Base::kind_type t,
const int64_t& v,
const location_type& l)
922 #if 201103L <= YY_CPLUSPLUS 923 basic_symbol (
typename Base::kind_type t, std::string&& v, location_type&& l)
925 , value (std::move (v))
926 , location (std::move (l))
929 basic_symbol (
typename Base::kind_type t,
const std::string& v,
const location_type& l)
948 symbol_kind_type yykind = this->kind ();
960 case symbol_kind::S_value:
961 case symbol_kind::S_map_value:
962 case symbol_kind::S_ncr_protocol_value:
963 value.template destroy< ElementPtr > ();
966 case symbol_kind::S_BOOLEAN:
967 value.template destroy< bool > ();
970 case symbol_kind::S_FLOAT:
971 value.template destroy< double > ();
974 case symbol_kind::S_INTEGER:
975 value.template destroy< int64_t > ();
978 case symbol_kind::S_STRING:
979 value.template destroy< std::string > ();
1011 #if YY_CPLUSPLUS < 201103L 1026 #if 201103L <= YY_CPLUSPLUS 1040 void clear () YY_NOEXCEPT;
1047 symbol_kind_type kind () const YY_NOEXCEPT;
1050 symbol_kind_type type_get () const YY_NOEXCEPT;
1054 symbol_kind_type kind_;
1070 #if 201103L <= YY_CPLUSPLUS 1072 : super_type (token_kind_type (tok), std::move (l))
1075 : super_type (token_kind_type (tok), l)
1078 #if !defined _MSC_VER || defined __clang__ 1080 || (token::TOKEN_D2_PARSER_error <= tok && tok <= token::TOKEN_SUB_HOOKS_LIBRARY));
1083 #if 201103L <= YY_CPLUSPLUS 1085 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1088 : super_type (token_kind_type (tok), v, l)
1091 #if !defined _MSC_VER || defined __clang__ 1095 #if 201103L <= YY_CPLUSPLUS 1097 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1100 : super_type (token_kind_type (tok), v, l)
1103 #if !defined _MSC_VER || defined __clang__ 1107 #if 201103L <= YY_CPLUSPLUS 1109 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1112 : super_type (token_kind_type (tok), v, l)
1115 #if !defined _MSC_VER || defined __clang__ 1119 #if 201103L <= YY_CPLUSPLUS 1120 symbol_type (
int tok, std::string v, location_type l)
1121 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1124 : super_type (token_kind_type (tok), v, l)
1127 #if !defined _MSC_VER || defined __clang__ 1137 #if 201103L <= YY_CPLUSPLUS 1150 virtual int parse ();
1156 void set_debug_stream (std::ostream &);
1161 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
1163 void set_debug_level (debug_level_type l);
1169 virtual void error (
const location_type& loc,
const std::string& msg);
1176 static std::string symbol_name (symbol_kind_type yysymbol);
1179 #if 201103L <= YY_CPLUSPLUS 1182 make_END (location_type l)
1184 return symbol_type (token::TOKEN_END, std::move (l));
1194 #if 201103L <= YY_CPLUSPLUS 1197 make_D2_PARSER_error (location_type l)
1199 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1206 return symbol_type (token::TOKEN_D2_PARSER_error, l);
1209 #if 201103L <= YY_CPLUSPLUS 1212 make_D2_PARSER_UNDEF (location_type l)
1214 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1221 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, l);
1224 #if 201103L <= YY_CPLUSPLUS 1227 make_COMMA (location_type l)
1229 return symbol_type (token::TOKEN_COMMA, std::move (l));
1239 #if 201103L <= YY_CPLUSPLUS 1242 make_COLON (location_type l)
1244 return symbol_type (token::TOKEN_COLON, std::move (l));
1254 #if 201103L <= YY_CPLUSPLUS 1257 make_LSQUARE_BRACKET (location_type l)
1259 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1266 return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
1269 #if 201103L <= YY_CPLUSPLUS 1272 make_RSQUARE_BRACKET (location_type l)
1274 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1281 return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
1284 #if 201103L <= YY_CPLUSPLUS 1287 make_LCURLY_BRACKET (location_type l)
1289 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1296 return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
1299 #if 201103L <= YY_CPLUSPLUS 1302 make_RCURLY_BRACKET (location_type l)
1304 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1311 return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
1314 #if 201103L <= YY_CPLUSPLUS 1317 make_NULL_TYPE (location_type l)
1319 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1329 #if 201103L <= YY_CPLUSPLUS 1332 make_DHCPDDNS (location_type l)
1334 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1344 #if 201103L <= YY_CPLUSPLUS 1347 make_IP_ADDRESS (location_type l)
1349 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1359 #if 201103L <= YY_CPLUSPLUS 1362 make_PORT (location_type l)
1364 return symbol_type (token::TOKEN_PORT, std::move (l));
1374 #if 201103L <= YY_CPLUSPLUS 1377 make_DNS_SERVER_TIMEOUT (location_type l)
1379 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1386 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l);
1389 #if 201103L <= YY_CPLUSPLUS 1392 make_NCR_PROTOCOL (location_type l)
1394 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1401 return symbol_type (token::TOKEN_NCR_PROTOCOL, l);
1404 #if 201103L <= YY_CPLUSPLUS 1407 make_UDP (location_type l)
1409 return symbol_type (token::TOKEN_UDP, std::move (l));
1419 #if 201103L <= YY_CPLUSPLUS 1422 make_TCP (location_type l)
1424 return symbol_type (token::TOKEN_TCP, std::move (l));
1434 #if 201103L <= YY_CPLUSPLUS 1437 make_NCR_FORMAT (location_type l)
1439 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1449 #if 201103L <= YY_CPLUSPLUS 1452 make_JSON (location_type l)
1454 return symbol_type (token::TOKEN_JSON, std::move (l));
1464 #if 201103L <= YY_CPLUSPLUS 1467 make_USER_CONTEXT (location_type l)
1469 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1476 return symbol_type (token::TOKEN_USER_CONTEXT, l);
1479 #if 201103L <= YY_CPLUSPLUS 1482 make_COMMENT (location_type l)
1484 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1494 #if 201103L <= YY_CPLUSPLUS 1497 make_FORWARD_DDNS (location_type l)
1499 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1506 return symbol_type (token::TOKEN_FORWARD_DDNS, l);
1509 #if 201103L <= YY_CPLUSPLUS 1512 make_REVERSE_DDNS (location_type l)
1514 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1521 return symbol_type (token::TOKEN_REVERSE_DDNS, l);
1524 #if 201103L <= YY_CPLUSPLUS 1527 make_DDNS_DOMAINS (location_type l)
1529 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1536 return symbol_type (token::TOKEN_DDNS_DOMAINS, l);
1539 #if 201103L <= YY_CPLUSPLUS 1542 make_KEY_NAME (location_type l)
1544 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1554 #if 201103L <= YY_CPLUSPLUS 1557 make_DNS_SERVERS (location_type l)
1559 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1569 #if 201103L <= YY_CPLUSPLUS 1572 make_HOSTNAME (location_type l)
1574 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1584 #if 201103L <= YY_CPLUSPLUS 1587 make_TSIG_KEYS (location_type l)
1589 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1599 #if 201103L <= YY_CPLUSPLUS 1602 make_ALGORITHM (location_type l)
1604 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1614 #if 201103L <= YY_CPLUSPLUS 1617 make_DIGEST_BITS (location_type l)
1619 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1629 #if 201103L <= YY_CPLUSPLUS 1632 make_SECRET (location_type l)
1634 return symbol_type (token::TOKEN_SECRET, std::move (l));
1644 #if 201103L <= YY_CPLUSPLUS 1647 make_CONTROL_SOCKET (location_type l)
1649 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1656 return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
1659 #if 201103L <= YY_CPLUSPLUS 1662 make_SOCKET_TYPE (location_type l)
1664 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1674 #if 201103L <= YY_CPLUSPLUS 1677 make_SOCKET_NAME (location_type l)
1679 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1689 #if 201103L <= YY_CPLUSPLUS 1692 make_HOOKS_LIBRARIES (location_type l)
1694 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1701 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
1704 #if 201103L <= YY_CPLUSPLUS 1707 make_LIBRARY (location_type l)
1709 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1719 #if 201103L <= YY_CPLUSPLUS 1722 make_PARAMETERS (location_type l)
1724 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1734 #if 201103L <= YY_CPLUSPLUS 1737 make_LOGGERS (location_type l)
1739 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1749 #if 201103L <= YY_CPLUSPLUS 1752 make_NAME (location_type l)
1754 return symbol_type (token::TOKEN_NAME, std::move (l));
1764 #if 201103L <= YY_CPLUSPLUS 1767 make_OUTPUT_OPTIONS (location_type l)
1769 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1776 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
1779 #if 201103L <= YY_CPLUSPLUS 1782 make_OUTPUT (location_type l)
1784 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1794 #if 201103L <= YY_CPLUSPLUS 1797 make_DEBUGLEVEL (location_type l)
1799 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1809 #if 201103L <= YY_CPLUSPLUS 1812 make_SEVERITY (location_type l)
1814 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1824 #if 201103L <= YY_CPLUSPLUS 1827 make_FLUSH (location_type l)
1829 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1839 #if 201103L <= YY_CPLUSPLUS 1842 make_MAXSIZE (location_type l)
1844 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1854 #if 201103L <= YY_CPLUSPLUS 1857 make_MAXVER (location_type l)
1859 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1869 #if 201103L <= YY_CPLUSPLUS 1872 make_PATTERN (location_type l)
1874 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1884 #if 201103L <= YY_CPLUSPLUS 1887 make_TOPLEVEL_JSON (location_type l)
1889 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
1896 return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
1899 #if 201103L <= YY_CPLUSPLUS 1902 make_TOPLEVEL_DHCPDDNS (location_type l)
1904 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
1911 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l);
1914 #if 201103L <= YY_CPLUSPLUS 1917 make_SUB_DHCPDDNS (location_type l)
1919 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
1926 return symbol_type (token::TOKEN_SUB_DHCPDDNS, l);
1929 #if 201103L <= YY_CPLUSPLUS 1932 make_SUB_TSIG_KEY (location_type l)
1934 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
1941 return symbol_type (token::TOKEN_SUB_TSIG_KEY, l);
1944 #if 201103L <= YY_CPLUSPLUS 1947 make_SUB_TSIG_KEYS (location_type l)
1949 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
1956 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l);
1959 #if 201103L <= YY_CPLUSPLUS 1962 make_SUB_DDNS_DOMAIN (location_type l)
1964 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
1971 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l);
1974 #if 201103L <= YY_CPLUSPLUS 1977 make_SUB_DDNS_DOMAINS (location_type l)
1979 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
1986 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l);
1989 #if 201103L <= YY_CPLUSPLUS 1992 make_SUB_DNS_SERVER (location_type l)
1994 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
2001 return symbol_type (token::TOKEN_SUB_DNS_SERVER, l);
2004 #if 201103L <= YY_CPLUSPLUS 2007 make_SUB_DNS_SERVERS (location_type l)
2009 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
2016 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l);
2019 #if 201103L <= YY_CPLUSPLUS 2022 make_SUB_HOOKS_LIBRARY (location_type l)
2024 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2031 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l);
2034 #if 201103L <= YY_CPLUSPLUS 2037 make_STRING (std::string v, location_type l)
2039 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2049 #if 201103L <= YY_CPLUSPLUS 2052 make_INTEGER (int64_t v, location_type l)
2054 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2064 #if 201103L <= YY_CPLUSPLUS 2067 make_FLOAT (
double v, location_type l)
2069 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2079 #if 201103L <= YY_CPLUSPLUS 2082 make_BOOLEAN (
bool v, location_type l)
2084 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2101 symbol_kind_type
token () const YY_NOEXCEPT {
return yyla_.
kind (); }
2102 const location_type&
location () const YY_NOEXCEPT {
return yyla_.location; }
2107 int expected_tokens (symbol_kind_type yyarg[],
int yyargn)
const;
2115 #if YY_CPLUSPLUS < 201103L 2124 typedef short state_type;
2127 int yy_syntax_error_arguments_ (
const context& yyctx,
2128 symbol_kind_type yyarg[],
int yyargn)
const;
2132 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2136 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2140 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
2144 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
2146 static const short yypact_ninf_;
2147 static const signed char yytable_ninf_;
2152 static symbol_kind_type yytranslate_ (
int t)
YY_NOEXCEPT;
2155 static std::string yytnamerr_ (
const char *yystr);
2158 static const char*
const yytname_[];
2164 static const short yypact_[];
2169 static const short yydefact_[];
2172 static const short yypgoto_[];
2175 static const short yydefgoto_[];
2180 static const short yytable_[];
2182 static const short yycheck_[];
2186 static const unsigned char yystos_[];
2189 static const unsigned char yyr1_[];
2192 static const signed char yyr2_[];
2197 static const short yyrline_[];
2199 virtual void yy_reduce_print_ (
int r)
const;
2201 virtual void yy_stack_print_ ()
const;
2206 std::ostream* yycdebug_;
2211 template <
typename Base>
2219 template <
typename Base>
2230 typedef state_type kind_type;
2242 void move (by_state& that);
2250 enum { empty_state = 0 };
2263 stack_symbol_type ();
2265 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2268 #if YY_CPLUSPLUS < 201103L 2269 stack_symbol_type& operator= (stack_symbol_type& that);
2275 stack_symbol_type& operator= (
const stack_symbol_type& that);
2280 template <
typename T,
typename S = std::vector<T> >
2285 typedef typename S::iterator iterator;
2286 typedef typename S::const_iterator const_iterator;
2287 typedef typename S::size_type size_type;
2288 typedef typename std::ptrdiff_t index_type;
2294 #if 201103L <= YY_CPLUSPLUS 2295 stack (
const stack&) =
delete;
2298 stack& operator= (
const stack&) =
delete;
2305 operator[] (index_type i)
const 2307 return seq_[size_type (size () - 1 - i)];
2314 operator[] (index_type i)
2316 return seq_[size_type (size () - 1 - i)];
2325 seq_.push_back (T ());
2326 operator[] (0).move (t);
2331 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2339 clear () YY_NOEXCEPT
2346 size ()
const YY_NOEXCEPT
2348 return index_type (seq_.size ());
2353 begin ()
const YY_NOEXCEPT
2355 return seq_.begin ();
2360 end ()
const YY_NOEXCEPT
2375 operator[] (index_type i)
const 2377 return stack_[range_ - i];
2381 const stack& stack_;
2386 #if YY_CPLUSPLUS < 201103L 2387 stack (
const stack&);
2390 stack& operator= (
const stack&);
2398 typedef stack<stack_symbol_type> stack_type;
2401 stack_type yystack_;
2408 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2437 D2Parser::yytranslate_ (
int t) YY_NOEXCEPT
2445 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2470 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2471 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2472 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2473 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2474 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2475 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2476 55, 56, 57, 58, 59, 60
2479 const int code_max = 315;
2482 return symbol_kind::S_YYEOF;
2483 else if (t <= code_max)
2484 return static_cast <symbol_kind_type> (translate_table[t]);
2486 return symbol_kind::S_YYUNDEF;
2490 template <
typename Base>
2494 , location (that.location)
2496 switch (this->kind ())
2498 case symbol_kind::S_value:
2499 case symbol_kind::S_map_value:
2500 case symbol_kind::S_ncr_protocol_value:
2504 case symbol_kind::S_BOOLEAN:
2508 case symbol_kind::S_FLOAT:
2512 case symbol_kind::S_INTEGER:
2516 case symbol_kind::S_STRING:
2529 template <
typename Base>
2533 return this->kind ();
2537 template <
typename Base>
2541 return this->kind () == symbol_kind::S_YYEMPTY;
2544 template <
typename Base>
2548 super_type::move (s);
2549 switch (this->kind ())
2551 case symbol_kind::S_value:
2552 case symbol_kind::S_map_value:
2553 case symbol_kind::S_ncr_protocol_value:
2557 case symbol_kind::S_BOOLEAN:
2561 case symbol_kind::S_FLOAT:
2565 case symbol_kind::S_INTEGER:
2569 case symbol_kind::S_STRING:
2582 D2Parser::by_kind::by_kind () YY_NOEXCEPT
2586 #if 201103L <= YY_CPLUSPLUS 2589 : kind_ (that.kind_)
2597 : kind_ (that.kind_)
2602 : kind_ (yytranslate_ (t))
2609 D2Parser::by_kind::clear () YY_NOEXCEPT
2611 kind_ = symbol_kind::S_YYEMPTY;
2624 D2Parser::by_kind::kind () const YY_NOEXCEPT
2632 D2Parser::by_kind::type_get () const YY_NOEXCEPT
2634 return this->kind ();
2638 #line 14 "d2_parser.yy" 2640 #line 2641 "d2_parser.h" 2645 #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.
basic_symbol() YY_NOEXCEPT
Default constructor.
static symbol_type make_PATTERN(const location_type &l)
static symbol_type make_DNS_SERVERS(const location_type &l)
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.
value_type value
The semantic value.
T & emplace(const T &t)
Instantiate a T in here from t.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
syntax_error(const syntax_error &s)
T & emplace()
Instantiate an empty T in here.
static symbol_type make_PORT(const location_type &l)
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
#define YY_ATTRIBUTE_PURE
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.
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)
void copy(const self_type &that)
Copy the content of that to this.
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.
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
void move(self_type &that)
Move the content of that to this.
static symbol_type make_SECRET(const location_type &l)
value_type(YY_RVREF(T) t)
Construct and fill.
symbol_type() YY_NOEXCEPT
Empty symbol.
Base super_type
Alias to Base.
symbol_type(int tok, const location_type &l)
Constructor for valueless symbols, and symbols from each type.
long double yyalign_me_
Strongest alignment constraints.
symbol_type(int tok, const bool &v, const location_type &l)
symbol_type(int tok, const double &v, const location_type &l)
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
A buffer to store and retrieve objects.
static symbol_type make_NCR_PROTOCOL(const location_type &l)
T & as() YY_NOEXCEPT
Accessor to a built T.
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
T & build()
Instantiate an empty T in here.
Type access provider for token (enum) based symbols.
static symbol_type make_USER_CONTEXT(const location_type &l)
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)
value_type() YY_NOEXCEPT
Empty construction.
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)
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
basic_symbol< by_kind > super_type
Superclass.
static symbol_type make_D2_PARSER_error(const location_type &l)
symbol_type(int tok, const int64_t &v, const location_type &l)
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 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)
Defines the logger used by the top-level component of kea-lfc.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
symbol_type(int tok, const std::string &v, const location_type &l)
static symbol_type make_COMMA(const location_type &l)
const symbol_type & lookahead() const YY_NOEXCEPT
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
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)
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(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)
slice(const stack &stack, index_type range) YY_NOEXCEPT
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.
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)
T & build(const T &t)
Instantiate a T in here from t.
void destroy()
Destroy the stored T.
static symbol_type make_HOSTNAME(const location_type &l)
Present a slice of the top of a stack.
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)
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.
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)
static symbol_type make_MAXVER(const location_type &l)
location location_type
Symbol locations.
value_type self_type
Type of *this.
static symbol_type make_KEY_NAME(const location_type &l)
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)
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).