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 102 # define YY_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 186 # define YY_NULLPTR 0 189 # define YY_NULLPTR ((void*)0) 207 namespace 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 250 value_type (
const self_type&) =
delete;
253 self_type& operator= (
const self_type&) =
delete;
262 # if 201103L <= YY_CPLUSPLUS 263 template <
typename T,
typename... U>
270 yytypeid_ = &
typeid (T);
271 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
274 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 371 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 400 value_type (
const self_type&);
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);
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 ())
494 , location (s.location)
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,
560 TOKEN_VENDOR_CLASS = 307,
564 TOKEN_ENTERPRISE = 311,
565 TOKEN_TOPLEVEL_BOOL = 312,
566 TOKEN_TOPLEVEL_STRING = 313,
569 TOKEN_HEXSTRING = 316,
570 TOKEN_OPTION_NAME = 317,
571 TOKEN_IP_ADDRESS = 318
647 S_TOPLEVEL_BOOL = 57,
648 S_TOPLEVEL_STRING = 58,
661 S_sub_option_code = 71,
662 S_option_repr_type = 72,
665 S_enterprise_id = 75,
679 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
687 template <
typename Base>
699 #if 201103L <= YY_CPLUSPLUS 702 : Base (std::move (that))
704 , location (std::move (that.location))
706 switch (this->kind ())
708 case symbol_kind::S_option_repr_type:
712 case symbol_kind::S_pkt4_field:
716 case symbol_kind::S_pkt6_field:
720 case symbol_kind::S_pkt_metadata:
724 case symbol_kind::S_relay6_field:
728 case symbol_kind::S_nest_level:
729 value.move< int8_t > (std::move (that.value));
732 case symbol_kind::S_STRING:
733 case symbol_kind::S_INTEGER:
734 case symbol_kind::S_HEXSTRING:
735 case symbol_kind::S_OPTION_NAME:
736 case symbol_kind::S_IP_ADDRESS:
737 value.move< std::string > (std::move (that.value));
740 case symbol_kind::S_option_code:
741 case symbol_kind::S_sub_option_code:
742 value.move< uint16_t > (std::move (that.value));
745 case symbol_kind::S_integer_expr:
746 case symbol_kind::S_enterprise_id:
747 value.move< uint32_t > (std::move (that.value));
761 #if 201103L <= YY_CPLUSPLUS 762 basic_symbol (
typename Base::kind_type t, location_type&& l)
764 , location (std::move (l))
773 #if 201103L <= YY_CPLUSPLUS 776 , value (std::move (v))
777 , location (std::move (l))
787 #if 201103L <= YY_CPLUSPLUS 790 , value (std::move (v))
791 , location (std::move (l))
801 #if 201103L <= YY_CPLUSPLUS 804 , value (std::move (v))
805 , location (std::move (l))
815 #if 201103L <= YY_CPLUSPLUS 818 , value (std::move (v))
819 , location (std::move (l))
829 #if 201103L <= YY_CPLUSPLUS 832 , value (std::move (v))
833 , location (std::move (l))
843 #if 201103L <= YY_CPLUSPLUS 844 basic_symbol (
typename Base::kind_type t, int8_t&& v, location_type&& l)
846 , value (std::move (v))
847 , location (std::move (l))
850 basic_symbol (
typename Base::kind_type t,
const int8_t& v,
const location_type& l)
857 #if 201103L <= YY_CPLUSPLUS 858 basic_symbol (
typename Base::kind_type t, std::string&& v, location_type&& l)
860 , value (std::move (v))
861 , location (std::move (l))
864 basic_symbol (
typename Base::kind_type t,
const std::string& v,
const location_type& l)
871 #if 201103L <= YY_CPLUSPLUS 872 basic_symbol (
typename Base::kind_type t, uint16_t&& v, location_type&& l)
874 , value (std::move (v))
875 , location (std::move (l))
878 basic_symbol (
typename Base::kind_type t,
const uint16_t& v,
const location_type& l)
885 #if 201103L <= YY_CPLUSPLUS 886 basic_symbol (
typename Base::kind_type t, uint32_t&& v, location_type&& l)
888 , value (std::move (v))
889 , location (std::move (l))
892 basic_symbol (
typename Base::kind_type t,
const uint32_t& v,
const location_type& l)
911 symbol_kind_type yykind = this->kind ();
923 case symbol_kind::S_option_repr_type:
924 value.template destroy< TokenOption::RepresentationType > ();
927 case symbol_kind::S_pkt4_field:
928 value.template destroy< TokenPkt4::FieldType > ();
931 case symbol_kind::S_pkt6_field:
932 value.template destroy< TokenPkt6::FieldType > ();
935 case symbol_kind::S_pkt_metadata:
936 value.template destroy< TokenPkt::MetadataType > ();
939 case symbol_kind::S_relay6_field:
940 value.template destroy< TokenRelay6Field::FieldType > ();
943 case symbol_kind::S_nest_level:
944 value.template destroy< int8_t > ();
947 case symbol_kind::S_STRING:
948 case symbol_kind::S_INTEGER:
949 case symbol_kind::S_HEXSTRING:
950 case symbol_kind::S_OPTION_NAME:
951 case symbol_kind::S_IP_ADDRESS:
952 value.template destroy< std::string > ();
955 case symbol_kind::S_option_code:
956 case symbol_kind::S_sub_option_code:
957 value.template destroy< uint16_t > ();
960 case symbol_kind::S_integer_expr:
961 case symbol_kind::S_enterprise_id:
962 value.template destroy< uint32_t > ();
975 return EvalParser::symbol_name (this->kind ());
994 #if YY_CPLUSPLUS < 201103L 1009 #if 201103L <= YY_CPLUSPLUS 1023 void clear () YY_NOEXCEPT;
1030 symbol_kind_type kind () const YY_NOEXCEPT;
1033 symbol_kind_type type_get () const YY_NOEXCEPT;
1037 symbol_kind_type kind_;
1053 #if 201103L <= YY_CPLUSPLUS 1055 : super_type (token_kind_type (tok), std::move (l))
1058 : super_type (token_kind_type (tok), l)
1061 #if !defined _MSC_VER || defined __clang__ 1063 || (token::TOKEN_EVALerror <= tok && tok <= token::TOKEN_TOPLEVEL_STRING));
1066 #if 201103L <= YY_CPLUSPLUS 1067 symbol_type (
int tok, std::string v, location_type l)
1068 : super_type (token_kind_type (tok), std::move (v), std::move (l))
1071 : super_type (token_kind_type (tok), v, l)
1074 #if !defined _MSC_VER || defined __clang__ 1075 EVAL_ASSERT ((token::TOKEN_STRING <= tok && tok <= token::TOKEN_IP_ADDRESS));
1084 #if 201103L <= YY_CPLUSPLUS 1097 virtual int parse ();
1103 void set_debug_stream (std::ostream &);
1108 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
1110 void set_debug_level (debug_level_type l);
1116 virtual void error (
const location_type& loc,
const std::string& msg);
1123 static std::string symbol_name (symbol_kind_type yysymbol);
1126 #if 201103L <= YY_CPLUSPLUS 1129 make_END (location_type l)
1131 return symbol_type (token::TOKEN_END, std::move (l));
1141 #if 201103L <= YY_CPLUSPLUS 1144 make_EVALerror (location_type l)
1146 return symbol_type (token::TOKEN_EVALerror, std::move (l));
1156 #if 201103L <= YY_CPLUSPLUS 1159 make_EVALUNDEF (location_type l)
1161 return symbol_type (token::TOKEN_EVALUNDEF, std::move (l));
1171 #if 201103L <= YY_CPLUSPLUS 1174 make_LPAREN (location_type l)
1176 return symbol_type (token::TOKEN_LPAREN, std::move (l));
1186 #if 201103L <= YY_CPLUSPLUS 1189 make_RPAREN (location_type l)
1191 return symbol_type (token::TOKEN_RPAREN, std::move (l));
1201 #if 201103L <= YY_CPLUSPLUS 1204 make_NOT (location_type l)
1206 return symbol_type (token::TOKEN_NOT, std::move (l));
1216 #if 201103L <= YY_CPLUSPLUS 1219 make_AND (location_type l)
1221 return symbol_type (token::TOKEN_AND, std::move (l));
1231 #if 201103L <= YY_CPLUSPLUS 1234 make_OR (location_type l)
1236 return symbol_type (token::TOKEN_OR, std::move (l));
1246 #if 201103L <= YY_CPLUSPLUS 1249 make_EQUAL (location_type l)
1251 return symbol_type (token::TOKEN_EQUAL, std::move (l));
1261 #if 201103L <= YY_CPLUSPLUS 1264 make_OPTION (location_type l)
1266 return symbol_type (token::TOKEN_OPTION, std::move (l));
1276 #if 201103L <= YY_CPLUSPLUS 1279 make_RELAY4 (location_type l)
1281 return symbol_type (token::TOKEN_RELAY4, std::move (l));
1291 #if 201103L <= YY_CPLUSPLUS 1294 make_RELAY6 (location_type l)
1296 return symbol_type (token::TOKEN_RELAY6, std::move (l));
1306 #if 201103L <= YY_CPLUSPLUS 1309 make_MEMBER (location_type l)
1311 return symbol_type (token::TOKEN_MEMBER, std::move (l));
1321 #if 201103L <= YY_CPLUSPLUS 1324 make_PEERADDR (location_type l)
1326 return symbol_type (token::TOKEN_PEERADDR, std::move (l));
1336 #if 201103L <= YY_CPLUSPLUS 1339 make_LINKADDR (location_type l)
1341 return symbol_type (token::TOKEN_LINKADDR, std::move (l));
1351 #if 201103L <= YY_CPLUSPLUS 1354 make_LBRACKET (location_type l)
1356 return symbol_type (token::TOKEN_LBRACKET, std::move (l));
1366 #if 201103L <= YY_CPLUSPLUS 1369 make_RBRACKET (location_type l)
1371 return symbol_type (token::TOKEN_RBRACKET, std::move (l));
1381 #if 201103L <= YY_CPLUSPLUS 1384 make_DOT (location_type l)
1386 return symbol_type (token::TOKEN_DOT, std::move (l));
1396 #if 201103L <= YY_CPLUSPLUS 1399 make_TEXT (location_type l)
1401 return symbol_type (token::TOKEN_TEXT, std::move (l));
1411 #if 201103L <= YY_CPLUSPLUS 1414 make_HEX (location_type l)
1416 return symbol_type (token::TOKEN_HEX, std::move (l));
1426 #if 201103L <= YY_CPLUSPLUS 1429 make_EXISTS (location_type l)
1431 return symbol_type (token::TOKEN_EXISTS, std::move (l));
1441 #if 201103L <= YY_CPLUSPLUS 1444 make_PKT (location_type l)
1446 return symbol_type (token::TOKEN_PKT, std::move (l));
1456 #if 201103L <= YY_CPLUSPLUS 1459 make_IFACE (location_type l)
1461 return symbol_type (token::TOKEN_IFACE, std::move (l));
1471 #if 201103L <= YY_CPLUSPLUS 1474 make_SRC (location_type l)
1476 return symbol_type (token::TOKEN_SRC, std::move (l));
1486 #if 201103L <= YY_CPLUSPLUS 1489 make_DST (location_type l)
1491 return symbol_type (token::TOKEN_DST, std::move (l));
1501 #if 201103L <= YY_CPLUSPLUS 1504 make_LEN (location_type l)
1506 return symbol_type (token::TOKEN_LEN, std::move (l));
1516 #if 201103L <= YY_CPLUSPLUS 1519 make_PKT4 (location_type l)
1521 return symbol_type (token::TOKEN_PKT4, std::move (l));
1531 #if 201103L <= YY_CPLUSPLUS 1534 make_CHADDR (location_type l)
1536 return symbol_type (token::TOKEN_CHADDR, std::move (l));
1546 #if 201103L <= YY_CPLUSPLUS 1549 make_HLEN (location_type l)
1551 return symbol_type (token::TOKEN_HLEN, std::move (l));
1561 #if 201103L <= YY_CPLUSPLUS 1564 make_HTYPE (location_type l)
1566 return symbol_type (token::TOKEN_HTYPE, std::move (l));
1576 #if 201103L <= YY_CPLUSPLUS 1579 make_CIADDR (location_type l)
1581 return symbol_type (token::TOKEN_CIADDR, std::move (l));
1591 #if 201103L <= YY_CPLUSPLUS 1594 make_GIADDR (location_type l)
1596 return symbol_type (token::TOKEN_GIADDR, std::move (l));
1606 #if 201103L <= YY_CPLUSPLUS 1609 make_YIADDR (location_type l)
1611 return symbol_type (token::TOKEN_YIADDR, std::move (l));
1621 #if 201103L <= YY_CPLUSPLUS 1624 make_SIADDR (location_type l)
1626 return symbol_type (token::TOKEN_SIADDR, std::move (l));
1636 #if 201103L <= YY_CPLUSPLUS 1639 make_SUBSTRING (location_type l)
1641 return symbol_type (token::TOKEN_SUBSTRING, std::move (l));
1651 #if 201103L <= YY_CPLUSPLUS 1654 make_SPLIT (location_type l)
1656 return symbol_type (token::TOKEN_SPLIT, std::move (l));
1666 #if 201103L <= YY_CPLUSPLUS 1669 make_ALL (location_type l)
1671 return symbol_type (token::TOKEN_ALL, std::move (l));
1681 #if 201103L <= YY_CPLUSPLUS 1684 make_COMA (location_type l)
1686 return symbol_type (token::TOKEN_COMA, std::move (l));
1696 #if 201103L <= YY_CPLUSPLUS 1699 make_CONCAT (location_type l)
1701 return symbol_type (token::TOKEN_CONCAT, std::move (l));
1711 #if 201103L <= YY_CPLUSPLUS 1714 make_PLUS (location_type l)
1716 return symbol_type (token::TOKEN_PLUS, std::move (l));
1726 #if 201103L <= YY_CPLUSPLUS 1729 make_IFELSE (location_type l)
1731 return symbol_type (token::TOKEN_IFELSE, std::move (l));
1741 #if 201103L <= YY_CPLUSPLUS 1744 make_TOHEXSTRING (location_type l)
1746 return symbol_type (token::TOKEN_TOHEXSTRING, std::move (l));
1756 #if 201103L <= YY_CPLUSPLUS 1759 make_ADDRTOTEXT (location_type l)
1761 return symbol_type (token::TOKEN_ADDRTOTEXT, std::move (l));
1771 #if 201103L <= YY_CPLUSPLUS 1774 make_INT8TOTEXT (location_type l)
1776 return symbol_type (token::TOKEN_INT8TOTEXT, std::move (l));
1786 #if 201103L <= YY_CPLUSPLUS 1789 make_INT16TOTEXT (location_type l)
1791 return symbol_type (token::TOKEN_INT16TOTEXT, std::move (l));
1801 #if 201103L <= YY_CPLUSPLUS 1804 make_INT32TOTEXT (location_type l)
1806 return symbol_type (token::TOKEN_INT32TOTEXT, std::move (l));
1816 #if 201103L <= YY_CPLUSPLUS 1819 make_UINT8TOTEXT (location_type l)
1821 return symbol_type (token::TOKEN_UINT8TOTEXT, std::move (l));
1831 #if 201103L <= YY_CPLUSPLUS 1834 make_UINT16TOTEXT (location_type l)
1836 return symbol_type (token::TOKEN_UINT16TOTEXT, std::move (l));
1843 return symbol_type (token::TOKEN_UINT16TOTEXT, l);
1846 #if 201103L <= YY_CPLUSPLUS 1849 make_UINT32TOTEXT (location_type l)
1851 return symbol_type (token::TOKEN_UINT32TOTEXT, std::move (l));
1858 return symbol_type (token::TOKEN_UINT32TOTEXT, l);
1861 #if 201103L <= YY_CPLUSPLUS 1864 make_PKT6 (location_type l)
1866 return symbol_type (token::TOKEN_PKT6, std::move (l));
1876 #if 201103L <= YY_CPLUSPLUS 1879 make_MSGTYPE (location_type l)
1881 return symbol_type (token::TOKEN_MSGTYPE, std::move (l));
1891 #if 201103L <= YY_CPLUSPLUS 1894 make_TRANSID (location_type l)
1896 return symbol_type (token::TOKEN_TRANSID, std::move (l));
1906 #if 201103L <= YY_CPLUSPLUS 1909 make_VENDOR_CLASS (location_type l)
1911 return symbol_type (token::TOKEN_VENDOR_CLASS, std::move (l));
1918 return symbol_type (token::TOKEN_VENDOR_CLASS, l);
1921 #if 201103L <= YY_CPLUSPLUS 1924 make_VENDOR (location_type l)
1926 return symbol_type (token::TOKEN_VENDOR, std::move (l));
1936 #if 201103L <= YY_CPLUSPLUS 1939 make_ANY (location_type l)
1941 return symbol_type (token::TOKEN_ANY, std::move (l));
1951 #if 201103L <= YY_CPLUSPLUS 1954 make_DATA (location_type l)
1956 return symbol_type (token::TOKEN_DATA, std::move (l));
1966 #if 201103L <= YY_CPLUSPLUS 1969 make_ENTERPRISE (location_type l)
1971 return symbol_type (token::TOKEN_ENTERPRISE, std::move (l));
1981 #if 201103L <= YY_CPLUSPLUS 1984 make_TOPLEVEL_BOOL (location_type l)
1986 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, std::move (l));
1993 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l);
1996 #if 201103L <= YY_CPLUSPLUS 1999 make_TOPLEVEL_STRING (location_type l)
2001 return symbol_type (token::TOKEN_TOPLEVEL_STRING, std::move (l));
2008 return symbol_type (token::TOKEN_TOPLEVEL_STRING, l);
2011 #if 201103L <= YY_CPLUSPLUS 2014 make_STRING (std::string v, location_type l)
2016 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
2026 #if 201103L <= YY_CPLUSPLUS 2029 make_INTEGER (std::string v, location_type l)
2031 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2041 #if 201103L <= YY_CPLUSPLUS 2044 make_HEXSTRING (std::string v, location_type l)
2046 return symbol_type (token::TOKEN_HEXSTRING, std::move (v), std::move (l));
2053 return symbol_type (token::TOKEN_HEXSTRING, v, l);
2056 #if 201103L <= YY_CPLUSPLUS 2059 make_OPTION_NAME (std::string v, location_type l)
2061 return symbol_type (token::TOKEN_OPTION_NAME, std::move (v), std::move (l));
2068 return symbol_type (token::TOKEN_OPTION_NAME, v, l);
2071 #if 201103L <= YY_CPLUSPLUS 2074 make_IP_ADDRESS (std::string v, location_type l)
2076 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (v), std::move (l));
2083 return symbol_type (token::TOKEN_IP_ADDRESS, v, l);
2093 symbol_kind_type
token () const YY_NOEXCEPT {
return yyla_.
kind (); }
2094 const location_type&
location () const YY_NOEXCEPT {
return yyla_.location; }
2099 int expected_tokens (symbol_kind_type yyarg[],
int yyargn)
const;
2107 #if YY_CPLUSPLUS < 201103L 2116 typedef unsigned char state_type;
2119 int yy_syntax_error_arguments_ (
const context& yyctx,
2120 symbol_kind_type yyarg[],
int yyargn)
const;
2124 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2128 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2132 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
2136 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
2138 static const short yypact_ninf_;
2139 static const signed char yytable_ninf_;
2144 static symbol_kind_type yytranslate_ (
int t)
YY_NOEXCEPT;
2147 static std::string yytnamerr_ (
const char *yystr);
2150 static const char*
const yytname_[];
2156 static const short yypact_[];
2161 static const signed char yydefact_[];
2164 static const short yypgoto_[];
2167 static const unsigned char yydefgoto_[];
2172 static const unsigned char yytable_[];
2174 static const short yycheck_[];
2178 static const signed char yystos_[];
2181 static const signed char yyr1_[];
2184 static const signed char yyr2_[];
2189 static const short yyrline_[];
2191 virtual void yy_reduce_print_ (
int r)
const;
2193 virtual void yy_stack_print_ ()
const;
2198 std::ostream* yycdebug_;
2203 template <
typename Base>
2211 template <
typename Base>
2222 typedef state_type kind_type;
2234 void move (by_state& that);
2242 enum { empty_state = 0 };
2255 stack_symbol_type ();
2257 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2260 #if YY_CPLUSPLUS < 201103L 2261 stack_symbol_type& operator= (stack_symbol_type& that);
2267 stack_symbol_type& operator= (
const stack_symbol_type& that);
2272 template <
typename T,
typename S = std::vector<T> >
2277 typedef typename S::iterator iterator;
2278 typedef typename S::const_iterator const_iterator;
2279 typedef typename S::size_type size_type;
2280 typedef typename std::ptrdiff_t index_type;
2286 #if 201103L <= YY_CPLUSPLUS 2287 stack (
const stack&) =
delete;
2290 stack& operator= (
const stack&) =
delete;
2297 operator[] (index_type i)
const 2299 return seq_[size_type (size () - 1 - i)];
2306 operator[] (index_type i)
2308 return seq_[size_type (size () - 1 - i)];
2317 seq_.push_back (T ());
2318 operator[] (0).move (t);
2323 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
2331 clear () YY_NOEXCEPT
2338 size ()
const YY_NOEXCEPT
2340 return index_type (seq_.size ());
2345 begin ()
const YY_NOEXCEPT
2347 return seq_.begin ();
2352 end ()
const YY_NOEXCEPT
2367 operator[] (index_type i)
const 2369 return stack_[range_ - i];
2373 const stack& stack_;
2378 #if YY_CPLUSPLUS < 201103L 2379 stack (
const stack&);
2382 stack& operator= (
const stack&);
2390 typedef stack<stack_symbol_type> stack_type;
2393 stack_type yystack_;
2400 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2429 EvalParser::yytranslate_ (
int t) YY_NOEXCEPT
2437 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2462 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2463 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2464 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2465 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2466 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2467 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2468 55, 56, 57, 58, 59, 60, 61, 62, 63
2471 const int code_max = 318;
2474 return symbol_kind::S_YYEOF;
2475 else if (t <= code_max)
2476 return static_cast <symbol_kind_type> (translate_table[t]);
2478 return symbol_kind::S_YYUNDEF;
2482 template <
typename Base>
2486 , location (that.location)
2488 switch (this->kind ())
2490 case symbol_kind::S_option_repr_type:
2494 case symbol_kind::S_pkt4_field:
2498 case symbol_kind::S_pkt6_field:
2502 case symbol_kind::S_pkt_metadata:
2506 case symbol_kind::S_relay6_field:
2510 case symbol_kind::S_nest_level:
2514 case symbol_kind::S_STRING:
2515 case symbol_kind::S_INTEGER:
2516 case symbol_kind::S_HEXSTRING:
2517 case symbol_kind::S_OPTION_NAME:
2518 case symbol_kind::S_IP_ADDRESS:
2522 case symbol_kind::S_option_code:
2523 case symbol_kind::S_sub_option_code:
2527 case symbol_kind::S_integer_expr:
2528 case symbol_kind::S_enterprise_id:
2541 template <
typename Base>
2545 return this->kind ();
2549 template <
typename Base>
2553 return this->kind () == symbol_kind::S_YYEMPTY;
2556 template <
typename Base>
2560 super_type::move (s);
2561 switch (this->kind ())
2563 case symbol_kind::S_option_repr_type:
2567 case symbol_kind::S_pkt4_field:
2571 case symbol_kind::S_pkt6_field:
2575 case symbol_kind::S_pkt_metadata:
2579 case symbol_kind::S_relay6_field:
2583 case symbol_kind::S_nest_level:
2587 case symbol_kind::S_STRING:
2588 case symbol_kind::S_INTEGER:
2589 case symbol_kind::S_HEXSTRING:
2590 case symbol_kind::S_OPTION_NAME:
2591 case symbol_kind::S_IP_ADDRESS:
2595 case symbol_kind::S_option_code:
2596 case symbol_kind::S_sub_option_code:
2600 case symbol_kind::S_integer_expr:
2601 case symbol_kind::S_enterprise_id:
2614 EvalParser::by_kind::by_kind () YY_NOEXCEPT
2618 #if 201103L <= YY_CPLUSPLUS 2621 : kind_ (that.kind_)
2629 : kind_ (that.kind_)
2634 : kind_ (yytranslate_ (t))
2641 EvalParser::by_kind::clear () YY_NOEXCEPT
2643 kind_ = symbol_kind::S_YYEMPTY;
2656 EvalParser::by_kind::kind () const YY_NOEXCEPT
2664 EvalParser::by_kind::type_get () const YY_NOEXCEPT
2666 return this->kind ();
2670 #line 14 "parser.yy" 2672 #line 2673 "parser.h" 2677 #endif // !YY_EVAL_PARSER_H_INCLUDED token_kind_type token_type
Backward compatibility alias (Bison 3.6).
symbol_type() YY_NOEXCEPT
Empty symbol.
Forward declaration of the EvalContext class.
static symbol_type make_HTYPE(const location_type &l)
static symbol_type make_TEXT(const location_type &l)
static symbol_type make_STRING(const std::string &v, const location_type &l)
void destroy()
Destroy the stored T.
basic_symbol(typename Base::kind_type t, const TokenPkt4::FieldType &v, const location_type &l)
int debug_level_type
Type for debugging levels.
static symbol_type make_UINT8TOTEXT(const location_type &l)
Syntax errors thrown from user actions.
basic_symbol() YY_NOEXCEPT
Default constructor.
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
static symbol_type make_CONCAT(const location_type &l)
basic_symbol(typename Base::kind_type t, const TokenPkt6::FieldType &v, const location_type &l)
static symbol_type make_HLEN(const location_type &l)
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
static symbol_type make_TOPLEVEL_STRING(const location_type &l)
static symbol_type make_INT16TOTEXT(const location_type &l)
static symbol_type make_HEX(const location_type &l)
void move(self_type &that)
Move the content of that to this.
location_type location
The location.
Base super_type
Alias to Base.
static symbol_type make_GIADDR(const location_type &l)
basic_symbol(typename Base::kind_type t, const std::string &v, const location_type &l)
symbol_kind_type token() const YY_NOEXCEPT
static symbol_type make_RELAY4(const location_type &l)
symbol_type(int tok, const std::string &v, const location_type &l)
FieldType
enum value that determines the field.
value_type self_type
Type of *this.
void clear() YY_NOEXCEPT
Record that this symbol is empty.
static symbol_type make_INT8TOTEXT(const location_type &l)
static symbol_type make_SRC(const location_type &l)
static symbol_type make_PKT4(const location_type &l)
static symbol_type make_SIADDR(const location_type &l)
slice(const stack &stack, index_type range) YY_NOEXCEPT
FieldType
enum value that determines the field.
basic_symbol(typename Base::kind_type t, const TokenRelay6Field::FieldType &v, const location_type &l)
static symbol_type make_ENTERPRISE(const location_type &l)
"External" symbols: returned by the scanner.
symbol_kind_type kind() const YY_NOEXCEPT
The (internal) type number (corresponding to type).
static symbol_type make_RELAY6(const location_type &l)
static symbol_type make_DST(const location_type &l)
static symbol_type make_ALL(const location_type &l)
static symbol_type make_ANY(const location_type &l)
static symbol_type make_MEMBER(const location_type &l)
static symbol_type make_EQUAL(const location_type &l)
symbol_type(int tok, const location_type &l)
Constructor for valueless symbols, and symbols from each type.
static symbol_type make_LEN(const location_type &l)
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
static symbol_type make_TOHEXSTRING(const location_type &l)
static symbol_type make_TOPLEVEL_BOOL(const location_type &l)
value_type value
The semantic value.
static symbol_type make_EXISTS(const location_type &l)
MetadataType
enum value that determines the field.
token_kind_type kind_type
The symbol kind as needed by the constructor.
T & as() YY_NOEXCEPT
Accessor to a built T.
static symbol_type make_RPAREN(const location_type &l)
location location_type
Symbol locations.
static symbol_type make_IP_ADDRESS(const std::string &v, const location_type &l)
T & emplace()
Instantiate an empty T in here.
static symbol_type make_IFELSE(const location_type &l)
basic_symbol(typename Base::kind_type t, const TokenPkt::MetadataType &v, const location_type &l)
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
static symbol_type make_PEERADDR(const location_type &l)
static symbol_type make_UINT32TOTEXT(const location_type &l)
Evaluation context, an interface to the expression evaluation.
const location_type & location() const YY_NOEXCEPT
#define YY_ATTRIBUTE_PURE
static symbol_type make_PLUS(const location_type &l)
basic_symbol(typename Base::kind_type t, const int8_t &v, const location_type &l)
basic_symbol< by_kind > super_type
Superclass.
T & build()
Instantiate an empty T in here.
basic_symbol(typename Base::kind_type t, const uint16_t &v, const location_type &l)
T & emplace(const T &t)
Instantiate a T in here from t.
static symbol_type make_PKT6(const location_type &l)
Type access provider for token (enum) based symbols.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
static symbol_type make_EVALerror(const location_type &l)
static symbol_type make_HEXSTRING(const std::string &v, const location_type &l)
static symbol_type make_ADDRTOTEXT(const location_type &l)
static symbol_type make_NOT(const location_type &l)
Defines the logger used by the top-level component of kea-lfc.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
static symbol_type make_IFACE(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_VENDOR_CLASS(const location_type &l)
static symbol_type make_OR(const location_type &l)
T & build(const T &t)
Instantiate a T in here from t.
static symbol_type make_CIADDR(const location_type &l)
RepresentationType
Token representation type.
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
static symbol_type make_EVALUNDEF(const location_type &l)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
symbol_kind_type kind_
The symbol kind.
static symbol_type make_COMA(const location_type &l)
#define YY_MOVE_REF(Type)
static symbol_type make_LINKADDR(const location_type &l)
long double yyalign_me_
Strongest alignment constraints.
static symbol_type make_UINT16TOTEXT(const location_type &l)
FieldType
enum value that determines the field.
basic_symbol(typename Base::kind_type t, const TokenOption::RepresentationType &v, const location_type &l)
static symbol_type make_SPLIT(const location_type &l)
value_type(YY_RVREF(T) t)
Construct and fill.
static symbol_type make_OPTION_NAME(const std::string &v, const location_type &l)
static symbol_type make_OPTION(const location_type &l)
const symbol_type & lookahead() const YY_NOEXCEPT
static symbol_type make_TRANSID(const location_type &l)
static symbol_type make_VENDOR(const location_type &l)
static symbol_type make_PKT(const location_type &l)
Present a slice of the top of a stack.
static symbol_type make_END(const location_type &l)
static symbol_type make_MSGTYPE(const location_type &l)
~basic_symbol()
Destroy the symbol.
static symbol_type make_AND(const location_type &l)
syntax_error(const syntax_error &s)
basic_symbol(typename Base::kind_type t, const uint32_t &v, const location_type &l)
static symbol_type make_LBRACKET(const location_type &l)
static symbol_type make_DOT(const location_type &l)
~value_type() YY_NOEXCEPT
Destruction, allowed only if empty.
A buffer to store and retrieve objects.
value_type() YY_NOEXCEPT
Empty construction.
static symbol_type make_INTEGER(const std::string &v, const location_type &l)
static symbol_type make_YIADDR(const location_type &l)
syntax_error(const location_type &l, const std::string &m)
static symbol_type make_LPAREN(const location_type &l)
void copy(const self_type &that)
Copy the content of that to this.
static symbol_type make_RBRACKET(const location_type &l)
static symbol_type make_INT32TOTEXT(const location_type &l)
static symbol_type make_SUBSTRING(const location_type &l)