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>
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
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
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"
208namespace 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
263# if 201103L <= YY_CPLUSPLUS
265 template <
typename T,
typename... U>
271 yytypeid_ = &
typeid (T);
272 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
276 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
373 template <
typename T>
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
408 template <
typename T>
413 return static_cast<T*
> (yyp);
417 template <
typename T>
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 ())
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_SECRET_FILE = 286,
525 TOKEN_CONTROL_SOCKET = 287,
526 TOKEN_SOCKET_TYPE = 288,
527 TOKEN_SOCKET_NAME = 289,
528 TOKEN_HOOKS_LIBRARIES = 290,
530 TOKEN_PARAMETERS = 292,
533 TOKEN_OUTPUT_OPTIONS = 295,
535 TOKEN_DEBUGLEVEL = 297,
536 TOKEN_SEVERITY = 298,
541 TOKEN_TOPLEVEL_JSON = 303,
542 TOKEN_TOPLEVEL_DHCPDDNS = 304,
543 TOKEN_SUB_DHCPDDNS = 305,
544 TOKEN_SUB_TSIG_KEY = 306,
545 TOKEN_SUB_TSIG_KEYS = 307,
546 TOKEN_SUB_DDNS_DOMAIN = 308,
547 TOKEN_SUB_DDNS_DOMAINS = 309,
548 TOKEN_SUB_DNS_SERVER = 310,
549 TOKEN_SUB_DNS_SERVERS = 311,
550 TOKEN_SUB_HOOKS_LIBRARY = 312,
578 S_LSQUARE_BRACKET = 5,
579 S_RSQUARE_BRACKET = 6,
580 S_LCURLY_BRACKET = 7,
581 S_RCURLY_BRACKET = 8,
586 S_DNS_SERVER_TIMEOUT = 13,
605 S_CONTROL_SOCKET = 32,
608 S_HOOKS_LIBRARIES = 35,
613 S_OUTPUT_OPTIONS = 40,
621 S_TOPLEVEL_JSON = 48,
622 S_TOPLEVEL_DHCPDDNS = 49,
625 S_SUB_TSIG_KEYS = 52,
626 S_SUB_DDNS_DOMAIN = 53,
627 S_SUB_DDNS_DOMAINS = 54,
628 S_SUB_DNS_SERVER = 55,
629 S_SUB_DNS_SERVERS = 56,
630 S_SUB_HOOKS_LIBRARY = 57,
653 S_not_empty_map = 80,
657 S_not_empty_list = 84,
658 S_unknown_map_entry = 85,
661 S_global_object = 88,
663 S_global_object_comma = 90,
666 S_dhcpddns_params = 93,
667 S_dhcpddns_param = 94,
671 S_dns_server_timeout = 98,
674 S_ncr_protocol_value = 101,
677 S_user_context = 104,
681 S_forward_ddns = 108,
683 S_reverse_ddns = 110,
685 S_ddns_mgr_params = 112,
686 S_not_empty_ddns_mgr_params = 113,
687 S_ddns_mgr_param = 114,
688 S_ddns_domains = 115,
690 S_sub_ddns_domains = 117,
692 S_ddns_domain_list = 119,
693 S_not_empty_ddns_domain_list = 120,
696 S_sub_ddns_domain = 123,
698 S_ddns_domain_params = 125,
699 S_ddns_domain_param = 126,
700 S_ddns_domain_name = 127,
702 S_ddns_key_name = 129,
706 S_sub_dns_servers = 133,
708 S_dns_server_list = 135,
711 S_sub_dns_server = 138,
713 S_dns_server_params = 140,
714 S_dns_server_param = 141,
715 S_dns_server_hostname = 142,
717 S_dns_server_ip_address = 144,
719 S_dns_server_port = 146,
722 S_sub_tsig_keys = 149,
724 S_tsig_keys_list = 151,
725 S_not_empty_tsig_keys_list = 152,
728 S_sub_tsig_key = 155,
730 S_tsig_key_params = 157,
731 S_tsig_key_param = 158,
732 S_tsig_key_name = 159,
734 S_tsig_key_algorithm = 161,
736 S_tsig_key_digest_bits = 163,
737 S_tsig_key_secret = 164,
739 S_tsig_key_secret_file = 166,
741 S_control_socket = 168,
743 S_control_socket_params = 170,
744 S_control_socket_param = 171,
745 S_control_socket_type = 172,
747 S_control_socket_name = 174,
749 S_hooks_libraries = 176,
751 S_hooks_libraries_list = 178,
752 S_not_empty_hooks_libraries_list = 179,
753 S_hooks_library = 180,
755 S_sub_hooks_library = 182,
757 S_hooks_params = 184,
765 S_loggers_entries = 192,
766 S_logger_entry = 193,
768 S_logger_params = 195,
769 S_logger_param = 196,
775 S_output_options_list = 202,
777 S_output_options_list_content = 204,
778 S_output_entry = 205,
780 S_output_params_list = 207,
781 S_output_params = 208,
804 template <
typename Base>
816#if 201103L <= YY_CPLUSPLUS
819 : Base (std::move (that))
821 , location (std::move (that.location))
823 switch (this->kind ())
825 case symbol_kind::S_value:
826 case symbol_kind::S_map_value:
827 case symbol_kind::S_ncr_protocol_value:
828 value.move<
ElementPtr > (std::move (that.value));
831 case symbol_kind::S_BOOLEAN:
832 value.move<
bool > (std::move (that.value));
835 case symbol_kind::S_FLOAT:
836 value.move<
double > (std::move (that.value));
839 case symbol_kind::S_INTEGER:
840 value.move< int64_t > (std::move (that.value));
843 case symbol_kind::S_STRING:
844 value.move< std::string > (std::move (that.value));
855 basic_symbol (
const basic_symbol& that);
858#if 201103L <= YY_CPLUSPLUS
859 basic_symbol (
typename Base::kind_type t, location_type&& l)
861 , location (std::move (l))
870#if 201103L <= YY_CPLUSPLUS
873 , value (std::move (v))
874 , location (std::move (l))
884#if 201103L <= YY_CPLUSPLUS
887 , value (std::move (v))
888 , location (std::move (l))
898#if 201103L <= YY_CPLUSPLUS
901 , value (std::move (v))
902 , location (std::move (l))
912#if 201103L <= YY_CPLUSPLUS
915 , value (std::move (v))
916 , location (std::move (l))
926#if 201103L <= YY_CPLUSPLUS
929 , value (std::move (v))
930 , location (std::move (l))
964 case symbol_kind::S_value:
965 case symbol_kind::S_map_value:
966 case symbol_kind::S_ncr_protocol_value:
967 value.template destroy< ElementPtr > ();
970 case symbol_kind::S_BOOLEAN:
971 value.template destroy< bool > ();
974 case symbol_kind::S_FLOAT:
975 value.template destroy< double > ();
978 case symbol_kind::S_INTEGER:
979 value.template destroy< int64_t > ();
982 case symbol_kind::S_STRING:
983 value.template destroy< std::string > ();
1015#if YY_CPLUSPLUS < 201103L
1030#if 201103L <= YY_CPLUSPLUS
1074#if 201103L <= YY_CPLUSPLUS
1082#if !defined _MSC_VER || defined __clang__
1084 || (token::TOKEN_D2_PARSER_error <= tok && tok <= token::TOKEN_SUB_HOOKS_LIBRARY));
1087#if 201103L <= YY_CPLUSPLUS
1095#if !defined _MSC_VER || defined __clang__
1099#if 201103L <= YY_CPLUSPLUS
1107#if !defined _MSC_VER || defined __clang__
1111#if 201103L <= YY_CPLUSPLUS
1119#if !defined _MSC_VER || defined __clang__
1123#if 201103L <= YY_CPLUSPLUS
1131#if !defined _MSC_VER || defined __clang__
1141#if 201103L <= YY_CPLUSPLUS
1154 virtual int parse ();
1160 void set_debug_stream (std::ostream &);
1163 typedef
int debug_level_type;
1167 void set_debug_level (debug_level_type l);
1173 virtual void error (
const location_type& loc,
const std::string& msg);
1176 void error (
const syntax_error& err);
1180 static std::string symbol_name (symbol_kind_type yysymbol);
1183#if 201103L <= YY_CPLUSPLUS
1186 make_END (location_type l)
1188 return symbol_type (token::TOKEN_END, std::move (l));
1198#if 201103L <= YY_CPLUSPLUS
1201 make_D2_PARSER_error (location_type l)
1203 return symbol_type (token::TOKEN_D2_PARSER_error, std::move (l));
1210 return symbol_type (token::TOKEN_D2_PARSER_error, l);
1213#if 201103L <= YY_CPLUSPLUS
1216 make_D2_PARSER_UNDEF (location_type l)
1218 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, std::move (l));
1225 return symbol_type (token::TOKEN_D2_PARSER_UNDEF, l);
1228#if 201103L <= YY_CPLUSPLUS
1231 make_COMMA (location_type l)
1233 return symbol_type (token::TOKEN_COMMA, std::move (l));
1243#if 201103L <= YY_CPLUSPLUS
1246 make_COLON (location_type l)
1248 return symbol_type (token::TOKEN_COLON, std::move (l));
1258#if 201103L <= YY_CPLUSPLUS
1261 make_LSQUARE_BRACKET (location_type l)
1263 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1270 return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
1273#if 201103L <= YY_CPLUSPLUS
1276 make_RSQUARE_BRACKET (location_type l)
1278 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1285 return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
1288#if 201103L <= YY_CPLUSPLUS
1291 make_LCURLY_BRACKET (location_type l)
1293 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1300 return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
1303#if 201103L <= YY_CPLUSPLUS
1306 make_RCURLY_BRACKET (location_type l)
1308 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1315 return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
1318#if 201103L <= YY_CPLUSPLUS
1321 make_NULL_TYPE (location_type l)
1323 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1333#if 201103L <= YY_CPLUSPLUS
1336 make_DHCPDDNS (location_type l)
1338 return symbol_type (token::TOKEN_DHCPDDNS, std::move (l));
1348#if 201103L <= YY_CPLUSPLUS
1351 make_IP_ADDRESS (location_type l)
1353 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l));
1363#if 201103L <= YY_CPLUSPLUS
1366 make_PORT (location_type l)
1368 return symbol_type (token::TOKEN_PORT, std::move (l));
1378#if 201103L <= YY_CPLUSPLUS
1381 make_DNS_SERVER_TIMEOUT (location_type l)
1383 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l));
1390 return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l);
1393#if 201103L <= YY_CPLUSPLUS
1396 make_NCR_PROTOCOL (location_type l)
1398 return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l));
1405 return symbol_type (token::TOKEN_NCR_PROTOCOL, l);
1408#if 201103L <= YY_CPLUSPLUS
1411 make_UDP (location_type l)
1413 return symbol_type (token::TOKEN_UDP, std::move (l));
1423#if 201103L <= YY_CPLUSPLUS
1426 make_TCP (location_type l)
1428 return symbol_type (token::TOKEN_TCP, std::move (l));
1438#if 201103L <= YY_CPLUSPLUS
1441 make_NCR_FORMAT (location_type l)
1443 return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l));
1453#if 201103L <= YY_CPLUSPLUS
1456 make_JSON (location_type l)
1458 return symbol_type (token::TOKEN_JSON, std::move (l));
1468#if 201103L <= YY_CPLUSPLUS
1471 make_USER_CONTEXT (location_type l)
1473 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1480 return symbol_type (token::TOKEN_USER_CONTEXT, l);
1483#if 201103L <= YY_CPLUSPLUS
1486 make_COMMENT (location_type l)
1488 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1498#if 201103L <= YY_CPLUSPLUS
1501 make_FORWARD_DDNS (location_type l)
1503 return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l));
1510 return symbol_type (token::TOKEN_FORWARD_DDNS, l);
1513#if 201103L <= YY_CPLUSPLUS
1516 make_REVERSE_DDNS (location_type l)
1518 return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l));
1525 return symbol_type (token::TOKEN_REVERSE_DDNS, l);
1528#if 201103L <= YY_CPLUSPLUS
1531 make_DDNS_DOMAINS (location_type l)
1533 return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l));
1540 return symbol_type (token::TOKEN_DDNS_DOMAINS, l);
1543#if 201103L <= YY_CPLUSPLUS
1546 make_KEY_NAME (location_type l)
1548 return symbol_type (token::TOKEN_KEY_NAME, std::move (l));
1558#if 201103L <= YY_CPLUSPLUS
1561 make_DNS_SERVERS (location_type l)
1563 return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l));
1573#if 201103L <= YY_CPLUSPLUS
1576 make_HOSTNAME (location_type l)
1578 return symbol_type (token::TOKEN_HOSTNAME, std::move (l));
1588#if 201103L <= YY_CPLUSPLUS
1591 make_TSIG_KEYS (location_type l)
1593 return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l));
1603#if 201103L <= YY_CPLUSPLUS
1606 make_ALGORITHM (location_type l)
1608 return symbol_type (token::TOKEN_ALGORITHM, std::move (l));
1618#if 201103L <= YY_CPLUSPLUS
1621 make_DIGEST_BITS (location_type l)
1623 return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l));
1633#if 201103L <= YY_CPLUSPLUS
1636 make_SECRET (location_type l)
1638 return symbol_type (token::TOKEN_SECRET, std::move (l));
1648#if 201103L <= YY_CPLUSPLUS
1651 make_SECRET_FILE (location_type l)
1653 return symbol_type (token::TOKEN_SECRET_FILE, std::move (l));
1663#if 201103L <= YY_CPLUSPLUS
1666 make_CONTROL_SOCKET (location_type l)
1668 return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l));
1675 return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
1678#if 201103L <= YY_CPLUSPLUS
1681 make_SOCKET_TYPE (location_type l)
1683 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1693#if 201103L <= YY_CPLUSPLUS
1696 make_SOCKET_NAME (location_type l)
1698 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1708#if 201103L <= YY_CPLUSPLUS
1711 make_HOOKS_LIBRARIES (location_type l)
1713 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1720 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
1723#if 201103L <= YY_CPLUSPLUS
1726 make_LIBRARY (location_type l)
1728 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1738#if 201103L <= YY_CPLUSPLUS
1741 make_PARAMETERS (location_type l)
1743 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1753#if 201103L <= YY_CPLUSPLUS
1756 make_LOGGERS (location_type l)
1758 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1768#if 201103L <= YY_CPLUSPLUS
1771 make_NAME (location_type l)
1773 return symbol_type (token::TOKEN_NAME, std::move (l));
1783#if 201103L <= YY_CPLUSPLUS
1786 make_OUTPUT_OPTIONS (location_type l)
1788 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1795 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
1798#if 201103L <= YY_CPLUSPLUS
1801 make_OUTPUT (location_type l)
1803 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1813#if 201103L <= YY_CPLUSPLUS
1816 make_DEBUGLEVEL (location_type l)
1818 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1828#if 201103L <= YY_CPLUSPLUS
1831 make_SEVERITY (location_type l)
1833 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1843#if 201103L <= YY_CPLUSPLUS
1846 make_FLUSH (location_type l)
1848 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1858#if 201103L <= YY_CPLUSPLUS
1861 make_MAXSIZE (location_type l)
1863 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1873#if 201103L <= YY_CPLUSPLUS
1876 make_MAXVER (location_type l)
1878 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1888#if 201103L <= YY_CPLUSPLUS
1891 make_PATTERN (location_type l)
1893 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1903#if 201103L <= YY_CPLUSPLUS
1906 make_TOPLEVEL_JSON (location_type l)
1908 return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l));
1915 return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
1918#if 201103L <= YY_CPLUSPLUS
1921 make_TOPLEVEL_DHCPDDNS (location_type l)
1923 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l));
1930 return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l);
1933#if 201103L <= YY_CPLUSPLUS
1936 make_SUB_DHCPDDNS (location_type l)
1938 return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l));
1945 return symbol_type (token::TOKEN_SUB_DHCPDDNS, l);
1948#if 201103L <= YY_CPLUSPLUS
1951 make_SUB_TSIG_KEY (location_type l)
1953 return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l));
1960 return symbol_type (token::TOKEN_SUB_TSIG_KEY, l);
1963#if 201103L <= YY_CPLUSPLUS
1966 make_SUB_TSIG_KEYS (location_type l)
1968 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l));
1975 return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l);
1978#if 201103L <= YY_CPLUSPLUS
1981 make_SUB_DDNS_DOMAIN (location_type l)
1983 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l));
1990 return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l);
1993#if 201103L <= YY_CPLUSPLUS
1996 make_SUB_DDNS_DOMAINS (location_type l)
1998 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l));
2005 return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l);
2008#if 201103L <= YY_CPLUSPLUS
2011 make_SUB_DNS_SERVER (location_type l)
2013 return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l));
2020 return symbol_type (token::TOKEN_SUB_DNS_SERVER, l);
2023#if 201103L <= YY_CPLUSPLUS
2026 make_SUB_DNS_SERVERS (location_type l)
2028 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l));
2035 return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l);
2038#if 201103L <= YY_CPLUSPLUS
2041 make_SUB_HOOKS_LIBRARY (location_type l)
2043 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l));
2050 return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l);
2053#if 201103L <= YY_CPLUSPLUS
2056 make_STRING (std::string v, location_type l)
2058 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2068#if 201103L <= YY_CPLUSPLUS
2071 make_INTEGER (int64_t v, location_type l)
2073 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2083#if 201103L <= YY_CPLUSPLUS
2086 make_FLOAT (
double v, location_type l)
2088 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
2098#if 201103L <= YY_CPLUSPLUS
2101 make_BOOLEAN (
bool v, location_type l)
2103 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2134#if YY_CPLUSPLUS < 201103L
2143 typedef short state_type;
2146 int yy_syntax_error_arguments_ (
const context& yyctx,
2147 symbol_kind_type yyarg[],
int yyargn)
const;
2151 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2155 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2159 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
2163 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
2165 static const short yypact_ninf_;
2166 static const signed char yytable_ninf_;
2171 static symbol_kind_type yytranslate_ (
int t)
YY_NOEXCEPT;
2174 static std::string yytnamerr_ (
const char *yystr);
2177 static const char*
const yytname_[];
2183 static const short yypact_[];
2188 static const short yydefact_[];
2191 static const short yypgoto_[];
2194 static const short yydefgoto_[];
2199 static const short yytable_[];
2201 static const short yycheck_[];
2205 static const unsigned char yystos_[];
2208 static const unsigned char yyr1_[];
2211 static const signed char yyr2_[];
2216 static const short yyrline_[];
2218 virtual void yy_reduce_print_ (
int r)
const;
2220 virtual void yy_stack_print_ ()
const;
2225 std::ostream* yycdebug_;
2230 template <
typename Base>
2231 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
2238 template <
typename Base>
2239 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
2249 typedef state_type kind_type;
2261 void move (by_state& that);
2269 enum { empty_state = 0 };
2277 struct stack_symbol_type : basic_symbol<by_state>
2280 typedef basic_symbol<by_state> super_type;
2282 stack_symbol_type ();
2284 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2286 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
2287#if YY_CPLUSPLUS < 201103L
2290 stack_symbol_type& operator= (stack_symbol_type& that);
2294 stack_symbol_type& operator= (
const stack_symbol_type& that);
2299 template <
typename T,
typename S = std::vector<T> >
2304 typedef typename S::iterator iterator;
2305 typedef typename S::const_iterator const_iterator;
2306 typedef typename S::size_type size_type;
2307 typedef typename std::ptrdiff_t index_type;
2313#if 201103L <= YY_CPLUSPLUS
2315 stack (
const stack&) =
delete;
2317 stack& operator= (
const stack&) =
delete;
2324 operator[] (index_type i)
const
2326 return seq_[size_type (size () - 1 - i)];
2333 operator[] (index_type i)
2335 return seq_[size_type (size () - 1 - i)];
2344 seq_.push_back (T ());
2345 operator[] (0).move (t);
2367 return index_type (seq_.size ());
2374 return seq_.begin ();
2394 operator[] (index_type i)
const
2396 return stack_[range_ - i];
2400 const stack& stack_;
2405#if YY_CPLUSPLUS < 201103L
2407 stack (
const stack&);
2409 stack& operator= (
const stack&);
2417 typedef stack<stack_symbol_type> stack_type;
2420 stack_type yystack_;
2427 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2435 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
2464 0, 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, 2, 2, 2, 2,
2471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2489 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2490 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2491 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2492 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2493 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2494 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2495 55, 56, 57, 58, 59, 60, 61
2498 const int code_max = 316;
2502 else if (t <= code_max)
2509 template <
typename Base>
2515 switch (this->kind ())
2548 template <
typename Base>
2552 return this->kind ();
2556 template <
typename Base>
2563 template <
typename Base>
2567 super_type::move (s);
2568 switch (this->kind ())
2605#if 201103L <= YY_CPLUSPLUS
2608 : kind_ (that.kind_)
2616 : kind_ (that.kind_)
2621 : kind_ (yytranslate_ (t))
2653 return this->kind ();
2657#line 14 "d2_parser.yy"
2659#line 2660 "d2_parser.h"
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
Evaluation context, an interface to the expression evaluation.
const symbol_type & lookahead() const YY_NOEXCEPT
symbol_kind_type token() const YY_NOEXCEPT
const location_type & location() const YY_NOEXCEPT
Present a slice of the top of a stack.
slice(const stack &stack, index_type range) YY_NOEXCEPT
A buffer to store and retrieve objects.
value_type self_type
Type of *this.
T & emplace(const T &t)
Instantiate a T in here from t.
T & emplace()
Instantiate an empty T in here.
T & build()
Instantiate an empty T in here.
void copy(const self_type &that)
Copy the content of that to this.
long double yyalign_me_
Strongest alignment constraints.
T & as() YY_NOEXCEPT
Accessor to a built T.
value_type(YY_RVREF(T) t)
Construct and fill.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
T & build(const T &t)
Instantiate a T in here from t.
void destroy()
Destroy the stored T.
char yyraw_[size]
A buffer large enough to store any of the semantic values.
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
void move(self_type &that)
Move the content of that to this.
value_type() YY_NOEXCEPT
Empty construction.
static symbol_type make_COMMENT(const location_type &l)
static symbol_type make_STRING(const std::string &v, const location_type &l)
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
static symbol_type make_SUB_DDNS_DOMAIN(const location_type &l)
static symbol_type make_SUB_HOOKS_LIBRARY(const location_type &l)
static symbol_type make_LOGGERS(const location_type &l)
static symbol_type make_KEY_NAME(const location_type &l)
static symbol_type make_PARAMETERS(const location_type &l)
static symbol_type make_SUB_TSIG_KEYS(const location_type &l)
static symbol_type make_FORWARD_DDNS(const location_type &l)
static symbol_type make_SUB_DNS_SERVERS(const location_type &l)
static symbol_type make_TOPLEVEL_DHCPDDNS(const location_type &l)
static symbol_type make_SOCKET_TYPE(const location_type &l)
static symbol_type make_SUB_DDNS_DOMAINS(const location_type &l)
static symbol_type make_TCP(const location_type &l)
static symbol_type make_NAME(const location_type &l)
location location_type
Symbol locations.
static symbol_type make_MAXSIZE(const location_type &l)
static symbol_type make_D2_PARSER_UNDEF(const location_type &l)
static symbol_type make_OUTPUT_OPTIONS(const location_type &l)
static symbol_type make_LSQUARE_BRACKET(const location_type &l)
static symbol_type make_DEBUGLEVEL(const location_type &l)
static symbol_type make_LCURLY_BRACKET(const location_type &l)
static symbol_type make_DIGEST_BITS(const location_type &l)
static symbol_type make_TOPLEVEL_JSON(const location_type &l)
static symbol_type make_SOCKET_NAME(const location_type &l)
static symbol_type make_DNS_SERVER_TIMEOUT(const location_type &l)
static symbol_type make_NULL_TYPE(const location_type &l)
static symbol_type make_LIBRARY(const location_type &l)
static symbol_type make_UDP(const location_type &l)
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
static symbol_type make_COLON(const location_type &l)
static symbol_type make_COMMA(const location_type &l)
static symbol_type make_SECRET(const location_type &l)
static symbol_type make_SUB_TSIG_KEY(const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)
static symbol_type make_OUTPUT(const location_type &l)
value_type semantic_type
Backward compatibility (Bison 3.8).
static symbol_type make_SUB_DHCPDDNS(const location_type &l)
static const symbol_kind_type YYNTOKENS
The number of tokens.
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
static symbol_type make_DHCPDDNS(const location_type &l)
static symbol_type make_D2_PARSER_error(const location_type &l)
static symbol_type make_SUB_DNS_SERVER(const location_type &l)
static symbol_type make_MAXVER(const location_type &l)
static symbol_type make_SECRET_FILE(const location_type &l)
static symbol_type make_DDNS_DOMAINS(const location_type &l)
static symbol_type make_SEVERITY(const location_type &l)
static symbol_type make_RSQUARE_BRACKET(const location_type &l)
static symbol_type make_HOSTNAME(const location_type &l)
static symbol_type make_USER_CONTEXT(const location_type &l)
static symbol_type make_FLUSH(const location_type &l)
static symbol_type make_REVERSE_DDNS(const location_type &l)
static symbol_type make_PATTERN(const location_type &l)
static symbol_type make_ALGORITHM(const location_type &l)
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
static symbol_type make_IP_ADDRESS(const location_type &l)
static symbol_type make_PORT(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.
static symbol_type make_FLOAT(const double &v, const location_type &l)
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
static symbol_type make_JSON(const location_type &l)
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
static symbol_type make_END(const location_type &l)
static symbol_type make_CONTROL_SOCKET(const location_type &l)
static symbol_type make_NCR_PROTOCOL(const location_type &l)
static symbol_type make_DNS_SERVERS(const location_type &l)
static symbol_type make_TSIG_KEYS(const location_type &l)
static symbol_type make_NCR_FORMAT(const location_type &l)
Forward declaration of the ParserContext class.
A collection of classes for housing and parsing the application configuration necessary for the DHCP-...
#define D2_PARSER__ASSERT
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.
value_type value
The semantic value.
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
basic_symbol() YY_NOEXCEPT
Default constructor.
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
bool empty() const YY_NOEXCEPT
Whether empty.
Base super_type
Alias to Base.
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
location_type location
The location.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
~basic_symbol()
Destroy the symbol.
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
void move(basic_symbol &s)
Destructive move, s is emptied into this.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
Type access provider for token (enum) based symbols.
void clear() YY_NOEXCEPT
Record that this symbol is empty.
by_kind() YY_NOEXCEPT
Default constructor.
token_kind_type kind_type
The symbol kind as needed by the constructor.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
void move(by_kind &that)
Steal the symbol kind from that.
symbol_kind_type kind_
The symbol kind.
@ YYNTOKENS
Number of tokens.
"External" symbols: returned by the scanner.
basic_symbol< by_kind > super_type
Superclass.
symbol_type() YY_NOEXCEPT
Empty symbol.
Syntax errors thrown from user actions.
syntax_error(const location_type &l, const std::string &m)
~syntax_error() YY_NOEXCEPT YY_NOTHROW
syntax_error(const syntax_error &s)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).