mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 15:35:17 +00:00
[#969] DHCPv6 allocators configurable
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// A Bison parser, made by GNU Bison 3.7.6.
|
||||
// A Bison parser, made by GNU Bison 3.8.2.
|
||||
|
||||
// Skeleton interface for Bison LALR(1) parsers in C++
|
||||
|
||||
@@ -133,12 +133,18 @@ using namespace std;
|
||||
# define YY_USE(E) /* empty */
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
|
||||
# else
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||
# endif
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
@@ -200,7 +206,7 @@ using namespace std;
|
||||
|
||||
#line 14 "dhcp4_parser.yy"
|
||||
namespace isc { namespace dhcp {
|
||||
#line 204 "dhcp4_parser.h"
|
||||
#line 210 "dhcp4_parser.h"
|
||||
|
||||
|
||||
|
||||
@@ -209,27 +215,32 @@ namespace isc { namespace dhcp {
|
||||
class Dhcp4Parser
|
||||
{
|
||||
public:
|
||||
#ifndef PARSER4_STYPE
|
||||
#ifdef PARSER4_STYPE
|
||||
# ifdef __GNUC__
|
||||
# pragma GCC message "bison: do not #define PARSER4_STYPE in C++, use %define api.value.type"
|
||||
# endif
|
||||
typedef PARSER4_STYPE value_type;
|
||||
#else
|
||||
/// A buffer to store and retrieve objects.
|
||||
///
|
||||
/// Sort of a variant, but does not keep track of the nature
|
||||
/// of the stored data, since that knowledge is available
|
||||
/// via the current parser state.
|
||||
class semantic_type
|
||||
class value_type
|
||||
{
|
||||
public:
|
||||
/// Type of *this.
|
||||
typedef semantic_type self_type;
|
||||
typedef value_type self_type;
|
||||
|
||||
/// Empty construction.
|
||||
semantic_type () YY_NOEXCEPT
|
||||
: yybuffer_ ()
|
||||
value_type () YY_NOEXCEPT
|
||||
: yyraw_ ()
|
||||
, yytypeid_ (YY_NULLPTR)
|
||||
{}
|
||||
|
||||
/// Construct and fill.
|
||||
template <typename T>
|
||||
semantic_type (YY_RVREF (T) t)
|
||||
value_type (YY_RVREF (T) t)
|
||||
: yytypeid_ (&typeid (T))
|
||||
{
|
||||
PARSER4__ASSERT (sizeof (T) <= size);
|
||||
@@ -238,13 +249,13 @@ namespace isc { namespace dhcp {
|
||||
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
/// Non copyable.
|
||||
semantic_type (const self_type&) = delete;
|
||||
value_type (const self_type&) = delete;
|
||||
/// Non copyable.
|
||||
self_type& operator= (const self_type&) = delete;
|
||||
#endif
|
||||
|
||||
/// Destruction, allowed only if empty.
|
||||
~semantic_type () YY_NOEXCEPT
|
||||
~value_type () YY_NOEXCEPT
|
||||
{
|
||||
PARSER4__ASSERT (!yytypeid_);
|
||||
}
|
||||
@@ -388,7 +399,7 @@ namespace isc { namespace dhcp {
|
||||
private:
|
||||
#if YY_CPLUSPLUS < 201103L
|
||||
/// Non copyable.
|
||||
semantic_type (const self_type&);
|
||||
value_type (const self_type&);
|
||||
/// Non copyable.
|
||||
self_type& operator= (const self_type&);
|
||||
#endif
|
||||
@@ -398,7 +409,7 @@ namespace isc { namespace dhcp {
|
||||
T*
|
||||
yyas_ () YY_NOEXCEPT
|
||||
{
|
||||
void *yyp = yybuffer_.yyraw;
|
||||
void *yyp = yyraw_;
|
||||
return static_cast<T*> (yyp);
|
||||
}
|
||||
|
||||
@@ -407,7 +418,7 @@ namespace isc { namespace dhcp {
|
||||
const T*
|
||||
yyas_ () const YY_NOEXCEPT
|
||||
{
|
||||
const void *yyp = yybuffer_.yyraw;
|
||||
const void *yyp = yyraw_;
|
||||
return static_cast<const T*> (yyp);
|
||||
}
|
||||
|
||||
@@ -445,18 +456,19 @@ namespace isc { namespace dhcp {
|
||||
union
|
||||
{
|
||||
/// Strongest alignment constraints.
|
||||
long double yyalign_me;
|
||||
long double yyalign_me_;
|
||||
/// A buffer large enough to store any of the semantic values.
|
||||
char yyraw[size];
|
||||
} yybuffer_;
|
||||
char yyraw_[size];
|
||||
};
|
||||
|
||||
/// Whether the content is built: if defined, the name of the stored type.
|
||||
const std::type_info *yytypeid_;
|
||||
};
|
||||
|
||||
#else
|
||||
typedef PARSER4_STYPE semantic_type;
|
||||
#endif
|
||||
/// Backward compatibility (Bison 3.8).
|
||||
typedef value_type semantic_type;
|
||||
|
||||
/// Symbol locations.
|
||||
typedef location location_type;
|
||||
|
||||
@@ -700,7 +712,7 @@ namespace isc { namespace dhcp {
|
||||
};
|
||||
|
||||
/// Token kind, as returned by yylex.
|
||||
typedef token::yytokentype token_kind_type;
|
||||
typedef token::token_kind_type token_kind_type;
|
||||
|
||||
/// Backward compatibility alias (Bison 3.6).
|
||||
typedef token_kind_type token_type;
|
||||
@@ -1373,7 +1385,7 @@ namespace isc { namespace dhcp {
|
||||
typedef Base super_type;
|
||||
|
||||
/// Default constructor.
|
||||
basic_symbol ()
|
||||
basic_symbol () YY_NOEXCEPT
|
||||
: value ()
|
||||
, location ()
|
||||
{}
|
||||
@@ -1514,6 +1526,8 @@ namespace isc { namespace dhcp {
|
||||
clear ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Destroy contents, and record that is empty.
|
||||
void clear () YY_NOEXCEPT
|
||||
{
|
||||
@@ -1581,7 +1595,7 @@ switch (yykind)
|
||||
void move (basic_symbol& s);
|
||||
|
||||
/// The semantic value.
|
||||
semantic_type value;
|
||||
value_type value;
|
||||
|
||||
/// The location.
|
||||
location_type location;
|
||||
@@ -1596,22 +1610,24 @@ switch (yykind)
|
||||
/// Type access provider for token (enum) based symbols.
|
||||
struct by_kind
|
||||
{
|
||||
/// Default constructor.
|
||||
by_kind ();
|
||||
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
/// Move constructor.
|
||||
by_kind (by_kind&& that);
|
||||
#endif
|
||||
|
||||
/// Copy constructor.
|
||||
by_kind (const by_kind& that);
|
||||
|
||||
/// The symbol kind as needed by the constructor.
|
||||
typedef token_kind_type kind_type;
|
||||
|
||||
/// Default constructor.
|
||||
by_kind () YY_NOEXCEPT;
|
||||
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
/// Move constructor.
|
||||
by_kind (by_kind&& that) YY_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
/// Copy constructor.
|
||||
by_kind (const by_kind& that) YY_NOEXCEPT;
|
||||
|
||||
/// Constructor from (external) token numbers.
|
||||
by_kind (kind_type t);
|
||||
by_kind (kind_type t) YY_NOEXCEPT;
|
||||
|
||||
|
||||
|
||||
/// Record that this symbol is empty.
|
||||
void clear () YY_NOEXCEPT;
|
||||
@@ -1641,59 +1657,69 @@ switch (yykind)
|
||||
typedef basic_symbol<by_kind> super_type;
|
||||
|
||||
/// Empty symbol.
|
||||
symbol_type () {}
|
||||
symbol_type () YY_NOEXCEPT {}
|
||||
|
||||
/// Constructor for valueless symbols, and symbols from each type.
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
symbol_type (int tok, location_type l)
|
||||
: super_type(token_type (tok), std::move (l))
|
||||
: super_type (token_kind_type (tok), std::move (l))
|
||||
#else
|
||||
symbol_type (int tok, const location_type& l)
|
||||
: super_type(token_type (tok), l)
|
||||
: super_type (token_kind_type (tok), l)
|
||||
#endif
|
||||
{
|
||||
#if !defined _MSC_VER || defined __clang__
|
||||
PARSER4__ASSERT (tok == token::TOKEN_END
|
||||
|| (token::TOKEN_PARSER4_error <= tok && tok <= token::TOKEN_SUB_CONFIG_CONTROL));
|
||||
#endif
|
||||
}
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
symbol_type (int tok, bool v, location_type l)
|
||||
: super_type(token_type (tok), std::move (v), std::move (l))
|
||||
: super_type (token_kind_type (tok), std::move (v), std::move (l))
|
||||
#else
|
||||
symbol_type (int tok, const bool& v, const location_type& l)
|
||||
: super_type(token_type (tok), v, l)
|
||||
: super_type (token_kind_type (tok), v, l)
|
||||
#endif
|
||||
{
|
||||
#if !defined _MSC_VER || defined __clang__
|
||||
PARSER4__ASSERT (tok == token::TOKEN_BOOLEAN);
|
||||
#endif
|
||||
}
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
symbol_type (int tok, double v, location_type l)
|
||||
: super_type(token_type (tok), std::move (v), std::move (l))
|
||||
: super_type (token_kind_type (tok), std::move (v), std::move (l))
|
||||
#else
|
||||
symbol_type (int tok, const double& v, const location_type& l)
|
||||
: super_type(token_type (tok), v, l)
|
||||
: super_type (token_kind_type (tok), v, l)
|
||||
#endif
|
||||
{
|
||||
#if !defined _MSC_VER || defined __clang__
|
||||
PARSER4__ASSERT (tok == token::TOKEN_FLOAT);
|
||||
#endif
|
||||
}
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
symbol_type (int tok, int64_t v, location_type l)
|
||||
: super_type(token_type (tok), std::move (v), std::move (l))
|
||||
: super_type (token_kind_type (tok), std::move (v), std::move (l))
|
||||
#else
|
||||
symbol_type (int tok, const int64_t& v, const location_type& l)
|
||||
: super_type(token_type (tok), v, l)
|
||||
: super_type (token_kind_type (tok), v, l)
|
||||
#endif
|
||||
{
|
||||
#if !defined _MSC_VER || defined __clang__
|
||||
PARSER4__ASSERT (tok == token::TOKEN_INTEGER);
|
||||
#endif
|
||||
}
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
symbol_type (int tok, std::string v, location_type l)
|
||||
: super_type(token_type (tok), std::move (v), std::move (l))
|
||||
: super_type (token_kind_type (tok), std::move (v), std::move (l))
|
||||
#else
|
||||
symbol_type (int tok, const std::string& v, const location_type& l)
|
||||
: super_type(token_type (tok), v, l)
|
||||
: super_type (token_kind_type (tok), v, l)
|
||||
#endif
|
||||
{
|
||||
#if !defined _MSC_VER || defined __clang__
|
||||
PARSER4__ASSERT (tok == token::TOKEN_STRING);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1742,7 +1768,7 @@ switch (yykind)
|
||||
/// YYSYMBOL. No bounds checking.
|
||||
static std::string symbol_name (symbol_kind_type yysymbol);
|
||||
|
||||
// Implementation of make_symbol for each symbol type.
|
||||
// Implementation of make_symbol for each token kind.
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
static
|
||||
symbol_type
|
||||
@@ -4939,19 +4965,19 @@ switch (yykind)
|
||||
|
||||
/// Whether the given \c yypact_ value indicates a defaulted state.
|
||||
/// \param yyvalue the value to check
|
||||
static bool yy_pact_value_is_default_ (int yyvalue);
|
||||
static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
|
||||
|
||||
/// Whether the given \c yytable_ value indicates a syntax error.
|
||||
/// \param yyvalue the value to check
|
||||
static bool yy_table_value_is_error_ (int yyvalue);
|
||||
static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
|
||||
|
||||
static const short yypact_ninf_;
|
||||
static const signed char yytable_ninf_;
|
||||
|
||||
/// Convert a scanner token kind \a t to a symbol kind.
|
||||
/// In theory \a t should be a token_kind_type, but character literals
|
||||
/// are valid, yet not members of the token_type enum.
|
||||
static symbol_kind_type yytranslate_ (int t);
|
||||
/// are valid, yet not members of the token_kind_type enum.
|
||||
static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
|
||||
|
||||
/// Convert the symbol name \a n to a form suitable for a diagnostic.
|
||||
static std::string yytnamerr_ (const char *yystr);
|
||||
@@ -4983,14 +5009,14 @@ switch (yykind)
|
||||
|
||||
static const short yycheck_[];
|
||||
|
||||
// YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
||||
// symbol of state STATE-NUM.
|
||||
// YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
|
||||
// state STATE-NUM.
|
||||
static const short yystos_[];
|
||||
|
||||
// YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
|
||||
// YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
|
||||
static const short yyr1_[];
|
||||
|
||||
// YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
|
||||
// YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
|
||||
static const signed char yyr2_[];
|
||||
|
||||
|
||||
@@ -5089,7 +5115,7 @@ switch (yykind)
|
||||
typedef typename S::size_type size_type;
|
||||
typedef typename std::ptrdiff_t index_type;
|
||||
|
||||
stack (size_type n = 200)
|
||||
stack (size_type n = 200) YY_NOEXCEPT
|
||||
: seq_ (n)
|
||||
{}
|
||||
|
||||
@@ -5168,7 +5194,7 @@ switch (yykind)
|
||||
class slice
|
||||
{
|
||||
public:
|
||||
slice (const stack& stack, index_type range)
|
||||
slice (const stack& stack, index_type range) YY_NOEXCEPT
|
||||
: stack_ (stack)
|
||||
, range_ (range)
|
||||
{}
|
||||
@@ -5218,7 +5244,7 @@ switch (yykind)
|
||||
void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
|
||||
|
||||
/// Pop \a n symbols from the stack.
|
||||
void yypop_ (int n = 1);
|
||||
void yypop_ (int n = 1) YY_NOEXCEPT;
|
||||
|
||||
/// Constants.
|
||||
enum
|
||||
@@ -5236,7 +5262,7 @@ switch (yykind)
|
||||
|
||||
inline
|
||||
Dhcp4Parser::symbol_kind_type
|
||||
Dhcp4Parser::yytranslate_ (int t)
|
||||
Dhcp4Parser::yytranslate_ (int t) YY_NOEXCEPT
|
||||
{
|
||||
// YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
|
||||
// TOKEN-NUM as returned by yylex.
|
||||
@@ -5298,7 +5324,7 @@ switch (yykind)
|
||||
if (t <= 0)
|
||||
return symbol_kind::S_YYEOF;
|
||||
else if (t <= code_max)
|
||||
return YY_CAST (symbol_kind_type, translate_table[t]);
|
||||
return static_cast <symbol_kind_type> (translate_table[t]);
|
||||
else
|
||||
return symbol_kind::S_YYUNDEF;
|
||||
}
|
||||
@@ -5348,6 +5374,7 @@ switch (yykind)
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Base>
|
||||
Dhcp4Parser::symbol_kind_type
|
||||
Dhcp4Parser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
|
||||
@@ -5355,6 +5382,7 @@ switch (yykind)
|
||||
return this->kind ();
|
||||
}
|
||||
|
||||
|
||||
template <typename Base>
|
||||
bool
|
||||
Dhcp4Parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
|
||||
@@ -5406,13 +5434,13 @@ switch (yykind)
|
||||
|
||||
// by_kind.
|
||||
inline
|
||||
Dhcp4Parser::by_kind::by_kind ()
|
||||
Dhcp4Parser::by_kind::by_kind () YY_NOEXCEPT
|
||||
: kind_ (symbol_kind::S_YYEMPTY)
|
||||
{}
|
||||
|
||||
#if 201103L <= YY_CPLUSPLUS
|
||||
inline
|
||||
Dhcp4Parser::by_kind::by_kind (by_kind&& that)
|
||||
Dhcp4Parser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT
|
||||
: kind_ (that.kind_)
|
||||
{
|
||||
that.clear ();
|
||||
@@ -5420,15 +5448,17 @@ switch (yykind)
|
||||
#endif
|
||||
|
||||
inline
|
||||
Dhcp4Parser::by_kind::by_kind (const by_kind& that)
|
||||
Dhcp4Parser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT
|
||||
: kind_ (that.kind_)
|
||||
{}
|
||||
|
||||
inline
|
||||
Dhcp4Parser::by_kind::by_kind (token_kind_type t)
|
||||
Dhcp4Parser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT
|
||||
: kind_ (yytranslate_ (t))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
inline
|
||||
void
|
||||
Dhcp4Parser::by_kind::clear () YY_NOEXCEPT
|
||||
@@ -5451,6 +5481,7 @@ switch (yykind)
|
||||
return kind_;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
Dhcp4Parser::symbol_kind_type
|
||||
Dhcp4Parser::by_kind::type_get () const YY_NOEXCEPT
|
||||
@@ -5458,9 +5489,10 @@ switch (yykind)
|
||||
return this->kind ();
|
||||
}
|
||||
|
||||
|
||||
#line 14 "dhcp4_parser.yy"
|
||||
} } // isc::dhcp
|
||||
#line 5464 "dhcp4_parser.h"
|
||||
#line 5496 "dhcp4_parser.h"
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user