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,
567 TOKEN_TOPLEVEL_BOOL = 314,
568 TOKEN_TOPLEVEL_STRING = 315,
571 TOKEN_HEXSTRING = 318,
572 TOKEN_OPTION_NAME = 319,
573 TOKEN_IP_ADDRESS = 320
651 S_TOPLEVEL_BOOL = 59,
652 S_TOPLEVEL_STRING = 60,
665 S_sub_option_code = 73,
666 S_option_repr_type = 74,
669 S_enterprise_id = 77,
691 template <
typename Base>
703#if 201103L <= YY_CPLUSPLUS
706 : Base (std::move (that))
708 , location (std::move (that.location))
710 switch (this->kind ())
712 case symbol_kind::S_option_repr_type:
716 case symbol_kind::S_pkt4_field:
720 case symbol_kind::S_pkt6_field:
724 case symbol_kind::S_pkt_metadata:
728 case symbol_kind::S_relay6_field:
732 case symbol_kind::S_nest_level:
733 value.move< int8_t > (std::move (that.value));
736 case symbol_kind::S_STRING:
737 case symbol_kind::S_INTEGER:
738 case symbol_kind::S_HEXSTRING:
739 case symbol_kind::S_OPTION_NAME:
740 case symbol_kind::S_IP_ADDRESS:
741 value.move< std::string > (std::move (that.value));
744 case symbol_kind::S_option_code:
745 case symbol_kind::S_sub_option_code:
746 value.move< uint16_t > (std::move (that.value));
749 case symbol_kind::S_integer_expr:
750 case symbol_kind::S_enterprise_id:
751 value.move< uint32_t > (std::move (that.value));
762 basic_symbol (
const basic_symbol& that);
765#if 201103L <= YY_CPLUSPLUS
766 basic_symbol (
typename Base::kind_type t, location_type&& l)
768 , location (std::move (l))
777#if 201103L <= YY_CPLUSPLUS
780 , value (std::move (v))
781 , location (std::move (l))
791#if 201103L <= YY_CPLUSPLUS
794 , value (std::move (v))
795 , location (std::move (l))
805#if 201103L <= YY_CPLUSPLUS
808 , value (std::move (v))
809 , location (std::move (l))
819#if 201103L <= YY_CPLUSPLUS
822 , value (std::move (v))
823 , location (std::move (l))
833#if 201103L <= YY_CPLUSPLUS
836 , value (std::move (v))
837 , location (std::move (l))
847#if 201103L <= YY_CPLUSPLUS
850 , value (std::move (v))
851 , location (std::move (l))
861#if 201103L <= YY_CPLUSPLUS
864 , value (std::move (v))
865 , location (std::move (l))
875#if 201103L <= YY_CPLUSPLUS
878 , value (std::move (v))
879 , location (std::move (l))
889#if 201103L <= YY_CPLUSPLUS
892 , value (std::move (v))
893 , location (std::move (l))
927 case symbol_kind::S_option_repr_type:
928 value.template destroy< TokenOption::RepresentationType > ();
931 case symbol_kind::S_pkt4_field:
932 value.template destroy< TokenPkt4::FieldType > ();
935 case symbol_kind::S_pkt6_field:
936 value.template destroy< TokenPkt6::FieldType > ();
939 case symbol_kind::S_pkt_metadata:
940 value.template destroy< TokenPkt::MetadataType > ();
943 case symbol_kind::S_relay6_field:
944 value.template destroy< TokenRelay6Field::FieldType > ();
947 case symbol_kind::S_nest_level:
948 value.template destroy< int8_t > ();
951 case symbol_kind::S_STRING:
952 case symbol_kind::S_INTEGER:
953 case symbol_kind::S_HEXSTRING:
954 case symbol_kind::S_OPTION_NAME:
955 case symbol_kind::S_IP_ADDRESS:
956 value.template destroy< std::string > ();
959 case symbol_kind::S_option_code:
960 case symbol_kind::S_sub_option_code:
961 value.template destroy< uint16_t > ();
964 case symbol_kind::S_integer_expr:
965 case symbol_kind::S_enterprise_id:
966 value.template destroy< uint32_t > ();
998#if YY_CPLUSPLUS < 201103L
1013#if 201103L <= YY_CPLUSPLUS
1057#if 201103L <= YY_CPLUSPLUS
1065#if !defined _MSC_VER || defined __clang__
1067 || (token::TOKEN_EVALerror <= tok && tok <= token::TOKEN_TOPLEVEL_STRING));
1070#if 201103L <= YY_CPLUSPLUS
1078#if !defined _MSC_VER || defined __clang__
1079 EVAL_ASSERT ((token::TOKEN_STRING <= tok && tok <= token::TOKEN_IP_ADDRESS));
1088#if 201103L <= YY_CPLUSPLUS
1101 virtual int parse ();
1107 void set_debug_stream (std::ostream &);
1110 typedef
int debug_level_type;
1114 void set_debug_level (debug_level_type l);
1120 virtual void error (
const location_type& loc,
const std::string& msg);
1123 void error (
const syntax_error& err);
1127 static std::string symbol_name (symbol_kind_type yysymbol);
1130#if 201103L <= YY_CPLUSPLUS
1133 make_END (location_type l)
1135 return symbol_type (token::TOKEN_END, std::move (l));
1145#if 201103L <= YY_CPLUSPLUS
1148 make_EVALerror (location_type l)
1150 return symbol_type (token::TOKEN_EVALerror, std::move (l));
1160#if 201103L <= YY_CPLUSPLUS
1163 make_EVALUNDEF (location_type l)
1165 return symbol_type (token::TOKEN_EVALUNDEF, std::move (l));
1175#if 201103L <= YY_CPLUSPLUS
1178 make_LPAREN (location_type l)
1180 return symbol_type (token::TOKEN_LPAREN, std::move (l));
1190#if 201103L <= YY_CPLUSPLUS
1193 make_RPAREN (location_type l)
1195 return symbol_type (token::TOKEN_RPAREN, std::move (l));
1205#if 201103L <= YY_CPLUSPLUS
1208 make_NOT (location_type l)
1210 return symbol_type (token::TOKEN_NOT, std::move (l));
1220#if 201103L <= YY_CPLUSPLUS
1223 make_AND (location_type l)
1225 return symbol_type (token::TOKEN_AND, std::move (l));
1235#if 201103L <= YY_CPLUSPLUS
1238 make_OR (location_type l)
1240 return symbol_type (token::TOKEN_OR, std::move (l));
1250#if 201103L <= YY_CPLUSPLUS
1253 make_EQUAL (location_type l)
1255 return symbol_type (token::TOKEN_EQUAL, std::move (l));
1265#if 201103L <= YY_CPLUSPLUS
1268 make_OPTION (location_type l)
1270 return symbol_type (token::TOKEN_OPTION, std::move (l));
1280#if 201103L <= YY_CPLUSPLUS
1283 make_RELAY4 (location_type l)
1285 return symbol_type (token::TOKEN_RELAY4, std::move (l));
1295#if 201103L <= YY_CPLUSPLUS
1298 make_RELAY6 (location_type l)
1300 return symbol_type (token::TOKEN_RELAY6, std::move (l));
1310#if 201103L <= YY_CPLUSPLUS
1313 make_MEMBER (location_type l)
1315 return symbol_type (token::TOKEN_MEMBER, std::move (l));
1325#if 201103L <= YY_CPLUSPLUS
1328 make_PEERADDR (location_type l)
1330 return symbol_type (token::TOKEN_PEERADDR, std::move (l));
1340#if 201103L <= YY_CPLUSPLUS
1343 make_LINKADDR (location_type l)
1345 return symbol_type (token::TOKEN_LINKADDR, std::move (l));
1355#if 201103L <= YY_CPLUSPLUS
1358 make_LBRACKET (location_type l)
1360 return symbol_type (token::TOKEN_LBRACKET, std::move (l));
1370#if 201103L <= YY_CPLUSPLUS
1373 make_RBRACKET (location_type l)
1375 return symbol_type (token::TOKEN_RBRACKET, std::move (l));
1385#if 201103L <= YY_CPLUSPLUS
1388 make_DOT (location_type l)
1390 return symbol_type (token::TOKEN_DOT, std::move (l));
1400#if 201103L <= YY_CPLUSPLUS
1403 make_TEXT (location_type l)
1405 return symbol_type (token::TOKEN_TEXT, std::move (l));
1415#if 201103L <= YY_CPLUSPLUS
1418 make_HEX (location_type l)
1420 return symbol_type (token::TOKEN_HEX, std::move (l));
1430#if 201103L <= YY_CPLUSPLUS
1433 make_EXISTS (location_type l)
1435 return symbol_type (token::TOKEN_EXISTS, std::move (l));
1445#if 201103L <= YY_CPLUSPLUS
1448 make_PKT (location_type l)
1450 return symbol_type (token::TOKEN_PKT, std::move (l));
1460#if 201103L <= YY_CPLUSPLUS
1463 make_IFACE (location_type l)
1465 return symbol_type (token::TOKEN_IFACE, std::move (l));
1475#if 201103L <= YY_CPLUSPLUS
1478 make_SRC (location_type l)
1480 return symbol_type (token::TOKEN_SRC, std::move (l));
1490#if 201103L <= YY_CPLUSPLUS
1493 make_DST (location_type l)
1495 return symbol_type (token::TOKEN_DST, std::move (l));
1505#if 201103L <= YY_CPLUSPLUS
1508 make_LEN (location_type l)
1510 return symbol_type (token::TOKEN_LEN, std::move (l));
1520#if 201103L <= YY_CPLUSPLUS
1523 make_PKT4 (location_type l)
1525 return symbol_type (token::TOKEN_PKT4, std::move (l));
1535#if 201103L <= YY_CPLUSPLUS
1538 make_CHADDR (location_type l)
1540 return symbol_type (token::TOKEN_CHADDR, std::move (l));
1550#if 201103L <= YY_CPLUSPLUS
1553 make_HLEN (location_type l)
1555 return symbol_type (token::TOKEN_HLEN, std::move (l));
1565#if 201103L <= YY_CPLUSPLUS
1568 make_HTYPE (location_type l)
1570 return symbol_type (token::TOKEN_HTYPE, std::move (l));
1580#if 201103L <= YY_CPLUSPLUS
1583 make_CIADDR (location_type l)
1585 return symbol_type (token::TOKEN_CIADDR, std::move (l));
1595#if 201103L <= YY_CPLUSPLUS
1598 make_GIADDR (location_type l)
1600 return symbol_type (token::TOKEN_GIADDR, std::move (l));
1610#if 201103L <= YY_CPLUSPLUS
1613 make_YIADDR (location_type l)
1615 return symbol_type (token::TOKEN_YIADDR, std::move (l));
1625#if 201103L <= YY_CPLUSPLUS
1628 make_SIADDR (location_type l)
1630 return symbol_type (token::TOKEN_SIADDR, std::move (l));
1640#if 201103L <= YY_CPLUSPLUS
1643 make_SUBSTRING (location_type l)
1645 return symbol_type (token::TOKEN_SUBSTRING, std::move (l));
1655#if 201103L <= YY_CPLUSPLUS
1658 make_SPLIT (location_type l)
1660 return symbol_type (token::TOKEN_SPLIT, std::move (l));
1670#if 201103L <= YY_CPLUSPLUS
1673 make_ALL (location_type l)
1675 return symbol_type (token::TOKEN_ALL, std::move (l));
1685#if 201103L <= YY_CPLUSPLUS
1688 make_COMA (location_type l)
1690 return symbol_type (token::TOKEN_COMA, std::move (l));
1700#if 201103L <= YY_CPLUSPLUS
1703 make_CONCAT (location_type l)
1705 return symbol_type (token::TOKEN_CONCAT, std::move (l));
1715#if 201103L <= YY_CPLUSPLUS
1718 make_PLUS (location_type l)
1720 return symbol_type (token::TOKEN_PLUS, std::move (l));
1730#if 201103L <= YY_CPLUSPLUS
1733 make_IFELSE (location_type l)
1735 return symbol_type (token::TOKEN_IFELSE, std::move (l));
1745#if 201103L <= YY_CPLUSPLUS
1748 make_TOHEXSTRING (location_type l)
1750 return symbol_type (token::TOKEN_TOHEXSTRING, std::move (l));
1760#if 201103L <= YY_CPLUSPLUS
1763 make_ADDRTOTEXT (location_type l)
1765 return symbol_type (token::TOKEN_ADDRTOTEXT, std::move (l));
1775#if 201103L <= YY_CPLUSPLUS
1778 make_INT8TOTEXT (location_type l)
1780 return symbol_type (token::TOKEN_INT8TOTEXT, std::move (l));
1790#if 201103L <= YY_CPLUSPLUS
1793 make_INT16TOTEXT (location_type l)
1795 return symbol_type (token::TOKEN_INT16TOTEXT, std::move (l));
1805#if 201103L <= YY_CPLUSPLUS
1808 make_INT32TOTEXT (location_type l)
1810 return symbol_type (token::TOKEN_INT32TOTEXT, std::move (l));
1820#if 201103L <= YY_CPLUSPLUS
1823 make_UINT8TOTEXT (location_type l)
1825 return symbol_type (token::TOKEN_UINT8TOTEXT, std::move (l));
1835#if 201103L <= YY_CPLUSPLUS
1838 make_UINT16TOTEXT (location_type l)
1840 return symbol_type (token::TOKEN_UINT16TOTEXT, std::move (l));
1847 return symbol_type (token::TOKEN_UINT16TOTEXT, l);
1850#if 201103L <= YY_CPLUSPLUS
1853 make_UINT32TOTEXT (location_type l)
1855 return symbol_type (token::TOKEN_UINT32TOTEXT, std::move (l));
1862 return symbol_type (token::TOKEN_UINT32TOTEXT, l);
1865#if 201103L <= YY_CPLUSPLUS
1868 make_LCASE (location_type l)
1870 return symbol_type (token::TOKEN_LCASE, std::move (l));
1880#if 201103L <= YY_CPLUSPLUS
1883 make_UCASE (location_type l)
1885 return symbol_type (token::TOKEN_UCASE, std::move (l));
1895#if 201103L <= YY_CPLUSPLUS
1898 make_PKT6 (location_type l)
1900 return symbol_type (token::TOKEN_PKT6, std::move (l));
1910#if 201103L <= YY_CPLUSPLUS
1913 make_MSGTYPE (location_type l)
1915 return symbol_type (token::TOKEN_MSGTYPE, std::move (l));
1925#if 201103L <= YY_CPLUSPLUS
1928 make_TRANSID (location_type l)
1930 return symbol_type (token::TOKEN_TRANSID, std::move (l));
1940#if 201103L <= YY_CPLUSPLUS
1943 make_VENDOR_CLASS (location_type l)
1945 return symbol_type (token::TOKEN_VENDOR_CLASS, std::move (l));
1952 return symbol_type (token::TOKEN_VENDOR_CLASS, l);
1955#if 201103L <= YY_CPLUSPLUS
1958 make_VENDOR (location_type l)
1960 return symbol_type (token::TOKEN_VENDOR, std::move (l));
1970#if 201103L <= YY_CPLUSPLUS
1973 make_ANY (location_type l)
1975 return symbol_type (token::TOKEN_ANY, std::move (l));
1985#if 201103L <= YY_CPLUSPLUS
1988 make_DATA (location_type l)
1990 return symbol_type (token::TOKEN_DATA, std::move (l));
2000#if 201103L <= YY_CPLUSPLUS
2003 make_ENTERPRISE (location_type l)
2005 return symbol_type (token::TOKEN_ENTERPRISE, std::move (l));
2015#if 201103L <= YY_CPLUSPLUS
2018 make_TOPLEVEL_BOOL (location_type l)
2020 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, std::move (l));
2027 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l);
2030#if 201103L <= YY_CPLUSPLUS
2033 make_TOPLEVEL_STRING (location_type l)
2035 return symbol_type (token::TOKEN_TOPLEVEL_STRING, std::move (l));
2042 return symbol_type (token::TOKEN_TOPLEVEL_STRING, l);
2045#if 201103L <= YY_CPLUSPLUS
2048 make_STRING (std::string v, location_type l)
2050 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2060#if 201103L <= YY_CPLUSPLUS
2063 make_INTEGER (std::string v, location_type l)
2065 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2075#if 201103L <= YY_CPLUSPLUS
2078 make_HEXSTRING (std::string v, location_type l)
2080 return symbol_type (token::TOKEN_HEXSTRING, std::move (v), std::move (l));
2087 return symbol_type (token::TOKEN_HEXSTRING, v, l);
2090#if 201103L <= YY_CPLUSPLUS
2093 make_OPTION_NAME (std::string v, location_type l)
2095 return symbol_type (token::TOKEN_OPTION_NAME, std::move (v), std::move (l));
2102 return symbol_type (token::TOKEN_OPTION_NAME, v, l);
2105#if 201103L <= YY_CPLUSPLUS
2108 make_IP_ADDRESS (std::string v, location_type l)
2110 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (v), std::move (l));
2117 return symbol_type (token::TOKEN_IP_ADDRESS, v, l);
2141#if YY_CPLUSPLUS < 201103L
2150 typedef unsigned char state_type;
2153 int yy_syntax_error_arguments_ (
const context& yyctx,
2154 symbol_kind_type yyarg[],
int yyargn)
const;
2158 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2162 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2166 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
2170 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
2172 static const short yypact_ninf_;
2173 static const signed char yytable_ninf_;
2178 static symbol_kind_type yytranslate_ (
int t)
YY_NOEXCEPT;
2181 static std::string yytnamerr_ (
const char *yystr);
2184 static const char*
const yytname_[];
2190 static const short yypact_[];
2195 static const signed char yydefact_[];
2198 static const short yypgoto_[];
2201 static const unsigned char yydefgoto_[];
2206 static const unsigned char yytable_[];
2208 static const short yycheck_[];
2212 static const signed char yystos_[];
2215 static const signed char yyr1_[];
2218 static const signed char yyr2_[];
2223 static const short yyrline_[];
2225 virtual void yy_reduce_print_ (
int r)
const;
2227 virtual void yy_stack_print_ ()
const;
2232 std::ostream* yycdebug_;
2237 template <
typename Base>
2238 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
2245 template <
typename Base>
2246 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
2256 typedef state_type kind_type;
2268 void move (by_state& that);
2276 enum { empty_state = 0 };
2284 struct stack_symbol_type : basic_symbol<by_state>
2287 typedef basic_symbol<by_state> super_type;
2289 stack_symbol_type ();
2291 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2293 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
2294#if YY_CPLUSPLUS < 201103L
2297 stack_symbol_type& operator= (stack_symbol_type& that);
2301 stack_symbol_type& operator= (
const stack_symbol_type& that);
2306 template <
typename T,
typename S = std::vector<T> >
2311 typedef typename S::iterator iterator;
2312 typedef typename S::const_iterator const_iterator;
2313 typedef typename S::size_type size_type;
2314 typedef typename std::ptrdiff_t index_type;
2320#if 201103L <= YY_CPLUSPLUS
2322 stack (
const stack&) =
delete;
2324 stack& operator= (
const stack&) =
delete;
2331 operator[] (index_type i)
const
2333 return seq_[size_type (size () - 1 - i)];
2340 operator[] (index_type i)
2342 return seq_[size_type (size () - 1 - i)];
2351 seq_.push_back (T ());
2352 operator[] (0).move (t);
2374 return index_type (seq_.size ());
2381 return seq_.begin ();
2401 operator[] (index_type i)
const
2403 return stack_[range_ - i];
2407 const stack& stack_;
2412#if YY_CPLUSPLUS < 201103L
2414 stack (
const stack&);
2416 stack& operator= (
const stack&);
2424 typedef stack<stack_symbol_type> stack_type;
2427 stack_type yystack_;
2434 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2442 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
2471 0, 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, 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, 1, 2, 3, 4,
2497 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2498 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2499 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2500 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2501 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2502 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2506 const int code_max = 320;
2510 else if (t <= code_max)
2517 template <
typename Base>
2523 switch (this->kind ())
2576 template <
typename Base>
2580 return this->kind ();
2584 template <
typename Base>
2591 template <
typename Base>
2595 super_type::move (s);
2596 switch (this->kind ())
2653#if 201103L <= YY_CPLUSPLUS
2656 : kind_ (that.kind_)
2664 : kind_ (that.kind_)
2669 : kind_ (yytranslate_ (t))
2701 return this->kind ();
2707#line 2708 "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_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.
symbol_kind_type kind_
The symbol kind.
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).