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))
135 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
137 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
138 _Pragma ("GCC diagnostic push") \
139 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
140 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
141 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
142 _Pragma ("GCC diagnostic pop")
144 # define YY_INITIAL_VALUE(Value) Value
146 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
147 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
148 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
150 #ifndef YY_INITIAL_VALUE
151 # define YY_INITIAL_VALUE(Value)
154 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
155 # define YY_IGNORE_USELESS_CAST_BEGIN \
156 _Pragma ("GCC diagnostic push") \
157 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
158 # define YY_IGNORE_USELESS_CAST_END \
159 _Pragma ("GCC diagnostic pop")
161 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
162 # define YY_IGNORE_USELESS_CAST_BEGIN
163 # define YY_IGNORE_USELESS_CAST_END
168 # define YY_CAST(Type, Val) static_cast<Type> (Val)
169 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
171 # define YY_CAST(Type, Val) ((Type) (Val))
172 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
176 # if defined __cplusplus
177 # if 201103L <= __cplusplus
178 # define YY_NULLPTR nullptr
180 # define YY_NULLPTR 0
183 # define YY_NULLPTR ((void*)0)
201 namespace isc {
namespace eval {
226 , yytypeid_ (YY_NULLPTR)
230 template <
typename T>
232 : yytypeid_ (&typeid (T))
235 new (yyas_<T> ()) T (
YY_MOVE (t));
238 #if 201103L <= YY_CPLUSPLUS
242 self_type& operator= (
const self_type&) =
delete;
251 # if 201103L <= YY_CPLUSPLUS
252 template <
typename T,
typename... U>
259 yytypeid_ = &
typeid (T);
260 return *
new (yyas_<T> ()) T (std::forward <U>(u)...);
263 template <
typename T>
270 yytypeid_ = &
typeid (T);
271 return *
new (yyas_<T> ()) T ();
275 template <
typename T>
281 yytypeid_ = &
typeid (T);
282 return *
new (yyas_<T> ()) T (t);
288 template <
typename T>
292 return emplace<T> ();
297 template <
typename T>
301 return emplace<T> (t);
305 template <
typename T>
316 template <
typename T>
334 template <
typename T>
340 std::swap (as<T> (), that.as<T> ());
346 template <
typename T>
350 # if 201103L <= YY_CPLUSPLUS
351 emplace<T> (std::move (that.
as<T> ()));
359 # if 201103L <= YY_CPLUSPLUS
360 template <
typename T>
363 move (self_type&& that)
365 emplace<T> (std::move (that.as<T> ()));
371 template <
typename T>
375 emplace<T> (that.
as<T> ());
379 template <
typename T>
384 yytypeid_ = YY_NULLPTR;
388 #if YY_CPLUSPLUS < 201103L
392 self_type& operator= (
const self_type&);
396 template <
typename T>
400 void *yyp = yybuffer_.yyraw;
401 return static_cast<T*
> (yyp);
405 template <
typename T>
409 const void *yyp = yybuffer_.yyraw;
410 return static_cast<const T*
> (yyp);
432 char dummy6[
sizeof (int8_t)];
439 char dummy7[
sizeof (std::string)];
443 char dummy8[
sizeof (uint16_t)];
447 char dummy9[
sizeof (uint32_t)];
451 enum { size =
sizeof (union_type) };
463 const std::type_info *yytypeid_;
467 typedef EVALSTYPE semantic_type;
469 typedef location location_type;
476 :
std::runtime_error (m)
481 :
std::runtime_error (s.what ())
482 , location (s.location)
487 location_type location;
495 TOKEN_EVALEMPTY = -2,
497 TOKEN_EVALerror = 256,
498 TOKEN_EVALUNDEF = 257,
509 TOKEN_PEERADDR = 268,
510 TOKEN_LINKADDR = 269,
511 TOKEN_LBRACKET = 270,
512 TOKEN_RBRACKET = 271,
530 TOKEN_SUBSTRING = 289,
536 TOKEN_TOHEXSTRING = 295,
537 TOKEN_ADDRTOTEXT = 296,
538 TOKEN_INT8TOTEXT = 297,
539 TOKEN_INT16TOTEXT = 298,
540 TOKEN_INT32TOTEXT = 299,
541 TOKEN_UINT8TOTEXT = 300,
542 TOKEN_UINT16TOTEXT = 301,
543 TOKEN_UINT32TOTEXT = 302,
547 TOKEN_VENDOR_CLASS = 306,
551 TOKEN_ENTERPRISE = 310,
552 TOKEN_TOPLEVEL_BOOL = 311,
553 TOKEN_TOPLEVEL_STRING = 312,
556 TOKEN_HEXSTRING = 315,
557 TOKEN_OPTION_NAME = 316,
558 TOKEN_IP_ADDRESS = 317
633 S_TOPLEVEL_BOOL = 56,
634 S_TOPLEVEL_STRING = 57,
647 S_sub_option_code = 70,
648 S_option_repr_type = 71,
651 S_enterprise_id = 74,
664 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
672 template <
typename Base>
684 #if 201103L <= YY_CPLUSPLUS
687 : Base (
std::move (that))
689 , location (
std::move (that.location))
691 switch (this->kind ())
693 case symbol_kind::S_option_repr_type:
697 case symbol_kind::S_pkt4_field:
701 case symbol_kind::S_pkt6_field:
705 case symbol_kind::S_pkt_metadata:
709 case symbol_kind::S_relay6_field:
713 case symbol_kind::S_nest_level:
714 value.move< int8_t > (std::move (that.value));
717 case symbol_kind::S_STRING:
718 case symbol_kind::S_INTEGER:
719 case symbol_kind::S_HEXSTRING:
720 case symbol_kind::S_OPTION_NAME:
721 case symbol_kind::S_IP_ADDRESS:
722 value.move< std::string > (std::move (that.value));
725 case symbol_kind::S_option_code:
726 case symbol_kind::S_sub_option_code:
727 value.move< uint16_t > (std::move (that.value));
730 case symbol_kind::S_integer_expr:
731 case symbol_kind::S_enterprise_id:
732 value.move< uint32_t > (std::move (that.value));
743 basic_symbol (
const basic_symbol& that);
746 #if 201103L <= YY_CPLUSPLUS
747 basic_symbol (
typename Base::kind_type t, location_type&& l)
749 , location (
std::move (l))
758 #if 201103L <= YY_CPLUSPLUS
761 , value (
std::move (v))
762 , location (
std::move (l))
772 #if 201103L <= YY_CPLUSPLUS
775 , value (
std::move (v))
776 , location (
std::move (l))
786 #if 201103L <= YY_CPLUSPLUS
789 , value (
std::move (v))
790 , location (
std::move (l))
800 #if 201103L <= YY_CPLUSPLUS
803 , value (
std::move (v))
804 , location (
std::move (l))
814 #if 201103L <= YY_CPLUSPLUS
817 , value (
std::move (v))
818 , location (
std::move (l))
828 #if 201103L <= YY_CPLUSPLUS
829 basic_symbol (
typename Base::kind_type t, int8_t&& v, location_type&& l)
831 , value (
std::move (v))
832 , location (
std::move (l))
835 basic_symbol (
typename Base::kind_type t,
const int8_t& v,
const location_type& l)
842 #if 201103L <= YY_CPLUSPLUS
843 basic_symbol (
typename Base::kind_type t, std::string&& v, location_type&& l)
845 , value (
std::move (v))
846 , location (
std::move (l))
849 basic_symbol (
typename Base::kind_type t,
const std::string& v,
const location_type& l)
856 #if 201103L <= YY_CPLUSPLUS
857 basic_symbol (
typename Base::kind_type t, uint16_t&& v, location_type&& l)
859 , value (
std::move (v))
860 , location (
std::move (l))
863 basic_symbol (
typename Base::kind_type t,
const uint16_t& v,
const location_type& l)
870 #if 201103L <= YY_CPLUSPLUS
871 basic_symbol (
typename Base::kind_type t, uint32_t&& v, location_type&& l)
873 , value (
std::move (v))
874 , location (
std::move (l))
877 basic_symbol (
typename Base::kind_type t,
const uint32_t& v,
const location_type& l)
894 symbol_kind_type yykind = this->kind ();
906 case symbol_kind::S_option_repr_type:
907 value.template destroy< TokenOption::RepresentationType > ();
910 case symbol_kind::S_pkt4_field:
911 value.template destroy< TokenPkt4::FieldType > ();
914 case symbol_kind::S_pkt6_field:
915 value.template destroy< TokenPkt6::FieldType > ();
918 case symbol_kind::S_pkt_metadata:
919 value.template destroy< TokenPkt::MetadataType > ();
922 case symbol_kind::S_relay6_field:
923 value.template destroy< TokenRelay6Field::FieldType > ();
926 case symbol_kind::S_nest_level:
927 value.template destroy< int8_t > ();
930 case symbol_kind::S_STRING:
931 case symbol_kind::S_INTEGER:
932 case symbol_kind::S_HEXSTRING:
933 case symbol_kind::S_OPTION_NAME:
934 case symbol_kind::S_IP_ADDRESS:
935 value.template destroy< std::string > ();
938 case symbol_kind::S_option_code:
939 case symbol_kind::S_sub_option_code:
940 value.template destroy< uint16_t > ();
943 case symbol_kind::S_integer_expr:
944 case symbol_kind::S_enterprise_id:
945 value.template destroy< uint32_t > ();
958 return EvalParser::symbol_name (this->kind ());
974 location_type location;
977 #if YY_CPLUSPLUS < 201103L
989 #if 201103L <= YY_CPLUSPLUS
1014 symbol_kind_type type_get () const YY_NOEXCEPT;
1018 symbol_kind_type kind_;
1034 #if 201103L <= YY_CPLUSPLUS
1036 : super_type(token_type (tok),
std::move (l))
1039 : super_type(token_type (tok), l)
1043 || (token::TOKEN_EVALerror <= tok && tok <= token::TOKEN_TOPLEVEL_STRING));
1045 #if 201103L <= YY_CPLUSPLUS
1046 symbol_type (
int tok, std::string v, location_type l)
1047 : super_type(token_type (tok),
std::move (v),
std::move (l))
1050 : super_type(token_type (tok), v, l)
1053 EVAL_ASSERT ((token::TOKEN_STRING <= tok && tok <= token::TOKEN_IP_ADDRESS));
1061 #if 201103L <= YY_CPLUSPLUS
1074 virtual int parse ();
1080 void set_debug_stream (
std::ostream &);
1087 void set_debug_level (debug_level_type l);
1093 virtual void error (
const location_type& loc,
const std::string& msg);
1100 static std::string symbol_name (symbol_kind_type yysymbol);
1103 #if 201103L <= YY_CPLUSPLUS
1106 make_END (location_type l)
1108 return symbol_type (token::TOKEN_END, std::move (l));
1118 #if 201103L <= YY_CPLUSPLUS
1121 make_EVALerror (location_type l)
1123 return symbol_type (token::TOKEN_EVALerror, std::move (l));
1133 #if 201103L <= YY_CPLUSPLUS
1136 make_EVALUNDEF (location_type l)
1138 return symbol_type (token::TOKEN_EVALUNDEF, std::move (l));
1148 #if 201103L <= YY_CPLUSPLUS
1151 make_LPAREN (location_type l)
1153 return symbol_type (token::TOKEN_LPAREN, std::move (l));
1163 #if 201103L <= YY_CPLUSPLUS
1166 make_RPAREN (location_type l)
1168 return symbol_type (token::TOKEN_RPAREN, std::move (l));
1178 #if 201103L <= YY_CPLUSPLUS
1181 make_NOT (location_type l)
1183 return symbol_type (token::TOKEN_NOT, std::move (l));
1193 #if 201103L <= YY_CPLUSPLUS
1196 make_AND (location_type l)
1198 return symbol_type (token::TOKEN_AND, std::move (l));
1208 #if 201103L <= YY_CPLUSPLUS
1211 make_OR (location_type l)
1213 return symbol_type (token::TOKEN_OR, std::move (l));
1223 #if 201103L <= YY_CPLUSPLUS
1226 make_EQUAL (location_type l)
1228 return symbol_type (token::TOKEN_EQUAL, std::move (l));
1238 #if 201103L <= YY_CPLUSPLUS
1241 make_OPTION (location_type l)
1243 return symbol_type (token::TOKEN_OPTION, std::move (l));
1253 #if 201103L <= YY_CPLUSPLUS
1256 make_RELAY4 (location_type l)
1258 return symbol_type (token::TOKEN_RELAY4, std::move (l));
1268 #if 201103L <= YY_CPLUSPLUS
1271 make_RELAY6 (location_type l)
1273 return symbol_type (token::TOKEN_RELAY6, std::move (l));
1283 #if 201103L <= YY_CPLUSPLUS
1286 make_MEMBER (location_type l)
1288 return symbol_type (token::TOKEN_MEMBER, std::move (l));
1298 #if 201103L <= YY_CPLUSPLUS
1301 make_PEERADDR (location_type l)
1303 return symbol_type (token::TOKEN_PEERADDR, std::move (l));
1313 #if 201103L <= YY_CPLUSPLUS
1316 make_LINKADDR (location_type l)
1318 return symbol_type (token::TOKEN_LINKADDR, std::move (l));
1328 #if 201103L <= YY_CPLUSPLUS
1331 make_LBRACKET (location_type l)
1333 return symbol_type (token::TOKEN_LBRACKET, std::move (l));
1343 #if 201103L <= YY_CPLUSPLUS
1346 make_RBRACKET (location_type l)
1348 return symbol_type (token::TOKEN_RBRACKET, std::move (l));
1358 #if 201103L <= YY_CPLUSPLUS
1361 make_DOT (location_type l)
1363 return symbol_type (token::TOKEN_DOT, std::move (l));
1373 #if 201103L <= YY_CPLUSPLUS
1376 make_TEXT (location_type l)
1378 return symbol_type (token::TOKEN_TEXT, std::move (l));
1388 #if 201103L <= YY_CPLUSPLUS
1391 make_HEX (location_type l)
1393 return symbol_type (token::TOKEN_HEX, std::move (l));
1403 #if 201103L <= YY_CPLUSPLUS
1406 make_EXISTS (location_type l)
1408 return symbol_type (token::TOKEN_EXISTS, std::move (l));
1418 #if 201103L <= YY_CPLUSPLUS
1421 make_PKT (location_type l)
1423 return symbol_type (token::TOKEN_PKT, std::move (l));
1433 #if 201103L <= YY_CPLUSPLUS
1436 make_IFACE (location_type l)
1438 return symbol_type (token::TOKEN_IFACE, std::move (l));
1448 #if 201103L <= YY_CPLUSPLUS
1451 make_SRC (location_type l)
1453 return symbol_type (token::TOKEN_SRC, std::move (l));
1463 #if 201103L <= YY_CPLUSPLUS
1466 make_DST (location_type l)
1468 return symbol_type (token::TOKEN_DST, std::move (l));
1478 #if 201103L <= YY_CPLUSPLUS
1481 make_LEN (location_type l)
1483 return symbol_type (token::TOKEN_LEN, std::move (l));
1493 #if 201103L <= YY_CPLUSPLUS
1496 make_PKT4 (location_type l)
1498 return symbol_type (token::TOKEN_PKT4, std::move (l));
1508 #if 201103L <= YY_CPLUSPLUS
1511 make_CHADDR (location_type l)
1513 return symbol_type (token::TOKEN_CHADDR, std::move (l));
1523 #if 201103L <= YY_CPLUSPLUS
1526 make_HLEN (location_type l)
1528 return symbol_type (token::TOKEN_HLEN, std::move (l));
1538 #if 201103L <= YY_CPLUSPLUS
1541 make_HTYPE (location_type l)
1543 return symbol_type (token::TOKEN_HTYPE, std::move (l));
1553 #if 201103L <= YY_CPLUSPLUS
1556 make_CIADDR (location_type l)
1558 return symbol_type (token::TOKEN_CIADDR, std::move (l));
1568 #if 201103L <= YY_CPLUSPLUS
1571 make_GIADDR (location_type l)
1573 return symbol_type (token::TOKEN_GIADDR, std::move (l));
1583 #if 201103L <= YY_CPLUSPLUS
1586 make_YIADDR (location_type l)
1588 return symbol_type (token::TOKEN_YIADDR, std::move (l));
1598 #if 201103L <= YY_CPLUSPLUS
1601 make_SIADDR (location_type l)
1603 return symbol_type (token::TOKEN_SIADDR, std::move (l));
1613 #if 201103L <= YY_CPLUSPLUS
1616 make_SUBSTRING (location_type l)
1618 return symbol_type (token::TOKEN_SUBSTRING, std::move (l));
1628 #if 201103L <= YY_CPLUSPLUS
1631 make_ALL (location_type l)
1633 return symbol_type (token::TOKEN_ALL, std::move (l));
1643 #if 201103L <= YY_CPLUSPLUS
1646 make_COMA (location_type l)
1648 return symbol_type (token::TOKEN_COMA, std::move (l));
1658 #if 201103L <= YY_CPLUSPLUS
1661 make_CONCAT (location_type l)
1663 return symbol_type (token::TOKEN_CONCAT, std::move (l));
1673 #if 201103L <= YY_CPLUSPLUS
1676 make_PLUS (location_type l)
1678 return symbol_type (token::TOKEN_PLUS, std::move (l));
1688 #if 201103L <= YY_CPLUSPLUS
1691 make_IFELSE (location_type l)
1693 return symbol_type (token::TOKEN_IFELSE, std::move (l));
1703 #if 201103L <= YY_CPLUSPLUS
1706 make_TOHEXSTRING (location_type l)
1708 return symbol_type (token::TOKEN_TOHEXSTRING, std::move (l));
1718 #if 201103L <= YY_CPLUSPLUS
1721 make_ADDRTOTEXT (location_type l)
1723 return symbol_type (token::TOKEN_ADDRTOTEXT, std::move (l));
1733 #if 201103L <= YY_CPLUSPLUS
1736 make_INT8TOTEXT (location_type l)
1738 return symbol_type (token::TOKEN_INT8TOTEXT, std::move (l));
1748 #if 201103L <= YY_CPLUSPLUS
1751 make_INT16TOTEXT (location_type l)
1753 return symbol_type (token::TOKEN_INT16TOTEXT, std::move (l));
1763 #if 201103L <= YY_CPLUSPLUS
1766 make_INT32TOTEXT (location_type l)
1768 return symbol_type (token::TOKEN_INT32TOTEXT, std::move (l));
1778 #if 201103L <= YY_CPLUSPLUS
1781 make_UINT8TOTEXT (location_type l)
1783 return symbol_type (token::TOKEN_UINT8TOTEXT, std::move (l));
1793 #if 201103L <= YY_CPLUSPLUS
1796 make_UINT16TOTEXT (location_type l)
1798 return symbol_type (token::TOKEN_UINT16TOTEXT, std::move (l));
1805 return symbol_type (token::TOKEN_UINT16TOTEXT, l);
1808 #if 201103L <= YY_CPLUSPLUS
1811 make_UINT32TOTEXT (location_type l)
1813 return symbol_type (token::TOKEN_UINT32TOTEXT, std::move (l));
1820 return symbol_type (token::TOKEN_UINT32TOTEXT, l);
1823 #if 201103L <= YY_CPLUSPLUS
1826 make_PKT6 (location_type l)
1828 return symbol_type (token::TOKEN_PKT6, std::move (l));
1838 #if 201103L <= YY_CPLUSPLUS
1841 make_MSGTYPE (location_type l)
1843 return symbol_type (token::TOKEN_MSGTYPE, std::move (l));
1853 #if 201103L <= YY_CPLUSPLUS
1856 make_TRANSID (location_type l)
1858 return symbol_type (token::TOKEN_TRANSID, std::move (l));
1868 #if 201103L <= YY_CPLUSPLUS
1871 make_VENDOR_CLASS (location_type l)
1873 return symbol_type (token::TOKEN_VENDOR_CLASS, std::move (l));
1880 return symbol_type (token::TOKEN_VENDOR_CLASS, l);
1883 #if 201103L <= YY_CPLUSPLUS
1886 make_VENDOR (location_type l)
1888 return symbol_type (token::TOKEN_VENDOR, std::move (l));
1898 #if 201103L <= YY_CPLUSPLUS
1901 make_ANY (location_type l)
1903 return symbol_type (token::TOKEN_ANY, std::move (l));
1913 #if 201103L <= YY_CPLUSPLUS
1916 make_DATA (location_type l)
1918 return symbol_type (token::TOKEN_DATA, std::move (l));
1928 #if 201103L <= YY_CPLUSPLUS
1931 make_ENTERPRISE (location_type l)
1933 return symbol_type (token::TOKEN_ENTERPRISE, std::move (l));
1943 #if 201103L <= YY_CPLUSPLUS
1946 make_TOPLEVEL_BOOL (location_type l)
1948 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, std::move (l));
1955 return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l);
1958 #if 201103L <= YY_CPLUSPLUS
1961 make_TOPLEVEL_STRING (location_type l)
1963 return symbol_type (token::TOKEN_TOPLEVEL_STRING, std::move (l));
1970 return symbol_type (token::TOKEN_TOPLEVEL_STRING, l);
1973 #if 201103L <= YY_CPLUSPLUS
1976 make_STRING (std::string v, location_type l)
1978 return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
1988 #if 201103L <= YY_CPLUSPLUS
1991 make_INTEGER (std::string v, location_type l)
1993 return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l));
2003 #if 201103L <= YY_CPLUSPLUS
2006 make_HEXSTRING (std::string v, location_type l)
2008 return symbol_type (token::TOKEN_HEXSTRING, std::move (v), std::move (l));
2015 return symbol_type (token::TOKEN_HEXSTRING, v, l);
2018 #if 201103L <= YY_CPLUSPLUS
2021 make_OPTION_NAME (std::string v, location_type l)
2023 return symbol_type (token::TOKEN_OPTION_NAME, std::move (v), std::move (l));
2030 return symbol_type (token::TOKEN_OPTION_NAME, v, l);
2033 #if 201103L <= YY_CPLUSPLUS
2036 make_IP_ADDRESS (std::string v, location_type l)
2038 return symbol_type (token::TOKEN_IP_ADDRESS, std::move (v), std::move (l));
2045 return symbol_type (token::TOKEN_IP_ADDRESS, v, l);
2061 int expected_tokens (symbol_kind_type yyarg[],
int yyargn)
const;
2069 #if YY_CPLUSPLUS < 201103L
2078 typedef unsigned char state_type;
2081 int yy_syntax_error_arguments_ (
const context& yyctx,
2082 symbol_kind_type yyarg[],
int yyargn)
const;
2086 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
2090 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
2094 static bool yy_pact_value_is_default_ (
int yyvalue);
2098 static bool yy_table_value_is_error_ (
int yyvalue);
2100 static const short yypact_ninf_;
2101 static const signed char yytable_ninf_;
2106 static symbol_kind_type yytranslate_ (
int t);
2109 static std::string yytnamerr_ (
const char *yystr);
2112 static const char*
const yytname_[];
2118 static const short yypact_[];
2123 static const signed char yydefact_[];
2126 static const short yypgoto_[];
2129 static const unsigned char yydefgoto_[];
2134 static const unsigned char yytable_[];
2136 static const unsigned char yycheck_[];
2140 static const signed char yystos_[];
2143 static const signed char yyr1_[];
2146 static const signed char yyr2_[];
2151 static const short yyrline_[];
2153 virtual void yy_reduce_print_ (
int r)
const;
2155 virtual void yy_stack_print_ ()
const;
2160 std::ostream* yycdebug_;
2165 template <
typename Base>
2166 void yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym)
const;
2173 template <
typename Base>
2174 void yy_destroy_ (
const char* yymsg, basic_symbol<Base>& yysym)
const;
2184 typedef state_type kind_type;
2190 by_state (const by_state& that) YY_NOEXCEPT;
2193 void clear () YY_NOEXCEPT;
2196 void move (by_state& that);
2200 symbol_kind_type kind () const YY_NOEXCEPT;
2204 enum { empty_state = 0 };
2212 struct stack_symbol_type : basic_symbol<by_state>
2215 typedef basic_symbol<by_state> super_type;
2217 stack_symbol_type ();
2219 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
2221 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
2222 #if YY_CPLUSPLUS < 201103L
2223 stack_symbol_type& operator= (stack_symbol_type& that);
2229 stack_symbol_type& operator= (
const stack_symbol_type& that);
2234 template <
typename T,
typename S = std::vector<T> >
2239 typedef typename S::iterator iterator;
2240 typedef typename S::const_iterator const_iterator;
2241 typedef typename S::size_type size_type;
2242 typedef typename std::ptrdiff_t index_type;
2244 stack (size_type n = 200)
2248 #if 201103L <= YY_CPLUSPLUS
2249 stack (
const stack&) =
delete;
2252 stack& operator= (
const stack&) =
delete;
2259 operator[] (index_type i)
const
2261 return seq_[size_type (size () - 1 - i)];
2268 operator[] (index_type i)
2270 return seq_[size_type (size () - 1 - i)];
2279 seq_.push_back (T ());
2280 operator[] (0).move (t);
2302 return index_type (seq_.size ());
2309 return seq_.begin ();
2323 slice (
const stack& stack, index_type range)
2329 operator[] (index_type i)
const
2331 return stack_[range_ - i];
2335 const stack& stack_;
2340 #if YY_CPLUSPLUS < 201103L
2341 stack (
const stack&);
2344 stack& operator= (
const stack&);
2352 typedef stack<stack_symbol_type> stack_type;
2355 stack_type yystack_;
2362 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
2370 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
2373 void yypop_ (
int n = 1);
2391 EvalParser::yytranslate_ (
int t)
2399 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2424 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2425 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2426 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2427 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2428 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2429 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2430 55, 56, 57, 58, 59, 60, 61, 62
2433 const int code_max = 317;
2436 return symbol_kind::S_YYEOF;
2437 else if (t <= code_max)
2438 return YY_CAST (symbol_kind_type, translate_table[t]);
2440 return symbol_kind::S_YYUNDEF;
2444 template <
typename Base>
2448 , location (that.location)
2450 switch (this->kind ())
2502 template <
typename Base>
2506 return this->kind ();
2509 template <
typename Base>
2516 template <
typename Base>
2520 super_type::move (s);
2521 switch (this->kind ())
2578 #if 201103L <= YY_CPLUSPLUS
2581 : kind_ (that.kind_)
2589 : kind_ (that.kind_)
2594 : kind_ (yytranslate_ (t))
2623 return this->kind ();
2626 #line 14 "parser.yy"
2628 #line 2629 "parser.h"
2633 #endif // !YY_EVAL_PARSER_H_INCLUDED
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
void move(basic_symbol &s)
Destructive move, s is emptied into this.
T & build(const T &t)
Instantiate a T in here from t.
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)
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.
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)
location_type location
The location.
Base super_type
Alias to Base.
static symbol_type make_GIADDR(const location_type &l)
by_kind()
Default constructor.
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)
FieldType
enum value that determines the field.
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)
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)
token::yytokentype token_kind_type
Token kind, as returned by yylex.
static symbol_type make_ANY(const location_type &l)
static symbol_type make_MEMBER(const location_type &l)
long double yyalign_me
Strongest alignment constraints.
static symbol_type make_EQUAL(const location_type &l)
semantic_type self_type
Type of *this.
static symbol_type make_LEN(const location_type &l)
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
~semantic_type() YY_NOEXCEPT
Destruction, allowed only if empty.
static symbol_type make_TOHEXSTRING(const location_type &l)
static symbol_type make_TOPLEVEL_BOOL(const location_type &l)
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.
static symbol_type make_RPAREN(const location_type &l)
static symbol_type make_IP_ADDRESS(const std::string &v, const location_type &l)
A buffer to store and retrieve objects.
const T & as() const YY_NOEXCEPT
Const accessor to a built T (for printer).
slice(const stack &stack, index_type range)
static symbol_type make_IFELSE(const location_type &l)
basic_symbol(typename Base::kind_type t, const TokenPkt::MetadataType &v, const location_type &l)
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
semantic_type(YY_RVREF(T) t)
Construct and fill.
#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)
void destroy()
Destroy the stored T.
basic_symbol< by_kind > super_type
Superclass.
basic_symbol(typename Base::kind_type t, const uint16_t &v, const location_type &l)
static symbol_type make_PKT6(const location_type &l)
Type access provider for token (enum) based symbols.
basic_symbol()
Default constructor.
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)
#define YY_CAST(Type, Val)
Defines the logger used by the top-level component of kea-dhcp-ddns.
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)
static symbol_type make_CIADDR(const location_type &l)
RepresentationType
Token representation type.
T & as() YY_NOEXCEPT
Accessor to a built T.
basic_symbol(typename Base::kind_type t, const location_type &l)
Constructors for typed symbols.
T & build()
Instantiate an empty T in here.
static symbol_type make_EVALUNDEF(const location_type &l)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
void swap(self_type &that) YY_NOEXCEPT
Swap the content with that, of same type.
symbol_kind_type kind_
The symbol kind.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
static symbol_type make_COMA(const location_type &l)
#define YY_MOVE_REF(Type)
static symbol_type make_LINKADDR(const location_type &l)
static symbol_type make_UINT16TOTEXT(const location_type &l)
void move(self_type &that)
Move the content of that to this.
FieldType
enum value that determines the field.
basic_symbol(typename Base::kind_type t, const TokenOption::RepresentationType &v, const location_type &l)
void copy(const self_type &that)
Copy the content of that to this.
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
T & emplace()
Instantiate an empty T in here.
static symbol_type make_TRANSID(const location_type &l)
semantic_type value
The semantic value.
static symbol_type make_VENDOR(const location_type &l)
static symbol_type make_PKT(const location_type &l)
symbol_type()
Empty symbol.
Present a slice of the top of a stack.
static symbol_type make_END(const location_type &l)
bool empty() const YY_NOEXCEPT
Whether empty.
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)
void move(by_kind &that)
Steal the symbol kind from that.
T & emplace(const T &t)
Instantiate a T in here from t.
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)
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)
static symbol_type make_RBRACKET(const location_type &l)
static symbol_type make_INT32TOTEXT(const location_type &l)
semantic_type() YY_NOEXCEPT
Empty construction.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
static symbol_type make_SUBSTRING(const location_type &l)