45 #ifndef YY_AGENT_AGENT_PARSER_H_INCLUDED
46 # define YY_AGENT_AGENT_PARSER_H_INCLUDED
48 #line 17 "agent_parser.yy"
52 #include <boost/lexical_cast.hpp>
59 #line 60 "agent_parser.h"
68 #if defined __cplusplus
69 # define YY_CPLUSPLUS __cplusplus
71 # define YY_CPLUSPLUS 199711L
75 #if 201103L <= YY_CPLUSPLUS
76 # define YY_MOVE std::move
77 # define YY_MOVE_OR_COPY move
78 # define YY_MOVE_REF(Type) Type&&
79 # define YY_RVREF(Type) Type&&
80 # define YY_COPY(Type) Type
83 # define YY_MOVE_OR_COPY copy
84 # define YY_MOVE_REF(Type) Type&
85 # define YY_RVREF(Type) const Type&
86 # define YY_COPY(Type) const Type&
90 #if 201103L <= YY_CPLUSPLUS
91 # define YY_NOEXCEPT noexcept
95 # define YY_NOTHROW throw ()
99 #if 201703 <= YY_CPLUSPLUS
100 # define YY_CONSTEXPR constexpr
102 # define YY_CONSTEXPR
104 # include "location.hh"
106 #ifndef AGENT__ASSERT
108 # define AGENT__ASSERT assert
112 #ifndef YY_ATTRIBUTE_PURE
113 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
114 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
116 # define YY_ATTRIBUTE_PURE
120 #ifndef YY_ATTRIBUTE_UNUSED
121 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
122 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
124 # define YY_ATTRIBUTE_UNUSED
129 #if ! defined lint || defined __GNUC__
130 # define YY_USE(E) ((void) (E))
136 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
137 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
138 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
139 _Pragma ("GCC diagnostic push") \
140 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
142 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
143 _Pragma ("GCC diagnostic push") \
144 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
145 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
147 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
148 _Pragma ("GCC diagnostic pop")
150 # define YY_INITIAL_VALUE(Value) Value
152 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
153 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
154 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
156 #ifndef YY_INITIAL_VALUE
157 # define YY_INITIAL_VALUE(Value)
160 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
161 # define YY_IGNORE_USELESS_CAST_BEGIN \
162 _Pragma ("GCC diagnostic push") \
163 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
164 # define YY_IGNORE_USELESS_CAST_END \
165 _Pragma ("GCC diagnostic pop")
167 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
168 # define YY_IGNORE_USELESS_CAST_BEGIN
169 # define YY_IGNORE_USELESS_CAST_END
174 # define YY_CAST(Type, Val) static_cast<Type> (Val)
175 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
177 # define YY_CAST(Type, Val) ((Type) (Val))
178 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
182 # if defined __cplusplus
183 # if 201103L <= __cplusplus
184 # define YY_NULLPTR nullptr
186 # define YY_NULLPTR 0
189 # define YY_NULLPTR ((void*)0)
197 # define AGENT_DEBUG 1
199 # define AGENT_DEBUG 0
202 # define AGENT_DEBUG 1
206 #line 14 "agent_parser.yy"
207 namespace isc {
namespace agent {
208 #line 209 "agent_parser.h"
219 # pragma GCC message "bison: do not #define AGENT_STYPE in C++, use %define api.value.type"
237 , yytypeid_ (YY_NULLPTR)
241 template <
typename T>
243 : yytypeid_ (&typeid (T))
246 new (yyas_<T> ()) T (
YY_MOVE (t));
249 #if 201103L <= YY_CPLUSPLUS
253 self_type& operator= (
const self_type&) =
delete;
262 # if 201103L <= YY_CPLUSPLUS
264 template <
typename T,
typename... U>
270 yytypeid_ = &
typeid (T);
271 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
275 template <
typename T>
281 yytypeid_ = &
typeid (T);
282 return *
new (yyas_<T> ()) T ();
286 template <
typename T>
292 yytypeid_ = &
typeid (T);
293 return *
new (yyas_<T> ()) T (t);
299 template <
typename T>
303 return emplace<T> ();
308 template <
typename T>
312 return emplace<T> (t);
316 template <
typename T>
327 template <
typename T>
345 template <
typename T>
351 std::swap (as<T> (), that.as<T> ());
357 template <
typename T>
361 # if 201103L <= YY_CPLUSPLUS
362 emplace<T> (std::move (that.
as<T> ()));
370 # if 201103L <= YY_CPLUSPLUS
372 template <
typename T>
374 move (self_type&& that)
376 emplace<T> (std::move (that.as<T> ()));
382 template <
typename T>
386 emplace<T> (that.
as<T> ());
390 template <
typename T>
395 yytypeid_ = YY_NULLPTR;
399 #if YY_CPLUSPLUS < 201103L
403 self_type& operator= (
const self_type&);
407 template <
typename T>
412 return static_cast<T*
> (yyp);
416 template <
typename T>
420 const void *yyp = yyraw_;
421 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_AGENT_EMPTY = -2,
494 TOKEN_AGENT_error = 256,
495 TOKEN_AGENT_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_CONTROL_AGENT = 265,
504 TOKEN_HTTP_HOST = 266,
505 TOKEN_HTTP_PORT = 267,
506 TOKEN_USER_CONTEXT = 268,
508 TOKEN_AUTHENTICATION = 270,
512 TOKEN_DIRECTORY = 274,
515 TOKEN_USER_FILE = 277,
516 TOKEN_PASSWORD = 278,
517 TOKEN_PASSWORD_FILE = 279,
518 TOKEN_TRUST_ANCHOR = 280,
519 TOKEN_CERT_FILE = 281,
520 TOKEN_KEY_FILE = 282,
521 TOKEN_CERT_REQUIRED = 283,
522 TOKEN_CONTROL_SOCKETS = 284,
523 TOKEN_DHCP4_SERVER = 285,
524 TOKEN_DHCP6_SERVER = 286,
525 TOKEN_D2_SERVER = 287,
526 TOKEN_SOCKET_NAME = 288,
527 TOKEN_SOCKET_TYPE = 289,
529 TOKEN_HOOKS_LIBRARIES = 291,
531 TOKEN_PARAMETERS = 293,
534 TOKEN_OUTPUT_OPTIONS = 296,
536 TOKEN_DEBUGLEVEL = 298,
537 TOKEN_SEVERITY = 299,
542 TOKEN_START_JSON = 304,
543 TOKEN_START_AGENT = 305,
544 TOKEN_START_SUB_AGENT = 306,
572 S_LSQUARE_BRACKET = 5,
573 S_RSQUARE_BRACKET = 6,
574 S_LCURLY_BRACKET = 7,
575 S_RCURLY_BRACKET = 8,
577 S_CONTROL_AGENT = 10,
582 S_AUTHENTICATION = 15,
591 S_PASSWORD_FILE = 24,
595 S_CERT_REQUIRED = 28,
596 S_CONTROL_SOCKETS = 29,
603 S_HOOKS_LIBRARIES = 36,
608 S_OUTPUT_OPTIONS = 41,
618 S_START_SUB_AGENT = 51,
636 S_not_empty_map = 69,
640 S_not_empty_list = 73,
641 S_unknown_map_entry = 74,
642 S_agent_syntax_map = 75,
644 S_global_object = 77,
646 S_global_object_comma = 79,
647 S_global_params = 80,
658 S_cert_required = 91,
663 S_hooks_libraries = 96,
665 S_hooks_libraries_list = 98,
666 S_not_empty_hooks_libraries_list = 99,
667 S_hooks_library = 100,
669 S_hooks_params = 102,
675 S_control_sockets = 108,
677 S_control_sockets_params = 110,
678 S_control_socket = 111,
679 S_dhcp4_server_socket = 112,
681 S_dhcp6_server_socket = 114,
683 S_d2_server_socket = 116,
685 S_control_socket_params = 118,
686 S_control_socket_param = 119,
691 S_socket_type_value = 124,
692 S_authentication = 125,
698 S_auth_type_value = 131,
705 S_clients_list = 138,
706 S_not_empty_clients_list = 139,
709 S_clients_params = 142,
710 S_clients_param = 143,
717 S_password_file = 150,
721 S_loggers_entries = 154,
722 S_logger_entry = 155,
724 S_logger_params = 157,
725 S_logger_param = 158,
731 S_output_options_list = 164,
733 S_output_options_list_content = 166,
734 S_output_entry = 167,
736 S_output_params_list = 169,
737 S_output_params = 170,
760 template <
typename Base>
772 #if 201103L <= YY_CPLUSPLUS
775 : Base (std::move (that))
777 , location (std::move (that.location))
779 switch (this->kind ())
781 case symbol_kind::S_value:
782 case symbol_kind::S_map_value:
783 case symbol_kind::S_socket_type_value:
784 case symbol_kind::S_auth_type_value:
785 value.move<
ElementPtr > (std::move (that.value));
788 case symbol_kind::S_BOOLEAN:
789 value.move<
bool > (std::move (that.value));
792 case symbol_kind::S_FLOAT:
793 value.move<
double > (std::move (that.value));
796 case symbol_kind::S_INTEGER:
797 value.move< int64_t > (std::move (that.value));
800 case symbol_kind::S_STRING:
801 value.move< std::string > (std::move (that.value));
815 #if 201103L <= YY_CPLUSPLUS
818 , location (std::move (l))
827 #if 201103L <= YY_CPLUSPLUS
830 , value (std::move (v))
831 , location (std::move (l))
841 #if 201103L <= YY_CPLUSPLUS
844 , value (std::move (v))
845 , location (std::move (l))
855 #if 201103L <= YY_CPLUSPLUS
858 , value (std::move (v))
859 , location (std::move (l))
869 #if 201103L <= YY_CPLUSPLUS
872 , value (std::move (v))
873 , location (std::move (l))
883 #if 201103L <= YY_CPLUSPLUS
886 , value (std::move (v))
887 , location (std::move (l))
921 case symbol_kind::S_value:
922 case symbol_kind::S_map_value:
923 case symbol_kind::S_socket_type_value:
924 case symbol_kind::S_auth_type_value:
925 value.template destroy< ElementPtr > ();
928 case symbol_kind::S_BOOLEAN:
929 value.template destroy< bool > ();
932 case symbol_kind::S_FLOAT:
933 value.template destroy< double > ();
936 case symbol_kind::S_INTEGER:
937 value.template destroy< int64_t > ();
940 case symbol_kind::S_STRING:
941 value.template destroy< std::string > ();
973 #if YY_CPLUSPLUS < 201103L
988 #if 201103L <= YY_CPLUSPLUS
1032 #if 201103L <= YY_CPLUSPLUS
1040 #if !defined _MSC_VER || defined __clang__
1042 || (token::TOKEN_AGENT_error <= tok && tok <= token::TOKEN_START_SUB_AGENT));
1045 #if 201103L <= YY_CPLUSPLUS
1053 #if !defined _MSC_VER || defined __clang__
1057 #if 201103L <= YY_CPLUSPLUS
1065 #if !defined _MSC_VER || defined __clang__
1069 #if 201103L <= YY_CPLUSPLUS
1077 #if !defined _MSC_VER || defined __clang__
1081 #if 201103L <= YY_CPLUSPLUS
1089 #if !defined _MSC_VER || defined __clang__
1099 #if 201103L <= YY_CPLUSPLUS
1112 virtual int parse ();
1118 void set_debug_stream (std::ostream &);
1141 #if 201103L <= YY_CPLUSPLUS
1146 return symbol_type (token::TOKEN_END, std::move (l));
1156 #if 201103L <= YY_CPLUSPLUS
1159 make_AGENT_error (location_type l)
1161 return symbol_type (token::TOKEN_AGENT_error, std::move (l));
1171 #if 201103L <= YY_CPLUSPLUS
1174 make_AGENT_UNDEF (location_type l)
1176 return symbol_type (token::TOKEN_AGENT_UNDEF, std::move (l));
1186 #if 201103L <= YY_CPLUSPLUS
1189 make_COMMA (location_type l)
1191 return symbol_type (token::TOKEN_COMMA, std::move (l));
1201 #if 201103L <= YY_CPLUSPLUS
1204 make_COLON (location_type l)
1206 return symbol_type (token::TOKEN_COLON, std::move (l));
1216 #if 201103L <= YY_CPLUSPLUS
1219 make_LSQUARE_BRACKET (location_type l)
1221 return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l));
1228 return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
1231 #if 201103L <= YY_CPLUSPLUS
1234 make_RSQUARE_BRACKET (location_type l)
1236 return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l));
1243 return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
1246 #if 201103L <= YY_CPLUSPLUS
1249 make_LCURLY_BRACKET (location_type l)
1251 return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l));
1258 return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
1261 #if 201103L <= YY_CPLUSPLUS
1264 make_RCURLY_BRACKET (location_type l)
1266 return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l));
1273 return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
1276 #if 201103L <= YY_CPLUSPLUS
1279 make_NULL_TYPE (location_type l)
1281 return symbol_type (token::TOKEN_NULL_TYPE, std::move (l));
1291 #if 201103L <= YY_CPLUSPLUS
1294 make_CONTROL_AGENT (location_type l)
1296 return symbol_type (token::TOKEN_CONTROL_AGENT, std::move (l));
1303 return symbol_type (token::TOKEN_CONTROL_AGENT, l);
1306 #if 201103L <= YY_CPLUSPLUS
1309 make_HTTP_HOST (location_type l)
1311 return symbol_type (token::TOKEN_HTTP_HOST, std::move (l));
1321 #if 201103L <= YY_CPLUSPLUS
1324 make_HTTP_PORT (location_type l)
1326 return symbol_type (token::TOKEN_HTTP_PORT, std::move (l));
1336 #if 201103L <= YY_CPLUSPLUS
1339 make_USER_CONTEXT (location_type l)
1341 return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l));
1348 return symbol_type (token::TOKEN_USER_CONTEXT, l);
1351 #if 201103L <= YY_CPLUSPLUS
1354 make_COMMENT (location_type l)
1356 return symbol_type (token::TOKEN_COMMENT, std::move (l));
1366 #if 201103L <= YY_CPLUSPLUS
1369 make_AUTHENTICATION (location_type l)
1371 return symbol_type (token::TOKEN_AUTHENTICATION, std::move (l));
1378 return symbol_type (token::TOKEN_AUTHENTICATION, l);
1381 #if 201103L <= YY_CPLUSPLUS
1384 make_TYPE (location_type l)
1386 return symbol_type (token::TOKEN_TYPE, std::move (l));
1396 #if 201103L <= YY_CPLUSPLUS
1399 make_BASIC (location_type l)
1401 return symbol_type (token::TOKEN_BASIC, std::move (l));
1411 #if 201103L <= YY_CPLUSPLUS
1414 make_REALM (location_type l)
1416 return symbol_type (token::TOKEN_REALM, std::move (l));
1426 #if 201103L <= YY_CPLUSPLUS
1429 make_DIRECTORY (location_type l)
1431 return symbol_type (token::TOKEN_DIRECTORY, std::move (l));
1441 #if 201103L <= YY_CPLUSPLUS
1444 make_CLIENTS (location_type l)
1446 return symbol_type (token::TOKEN_CLIENTS, std::move (l));
1456 #if 201103L <= YY_CPLUSPLUS
1459 make_USER (location_type l)
1461 return symbol_type (token::TOKEN_USER, std::move (l));
1471 #if 201103L <= YY_CPLUSPLUS
1474 make_USER_FILE (location_type l)
1476 return symbol_type (token::TOKEN_USER_FILE, std::move (l));
1486 #if 201103L <= YY_CPLUSPLUS
1489 make_PASSWORD (location_type l)
1491 return symbol_type (token::TOKEN_PASSWORD, std::move (l));
1501 #if 201103L <= YY_CPLUSPLUS
1504 make_PASSWORD_FILE (location_type l)
1506 return symbol_type (token::TOKEN_PASSWORD_FILE, std::move (l));
1513 return symbol_type (token::TOKEN_PASSWORD_FILE, l);
1516 #if 201103L <= YY_CPLUSPLUS
1519 make_TRUST_ANCHOR (location_type l)
1521 return symbol_type (token::TOKEN_TRUST_ANCHOR, std::move (l));
1528 return symbol_type (token::TOKEN_TRUST_ANCHOR, l);
1531 #if 201103L <= YY_CPLUSPLUS
1534 make_CERT_FILE (location_type l)
1536 return symbol_type (token::TOKEN_CERT_FILE, std::move (l));
1546 #if 201103L <= YY_CPLUSPLUS
1549 make_KEY_FILE (location_type l)
1551 return symbol_type (token::TOKEN_KEY_FILE, std::move (l));
1561 #if 201103L <= YY_CPLUSPLUS
1564 make_CERT_REQUIRED (location_type l)
1566 return symbol_type (token::TOKEN_CERT_REQUIRED, std::move (l));
1573 return symbol_type (token::TOKEN_CERT_REQUIRED, l);
1576 #if 201103L <= YY_CPLUSPLUS
1579 make_CONTROL_SOCKETS (location_type l)
1581 return symbol_type (token::TOKEN_CONTROL_SOCKETS, std::move (l));
1588 return symbol_type (token::TOKEN_CONTROL_SOCKETS, l);
1591 #if 201103L <= YY_CPLUSPLUS
1594 make_DHCP4_SERVER (location_type l)
1596 return symbol_type (token::TOKEN_DHCP4_SERVER, std::move (l));
1603 return symbol_type (token::TOKEN_DHCP4_SERVER, l);
1606 #if 201103L <= YY_CPLUSPLUS
1609 make_DHCP6_SERVER (location_type l)
1611 return symbol_type (token::TOKEN_DHCP6_SERVER, std::move (l));
1618 return symbol_type (token::TOKEN_DHCP6_SERVER, l);
1621 #if 201103L <= YY_CPLUSPLUS
1624 make_D2_SERVER (location_type l)
1626 return symbol_type (token::TOKEN_D2_SERVER, std::move (l));
1636 #if 201103L <= YY_CPLUSPLUS
1639 make_SOCKET_NAME (location_type l)
1641 return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l));
1651 #if 201103L <= YY_CPLUSPLUS
1654 make_SOCKET_TYPE (location_type l)
1656 return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l));
1666 #if 201103L <= YY_CPLUSPLUS
1669 make_UNIX (location_type l)
1671 return symbol_type (token::TOKEN_UNIX, std::move (l));
1681 #if 201103L <= YY_CPLUSPLUS
1684 make_HOOKS_LIBRARIES (location_type l)
1686 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l));
1693 return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
1696 #if 201103L <= YY_CPLUSPLUS
1699 make_LIBRARY (location_type l)
1701 return symbol_type (token::TOKEN_LIBRARY, std::move (l));
1711 #if 201103L <= YY_CPLUSPLUS
1714 make_PARAMETERS (location_type l)
1716 return symbol_type (token::TOKEN_PARAMETERS, std::move (l));
1726 #if 201103L <= YY_CPLUSPLUS
1729 make_LOGGERS (location_type l)
1731 return symbol_type (token::TOKEN_LOGGERS, std::move (l));
1741 #if 201103L <= YY_CPLUSPLUS
1744 make_NAME (location_type l)
1746 return symbol_type (token::TOKEN_NAME, std::move (l));
1756 #if 201103L <= YY_CPLUSPLUS
1759 make_OUTPUT_OPTIONS (location_type l)
1761 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l));
1768 return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
1771 #if 201103L <= YY_CPLUSPLUS
1774 make_OUTPUT (location_type l)
1776 return symbol_type (token::TOKEN_OUTPUT, std::move (l));
1786 #if 201103L <= YY_CPLUSPLUS
1789 make_DEBUGLEVEL (location_type l)
1791 return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l));
1801 #if 201103L <= YY_CPLUSPLUS
1804 make_SEVERITY (location_type l)
1806 return symbol_type (token::TOKEN_SEVERITY, std::move (l));
1816 #if 201103L <= YY_CPLUSPLUS
1819 make_FLUSH (location_type l)
1821 return symbol_type (token::TOKEN_FLUSH, std::move (l));
1831 #if 201103L <= YY_CPLUSPLUS
1834 make_MAXSIZE (location_type l)
1836 return symbol_type (token::TOKEN_MAXSIZE, std::move (l));
1846 #if 201103L <= YY_CPLUSPLUS
1849 make_MAXVER (location_type l)
1851 return symbol_type (token::TOKEN_MAXVER, std::move (l));
1861 #if 201103L <= YY_CPLUSPLUS
1864 make_PATTERN (location_type l)
1866 return symbol_type (token::TOKEN_PATTERN, std::move (l));
1876 #if 201103L <= YY_CPLUSPLUS
1879 make_START_JSON (location_type l)
1881 return symbol_type (token::TOKEN_START_JSON, std::move (l));
1891 #if 201103L <= YY_CPLUSPLUS
1894 make_START_AGENT (location_type l)
1896 return symbol_type (token::TOKEN_START_AGENT, std::move (l));
1906 #if 201103L <= YY_CPLUSPLUS
1909 make_START_SUB_AGENT (location_type l)
1911 return symbol_type (token::TOKEN_START_SUB_AGENT, std::move (l));
1918 return symbol_type (token::TOKEN_START_SUB_AGENT, l);
1921 #if 201103L <= YY_CPLUSPLUS
1924 make_STRING (std::string v, location_type l)
1926 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
1936 #if 201103L <= YY_CPLUSPLUS
1939 make_INTEGER (int64_t v, location_type l)
1941 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
1951 #if 201103L <= YY_CPLUSPLUS
1954 make_FLOAT (
double v, location_type l)
1956 return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l));
1966 #if 201103L <= YY_CPLUSPLUS
1969 make_BOOLEAN (
bool v, location_type l)
1971 return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l));
2002 #if YY_CPLUSPLUS < 201103L
2011 typedef short state_type;
2014 int yy_syntax_error_arguments_ (
const context& yyctx,
2015 symbol_kind_type yyarg[],
int yyargn)
const;
2019 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2023 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2027 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
2031 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
2033 static const short yypact_ninf_;
2034 static const signed char yytable_ninf_;
2039 static symbol_kind_type yytranslate_ (
int t)
YY_NOEXCEPT;
2042 static std::string yytnamerr_ (
const char *yystr);
2045 static const char*
const yytname_[];
2051 static const short yypact_[];
2056 static const unsigned char yydefact_[];
2059 static const short yypgoto_[];
2062 static const short yydefgoto_[];
2067 static const short yytable_[];
2069 static const short yycheck_[];
2073 static const unsigned char yystos_[];
2076 static const unsigned char yyr1_[];
2079 static const signed char yyr2_[];
2084 static const short yyrline_[];
2086 virtual void yy_reduce_print_ (
int r)
const;
2088 virtual void yy_stack_print_ ()
const;
2093 std::ostream* yycdebug_;
2098 template <
typename Base>
2099 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
2106 template <
typename Base>
2107 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
2117 typedef state_type kind_type;
2129 void move (by_state& that);
2137 enum { empty_state = 0 };
2145 struct stack_symbol_type : basic_symbol<by_state>
2148 typedef basic_symbol<by_state> super_type;
2150 stack_symbol_type ();
2152 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2154 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
2155 #if YY_CPLUSPLUS < 201103L
2158 stack_symbol_type& operator= (stack_symbol_type& that);
2162 stack_symbol_type& operator= (
const stack_symbol_type& that);
2167 template <
typename T,
typename S = std::vector<T> >
2172 typedef typename S::iterator iterator;
2173 typedef typename S::const_iterator const_iterator;
2174 typedef typename S::size_type size_type;
2175 typedef typename std::ptrdiff_t index_type;
2181 #if 201103L <= YY_CPLUSPLUS
2183 stack (
const stack&) =
delete;
2185 stack& operator= (
const stack&) =
delete;
2192 operator[] (index_type i)
const
2194 return seq_[size_type (size () - 1 - i)];
2201 operator[] (index_type i)
2203 return seq_[size_type (size () - 1 - i)];
2212 seq_.push_back (T ());
2213 operator[] (0).move (t);
2235 return index_type (seq_.size ());
2242 return seq_.begin ();
2262 operator[] (index_type i)
const
2264 return stack_[range_ - i];
2268 const stack& stack_;
2273 #if YY_CPLUSPLUS < 201103L
2275 stack (
const stack&);
2277 stack& operator= (
const stack&);
2285 typedef stack<stack_symbol_type> stack_type;
2288 stack_type yystack_;
2295 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2303 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
2332 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2334 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2338 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2350 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2351 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2352 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2353 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2354 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2355 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2356 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2357 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2358 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2359 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2360 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2361 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2362 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2366 const int code_max = 310;
2369 return symbol_kind::S_YYEOF;
2370 else if (t <= code_max)
2371 return static_cast <symbol_kind_type
> (translate_table[t]);
2373 return symbol_kind::S_YYUNDEF;
2377 template <
typename Base>
2381 , location (that.location)
2383 switch (this->kind ())
2417 template <
typename Base>
2421 return this->kind ();
2425 template <
typename Base>
2432 template <
typename Base>
2436 super_type::move (s);
2437 switch (this->kind ())
2475 #if 201103L <= YY_CPLUSPLUS
2478 : kind_ (that.kind_)
2486 : kind_ (that.kind_)
2491 : kind_ (yytranslate_ (t))
2523 return this->kind ();
2527 #line 14 "agent_parser.yy"
2529 #line 2530 "agent_parser.h"
Forward declaration of the ParserContext class.
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
symbol_kind_type token() const YY_NOEXCEPT
const symbol_type & lookahead() 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.
void destroy()
Destroy the stored T.
T & emplace()
Instantiate an empty T in here.
void copy(const self_type &that)
Copy the content of that to this.
value_type(YY_RVREF(T) t)
Construct and fill.
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
value_type self_type
Type of *this.
value_type() YY_NOEXCEPT
Empty construction.
T & build()
Instantiate an empty T in here.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
void move(self_type &that)
Move the content of that to this.
long double yyalign_me_
Strongest alignment constraints.
T & as() YY_NOEXCEPT
Accessor to a built T.
T & emplace(const T &t)
Instantiate a T in here from t.
T & build(const T &t)
Instantiate a T in here from t.
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
static symbol_type make_D2_SERVER(const location_type &l)
static symbol_type make_PASSWORD_FILE(const location_type &l)
static symbol_type make_SOCKET_TYPE(const location_type &l)
static symbol_type make_HTTP_HOST(const location_type &l)
static symbol_type make_END(const location_type &l)
static symbol_type make_COMMENT(const location_type &l)
static symbol_type make_NULL_TYPE(const location_type &l)
static symbol_type make_AUTHENTICATION(const location_type &l)
value_type semantic_type
Backward compatibility (Bison 3.8).
static symbol_type make_CERT_FILE(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_RSQUARE_BRACKET(const location_type &l)
static symbol_type make_COLON(const location_type &l)
static symbol_type make_BASIC(const location_type &l)
static symbol_type make_PATTERN(const location_type &l)
int debug_level_type
Type for debugging levels.
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_STRING(const std::string &v, const location_type &l)
static symbol_type make_LOGGERS(const location_type &l)
static symbol_type make_SOCKET_NAME(const location_type &l)
location location_type
Symbol locations.
static symbol_type make_CONTROL_AGENT(const location_type &l)
static symbol_type make_AGENT_error(const location_type &l)
static symbol_type make_RCURLY_BRACKET(const location_type &l)
static symbol_type make_DEBUGLEVEL(const location_type &l)
static symbol_type make_START_AGENT(const location_type &l)
static symbol_type make_LCURLY_BRACKET(const location_type &l)
static symbol_type make_FLUSH(const location_type &l)
static symbol_type make_CERT_REQUIRED(const location_type &l)
static symbol_type make_MAXVER(const location_type &l)
static symbol_type make_PASSWORD(const location_type &l)
static symbol_type make_START_JSON(const location_type &l)
static symbol_type make_CONTROL_SOCKETS(const location_type &l)
static symbol_type make_NAME(const location_type &l)
static symbol_type make_COMMA(const location_type &l)
static symbol_type make_HOOKS_LIBRARIES(const location_type &l)
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
static symbol_type make_OUTPUT(const location_type &l)
static symbol_type make_CLIENTS(const location_type &l)
static symbol_type make_DHCP4_SERVER(const location_type &l)
static symbol_type make_DHCP6_SERVER(const location_type &l)
static symbol_type make_REALM(const location_type &l)
static symbol_type make_TRUST_ANCHOR(const location_type &l)
static symbol_type make_HTTP_PORT(const location_type &l)
static symbol_type make_PARAMETERS(const location_type &l)
static symbol_type make_SEVERITY(const location_type &l)
static symbol_type make_USER(const location_type &l)
static symbol_type make_USER_FILE(const location_type &l)
static symbol_type make_BOOLEAN(const bool &v, const location_type &l)
static symbol_type make_LIBRARY(const location_type &l)
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
static symbol_type make_KEY_FILE(const location_type &l)
static symbol_type make_AGENT_UNDEF(const location_type &l)
static symbol_type make_START_SUB_AGENT(const location_type &l)
static symbol_type make_DIRECTORY(const location_type &l)
static symbol_type make_UNIX(const location_type &l)
static symbol_type make_MAXSIZE(const location_type &l)
static symbol_type make_USER_CONTEXT(const location_type &l)
static symbol_type make_TYPE(const location_type &l)
static symbol_type make_INTEGER(const int64_t &v, const location_type &l)
Parser context is a wrapper around flex/bison instances dedicated to Control-agent config file parser...
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.
Base super_type
Alias to Base.
basic_symbol(const basic_symbol &that)
Copy constructor.
basic_symbol(typename Base::kind_type t, const int64_t &v, const location_type &l)
location_type location
The location.
basic_symbol() YY_NOEXCEPT
Default constructor.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
bool empty() const YY_NOEXCEPT
Whether empty.
~basic_symbol()
Destroy the symbol.
value_type value
The semantic value.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
basic_symbol(typename Base::kind_type t, const ElementPtr &v, const location_type &l)
basic_symbol(typename Base::kind_type t, const double &v, const location_type &l)
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
basic_symbol(typename Base::kind_type t, const bool &v, const location_type &l)
Type access provider for token (enum) based symbols.
by_kind() YY_NOEXCEPT
Default constructor.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
token_kind_type kind_type
The symbol kind as needed by the constructor.
symbol_kind_type kind_
The symbol kind.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
void clear() YY_NOEXCEPT
Record that this symbol is empty.
void move(by_kind &that)
Steal the symbol kind from that.
"External" symbols: returned by the scanner.
symbol_type() YY_NOEXCEPT
Empty symbol.
basic_symbol< by_kind > super_type
Superclass.
Syntax errors thrown from user actions.
syntax_error(const syntax_error &s)
syntax_error(const location_type &l, const std::string &m)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).