44#ifndef YY_EVAL_PARSER_H_INCLUDED
45# define YY_EVAL_PARSER_H_INCLUDED
53#include <boost/lexical_cast.hpp>
67#if defined __cplusplus
68# define YY_CPLUSPLUS __cplusplus
70# define YY_CPLUSPLUS 199711L
74#if 201103L <= YY_CPLUSPLUS
75# define YY_MOVE std::move
76# define YY_MOVE_OR_COPY move
77# define YY_MOVE_REF(Type) Type&&
78# define YY_RVREF(Type) Type&&
79# define YY_COPY(Type) Type
82# define YY_MOVE_OR_COPY copy
83# define YY_MOVE_REF(Type) Type&
84# define YY_RVREF(Type) const Type&
85# define YY_COPY(Type) const Type&
87# include "location.hh"
91# define YYASSERT assert
96# if (defined __GNUC__ \
97 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
98 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
99# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
101# define YY_ATTRIBUTE(Spec)
105#ifndef YY_ATTRIBUTE_PURE
106# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
109#ifndef YY_ATTRIBUTE_UNUSED
110# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
114#if ! defined lint || defined __GNUC__
115# define YYUSE(E) ((void) (E))
120#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
122# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
123 _Pragma ("GCC diagnostic push") \
124 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
125 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
126# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
127 _Pragma ("GCC diagnostic pop")
129# define YY_INITIAL_VALUE(Value) Value
131#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
132# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
133# define YY_IGNORE_MAYBE_UNINITIALIZED_END
135#ifndef YY_INITIAL_VALUE
136# define YY_INITIAL_VALUE(Value)
140# if defined __cplusplus
141# if 201103L <= __cplusplus
142# define YY_NULLPTR nullptr
147# define YY_NULLPTR ((void*)0)
165namespace isc {
namespace eval {
169 template <
typename T,
typename S = std::vector<T> >
188 return seq_[
size () - 1 - i];
206 return seq_[
size () - 1 - i];
224 seq_.push_back (T ());
250 return seq_.rbegin ();
267 template <
typename T,
typename S = stack<T> >
279 return stack_[range_ - i];
303 , yytypeid_ (YY_NULLPTR)
307 template <
typename T>
309 : yytypeid_ (&typeid (T))
312 new (yyas_<T> ()) T (
YY_MOVE (t));
322 template <
typename T>
328 yytypeid_ = &
typeid (T);
329 return *
new (yyas_<T> ()) T ();
332# if 201103L <= YY_CPLUSPLUS
334 template <
typename T,
typename U>
340 yytypeid_ = &
typeid (T);
341 return *
new (yyas_<T> ()) T (std::forward <U>(u));
345 template <
typename T>
351 yytypeid_ = &
typeid (T);
352 return *
new (yyas_<T> ()) T (t);
358 template <
typename T>
362 return emplace<T> ();
367 template <
typename T>
371 return emplace<T> (t);
375 template <
typename T>
380 YYASSERT (*yytypeid_ ==
typeid (T));
386 template <
typename T>
391 YYASSERT (*yytypeid_ ==
typeid (T));
404 template <
typename T>
409 YYASSERT (*yytypeid_ == *other.yytypeid_);
410 std::swap (as<T> (), other.
as<T> ());
416 template <
typename T>
420# if 201103L <= YY_CPLUSPLUS
421 emplace<T> (std::move (other.
as<T> ()));
429# if 201103L <= YY_CPLUSPLUS
431 template <
typename T>
435 emplace<T> (std::move (other.as<T> ()));
441 template <
typename T>
445 emplace<T> (other.
as<T> ());
449 template <
typename T>
454 yytypeid_ = YY_NULLPTR;
463 template <
typename T>
467 void *yyp = yybuffer_.yyraw;
468 return static_cast<T*
> (yyp);
472 template <
typename T>
476 const void *yyp = yybuffer_.yyraw;
477 return static_cast<const T*
> (yyp);
489 const std::type_info *yytypeid_;
628 template <
typename Base>
642# if 201103L <= YY_CPLUSPLUS
647# if 201103L <= YY_CPLUSPLUS
652# if 201103L <= YY_CPLUSPLUS
657# if 201103L <= YY_CPLUSPLUS
662# if 201103L <= YY_CPLUSPLUS
667# if 201103L <= YY_CPLUSPLUS
672# if 201103L <= YY_CPLUSPLUS
677# if 201103L <= YY_CPLUSPLUS
682# if 201103L <= YY_CPLUSPLUS
687# if 201103L <= YY_CPLUSPLUS
713#if YY_CPLUSPLUS < 201103L
766 virtual int parse ();
772 void set_debug_stream (std::ostream &);
775 typedef
int debug_level_type;
779 void set_debug_level (debug_level_type l);
1011 typedef int state_type;
1016 virtual std::string yysyntax_error_ (state_type yystate,
1022 state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
1026 static bool yy_pact_value_is_default_ (
int yyvalue);
1030 static bool yy_table_value_is_error_ (
int yyvalue);
1032 static const signed char yypact_ninf_;
1033 static const signed char yytable_ninf_;
1041 static const short yypact_[];
1046 static const unsigned char yydefact_[];
1049 static const short yypgoto_[];
1052 static const short yydefgoto_[];
1057 static const unsigned char yytable_[];
1059 static const unsigned char yycheck_[];
1063 static const unsigned char yystos_[];
1066 static const unsigned char yyr1_[];
1069 static const unsigned char yyr2_[];
1073 static std::string yytnamerr_ (
const char *n);
1077 static const char*
const yytname_[];
1080 static const unsigned short yyrline_[];
1082 virtual void yy_reduce_print_ (
int r);
1084 virtual void yystack_print_ ();
1089 std::ostream* yycdebug_;
1094 template <
typename Base>
1102 template <
typename Base>
1113 typedef state_type kind_type;
1116 by_state (kind_type s);
1119 by_state (
const by_state& other);
1125 void move (by_state& that);
1132 enum { empty_state = -1 };
1140 struct stack_symbol_type : basic_symbol<by_state>
1143 typedef basic_symbol<by_state> super_type;
1145 stack_symbol_type ();
1147 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
1150#if YY_CPLUSPLUS < 201103L
1153 stack_symbol_type& operator= (stack_symbol_type& that);
1161 stack_type yystack_;
1168 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
1179 void yypop_ (
int n = 1);
1201 EvalParser::yytranslate_ (token_type t)
1207 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1232 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1233 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1234 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1235 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1236 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1237 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
1239 const unsigned user_token_number_max_ = 309;
1242 if (
static_cast<int> (t) <= yyeof_)
1244 else if (
static_cast<unsigned> (t) <= user_token_number_max_)
1245 return translate_table[t];
1247 return undef_token_;
1252 : std::runtime_error (m)
1257 template <
typename Base>
1263 template <
typename Base>
1267 , location (
YY_MOVE (other.location))
1269 switch (other.type_get ())
1320# if 201103L <= YY_CPLUSPLUS
1321 template <
typename Base>
1324 , location (std::move (l))
1327 template <
typename Base>
1333# if 201103L <= YY_CPLUSPLUS
1334 template <
typename Base>
1337 , value (std::move (v))
1338 , location (std::move (l))
1341 template <
typename Base>
1348# if 201103L <= YY_CPLUSPLUS
1349 template <
typename Base>
1352 , value (std::move (v))
1353 , location (std::move (l))
1356 template <
typename Base>
1363# if 201103L <= YY_CPLUSPLUS
1364 template <
typename Base>
1367 , value (std::move (v))
1368 , location (std::move (l))
1371 template <
typename Base>
1378# if 201103L <= YY_CPLUSPLUS
1379 template <
typename Base>
1382 , value (std::move (v))
1383 , location (std::move (l))
1386 template <
typename Base>
1393# if 201103L <= YY_CPLUSPLUS
1394 template <
typename Base>
1397 , value (std::move (v))
1398 , location (std::move (l))
1401 template <
typename Base>
1408# if 201103L <= YY_CPLUSPLUS
1409 template <
typename Base>
1412 , value (std::move (v))
1413 , location (std::move (l))
1416 template <
typename Base>
1423# if 201103L <= YY_CPLUSPLUS
1424 template <
typename Base>
1427 , value (std::move (v))
1428 , location (std::move (l))
1431 template <
typename Base>
1438# if 201103L <= YY_CPLUSPLUS
1439 template <
typename Base>
1442 , value (std::move (v))
1443 , location (std::move (l))
1446 template <
typename Base>
1453# if 201103L <= YY_CPLUSPLUS
1454 template <
typename Base>
1457 , value (std::move (v))
1458 , location (std::move (l))
1461 template <
typename Base>
1470 template <
typename Base>
1476 template <
typename Base>
1494 value.template destroy< TokenOption::RepresentationType > ();
1498 value.template destroy< TokenPkt4::FieldType > ();
1502 value.template destroy< TokenPkt6::FieldType > ();
1506 value.template destroy< TokenPkt::MetadataType > ();
1510 value.template destroy< TokenRelay6Field::FieldType > ();
1514 value.template destroy< int8_t > ();
1522 value.template destroy< std::string > ();
1526 value.template destroy< uint16_t > ();
1531 value.template destroy< uint32_t > ();
1541 template <
typename Base>
1548 template <
typename Base>
1552 super_type::move (s);
1553 switch (this->type_get ())
1616 : type (yytranslate_ (t))
1648 const unsigned short
1651 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1652 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1653 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1654 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1655 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1656 305, 306, 307, 308, 309
1658 return static_cast<token_type> (yytoken_number_[type]);
2036#line 2037 "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.
A stack with random access from its top.
Evaluation context, an interface to the expression evaluation.
static symbol_type make_EXISTS(YY_COPY(location_type) l)
static symbol_type make_IP_ADDRESS(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_AND(YY_COPY(location_type) l)
static symbol_type make_RELAY4(YY_COPY(location_type) l)
token::yytokentype token_type
(External) token type, as returned by yylex.
static symbol_type make_DOT(YY_COPY(location_type) l)
static symbol_type make_HLEN(YY_COPY(location_type) l)
static symbol_type make_GIADDR(YY_COPY(location_type) l)
basic_symbol< by_type > symbol_type
"External" symbols: returned by the scanner.
static symbol_type make_OPTION_NAME(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_TOPLEVEL_STRING(YY_COPY(location_type) l)
static symbol_type make_HEXSTRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_DST(YY_COPY(location_type) l)
static symbol_type make_SUBSTRING(YY_COPY(location_type) l)
static symbol_type make_LINKADDR(YY_COPY(location_type) l)
static symbol_type make_YIADDR(YY_COPY(location_type) l)
static symbol_type make_VENDOR_CLASS(YY_COPY(location_type) l)
virtual int parse()
Parse.
static symbol_type make_HTYPE(YY_COPY(location_type) l)
static symbol_type make_TEXT(YY_COPY(location_type) l)
static symbol_type make_TOPLEVEL_BOOL(YY_COPY(location_type) l)
static symbol_type make_IFACE(YY_COPY(location_type) l)
static symbol_type make_COMA(YY_COPY(location_type) l)
static symbol_type make_OR(YY_COPY(location_type) l)
static symbol_type make_SRC(YY_COPY(location_type) l)
static symbol_type make_END(YY_COPY(location_type) l)
static symbol_type make_CHADDR(YY_COPY(location_type) l)
static symbol_type make_MSGTYPE(YY_COPY(location_type) l)
int symbol_number_type
Symbol type: an internal symbol number.
static symbol_type make_SIADDR(YY_COPY(location_type) l)
static symbol_type make_PEERADDR(YY_COPY(location_type) l)
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
static symbol_type make_OPTION(YY_COPY(location_type) l)
static symbol_type make_RELAY6(YY_COPY(location_type) l)
static symbol_type make_RPAREN(YY_COPY(location_type) l)
static symbol_type make_PKT6(YY_COPY(location_type) l)
location location_type
Symbol locations.
static symbol_type make_STRING(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_VENDOR(YY_COPY(location_type) l)
static symbol_type make_HEX(YY_COPY(location_type) l)
static symbol_type make_TOHEXSTRING(YY_COPY(location_type) l)
static symbol_type make_CONCAT(YY_COPY(location_type) l)
static symbol_type make_CIADDR(YY_COPY(location_type) l)
static symbol_type make_NOT(YY_COPY(location_type) l)
static symbol_type make_MEMBER(YY_COPY(location_type) l)
variant< sizeof(union_type)> semantic_type
Symbol semantic values.
static symbol_type make_LEN(YY_COPY(location_type) l)
static symbol_type make_ENTERPRISE(YY_COPY(location_type) l)
static symbol_type make_LPAREN(YY_COPY(location_type) l)
static symbol_type make_PKT4(YY_COPY(location_type) l)
static symbol_type make_TRANSID(YY_COPY(location_type) l)
static symbol_type make_DATA(YY_COPY(location_type) l)
static symbol_type make_INTEGER(YY_COPY(std::string) v, YY_COPY(location_type) l)
static symbol_type make_EQUAL(YY_COPY(location_type) l)
static symbol_type make_RBRACKET(YY_COPY(location_type) l)
static symbol_type make_ALL(YY_COPY(location_type) l)
static symbol_type make_PKT(YY_COPY(location_type) l)
static symbol_type make_ANY(YY_COPY(location_type) l)
virtual void error(const location_type &loc, const std::string &msg)
Report a syntax error.
static symbol_type make_IFELSE(YY_COPY(location_type) l)
static symbol_type make_LBRACKET(YY_COPY(location_type) l)
Present a slice of the top of a stack.
slice(const S &stack, int range)
const T & operator[](int i) const
A stack with random access from its top.
S::reverse_iterator iterator
void push(YY_MOVE_REF(T) t)
Steal the contents of t.
const_iterator end() const
const_iterator begin() const
T & operator[](size_type i)
Random access.
S::const_reverse_iterator const_iterator
Forward declaration of the EvalContext class.
Defines the logger used by the top-level component of kea-dhcp-ddns.
basic_symbol()
Default constructor.
void move(basic_symbol &s)
Destructive move, s is emptied into this.
semantic_type value
The semantic value.
location_type location
The location.
Base super_type
Alias to Base.
~basic_symbol()
Destroy the symbol.
bool empty() const
Whether empty.
void clear()
Destroy contents, and record that is empty.
Type access provider for token (enum) based symbols.
by_type()
Default constructor.
void move(by_type &that)
Steal the symbol type from that.
token_type kind_type
The symbol type as needed by the constructor.
symbol_number_type type_get() const
The (internal) type number (corresponding to type).
void clear()
Record that this symbol is empty.
token_type token() const
The token.
Syntax errors thrown from user actions.
syntax_error(const location_type &l, const std::string &m)
A char[S] buffer to store and retrieve objects.
void swap(self_type &other)
Swap the content with other, of same type.
void destroy()
Destroy the stored T.
const T & as() const
Const accessor to a built T (for printer).
T & build(const T &t)
Instantiate a T in here from t.
T & emplace()
Instantiate an empty T in here.
T & build()
Instantiate an empty T in here.
variant()
Empty construction.
void move(self_type &other)
Move the content of other to this.
variant(YY_RVREF(T) t)
Construct and fill.
T & as()
Accessor to a built T.
T & emplace(const T &t)
Instantiate a T in here from t.
char yyraw[S]
A buffer large enough to store any of the semantic values.
long double yyalign_me
Strongest alignment constraints.
~variant()
Destruction, allowed only if empty.
void copy(const self_type &other)
Copy the content of other to this.
variant< S > self_type
Type of *this.
An auxiliary type to compute the largest semantic type.
char dummy4[sizeof(TokenPkt::MetadataType)]
char dummy9[sizeof(uint32_t)]
char dummy3[sizeof(TokenPkt6::FieldType)]
char dummy5[sizeof(TokenRelay6Field::FieldType)]
char dummy1[sizeof(TokenOption::RepresentationType)]
char dummy2[sizeof(TokenPkt4::FieldType)]
char dummy8[sizeof(uint16_t)]
char dummy7[sizeof(std::string)]
char dummy6[sizeof(int8_t)]