45#ifndef YY_EVAL_PARSER_H_INCLUDED
46# define YY_EVAL_PARSER_H_INCLUDED
54#include <boost/lexical_cast.hpp>
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
104# include "location.hh"
108# define EVAL_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
189# define YY_NULLPTR ((void*)0)
207namespace isc {
namespace eval {
219# pragma GCC message "bison: do not #define EVALSTYPE 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
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>
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
407 template <
typename T>
412 return static_cast<T*
> (yyp);
416 template <
typename T>
421 return static_cast<const T*
> (yyp);
443 char dummy6[
sizeof (int8_t)];
450 char dummy7[
sizeof (std::string)];
454 char dummy8[
sizeof (uint16_t)];
458 char dummy9[
sizeof (uint32_t)];
462 enum { size =
sizeof (union_type) };
474 const std::type_info *yytypeid_;
488 : std::runtime_error (m)
493 : std::runtime_error (s.what ())
507 TOKEN_EVALEMPTY = -2,
509 TOKEN_EVALerror = 256,
510 TOKEN_EVALUNDEF = 257,
521 TOKEN_PEERADDR = 268,
522 TOKEN_LINKADDR = 269,
523 TOKEN_LBRACKET = 270,
524 TOKEN_RBRACKET = 271,
542 TOKEN_SUBSTRING = 289,
549 TOKEN_TOHEXSTRING = 296,
550 TOKEN_ADDRTOTEXT = 297,
551 TOKEN_INT8TOTEXT = 298,
552 TOKEN_INT16TOTEXT = 299,
553 TOKEN_INT32TOTEXT = 300,
554 TOKEN_UINT8TOTEXT = 301,
555 TOKEN_UINT16TOTEXT = 302,
556 TOKEN_UINT32TOTEXT = 303,
562 TOKEN_VENDOR_CLASS = 309,
566 TOKEN_ENTERPRISE = 313,
568 TOKEN_TOPLEVEL_BOOL = 315,
569 TOKEN_TOPLEVEL_STRING = 316,
572 TOKEN_HEXSTRING = 319,
573 TOKEN_OPTION_NAME = 320,
574 TOKEN_IP_ADDRESS = 321
653 S_TOPLEVEL_BOOL = 60,
654 S_TOPLEVEL_STRING = 61,
667 S_sub_option_code = 74,
668 S_option_repr_type = 75,
671 S_enterprise_id = 78,
693 template <
typename Base>
705#if 201103L <= YY_CPLUSPLUS
708 : Base (std::move (that))
710 , location (std::move (that.location))
712 switch (this->kind ())
714 case symbol_kind::S_option_repr_type:
718 case symbol_kind::S_pkt4_field:
722 case symbol_kind::S_pkt6_field:
726 case symbol_kind::S_pkt_metadata:
730 case symbol_kind::S_relay6_field:
734 case symbol_kind::S_nest_level:
735 value.move< int8_t > (std::move (that.value));
738 case symbol_kind::S_STRING:
739 case symbol_kind::S_INTEGER:
740 case symbol_kind::S_HEXSTRING:
741 case symbol_kind::S_OPTION_NAME:
742 case symbol_kind::S_IP_ADDRESS:
743 value.move< std::string > (std::move (that.value));
746 case symbol_kind::S_option_code:
747 case symbol_kind::S_sub_option_code:
748 value.move< uint16_t > (std::move (that.value));
751 case symbol_kind::S_integer_expr:
752 case symbol_kind::S_enterprise_id:
753 value.move< uint32_t > (std::move (that.value));
764 basic_symbol (
const basic_symbol& that);
767#if 201103L <= YY_CPLUSPLUS
768 basic_symbol (
typename Base::kind_type t, location_type&& l)
770 , location (std::move (l))
779#if 201103L <= YY_CPLUSPLUS
782 , value (std::move (v))
783 , location (std::move (l))
793#if 201103L <= YY_CPLUSPLUS
796 , value (std::move (v))
797 , location (std::move (l))
807#if 201103L <= YY_CPLUSPLUS
810 , value (std::move (v))
811 , location (std::move (l))
821#if 201103L <= YY_CPLUSPLUS
824 , value (std::move (v))
825 , location (std::move (l))
835#if 201103L <= YY_CPLUSPLUS
838 , value (std::move (v))
839 , location (std::move (l))
849#if 201103L <= YY_CPLUSPLUS
852 , value (std::move (v))
853 , location (std::move (l))
863#if 201103L <= YY_CPLUSPLUS
866 , value (std::move (v))
867 , location (std::move (l))
877#if 201103L <= YY_CPLUSPLUS
880 , value (std::move (v))
881 , location (std::move (l))
891#if 201103L <= YY_CPLUSPLUS
894 , value (std::move (v))
895 , location (std::move (l))
918 basic_symbol<Base>& yysym = *
this;
929 case symbol_kind::S_option_repr_type:
930 value.template destroy< TokenOption::RepresentationType > ();
933 case symbol_kind::S_pkt4_field:
934 value.template destroy< TokenPkt4::FieldType > ();
937 case symbol_kind::S_pkt6_field:
938 value.template destroy< TokenPkt6::FieldType > ();
941 case symbol_kind::S_pkt_metadata:
942 value.template destroy< TokenPkt::MetadataType > ();
945 case symbol_kind::S_relay6_field:
946 value.template destroy< TokenRelay6Field::FieldType > ();
949 case symbol_kind::S_nest_level:
950 value.template destroy< int8_t > ();
953 case symbol_kind::S_STRING:
954 case symbol_kind::S_INTEGER:
955 case symbol_kind::S_HEXSTRING:
956 case symbol_kind::S_OPTION_NAME:
957 case symbol_kind::S_IP_ADDRESS:
958 value.template destroy< std::string > ();
961 case symbol_kind::S_option_code:
962 case symbol_kind::S_sub_option_code:
963 value.template destroy< uint16_t > ();
966 case symbol_kind::S_integer_expr:
967 case symbol_kind::S_enterprise_id:
968 value.template destroy< uint32_t > ();
1000#if YY_CPLUSPLUS < 201103L
1015#if 201103L <= YY_CPLUSPLUS
1059#if 201103L <= YY_CPLUSPLUS
1067#if !defined _MSC_VER || defined __clang__
1069 || (token::TOKEN_EVALerror <= tok && tok <= token::TOKEN_TOPLEVEL_STRING));
1072#if 201103L <= YY_CPLUSPLUS
1080#if !defined _MSC_VER || defined __clang__
1081 EVAL_ASSERT ((token::TOKEN_STRING <= tok && tok <= token::TOKEN_IP_ADDRESS));
1090#if 201103L <= YY_CPLUSPLUS
1103 virtual int parse ();
1109 void set_debug_stream (std::ostream &);
1112 typedef
int debug_level_type;
1116 void set_debug_level (debug_level_type l);
1122 virtual void error (
const location_type& loc,
const std::string& msg);
1125 void error (
const syntax_error& err);
1129 static std::string symbol_name (symbol_kind_type yysymbol);
1132#if 201103L <= YY_CPLUSPLUS
1135 make_END (location_type l)
1137 return symbol_type (token::TOKEN_END, std::move (l));
1147#if 201103L <= YY_CPLUSPLUS
1150 make_EVALerror (location_type l)
1152 return symbol_type (token::TOKEN_EVALerror, std::move (l));
1162#if 201103L <= YY_CPLUSPLUS
1165 make_EVALUNDEF (location_type l)
1167 return symbol_type (token::TOKEN_EVALUNDEF, std::move (l));
1177#if 201103L <= YY_CPLUSPLUS
1180 make_LPAREN (location_type l)
1182 return symbol_type (token::TOKEN_LPAREN, std::move (l));
1192#if 201103L <= YY_CPLUSPLUS
1195 make_RPAREN (location_type l)
1197 return symbol_type (token::TOKEN_RPAREN, std::move (l));
1207#if 201103L <= YY_CPLUSPLUS
1210 make_NOT (location_type l)
1212 return symbol_type (token::TOKEN_NOT, std::move (l));
1222#if 201103L <= YY_CPLUSPLUS
1225 make_AND (location_type l)
1227 return symbol_type (token::TOKEN_AND, std::move (l));
1237#if 201103L <= YY_CPLUSPLUS
1240 make_OR (location_type l)
1242 return symbol_type (token::TOKEN_OR, std::move (l));
1252#if 201103L <= YY_CPLUSPLUS
1255 make_EQUAL (location_type l)
1257 return symbol_type (token::TOKEN_EQUAL, std::move (l));
1267#if 201103L <= YY_CPLUSPLUS
1270 make_OPTION (location_type l)
1272 return symbol_type (token::TOKEN_OPTION, std::move (l));
1282#if 201103L <= YY_CPLUSPLUS
1285 make_RELAY4 (location_type l)
1287 return symbol_type (token::TOKEN_RELAY4, std::move (l));
1297#if 201103L <= YY_CPLUSPLUS
1300 make_RELAY6 (location_type l)
1302 return symbol_type (token::TOKEN_RELAY6, std::move (l));
1312#if 201103L <= YY_CPLUSPLUS
1315 make_MEMBER (location_type l)
1317 return symbol_type (token::TOKEN_MEMBER, std::move (l));
1327#if 201103L <= YY_CPLUSPLUS
1330 make_PEERADDR (location_type l)
1332 return symbol_type (token::TOKEN_PEERADDR, std::move (l));
1342#if 201103L <= YY_CPLUSPLUS
1345 make_LINKADDR (location_type l)
1347 return symbol_type (token::TOKEN_LINKADDR, std::move (l));
1357#if 201103L <= YY_CPLUSPLUS
1360 make_LBRACKET (location_type l)
1362 return symbol_type (token::TOKEN_LBRACKET, std::move (l));
1372#if 201103L <= YY_CPLUSPLUS
1375 make_RBRACKET (location_type l)
1377 return symbol_type (token::TOKEN_RBRACKET, std::move (l));
1387#if 201103L <= YY_CPLUSPLUS
1390 make_DOT (location_type l)
1392 return symbol_type (token::TOKEN_DOT, std::move (l));
1402#if 201103L <= YY_CPLUSPLUS
1405 make_TEXT (location_type l)
1407 return symbol_type (token::TOKEN_TEXT, std::move (l));
1417#if 201103L <= YY_CPLUSPLUS
1420 make_HEX (location_type l)
1422 return symbol_type (token::TOKEN_HEX, std::move (l));
1432#if 201103L <= YY_CPLUSPLUS
1435 make_EXISTS (location_type l)
1437 return symbol_type (token::TOKEN_EXISTS, std::move (l));
1447#if 201103L <= YY_CPLUSPLUS
1450 make_PKT (location_type l)
1452 return symbol_type (token::TOKEN_PKT, std::move (l));
1462#if 201103L <= YY_CPLUSPLUS
1465 make_IFACE (location_type l)
1467 return symbol_type (token::TOKEN_IFACE, std::move (l));
1477#if 201103L <= YY_CPLUSPLUS
1480 make_SRC (location_type l)
1482 return symbol_type (token::TOKEN_SRC, std::move (l));
1492#if 201103L <= YY_CPLUSPLUS
1495 make_DST (location_type l)
1497 return symbol_type (token::TOKEN_DST, std::move (l));
1507#if 201103L <= YY_CPLUSPLUS
1510 make_LEN (location_type l)
1512 return symbol_type (token::TOKEN_LEN, std::move (l));
1522#if 201103L <= YY_CPLUSPLUS
1525 make_PKT4 (location_type l)
1527 return symbol_type (token::TOKEN_PKT4, std::move (l));
1537#if 201103L <= YY_CPLUSPLUS
1540 make_CHADDR (location_type l)
1542 return symbol_type (token::TOKEN_CHADDR, std::move (l));
1552#if 201103L <= YY_CPLUSPLUS
1555 make_HLEN (location_type l)
1557 return symbol_type (token::TOKEN_HLEN, std::move (l));
1567#if 201103L <= YY_CPLUSPLUS
1570 make_HTYPE (location_type l)
1572 return symbol_type (token::TOKEN_HTYPE, std::move (l));
1582#if 201103L <= YY_CPLUSPLUS
1585 make_CIADDR (location_type l)
1587 return symbol_type (token::TOKEN_CIADDR, std::move (l));
1597#if 201103L <= YY_CPLUSPLUS
1600 make_GIADDR (location_type l)
1602 return symbol_type (token::TOKEN_GIADDR, std::move (l));
1612#if 201103L <= YY_CPLUSPLUS
1615 make_YIADDR (location_type l)
1617 return symbol_type (token::TOKEN_YIADDR, std::move (l));
1627#if 201103L <= YY_CPLUSPLUS
1630 make_SIADDR (location_type l)
1632 return symbol_type (token::TOKEN_SIADDR, std::move (l));
1642#if 201103L <= YY_CPLUSPLUS
1645 make_SUBSTRING (location_type l)
1647 return symbol_type (token::TOKEN_SUBSTRING, std::move (l));
1657#if 201103L <= YY_CPLUSPLUS
1660 make_SPLIT (location_type l)
1662 return symbol_type (token::TOKEN_SPLIT, std::move (l));
1672#if 201103L <= YY_CPLUSPLUS
1675 make_ALL (location_type l)
1677 return symbol_type (token::TOKEN_ALL, std::move (l));
1687#if 201103L <= YY_CPLUSPLUS
1690 make_COMA (location_type l)
1692 return symbol_type (token::TOKEN_COMA, std::move (l));
1702#if 201103L <= YY_CPLUSPLUS
1705 make_CONCAT (location_type l)
1707 return symbol_type (token::TOKEN_CONCAT, std::move (l));
1717#if 201103L <= YY_CPLUSPLUS
1720 make_PLUS (location_type l)
1722 return symbol_type (token::TOKEN_PLUS, std::move (l));
1732#if 201103L <= YY_CPLUSPLUS
1735 make_IFELSE (location_type l)
1737 return symbol_type (token::TOKEN_IFELSE, std::move (l));
1747#if 201103L <= YY_CPLUSPLUS
1750 make_TOHEXSTRING (location_type l)
1752 return symbol_type (token::TOKEN_TOHEXSTRING, std::move (l));
1762#if 201103L <= YY_CPLUSPLUS
1765 make_ADDRTOTEXT (location_type l)
1767 return symbol_type (token::TOKEN_ADDRTOTEXT, std::move (l));
1777#if 201103L <= YY_CPLUSPLUS
1780 make_INT8TOTEXT (location_type l)
1782 return symbol_type (token::TOKEN_INT8TOTEXT, std::move (l));
1792#if 201103L <= YY_CPLUSPLUS
1795 make_INT16TOTEXT (location_type l)
1797 return symbol_type (token::TOKEN_INT16TOTEXT, std::move (l));
1807#if 201103L <= YY_CPLUSPLUS
1810 make_INT32TOTEXT (location_type l)
1812 return symbol_type (token::TOKEN_INT32TOTEXT, std::move (l));
1822#if 201103L <= YY_CPLUSPLUS
1825 make_UINT8TOTEXT (location_type l)
1827 return symbol_type (token::TOKEN_UINT8TOTEXT, std::move (l));
1837#if 201103L <= YY_CPLUSPLUS
1840 make_UINT16TOTEXT (location_type l)
1842 return symbol_type (token::TOKEN_UINT16TOTEXT, std::move (l));
1849 return symbol_type (token::TOKEN_UINT16TOTEXT, l);
1852#if 201103L <= YY_CPLUSPLUS
1855 make_UINT32TOTEXT (location_type l)
1857 return symbol_type (token::TOKEN_UINT32TOTEXT, std::move (l));
1864 return symbol_type (token::TOKEN_UINT32TOTEXT, l);
1867#if 201103L <= YY_CPLUSPLUS
1870 make_LCASE (location_type l)
1872 return symbol_type (token::TOKEN_LCASE, std::move (l));
1882#if 201103L <= YY_CPLUSPLUS
1885 make_UCASE (location_type l)
1887 return symbol_type (token::TOKEN_UCASE, std::move (l));
1897#if 201103L <= YY_CPLUSPLUS
1900 make_PKT6 (location_type l)
1902 return symbol_type (token::TOKEN_PKT6, std::move (l));
1912#if 201103L <= YY_CPLUSPLUS
1915 make_MSGTYPE (location_type l)
1917 return symbol_type (token::TOKEN_MSGTYPE, std::move (l));
1927#if 201103L <= YY_CPLUSPLUS
1930 make_TRANSID (location_type l)
1932 return symbol_type (token::TOKEN_TRANSID, std::move (l));
1942#if 201103L <= YY_CPLUSPLUS
1945 make_VENDOR_CLASS (location_type l)
1947 return symbol_type (token::TOKEN_VENDOR_CLASS, std::move (l));
1954 return symbol_type (token::TOKEN_VENDOR_CLASS, l);
1957#if 201103L <= YY_CPLUSPLUS
1960 make_VENDOR (location_type l)
1962 return symbol_type (token::TOKEN_VENDOR, std::move (l));
1972#if 201103L <= YY_CPLUSPLUS
1975 make_ANY (location_type l)
1977 return symbol_type (token::TOKEN_ANY, std::move (l));
1987#if 201103L <= YY_CPLUSPLUS
1990 make_DATA (location_type l)
1992 return symbol_type (token::TOKEN_DATA, std::move (l));
2002#if 201103L <= YY_CPLUSPLUS
2005 make_ENTERPRISE (location_type l)
2007 return symbol_type (token::TOKEN_ENTERPRISE, std::move (l));
2017#if 201103L <= YY_CPLUSPLUS
2020 make_MATCH (location_type l)
2022 return symbol_type (token::TOKEN_MATCH, std::move (l));
2032#if 201103L <= YY_CPLUSPLUS
2035 make_TOPLEVEL_BOOL (location_type l)
2037 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, std::move (l));
2044 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l);
2047#if 201103L <= YY_CPLUSPLUS
2050 make_TOPLEVEL_STRING (location_type l)
2052 return symbol_type (token::TOKEN_TOPLEVEL_STRING, std::move (l));
2059 return symbol_type (token::TOKEN_TOPLEVEL_STRING, l);
2062#if 201103L <= YY_CPLUSPLUS
2065 make_STRING (std::string v, location_type l)
2067 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2077#if 201103L <= YY_CPLUSPLUS
2080 make_INTEGER (std::string v, location_type l)
2082 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2092#if 201103L <= YY_CPLUSPLUS
2095 make_HEXSTRING (std::string v, location_type l)
2097 return symbol_type (token::TOKEN_HEXSTRING, std::move (v), std::move (l));
2104 return symbol_type (token::TOKEN_HEXSTRING, v, l);
2107#if 201103L <= YY_CPLUSPLUS
2110 make_OPTION_NAME (std::string v, location_type l)
2112 return symbol_type (token::TOKEN_OPTION_NAME, std::move (v), std::move (l));
2119 return symbol_type (token::TOKEN_OPTION_NAME, v, l);
2122#if 201103L <= YY_CPLUSPLUS
2125 make_IP_ADDRESS (std::string v, location_type l)
2127 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (v), std::move (l));
2134 return symbol_type (token::TOKEN_IP_ADDRESS, v, l);
2158#if YY_CPLUSPLUS < 201103L
2167 typedef unsigned char state_type;
2170 int yy_syntax_error_arguments_ (
const context& yyctx,
2171 symbol_kind_type yyarg[],
int yyargn)
const;
2175 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2179 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2183 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
2187 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
2189 static const short yypact_ninf_;
2190 static const signed char yytable_ninf_;
2195 static symbol_kind_type yytranslate_ (
int t)
YY_NOEXCEPT;
2198 static std::string yytnamerr_ (
const char *yystr);
2201 static const char*
const yytname_[];
2207 static const short yypact_[];
2212 static const signed char yydefact_[];
2215 static const short yypgoto_[];
2218 static const unsigned char yydefgoto_[];
2223 static const unsigned char yytable_[];
2225 static const short yycheck_[];
2229 static const signed char yystos_[];
2232 static const signed char yyr1_[];
2235 static const signed char yyr2_[];
2240 static const short yyrline_[];
2242 virtual void yy_reduce_print_ (
int r)
const;
2244 virtual void yy_stack_print_ ()
const;
2249 std::ostream* yycdebug_;
2254 template <
typename Base>
2255 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
2262 template <
typename Base>
2263 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
2273 typedef state_type kind_type;
2285 void move (by_state& that);
2293 enum { empty_state = 0 };
2301 struct stack_symbol_type : basic_symbol<by_state>
2304 typedef basic_symbol<by_state> super_type;
2306 stack_symbol_type ();
2308 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2310 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
2311#if YY_CPLUSPLUS < 201103L
2314 stack_symbol_type& operator= (stack_symbol_type& that);
2318 stack_symbol_type& operator= (
const stack_symbol_type& that);
2323 template <
typename T,
typename S = std::vector<T> >
2328 typedef typename S::iterator iterator;
2329 typedef typename S::const_iterator const_iterator;
2330 typedef typename S::size_type size_type;
2331 typedef typename std::ptrdiff_t index_type;
2337#if 201103L <= YY_CPLUSPLUS
2339 stack (
const stack&) =
delete;
2341 stack& operator= (
const stack&) =
delete;
2348 operator[] (index_type i)
const
2350 return seq_[size_type (size () - 1 - i)];
2357 operator[] (index_type i)
2359 return seq_[size_type (size () - 1 - i)];
2368 seq_.push_back (T ());
2369 operator[] (0).move (t);
2391 return index_type (seq_.size ());
2398 return seq_.begin ();
2418 operator[] (index_type i)
const
2420 return stack_[range_ - i];
2424 const stack& stack_;
2429#if YY_CPLUSPLUS < 201103L
2431 stack (
const stack&);
2433 stack& operator= (
const stack&);
2441 typedef stack<stack_symbol_type> stack_type;
2444 stack_type yystack_;
2451 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2459 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
2488 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2490 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2491 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2492 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2493 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2494 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2495 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2496 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2497 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2498 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2499 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2508 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2511 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2513 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2514 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2515 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2516 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2517 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2518 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2519 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2523 const int code_max = 321;
2527 else if (t <= code_max)
2534 template <
typename Base>
2540 switch (this->kind ())
2593 template <
typename Base>
2597 return this->kind ();
2601 template <
typename Base>
2608 template <
typename Base>
2612 super_type::move (s);
2613 switch (this->kind ())
2670#if 201103L <= YY_CPLUSPLUS
2673 : kind_ (that.kind_)
2681 : kind_ (that.kind_)
2686 : kind_ (yytranslate_ (t))
2718 return this->kind ();
2724#line 2725 "parser.h"
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
RepresentationType
Token representation type.
FieldType
enum value that determines the field.
FieldType
enum value that determines the field.
MetadataType
enum value that determines the field.
FieldType
enum value that determines the field.
Evaluation context, an interface to the expression evaluation.
const location_type & location() const YY_NOEXCEPT
const symbol_type & lookahead() const YY_NOEXCEPT
symbol_kind_type token() 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.
T & emplace(const T &t)
Instantiate a T in here from t.
T & as() YY_NOEXCEPT
Accessor to a built T.
void move(self_type &that)
Move the content of that to this.
T & build(const T &t)
Instantiate a T in here from t.
value_type(YY_RVREF(T) t)
Construct and fill.
long double yyalign_me_
Strongest alignment constraints.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
T & build()
Instantiate an empty T in here.
void copy(const self_type &that)
Copy the content of that to this.
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
void destroy()
Destroy the stored T.
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
T & emplace()
Instantiate an empty T in here.
char yyraw_[size]
A buffer large enough to store any of the semantic values.
value_type() YY_NOEXCEPT
Empty construction.
value_type self_type
Type of *this.
static symbol_type make_RELAY6(const location_type &l)
static symbol_type make_INT8TOTEXT(const location_type &l)
static symbol_type make_CONCAT(const location_type &l)
static symbol_type make_TEXT(const location_type &l)
static symbol_type make_OPTION(const location_type &l)
static symbol_type make_AND(const location_type &l)
static symbol_type make_HTYPE(const location_type &l)
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
static symbol_type make_MSGTYPE(const location_type &l)
static symbol_type make_LINKADDR(const location_type &l)
static symbol_type make_TOHEXSTRING(const location_type &l)
static symbol_type make_EVALerror(const location_type &l)
static symbol_type make_PKT6(const location_type &l)
static symbol_type make_END(const location_type &l)
static symbol_type make_DST(const location_type &l)
static symbol_type make_OR(const location_type &l)
static symbol_type make_PLUS(const location_type &l)
static symbol_type make_RBRACKET(const location_type &l)
static symbol_type make_NOT(const location_type &l)
static symbol_type make_INT32TOTEXT(const location_type &l)
static symbol_type make_SIADDR(const location_type &l)
static symbol_type make_PKT4(const location_type &l)
static symbol_type make_IP_ADDRESS(const std::string &v, const location_type &l)
static symbol_type make_UINT16TOTEXT(const location_type &l)
static symbol_type make_STRING(const std::string &v, const location_type &l)
static symbol_type make_TOPLEVEL_BOOL(const location_type &l)
static symbol_type make_LPAREN(const location_type &l)
static symbol_type make_TOPLEVEL_STRING(const location_type &l)
static symbol_type make_GIADDR(const location_type &l)
static symbol_type make_MATCH(const location_type &l)
static symbol_type make_DATA(const location_type &l)
static symbol_type make_CHADDR(const location_type &l)
static symbol_type make_INT16TOTEXT(const location_type &l)
static symbol_type make_LBRACKET(const location_type &l)
static symbol_type make_LEN(const location_type &l)
static symbol_type make_IFACE(const location_type &l)
static symbol_type make_ANY(const location_type &l)
static symbol_type make_DOT(const location_type &l)
static symbol_type make_HLEN(const location_type &l)
static symbol_type make_ALL(const location_type &l)
static symbol_type make_UCASE(const location_type &l)
static symbol_type make_COMA(const location_type &l)
static symbol_type make_IFELSE(const location_type &l)
location location_type
Symbol locations.
static symbol_type make_YIADDR(const location_type &l)
static symbol_type make_SRC(const location_type &l)
static symbol_type make_INTEGER(const std::string &v, const location_type &l)
static symbol_type make_EQUAL(const location_type &l)
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
static symbol_type make_EXISTS(const location_type &l)
static symbol_type make_TRANSID(const location_type &l)
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
static symbol_type make_ADDRTOTEXT(const location_type &l)
static symbol_type make_LCASE(const location_type &l)
static symbol_type make_RELAY4(const location_type &l)
static symbol_type make_PKT(const location_type &l)
static symbol_type make_CIADDR(const location_type &l)
static symbol_type make_HEXSTRING(const std::string &v, const location_type &l)
static symbol_type make_EVALUNDEF(const location_type &l)
static symbol_type make_OPTION_NAME(const std::string &v, const location_type &l)
static symbol_type make_MEMBER(const location_type &l)
static symbol_type make_UINT32TOTEXT(const location_type &l)
static symbol_type make_SPLIT(const location_type &l)
static symbol_type make_ENTERPRISE(const location_type &l)
static symbol_type make_VENDOR(const location_type &l)
value_type semantic_type
Backward compatibility (Bison 3.8).
static symbol_type make_RPAREN(const location_type &l)
static symbol_type make_PEERADDR(const location_type &l)
static const symbol_kind_type YYNTOKENS
The number of tokens.
static symbol_type make_SUBSTRING(const location_type &l)
static symbol_type make_VENDOR_CLASS(const location_type &l)
static symbol_type make_HEX(const location_type &l)
static symbol_type make_UINT8TOTEXT(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.
Forward declaration of the EvalContext class.
Defines the logger used by the top-level component of kea-lfc.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
location_type location
The location.
Base super_type
Alias to Base.
basic_symbol(typename Base::kind_type t, const TokenPkt4::FieldType &v, const location_type &l)
basic_symbol(typename Base::kind_type t, const uint32_t &v, const location_type &l)
value_type value
The semantic value.
basic_symbol(typename Base::kind_type t, const TokenPkt6::FieldType &v, const location_type &l)
~basic_symbol()
Destroy the symbol.
bool empty() const YY_NOEXCEPT
Whether empty.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
basic_symbol(typename Base::kind_type t, const uint16_t &v, const location_type &l)
basic_symbol(typename Base::kind_type t, const TokenPkt::MetadataType &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 TokenOption::RepresentationType &v, const location_type &l)
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.
basic_symbol() YY_NOEXCEPT
Default constructor.
basic_symbol(typename Base::kind_type t, const TokenRelay6Field::FieldType &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 int8_t &v, const location_type &l)
Type access provider for token (enum) based symbols.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
token_kind_type kind_type
The symbol kind as needed by the constructor.
by_kind() YY_NOEXCEPT
Default constructor.
void clear() YY_NOEXCEPT
Record that this symbol is empty.
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.
@ YYNTOKENS
Number of tokens.
"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 location_type &l, const std::string &m)
syntax_error(const syntax_error &s)
~syntax_error() YY_NOEXCEPT YY_NOTHROW
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).