From 6bda4b25da6b3b5733a05d821818b2277727f702 Mon Sep 17 00:00:00 2001 From: Wlodek Wencel Date: Mon, 19 Aug 2019 14:49:53 +0200 Subject: [PATCH] pre 1.4.0-P2 release changes --- COPYING | 2 +- ChangeLog | 2 + configure.ac | 2 +- doc/guide/kea-guide.xml | 2 +- src/bin/admin/kea-admin.xml | 6 +- src/bin/agent/agent_parser.cc | 764 +-- src/bin/agent/agent_parser.h | 2062 +++++--- src/bin/agent/kea-ctrl-agent.xml | 6 +- src/bin/agent/location.hh | 174 +- src/bin/agent/position.hh | 193 +- src/bin/agent/stack.hh | 167 +- src/bin/d2/d2_parser.cc | 952 ++-- src/bin/d2/d2_parser.h | 2356 +++++---- src/bin/d2/kea-dhcp-ddns.xml | 6 +- src/bin/d2/location.hh | 174 +- src/bin/d2/position.hh | 193 +- src/bin/d2/stack.hh | 167 +- src/bin/dhcp4/dhcp4_parser.cc | 1645 +++--- src/bin/dhcp4/dhcp4_parser.h | 5621 +++++++++++--------- src/bin/dhcp4/dhcp4_srv.cc | 2 +- src/bin/dhcp4/kea-dhcp4.xml | 6 +- src/bin/dhcp4/location.hh | 15 +- src/bin/dhcp4/position.hh | 3 +- src/bin/dhcp4/stack.hh | 3 +- src/bin/dhcp6/dhcp6_parser.cc | 1660 +++--- src/bin/dhcp6/dhcp6_parser.h | 5718 ++++++++++++--------- src/bin/dhcp6/dhcp6_srv.cc | 2 +- src/bin/dhcp6/kea-dhcp6.xml | 6 +- src/bin/dhcp6/location.hh | 15 +- src/bin/dhcp6/position.hh | 3 +- src/bin/dhcp6/stack.hh | 3 +- src/bin/dhcp6/tests/dhcp6_srv_unittest.cc | 2 +- src/bin/dhcp6/tests/dhcp6_test_utils.h | 2 +- src/bin/keactrl/keactrl.xml | 6 +- src/bin/lfc/kea-lfc.xml | 6 +- src/bin/perfdhcp/perfdhcp.xml | 6 +- src/bin/shell/kea-shell.xml | 6 +- src/bin/sockcreator/kea-sockcreator.xml | 6 +- src/lib/dhcp/tests/duid_unittest.cc | 2 +- src/lib/dhcp_ddns/ncr_msg.cc | 2 +- src/lib/dns/name.cc | 2 +- src/lib/eval/location.hh | 173 +- src/lib/eval/parser.cc | 798 +-- src/lib/eval/parser.h | 2434 +++++---- src/lib/eval/position.hh | 192 +- src/lib/eval/stack.hh | 166 +- tools/system_messages.cc | 2 +- 47 files changed, 14411 insertions(+), 11324 deletions(-) diff --git a/COPYING b/COPYING index 0fdf7c5f45..95d3255cf9 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (C) 2009-2018 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2009-2019 Internet Systems Consortium, Inc. ("ISC") This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/ChangeLog b/ChangeLog index 8a4b0dbd2a..7c77750229 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +Kea 1.4.0-P2 released on Aug 28, 2019 + 1434. [build] marcin Bumped up libraries version numbers for Kea 1.4.0-P1 release. (Gitlab #841,!17-p, git 2d259c5b6f0cd0f62adc4dbb2bbf1a4d0bd89ccc) diff --git a/configure.ac b/configure.ac index 9e0cf5e67a..e93bbb6eb9 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AC_PREREQ([2.69]) # For patch releases, this is x.y.x-Pn, where x.y.z denotes the release # that was used as the base and n is the patch number. Patchlevel # counts from 1. -AC_INIT(kea,1.4.0-P1, kea-dev@lists.isc.org) +AC_INIT(kea,1.4.0-P2, kea-dev@lists.isc.org) AC_CONFIG_SRCDIR(README) # serial-tests is not available in automake version before 1.13, so diff --git a/doc/guide/kea-guide.xml b/doc/guide/kea-guide.xml index b6d77e8ad8..0c6c26ea5e 100644 --- a/doc/guide/kea-guide.xml +++ b/doc/guide/kea-guide.xml @@ -31,7 +31,7 @@ This is the reference guide for Kea version &keaversion;. - 2010-2018 + 2010-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/admin/kea-admin.xml b/src/bin/admin/kea-admin.xml index 7e10d19144..eccae13353 100644 --- a/src/bin/admin/kea-admin.xml +++ b/src/bin/admin/kea-admin.xml @@ -10,8 +10,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin Siodelski, Thomas Markwalder, Francis Dupont, Jeremy C. Reed, @@ -34,7 +34,7 @@ - 2014-2018 + 2014-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/agent/agent_parser.cc b/src/bin/agent/agent_parser.cc index 4ce4ea98cf..0d914d29be 100644 --- a/src/bin/agent/agent_parser.cc +++ b/src/bin/agent/agent_parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -30,32 +30,24 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. +// Undocumented macros, especially those whose name start with YY_, +// are private implementation details. Do not rely on them. + + // Take the name prefix into account. #define yylex agent_lex -// First part of user declarations. - -#line 39 "agent_parser.cc" // lalr1.cc:404 -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif #include "agent_parser.h" -// User implementation prologue. -#line 53 "agent_parser.cc" // lalr1.cc:412 // Unqualified %code blocks. -#line 33 "agent_parser.yy" // lalr1.cc:413 +#line 33 "agent_parser.yy" #include -#line 59 "agent_parser.cc" // lalr1.cc:413 +#line 51 "agent_parser.cc" #ifndef YY_ @@ -70,6 +62,15 @@ # endif #endif +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + #define YYRHSLOC(Rhs, K) ((Rhs)[K].location) /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -87,7 +88,7 @@ { \ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ } \ - while (/*CONSTCOND*/ false) + while (false) # endif @@ -106,7 +107,7 @@ { \ *yycdebug_ << Title << ' '; \ yy_print_ (*yycdebug_, Symbol); \ - *yycdebug_ << std::endl; \ + *yycdebug_ << '\n'; \ } \ } while (false) @@ -125,9 +126,9 @@ #else // !AGENT_DEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol) -# define YY_REDUCE_PRINT(Rule) static_cast(0) -# define YY_STACK_PRINT() static_cast(0) +# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) #endif // !AGENT_DEBUG @@ -139,9 +140,10 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "agent_parser.yy" // lalr1.cc:479 +#line 14 "agent_parser.yy" namespace isc { namespace agent { -#line 145 "agent_parser.cc" // lalr1.cc:479 +#line 146 "agent_parser.cc" + /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is @@ -153,7 +155,7 @@ namespace isc { namespace agent { { if (*yystr == '"') { - std::string yyr = ""; + std::string yyr; char const *yyp = yystr; for (;;) @@ -166,7 +168,10 @@ namespace isc { namespace agent { case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - // Fall through. + else + goto append; + + append: default: yyr += *yyp; break; @@ -194,6 +199,8 @@ namespace isc { namespace agent { AgentParser::~AgentParser () {} + AgentParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} /*---------------. | Symbol types. | @@ -202,24 +209,20 @@ namespace isc { namespace agent { // by_state. - inline - AgentParser::by_state::by_state () + AgentParser::by_state::by_state () YY_NOEXCEPT : state (empty_state) {} - inline - AgentParser::by_state::by_state (const by_state& other) - : state (other.state) + AgentParser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) {} - inline void - AgentParser::by_state::clear () + AgentParser::by_state::clear () YY_NOEXCEPT { state = empty_state; } - inline void AgentParser::by_state::move (by_state& that) { @@ -227,14 +230,12 @@ namespace isc { namespace agent { that.clear (); } - inline - AgentParser::by_state::by_state (state_type s) + AgentParser::by_state::by_state (state_type s) YY_NOEXCEPT : state (s) {} - inline AgentParser::symbol_number_type - AgentParser::by_state::type_get () const + AgentParser::by_state::type_get () const YY_NOEXCEPT { if (state == empty_state) return empty_symbol; @@ -242,37 +243,71 @@ namespace isc { namespace agent { return yystos_[state]; } - inline AgentParser::stack_symbol_type::stack_symbol_type () {} + AgentParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) + { + switch (that.type_get ()) + { + case 53: // value + case 56: // map_value + case 107: // socket_type_value + value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value)); + break; + + case 44: // "boolean" + value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value)); + break; + + case 43: // "floating point" + value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); + break; + + case 42: // "integer" + value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); + break; + + case 41: // "constant string" + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } - inline - AgentParser::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that) - : super_type (s, that.location) + AgentParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.type_get ()) { case 53: // value case 56: // map_value case 107: // socket_type_value - value.move< ElementPtr > (that.value); + value.move< ElementPtr > (YY_MOVE (that.value)); break; case 44: // "boolean" - value.move< bool > (that.value); + value.move< bool > (YY_MOVE (that.value)); break; case 43: // "floating point" - value.move< double > (that.value); + value.move< double > (YY_MOVE (that.value)); break; case 42: // "integer" - value.move< int64_t > (that.value); + value.move< int64_t > (YY_MOVE (that.value)); break; case 41: // "constant string" - value.move< std::string > (that.value); + value.move< std::string > (YY_MOVE (that.value)); break; default: @@ -283,33 +318,33 @@ namespace isc { namespace agent { that.type = empty_symbol; } - inline +#if YY_CPLUSPLUS < 201103L AgentParser::stack_symbol_type& - AgentParser::stack_symbol_type::operator= (const stack_symbol_type& that) + AgentParser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.type_get ()) { case 53: // value case 56: // map_value case 107: // socket_type_value - value.copy< ElementPtr > (that.value); + value.move< ElementPtr > (that.value); break; case 44: // "boolean" - value.copy< bool > (that.value); + value.move< bool > (that.value); break; case 43: // "floating point" - value.copy< double > (that.value); + value.move< double > (that.value); break; case 42: // "integer" - value.copy< int64_t > (that.value); + value.move< int64_t > (that.value); break; case 41: // "constant string" - value.copy< std::string > (that.value); + value.move< std::string > (that.value); break; default: @@ -317,12 +352,13 @@ namespace isc { namespace agent { } location = that.location; + // that is emptied. + that.state = empty_state; return *this; } - +#endif template - inline void AgentParser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const { @@ -339,65 +375,59 @@ namespace isc { namespace agent { std::ostream& yyoutput = yyo; YYUSE (yyoutput); symbol_number_type yytype = yysym.type_get (); +#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 // Avoid a (spurious) G++ 4.8 warning about "array subscript is // below array bounds". if (yysym.empty ()) std::abort (); +#endif yyo << (yytype < yyntokens_ ? "token" : "nterm") << ' ' << yytname_[yytype] << " (" << yysym.location << ": "; switch (yytype) { - case 41: // "constant string" - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 356 "agent_parser.cc" // lalr1.cc:636 + case 41: // "constant string" +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 393 "agent_parser.cc" break; case 42: // "integer" - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< int64_t > (); } -#line 363 "agent_parser.cc" // lalr1.cc:636 +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < int64_t > (); } +#line 399 "agent_parser.cc" break; case 43: // "floating point" - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< double > (); } -#line 370 "agent_parser.cc" // lalr1.cc:636 +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < double > (); } +#line 405 "agent_parser.cc" break; case 44: // "boolean" - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< bool > (); } -#line 377 "agent_parser.cc" // lalr1.cc:636 +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < bool > (); } +#line 411 "agent_parser.cc" break; case 53: // value - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 384 "agent_parser.cc" // lalr1.cc:636 +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 417 "agent_parser.cc" break; case 56: // map_value - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 391 "agent_parser.cc" // lalr1.cc:636 +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 423 "agent_parser.cc" break; case 107: // socket_type_value - -#line 103 "agent_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 398 "agent_parser.cc" // lalr1.cc:636 +#line 103 "agent_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 429 "agent_parser.cc" break; - default: break; } @@ -405,26 +435,27 @@ namespace isc { namespace agent { } #endif - inline void - AgentParser::yypush_ (const char* m, state_type s, symbol_type& sym) + AgentParser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) { - stack_symbol_type t (s, sym); - yypush_ (m, t); + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); } - inline void - AgentParser::yypush_ (const char* m, stack_symbol_type& s) + AgentParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) { - if (m) - YY_SYMBOL_PRINT (m, s); - yystack_.push (s); +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif } - inline void - AgentParser::yypop_ (unsigned int n) + AgentParser::yypop_ (int n) { yystack_.pop (n); } @@ -456,7 +487,7 @@ namespace isc { namespace agent { } #endif // AGENT_DEBUG - inline AgentParser::state_type + AgentParser::state_type AgentParser::yy_lr_goto_state_ (state_type yystate, int yysym) { int yyr = yypgoto_[yysym - yyntokens_] + yystate; @@ -466,18 +497,24 @@ namespace isc { namespace agent { return yydefgoto_[yysym - yyntokens_]; } - inline bool + bool AgentParser::yy_pact_value_is_default_ (int yyvalue) { return yyvalue == yypact_ninf_; } - inline bool + bool AgentParser::yy_table_value_is_error_ (int yyvalue) { return yyvalue == yytable_ninf_; } + int + AgentParser::operator() () + { + return parse (); + } + int AgentParser::parse () { @@ -499,11 +536,11 @@ namespace isc { namespace agent { /// The return value of parse (). int yyresult; - // FIXME: This shoud be completely indented. It is not yet to - // avoid gratuitous conflicts when merging into the master branch. +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { - YYCDEBUG << "Starting parse" << std::endl; + YYCDEBUG << "Starting parse\n"; /* Initialize the stack. The initial state will be set in @@ -511,21 +548,25 @@ namespace isc { namespace agent { location values to have been already stored, initialize these stacks with a primary value. */ yystack_.clear (); - yypush_ (YY_NULLPTR, 0, yyla); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); - // A new symbol was pushed on the stack. + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << std::endl; + YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; // Accept? if (yystack_[0].state == yyfinal_) - goto yyacceptlab; + YYACCEPT; goto yybackup; - // Backup. - yybackup: + /*-----------. + | yybackup. | + `-----------*/ + yybackup: // Try to take a decision without lookahead. yyn = yypact_[yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) @@ -535,16 +576,21 @@ namespace isc { namespace agent { if (yyla.empty ()) { YYCDEBUG << "Reading a token: "; +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { symbol_type yylookahead (yylex (ctx)); yyla.move (yylookahead); } +#if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); goto yyerrlab1; } +#endif // YY_EXCEPTIONS } YY_SYMBOL_PRINT ("Next token is", yyla); @@ -569,9 +615,10 @@ namespace isc { namespace agent { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, yyla); + yypush_ ("Shifting", yyn, YY_MOVE (yyla)); goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -581,39 +628,40 @@ namespace isc { namespace agent { goto yyerrlab; goto yyreduce; + /*-----------------------------. - | yyreduce -- Do a reduction. | + | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: yylen = yyr2_[yyn]; { stack_symbol_type yylhs; - yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]); + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); /* Variants are always initialized to an empty instance of the correct type. The default '$$ = $1' action is NOT applied when using variants. */ - switch (yyr1_[yyn]) + switch (yyr1_[yyn]) { case 53: // value case 56: // map_value case 107: // socket_type_value - yylhs.value.build< ElementPtr > (); + yylhs.value.emplace< ElementPtr > (); break; case 44: // "boolean" - yylhs.value.build< bool > (); + yylhs.value.emplace< bool > (); break; case 43: // "floating point" - yylhs.value.build< double > (); + yylhs.value.emplace< double > (); break; case 42: // "integer" - yylhs.value.build< int64_t > (); + yylhs.value.emplace< int64_t > (); break; case 41: // "constant string" - yylhs.value.build< std::string > (); + yylhs.value.emplace< std::string > (); break; default: @@ -621,219 +669,222 @@ namespace isc { namespace agent { } - // Compute the default @$. + // Default location. { - slice slice (yystack_, yylen); - YYLLOC_DEFAULT (yylhs.location, slice, yylen); + stack_type::slice range (yystack_, yylen); + YYLLOC_DEFAULT (yylhs.location, range, yylen); + yyerror_range[1].location = yylhs.location; } // Perform the reduction. YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { switch (yyn) { case 2: -#line 114 "agent_parser.yy" // lalr1.cc:859 +#line 114 "agent_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORDS; } -#line 640 "agent_parser.cc" // lalr1.cc:859 +#line 691 "agent_parser.cc" break; case 4: -#line 115 "agent_parser.yy" // lalr1.cc:859 +#line 115 "agent_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 646 "agent_parser.cc" // lalr1.cc:859 +#line 697 "agent_parser.cc" break; case 6: -#line 116 "agent_parser.yy" // lalr1.cc:859 +#line 116 "agent_parser.yy" { ctx.ctx_ = ctx.AGENT; } -#line 652 "agent_parser.cc" // lalr1.cc:859 +#line 703 "agent_parser.cc" break; case 8: -#line 124 "agent_parser.yy" // lalr1.cc:859 +#line 124 "agent_parser.yy" { // Parse the Control-agent map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 662 "agent_parser.cc" // lalr1.cc:859 +#line 713 "agent_parser.cc" break; case 9: -#line 128 "agent_parser.yy" // lalr1.cc:859 +#line 128 "agent_parser.yy" { // parsing completed } -#line 670 "agent_parser.cc" // lalr1.cc:859 +#line 721 "agent_parser.cc" break; case 10: -#line 135 "agent_parser.yy" // lalr1.cc:859 +#line 135 "agent_parser.yy" { // Push back the JSON value on the stack - ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 679 "agent_parser.cc" // lalr1.cc:859 +#line 730 "agent_parser.cc" break; case 11: -#line 141 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 685 "agent_parser.cc" // lalr1.cc:859 +#line 141 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } +#line 736 "agent_parser.cc" break; case 12: -#line 142 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); } -#line 691 "agent_parser.cc" // lalr1.cc:859 +#line 142 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } +#line 742 "agent_parser.cc" break; case 13: -#line 143 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 697 "agent_parser.cc" // lalr1.cc:859 +#line 143 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } +#line 748 "agent_parser.cc" break; case 14: -#line 144 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 703 "agent_parser.cc" // lalr1.cc:859 +#line 144 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } +#line 754 "agent_parser.cc" break; case 15: -#line 145 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 709 "agent_parser.cc" // lalr1.cc:859 +#line 145 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } +#line 760 "agent_parser.cc" break; case 16: -#line 146 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 715 "agent_parser.cc" // lalr1.cc:859 +#line 146 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 766 "agent_parser.cc" break; case 17: -#line 147 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 721 "agent_parser.cc" // lalr1.cc:859 +#line 147 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 772 "agent_parser.cc" break; case 18: -#line 151 "agent_parser.yy" // lalr1.cc:859 +#line 151 "agent_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 732 "agent_parser.cc" // lalr1.cc:859 +#line 783 "agent_parser.cc" break; case 19: -#line 156 "agent_parser.yy" // lalr1.cc:859 +#line 156 "agent_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 742 "agent_parser.cc" // lalr1.cc:859 +#line 793 "agent_parser.cc" break; case 20: -#line 162 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 748 "agent_parser.cc" // lalr1.cc:859 +#line 162 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 799 "agent_parser.cc" break; case 23: -#line 176 "agent_parser.yy" // lalr1.cc:859 +#line 176 "agent_parser.yy" { // map containing a single entry - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 757 "agent_parser.cc" // lalr1.cc:859 +#line 808 "agent_parser.cc" break; case 24: -#line 180 "agent_parser.yy" // lalr1.cc:859 +#line 180 "agent_parser.yy" { // map consisting of a shorter map followed by // comma and string:value - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 767 "agent_parser.cc" // lalr1.cc:859 +#line 818 "agent_parser.cc" break; case 25: -#line 187 "agent_parser.yy" // lalr1.cc:859 +#line 187 "agent_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 776 "agent_parser.cc" // lalr1.cc:859 +#line 827 "agent_parser.cc" break; case 26: -#line 190 "agent_parser.yy" // lalr1.cc:859 +#line 190 "agent_parser.yy" { } -#line 783 "agent_parser.cc" // lalr1.cc:859 +#line 834 "agent_parser.cc" break; case 29: -#line 197 "agent_parser.yy" // lalr1.cc:859 +#line 197 "agent_parser.yy" { // List consisting of a single element. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 792 "agent_parser.cc" // lalr1.cc:859 +#line 843 "agent_parser.cc" break; case 30: -#line 201 "agent_parser.yy" // lalr1.cc:859 +#line 201 "agent_parser.yy" { // List ending with , and a value. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 801 "agent_parser.cc" // lalr1.cc:859 +#line 852 "agent_parser.cc" break; case 31: -#line 214 "agent_parser.yy" // lalr1.cc:859 +#line 214 "agent_parser.yy" { const std::string& where = ctx.contextName(); - const std::string& keyword = yystack_[1].value.as< std::string > (); + const std::string& keyword = yystack_[1].value.as < std::string > (); error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 812 "agent_parser.cc" // lalr1.cc:859 +#line 863 "agent_parser.cc" break; case 32: -#line 223 "agent_parser.yy" // lalr1.cc:859 +#line 223 "agent_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 823 "agent_parser.cc" // lalr1.cc:859 +#line 874 "agent_parser.cc" break; case 33: -#line 228 "agent_parser.yy" // lalr1.cc:859 +#line 228 "agent_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 833 "agent_parser.cc" // lalr1.cc:859 +#line 884 "agent_parser.cc" break; case 42: -#line 249 "agent_parser.yy" // lalr1.cc:859 +#line 249 "agent_parser.yy" { // Let's create a MapElement that will represent it, add it to the @@ -845,60 +896,60 @@ namespace isc { namespace agent { ctx.stack_.push_back(m); ctx.enter(ctx.AGENT); } -#line 849 "agent_parser.cc" // lalr1.cc:859 +#line 900 "agent_parser.cc" break; case 43: -#line 259 "agent_parser.yy" // lalr1.cc:859 +#line 259 "agent_parser.yy" { // Ok, we're done with parsing control-agent. Let's take the map // off the stack. ctx.stack_.pop_back(); ctx.leave(); } -#line 860 "agent_parser.cc" // lalr1.cc:859 +#line 911 "agent_parser.cc" break; case 53: -#line 281 "agent_parser.yy" // lalr1.cc:859 +#line 281 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 868 "agent_parser.cc" // lalr1.cc:859 +#line 919 "agent_parser.cc" break; case 54: -#line 283 "agent_parser.yy" // lalr1.cc:859 +#line 283 "agent_parser.yy" { - ElementPtr host(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr host(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("http-host", host); ctx.leave(); } -#line 878 "agent_parser.cc" // lalr1.cc:859 +#line 929 "agent_parser.cc" break; case 55: -#line 289 "agent_parser.yy" // lalr1.cc:859 +#line 289 "agent_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("http-port", prf); } -#line 887 "agent_parser.cc" // lalr1.cc:859 +#line 938 "agent_parser.cc" break; case 56: -#line 294 "agent_parser.yy" // lalr1.cc:859 +#line 294 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 895 "agent_parser.cc" // lalr1.cc:859 +#line 946 "agent_parser.cc" break; case 57: -#line 296 "agent_parser.yy" // lalr1.cc:859 +#line 296 "agent_parser.yy" { ElementPtr parent = ctx.stack_.back(); - ElementPtr user_context = yystack_[0].value.as< ElementPtr > (); + ElementPtr user_context = yystack_[0].value.as < ElementPtr > (); ConstElementPtr old = parent->get("user-context"); // Handle already existing user context @@ -918,23 +969,23 @@ namespace isc { namespace agent { parent->set("user-context", user_context); ctx.leave(); } -#line 922 "agent_parser.cc" // lalr1.cc:859 +#line 973 "agent_parser.cc" break; case 58: -#line 319 "agent_parser.yy" // lalr1.cc:859 +#line 319 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 930 "agent_parser.cc" // lalr1.cc:859 +#line 981 "agent_parser.cc" break; case 59: -#line 321 "agent_parser.yy" // lalr1.cc:859 +#line 321 "agent_parser.yy" { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location))); - ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); user_context->set("comment", comment); // Handle already existing user context @@ -955,461 +1006,466 @@ namespace isc { namespace agent { parent->set("user-context", user_context); ctx.leave(); } -#line 959 "agent_parser.cc" // lalr1.cc:859 +#line 1010 "agent_parser.cc" break; case 60: -#line 347 "agent_parser.yy" // lalr1.cc:859 +#line 347 "agent_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hooks-libraries", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 970 "agent_parser.cc" // lalr1.cc:859 +#line 1021 "agent_parser.cc" break; case 61: -#line 352 "agent_parser.yy" // lalr1.cc:859 +#line 352 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 979 "agent_parser.cc" // lalr1.cc:859 +#line 1030 "agent_parser.cc" break; case 66: -#line 365 "agent_parser.yy" // lalr1.cc:859 +#line 365 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 989 "agent_parser.cc" // lalr1.cc:859 +#line 1040 "agent_parser.cc" break; case 67: -#line 369 "agent_parser.yy" // lalr1.cc:859 +#line 369 "agent_parser.yy" { ctx.stack_.pop_back(); } -#line 997 "agent_parser.cc" // lalr1.cc:859 +#line 1048 "agent_parser.cc" break; case 73: -#line 382 "agent_parser.yy" // lalr1.cc:859 +#line 382 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1005 "agent_parser.cc" // lalr1.cc:859 +#line 1056 "agent_parser.cc" break; case 74: -#line 384 "agent_parser.yy" // lalr1.cc:859 +#line 384 "agent_parser.yy" { - ElementPtr lib(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 1015 "agent_parser.cc" // lalr1.cc:859 +#line 1066 "agent_parser.cc" break; case 75: -#line 390 "agent_parser.yy" // lalr1.cc:859 +#line 390 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1023 "agent_parser.cc" // lalr1.cc:859 +#line 1074 "agent_parser.cc" break; case 76: -#line 392 "agent_parser.yy" // lalr1.cc:859 +#line 392 "agent_parser.yy" { - ctx.stack_.back()->set("parameters", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1032 "agent_parser.cc" // lalr1.cc:859 +#line 1083 "agent_parser.cc" break; case 77: -#line 400 "agent_parser.yy" // lalr1.cc:859 +#line 400 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[2].location))); ctx.stack_.back()->set("control-sockets", m); ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKETS); } -#line 1043 "agent_parser.cc" // lalr1.cc:859 +#line 1094 "agent_parser.cc" break; case 78: -#line 405 "agent_parser.yy" // lalr1.cc:859 +#line 405 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1052 "agent_parser.cc" // lalr1.cc:859 +#line 1103 "agent_parser.cc" break; case 85: -#line 426 "agent_parser.yy" // lalr1.cc:859 +#line 426 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4", m); ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1063 "agent_parser.cc" // lalr1.cc:859 +#line 1114 "agent_parser.cc" break; case 86: -#line 431 "agent_parser.yy" // lalr1.cc:859 +#line 431 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1072 "agent_parser.cc" // lalr1.cc:859 +#line 1123 "agent_parser.cc" break; case 87: -#line 437 "agent_parser.yy" // lalr1.cc:859 +#line 437 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp6", m); ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1083 "agent_parser.cc" // lalr1.cc:859 +#line 1134 "agent_parser.cc" break; case 88: -#line 442 "agent_parser.yy" // lalr1.cc:859 +#line 442 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1092 "agent_parser.cc" // lalr1.cc:859 +#line 1143 "agent_parser.cc" break; case 89: -#line 448 "agent_parser.yy" // lalr1.cc:859 +#line 448 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("d2", m); ctx.stack_.push_back(m); ctx.enter(ctx.SERVER); } -#line 1103 "agent_parser.cc" // lalr1.cc:859 +#line 1154 "agent_parser.cc" break; case 90: -#line 453 "agent_parser.yy" // lalr1.cc:859 +#line 453 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1112 "agent_parser.cc" // lalr1.cc:859 +#line 1163 "agent_parser.cc" break; case 98: -#line 472 "agent_parser.yy" // lalr1.cc:859 +#line 472 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1120 "agent_parser.cc" // lalr1.cc:859 +#line 1171 "agent_parser.cc" break; case 99: -#line 474 "agent_parser.yy" // lalr1.cc:859 +#line 474 "agent_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 1130 "agent_parser.cc" // lalr1.cc:859 +#line 1181 "agent_parser.cc" break; case 100: -#line 481 "agent_parser.yy" // lalr1.cc:859 +#line 481 "agent_parser.yy" { ctx.enter(ctx.SOCKET_TYPE); } -#line 1138 "agent_parser.cc" // lalr1.cc:859 +#line 1189 "agent_parser.cc" break; case 101: -#line 483 "agent_parser.yy" // lalr1.cc:859 +#line 483 "agent_parser.yy" { - ctx.stack_.back()->set("socket-type", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1147 "agent_parser.cc" // lalr1.cc:859 +#line 1198 "agent_parser.cc" break; case 102: -#line 489 "agent_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); } -#line 1153 "agent_parser.cc" // lalr1.cc:859 +#line 489 "agent_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); } +#line 1204 "agent_parser.cc" break; case 103: -#line 495 "agent_parser.yy" // lalr1.cc:859 +#line 495 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1161 "agent_parser.cc" // lalr1.cc:859 +#line 1212 "agent_parser.cc" break; case 104: -#line 497 "agent_parser.yy" // lalr1.cc:859 +#line 497 "agent_parser.yy" { - ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1170 "agent_parser.cc" // lalr1.cc:859 +#line 1221 "agent_parser.cc" break; case 105: -#line 502 "agent_parser.yy" // lalr1.cc:859 +#line 502 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1178 "agent_parser.cc" // lalr1.cc:859 +#line 1229 "agent_parser.cc" break; case 106: -#line 504 "agent_parser.yy" // lalr1.cc:859 +#line 504 "agent_parser.yy" { - ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1187 "agent_parser.cc" // lalr1.cc:859 +#line 1238 "agent_parser.cc" break; case 107: -#line 509 "agent_parser.yy" // lalr1.cc:859 +#line 509 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1195 "agent_parser.cc" // lalr1.cc:859 +#line 1246 "agent_parser.cc" break; case 108: -#line 511 "agent_parser.yy" // lalr1.cc:859 +#line 511 "agent_parser.yy" { - ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1204 "agent_parser.cc" // lalr1.cc:859 +#line 1255 "agent_parser.cc" break; case 109: -#line 521 "agent_parser.yy" // lalr1.cc:859 +#line 521 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("Logging", m); ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 1215 "agent_parser.cc" // lalr1.cc:859 +#line 1266 "agent_parser.cc" break; case 110: -#line 526 "agent_parser.yy" // lalr1.cc:859 +#line 526 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1224 "agent_parser.cc" // lalr1.cc:859 +#line 1275 "agent_parser.cc" break; case 114: -#line 543 "agent_parser.yy" // lalr1.cc:859 +#line 543 "agent_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 1235 "agent_parser.cc" // lalr1.cc:859 +#line 1286 "agent_parser.cc" break; case 115: -#line 548 "agent_parser.yy" // lalr1.cc:859 +#line 548 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1244 "agent_parser.cc" // lalr1.cc:859 +#line 1295 "agent_parser.cc" break; case 118: -#line 560 "agent_parser.yy" // lalr1.cc:859 +#line 560 "agent_parser.yy" { ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 1254 "agent_parser.cc" // lalr1.cc:859 +#line 1305 "agent_parser.cc" break; case 119: -#line 564 "agent_parser.yy" // lalr1.cc:859 +#line 564 "agent_parser.yy" { ctx.stack_.pop_back(); } -#line 1262 "agent_parser.cc" // lalr1.cc:859 +#line 1313 "agent_parser.cc" break; case 129: -#line 581 "agent_parser.yy" // lalr1.cc:859 +#line 581 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1270 "agent_parser.cc" // lalr1.cc:859 +#line 1321 "agent_parser.cc" break; case 130: -#line 583 "agent_parser.yy" // lalr1.cc:859 +#line 583 "agent_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1280 "agent_parser.cc" // lalr1.cc:859 +#line 1331 "agent_parser.cc" break; case 131: -#line 589 "agent_parser.yy" // lalr1.cc:859 +#line 589 "agent_parser.yy" { - ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 1289 "agent_parser.cc" // lalr1.cc:859 +#line 1340 "agent_parser.cc" break; case 132: -#line 594 "agent_parser.yy" // lalr1.cc:859 +#line 594 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1297 "agent_parser.cc" // lalr1.cc:859 +#line 1348 "agent_parser.cc" break; case 133: -#line 596 "agent_parser.yy" // lalr1.cc:859 +#line 596 "agent_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 1307 "agent_parser.cc" // lalr1.cc:859 +#line 1358 "agent_parser.cc" break; case 134: -#line 602 "agent_parser.yy" // lalr1.cc:859 +#line 602 "agent_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 1318 "agent_parser.cc" // lalr1.cc:859 +#line 1369 "agent_parser.cc" break; case 135: -#line 607 "agent_parser.yy" // lalr1.cc:859 +#line 607 "agent_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1327 "agent_parser.cc" // lalr1.cc:859 +#line 1378 "agent_parser.cc" break; case 138: -#line 616 "agent_parser.yy" // lalr1.cc:859 +#line 616 "agent_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1337 "agent_parser.cc" // lalr1.cc:859 +#line 1388 "agent_parser.cc" break; case 139: -#line 620 "agent_parser.yy" // lalr1.cc:859 +#line 620 "agent_parser.yy" { ctx.stack_.pop_back(); } -#line 1345 "agent_parser.cc" // lalr1.cc:859 +#line 1396 "agent_parser.cc" break; case 146: -#line 634 "agent_parser.yy" // lalr1.cc:859 +#line 634 "agent_parser.yy" { ctx.enter(ctx.NO_KEYWORDS); } -#line 1353 "agent_parser.cc" // lalr1.cc:859 +#line 1404 "agent_parser.cc" break; case 147: -#line 636 "agent_parser.yy" // lalr1.cc:859 +#line 636 "agent_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 1363 "agent_parser.cc" // lalr1.cc:859 +#line 1414 "agent_parser.cc" break; case 148: -#line 642 "agent_parser.yy" // lalr1.cc:859 +#line 642 "agent_parser.yy" { - ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 1372 "agent_parser.cc" // lalr1.cc:859 +#line 1423 "agent_parser.cc" break; case 149: -#line 647 "agent_parser.yy" // lalr1.cc:859 +#line 647 "agent_parser.yy" { - ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 1381 "agent_parser.cc" // lalr1.cc:859 +#line 1432 "agent_parser.cc" break; case 150: -#line 652 "agent_parser.yy" // lalr1.cc:859 +#line 652 "agent_parser.yy" { - ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 1390 "agent_parser.cc" // lalr1.cc:859 +#line 1441 "agent_parser.cc" break; -#line 1394 "agent_parser.cc" // lalr1.cc:859 +#line 1445 "agent_parser.cc" + default: break; } } +#if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); YYERROR; } +#endif // YY_EXCEPTIONS YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; YY_STACK_PRINT (); // Shift the result of the reduction. - yypush_ (YY_NULLPTR, yylhs); + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ @@ -1446,19 +1502,18 @@ namespace isc { namespace agent { | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ if (false) - goto yyerrorlab; - yyerror_range[1].location = yystack_[yylen - 1].location; + YYERROR; + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); yylen = 0; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ @@ -1495,20 +1550,30 @@ namespace isc { namespace agent { // Shift the error token. error_token.state = yyn; - yypush_ ("Shifting", error_token); + yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; - // Accept. + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; - // Abort. + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ yyreturn: if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); @@ -1524,12 +1589,12 @@ namespace isc { namespace agent { return yyresult; } +#if YY_EXCEPTIONS catch (...) { - YYCDEBUG << "Exception caught: cleaning lookahead and stack" - << std::endl; + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; // Do not try to display the values of the reclaimed symbols, - // as their printer might throw an exception. + // as their printers might throw an exception. if (!yyla.empty ()) yy_destroy_ (YY_NULLPTR, yyla); @@ -1540,12 +1605,13 @@ namespace isc { namespace agent { } throw; } +#endif // YY_EXCEPTIONS } void AgentParser::error (const syntax_error& yyexc) { - error (yyexc.location, yyexc.what()); + error (yyexc.location, yyexc.what ()); } // Generate an error message. @@ -1621,12 +1687,13 @@ namespace isc { namespace agent { case N: \ yyformat = S; \ break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); + default: // Avoid compiler warnings. + YYCASE_ (0, YY_("syntax error")); + YYCASE_ (1, YY_("syntax error, unexpected %s")); + YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } @@ -1649,7 +1716,7 @@ namespace isc { namespace agent { const signed char AgentParser::yytable_ninf_ = -1; - const short int + const short AgentParser::yypact_[] = { 59, -68, -68, -68, 6, 8, 9, 34, -68, -68, @@ -1726,7 +1793,7 @@ namespace isc { namespace agent { -68, -67, -68, -68, -68, -68, -68 }; - const short int + const short AgentParser::yydefgoto_[] = { -1, 4, 5, 6, 7, 23, 27, 16, 17, 18, @@ -1766,7 +1833,7 @@ namespace isc { namespace agent { 199 }; - const short int + const short AgentParser::yycheck_[] = { 26, 27, 27, 27, 24, 10, 0, 11, 12, 13, @@ -1905,7 +1972,7 @@ namespace isc { namespace agent { }; #if AGENT_DEBUG - const unsigned short int + const unsigned short AgentParser::yyrline_[] = { 0, 114, 114, 114, 115, 115, 116, 116, 124, 124, @@ -1936,18 +2003,18 @@ namespace isc { namespace agent { i_end = yystack_.end (); i != i_end; ++i) *yycdebug_ << ' ' << i->state; - *yycdebug_ << std::endl; + *yycdebug_ << '\n'; } // Report on the debug stream that the rule \a yyrule is going to be reduced. void AgentParser::yy_reduce_print_ (int yyrule) { - unsigned int yylno = yyrline_[yyrule]; + unsigned yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 - << " (line " << yylno << "):" << std::endl; + << " (line " << yylno << "):\n"; // The symbols being reduced. for (int yyi = 0; yyi < yynrhs; yyi++) YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", @@ -1956,10 +2023,11 @@ namespace isc { namespace agent { #endif // AGENT_DEBUG -#line 14 "agent_parser.yy" // lalr1.cc:1167 +#line 14 "agent_parser.yy" } } // isc::agent -#line 1962 "agent_parser.cc" // lalr1.cc:1167 -#line 657 "agent_parser.yy" // lalr1.cc:1168 +#line 2029 "agent_parser.cc" + +#line 657 "agent_parser.yy" void diff --git a/src/bin/agent/agent_parser.h b/src/bin/agent/agent_parser.h index 921e5ea1a0..4f94c3753a 100644 --- a/src/bin/agent/agent_parser.h +++ b/src/bin/agent/agent_parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. + /** ** \file agent_parser.h ** Define the isc::agent::parser class. @@ -37,10 +38,13 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. +// Undocumented macros, especially those whose name start with YY_, +// are private implementation details. Do not rely on them. + #ifndef YY_AGENT_AGENT_PARSER_H_INCLUDED # define YY_AGENT_AGENT_PARSER_H_INCLUDED // // "%code requires" blocks. -#line 17 "agent_parser.yy" // lalr1.cc:377 +#line 17 "agent_parser.yy" #include #include @@ -51,7 +55,7 @@ using namespace isc::agent; using namespace isc::data; using namespace std; -#line 55 "agent_parser.h" // lalr1.cc:377 +#line 59 "agent_parser.h" # include # include // std::abort @@ -59,7 +63,43 @@ using namespace std; # include # include # include -# include "stack.hh" + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif # include "location.hh" #include #ifndef YYASSERT @@ -86,15 +126,6 @@ using namespace std; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -102,7 +133,7 @@ using namespace std; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -121,6 +152,18 @@ using namespace std; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + /* Debug traces. */ #ifndef AGENT_DEBUG # if defined YYDEBUG @@ -134,120 +177,175 @@ using namespace std; # endif /* ! defined YYDEBUG */ #endif /* ! defined AGENT_DEBUG */ -#line 14 "agent_parser.yy" // lalr1.cc:377 +#line 14 "agent_parser.yy" namespace isc { namespace agent { -#line 140 "agent_parser.h" // lalr1.cc:377 +#line 183 "agent_parser.h" - /// A char[S] buffer to store and retrieve objects. + + /// A Bison parser. + class AgentParser + { + public: +#ifndef AGENT_STYPE + /// 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 state. - template - struct variant + /// via the current parser state. + class semantic_type { + public: /// Type of *this. - typedef variant self_type; + typedef semantic_type self_type; /// Empty construction. - variant () - : yytypeid_ (YY_NULLPTR) + semantic_type () YY_NOEXCEPT + : yybuffer_ () + , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template - variant (const T& t) + semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= S); - new (yyas_ ()) T (t); + YYASSERT (sizeof (T) <= size); + new (yyas_ ()) T (YY_MOVE (t)); } /// Destruction, allowed only if empty. - ~variant () + ~semantic_type () YY_NOEXCEPT { YYASSERT (!yytypeid_); } +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + YYASSERT (!yytypeid_); + YYASSERT (sizeof (T) <= size); + yytypeid_ = & typeid (T); + return *new (yyas_ ()) T (std::forward (u)...); + } +# else /// Instantiate an empty \a T in here. template T& - build () + emplace () { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T; + return *new (yyas_ ()) T (); } /// Instantiate a \a T in here from \a t. template T& - build (const T& t) + emplace (const T& t) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } /// Accessor to a built \a T. template T& - as () + as () YY_NOEXCEPT { + YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& - as () const + as () const YY_NOEXCEPT { + YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } - /// Swap the content with \a other, of same type. + /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which - /// should not be the variant's responsability. + /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with - /// variant::move (). + /// self_type::move (). template void - swap (self_type& other) + swap (self_type& that) YY_NOEXCEPT { YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *other.yytypeid_); - std::swap (as (), other.as ()); + YYASSERT (*yytypeid_ == *that.yytypeid_); + std::swap (as (), that.as ()); } - /// Move the content of \a other to this. + /// Move the content of \a that to this. /// - /// Destroys \a other. + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. template void - move (self_type& other) + move (self_type&& that) { - build (); - swap (other); - other.destroy (); + emplace (std::move (that.as ())); + that.destroy (); } +#endif - /// Copy the content of \a other to this. + /// Copy the content of \a that to this. template void - copy (const self_type& other) + copy (const self_type& that) { - build (other.as ()); + emplace (that.as ()); } /// Destroy the stored \a T. @@ -261,13 +359,13 @@ namespace isc { namespace agent { private: /// Prohibit blind copies. - self_type& operator=(const self_type&); - variant (const self_type&); + self_type& operator= (const self_type&); + semantic_type (const self_type&); /// Accessor to raw memory as \a T. template T* - yyas_ () + yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); @@ -276,53 +374,49 @@ namespace isc { namespace agent { /// Const accessor to raw memory as \a T. template const T* - yyas_ () const + yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } - union - { - /// Strongest alignment constraints. - long double yyalign_me; - /// A buffer large enough to store any of the semantic values. - char yyraw[S]; - } yybuffer_; - - /// Whether the content is built: if defined, the name of the stored type. - const std::type_info *yytypeid_; - }; - - - /// A Bison parser. - class AgentParser - { - public: -#ifndef AGENT_STYPE /// An auxiliary type to compute the largest semantic type. union union_type { // value // map_value // socket_type_value - char dummy1[sizeof(ElementPtr)]; + char dummy1[sizeof (ElementPtr)]; // "boolean" - char dummy2[sizeof(bool)]; + char dummy2[sizeof (bool)]; // "floating point" - char dummy3[sizeof(double)]; + char dummy3[sizeof (double)]; // "integer" - char dummy4[sizeof(int64_t)]; + char dummy4[sizeof (int64_t)]; // "constant string" - char dummy5[sizeof(std::string)]; -}; + char dummy5[sizeof (std::string)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me; + /// A buffer large enough to store any of the semantic values. + char yyraw[size]; + } yybuffer_; + + /// Whether the content is built: if defined, the name of the stored type. + const std::type_info *yytypeid_; + }; - /// Symbol semantic values. - typedef variant semantic_type; #else typedef AGENT_STYPE semantic_type; #endif @@ -332,7 +426,18 @@ namespace isc { namespace agent { /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { - syntax_error (const location_type& l, const std::string& m); + syntax_error (const location_type& l, const std::string& m) + : std::runtime_error (m) + , location (l) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + , location (s.location) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + location_type location; }; @@ -402,7 +507,7 @@ namespace isc { namespace agent { /// A complete symbol. /// /// Expects its Base type to provide access to the symbol type - /// via type_get(). + /// via type_get (). /// /// Provide access to semantic value and location. template @@ -412,39 +517,150 @@ namespace isc { namespace agent { typedef Base super_type; /// Default constructor. - basic_symbol (); + basic_symbol () + : value () + , location () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that); +#endif /// Copy constructor. - basic_symbol (const basic_symbol& other); + basic_symbol (const basic_symbol& that); /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l) + : Base (t) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const location_type& l) + : Base (t) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif - basic_symbol (typename Base::kind_type t, const location_type& l); - - basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l); - - basic_symbol (typename Base::kind_type t, const bool v, const location_type& l); + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } - basic_symbol (typename Base::kind_type t, const double v, const location_type& l); + /// Destroy contents, and record that is empty. + void clear () + { + // User destructor. + symbol_number_type yytype = this->type_get (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yytype) + { + default: + break; + } + + // Type destructor. +switch (yytype) + { + case 53: // value + case 56: // map_value + case 107: // socket_type_value + value.template destroy< ElementPtr > (); + break; - basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l); + case 44: // "boolean" + value.template destroy< bool > (); + break; - basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l); + case 43: // "floating point" + value.template destroy< double > (); + break; + case 42: // "integer" + value.template destroy< int64_t > (); + break; - /// Constructor for symbols with semantic value. - basic_symbol (typename Base::kind_type t, - const semantic_type& v, - const location_type& l); + case 41: // "constant string" + value.template destroy< std::string > (); + break; - /// Destroy the symbol. - ~basic_symbol (); + default: + break; + } - /// Destroy contents, and record that is empty. - void clear (); + Base::clear (); + } /// Whether empty. - bool empty () const; + bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); @@ -456,8 +672,10 @@ namespace isc { namespace agent { location_type location; private: +#if YY_CPLUSPLUS < 201103L /// Assignment operator. - basic_symbol& operator= (const basic_symbol& other); + basic_symbol& operator= (const basic_symbol& that); +#endif }; /// Type access provider for token (enum) based symbols. @@ -466,8 +684,13 @@ namespace isc { namespace agent { /// Default constructor. by_type (); +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_type (by_type&& that); +#endif + /// Copy constructor. - by_type (const by_type& other); + by_type (const by_type& that); /// The symbol type as needed by the constructor. typedef token_type kind_type; @@ -483,10 +706,10 @@ namespace isc { namespace agent { /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The token. - token_type token () const; + token_type token () const YY_NOEXCEPT; /// The symbol type. /// \a empty_symbol when empty. @@ -495,186 +718,90 @@ namespace isc { namespace agent { }; /// "External" symbols: returned by the scanner. - typedef basic_symbol symbol_type; - - // Symbol constructors declarations. - static inline - symbol_type - make_END (const location_type& l); - - static inline - symbol_type - make_COMMA (const location_type& l); - - static inline - symbol_type - make_COLON (const location_type& l); - - static inline - symbol_type - make_LSQUARE_BRACKET (const location_type& l); - - static inline - symbol_type - make_RSQUARE_BRACKET (const location_type& l); - - static inline - symbol_type - make_LCURLY_BRACKET (const location_type& l); - - static inline - symbol_type - make_RCURLY_BRACKET (const location_type& l); - - static inline - symbol_type - make_NULL_TYPE (const location_type& l); - - static inline - symbol_type - make_CONTROL_AGENT (const location_type& l); - - static inline - symbol_type - make_HTTP_HOST (const location_type& l); - - static inline - symbol_type - make_HTTP_PORT (const location_type& l); - - static inline - symbol_type - make_USER_CONTEXT (const location_type& l); - - static inline - symbol_type - make_COMMENT (const location_type& l); - - static inline - symbol_type - make_CONTROL_SOCKETS (const location_type& l); - - static inline - symbol_type - make_DHCP4_SERVER (const location_type& l); - - static inline - symbol_type - make_DHCP6_SERVER (const location_type& l); - - static inline - symbol_type - make_D2_SERVER (const location_type& l); - - static inline - symbol_type - make_SOCKET_NAME (const location_type& l); - - static inline - symbol_type - make_SOCKET_TYPE (const location_type& l); - - static inline - symbol_type - make_UNIX (const location_type& l); - - static inline - symbol_type - make_HOOKS_LIBRARIES (const location_type& l); - - static inline - symbol_type - make_LIBRARY (const location_type& l); - - static inline - symbol_type - make_PARAMETERS (const location_type& l); - - static inline - symbol_type - make_LOGGING (const location_type& l); - - static inline - symbol_type - make_LOGGERS (const location_type& l); - - static inline - symbol_type - make_NAME (const location_type& l); - - static inline - symbol_type - make_OUTPUT_OPTIONS (const location_type& l); - - static inline - symbol_type - make_OUTPUT (const location_type& l); - - static inline - symbol_type - make_DEBUGLEVEL (const location_type& l); - - static inline - symbol_type - make_SEVERITY (const location_type& l); - - static inline - symbol_type - make_FLUSH (const location_type& l); - - static inline - symbol_type - make_MAXSIZE (const location_type& l); - - static inline - symbol_type - make_MAXVER (const location_type& l); - - static inline - symbol_type - make_DHCP4 (const location_type& l); - - static inline - symbol_type - make_DHCP6 (const location_type& l); - - static inline - symbol_type - make_DHCPDDNS (const location_type& l); - - static inline - symbol_type - make_START_JSON (const location_type& l); - - static inline - symbol_type - make_START_AGENT (const location_type& l); - - static inline - symbol_type - make_START_SUB_AGENT (const location_type& l); - - static inline - symbol_type - make_STRING (const std::string& v, const location_type& l); - - static inline - symbol_type - make_INTEGER (const int64_t& v, const location_type& l); - - static inline - symbol_type - make_FLOAT (const double& v, const location_type& l); + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; - static inline - symbol_type - make_BOOLEAN (const bool& v, const location_type& l); + /// Empty symbol. + symbol_type () {} + /// 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)) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_HTTP_HOST || tok == token::TOKEN_HTTP_PORT || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_CONTROL_SOCKETS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_AGENT || tok == token::TOKEN_START_SUB_AGENT); + } +#else + symbol_type (int tok, const location_type& l) + : super_type(token_type (tok), l) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_HTTP_HOST || tok == token::TOKEN_HTTP_PORT || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_CONTROL_SOCKETS || tok == token::TOKEN_DHCP4_SERVER || tok == token::TOKEN_DHCP6_SERVER || tok == token::TOKEN_D2_SERVER || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_UNIX || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_START_JSON || tok == token::TOKEN_START_AGENT || tok == token::TOKEN_START_SUB_AGENT); + } +#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)) + { + YYASSERT (tok == token::TOKEN_BOOLEAN); + } +#else + symbol_type (int tok, const bool& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_FLOAT); + } +#else + symbol_type (int tok, const double& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_INTEGER); + } +#else + symbol_type (int tok, const int64_t& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#else + symbol_type (int tok, const std::string& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#endif + }; /// Build a parser object. AgentParser (isc::agent::ParserContext& ctx_yyarg); virtual ~AgentParser (); + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + /// Parse. /// \returns 0 iff parsing succeeded. virtual int parse (); @@ -701,61 +828,709 @@ namespace isc { namespace agent { /// Report a syntax error. void error (const syntax_error& err); - private: - /// This class is not copyable. - AgentParser (const AgentParser&); - AgentParser& operator= (const AgentParser&); - - /// State numbers. - typedef int state_type; - - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; - - /// Compute post-reduction state. - /// \param yystate the current state - /// \param yysym the nonterminal to push on the stack - state_type yy_lr_goto_state_ (state_type yystate, int yysym); - - /// 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); - - /// 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 const signed char yypact_ninf_; - static const signed char yytable_ninf_; - - /// Convert a scanner token number \a t to a symbol number. - static token_number_type yytranslate_ (token_type t); - - // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - // STATE-NUM. - static const short int yypact_[]; - - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - // Performed when YYTABLE does not specify something else to do. Zero - // means the default is an error. - static const unsigned char yydefact_[]; - - // YYPGOTO[NTERM-NUM]. - static const signed char yypgoto_[]; - - // YYDEFGOTO[NTERM-NUM]. - static const short int yydefgoto_[]; + // Implementation of make_symbol for each symbol type. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_END (location_type l) + { + return symbol_type (token::TOKEN_END, std::move (l)); + } +#else + static + symbol_type + make_END (const location_type& l) + { + return symbol_type (token::TOKEN_END, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMA (location_type l) + { + return symbol_type (token::TOKEN_COMMA, std::move (l)); + } +#else + static + symbol_type + make_COMMA (const location_type& l) + { + return symbol_type (token::TOKEN_COMMA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COLON (location_type l) + { + return symbol_type (token::TOKEN_COLON, std::move (l)); + } +#else + static + symbol_type + make_COLON (const location_type& l) + { + return symbol_type (token::TOKEN_COLON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NULL_TYPE (location_type l) + { + return symbol_type (token::TOKEN_NULL_TYPE, std::move (l)); + } +#else + static + symbol_type + make_NULL_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_NULL_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_AGENT (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_AGENT (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HTTP_HOST (location_type l) + { + return symbol_type (token::TOKEN_HTTP_HOST, std::move (l)); + } +#else + static + symbol_type + make_HTTP_HOST (const location_type& l) + { + return symbol_type (token::TOKEN_HTTP_HOST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HTTP_PORT (location_type l) + { + return symbol_type (token::TOKEN_HTTP_PORT, std::move (l)); + } +#else + static + symbol_type + make_HTTP_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_HTTP_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER_CONTEXT (location_type l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l)); + } +#else + static + symbol_type + make_USER_CONTEXT (const location_type& l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMENT (location_type l) + { + return symbol_type (token::TOKEN_COMMENT, std::move (l)); + } +#else + static + symbol_type + make_COMMENT (const location_type& l) + { + return symbol_type (token::TOKEN_COMMENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_SOCKETS (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_SOCKETS, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_SOCKETS (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_SOCKETS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4_SERVER (location_type l) + { + return symbol_type (token::TOKEN_DHCP4_SERVER, std::move (l)); + } +#else + static + symbol_type + make_DHCP4_SERVER (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4_SERVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP6_SERVER (location_type l) + { + return symbol_type (token::TOKEN_DHCP6_SERVER, std::move (l)); + } +#else + static + symbol_type + make_DHCP6_SERVER (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP6_SERVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_D2_SERVER (location_type l) + { + return symbol_type (token::TOKEN_D2_SERVER, std::move (l)); + } +#else + static + symbol_type + make_D2_SERVER (const location_type& l) + { + return symbol_type (token::TOKEN_D2_SERVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SOCKET_NAME (location_type l) + { + return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l)); + } +#else + static + symbol_type + make_SOCKET_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_SOCKET_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SOCKET_TYPE (location_type l) + { + return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l)); + } +#else + static + symbol_type + make_SOCKET_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_SOCKET_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UNIX (location_type l) + { + return symbol_type (token::TOKEN_UNIX, std::move (l)); + } +#else + static + symbol_type + make_UNIX (const location_type& l) + { + return symbol_type (token::TOKEN_UNIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOOKS_LIBRARIES (location_type l) + { + return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l)); + } +#else + static + symbol_type + make_HOOKS_LIBRARIES (const location_type& l) + { + return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LIBRARY (location_type l) + { + return symbol_type (token::TOKEN_LIBRARY, std::move (l)); + } +#else + static + symbol_type + make_LIBRARY (const location_type& l) + { + return symbol_type (token::TOKEN_LIBRARY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARAMETERS (location_type l) + { + return symbol_type (token::TOKEN_PARAMETERS, std::move (l)); + } +#else + static + symbol_type + make_PARAMETERS (const location_type& l) + { + return symbol_type (token::TOKEN_PARAMETERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGING (location_type l) + { + return symbol_type (token::TOKEN_LOGGING, std::move (l)); + } +#else + static + symbol_type + make_LOGGING (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGERS (location_type l) + { + return symbol_type (token::TOKEN_LOGGERS, std::move (l)); + } +#else + static + symbol_type + make_LOGGERS (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NAME (location_type l) + { + return symbol_type (token::TOKEN_NAME, std::move (l)); + } +#else + static + symbol_type + make_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT_OPTIONS (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT_OPTIONS (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEBUGLEVEL (location_type l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l)); + } +#else + static + symbol_type + make_DEBUGLEVEL (const location_type& l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SEVERITY (location_type l) + { + return symbol_type (token::TOKEN_SEVERITY, std::move (l)); + } +#else + static + symbol_type + make_SEVERITY (const location_type& l) + { + return symbol_type (token::TOKEN_SEVERITY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLUSH (location_type l) + { + return symbol_type (token::TOKEN_FLUSH, std::move (l)); + } +#else + static + symbol_type + make_FLUSH (const location_type& l) + { + return symbol_type (token::TOKEN_FLUSH, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXSIZE (location_type l) + { + return symbol_type (token::TOKEN_MAXSIZE, std::move (l)); + } +#else + static + symbol_type + make_MAXSIZE (const location_type& l) + { + return symbol_type (token::TOKEN_MAXSIZE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXVER (location_type l) + { + return symbol_type (token::TOKEN_MAXVER, std::move (l)); + } +#else + static + symbol_type + make_MAXVER (const location_type& l) + { + return symbol_type (token::TOKEN_MAXVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4 (location_type l) + { + return symbol_type (token::TOKEN_DHCP4, std::move (l)); + } +#else + static + symbol_type + make_DHCP4 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP6 (location_type l) + { + return symbol_type (token::TOKEN_DHCP6, std::move (l)); + } +#else + static + symbol_type + make_DHCP6 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCPDDNS (location_type l) + { + return symbol_type (token::TOKEN_DHCPDDNS, std::move (l)); + } +#else + static + symbol_type + make_DHCPDDNS (const location_type& l) + { + return symbol_type (token::TOKEN_DHCPDDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_START_JSON (location_type l) + { + return symbol_type (token::TOKEN_START_JSON, std::move (l)); + } +#else + static + symbol_type + make_START_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_START_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_START_AGENT (location_type l) + { + return symbol_type (token::TOKEN_START_AGENT, std::move (l)); + } +#else + static + symbol_type + make_START_AGENT (const location_type& l) + { + return symbol_type (token::TOKEN_START_AGENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_START_SUB_AGENT (location_type l) + { + return symbol_type (token::TOKEN_START_SUB_AGENT, std::move (l)); + } +#else + static + symbol_type + make_START_SUB_AGENT (const location_type& l) + { + return symbol_type (token::TOKEN_START_SUB_AGENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v, location_type l) + { + return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_STRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_STRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTEGER (int64_t v, location_type l) + { + return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_INTEGER (const int64_t& v, const location_type& l) + { + return symbol_type (token::TOKEN_INTEGER, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v, location_type l) + { + return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_FLOAT (const double& v, const location_type& l) + { + return symbol_type (token::TOKEN_FLOAT, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BOOLEAN (bool v, location_type l) + { + return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_BOOLEAN (const bool& v, const location_type& l) + { + return symbol_type (token::TOKEN_BOOLEAN, v, l); + } +#endif + + + private: + /// This class is not copyable. + AgentParser (const AgentParser&); + AgentParser& operator= (const AgentParser&); + + /// State numbers. + typedef int state_type; + + /// Generate an error message. + /// \param yystate the state where the error occurred. + /// \param yyla the lookahead token. + virtual std::string yysyntax_error_ (state_type yystate, + const symbol_type& yyla) const; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// 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); + + /// 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 const signed char yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token number \a t to a symbol number. + static token_number_type yytranslate_ (token_type t); + + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; + + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const unsigned char yydefact_[]; + + // YYPGOTO[NTERM-NUM]. + static const signed char yypgoto_[]; + + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const unsigned char yytable_[]; - static const short int yycheck_[]; + static const short yycheck_[]; // YYSTOS[STATE-NUM] -- The (internal number of the) accessing // symbol of state STATE-NUM. @@ -776,14 +1551,15 @@ namespace isc { namespace agent { static const char* const yytname_[]; #if AGENT_DEBUG // YYRLINE[YYN] -- Source line where rule number YYN was defined. - static const unsigned short int yyrline_[]; + static const unsigned short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. virtual void yy_reduce_print_ (int r); /// Print the state stack on the debug stream. virtual void yystack_print_ (); - // Debugging. + /// Debugging level. int yydebug_; + /// Debug stream. std::ostream* yycdebug_; /// \brief Display a symbol type, value and location. @@ -805,26 +1581,26 @@ namespace isc { namespace agent { struct by_state { /// Default constructor. - by_state (); + by_state () YY_NOEXCEPT; /// The symbol type as needed by the constructor. typedef state_type kind_type; /// Constructor. - by_state (kind_type s); + by_state (kind_type s) YY_NOEXCEPT; /// Copy constructor. - by_state (const by_state& other); + by_state (const by_state& that) YY_NOEXCEPT; /// Record that this symbol is empty. - void clear (); + void clear () YY_NOEXCEPT; /// Steal the symbol type from \a that. void move (by_state& that); /// The (internal) type number (corresponding to \a state). /// \a empty_symbol when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. enum { empty_state = -1 }; @@ -841,12 +1617,141 @@ namespace isc { namespace agent { typedef basic_symbol super_type; /// Construct an empty symbol. stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); /// Steal the contents from \a sym to build this. - stack_symbol_type (state_type s, symbol_type& sym); - /// Assignment, needed by push_back. - stack_symbol_type& operator= (const stack_symbol_type& that); + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); +#endif }; + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::reverse_iterator iterator; + typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::size_type size_type; + + stack (size_type n = 200) + : seq_ (n) + {} + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (size_type i) + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (int i) + { + return operator[] (size_type (i)); + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (size_type i) const + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (int i) const + { + return operator[] (size_type (i)); + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (int n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + size_type + size () const YY_NOEXCEPT + { + return seq_.size (); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.rbegin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.rend (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, int range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (int i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + int range_; + }; + + private: + stack (const stack&); + stack& operator= (const stack&); + /// The wrapped container. + S seq_; + }; + + /// Stack type. typedef stack stack_type; @@ -856,20 +1761,20 @@ namespace isc { namespace agent { /// Push a new state on the stack. /// \param m a debug message to display /// if null, no trace is output. - /// \param s the symbol + /// \param sym the symbol /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, stack_symbol_type& s); + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); /// Push a new look ahead token on the state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param s the state /// \param sym the symbol (for its value and location). - /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, state_type s, symbol_type& sym); + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); - /// Pop \a n symbols the three stacks. - void yypop_ (unsigned int n = 1); + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); /// Constants. enum @@ -888,16 +1793,17 @@ namespace isc { namespace agent { isc::agent::ParserContext& ctx; }; - // Symbol number corresponding to token number t. inline AgentParser::token_number_type AgentParser::yytranslate_ (token_type t) { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. static const token_number_type translate_table[] = { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -928,59 +1834,47 @@ namespace isc { namespace agent { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 }; - const unsigned int user_token_number_max_ = 299; + const unsigned user_token_number_max_ = 299; const token_number_type undef_token_ = 2; - if (static_cast(t) <= yyeof_) + if (static_cast (t) <= yyeof_) return yyeof_; - else if (static_cast (t) <= user_token_number_max_) + else if (static_cast (t) <= user_token_number_max_) return translate_table[t]; else return undef_token_; } - inline - AgentParser::syntax_error::syntax_error (const location_type& l, const std::string& m) - : std::runtime_error (m) - , location (l) - {} - // basic_symbol. +#if 201103L <= YY_CPLUSPLUS template - inline - AgentParser::basic_symbol::basic_symbol () - : value () - {} - - template - inline - AgentParser::basic_symbol::basic_symbol (const basic_symbol& other) - : Base (other) + AgentParser::basic_symbol::basic_symbol (basic_symbol&& that) + : Base (std::move (that)) , value () - , location (other.location) + , location (std::move (that.location)) { - switch (other.type_get ()) + switch (this->type_get ()) { case 53: // value case 56: // map_value case 107: // socket_type_value - value.copy< ElementPtr > (other.value); + value.move< ElementPtr > (std::move (that.value)); break; case 44: // "boolean" - value.copy< bool > (other.value); + value.move< bool > (std::move (that.value)); break; case 43: // "floating point" - value.copy< double > (other.value); + value.move< double > (std::move (that.value)); break; case 42: // "integer" - value.copy< int64_t > (other.value); + value.move< int64_t > (std::move (that.value)); break; case 41: // "constant string" - value.copy< std::string > (other.value); + value.move< std::string > (std::move (that.value)); break; default: @@ -988,188 +1882,87 @@ namespace isc { namespace agent { } } - +#endif template - inline - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l) - : Base (t) + AgentParser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) , value () - , location (l) + , location (that.location) { - (void) v; - switch (this->type_get ()) + switch (this->type_get ()) { case 53: // value case 56: // map_value case 107: // socket_type_value - value.copy< ElementPtr > (v); + value.copy< ElementPtr > (YY_MOVE (that.value)); break; case 44: // "boolean" - value.copy< bool > (v); + value.copy< bool > (YY_MOVE (that.value)); break; case 43: // "floating point" - value.copy< double > (v); + value.copy< double > (YY_MOVE (that.value)); break; case 42: // "integer" - value.copy< int64_t > (v); + value.copy< int64_t > (YY_MOVE (that.value)); break; case 41: // "constant string" - value.copy< std::string > (v); + value.copy< std::string > (YY_MOVE (that.value)); break; default: break; } -} - - - // Implementation of basic_symbol constructor for each type. - - template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) - : Base (t) - , value () - , location (l) - {} - - template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const double v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - inline - AgentParser::basic_symbol::~basic_symbol () - { - clear (); } - template - inline - void - AgentParser::basic_symbol::clear () - { - // User destructor. - symbol_number_type yytype = this->type_get (); - basic_symbol& yysym = *this; - (void) yysym; - switch (yytype) - { - default: - break; - } - - // Type destructor. - switch (yytype) - { - case 53: // value - case 56: // map_value - case 107: // socket_type_value - value.template destroy< ElementPtr > (); - break; - case 44: // "boolean" - value.template destroy< bool > (); - break; - - case 43: // "floating point" - value.template destroy< double > (); - break; - - case 42: // "integer" - value.template destroy< int64_t > (); - break; - - case 41: // "constant string" - value.template destroy< std::string > (); - break; - - default: - break; - } - - Base::clear (); - } template - inline bool - AgentParser::basic_symbol::empty () const + AgentParser::basic_symbol::empty () const YY_NOEXCEPT { return Base::type_get () == empty_symbol; } template - inline void AgentParser::basic_symbol::move (basic_symbol& s) { - super_type::move(s); - switch (this->type_get ()) + super_type::move (s); + switch (this->type_get ()) { case 53: // value case 56: // map_value case 107: // socket_type_value - value.move< ElementPtr > (s.value); + value.move< ElementPtr > (YY_MOVE (s.value)); break; case 44: // "boolean" - value.move< bool > (s.value); + value.move< bool > (YY_MOVE (s.value)); break; case 43: // "floating point" - value.move< double > (s.value); + value.move< double > (YY_MOVE (s.value)); break; case 42: // "integer" - value.move< int64_t > (s.value); + value.move< int64_t > (YY_MOVE (s.value)); break; case 41: // "constant string" - value.move< std::string > (s.value); + value.move< std::string > (YY_MOVE (s.value)); break; default: break; } - location = s.location; + location = YY_MOVE (s.location); } // by_type. @@ -1178,9 +1971,18 @@ namespace isc { namespace agent { : type (empty_symbol) {} +#if 201103L <= YY_CPLUSPLUS + inline + AgentParser::by_type::by_type (by_type&& that) + : type (that.type) + { + that.clear (); + } +#endif + inline - AgentParser::by_type::by_type (const by_type& other) - : type (other.type) + AgentParser::by_type::by_type (const by_type& that) + : type (that.type) {} inline @@ -1205,19 +2007,19 @@ namespace isc { namespace agent { inline int - AgentParser::by_type::type_get () const + AgentParser::by_type::type_get () const YY_NOEXCEPT { return type; } inline AgentParser::token_type - AgentParser::by_type::token () const + AgentParser::by_type::token () const YY_NOEXCEPT { // YYTOKNUM[NUM] -- (External) token number corresponding to the // (internal) symbol number NUM (which must be that of a token). */ static - const unsigned short int + const unsigned short yytoken_number_[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -1226,271 +2028,13 @@ namespace isc { namespace agent { 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299 }; - return static_cast (yytoken_number_[type]); - } - // Implementation of make_symbol for each symbol type. - AgentParser::symbol_type - AgentParser::make_END (const location_type& l) - { - return symbol_type (token::TOKEN_END, l); - } - - AgentParser::symbol_type - AgentParser::make_COMMA (const location_type& l) - { - return symbol_type (token::TOKEN_COMMA, l); - } - - AgentParser::symbol_type - AgentParser::make_COLON (const location_type& l) - { - return symbol_type (token::TOKEN_COLON, l); - } - - AgentParser::symbol_type - AgentParser::make_LSQUARE_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_LSQUARE_BRACKET, l); - } - - AgentParser::symbol_type - AgentParser::make_RSQUARE_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_RSQUARE_BRACKET, l); - } - - AgentParser::symbol_type - AgentParser::make_LCURLY_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_LCURLY_BRACKET, l); + return token_type (yytoken_number_[type]); } - AgentParser::symbol_type - AgentParser::make_RCURLY_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_RCURLY_BRACKET, l); - } - - AgentParser::symbol_type - AgentParser::make_NULL_TYPE (const location_type& l) - { - return symbol_type (token::TOKEN_NULL_TYPE, l); - } - - AgentParser::symbol_type - AgentParser::make_CONTROL_AGENT (const location_type& l) - { - return symbol_type (token::TOKEN_CONTROL_AGENT, l); - } - - AgentParser::symbol_type - AgentParser::make_HTTP_HOST (const location_type& l) - { - return symbol_type (token::TOKEN_HTTP_HOST, l); - } - - AgentParser::symbol_type - AgentParser::make_HTTP_PORT (const location_type& l) - { - return symbol_type (token::TOKEN_HTTP_PORT, l); - } - - AgentParser::symbol_type - AgentParser::make_USER_CONTEXT (const location_type& l) - { - return symbol_type (token::TOKEN_USER_CONTEXT, l); - } - - AgentParser::symbol_type - AgentParser::make_COMMENT (const location_type& l) - { - return symbol_type (token::TOKEN_COMMENT, l); - } - - AgentParser::symbol_type - AgentParser::make_CONTROL_SOCKETS (const location_type& l) - { - return symbol_type (token::TOKEN_CONTROL_SOCKETS, l); - } - - AgentParser::symbol_type - AgentParser::make_DHCP4_SERVER (const location_type& l) - { - return symbol_type (token::TOKEN_DHCP4_SERVER, l); - } - - AgentParser::symbol_type - AgentParser::make_DHCP6_SERVER (const location_type& l) - { - return symbol_type (token::TOKEN_DHCP6_SERVER, l); - } - - AgentParser::symbol_type - AgentParser::make_D2_SERVER (const location_type& l) - { - return symbol_type (token::TOKEN_D2_SERVER, l); - } - - AgentParser::symbol_type - AgentParser::make_SOCKET_NAME (const location_type& l) - { - return symbol_type (token::TOKEN_SOCKET_NAME, l); - } - - AgentParser::symbol_type - AgentParser::make_SOCKET_TYPE (const location_type& l) - { - return symbol_type (token::TOKEN_SOCKET_TYPE, l); - } - - AgentParser::symbol_type - AgentParser::make_UNIX (const location_type& l) - { - return symbol_type (token::TOKEN_UNIX, l); - } - - AgentParser::symbol_type - AgentParser::make_HOOKS_LIBRARIES (const location_type& l) - { - return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l); - } - - AgentParser::symbol_type - AgentParser::make_LIBRARY (const location_type& l) - { - return symbol_type (token::TOKEN_LIBRARY, l); - } - - AgentParser::symbol_type - AgentParser::make_PARAMETERS (const location_type& l) - { - return symbol_type (token::TOKEN_PARAMETERS, l); - } - - AgentParser::symbol_type - AgentParser::make_LOGGING (const location_type& l) - { - return symbol_type (token::TOKEN_LOGGING, l); - } - - AgentParser::symbol_type - AgentParser::make_LOGGERS (const location_type& l) - { - return symbol_type (token::TOKEN_LOGGERS, l); - } - - AgentParser::symbol_type - AgentParser::make_NAME (const location_type& l) - { - return symbol_type (token::TOKEN_NAME, l); - } - - AgentParser::symbol_type - AgentParser::make_OUTPUT_OPTIONS (const location_type& l) - { - return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l); - } - - AgentParser::symbol_type - AgentParser::make_OUTPUT (const location_type& l) - { - return symbol_type (token::TOKEN_OUTPUT, l); - } - - AgentParser::symbol_type - AgentParser::make_DEBUGLEVEL (const location_type& l) - { - return symbol_type (token::TOKEN_DEBUGLEVEL, l); - } - - AgentParser::symbol_type - AgentParser::make_SEVERITY (const location_type& l) - { - return symbol_type (token::TOKEN_SEVERITY, l); - } - - AgentParser::symbol_type - AgentParser::make_FLUSH (const location_type& l) - { - return symbol_type (token::TOKEN_FLUSH, l); - } - - AgentParser::symbol_type - AgentParser::make_MAXSIZE (const location_type& l) - { - return symbol_type (token::TOKEN_MAXSIZE, l); - } - - AgentParser::symbol_type - AgentParser::make_MAXVER (const location_type& l) - { - return symbol_type (token::TOKEN_MAXVER, l); - } - - AgentParser::symbol_type - AgentParser::make_DHCP4 (const location_type& l) - { - return symbol_type (token::TOKEN_DHCP4, l); - } - - AgentParser::symbol_type - AgentParser::make_DHCP6 (const location_type& l) - { - return symbol_type (token::TOKEN_DHCP6, l); - } - - AgentParser::symbol_type - AgentParser::make_DHCPDDNS (const location_type& l) - { - return symbol_type (token::TOKEN_DHCPDDNS, l); - } - - AgentParser::symbol_type - AgentParser::make_START_JSON (const location_type& l) - { - return symbol_type (token::TOKEN_START_JSON, l); - } - - AgentParser::symbol_type - AgentParser::make_START_AGENT (const location_type& l) - { - return symbol_type (token::TOKEN_START_AGENT, l); - } - - AgentParser::symbol_type - AgentParser::make_START_SUB_AGENT (const location_type& l) - { - return symbol_type (token::TOKEN_START_SUB_AGENT, l); - } - - AgentParser::symbol_type - AgentParser::make_STRING (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_STRING, v, l); - } - - AgentParser::symbol_type - AgentParser::make_INTEGER (const int64_t& v, const location_type& l) - { - return symbol_type (token::TOKEN_INTEGER, v, l); - } - - AgentParser::symbol_type - AgentParser::make_FLOAT (const double& v, const location_type& l) - { - return symbol_type (token::TOKEN_FLOAT, v, l); - } - - AgentParser::symbol_type - AgentParser::make_BOOLEAN (const bool& v, const location_type& l) - { - return symbol_type (token::TOKEN_BOOLEAN, v, l); - } - - -#line 14 "agent_parser.yy" // lalr1.cc:377 +#line 14 "agent_parser.yy" } } // isc::agent -#line 1494 "agent_parser.h" // lalr1.cc:377 +#line 2037 "agent_parser.h" + diff --git a/src/bin/agent/kea-ctrl-agent.xml b/src/bin/agent/kea-ctrl-agent.xml index a6af48b188..007490b03a 100644 --- a/src/bin/agent/kea-ctrl-agent.xml +++ b/src/bin/agent/kea-ctrl-agent.xml @@ -11,8 +11,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin @@ -36,7 +36,7 @@ - 2016-2018 + 2016-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/agent/location.hh b/src/bin/agent/location.hh index c978ea584a..67c71f7f30 100644 --- a/src/bin/agent/location.hh +++ b/src/bin/agent/location.hh @@ -1,9 +1,9 @@ -// Generated 201804111444 -// A Bison parser, made by GNU Bison 3.0.4. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -39,12 +39,146 @@ #ifndef YY_AGENT_LOCATION_HH_INCLUDED # define YY_AGENT_LOCATION_HH_INCLUDED -# include "position.hh" +# include // std::max +# include +# include -#line 14 "agent_parser.yy" // location.cc:296 +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +#line 14 "agent_parser.yy" namespace isc { namespace agent { -#line 46 "location.hh" // location.cc:296 - /// Abstract a location. +#line 60 "location.hh" + + /// A point in a source file. + class position + { + public: + /// Construct a position. + explicit position (std::string* f = YY_NULLPTR, + unsigned l = 1u, + unsigned c = 1u) + : filename (f) + , line (l) + , column (c) + {} + + + /// Initialization. + void initialize (std::string* fn = YY_NULLPTR, + unsigned l = 1u, + unsigned c = 1u) + { + filename = fn; + line = l; + column = c; + } + + /** \name Line and Column related manipulators + ** \{ */ + /// (line related) Advance to the COUNT next lines. + void lines (int count = 1) + { + if (count) + { + column = 1u; + line = add_ (line, count, 1); + } + } + + /// (column related) Advance to the COUNT next columns. + void columns (int count = 1) + { + column = add_ (column, count, 1); + } + /** \} */ + + /// File name to which this position refers. + std::string* filename; + /// Current line number. + unsigned line; + /// Current column number. + unsigned column; + + private: + /// Compute max (min, lhs+rhs). + static unsigned add_ (unsigned lhs, int rhs, int min) + { + return static_cast (std::max (min, + static_cast (lhs) + rhs)); + } + }; + + /// Add \a width columns, in place. + inline position& + operator+= (position& res, int width) + { + res.columns (width); + return res; + } + + /// Add \a width columns. + inline position + operator+ (position res, int width) + { + return res += width; + } + + /// Subtract \a width columns, in place. + inline position& + operator-= (position& res, int width) + { + return res += -width; + } + + /// Subtract \a width columns. + inline position + operator- (position res, int width) + { + return res -= width; + } + + /// Compare two position objects. + inline bool + operator== (const position& pos1, const position& pos2) + { + return (pos1.line == pos2.line + && pos1.column == pos2.column + && (pos1.filename == pos2.filename + || (pos1.filename && pos2.filename + && *pos1.filename == *pos2.filename))); + } + + /// Compare two position objects. + inline bool + operator!= (const position& pos1, const position& pos2) + { + return !(pos1 == pos2); + } + + /** \brief Intercept output stream redirection. + ** \param ostr the destination output stream + ** \param pos a reference to the position to redirect + */ + template + std::basic_ostream& + operator<< (std::basic_ostream& ostr, const position& pos) + { + if (pos.filename) + ostr << *pos.filename << ':'; + return ostr << pos.line << '.' << pos.column; + } + + /// Two points in a source file. class location { public: @@ -53,30 +187,27 @@ namespace isc { namespace agent { location (const position& b, const position& e) : begin (b) , end (e) - { - } + {} /// Construct a 0-width location in \a p. explicit location (const position& p = position ()) : begin (p) , end (p) - { - } + {} /// Construct a 0-width location in \a f, \a l, \a c. explicit location (std::string* f, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) : begin (f, l, c) , end (f, l, c) - { - } + {} /// Initialization. void initialize (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) { begin.initialize (f, l, c); end = begin; @@ -171,10 +302,10 @@ namespace isc { namespace agent { ** Avoid duplicate information. */ template - inline std::basic_ostream& + std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -187,7 +318,8 @@ namespace isc { namespace agent { return ostr; } -#line 14 "agent_parser.yy" // location.cc:296 +#line 14 "agent_parser.yy" } } // isc::agent -#line 192 "location.hh" // location.cc:296 +#line 323 "location.hh" + #endif // !YY_AGENT_LOCATION_HH_INCLUDED diff --git a/src/bin/agent/position.hh b/src/bin/agent/position.hh index 4678102783..23536ce47f 100644 --- a/src/bin/agent/position.hh +++ b/src/bin/agent/position.hh @@ -1,181 +1,12 @@ -// Generated 201804111444 -// A Bison parser, made by GNU Bison 3.0.4. - -// Positions for Bison parsers in C++ - -// Copyright (C) 2002-2015 Free Software Foundation, Inc. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// As a special exception, you may create a larger work that contains -// part or all of the Bison parser skeleton and distribute that work -// under terms of your choice, so long as that work isn't itself a -// parser generator using the skeleton or a modified version thereof -// as a parser skeleton. Alternatively, if you modify or redistribute -// the parser skeleton itself, you may (at your option) remove this -// special exception, which will cause the skeleton and the resulting -// Bison output files to be licensed under the GNU General Public -// License without this special exception. - -// This special exception was added by the Free Software Foundation in -// version 2.2 of Bison. - -/** - ** \file position.hh - ** Define the isc::agent::position class. - */ - -#ifndef YY_AGENT_POSITION_HH_INCLUDED -# define YY_AGENT_POSITION_HH_INCLUDED - -# include // std::max -# include -# include - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -#line 14 "agent_parser.yy" // location.cc:296 -namespace isc { namespace agent { -#line 56 "position.hh" // location.cc:296 - /// Abstract a position. - class position - { - public: - /// Construct a position. - explicit position (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) - : filename (f) - , line (l) - , column (c) - { - } - - - /// Initialization. - void initialize (std::string* fn = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) - { - filename = fn; - line = l; - column = c; - } - - /** \name Line and Column related manipulators - ** \{ */ - /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) - { - if (count) - { - column = 1u; - line = add_ (line, count, 1); - } - } - - /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) - { - column = add_ (column, count, 1); - } - /** \} */ - - /// File name to which this position refers. - std::string* filename; - /// Current line number. - unsigned int line; - /// Current column number. - unsigned int column; - - private: - /// Compute max(min, lhs+rhs) (provided min <= lhs). - static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min) - { - return (0 < rhs || -static_cast(rhs) < lhs - ? rhs + lhs - : min); - } - }; - - /// Add \a width columns, in place. - inline position& - operator+= (position& res, int width) - { - res.columns (width); - return res; - } - - /// Add \a width columns. - inline position - operator+ (position res, int width) - { - return res += width; - } - - /// Subtract \a width columns, in place. - inline position& - operator-= (position& res, int width) - { - return res += -width; - } - - /// Subtract \a width columns. - inline position - operator- (position res, int width) - { - return res -= width; - } - - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } - - /** \brief Intercept output stream redirection. - ** \param ostr the destination output stream - ** \param pos a reference to the position to redirect - */ - template - inline std::basic_ostream& - operator<< (std::basic_ostream& ostr, const position& pos) - { - if (pos.filename) - ostr << *pos.filename << ':'; - return ostr << pos.line << '.' << pos.column; - } - -#line 14 "agent_parser.yy" // location.cc:296 -} } // isc::agent -#line 180 "position.hh" // location.cc:296 -#endif // !YY_AGENT_POSITION_HH_INCLUDED +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. + +// Starting with Bison 3.2, this file is useless: the structure it +// used to define is now defined in "location.hh". +// +// To get rid of this file: +// 1. add 'require "3.2"' (or newer) to your grammar file +// 2. remove references to this file from your build system +// 3. if you used to include it, include "location.hh" instead. + +#include "location.hh" diff --git a/src/bin/agent/stack.hh b/src/bin/agent/stack.hh index efca5678c7..b90e3e2e0c 100644 --- a/src/bin/agent/stack.hh +++ b/src/bin/agent/stack.hh @@ -1,158 +1,9 @@ -// Generated 201804111444 -// A Bison parser, made by GNU Bison 3.0.4. - -// Stack handling for Bison parsers in C++ - -// Copyright (C) 2002-2015 Free Software Foundation, Inc. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// As a special exception, you may create a larger work that contains -// part or all of the Bison parser skeleton and distribute that work -// under terms of your choice, so long as that work isn't itself a -// parser generator using the skeleton or a modified version thereof -// as a parser skeleton. Alternatively, if you modify or redistribute -// the parser skeleton itself, you may (at your option) remove this -// special exception, which will cause the skeleton and the resulting -// Bison output files to be licensed under the GNU General Public -// License without this special exception. - -// This special exception was added by the Free Software Foundation in -// version 2.2 of Bison. - -/** - ** \file stack.hh - ** Define the isc::agent::stack class. - */ - -#ifndef YY_AGENT_STACK_HH_INCLUDED -# define YY_AGENT_STACK_HH_INCLUDED - -# include - -#line 14 "agent_parser.yy" // stack.hh:132 -namespace isc { namespace agent { -#line 46 "stack.hh" // stack.hh:132 - template > - class stack - { - public: - // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; - - stack () - : seq_ () - { - seq_.reserve (200); - } - - stack (unsigned int n) - : seq_ (n) - {} - - inline - T& - operator[] (unsigned int i) - { - return seq_[seq_.size () - 1 - i]; - } - - inline - const T& - operator[] (unsigned int i) const - { - return seq_[seq_.size () - 1 - i]; - } - - /// Steal the contents of \a t. - /// - /// Close to move-semantics. - inline - void - push (T& t) - { - seq_.push_back (T()); - operator[](0).move (t); - } - - inline - void - pop (unsigned int n = 1) - { - for (; n; --n) - seq_.pop_back (); - } - - void - clear () - { - seq_.clear (); - } - - inline - typename S::size_type - size () const - { - return seq_.size (); - } - - inline - const_iterator - begin () const - { - return seq_.rbegin (); - } - - inline - const_iterator - end () const - { - return seq_.rend (); - } - - private: - stack (const stack&); - stack& operator= (const stack&); - /// The wrapped container. - S seq_; - }; - - /// Present a slice of the top of a stack. - template > - class slice - { - public: - slice (const S& stack, unsigned int range) - : stack_ (stack) - , range_ (range) - {} - - inline - const T& - operator [] (unsigned int i) const - { - return stack_[range_ - i]; - } - - private: - const S& stack_; - unsigned int range_; - }; - -#line 14 "agent_parser.yy" // stack.hh:132 -} } // isc::agent -#line 156 "stack.hh" // stack.hh:132 - -#endif // !YY_AGENT_STACK_HH_INCLUDED +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. + +// Starting with Bison 3.2, this file is useless: the structure it +// used to define is now defined with the parser itself. +// +// To get rid of this file: +// 1. add 'require "3.2"' (or newer) to your grammar file +// 2. remove references to this file from your build system. diff --git a/src/bin/d2/d2_parser.cc b/src/bin/d2/d2_parser.cc index 11d8cbc5e6..ee0c2e17ae 100644 --- a/src/bin/d2/d2_parser.cc +++ b/src/bin/d2/d2_parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -30,32 +30,24 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. +// Undocumented macros, especially those whose name start with YY_, +// are private implementation details. Do not rely on them. + + // Take the name prefix into account. #define yylex d2_parser_lex -// First part of user declarations. - -#line 39 "d2_parser.cc" // lalr1.cc:404 -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif #include "d2_parser.h" -// User implementation prologue. -#line 53 "d2_parser.cc" // lalr1.cc:412 // Unqualified %code blocks. -#line 34 "d2_parser.yy" // lalr1.cc:413 +#line 34 "d2_parser.yy" #include -#line 59 "d2_parser.cc" // lalr1.cc:413 +#line 51 "d2_parser.cc" #ifndef YY_ @@ -70,6 +62,15 @@ # endif #endif +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + #define YYRHSLOC(Rhs, K) ((Rhs)[K].location) /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -87,7 +88,7 @@ { \ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ } \ - while (/*CONSTCOND*/ false) + while (false) # endif @@ -106,7 +107,7 @@ { \ *yycdebug_ << Title << ' '; \ yy_print_ (*yycdebug_, Symbol); \ - *yycdebug_ << std::endl; \ + *yycdebug_ << '\n'; \ } \ } while (false) @@ -125,9 +126,9 @@ #else // !D2_PARSER_DEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol) -# define YY_REDUCE_PRINT(Rule) static_cast(0) -# define YY_STACK_PRINT() static_cast(0) +# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) #endif // !D2_PARSER_DEBUG @@ -139,9 +140,10 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "d2_parser.yy" // lalr1.cc:479 +#line 14 "d2_parser.yy" namespace isc { namespace d2 { -#line 145 "d2_parser.cc" // lalr1.cc:479 +#line 146 "d2_parser.cc" + /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is @@ -153,7 +155,7 @@ namespace isc { namespace d2 { { if (*yystr == '"') { - std::string yyr = ""; + std::string yyr; char const *yyp = yystr; for (;;) @@ -166,7 +168,10 @@ namespace isc { namespace d2 { case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - // Fall through. + else + goto append; + + append: default: yyr += *yyp; break; @@ -194,6 +199,8 @@ namespace isc { namespace d2 { D2Parser::~D2Parser () {} + D2Parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} /*---------------. | Symbol types. | @@ -202,24 +209,20 @@ namespace isc { namespace d2 { // by_state. - inline - D2Parser::by_state::by_state () + D2Parser::by_state::by_state () YY_NOEXCEPT : state (empty_state) {} - inline - D2Parser::by_state::by_state (const by_state& other) - : state (other.state) + D2Parser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) {} - inline void - D2Parser::by_state::clear () + D2Parser::by_state::clear () YY_NOEXCEPT { state = empty_state; } - inline void D2Parser::by_state::move (by_state& that) { @@ -227,14 +230,12 @@ namespace isc { namespace d2 { that.clear (); } - inline - D2Parser::by_state::by_state (state_type s) + D2Parser::by_state::by_state (state_type s) YY_NOEXCEPT : state (s) {} - inline D2Parser::symbol_number_type - D2Parser::by_state::type_get () const + D2Parser::by_state::type_get () const YY_NOEXCEPT { if (state == empty_state) return empty_symbol; @@ -242,37 +243,71 @@ namespace isc { namespace d2 { return yystos_[state]; } - inline D2Parser::stack_symbol_type::stack_symbol_type () {} + D2Parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) + { + switch (that.type_get ()) + { + case 68: // value + case 72: // map_value + case 96: // ncr_protocol_value + value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (that.value)); + break; + + case 56: // "boolean" + value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value)); + break; + + case 55: // "floating point" + value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); + break; + + case 54: // "integer" + value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); + break; + + case 53: // "constant string" + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } - inline - D2Parser::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that) - : super_type (s, that.location) + D2Parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.type_get ()) { case 68: // value case 72: // map_value case 96: // ncr_protocol_value - value.move< ElementPtr > (that.value); + value.move< ElementPtr > (YY_MOVE (that.value)); break; case 56: // "boolean" - value.move< bool > (that.value); + value.move< bool > (YY_MOVE (that.value)); break; case 55: // "floating point" - value.move< double > (that.value); + value.move< double > (YY_MOVE (that.value)); break; case 54: // "integer" - value.move< int64_t > (that.value); + value.move< int64_t > (YY_MOVE (that.value)); break; case 53: // "constant string" - value.move< std::string > (that.value); + value.move< std::string > (YY_MOVE (that.value)); break; default: @@ -283,33 +318,33 @@ namespace isc { namespace d2 { that.type = empty_symbol; } - inline +#if YY_CPLUSPLUS < 201103L D2Parser::stack_symbol_type& - D2Parser::stack_symbol_type::operator= (const stack_symbol_type& that) + D2Parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.type_get ()) { case 68: // value case 72: // map_value case 96: // ncr_protocol_value - value.copy< ElementPtr > (that.value); + value.move< ElementPtr > (that.value); break; case 56: // "boolean" - value.copy< bool > (that.value); + value.move< bool > (that.value); break; case 55: // "floating point" - value.copy< double > (that.value); + value.move< double > (that.value); break; case 54: // "integer" - value.copy< int64_t > (that.value); + value.move< int64_t > (that.value); break; case 53: // "constant string" - value.copy< std::string > (that.value); + value.move< std::string > (that.value); break; default: @@ -317,12 +352,13 @@ namespace isc { namespace d2 { } location = that.location; + // that is emptied. + that.state = empty_state; return *this; } - +#endif template - inline void D2Parser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const { @@ -339,65 +375,59 @@ namespace isc { namespace d2 { std::ostream& yyoutput = yyo; YYUSE (yyoutput); symbol_number_type yytype = yysym.type_get (); +#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 // Avoid a (spurious) G++ 4.8 warning about "array subscript is // below array bounds". if (yysym.empty ()) std::abort (); +#endif yyo << (yytype < yyntokens_ ? "token" : "nterm") << ' ' << yytname_[yytype] << " (" << yysym.location << ": "; switch (yytype) { - case 53: // "constant string" - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 356 "d2_parser.cc" // lalr1.cc:636 + case 53: // "constant string" +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 393 "d2_parser.cc" break; case 54: // "integer" - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< int64_t > (); } -#line 363 "d2_parser.cc" // lalr1.cc:636 +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < int64_t > (); } +#line 399 "d2_parser.cc" break; case 55: // "floating point" - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< double > (); } -#line 370 "d2_parser.cc" // lalr1.cc:636 +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < double > (); } +#line 405 "d2_parser.cc" break; case 56: // "boolean" - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< bool > (); } -#line 377 "d2_parser.cc" // lalr1.cc:636 +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < bool > (); } +#line 411 "d2_parser.cc" break; case 68: // value - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 384 "d2_parser.cc" // lalr1.cc:636 +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 417 "d2_parser.cc" break; case 72: // map_value - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 391 "d2_parser.cc" // lalr1.cc:636 +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 423 "d2_parser.cc" break; case 96: // ncr_protocol_value - -#line 111 "d2_parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 398 "d2_parser.cc" // lalr1.cc:636 +#line 111 "d2_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 429 "d2_parser.cc" break; - default: break; } @@ -405,26 +435,27 @@ namespace isc { namespace d2 { } #endif - inline void - D2Parser::yypush_ (const char* m, state_type s, symbol_type& sym) + D2Parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) { - stack_symbol_type t (s, sym); - yypush_ (m, t); + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); } - inline void - D2Parser::yypush_ (const char* m, stack_symbol_type& s) + D2Parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) { - if (m) - YY_SYMBOL_PRINT (m, s); - yystack_.push (s); +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif } - inline void - D2Parser::yypop_ (unsigned int n) + D2Parser::yypop_ (int n) { yystack_.pop (n); } @@ -456,7 +487,7 @@ namespace isc { namespace d2 { } #endif // D2_PARSER_DEBUG - inline D2Parser::state_type + D2Parser::state_type D2Parser::yy_lr_goto_state_ (state_type yystate, int yysym) { int yyr = yypgoto_[yysym - yyntokens_] + yystate; @@ -466,18 +497,24 @@ namespace isc { namespace d2 { return yydefgoto_[yysym - yyntokens_]; } - inline bool + bool D2Parser::yy_pact_value_is_default_ (int yyvalue) { return yyvalue == yypact_ninf_; } - inline bool + bool D2Parser::yy_table_value_is_error_ (int yyvalue) { return yyvalue == yytable_ninf_; } + int + D2Parser::operator() () + { + return parse (); + } + int D2Parser::parse () { @@ -499,11 +536,11 @@ namespace isc { namespace d2 { /// The return value of parse (). int yyresult; - // FIXME: This shoud be completely indented. It is not yet to - // avoid gratuitous conflicts when merging into the master branch. +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { - YYCDEBUG << "Starting parse" << std::endl; + YYCDEBUG << "Starting parse\n"; /* Initialize the stack. The initial state will be set in @@ -511,21 +548,25 @@ namespace isc { namespace d2 { location values to have been already stored, initialize these stacks with a primary value. */ yystack_.clear (); - yypush_ (YY_NULLPTR, 0, yyla); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); - // A new symbol was pushed on the stack. + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << std::endl; + YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; // Accept? if (yystack_[0].state == yyfinal_) - goto yyacceptlab; + YYACCEPT; goto yybackup; - // Backup. - yybackup: + /*-----------. + | yybackup. | + `-----------*/ + yybackup: // Try to take a decision without lookahead. yyn = yypact_[yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) @@ -535,16 +576,21 @@ namespace isc { namespace d2 { if (yyla.empty ()) { YYCDEBUG << "Reading a token: "; +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { symbol_type yylookahead (yylex (ctx)); yyla.move (yylookahead); } +#if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); goto yyerrlab1; } +#endif // YY_EXCEPTIONS } YY_SYMBOL_PRINT ("Next token is", yyla); @@ -569,9 +615,10 @@ namespace isc { namespace d2 { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, yyla); + yypush_ ("Shifting", yyn, YY_MOVE (yyla)); goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -581,39 +628,40 @@ namespace isc { namespace d2 { goto yyerrlab; goto yyreduce; + /*-----------------------------. - | yyreduce -- Do a reduction. | + | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: yylen = yyr2_[yyn]; { stack_symbol_type yylhs; - yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]); + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); /* Variants are always initialized to an empty instance of the correct type. The default '$$ = $1' action is NOT applied when using variants. */ - switch (yyr1_[yyn]) + switch (yyr1_[yyn]) { case 68: // value case 72: // map_value case 96: // ncr_protocol_value - yylhs.value.build< ElementPtr > (); + yylhs.value.emplace< ElementPtr > (); break; case 56: // "boolean" - yylhs.value.build< bool > (); + yylhs.value.emplace< bool > (); break; case 55: // "floating point" - yylhs.value.build< double > (); + yylhs.value.emplace< double > (); break; case 54: // "integer" - yylhs.value.build< int64_t > (); + yylhs.value.emplace< int64_t > (); break; case 53: // "constant string" - yylhs.value.build< std::string > (); + yylhs.value.emplace< std::string > (); break; default: @@ -621,377 +669,380 @@ namespace isc { namespace d2 { } - // Compute the default @$. + // Default location. { - slice slice (yystack_, yylen); - YYLLOC_DEFAULT (yylhs.location, slice, yylen); + stack_type::slice range (yystack_, yylen); + YYLLOC_DEFAULT (yylhs.location, range, yylen); + yyerror_range[1].location = yylhs.location; } // Perform the reduction. YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { switch (yyn) { case 2: -#line 120 "d2_parser.yy" // lalr1.cc:859 +#line 120 "d2_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 640 "d2_parser.cc" // lalr1.cc:859 +#line 691 "d2_parser.cc" break; case 4: -#line 121 "d2_parser.yy" // lalr1.cc:859 +#line 121 "d2_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 646 "d2_parser.cc" // lalr1.cc:859 +#line 697 "d2_parser.cc" break; case 6: -#line 122 "d2_parser.yy" // lalr1.cc:859 +#line 122 "d2_parser.yy" { ctx.ctx_ = ctx.DHCPDDNS; } -#line 652 "d2_parser.cc" // lalr1.cc:859 +#line 703 "d2_parser.cc" break; case 8: -#line 123 "d2_parser.yy" // lalr1.cc:859 +#line 123 "d2_parser.yy" { ctx.ctx_ = ctx.TSIG_KEY; } -#line 658 "d2_parser.cc" // lalr1.cc:859 +#line 709 "d2_parser.cc" break; case 10: -#line 124 "d2_parser.yy" // lalr1.cc:859 +#line 124 "d2_parser.yy" { ctx.ctx_ = ctx.TSIG_KEYS; } -#line 664 "d2_parser.cc" // lalr1.cc:859 +#line 715 "d2_parser.cc" break; case 12: -#line 125 "d2_parser.yy" // lalr1.cc:859 +#line 125 "d2_parser.yy" { ctx.ctx_ = ctx.DDNS_DOMAIN; } -#line 670 "d2_parser.cc" // lalr1.cc:859 +#line 721 "d2_parser.cc" break; case 14: -#line 126 "d2_parser.yy" // lalr1.cc:859 +#line 126 "d2_parser.yy" { ctx.ctx_ = ctx.DDNS_DOMAINS; } -#line 676 "d2_parser.cc" // lalr1.cc:859 +#line 727 "d2_parser.cc" break; case 16: -#line 127 "d2_parser.yy" // lalr1.cc:859 +#line 127 "d2_parser.yy" { ctx.ctx_ = ctx.DNS_SERVERS; } -#line 682 "d2_parser.cc" // lalr1.cc:859 +#line 733 "d2_parser.cc" break; case 18: -#line 128 "d2_parser.yy" // lalr1.cc:859 +#line 128 "d2_parser.yy" { ctx.ctx_ = ctx.DNS_SERVERS; } -#line 688 "d2_parser.cc" // lalr1.cc:859 +#line 739 "d2_parser.cc" break; case 20: -#line 136 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 694 "d2_parser.cc" // lalr1.cc:859 +#line 136 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } +#line 745 "d2_parser.cc" break; case 21: -#line 137 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); } -#line 700 "d2_parser.cc" // lalr1.cc:859 +#line 137 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } +#line 751 "d2_parser.cc" break; case 22: -#line 138 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 706 "d2_parser.cc" // lalr1.cc:859 +#line 138 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } +#line 757 "d2_parser.cc" break; case 23: -#line 139 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 712 "d2_parser.cc" // lalr1.cc:859 +#line 139 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } +#line 763 "d2_parser.cc" break; case 24: -#line 140 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 718 "d2_parser.cc" // lalr1.cc:859 +#line 140 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } +#line 769 "d2_parser.cc" break; case 25: -#line 141 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 724 "d2_parser.cc" // lalr1.cc:859 +#line 141 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 775 "d2_parser.cc" break; case 26: -#line 142 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 730 "d2_parser.cc" // lalr1.cc:859 +#line 142 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 781 "d2_parser.cc" break; case 27: -#line 145 "d2_parser.yy" // lalr1.cc:859 +#line 145 "d2_parser.yy" { // Push back the JSON value on the stack - ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 739 "d2_parser.cc" // lalr1.cc:859 +#line 790 "d2_parser.cc" break; case 28: -#line 150 "d2_parser.yy" // lalr1.cc:859 +#line 150 "d2_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 750 "d2_parser.cc" // lalr1.cc:859 +#line 801 "d2_parser.cc" break; case 29: -#line 155 "d2_parser.yy" // lalr1.cc:859 +#line 155 "d2_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 760 "d2_parser.cc" // lalr1.cc:859 +#line 811 "d2_parser.cc" break; case 30: -#line 161 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 766 "d2_parser.cc" // lalr1.cc:859 +#line 161 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 817 "d2_parser.cc" break; case 33: -#line 168 "d2_parser.yy" // lalr1.cc:859 +#line 168 "d2_parser.yy" { // map containing a single entry - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 775 "d2_parser.cc" // lalr1.cc:859 +#line 826 "d2_parser.cc" break; case 34: -#line 172 "d2_parser.yy" // lalr1.cc:859 +#line 172 "d2_parser.yy" { // map consisting of a shorter map followed by // comma and string:value - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 785 "d2_parser.cc" // lalr1.cc:859 +#line 836 "d2_parser.cc" break; case 35: -#line 179 "d2_parser.yy" // lalr1.cc:859 +#line 179 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 794 "d2_parser.cc" // lalr1.cc:859 +#line 845 "d2_parser.cc" break; case 36: -#line 182 "d2_parser.yy" // lalr1.cc:859 +#line 182 "d2_parser.yy" { // list parsing complete. Put any sanity checking here } -#line 802 "d2_parser.cc" // lalr1.cc:859 +#line 853 "d2_parser.cc" break; case 39: -#line 190 "d2_parser.yy" // lalr1.cc:859 +#line 190 "d2_parser.yy" { // List consisting of a single element. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 811 "d2_parser.cc" // lalr1.cc:859 +#line 862 "d2_parser.cc" break; case 40: -#line 194 "d2_parser.yy" // lalr1.cc:859 +#line 194 "d2_parser.yy" { // List ending with , and a value. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 820 "d2_parser.cc" // lalr1.cc:859 +#line 871 "d2_parser.cc" break; case 41: -#line 205 "d2_parser.yy" // lalr1.cc:859 +#line 205 "d2_parser.yy" { const std::string& where = ctx.contextName(); - const std::string& keyword = yystack_[1].value.as< std::string > (); + const std::string& keyword = yystack_[1].value.as < std::string > (); error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 831 "d2_parser.cc" // lalr1.cc:859 +#line 882 "d2_parser.cc" break; case 42: -#line 215 "d2_parser.yy" // lalr1.cc:859 +#line 215 "d2_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 842 "d2_parser.cc" // lalr1.cc:859 +#line 893 "d2_parser.cc" break; case 43: -#line 220 "d2_parser.yy" // lalr1.cc:859 +#line 220 "d2_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 852 "d2_parser.cc" // lalr1.cc:859 +#line 903 "d2_parser.cc" break; case 52: -#line 242 "d2_parser.yy" // lalr1.cc:859 +#line 242 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("DhcpDdns", m); ctx.stack_.push_back(m); ctx.enter(ctx.DHCPDDNS); } -#line 863 "d2_parser.cc" // lalr1.cc:859 +#line 914 "d2_parser.cc" break; case 53: -#line 247 "d2_parser.yy" // lalr1.cc:859 +#line 247 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 872 "d2_parser.cc" // lalr1.cc:859 +#line 923 "d2_parser.cc" break; case 54: -#line 252 "d2_parser.yy" // lalr1.cc:859 +#line 252 "d2_parser.yy" { // Parse the dhcpddns map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 882 "d2_parser.cc" // lalr1.cc:859 +#line 933 "d2_parser.cc" break; case 55: -#line 256 "d2_parser.yy" // lalr1.cc:859 +#line 256 "d2_parser.yy" { // parsing completed } -#line 890 "d2_parser.cc" // lalr1.cc:859 +#line 941 "d2_parser.cc" break; case 69: -#line 278 "d2_parser.yy" // lalr1.cc:859 +#line 278 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 898 "d2_parser.cc" // lalr1.cc:859 +#line 949 "d2_parser.cc" break; case 70: -#line 280 "d2_parser.yy" // lalr1.cc:859 +#line 280 "d2_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-address", s); ctx.leave(); } -#line 908 "d2_parser.cc" // lalr1.cc:859 +#line 959 "d2_parser.cc" break; case 71: -#line 286 "d2_parser.yy" // lalr1.cc:859 +#line 286 "d2_parser.yy" { - if (yystack_[0].value.as< int64_t > () <= 0 || yystack_[0].value.as< int64_t > () >= 65536 ) { + if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) { error(yystack_[0].location, "port must be greater than zero but less than 65536"); } - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", i); } -#line 920 "d2_parser.cc" // lalr1.cc:859 +#line 971 "d2_parser.cc" break; case 72: -#line 294 "d2_parser.yy" // lalr1.cc:859 +#line 294 "d2_parser.yy" { - if (yystack_[0].value.as< int64_t > () <= 0) { + if (yystack_[0].value.as < int64_t > () <= 0) { error(yystack_[0].location, "dns-server-timeout must be greater than zero"); } else { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dns-server-timeout", i); } } -#line 933 "d2_parser.cc" // lalr1.cc:859 +#line 984 "d2_parser.cc" break; case 73: -#line 303 "d2_parser.yy" // lalr1.cc:859 +#line 303 "d2_parser.yy" { ctx.enter(ctx.NCR_PROTOCOL); } -#line 941 "d2_parser.cc" // lalr1.cc:859 +#line 992 "d2_parser.cc" break; case 74: -#line 305 "d2_parser.yy" // lalr1.cc:859 +#line 305 "d2_parser.yy" { - ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 950 "d2_parser.cc" // lalr1.cc:859 +#line 1001 "d2_parser.cc" break; case 75: -#line 311 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 956 "d2_parser.cc" // lalr1.cc:859 +#line 311 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } +#line 1007 "d2_parser.cc" break; case 76: -#line 312 "d2_parser.yy" // lalr1.cc:859 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 962 "d2_parser.cc" // lalr1.cc:859 +#line 312 "d2_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } +#line 1013 "d2_parser.cc" break; case 77: -#line 315 "d2_parser.yy" // lalr1.cc:859 +#line 315 "d2_parser.yy" { ctx.enter(ctx.NCR_FORMAT); } -#line 970 "d2_parser.cc" // lalr1.cc:859 +#line 1021 "d2_parser.cc" break; case 78: -#line 317 "d2_parser.yy" // lalr1.cc:859 +#line 317 "d2_parser.yy" { ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 980 "d2_parser.cc" // lalr1.cc:859 +#line 1031 "d2_parser.cc" break; case 79: -#line 323 "d2_parser.yy" // lalr1.cc:859 +#line 323 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 988 "d2_parser.cc" // lalr1.cc:859 +#line 1039 "d2_parser.cc" break; case 80: -#line 325 "d2_parser.yy" // lalr1.cc:859 +#line 325 "d2_parser.yy" { ElementPtr parent = ctx.stack_.back(); - ElementPtr user_context = yystack_[0].value.as< ElementPtr > (); + ElementPtr user_context = yystack_[0].value.as < ElementPtr > (); ConstElementPtr old = parent->get("user-context"); // Handle already existing user context @@ -1011,23 +1062,23 @@ namespace isc { namespace d2 { parent->set("user-context", user_context); ctx.leave(); } -#line 1015 "d2_parser.cc" // lalr1.cc:859 +#line 1066 "d2_parser.cc" break; case 81: -#line 348 "d2_parser.yy" // lalr1.cc:859 +#line 348 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1023 "d2_parser.cc" // lalr1.cc:859 +#line 1074 "d2_parser.cc" break; case 82: -#line 350 "d2_parser.yy" // lalr1.cc:859 +#line 350 "d2_parser.yy" { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location))); - ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); user_context->set("comment", comment); // Handle already existing user context @@ -1048,693 +1099,698 @@ namespace isc { namespace d2 { parent->set("user-context", user_context); ctx.leave(); } -#line 1052 "d2_parser.cc" // lalr1.cc:859 +#line 1103 "d2_parser.cc" break; case 83: -#line 375 "d2_parser.yy" // lalr1.cc:859 +#line 375 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("forward-ddns", m); ctx.stack_.push_back(m); ctx.enter(ctx.FORWARD_DDNS); } -#line 1063 "d2_parser.cc" // lalr1.cc:859 +#line 1114 "d2_parser.cc" break; case 84: -#line 380 "d2_parser.yy" // lalr1.cc:859 +#line 380 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1072 "d2_parser.cc" // lalr1.cc:859 +#line 1123 "d2_parser.cc" break; case 85: -#line 385 "d2_parser.yy" // lalr1.cc:859 +#line 385 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reverse-ddns", m); ctx.stack_.push_back(m); ctx.enter(ctx.REVERSE_DDNS); } -#line 1083 "d2_parser.cc" // lalr1.cc:859 +#line 1134 "d2_parser.cc" break; case 86: -#line 390 "d2_parser.yy" // lalr1.cc:859 +#line 390 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1092 "d2_parser.cc" // lalr1.cc:859 +#line 1143 "d2_parser.cc" break; case 93: -#line 409 "d2_parser.yy" // lalr1.cc:859 +#line 409 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ddns-domains", l); ctx.stack_.push_back(l); ctx.enter(ctx.DDNS_DOMAINS); } -#line 1103 "d2_parser.cc" // lalr1.cc:859 +#line 1154 "d2_parser.cc" break; case 94: -#line 414 "d2_parser.yy" // lalr1.cc:859 +#line 414 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1112 "d2_parser.cc" // lalr1.cc:859 +#line 1163 "d2_parser.cc" break; case 95: -#line 419 "d2_parser.yy" // lalr1.cc:859 +#line 419 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 1121 "d2_parser.cc" // lalr1.cc:859 +#line 1172 "d2_parser.cc" break; case 96: -#line 422 "d2_parser.yy" // lalr1.cc:859 +#line 422 "d2_parser.yy" { // parsing completed } -#line 1129 "d2_parser.cc" // lalr1.cc:859 +#line 1180 "d2_parser.cc" break; case 101: -#line 434 "d2_parser.yy" // lalr1.cc:859 +#line 434 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1139 "d2_parser.cc" // lalr1.cc:859 +#line 1190 "d2_parser.cc" break; case 102: -#line 438 "d2_parser.yy" // lalr1.cc:859 +#line 438 "d2_parser.yy" { ctx.stack_.pop_back(); } -#line 1147 "d2_parser.cc" // lalr1.cc:859 +#line 1198 "d2_parser.cc" break; case 103: -#line 442 "d2_parser.yy" // lalr1.cc:859 +#line 442 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1156 "d2_parser.cc" // lalr1.cc:859 +#line 1207 "d2_parser.cc" break; case 104: -#line 445 "d2_parser.yy" // lalr1.cc:859 +#line 445 "d2_parser.yy" { // parsing completed } -#line 1164 "d2_parser.cc" // lalr1.cc:859 +#line 1215 "d2_parser.cc" break; case 113: -#line 462 "d2_parser.yy" // lalr1.cc:859 +#line 462 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1172 "d2_parser.cc" // lalr1.cc:859 +#line 1223 "d2_parser.cc" break; case 114: -#line 464 "d2_parser.yy" // lalr1.cc:859 +#line 464 "d2_parser.yy" { - if (yystack_[0].value.as< std::string > () == "") { + if (yystack_[0].value.as < std::string > () == "") { error(yystack_[1].location, "Ddns domain name cannot be blank"); } - ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1186 "d2_parser.cc" // lalr1.cc:859 +#line 1237 "d2_parser.cc" break; case 115: -#line 474 "d2_parser.yy" // lalr1.cc:859 +#line 474 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1194 "d2_parser.cc" // lalr1.cc:859 +#line 1245 "d2_parser.cc" break; case 116: -#line 476 "d2_parser.yy" // lalr1.cc:859 +#line 476 "d2_parser.yy" { - ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("key-name", name); ctx.leave(); } -#line 1205 "d2_parser.cc" // lalr1.cc:859 +#line 1256 "d2_parser.cc" break; case 117: -#line 486 "d2_parser.yy" // lalr1.cc:859 +#line 486 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dns-servers", l); ctx.stack_.push_back(l); ctx.enter(ctx.DNS_SERVERS); } -#line 1216 "d2_parser.cc" // lalr1.cc:859 +#line 1267 "d2_parser.cc" break; case 118: -#line 491 "d2_parser.yy" // lalr1.cc:859 +#line 491 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1225 "d2_parser.cc" // lalr1.cc:859 +#line 1276 "d2_parser.cc" break; case 119: -#line 496 "d2_parser.yy" // lalr1.cc:859 +#line 496 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 1234 "d2_parser.cc" // lalr1.cc:859 +#line 1285 "d2_parser.cc" break; case 120: -#line 499 "d2_parser.yy" // lalr1.cc:859 +#line 499 "d2_parser.yy" { // parsing completed } -#line 1242 "d2_parser.cc" // lalr1.cc:859 +#line 1293 "d2_parser.cc" break; case 123: -#line 507 "d2_parser.yy" // lalr1.cc:859 +#line 507 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1252 "d2_parser.cc" // lalr1.cc:859 +#line 1303 "d2_parser.cc" break; case 124: -#line 511 "d2_parser.yy" // lalr1.cc:859 +#line 511 "d2_parser.yy" { ctx.stack_.pop_back(); } -#line 1260 "d2_parser.cc" // lalr1.cc:859 +#line 1311 "d2_parser.cc" break; case 125: -#line 515 "d2_parser.yy" // lalr1.cc:859 +#line 515 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1269 "d2_parser.cc" // lalr1.cc:859 +#line 1320 "d2_parser.cc" break; case 126: -#line 518 "d2_parser.yy" // lalr1.cc:859 +#line 518 "d2_parser.yy" { // parsing completed } -#line 1277 "d2_parser.cc" // lalr1.cc:859 +#line 1328 "d2_parser.cc" break; case 135: -#line 534 "d2_parser.yy" // lalr1.cc:859 +#line 534 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1285 "d2_parser.cc" // lalr1.cc:859 +#line 1336 "d2_parser.cc" break; case 136: -#line 536 "d2_parser.yy" // lalr1.cc:859 +#line 536 "d2_parser.yy" { - if (yystack_[0].value.as< std::string > () != "") { + if (yystack_[0].value.as < std::string > () != "") { error(yystack_[1].location, "hostname is not yet supported"); } - ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname", name); ctx.leave(); } -#line 1299 "d2_parser.cc" // lalr1.cc:859 +#line 1350 "d2_parser.cc" break; case 137: -#line 546 "d2_parser.yy" // lalr1.cc:859 +#line 546 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1307 "d2_parser.cc" // lalr1.cc:859 +#line 1358 "d2_parser.cc" break; case 138: -#line 548 "d2_parser.yy" // lalr1.cc:859 +#line 548 "d2_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-address", s); ctx.leave(); } -#line 1317 "d2_parser.cc" // lalr1.cc:859 +#line 1368 "d2_parser.cc" break; case 139: -#line 554 "d2_parser.yy" // lalr1.cc:859 +#line 554 "d2_parser.yy" { - if (yystack_[0].value.as< int64_t > () <= 0 || yystack_[0].value.as< int64_t > () >= 65536 ) { + if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) { error(yystack_[0].location, "port must be greater than zero but less than 65536"); } - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", i); } -#line 1329 "d2_parser.cc" // lalr1.cc:859 +#line 1380 "d2_parser.cc" break; case 140: -#line 568 "d2_parser.yy" // lalr1.cc:859 +#line 568 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tsig-keys", l); ctx.stack_.push_back(l); ctx.enter(ctx.TSIG_KEYS); } -#line 1340 "d2_parser.cc" // lalr1.cc:859 +#line 1391 "d2_parser.cc" break; case 141: -#line 573 "d2_parser.yy" // lalr1.cc:859 +#line 573 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1349 "d2_parser.cc" // lalr1.cc:859 +#line 1400 "d2_parser.cc" break; case 142: -#line 578 "d2_parser.yy" // lalr1.cc:859 +#line 578 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 1358 "d2_parser.cc" // lalr1.cc:859 +#line 1409 "d2_parser.cc" break; case 143: -#line 581 "d2_parser.yy" // lalr1.cc:859 +#line 581 "d2_parser.yy" { // parsing completed } -#line 1366 "d2_parser.cc" // lalr1.cc:859 +#line 1417 "d2_parser.cc" break; case 148: -#line 593 "d2_parser.yy" // lalr1.cc:859 +#line 593 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1376 "d2_parser.cc" // lalr1.cc:859 +#line 1427 "d2_parser.cc" break; case 149: -#line 597 "d2_parser.yy" // lalr1.cc:859 +#line 597 "d2_parser.yy" { ctx.stack_.pop_back(); } -#line 1384 "d2_parser.cc" // lalr1.cc:859 +#line 1435 "d2_parser.cc" break; case 150: -#line 601 "d2_parser.yy" // lalr1.cc:859 +#line 601 "d2_parser.yy" { // Parse tsig key list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1394 "d2_parser.cc" // lalr1.cc:859 +#line 1445 "d2_parser.cc" break; case 151: -#line 605 "d2_parser.yy" // lalr1.cc:859 +#line 605 "d2_parser.yy" { // parsing completed } -#line 1402 "d2_parser.cc" // lalr1.cc:859 +#line 1453 "d2_parser.cc" break; case 161: -#line 623 "d2_parser.yy" // lalr1.cc:859 +#line 623 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1410 "d2_parser.cc" // lalr1.cc:859 +#line 1461 "d2_parser.cc" break; case 162: -#line 625 "d2_parser.yy" // lalr1.cc:859 +#line 625 "d2_parser.yy" { - if (yystack_[0].value.as< std::string > () == "") { + if (yystack_[0].value.as < std::string > () == "") { error(yystack_[1].location, "TSIG key name cannot be blank"); } - ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1424 "d2_parser.cc" // lalr1.cc:859 +#line 1475 "d2_parser.cc" break; case 163: -#line 635 "d2_parser.yy" // lalr1.cc:859 +#line 635 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1432 "d2_parser.cc" // lalr1.cc:859 +#line 1483 "d2_parser.cc" break; case 164: -#line 637 "d2_parser.yy" // lalr1.cc:859 +#line 637 "d2_parser.yy" { - if (yystack_[0].value.as< std::string > () == "") { + if (yystack_[0].value.as < std::string > () == "") { error(yystack_[1].location, "TSIG key algorithm cannot be blank"); } - ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("algorithm", elem); ctx.leave(); } -#line 1445 "d2_parser.cc" // lalr1.cc:859 +#line 1496 "d2_parser.cc" break; case 165: -#line 646 "d2_parser.yy" // lalr1.cc:859 +#line 646 "d2_parser.yy" { - if (yystack_[0].value.as< int64_t > () < 0 || (yystack_[0].value.as< int64_t > () > 0 && (yystack_[0].value.as< int64_t > () % 8 != 0))) { + if (yystack_[0].value.as < int64_t > () < 0 || (yystack_[0].value.as < int64_t > () > 0 && (yystack_[0].value.as < int64_t > () % 8 != 0))) { error(yystack_[0].location, "TSIG key digest-bits must either be zero or a positive, multiple of eight"); } - ElementPtr elem(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("digest-bits", elem); } -#line 1457 "d2_parser.cc" // lalr1.cc:859 +#line 1508 "d2_parser.cc" break; case 166: -#line 654 "d2_parser.yy" // lalr1.cc:859 +#line 654 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1465 "d2_parser.cc" // lalr1.cc:859 +#line 1516 "d2_parser.cc" break; case 167: -#line 656 "d2_parser.yy" // lalr1.cc:859 +#line 656 "d2_parser.yy" { - if (yystack_[0].value.as< std::string > () == "") { + if (yystack_[0].value.as < std::string > () == "") { error(yystack_[1].location, "TSIG key secret cannot be blank"); } - ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("secret", elem); ctx.leave(); } -#line 1478 "d2_parser.cc" // lalr1.cc:859 +#line 1529 "d2_parser.cc" break; case 168: -#line 669 "d2_parser.yy" // lalr1.cc:859 +#line 669 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1486 "d2_parser.cc" // lalr1.cc:859 +#line 1537 "d2_parser.cc" break; case 169: -#line 671 "d2_parser.yy" // lalr1.cc:859 +#line 671 "d2_parser.yy" { - ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1495 "d2_parser.cc" // lalr1.cc:859 +#line 1546 "d2_parser.cc" break; case 170: -#line 676 "d2_parser.yy" // lalr1.cc:859 +#line 676 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1503 "d2_parser.cc" // lalr1.cc:859 +#line 1554 "d2_parser.cc" break; case 171: -#line 678 "d2_parser.yy" // lalr1.cc:859 +#line 678 "d2_parser.yy" { - ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1512 "d2_parser.cc" // lalr1.cc:859 +#line 1563 "d2_parser.cc" break; case 172: -#line 683 "d2_parser.yy" // lalr1.cc:859 +#line 683 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1520 "d2_parser.cc" // lalr1.cc:859 +#line 1571 "d2_parser.cc" break; case 173: -#line 685 "d2_parser.yy" // lalr1.cc:859 +#line 685 "d2_parser.yy" { - ctx.stack_.back()->set("Control-agent", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1529 "d2_parser.cc" // lalr1.cc:859 +#line 1580 "d2_parser.cc" break; case 174: -#line 695 "d2_parser.yy" // lalr1.cc:859 +#line 695 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("Logging", m); ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 1540 "d2_parser.cc" // lalr1.cc:859 +#line 1591 "d2_parser.cc" break; case 175: -#line 700 "d2_parser.yy" // lalr1.cc:859 +#line 700 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1549 "d2_parser.cc" // lalr1.cc:859 +#line 1600 "d2_parser.cc" break; case 179: -#line 717 "d2_parser.yy" // lalr1.cc:859 +#line 717 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 1560 "d2_parser.cc" // lalr1.cc:859 +#line 1611 "d2_parser.cc" break; case 180: -#line 722 "d2_parser.yy" // lalr1.cc:859 +#line 722 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1569 "d2_parser.cc" // lalr1.cc:859 +#line 1620 "d2_parser.cc" break; case 183: -#line 734 "d2_parser.yy" // lalr1.cc:859 +#line 734 "d2_parser.yy" { ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 1579 "d2_parser.cc" // lalr1.cc:859 +#line 1630 "d2_parser.cc" break; case 184: -#line 738 "d2_parser.yy" // lalr1.cc:859 +#line 738 "d2_parser.yy" { ctx.stack_.pop_back(); } -#line 1587 "d2_parser.cc" // lalr1.cc:859 +#line 1638 "d2_parser.cc" break; case 194: -#line 755 "d2_parser.yy" // lalr1.cc:859 +#line 755 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1595 "d2_parser.cc" // lalr1.cc:859 +#line 1646 "d2_parser.cc" break; case 195: -#line 757 "d2_parser.yy" // lalr1.cc:859 +#line 757 "d2_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1605 "d2_parser.cc" // lalr1.cc:859 +#line 1656 "d2_parser.cc" break; case 196: -#line 763 "d2_parser.yy" // lalr1.cc:859 +#line 763 "d2_parser.yy" { - ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 1614 "d2_parser.cc" // lalr1.cc:859 +#line 1665 "d2_parser.cc" break; case 197: -#line 767 "d2_parser.yy" // lalr1.cc:859 +#line 767 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1622 "d2_parser.cc" // lalr1.cc:859 +#line 1673 "d2_parser.cc" break; case 198: -#line 769 "d2_parser.yy" // lalr1.cc:859 +#line 769 "d2_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 1632 "d2_parser.cc" // lalr1.cc:859 +#line 1683 "d2_parser.cc" break; case 199: -#line 775 "d2_parser.yy" // lalr1.cc:859 +#line 775 "d2_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 1643 "d2_parser.cc" // lalr1.cc:859 +#line 1694 "d2_parser.cc" break; case 200: -#line 780 "d2_parser.yy" // lalr1.cc:859 +#line 780 "d2_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1652 "d2_parser.cc" // lalr1.cc:859 +#line 1703 "d2_parser.cc" break; case 203: -#line 789 "d2_parser.yy" // lalr1.cc:859 +#line 789 "d2_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1662 "d2_parser.cc" // lalr1.cc:859 +#line 1713 "d2_parser.cc" break; case 204: -#line 793 "d2_parser.yy" // lalr1.cc:859 +#line 793 "d2_parser.yy" { ctx.stack_.pop_back(); } -#line 1670 "d2_parser.cc" // lalr1.cc:859 +#line 1721 "d2_parser.cc" break; case 211: -#line 807 "d2_parser.yy" // lalr1.cc:859 +#line 807 "d2_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1678 "d2_parser.cc" // lalr1.cc:859 +#line 1729 "d2_parser.cc" break; case 212: -#line 809 "d2_parser.yy" // lalr1.cc:859 +#line 809 "d2_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 1688 "d2_parser.cc" // lalr1.cc:859 +#line 1739 "d2_parser.cc" break; case 213: -#line 815 "d2_parser.yy" // lalr1.cc:859 +#line 815 "d2_parser.yy" { - ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 1697 "d2_parser.cc" // lalr1.cc:859 +#line 1748 "d2_parser.cc" break; case 214: -#line 820 "d2_parser.yy" // lalr1.cc:859 +#line 820 "d2_parser.yy" { - ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 1706 "d2_parser.cc" // lalr1.cc:859 +#line 1757 "d2_parser.cc" break; case 215: -#line 825 "d2_parser.yy" // lalr1.cc:859 +#line 825 "d2_parser.yy" { - ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 1715 "d2_parser.cc" // lalr1.cc:859 +#line 1766 "d2_parser.cc" break; -#line 1719 "d2_parser.cc" // lalr1.cc:859 +#line 1770 "d2_parser.cc" + default: break; } } +#if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); YYERROR; } +#endif // YY_EXCEPTIONS YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; YY_STACK_PRINT (); // Shift the result of the reduction. - yypush_ (YY_NULLPTR, yylhs); + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ @@ -1771,19 +1827,18 @@ namespace isc { namespace d2 { | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ if (false) - goto yyerrorlab; - yyerror_range[1].location = yystack_[yylen - 1].location; + YYERROR; + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); yylen = 0; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ @@ -1820,20 +1875,30 @@ namespace isc { namespace d2 { // Shift the error token. error_token.state = yyn; - yypush_ ("Shifting", error_token); + yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; - // Accept. + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; - // Abort. + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ yyreturn: if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); @@ -1849,12 +1914,12 @@ namespace isc { namespace d2 { return yyresult; } +#if YY_EXCEPTIONS catch (...) { - YYCDEBUG << "Exception caught: cleaning lookahead and stack" - << std::endl; + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; // Do not try to display the values of the reclaimed symbols, - // as their printer might throw an exception. + // as their printers might throw an exception. if (!yyla.empty ()) yy_destroy_ (YY_NULLPTR, yyla); @@ -1865,12 +1930,13 @@ namespace isc { namespace d2 { } throw; } +#endif // YY_EXCEPTIONS } void D2Parser::error (const syntax_error& yyexc) { - error (yyexc.location, yyexc.what()); + error (yyexc.location, yyexc.what ()); } // Generate an error message. @@ -1946,12 +2012,13 @@ namespace isc { namespace d2 { case N: \ yyformat = S; \ break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); + default: // Avoid compiler warnings. + YYCASE_ (0, YY_("syntax error")); + YYCASE_ (1, YY_("syntax error, unexpected %s")); + YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } @@ -1974,7 +2041,7 @@ namespace isc { namespace d2 { const signed char D2Parser::yytable_ninf_ = -1; - const short int + const short D2Parser::yypact_[] = { 47, -90, -90, -90, -90, -90, -90, -90, -90, -90, @@ -2075,7 +2142,7 @@ namespace isc { namespace d2 { -90, -90, -89, -90, -90, -90, -90, -90 }; - const short int + const short D2Parser::yydefgoto_[] = { -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, @@ -2094,7 +2161,7 @@ namespace isc { namespace d2 { 334, 341, 342, 343, 348, 344, 345, 346 }; - const unsigned short int + const unsigned short D2Parser::yytable_[] = { 70, 106, 105, 122, 121, 137, 136, 21, 32, 22, @@ -2128,7 +2195,7 @@ namespace isc { namespace d2 { 0, 0, 309 }; - const short int + const short D2Parser::yycheck_[] = { 50, 52, 52, 54, 54, 56, 56, 5, 7, 7, @@ -2310,7 +2377,7 @@ namespace isc { namespace d2 { }; #if D2_PARSER_DEBUG - const unsigned short int + const unsigned short D2Parser::yyrline_[] = { 0, 120, 120, 120, 121, 121, 122, 122, 123, 123, @@ -2347,18 +2414,18 @@ namespace isc { namespace d2 { i_end = yystack_.end (); i != i_end; ++i) *yycdebug_ << ' ' << i->state; - *yycdebug_ << std::endl; + *yycdebug_ << '\n'; } // Report on the debug stream that the rule \a yyrule is going to be reduced. void D2Parser::yy_reduce_print_ (int yyrule) { - unsigned int yylno = yyrline_[yyrule]; + unsigned yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 - << " (line " << yylno << "):" << std::endl; + << " (line " << yylno << "):\n"; // The symbols being reduced. for (int yyi = 0; yyi < yynrhs; yyi++) YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", @@ -2367,10 +2434,11 @@ namespace isc { namespace d2 { #endif // D2_PARSER_DEBUG -#line 14 "d2_parser.yy" // lalr1.cc:1167 +#line 14 "d2_parser.yy" } } // isc::d2 -#line 2373 "d2_parser.cc" // lalr1.cc:1167 -#line 830 "d2_parser.yy" // lalr1.cc:1168 +#line 2440 "d2_parser.cc" + +#line 830 "d2_parser.yy" void diff --git a/src/bin/d2/d2_parser.h b/src/bin/d2/d2_parser.h index 41df8d11ba..82ebdbb3f3 100644 --- a/src/bin/d2/d2_parser.h +++ b/src/bin/d2/d2_parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. + /** ** \file d2_parser.h ** Define the isc::d2::parser class. @@ -37,10 +38,13 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. +// Undocumented macros, especially those whose name start with YY_, +// are private implementation details. Do not rely on them. + #ifndef YY_D2_PARSER_D2_PARSER_H_INCLUDED # define YY_D2_PARSER_D2_PARSER_H_INCLUDED // // "%code requires" blocks. -#line 17 "d2_parser.yy" // lalr1.cc:377 +#line 17 "d2_parser.yy" #include #include @@ -52,7 +56,7 @@ using namespace isc::d2; using namespace isc::data; using namespace std; -#line 56 "d2_parser.h" // lalr1.cc:377 +#line 60 "d2_parser.h" # include # include // std::abort @@ -60,7 +64,43 @@ using namespace std; # include # include # include -# include "stack.hh" + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif # include "location.hh" #include #ifndef YYASSERT @@ -87,15 +127,6 @@ using namespace std; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -103,7 +134,7 @@ using namespace std; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -122,6 +153,18 @@ using namespace std; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + /* Debug traces. */ #ifndef D2_PARSER_DEBUG # if defined YYDEBUG @@ -135,120 +178,175 @@ using namespace std; # endif /* ! defined YYDEBUG */ #endif /* ! defined D2_PARSER_DEBUG */ -#line 14 "d2_parser.yy" // lalr1.cc:377 +#line 14 "d2_parser.yy" namespace isc { namespace d2 { -#line 141 "d2_parser.h" // lalr1.cc:377 +#line 184 "d2_parser.h" - /// A char[S] buffer to store and retrieve objects. + + /// A Bison parser. + class D2Parser + { + public: +#ifndef D2_PARSER_STYPE + /// 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 state. - template - struct variant + /// via the current parser state. + class semantic_type { + public: /// Type of *this. - typedef variant self_type; + typedef semantic_type self_type; /// Empty construction. - variant () - : yytypeid_ (YY_NULLPTR) + semantic_type () YY_NOEXCEPT + : yybuffer_ () + , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template - variant (const T& t) + semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= S); - new (yyas_ ()) T (t); + YYASSERT (sizeof (T) <= size); + new (yyas_ ()) T (YY_MOVE (t)); } /// Destruction, allowed only if empty. - ~variant () + ~semantic_type () YY_NOEXCEPT { YYASSERT (!yytypeid_); } +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + YYASSERT (!yytypeid_); + YYASSERT (sizeof (T) <= size); + yytypeid_ = & typeid (T); + return *new (yyas_ ()) T (std::forward (u)...); + } +# else /// Instantiate an empty \a T in here. template T& - build () + emplace () { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T; + return *new (yyas_ ()) T (); } /// Instantiate a \a T in here from \a t. template T& - build (const T& t) + emplace (const T& t) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } /// Accessor to a built \a T. template T& - as () + as () YY_NOEXCEPT { + YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& - as () const + as () const YY_NOEXCEPT { + YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } - /// Swap the content with \a other, of same type. + /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which - /// should not be the variant's responsability. + /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with - /// variant::move (). + /// self_type::move (). template void - swap (self_type& other) + swap (self_type& that) YY_NOEXCEPT { YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *other.yytypeid_); - std::swap (as (), other.as ()); + YYASSERT (*yytypeid_ == *that.yytypeid_); + std::swap (as (), that.as ()); } - /// Move the content of \a other to this. + /// Move the content of \a that to this. /// - /// Destroys \a other. + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. template void - move (self_type& other) + move (self_type&& that) { - build (); - swap (other); - other.destroy (); + emplace (std::move (that.as ())); + that.destroy (); } +#endif - /// Copy the content of \a other to this. + /// Copy the content of \a that to this. template void - copy (const self_type& other) + copy (const self_type& that) { - build (other.as ()); + emplace (that.as ()); } /// Destroy the stored \a T. @@ -262,13 +360,13 @@ namespace isc { namespace d2 { private: /// Prohibit blind copies. - self_type& operator=(const self_type&); - variant (const self_type&); + self_type& operator= (const self_type&); + semantic_type (const self_type&); /// Accessor to raw memory as \a T. template T* - yyas_ () + yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); @@ -277,53 +375,49 @@ namespace isc { namespace d2 { /// Const accessor to raw memory as \a T. template const T* - yyas_ () const + yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } - union - { - /// Strongest alignment constraints. - long double yyalign_me; - /// A buffer large enough to store any of the semantic values. - char yyraw[S]; - } yybuffer_; - - /// Whether the content is built: if defined, the name of the stored type. - const std::type_info *yytypeid_; - }; - - - /// A Bison parser. - class D2Parser - { - public: -#ifndef D2_PARSER_STYPE /// An auxiliary type to compute the largest semantic type. union union_type { // value // map_value // ncr_protocol_value - char dummy1[sizeof(ElementPtr)]; + char dummy1[sizeof (ElementPtr)]; // "boolean" - char dummy2[sizeof(bool)]; + char dummy2[sizeof (bool)]; // "floating point" - char dummy3[sizeof(double)]; + char dummy3[sizeof (double)]; // "integer" - char dummy4[sizeof(int64_t)]; + char dummy4[sizeof (int64_t)]; // "constant string" - char dummy5[sizeof(std::string)]; -}; + char dummy5[sizeof (std::string)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me; + /// A buffer large enough to store any of the semantic values. + char yyraw[size]; + } yybuffer_; + + /// Whether the content is built: if defined, the name of the stored type. + const std::type_info *yytypeid_; + }; - /// Symbol semantic values. - typedef variant semantic_type; #else typedef D2_PARSER_STYPE semantic_type; #endif @@ -333,7 +427,18 @@ namespace isc { namespace d2 { /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { - syntax_error (const location_type& l, const std::string& m); + syntax_error (const location_type& l, const std::string& m) + : std::runtime_error (m) + , location (l) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + , location (s.location) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + location_type location; }; @@ -415,7 +520,7 @@ namespace isc { namespace d2 { /// A complete symbol. /// /// Expects its Base type to provide access to the symbol type - /// via type_get(). + /// via type_get (). /// /// Provide access to semantic value and location. template @@ -425,39 +530,150 @@ namespace isc { namespace d2 { typedef Base super_type; /// Default constructor. - basic_symbol (); + basic_symbol () + : value () + , location () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that); +#endif /// Copy constructor. - basic_symbol (const basic_symbol& other); + basic_symbol (const basic_symbol& that); /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l) + : Base (t) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const location_type& l) + : Base (t) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif - basic_symbol (typename Base::kind_type t, const location_type& l); - - basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l); - - basic_symbol (typename Base::kind_type t, const bool v, const location_type& l); + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } - basic_symbol (typename Base::kind_type t, const double v, const location_type& l); + /// Destroy contents, and record that is empty. + void clear () + { + // User destructor. + symbol_number_type yytype = this->type_get (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yytype) + { + default: + break; + } + + // Type destructor. +switch (yytype) + { + case 68: // value + case 72: // map_value + case 96: // ncr_protocol_value + value.template destroy< ElementPtr > (); + break; - basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l); + case 56: // "boolean" + value.template destroy< bool > (); + break; - basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l); + case 55: // "floating point" + value.template destroy< double > (); + break; + case 54: // "integer" + value.template destroy< int64_t > (); + break; - /// Constructor for symbols with semantic value. - basic_symbol (typename Base::kind_type t, - const semantic_type& v, - const location_type& l); + case 53: // "constant string" + value.template destroy< std::string > (); + break; - /// Destroy the symbol. - ~basic_symbol (); + default: + break; + } - /// Destroy contents, and record that is empty. - void clear (); + Base::clear (); + } /// Whether empty. - bool empty () const; + bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); @@ -469,8 +685,10 @@ namespace isc { namespace d2 { location_type location; private: +#if YY_CPLUSPLUS < 201103L /// Assignment operator. - basic_symbol& operator= (const basic_symbol& other); + basic_symbol& operator= (const basic_symbol& that); +#endif }; /// Type access provider for token (enum) based symbols. @@ -479,8 +697,13 @@ namespace isc { namespace d2 { /// Default constructor. by_type (); +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_type (by_type&& that); +#endif + /// Copy constructor. - by_type (const by_type& other); + by_type (const by_type& that); /// The symbol type as needed by the constructor. typedef token_type kind_type; @@ -496,10 +719,10 @@ namespace isc { namespace d2 { /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The token. - token_type token () const; + token_type token () const YY_NOEXCEPT; /// The symbol type. /// \a empty_symbol when empty. @@ -508,234 +731,90 @@ namespace isc { namespace d2 { }; /// "External" symbols: returned by the scanner. - typedef basic_symbol symbol_type; - - // Symbol constructors declarations. - static inline - symbol_type - make_END (const location_type& l); - - static inline - symbol_type - make_COMMA (const location_type& l); - - static inline - symbol_type - make_COLON (const location_type& l); - - static inline - symbol_type - make_LSQUARE_BRACKET (const location_type& l); - - static inline - symbol_type - make_RSQUARE_BRACKET (const location_type& l); - - static inline - symbol_type - make_LCURLY_BRACKET (const location_type& l); - - static inline - symbol_type - make_RCURLY_BRACKET (const location_type& l); - - static inline - symbol_type - make_NULL_TYPE (const location_type& l); - - static inline - symbol_type - make_DHCP6 (const location_type& l); - - static inline - symbol_type - make_DHCP4 (const location_type& l); - - static inline - symbol_type - make_CONTROL_AGENT (const location_type& l); - - static inline - symbol_type - make_DHCPDDNS (const location_type& l); - - static inline - symbol_type - make_IP_ADDRESS (const location_type& l); - - static inline - symbol_type - make_PORT (const location_type& l); - - static inline - symbol_type - make_DNS_SERVER_TIMEOUT (const location_type& l); - - static inline - symbol_type - make_NCR_PROTOCOL (const location_type& l); - - static inline - symbol_type - make_UDP (const location_type& l); - - static inline - symbol_type - make_TCP (const location_type& l); - - static inline - symbol_type - make_NCR_FORMAT (const location_type& l); - - static inline - symbol_type - make_JSON (const location_type& l); - - static inline - symbol_type - make_USER_CONTEXT (const location_type& l); - - static inline - symbol_type - make_COMMENT (const location_type& l); - - static inline - symbol_type - make_FORWARD_DDNS (const location_type& l); - - static inline - symbol_type - make_REVERSE_DDNS (const location_type& l); - - static inline - symbol_type - make_DDNS_DOMAINS (const location_type& l); - - static inline - symbol_type - make_KEY_NAME (const location_type& l); - - static inline - symbol_type - make_DNS_SERVERS (const location_type& l); - - static inline - symbol_type - make_HOSTNAME (const location_type& l); - - static inline - symbol_type - make_TSIG_KEYS (const location_type& l); - - static inline - symbol_type - make_ALGORITHM (const location_type& l); - - static inline - symbol_type - make_DIGEST_BITS (const location_type& l); - - static inline - symbol_type - make_SECRET (const location_type& l); - - static inline - symbol_type - make_LOGGING (const location_type& l); - - static inline - symbol_type - make_LOGGERS (const location_type& l); - - static inline - symbol_type - make_NAME (const location_type& l); - - static inline - symbol_type - make_OUTPUT_OPTIONS (const location_type& l); - - static inline - symbol_type - make_OUTPUT (const location_type& l); - - static inline - symbol_type - make_DEBUGLEVEL (const location_type& l); - - static inline - symbol_type - make_SEVERITY (const location_type& l); - - static inline - symbol_type - make_FLUSH (const location_type& l); - - static inline - symbol_type - make_MAXSIZE (const location_type& l); - - static inline - symbol_type - make_MAXVER (const location_type& l); - - static inline - symbol_type - make_TOPLEVEL_JSON (const location_type& l); - - static inline - symbol_type - make_TOPLEVEL_DHCPDDNS (const location_type& l); - - static inline - symbol_type - make_SUB_DHCPDDNS (const location_type& l); - - static inline - symbol_type - make_SUB_TSIG_KEY (const location_type& l); - - static inline - symbol_type - make_SUB_TSIG_KEYS (const location_type& l); - - static inline - symbol_type - make_SUB_DDNS_DOMAIN (const location_type& l); - - static inline - symbol_type - make_SUB_DDNS_DOMAINS (const location_type& l); - - static inline - symbol_type - make_SUB_DNS_SERVER (const location_type& l); - - static inline - symbol_type - make_SUB_DNS_SERVERS (const location_type& l); - - static inline - symbol_type - make_STRING (const std::string& v, const location_type& l); - - static inline - symbol_type - make_INTEGER (const int64_t& v, const location_type& l); - - static inline - symbol_type - make_FLOAT (const double& v, const location_type& l); + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; - static inline - symbol_type - make_BOOLEAN (const bool& v, const location_type& l); + /// Empty symbol. + symbol_type () {} + /// 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)) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS); + } +#else + symbol_type (int tok, const location_type& l) + : super_type(token_type (tok), l) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_PORT || tok == token::TOKEN_DNS_SERVER_TIMEOUT || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_JSON || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_FORWARD_DDNS || tok == token::TOKEN_REVERSE_DDNS || tok == token::TOKEN_DDNS_DOMAINS || tok == token::TOKEN_KEY_NAME || tok == token::TOKEN_DNS_SERVERS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_TSIG_KEYS || tok == token::TOKEN_ALGORITHM || tok == token::TOKEN_DIGEST_BITS || tok == token::TOKEN_SECRET || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_NAME || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCPDDNS || tok == token::TOKEN_SUB_DHCPDDNS || tok == token::TOKEN_SUB_TSIG_KEY || tok == token::TOKEN_SUB_TSIG_KEYS || tok == token::TOKEN_SUB_DDNS_DOMAIN || tok == token::TOKEN_SUB_DDNS_DOMAINS || tok == token::TOKEN_SUB_DNS_SERVER || tok == token::TOKEN_SUB_DNS_SERVERS); + } +#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)) + { + YYASSERT (tok == token::TOKEN_BOOLEAN); + } +#else + symbol_type (int tok, const bool& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_FLOAT); + } +#else + symbol_type (int tok, const double& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_INTEGER); + } +#else + symbol_type (int tok, const int64_t& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#else + symbol_type (int tok, const std::string& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#endif + }; /// Build a parser object. D2Parser (isc::d2::D2ParserContext& ctx_yyarg); virtual ~D2Parser (); + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + /// Parse. /// \returns 0 iff parsing succeeded. virtual int parse (); @@ -762,43 +841,871 @@ namespace isc { namespace d2 { /// Report a syntax error. void error (const syntax_error& err); - private: - /// This class is not copyable. - D2Parser (const D2Parser&); - D2Parser& operator= (const D2Parser&); - - /// State numbers. - typedef int state_type; - - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; - - /// Compute post-reduction state. - /// \param yystate the current state - /// \param yysym the nonterminal to push on the stack - state_type yy_lr_goto_state_ (state_type yystate, int yysym); - - /// 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); - - /// 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 const signed char yypact_ninf_; - static const signed char yytable_ninf_; - - /// Convert a scanner token number \a t to a symbol number. - static token_number_type yytranslate_ (token_type t); - - // Tables. + // Implementation of make_symbol for each symbol type. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_END (location_type l) + { + return symbol_type (token::TOKEN_END, std::move (l)); + } +#else + static + symbol_type + make_END (const location_type& l) + { + return symbol_type (token::TOKEN_END, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMA (location_type l) + { + return symbol_type (token::TOKEN_COMMA, std::move (l)); + } +#else + static + symbol_type + make_COMMA (const location_type& l) + { + return symbol_type (token::TOKEN_COMMA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COLON (location_type l) + { + return symbol_type (token::TOKEN_COLON, std::move (l)); + } +#else + static + symbol_type + make_COLON (const location_type& l) + { + return symbol_type (token::TOKEN_COLON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NULL_TYPE (location_type l) + { + return symbol_type (token::TOKEN_NULL_TYPE, std::move (l)); + } +#else + static + symbol_type + make_NULL_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_NULL_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP6 (location_type l) + { + return symbol_type (token::TOKEN_DHCP6, std::move (l)); + } +#else + static + symbol_type + make_DHCP6 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4 (location_type l) + { + return symbol_type (token::TOKEN_DHCP4, std::move (l)); + } +#else + static + symbol_type + make_DHCP4 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_AGENT (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_AGENT (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCPDDNS (location_type l) + { + return symbol_type (token::TOKEN_DHCPDDNS, std::move (l)); + } +#else + static + symbol_type + make_DHCPDDNS (const location_type& l) + { + return symbol_type (token::TOKEN_DHCPDDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IP_ADDRESS (location_type l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l)); + } +#else + static + symbol_type + make_IP_ADDRESS (const location_type& l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PORT (location_type l) + { + return symbol_type (token::TOKEN_PORT, std::move (l)); + } +#else + static + symbol_type + make_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DNS_SERVER_TIMEOUT (location_type l) + { + return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, std::move (l)); + } +#else + static + symbol_type + make_DNS_SERVER_TIMEOUT (const location_type& l) + { + return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NCR_PROTOCOL (location_type l) + { + return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l)); + } +#else + static + symbol_type + make_NCR_PROTOCOL (const location_type& l) + { + return symbol_type (token::TOKEN_NCR_PROTOCOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UDP (location_type l) + { + return symbol_type (token::TOKEN_UDP, std::move (l)); + } +#else + static + symbol_type + make_UDP (const location_type& l) + { + return symbol_type (token::TOKEN_UDP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP (location_type l) + { + return symbol_type (token::TOKEN_TCP, std::move (l)); + } +#else + static + symbol_type + make_TCP (const location_type& l) + { + return symbol_type (token::TOKEN_TCP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NCR_FORMAT (location_type l) + { + return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l)); + } +#else + static + symbol_type + make_NCR_FORMAT (const location_type& l) + { + return symbol_type (token::TOKEN_NCR_FORMAT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_JSON (location_type l) + { + return symbol_type (token::TOKEN_JSON, std::move (l)); + } +#else + static + symbol_type + make_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER_CONTEXT (location_type l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l)); + } +#else + static + symbol_type + make_USER_CONTEXT (const location_type& l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMENT (location_type l) + { + return symbol_type (token::TOKEN_COMMENT, std::move (l)); + } +#else + static + symbol_type + make_COMMENT (const location_type& l) + { + return symbol_type (token::TOKEN_COMMENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FORWARD_DDNS (location_type l) + { + return symbol_type (token::TOKEN_FORWARD_DDNS, std::move (l)); + } +#else + static + symbol_type + make_FORWARD_DDNS (const location_type& l) + { + return symbol_type (token::TOKEN_FORWARD_DDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REVERSE_DDNS (location_type l) + { + return symbol_type (token::TOKEN_REVERSE_DDNS, std::move (l)); + } +#else + static + symbol_type + make_REVERSE_DDNS (const location_type& l) + { + return symbol_type (token::TOKEN_REVERSE_DDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DDNS_DOMAINS (location_type l) + { + return symbol_type (token::TOKEN_DDNS_DOMAINS, std::move (l)); + } +#else + static + symbol_type + make_DDNS_DOMAINS (const location_type& l) + { + return symbol_type (token::TOKEN_DDNS_DOMAINS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_KEY_NAME (location_type l) + { + return symbol_type (token::TOKEN_KEY_NAME, std::move (l)); + } +#else + static + symbol_type + make_KEY_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_KEY_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DNS_SERVERS (location_type l) + { + return symbol_type (token::TOKEN_DNS_SERVERS, std::move (l)); + } +#else + static + symbol_type + make_DNS_SERVERS (const location_type& l) + { + return symbol_type (token::TOKEN_DNS_SERVERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTNAME (location_type l) + { + return symbol_type (token::TOKEN_HOSTNAME, std::move (l)); + } +#else + static + symbol_type + make_HOSTNAME (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTNAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TSIG_KEYS (location_type l) + { + return symbol_type (token::TOKEN_TSIG_KEYS, std::move (l)); + } +#else + static + symbol_type + make_TSIG_KEYS (const location_type& l) + { + return symbol_type (token::TOKEN_TSIG_KEYS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALGORITHM (location_type l) + { + return symbol_type (token::TOKEN_ALGORITHM, std::move (l)); + } +#else + static + symbol_type + make_ALGORITHM (const location_type& l) + { + return symbol_type (token::TOKEN_ALGORITHM, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIGEST_BITS (location_type l) + { + return symbol_type (token::TOKEN_DIGEST_BITS, std::move (l)); + } +#else + static + symbol_type + make_DIGEST_BITS (const location_type& l) + { + return symbol_type (token::TOKEN_DIGEST_BITS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SECRET (location_type l) + { + return symbol_type (token::TOKEN_SECRET, std::move (l)); + } +#else + static + symbol_type + make_SECRET (const location_type& l) + { + return symbol_type (token::TOKEN_SECRET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGING (location_type l) + { + return symbol_type (token::TOKEN_LOGGING, std::move (l)); + } +#else + static + symbol_type + make_LOGGING (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGERS (location_type l) + { + return symbol_type (token::TOKEN_LOGGERS, std::move (l)); + } +#else + static + symbol_type + make_LOGGERS (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NAME (location_type l) + { + return symbol_type (token::TOKEN_NAME, std::move (l)); + } +#else + static + symbol_type + make_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT_OPTIONS (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT_OPTIONS (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEBUGLEVEL (location_type l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l)); + } +#else + static + symbol_type + make_DEBUGLEVEL (const location_type& l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SEVERITY (location_type l) + { + return symbol_type (token::TOKEN_SEVERITY, std::move (l)); + } +#else + static + symbol_type + make_SEVERITY (const location_type& l) + { + return symbol_type (token::TOKEN_SEVERITY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLUSH (location_type l) + { + return symbol_type (token::TOKEN_FLUSH, std::move (l)); + } +#else + static + symbol_type + make_FLUSH (const location_type& l) + { + return symbol_type (token::TOKEN_FLUSH, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXSIZE (location_type l) + { + return symbol_type (token::TOKEN_MAXSIZE, std::move (l)); + } +#else + static + symbol_type + make_MAXSIZE (const location_type& l) + { + return symbol_type (token::TOKEN_MAXSIZE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXVER (location_type l) + { + return symbol_type (token::TOKEN_MAXVER, std::move (l)); + } +#else + static + symbol_type + make_MAXVER (const location_type& l) + { + return symbol_type (token::TOKEN_MAXVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_JSON (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_DHCPDDNS (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_DHCPDDNS (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DHCPDDNS (location_type l) + { + return symbol_type (token::TOKEN_SUB_DHCPDDNS, std::move (l)); + } +#else + static + symbol_type + make_SUB_DHCPDDNS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DHCPDDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_TSIG_KEY (location_type l) + { + return symbol_type (token::TOKEN_SUB_TSIG_KEY, std::move (l)); + } +#else + static + symbol_type + make_SUB_TSIG_KEY (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_TSIG_KEY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_TSIG_KEYS (location_type l) + { + return symbol_type (token::TOKEN_SUB_TSIG_KEYS, std::move (l)); + } +#else + static + symbol_type + make_SUB_TSIG_KEYS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DDNS_DOMAIN (location_type l) + { + return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, std::move (l)); + } +#else + static + symbol_type + make_SUB_DDNS_DOMAIN (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DDNS_DOMAINS (location_type l) + { + return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, std::move (l)); + } +#else + static + symbol_type + make_SUB_DDNS_DOMAINS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DNS_SERVER (location_type l) + { + return symbol_type (token::TOKEN_SUB_DNS_SERVER, std::move (l)); + } +#else + static + symbol_type + make_SUB_DNS_SERVER (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DNS_SERVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DNS_SERVERS (location_type l) + { + return symbol_type (token::TOKEN_SUB_DNS_SERVERS, std::move (l)); + } +#else + static + symbol_type + make_SUB_DNS_SERVERS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v, location_type l) + { + return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_STRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_STRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTEGER (int64_t v, location_type l) + { + return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_INTEGER (const int64_t& v, const location_type& l) + { + return symbol_type (token::TOKEN_INTEGER, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v, location_type l) + { + return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_FLOAT (const double& v, const location_type& l) + { + return symbol_type (token::TOKEN_FLOAT, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BOOLEAN (bool v, location_type l) + { + return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_BOOLEAN (const bool& v, const location_type& l) + { + return symbol_type (token::TOKEN_BOOLEAN, v, l); + } +#endif + + + private: + /// This class is not copyable. + D2Parser (const D2Parser&); + D2Parser& operator= (const D2Parser&); + + /// State numbers. + typedef int state_type; + + /// Generate an error message. + /// \param yystate the state where the error occurred. + /// \param yyla the lookahead token. + virtual std::string yysyntax_error_ (state_type yystate, + const symbol_type& yyla) const; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// 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); + + /// 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 const signed char yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token number \a t to a symbol number. + static token_number_type yytranslate_ (token_type t); + + // Tables. // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing // STATE-NUM. - static const short int yypact_[]; + static const short yypact_[]; // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero @@ -809,14 +1716,14 @@ namespace isc { namespace d2 { static const signed char yypgoto_[]; // YYDEFGOTO[NTERM-NUM]. - static const short int yydefgoto_[]; + static const short yydefgoto_[]; // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. - static const unsigned short int yytable_[]; + static const unsigned short yytable_[]; - static const short int yycheck_[]; + static const short yycheck_[]; // YYSTOS[STATE-NUM] -- The (internal number of the) accessing // symbol of state STATE-NUM. @@ -837,14 +1744,15 @@ namespace isc { namespace d2 { static const char* const yytname_[]; #if D2_PARSER_DEBUG // YYRLINE[YYN] -- Source line where rule number YYN was defined. - static const unsigned short int yyrline_[]; + static const unsigned short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. virtual void yy_reduce_print_ (int r); /// Print the state stack on the debug stream. virtual void yystack_print_ (); - // Debugging. + /// Debugging level. int yydebug_; + /// Debug stream. std::ostream* yycdebug_; /// \brief Display a symbol type, value and location. @@ -866,26 +1774,26 @@ namespace isc { namespace d2 { struct by_state { /// Default constructor. - by_state (); + by_state () YY_NOEXCEPT; /// The symbol type as needed by the constructor. typedef state_type kind_type; /// Constructor. - by_state (kind_type s); + by_state (kind_type s) YY_NOEXCEPT; /// Copy constructor. - by_state (const by_state& other); + by_state (const by_state& that) YY_NOEXCEPT; /// Record that this symbol is empty. - void clear (); + void clear () YY_NOEXCEPT; /// Steal the symbol type from \a that. void move (by_state& that); /// The (internal) type number (corresponding to \a state). /// \a empty_symbol when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. enum { empty_state = -1 }; @@ -895,19 +1803,148 @@ namespace isc { namespace d2 { state_type state; }; - /// "Internal" symbol: element of the stack. - struct stack_symbol_type : basic_symbol - { - /// Superclass. - typedef basic_symbol super_type; - /// Construct an empty symbol. - stack_symbol_type (); - /// Steal the contents from \a sym to build this. - stack_symbol_type (state_type s, symbol_type& sym); - /// Assignment, needed by push_back. - stack_symbol_type& operator= (const stack_symbol_type& that); + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::reverse_iterator iterator; + typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::size_type size_type; + + stack (size_type n = 200) + : seq_ (n) + {} + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (size_type i) + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (int i) + { + return operator[] (size_type (i)); + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (size_type i) const + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (int i) const + { + return operator[] (size_type (i)); + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (int n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + size_type + size () const YY_NOEXCEPT + { + return seq_.size (); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.rbegin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.rend (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, int range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (int i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + int range_; + }; + + private: + stack (const stack&); + stack& operator= (const stack&); + /// The wrapped container. + S seq_; }; + /// Stack type. typedef stack stack_type; @@ -917,20 +1954,20 @@ namespace isc { namespace d2 { /// Push a new state on the stack. /// \param m a debug message to display /// if null, no trace is output. - /// \param s the symbol + /// \param sym the symbol /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, stack_symbol_type& s); + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); /// Push a new look ahead token on the state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param s the state /// \param sym the symbol (for its value and location). - /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, state_type s, symbol_type& sym); + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); - /// Pop \a n symbols the three stacks. - void yypop_ (unsigned int n = 1); + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); /// Constants. enum @@ -949,16 +1986,17 @@ namespace isc { namespace d2 { isc::d2::D2ParserContext& ctx; }; - // Symbol number corresponding to token number t. inline D2Parser::token_number_type D2Parser::yytranslate_ (token_type t) { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. static const token_number_type translate_table[] = { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -991,59 +2029,47 @@ namespace isc { namespace d2 { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 }; - const unsigned int user_token_number_max_ = 311; + const unsigned user_token_number_max_ = 311; const token_number_type undef_token_ = 2; - if (static_cast(t) <= yyeof_) + if (static_cast (t) <= yyeof_) return yyeof_; - else if (static_cast (t) <= user_token_number_max_) + else if (static_cast (t) <= user_token_number_max_) return translate_table[t]; else return undef_token_; } - inline - D2Parser::syntax_error::syntax_error (const location_type& l, const std::string& m) - : std::runtime_error (m) - , location (l) - {} - // basic_symbol. +#if 201103L <= YY_CPLUSPLUS template - inline - D2Parser::basic_symbol::basic_symbol () - : value () - {} - - template - inline - D2Parser::basic_symbol::basic_symbol (const basic_symbol& other) - : Base (other) + D2Parser::basic_symbol::basic_symbol (basic_symbol&& that) + : Base (std::move (that)) , value () - , location (other.location) + , location (std::move (that.location)) { - switch (other.type_get ()) + switch (this->type_get ()) { case 68: // value case 72: // map_value case 96: // ncr_protocol_value - value.copy< ElementPtr > (other.value); + value.move< ElementPtr > (std::move (that.value)); break; case 56: // "boolean" - value.copy< bool > (other.value); + value.move< bool > (std::move (that.value)); break; case 55: // "floating point" - value.copy< double > (other.value); + value.move< double > (std::move (that.value)); break; case 54: // "integer" - value.copy< int64_t > (other.value); + value.move< int64_t > (std::move (that.value)); break; case 53: // "constant string" - value.copy< std::string > (other.value); + value.move< std::string > (std::move (that.value)); break; default: @@ -1051,188 +2077,87 @@ namespace isc { namespace d2 { } } - +#endif template - inline - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l) - : Base (t) + D2Parser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) , value () - , location (l) + , location (that.location) { - (void) v; - switch (this->type_get ()) + switch (this->type_get ()) { case 68: // value case 72: // map_value case 96: // ncr_protocol_value - value.copy< ElementPtr > (v); + value.copy< ElementPtr > (YY_MOVE (that.value)); break; case 56: // "boolean" - value.copy< bool > (v); + value.copy< bool > (YY_MOVE (that.value)); break; case 55: // "floating point" - value.copy< double > (v); + value.copy< double > (YY_MOVE (that.value)); break; case 54: // "integer" - value.copy< int64_t > (v); + value.copy< int64_t > (YY_MOVE (that.value)); break; case 53: // "constant string" - value.copy< std::string > (v); + value.copy< std::string > (YY_MOVE (that.value)); break; default: break; } -} - - - // Implementation of basic_symbol constructor for each type. - - template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) - : Base (t) - , value () - , location (l) - {} - - template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const double v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - - template - inline - D2Parser::basic_symbol::~basic_symbol () - { - clear (); } - template - inline - void - D2Parser::basic_symbol::clear () - { - // User destructor. - symbol_number_type yytype = this->type_get (); - basic_symbol& yysym = *this; - (void) yysym; - switch (yytype) - { - default: - break; - } - - // Type destructor. - switch (yytype) - { - case 68: // value - case 72: // map_value - case 96: // ncr_protocol_value - value.template destroy< ElementPtr > (); - break; - - case 56: // "boolean" - value.template destroy< bool > (); - break; - - case 55: // "floating point" - value.template destroy< double > (); - break; - - case 54: // "integer" - value.template destroy< int64_t > (); - break; - - case 53: // "constant string" - value.template destroy< std::string > (); - break; - - default: - break; - } - Base::clear (); - } template - inline bool - D2Parser::basic_symbol::empty () const + D2Parser::basic_symbol::empty () const YY_NOEXCEPT { return Base::type_get () == empty_symbol; } template - inline void D2Parser::basic_symbol::move (basic_symbol& s) { - super_type::move(s); - switch (this->type_get ()) + super_type::move (s); + switch (this->type_get ()) { case 68: // value case 72: // map_value case 96: // ncr_protocol_value - value.move< ElementPtr > (s.value); + value.move< ElementPtr > (YY_MOVE (s.value)); break; case 56: // "boolean" - value.move< bool > (s.value); + value.move< bool > (YY_MOVE (s.value)); break; case 55: // "floating point" - value.move< double > (s.value); + value.move< double > (YY_MOVE (s.value)); break; case 54: // "integer" - value.move< int64_t > (s.value); + value.move< int64_t > (YY_MOVE (s.value)); break; case 53: // "constant string" - value.move< std::string > (s.value); + value.move< std::string > (YY_MOVE (s.value)); break; default: break; } - location = s.location; + location = YY_MOVE (s.location); } // by_type. @@ -1241,9 +2166,18 @@ namespace isc { namespace d2 { : type (empty_symbol) {} +#if 201103L <= YY_CPLUSPLUS + inline + D2Parser::by_type::by_type (by_type&& that) + : type (that.type) + { + that.clear (); + } +#endif + inline - D2Parser::by_type::by_type (const by_type& other) - : type (other.type) + D2Parser::by_type::by_type (const by_type& that) + : type (that.type) {} inline @@ -1268,19 +2202,19 @@ namespace isc { namespace d2 { inline int - D2Parser::by_type::type_get () const + D2Parser::by_type::type_get () const YY_NOEXCEPT { return type; } inline D2Parser::token_type - D2Parser::by_type::token () const + D2Parser::by_type::token () const YY_NOEXCEPT { // YYTOKNUM[NUM] -- (External) token number corresponding to the // (internal) symbol number NUM (which must be that of a token). */ static - const unsigned short int + const unsigned short yytoken_number_[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -1290,343 +2224,13 @@ namespace isc { namespace d2 { 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311 }; - return static_cast (yytoken_number_[type]); - } - // Implementation of make_symbol for each symbol type. - D2Parser::symbol_type - D2Parser::make_END (const location_type& l) - { - return symbol_type (token::TOKEN_END, l); - } - - D2Parser::symbol_type - D2Parser::make_COMMA (const location_type& l) - { - return symbol_type (token::TOKEN_COMMA, l); - } - - D2Parser::symbol_type - D2Parser::make_COLON (const location_type& l) - { - return symbol_type (token::TOKEN_COLON, l); - } - - D2Parser::symbol_type - D2Parser::make_LSQUARE_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_LSQUARE_BRACKET, l); - } - - D2Parser::symbol_type - D2Parser::make_RSQUARE_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_RSQUARE_BRACKET, l); - } - - D2Parser::symbol_type - D2Parser::make_LCURLY_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_LCURLY_BRACKET, l); - } - - D2Parser::symbol_type - D2Parser::make_RCURLY_BRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_RCURLY_BRACKET, l); - } - - D2Parser::symbol_type - D2Parser::make_NULL_TYPE (const location_type& l) - { - return symbol_type (token::TOKEN_NULL_TYPE, l); - } - - D2Parser::symbol_type - D2Parser::make_DHCP6 (const location_type& l) - { - return symbol_type (token::TOKEN_DHCP6, l); - } - - D2Parser::symbol_type - D2Parser::make_DHCP4 (const location_type& l) - { - return symbol_type (token::TOKEN_DHCP4, l); - } - - D2Parser::symbol_type - D2Parser::make_CONTROL_AGENT (const location_type& l) - { - return symbol_type (token::TOKEN_CONTROL_AGENT, l); - } - - D2Parser::symbol_type - D2Parser::make_DHCPDDNS (const location_type& l) - { - return symbol_type (token::TOKEN_DHCPDDNS, l); - } - - D2Parser::symbol_type - D2Parser::make_IP_ADDRESS (const location_type& l) - { - return symbol_type (token::TOKEN_IP_ADDRESS, l); + return token_type (yytoken_number_[type]); } - D2Parser::symbol_type - D2Parser::make_PORT (const location_type& l) - { - return symbol_type (token::TOKEN_PORT, l); - } - - D2Parser::symbol_type - D2Parser::make_DNS_SERVER_TIMEOUT (const location_type& l) - { - return symbol_type (token::TOKEN_DNS_SERVER_TIMEOUT, l); - } - - D2Parser::symbol_type - D2Parser::make_NCR_PROTOCOL (const location_type& l) - { - return symbol_type (token::TOKEN_NCR_PROTOCOL, l); - } - - D2Parser::symbol_type - D2Parser::make_UDP (const location_type& l) - { - return symbol_type (token::TOKEN_UDP, l); - } - - D2Parser::symbol_type - D2Parser::make_TCP (const location_type& l) - { - return symbol_type (token::TOKEN_TCP, l); - } - - D2Parser::symbol_type - D2Parser::make_NCR_FORMAT (const location_type& l) - { - return symbol_type (token::TOKEN_NCR_FORMAT, l); - } - - D2Parser::symbol_type - D2Parser::make_JSON (const location_type& l) - { - return symbol_type (token::TOKEN_JSON, l); - } - - D2Parser::symbol_type - D2Parser::make_USER_CONTEXT (const location_type& l) - { - return symbol_type (token::TOKEN_USER_CONTEXT, l); - } - - D2Parser::symbol_type - D2Parser::make_COMMENT (const location_type& l) - { - return symbol_type (token::TOKEN_COMMENT, l); - } - - D2Parser::symbol_type - D2Parser::make_FORWARD_DDNS (const location_type& l) - { - return symbol_type (token::TOKEN_FORWARD_DDNS, l); - } - - D2Parser::symbol_type - D2Parser::make_REVERSE_DDNS (const location_type& l) - { - return symbol_type (token::TOKEN_REVERSE_DDNS, l); - } - - D2Parser::symbol_type - D2Parser::make_DDNS_DOMAINS (const location_type& l) - { - return symbol_type (token::TOKEN_DDNS_DOMAINS, l); - } - - D2Parser::symbol_type - D2Parser::make_KEY_NAME (const location_type& l) - { - return symbol_type (token::TOKEN_KEY_NAME, l); - } - - D2Parser::symbol_type - D2Parser::make_DNS_SERVERS (const location_type& l) - { - return symbol_type (token::TOKEN_DNS_SERVERS, l); - } - - D2Parser::symbol_type - D2Parser::make_HOSTNAME (const location_type& l) - { - return symbol_type (token::TOKEN_HOSTNAME, l); - } - - D2Parser::symbol_type - D2Parser::make_TSIG_KEYS (const location_type& l) - { - return symbol_type (token::TOKEN_TSIG_KEYS, l); - } - - D2Parser::symbol_type - D2Parser::make_ALGORITHM (const location_type& l) - { - return symbol_type (token::TOKEN_ALGORITHM, l); - } - - D2Parser::symbol_type - D2Parser::make_DIGEST_BITS (const location_type& l) - { - return symbol_type (token::TOKEN_DIGEST_BITS, l); - } - - D2Parser::symbol_type - D2Parser::make_SECRET (const location_type& l) - { - return symbol_type (token::TOKEN_SECRET, l); - } - - D2Parser::symbol_type - D2Parser::make_LOGGING (const location_type& l) - { - return symbol_type (token::TOKEN_LOGGING, l); - } - - D2Parser::symbol_type - D2Parser::make_LOGGERS (const location_type& l) - { - return symbol_type (token::TOKEN_LOGGERS, l); - } - - D2Parser::symbol_type - D2Parser::make_NAME (const location_type& l) - { - return symbol_type (token::TOKEN_NAME, l); - } - - D2Parser::symbol_type - D2Parser::make_OUTPUT_OPTIONS (const location_type& l) - { - return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l); - } - - D2Parser::symbol_type - D2Parser::make_OUTPUT (const location_type& l) - { - return symbol_type (token::TOKEN_OUTPUT, l); - } - - D2Parser::symbol_type - D2Parser::make_DEBUGLEVEL (const location_type& l) - { - return symbol_type (token::TOKEN_DEBUGLEVEL, l); - } - - D2Parser::symbol_type - D2Parser::make_SEVERITY (const location_type& l) - { - return symbol_type (token::TOKEN_SEVERITY, l); - } - - D2Parser::symbol_type - D2Parser::make_FLUSH (const location_type& l) - { - return symbol_type (token::TOKEN_FLUSH, l); - } - - D2Parser::symbol_type - D2Parser::make_MAXSIZE (const location_type& l) - { - return symbol_type (token::TOKEN_MAXSIZE, l); - } - - D2Parser::symbol_type - D2Parser::make_MAXVER (const location_type& l) - { - return symbol_type (token::TOKEN_MAXVER, l); - } - - D2Parser::symbol_type - D2Parser::make_TOPLEVEL_JSON (const location_type& l) - { - return symbol_type (token::TOKEN_TOPLEVEL_JSON, l); - } - - D2Parser::symbol_type - D2Parser::make_TOPLEVEL_DHCPDDNS (const location_type& l) - { - return symbol_type (token::TOKEN_TOPLEVEL_DHCPDDNS, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_DHCPDDNS (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_DHCPDDNS, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_TSIG_KEY (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_TSIG_KEY, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_TSIG_KEYS (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_TSIG_KEYS, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_DDNS_DOMAIN (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_DDNS_DOMAIN, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_DDNS_DOMAINS (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_DDNS_DOMAINS, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_DNS_SERVER (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_DNS_SERVER, l); - } - - D2Parser::symbol_type - D2Parser::make_SUB_DNS_SERVERS (const location_type& l) - { - return symbol_type (token::TOKEN_SUB_DNS_SERVERS, l); - } - - D2Parser::symbol_type - D2Parser::make_STRING (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_STRING, v, l); - } - - D2Parser::symbol_type - D2Parser::make_INTEGER (const int64_t& v, const location_type& l) - { - return symbol_type (token::TOKEN_INTEGER, v, l); - } - - D2Parser::symbol_type - D2Parser::make_FLOAT (const double& v, const location_type& l) - { - return symbol_type (token::TOKEN_FLOAT, v, l); - } - - D2Parser::symbol_type - D2Parser::make_BOOLEAN (const bool& v, const location_type& l) - { - return symbol_type (token::TOKEN_BOOLEAN, v, l); - } - - -#line 14 "d2_parser.yy" // lalr1.cc:377 +#line 14 "d2_parser.yy" } } // isc::d2 -#line 1630 "d2_parser.h" // lalr1.cc:377 +#line 2233 "d2_parser.h" + diff --git a/src/bin/d2/kea-dhcp-ddns.xml b/src/bin/d2/kea-dhcp-ddns.xml index f127c8d5b6..4f0632d61b 100644 --- a/src/bin/d2/kea-dhcp-ddns.xml +++ b/src/bin/d2/kea-dhcp-ddns.xml @@ -10,8 +10,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin @@ -35,7 +35,7 @@ - 2013-2018 + 2013-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/d2/location.hh b/src/bin/d2/location.hh index f7cd2a53f0..d7bf0006c4 100644 --- a/src/bin/d2/location.hh +++ b/src/bin/d2/location.hh @@ -1,9 +1,9 @@ -// Generated 201804111443 -// A Bison parser, made by GNU Bison 3.0.4. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -39,12 +39,146 @@ #ifndef YY_D2_PARSER_LOCATION_HH_INCLUDED # define YY_D2_PARSER_LOCATION_HH_INCLUDED -# include "position.hh" +# include // std::max +# include +# include -#line 14 "d2_parser.yy" // location.cc:296 +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +#line 14 "d2_parser.yy" namespace isc { namespace d2 { -#line 46 "location.hh" // location.cc:296 - /// Abstract a location. +#line 60 "location.hh" + + /// A point in a source file. + class position + { + public: + /// Construct a position. + explicit position (std::string* f = YY_NULLPTR, + unsigned l = 1u, + unsigned c = 1u) + : filename (f) + , line (l) + , column (c) + {} + + + /// Initialization. + void initialize (std::string* fn = YY_NULLPTR, + unsigned l = 1u, + unsigned c = 1u) + { + filename = fn; + line = l; + column = c; + } + + /** \name Line and Column related manipulators + ** \{ */ + /// (line related) Advance to the COUNT next lines. + void lines (int count = 1) + { + if (count) + { + column = 1u; + line = add_ (line, count, 1); + } + } + + /// (column related) Advance to the COUNT next columns. + void columns (int count = 1) + { + column = add_ (column, count, 1); + } + /** \} */ + + /// File name to which this position refers. + std::string* filename; + /// Current line number. + unsigned line; + /// Current column number. + unsigned column; + + private: + /// Compute max (min, lhs+rhs). + static unsigned add_ (unsigned lhs, int rhs, int min) + { + return static_cast (std::max (min, + static_cast (lhs) + rhs)); + } + }; + + /// Add \a width columns, in place. + inline position& + operator+= (position& res, int width) + { + res.columns (width); + return res; + } + + /// Add \a width columns. + inline position + operator+ (position res, int width) + { + return res += width; + } + + /// Subtract \a width columns, in place. + inline position& + operator-= (position& res, int width) + { + return res += -width; + } + + /// Subtract \a width columns. + inline position + operator- (position res, int width) + { + return res -= width; + } + + /// Compare two position objects. + inline bool + operator== (const position& pos1, const position& pos2) + { + return (pos1.line == pos2.line + && pos1.column == pos2.column + && (pos1.filename == pos2.filename + || (pos1.filename && pos2.filename + && *pos1.filename == *pos2.filename))); + } + + /// Compare two position objects. + inline bool + operator!= (const position& pos1, const position& pos2) + { + return !(pos1 == pos2); + } + + /** \brief Intercept output stream redirection. + ** \param ostr the destination output stream + ** \param pos a reference to the position to redirect + */ + template + std::basic_ostream& + operator<< (std::basic_ostream& ostr, const position& pos) + { + if (pos.filename) + ostr << *pos.filename << ':'; + return ostr << pos.line << '.' << pos.column; + } + + /// Two points in a source file. class location { public: @@ -53,30 +187,27 @@ namespace isc { namespace d2 { location (const position& b, const position& e) : begin (b) , end (e) - { - } + {} /// Construct a 0-width location in \a p. explicit location (const position& p = position ()) : begin (p) , end (p) - { - } + {} /// Construct a 0-width location in \a f, \a l, \a c. explicit location (std::string* f, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) : begin (f, l, c) , end (f, l, c) - { - } + {} /// Initialization. void initialize (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) { begin.initialize (f, l, c); end = begin; @@ -171,10 +302,10 @@ namespace isc { namespace d2 { ** Avoid duplicate information. */ template - inline std::basic_ostream& + std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -187,7 +318,8 @@ namespace isc { namespace d2 { return ostr; } -#line 14 "d2_parser.yy" // location.cc:296 +#line 14 "d2_parser.yy" } } // isc::d2 -#line 192 "location.hh" // location.cc:296 +#line 323 "location.hh" + #endif // !YY_D2_PARSER_LOCATION_HH_INCLUDED diff --git a/src/bin/d2/position.hh b/src/bin/d2/position.hh index 7b8f536e7a..23536ce47f 100644 --- a/src/bin/d2/position.hh +++ b/src/bin/d2/position.hh @@ -1,181 +1,12 @@ -// Generated 201804111443 -// A Bison parser, made by GNU Bison 3.0.4. - -// Positions for Bison parsers in C++ - -// Copyright (C) 2002-2015 Free Software Foundation, Inc. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// As a special exception, you may create a larger work that contains -// part or all of the Bison parser skeleton and distribute that work -// under terms of your choice, so long as that work isn't itself a -// parser generator using the skeleton or a modified version thereof -// as a parser skeleton. Alternatively, if you modify or redistribute -// the parser skeleton itself, you may (at your option) remove this -// special exception, which will cause the skeleton and the resulting -// Bison output files to be licensed under the GNU General Public -// License without this special exception. - -// This special exception was added by the Free Software Foundation in -// version 2.2 of Bison. - -/** - ** \file position.hh - ** Define the isc::d2::position class. - */ - -#ifndef YY_D2_PARSER_POSITION_HH_INCLUDED -# define YY_D2_PARSER_POSITION_HH_INCLUDED - -# include // std::max -# include -# include - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -#line 14 "d2_parser.yy" // location.cc:296 -namespace isc { namespace d2 { -#line 56 "position.hh" // location.cc:296 - /// Abstract a position. - class position - { - public: - /// Construct a position. - explicit position (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) - : filename (f) - , line (l) - , column (c) - { - } - - - /// Initialization. - void initialize (std::string* fn = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) - { - filename = fn; - line = l; - column = c; - } - - /** \name Line and Column related manipulators - ** \{ */ - /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) - { - if (count) - { - column = 1u; - line = add_ (line, count, 1); - } - } - - /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) - { - column = add_ (column, count, 1); - } - /** \} */ - - /// File name to which this position refers. - std::string* filename; - /// Current line number. - unsigned int line; - /// Current column number. - unsigned int column; - - private: - /// Compute max(min, lhs+rhs) (provided min <= lhs). - static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min) - { - return (0 < rhs || -static_cast(rhs) < lhs - ? rhs + lhs - : min); - } - }; - - /// Add \a width columns, in place. - inline position& - operator+= (position& res, int width) - { - res.columns (width); - return res; - } - - /// Add \a width columns. - inline position - operator+ (position res, int width) - { - return res += width; - } - - /// Subtract \a width columns, in place. - inline position& - operator-= (position& res, int width) - { - return res += -width; - } - - /// Subtract \a width columns. - inline position - operator- (position res, int width) - { - return res -= width; - } - - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } - - /** \brief Intercept output stream redirection. - ** \param ostr the destination output stream - ** \param pos a reference to the position to redirect - */ - template - inline std::basic_ostream& - operator<< (std::basic_ostream& ostr, const position& pos) - { - if (pos.filename) - ostr << *pos.filename << ':'; - return ostr << pos.line << '.' << pos.column; - } - -#line 14 "d2_parser.yy" // location.cc:296 -} } // isc::d2 -#line 180 "position.hh" // location.cc:296 -#endif // !YY_D2_PARSER_POSITION_HH_INCLUDED +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. + +// Starting with Bison 3.2, this file is useless: the structure it +// used to define is now defined in "location.hh". +// +// To get rid of this file: +// 1. add 'require "3.2"' (or newer) to your grammar file +// 2. remove references to this file from your build system +// 3. if you used to include it, include "location.hh" instead. + +#include "location.hh" diff --git a/src/bin/d2/stack.hh b/src/bin/d2/stack.hh index 4569b5a695..b90e3e2e0c 100644 --- a/src/bin/d2/stack.hh +++ b/src/bin/d2/stack.hh @@ -1,158 +1,9 @@ -// Generated 201804111443 -// A Bison parser, made by GNU Bison 3.0.4. - -// Stack handling for Bison parsers in C++ - -// Copyright (C) 2002-2015 Free Software Foundation, Inc. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// As a special exception, you may create a larger work that contains -// part or all of the Bison parser skeleton and distribute that work -// under terms of your choice, so long as that work isn't itself a -// parser generator using the skeleton or a modified version thereof -// as a parser skeleton. Alternatively, if you modify or redistribute -// the parser skeleton itself, you may (at your option) remove this -// special exception, which will cause the skeleton and the resulting -// Bison output files to be licensed under the GNU General Public -// License without this special exception. - -// This special exception was added by the Free Software Foundation in -// version 2.2 of Bison. - -/** - ** \file stack.hh - ** Define the isc::d2::stack class. - */ - -#ifndef YY_D2_PARSER_STACK_HH_INCLUDED -# define YY_D2_PARSER_STACK_HH_INCLUDED - -# include - -#line 14 "d2_parser.yy" // stack.hh:132 -namespace isc { namespace d2 { -#line 46 "stack.hh" // stack.hh:132 - template > - class stack - { - public: - // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; - - stack () - : seq_ () - { - seq_.reserve (200); - } - - stack (unsigned int n) - : seq_ (n) - {} - - inline - T& - operator[] (unsigned int i) - { - return seq_[seq_.size () - 1 - i]; - } - - inline - const T& - operator[] (unsigned int i) const - { - return seq_[seq_.size () - 1 - i]; - } - - /// Steal the contents of \a t. - /// - /// Close to move-semantics. - inline - void - push (T& t) - { - seq_.push_back (T()); - operator[](0).move (t); - } - - inline - void - pop (unsigned int n = 1) - { - for (; n; --n) - seq_.pop_back (); - } - - void - clear () - { - seq_.clear (); - } - - inline - typename S::size_type - size () const - { - return seq_.size (); - } - - inline - const_iterator - begin () const - { - return seq_.rbegin (); - } - - inline - const_iterator - end () const - { - return seq_.rend (); - } - - private: - stack (const stack&); - stack& operator= (const stack&); - /// The wrapped container. - S seq_; - }; - - /// Present a slice of the top of a stack. - template > - class slice - { - public: - slice (const S& stack, unsigned int range) - : stack_ (stack) - , range_ (range) - {} - - inline - const T& - operator [] (unsigned int i) const - { - return stack_[range_ - i]; - } - - private: - const S& stack_; - unsigned int range_; - }; - -#line 14 "d2_parser.yy" // stack.hh:132 -} } // isc::d2 -#line 156 "stack.hh" // stack.hh:132 - -#endif // !YY_D2_PARSER_STACK_HH_INCLUDED +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. + +// Starting with Bison 3.2, this file is useless: the structure it +// used to define is now defined with the parser itself. +// +// To get rid of this file: +// 1. add 'require "3.2"' (or newer) to your grammar file +// 2. remove references to this file from your build system. diff --git a/src/bin/dhcp4/dhcp4_parser.cc b/src/bin/dhcp4/dhcp4_parser.cc index 86e372f89c..73905a98e2 100644 --- a/src/bin/dhcp4/dhcp4_parser.cc +++ b/src/bin/dhcp4/dhcp4_parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -43,11 +43,11 @@ // Unqualified %code blocks. -#line 34 "dhcp4_parser.yy" // lalr1.cc:438 +#line 34 "dhcp4_parser.yy" #include -#line 51 "dhcp4_parser.cc" // lalr1.cc:438 +#line 51 "dhcp4_parser.cc" #ifndef YY_ @@ -88,7 +88,7 @@ { \ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ } \ - while (/*CONSTCOND*/ false) + while (false) # endif @@ -140,9 +140,10 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "dhcp4_parser.yy" // lalr1.cc:513 +#line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 146 "dhcp4_parser.cc" // lalr1.cc:513 +#line 146 "dhcp4_parser.cc" + /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is @@ -154,7 +155,7 @@ namespace isc { namespace dhcp { { if (*yystr == '"') { - std::string yyr = ""; + std::string yyr; char const *yyp = yystr; for (;;) @@ -167,7 +168,10 @@ namespace isc { namespace dhcp { case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - // Fall through. + else + goto append; + + append: default: yyr += *yyp; break; @@ -195,6 +199,8 @@ namespace isc { namespace dhcp { Dhcp4Parser::~Dhcp4Parser () {} + Dhcp4Parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} /*---------------. | Symbol types. | @@ -203,16 +209,16 @@ namespace isc { namespace dhcp { // by_state. - Dhcp4Parser::by_state::by_state () + Dhcp4Parser::by_state::by_state () YY_NOEXCEPT : state (empty_state) {} - Dhcp4Parser::by_state::by_state (const by_state& other) - : state (other.state) + Dhcp4Parser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) {} void - Dhcp4Parser::by_state::clear () + Dhcp4Parser::by_state::clear () YY_NOEXCEPT { state = empty_state; } @@ -224,12 +230,12 @@ namespace isc { namespace dhcp { that.clear (); } - Dhcp4Parser::by_state::by_state (state_type s) + Dhcp4Parser::by_state::by_state (state_type s) YY_NOEXCEPT : state (s) {} Dhcp4Parser::symbol_number_type - Dhcp4Parser::by_state::type_get () const + Dhcp4Parser::by_state::type_get () const YY_NOEXCEPT { if (state == empty_state) return empty_symbol; @@ -276,7 +282,7 @@ namespace isc { namespace dhcp { break; } -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif @@ -322,7 +328,7 @@ namespace isc { namespace dhcp { that.type = empty_symbol; } -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L Dhcp4Parser::stack_symbol_type& Dhcp4Parser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -384,100 +390,89 @@ namespace isc { namespace dhcp { std::ostream& yyoutput = yyo; YYUSE (yyoutput); symbol_number_type yytype = yysym.type_get (); +#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 // Avoid a (spurious) G++ 4.8 warning about "array subscript is // below array bounds". if (yysym.empty ()) std::abort (); +#endif yyo << (yytype < yyntokens_ ? "token" : "nterm") << ' ' << yytname_[yytype] << " (" << yysym.location << ": "; switch (yytype) { - case 158: // "constant string" - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< std::string > (); } -#line 401 "dhcp4_parser.cc" // lalr1.cc:672 + case 158: // "constant string" +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 408 "dhcp4_parser.cc" break; case 159: // "integer" - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< int64_t > (); } -#line 408 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < int64_t > (); } +#line 414 "dhcp4_parser.cc" break; case 160: // "floating point" - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< double > (); } -#line 415 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < double > (); } +#line 420 "dhcp4_parser.cc" break; case 161: // "boolean" - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< bool > (); } -#line 422 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < bool > (); } +#line 426 "dhcp4_parser.cc" break; case 177: // value - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 429 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 432 "dhcp4_parser.cc" break; case 181: // map_value - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 436 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 438 "dhcp4_parser.cc" break; case 219: // socket_type - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 443 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 444 "dhcp4_parser.cc" break; case 222: // outbound_interface_value - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 450 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 450 "dhcp4_parser.cc" break; case 238: // db_type - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 457 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 456 "dhcp4_parser.cc" break; case 323: // hr_mode - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 464 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 462 "dhcp4_parser.cc" break; case 471: // ncr_protocol_value - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 471 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 468 "dhcp4_parser.cc" break; case 479: // replace_client_name_value - -#line 236 "dhcp4_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 478 "dhcp4_parser.cc" // lalr1.cc:672 +#line 236 "dhcp4_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 474 "dhcp4_parser.cc" break; - default: break; } @@ -496,7 +491,7 @@ namespace isc { namespace dhcp { void Dhcp4Parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) { -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS yypush_ (m, stack_symbol_type (s, std::move (sym))); #else stack_symbol_type ss (s, sym); @@ -600,17 +595,22 @@ namespace isc { namespace dhcp { yystack_.clear (); yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); - // A new symbol was pushed on the stack. + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; // Accept? if (yystack_[0].state == yyfinal_) - goto yyacceptlab; + YYACCEPT; goto yybackup; - // Backup. + + /*-----------. + | yybackup. | + `-----------*/ yybackup: // Try to take a decision without lookahead. yyn = yypact_[yystack_[0].state]; @@ -631,6 +631,7 @@ namespace isc { namespace dhcp { #if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); goto yyerrlab1; } @@ -662,6 +663,7 @@ namespace isc { namespace dhcp { yypush_ ("Shifting", yyn, YY_MOVE (yyla)); goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -671,8 +673,9 @@ namespace isc { namespace dhcp { goto yyerrlab; goto yyreduce; + /*-----------------------------. - | yyreduce -- Do a reduction. | + | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: yylen = yyr2_[yyn]; @@ -718,8 +721,8 @@ namespace isc { namespace dhcp { // Default location. { - slice slice (yystack_, yylen); - YYLLOC_DEFAULT (yylhs.location, slice, yylen); + stack_type::slice range (yystack_, yylen); + YYLLOC_DEFAULT (yylhs.location, range, yylen); yyerror_range[1].location = yylhs.location; } @@ -732,274 +735,274 @@ namespace isc { namespace dhcp { switch (yyn) { case 2: -#line 245 "dhcp4_parser.yy" // lalr1.cc:907 +#line 245 "dhcp4_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 738 "dhcp4_parser.cc" // lalr1.cc:907 +#line 741 "dhcp4_parser.cc" break; case 4: -#line 246 "dhcp4_parser.yy" // lalr1.cc:907 +#line 246 "dhcp4_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 744 "dhcp4_parser.cc" // lalr1.cc:907 +#line 747 "dhcp4_parser.cc" break; case 6: -#line 247 "dhcp4_parser.yy" // lalr1.cc:907 +#line 247 "dhcp4_parser.yy" { ctx.ctx_ = ctx.DHCP4; } -#line 750 "dhcp4_parser.cc" // lalr1.cc:907 +#line 753 "dhcp4_parser.cc" break; case 8: -#line 248 "dhcp4_parser.yy" // lalr1.cc:907 +#line 248 "dhcp4_parser.yy" { ctx.ctx_ = ctx.INTERFACES_CONFIG; } -#line 756 "dhcp4_parser.cc" // lalr1.cc:907 +#line 759 "dhcp4_parser.cc" break; case 10: -#line 249 "dhcp4_parser.yy" // lalr1.cc:907 +#line 249 "dhcp4_parser.yy" { ctx.ctx_ = ctx.SUBNET4; } -#line 762 "dhcp4_parser.cc" // lalr1.cc:907 +#line 765 "dhcp4_parser.cc" break; case 12: -#line 250 "dhcp4_parser.yy" // lalr1.cc:907 +#line 250 "dhcp4_parser.yy" { ctx.ctx_ = ctx.POOLS; } -#line 768 "dhcp4_parser.cc" // lalr1.cc:907 +#line 771 "dhcp4_parser.cc" break; case 14: -#line 251 "dhcp4_parser.yy" // lalr1.cc:907 +#line 251 "dhcp4_parser.yy" { ctx.ctx_ = ctx.RESERVATIONS; } -#line 774 "dhcp4_parser.cc" // lalr1.cc:907 +#line 777 "dhcp4_parser.cc" break; case 16: -#line 252 "dhcp4_parser.yy" // lalr1.cc:907 +#line 252 "dhcp4_parser.yy" { ctx.ctx_ = ctx.DHCP4; } -#line 780 "dhcp4_parser.cc" // lalr1.cc:907 +#line 783 "dhcp4_parser.cc" break; case 18: -#line 253 "dhcp4_parser.yy" // lalr1.cc:907 +#line 253 "dhcp4_parser.yy" { ctx.ctx_ = ctx.OPTION_DEF; } -#line 786 "dhcp4_parser.cc" // lalr1.cc:907 +#line 789 "dhcp4_parser.cc" break; case 20: -#line 254 "dhcp4_parser.yy" // lalr1.cc:907 +#line 254 "dhcp4_parser.yy" { ctx.ctx_ = ctx.OPTION_DATA; } -#line 792 "dhcp4_parser.cc" // lalr1.cc:907 +#line 795 "dhcp4_parser.cc" break; case 22: -#line 255 "dhcp4_parser.yy" // lalr1.cc:907 +#line 255 "dhcp4_parser.yy" { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } -#line 798 "dhcp4_parser.cc" // lalr1.cc:907 +#line 801 "dhcp4_parser.cc" break; case 24: -#line 256 "dhcp4_parser.yy" // lalr1.cc:907 +#line 256 "dhcp4_parser.yy" { ctx.ctx_ = ctx.DHCP_DDNS; } -#line 804 "dhcp4_parser.cc" // lalr1.cc:907 +#line 807 "dhcp4_parser.cc" break; case 26: -#line 257 "dhcp4_parser.yy" // lalr1.cc:907 +#line 257 "dhcp4_parser.yy" { ctx.ctx_ = ctx.LOGGING; } -#line 810 "dhcp4_parser.cc" // lalr1.cc:907 +#line 813 "dhcp4_parser.cc" break; case 28: -#line 265 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 816 "dhcp4_parser.cc" // lalr1.cc:907 +#line 265 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } +#line 819 "dhcp4_parser.cc" break; case 29: -#line 266 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); } -#line 822 "dhcp4_parser.cc" // lalr1.cc:907 +#line 266 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } +#line 825 "dhcp4_parser.cc" break; case 30: -#line 267 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 828 "dhcp4_parser.cc" // lalr1.cc:907 +#line 267 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } +#line 831 "dhcp4_parser.cc" break; case 31: -#line 268 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 834 "dhcp4_parser.cc" // lalr1.cc:907 +#line 268 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } +#line 837 "dhcp4_parser.cc" break; case 32: -#line 269 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 840 "dhcp4_parser.cc" // lalr1.cc:907 +#line 269 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } +#line 843 "dhcp4_parser.cc" break; case 33: -#line 270 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 846 "dhcp4_parser.cc" // lalr1.cc:907 +#line 270 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 849 "dhcp4_parser.cc" break; case 34: -#line 271 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 852 "dhcp4_parser.cc" // lalr1.cc:907 +#line 271 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 855 "dhcp4_parser.cc" break; case 35: -#line 274 "dhcp4_parser.yy" // lalr1.cc:907 +#line 274 "dhcp4_parser.yy" { // Push back the JSON value on the stack - ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 861 "dhcp4_parser.cc" // lalr1.cc:907 +#line 864 "dhcp4_parser.cc" break; case 36: -#line 279 "dhcp4_parser.yy" // lalr1.cc:907 +#line 279 "dhcp4_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 872 "dhcp4_parser.cc" // lalr1.cc:907 +#line 875 "dhcp4_parser.cc" break; case 37: -#line 284 "dhcp4_parser.yy" // lalr1.cc:907 +#line 284 "dhcp4_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 882 "dhcp4_parser.cc" // lalr1.cc:907 +#line 885 "dhcp4_parser.cc" break; case 38: -#line 290 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 888 "dhcp4_parser.cc" // lalr1.cc:907 +#line 290 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 891 "dhcp4_parser.cc" break; case 41: -#line 297 "dhcp4_parser.yy" // lalr1.cc:907 +#line 297 "dhcp4_parser.yy" { // map containing a single entry - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 897 "dhcp4_parser.cc" // lalr1.cc:907 +#line 900 "dhcp4_parser.cc" break; case 42: -#line 301 "dhcp4_parser.yy" // lalr1.cc:907 +#line 301 "dhcp4_parser.yy" { // map consisting of a shorter map followed by // comma and string:value - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 907 "dhcp4_parser.cc" // lalr1.cc:907 +#line 910 "dhcp4_parser.cc" break; case 43: -#line 308 "dhcp4_parser.yy" // lalr1.cc:907 +#line 308 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 916 "dhcp4_parser.cc" // lalr1.cc:907 +#line 919 "dhcp4_parser.cc" break; case 44: -#line 311 "dhcp4_parser.yy" // lalr1.cc:907 +#line 311 "dhcp4_parser.yy" { // list parsing complete. Put any sanity checking here } -#line 924 "dhcp4_parser.cc" // lalr1.cc:907 +#line 927 "dhcp4_parser.cc" break; case 47: -#line 319 "dhcp4_parser.yy" // lalr1.cc:907 +#line 319 "dhcp4_parser.yy" { // List consisting of a single element. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 933 "dhcp4_parser.cc" // lalr1.cc:907 +#line 936 "dhcp4_parser.cc" break; case 48: -#line 323 "dhcp4_parser.yy" // lalr1.cc:907 +#line 323 "dhcp4_parser.yy" { // List ending with , and a value. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 942 "dhcp4_parser.cc" // lalr1.cc:907 +#line 945 "dhcp4_parser.cc" break; case 49: -#line 330 "dhcp4_parser.yy" // lalr1.cc:907 +#line 330 "dhcp4_parser.yy" { // List parsing about to start } -#line 950 "dhcp4_parser.cc" // lalr1.cc:907 +#line 953 "dhcp4_parser.cc" break; case 50: -#line 332 "dhcp4_parser.yy" // lalr1.cc:907 +#line 332 "dhcp4_parser.yy" { // list parsing complete. Put any sanity checking here //ctx.stack_.pop_back(); } -#line 959 "dhcp4_parser.cc" // lalr1.cc:907 +#line 962 "dhcp4_parser.cc" break; case 53: -#line 341 "dhcp4_parser.yy" // lalr1.cc:907 +#line 341 "dhcp4_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 968 "dhcp4_parser.cc" // lalr1.cc:907 +#line 971 "dhcp4_parser.cc" break; case 54: -#line 345 "dhcp4_parser.yy" // lalr1.cc:907 +#line 345 "dhcp4_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 977 "dhcp4_parser.cc" // lalr1.cc:907 +#line 980 "dhcp4_parser.cc" break; case 55: -#line 356 "dhcp4_parser.yy" // lalr1.cc:907 +#line 356 "dhcp4_parser.yy" { const std::string& where = ctx.contextName(); - const std::string& keyword = yystack_[1].value.as< std::string > (); + const std::string& keyword = yystack_[1].value.as < std::string > (); error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 988 "dhcp4_parser.cc" // lalr1.cc:907 +#line 991 "dhcp4_parser.cc" break; case 56: -#line 366 "dhcp4_parser.yy" // lalr1.cc:907 +#line 366 "dhcp4_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 999 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1002 "dhcp4_parser.cc" break; case 57: -#line 371 "dhcp4_parser.yy" // lalr1.cc:907 +#line 371 "dhcp4_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place @@ -1008,11 +1011,11 @@ namespace isc { namespace dhcp { // Dhcp4 is required ctx.require("Dhcp4", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 1012 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1015 "dhcp4_parser.cc" break; case 66: -#line 395 "dhcp4_parser.yy" // lalr1.cc:907 +#line 395 "dhcp4_parser.yy" { // This code is executed when we're about to start parsing // the content of the map @@ -1021,822 +1024,822 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP4); } -#line 1025 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1028 "dhcp4_parser.cc" break; case 67: -#line 402 "dhcp4_parser.yy" // lalr1.cc:907 +#line 402 "dhcp4_parser.yy" { // No global parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1035 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1038 "dhcp4_parser.cc" break; case 68: -#line 410 "dhcp4_parser.yy" // lalr1.cc:907 +#line 410 "dhcp4_parser.yy" { // Parse the Dhcp4 map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1045 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1048 "dhcp4_parser.cc" break; case 69: -#line 414 "dhcp4_parser.yy" // lalr1.cc:907 +#line 414 "dhcp4_parser.yy" { // No global parameter is required // parsing completed } -#line 1054 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1057 "dhcp4_parser.cc" break; case 99: -#line 454 "dhcp4_parser.yy" // lalr1.cc:907 +#line 454 "dhcp4_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("valid-lifetime", prf); } -#line 1063 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1066 "dhcp4_parser.cc" break; case 100: -#line 459 "dhcp4_parser.yy" // lalr1.cc:907 +#line 459 "dhcp4_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("renew-timer", prf); } -#line 1072 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1075 "dhcp4_parser.cc" break; case 101: -#line 464 "dhcp4_parser.yy" // lalr1.cc:907 +#line 464 "dhcp4_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rebind-timer", prf); } -#line 1081 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1084 "dhcp4_parser.cc" break; case 102: -#line 469 "dhcp4_parser.yy" // lalr1.cc:907 +#line 469 "dhcp4_parser.yy" { - ElementPtr dpp(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("decline-probation-period", dpp); } -#line 1090 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1093 "dhcp4_parser.cc" break; case 103: -#line 474 "dhcp4_parser.yy" // lalr1.cc:907 +#line 474 "dhcp4_parser.yy" { - ElementPtr echo(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr echo(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("echo-client-id", echo); } -#line 1099 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1102 "dhcp4_parser.cc" break; case 104: -#line 479 "dhcp4_parser.yy" // lalr1.cc:907 +#line 479 "dhcp4_parser.yy" { - ElementPtr match(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr match(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("match-client-id", match); } -#line 1108 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1111 "dhcp4_parser.cc" break; case 105: -#line 485 "dhcp4_parser.yy" // lalr1.cc:907 +#line 485 "dhcp4_parser.yy" { ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces-config", i); ctx.stack_.push_back(i); ctx.enter(ctx.INTERFACES_CONFIG); } -#line 1119 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1122 "dhcp4_parser.cc" break; case 106: -#line 490 "dhcp4_parser.yy" // lalr1.cc:907 +#line 490 "dhcp4_parser.yy" { // No interfaces config param is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1129 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1132 "dhcp4_parser.cc" break; case 116: -#line 509 "dhcp4_parser.yy" // lalr1.cc:907 +#line 509 "dhcp4_parser.yy" { // Parse the interfaces-config map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1139 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1142 "dhcp4_parser.cc" break; case 117: -#line 513 "dhcp4_parser.yy" // lalr1.cc:907 +#line 513 "dhcp4_parser.yy" { // No interfaces config param is required // parsing completed } -#line 1148 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1151 "dhcp4_parser.cc" break; case 118: -#line 518 "dhcp4_parser.yy" // lalr1.cc:907 +#line 518 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1159 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1162 "dhcp4_parser.cc" break; case 119: -#line 523 "dhcp4_parser.yy" // lalr1.cc:907 +#line 523 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1168 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1171 "dhcp4_parser.cc" break; case 120: -#line 528 "dhcp4_parser.yy" // lalr1.cc:907 +#line 528 "dhcp4_parser.yy" { ctx.enter(ctx.DHCP_SOCKET_TYPE); } -#line 1176 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1179 "dhcp4_parser.cc" break; case 121: -#line 530 "dhcp4_parser.yy" // lalr1.cc:907 +#line 530 "dhcp4_parser.yy" { - ctx.stack_.back()->set("dhcp-socket-type", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("dhcp-socket-type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1185 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1188 "dhcp4_parser.cc" break; case 122: -#line 535 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("raw", ctx.loc2pos(yystack_[0].location))); } -#line 1191 "dhcp4_parser.cc" // lalr1.cc:907 +#line 535 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("raw", ctx.loc2pos(yystack_[0].location))); } +#line 1194 "dhcp4_parser.cc" break; case 123: -#line 536 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("udp", ctx.loc2pos(yystack_[0].location))); } -#line 1197 "dhcp4_parser.cc" // lalr1.cc:907 +#line 536 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("udp", ctx.loc2pos(yystack_[0].location))); } +#line 1200 "dhcp4_parser.cc" break; case 124: -#line 539 "dhcp4_parser.yy" // lalr1.cc:907 +#line 539 "dhcp4_parser.yy" { ctx.enter(ctx.OUTBOUND_INTERFACE); } -#line 1205 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1208 "dhcp4_parser.cc" break; case 125: -#line 541 "dhcp4_parser.yy" // lalr1.cc:907 +#line 541 "dhcp4_parser.yy" { - ctx.stack_.back()->set("outbound-interface", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("outbound-interface", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1214 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1217 "dhcp4_parser.cc" break; case 126: -#line 546 "dhcp4_parser.yy" // lalr1.cc:907 +#line 546 "dhcp4_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("same-as-inbound", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("same-as-inbound", ctx.loc2pos(yystack_[0].location))); } -#line 1222 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1225 "dhcp4_parser.cc" break; case 127: -#line 548 "dhcp4_parser.yy" // lalr1.cc:907 +#line 548 "dhcp4_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("use-routing", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("use-routing", ctx.loc2pos(yystack_[0].location))); } -#line 1230 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1233 "dhcp4_parser.cc" break; case 128: -#line 552 "dhcp4_parser.yy" // lalr1.cc:907 +#line 552 "dhcp4_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("re-detect", b); } -#line 1239 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1242 "dhcp4_parser.cc" break; case 129: -#line 558 "dhcp4_parser.yy" // lalr1.cc:907 +#line 558 "dhcp4_parser.yy" { ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lease-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.LEASE_DATABASE); } -#line 1250 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1253 "dhcp4_parser.cc" break; case 130: -#line 563 "dhcp4_parser.yy" // lalr1.cc:907 +#line 563 "dhcp4_parser.yy" { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1261 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1264 "dhcp4_parser.cc" break; case 131: -#line 570 "dhcp4_parser.yy" // lalr1.cc:907 +#line 570 "dhcp4_parser.yy" { ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1272 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1275 "dhcp4_parser.cc" break; case 132: -#line 575 "dhcp4_parser.yy" // lalr1.cc:907 +#line 575 "dhcp4_parser.yy" { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1283 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1286 "dhcp4_parser.cc" break; case 133: -#line 582 "dhcp4_parser.yy" // lalr1.cc:907 +#line 582 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-databases", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1294 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1297 "dhcp4_parser.cc" break; case 134: -#line 587 "dhcp4_parser.yy" // lalr1.cc:907 +#line 587 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1303 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1306 "dhcp4_parser.cc" break; case 139: -#line 600 "dhcp4_parser.yy" // lalr1.cc:907 +#line 600 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1313 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1316 "dhcp4_parser.cc" break; case 140: -#line 604 "dhcp4_parser.yy" // lalr1.cc:907 +#line 604 "dhcp4_parser.yy" { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1323 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1326 "dhcp4_parser.cc" break; case 162: -#line 635 "dhcp4_parser.yy" // lalr1.cc:907 +#line 635 "dhcp4_parser.yy" { ctx.enter(ctx.DATABASE_TYPE); } -#line 1331 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1334 "dhcp4_parser.cc" break; case 163: -#line 637 "dhcp4_parser.yy" // lalr1.cc:907 +#line 637 "dhcp4_parser.yy" { - ctx.stack_.back()->set("type", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1340 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1343 "dhcp4_parser.cc" break; case 164: -#line 642 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } -#line 1346 "dhcp4_parser.cc" // lalr1.cc:907 +#line 642 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } +#line 1349 "dhcp4_parser.cc" break; case 165: -#line 643 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } -#line 1352 "dhcp4_parser.cc" // lalr1.cc:907 +#line 643 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } +#line 1355 "dhcp4_parser.cc" break; case 166: -#line 644 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } -#line 1358 "dhcp4_parser.cc" // lalr1.cc:907 +#line 644 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } +#line 1361 "dhcp4_parser.cc" break; case 167: -#line 645 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } -#line 1364 "dhcp4_parser.cc" // lalr1.cc:907 +#line 645 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } +#line 1367 "dhcp4_parser.cc" break; case 168: -#line 648 "dhcp4_parser.yy" // lalr1.cc:907 +#line 648 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1372 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1375 "dhcp4_parser.cc" break; case 169: -#line 650 "dhcp4_parser.yy" // lalr1.cc:907 +#line 650 "dhcp4_parser.yy" { - ElementPtr user(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("user", user); ctx.leave(); } -#line 1382 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1385 "dhcp4_parser.cc" break; case 170: -#line 656 "dhcp4_parser.yy" // lalr1.cc:907 +#line 656 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1390 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1393 "dhcp4_parser.cc" break; case 171: -#line 658 "dhcp4_parser.yy" // lalr1.cc:907 +#line 658 "dhcp4_parser.yy" { - ElementPtr pwd(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr pwd(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("password", pwd); ctx.leave(); } -#line 1400 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1403 "dhcp4_parser.cc" break; case 172: -#line 664 "dhcp4_parser.yy" // lalr1.cc:907 +#line 664 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1408 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1411 "dhcp4_parser.cc" break; case 173: -#line 666 "dhcp4_parser.yy" // lalr1.cc:907 +#line 666 "dhcp4_parser.yy" { - ElementPtr h(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr h(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host", h); ctx.leave(); } -#line 1418 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1421 "dhcp4_parser.cc" break; case 174: -#line 672 "dhcp4_parser.yy" // lalr1.cc:907 +#line 672 "dhcp4_parser.yy" { - ElementPtr p(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", p); } -#line 1427 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1430 "dhcp4_parser.cc" break; case 175: -#line 677 "dhcp4_parser.yy" // lalr1.cc:907 +#line 677 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1435 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1438 "dhcp4_parser.cc" break; case 176: -#line 679 "dhcp4_parser.yy" // lalr1.cc:907 +#line 679 "dhcp4_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1445 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1448 "dhcp4_parser.cc" break; case 177: -#line 685 "dhcp4_parser.yy" // lalr1.cc:907 +#line 685 "dhcp4_parser.yy" { - ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("persist", n); } -#line 1454 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1457 "dhcp4_parser.cc" break; case 178: -#line 690 "dhcp4_parser.yy" // lalr1.cc:907 +#line 690 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lfc-interval", n); } -#line 1463 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1466 "dhcp4_parser.cc" break; case 179: -#line 695 "dhcp4_parser.yy" // lalr1.cc:907 +#line 695 "dhcp4_parser.yy" { - ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("readonly", n); } -#line 1472 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1475 "dhcp4_parser.cc" break; case 180: -#line 700 "dhcp4_parser.yy" // lalr1.cc:907 +#line 700 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("connect-timeout", n); } -#line 1481 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1484 "dhcp4_parser.cc" break; case 181: -#line 705 "dhcp4_parser.yy" // lalr1.cc:907 +#line 705 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("request-timeout", n); } -#line 1490 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1493 "dhcp4_parser.cc" break; case 182: -#line 710 "dhcp4_parser.yy" // lalr1.cc:907 +#line 710 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-keepalive", n); } -#line 1499 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1502 "dhcp4_parser.cc" break; case 183: -#line 715 "dhcp4_parser.yy" // lalr1.cc:907 +#line 715 "dhcp4_parser.yy" { - ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-nodelay", n); } -#line 1508 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1511 "dhcp4_parser.cc" break; case 184: -#line 720 "dhcp4_parser.yy" // lalr1.cc:907 +#line 720 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1516 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1519 "dhcp4_parser.cc" break; case 185: -#line 722 "dhcp4_parser.yy" // lalr1.cc:907 +#line 722 "dhcp4_parser.yy" { - ElementPtr cp(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr cp(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("contact-points", cp); ctx.leave(); } -#line 1526 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1529 "dhcp4_parser.cc" break; case 186: -#line 728 "dhcp4_parser.yy" // lalr1.cc:907 +#line 728 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1534 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1537 "dhcp4_parser.cc" break; case 187: -#line 730 "dhcp4_parser.yy" // lalr1.cc:907 +#line 730 "dhcp4_parser.yy" { - ElementPtr ks(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr ks(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("keyspace", ks); ctx.leave(); } -#line 1544 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1547 "dhcp4_parser.cc" break; case 188: -#line 736 "dhcp4_parser.yy" // lalr1.cc:907 +#line 736 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reconnect-tries", n); } -#line 1553 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1556 "dhcp4_parser.cc" break; case 189: -#line 741 "dhcp4_parser.yy" // lalr1.cc:907 +#line 741 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reconnect-wait-time", n); } -#line 1562 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1565 "dhcp4_parser.cc" break; case 190: -#line 746 "dhcp4_parser.yy" // lalr1.cc:907 +#line 746 "dhcp4_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-row-errors", n); } -#line 1571 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1574 "dhcp4_parser.cc" break; case 191: -#line 751 "dhcp4_parser.yy" // lalr1.cc:907 +#line 751 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host-reservation-identifiers", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS); } -#line 1582 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1585 "dhcp4_parser.cc" break; case 192: -#line 756 "dhcp4_parser.yy" // lalr1.cc:907 +#line 756 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1591 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1594 "dhcp4_parser.cc" break; case 200: -#line 772 "dhcp4_parser.yy" // lalr1.cc:907 +#line 772 "dhcp4_parser.yy" { ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 1600 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1603 "dhcp4_parser.cc" break; case 201: -#line 777 "dhcp4_parser.yy" // lalr1.cc:907 +#line 777 "dhcp4_parser.yy" { ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(hwaddr); } -#line 1609 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1612 "dhcp4_parser.cc" break; case 202: -#line 782 "dhcp4_parser.yy" // lalr1.cc:907 +#line 782 "dhcp4_parser.yy" { ElementPtr circuit(new StringElement("circuit-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(circuit); } -#line 1618 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1621 "dhcp4_parser.cc" break; case 203: -#line 787 "dhcp4_parser.yy" // lalr1.cc:907 +#line 787 "dhcp4_parser.yy" { ElementPtr client(new StringElement("client-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(client); } -#line 1627 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1630 "dhcp4_parser.cc" break; case 204: -#line 792 "dhcp4_parser.yy" // lalr1.cc:907 +#line 792 "dhcp4_parser.yy" { ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(flex_id); } -#line 1636 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1639 "dhcp4_parser.cc" break; case 205: -#line 797 "dhcp4_parser.yy" // lalr1.cc:907 +#line 797 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hooks-libraries", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 1647 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1650 "dhcp4_parser.cc" break; case 206: -#line 802 "dhcp4_parser.yy" // lalr1.cc:907 +#line 802 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1656 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1659 "dhcp4_parser.cc" break; case 211: -#line 815 "dhcp4_parser.yy" // lalr1.cc:907 +#line 815 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1666 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1669 "dhcp4_parser.cc" break; case 212: -#line 819 "dhcp4_parser.yy" // lalr1.cc:907 +#line 819 "dhcp4_parser.yy" { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1676 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1679 "dhcp4_parser.cc" break; case 213: -#line 825 "dhcp4_parser.yy" // lalr1.cc:907 +#line 825 "dhcp4_parser.yy" { // Parse the hooks-libraries list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1686 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1689 "dhcp4_parser.cc" break; case 214: -#line 829 "dhcp4_parser.yy" // lalr1.cc:907 +#line 829 "dhcp4_parser.yy" { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 1696 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1699 "dhcp4_parser.cc" break; case 220: -#line 844 "dhcp4_parser.yy" // lalr1.cc:907 +#line 844 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1704 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1707 "dhcp4_parser.cc" break; case 221: -#line 846 "dhcp4_parser.yy" // lalr1.cc:907 +#line 846 "dhcp4_parser.yy" { - ElementPtr lib(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 1714 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1717 "dhcp4_parser.cc" break; case 222: -#line 852 "dhcp4_parser.yy" // lalr1.cc:907 +#line 852 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1722 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1725 "dhcp4_parser.cc" break; case 223: -#line 854 "dhcp4_parser.yy" // lalr1.cc:907 +#line 854 "dhcp4_parser.yy" { - ctx.stack_.back()->set("parameters", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1731 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1734 "dhcp4_parser.cc" break; case 224: -#line 860 "dhcp4_parser.yy" // lalr1.cc:907 +#line 860 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("expired-leases-processing", m); ctx.stack_.push_back(m); ctx.enter(ctx.EXPIRED_LEASES_PROCESSING); } -#line 1742 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1745 "dhcp4_parser.cc" break; case 225: -#line 865 "dhcp4_parser.yy" // lalr1.cc:907 +#line 865 "dhcp4_parser.yy" { // No expired lease parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1752 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1755 "dhcp4_parser.cc" break; case 234: -#line 883 "dhcp4_parser.yy" // lalr1.cc:907 +#line 883 "dhcp4_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reclaim-timer-wait-time", value); } -#line 1761 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1764 "dhcp4_parser.cc" break; case 235: -#line 888 "dhcp4_parser.yy" // lalr1.cc:907 +#line 888 "dhcp4_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush-reclaimed-timer-wait-time", value); } -#line 1770 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1773 "dhcp4_parser.cc" break; case 236: -#line 893 "dhcp4_parser.yy" // lalr1.cc:907 +#line 893 "dhcp4_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hold-reclaimed-time", value); } -#line 1779 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1782 "dhcp4_parser.cc" break; case 237: -#line 898 "dhcp4_parser.yy" // lalr1.cc:907 +#line 898 "dhcp4_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-leases", value); } -#line 1788 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1791 "dhcp4_parser.cc" break; case 238: -#line 903 "dhcp4_parser.yy" // lalr1.cc:907 +#line 903 "dhcp4_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-time", value); } -#line 1797 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1800 "dhcp4_parser.cc" break; case 239: -#line 908 "dhcp4_parser.yy" // lalr1.cc:907 +#line 908 "dhcp4_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); } -#line 1806 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1809 "dhcp4_parser.cc" break; case 240: -#line 916 "dhcp4_parser.yy" // lalr1.cc:907 +#line 916 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet4", l); ctx.stack_.push_back(l); ctx.enter(ctx.SUBNET4); } -#line 1817 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1820 "dhcp4_parser.cc" break; case 241: -#line 921 "dhcp4_parser.yy" // lalr1.cc:907 +#line 921 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1826 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1829 "dhcp4_parser.cc" break; case 246: -#line 941 "dhcp4_parser.yy" // lalr1.cc:907 +#line 941 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1836 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1839 "dhcp4_parser.cc" break; case 247: -#line 945 "dhcp4_parser.yy" // lalr1.cc:907 +#line 945 "dhcp4_parser.yy" { // Once we reached this place, the subnet parsing is now complete. // If we want to, we can implement default values here. @@ -1858,315 +1861,315 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1862 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1865 "dhcp4_parser.cc" break; case 248: -#line 967 "dhcp4_parser.yy" // lalr1.cc:907 +#line 967 "dhcp4_parser.yy" { // Parse the subnet4 list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1872 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1875 "dhcp4_parser.cc" break; case 249: -#line 971 "dhcp4_parser.yy" // lalr1.cc:907 +#line 971 "dhcp4_parser.yy" { // The subnet subnet4 parameter is required ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 1882 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1885 "dhcp4_parser.cc" break; case 277: -#line 1010 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1010 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1890 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1893 "dhcp4_parser.cc" break; case 278: -#line 1012 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1012 "dhcp4_parser.yy" { - ElementPtr subnet(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr subnet(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet", subnet); ctx.leave(); } -#line 1900 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1903 "dhcp4_parser.cc" break; case 279: -#line 1018 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1018 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1908 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1911 "dhcp4_parser.cc" break; case 280: -#line 1020 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1020 "dhcp4_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("4o6-interface", iface); ctx.leave(); } -#line 1918 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1921 "dhcp4_parser.cc" break; case 281: -#line 1026 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1026 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1926 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1929 "dhcp4_parser.cc" break; case 282: -#line 1028 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1028 "dhcp4_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("4o6-interface-id", iface); ctx.leave(); } -#line 1936 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1939 "dhcp4_parser.cc" break; case 283: -#line 1034 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1034 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1944 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1947 "dhcp4_parser.cc" break; case 284: -#line 1036 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1036 "dhcp4_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("4o6-subnet", iface); ctx.leave(); } -#line 1954 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1957 "dhcp4_parser.cc" break; case 285: -#line 1042 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1042 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1962 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1965 "dhcp4_parser.cc" break; case 286: -#line 1044 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1044 "dhcp4_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface", iface); ctx.leave(); } -#line 1972 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1975 "dhcp4_parser.cc" break; case 287: -#line 1050 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1050 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1980 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1983 "dhcp4_parser.cc" break; case 288: -#line 1052 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1052 "dhcp4_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface-id", iface); ctx.leave(); } -#line 1990 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1993 "dhcp4_parser.cc" break; case 289: -#line 1058 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1058 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1998 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2001 "dhcp4_parser.cc" break; case 290: -#line 1060 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1060 "dhcp4_parser.yy" { - ElementPtr cls(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr cls(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-class", cls); ctx.leave(); } -#line 2008 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2011 "dhcp4_parser.cc" break; case 291: -#line 1066 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1066 "dhcp4_parser.yy" { ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("require-client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2019 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2022 "dhcp4_parser.cc" break; case 292: -#line 1071 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1071 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2028 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2031 "dhcp4_parser.cc" break; case 293: -#line 1076 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1076 "dhcp4_parser.yy" { ctx.enter(ctx.RESERVATION_MODE); } -#line 2036 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2039 "dhcp4_parser.cc" break; case 294: -#line 1078 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1078 "dhcp4_parser.yy" { - ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2045 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2048 "dhcp4_parser.cc" break; case 295: -#line 1083 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } -#line 2051 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1083 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } +#line 2054 "dhcp4_parser.cc" break; case 296: -#line 1084 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } -#line 2057 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1084 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } +#line 2060 "dhcp4_parser.cc" break; case 297: -#line 1085 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } -#line 2063 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1085 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } +#line 2066 "dhcp4_parser.cc" break; case 298: -#line 1088 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1088 "dhcp4_parser.yy" { - ElementPtr id(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("id", id); } -#line 2072 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2075 "dhcp4_parser.cc" break; case 299: -#line 1093 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1093 "dhcp4_parser.yy" { - ElementPtr rc(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr rc(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rapid-commit", rc); } -#line 2081 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2084 "dhcp4_parser.cc" break; case 300: -#line 1100 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1100 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("shared-networks", l); ctx.stack_.push_back(l); ctx.enter(ctx.SHARED_NETWORK); } -#line 2092 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2095 "dhcp4_parser.cc" break; case 301: -#line 1105 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1105 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2101 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2104 "dhcp4_parser.cc" break; case 306: -#line 1120 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1120 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2111 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2114 "dhcp4_parser.cc" break; case 307: -#line 1124 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1124 "dhcp4_parser.yy" { ctx.stack_.pop_back(); } -#line 2119 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2122 "dhcp4_parser.cc" break; case 328: -#line 1156 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1156 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-def", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DEF); } -#line 2130 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2133 "dhcp4_parser.cc" break; case 329: -#line 1161 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1161 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2139 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2142 "dhcp4_parser.cc" break; case 330: -#line 1169 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1169 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2148 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2151 "dhcp4_parser.cc" break; case 331: -#line 1172 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1172 "dhcp4_parser.yy" { // parsing completed } -#line 2156 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2159 "dhcp4_parser.cc" break; case 336: -#line 1188 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1188 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2166 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2169 "dhcp4_parser.cc" break; case 337: -#line 1192 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1192 "dhcp4_parser.yy" { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); @@ -2174,21 +2177,21 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2178 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2181 "dhcp4_parser.cc" break; case 338: -#line 1203 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1203 "dhcp4_parser.yy" { // Parse the option-def list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2188 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2191 "dhcp4_parser.cc" break; case 339: -#line 1207 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1207 "dhcp4_parser.yy" { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); @@ -2196,284 +2199,284 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2200 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2203 "dhcp4_parser.cc" break; case 355: -#line 1239 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1239 "dhcp4_parser.yy" { - ElementPtr code(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("code", code); } -#line 2209 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2212 "dhcp4_parser.cc" break; case 357: -#line 1246 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1246 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2217 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2220 "dhcp4_parser.cc" break; case 358: -#line 1248 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1248 "dhcp4_parser.yy" { - ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("type", prf); ctx.leave(); } -#line 2227 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2230 "dhcp4_parser.cc" break; case 359: -#line 1254 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1254 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2235 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2238 "dhcp4_parser.cc" break; case 360: -#line 1256 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1256 "dhcp4_parser.yy" { - ElementPtr rtypes(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr rtypes(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("record-types", rtypes); ctx.leave(); } -#line 2245 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2248 "dhcp4_parser.cc" break; case 361: -#line 1262 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1262 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2253 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2256 "dhcp4_parser.cc" break; case 362: -#line 1264 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1264 "dhcp4_parser.yy" { - ElementPtr space(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr space(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("space", space); ctx.leave(); } -#line 2263 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2266 "dhcp4_parser.cc" break; case 364: -#line 1272 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1272 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2271 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2274 "dhcp4_parser.cc" break; case 365: -#line 1274 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1274 "dhcp4_parser.yy" { - ElementPtr encap(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr encap(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("encapsulate", encap); ctx.leave(); } -#line 2281 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2284 "dhcp4_parser.cc" break; case 366: -#line 1280 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1280 "dhcp4_parser.yy" { - ElementPtr array(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("array", array); } -#line 2290 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2293 "dhcp4_parser.cc" break; case 367: -#line 1289 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1289 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-data", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DATA); } -#line 2301 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2304 "dhcp4_parser.cc" break; case 368: -#line 1294 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1294 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2310 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2313 "dhcp4_parser.cc" break; case 373: -#line 1313 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1313 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2320 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2323 "dhcp4_parser.cc" break; case 374: -#line 1317 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1317 "dhcp4_parser.yy" { /// @todo: the code or name parameters are required. ctx.stack_.pop_back(); } -#line 2329 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2332 "dhcp4_parser.cc" break; case 375: -#line 1325 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1325 "dhcp4_parser.yy" { // Parse the option-data list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2339 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2342 "dhcp4_parser.cc" break; case 376: -#line 1329 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1329 "dhcp4_parser.yy" { /// @todo: the code or name parameters are required. // parsing completed } -#line 2348 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2351 "dhcp4_parser.cc" break; case 391: -#line 1362 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1362 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2356 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2359 "dhcp4_parser.cc" break; case 392: -#line 1364 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1364 "dhcp4_parser.yy" { - ElementPtr data(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr data(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("data", data); ctx.leave(); } -#line 2366 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2369 "dhcp4_parser.cc" break; case 395: -#line 1374 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1374 "dhcp4_parser.yy" { - ElementPtr space(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr space(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("csv-format", space); } -#line 2375 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2378 "dhcp4_parser.cc" break; case 396: -#line 1379 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1379 "dhcp4_parser.yy" { - ElementPtr persist(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-send", persist); } -#line 2384 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2387 "dhcp4_parser.cc" break; case 397: -#line 1387 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1387 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pools", l); ctx.stack_.push_back(l); ctx.enter(ctx.POOLS); } -#line 2395 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2398 "dhcp4_parser.cc" break; case 398: -#line 1392 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1392 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2404 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2407 "dhcp4_parser.cc" break; case 403: -#line 1407 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1407 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2414 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2417 "dhcp4_parser.cc" break; case 404: -#line 1411 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1411 "dhcp4_parser.yy" { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2424 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2427 "dhcp4_parser.cc" break; case 405: -#line 1417 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1417 "dhcp4_parser.yy" { // Parse the pool list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2434 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2437 "dhcp4_parser.cc" break; case 406: -#line 1421 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1421 "dhcp4_parser.yy" { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2444 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2447 "dhcp4_parser.cc" break; case 416: -#line 1440 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1440 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2452 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2455 "dhcp4_parser.cc" break; case 417: -#line 1442 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1442 "dhcp4_parser.yy" { - ElementPtr pool(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr pool(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pool", pool); ctx.leave(); } -#line 2462 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2465 "dhcp4_parser.cc" break; case 418: -#line 1448 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1448 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2470 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2473 "dhcp4_parser.cc" break; case 419: -#line 1450 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1450 "dhcp4_parser.yy" { ElementPtr parent = ctx.stack_.back(); - ElementPtr user_context = yystack_[0].value.as< ElementPtr > (); + ElementPtr user_context = yystack_[0].value.as < ElementPtr > (); ConstElementPtr old = parent->get("user-context"); // Handle already existing user context @@ -2493,23 +2496,23 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2497 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2500 "dhcp4_parser.cc" break; case 420: -#line 1473 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1473 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2505 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2508 "dhcp4_parser.cc" break; case 421: -#line 1475 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1475 "dhcp4_parser.yy" { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location))); - ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); user_context->set("comment", comment); // Handle already existing user context @@ -2530,960 +2533,961 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2534 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2537 "dhcp4_parser.cc" break; case 422: -#line 1503 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1503 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations", l); ctx.stack_.push_back(l); ctx.enter(ctx.RESERVATIONS); } -#line 2545 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2548 "dhcp4_parser.cc" break; case 423: -#line 1508 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1508 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2554 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2557 "dhcp4_parser.cc" break; case 428: -#line 1521 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1521 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2564 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2567 "dhcp4_parser.cc" break; case 429: -#line 1525 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1525 "dhcp4_parser.yy" { /// @todo: an identifier parameter is required. ctx.stack_.pop_back(); } -#line 2573 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2576 "dhcp4_parser.cc" break; case 430: -#line 1530 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1530 "dhcp4_parser.yy" { // Parse the reservations list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2583 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2586 "dhcp4_parser.cc" break; case 431: -#line 1534 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1534 "dhcp4_parser.yy" { /// @todo: an identifier parameter is required. // parsing completed } -#line 2592 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2595 "dhcp4_parser.cc" break; case 451: -#line 1565 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1565 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2600 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2603 "dhcp4_parser.cc" break; case 452: -#line 1567 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1567 "dhcp4_parser.yy" { - ElementPtr next_server(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr next_server(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("next-server", next_server); ctx.leave(); } -#line 2610 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2613 "dhcp4_parser.cc" break; case 453: -#line 1573 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1573 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2618 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2621 "dhcp4_parser.cc" break; case 454: -#line 1575 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1575 "dhcp4_parser.yy" { - ElementPtr srv(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr srv(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-hostname", srv); ctx.leave(); } -#line 2628 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2631 "dhcp4_parser.cc" break; case 455: -#line 1581 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1581 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2636 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2639 "dhcp4_parser.cc" break; case 456: -#line 1583 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1583 "dhcp4_parser.yy" { - ElementPtr bootfile(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr bootfile(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("boot-file-name", bootfile); ctx.leave(); } -#line 2646 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2649 "dhcp4_parser.cc" break; case 457: -#line 1589 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1589 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2654 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2657 "dhcp4_parser.cc" break; case 458: -#line 1591 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1591 "dhcp4_parser.yy" { - ElementPtr addr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr addr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-address", addr); ctx.leave(); } -#line 2664 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2667 "dhcp4_parser.cc" break; case 459: -#line 1597 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1597 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-addresses", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 2675 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2678 "dhcp4_parser.cc" break; case 460: -#line 1602 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1602 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2684 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2687 "dhcp4_parser.cc" break; case 461: -#line 1607 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1607 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2692 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2695 "dhcp4_parser.cc" break; case 462: -#line 1609 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1609 "dhcp4_parser.yy" { - ElementPtr d(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr d(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("duid", d); ctx.leave(); } -#line 2702 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2705 "dhcp4_parser.cc" break; case 463: -#line 1615 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1615 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2710 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2713 "dhcp4_parser.cc" break; case 464: -#line 1617 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1617 "dhcp4_parser.yy" { - ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hw-address", hw); ctx.leave(); } -#line 2720 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2723 "dhcp4_parser.cc" break; case 465: -#line 1623 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1623 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2728 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2731 "dhcp4_parser.cc" break; case 466: -#line 1625 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1625 "dhcp4_parser.yy" { - ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-id", hw); ctx.leave(); } -#line 2738 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2741 "dhcp4_parser.cc" break; case 467: -#line 1631 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1631 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2746 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2749 "dhcp4_parser.cc" break; case 468: -#line 1633 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1633 "dhcp4_parser.yy" { - ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("circuit-id", hw); ctx.leave(); } -#line 2756 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2759 "dhcp4_parser.cc" break; case 469: -#line 1639 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1639 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2764 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2767 "dhcp4_parser.cc" break; case 470: -#line 1641 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1641 "dhcp4_parser.yy" { - ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flex-id", hw); ctx.leave(); } -#line 2774 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2777 "dhcp4_parser.cc" break; case 471: -#line 1647 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1647 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2782 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2785 "dhcp4_parser.cc" break; case 472: -#line 1649 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1649 "dhcp4_parser.yy" { - ElementPtr host(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr host(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname", host); ctx.leave(); } -#line 2792 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2795 "dhcp4_parser.cc" break; case 473: -#line 1655 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1655 "dhcp4_parser.yy" { ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2803 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2806 "dhcp4_parser.cc" break; case 474: -#line 1660 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1660 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2812 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2815 "dhcp4_parser.cc" break; case 475: -#line 1668 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1668 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("relay", m); ctx.stack_.push_back(m); ctx.enter(ctx.RELAY); } -#line 2823 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2826 "dhcp4_parser.cc" break; case 476: -#line 1673 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1673 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2832 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2835 "dhcp4_parser.cc" break; case 479: -#line 1685 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1685 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", l); ctx.stack_.push_back(l); ctx.enter(ctx.CLIENT_CLASSES); } -#line 2843 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2846 "dhcp4_parser.cc" break; case 480: -#line 1690 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1690 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2852 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2855 "dhcp4_parser.cc" break; case 483: -#line 1699 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1699 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2862 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2865 "dhcp4_parser.cc" break; case 484: -#line 1703 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1703 "dhcp4_parser.yy" { // The name client class parameter is required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2872 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2875 "dhcp4_parser.cc" break; case 501: -#line 1732 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1732 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2880 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2883 "dhcp4_parser.cc" break; case 502: -#line 1734 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1734 "dhcp4_parser.yy" { - ElementPtr test(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr test(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("test", test); ctx.leave(); } -#line 2890 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2893 "dhcp4_parser.cc" break; case 503: -#line 1740 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1740 "dhcp4_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("only-if-required", b); } -#line 2899 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2902 "dhcp4_parser.cc" break; case 504: -#line 1749 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1749 "dhcp4_parser.yy" { - ElementPtr time(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4o6-port", time); } -#line 2908 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2911 "dhcp4_parser.cc" break; case 505: -#line 1756 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1756 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("control-socket", m); ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 2919 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2922 "dhcp4_parser.cc" break; case 506: -#line 1761 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1761 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2928 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2931 "dhcp4_parser.cc" break; case 514: -#line 1777 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1777 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2936 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2939 "dhcp4_parser.cc" break; case 515: -#line 1779 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1779 "dhcp4_parser.yy" { - ElementPtr stype(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr stype(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 2946 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2949 "dhcp4_parser.cc" break; case 516: -#line 1785 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1785 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2954 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2957 "dhcp4_parser.cc" break; case 517: -#line 1787 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1787 "dhcp4_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 2964 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2967 "dhcp4_parser.cc" break; case 518: -#line 1795 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1795 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp-ddns", m); ctx.stack_.push_back(m); ctx.enter(ctx.DHCP_DDNS); } -#line 2975 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2978 "dhcp4_parser.cc" break; case 519: -#line 1800 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1800 "dhcp4_parser.yy" { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 2986 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2989 "dhcp4_parser.cc" break; case 520: -#line 1807 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1807 "dhcp4_parser.yy" { // Parse the dhcp-ddns map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2996 "dhcp4_parser.cc" // lalr1.cc:907 +#line 2999 "dhcp4_parser.cc" break; case 521: -#line 1811 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1811 "dhcp4_parser.yy" { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3006 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3009 "dhcp4_parser.cc" break; case 541: -#line 1840 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1840 "dhcp4_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-updates", b); } -#line 3015 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3018 "dhcp4_parser.cc" break; case 542: -#line 1845 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1845 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3023 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3026 "dhcp4_parser.cc" break; case 543: -#line 1847 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1847 "dhcp4_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("qualifying-suffix", s); ctx.leave(); } -#line 3033 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3036 "dhcp4_parser.cc" break; case 544: -#line 1853 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1853 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3041 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3044 "dhcp4_parser.cc" break; case 545: -#line 1855 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1855 "dhcp4_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-ip", s); ctx.leave(); } -#line 3051 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3054 "dhcp4_parser.cc" break; case 546: -#line 1861 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1861 "dhcp4_parser.yy" { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-port", i); } -#line 3060 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3063 "dhcp4_parser.cc" break; case 547: -#line 1866 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1866 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3068 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3071 "dhcp4_parser.cc" break; case 548: -#line 1868 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1868 "dhcp4_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-ip", s); ctx.leave(); } -#line 3078 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3081 "dhcp4_parser.cc" break; case 549: -#line 1874 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1874 "dhcp4_parser.yy" { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-port", i); } -#line 3087 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3090 "dhcp4_parser.cc" break; case 550: -#line 1879 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1879 "dhcp4_parser.yy" { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-queue-size", i); } -#line 3096 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3099 "dhcp4_parser.cc" break; case 551: -#line 1884 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1884 "dhcp4_parser.yy" { ctx.enter(ctx.NCR_PROTOCOL); } -#line 3104 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3107 "dhcp4_parser.cc" break; case 552: -#line 1886 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1886 "dhcp4_parser.yy" { - ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3113 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3116 "dhcp4_parser.cc" break; case 553: -#line 1892 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 3119 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1892 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } +#line 3122 "dhcp4_parser.cc" break; case 554: -#line 1893 "dhcp4_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 3125 "dhcp4_parser.cc" // lalr1.cc:907 +#line 1893 "dhcp4_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } +#line 3128 "dhcp4_parser.cc" break; case 555: -#line 1896 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1896 "dhcp4_parser.yy" { ctx.enter(ctx.NCR_FORMAT); } -#line 3133 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3136 "dhcp4_parser.cc" break; case 556: -#line 1898 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1898 "dhcp4_parser.yy" { ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 3143 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3146 "dhcp4_parser.cc" break; case 557: -#line 1904 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1904 "dhcp4_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-include-fqdn", b); } -#line 3152 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3155 "dhcp4_parser.cc" break; case 558: -#line 1909 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1909 "dhcp4_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-no-update", b); } -#line 3161 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3164 "dhcp4_parser.cc" break; case 559: -#line 1914 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1914 "dhcp4_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-client-update", b); } -#line 3170 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3173 "dhcp4_parser.cc" break; case 560: -#line 1919 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1919 "dhcp4_parser.yy" { ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 3178 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3181 "dhcp4_parser.cc" break; case 561: -#line 1921 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1921 "dhcp4_parser.yy" { - ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3187 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3190 "dhcp4_parser.cc" break; case 562: -#line 1927 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1927 "dhcp4_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); } -#line 3195 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3198 "dhcp4_parser.cc" break; case 563: -#line 1930 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1930 "dhcp4_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); } -#line 3203 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3206 "dhcp4_parser.cc" break; case 564: -#line 1933 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1933 "dhcp4_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); } -#line 3211 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3214 "dhcp4_parser.cc" break; case 565: -#line 1936 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1936 "dhcp4_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); } -#line 3219 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3222 "dhcp4_parser.cc" break; case 566: -#line 1939 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1939 "dhcp4_parser.yy" { error(yystack_[0].location, "boolean values for the replace-client-name are " "no longer supported"); } -#line 3228 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3231 "dhcp4_parser.cc" break; case 567: -#line 1945 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1945 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3236 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3239 "dhcp4_parser.cc" break; case 568: -#line 1947 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1947 "dhcp4_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("generated-prefix", s); ctx.leave(); } -#line 3246 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3249 "dhcp4_parser.cc" break; case 569: -#line 1955 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1955 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3254 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3257 "dhcp4_parser.cc" break; case 570: -#line 1957 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1957 "dhcp4_parser.yy" { - ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3263 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3266 "dhcp4_parser.cc" break; case 571: -#line 1962 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1962 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3271 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3274 "dhcp4_parser.cc" break; case 572: -#line 1964 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1964 "dhcp4_parser.yy" { - ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3280 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3283 "dhcp4_parser.cc" break; case 573: -#line 1969 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1969 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3288 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3291 "dhcp4_parser.cc" break; case 574: -#line 1971 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1971 "dhcp4_parser.yy" { - ctx.stack_.back()->set("Control-agent", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3297 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3300 "dhcp4_parser.cc" break; case 575: -#line 1981 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1981 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("Logging", m); ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 3308 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3311 "dhcp4_parser.cc" break; case 576: -#line 1986 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1986 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 3317 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3320 "dhcp4_parser.cc" break; case 577: -#line 1991 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1991 "dhcp4_parser.yy" { // Parse the Logging map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3327 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3330 "dhcp4_parser.cc" break; case 578: -#line 1995 "dhcp4_parser.yy" // lalr1.cc:907 +#line 1995 "dhcp4_parser.yy" { // parsing completed } -#line 3335 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3338 "dhcp4_parser.cc" break; case 582: -#line 2011 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2011 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 3346 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3349 "dhcp4_parser.cc" break; case 583: -#line 2016 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2016 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 3355 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3358 "dhcp4_parser.cc" break; case 586: -#line 2028 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2028 "dhcp4_parser.yy" { ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 3365 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3368 "dhcp4_parser.cc" break; case 587: -#line 2032 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2032 "dhcp4_parser.yy" { ctx.stack_.pop_back(); } -#line 3373 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3376 "dhcp4_parser.cc" break; case 597: -#line 2049 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2049 "dhcp4_parser.yy" { - ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 3382 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3385 "dhcp4_parser.cc" break; case 598: -#line 2054 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2054 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3390 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3393 "dhcp4_parser.cc" break; case 599: -#line 2056 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2056 "dhcp4_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 3400 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3403 "dhcp4_parser.cc" break; case 600: -#line 2062 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2062 "dhcp4_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 3411 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3414 "dhcp4_parser.cc" break; case 601: -#line 2067 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2067 "dhcp4_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 3420 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3423 "dhcp4_parser.cc" break; case 604: -#line 2076 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2076 "dhcp4_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3430 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3433 "dhcp4_parser.cc" break; case 605: -#line 2080 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2080 "dhcp4_parser.yy" { ctx.stack_.pop_back(); } -#line 3438 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3441 "dhcp4_parser.cc" break; case 612: -#line 2094 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2094 "dhcp4_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3446 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3449 "dhcp4_parser.cc" break; case 613: -#line 2096 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2096 "dhcp4_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 3456 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3459 "dhcp4_parser.cc" break; case 614: -#line 2102 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2102 "dhcp4_parser.yy" { - ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 3465 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3468 "dhcp4_parser.cc" break; case 615: -#line 2107 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2107 "dhcp4_parser.yy" { - ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 3474 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3477 "dhcp4_parser.cc" break; case 616: -#line 2112 "dhcp4_parser.yy" // lalr1.cc:907 +#line 2112 "dhcp4_parser.yy" { - ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 3483 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3486 "dhcp4_parser.cc" break; -#line 3487 "dhcp4_parser.cc" // lalr1.cc:907 +#line 3490 "dhcp4_parser.cc" + default: break; } @@ -3491,6 +3495,7 @@ namespace isc { namespace dhcp { #if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); YYERROR; } @@ -3505,6 +3510,7 @@ namespace isc { namespace dhcp { } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ @@ -3541,18 +3547,18 @@ namespace isc { namespace dhcp { | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ if (false) - goto yyerrorlab; + YYERROR; + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); yylen = 0; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ @@ -3593,16 +3599,26 @@ namespace isc { namespace dhcp { } goto yynewstate; - // Accept. + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; - // Abort. + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ yyreturn: if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); @@ -4708,10 +4724,11 @@ namespace isc { namespace dhcp { #endif // PARSER4_DEBUG -#line 14 "dhcp4_parser.yy" // lalr1.cc:1218 +#line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 4714 "dhcp4_parser.cc" // lalr1.cc:1218 -#line 2117 "dhcp4_parser.yy" // lalr1.cc:1219 +#line 4730 "dhcp4_parser.cc" + +#line 2117 "dhcp4_parser.yy" void diff --git a/src/bin/dhcp4/dhcp4_parser.h b/src/bin/dhcp4/dhcp4_parser.h index 40912a7c87..5ecc0e3d9e 100644 --- a/src/bin/dhcp4/dhcp4_parser.h +++ b/src/bin/dhcp4/dhcp4_parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #ifndef YY_PARSER4_DHCP4_PARSER_H_INCLUDED # define YY_PARSER4_DHCP4_PARSER_H_INCLUDED // // "%code requires" blocks. -#line 17 "dhcp4_parser.yy" // lalr1.cc:404 +#line 17 "dhcp4_parser.yy" #include #include @@ -56,7 +56,7 @@ using namespace isc::dhcp; using namespace isc::data; using namespace std; -#line 60 "dhcp4_parser.h" // lalr1.cc:404 +#line 60 "dhcp4_parser.h" # include # include // std::abort @@ -65,8 +65,14 @@ using namespace std; # include # include +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + // Support move semantics when possible. -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS # define YY_MOVE std::move # define YY_MOVE_OR_COPY move # define YY_MOVE_REF(Type) Type&& @@ -79,6 +85,22 @@ using namespace std; # define YY_RVREF(Type) const Type& # define YY_COPY(Type) const Type& #endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif # include "location.hh" #include #ifndef YYASSERT @@ -156,193 +178,80 @@ using namespace std; # endif /* ! defined YYDEBUG */ #endif /* ! defined PARSER4_DEBUG */ -#line 14 "dhcp4_parser.yy" // lalr1.cc:404 +#line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 162 "dhcp4_parser.h" // lalr1.cc:404 - - /// A stack with random access from its top. - template > - class stack - { - public: - // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; - typedef typename S::size_type size_type; - - stack (size_type n = 200) - : seq_ (n) - {} - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (size_type i) - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (int i) - { - return operator[] (size_type (i)); - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - const T& - operator[] (size_type i) const - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - const T& - operator[] (int i) const - { - return operator[] (size_type (i)); - } - - /// Steal the contents of \a t. - /// - /// Close to move-semantics. - void - push (YY_MOVE_REF (T) t) - { - seq_.push_back (T ()); - operator[](0).move (t); - } - - void - pop (int n = 1) - { - for (; 0 < n; --n) - seq_.pop_back (); - } - - void - clear () - { - seq_.clear (); - } - - size_type - size () const - { - return seq_.size (); - } +#line 184 "dhcp4_parser.h" - const_iterator - begin () const - { - return seq_.rbegin (); - } - const_iterator - end () const - { - return seq_.rend (); - } - private: - stack (const stack&); - stack& operator= (const stack&); - /// The wrapped container. - S seq_; - }; - /// Present a slice of the top of a stack. - template > - class slice + /// A Bison parser. + class Dhcp4Parser { public: - slice (const S& stack, int range) - : stack_ (stack) - , range_ (range) - {} - - const T& - operator[] (int i) const - { - return stack_[range_ - i]; - } - - private: - const S& stack_; - int range_; - }; - - - - /// A char[S] buffer to store and retrieve objects. +#ifndef PARSER4_STYPE + /// 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 state. - template - struct variant + /// via the current parser state. + class semantic_type { + public: /// Type of *this. - typedef variant self_type; + typedef semantic_type self_type; /// Empty construction. - variant () + semantic_type () YY_NOEXCEPT : yybuffer_ () , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template - variant (YY_RVREF (T) t) + semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); new (yyas_ ()) T (YY_MOVE (t)); } /// Destruction, allowed only if empty. - ~variant () + ~semantic_type () YY_NOEXCEPT { YYASSERT (!yytypeid_); } - /// Instantiate an empty \a T in here. - template +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template T& - emplace () + emplace (U&&... u) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T (); + return *new (yyas_ ()) T (std::forward (u)...); } - -# if defined __cplusplus && 201103L <= __cplusplus - /// Instantiate a \a T in here from \a t. - template +# else + /// Instantiate an empty \a T in here. + template T& - emplace (U&& u) + emplace () { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T (std::forward (u)); + return *new (yyas_ ()) T (); } -# else + /// Instantiate a \a T in here from \a t. template T& emplace (const T& t) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } @@ -369,75 +278,75 @@ namespace isc { namespace dhcp { /// Accessor to a built \a T. template T& - as () + as () YY_NOEXCEPT { YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& - as () const + as () const YY_NOEXCEPT { YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } - /// Swap the content with \a other, of same type. + /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with - /// variant::move (). + /// self_type::move (). template void - swap (self_type& other) + swap (self_type& that) YY_NOEXCEPT { YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *other.yytypeid_); - std::swap (as (), other.as ()); + YYASSERT (*yytypeid_ == *that.yytypeid_); + std::swap (as (), that.as ()); } - /// Move the content of \a other to this. + /// Move the content of \a that to this. /// - /// Destroys \a other. + /// Destroys \a that. template void - move (self_type& other) + move (self_type& that) { -# if defined __cplusplus && 201103L <= __cplusplus - emplace (std::move (other.as ())); +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); # else emplace (); - swap (other); + swap (that); # endif - other.destroy (); + that.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus - /// Move the content of \a other to this. +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. template void - move (self_type&& other) + move (self_type&& that) { - emplace (std::move (other.as ())); - other.destroy (); + emplace (std::move (that.as ())); + that.destroy (); } #endif - /// Copy the content of \a other to this. + /// Copy the content of \a that to this. template void - copy (const self_type& other) + copy (const self_type& that) { - emplace (other.as ()); + emplace (that.as ()); } /// Destroy the stored \a T. @@ -452,12 +361,12 @@ namespace isc { namespace dhcp { private: /// Prohibit blind copies. self_type& operator= (const self_type&); - variant (const self_type&); + semantic_type (const self_type&); /// Accessor to raw memory as \a T. template T* - yyas_ () + yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); @@ -466,30 +375,12 @@ namespace isc { namespace dhcp { /// Const accessor to raw memory as \a T. template const T* - yyas_ () const + yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } - union - { - /// Strongest alignment constraints. - long double yyalign_me; - /// A buffer large enough to store any of the semantic values. - char yyraw[S]; - } yybuffer_; - - /// Whether the content is built: if defined, the name of the stored type. - const std::type_info *yytypeid_; - }; - - - /// A Bison parser. - class Dhcp4Parser - { - public: -#ifndef PARSER4_STYPE /// An auxiliary type to compute the largest semantic type. union union_type { @@ -514,10 +405,24 @@ namespace isc { namespace dhcp { // "constant string" char dummy5[sizeof (std::string)]; -}; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me; + /// A buffer large enough to store any of the semantic values. + char yyraw[size]; + } yybuffer_; + + /// Whether the content is built: if defined, the name of the stored type. + const std::type_info *yytypeid_; + }; - /// Symbol semantic values. - typedef variant semantic_type; #else typedef PARSER4_STYPE semantic_type; #endif @@ -527,7 +432,18 @@ namespace isc { namespace dhcp { /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { - syntax_error (const location_type& l, const std::string& m); + syntax_error (const location_type& l, const std::string& m) + : std::runtime_error (m) + , location (l) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + , location (s.location) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + location_type location; }; @@ -724,29 +640,155 @@ namespace isc { namespace dhcp { typedef Base super_type; /// Default constructor. - basic_symbol (); - - /// Move or copy constructor. - basic_symbol (YY_RVREF (basic_symbol) other); + basic_symbol () + : value () + , location () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that); +#endif + /// Copy constructor. + basic_symbol (const basic_symbol& that); /// Constructor for valueless symbols, and symbols from each type. - basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l); - +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l) + : Base (t) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const location_type& l) + : Base (t) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif /// Destroy the symbol. - ~basic_symbol (); + ~basic_symbol () + { + clear (); + } /// Destroy contents, and record that is empty. - void clear (); + void clear () + { + // User destructor. + symbol_number_type yytype = this->type_get (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yytype) + { + default: + break; + } + + // Type destructor. +switch (yytype) + { + case 177: // value + case 181: // map_value + case 219: // socket_type + case 222: // outbound_interface_value + case 238: // db_type + case 323: // hr_mode + case 471: // ncr_protocol_value + case 479: // replace_client_name_value + value.template destroy< ElementPtr > (); + break; + + case 161: // "boolean" + value.template destroy< bool > (); + break; + + case 160: // "floating point" + value.template destroy< double > (); + break; + + case 159: // "integer" + value.template destroy< int64_t > (); + break; + + case 158: // "constant string" + value.template destroy< std::string > (); + break; + + default: + break; + } + + Base::clear (); + } /// Whether empty. - bool empty () const; + bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); @@ -758,9 +800,9 @@ namespace isc { namespace dhcp { location_type location; private: -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L /// Assignment operator. - basic_symbol& operator= (const basic_symbol& other); + basic_symbol& operator= (const basic_symbol& that); #endif }; @@ -770,8 +812,13 @@ namespace isc { namespace dhcp { /// Default constructor. by_type (); +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_type (by_type&& that); +#endif + /// Copy constructor. - by_type (const by_type& other); + by_type (const by_type& that); /// The symbol type as needed by the constructor. typedef token_type kind_type; @@ -787,10 +834,10 @@ namespace isc { namespace dhcp { /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The token. - token_type token () const; + token_type token () const YY_NOEXCEPT; /// The symbol type. /// \a empty_symbol when empty. @@ -799,7 +846,81 @@ namespace isc { namespace dhcp { }; /// "External" symbols: returned by the scanner. - typedef basic_symbol symbol_type; + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + + /// Empty symbol. + symbol_type () {} + + /// 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)) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_DHCP_SOCKET_TYPE || tok == token::TOKEN_RAW || tok == token::TOKEN_UDP || tok == token::TOKEN_OUTBOUND_INTERFACE || tok == token::TOKEN_SAME_AS_INBOUND || tok == token::TOKEN_USE_ROUTING || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_ECHO_CLIENT_ID || tok == token::TOKEN_MATCH_CLIENT_ID || tok == token::TOKEN_NEXT_SERVER || tok == token::TOKEN_SERVER_HOSTNAME || tok == token::TOKEN_BOOT_FILE_NAME || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SUBNET4 || tok == token::TOKEN_SUBNET_4O6_INTERFACE || tok == token::TOKEN_SUBNET_4O6_INTERFACE_ID || tok == token::TOKEN_SUBNET_4O6_SUBNET || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_ALL || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_CIRCUIT_ID || tok == token::TOKEN_CLIENT_ID || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_ALWAYS_INCLUDE_FQDN || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP4 || tok == token::TOKEN_SUB_DHCP4 || tok == token::TOKEN_SUB_INTERFACES4 || tok == token::TOKEN_SUB_SUBNET4 || tok == token::TOKEN_SUB_POOL4 || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING); + } +#else + symbol_type (int tok, const location_type& l) + : super_type(token_type (tok), l) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_DHCP_SOCKET_TYPE || tok == token::TOKEN_RAW || tok == token::TOKEN_UDP || tok == token::TOKEN_OUTBOUND_INTERFACE || tok == token::TOKEN_SAME_AS_INBOUND || tok == token::TOKEN_USE_ROUTING || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_ECHO_CLIENT_ID || tok == token::TOKEN_MATCH_CLIENT_ID || tok == token::TOKEN_NEXT_SERVER || tok == token::TOKEN_SERVER_HOSTNAME || tok == token::TOKEN_BOOT_FILE_NAME || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SUBNET4 || tok == token::TOKEN_SUBNET_4O6_INTERFACE || tok == token::TOKEN_SUBNET_4O6_INTERFACE_ID || tok == token::TOKEN_SUBNET_4O6_SUBNET || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_ALL || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_CIRCUIT_ID || tok == token::TOKEN_CLIENT_ID || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_ALWAYS_INCLUDE_FQDN || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP4 || tok == token::TOKEN_SUB_DHCP4 || tok == token::TOKEN_SUB_INTERFACES4 || tok == token::TOKEN_SUB_SUBNET4 || tok == token::TOKEN_SUB_POOL4 || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING); + } +#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)) + { + YYASSERT (tok == token::TOKEN_BOOLEAN); + } +#else + symbol_type (int tok, const bool& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_FLOAT); + } +#else + symbol_type (int tok, const double& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_INTEGER); + } +#else + symbol_type (int tok, const int64_t& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#else + symbol_type (int tok, const std::string& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#endif + }; /// Build a parser object. Dhcp4Parser (isc::dhcp::Parser4Context& ctx_yyarg); @@ -835,2303 +956,3007 @@ namespace isc { namespace dhcp { /// Report a syntax error. void error (const syntax_error& err); - // Symbol constructors declarations. - static - symbol_type - make_END (YY_COPY (location_type) l); - - static - symbol_type - make_COMMA (YY_COPY (location_type) l); - - static - symbol_type - make_COLON (YY_COPY (location_type) l); - - static - symbol_type - make_LSQUARE_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_RSQUARE_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_LCURLY_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_RCURLY_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_NULL_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP4 (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACES_CONFIG (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACES (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP_SOCKET_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_RAW (YY_COPY (location_type) l); - - static - symbol_type - make_UDP (YY_COPY (location_type) l); - - static - symbol_type - make_OUTBOUND_INTERFACE (YY_COPY (location_type) l); - - static - symbol_type - make_SAME_AS_INBOUND (YY_COPY (location_type) l); - - static - symbol_type - make_USE_ROUTING (YY_COPY (location_type) l); - - static - symbol_type - make_RE_DETECT (YY_COPY (location_type) l); - - static - symbol_type - make_ECHO_CLIENT_ID (YY_COPY (location_type) l); - - static - symbol_type - make_MATCH_CLIENT_ID (YY_COPY (location_type) l); - - static - symbol_type - make_NEXT_SERVER (YY_COPY (location_type) l); - - static - symbol_type - make_SERVER_HOSTNAME (YY_COPY (location_type) l); - - static - symbol_type - make_BOOT_FILE_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_LEASE_DATABASE (YY_COPY (location_type) l); - - static - symbol_type - make_HOSTS_DATABASE (YY_COPY (location_type) l); - - static - symbol_type - make_HOSTS_DATABASES (YY_COPY (location_type) l); - - static - symbol_type - make_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_MEMFILE (YY_COPY (location_type) l); - - static - symbol_type - make_MYSQL (YY_COPY (location_type) l); - - static - symbol_type - make_POSTGRESQL (YY_COPY (location_type) l); - - static - symbol_type - make_CQL (YY_COPY (location_type) l); - - static - symbol_type - make_USER (YY_COPY (location_type) l); - - static - symbol_type - make_PASSWORD (YY_COPY (location_type) l); - - static - symbol_type - make_HOST (YY_COPY (location_type) l); - - static - symbol_type - make_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_PERSIST (YY_COPY (location_type) l); - - static - symbol_type - make_LFC_INTERVAL (YY_COPY (location_type) l); - - static - symbol_type - make_READONLY (YY_COPY (location_type) l); - - static - symbol_type - make_CONNECT_TIMEOUT (YY_COPY (location_type) l); - - static - symbol_type - make_CONTACT_POINTS (YY_COPY (location_type) l); - - static - symbol_type - make_KEYSPACE (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_RECONNECT_TRIES (YY_COPY (location_type) l); - - static - symbol_type - make_RECONNECT_WAIT_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_REQUEST_TIMEOUT (YY_COPY (location_type) l); - - static - symbol_type - make_TCP_KEEPALIVE (YY_COPY (location_type) l); - - static - symbol_type - make_TCP_NODELAY (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_ROW_ERRORS (YY_COPY (location_type) l); - - static - symbol_type - make_VALID_LIFETIME (YY_COPY (location_type) l); - - static - symbol_type - make_RENEW_TIMER (YY_COPY (location_type) l); - - static - symbol_type - make_REBIND_TIMER (YY_COPY (location_type) l); - - static - symbol_type - make_DECLINE_PROBATION_PERIOD (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET4 (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET_4O6_INTERFACE (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET_4O6_INTERFACE_ID (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET_4O6_SUBNET (YY_COPY (location_type) l); - - static - symbol_type - make_OPTION_DEF (YY_COPY (location_type) l); - - static - symbol_type - make_OPTION_DATA (YY_COPY (location_type) l); - - static - symbol_type - make_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_DATA (YY_COPY (location_type) l); - - static - symbol_type - make_CODE (YY_COPY (location_type) l); - - static - symbol_type - make_SPACE (YY_COPY (location_type) l); - - static - symbol_type - make_CSV_FORMAT (YY_COPY (location_type) l); - - static - symbol_type - make_ALWAYS_SEND (YY_COPY (location_type) l); - - static - symbol_type - make_RECORD_TYPES (YY_COPY (location_type) l); - - static - symbol_type - make_ENCAPSULATE (YY_COPY (location_type) l); - - static - symbol_type - make_ARRAY (YY_COPY (location_type) l); - - static - symbol_type - make_SHARED_NETWORKS (YY_COPY (location_type) l); - - static - symbol_type - make_POOLS (YY_COPY (location_type) l); - - static - symbol_type - make_POOL (YY_COPY (location_type) l); - - static - symbol_type - make_USER_CONTEXT (YY_COPY (location_type) l); - - static - symbol_type - make_COMMENT (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACE (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACE_ID (YY_COPY (location_type) l); - - static - symbol_type - make_ID (YY_COPY (location_type) l); - - static - symbol_type - make_RAPID_COMMIT (YY_COPY (location_type) l); - - static - symbol_type - make_RESERVATION_MODE (YY_COPY (location_type) l); - - static - symbol_type - make_DISABLED (YY_COPY (location_type) l); - - static - symbol_type - make_OUT_OF_POOL (YY_COPY (location_type) l); - - static - symbol_type - make_ALL (YY_COPY (location_type) l); - - static - symbol_type - make_HOST_RESERVATION_IDENTIFIERS (YY_COPY (location_type) l); - - static - symbol_type - make_CLIENT_CLASSES (YY_COPY (location_type) l); - - static - symbol_type - make_REQUIRE_CLIENT_CLASSES (YY_COPY (location_type) l); - - static - symbol_type - make_TEST (YY_COPY (location_type) l); - - static - symbol_type - make_ONLY_IF_REQUIRED (YY_COPY (location_type) l); - - static - symbol_type - make_CLIENT_CLASS (YY_COPY (location_type) l); - - static - symbol_type - make_RESERVATIONS (YY_COPY (location_type) l); - - static - symbol_type - make_DUID (YY_COPY (location_type) l); - - static - symbol_type - make_HW_ADDRESS (YY_COPY (location_type) l); - - static - symbol_type - make_CIRCUIT_ID (YY_COPY (location_type) l); - - static - symbol_type - make_CLIENT_ID (YY_COPY (location_type) l); - - static - symbol_type - make_HOSTNAME (YY_COPY (location_type) l); - - static - symbol_type - make_FLEX_ID (YY_COPY (location_type) l); - - static - symbol_type - make_RELAY (YY_COPY (location_type) l); - - static - symbol_type - make_IP_ADDRESS (YY_COPY (location_type) l); - - static - symbol_type - make_IP_ADDRESSES (YY_COPY (location_type) l); - - static - symbol_type - make_HOOKS_LIBRARIES (YY_COPY (location_type) l); - - static - symbol_type - make_LIBRARY (YY_COPY (location_type) l); - - static - symbol_type - make_PARAMETERS (YY_COPY (location_type) l); - - static - symbol_type - make_EXPIRED_LEASES_PROCESSING (YY_COPY (location_type) l); - - static - symbol_type - make_RECLAIM_TIMER_WAIT_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_HOLD_RECLAIMED_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_RECLAIM_LEASES (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_RECLAIM_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_UNWARNED_RECLAIM_CYCLES (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP4O6_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_CONTROL_SOCKET (YY_COPY (location_type) l); - - static - symbol_type - make_SOCKET_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_SOCKET_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP_DDNS (YY_COPY (location_type) l); - - static - symbol_type - make_ENABLE_UPDATES (YY_COPY (location_type) l); - - static - symbol_type - make_QUALIFYING_SUFFIX (YY_COPY (location_type) l); - - static - symbol_type - make_SERVER_IP (YY_COPY (location_type) l); - - static - symbol_type - make_SERVER_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_SENDER_IP (YY_COPY (location_type) l); - - static - symbol_type - make_SENDER_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_QUEUE_SIZE (YY_COPY (location_type) l); - - static - symbol_type - make_NCR_PROTOCOL (YY_COPY (location_type) l); - - static - symbol_type - make_NCR_FORMAT (YY_COPY (location_type) l); - - static - symbol_type - make_ALWAYS_INCLUDE_FQDN (YY_COPY (location_type) l); - - static - symbol_type - make_OVERRIDE_NO_UPDATE (YY_COPY (location_type) l); - - static - symbol_type - make_OVERRIDE_CLIENT_UPDATE (YY_COPY (location_type) l); - - static - symbol_type - make_REPLACE_CLIENT_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_GENERATED_PREFIX (YY_COPY (location_type) l); - - static - symbol_type - make_TCP (YY_COPY (location_type) l); - - static - symbol_type - make_JSON (YY_COPY (location_type) l); - - static - symbol_type - make_WHEN_PRESENT (YY_COPY (location_type) l); - - static - symbol_type - make_NEVER (YY_COPY (location_type) l); - - static - symbol_type - make_ALWAYS (YY_COPY (location_type) l); - - static - symbol_type - make_WHEN_NOT_PRESENT (YY_COPY (location_type) l); - - static - symbol_type - make_LOGGING (YY_COPY (location_type) l); - - static - symbol_type - make_LOGGERS (YY_COPY (location_type) l); - - static - symbol_type - make_OUTPUT_OPTIONS (YY_COPY (location_type) l); - - static - symbol_type - make_OUTPUT (YY_COPY (location_type) l); - - static - symbol_type - make_DEBUGLEVEL (YY_COPY (location_type) l); - - static - symbol_type - make_SEVERITY (YY_COPY (location_type) l); - - static - symbol_type - make_FLUSH (YY_COPY (location_type) l); - - static - symbol_type - make_MAXSIZE (YY_COPY (location_type) l); - - static - symbol_type - make_MAXVER (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP6 (YY_COPY (location_type) l); - - static - symbol_type - make_DHCPDDNS (YY_COPY (location_type) l); - - static - symbol_type - make_CONTROL_AGENT (YY_COPY (location_type) l); - - static - symbol_type - make_TOPLEVEL_JSON (YY_COPY (location_type) l); - - static - symbol_type - make_TOPLEVEL_DHCP4 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_DHCP4 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_INTERFACES4 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_SUBNET4 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_POOL4 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_RESERVATION (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_OPTION_DEFS (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_OPTION_DEF (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_OPTION_DATA (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_HOOKS_LIBRARY (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_DHCP_DDNS (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_LOGGING (YY_COPY (location_type) l); - - static - symbol_type - make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l); - - static - symbol_type - make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l); - - static - symbol_type - make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l); - - static - symbol_type - make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l); - - - - private: - /// This class is not copyable. - Dhcp4Parser (const Dhcp4Parser&); - Dhcp4Parser& operator= (const Dhcp4Parser&); - - /// State numbers. - typedef int state_type; - - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; - - /// Compute post-reduction state. - /// \param yystate the current state - /// \param yysym the nonterminal to push on the stack - state_type yy_lr_goto_state_ (state_type yystate, int yysym); - - /// 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); - - /// 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 const short yypact_ninf_; - static const signed char yytable_ninf_; - - /// Convert a scanner token number \a t to a symbol number. - static token_number_type yytranslate_ (token_type t); - - // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - // STATE-NUM. - static const short yypact_[]; - - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - // Performed when YYTABLE does not specify something else to do. Zero - // means the default is an error. - static const unsigned short yydefact_[]; - - // YYPGOTO[NTERM-NUM]. - static const short yypgoto_[]; - - // YYDEFGOTO[NTERM-NUM]. - static const short yydefgoto_[]; - - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - // positive, shift that token. If negative, reduce the rule whose - // number is the opposite. If YYTABLE_NINF, syntax error. - static const unsigned short yytable_[]; - - static const short yycheck_[]; - - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing - // symbol of state STATE-NUM. - static const unsigned short yystos_[]; - - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. - static const unsigned short yyr1_[]; - - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. - static const unsigned char yyr2_[]; - - - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; -#if PARSER4_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. - static const unsigned short yyrline_[]; - /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); - /// Print the state stack on the debug stream. - virtual void yystack_print_ (); - - /// Debugging level. - int yydebug_; - /// Debug stream. - std::ostream* yycdebug_; - - /// \brief Display a symbol type, value and location. - /// \param yyo The output stream. - /// \param yysym The symbol. - template - void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; -#endif - - /// \brief Reclaim the memory associated to a symbol. - /// \param yymsg Why this token is reclaimed. - /// If null, print nothing. - /// \param yysym The symbol. - template - void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; - - private: - /// Type access provider for state based symbols. - struct by_state - { - /// Default constructor. - by_state (); - - /// The symbol type as needed by the constructor. - typedef state_type kind_type; - - /// Constructor. - by_state (kind_type s); - - /// Copy constructor. - by_state (const by_state& other); - - /// Record that this symbol is empty. - void clear (); - - /// Steal the symbol type from \a that. - void move (by_state& that); - - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const; - - /// The state number used to denote an empty symbol. - enum { empty_state = -1 }; - - /// The state. - /// \a empty when empty. - state_type state; - }; - - /// "Internal" symbol: element of the stack. - struct stack_symbol_type : basic_symbol - { - /// Superclass. - typedef basic_symbol super_type; - /// Construct an empty symbol. - stack_symbol_type (); - /// Move or copy construction. - stack_symbol_type (YY_RVREF (stack_symbol_type) that); - /// Steal the contents from \a sym to build this. - stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); -#if !defined __cplusplus || __cplusplus < 201103L - /// Assignment, needed by push_back by some old implementations. - /// Moves the contents of that. - stack_symbol_type& operator= (stack_symbol_type& that); -#endif - }; - - /// Stack type. - typedef stack stack_type; - - /// The stack. - stack_type yystack_; - - /// Push a new state on the stack. - /// \param m a debug message to display - /// if null, no trace is output. - /// \param sym the symbol - /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); - - /// Push a new look ahead token on the state on the stack. - /// \param m a debug message to display - /// if null, no trace is output. - /// \param s the state - /// \param sym the symbol (for its value and location). - /// \warning the contents of \a sym.value is stolen. - 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); - - /// Constants. - enum - { - yyeof_ = 0, - yylast_ = 939, ///< Last index in yytable_. - yynnts_ = 354, ///< Number of nonterminal symbols. - yyfinal_ = 28, ///< Termination state number. - yyterror_ = 1, - yyerrcode_ = 256, - yyntokens_ = 162 ///< Number of tokens. - }; - - - // User arguments. - isc::dhcp::Parser4Context& ctx; - }; - - // Symbol number corresponding to token number t. - inline - Dhcp4Parser::token_number_type - Dhcp4Parser::yytranslate_ (token_type t) - { - static - const token_number_type - translate_table[] = - { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161 - }; - const unsigned user_token_number_max_ = 416; - const token_number_type undef_token_ = 2; - - if (static_cast (t) <= yyeof_) - return yyeof_; - else if (static_cast (t) <= user_token_number_max_) - return translate_table[t]; - else - return undef_token_; - } - - inline - Dhcp4Parser::syntax_error::syntax_error (const location_type& l, const std::string& m) - : std::runtime_error (m) - , location (l) - {} - - // basic_symbol. - template - Dhcp4Parser::basic_symbol::basic_symbol () - : value () - , location () - {} - - template - Dhcp4Parser::basic_symbol::basic_symbol (YY_RVREF (basic_symbol) other) - : Base (YY_MOVE (other)) - , value () - , location (YY_MOVE (other.location)) - { - switch (other.type_get ()) - { - case 177: // value - case 181: // map_value - case 219: // socket_type - case 222: // outbound_interface_value - case 238: // db_type - case 323: // hr_mode - case 471: // ncr_protocol_value - case 479: // replace_client_name_value - value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (other.value)); - break; - - case 161: // "boolean" - value.YY_MOVE_OR_COPY< bool > (YY_MOVE (other.value)); - break; - - case 160: // "floating point" - value.YY_MOVE_OR_COPY< double > (YY_MOVE (other.value)); - break; - - case 159: // "integer" - value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (other.value)); - break; - - case 158: // "constant string" - value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (other.value)); - break; - - default: - break; - } - - } - - - // Implementation of basic_symbol constructor for each type. - template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) - : Base (t) - , location (YY_MOVE (l)) - {} - - template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - - - template - Dhcp4Parser::basic_symbol::~basic_symbol () - { - clear (); - } - - template - void - Dhcp4Parser::basic_symbol::clear () - { - // User destructor. - symbol_number_type yytype = this->type_get (); - basic_symbol& yysym = *this; - (void) yysym; - switch (yytype) - { - default: - break; - } - - // Type destructor. - switch (yytype) - { - case 177: // value - case 181: // map_value - case 219: // socket_type - case 222: // outbound_interface_value - case 238: // db_type - case 323: // hr_mode - case 471: // ncr_protocol_value - case 479: // replace_client_name_value - value.template destroy< ElementPtr > (); - break; - - case 161: // "boolean" - value.template destroy< bool > (); - break; - - case 160: // "floating point" - value.template destroy< double > (); - break; - - case 159: // "integer" - value.template destroy< int64_t > (); - break; - - case 158: // "constant string" - value.template destroy< std::string > (); - break; - - default: - break; - } - - Base::clear (); - } - - template - bool - Dhcp4Parser::basic_symbol::empty () const - { - return Base::type_get () == empty_symbol; - } - - template - void - Dhcp4Parser::basic_symbol::move (basic_symbol& s) - { - super_type::move (s); - switch (this->type_get ()) - { - case 177: // value - case 181: // map_value - case 219: // socket_type - case 222: // outbound_interface_value - case 238: // db_type - case 323: // hr_mode - case 471: // ncr_protocol_value - case 479: // replace_client_name_value - value.move< ElementPtr > (YY_MOVE (s.value)); - break; - - case 161: // "boolean" - value.move< bool > (YY_MOVE (s.value)); - break; - - case 160: // "floating point" - value.move< double > (YY_MOVE (s.value)); - break; - - case 159: // "integer" - value.move< int64_t > (YY_MOVE (s.value)); - break; - - case 158: // "constant string" - value.move< std::string > (YY_MOVE (s.value)); - break; - - default: - break; - } - - location = YY_MOVE (s.location); - } - - // by_type. - inline - Dhcp4Parser::by_type::by_type () - : type (empty_symbol) - {} - - inline - Dhcp4Parser::by_type::by_type (const by_type& other) - : type (other.type) - {} - - inline - Dhcp4Parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) - {} - - inline - void - Dhcp4Parser::by_type::clear () - { - type = empty_symbol; - } - - inline - void - Dhcp4Parser::by_type::move (by_type& that) - { - type = that.type; - that.clear (); - } - - inline - int - Dhcp4Parser::by_type::type_get () const - { - return type; - } - - inline - Dhcp4Parser::token_type - Dhcp4Parser::by_type::token () const - { - // YYTOKNUM[NUM] -- (External) token number corresponding to the - // (internal) symbol number NUM (which must be that of a token). */ - static - const unsigned short - yytoken_number_[] = - { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416 - }; - return static_cast (yytoken_number_[type]); - } - - // Implementation of make_symbol for each symbol type. - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_END (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_END, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_COMMA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_COMMA, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_COLON (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_COLON, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LSQUARE_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LSQUARE_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RSQUARE_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RSQUARE_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LCURLY_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LCURLY_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RCURLY_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RCURLY_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_NULL_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NULL_TYPE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DHCP4 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP4, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_INTERFACES_CONFIG (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACES_CONFIG, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_INTERFACES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACES, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DHCP_SOCKET_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP_SOCKET_TYPE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RAW (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RAW, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_UDP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_UDP, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OUTBOUND_INTERFACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUTBOUND_INTERFACE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SAME_AS_INBOUND (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SAME_AS_INBOUND, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_USE_ROUTING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_USE_ROUTING, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RE_DETECT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RE_DETECT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ECHO_CLIENT_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ECHO_CLIENT_ID, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MATCH_CLIENT_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MATCH_CLIENT_ID, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_NEXT_SERVER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NEXT_SERVER, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SERVER_HOSTNAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SERVER_HOSTNAME, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_BOOT_FILE_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_BOOT_FILE_NAME, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LEASE_DATABASE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LEASE_DATABASE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOSTS_DATABASE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOSTS_DATABASE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOSTS_DATABASES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOSTS_DATABASES, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TYPE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MEMFILE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MEMFILE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MYSQL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MYSQL, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_POSTGRESQL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_POSTGRESQL, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CQL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CQL, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_USER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_USER, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_PASSWORD (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PASSWORD, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOST (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOST, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PORT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_PERSIST (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PERSIST, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LFC_INTERVAL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LFC_INTERVAL, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_READONLY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_READONLY, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CONNECT_TIMEOUT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONNECT_TIMEOUT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CONTACT_POINTS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONTACT_POINTS, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_KEYSPACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_KEYSPACE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAX_RECONNECT_TRIES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_RECONNECT_TRIES, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RECONNECT_WAIT_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RECONNECT_WAIT_TIME, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_REQUEST_TIMEOUT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REQUEST_TIMEOUT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TCP_KEEPALIVE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TCP_KEEPALIVE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TCP_NODELAY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TCP_NODELAY, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAX_ROW_ERRORS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_ROW_ERRORS, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_VALID_LIFETIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_VALID_LIFETIME, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RENEW_TIMER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RENEW_TIMER, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_REBIND_TIMER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REBIND_TIMER, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DECLINE_PROBATION_PERIOD (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUBNET4 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET4, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUBNET_4O6_INTERFACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUBNET_4O6_INTERFACE_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE_ID, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUBNET_4O6_SUBNET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET_4O6_SUBNET, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OPTION_DEF (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OPTION_DEF, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OPTION_DATA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OPTION_DATA, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NAME, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DATA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DATA, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CODE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CODE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SPACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SPACE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CSV_FORMAT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CSV_FORMAT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ALWAYS_SEND (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALWAYS_SEND, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RECORD_TYPES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RECORD_TYPES, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ENCAPSULATE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ENCAPSULATE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ARRAY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ARRAY, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SHARED_NETWORKS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SHARED_NETWORKS, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_POOLS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_POOLS, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_POOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_POOL, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_USER_CONTEXT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_USER_CONTEXT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_COMMENT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_COMMENT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUBNET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_INTERFACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACE, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_INTERFACE_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACE_ID, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ID, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RAPID_COMMIT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RAPID_COMMIT, YY_MOVE (l)); - } - - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RESERVATION_MODE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RESERVATION_MODE, YY_MOVE (l)); - } + // Implementation of make_symbol for each symbol type. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_END (location_type l) + { + return symbol_type (token::TOKEN_END, std::move (l)); + } +#else + static + symbol_type + make_END (const location_type& l) + { + return symbol_type (token::TOKEN_END, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMA (location_type l) + { + return symbol_type (token::TOKEN_COMMA, std::move (l)); + } +#else + static + symbol_type + make_COMMA (const location_type& l) + { + return symbol_type (token::TOKEN_COMMA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COLON (location_type l) + { + return symbol_type (token::TOKEN_COLON, std::move (l)); + } +#else + static + symbol_type + make_COLON (const location_type& l) + { + return symbol_type (token::TOKEN_COLON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NULL_TYPE (location_type l) + { + return symbol_type (token::TOKEN_NULL_TYPE, std::move (l)); + } +#else + static + symbol_type + make_NULL_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_NULL_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4 (location_type l) + { + return symbol_type (token::TOKEN_DHCP4, std::move (l)); + } +#else + static + symbol_type + make_DHCP4 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACES_CONFIG (location_type l) + { + return symbol_type (token::TOKEN_INTERFACES_CONFIG, std::move (l)); + } +#else + static + symbol_type + make_INTERFACES_CONFIG (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACES_CONFIG, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACES (location_type l) + { + return symbol_type (token::TOKEN_INTERFACES, std::move (l)); + } +#else + static + symbol_type + make_INTERFACES (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP_SOCKET_TYPE (location_type l) + { + return symbol_type (token::TOKEN_DHCP_SOCKET_TYPE, std::move (l)); + } +#else + static + symbol_type + make_DHCP_SOCKET_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP_SOCKET_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RAW (location_type l) + { + return symbol_type (token::TOKEN_RAW, std::move (l)); + } +#else + static + symbol_type + make_RAW (const location_type& l) + { + return symbol_type (token::TOKEN_RAW, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UDP (location_type l) + { + return symbol_type (token::TOKEN_UDP, std::move (l)); + } +#else + static + symbol_type + make_UDP (const location_type& l) + { + return symbol_type (token::TOKEN_UDP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTBOUND_INTERFACE (location_type l) + { + return symbol_type (token::TOKEN_OUTBOUND_INTERFACE, std::move (l)); + } +#else + static + symbol_type + make_OUTBOUND_INTERFACE (const location_type& l) + { + return symbol_type (token::TOKEN_OUTBOUND_INTERFACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SAME_AS_INBOUND (location_type l) + { + return symbol_type (token::TOKEN_SAME_AS_INBOUND, std::move (l)); + } +#else + static + symbol_type + make_SAME_AS_INBOUND (const location_type& l) + { + return symbol_type (token::TOKEN_SAME_AS_INBOUND, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USE_ROUTING (location_type l) + { + return symbol_type (token::TOKEN_USE_ROUTING, std::move (l)); + } +#else + static + symbol_type + make_USE_ROUTING (const location_type& l) + { + return symbol_type (token::TOKEN_USE_ROUTING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RE_DETECT (location_type l) + { + return symbol_type (token::TOKEN_RE_DETECT, std::move (l)); + } +#else + static + symbol_type + make_RE_DETECT (const location_type& l) + { + return symbol_type (token::TOKEN_RE_DETECT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ECHO_CLIENT_ID (location_type l) + { + return symbol_type (token::TOKEN_ECHO_CLIENT_ID, std::move (l)); + } +#else + static + symbol_type + make_ECHO_CLIENT_ID (const location_type& l) + { + return symbol_type (token::TOKEN_ECHO_CLIENT_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MATCH_CLIENT_ID (location_type l) + { + return symbol_type (token::TOKEN_MATCH_CLIENT_ID, std::move (l)); + } +#else + static + symbol_type + make_MATCH_CLIENT_ID (const location_type& l) + { + return symbol_type (token::TOKEN_MATCH_CLIENT_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NEXT_SERVER (location_type l) + { + return symbol_type (token::TOKEN_NEXT_SERVER, std::move (l)); + } +#else + static + symbol_type + make_NEXT_SERVER (const location_type& l) + { + return symbol_type (token::TOKEN_NEXT_SERVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SERVER_HOSTNAME (location_type l) + { + return symbol_type (token::TOKEN_SERVER_HOSTNAME, std::move (l)); + } +#else + static + symbol_type + make_SERVER_HOSTNAME (const location_type& l) + { + return symbol_type (token::TOKEN_SERVER_HOSTNAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BOOT_FILE_NAME (location_type l) + { + return symbol_type (token::TOKEN_BOOT_FILE_NAME, std::move (l)); + } +#else + static + symbol_type + make_BOOT_FILE_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_BOOT_FILE_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LEASE_DATABASE (location_type l) + { + return symbol_type (token::TOKEN_LEASE_DATABASE, std::move (l)); + } +#else + static + symbol_type + make_LEASE_DATABASE (const location_type& l) + { + return symbol_type (token::TOKEN_LEASE_DATABASE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTS_DATABASE (location_type l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASE, std::move (l)); + } +#else + static + symbol_type + make_HOSTS_DATABASE (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTS_DATABASES (location_type l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASES, std::move (l)); + } +#else + static + symbol_type + make_HOSTS_DATABASES (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPE (location_type l) + { + return symbol_type (token::TOKEN_TYPE, std::move (l)); + } +#else + static + symbol_type + make_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEMFILE (location_type l) + { + return symbol_type (token::TOKEN_MEMFILE, std::move (l)); + } +#else + static + symbol_type + make_MEMFILE (const location_type& l) + { + return symbol_type (token::TOKEN_MEMFILE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MYSQL (location_type l) + { + return symbol_type (token::TOKEN_MYSQL, std::move (l)); + } +#else + static + symbol_type + make_MYSQL (const location_type& l) + { + return symbol_type (token::TOKEN_MYSQL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POSTGRESQL (location_type l) + { + return symbol_type (token::TOKEN_POSTGRESQL, std::move (l)); + } +#else + static + symbol_type + make_POSTGRESQL (const location_type& l) + { + return symbol_type (token::TOKEN_POSTGRESQL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CQL (location_type l) + { + return symbol_type (token::TOKEN_CQL, std::move (l)); + } +#else + static + symbol_type + make_CQL (const location_type& l) + { + return symbol_type (token::TOKEN_CQL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER (location_type l) + { + return symbol_type (token::TOKEN_USER, std::move (l)); + } +#else + static + symbol_type + make_USER (const location_type& l) + { + return symbol_type (token::TOKEN_USER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PASSWORD (location_type l) + { + return symbol_type (token::TOKEN_PASSWORD, std::move (l)); + } +#else + static + symbol_type + make_PASSWORD (const location_type& l) + { + return symbol_type (token::TOKEN_PASSWORD, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOST (location_type l) + { + return symbol_type (token::TOKEN_HOST, std::move (l)); + } +#else + static + symbol_type + make_HOST (const location_type& l) + { + return symbol_type (token::TOKEN_HOST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PORT (location_type l) + { + return symbol_type (token::TOKEN_PORT, std::move (l)); + } +#else + static + symbol_type + make_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PERSIST (location_type l) + { + return symbol_type (token::TOKEN_PERSIST, std::move (l)); + } +#else + static + symbol_type + make_PERSIST (const location_type& l) + { + return symbol_type (token::TOKEN_PERSIST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LFC_INTERVAL (location_type l) + { + return symbol_type (token::TOKEN_LFC_INTERVAL, std::move (l)); + } +#else + static + symbol_type + make_LFC_INTERVAL (const location_type& l) + { + return symbol_type (token::TOKEN_LFC_INTERVAL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_READONLY (location_type l) + { + return symbol_type (token::TOKEN_READONLY, std::move (l)); + } +#else + static + symbol_type + make_READONLY (const location_type& l) + { + return symbol_type (token::TOKEN_READONLY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONNECT_TIMEOUT (location_type l) + { + return symbol_type (token::TOKEN_CONNECT_TIMEOUT, std::move (l)); + } +#else + static + symbol_type + make_CONNECT_TIMEOUT (const location_type& l) + { + return symbol_type (token::TOKEN_CONNECT_TIMEOUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTACT_POINTS (location_type l) + { + return symbol_type (token::TOKEN_CONTACT_POINTS, std::move (l)); + } +#else + static + symbol_type + make_CONTACT_POINTS (const location_type& l) + { + return symbol_type (token::TOKEN_CONTACT_POINTS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_KEYSPACE (location_type l) + { + return symbol_type (token::TOKEN_KEYSPACE, std::move (l)); + } +#else + static + symbol_type + make_KEYSPACE (const location_type& l) + { + return symbol_type (token::TOKEN_KEYSPACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_RECONNECT_TRIES (location_type l) + { + return symbol_type (token::TOKEN_MAX_RECONNECT_TRIES, std::move (l)); + } +#else + static + symbol_type + make_MAX_RECONNECT_TRIES (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_RECONNECT_TRIES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECONNECT_WAIT_TIME (location_type l) + { + return symbol_type (token::TOKEN_RECONNECT_WAIT_TIME, std::move (l)); + } +#else + static + symbol_type + make_RECONNECT_WAIT_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_RECONNECT_WAIT_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REQUEST_TIMEOUT (location_type l) + { + return symbol_type (token::TOKEN_REQUEST_TIMEOUT, std::move (l)); + } +#else + static + symbol_type + make_REQUEST_TIMEOUT (const location_type& l) + { + return symbol_type (token::TOKEN_REQUEST_TIMEOUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP_KEEPALIVE (location_type l) + { + return symbol_type (token::TOKEN_TCP_KEEPALIVE, std::move (l)); + } +#else + static + symbol_type + make_TCP_KEEPALIVE (const location_type& l) + { + return symbol_type (token::TOKEN_TCP_KEEPALIVE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP_NODELAY (location_type l) + { + return symbol_type (token::TOKEN_TCP_NODELAY, std::move (l)); + } +#else + static + symbol_type + make_TCP_NODELAY (const location_type& l) + { + return symbol_type (token::TOKEN_TCP_NODELAY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_ROW_ERRORS (location_type l) + { + return symbol_type (token::TOKEN_MAX_ROW_ERRORS, std::move (l)); + } +#else + static + symbol_type + make_MAX_ROW_ERRORS (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_ROW_ERRORS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VALID_LIFETIME (location_type l) + { + return symbol_type (token::TOKEN_VALID_LIFETIME, std::move (l)); + } +#else + static + symbol_type + make_VALID_LIFETIME (const location_type& l) + { + return symbol_type (token::TOKEN_VALID_LIFETIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RENEW_TIMER (location_type l) + { + return symbol_type (token::TOKEN_RENEW_TIMER, std::move (l)); + } +#else + static + symbol_type + make_RENEW_TIMER (const location_type& l) + { + return symbol_type (token::TOKEN_RENEW_TIMER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REBIND_TIMER (location_type l) + { + return symbol_type (token::TOKEN_REBIND_TIMER, std::move (l)); + } +#else + static + symbol_type + make_REBIND_TIMER (const location_type& l) + { + return symbol_type (token::TOKEN_REBIND_TIMER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DECLINE_PROBATION_PERIOD (location_type l) + { + return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, std::move (l)); + } +#else + static + symbol_type + make_DECLINE_PROBATION_PERIOD (const location_type& l) + { + return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET4 (location_type l) + { + return symbol_type (token::TOKEN_SUBNET4, std::move (l)); + } +#else + static + symbol_type + make_SUBNET4 (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET_4O6_INTERFACE (location_type l) + { + return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE, std::move (l)); + } +#else + static + symbol_type + make_SUBNET_4O6_INTERFACE (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET_4O6_INTERFACE_ID (location_type l) + { + return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE_ID, std::move (l)); + } +#else + static + symbol_type + make_SUBNET_4O6_INTERFACE_ID (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET_4O6_SUBNET (location_type l) + { + return symbol_type (token::TOKEN_SUBNET_4O6_SUBNET, std::move (l)); + } +#else + static + symbol_type + make_SUBNET_4O6_SUBNET (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET_4O6_SUBNET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTION_DEF (location_type l) + { + return symbol_type (token::TOKEN_OPTION_DEF, std::move (l)); + } +#else + static + symbol_type + make_OPTION_DEF (const location_type& l) + { + return symbol_type (token::TOKEN_OPTION_DEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTION_DATA (location_type l) + { + return symbol_type (token::TOKEN_OPTION_DATA, std::move (l)); + } +#else + static + symbol_type + make_OPTION_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_OPTION_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NAME (location_type l) + { + return symbol_type (token::TOKEN_NAME, std::move (l)); + } +#else + static + symbol_type + make_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DATA (location_type l) + { + return symbol_type (token::TOKEN_DATA, std::move (l)); + } +#else + static + symbol_type + make_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CODE (location_type l) + { + return symbol_type (token::TOKEN_CODE, std::move (l)); + } +#else + static + symbol_type + make_CODE (const location_type& l) + { + return symbol_type (token::TOKEN_CODE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SPACE (location_type l) + { + return symbol_type (token::TOKEN_SPACE, std::move (l)); + } +#else + static + symbol_type + make_SPACE (const location_type& l) + { + return symbol_type (token::TOKEN_SPACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CSV_FORMAT (location_type l) + { + return symbol_type (token::TOKEN_CSV_FORMAT, std::move (l)); + } +#else + static + symbol_type + make_CSV_FORMAT (const location_type& l) + { + return symbol_type (token::TOKEN_CSV_FORMAT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALWAYS_SEND (location_type l) + { + return symbol_type (token::TOKEN_ALWAYS_SEND, std::move (l)); + } +#else + static + symbol_type + make_ALWAYS_SEND (const location_type& l) + { + return symbol_type (token::TOKEN_ALWAYS_SEND, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECORD_TYPES (location_type l) + { + return symbol_type (token::TOKEN_RECORD_TYPES, std::move (l)); + } +#else + static + symbol_type + make_RECORD_TYPES (const location_type& l) + { + return symbol_type (token::TOKEN_RECORD_TYPES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENCAPSULATE (location_type l) + { + return symbol_type (token::TOKEN_ENCAPSULATE, std::move (l)); + } +#else + static + symbol_type + make_ENCAPSULATE (const location_type& l) + { + return symbol_type (token::TOKEN_ENCAPSULATE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ARRAY (location_type l) + { + return symbol_type (token::TOKEN_ARRAY, std::move (l)); + } +#else + static + symbol_type + make_ARRAY (const location_type& l) + { + return symbol_type (token::TOKEN_ARRAY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHARED_NETWORKS (location_type l) + { + return symbol_type (token::TOKEN_SHARED_NETWORKS, std::move (l)); + } +#else + static + symbol_type + make_SHARED_NETWORKS (const location_type& l) + { + return symbol_type (token::TOKEN_SHARED_NETWORKS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POOLS (location_type l) + { + return symbol_type (token::TOKEN_POOLS, std::move (l)); + } +#else + static + symbol_type + make_POOLS (const location_type& l) + { + return symbol_type (token::TOKEN_POOLS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POOL (location_type l) + { + return symbol_type (token::TOKEN_POOL, std::move (l)); + } +#else + static + symbol_type + make_POOL (const location_type& l) + { + return symbol_type (token::TOKEN_POOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER_CONTEXT (location_type l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l)); + } +#else + static + symbol_type + make_USER_CONTEXT (const location_type& l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMENT (location_type l) + { + return symbol_type (token::TOKEN_COMMENT, std::move (l)); + } +#else + static + symbol_type + make_COMMENT (const location_type& l) + { + return symbol_type (token::TOKEN_COMMENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET (location_type l) + { + return symbol_type (token::TOKEN_SUBNET, std::move (l)); + } +#else + static + symbol_type + make_SUBNET (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACE (location_type l) + { + return symbol_type (token::TOKEN_INTERFACE, std::move (l)); + } +#else + static + symbol_type + make_INTERFACE (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACE_ID (location_type l) + { + return symbol_type (token::TOKEN_INTERFACE_ID, std::move (l)); + } +#else + static + symbol_type + make_INTERFACE_ID (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACE_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ID (location_type l) + { + return symbol_type (token::TOKEN_ID, std::move (l)); + } +#else + static + symbol_type + make_ID (const location_type& l) + { + return symbol_type (token::TOKEN_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RAPID_COMMIT (location_type l) + { + return symbol_type (token::TOKEN_RAPID_COMMIT, std::move (l)); + } +#else + static + symbol_type + make_RAPID_COMMIT (const location_type& l) + { + return symbol_type (token::TOKEN_RAPID_COMMIT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RESERVATION_MODE (location_type l) + { + return symbol_type (token::TOKEN_RESERVATION_MODE, std::move (l)); + } +#else + static + symbol_type + make_RESERVATION_MODE (const location_type& l) + { + return symbol_type (token::TOKEN_RESERVATION_MODE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DISABLED (location_type l) + { + return symbol_type (token::TOKEN_DISABLED, std::move (l)); + } +#else + static + symbol_type + make_DISABLED (const location_type& l) + { + return symbol_type (token::TOKEN_DISABLED, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUT_OF_POOL (location_type l) + { + return symbol_type (token::TOKEN_OUT_OF_POOL, std::move (l)); + } +#else + static + symbol_type + make_OUT_OF_POOL (const location_type& l) + { + return symbol_type (token::TOKEN_OUT_OF_POOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALL (location_type l) + { + return symbol_type (token::TOKEN_ALL, std::move (l)); + } +#else + static + symbol_type + make_ALL (const location_type& l) + { + return symbol_type (token::TOKEN_ALL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOST_RESERVATION_IDENTIFIERS (location_type l) + { + return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, std::move (l)); + } +#else + static + symbol_type + make_HOST_RESERVATION_IDENTIFIERS (const location_type& l) + { + return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CLIENT_CLASSES (location_type l) + { + return symbol_type (token::TOKEN_CLIENT_CLASSES, std::move (l)); + } +#else + static + symbol_type + make_CLIENT_CLASSES (const location_type& l) + { + return symbol_type (token::TOKEN_CLIENT_CLASSES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REQUIRE_CLIENT_CLASSES (location_type l) + { + return symbol_type (token::TOKEN_REQUIRE_CLIENT_CLASSES, std::move (l)); + } +#else + static + symbol_type + make_REQUIRE_CLIENT_CLASSES (const location_type& l) + { + return symbol_type (token::TOKEN_REQUIRE_CLIENT_CLASSES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TEST (location_type l) + { + return symbol_type (token::TOKEN_TEST, std::move (l)); + } +#else + static + symbol_type + make_TEST (const location_type& l) + { + return symbol_type (token::TOKEN_TEST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ONLY_IF_REQUIRED (location_type l) + { + return symbol_type (token::TOKEN_ONLY_IF_REQUIRED, std::move (l)); + } +#else + static + symbol_type + make_ONLY_IF_REQUIRED (const location_type& l) + { + return symbol_type (token::TOKEN_ONLY_IF_REQUIRED, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CLIENT_CLASS (location_type l) + { + return symbol_type (token::TOKEN_CLIENT_CLASS, std::move (l)); + } +#else + static + symbol_type + make_CLIENT_CLASS (const location_type& l) + { + return symbol_type (token::TOKEN_CLIENT_CLASS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RESERVATIONS (location_type l) + { + return symbol_type (token::TOKEN_RESERVATIONS, std::move (l)); + } +#else + static + symbol_type + make_RESERVATIONS (const location_type& l) + { + return symbol_type (token::TOKEN_RESERVATIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DUID (location_type l) + { + return symbol_type (token::TOKEN_DUID, std::move (l)); + } +#else + static + symbol_type + make_DUID (const location_type& l) + { + return symbol_type (token::TOKEN_DUID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HW_ADDRESS (location_type l) + { + return symbol_type (token::TOKEN_HW_ADDRESS, std::move (l)); + } +#else + static + symbol_type + make_HW_ADDRESS (const location_type& l) + { + return symbol_type (token::TOKEN_HW_ADDRESS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CIRCUIT_ID (location_type l) + { + return symbol_type (token::TOKEN_CIRCUIT_ID, std::move (l)); + } +#else + static + symbol_type + make_CIRCUIT_ID (const location_type& l) + { + return symbol_type (token::TOKEN_CIRCUIT_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CLIENT_ID (location_type l) + { + return symbol_type (token::TOKEN_CLIENT_ID, std::move (l)); + } +#else + static + symbol_type + make_CLIENT_ID (const location_type& l) + { + return symbol_type (token::TOKEN_CLIENT_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTNAME (location_type l) + { + return symbol_type (token::TOKEN_HOSTNAME, std::move (l)); + } +#else + static + symbol_type + make_HOSTNAME (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTNAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLEX_ID (location_type l) + { + return symbol_type (token::TOKEN_FLEX_ID, std::move (l)); + } +#else + static + symbol_type + make_FLEX_ID (const location_type& l) + { + return symbol_type (token::TOKEN_FLEX_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RELAY (location_type l) + { + return symbol_type (token::TOKEN_RELAY, std::move (l)); + } +#else + static + symbol_type + make_RELAY (const location_type& l) + { + return symbol_type (token::TOKEN_RELAY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IP_ADDRESS (location_type l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l)); + } +#else + static + symbol_type + make_IP_ADDRESS (const location_type& l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IP_ADDRESSES (location_type l) + { + return symbol_type (token::TOKEN_IP_ADDRESSES, std::move (l)); + } +#else + static + symbol_type + make_IP_ADDRESSES (const location_type& l) + { + return symbol_type (token::TOKEN_IP_ADDRESSES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOOKS_LIBRARIES (location_type l) + { + return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l)); + } +#else + static + symbol_type + make_HOOKS_LIBRARIES (const location_type& l) + { + return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LIBRARY (location_type l) + { + return symbol_type (token::TOKEN_LIBRARY, std::move (l)); + } +#else + static + symbol_type + make_LIBRARY (const location_type& l) + { + return symbol_type (token::TOKEN_LIBRARY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARAMETERS (location_type l) + { + return symbol_type (token::TOKEN_PARAMETERS, std::move (l)); + } +#else + static + symbol_type + make_PARAMETERS (const location_type& l) + { + return symbol_type (token::TOKEN_PARAMETERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXPIRED_LEASES_PROCESSING (location_type l) + { + return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, std::move (l)); + } +#else + static + symbol_type + make_EXPIRED_LEASES_PROCESSING (const location_type& l) + { + return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECLAIM_TIMER_WAIT_TIME (location_type l) + { + return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, std::move (l)); + } +#else + static + symbol_type + make_RECLAIM_TIMER_WAIT_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (location_type l) + { + return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, std::move (l)); + } +#else + static + symbol_type + make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOLD_RECLAIMED_TIME (location_type l) + { + return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, std::move (l)); + } +#else + static + symbol_type + make_HOLD_RECLAIMED_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_RECLAIM_LEASES (location_type l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, std::move (l)); + } +#else + static + symbol_type + make_MAX_RECLAIM_LEASES (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_RECLAIM_TIME (location_type l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, std::move (l)); + } +#else + static + symbol_type + make_MAX_RECLAIM_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UNWARNED_RECLAIM_CYCLES (location_type l) + { + return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, std::move (l)); + } +#else + static + symbol_type + make_UNWARNED_RECLAIM_CYCLES (const location_type& l) + { + return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4O6_PORT (location_type l) + { + return symbol_type (token::TOKEN_DHCP4O6_PORT, std::move (l)); + } +#else + static + symbol_type + make_DHCP4O6_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4O6_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_SOCKET (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_SOCKET (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_SOCKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SOCKET_TYPE (location_type l) + { + return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l)); + } +#else + static + symbol_type + make_SOCKET_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_SOCKET_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SOCKET_NAME (location_type l) + { + return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l)); + } +#else + static + symbol_type + make_SOCKET_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_SOCKET_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP_DDNS (location_type l) + { + return symbol_type (token::TOKEN_DHCP_DDNS, std::move (l)); + } +#else + static + symbol_type + make_DHCP_DDNS (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP_DDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENABLE_UPDATES (location_type l) + { + return symbol_type (token::TOKEN_ENABLE_UPDATES, std::move (l)); + } +#else + static + symbol_type + make_ENABLE_UPDATES (const location_type& l) + { + return symbol_type (token::TOKEN_ENABLE_UPDATES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_QUALIFYING_SUFFIX (location_type l) + { + return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, std::move (l)); + } +#else + static + symbol_type + make_QUALIFYING_SUFFIX (const location_type& l) + { + return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SERVER_IP (location_type l) + { + return symbol_type (token::TOKEN_SERVER_IP, std::move (l)); + } +#else + static + symbol_type + make_SERVER_IP (const location_type& l) + { + return symbol_type (token::TOKEN_SERVER_IP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SERVER_PORT (location_type l) + { + return symbol_type (token::TOKEN_SERVER_PORT, std::move (l)); + } +#else + static + symbol_type + make_SERVER_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_SERVER_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SENDER_IP (location_type l) + { + return symbol_type (token::TOKEN_SENDER_IP, std::move (l)); + } +#else + static + symbol_type + make_SENDER_IP (const location_type& l) + { + return symbol_type (token::TOKEN_SENDER_IP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SENDER_PORT (location_type l) + { + return symbol_type (token::TOKEN_SENDER_PORT, std::move (l)); + } +#else + static + symbol_type + make_SENDER_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_SENDER_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_QUEUE_SIZE (location_type l) + { + return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, std::move (l)); + } +#else + static + symbol_type + make_MAX_QUEUE_SIZE (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NCR_PROTOCOL (location_type l) + { + return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l)); + } +#else + static + symbol_type + make_NCR_PROTOCOL (const location_type& l) + { + return symbol_type (token::TOKEN_NCR_PROTOCOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NCR_FORMAT (location_type l) + { + return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l)); + } +#else + static + symbol_type + make_NCR_FORMAT (const location_type& l) + { + return symbol_type (token::TOKEN_NCR_FORMAT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALWAYS_INCLUDE_FQDN (location_type l) + { + return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, std::move (l)); + } +#else + static + symbol_type + make_ALWAYS_INCLUDE_FQDN (const location_type& l) + { + return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OVERRIDE_NO_UPDATE (location_type l) + { + return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, std::move (l)); + } +#else + static + symbol_type + make_OVERRIDE_NO_UPDATE (const location_type& l) + { + return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OVERRIDE_CLIENT_UPDATE (location_type l) + { + return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, std::move (l)); + } +#else + static + symbol_type + make_OVERRIDE_CLIENT_UPDATE (const location_type& l) + { + return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REPLACE_CLIENT_NAME (location_type l) + { + return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, std::move (l)); + } +#else + static + symbol_type + make_REPLACE_CLIENT_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_GENERATED_PREFIX (location_type l) + { + return symbol_type (token::TOKEN_GENERATED_PREFIX, std::move (l)); + } +#else + static + symbol_type + make_GENERATED_PREFIX (const location_type& l) + { + return symbol_type (token::TOKEN_GENERATED_PREFIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP (location_type l) + { + return symbol_type (token::TOKEN_TCP, std::move (l)); + } +#else + static + symbol_type + make_TCP (const location_type& l) + { + return symbol_type (token::TOKEN_TCP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_JSON (location_type l) + { + return symbol_type (token::TOKEN_JSON, std::move (l)); + } +#else + static + symbol_type + make_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WHEN_PRESENT (location_type l) + { + return symbol_type (token::TOKEN_WHEN_PRESENT, std::move (l)); + } +#else + static + symbol_type + make_WHEN_PRESENT (const location_type& l) + { + return symbol_type (token::TOKEN_WHEN_PRESENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NEVER (location_type l) + { + return symbol_type (token::TOKEN_NEVER, std::move (l)); + } +#else + static + symbol_type + make_NEVER (const location_type& l) + { + return symbol_type (token::TOKEN_NEVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALWAYS (location_type l) + { + return symbol_type (token::TOKEN_ALWAYS, std::move (l)); + } +#else + static + symbol_type + make_ALWAYS (const location_type& l) + { + return symbol_type (token::TOKEN_ALWAYS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WHEN_NOT_PRESENT (location_type l) + { + return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, std::move (l)); + } +#else + static + symbol_type + make_WHEN_NOT_PRESENT (const location_type& l) + { + return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGING (location_type l) + { + return symbol_type (token::TOKEN_LOGGING, std::move (l)); + } +#else + static + symbol_type + make_LOGGING (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGERS (location_type l) + { + return symbol_type (token::TOKEN_LOGGERS, std::move (l)); + } +#else + static + symbol_type + make_LOGGERS (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT_OPTIONS (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT_OPTIONS (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEBUGLEVEL (location_type l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l)); + } +#else + static + symbol_type + make_DEBUGLEVEL (const location_type& l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SEVERITY (location_type l) + { + return symbol_type (token::TOKEN_SEVERITY, std::move (l)); + } +#else + static + symbol_type + make_SEVERITY (const location_type& l) + { + return symbol_type (token::TOKEN_SEVERITY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLUSH (location_type l) + { + return symbol_type (token::TOKEN_FLUSH, std::move (l)); + } +#else + static + symbol_type + make_FLUSH (const location_type& l) + { + return symbol_type (token::TOKEN_FLUSH, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXSIZE (location_type l) + { + return symbol_type (token::TOKEN_MAXSIZE, std::move (l)); + } +#else + static + symbol_type + make_MAXSIZE (const location_type& l) + { + return symbol_type (token::TOKEN_MAXSIZE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXVER (location_type l) + { + return symbol_type (token::TOKEN_MAXVER, std::move (l)); + } +#else + static + symbol_type + make_MAXVER (const location_type& l) + { + return symbol_type (token::TOKEN_MAXVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP6 (location_type l) + { + return symbol_type (token::TOKEN_DHCP6, std::move (l)); + } +#else + static + symbol_type + make_DHCP6 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCPDDNS (location_type l) + { + return symbol_type (token::TOKEN_DHCPDDNS, std::move (l)); + } +#else + static + symbol_type + make_DHCPDDNS (const location_type& l) + { + return symbol_type (token::TOKEN_DHCPDDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_AGENT (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_AGENT (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_JSON (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_DHCP4 (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_DHCP4, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_DHCP4 (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_DHCP4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DHCP4 (location_type l) + { + return symbol_type (token::TOKEN_SUB_DHCP4, std::move (l)); + } +#else + static + symbol_type + make_SUB_DHCP4 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DHCP4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_INTERFACES4 (location_type l) + { + return symbol_type (token::TOKEN_SUB_INTERFACES4, std::move (l)); + } +#else + static + symbol_type + make_SUB_INTERFACES4 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_INTERFACES4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_SUBNET4 (location_type l) + { + return symbol_type (token::TOKEN_SUB_SUBNET4, std::move (l)); + } +#else + static + symbol_type + make_SUB_SUBNET4 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_SUBNET4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_POOL4 (location_type l) + { + return symbol_type (token::TOKEN_SUB_POOL4, std::move (l)); + } +#else + static + symbol_type + make_SUB_POOL4 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_POOL4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_RESERVATION (location_type l) + { + return symbol_type (token::TOKEN_SUB_RESERVATION, std::move (l)); + } +#else + static + symbol_type + make_SUB_RESERVATION (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_RESERVATION, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_OPTION_DEFS (location_type l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEFS, std::move (l)); + } +#else + static + symbol_type + make_SUB_OPTION_DEFS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEFS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_OPTION_DEF (location_type l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEF, std::move (l)); + } +#else + static + symbol_type + make_SUB_OPTION_DEF (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_OPTION_DATA (location_type l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DATA, std::move (l)); + } +#else + static + symbol_type + make_SUB_OPTION_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_HOOKS_LIBRARY (location_type l) + { + return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l)); + } +#else + static + symbol_type + make_SUB_HOOKS_LIBRARY (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DHCP_DDNS (location_type l) + { + return symbol_type (token::TOKEN_SUB_DHCP_DDNS, std::move (l)); + } +#else + static + symbol_type + make_SUB_DHCP_DDNS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DHCP_DDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_LOGGING (location_type l) + { + return symbol_type (token::TOKEN_SUB_LOGGING, std::move (l)); + } +#else + static + symbol_type + make_SUB_LOGGING (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_LOGGING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v, location_type l) + { + return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_STRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_STRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTEGER (int64_t v, location_type l) + { + return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_INTEGER (const int64_t& v, const location_type& l) + { + return symbol_type (token::TOKEN_INTEGER, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v, location_type l) + { + return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_FLOAT (const double& v, const location_type& l) + { + return symbol_type (token::TOKEN_FLOAT, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BOOLEAN (bool v, location_type l) + { + return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_BOOLEAN (const bool& v, const location_type& l) + { + return symbol_type (token::TOKEN_BOOLEAN, v, l); + } +#endif - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DISABLED (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DISABLED, YY_MOVE (l)); - } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OUT_OF_POOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUT_OF_POOL, YY_MOVE (l)); - } + private: + /// This class is not copyable. + Dhcp4Parser (const Dhcp4Parser&); + Dhcp4Parser& operator= (const Dhcp4Parser&); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ALL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALL, YY_MOVE (l)); - } + /// State numbers. + typedef int state_type; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOST_RESERVATION_IDENTIFIERS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, YY_MOVE (l)); - } + /// Generate an error message. + /// \param yystate the state where the error occurred. + /// \param yyla the lookahead token. + virtual std::string yysyntax_error_ (state_type yystate, + const symbol_type& yyla) const; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CLIENT_CLASSES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CLIENT_CLASSES, YY_MOVE (l)); - } + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + state_type yy_lr_goto_state_ (state_type yystate, int yysym); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_REQUIRE_CLIENT_CLASSES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REQUIRE_CLIENT_CLASSES, YY_MOVE (l)); - } + /// 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); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TEST (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TEST, YY_MOVE (l)); - } + /// 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); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ONLY_IF_REQUIRED (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ONLY_IF_REQUIRED, YY_MOVE (l)); - } + static const short yypact_ninf_; + static const signed char yytable_ninf_; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CLIENT_CLASS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CLIENT_CLASS, YY_MOVE (l)); - } + /// Convert a scanner token number \a t to a symbol number. + static token_number_type yytranslate_ (token_type t); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RESERVATIONS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RESERVATIONS, YY_MOVE (l)); - } + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DUID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DUID, YY_MOVE (l)); - } + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const unsigned short yydefact_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HW_ADDRESS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HW_ADDRESS, YY_MOVE (l)); - } + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CIRCUIT_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CIRCUIT_ID, YY_MOVE (l)); - } + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CLIENT_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CLIENT_ID, YY_MOVE (l)); - } + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const unsigned short yytable_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOSTNAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOSTNAME, YY_MOVE (l)); - } + static const short yycheck_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_FLEX_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_FLEX_ID, YY_MOVE (l)); - } + // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // symbol of state STATE-NUM. + static const unsigned short yystos_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RELAY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RELAY, YY_MOVE (l)); - } + // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + static const unsigned short yyr1_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_IP_ADDRESS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_IP_ADDRESS, YY_MOVE (l)); - } + // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + static const unsigned char yyr2_[]; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_IP_ADDRESSES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_IP_ADDRESSES, YY_MOVE (l)); - } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOOKS_LIBRARIES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOOKS_LIBRARIES, YY_MOVE (l)); - } + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *n); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LIBRARY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LIBRARY, YY_MOVE (l)); - } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_PARAMETERS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PARAMETERS, YY_MOVE (l)); - } + /// For a symbol, its name in clear. + static const char* const yytname_[]; +#if PARSER4_DEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const unsigned short yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r); + /// Print the state stack on the debug stream. + virtual void yystack_print_ (); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_EXPIRED_LEASES_PROCESSING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, YY_MOVE (l)); - } + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_RECLAIM_TIMER_WAIT_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, YY_MOVE (l)); - } + /// \brief Display a symbol type, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, YY_MOVE (l)); - } + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_HOLD_RECLAIMED_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, YY_MOVE (l)); - } + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAX_RECLAIM_LEASES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, YY_MOVE (l)); - } + /// The symbol type as needed by the constructor. + typedef state_type kind_type; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAX_RECLAIM_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, YY_MOVE (l)); - } + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_UNWARNED_RECLAIM_CYCLES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, YY_MOVE (l)); - } + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DHCP4O6_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP4O6_PORT, YY_MOVE (l)); - } + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CONTROL_SOCKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONTROL_SOCKET, YY_MOVE (l)); - } + /// Steal the symbol type from \a that. + void move (by_state& that); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SOCKET_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SOCKET_TYPE, YY_MOVE (l)); - } + /// The (internal) type number (corresponding to \a state). + /// \a empty_symbol when empty. + symbol_number_type type_get () const YY_NOEXCEPT; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SOCKET_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SOCKET_NAME, YY_MOVE (l)); - } + /// The state number used to denote an empty symbol. + enum { empty_state = -1 }; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DHCP_DDNS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP_DDNS, YY_MOVE (l)); - } + /// The state. + /// \a empty when empty. + state_type state; + }; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ENABLE_UPDATES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ENABLE_UPDATES, YY_MOVE (l)); - } + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); +#endif + }; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_QUALIFYING_SUFFIX (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, YY_MOVE (l)); - } + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::reverse_iterator iterator; + typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::size_type size_type; + + stack (size_type n = 200) + : seq_ (n) + {} + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (size_type i) + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (int i) + { + return operator[] (size_type (i)); + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (size_type i) const + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (int i) const + { + return operator[] (size_type (i)); + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SERVER_IP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SERVER_IP, YY_MOVE (l)); - } + /// Pop elements from the stack. + void + pop (int n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SERVER_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SERVER_PORT, YY_MOVE (l)); - } + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SENDER_IP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SENDER_IP, YY_MOVE (l)); - } + /// Number of elements on the stack. + size_type + size () const YY_NOEXCEPT + { + return seq_.size (); + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SENDER_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SENDER_PORT, YY_MOVE (l)); - } + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.rbegin (); + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAX_QUEUE_SIZE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, YY_MOVE (l)); - } + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.rend (); + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_NCR_PROTOCOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NCR_PROTOCOL, YY_MOVE (l)); - } + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, int range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (int i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + int range_; + }; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_NCR_FORMAT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NCR_FORMAT, YY_MOVE (l)); - } + private: + stack (const stack&); + stack& operator= (const stack&); + /// The wrapped container. + S seq_; + }; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ALWAYS_INCLUDE_FQDN (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, YY_MOVE (l)); - } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OVERRIDE_NO_UPDATE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, YY_MOVE (l)); - } + /// Stack type. + typedef stack stack_type; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OVERRIDE_CLIENT_UPDATE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, YY_MOVE (l)); - } + /// The stack. + stack_type yystack_; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_REPLACE_CLIENT_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, YY_MOVE (l)); - } + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_GENERATED_PREFIX (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_GENERATED_PREFIX, YY_MOVE (l)); - } + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TCP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TCP, YY_MOVE (l)); - } + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_JSON (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_JSON, YY_MOVE (l)); - } + /// Constants. + enum + { + yyeof_ = 0, + yylast_ = 939, ///< Last index in yytable_. + yynnts_ = 354, ///< Number of nonterminal symbols. + yyfinal_ = 28, ///< Termination state number. + yyterror_ = 1, + yyerrcode_ = 256, + yyntokens_ = 162 ///< Number of tokens. + }; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_WHEN_PRESENT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_WHEN_PRESENT, YY_MOVE (l)); - } + + // User arguments. + isc::dhcp::Parser4Context& ctx; + }; inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_NEVER (YY_COPY (location_type) l) + Dhcp4Parser::token_number_type + Dhcp4Parser::yytranslate_ (token_type t) { - return symbol_type (token::TOKEN_NEVER, YY_MOVE (l)); - } + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const token_number_type + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161 + }; + const unsigned user_token_number_max_ = 416; + const token_number_type undef_token_ = 2; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_ALWAYS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALWAYS, YY_MOVE (l)); + if (static_cast (t) <= yyeof_) + return yyeof_; + else if (static_cast (t) <= user_token_number_max_) + return translate_table[t]; + else + return undef_token_; } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_WHEN_NOT_PRESENT (YY_COPY (location_type) l) + // basic_symbol. +#if 201103L <= YY_CPLUSPLUS + template + Dhcp4Parser::basic_symbol::basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) { - return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, YY_MOVE (l)); - } + switch (this->type_get ()) + { + case 177: // value + case 181: // map_value + case 219: // socket_type + case 222: // outbound_interface_value + case 238: // db_type + case 323: // hr_mode + case 471: // ncr_protocol_value + case 479: // replace_client_name_value + value.move< ElementPtr > (std::move (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LOGGING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LOGGING, YY_MOVE (l)); - } + case 161: // "boolean" + value.move< bool > (std::move (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_LOGGERS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LOGGERS, YY_MOVE (l)); - } + case 160: // "floating point" + value.move< double > (std::move (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OUTPUT_OPTIONS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUTPUT_OPTIONS, YY_MOVE (l)); - } + case 159: // "integer" + value.move< int64_t > (std::move (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_OUTPUT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUTPUT, YY_MOVE (l)); - } + case 158: // "constant string" + value.move< std::string > (std::move (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DEBUGLEVEL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DEBUGLEVEL, YY_MOVE (l)); - } + default: + break; + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SEVERITY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SEVERITY, YY_MOVE (l)); } +#endif - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_FLUSH (YY_COPY (location_type) l) + template + Dhcp4Parser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + , location (that.location) { - return symbol_type (token::TOKEN_FLUSH, YY_MOVE (l)); - } + switch (this->type_get ()) + { + case 177: // value + case 181: // map_value + case 219: // socket_type + case 222: // outbound_interface_value + case 238: // db_type + case 323: // hr_mode + case 471: // ncr_protocol_value + case 479: // replace_client_name_value + value.copy< ElementPtr > (YY_MOVE (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAXSIZE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAXSIZE, YY_MOVE (l)); - } + case 161: // "boolean" + value.copy< bool > (YY_MOVE (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_MAXVER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAXVER, YY_MOVE (l)); - } + case 160: // "floating point" + value.copy< double > (YY_MOVE (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DHCP6 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP6, YY_MOVE (l)); - } + case 159: // "integer" + value.copy< int64_t > (YY_MOVE (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_DHCPDDNS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCPDDNS, YY_MOVE (l)); - } + case 158: // "constant string" + value.copy< std::string > (YY_MOVE (that.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_CONTROL_AGENT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONTROL_AGENT, YY_MOVE (l)); - } + default: + break; + } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TOPLEVEL_JSON (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TOPLEVEL_JSON, YY_MOVE (l)); } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_TOPLEVEL_DHCP4 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TOPLEVEL_DHCP4, YY_MOVE (l)); - } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_DHCP4 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_DHCP4, YY_MOVE (l)); - } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_INTERFACES4 (YY_COPY (location_type) l) + template + bool + Dhcp4Parser::basic_symbol::empty () const YY_NOEXCEPT { - return symbol_type (token::TOKEN_SUB_INTERFACES4, YY_MOVE (l)); + return Base::type_get () == empty_symbol; } - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_SUBNET4 (YY_COPY (location_type) l) + template + void + Dhcp4Parser::basic_symbol::move (basic_symbol& s) { - return symbol_type (token::TOKEN_SUB_SUBNET4, YY_MOVE (l)); - } + super_type::move (s); + switch (this->type_get ()) + { + case 177: // value + case 181: // map_value + case 219: // socket_type + case 222: // outbound_interface_value + case 238: // db_type + case 323: // hr_mode + case 471: // ncr_protocol_value + case 479: // replace_client_name_value + value.move< ElementPtr > (YY_MOVE (s.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_POOL4 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_POOL4, YY_MOVE (l)); - } + case 161: // "boolean" + value.move< bool > (YY_MOVE (s.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_RESERVATION (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_RESERVATION, YY_MOVE (l)); - } + case 160: // "floating point" + value.move< double > (YY_MOVE (s.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_OPTION_DEFS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_OPTION_DEFS, YY_MOVE (l)); - } + case 159: // "integer" + value.move< int64_t > (YY_MOVE (s.value)); + break; - inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_OPTION_DEF (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_OPTION_DEF, YY_MOVE (l)); + case 158: // "constant string" + value.move< std::string > (YY_MOVE (s.value)); + break; + + default: + break; + } + + location = YY_MOVE (s.location); } + // by_type. inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_OPTION_DATA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_OPTION_DATA, YY_MOVE (l)); - } + Dhcp4Parser::by_type::by_type () + : type (empty_symbol) + {} +#if 201103L <= YY_CPLUSPLUS inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_HOOKS_LIBRARY (YY_COPY (location_type) l) + Dhcp4Parser::by_type::by_type (by_type&& that) + : type (that.type) { - return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, YY_MOVE (l)); + that.clear (); } +#endif inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_DHCP_DDNS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_DHCP_DDNS, YY_MOVE (l)); - } + Dhcp4Parser::by_type::by_type (const by_type& that) + : type (that.type) + {} inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_SUB_LOGGING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_LOGGING, YY_MOVE (l)); - } + Dhcp4Parser::by_type::by_type (token_type t) + : type (yytranslate_ (t)) + {} inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l) + void + Dhcp4Parser::by_type::clear () { - return symbol_type (token::TOKEN_STRING, YY_MOVE (v), YY_MOVE (l)); + type = empty_symbol; } inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l) + void + Dhcp4Parser::by_type::move (by_type& that) { - return symbol_type (token::TOKEN_INTEGER, YY_MOVE (v), YY_MOVE (l)); + type = that.type; + that.clear (); } inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l) + int + Dhcp4Parser::by_type::type_get () const YY_NOEXCEPT { - return symbol_type (token::TOKEN_FLOAT, YY_MOVE (v), YY_MOVE (l)); + return type; } inline - Dhcp4Parser::symbol_type - Dhcp4Parser::make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l) + Dhcp4Parser::token_type + Dhcp4Parser::by_type::token () const YY_NOEXCEPT { - return symbol_type (token::TOKEN_BOOLEAN, YY_MOVE (v), YY_MOVE (l)); + // YYTOKNUM[NUM] -- (External) token number corresponding to the + // (internal) symbol number NUM (which must be that of a token). */ + static + const unsigned short + yytoken_number_[] = + { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416 + }; + return token_type (yytoken_number_[type]); } - -#line 14 "dhcp4_parser.yy" // lalr1.cc:404 +#line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 3135 "dhcp4_parser.h" // lalr1.cc:404 +#line 3959 "dhcp4_parser.h" + diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index b433b3e427..74a2551d2c 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/dhcp4/kea-dhcp4.xml b/src/bin/dhcp4/kea-dhcp4.xml index cf501eb8dc..ccc20ff638 100644 --- a/src/bin/dhcp4/kea-dhcp4.xml +++ b/src/bin/dhcp4/kea-dhcp4.xml @@ -10,8 +10,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin @@ -35,7 +35,7 @@ - 2011-2018 + 2011-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/dhcp4/location.hh b/src/bin/dhcp4/location.hh index a5fb10e935..0a1ccfaab5 100644 --- a/src/bin/dhcp4/location.hh +++ b/src/bin/dhcp4/location.hh @@ -1,8 +1,9 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -54,9 +55,10 @@ # endif # endif -#line 14 "dhcp4_parser.yy" // location.cc:339 +#line 14 "dhcp4_parser.yy" namespace isc { namespace dhcp { -#line 60 "location.hh" // location.cc:339 +#line 60 "location.hh" + /// A point in a source file. class position { @@ -316,7 +318,8 @@ namespace isc { namespace dhcp { return ostr; } -#line 14 "dhcp4_parser.yy" // location.cc:339 +#line 14 "dhcp4_parser.yy" } } // isc::dhcp -#line 322 "location.hh" // location.cc:339 +#line 323 "location.hh" + #endif // !YY_PARSER4_LOCATION_HH_INCLUDED diff --git a/src/bin/dhcp4/position.hh b/src/bin/dhcp4/position.hh index 22ef35f744..23536ce47f 100644 --- a/src/bin/dhcp4/position.hh +++ b/src/bin/dhcp4/position.hh @@ -1,4 +1,5 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/dhcp4/stack.hh b/src/bin/dhcp4/stack.hh index 81e152d836..b90e3e2e0c 100644 --- a/src/bin/dhcp4/stack.hh +++ b/src/bin/dhcp4/stack.hh @@ -1,4 +1,5 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/bin/dhcp6/dhcp6_parser.cc b/src/bin/dhcp6/dhcp6_parser.cc index 309a743873..d28db763b0 100644 --- a/src/bin/dhcp6/dhcp6_parser.cc +++ b/src/bin/dhcp6/dhcp6_parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -43,11 +43,11 @@ // Unqualified %code blocks. -#line 34 "dhcp6_parser.yy" // lalr1.cc:438 +#line 34 "dhcp6_parser.yy" #include -#line 51 "dhcp6_parser.cc" // lalr1.cc:438 +#line 51 "dhcp6_parser.cc" #ifndef YY_ @@ -88,7 +88,7 @@ { \ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ } \ - while (/*CONSTCOND*/ false) + while (false) # endif @@ -140,9 +140,10 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "dhcp6_parser.yy" // lalr1.cc:513 +#line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 146 "dhcp6_parser.cc" // lalr1.cc:513 +#line 146 "dhcp6_parser.cc" + /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is @@ -154,7 +155,7 @@ namespace isc { namespace dhcp { { if (*yystr == '"') { - std::string yyr = ""; + std::string yyr; char const *yyp = yystr; for (;;) @@ -167,7 +168,10 @@ namespace isc { namespace dhcp { case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - // Fall through. + else + goto append; + + append: default: yyr += *yyp; break; @@ -195,6 +199,8 @@ namespace isc { namespace dhcp { Dhcp6Parser::~Dhcp6Parser () {} + Dhcp6Parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} /*---------------. | Symbol types. | @@ -203,16 +209,16 @@ namespace isc { namespace dhcp { // by_state. - Dhcp6Parser::by_state::by_state () + Dhcp6Parser::by_state::by_state () YY_NOEXCEPT : state (empty_state) {} - Dhcp6Parser::by_state::by_state (const by_state& other) - : state (other.state) + Dhcp6Parser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) {} void - Dhcp6Parser::by_state::clear () + Dhcp6Parser::by_state::clear () YY_NOEXCEPT { state = empty_state; } @@ -224,12 +230,12 @@ namespace isc { namespace dhcp { that.clear (); } - Dhcp6Parser::by_state::by_state (state_type s) + Dhcp6Parser::by_state::by_state (state_type s) YY_NOEXCEPT : state (s) {} Dhcp6Parser::symbol_number_type - Dhcp6Parser::by_state::type_get () const + Dhcp6Parser::by_state::type_get () const YY_NOEXCEPT { if (state == empty_state) return empty_symbol; @@ -275,7 +281,7 @@ namespace isc { namespace dhcp { break; } -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif @@ -320,7 +326,7 @@ namespace isc { namespace dhcp { that.type = empty_symbol; } -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L Dhcp6Parser::stack_symbol_type& Dhcp6Parser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -381,93 +387,83 @@ namespace isc { namespace dhcp { std::ostream& yyoutput = yyo; YYUSE (yyoutput); symbol_number_type yytype = yysym.type_get (); +#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 // Avoid a (spurious) G++ 4.8 warning about "array subscript is // below array bounds". if (yysym.empty ()) std::abort (); +#endif yyo << (yytype < yyntokens_ ? "token" : "nterm") << ' ' << yytname_[yytype] << " (" << yysym.location << ": "; switch (yytype) { - case 162: // "constant string" - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< std::string > (); } -#line 398 "dhcp6_parser.cc" // lalr1.cc:672 + case 162: // "constant string" +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 405 "dhcp6_parser.cc" break; case 163: // "integer" - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< int64_t > (); } -#line 405 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < int64_t > (); } +#line 411 "dhcp6_parser.cc" break; case 164: // "floating point" - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< double > (); } -#line 412 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < double > (); } +#line 417 "dhcp6_parser.cc" break; case 165: // "boolean" - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< bool > (); } -#line 419 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < bool > (); } +#line 423 "dhcp6_parser.cc" break; case 182: // value - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 426 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 429 "dhcp6_parser.cc" break; case 186: // map_value - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 433 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 435 "dhcp6_parser.cc" break; case 236: // db_type - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 440 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 441 "dhcp6_parser.cc" break; case 320: // hr_mode - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 447 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 447 "dhcp6_parser.cc" break; case 456: // duid_type - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 454 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 453 "dhcp6_parser.cc" break; case 489: // ncr_protocol_value - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 461 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 459 "dhcp6_parser.cc" break; case 497: // replace_client_name_value - -#line 238 "dhcp6_parser.yy" // lalr1.cc:672 - { yyoutput << yysym.value.template as< ElementPtr > (); } -#line 468 "dhcp6_parser.cc" // lalr1.cc:672 +#line 238 "dhcp6_parser.yy" + { yyoutput << yysym.value.template as < ElementPtr > (); } +#line 465 "dhcp6_parser.cc" break; - default: break; } @@ -486,7 +482,7 @@ namespace isc { namespace dhcp { void Dhcp6Parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) { -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS yypush_ (m, stack_symbol_type (s, std::move (sym))); #else stack_symbol_type ss (s, sym); @@ -590,17 +586,22 @@ namespace isc { namespace dhcp { yystack_.clear (); yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); - // A new symbol was pushed on the stack. + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; // Accept? if (yystack_[0].state == yyfinal_) - goto yyacceptlab; + YYACCEPT; goto yybackup; - // Backup. + + /*-----------. + | yybackup. | + `-----------*/ yybackup: // Try to take a decision without lookahead. yyn = yypact_[yystack_[0].state]; @@ -621,6 +622,7 @@ namespace isc { namespace dhcp { #if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); goto yyerrlab1; } @@ -652,6 +654,7 @@ namespace isc { namespace dhcp { yypush_ ("Shifting", yyn, YY_MOVE (yyla)); goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -661,8 +664,9 @@ namespace isc { namespace dhcp { goto yyerrlab; goto yyreduce; + /*-----------------------------. - | yyreduce -- Do a reduction. | + | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: yylen = yyr2_[yyn]; @@ -707,8 +711,8 @@ namespace isc { namespace dhcp { // Default location. { - slice slice (yystack_, yylen); - YYLLOC_DEFAULT (yylhs.location, slice, yylen); + stack_type::slice range (yystack_, yylen); + YYLLOC_DEFAULT (yylhs.location, range, yylen); yyerror_range[1].location = yylhs.location; } @@ -721,280 +725,280 @@ namespace isc { namespace dhcp { switch (yyn) { case 2: -#line 247 "dhcp6_parser.yy" // lalr1.cc:907 +#line 247 "dhcp6_parser.yy" { ctx.ctx_ = ctx.NO_KEYWORD; } -#line 727 "dhcp6_parser.cc" // lalr1.cc:907 +#line 731 "dhcp6_parser.cc" break; case 4: -#line 248 "dhcp6_parser.yy" // lalr1.cc:907 +#line 248 "dhcp6_parser.yy" { ctx.ctx_ = ctx.CONFIG; } -#line 733 "dhcp6_parser.cc" // lalr1.cc:907 +#line 737 "dhcp6_parser.cc" break; case 6: -#line 249 "dhcp6_parser.yy" // lalr1.cc:907 +#line 249 "dhcp6_parser.yy" { ctx.ctx_ = ctx.DHCP6; } -#line 739 "dhcp6_parser.cc" // lalr1.cc:907 +#line 743 "dhcp6_parser.cc" break; case 8: -#line 250 "dhcp6_parser.yy" // lalr1.cc:907 +#line 250 "dhcp6_parser.yy" { ctx.ctx_ = ctx.INTERFACES_CONFIG; } -#line 745 "dhcp6_parser.cc" // lalr1.cc:907 +#line 749 "dhcp6_parser.cc" break; case 10: -#line 251 "dhcp6_parser.yy" // lalr1.cc:907 +#line 251 "dhcp6_parser.yy" { ctx.ctx_ = ctx.SUBNET6; } -#line 751 "dhcp6_parser.cc" // lalr1.cc:907 +#line 755 "dhcp6_parser.cc" break; case 12: -#line 252 "dhcp6_parser.yy" // lalr1.cc:907 +#line 252 "dhcp6_parser.yy" { ctx.ctx_ = ctx.POOLS; } -#line 757 "dhcp6_parser.cc" // lalr1.cc:907 +#line 761 "dhcp6_parser.cc" break; case 14: -#line 253 "dhcp6_parser.yy" // lalr1.cc:907 +#line 253 "dhcp6_parser.yy" { ctx.ctx_ = ctx.PD_POOLS; } -#line 763 "dhcp6_parser.cc" // lalr1.cc:907 +#line 767 "dhcp6_parser.cc" break; case 16: -#line 254 "dhcp6_parser.yy" // lalr1.cc:907 +#line 254 "dhcp6_parser.yy" { ctx.ctx_ = ctx.RESERVATIONS; } -#line 769 "dhcp6_parser.cc" // lalr1.cc:907 +#line 773 "dhcp6_parser.cc" break; case 18: -#line 255 "dhcp6_parser.yy" // lalr1.cc:907 +#line 255 "dhcp6_parser.yy" { ctx.ctx_ = ctx.DHCP6; } -#line 775 "dhcp6_parser.cc" // lalr1.cc:907 +#line 779 "dhcp6_parser.cc" break; case 20: -#line 256 "dhcp6_parser.yy" // lalr1.cc:907 +#line 256 "dhcp6_parser.yy" { ctx.ctx_ = ctx.OPTION_DEF; } -#line 781 "dhcp6_parser.cc" // lalr1.cc:907 +#line 785 "dhcp6_parser.cc" break; case 22: -#line 257 "dhcp6_parser.yy" // lalr1.cc:907 +#line 257 "dhcp6_parser.yy" { ctx.ctx_ = ctx.OPTION_DATA; } -#line 787 "dhcp6_parser.cc" // lalr1.cc:907 +#line 791 "dhcp6_parser.cc" break; case 24: -#line 258 "dhcp6_parser.yy" // lalr1.cc:907 +#line 258 "dhcp6_parser.yy" { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } -#line 793 "dhcp6_parser.cc" // lalr1.cc:907 +#line 797 "dhcp6_parser.cc" break; case 26: -#line 259 "dhcp6_parser.yy" // lalr1.cc:907 +#line 259 "dhcp6_parser.yy" { ctx.ctx_ = ctx.DHCP_DDNS; } -#line 799 "dhcp6_parser.cc" // lalr1.cc:907 +#line 803 "dhcp6_parser.cc" break; case 28: -#line 260 "dhcp6_parser.yy" // lalr1.cc:907 +#line 260 "dhcp6_parser.yy" { ctx.ctx_ = ctx.LOGGING; } -#line 805 "dhcp6_parser.cc" // lalr1.cc:907 +#line 809 "dhcp6_parser.cc" break; case 30: -#line 268 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); } -#line 811 "dhcp6_parser.cc" // lalr1.cc:907 +#line 268 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); } +#line 815 "dhcp6_parser.cc" break; case 31: -#line 269 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); } -#line 817 "dhcp6_parser.cc" // lalr1.cc:907 +#line 269 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as < double > (), ctx.loc2pos(yystack_[0].location))); } +#line 821 "dhcp6_parser.cc" break; case 32: -#line 270 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); } -#line 823 "dhcp6_parser.cc" // lalr1.cc:907 +#line 270 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); } +#line 827 "dhcp6_parser.cc" break; case 33: -#line 271 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); } -#line 829 "dhcp6_parser.cc" // lalr1.cc:907 +#line 271 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); } +#line 833 "dhcp6_parser.cc" break; case 34: -#line 272 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } -#line 835 "dhcp6_parser.cc" // lalr1.cc:907 +#line 272 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); } +#line 839 "dhcp6_parser.cc" break; case 35: -#line 273 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 841 "dhcp6_parser.cc" // lalr1.cc:907 +#line 273 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 845 "dhcp6_parser.cc" break; case 36: -#line 274 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 847 "dhcp6_parser.cc" // lalr1.cc:907 +#line 274 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 851 "dhcp6_parser.cc" break; case 37: -#line 277 "dhcp6_parser.yy" // lalr1.cc:907 +#line 277 "dhcp6_parser.yy" { // Push back the JSON value on the stack - ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.push_back(yystack_[0].value.as < ElementPtr > ()); } -#line 856 "dhcp6_parser.cc" // lalr1.cc:907 +#line 860 "dhcp6_parser.cc" break; case 38: -#line 282 "dhcp6_parser.yy" // lalr1.cc:907 +#line 282 "dhcp6_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 867 "dhcp6_parser.cc" // lalr1.cc:907 +#line 871 "dhcp6_parser.cc" break; case 39: -#line 287 "dhcp6_parser.yy" // lalr1.cc:907 +#line 287 "dhcp6_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place // for it. } -#line 877 "dhcp6_parser.cc" // lalr1.cc:907 +#line 881 "dhcp6_parser.cc" break; case 40: -#line 293 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } -#line 883 "dhcp6_parser.cc" // lalr1.cc:907 +#line 293 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); } +#line 887 "dhcp6_parser.cc" break; case 43: -#line 300 "dhcp6_parser.yy" // lalr1.cc:907 +#line 300 "dhcp6_parser.yy" { // map containing a single entry - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 892 "dhcp6_parser.cc" // lalr1.cc:907 +#line 896 "dhcp6_parser.cc" break; case 44: -#line 304 "dhcp6_parser.yy" // lalr1.cc:907 +#line 304 "dhcp6_parser.yy" { // map consisting of a shorter map followed by // comma and string:value - ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ()); } -#line 902 "dhcp6_parser.cc" // lalr1.cc:907 +#line 906 "dhcp6_parser.cc" break; case 45: -#line 311 "dhcp6_parser.yy" // lalr1.cc:907 +#line 311 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(l); } -#line 911 "dhcp6_parser.cc" // lalr1.cc:907 +#line 915 "dhcp6_parser.cc" break; case 46: -#line 314 "dhcp6_parser.yy" // lalr1.cc:907 +#line 314 "dhcp6_parser.yy" { // list parsing complete. Put any sanity checking here } -#line 919 "dhcp6_parser.cc" // lalr1.cc:907 +#line 923 "dhcp6_parser.cc" break; case 49: -#line 322 "dhcp6_parser.yy" // lalr1.cc:907 +#line 322 "dhcp6_parser.yy" { // List consisting of a single element. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 928 "dhcp6_parser.cc" // lalr1.cc:907 +#line 932 "dhcp6_parser.cc" break; case 50: -#line 326 "dhcp6_parser.yy" // lalr1.cc:907 +#line 326 "dhcp6_parser.yy" { // List ending with , and a value. - ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ()); } -#line 937 "dhcp6_parser.cc" // lalr1.cc:907 +#line 941 "dhcp6_parser.cc" break; case 51: -#line 333 "dhcp6_parser.yy" // lalr1.cc:907 +#line 333 "dhcp6_parser.yy" { // List parsing about to start } -#line 945 "dhcp6_parser.cc" // lalr1.cc:907 +#line 949 "dhcp6_parser.cc" break; case 52: -#line 335 "dhcp6_parser.yy" // lalr1.cc:907 +#line 335 "dhcp6_parser.yy" { // list parsing complete. Put any sanity checking here //ctx.stack_.pop_back(); } -#line 954 "dhcp6_parser.cc" // lalr1.cc:907 +#line 958 "dhcp6_parser.cc" break; case 55: -#line 344 "dhcp6_parser.yy" // lalr1.cc:907 +#line 344 "dhcp6_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 963 "dhcp6_parser.cc" // lalr1.cc:907 +#line 967 "dhcp6_parser.cc" break; case 56: -#line 348 "dhcp6_parser.yy" // lalr1.cc:907 +#line 348 "dhcp6_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(s); } -#line 972 "dhcp6_parser.cc" // lalr1.cc:907 +#line 976 "dhcp6_parser.cc" break; case 57: -#line 359 "dhcp6_parser.yy" // lalr1.cc:907 +#line 359 "dhcp6_parser.yy" { const std::string& where = ctx.contextName(); - const std::string& keyword = yystack_[1].value.as< std::string > (); + const std::string& keyword = yystack_[1].value.as < std::string > (); error(yystack_[1].location, "got unexpected keyword \"" + keyword + "\" in " + where + " map."); } -#line 983 "dhcp6_parser.cc" // lalr1.cc:907 +#line 987 "dhcp6_parser.cc" break; case 58: -#line 369 "dhcp6_parser.yy" // lalr1.cc:907 +#line 369 "dhcp6_parser.yy" { // This code is executed when we're about to start parsing // the content of the map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 994 "dhcp6_parser.cc" // lalr1.cc:907 +#line 998 "dhcp6_parser.cc" break; case 59: -#line 374 "dhcp6_parser.yy" // lalr1.cc:907 +#line 374 "dhcp6_parser.yy" { // map parsing completed. If we ever want to do any wrap up // (maybe some sanity checking), this would be the best place @@ -1003,11 +1007,11 @@ namespace isc { namespace dhcp { // Dhcp6 is required ctx.require("Dhcp6", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 1007 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1011 "dhcp6_parser.cc" break; case 68: -#line 397 "dhcp6_parser.yy" // lalr1.cc:907 +#line 397 "dhcp6_parser.yy" { // This code is executed when we're about to start parsing // the content of the map @@ -1016,782 +1020,782 @@ namespace isc { namespace dhcp { ctx.stack_.push_back(m); ctx.enter(ctx.DHCP6); } -#line 1020 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1024 "dhcp6_parser.cc" break; case 69: -#line 404 "dhcp6_parser.yy" // lalr1.cc:907 +#line 404 "dhcp6_parser.yy" { // No global parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1030 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1034 "dhcp6_parser.cc" break; case 70: -#line 412 "dhcp6_parser.yy" // lalr1.cc:907 +#line 412 "dhcp6_parser.yy" { // Parse the Dhcp6 map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1040 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1044 "dhcp6_parser.cc" break; case 71: -#line 416 "dhcp6_parser.yy" // lalr1.cc:907 +#line 416 "dhcp6_parser.yy" { // No global parameter is required // parsing completed } -#line 1049 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1053 "dhcp6_parser.cc" break; case 100: -#line 455 "dhcp6_parser.yy" // lalr1.cc:907 +#line 455 "dhcp6_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("preferred-lifetime", prf); } -#line 1058 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1062 "dhcp6_parser.cc" break; case 101: -#line 460 "dhcp6_parser.yy" // lalr1.cc:907 +#line 460 "dhcp6_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("valid-lifetime", prf); } -#line 1067 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1071 "dhcp6_parser.cc" break; case 102: -#line 465 "dhcp6_parser.yy" // lalr1.cc:907 +#line 465 "dhcp6_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("renew-timer", prf); } -#line 1076 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1080 "dhcp6_parser.cc" break; case 103: -#line 470 "dhcp6_parser.yy" // lalr1.cc:907 +#line 470 "dhcp6_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rebind-timer", prf); } -#line 1085 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1089 "dhcp6_parser.cc" break; case 104: -#line 475 "dhcp6_parser.yy" // lalr1.cc:907 +#line 475 "dhcp6_parser.yy" { - ElementPtr dpp(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr dpp(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("decline-probation-period", dpp); } -#line 1094 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1098 "dhcp6_parser.cc" break; case 105: -#line 480 "dhcp6_parser.yy" // lalr1.cc:907 +#line 480 "dhcp6_parser.yy" { ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces-config", i); ctx.stack_.push_back(i); ctx.enter(ctx.INTERFACES_CONFIG); } -#line 1105 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1109 "dhcp6_parser.cc" break; case 106: -#line 485 "dhcp6_parser.yy" // lalr1.cc:907 +#line 485 "dhcp6_parser.yy" { // No interfaces config param is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1115 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1119 "dhcp6_parser.cc" break; case 107: -#line 491 "dhcp6_parser.yy" // lalr1.cc:907 +#line 491 "dhcp6_parser.yy" { // Parse the interfaces-config map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1125 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1129 "dhcp6_parser.cc" break; case 108: -#line 495 "dhcp6_parser.yy" // lalr1.cc:907 +#line 495 "dhcp6_parser.yy" { // No interfaces config param is required // parsing completed } -#line 1134 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1138 "dhcp6_parser.cc" break; case 116: -#line 511 "dhcp6_parser.yy" // lalr1.cc:907 +#line 511 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interfaces", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1145 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1149 "dhcp6_parser.cc" break; case 117: -#line 516 "dhcp6_parser.yy" // lalr1.cc:907 +#line 516 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1154 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1158 "dhcp6_parser.cc" break; case 118: -#line 521 "dhcp6_parser.yy" // lalr1.cc:907 +#line 521 "dhcp6_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("re-detect", b); } -#line 1163 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1167 "dhcp6_parser.cc" break; case 119: -#line 527 "dhcp6_parser.yy" // lalr1.cc:907 +#line 527 "dhcp6_parser.yy" { ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lease-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.LEASE_DATABASE); } -#line 1174 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1178 "dhcp6_parser.cc" break; case 120: -#line 532 "dhcp6_parser.yy" // lalr1.cc:907 +#line 532 "dhcp6_parser.yy" { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1185 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1189 "dhcp6_parser.cc" break; case 121: -#line 539 "dhcp6_parser.yy" // lalr1.cc:907 +#line 539 "dhcp6_parser.yy" { ElementPtr i(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-database", i); ctx.stack_.push_back(i); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1196 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1200 "dhcp6_parser.cc" break; case 122: -#line 544 "dhcp6_parser.yy" // lalr1.cc:907 +#line 544 "dhcp6_parser.yy" { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 1207 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1211 "dhcp6_parser.cc" break; case 123: -#line 551 "dhcp6_parser.yy" // lalr1.cc:907 +#line 551 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hosts-databases", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOSTS_DATABASE); } -#line 1218 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1222 "dhcp6_parser.cc" break; case 124: -#line 556 "dhcp6_parser.yy" // lalr1.cc:907 +#line 556 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1227 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1231 "dhcp6_parser.cc" break; case 129: -#line 569 "dhcp6_parser.yy" // lalr1.cc:907 +#line 569 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1237 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1241 "dhcp6_parser.cc" break; case 130: -#line 573 "dhcp6_parser.yy" // lalr1.cc:907 +#line 573 "dhcp6_parser.yy" { // The type parameter is required ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1247 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1251 "dhcp6_parser.cc" break; case 152: -#line 604 "dhcp6_parser.yy" // lalr1.cc:907 +#line 604 "dhcp6_parser.yy" { ctx.enter(ctx.DATABASE_TYPE); } -#line 1255 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1259 "dhcp6_parser.cc" break; case 153: -#line 606 "dhcp6_parser.yy" // lalr1.cc:907 +#line 606 "dhcp6_parser.yy" { - ctx.stack_.back()->set("type", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1264 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1268 "dhcp6_parser.cc" break; case 154: -#line 611 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } -#line 1270 "dhcp6_parser.cc" // lalr1.cc:907 +#line 611 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("memfile", ctx.loc2pos(yystack_[0].location))); } +#line 1274 "dhcp6_parser.cc" break; case 155: -#line 612 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } -#line 1276 "dhcp6_parser.cc" // lalr1.cc:907 +#line 612 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("mysql", ctx.loc2pos(yystack_[0].location))); } +#line 1280 "dhcp6_parser.cc" break; case 156: -#line 613 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } -#line 1282 "dhcp6_parser.cc" // lalr1.cc:907 +#line 613 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("postgresql", ctx.loc2pos(yystack_[0].location))); } +#line 1286 "dhcp6_parser.cc" break; case 157: -#line 614 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } -#line 1288 "dhcp6_parser.cc" // lalr1.cc:907 +#line 614 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("cql", ctx.loc2pos(yystack_[0].location))); } +#line 1292 "dhcp6_parser.cc" break; case 158: -#line 617 "dhcp6_parser.yy" // lalr1.cc:907 +#line 617 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1296 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1300 "dhcp6_parser.cc" break; case 159: -#line 619 "dhcp6_parser.yy" // lalr1.cc:907 +#line 619 "dhcp6_parser.yy" { - ElementPtr user(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr user(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("user", user); ctx.leave(); } -#line 1306 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1310 "dhcp6_parser.cc" break; case 160: -#line 625 "dhcp6_parser.yy" // lalr1.cc:907 +#line 625 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1314 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1318 "dhcp6_parser.cc" break; case 161: -#line 627 "dhcp6_parser.yy" // lalr1.cc:907 +#line 627 "dhcp6_parser.yy" { - ElementPtr pwd(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr pwd(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("password", pwd); ctx.leave(); } -#line 1324 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1328 "dhcp6_parser.cc" break; case 162: -#line 633 "dhcp6_parser.yy" // lalr1.cc:907 +#line 633 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1332 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1336 "dhcp6_parser.cc" break; case 163: -#line 635 "dhcp6_parser.yy" // lalr1.cc:907 +#line 635 "dhcp6_parser.yy" { - ElementPtr h(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr h(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host", h); ctx.leave(); } -#line 1342 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1346 "dhcp6_parser.cc" break; case 164: -#line 641 "dhcp6_parser.yy" // lalr1.cc:907 +#line 641 "dhcp6_parser.yy" { - ElementPtr p(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr p(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("port", p); } -#line 1351 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1355 "dhcp6_parser.cc" break; case 165: -#line 646 "dhcp6_parser.yy" // lalr1.cc:907 +#line 646 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1359 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1363 "dhcp6_parser.cc" break; case 166: -#line 648 "dhcp6_parser.yy" // lalr1.cc:907 +#line 648 "dhcp6_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("name", name); ctx.leave(); } -#line 1369 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1373 "dhcp6_parser.cc" break; case 167: -#line 654 "dhcp6_parser.yy" // lalr1.cc:907 +#line 654 "dhcp6_parser.yy" { - ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("persist", n); } -#line 1378 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1382 "dhcp6_parser.cc" break; case 168: -#line 659 "dhcp6_parser.yy" // lalr1.cc:907 +#line 659 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("lfc-interval", n); } -#line 1387 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1391 "dhcp6_parser.cc" break; case 169: -#line 664 "dhcp6_parser.yy" // lalr1.cc:907 +#line 664 "dhcp6_parser.yy" { - ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("readonly", n); } -#line 1396 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1400 "dhcp6_parser.cc" break; case 170: -#line 669 "dhcp6_parser.yy" // lalr1.cc:907 +#line 669 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("connect-timeout", n); } -#line 1405 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1409 "dhcp6_parser.cc" break; case 171: -#line 674 "dhcp6_parser.yy" // lalr1.cc:907 +#line 674 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reconnect-wait-time", n); } -#line 1414 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1418 "dhcp6_parser.cc" break; case 172: -#line 679 "dhcp6_parser.yy" // lalr1.cc:907 +#line 679 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("request-timeout", n); } -#line 1423 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1427 "dhcp6_parser.cc" break; case 173: -#line 684 "dhcp6_parser.yy" // lalr1.cc:907 +#line 684 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-keepalive", n); } -#line 1432 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1436 "dhcp6_parser.cc" break; case 174: -#line 689 "dhcp6_parser.yy" // lalr1.cc:907 +#line 689 "dhcp6_parser.yy" { - ElementPtr n(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("tcp-nodelay", n); } -#line 1441 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1445 "dhcp6_parser.cc" break; case 175: -#line 694 "dhcp6_parser.yy" // lalr1.cc:907 +#line 694 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1449 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1453 "dhcp6_parser.cc" break; case 176: -#line 696 "dhcp6_parser.yy" // lalr1.cc:907 +#line 696 "dhcp6_parser.yy" { - ElementPtr cp(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr cp(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("contact-points", cp); ctx.leave(); } -#line 1459 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1463 "dhcp6_parser.cc" break; case 177: -#line 702 "dhcp6_parser.yy" // lalr1.cc:907 +#line 702 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reconnect-tries", n); } -#line 1468 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1472 "dhcp6_parser.cc" break; case 178: -#line 707 "dhcp6_parser.yy" // lalr1.cc:907 +#line 707 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1476 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1480 "dhcp6_parser.cc" break; case 179: -#line 709 "dhcp6_parser.yy" // lalr1.cc:907 +#line 709 "dhcp6_parser.yy" { - ElementPtr ks(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr ks(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("keyspace", ks); ctx.leave(); } -#line 1486 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1490 "dhcp6_parser.cc" break; case 180: -#line 715 "dhcp6_parser.yy" // lalr1.cc:907 +#line 715 "dhcp6_parser.yy" { - ElementPtr n(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr n(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-row-errors", n); } -#line 1495 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1499 "dhcp6_parser.cc" break; case 181: -#line 720 "dhcp6_parser.yy" // lalr1.cc:907 +#line 720 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("mac-sources", l); ctx.stack_.push_back(l); ctx.enter(ctx.MAC_SOURCES); } -#line 1506 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1510 "dhcp6_parser.cc" break; case 182: -#line 725 "dhcp6_parser.yy" // lalr1.cc:907 +#line 725 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1515 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1519 "dhcp6_parser.cc" break; case 187: -#line 738 "dhcp6_parser.yy" // lalr1.cc:907 +#line 738 "dhcp6_parser.yy" { ElementPtr duid(new StringElement("duid", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 1524 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1528 "dhcp6_parser.cc" break; case 188: -#line 743 "dhcp6_parser.yy" // lalr1.cc:907 +#line 743 "dhcp6_parser.yy" { - ElementPtr duid(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr duid(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(duid); } -#line 1533 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1537 "dhcp6_parser.cc" break; case 189: -#line 748 "dhcp6_parser.yy" // lalr1.cc:907 +#line 748 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("host-reservation-identifiers", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOST_RESERVATION_IDENTIFIERS); } -#line 1544 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1548 "dhcp6_parser.cc" break; case 190: -#line 753 "dhcp6_parser.yy" // lalr1.cc:907 +#line 753 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1553 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1557 "dhcp6_parser.cc" break; case 196: -#line 767 "dhcp6_parser.yy" // lalr1.cc:907 +#line 767 "dhcp6_parser.yy" { ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(hwaddr); } -#line 1562 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1566 "dhcp6_parser.cc" break; case 197: -#line 772 "dhcp6_parser.yy" // lalr1.cc:907 +#line 772 "dhcp6_parser.yy" { ElementPtr flex_id(new StringElement("flex-id", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(flex_id); } -#line 1571 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1575 "dhcp6_parser.cc" break; case 198: -#line 779 "dhcp6_parser.yy" // lalr1.cc:907 +#line 779 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("relay-supplied-options", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 1582 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1586 "dhcp6_parser.cc" break; case 199: -#line 784 "dhcp6_parser.yy" // lalr1.cc:907 +#line 784 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1591 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1595 "dhcp6_parser.cc" break; case 200: -#line 789 "dhcp6_parser.yy" // lalr1.cc:907 +#line 789 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hooks-libraries", l); ctx.stack_.push_back(l); ctx.enter(ctx.HOOKS_LIBRARIES); } -#line 1602 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1606 "dhcp6_parser.cc" break; case 201: -#line 794 "dhcp6_parser.yy" // lalr1.cc:907 +#line 794 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1611 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1615 "dhcp6_parser.cc" break; case 206: -#line 807 "dhcp6_parser.yy" // lalr1.cc:907 +#line 807 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1621 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1625 "dhcp6_parser.cc" break; case 207: -#line 811 "dhcp6_parser.yy" // lalr1.cc:907 +#line 811 "dhcp6_parser.yy" { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1631 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1635 "dhcp6_parser.cc" break; case 208: -#line 817 "dhcp6_parser.yy" // lalr1.cc:907 +#line 817 "dhcp6_parser.yy" { // Parse the hooks-libraries list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1641 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1645 "dhcp6_parser.cc" break; case 209: -#line 821 "dhcp6_parser.yy" // lalr1.cc:907 +#line 821 "dhcp6_parser.yy" { // The library hooks parameter is required ctx.require("library", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 1651 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1655 "dhcp6_parser.cc" break; case 215: -#line 836 "dhcp6_parser.yy" // lalr1.cc:907 +#line 836 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1659 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1663 "dhcp6_parser.cc" break; case 216: -#line 838 "dhcp6_parser.yy" // lalr1.cc:907 +#line 838 "dhcp6_parser.yy" { - ElementPtr lib(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("library", lib); ctx.leave(); } -#line 1669 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1673 "dhcp6_parser.cc" break; case 217: -#line 844 "dhcp6_parser.yy" // lalr1.cc:907 +#line 844 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1677 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1681 "dhcp6_parser.cc" break; case 218: -#line 846 "dhcp6_parser.yy" // lalr1.cc:907 +#line 846 "dhcp6_parser.yy" { - ctx.stack_.back()->set("parameters", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1686 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1690 "dhcp6_parser.cc" break; case 219: -#line 852 "dhcp6_parser.yy" // lalr1.cc:907 +#line 852 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("expired-leases-processing", m); ctx.stack_.push_back(m); ctx.enter(ctx.EXPIRED_LEASES_PROCESSING); } -#line 1697 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1701 "dhcp6_parser.cc" break; case 220: -#line 857 "dhcp6_parser.yy" // lalr1.cc:907 +#line 857 "dhcp6_parser.yy" { // No expired lease parameter is required ctx.stack_.pop_back(); ctx.leave(); } -#line 1707 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1711 "dhcp6_parser.cc" break; case 229: -#line 875 "dhcp6_parser.yy" // lalr1.cc:907 +#line 875 "dhcp6_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reclaim-timer-wait-time", value); } -#line 1716 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1720 "dhcp6_parser.cc" break; case 230: -#line 880 "dhcp6_parser.yy" // lalr1.cc:907 +#line 880 "dhcp6_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush-reclaimed-timer-wait-time", value); } -#line 1725 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1729 "dhcp6_parser.cc" break; case 231: -#line 885 "dhcp6_parser.yy" // lalr1.cc:907 +#line 885 "dhcp6_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hold-reclaimed-time", value); } -#line 1734 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1738 "dhcp6_parser.cc" break; case 232: -#line 890 "dhcp6_parser.yy" // lalr1.cc:907 +#line 890 "dhcp6_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-leases", value); } -#line 1743 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1747 "dhcp6_parser.cc" break; case 233: -#line 895 "dhcp6_parser.yy" // lalr1.cc:907 +#line 895 "dhcp6_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-reclaim-time", value); } -#line 1752 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1756 "dhcp6_parser.cc" break; case 234: -#line 900 "dhcp6_parser.yy" // lalr1.cc:907 +#line 900 "dhcp6_parser.yy" { - ElementPtr value(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr value(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); } -#line 1761 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1765 "dhcp6_parser.cc" break; case 235: -#line 908 "dhcp6_parser.yy" // lalr1.cc:907 +#line 908 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet6", l); ctx.stack_.push_back(l); ctx.enter(ctx.SUBNET6); } -#line 1772 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1776 "dhcp6_parser.cc" break; case 236: -#line 913 "dhcp6_parser.yy" // lalr1.cc:907 +#line 913 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1781 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1785 "dhcp6_parser.cc" break; case 241: -#line 933 "dhcp6_parser.yy" // lalr1.cc:907 +#line 933 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 1791 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1795 "dhcp6_parser.cc" break; case 242: -#line 937 "dhcp6_parser.yy" // lalr1.cc:907 +#line 937 "dhcp6_parser.yy" { // Once we reached this place, the subnet parsing is now complete. // If we want to, we can implement default values here. @@ -1813,261 +1817,261 @@ namespace isc { namespace dhcp { ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 1817 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1821 "dhcp6_parser.cc" break; case 243: -#line 959 "dhcp6_parser.yy" // lalr1.cc:907 +#line 959 "dhcp6_parser.yy" { // Parse the subnet6 list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 1827 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1831 "dhcp6_parser.cc" break; case 244: -#line 963 "dhcp6_parser.yy" // lalr1.cc:907 +#line 963 "dhcp6_parser.yy" { // The subnet subnet6 parameter is required ctx.require("subnet", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 1837 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1841 "dhcp6_parser.cc" break; case 267: -#line 997 "dhcp6_parser.yy" // lalr1.cc:907 +#line 997 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1845 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1849 "dhcp6_parser.cc" break; case 268: -#line 999 "dhcp6_parser.yy" // lalr1.cc:907 +#line 999 "dhcp6_parser.yy" { - ElementPtr subnet(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr subnet(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("subnet", subnet); ctx.leave(); } -#line 1855 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1859 "dhcp6_parser.cc" break; case 269: -#line 1005 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1005 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1863 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1867 "dhcp6_parser.cc" break; case 270: -#line 1007 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1007 "dhcp6_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface", iface); ctx.leave(); } -#line 1873 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1877 "dhcp6_parser.cc" break; case 271: -#line 1013 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1013 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1881 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1885 "dhcp6_parser.cc" break; case 272: -#line 1015 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1015 "dhcp6_parser.yy" { - ElementPtr iface(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr iface(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("interface-id", iface); ctx.leave(); } -#line 1891 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1895 "dhcp6_parser.cc" break; case 273: -#line 1021 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1021 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 1899 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1903 "dhcp6_parser.cc" break; case 274: -#line 1023 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1023 "dhcp6_parser.yy" { - ElementPtr cls(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr cls(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-class", cls); ctx.leave(); } -#line 1909 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1913 "dhcp6_parser.cc" break; case 275: -#line 1029 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1029 "dhcp6_parser.yy" { ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("require-client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 1920 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1924 "dhcp6_parser.cc" break; case 276: -#line 1034 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1034 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 1929 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1933 "dhcp6_parser.cc" break; case 277: -#line 1039 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1039 "dhcp6_parser.yy" { ctx.enter(ctx.RESERVATION_MODE); } -#line 1937 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1941 "dhcp6_parser.cc" break; case 278: -#line 1041 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1041 "dhcp6_parser.yy" { - ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("reservation-mode", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 1946 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1950 "dhcp6_parser.cc" break; case 279: -#line 1046 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } -#line 1952 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1046 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("disabled", ctx.loc2pos(yystack_[0].location))); } +#line 1956 "dhcp6_parser.cc" break; case 280: -#line 1047 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } -#line 1958 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1047 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("out-of-pool", ctx.loc2pos(yystack_[0].location))); } +#line 1962 "dhcp6_parser.cc" break; case 281: -#line 1048 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } -#line 1964 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1048 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("all", ctx.loc2pos(yystack_[0].location))); } +#line 1968 "dhcp6_parser.cc" break; case 282: -#line 1051 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1051 "dhcp6_parser.yy" { - ElementPtr id(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr id(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("id", id); } -#line 1973 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1977 "dhcp6_parser.cc" break; case 283: -#line 1056 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1056 "dhcp6_parser.yy" { - ElementPtr rc(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr rc(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("rapid-commit", rc); } -#line 1982 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1986 "dhcp6_parser.cc" break; case 284: -#line 1064 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1064 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("shared-networks", l); ctx.stack_.push_back(l); ctx.enter(ctx.SHARED_NETWORK); } -#line 1993 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1997 "dhcp6_parser.cc" break; case 285: -#line 1069 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1069 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2002 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2006 "dhcp6_parser.cc" break; case 290: -#line 1084 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1084 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2012 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2016 "dhcp6_parser.cc" break; case 291: -#line 1088 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1088 "dhcp6_parser.yy" { ctx.stack_.pop_back(); } -#line 2020 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2024 "dhcp6_parser.cc" break; case 311: -#line 1119 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1119 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-def", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DEF); } -#line 2031 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2035 "dhcp6_parser.cc" break; case 312: -#line 1124 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1124 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2040 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2044 "dhcp6_parser.cc" break; case 313: -#line 1132 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1132 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2049 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2053 "dhcp6_parser.cc" break; case 314: -#line 1135 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1135 "dhcp6_parser.yy" { // parsing completed } -#line 2057 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2061 "dhcp6_parser.cc" break; case 319: -#line 1151 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1151 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2067 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2071 "dhcp6_parser.cc" break; case 320: -#line 1155 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1155 "dhcp6_parser.yy" { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); @@ -2075,21 +2079,21 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2079 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2083 "dhcp6_parser.cc" break; case 321: -#line 1166 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1166 "dhcp6_parser.yy" { // Parse the option-def list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2089 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2093 "dhcp6_parser.cc" break; case 322: -#line 1170 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1170 "dhcp6_parser.yy" { // The name, code and type option def parameters are required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); @@ -2097,283 +2101,283 @@ namespace isc { namespace dhcp { ctx.require("type", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2101 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2105 "dhcp6_parser.cc" break; case 338: -#line 1202 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1202 "dhcp6_parser.yy" { - ElementPtr code(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr code(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("code", code); } -#line 2110 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2114 "dhcp6_parser.cc" break; case 340: -#line 1209 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1209 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2118 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2122 "dhcp6_parser.cc" break; case 341: -#line 1211 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1211 "dhcp6_parser.yy" { - ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("type", prf); ctx.leave(); } -#line 2128 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2132 "dhcp6_parser.cc" break; case 342: -#line 1217 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1217 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2136 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2140 "dhcp6_parser.cc" break; case 343: -#line 1219 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1219 "dhcp6_parser.yy" { - ElementPtr rtypes(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr rtypes(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("record-types", rtypes); ctx.leave(); } -#line 2146 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2150 "dhcp6_parser.cc" break; case 344: -#line 1225 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1225 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2154 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2158 "dhcp6_parser.cc" break; case 345: -#line 1227 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1227 "dhcp6_parser.yy" { - ElementPtr space(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr space(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("space", space); ctx.leave(); } -#line 2164 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2168 "dhcp6_parser.cc" break; case 347: -#line 1235 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1235 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2172 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2176 "dhcp6_parser.cc" break; case 348: -#line 1237 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1237 "dhcp6_parser.yy" { - ElementPtr encap(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr encap(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("encapsulate", encap); ctx.leave(); } -#line 2182 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2186 "dhcp6_parser.cc" break; case 349: -#line 1243 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1243 "dhcp6_parser.yy" { - ElementPtr array(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr array(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("array", array); } -#line 2191 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2195 "dhcp6_parser.cc" break; case 350: -#line 1252 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1252 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("option-data", l); ctx.stack_.push_back(l); ctx.enter(ctx.OPTION_DATA); } -#line 2202 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2206 "dhcp6_parser.cc" break; case 351: -#line 1257 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1257 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2211 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2215 "dhcp6_parser.cc" break; case 356: -#line 1276 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1276 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2221 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2225 "dhcp6_parser.cc" break; case 357: -#line 1280 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1280 "dhcp6_parser.yy" { /// @todo: the code or name parameters are required. ctx.stack_.pop_back(); } -#line 2230 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2234 "dhcp6_parser.cc" break; case 358: -#line 1288 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1288 "dhcp6_parser.yy" { // Parse the option-data list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2240 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2244 "dhcp6_parser.cc" break; case 359: -#line 1292 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1292 "dhcp6_parser.yy" { /// @todo: the code or name parameters are required. // parsing completed } -#line 2249 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2253 "dhcp6_parser.cc" break; case 374: -#line 1325 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1325 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2257 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2261 "dhcp6_parser.cc" break; case 375: -#line 1327 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1327 "dhcp6_parser.yy" { - ElementPtr data(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr data(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("data", data); ctx.leave(); } -#line 2267 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2271 "dhcp6_parser.cc" break; case 378: -#line 1337 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1337 "dhcp6_parser.yy" { - ElementPtr space(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr space(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("csv-format", space); } -#line 2276 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2280 "dhcp6_parser.cc" break; case 379: -#line 1342 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1342 "dhcp6_parser.yy" { - ElementPtr persist(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr persist(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-send", persist); } -#line 2285 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2289 "dhcp6_parser.cc" break; case 380: -#line 1350 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1350 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pools", l); ctx.stack_.push_back(l); ctx.enter(ctx.POOLS); } -#line 2296 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2300 "dhcp6_parser.cc" break; case 381: -#line 1355 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1355 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2305 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2309 "dhcp6_parser.cc" break; case 386: -#line 1370 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1370 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2315 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2319 "dhcp6_parser.cc" break; case 387: -#line 1374 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1374 "dhcp6_parser.yy" { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2325 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2329 "dhcp6_parser.cc" break; case 388: -#line 1380 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1380 "dhcp6_parser.yy" { // Parse the pool list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2335 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2339 "dhcp6_parser.cc" break; case 389: -#line 1384 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1384 "dhcp6_parser.yy" { // The pool parameter is required. ctx.require("pool", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); } -#line 2344 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2348 "dhcp6_parser.cc" break; case 399: -#line 1402 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1402 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2352 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2356 "dhcp6_parser.cc" break; case 400: -#line 1404 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1404 "dhcp6_parser.yy" { - ElementPtr pool(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr pool(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pool", pool); ctx.leave(); } -#line 2362 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2366 "dhcp6_parser.cc" break; case 401: -#line 1410 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1410 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2370 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2374 "dhcp6_parser.cc" break; case 402: -#line 1412 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1412 "dhcp6_parser.yy" { ElementPtr parent = ctx.stack_.back(); - ElementPtr user_context = yystack_[0].value.as< ElementPtr > (); + ElementPtr user_context = yystack_[0].value.as < ElementPtr > (); ConstElementPtr old = parent->get("user-context"); // Handle already existing user context @@ -2393,23 +2397,23 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2397 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2401 "dhcp6_parser.cc" break; case 403: -#line 1435 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1435 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2405 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2409 "dhcp6_parser.cc" break; case 404: -#line 1437 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1437 "dhcp6_parser.yy" { ElementPtr parent = ctx.stack_.back(); ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location))); - ElementPtr comment(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); user_context->set("comment", comment); // Handle already existing user context @@ -2430,41 +2434,41 @@ namespace isc { namespace dhcp { parent->set("user-context", user_context); ctx.leave(); } -#line 2434 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2438 "dhcp6_parser.cc" break; case 405: -#line 1465 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1465 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("pd-pools", l); ctx.stack_.push_back(l); ctx.enter(ctx.PD_POOLS); } -#line 2445 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2449 "dhcp6_parser.cc" break; case 406: -#line 1470 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1470 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2454 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2458 "dhcp6_parser.cc" break; case 411: -#line 1485 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1485 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2464 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2468 "dhcp6_parser.cc" break; case 412: -#line 1489 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1489 "dhcp6_parser.yy" { // The prefix, prefix len and delegated len parameters are required. ctx.require("prefix", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); @@ -2472,21 +2476,21 @@ namespace isc { namespace dhcp { ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2476 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2480 "dhcp6_parser.cc" break; case 413: -#line 1497 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1497 "dhcp6_parser.yy" { // Parse the pd-pool list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2486 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2490 "dhcp6_parser.cc" break; case 414: -#line 1501 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1501 "dhcp6_parser.yy" { // The prefix, prefix len and delegated len parameters are required. ctx.require("prefix", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); @@ -2494,1055 +2498,1056 @@ namespace isc { namespace dhcp { ctx.require("delegated-len", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 2498 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2502 "dhcp6_parser.cc" break; case 428: -#line 1526 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1526 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2506 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2510 "dhcp6_parser.cc" break; case 429: -#line 1528 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1528 "dhcp6_parser.yy" { - ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefix", prf); ctx.leave(); } -#line 2516 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2520 "dhcp6_parser.cc" break; case 430: -#line 1534 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1534 "dhcp6_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefix-len", prf); } -#line 2525 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2529 "dhcp6_parser.cc" break; case 431: -#line 1539 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1539 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2533 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2537 "dhcp6_parser.cc" break; case 432: -#line 1541 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1541 "dhcp6_parser.yy" { - ElementPtr prf(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("excluded-prefix", prf); ctx.leave(); } -#line 2543 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2547 "dhcp6_parser.cc" break; case 433: -#line 1547 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1547 "dhcp6_parser.yy" { - ElementPtr prf(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr prf(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("excluded-prefix-len", prf); } -#line 2552 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2556 "dhcp6_parser.cc" break; case 434: -#line 1552 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1552 "dhcp6_parser.yy" { - ElementPtr deleg(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr deleg(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("delegated-len", deleg); } -#line 2561 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2565 "dhcp6_parser.cc" break; case 435: -#line 1560 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1560 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("reservations", l); ctx.stack_.push_back(l); ctx.enter(ctx.RESERVATIONS); } -#line 2572 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2576 "dhcp6_parser.cc" break; case 436: -#line 1565 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1565 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2581 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2585 "dhcp6_parser.cc" break; case 441: -#line 1578 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1578 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2591 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2595 "dhcp6_parser.cc" break; case 442: -#line 1582 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1582 "dhcp6_parser.yy" { /// @todo: an identifier parameter is required. ctx.stack_.pop_back(); } -#line 2600 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2604 "dhcp6_parser.cc" break; case 443: -#line 1587 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1587 "dhcp6_parser.yy" { // Parse the reservations list entry map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 2610 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2614 "dhcp6_parser.cc" break; case 444: -#line 1591 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1591 "dhcp6_parser.yy" { /// @todo: an identifier parameter is required. // parsing completed } -#line 2619 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2623 "dhcp6_parser.cc" break; case 460: -#line 1618 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1618 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-addresses", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 2630 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2634 "dhcp6_parser.cc" break; case 461: -#line 1623 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1623 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2639 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2643 "dhcp6_parser.cc" break; case 462: -#line 1628 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1628 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("prefixes", l); ctx.stack_.push_back(l); ctx.enter(ctx.NO_KEYWORD); } -#line 2650 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2654 "dhcp6_parser.cc" break; case 463: -#line 1633 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1633 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2659 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2663 "dhcp6_parser.cc" break; case 464: -#line 1638 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1638 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2667 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2671 "dhcp6_parser.cc" break; case 465: -#line 1640 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1640 "dhcp6_parser.yy" { - ElementPtr d(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr d(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("duid", d); ctx.leave(); } -#line 2677 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2681 "dhcp6_parser.cc" break; case 466: -#line 1646 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1646 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2685 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2689 "dhcp6_parser.cc" break; case 467: -#line 1648 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1648 "dhcp6_parser.yy" { - ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hw-address", hw); ctx.leave(); } -#line 2695 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2699 "dhcp6_parser.cc" break; case 468: -#line 1654 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1654 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2703 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2707 "dhcp6_parser.cc" break; case 469: -#line 1656 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1656 "dhcp6_parser.yy" { - ElementPtr host(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr host(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("hostname", host); ctx.leave(); } -#line 2713 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2717 "dhcp6_parser.cc" break; case 470: -#line 1662 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1662 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2721 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2725 "dhcp6_parser.cc" break; case 471: -#line 1664 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1664 "dhcp6_parser.yy" { - ElementPtr hw(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr hw(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flex-id", hw); ctx.leave(); } -#line 2731 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2735 "dhcp6_parser.cc" break; case 472: -#line 1670 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1670 "dhcp6_parser.yy" { ElementPtr c(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", c); ctx.stack_.push_back(c); ctx.enter(ctx.NO_KEYWORD); } -#line 2742 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2746 "dhcp6_parser.cc" break; case 473: -#line 1675 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1675 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2751 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2755 "dhcp6_parser.cc" break; case 474: -#line 1683 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1683 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("relay", m); ctx.stack_.push_back(m); ctx.enter(ctx.RELAY); } -#line 2762 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2766 "dhcp6_parser.cc" break; case 475: -#line 1688 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1688 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2771 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2775 "dhcp6_parser.cc" break; case 478: -#line 1697 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1697 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2779 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2783 "dhcp6_parser.cc" break; case 479: -#line 1699 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1699 "dhcp6_parser.yy" { - ElementPtr addr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr addr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ip-address", addr); ctx.leave(); } -#line 2789 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2793 "dhcp6_parser.cc" break; case 480: -#line 1708 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1708 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("client-classes", l); ctx.stack_.push_back(l); ctx.enter(ctx.CLIENT_CLASSES); } -#line 2800 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2804 "dhcp6_parser.cc" break; case 481: -#line 1713 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1713 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2809 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2813 "dhcp6_parser.cc" break; case 484: -#line 1722 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1722 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 2819 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2823 "dhcp6_parser.cc" break; case 485: -#line 1726 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1726 "dhcp6_parser.yy" { // The name client class parameter is required. ctx.require("name", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); } -#line 2829 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2833 "dhcp6_parser.cc" break; case 498: -#line 1751 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1751 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2837 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2841 "dhcp6_parser.cc" break; case 499: -#line 1753 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1753 "dhcp6_parser.yy" { - ElementPtr test(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr test(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("test", test); ctx.leave(); } -#line 2847 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2851 "dhcp6_parser.cc" break; case 500: -#line 1759 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1759 "dhcp6_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("only-if-required", b); } -#line 2856 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2860 "dhcp6_parser.cc" break; case 501: -#line 1767 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1767 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-id", m); ctx.stack_.push_back(m); ctx.enter(ctx.SERVER_ID); } -#line 2867 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2871 "dhcp6_parser.cc" break; case 502: -#line 1772 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1772 "dhcp6_parser.yy" { // The type parameter is required. ctx.require("type", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 2878 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2882 "dhcp6_parser.cc" break; case 514: -#line 1794 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1794 "dhcp6_parser.yy" { ctx.enter(ctx.DUID_TYPE); } -#line 2886 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2890 "dhcp6_parser.cc" break; case 515: -#line 1796 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1796 "dhcp6_parser.yy" { - ctx.stack_.back()->set("type", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("type", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 2895 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2899 "dhcp6_parser.cc" break; case 516: -#line 1801 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("LLT", ctx.loc2pos(yystack_[0].location))); } -#line 2901 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1801 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LLT", ctx.loc2pos(yystack_[0].location))); } +#line 2905 "dhcp6_parser.cc" break; case 517: -#line 1802 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("EN", ctx.loc2pos(yystack_[0].location))); } -#line 2907 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1802 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("EN", ctx.loc2pos(yystack_[0].location))); } +#line 2911 "dhcp6_parser.cc" break; case 518: -#line 1803 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("LL", ctx.loc2pos(yystack_[0].location))); } -#line 2913 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1803 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("LL", ctx.loc2pos(yystack_[0].location))); } +#line 2917 "dhcp6_parser.cc" break; case 519: -#line 1806 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1806 "dhcp6_parser.yy" { - ElementPtr htype(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr htype(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("htype", htype); } -#line 2922 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2926 "dhcp6_parser.cc" break; case 520: -#line 1811 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1811 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2930 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2934 "dhcp6_parser.cc" break; case 521: -#line 1813 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1813 "dhcp6_parser.yy" { - ElementPtr id(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr id(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("identifier", id); ctx.leave(); } -#line 2940 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2944 "dhcp6_parser.cc" break; case 522: -#line 1819 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1819 "dhcp6_parser.yy" { - ElementPtr time(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("time", time); } -#line 2949 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2953 "dhcp6_parser.cc" break; case 523: -#line 1824 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1824 "dhcp6_parser.yy" { - ElementPtr time(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enterprise-id", time); } -#line 2958 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2962 "dhcp6_parser.cc" break; case 524: -#line 1831 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1831 "dhcp6_parser.yy" { - ElementPtr time(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr time(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp4o6-port", time); } -#line 2967 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2971 "dhcp6_parser.cc" break; case 525: -#line 1838 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1838 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("control-socket", m); ctx.stack_.push_back(m); ctx.enter(ctx.CONTROL_SOCKET); } -#line 2978 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2982 "dhcp6_parser.cc" break; case 526: -#line 1843 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1843 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 2987 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2991 "dhcp6_parser.cc" break; case 534: -#line 1859 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1859 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 2995 "dhcp6_parser.cc" // lalr1.cc:907 +#line 2999 "dhcp6_parser.cc" break; case 535: -#line 1861 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1861 "dhcp6_parser.yy" { - ElementPtr stype(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr stype(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-type", stype); ctx.leave(); } -#line 3005 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3009 "dhcp6_parser.cc" break; case 536: -#line 1867 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1867 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3013 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3017 "dhcp6_parser.cc" break; case 537: -#line 1869 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1869 "dhcp6_parser.yy" { - ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("socket-name", name); ctx.leave(); } -#line 3023 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3027 "dhcp6_parser.cc" break; case 538: -#line 1877 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1877 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("dhcp-ddns", m); ctx.stack_.push_back(m); ctx.enter(ctx.DHCP_DDNS); } -#line 3034 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3038 "dhcp6_parser.cc" break; case 539: -#line 1882 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1882 "dhcp6_parser.yy" { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[2].location), ctx.loc2pos(yystack_[0].location)); ctx.stack_.pop_back(); ctx.leave(); } -#line 3045 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3049 "dhcp6_parser.cc" break; case 540: -#line 1889 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1889 "dhcp6_parser.yy" { // Parse the dhcp-ddns map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3055 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3059 "dhcp6_parser.cc" break; case 541: -#line 1893 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1893 "dhcp6_parser.yy" { // The enable updates DHCP DDNS parameter is required. ctx.require("enable-updates", ctx.loc2pos(yystack_[3].location), ctx.loc2pos(yystack_[0].location)); // parsing completed } -#line 3065 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3069 "dhcp6_parser.cc" break; case 561: -#line 1922 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1922 "dhcp6_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("enable-updates", b); } -#line 3074 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3078 "dhcp6_parser.cc" break; case 562: -#line 1927 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1927 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3082 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3086 "dhcp6_parser.cc" break; case 563: -#line 1929 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1929 "dhcp6_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("qualifying-suffix", s); ctx.leave(); } -#line 3092 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3096 "dhcp6_parser.cc" break; case 564: -#line 1935 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1935 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3100 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3104 "dhcp6_parser.cc" break; case 565: -#line 1937 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1937 "dhcp6_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-ip", s); ctx.leave(); } -#line 3110 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3114 "dhcp6_parser.cc" break; case 566: -#line 1943 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1943 "dhcp6_parser.yy" { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("server-port", i); } -#line 3119 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3123 "dhcp6_parser.cc" break; case 567: -#line 1948 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1948 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3127 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3131 "dhcp6_parser.cc" break; case 568: -#line 1950 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1950 "dhcp6_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-ip", s); ctx.leave(); } -#line 3137 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3141 "dhcp6_parser.cc" break; case 569: -#line 1956 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1956 "dhcp6_parser.yy" { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("sender-port", i); } -#line 3146 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3150 "dhcp6_parser.cc" break; case 570: -#line 1961 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1961 "dhcp6_parser.yy" { - ElementPtr i(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("max-queue-size", i); } -#line 3155 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3159 "dhcp6_parser.cc" break; case 571: -#line 1966 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1966 "dhcp6_parser.yy" { ctx.enter(ctx.NCR_PROTOCOL); } -#line 3163 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3167 "dhcp6_parser.cc" break; case 572: -#line 1968 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1968 "dhcp6_parser.yy" { - ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3172 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3176 "dhcp6_parser.cc" break; case 573: -#line 1974 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } -#line 3178 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1974 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); } +#line 3182 "dhcp6_parser.cc" break; case 574: -#line 1975 "dhcp6_parser.yy" // lalr1.cc:907 - { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } -#line 3184 "dhcp6_parser.cc" // lalr1.cc:907 +#line 1975 "dhcp6_parser.yy" + { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); } +#line 3188 "dhcp6_parser.cc" break; case 575: -#line 1978 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1978 "dhcp6_parser.yy" { ctx.enter(ctx.NCR_FORMAT); } -#line 3192 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3196 "dhcp6_parser.cc" break; case 576: -#line 1980 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1980 "dhcp6_parser.yy" { ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("ncr-format", json); ctx.leave(); } -#line 3202 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3206 "dhcp6_parser.cc" break; case 577: -#line 1986 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1986 "dhcp6_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("always-include-fqdn", b); } -#line 3211 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3215 "dhcp6_parser.cc" break; case 578: -#line 1991 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1991 "dhcp6_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-no-update", b); } -#line 3220 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3224 "dhcp6_parser.cc" break; case 579: -#line 1996 "dhcp6_parser.yy" // lalr1.cc:907 +#line 1996 "dhcp6_parser.yy" { - ElementPtr b(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr b(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("override-client-update", b); } -#line 3229 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3233 "dhcp6_parser.cc" break; case 580: -#line 2001 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2001 "dhcp6_parser.yy" { ctx.enter(ctx.REPLACE_CLIENT_NAME); } -#line 3237 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3241 "dhcp6_parser.cc" break; case 581: -#line 2003 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2003 "dhcp6_parser.yy" { - ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("replace-client-name", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3246 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3250 "dhcp6_parser.cc" break; case 582: -#line 2009 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2009 "dhcp6_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-present", ctx.loc2pos(yystack_[0].location))); } -#line 3254 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3258 "dhcp6_parser.cc" break; case 583: -#line 2012 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2012 "dhcp6_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("never", ctx.loc2pos(yystack_[0].location))); } -#line 3262 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3266 "dhcp6_parser.cc" break; case 584: -#line 2015 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2015 "dhcp6_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("always", ctx.loc2pos(yystack_[0].location))); } -#line 3270 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3274 "dhcp6_parser.cc" break; case 585: -#line 2018 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2018 "dhcp6_parser.yy" { - yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); + yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(yystack_[0].location))); } -#line 3278 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3282 "dhcp6_parser.cc" break; case 586: -#line 2021 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2021 "dhcp6_parser.yy" { error(yystack_[0].location, "boolean values for the replace-client-name are " "no longer supported"); } -#line 3287 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3291 "dhcp6_parser.cc" break; case 587: -#line 2027 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2027 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3295 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3299 "dhcp6_parser.cc" break; case 588: -#line 2029 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2029 "dhcp6_parser.yy" { - ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("generated-prefix", s); ctx.leave(); } -#line 3305 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3309 "dhcp6_parser.cc" break; case 589: -#line 2037 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2037 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3313 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3317 "dhcp6_parser.cc" break; case 590: -#line 2039 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2039 "dhcp6_parser.yy" { - ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3322 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3326 "dhcp6_parser.cc" break; case 591: -#line 2044 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2044 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3330 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3334 "dhcp6_parser.cc" break; case 592: -#line 2046 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2046 "dhcp6_parser.yy" { - ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("DhcpDdns", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3339 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3343 "dhcp6_parser.cc" break; case 593: -#line 2051 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2051 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3347 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3351 "dhcp6_parser.cc" break; case 594: -#line 2053 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2053 "dhcp6_parser.yy" { - ctx.stack_.back()->set("Control-agent", yystack_[0].value.as< ElementPtr > ()); + ctx.stack_.back()->set("Control-agent", yystack_[0].value.as < ElementPtr > ()); ctx.leave(); } -#line 3356 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3360 "dhcp6_parser.cc" break; case 595: -#line 2064 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2064 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("Logging", m); ctx.stack_.push_back(m); ctx.enter(ctx.LOGGING); } -#line 3367 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3371 "dhcp6_parser.cc" break; case 596: -#line 2069 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2069 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 3376 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3380 "dhcp6_parser.cc" break; case 597: -#line 2074 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2074 "dhcp6_parser.yy" { // Parse the Logging map ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.push_back(m); } -#line 3386 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3390 "dhcp6_parser.cc" break; case 598: -#line 2078 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2078 "dhcp6_parser.yy" { // parsing completed } -#line 3394 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3398 "dhcp6_parser.cc" break; case 602: -#line 2094 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2094 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); ctx.enter(ctx.LOGGERS); } -#line 3405 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3409 "dhcp6_parser.cc" break; case 603: -#line 2099 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2099 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 3414 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3418 "dhcp6_parser.cc" break; case 606: -#line 2111 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2111 "dhcp6_parser.yy" { ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(l); ctx.stack_.push_back(l); } -#line 3424 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3428 "dhcp6_parser.cc" break; case 607: -#line 2115 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2115 "dhcp6_parser.yy" { ctx.stack_.pop_back(); } -#line 3432 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3436 "dhcp6_parser.cc" break; case 617: -#line 2132 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2132 "dhcp6_parser.yy" { - ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("debuglevel", dl); } -#line 3441 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3445 "dhcp6_parser.cc" break; case 618: -#line 2137 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2137 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3449 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3453 "dhcp6_parser.cc" break; case 619: -#line 2139 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2139 "dhcp6_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("severity", sev); ctx.leave(); } -#line 3459 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3463 "dhcp6_parser.cc" break; case 620: -#line 2145 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2145 "dhcp6_parser.yy" { ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); ctx.enter(ctx.OUTPUT_OPTIONS); } -#line 3470 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3474 "dhcp6_parser.cc" break; case 621: -#line 2150 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2150 "dhcp6_parser.yy" { ctx.stack_.pop_back(); ctx.leave(); } -#line 3479 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3483 "dhcp6_parser.cc" break; case 624: -#line 2159 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2159 "dhcp6_parser.yy" { ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->add(m); ctx.stack_.push_back(m); } -#line 3489 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3493 "dhcp6_parser.cc" break; case 625: -#line 2163 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2163 "dhcp6_parser.yy" { ctx.stack_.pop_back(); } -#line 3497 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3501 "dhcp6_parser.cc" break; case 632: -#line 2177 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2177 "dhcp6_parser.yy" { ctx.enter(ctx.NO_KEYWORD); } -#line 3505 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3509 "dhcp6_parser.cc" break; case 633: -#line 2179 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2179 "dhcp6_parser.yy" { - ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("output", sev); ctx.leave(); } -#line 3515 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3519 "dhcp6_parser.cc" break; case 634: -#line 2185 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2185 "dhcp6_parser.yy" { - ElementPtr flush(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("flush", flush); } -#line 3524 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3528 "dhcp6_parser.cc" break; case 635: -#line 2190 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2190 "dhcp6_parser.yy" { - ElementPtr maxsize(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxsize", maxsize); } -#line 3533 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3537 "dhcp6_parser.cc" break; case 636: -#line 2195 "dhcp6_parser.yy" // lalr1.cc:907 +#line 2195 "dhcp6_parser.yy" { - ElementPtr maxver(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); + ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location))); ctx.stack_.back()->set("maxver", maxver); } -#line 3542 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3546 "dhcp6_parser.cc" break; -#line 3546 "dhcp6_parser.cc" // lalr1.cc:907 +#line 3550 "dhcp6_parser.cc" + default: break; } @@ -3550,6 +3555,7 @@ namespace isc { namespace dhcp { #if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); YYERROR; } @@ -3564,6 +3570,7 @@ namespace isc { namespace dhcp { } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ @@ -3600,18 +3607,18 @@ namespace isc { namespace dhcp { | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ if (false) - goto yyerrorlab; + YYERROR; + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); yylen = 0; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ @@ -3652,16 +3659,26 @@ namespace isc { namespace dhcp { } goto yynewstate; - // Accept. + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; - // Abort. + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ yyreturn: if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); @@ -4805,10 +4822,11 @@ namespace isc { namespace dhcp { #endif // PARSER6_DEBUG -#line 14 "dhcp6_parser.yy" // lalr1.cc:1218 +#line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 4811 "dhcp6_parser.cc" // lalr1.cc:1218 -#line 2200 "dhcp6_parser.yy" // lalr1.cc:1219 +#line 4828 "dhcp6_parser.cc" + +#line 2200 "dhcp6_parser.yy" void diff --git a/src/bin/dhcp6/dhcp6_parser.h b/src/bin/dhcp6/dhcp6_parser.h index d7258b3dac..c2ce2f5b4e 100644 --- a/src/bin/dhcp6/dhcp6_parser.h +++ b/src/bin/dhcp6/dhcp6_parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #ifndef YY_PARSER6_DHCP6_PARSER_H_INCLUDED # define YY_PARSER6_DHCP6_PARSER_H_INCLUDED // // "%code requires" blocks. -#line 17 "dhcp6_parser.yy" // lalr1.cc:404 +#line 17 "dhcp6_parser.yy" #include #include @@ -56,7 +56,7 @@ using namespace isc::dhcp; using namespace isc::data; using namespace std; -#line 60 "dhcp6_parser.h" // lalr1.cc:404 +#line 60 "dhcp6_parser.h" # include # include // std::abort @@ -65,8 +65,14 @@ using namespace std; # include # include +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + // Support move semantics when possible. -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS # define YY_MOVE std::move # define YY_MOVE_OR_COPY move # define YY_MOVE_REF(Type) Type&& @@ -79,6 +85,22 @@ using namespace std; # define YY_RVREF(Type) const Type& # define YY_COPY(Type) const Type& #endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif # include "location.hh" #include #ifndef YYASSERT @@ -156,193 +178,80 @@ using namespace std; # endif /* ! defined YYDEBUG */ #endif /* ! defined PARSER6_DEBUG */ -#line 14 "dhcp6_parser.yy" // lalr1.cc:404 +#line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 162 "dhcp6_parser.h" // lalr1.cc:404 - - /// A stack with random access from its top. - template > - class stack - { - public: - // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; - typedef typename S::size_type size_type; - - stack (size_type n = 200) - : seq_ (n) - {} - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (size_type i) - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - T& - operator[] (int i) - { - return operator[] (size_type (i)); - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - const T& - operator[] (size_type i) const - { - return seq_[size () - 1 - i]; - } - - /// Random access. - /// - /// Index 0 returns the topmost element. - const T& - operator[] (int i) const - { - return operator[] (size_type (i)); - } - - /// Steal the contents of \a t. - /// - /// Close to move-semantics. - void - push (YY_MOVE_REF (T) t) - { - seq_.push_back (T ()); - operator[](0).move (t); - } - - void - pop (int n = 1) - { - for (; 0 < n; --n) - seq_.pop_back (); - } - - void - clear () - { - seq_.clear (); - } - - size_type - size () const - { - return seq_.size (); - } +#line 184 "dhcp6_parser.h" - const_iterator - begin () const - { - return seq_.rbegin (); - } - const_iterator - end () const - { - return seq_.rend (); - } - private: - stack (const stack&); - stack& operator= (const stack&); - /// The wrapped container. - S seq_; - }; - /// Present a slice of the top of a stack. - template > - class slice + /// A Bison parser. + class Dhcp6Parser { public: - slice (const S& stack, int range) - : stack_ (stack) - , range_ (range) - {} - - const T& - operator[] (int i) const - { - return stack_[range_ - i]; - } - - private: - const S& stack_; - int range_; - }; - - - - /// A char[S] buffer to store and retrieve objects. +#ifndef PARSER6_STYPE + /// 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 state. - template - struct variant + /// via the current parser state. + class semantic_type { + public: /// Type of *this. - typedef variant self_type; + typedef semantic_type self_type; /// Empty construction. - variant () + semantic_type () YY_NOEXCEPT : yybuffer_ () , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template - variant (YY_RVREF (T) t) + semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); new (yyas_ ()) T (YY_MOVE (t)); } /// Destruction, allowed only if empty. - ~variant () + ~semantic_type () YY_NOEXCEPT { YYASSERT (!yytypeid_); } - /// Instantiate an empty \a T in here. - template +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template T& - emplace () + emplace (U&&... u) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T (); + return *new (yyas_ ()) T (std::forward (u)...); } - -# if defined __cplusplus && 201103L <= __cplusplus - /// Instantiate a \a T in here from \a t. - template +# else + /// Instantiate an empty \a T in here. + template T& - emplace (U&& u) + emplace () { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T (std::forward (u)); + return *new (yyas_ ()) T (); } -# else + /// Instantiate a \a T in here from \a t. template T& emplace (const T& t) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } @@ -369,75 +278,75 @@ namespace isc { namespace dhcp { /// Accessor to a built \a T. template T& - as () + as () YY_NOEXCEPT { YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& - as () const + as () const YY_NOEXCEPT { YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } - /// Swap the content with \a other, of same type. + /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with - /// variant::move (). + /// self_type::move (). template void - swap (self_type& other) + swap (self_type& that) YY_NOEXCEPT { YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *other.yytypeid_); - std::swap (as (), other.as ()); + YYASSERT (*yytypeid_ == *that.yytypeid_); + std::swap (as (), that.as ()); } - /// Move the content of \a other to this. + /// Move the content of \a that to this. /// - /// Destroys \a other. + /// Destroys \a that. template void - move (self_type& other) + move (self_type& that) { -# if defined __cplusplus && 201103L <= __cplusplus - emplace (std::move (other.as ())); +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); # else emplace (); - swap (other); + swap (that); # endif - other.destroy (); + that.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus - /// Move the content of \a other to this. +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. template void - move (self_type&& other) + move (self_type&& that) { - emplace (std::move (other.as ())); - other.destroy (); + emplace (std::move (that.as ())); + that.destroy (); } #endif - /// Copy the content of \a other to this. + /// Copy the content of \a that to this. template void - copy (const self_type& other) + copy (const self_type& that) { - emplace (other.as ()); + emplace (that.as ()); } /// Destroy the stored \a T. @@ -452,12 +361,12 @@ namespace isc { namespace dhcp { private: /// Prohibit blind copies. self_type& operator= (const self_type&); - variant (const self_type&); + semantic_type (const self_type&); /// Accessor to raw memory as \a T. template T* - yyas_ () + yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); @@ -466,30 +375,12 @@ namespace isc { namespace dhcp { /// Const accessor to raw memory as \a T. template const T* - yyas_ () const + yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } - union - { - /// Strongest alignment constraints. - long double yyalign_me; - /// A buffer large enough to store any of the semantic values. - char yyraw[S]; - } yybuffer_; - - /// Whether the content is built: if defined, the name of the stored type. - const std::type_info *yytypeid_; - }; - - - /// A Bison parser. - class Dhcp6Parser - { - public: -#ifndef PARSER6_STYPE /// An auxiliary type to compute the largest semantic type. union union_type { @@ -513,10 +404,24 @@ namespace isc { namespace dhcp { // "constant string" char dummy5[sizeof (std::string)]; -}; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me; + /// A buffer large enough to store any of the semantic values. + char yyraw[size]; + } yybuffer_; + + /// Whether the content is built: if defined, the name of the stored type. + const std::type_info *yytypeid_; + }; - /// Symbol semantic values. - typedef variant semantic_type; #else typedef PARSER6_STYPE semantic_type; #endif @@ -526,7 +431,18 @@ namespace isc { namespace dhcp { /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { - syntax_error (const location_type& l, const std::string& m); + syntax_error (const location_type& l, const std::string& m) + : std::runtime_error (m) + , location (l) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + , location (s.location) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + location_type location; }; @@ -727,29 +643,154 @@ namespace isc { namespace dhcp { typedef Base super_type; /// Default constructor. - basic_symbol (); - - /// Move or copy constructor. - basic_symbol (YY_RVREF (basic_symbol) other); + basic_symbol () + : value () + , location () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that); +#endif + /// Copy constructor. + basic_symbol (const basic_symbol& that); /// Constructor for valueless symbols, and symbols from each type. - basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l); - +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l) + : Base (t) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const location_type& l) + : Base (t) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif /// Destroy the symbol. - ~basic_symbol (); + ~basic_symbol () + { + clear (); + } /// Destroy contents, and record that is empty. - void clear (); + void clear () + { + // User destructor. + symbol_number_type yytype = this->type_get (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yytype) + { + default: + break; + } + + // Type destructor. +switch (yytype) + { + case 182: // value + case 186: // map_value + case 236: // db_type + case 320: // hr_mode + case 456: // duid_type + case 489: // ncr_protocol_value + case 497: // replace_client_name_value + value.template destroy< ElementPtr > (); + break; + + case 165: // "boolean" + value.template destroy< bool > (); + break; + + case 164: // "floating point" + value.template destroy< double > (); + break; + + case 163: // "integer" + value.template destroy< int64_t > (); + break; + + case 162: // "constant string" + value.template destroy< std::string > (); + break; + + default: + break; + } + + Base::clear (); + } /// Whether empty. - bool empty () const; + bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); @@ -761,9 +802,9 @@ namespace isc { namespace dhcp { location_type location; private: -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L /// Assignment operator. - basic_symbol& operator= (const basic_symbol& other); + basic_symbol& operator= (const basic_symbol& that); #endif }; @@ -773,8 +814,13 @@ namespace isc { namespace dhcp { /// Default constructor. by_type (); +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_type (by_type&& that); +#endif + /// Copy constructor. - by_type (const by_type& other); + by_type (const by_type& that); /// The symbol type as needed by the constructor. typedef token_type kind_type; @@ -790,10 +836,10 @@ namespace isc { namespace dhcp { /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The token. - token_type token () const; + token_type token () const YY_NOEXCEPT; /// The symbol type. /// \a empty_symbol when empty. @@ -802,7 +848,81 @@ namespace isc { namespace dhcp { }; /// "External" symbols: returned by the scanner. - typedef basic_symbol symbol_type; + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + + /// Empty symbol. + symbol_type () {} + + /// 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)) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_PREFERRED_LIFETIME || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SUBNET6 || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_PD_POOLS || tok == token::TOKEN_PREFIX || tok == token::TOKEN_PREFIX_LEN || tok == token::TOKEN_EXCLUDED_PREFIX || tok == token::TOKEN_EXCLUDED_PREFIX_LEN || tok == token::TOKEN_DELEGATED_LEN || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_ALL || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_MAC_SOURCES || tok == token::TOKEN_RELAY_SUPPLIED_OPTIONS || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_PREFIXES || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_SERVER_ID || tok == token::TOKEN_LLT || tok == token::TOKEN_EN || tok == token::TOKEN_LL || tok == token::TOKEN_IDENTIFIER || tok == token::TOKEN_HTYPE || tok == token::TOKEN_TIME || tok == token::TOKEN_ENTERPRISE_ID || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_ALWAYS_INCLUDE_FQDN || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP6 || tok == token::TOKEN_SUB_DHCP6 || tok == token::TOKEN_SUB_INTERFACES6 || tok == token::TOKEN_SUB_SUBNET6 || tok == token::TOKEN_SUB_POOL6 || tok == token::TOKEN_SUB_PD_POOL || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING); + } +#else + symbol_type (int tok, const location_type& l) + : super_type(token_type (tok), l) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_COMMA || tok == token::TOKEN_COLON || tok == token::TOKEN_LSQUARE_BRACKET || tok == token::TOKEN_RSQUARE_BRACKET || tok == token::TOKEN_LCURLY_BRACKET || tok == token::TOKEN_RCURLY_BRACKET || tok == token::TOKEN_NULL_TYPE || tok == token::TOKEN_DHCP6 || tok == token::TOKEN_INTERFACES_CONFIG || tok == token::TOKEN_INTERFACES || tok == token::TOKEN_RE_DETECT || tok == token::TOKEN_LEASE_DATABASE || tok == token::TOKEN_HOSTS_DATABASE || tok == token::TOKEN_HOSTS_DATABASES || tok == token::TOKEN_TYPE || tok == token::TOKEN_MEMFILE || tok == token::TOKEN_MYSQL || tok == token::TOKEN_POSTGRESQL || tok == token::TOKEN_CQL || tok == token::TOKEN_USER || tok == token::TOKEN_PASSWORD || tok == token::TOKEN_HOST || tok == token::TOKEN_PORT || tok == token::TOKEN_PERSIST || tok == token::TOKEN_LFC_INTERVAL || tok == token::TOKEN_READONLY || tok == token::TOKEN_CONNECT_TIMEOUT || tok == token::TOKEN_CONTACT_POINTS || tok == token::TOKEN_MAX_RECONNECT_TRIES || tok == token::TOKEN_RECONNECT_WAIT_TIME || tok == token::TOKEN_KEYSPACE || tok == token::TOKEN_REQUEST_TIMEOUT || tok == token::TOKEN_TCP_KEEPALIVE || tok == token::TOKEN_TCP_NODELAY || tok == token::TOKEN_MAX_ROW_ERRORS || tok == token::TOKEN_PREFERRED_LIFETIME || tok == token::TOKEN_VALID_LIFETIME || tok == token::TOKEN_RENEW_TIMER || tok == token::TOKEN_REBIND_TIMER || tok == token::TOKEN_DECLINE_PROBATION_PERIOD || tok == token::TOKEN_SUBNET6 || tok == token::TOKEN_OPTION_DEF || tok == token::TOKEN_OPTION_DATA || tok == token::TOKEN_NAME || tok == token::TOKEN_DATA || tok == token::TOKEN_CODE || tok == token::TOKEN_SPACE || tok == token::TOKEN_CSV_FORMAT || tok == token::TOKEN_ALWAYS_SEND || tok == token::TOKEN_RECORD_TYPES || tok == token::TOKEN_ENCAPSULATE || tok == token::TOKEN_ARRAY || tok == token::TOKEN_POOLS || tok == token::TOKEN_POOL || tok == token::TOKEN_PD_POOLS || tok == token::TOKEN_PREFIX || tok == token::TOKEN_PREFIX_LEN || tok == token::TOKEN_EXCLUDED_PREFIX || tok == token::TOKEN_EXCLUDED_PREFIX_LEN || tok == token::TOKEN_DELEGATED_LEN || tok == token::TOKEN_USER_CONTEXT || tok == token::TOKEN_COMMENT || tok == token::TOKEN_SUBNET || tok == token::TOKEN_INTERFACE || tok == token::TOKEN_INTERFACE_ID || tok == token::TOKEN_ID || tok == token::TOKEN_RAPID_COMMIT || tok == token::TOKEN_RESERVATION_MODE || tok == token::TOKEN_DISABLED || tok == token::TOKEN_OUT_OF_POOL || tok == token::TOKEN_ALL || tok == token::TOKEN_SHARED_NETWORKS || tok == token::TOKEN_MAC_SOURCES || tok == token::TOKEN_RELAY_SUPPLIED_OPTIONS || tok == token::TOKEN_HOST_RESERVATION_IDENTIFIERS || tok == token::TOKEN_CLIENT_CLASSES || tok == token::TOKEN_REQUIRE_CLIENT_CLASSES || tok == token::TOKEN_TEST || tok == token::TOKEN_ONLY_IF_REQUIRED || tok == token::TOKEN_CLIENT_CLASS || tok == token::TOKEN_RESERVATIONS || tok == token::TOKEN_IP_ADDRESSES || tok == token::TOKEN_PREFIXES || tok == token::TOKEN_DUID || tok == token::TOKEN_HW_ADDRESS || tok == token::TOKEN_HOSTNAME || tok == token::TOKEN_FLEX_ID || tok == token::TOKEN_RELAY || tok == token::TOKEN_IP_ADDRESS || tok == token::TOKEN_HOOKS_LIBRARIES || tok == token::TOKEN_LIBRARY || tok == token::TOKEN_PARAMETERS || tok == token::TOKEN_EXPIRED_LEASES_PROCESSING || tok == token::TOKEN_RECLAIM_TIMER_WAIT_TIME || tok == token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME || tok == token::TOKEN_HOLD_RECLAIMED_TIME || tok == token::TOKEN_MAX_RECLAIM_LEASES || tok == token::TOKEN_MAX_RECLAIM_TIME || tok == token::TOKEN_UNWARNED_RECLAIM_CYCLES || tok == token::TOKEN_SERVER_ID || tok == token::TOKEN_LLT || tok == token::TOKEN_EN || tok == token::TOKEN_LL || tok == token::TOKEN_IDENTIFIER || tok == token::TOKEN_HTYPE || tok == token::TOKEN_TIME || tok == token::TOKEN_ENTERPRISE_ID || tok == token::TOKEN_DHCP4O6_PORT || tok == token::TOKEN_CONTROL_SOCKET || tok == token::TOKEN_SOCKET_TYPE || tok == token::TOKEN_SOCKET_NAME || tok == token::TOKEN_DHCP_DDNS || tok == token::TOKEN_ENABLE_UPDATES || tok == token::TOKEN_QUALIFYING_SUFFIX || tok == token::TOKEN_SERVER_IP || tok == token::TOKEN_SERVER_PORT || tok == token::TOKEN_SENDER_IP || tok == token::TOKEN_SENDER_PORT || tok == token::TOKEN_MAX_QUEUE_SIZE || tok == token::TOKEN_NCR_PROTOCOL || tok == token::TOKEN_NCR_FORMAT || tok == token::TOKEN_ALWAYS_INCLUDE_FQDN || tok == token::TOKEN_OVERRIDE_NO_UPDATE || tok == token::TOKEN_OVERRIDE_CLIENT_UPDATE || tok == token::TOKEN_REPLACE_CLIENT_NAME || tok == token::TOKEN_GENERATED_PREFIX || tok == token::TOKEN_UDP || tok == token::TOKEN_TCP || tok == token::TOKEN_JSON || tok == token::TOKEN_WHEN_PRESENT || tok == token::TOKEN_NEVER || tok == token::TOKEN_ALWAYS || tok == token::TOKEN_WHEN_NOT_PRESENT || tok == token::TOKEN_LOGGING || tok == token::TOKEN_LOGGERS || tok == token::TOKEN_OUTPUT_OPTIONS || tok == token::TOKEN_OUTPUT || tok == token::TOKEN_DEBUGLEVEL || tok == token::TOKEN_SEVERITY || tok == token::TOKEN_FLUSH || tok == token::TOKEN_MAXSIZE || tok == token::TOKEN_MAXVER || tok == token::TOKEN_DHCP4 || tok == token::TOKEN_DHCPDDNS || tok == token::TOKEN_CONTROL_AGENT || tok == token::TOKEN_TOPLEVEL_JSON || tok == token::TOKEN_TOPLEVEL_DHCP6 || tok == token::TOKEN_SUB_DHCP6 || tok == token::TOKEN_SUB_INTERFACES6 || tok == token::TOKEN_SUB_SUBNET6 || tok == token::TOKEN_SUB_POOL6 || tok == token::TOKEN_SUB_PD_POOL || tok == token::TOKEN_SUB_RESERVATION || tok == token::TOKEN_SUB_OPTION_DEFS || tok == token::TOKEN_SUB_OPTION_DEF || tok == token::TOKEN_SUB_OPTION_DATA || tok == token::TOKEN_SUB_HOOKS_LIBRARY || tok == token::TOKEN_SUB_DHCP_DDNS || tok == token::TOKEN_SUB_LOGGING); + } +#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)) + { + YYASSERT (tok == token::TOKEN_BOOLEAN); + } +#else + symbol_type (int tok, const bool& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_FLOAT); + } +#else + symbol_type (int tok, const double& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_INTEGER); + } +#else + symbol_type (int tok, const int64_t& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (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)) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#else + symbol_type (int tok, const std::string& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (tok == token::TOKEN_STRING); + } +#endif + }; /// Build a parser object. Dhcp6Parser (isc::dhcp::Parser6Context& ctx_yyarg); @@ -838,2345 +958,3065 @@ namespace isc { namespace dhcp { /// Report a syntax error. void error (const syntax_error& err); - // Symbol constructors declarations. - static - symbol_type - make_END (YY_COPY (location_type) l); - - static - symbol_type - make_COMMA (YY_COPY (location_type) l); - - static - symbol_type - make_COLON (YY_COPY (location_type) l); - - static - symbol_type - make_LSQUARE_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_RSQUARE_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_LCURLY_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_RCURLY_BRACKET (YY_COPY (location_type) l); - - static - symbol_type - make_NULL_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP6 (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACES_CONFIG (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACES (YY_COPY (location_type) l); - - static - symbol_type - make_RE_DETECT (YY_COPY (location_type) l); - - static - symbol_type - make_LEASE_DATABASE (YY_COPY (location_type) l); - - static - symbol_type - make_HOSTS_DATABASE (YY_COPY (location_type) l); - - static - symbol_type - make_HOSTS_DATABASES (YY_COPY (location_type) l); - - static - symbol_type - make_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_MEMFILE (YY_COPY (location_type) l); - - static - symbol_type - make_MYSQL (YY_COPY (location_type) l); - - static - symbol_type - make_POSTGRESQL (YY_COPY (location_type) l); - - static - symbol_type - make_CQL (YY_COPY (location_type) l); - - static - symbol_type - make_USER (YY_COPY (location_type) l); - - static - symbol_type - make_PASSWORD (YY_COPY (location_type) l); - - static - symbol_type - make_HOST (YY_COPY (location_type) l); - - static - symbol_type - make_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_PERSIST (YY_COPY (location_type) l); - - static - symbol_type - make_LFC_INTERVAL (YY_COPY (location_type) l); - - static - symbol_type - make_READONLY (YY_COPY (location_type) l); - - static - symbol_type - make_CONNECT_TIMEOUT (YY_COPY (location_type) l); - - static - symbol_type - make_CONTACT_POINTS (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_RECONNECT_TRIES (YY_COPY (location_type) l); - - static - symbol_type - make_RECONNECT_WAIT_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_KEYSPACE (YY_COPY (location_type) l); - - static - symbol_type - make_REQUEST_TIMEOUT (YY_COPY (location_type) l); - - static - symbol_type - make_TCP_KEEPALIVE (YY_COPY (location_type) l); - - static - symbol_type - make_TCP_NODELAY (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_ROW_ERRORS (YY_COPY (location_type) l); - - static - symbol_type - make_PREFERRED_LIFETIME (YY_COPY (location_type) l); - - static - symbol_type - make_VALID_LIFETIME (YY_COPY (location_type) l); - - static - symbol_type - make_RENEW_TIMER (YY_COPY (location_type) l); - - static - symbol_type - make_REBIND_TIMER (YY_COPY (location_type) l); - - static - symbol_type - make_DECLINE_PROBATION_PERIOD (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET6 (YY_COPY (location_type) l); - - static - symbol_type - make_OPTION_DEF (YY_COPY (location_type) l); - - static - symbol_type - make_OPTION_DATA (YY_COPY (location_type) l); - - static - symbol_type - make_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_DATA (YY_COPY (location_type) l); - - static - symbol_type - make_CODE (YY_COPY (location_type) l); - - static - symbol_type - make_SPACE (YY_COPY (location_type) l); - - static - symbol_type - make_CSV_FORMAT (YY_COPY (location_type) l); - - static - symbol_type - make_ALWAYS_SEND (YY_COPY (location_type) l); - - static - symbol_type - make_RECORD_TYPES (YY_COPY (location_type) l); - - static - symbol_type - make_ENCAPSULATE (YY_COPY (location_type) l); - - static - symbol_type - make_ARRAY (YY_COPY (location_type) l); - - static - symbol_type - make_POOLS (YY_COPY (location_type) l); - - static - symbol_type - make_POOL (YY_COPY (location_type) l); - - static - symbol_type - make_PD_POOLS (YY_COPY (location_type) l); - - static - symbol_type - make_PREFIX (YY_COPY (location_type) l); - - static - symbol_type - make_PREFIX_LEN (YY_COPY (location_type) l); - - static - symbol_type - make_EXCLUDED_PREFIX (YY_COPY (location_type) l); - - static - symbol_type - make_EXCLUDED_PREFIX_LEN (YY_COPY (location_type) l); - - static - symbol_type - make_DELEGATED_LEN (YY_COPY (location_type) l); - - static - symbol_type - make_USER_CONTEXT (YY_COPY (location_type) l); - - static - symbol_type - make_COMMENT (YY_COPY (location_type) l); - - static - symbol_type - make_SUBNET (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACE (YY_COPY (location_type) l); - - static - symbol_type - make_INTERFACE_ID (YY_COPY (location_type) l); - - static - symbol_type - make_ID (YY_COPY (location_type) l); - - static - symbol_type - make_RAPID_COMMIT (YY_COPY (location_type) l); - - static - symbol_type - make_RESERVATION_MODE (YY_COPY (location_type) l); - - static - symbol_type - make_DISABLED (YY_COPY (location_type) l); - - static - symbol_type - make_OUT_OF_POOL (YY_COPY (location_type) l); - - static - symbol_type - make_ALL (YY_COPY (location_type) l); - - static - symbol_type - make_SHARED_NETWORKS (YY_COPY (location_type) l); - - static - symbol_type - make_MAC_SOURCES (YY_COPY (location_type) l); - - static - symbol_type - make_RELAY_SUPPLIED_OPTIONS (YY_COPY (location_type) l); - - static - symbol_type - make_HOST_RESERVATION_IDENTIFIERS (YY_COPY (location_type) l); - - static - symbol_type - make_CLIENT_CLASSES (YY_COPY (location_type) l); - - static - symbol_type - make_REQUIRE_CLIENT_CLASSES (YY_COPY (location_type) l); - - static - symbol_type - make_TEST (YY_COPY (location_type) l); - - static - symbol_type - make_ONLY_IF_REQUIRED (YY_COPY (location_type) l); - - static - symbol_type - make_CLIENT_CLASS (YY_COPY (location_type) l); - - static - symbol_type - make_RESERVATIONS (YY_COPY (location_type) l); - - static - symbol_type - make_IP_ADDRESSES (YY_COPY (location_type) l); - - static - symbol_type - make_PREFIXES (YY_COPY (location_type) l); - - static - symbol_type - make_DUID (YY_COPY (location_type) l); - - static - symbol_type - make_HW_ADDRESS (YY_COPY (location_type) l); - - static - symbol_type - make_HOSTNAME (YY_COPY (location_type) l); - - static - symbol_type - make_FLEX_ID (YY_COPY (location_type) l); - - static - symbol_type - make_RELAY (YY_COPY (location_type) l); - - static - symbol_type - make_IP_ADDRESS (YY_COPY (location_type) l); - - static - symbol_type - make_HOOKS_LIBRARIES (YY_COPY (location_type) l); - - static - symbol_type - make_LIBRARY (YY_COPY (location_type) l); - - static - symbol_type - make_PARAMETERS (YY_COPY (location_type) l); - - static - symbol_type - make_EXPIRED_LEASES_PROCESSING (YY_COPY (location_type) l); - - static - symbol_type - make_RECLAIM_TIMER_WAIT_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_HOLD_RECLAIMED_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_RECLAIM_LEASES (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_RECLAIM_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_UNWARNED_RECLAIM_CYCLES (YY_COPY (location_type) l); - - static - symbol_type - make_SERVER_ID (YY_COPY (location_type) l); - - static - symbol_type - make_LLT (YY_COPY (location_type) l); - - static - symbol_type - make_EN (YY_COPY (location_type) l); - - static - symbol_type - make_LL (YY_COPY (location_type) l); - - static - symbol_type - make_IDENTIFIER (YY_COPY (location_type) l); - - static - symbol_type - make_HTYPE (YY_COPY (location_type) l); - - static - symbol_type - make_TIME (YY_COPY (location_type) l); - - static - symbol_type - make_ENTERPRISE_ID (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP4O6_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_CONTROL_SOCKET (YY_COPY (location_type) l); - - static - symbol_type - make_SOCKET_TYPE (YY_COPY (location_type) l); - - static - symbol_type - make_SOCKET_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP_DDNS (YY_COPY (location_type) l); - - static - symbol_type - make_ENABLE_UPDATES (YY_COPY (location_type) l); - - static - symbol_type - make_QUALIFYING_SUFFIX (YY_COPY (location_type) l); - - static - symbol_type - make_SERVER_IP (YY_COPY (location_type) l); - - static - symbol_type - make_SERVER_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_SENDER_IP (YY_COPY (location_type) l); - - static - symbol_type - make_SENDER_PORT (YY_COPY (location_type) l); - - static - symbol_type - make_MAX_QUEUE_SIZE (YY_COPY (location_type) l); - - static - symbol_type - make_NCR_PROTOCOL (YY_COPY (location_type) l); - - static - symbol_type - make_NCR_FORMAT (YY_COPY (location_type) l); - - static - symbol_type - make_ALWAYS_INCLUDE_FQDN (YY_COPY (location_type) l); - - static - symbol_type - make_OVERRIDE_NO_UPDATE (YY_COPY (location_type) l); - - static - symbol_type - make_OVERRIDE_CLIENT_UPDATE (YY_COPY (location_type) l); - - static - symbol_type - make_REPLACE_CLIENT_NAME (YY_COPY (location_type) l); - - static - symbol_type - make_GENERATED_PREFIX (YY_COPY (location_type) l); - - static - symbol_type - make_UDP (YY_COPY (location_type) l); - - static - symbol_type - make_TCP (YY_COPY (location_type) l); - - static - symbol_type - make_JSON (YY_COPY (location_type) l); - - static - symbol_type - make_WHEN_PRESENT (YY_COPY (location_type) l); - - static - symbol_type - make_NEVER (YY_COPY (location_type) l); - - static - symbol_type - make_ALWAYS (YY_COPY (location_type) l); - - static - symbol_type - make_WHEN_NOT_PRESENT (YY_COPY (location_type) l); - - static - symbol_type - make_LOGGING (YY_COPY (location_type) l); - - static - symbol_type - make_LOGGERS (YY_COPY (location_type) l); - - static - symbol_type - make_OUTPUT_OPTIONS (YY_COPY (location_type) l); - - static - symbol_type - make_OUTPUT (YY_COPY (location_type) l); - - static - symbol_type - make_DEBUGLEVEL (YY_COPY (location_type) l); - - static - symbol_type - make_SEVERITY (YY_COPY (location_type) l); - - static - symbol_type - make_FLUSH (YY_COPY (location_type) l); - - static - symbol_type - make_MAXSIZE (YY_COPY (location_type) l); - - static - symbol_type - make_MAXVER (YY_COPY (location_type) l); - - static - symbol_type - make_DHCP4 (YY_COPY (location_type) l); - - static - symbol_type - make_DHCPDDNS (YY_COPY (location_type) l); - - static - symbol_type - make_CONTROL_AGENT (YY_COPY (location_type) l); - - static - symbol_type - make_TOPLEVEL_JSON (YY_COPY (location_type) l); - - static - symbol_type - make_TOPLEVEL_DHCP6 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_DHCP6 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_INTERFACES6 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_SUBNET6 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_POOL6 (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_PD_POOL (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_RESERVATION (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_OPTION_DEFS (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_OPTION_DEF (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_OPTION_DATA (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_HOOKS_LIBRARY (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_DHCP_DDNS (YY_COPY (location_type) l); - - static - symbol_type - make_SUB_LOGGING (YY_COPY (location_type) l); - - static - symbol_type - make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l); - - static - symbol_type - make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l); - - static - symbol_type - make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l); - - static - symbol_type - make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l); - - - - private: - /// This class is not copyable. - Dhcp6Parser (const Dhcp6Parser&); - Dhcp6Parser& operator= (const Dhcp6Parser&); - - /// State numbers. - typedef int state_type; - - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; - - /// Compute post-reduction state. - /// \param yystate the current state - /// \param yysym the nonterminal to push on the stack - state_type yy_lr_goto_state_ (state_type yystate, int yysym); - - /// 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); - - /// 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 const short yypact_ninf_; - static const signed char yytable_ninf_; - - /// Convert a scanner token number \a t to a symbol number. - static token_number_type yytranslate_ (token_type t); - - // Tables. - // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - // STATE-NUM. - static const short yypact_[]; - - // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - // Performed when YYTABLE does not specify something else to do. Zero - // means the default is an error. - static const unsigned short yydefact_[]; - - // YYPGOTO[NTERM-NUM]. - static const short yypgoto_[]; - - // YYDEFGOTO[NTERM-NUM]. - static const short yydefgoto_[]; - - // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - // positive, shift that token. If negative, reduce the rule whose - // number is the opposite. If YYTABLE_NINF, syntax error. - static const unsigned short yytable_[]; - - static const short yycheck_[]; - - // YYSTOS[STATE-NUM] -- The (internal number of the) accessing - // symbol of state STATE-NUM. - static const unsigned short yystos_[]; - - // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. - static const unsigned short yyr1_[]; - - // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. - static const unsigned char yyr2_[]; - - - /// Convert the symbol name \a n to a form suitable for a diagnostic. - static std::string yytnamerr_ (const char *n); - - - /// For a symbol, its name in clear. - static const char* const yytname_[]; -#if PARSER6_DEBUG - // YYRLINE[YYN] -- Source line where rule number YYN was defined. - static const unsigned short yyrline_[]; - /// Report on the debug stream that the rule \a r is going to be reduced. - virtual void yy_reduce_print_ (int r); - /// Print the state stack on the debug stream. - virtual void yystack_print_ (); - - /// Debugging level. - int yydebug_; - /// Debug stream. - std::ostream* yycdebug_; - - /// \brief Display a symbol type, value and location. - /// \param yyo The output stream. - /// \param yysym The symbol. - template - void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; -#endif - - /// \brief Reclaim the memory associated to a symbol. - /// \param yymsg Why this token is reclaimed. - /// If null, print nothing. - /// \param yysym The symbol. - template - void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; - - private: - /// Type access provider for state based symbols. - struct by_state - { - /// Default constructor. - by_state (); - - /// The symbol type as needed by the constructor. - typedef state_type kind_type; - - /// Constructor. - by_state (kind_type s); - - /// Copy constructor. - by_state (const by_state& other); - - /// Record that this symbol is empty. - void clear (); - - /// Steal the symbol type from \a that. - void move (by_state& that); - - /// The (internal) type number (corresponding to \a state). - /// \a empty_symbol when empty. - symbol_number_type type_get () const; - - /// The state number used to denote an empty symbol. - enum { empty_state = -1 }; - - /// The state. - /// \a empty when empty. - state_type state; - }; - - /// "Internal" symbol: element of the stack. - struct stack_symbol_type : basic_symbol - { - /// Superclass. - typedef basic_symbol super_type; - /// Construct an empty symbol. - stack_symbol_type (); - /// Move or copy construction. - stack_symbol_type (YY_RVREF (stack_symbol_type) that); - /// Steal the contents from \a sym to build this. - stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); -#if !defined __cplusplus || __cplusplus < 201103L - /// Assignment, needed by push_back by some old implementations. - /// Moves the contents of that. - stack_symbol_type& operator= (stack_symbol_type& that); -#endif - }; - - /// Stack type. - typedef stack stack_type; - - /// The stack. - stack_type yystack_; - - /// Push a new state on the stack. - /// \param m a debug message to display - /// if null, no trace is output. - /// \param sym the symbol - /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); - - /// Push a new look ahead token on the state on the stack. - /// \param m a debug message to display - /// if null, no trace is output. - /// \param s the state - /// \param sym the symbol (for its value and location). - /// \warning the contents of \a sym.value is stolen. - 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); - - /// Constants. - enum - { - yyeof_ = 0, - yylast_ = 985, ///< Last index in yytable_. - yynnts_ = 368, ///< Number of nonterminal symbols. - yyfinal_ = 30, ///< Termination state number. - yyterror_ = 1, - yyerrcode_ = 256, - yyntokens_ = 166 ///< Number of tokens. - }; - - - // User arguments. - isc::dhcp::Parser6Context& ctx; - }; - - // Symbol number corresponding to token number t. - inline - Dhcp6Parser::token_number_type - Dhcp6Parser::yytranslate_ (token_type t) - { - static - const token_number_type - translate_table[] = - { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165 - }; - const unsigned user_token_number_max_ = 420; - const token_number_type undef_token_ = 2; - - if (static_cast (t) <= yyeof_) - return yyeof_; - else if (static_cast (t) <= user_token_number_max_) - return translate_table[t]; - else - return undef_token_; - } - - inline - Dhcp6Parser::syntax_error::syntax_error (const location_type& l, const std::string& m) - : std::runtime_error (m) - , location (l) - {} - - // basic_symbol. - template - Dhcp6Parser::basic_symbol::basic_symbol () - : value () - , location () - {} - - template - Dhcp6Parser::basic_symbol::basic_symbol (YY_RVREF (basic_symbol) other) - : Base (YY_MOVE (other)) - , value () - , location (YY_MOVE (other.location)) - { - switch (other.type_get ()) - { - case 182: // value - case 186: // map_value - case 236: // db_type - case 320: // hr_mode - case 456: // duid_type - case 489: // ncr_protocol_value - case 497: // replace_client_name_value - value.YY_MOVE_OR_COPY< ElementPtr > (YY_MOVE (other.value)); - break; - - case 165: // "boolean" - value.YY_MOVE_OR_COPY< bool > (YY_MOVE (other.value)); - break; - - case 164: // "floating point" - value.YY_MOVE_OR_COPY< double > (YY_MOVE (other.value)); - break; - - case 163: // "integer" - value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (other.value)); - break; - - case 162: // "constant string" - value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (other.value)); - break; - - default: - break; - } - - } - - - // Implementation of basic_symbol constructor for each type. - template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) - : Base (t) - , location (YY_MOVE (l)) - {} - - template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) - : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) - {} - - - - template - Dhcp6Parser::basic_symbol::~basic_symbol () - { - clear (); - } - - template - void - Dhcp6Parser::basic_symbol::clear () - { - // User destructor. - symbol_number_type yytype = this->type_get (); - basic_symbol& yysym = *this; - (void) yysym; - switch (yytype) - { - default: - break; - } - - // Type destructor. - switch (yytype) - { - case 182: // value - case 186: // map_value - case 236: // db_type - case 320: // hr_mode - case 456: // duid_type - case 489: // ncr_protocol_value - case 497: // replace_client_name_value - value.template destroy< ElementPtr > (); - break; - - case 165: // "boolean" - value.template destroy< bool > (); - break; - - case 164: // "floating point" - value.template destroy< double > (); - break; - - case 163: // "integer" - value.template destroy< int64_t > (); - break; - - case 162: // "constant string" - value.template destroy< std::string > (); - break; - - default: - break; - } - - Base::clear (); - } - - template - bool - Dhcp6Parser::basic_symbol::empty () const - { - return Base::type_get () == empty_symbol; - } - - template - void - Dhcp6Parser::basic_symbol::move (basic_symbol& s) - { - super_type::move (s); - switch (this->type_get ()) - { - case 182: // value - case 186: // map_value - case 236: // db_type - case 320: // hr_mode - case 456: // duid_type - case 489: // ncr_protocol_value - case 497: // replace_client_name_value - value.move< ElementPtr > (YY_MOVE (s.value)); - break; - - case 165: // "boolean" - value.move< bool > (YY_MOVE (s.value)); - break; - - case 164: // "floating point" - value.move< double > (YY_MOVE (s.value)); - break; - - case 163: // "integer" - value.move< int64_t > (YY_MOVE (s.value)); - break; - - case 162: // "constant string" - value.move< std::string > (YY_MOVE (s.value)); - break; - - default: - break; - } - - location = YY_MOVE (s.location); - } - - // by_type. - inline - Dhcp6Parser::by_type::by_type () - : type (empty_symbol) - {} - - inline - Dhcp6Parser::by_type::by_type (const by_type& other) - : type (other.type) - {} - - inline - Dhcp6Parser::by_type::by_type (token_type t) - : type (yytranslate_ (t)) - {} - - inline - void - Dhcp6Parser::by_type::clear () - { - type = empty_symbol; - } - - inline - void - Dhcp6Parser::by_type::move (by_type& that) - { - type = that.type; - that.clear (); - } - - inline - int - Dhcp6Parser::by_type::type_get () const - { - return type; - } - - inline - Dhcp6Parser::token_type - Dhcp6Parser::by_type::token () const - { - // YYTOKNUM[NUM] -- (External) token number corresponding to the - // (internal) symbol number NUM (which must be that of a token). */ - static - const unsigned short - yytoken_number_[] = - { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420 - }; - return static_cast (yytoken_number_[type]); - } - - // Implementation of make_symbol for each symbol type. - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_END (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_END, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_COMMA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_COMMA, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_COLON (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_COLON, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LSQUARE_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LSQUARE_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RSQUARE_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RSQUARE_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LCURLY_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LCURLY_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RCURLY_BRACKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RCURLY_BRACKET, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_NULL_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NULL_TYPE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DHCP6 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP6, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_INTERFACES_CONFIG (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACES_CONFIG, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_INTERFACES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RE_DETECT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RE_DETECT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LEASE_DATABASE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LEASE_DATABASE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOSTS_DATABASE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOSTS_DATABASE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOSTS_DATABASES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOSTS_DATABASES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TYPE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MEMFILE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MEMFILE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MYSQL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MYSQL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_POSTGRESQL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_POSTGRESQL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CQL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CQL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_USER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_USER, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PASSWORD (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PASSWORD, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOST (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOST, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PORT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PERSIST (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PERSIST, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LFC_INTERVAL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LFC_INTERVAL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_READONLY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_READONLY, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CONNECT_TIMEOUT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONNECT_TIMEOUT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CONTACT_POINTS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONTACT_POINTS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAX_RECONNECT_TRIES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_RECONNECT_TRIES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RECONNECT_WAIT_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RECONNECT_WAIT_TIME, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_KEYSPACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_KEYSPACE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_REQUEST_TIMEOUT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REQUEST_TIMEOUT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TCP_KEEPALIVE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TCP_KEEPALIVE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TCP_NODELAY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TCP_NODELAY, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAX_ROW_ERRORS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_ROW_ERRORS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PREFERRED_LIFETIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PREFERRED_LIFETIME, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_VALID_LIFETIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_VALID_LIFETIME, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RENEW_TIMER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RENEW_TIMER, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_REBIND_TIMER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REBIND_TIMER, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DECLINE_PROBATION_PERIOD (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUBNET6 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET6, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OPTION_DEF (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OPTION_DEF, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OPTION_DATA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OPTION_DATA, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NAME, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DATA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DATA, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CODE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CODE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SPACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SPACE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CSV_FORMAT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CSV_FORMAT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ALWAYS_SEND (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALWAYS_SEND, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RECORD_TYPES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RECORD_TYPES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ENCAPSULATE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ENCAPSULATE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ARRAY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ARRAY, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_POOLS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_POOLS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_POOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_POOL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PD_POOLS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PD_POOLS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PREFIX (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PREFIX, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PREFIX_LEN (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PREFIX_LEN, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_EXCLUDED_PREFIX (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_EXCLUDED_PREFIX, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_EXCLUDED_PREFIX_LEN (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_EXCLUDED_PREFIX_LEN, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DELEGATED_LEN (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DELEGATED_LEN, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_USER_CONTEXT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_USER_CONTEXT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_COMMENT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_COMMENT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUBNET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUBNET, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_INTERFACE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_INTERFACE_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_INTERFACE_ID, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ID, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RAPID_COMMIT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RAPID_COMMIT, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RESERVATION_MODE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RESERVATION_MODE, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DISABLED (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DISABLED, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OUT_OF_POOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUT_OF_POOL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ALL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALL, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SHARED_NETWORKS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SHARED_NETWORKS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAC_SOURCES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAC_SOURCES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RELAY_SUPPLIED_OPTIONS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RELAY_SUPPLIED_OPTIONS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOST_RESERVATION_IDENTIFIERS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CLIENT_CLASSES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CLIENT_CLASSES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_REQUIRE_CLIENT_CLASSES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REQUIRE_CLIENT_CLASSES, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TEST (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TEST, YY_MOVE (l)); - } - - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ONLY_IF_REQUIRED (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ONLY_IF_REQUIRED, YY_MOVE (l)); - } + // Implementation of make_symbol for each symbol type. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_END (location_type l) + { + return symbol_type (token::TOKEN_END, std::move (l)); + } +#else + static + symbol_type + make_END (const location_type& l) + { + return symbol_type (token::TOKEN_END, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMA (location_type l) + { + return symbol_type (token::TOKEN_COMMA, std::move (l)); + } +#else + static + symbol_type + make_COMMA (const location_type& l) + { + return symbol_type (token::TOKEN_COMMA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COLON (location_type l) + { + return symbol_type (token::TOKEN_COLON, std::move (l)); + } +#else + static + symbol_type + make_COLON (const location_type& l) + { + return symbol_type (token::TOKEN_COLON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RSQUARE_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RSQUARE_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RSQUARE_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_LCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RCURLY_BRACKET (location_type l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, std::move (l)); + } +#else + static + symbol_type + make_RCURLY_BRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RCURLY_BRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NULL_TYPE (location_type l) + { + return symbol_type (token::TOKEN_NULL_TYPE, std::move (l)); + } +#else + static + symbol_type + make_NULL_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_NULL_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP6 (location_type l) + { + return symbol_type (token::TOKEN_DHCP6, std::move (l)); + } +#else + static + symbol_type + make_DHCP6 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACES_CONFIG (location_type l) + { + return symbol_type (token::TOKEN_INTERFACES_CONFIG, std::move (l)); + } +#else + static + symbol_type + make_INTERFACES_CONFIG (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACES_CONFIG, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACES (location_type l) + { + return symbol_type (token::TOKEN_INTERFACES, std::move (l)); + } +#else + static + symbol_type + make_INTERFACES (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RE_DETECT (location_type l) + { + return symbol_type (token::TOKEN_RE_DETECT, std::move (l)); + } +#else + static + symbol_type + make_RE_DETECT (const location_type& l) + { + return symbol_type (token::TOKEN_RE_DETECT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LEASE_DATABASE (location_type l) + { + return symbol_type (token::TOKEN_LEASE_DATABASE, std::move (l)); + } +#else + static + symbol_type + make_LEASE_DATABASE (const location_type& l) + { + return symbol_type (token::TOKEN_LEASE_DATABASE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTS_DATABASE (location_type l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASE, std::move (l)); + } +#else + static + symbol_type + make_HOSTS_DATABASE (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTS_DATABASES (location_type l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASES, std::move (l)); + } +#else + static + symbol_type + make_HOSTS_DATABASES (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTS_DATABASES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPE (location_type l) + { + return symbol_type (token::TOKEN_TYPE, std::move (l)); + } +#else + static + symbol_type + make_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEMFILE (location_type l) + { + return symbol_type (token::TOKEN_MEMFILE, std::move (l)); + } +#else + static + symbol_type + make_MEMFILE (const location_type& l) + { + return symbol_type (token::TOKEN_MEMFILE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MYSQL (location_type l) + { + return symbol_type (token::TOKEN_MYSQL, std::move (l)); + } +#else + static + symbol_type + make_MYSQL (const location_type& l) + { + return symbol_type (token::TOKEN_MYSQL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POSTGRESQL (location_type l) + { + return symbol_type (token::TOKEN_POSTGRESQL, std::move (l)); + } +#else + static + symbol_type + make_POSTGRESQL (const location_type& l) + { + return symbol_type (token::TOKEN_POSTGRESQL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CQL (location_type l) + { + return symbol_type (token::TOKEN_CQL, std::move (l)); + } +#else + static + symbol_type + make_CQL (const location_type& l) + { + return symbol_type (token::TOKEN_CQL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER (location_type l) + { + return symbol_type (token::TOKEN_USER, std::move (l)); + } +#else + static + symbol_type + make_USER (const location_type& l) + { + return symbol_type (token::TOKEN_USER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PASSWORD (location_type l) + { + return symbol_type (token::TOKEN_PASSWORD, std::move (l)); + } +#else + static + symbol_type + make_PASSWORD (const location_type& l) + { + return symbol_type (token::TOKEN_PASSWORD, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOST (location_type l) + { + return symbol_type (token::TOKEN_HOST, std::move (l)); + } +#else + static + symbol_type + make_HOST (const location_type& l) + { + return symbol_type (token::TOKEN_HOST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PORT (location_type l) + { + return symbol_type (token::TOKEN_PORT, std::move (l)); + } +#else + static + symbol_type + make_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PERSIST (location_type l) + { + return symbol_type (token::TOKEN_PERSIST, std::move (l)); + } +#else + static + symbol_type + make_PERSIST (const location_type& l) + { + return symbol_type (token::TOKEN_PERSIST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LFC_INTERVAL (location_type l) + { + return symbol_type (token::TOKEN_LFC_INTERVAL, std::move (l)); + } +#else + static + symbol_type + make_LFC_INTERVAL (const location_type& l) + { + return symbol_type (token::TOKEN_LFC_INTERVAL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_READONLY (location_type l) + { + return symbol_type (token::TOKEN_READONLY, std::move (l)); + } +#else + static + symbol_type + make_READONLY (const location_type& l) + { + return symbol_type (token::TOKEN_READONLY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONNECT_TIMEOUT (location_type l) + { + return symbol_type (token::TOKEN_CONNECT_TIMEOUT, std::move (l)); + } +#else + static + symbol_type + make_CONNECT_TIMEOUT (const location_type& l) + { + return symbol_type (token::TOKEN_CONNECT_TIMEOUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTACT_POINTS (location_type l) + { + return symbol_type (token::TOKEN_CONTACT_POINTS, std::move (l)); + } +#else + static + symbol_type + make_CONTACT_POINTS (const location_type& l) + { + return symbol_type (token::TOKEN_CONTACT_POINTS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_RECONNECT_TRIES (location_type l) + { + return symbol_type (token::TOKEN_MAX_RECONNECT_TRIES, std::move (l)); + } +#else + static + symbol_type + make_MAX_RECONNECT_TRIES (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_RECONNECT_TRIES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECONNECT_WAIT_TIME (location_type l) + { + return symbol_type (token::TOKEN_RECONNECT_WAIT_TIME, std::move (l)); + } +#else + static + symbol_type + make_RECONNECT_WAIT_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_RECONNECT_WAIT_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_KEYSPACE (location_type l) + { + return symbol_type (token::TOKEN_KEYSPACE, std::move (l)); + } +#else + static + symbol_type + make_KEYSPACE (const location_type& l) + { + return symbol_type (token::TOKEN_KEYSPACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REQUEST_TIMEOUT (location_type l) + { + return symbol_type (token::TOKEN_REQUEST_TIMEOUT, std::move (l)); + } +#else + static + symbol_type + make_REQUEST_TIMEOUT (const location_type& l) + { + return symbol_type (token::TOKEN_REQUEST_TIMEOUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP_KEEPALIVE (location_type l) + { + return symbol_type (token::TOKEN_TCP_KEEPALIVE, std::move (l)); + } +#else + static + symbol_type + make_TCP_KEEPALIVE (const location_type& l) + { + return symbol_type (token::TOKEN_TCP_KEEPALIVE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP_NODELAY (location_type l) + { + return symbol_type (token::TOKEN_TCP_NODELAY, std::move (l)); + } +#else + static + symbol_type + make_TCP_NODELAY (const location_type& l) + { + return symbol_type (token::TOKEN_TCP_NODELAY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_ROW_ERRORS (location_type l) + { + return symbol_type (token::TOKEN_MAX_ROW_ERRORS, std::move (l)); + } +#else + static + symbol_type + make_MAX_ROW_ERRORS (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_ROW_ERRORS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PREFERRED_LIFETIME (location_type l) + { + return symbol_type (token::TOKEN_PREFERRED_LIFETIME, std::move (l)); + } +#else + static + symbol_type + make_PREFERRED_LIFETIME (const location_type& l) + { + return symbol_type (token::TOKEN_PREFERRED_LIFETIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VALID_LIFETIME (location_type l) + { + return symbol_type (token::TOKEN_VALID_LIFETIME, std::move (l)); + } +#else + static + symbol_type + make_VALID_LIFETIME (const location_type& l) + { + return symbol_type (token::TOKEN_VALID_LIFETIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RENEW_TIMER (location_type l) + { + return symbol_type (token::TOKEN_RENEW_TIMER, std::move (l)); + } +#else + static + symbol_type + make_RENEW_TIMER (const location_type& l) + { + return symbol_type (token::TOKEN_RENEW_TIMER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REBIND_TIMER (location_type l) + { + return symbol_type (token::TOKEN_REBIND_TIMER, std::move (l)); + } +#else + static + symbol_type + make_REBIND_TIMER (const location_type& l) + { + return symbol_type (token::TOKEN_REBIND_TIMER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DECLINE_PROBATION_PERIOD (location_type l) + { + return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, std::move (l)); + } +#else + static + symbol_type + make_DECLINE_PROBATION_PERIOD (const location_type& l) + { + return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET6 (location_type l) + { + return symbol_type (token::TOKEN_SUBNET6, std::move (l)); + } +#else + static + symbol_type + make_SUBNET6 (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTION_DEF (location_type l) + { + return symbol_type (token::TOKEN_OPTION_DEF, std::move (l)); + } +#else + static + symbol_type + make_OPTION_DEF (const location_type& l) + { + return symbol_type (token::TOKEN_OPTION_DEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTION_DATA (location_type l) + { + return symbol_type (token::TOKEN_OPTION_DATA, std::move (l)); + } +#else + static + symbol_type + make_OPTION_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_OPTION_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NAME (location_type l) + { + return symbol_type (token::TOKEN_NAME, std::move (l)); + } +#else + static + symbol_type + make_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DATA (location_type l) + { + return symbol_type (token::TOKEN_DATA, std::move (l)); + } +#else + static + symbol_type + make_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CODE (location_type l) + { + return symbol_type (token::TOKEN_CODE, std::move (l)); + } +#else + static + symbol_type + make_CODE (const location_type& l) + { + return symbol_type (token::TOKEN_CODE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SPACE (location_type l) + { + return symbol_type (token::TOKEN_SPACE, std::move (l)); + } +#else + static + symbol_type + make_SPACE (const location_type& l) + { + return symbol_type (token::TOKEN_SPACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CSV_FORMAT (location_type l) + { + return symbol_type (token::TOKEN_CSV_FORMAT, std::move (l)); + } +#else + static + symbol_type + make_CSV_FORMAT (const location_type& l) + { + return symbol_type (token::TOKEN_CSV_FORMAT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALWAYS_SEND (location_type l) + { + return symbol_type (token::TOKEN_ALWAYS_SEND, std::move (l)); + } +#else + static + symbol_type + make_ALWAYS_SEND (const location_type& l) + { + return symbol_type (token::TOKEN_ALWAYS_SEND, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECORD_TYPES (location_type l) + { + return symbol_type (token::TOKEN_RECORD_TYPES, std::move (l)); + } +#else + static + symbol_type + make_RECORD_TYPES (const location_type& l) + { + return symbol_type (token::TOKEN_RECORD_TYPES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENCAPSULATE (location_type l) + { + return symbol_type (token::TOKEN_ENCAPSULATE, std::move (l)); + } +#else + static + symbol_type + make_ENCAPSULATE (const location_type& l) + { + return symbol_type (token::TOKEN_ENCAPSULATE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ARRAY (location_type l) + { + return symbol_type (token::TOKEN_ARRAY, std::move (l)); + } +#else + static + symbol_type + make_ARRAY (const location_type& l) + { + return symbol_type (token::TOKEN_ARRAY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POOLS (location_type l) + { + return symbol_type (token::TOKEN_POOLS, std::move (l)); + } +#else + static + symbol_type + make_POOLS (const location_type& l) + { + return symbol_type (token::TOKEN_POOLS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POOL (location_type l) + { + return symbol_type (token::TOKEN_POOL, std::move (l)); + } +#else + static + symbol_type + make_POOL (const location_type& l) + { + return symbol_type (token::TOKEN_POOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PD_POOLS (location_type l) + { + return symbol_type (token::TOKEN_PD_POOLS, std::move (l)); + } +#else + static + symbol_type + make_PD_POOLS (const location_type& l) + { + return symbol_type (token::TOKEN_PD_POOLS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PREFIX (location_type l) + { + return symbol_type (token::TOKEN_PREFIX, std::move (l)); + } +#else + static + symbol_type + make_PREFIX (const location_type& l) + { + return symbol_type (token::TOKEN_PREFIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PREFIX_LEN (location_type l) + { + return symbol_type (token::TOKEN_PREFIX_LEN, std::move (l)); + } +#else + static + symbol_type + make_PREFIX_LEN (const location_type& l) + { + return symbol_type (token::TOKEN_PREFIX_LEN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXCLUDED_PREFIX (location_type l) + { + return symbol_type (token::TOKEN_EXCLUDED_PREFIX, std::move (l)); + } +#else + static + symbol_type + make_EXCLUDED_PREFIX (const location_type& l) + { + return symbol_type (token::TOKEN_EXCLUDED_PREFIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXCLUDED_PREFIX_LEN (location_type l) + { + return symbol_type (token::TOKEN_EXCLUDED_PREFIX_LEN, std::move (l)); + } +#else + static + symbol_type + make_EXCLUDED_PREFIX_LEN (const location_type& l) + { + return symbol_type (token::TOKEN_EXCLUDED_PREFIX_LEN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DELEGATED_LEN (location_type l) + { + return symbol_type (token::TOKEN_DELEGATED_LEN, std::move (l)); + } +#else + static + symbol_type + make_DELEGATED_LEN (const location_type& l) + { + return symbol_type (token::TOKEN_DELEGATED_LEN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER_CONTEXT (location_type l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, std::move (l)); + } +#else + static + symbol_type + make_USER_CONTEXT (const location_type& l) + { + return symbol_type (token::TOKEN_USER_CONTEXT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMENT (location_type l) + { + return symbol_type (token::TOKEN_COMMENT, std::move (l)); + } +#else + static + symbol_type + make_COMMENT (const location_type& l) + { + return symbol_type (token::TOKEN_COMMENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBNET (location_type l) + { + return symbol_type (token::TOKEN_SUBNET, std::move (l)); + } +#else + static + symbol_type + make_SUBNET (const location_type& l) + { + return symbol_type (token::TOKEN_SUBNET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACE (location_type l) + { + return symbol_type (token::TOKEN_INTERFACE, std::move (l)); + } +#else + static + symbol_type + make_INTERFACE (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTERFACE_ID (location_type l) + { + return symbol_type (token::TOKEN_INTERFACE_ID, std::move (l)); + } +#else + static + symbol_type + make_INTERFACE_ID (const location_type& l) + { + return symbol_type (token::TOKEN_INTERFACE_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ID (location_type l) + { + return symbol_type (token::TOKEN_ID, std::move (l)); + } +#else + static + symbol_type + make_ID (const location_type& l) + { + return symbol_type (token::TOKEN_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RAPID_COMMIT (location_type l) + { + return symbol_type (token::TOKEN_RAPID_COMMIT, std::move (l)); + } +#else + static + symbol_type + make_RAPID_COMMIT (const location_type& l) + { + return symbol_type (token::TOKEN_RAPID_COMMIT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RESERVATION_MODE (location_type l) + { + return symbol_type (token::TOKEN_RESERVATION_MODE, std::move (l)); + } +#else + static + symbol_type + make_RESERVATION_MODE (const location_type& l) + { + return symbol_type (token::TOKEN_RESERVATION_MODE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DISABLED (location_type l) + { + return symbol_type (token::TOKEN_DISABLED, std::move (l)); + } +#else + static + symbol_type + make_DISABLED (const location_type& l) + { + return symbol_type (token::TOKEN_DISABLED, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUT_OF_POOL (location_type l) + { + return symbol_type (token::TOKEN_OUT_OF_POOL, std::move (l)); + } +#else + static + symbol_type + make_OUT_OF_POOL (const location_type& l) + { + return symbol_type (token::TOKEN_OUT_OF_POOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALL (location_type l) + { + return symbol_type (token::TOKEN_ALL, std::move (l)); + } +#else + static + symbol_type + make_ALL (const location_type& l) + { + return symbol_type (token::TOKEN_ALL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHARED_NETWORKS (location_type l) + { + return symbol_type (token::TOKEN_SHARED_NETWORKS, std::move (l)); + } +#else + static + symbol_type + make_SHARED_NETWORKS (const location_type& l) + { + return symbol_type (token::TOKEN_SHARED_NETWORKS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAC_SOURCES (location_type l) + { + return symbol_type (token::TOKEN_MAC_SOURCES, std::move (l)); + } +#else + static + symbol_type + make_MAC_SOURCES (const location_type& l) + { + return symbol_type (token::TOKEN_MAC_SOURCES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RELAY_SUPPLIED_OPTIONS (location_type l) + { + return symbol_type (token::TOKEN_RELAY_SUPPLIED_OPTIONS, std::move (l)); + } +#else + static + symbol_type + make_RELAY_SUPPLIED_OPTIONS (const location_type& l) + { + return symbol_type (token::TOKEN_RELAY_SUPPLIED_OPTIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOST_RESERVATION_IDENTIFIERS (location_type l) + { + return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, std::move (l)); + } +#else + static + symbol_type + make_HOST_RESERVATION_IDENTIFIERS (const location_type& l) + { + return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CLIENT_CLASSES (location_type l) + { + return symbol_type (token::TOKEN_CLIENT_CLASSES, std::move (l)); + } +#else + static + symbol_type + make_CLIENT_CLASSES (const location_type& l) + { + return symbol_type (token::TOKEN_CLIENT_CLASSES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REQUIRE_CLIENT_CLASSES (location_type l) + { + return symbol_type (token::TOKEN_REQUIRE_CLIENT_CLASSES, std::move (l)); + } +#else + static + symbol_type + make_REQUIRE_CLIENT_CLASSES (const location_type& l) + { + return symbol_type (token::TOKEN_REQUIRE_CLIENT_CLASSES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TEST (location_type l) + { + return symbol_type (token::TOKEN_TEST, std::move (l)); + } +#else + static + symbol_type + make_TEST (const location_type& l) + { + return symbol_type (token::TOKEN_TEST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ONLY_IF_REQUIRED (location_type l) + { + return symbol_type (token::TOKEN_ONLY_IF_REQUIRED, std::move (l)); + } +#else + static + symbol_type + make_ONLY_IF_REQUIRED (const location_type& l) + { + return symbol_type (token::TOKEN_ONLY_IF_REQUIRED, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CLIENT_CLASS (location_type l) + { + return symbol_type (token::TOKEN_CLIENT_CLASS, std::move (l)); + } +#else + static + symbol_type + make_CLIENT_CLASS (const location_type& l) + { + return symbol_type (token::TOKEN_CLIENT_CLASS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RESERVATIONS (location_type l) + { + return symbol_type (token::TOKEN_RESERVATIONS, std::move (l)); + } +#else + static + symbol_type + make_RESERVATIONS (const location_type& l) + { + return symbol_type (token::TOKEN_RESERVATIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IP_ADDRESSES (location_type l) + { + return symbol_type (token::TOKEN_IP_ADDRESSES, std::move (l)); + } +#else + static + symbol_type + make_IP_ADDRESSES (const location_type& l) + { + return symbol_type (token::TOKEN_IP_ADDRESSES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PREFIXES (location_type l) + { + return symbol_type (token::TOKEN_PREFIXES, std::move (l)); + } +#else + static + symbol_type + make_PREFIXES (const location_type& l) + { + return symbol_type (token::TOKEN_PREFIXES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DUID (location_type l) + { + return symbol_type (token::TOKEN_DUID, std::move (l)); + } +#else + static + symbol_type + make_DUID (const location_type& l) + { + return symbol_type (token::TOKEN_DUID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HW_ADDRESS (location_type l) + { + return symbol_type (token::TOKEN_HW_ADDRESS, std::move (l)); + } +#else + static + symbol_type + make_HW_ADDRESS (const location_type& l) + { + return symbol_type (token::TOKEN_HW_ADDRESS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOSTNAME (location_type l) + { + return symbol_type (token::TOKEN_HOSTNAME, std::move (l)); + } +#else + static + symbol_type + make_HOSTNAME (const location_type& l) + { + return symbol_type (token::TOKEN_HOSTNAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLEX_ID (location_type l) + { + return symbol_type (token::TOKEN_FLEX_ID, std::move (l)); + } +#else + static + symbol_type + make_FLEX_ID (const location_type& l) + { + return symbol_type (token::TOKEN_FLEX_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RELAY (location_type l) + { + return symbol_type (token::TOKEN_RELAY, std::move (l)); + } +#else + static + symbol_type + make_RELAY (const location_type& l) + { + return symbol_type (token::TOKEN_RELAY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IP_ADDRESS (location_type l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, std::move (l)); + } +#else + static + symbol_type + make_IP_ADDRESS (const location_type& l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOOKS_LIBRARIES (location_type l) + { + return symbol_type (token::TOKEN_HOOKS_LIBRARIES, std::move (l)); + } +#else + static + symbol_type + make_HOOKS_LIBRARIES (const location_type& l) + { + return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LIBRARY (location_type l) + { + return symbol_type (token::TOKEN_LIBRARY, std::move (l)); + } +#else + static + symbol_type + make_LIBRARY (const location_type& l) + { + return symbol_type (token::TOKEN_LIBRARY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PARAMETERS (location_type l) + { + return symbol_type (token::TOKEN_PARAMETERS, std::move (l)); + } +#else + static + symbol_type + make_PARAMETERS (const location_type& l) + { + return symbol_type (token::TOKEN_PARAMETERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXPIRED_LEASES_PROCESSING (location_type l) + { + return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, std::move (l)); + } +#else + static + symbol_type + make_EXPIRED_LEASES_PROCESSING (const location_type& l) + { + return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECLAIM_TIMER_WAIT_TIME (location_type l) + { + return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, std::move (l)); + } +#else + static + symbol_type + make_RECLAIM_TIMER_WAIT_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (location_type l) + { + return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, std::move (l)); + } +#else + static + symbol_type + make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HOLD_RECLAIMED_TIME (location_type l) + { + return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, std::move (l)); + } +#else + static + symbol_type + make_HOLD_RECLAIMED_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_RECLAIM_LEASES (location_type l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, std::move (l)); + } +#else + static + symbol_type + make_MAX_RECLAIM_LEASES (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_RECLAIM_TIME (location_type l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, std::move (l)); + } +#else + static + symbol_type + make_MAX_RECLAIM_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UNWARNED_RECLAIM_CYCLES (location_type l) + { + return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, std::move (l)); + } +#else + static + symbol_type + make_UNWARNED_RECLAIM_CYCLES (const location_type& l) + { + return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SERVER_ID (location_type l) + { + return symbol_type (token::TOKEN_SERVER_ID, std::move (l)); + } +#else + static + symbol_type + make_SERVER_ID (const location_type& l) + { + return symbol_type (token::TOKEN_SERVER_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LLT (location_type l) + { + return symbol_type (token::TOKEN_LLT, std::move (l)); + } +#else + static + symbol_type + make_LLT (const location_type& l) + { + return symbol_type (token::TOKEN_LLT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EN (location_type l) + { + return symbol_type (token::TOKEN_EN, std::move (l)); + } +#else + static + symbol_type + make_EN (const location_type& l) + { + return symbol_type (token::TOKEN_EN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LL (location_type l) + { + return symbol_type (token::TOKEN_LL, std::move (l)); + } +#else + static + symbol_type + make_LL (const location_type& l) + { + return symbol_type (token::TOKEN_LL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IDENTIFIER (location_type l) + { + return symbol_type (token::TOKEN_IDENTIFIER, std::move (l)); + } +#else + static + symbol_type + make_IDENTIFIER (const location_type& l) + { + return symbol_type (token::TOKEN_IDENTIFIER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HTYPE (location_type l) + { + return symbol_type (token::TOKEN_HTYPE, std::move (l)); + } +#else + static + symbol_type + make_HTYPE (const location_type& l) + { + return symbol_type (token::TOKEN_HTYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TIME (location_type l) + { + return symbol_type (token::TOKEN_TIME, std::move (l)); + } +#else + static + symbol_type + make_TIME (const location_type& l) + { + return symbol_type (token::TOKEN_TIME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENTERPRISE_ID (location_type l) + { + return symbol_type (token::TOKEN_ENTERPRISE_ID, std::move (l)); + } +#else + static + symbol_type + make_ENTERPRISE_ID (const location_type& l) + { + return symbol_type (token::TOKEN_ENTERPRISE_ID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4O6_PORT (location_type l) + { + return symbol_type (token::TOKEN_DHCP4O6_PORT, std::move (l)); + } +#else + static + symbol_type + make_DHCP4O6_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4O6_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_SOCKET (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_SOCKET, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_SOCKET (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_SOCKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SOCKET_TYPE (location_type l) + { + return symbol_type (token::TOKEN_SOCKET_TYPE, std::move (l)); + } +#else + static + symbol_type + make_SOCKET_TYPE (const location_type& l) + { + return symbol_type (token::TOKEN_SOCKET_TYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SOCKET_NAME (location_type l) + { + return symbol_type (token::TOKEN_SOCKET_NAME, std::move (l)); + } +#else + static + symbol_type + make_SOCKET_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_SOCKET_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP_DDNS (location_type l) + { + return symbol_type (token::TOKEN_DHCP_DDNS, std::move (l)); + } +#else + static + symbol_type + make_DHCP_DDNS (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP_DDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENABLE_UPDATES (location_type l) + { + return symbol_type (token::TOKEN_ENABLE_UPDATES, std::move (l)); + } +#else + static + symbol_type + make_ENABLE_UPDATES (const location_type& l) + { + return symbol_type (token::TOKEN_ENABLE_UPDATES, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_QUALIFYING_SUFFIX (location_type l) + { + return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, std::move (l)); + } +#else + static + symbol_type + make_QUALIFYING_SUFFIX (const location_type& l) + { + return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SERVER_IP (location_type l) + { + return symbol_type (token::TOKEN_SERVER_IP, std::move (l)); + } +#else + static + symbol_type + make_SERVER_IP (const location_type& l) + { + return symbol_type (token::TOKEN_SERVER_IP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SERVER_PORT (location_type l) + { + return symbol_type (token::TOKEN_SERVER_PORT, std::move (l)); + } +#else + static + symbol_type + make_SERVER_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_SERVER_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SENDER_IP (location_type l) + { + return symbol_type (token::TOKEN_SENDER_IP, std::move (l)); + } +#else + static + symbol_type + make_SENDER_IP (const location_type& l) + { + return symbol_type (token::TOKEN_SENDER_IP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SENDER_PORT (location_type l) + { + return symbol_type (token::TOKEN_SENDER_PORT, std::move (l)); + } +#else + static + symbol_type + make_SENDER_PORT (const location_type& l) + { + return symbol_type (token::TOKEN_SENDER_PORT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_QUEUE_SIZE (location_type l) + { + return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, std::move (l)); + } +#else + static + symbol_type + make_MAX_QUEUE_SIZE (const location_type& l) + { + return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NCR_PROTOCOL (location_type l) + { + return symbol_type (token::TOKEN_NCR_PROTOCOL, std::move (l)); + } +#else + static + symbol_type + make_NCR_PROTOCOL (const location_type& l) + { + return symbol_type (token::TOKEN_NCR_PROTOCOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NCR_FORMAT (location_type l) + { + return symbol_type (token::TOKEN_NCR_FORMAT, std::move (l)); + } +#else + static + symbol_type + make_NCR_FORMAT (const location_type& l) + { + return symbol_type (token::TOKEN_NCR_FORMAT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALWAYS_INCLUDE_FQDN (location_type l) + { + return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, std::move (l)); + } +#else + static + symbol_type + make_ALWAYS_INCLUDE_FQDN (const location_type& l) + { + return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OVERRIDE_NO_UPDATE (location_type l) + { + return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, std::move (l)); + } +#else + static + symbol_type + make_OVERRIDE_NO_UPDATE (const location_type& l) + { + return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OVERRIDE_CLIENT_UPDATE (location_type l) + { + return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, std::move (l)); + } +#else + static + symbol_type + make_OVERRIDE_CLIENT_UPDATE (const location_type& l) + { + return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REPLACE_CLIENT_NAME (location_type l) + { + return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, std::move (l)); + } +#else + static + symbol_type + make_REPLACE_CLIENT_NAME (const location_type& l) + { + return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_GENERATED_PREFIX (location_type l) + { + return symbol_type (token::TOKEN_GENERATED_PREFIX, std::move (l)); + } +#else + static + symbol_type + make_GENERATED_PREFIX (const location_type& l) + { + return symbol_type (token::TOKEN_GENERATED_PREFIX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UDP (location_type l) + { + return symbol_type (token::TOKEN_UDP, std::move (l)); + } +#else + static + symbol_type + make_UDP (const location_type& l) + { + return symbol_type (token::TOKEN_UDP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TCP (location_type l) + { + return symbol_type (token::TOKEN_TCP, std::move (l)); + } +#else + static + symbol_type + make_TCP (const location_type& l) + { + return symbol_type (token::TOKEN_TCP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_JSON (location_type l) + { + return symbol_type (token::TOKEN_JSON, std::move (l)); + } +#else + static + symbol_type + make_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WHEN_PRESENT (location_type l) + { + return symbol_type (token::TOKEN_WHEN_PRESENT, std::move (l)); + } +#else + static + symbol_type + make_WHEN_PRESENT (const location_type& l) + { + return symbol_type (token::TOKEN_WHEN_PRESENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NEVER (location_type l) + { + return symbol_type (token::TOKEN_NEVER, std::move (l)); + } +#else + static + symbol_type + make_NEVER (const location_type& l) + { + return symbol_type (token::TOKEN_NEVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALWAYS (location_type l) + { + return symbol_type (token::TOKEN_ALWAYS, std::move (l)); + } +#else + static + symbol_type + make_ALWAYS (const location_type& l) + { + return symbol_type (token::TOKEN_ALWAYS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WHEN_NOT_PRESENT (location_type l) + { + return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, std::move (l)); + } +#else + static + symbol_type + make_WHEN_NOT_PRESENT (const location_type& l) + { + return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGING (location_type l) + { + return symbol_type (token::TOKEN_LOGGING, std::move (l)); + } +#else + static + symbol_type + make_LOGGING (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOGGERS (location_type l) + { + return symbol_type (token::TOKEN_LOGGERS, std::move (l)); + } +#else + static + symbol_type + make_LOGGERS (const location_type& l) + { + return symbol_type (token::TOKEN_LOGGERS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT_OPTIONS (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT_OPTIONS (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUTPUT (location_type l) + { + return symbol_type (token::TOKEN_OUTPUT, std::move (l)); + } +#else + static + symbol_type + make_OUTPUT (const location_type& l) + { + return symbol_type (token::TOKEN_OUTPUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEBUGLEVEL (location_type l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, std::move (l)); + } +#else + static + symbol_type + make_DEBUGLEVEL (const location_type& l) + { + return symbol_type (token::TOKEN_DEBUGLEVEL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SEVERITY (location_type l) + { + return symbol_type (token::TOKEN_SEVERITY, std::move (l)); + } +#else + static + symbol_type + make_SEVERITY (const location_type& l) + { + return symbol_type (token::TOKEN_SEVERITY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLUSH (location_type l) + { + return symbol_type (token::TOKEN_FLUSH, std::move (l)); + } +#else + static + symbol_type + make_FLUSH (const location_type& l) + { + return symbol_type (token::TOKEN_FLUSH, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXSIZE (location_type l) + { + return symbol_type (token::TOKEN_MAXSIZE, std::move (l)); + } +#else + static + symbol_type + make_MAXSIZE (const location_type& l) + { + return symbol_type (token::TOKEN_MAXSIZE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAXVER (location_type l) + { + return symbol_type (token::TOKEN_MAXVER, std::move (l)); + } +#else + static + symbol_type + make_MAXVER (const location_type& l) + { + return symbol_type (token::TOKEN_MAXVER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCP4 (location_type l) + { + return symbol_type (token::TOKEN_DHCP4, std::move (l)); + } +#else + static + symbol_type + make_DHCP4 (const location_type& l) + { + return symbol_type (token::TOKEN_DHCP4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DHCPDDNS (location_type l) + { + return symbol_type (token::TOKEN_DHCPDDNS, std::move (l)); + } +#else + static + symbol_type + make_DHCPDDNS (const location_type& l) + { + return symbol_type (token::TOKEN_DHCPDDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROL_AGENT (location_type l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, std::move (l)); + } +#else + static + symbol_type + make_CONTROL_AGENT (const location_type& l) + { + return symbol_type (token::TOKEN_CONTROL_AGENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_JSON (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_JSON, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_JSON (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_JSON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_DHCP6 (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_DHCP6, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_DHCP6 (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_DHCP6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DHCP6 (location_type l) + { + return symbol_type (token::TOKEN_SUB_DHCP6, std::move (l)); + } +#else + static + symbol_type + make_SUB_DHCP6 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DHCP6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_INTERFACES6 (location_type l) + { + return symbol_type (token::TOKEN_SUB_INTERFACES6, std::move (l)); + } +#else + static + symbol_type + make_SUB_INTERFACES6 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_INTERFACES6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_SUBNET6 (location_type l) + { + return symbol_type (token::TOKEN_SUB_SUBNET6, std::move (l)); + } +#else + static + symbol_type + make_SUB_SUBNET6 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_SUBNET6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_POOL6 (location_type l) + { + return symbol_type (token::TOKEN_SUB_POOL6, std::move (l)); + } +#else + static + symbol_type + make_SUB_POOL6 (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_POOL6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_PD_POOL (location_type l) + { + return symbol_type (token::TOKEN_SUB_PD_POOL, std::move (l)); + } +#else + static + symbol_type + make_SUB_PD_POOL (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_PD_POOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_RESERVATION (location_type l) + { + return symbol_type (token::TOKEN_SUB_RESERVATION, std::move (l)); + } +#else + static + symbol_type + make_SUB_RESERVATION (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_RESERVATION, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_OPTION_DEFS (location_type l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEFS, std::move (l)); + } +#else + static + symbol_type + make_SUB_OPTION_DEFS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEFS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_OPTION_DEF (location_type l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEF, std::move (l)); + } +#else + static + symbol_type + make_SUB_OPTION_DEF (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_OPTION_DATA (location_type l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DATA, std::move (l)); + } +#else + static + symbol_type + make_SUB_OPTION_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_OPTION_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_HOOKS_LIBRARY (location_type l) + { + return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, std::move (l)); + } +#else + static + symbol_type + make_SUB_HOOKS_LIBRARY (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_DHCP_DDNS (location_type l) + { + return symbol_type (token::TOKEN_SUB_DHCP_DDNS, std::move (l)); + } +#else + static + symbol_type + make_SUB_DHCP_DDNS (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_DHCP_DDNS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_LOGGING (location_type l) + { + return symbol_type (token::TOKEN_SUB_LOGGING, std::move (l)); + } +#else + static + symbol_type + make_SUB_LOGGING (const location_type& l) + { + return symbol_type (token::TOKEN_SUB_LOGGING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v, location_type l) + { + return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_STRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_STRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTEGER (int64_t v, location_type l) + { + return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_INTEGER (const int64_t& v, const location_type& l) + { + return symbol_type (token::TOKEN_INTEGER, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v, location_type l) + { + return symbol_type (token::TOKEN_FLOAT, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_FLOAT (const double& v, const location_type& l) + { + return symbol_type (token::TOKEN_FLOAT, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BOOLEAN (bool v, location_type l) + { + return symbol_type (token::TOKEN_BOOLEAN, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_BOOLEAN (const bool& v, const location_type& l) + { + return symbol_type (token::TOKEN_BOOLEAN, v, l); + } +#endif - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CLIENT_CLASS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CLIENT_CLASS, YY_MOVE (l)); - } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RESERVATIONS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RESERVATIONS, YY_MOVE (l)); - } + private: + /// This class is not copyable. + Dhcp6Parser (const Dhcp6Parser&); + Dhcp6Parser& operator= (const Dhcp6Parser&); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_IP_ADDRESSES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_IP_ADDRESSES, YY_MOVE (l)); - } + /// State numbers. + typedef int state_type; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PREFIXES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PREFIXES, YY_MOVE (l)); - } + /// Generate an error message. + /// \param yystate the state where the error occurred. + /// \param yyla the lookahead token. + virtual std::string yysyntax_error_ (state_type yystate, + const symbol_type& yyla) const; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DUID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DUID, YY_MOVE (l)); - } + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + state_type yy_lr_goto_state_ (state_type yystate, int yysym); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HW_ADDRESS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HW_ADDRESS, YY_MOVE (l)); - } + /// 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); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOSTNAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOSTNAME, YY_MOVE (l)); - } + /// 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); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_FLEX_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_FLEX_ID, YY_MOVE (l)); - } + static const short yypact_ninf_; + static const signed char yytable_ninf_; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RELAY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RELAY, YY_MOVE (l)); - } + /// Convert a scanner token number \a t to a symbol number. + static token_number_type yytranslate_ (token_type t); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_IP_ADDRESS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_IP_ADDRESS, YY_MOVE (l)); - } + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOOKS_LIBRARIES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOOKS_LIBRARIES, YY_MOVE (l)); - } + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const unsigned short yydefact_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LIBRARY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LIBRARY, YY_MOVE (l)); - } + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_PARAMETERS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_PARAMETERS, YY_MOVE (l)); - } + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_EXPIRED_LEASES_PROCESSING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, YY_MOVE (l)); - } + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const unsigned short yytable_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_RECLAIM_TIMER_WAIT_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, YY_MOVE (l)); - } + static const short yycheck_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, YY_MOVE (l)); - } + // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // symbol of state STATE-NUM. + static const unsigned short yystos_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HOLD_RECLAIMED_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, YY_MOVE (l)); - } + // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + static const unsigned short yyr1_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAX_RECLAIM_LEASES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, YY_MOVE (l)); - } + // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + static const unsigned char yyr2_[]; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAX_RECLAIM_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, YY_MOVE (l)); - } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_UNWARNED_RECLAIM_CYCLES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, YY_MOVE (l)); - } + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *n); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SERVER_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SERVER_ID, YY_MOVE (l)); - } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LLT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LLT, YY_MOVE (l)); - } + /// For a symbol, its name in clear. + static const char* const yytname_[]; +#if PARSER6_DEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const unsigned short yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r); + /// Print the state stack on the debug stream. + virtual void yystack_print_ (); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_EN (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_EN, YY_MOVE (l)); - } + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LL, YY_MOVE (l)); - } + /// \brief Display a symbol type, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_IDENTIFIER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_IDENTIFIER, YY_MOVE (l)); - } + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_HTYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_HTYPE, YY_MOVE (l)); - } + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TIME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TIME, YY_MOVE (l)); - } + /// The symbol type as needed by the constructor. + typedef state_type kind_type; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ENTERPRISE_ID (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ENTERPRISE_ID, YY_MOVE (l)); - } + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DHCP4O6_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP4O6_PORT, YY_MOVE (l)); - } + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CONTROL_SOCKET (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONTROL_SOCKET, YY_MOVE (l)); - } + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SOCKET_TYPE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SOCKET_TYPE, YY_MOVE (l)); - } + /// Steal the symbol type from \a that. + void move (by_state& that); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SOCKET_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SOCKET_NAME, YY_MOVE (l)); - } + /// The (internal) type number (corresponding to \a state). + /// \a empty_symbol when empty. + symbol_number_type type_get () const YY_NOEXCEPT; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DHCP_DDNS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP_DDNS, YY_MOVE (l)); - } + /// The state number used to denote an empty symbol. + enum { empty_state = -1 }; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ENABLE_UPDATES (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ENABLE_UPDATES, YY_MOVE (l)); - } + /// The state. + /// \a empty when empty. + state_type state; + }; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_QUALIFYING_SUFFIX (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, YY_MOVE (l)); - } + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); +#endif + }; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SERVER_IP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SERVER_IP, YY_MOVE (l)); - } + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::reverse_iterator iterator; + typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::size_type size_type; + + stack (size_type n = 200) + : seq_ (n) + {} + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (size_type i) + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (int i) + { + return operator[] (size_type (i)); + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (size_type i) const + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (int i) const + { + return operator[] (size_type (i)); + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SERVER_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SERVER_PORT, YY_MOVE (l)); - } + /// Pop elements from the stack. + void + pop (int n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SENDER_IP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SENDER_IP, YY_MOVE (l)); - } + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SENDER_PORT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SENDER_PORT, YY_MOVE (l)); - } + /// Number of elements on the stack. + size_type + size () const YY_NOEXCEPT + { + return seq_.size (); + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAX_QUEUE_SIZE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, YY_MOVE (l)); - } + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.rbegin (); + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_NCR_PROTOCOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NCR_PROTOCOL, YY_MOVE (l)); - } + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.rend (); + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_NCR_FORMAT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_NCR_FORMAT, YY_MOVE (l)); - } + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, int range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (int i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + int range_; + }; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ALWAYS_INCLUDE_FQDN (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, YY_MOVE (l)); - } + private: + stack (const stack&); + stack& operator= (const stack&); + /// The wrapped container. + S seq_; + }; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OVERRIDE_NO_UPDATE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, YY_MOVE (l)); - } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OVERRIDE_CLIENT_UPDATE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, YY_MOVE (l)); - } + /// Stack type. + typedef stack stack_type; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_REPLACE_CLIENT_NAME (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, YY_MOVE (l)); - } + /// The stack. + stack_type yystack_; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_GENERATED_PREFIX (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_GENERATED_PREFIX, YY_MOVE (l)); - } + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_UDP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_UDP, YY_MOVE (l)); - } + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TCP (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TCP, YY_MOVE (l)); - } + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_JSON (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_JSON, YY_MOVE (l)); - } + /// Constants. + enum + { + yyeof_ = 0, + yylast_ = 985, ///< Last index in yytable_. + yynnts_ = 368, ///< Number of nonterminal symbols. + yyfinal_ = 30, ///< Termination state number. + yyterror_ = 1, + yyerrcode_ = 256, + yyntokens_ = 166 ///< Number of tokens. + }; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_WHEN_PRESENT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_WHEN_PRESENT, YY_MOVE (l)); - } + + // User arguments. + isc::dhcp::Parser6Context& ctx; + }; inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_NEVER (YY_COPY (location_type) l) + Dhcp6Parser::token_number_type + Dhcp6Parser::yytranslate_ (token_type t) { - return symbol_type (token::TOKEN_NEVER, YY_MOVE (l)); - } + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const token_number_type + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165 + }; + const unsigned user_token_number_max_ = 420; + const token_number_type undef_token_ = 2; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_ALWAYS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_ALWAYS, YY_MOVE (l)); + if (static_cast (t) <= yyeof_) + return yyeof_; + else if (static_cast (t) <= user_token_number_max_) + return translate_table[t]; + else + return undef_token_; } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_WHEN_NOT_PRESENT (YY_COPY (location_type) l) + // basic_symbol. +#if 201103L <= YY_CPLUSPLUS + template + Dhcp6Parser::basic_symbol::basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) { - return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, YY_MOVE (l)); - } + switch (this->type_get ()) + { + case 182: // value + case 186: // map_value + case 236: // db_type + case 320: // hr_mode + case 456: // duid_type + case 489: // ncr_protocol_value + case 497: // replace_client_name_value + value.move< ElementPtr > (std::move (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LOGGING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LOGGING, YY_MOVE (l)); - } + case 165: // "boolean" + value.move< bool > (std::move (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_LOGGERS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_LOGGERS, YY_MOVE (l)); - } + case 164: // "floating point" + value.move< double > (std::move (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OUTPUT_OPTIONS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUTPUT_OPTIONS, YY_MOVE (l)); - } + case 163: // "integer" + value.move< int64_t > (std::move (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_OUTPUT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_OUTPUT, YY_MOVE (l)); - } + case 162: // "constant string" + value.move< std::string > (std::move (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DEBUGLEVEL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DEBUGLEVEL, YY_MOVE (l)); - } + default: + break; + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SEVERITY (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SEVERITY, YY_MOVE (l)); } +#endif - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_FLUSH (YY_COPY (location_type) l) + template + Dhcp6Parser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + , location (that.location) { - return symbol_type (token::TOKEN_FLUSH, YY_MOVE (l)); - } + switch (this->type_get ()) + { + case 182: // value + case 186: // map_value + case 236: // db_type + case 320: // hr_mode + case 456: // duid_type + case 489: // ncr_protocol_value + case 497: // replace_client_name_value + value.copy< ElementPtr > (YY_MOVE (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAXSIZE (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAXSIZE, YY_MOVE (l)); - } + case 165: // "boolean" + value.copy< bool > (YY_MOVE (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_MAXVER (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_MAXVER, YY_MOVE (l)); - } + case 164: // "floating point" + value.copy< double > (YY_MOVE (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DHCP4 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCP4, YY_MOVE (l)); - } + case 163: // "integer" + value.copy< int64_t > (YY_MOVE (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_DHCPDDNS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_DHCPDDNS, YY_MOVE (l)); - } + case 162: // "constant string" + value.copy< std::string > (YY_MOVE (that.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_CONTROL_AGENT (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_CONTROL_AGENT, YY_MOVE (l)); - } + default: + break; + } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TOPLEVEL_JSON (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TOPLEVEL_JSON, YY_MOVE (l)); } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_TOPLEVEL_DHCP6 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_TOPLEVEL_DHCP6, YY_MOVE (l)); - } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_DHCP6 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_DHCP6, YY_MOVE (l)); - } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_INTERFACES6 (YY_COPY (location_type) l) + template + bool + Dhcp6Parser::basic_symbol::empty () const YY_NOEXCEPT { - return symbol_type (token::TOKEN_SUB_INTERFACES6, YY_MOVE (l)); + return Base::type_get () == empty_symbol; } - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_SUBNET6 (YY_COPY (location_type) l) + template + void + Dhcp6Parser::basic_symbol::move (basic_symbol& s) { - return symbol_type (token::TOKEN_SUB_SUBNET6, YY_MOVE (l)); - } + super_type::move (s); + switch (this->type_get ()) + { + case 182: // value + case 186: // map_value + case 236: // db_type + case 320: // hr_mode + case 456: // duid_type + case 489: // ncr_protocol_value + case 497: // replace_client_name_value + value.move< ElementPtr > (YY_MOVE (s.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_POOL6 (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_POOL6, YY_MOVE (l)); - } + case 165: // "boolean" + value.move< bool > (YY_MOVE (s.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_PD_POOL (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_PD_POOL, YY_MOVE (l)); - } + case 164: // "floating point" + value.move< double > (YY_MOVE (s.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_RESERVATION (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_RESERVATION, YY_MOVE (l)); - } + case 163: // "integer" + value.move< int64_t > (YY_MOVE (s.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_OPTION_DEFS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_OPTION_DEFS, YY_MOVE (l)); - } + case 162: // "constant string" + value.move< std::string > (YY_MOVE (s.value)); + break; - inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_OPTION_DEF (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_OPTION_DEF, YY_MOVE (l)); + default: + break; + } + + location = YY_MOVE (s.location); } + // by_type. inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_OPTION_DATA (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_OPTION_DATA, YY_MOVE (l)); - } + Dhcp6Parser::by_type::by_type () + : type (empty_symbol) + {} +#if 201103L <= YY_CPLUSPLUS inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_HOOKS_LIBRARY (YY_COPY (location_type) l) + Dhcp6Parser::by_type::by_type (by_type&& that) + : type (that.type) { - return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, YY_MOVE (l)); + that.clear (); } +#endif inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_DHCP_DDNS (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_DHCP_DDNS, YY_MOVE (l)); - } + Dhcp6Parser::by_type::by_type (const by_type& that) + : type (that.type) + {} inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_SUB_LOGGING (YY_COPY (location_type) l) - { - return symbol_type (token::TOKEN_SUB_LOGGING, YY_MOVE (l)); - } + Dhcp6Parser::by_type::by_type (token_type t) + : type (yytranslate_ (t)) + {} inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_STRING (YY_COPY (std::string) v, YY_COPY (location_type) l) + void + Dhcp6Parser::by_type::clear () { - return symbol_type (token::TOKEN_STRING, YY_MOVE (v), YY_MOVE (l)); + type = empty_symbol; } inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_INTEGER (YY_COPY (int64_t) v, YY_COPY (location_type) l) + void + Dhcp6Parser::by_type::move (by_type& that) { - return symbol_type (token::TOKEN_INTEGER, YY_MOVE (v), YY_MOVE (l)); + type = that.type; + that.clear (); } inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_FLOAT (YY_COPY (double) v, YY_COPY (location_type) l) + int + Dhcp6Parser::by_type::type_get () const YY_NOEXCEPT { - return symbol_type (token::TOKEN_FLOAT, YY_MOVE (v), YY_MOVE (l)); + return type; } inline - Dhcp6Parser::symbol_type - Dhcp6Parser::make_BOOLEAN (YY_COPY (bool) v, YY_COPY (location_type) l) + Dhcp6Parser::token_type + Dhcp6Parser::by_type::token () const YY_NOEXCEPT { - return symbol_type (token::TOKEN_BOOLEAN, YY_MOVE (v), YY_MOVE (l)); + // YYTOKNUM[NUM] -- (External) token number corresponding to the + // (internal) symbol number NUM (which must be that of a token). */ + static + const unsigned short + yytoken_number_[] = + { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420 + }; + return token_type (yytoken_number_[type]); } - -#line 14 "dhcp6_parser.yy" // lalr1.cc:404 +#line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 3180 "dhcp6_parser.h" // lalr1.cc:404 +#line 4019 "dhcp6_parser.h" + diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index c007b3749c..306b062136 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/dhcp6/kea-dhcp6.xml b/src/bin/dhcp6/kea-dhcp6.xml index 7470835752..b87720032c 100644 --- a/src/bin/dhcp6/kea-dhcp6.xml +++ b/src/bin/dhcp6/kea-dhcp6.xml @@ -9,8 +9,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin @@ -34,7 +34,7 @@ - 2011-2018 + 2011-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/dhcp6/location.hh b/src/bin/dhcp6/location.hh index 94d877060d..d043ee514a 100644 --- a/src/bin/dhcp6/location.hh +++ b/src/bin/dhcp6/location.hh @@ -1,8 +1,9 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -54,9 +55,10 @@ # endif # endif -#line 14 "dhcp6_parser.yy" // location.cc:339 +#line 14 "dhcp6_parser.yy" namespace isc { namespace dhcp { -#line 60 "location.hh" // location.cc:339 +#line 60 "location.hh" + /// A point in a source file. class position { @@ -316,7 +318,8 @@ namespace isc { namespace dhcp { return ostr; } -#line 14 "dhcp6_parser.yy" // location.cc:339 +#line 14 "dhcp6_parser.yy" } } // isc::dhcp -#line 322 "location.hh" // location.cc:339 +#line 323 "location.hh" + #endif // !YY_PARSER6_LOCATION_HH_INCLUDED diff --git a/src/bin/dhcp6/position.hh b/src/bin/dhcp6/position.hh index 22ef35f744..23536ce47f 100644 --- a/src/bin/dhcp6/position.hh +++ b/src/bin/dhcp6/position.hh @@ -1,4 +1,5 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". diff --git a/src/bin/dhcp6/stack.hh b/src/bin/dhcp6/stack.hh index 81e152d836..b90e3e2e0c 100644 --- a/src/bin/dhcp6/stack.hh +++ b/src/bin/dhcp6/stack.hh @@ -1,4 +1,5 @@ -// A Bison parser, made by GNU Bison 3.2.1. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc index 13a6206cef..506772f479 100644 --- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/dhcp6/tests/dhcp6_test_utils.h b/src/bin/dhcp6/tests/dhcp6_test_utils.h index 4b13266983..e6effa7f38 100644 --- a/src/bin/dhcp6/tests/dhcp6_test_utils.h +++ b/src/bin/dhcp6/tests/dhcp6_test_utils.h @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/keactrl/keactrl.xml b/src/bin/keactrl/keactrl.xml index 423e9012c7..0677c07b7a 100644 --- a/src/bin/keactrl/keactrl.xml +++ b/src/bin/keactrl/keactrl.xml @@ -9,8 +9,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of @@ -35,7 +35,7 @@ - 2014-2018 + 2014-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/lfc/kea-lfc.xml b/src/bin/lfc/kea-lfc.xml index 92a2a080b3..dfb8a0cbb5 100644 --- a/src/bin/lfc/kea-lfc.xml +++ b/src/bin/lfc/kea-lfc.xml @@ -11,8 +11,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin Siodelski, Thomas Markwalder, Francis Dupont, Jeremy C. Reed, @@ -35,7 +35,7 @@ - 2015-2018 + 2015-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/perfdhcp/perfdhcp.xml b/src/bin/perfdhcp/perfdhcp.xml index 5d6493534c..3ab3a9c6ec 100644 --- a/src/bin/perfdhcp/perfdhcp.xml +++ b/src/bin/perfdhcp/perfdhcp.xml @@ -10,8 +10,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of @@ -36,7 +36,7 @@ - 2016-2018 + 2016-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/shell/kea-shell.xml b/src/bin/shell/kea-shell.xml index e772c7f8a5..9a3b562988 100644 --- a/src/bin/shell/kea-shell.xml +++ b/src/bin/shell/kea-shell.xml @@ -10,8 +10,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin @@ -35,7 +35,7 @@ - 2017-2018 + 2017-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/bin/sockcreator/kea-sockcreator.xml b/src/bin/sockcreator/kea-sockcreator.xml index a8a602b6ec..786175bd8d 100644 --- a/src/bin/sockcreator/kea-sockcreator.xml +++ b/src/bin/sockcreator/kea-sockcreator.xml @@ -10,8 +10,8 @@ ISC Kea - July 11, 2018 - 1.4.0-P1 + Aug 28, 2019 + 1.4.0-P2 The Kea software has been written by a number of engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin @@ -41,7 +41,7 @@ - 2014-2018 + 2014-2019 Internet Systems Consortium, Inc. ("ISC") diff --git a/src/lib/dhcp/tests/duid_unittest.cc b/src/lib/dhcp/tests/duid_unittest.cc index d9bb7e1014..afbfee1415 100644 --- a/src/lib/dhcp/tests/duid_unittest.cc +++ b/src/lib/dhcp/tests/duid_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dhcp_ddns/ncr_msg.cc b/src/lib/dhcp_ddns/ncr_msg.cc index 6a4655e8a0..a8d7826458 100644 --- a/src/lib/dhcp_ddns/ncr_msg.cc +++ b/src/lib/dhcp_ddns/ncr_msg.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc index 4100eafacf..eef1e1cab2 100644 --- a/src/lib/dns/name.cc +++ b/src/lib/dns/name.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2009-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/eval/location.hh b/src/lib/eval/location.hh index 291696d580..2c1fc518ae 100644 --- a/src/lib/eval/location.hh +++ b/src/lib/eval/location.hh @@ -1,8 +1,9 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -38,12 +39,146 @@ #ifndef YY_EVAL_LOCATION_HH_INCLUDED # define YY_EVAL_LOCATION_HH_INCLUDED -# include "position.hh" +# include // std::max +# include +# include -#line 14 "parser.yy" // location.cc:296 +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +#line 14 "parser.yy" namespace isc { namespace eval { -#line 46 "location.hh" // location.cc:296 - /// Abstract a location. +#line 60 "location.hh" + + /// A point in a source file. + class position + { + public: + /// Construct a position. + explicit position (std::string* f = YY_NULLPTR, + unsigned l = 1u, + unsigned c = 1u) + : filename (f) + , line (l) + , column (c) + {} + + + /// Initialization. + void initialize (std::string* fn = YY_NULLPTR, + unsigned l = 1u, + unsigned c = 1u) + { + filename = fn; + line = l; + column = c; + } + + /** \name Line and Column related manipulators + ** \{ */ + /// (line related) Advance to the COUNT next lines. + void lines (int count = 1) + { + if (count) + { + column = 1u; + line = add_ (line, count, 1); + } + } + + /// (column related) Advance to the COUNT next columns. + void columns (int count = 1) + { + column = add_ (column, count, 1); + } + /** \} */ + + /// File name to which this position refers. + std::string* filename; + /// Current line number. + unsigned line; + /// Current column number. + unsigned column; + + private: + /// Compute max (min, lhs+rhs). + static unsigned add_ (unsigned lhs, int rhs, int min) + { + return static_cast (std::max (min, + static_cast (lhs) + rhs)); + } + }; + + /// Add \a width columns, in place. + inline position& + operator+= (position& res, int width) + { + res.columns (width); + return res; + } + + /// Add \a width columns. + inline position + operator+ (position res, int width) + { + return res += width; + } + + /// Subtract \a width columns, in place. + inline position& + operator-= (position& res, int width) + { + return res += -width; + } + + /// Subtract \a width columns. + inline position + operator- (position res, int width) + { + return res -= width; + } + + /// Compare two position objects. + inline bool + operator== (const position& pos1, const position& pos2) + { + return (pos1.line == pos2.line + && pos1.column == pos2.column + && (pos1.filename == pos2.filename + || (pos1.filename && pos2.filename + && *pos1.filename == *pos2.filename))); + } + + /// Compare two position objects. + inline bool + operator!= (const position& pos1, const position& pos2) + { + return !(pos1 == pos2); + } + + /** \brief Intercept output stream redirection. + ** \param ostr the destination output stream + ** \param pos a reference to the position to redirect + */ + template + std::basic_ostream& + operator<< (std::basic_ostream& ostr, const position& pos) + { + if (pos.filename) + ostr << *pos.filename << ':'; + return ostr << pos.line << '.' << pos.column; + } + + /// Two points in a source file. class location { public: @@ -52,30 +187,27 @@ namespace isc { namespace eval { location (const position& b, const position& e) : begin (b) , end (e) - { - } + {} /// Construct a 0-width location in \a p. explicit location (const position& p = position ()) : begin (p) , end (p) - { - } + {} /// Construct a 0-width location in \a f, \a l, \a c. explicit location (std::string* f, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) : begin (f, l, c) , end (f, l, c) - { - } + {} /// Initialization. void initialize (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) { begin.initialize (f, l, c); end = begin; @@ -170,10 +302,10 @@ namespace isc { namespace eval { ** Avoid duplicate information. */ template - inline std::basic_ostream& + std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -186,7 +318,8 @@ namespace isc { namespace eval { return ostr; } -#line 14 "parser.yy" // location.cc:296 +#line 14 "parser.yy" } } // isc::eval -#line 192 "location.hh" // location.cc:296 +#line 323 "location.hh" + #endif // !YY_EVAL_LOCATION_HH_INCLUDED diff --git a/src/lib/eval/parser.cc b/src/lib/eval/parser.cc index 7f6290134a..fdf8275b51 100644 --- a/src/lib/eval/parser.cc +++ b/src/lib/eval/parser.cc @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -30,32 +30,24 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. +// Undocumented macros, especially those whose name start with YY_, +// are private implementation details. Do not rely on them. + + // Take the name prefix into account. #define yylex evallex -// First part of user declarations. -#line 39 "parser.cc" // lalr1.cc:404 - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif #include "parser.h" -// User implementation prologue. -#line 53 "parser.cc" // lalr1.cc:412 // Unqualified %code blocks. -#line 33 "parser.yy" // lalr1.cc:413 +#line 33 "parser.yy" # include "eval_context.h" -#line 59 "parser.cc" // lalr1.cc:413 +#line 51 "parser.cc" #ifndef YY_ @@ -70,6 +62,15 @@ # endif #endif +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + #define YYRHSLOC(Rhs, K) ((Rhs)[K].location) /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -87,7 +88,7 @@ { \ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ } \ - while (/*CONSTCOND*/ false) + while (false) # endif @@ -106,7 +107,7 @@ { \ *yycdebug_ << Title << ' '; \ yy_print_ (*yycdebug_, Symbol); \ - *yycdebug_ << std::endl; \ + *yycdebug_ << '\n'; \ } \ } while (false) @@ -125,9 +126,9 @@ #else // !EVALDEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol) -# define YY_REDUCE_PRINT(Rule) static_cast(0) -# define YY_STACK_PRINT() static_cast(0) +# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) #endif // !EVALDEBUG @@ -139,9 +140,10 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 14 "parser.yy" // lalr1.cc:479 +#line 14 "parser.yy" namespace isc { namespace eval { -#line 145 "parser.cc" // lalr1.cc:479 +#line 146 "parser.cc" + /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is @@ -153,7 +155,7 @@ namespace isc { namespace eval { { if (*yystr == '"') { - std::string yyr = ""; + std::string yyr; char const *yyp = yystr; for (;;) @@ -166,7 +168,10 @@ namespace isc { namespace eval { case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - // Fall through. + else + goto append; + + append: default: yyr += *yyp; break; @@ -194,6 +199,8 @@ namespace isc { namespace eval { EvalParser::~EvalParser () {} + EvalParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} /*---------------. | Symbol types. | @@ -202,24 +209,20 @@ namespace isc { namespace eval { // by_state. - inline - EvalParser::by_state::by_state () + EvalParser::by_state::by_state () YY_NOEXCEPT : state (empty_state) {} - inline - EvalParser::by_state::by_state (const by_state& other) - : state (other.state) + EvalParser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) {} - inline void - EvalParser::by_state::clear () + EvalParser::by_state::clear () YY_NOEXCEPT { state = empty_state; } - inline void EvalParser::by_state::move (by_state& that) { @@ -227,14 +230,12 @@ namespace isc { namespace eval { that.clear (); } - inline - EvalParser::by_state::by_state (state_type s) + EvalParser::by_state::by_state (state_type s) YY_NOEXCEPT : state (s) {} - inline EvalParser::symbol_number_type - EvalParser::by_state::type_get () const + EvalParser::by_state::type_get () const YY_NOEXCEPT { if (state == empty_state) return empty_symbol; @@ -242,39 +243,92 @@ namespace isc { namespace eval { return yystos_[state]; } - inline EvalParser::stack_symbol_type::stack_symbol_type () {} + EvalParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) + { + switch (that.type_get ()) + { + case 61: // option_repr_type + value.YY_MOVE_OR_COPY< TokenOption::RepresentationType > (YY_MOVE (that.value)); + break; + + case 65: // pkt4_field + value.YY_MOVE_OR_COPY< TokenPkt4::FieldType > (YY_MOVE (that.value)); + break; + + case 66: // pkt6_field + value.YY_MOVE_OR_COPY< TokenPkt6::FieldType > (YY_MOVE (that.value)); + break; + + case 63: // pkt_metadata + value.YY_MOVE_OR_COPY< TokenPkt::MetadataType > (YY_MOVE (that.value)); + break; - inline - EvalParser::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that) - : super_type (s, that.location) + case 67: // relay6_field + value.YY_MOVE_OR_COPY< TokenRelay6Field::FieldType > (YY_MOVE (that.value)); + break; + + case 62: // nest_level + value.YY_MOVE_OR_COPY< int8_t > (YY_MOVE (that.value)); + break; + + case 49: // "constant string" + case 50: // "integer" + case 51: // "constant hexstring" + case 52: // "option name" + case 53: // "ip address" + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + case 60: // option_code + value.YY_MOVE_OR_COPY< uint16_t > (YY_MOVE (that.value)); + break; + + case 59: // integer_expr + case 64: // enterprise_id + value.YY_MOVE_OR_COPY< uint32_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } + + EvalParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s, YY_MOVE (that.location)) { - switch (that.type_get ()) + switch (that.type_get ()) { case 61: // option_repr_type - value.move< TokenOption::RepresentationType > (that.value); + value.move< TokenOption::RepresentationType > (YY_MOVE (that.value)); break; case 65: // pkt4_field - value.move< TokenPkt4::FieldType > (that.value); + value.move< TokenPkt4::FieldType > (YY_MOVE (that.value)); break; case 66: // pkt6_field - value.move< TokenPkt6::FieldType > (that.value); + value.move< TokenPkt6::FieldType > (YY_MOVE (that.value)); break; case 63: // pkt_metadata - value.move< TokenPkt::MetadataType > (that.value); + value.move< TokenPkt::MetadataType > (YY_MOVE (that.value)); break; case 67: // relay6_field - value.move< TokenRelay6Field::FieldType > (that.value); + value.move< TokenRelay6Field::FieldType > (YY_MOVE (that.value)); break; case 62: // nest_level - value.move< int8_t > (that.value); + value.move< int8_t > (YY_MOVE (that.value)); break; case 49: // "constant string" @@ -282,16 +336,16 @@ namespace isc { namespace eval { case 51: // "constant hexstring" case 52: // "option name" case 53: // "ip address" - value.move< std::string > (that.value); + value.move< std::string > (YY_MOVE (that.value)); break; case 60: // option_code - value.move< uint16_t > (that.value); + value.move< uint16_t > (YY_MOVE (that.value)); break; case 59: // integer_expr case 64: // enterprise_id - value.move< uint32_t > (that.value); + value.move< uint32_t > (YY_MOVE (that.value)); break; default: @@ -302,35 +356,35 @@ namespace isc { namespace eval { that.type = empty_symbol; } - inline +#if YY_CPLUSPLUS < 201103L EvalParser::stack_symbol_type& - EvalParser::stack_symbol_type::operator= (const stack_symbol_type& that) + EvalParser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; - switch (that.type_get ()) + switch (that.type_get ()) { case 61: // option_repr_type - value.copy< TokenOption::RepresentationType > (that.value); + value.move< TokenOption::RepresentationType > (that.value); break; case 65: // pkt4_field - value.copy< TokenPkt4::FieldType > (that.value); + value.move< TokenPkt4::FieldType > (that.value); break; case 66: // pkt6_field - value.copy< TokenPkt6::FieldType > (that.value); + value.move< TokenPkt6::FieldType > (that.value); break; case 63: // pkt_metadata - value.copy< TokenPkt::MetadataType > (that.value); + value.move< TokenPkt::MetadataType > (that.value); break; case 67: // relay6_field - value.copy< TokenRelay6Field::FieldType > (that.value); + value.move< TokenRelay6Field::FieldType > (that.value); break; case 62: // nest_level - value.copy< int8_t > (that.value); + value.move< int8_t > (that.value); break; case 49: // "constant string" @@ -338,16 +392,16 @@ namespace isc { namespace eval { case 51: // "constant hexstring" case 52: // "option name" case 53: // "ip address" - value.copy< std::string > (that.value); + value.move< std::string > (that.value); break; case 60: // option_code - value.copy< uint16_t > (that.value); + value.move< uint16_t > (that.value); break; case 59: // integer_expr case 64: // enterprise_id - value.copy< uint32_t > (that.value); + value.move< uint32_t > (that.value); break; default: @@ -355,12 +409,13 @@ namespace isc { namespace eval { } location = that.location; + // that is emptied. + that.state = empty_state; return *this; } - +#endif template - inline void EvalParser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const { @@ -377,114 +432,101 @@ namespace isc { namespace eval { std::ostream& yyoutput = yyo; YYUSE (yyoutput); symbol_number_type yytype = yysym.type_get (); +#if defined __GNUC__ && ! defined __clang__ && ! defined __ICC && __GNUC__ * 100 + __GNUC_MINOR__ <= 408 // Avoid a (spurious) G++ 4.8 warning about "array subscript is // below array bounds". if (yysym.empty ()) std::abort (); +#endif yyo << (yytype < yyntokens_ ? "token" : "nterm") << ' ' << yytname_[yytype] << " (" << yysym.location << ": "; switch (yytype) { - case 49: // "constant string" - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 394 "parser.cc" // lalr1.cc:636 + case 49: // "constant string" +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 450 "parser.cc" break; case 50: // "integer" - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 401 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 456 "parser.cc" break; case 51: // "constant hexstring" - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 408 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 462 "parser.cc" break; case 52: // "option name" - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 415 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 468 "parser.cc" break; case 53: // "ip address" - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< std::string > (); } -#line 422 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < std::string > (); } +#line 474 "parser.cc" break; case 59: // integer_expr - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< uint32_t > (); } -#line 429 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < uint32_t > (); } +#line 480 "parser.cc" break; case 60: // option_code - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< uint16_t > (); } -#line 436 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < uint16_t > (); } +#line 486 "parser.cc" break; case 61: // option_repr_type - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< TokenOption::RepresentationType > (); } -#line 443 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < TokenOption::RepresentationType > (); } +#line 492 "parser.cc" break; case 62: // nest_level - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< int8_t > (); } -#line 450 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < int8_t > (); } +#line 498 "parser.cc" break; case 63: // pkt_metadata - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< TokenPkt::MetadataType > (); } -#line 457 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < TokenPkt::MetadataType > (); } +#line 504 "parser.cc" break; case 64: // enterprise_id - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< uint32_t > (); } -#line 464 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < uint32_t > (); } +#line 510 "parser.cc" break; case 65: // pkt4_field - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< TokenPkt4::FieldType > (); } -#line 471 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < TokenPkt4::FieldType > (); } +#line 516 "parser.cc" break; case 66: // pkt6_field - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< TokenPkt6::FieldType > (); } -#line 478 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < TokenPkt6::FieldType > (); } +#line 522 "parser.cc" break; case 67: // relay6_field - -#line 110 "parser.yy" // lalr1.cc:636 - { yyoutput << yysym.value.template as< TokenRelay6Field::FieldType > (); } -#line 485 "parser.cc" // lalr1.cc:636 +#line 110 "parser.yy" + { yyoutput << yysym.value.template as < TokenRelay6Field::FieldType > (); } +#line 528 "parser.cc" break; - default: break; } @@ -492,26 +534,27 @@ namespace isc { namespace eval { } #endif - inline void - EvalParser::yypush_ (const char* m, state_type s, symbol_type& sym) + EvalParser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) { - stack_symbol_type t (s, sym); - yypush_ (m, t); + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); } - inline void - EvalParser::yypush_ (const char* m, stack_symbol_type& s) + EvalParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) { - if (m) - YY_SYMBOL_PRINT (m, s); - yystack_.push (s); +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif } - inline void - EvalParser::yypop_ (unsigned int n) + EvalParser::yypop_ (int n) { yystack_.pop (n); } @@ -543,7 +586,7 @@ namespace isc { namespace eval { } #endif // EVALDEBUG - inline EvalParser::state_type + EvalParser::state_type EvalParser::yy_lr_goto_state_ (state_type yystate, int yysym) { int yyr = yypgoto_[yysym - yyntokens_] + yystate; @@ -553,18 +596,24 @@ namespace isc { namespace eval { return yydefgoto_[yysym - yyntokens_]; } - inline bool + bool EvalParser::yy_pact_value_is_default_ (int yyvalue) { return yyvalue == yypact_ninf_; } - inline bool + bool EvalParser::yy_table_value_is_error_ (int yyvalue) { return yyvalue == yytable_ninf_; } + int + EvalParser::operator() () + { + return parse (); + } + int EvalParser::parse () { @@ -586,11 +635,11 @@ namespace isc { namespace eval { /// The return value of parse (). int yyresult; - // FIXME: This shoud be completely indented. It is not yet to - // avoid gratuitous conflicts when merging into the master branch. +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { - YYCDEBUG << "Starting parse" << std::endl; + YYCDEBUG << "Starting parse\n"; /* Initialize the stack. The initial state will be set in @@ -598,21 +647,25 @@ namespace isc { namespace eval { location values to have been already stored, initialize these stacks with a primary value. */ yystack_.clear (); - yypush_ (YY_NULLPTR, 0, yyla); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); - // A new symbol was pushed on the stack. + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << std::endl; + YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; // Accept? if (yystack_[0].state == yyfinal_) - goto yyacceptlab; + YYACCEPT; goto yybackup; - // Backup. - yybackup: + /*-----------. + | yybackup. | + `-----------*/ + yybackup: // Try to take a decision without lookahead. yyn = yypact_[yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) @@ -622,16 +675,21 @@ namespace isc { namespace eval { if (yyla.empty ()) { YYCDEBUG << "Reading a token: "; +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { symbol_type yylookahead (yylex (ctx)); yyla.move (yylookahead); } +#if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); goto yyerrlab1; } +#endif // YY_EXCEPTIONS } YY_SYMBOL_PRINT ("Next token is", yyla); @@ -656,9 +714,10 @@ namespace isc { namespace eval { --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", yyn, yyla); + yypush_ ("Shifting", yyn, YY_MOVE (yyla)); goto yynewstate; + /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ @@ -668,41 +727,42 @@ namespace isc { namespace eval { goto yyerrlab; goto yyreduce; + /*-----------------------------. - | yyreduce -- Do a reduction. | + | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: yylen = yyr2_[yyn]; { stack_symbol_type yylhs; - yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]); + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); /* Variants are always initialized to an empty instance of the correct type. The default '$$ = $1' action is NOT applied when using variants. */ - switch (yyr1_[yyn]) + switch (yyr1_[yyn]) { case 61: // option_repr_type - yylhs.value.build< TokenOption::RepresentationType > (); + yylhs.value.emplace< TokenOption::RepresentationType > (); break; case 65: // pkt4_field - yylhs.value.build< TokenPkt4::FieldType > (); + yylhs.value.emplace< TokenPkt4::FieldType > (); break; case 66: // pkt6_field - yylhs.value.build< TokenPkt6::FieldType > (); + yylhs.value.emplace< TokenPkt6::FieldType > (); break; case 63: // pkt_metadata - yylhs.value.build< TokenPkt::MetadataType > (); + yylhs.value.emplace< TokenPkt::MetadataType > (); break; case 67: // relay6_field - yylhs.value.build< TokenRelay6Field::FieldType > (); + yylhs.value.emplace< TokenRelay6Field::FieldType > (); break; case 62: // nest_level - yylhs.value.build< int8_t > (); + yylhs.value.emplace< int8_t > (); break; case 49: // "constant string" @@ -710,16 +770,16 @@ namespace isc { namespace eval { case 51: // "constant hexstring" case 52: // "option name" case 53: // "ip address" - yylhs.value.build< std::string > (); + yylhs.value.emplace< std::string > (); break; case 60: // option_code - yylhs.value.build< uint16_t > (); + yylhs.value.emplace< uint16_t > (); break; case 59: // integer_expr case 64: // enterprise_id - yylhs.value.build< uint32_t > (); + yylhs.value.emplace< uint32_t > (); break; default: @@ -727,70 +787,73 @@ namespace isc { namespace eval { } - // Compute the default @$. + // Default location. { - slice slice (yystack_, yylen); - YYLLOC_DEFAULT (yylhs.location, slice, yylen); + stack_type::slice range (yystack_, yylen); + YYLLOC_DEFAULT (yylhs.location, range, yylen); + yyerror_range[1].location = yylhs.location; } // Perform the reduction. YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS try +#endif // YY_EXCEPTIONS { switch (yyn) { case 6: -#line 130 "parser.yy" // lalr1.cc:859 +#line 130 "parser.yy" { TokenPtr neg(new TokenNot()); ctx.expression.push_back(neg); } -#line 749 "parser.cc" // lalr1.cc:859 +#line 812 "parser.cc" break; case 7: -#line 135 "parser.yy" // lalr1.cc:859 +#line 135 "parser.yy" { TokenPtr neg(new TokenAnd()); ctx.expression.push_back(neg); } -#line 758 "parser.cc" // lalr1.cc:859 +#line 821 "parser.cc" break; case 8: -#line 140 "parser.yy" // lalr1.cc:859 +#line 140 "parser.yy" { TokenPtr neg(new TokenOr()); ctx.expression.push_back(neg); } -#line 767 "parser.cc" // lalr1.cc:859 +#line 830 "parser.cc" break; case 9: -#line 145 "parser.yy" // lalr1.cc:859 +#line 145 "parser.yy" { TokenPtr eq(new TokenEqual()); ctx.expression.push_back(eq); } -#line 776 "parser.cc" // lalr1.cc:859 +#line 839 "parser.cc" break; case 10: -#line 150 "parser.yy" // lalr1.cc:859 +#line 150 "parser.yy" { - TokenPtr opt(new TokenOption(yystack_[3].value.as< uint16_t > (), TokenOption::EXISTS)); + TokenPtr opt(new TokenOption(yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS)); ctx.expression.push_back(opt); } -#line 785 "parser.cc" // lalr1.cc:859 +#line 848 "parser.cc" break; case 11: -#line 155 "parser.yy" // lalr1.cc:859 +#line 155 "parser.yy" { switch (ctx.getUniverse()) { case Option::V4: { - TokenPtr opt(new TokenRelay4Option(yystack_[3].value.as< uint16_t > (), TokenOption::EXISTS)); + TokenPtr opt(new TokenRelay4Option(yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS)); ctx.expression.push_back(opt); break; } @@ -805,16 +868,16 @@ namespace isc { namespace eval { error(yystack_[5].location, "relay4 can only be used in DHCPv4."); } } -#line 809 "parser.cc" // lalr1.cc:859 +#line 872 "parser.cc" break; case 12: -#line 175 "parser.yy" // lalr1.cc:859 +#line 175 "parser.yy" { switch (ctx.getUniverse()) { case Option::V6: { - TokenPtr opt(new TokenRelay6Option(yystack_[8].value.as< int8_t > (), yystack_[3].value.as< uint16_t > (), TokenOption::EXISTS)); + TokenPtr opt(new TokenRelay6Option(yystack_[8].value.as < int8_t > (), yystack_[3].value.as < uint16_t > (), TokenOption::EXISTS)); ctx.expression.push_back(opt); break; } @@ -823,51 +886,51 @@ namespace isc { namespace eval { error(yystack_[10].location, "relay6 can only be used in DHCPv6."); } } -#line 827 "parser.cc" // lalr1.cc:859 +#line 890 "parser.cc" break; case 13: -#line 189 "parser.yy" // lalr1.cc:859 +#line 189 "parser.yy" { // Expression: vendor-class[1234].exists // // This token will find option 124 (DHCPv4) or 16 (DHCPv6), // and will check if enterprise-id equals specified value. - TokenPtr exist(new TokenVendorClass(ctx.getUniverse(), yystack_[3].value.as< uint32_t > (), TokenOption::EXISTS)); + TokenPtr exist(new TokenVendorClass(ctx.getUniverse(), yystack_[3].value.as < uint32_t > (), TokenOption::EXISTS)); ctx.expression.push_back(exist); } -#line 840 "parser.cc" // lalr1.cc:859 +#line 903 "parser.cc" break; case 14: -#line 198 "parser.yy" // lalr1.cc:859 +#line 198 "parser.yy" { // Expression: vendor[1234].exists // // This token will find option 125 (DHCPv4) or 17 (DHCPv6), // and will check if enterprise-id equals specified value. - TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[3].value.as< uint32_t > (), TokenOption::EXISTS)); + TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[3].value.as < uint32_t > (), TokenOption::EXISTS)); ctx.expression.push_back(exist); } -#line 853 "parser.cc" // lalr1.cc:859 +#line 916 "parser.cc" break; case 15: -#line 207 "parser.yy" // lalr1.cc:859 +#line 207 "parser.yy" { // Expression vendor[1234].option[123].exists // // This token will check if specified vendor option // exists, has specified enterprise-id and if has // specified suboption. - TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as< uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as< uint16_t > ())); + TokenPtr exist(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as < uint32_t > (), TokenOption::EXISTS, yystack_[3].value.as < uint16_t > ())); ctx.expression.push_back(exist); } -#line 867 "parser.cc" // lalr1.cc:859 +#line 930 "parser.cc" break; case 16: -#line 217 "parser.yy" // lalr1.cc:859 +#line 217 "parser.yy" { // Expression member('foo') // @@ -875,59 +938,59 @@ namespace isc { namespace eval { // the specified client class. // To avoid loops at evaluation only already defined and // built-in classes are allowed. - std::string cc = yystack_[1].value.as< std::string > (); + std::string cc = yystack_[1].value.as < std::string > (); if (!ctx.isClientClassDefined(cc)) { error(yystack_[1].location, "Not defined client class '" + cc + "'"); } TokenPtr member(new TokenMember(cc)); ctx.expression.push_back(member); } -#line 886 "parser.cc" // lalr1.cc:859 +#line 949 "parser.cc" break; case 17: -#line 234 "parser.yy" // lalr1.cc:859 +#line 234 "parser.yy" { - TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ())); + TokenPtr str(new TokenString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(str); } -#line 895 "parser.cc" // lalr1.cc:859 +#line 958 "parser.cc" break; case 18: -#line 239 "parser.yy" // lalr1.cc:859 +#line 239 "parser.yy" { - TokenPtr hex(new TokenHexString(yystack_[0].value.as< std::string > ())); + TokenPtr hex(new TokenHexString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(hex); } -#line 904 "parser.cc" // lalr1.cc:859 +#line 967 "parser.cc" break; case 19: -#line 244 "parser.yy" // lalr1.cc:859 +#line 244 "parser.yy" { - TokenPtr ip(new TokenIpAddress(yystack_[0].value.as< std::string > ())); + TokenPtr ip(new TokenIpAddress(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(ip); } -#line 913 "parser.cc" // lalr1.cc:859 +#line 976 "parser.cc" break; case 20: -#line 249 "parser.yy" // lalr1.cc:859 +#line 249 "parser.yy" { - TokenPtr opt(new TokenOption(yystack_[3].value.as< uint16_t > (), yystack_[0].value.as< TokenOption::RepresentationType > ())); + TokenPtr opt(new TokenOption(yystack_[3].value.as < uint16_t > (), yystack_[0].value.as < TokenOption::RepresentationType > ())); ctx.expression.push_back(opt); } -#line 922 "parser.cc" // lalr1.cc:859 +#line 985 "parser.cc" break; case 21: -#line 254 "parser.yy" // lalr1.cc:859 +#line 254 "parser.yy" { switch (ctx.getUniverse()) { case Option::V4: { - TokenPtr opt(new TokenRelay4Option(yystack_[3].value.as< uint16_t > (), yystack_[0].value.as< TokenOption::RepresentationType > ())); + TokenPtr opt(new TokenRelay4Option(yystack_[3].value.as < uint16_t > (), yystack_[0].value.as < TokenOption::RepresentationType > ())); ctx.expression.push_back(opt); break; } @@ -942,16 +1005,16 @@ namespace isc { namespace eval { error(yystack_[5].location, "relay4 can only be used in DHCPv4."); } } -#line 946 "parser.cc" // lalr1.cc:859 +#line 1009 "parser.cc" break; case 22: -#line 275 "parser.yy" // lalr1.cc:859 +#line 275 "parser.yy" { switch (ctx.getUniverse()) { case Option::V6: { - TokenPtr opt(new TokenRelay6Option(yystack_[8].value.as< int8_t > (), yystack_[3].value.as< uint16_t > (), yystack_[0].value.as< TokenOption::RepresentationType > ())); + TokenPtr opt(new TokenRelay6Option(yystack_[8].value.as < int8_t > (), yystack_[3].value.as < uint16_t > (), yystack_[0].value.as < TokenOption::RepresentationType > ())); ctx.expression.push_back(opt); break; } @@ -960,25 +1023,25 @@ namespace isc { namespace eval { error(yystack_[10].location, "relay6 can only be used in DHCPv6."); } } -#line 964 "parser.cc" // lalr1.cc:859 +#line 1027 "parser.cc" break; case 23: -#line 290 "parser.yy" // lalr1.cc:859 +#line 290 "parser.yy" { - TokenPtr pkt_metadata(new TokenPkt(yystack_[0].value.as< TokenPkt::MetadataType > ())); + TokenPtr pkt_metadata(new TokenPkt(yystack_[0].value.as < TokenPkt::MetadataType > ())); ctx.expression.push_back(pkt_metadata); } -#line 973 "parser.cc" // lalr1.cc:859 +#line 1036 "parser.cc" break; case 24: -#line 295 "parser.yy" // lalr1.cc:859 +#line 295 "parser.yy" { switch (ctx.getUniverse()) { case Option::V4: { - TokenPtr pkt4_field(new TokenPkt4(yystack_[0].value.as< TokenPkt4::FieldType > ())); + TokenPtr pkt4_field(new TokenPkt4(yystack_[0].value.as < TokenPkt4::FieldType > ())); ctx.expression.push_back(pkt4_field); break; } @@ -987,16 +1050,16 @@ namespace isc { namespace eval { error(yystack_[2].location, "pkt4 can only be used in DHCPv4."); } } -#line 991 "parser.cc" // lalr1.cc:859 +#line 1054 "parser.cc" break; case 25: -#line 309 "parser.yy" // lalr1.cc:859 +#line 309 "parser.yy" { switch (ctx.getUniverse()) { case Option::V6: { - TokenPtr pkt6_field(new TokenPkt6(yystack_[0].value.as< TokenPkt6::FieldType > ())); + TokenPtr pkt6_field(new TokenPkt6(yystack_[0].value.as < TokenPkt6::FieldType > ())); ctx.expression.push_back(pkt6_field); break; } @@ -1005,16 +1068,16 @@ namespace isc { namespace eval { error(yystack_[2].location, "pkt6 can only be used in DHCPv6."); } } -#line 1009 "parser.cc" // lalr1.cc:859 +#line 1072 "parser.cc" break; case 26: -#line 323 "parser.yy" // lalr1.cc:859 +#line 323 "parser.yy" { switch (ctx.getUniverse()) { case Option::V6: { - TokenPtr relay6field(new TokenRelay6Field(yystack_[3].value.as< int8_t > (), yystack_[0].value.as< TokenRelay6Field::FieldType > ())); + TokenPtr relay6field(new TokenRelay6Field(yystack_[3].value.as < int8_t > (), yystack_[0].value.as < TokenRelay6Field::FieldType > ())); ctx.expression.push_back(relay6field); break; } @@ -1023,38 +1086,38 @@ namespace isc { namespace eval { error(yystack_[5].location, "relay6 can only be used in DHCPv6."); } } -#line 1027 "parser.cc" // lalr1.cc:859 +#line 1090 "parser.cc" break; case 27: -#line 338 "parser.yy" // lalr1.cc:859 +#line 338 "parser.yy" { TokenPtr sub(new TokenSubstring()); ctx.expression.push_back(sub); } -#line 1036 "parser.cc" // lalr1.cc:859 +#line 1099 "parser.cc" break; case 28: -#line 343 "parser.yy" // lalr1.cc:859 +#line 343 "parser.yy" { TokenPtr conc(new TokenConcat()); ctx.expression.push_back(conc); } -#line 1045 "parser.cc" // lalr1.cc:859 +#line 1108 "parser.cc" break; case 29: -#line 348 "parser.yy" // lalr1.cc:859 +#line 348 "parser.yy" { TokenPtr cond(new TokenIfElse()); ctx.expression.push_back(cond); } -#line 1054 "parser.cc" // lalr1.cc:859 +#line 1117 "parser.cc" break; case 30: -#line 353 "parser.yy" // lalr1.cc:859 +#line 353 "parser.yy" { // expression: vendor.enterprise // @@ -1063,11 +1126,11 @@ namespace isc { namespace eval { TokenPtr vendor(new TokenVendor(ctx.getUniverse(), 0, TokenVendor::ENTERPRISE_ID)); ctx.expression.push_back(vendor); } -#line 1067 "parser.cc" // lalr1.cc:859 +#line 1130 "parser.cc" break; case 31: -#line 362 "parser.yy" // lalr1.cc:859 +#line 362 "parser.yy" { // expression: vendor-class.enterprise // @@ -1077,24 +1140,24 @@ namespace isc { namespace eval { TokenVendor::ENTERPRISE_ID)); ctx.expression.push_back(vendor); } -#line 1081 "parser.cc" // lalr1.cc:859 +#line 1144 "parser.cc" break; case 32: -#line 372 "parser.yy" // lalr1.cc:859 +#line 372 "parser.yy" { // This token will search for vendor option with // specified enterprise-id. If found, will search // for specified suboption and finally will return // its content. - TokenPtr opt(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as< uint32_t > (), yystack_[0].value.as< TokenOption::RepresentationType > (), yystack_[3].value.as< uint16_t > ())); + TokenPtr opt(new TokenVendor(ctx.getUniverse(), yystack_[8].value.as < uint32_t > (), yystack_[0].value.as < TokenOption::RepresentationType > (), yystack_[3].value.as < uint16_t > ())); ctx.expression.push_back(opt); } -#line 1094 "parser.cc" // lalr1.cc:859 +#line 1157 "parser.cc" break; case 33: -#line 381 "parser.yy" // lalr1.cc:859 +#line 381 "parser.yy" { // expression: vendor-class[1234].data // @@ -1103,15 +1166,15 @@ namespace isc { namespace eval { // structure allows multiple of them). If chunk // offset is not specified, we assume the first (0th) // is requested. - TokenPtr vendor_class(new TokenVendorClass(ctx.getUniverse(), yystack_[3].value.as< uint32_t > (), + TokenPtr vendor_class(new TokenVendorClass(ctx.getUniverse(), yystack_[3].value.as < uint32_t > (), TokenVendor::DATA, 0)); ctx.expression.push_back(vendor_class); } -#line 1111 "parser.cc" // lalr1.cc:859 +#line 1174 "parser.cc" break; case 34: -#line 394 "parser.yy" // lalr1.cc:859 +#line 394 "parser.yy" { // expression: vendor-class[1234].data[5] // @@ -1119,271 +1182,276 @@ namespace isc { namespace eval { // but chunks of data (typically 1, but the option // structure allows multiple of them). This syntax // specifies which data chunk (tuple) we want. - uint8_t index = ctx.convertUint8(yystack_[1].value.as< std::string > (), yystack_[1].location); - TokenPtr vendor_class(new TokenVendorClass(ctx.getUniverse(), yystack_[6].value.as< uint32_t > (), + uint8_t index = ctx.convertUint8(yystack_[1].value.as < std::string > (), yystack_[1].location); + TokenPtr vendor_class(new TokenVendorClass(ctx.getUniverse(), yystack_[6].value.as < uint32_t > (), TokenVendor::DATA, index)); ctx.expression.push_back(vendor_class); } -#line 1128 "parser.cc" // lalr1.cc:859 +#line 1191 "parser.cc" break; case 35: -#line 407 "parser.yy" // lalr1.cc:859 +#line 407 "parser.yy" { - TokenPtr integer(new TokenInteger(yystack_[0].value.as< uint32_t > ())); + TokenPtr integer(new TokenInteger(yystack_[0].value.as < uint32_t > ())); ctx.expression.push_back(integer); } -#line 1137 "parser.cc" // lalr1.cc:859 +#line 1200 "parser.cc" break; case 36: -#line 414 "parser.yy" // lalr1.cc:859 +#line 414 "parser.yy" { - yylhs.value.as< uint32_t > () = ctx.convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location); + yylhs.value.as < uint32_t > () = ctx.convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1145 "parser.cc" // lalr1.cc:859 +#line 1208 "parser.cc" break; case 37: -#line 420 "parser.yy" // lalr1.cc:859 +#line 420 "parser.yy" { - yylhs.value.as< uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as< std::string > (), yystack_[0].location); + yylhs.value.as < uint16_t > () = ctx.convertOptionCode(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1153 "parser.cc" // lalr1.cc:859 +#line 1216 "parser.cc" break; case 38: -#line 424 "parser.yy" // lalr1.cc:859 +#line 424 "parser.yy" { - yylhs.value.as< uint16_t > () = ctx.convertOptionName(yystack_[0].value.as< std::string > (), yystack_[0].location); + yylhs.value.as < uint16_t > () = ctx.convertOptionName(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1161 "parser.cc" // lalr1.cc:859 +#line 1224 "parser.cc" break; case 39: -#line 430 "parser.yy" // lalr1.cc:859 +#line 430 "parser.yy" { - yylhs.value.as< TokenOption::RepresentationType > () = TokenOption::TEXTUAL; + yylhs.value.as < TokenOption::RepresentationType > () = TokenOption::TEXTUAL; } -#line 1169 "parser.cc" // lalr1.cc:859 +#line 1232 "parser.cc" break; case 40: -#line 434 "parser.yy" // lalr1.cc:859 +#line 434 "parser.yy" { - yylhs.value.as< TokenOption::RepresentationType > () = TokenOption::HEXADECIMAL; + yylhs.value.as < TokenOption::RepresentationType > () = TokenOption::HEXADECIMAL; } -#line 1177 "parser.cc" // lalr1.cc:859 +#line 1240 "parser.cc" break; case 41: -#line 440 "parser.yy" // lalr1.cc:859 +#line 440 "parser.yy" { - yylhs.value.as< int8_t > () = ctx.convertNestLevelNumber(yystack_[0].value.as< std::string > (), yystack_[0].location); + yylhs.value.as < int8_t > () = ctx.convertNestLevelNumber(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1185 "parser.cc" // lalr1.cc:859 +#line 1248 "parser.cc" break; case 42: -#line 449 "parser.yy" // lalr1.cc:859 +#line 449 "parser.yy" { - yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::IFACE; + yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::IFACE; } -#line 1193 "parser.cc" // lalr1.cc:859 +#line 1256 "parser.cc" break; case 43: -#line 453 "parser.yy" // lalr1.cc:859 +#line 453 "parser.yy" { - yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::SRC; + yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::SRC; } -#line 1201 "parser.cc" // lalr1.cc:859 +#line 1264 "parser.cc" break; case 44: -#line 457 "parser.yy" // lalr1.cc:859 +#line 457 "parser.yy" { - yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::DST; + yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::DST; } -#line 1209 "parser.cc" // lalr1.cc:859 +#line 1272 "parser.cc" break; case 45: -#line 461 "parser.yy" // lalr1.cc:859 +#line 461 "parser.yy" { - yylhs.value.as< TokenPkt::MetadataType > () = TokenPkt::LEN; + yylhs.value.as < TokenPkt::MetadataType > () = TokenPkt::LEN; } -#line 1217 "parser.cc" // lalr1.cc:859 +#line 1280 "parser.cc" break; case 46: -#line 467 "parser.yy" // lalr1.cc:859 +#line 467 "parser.yy" { - yylhs.value.as< uint32_t > () = ctx.convertUint32(yystack_[0].value.as< std::string > (), yystack_[0].location); + yylhs.value.as < uint32_t > () = ctx.convertUint32(yystack_[0].value.as < std::string > (), yystack_[0].location); } -#line 1225 "parser.cc" // lalr1.cc:859 +#line 1288 "parser.cc" break; case 47: -#line 471 "parser.yy" // lalr1.cc:859 +#line 471 "parser.yy" { - yylhs.value.as< uint32_t > () = 0; + yylhs.value.as < uint32_t > () = 0; } -#line 1233 "parser.cc" // lalr1.cc:859 +#line 1296 "parser.cc" break; case 48: -#line 477 "parser.yy" // lalr1.cc:859 +#line 477 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::CHADDR; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::CHADDR; } -#line 1241 "parser.cc" // lalr1.cc:859 +#line 1304 "parser.cc" break; case 49: -#line 481 "parser.yy" // lalr1.cc:859 +#line 481 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::HLEN; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::HLEN; } -#line 1249 "parser.cc" // lalr1.cc:859 +#line 1312 "parser.cc" break; case 50: -#line 485 "parser.yy" // lalr1.cc:859 +#line 485 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::HTYPE; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::HTYPE; } -#line 1257 "parser.cc" // lalr1.cc:859 +#line 1320 "parser.cc" break; case 51: -#line 489 "parser.yy" // lalr1.cc:859 +#line 489 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::CIADDR; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::CIADDR; } -#line 1265 "parser.cc" // lalr1.cc:859 +#line 1328 "parser.cc" break; case 52: -#line 493 "parser.yy" // lalr1.cc:859 +#line 493 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::GIADDR; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::GIADDR; } -#line 1273 "parser.cc" // lalr1.cc:859 +#line 1336 "parser.cc" break; case 53: -#line 497 "parser.yy" // lalr1.cc:859 +#line 497 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::YIADDR; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::YIADDR; } -#line 1281 "parser.cc" // lalr1.cc:859 +#line 1344 "parser.cc" break; case 54: -#line 501 "parser.yy" // lalr1.cc:859 +#line 501 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::SIADDR; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::SIADDR; } -#line 1289 "parser.cc" // lalr1.cc:859 +#line 1352 "parser.cc" break; case 55: -#line 505 "parser.yy" // lalr1.cc:859 +#line 505 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::MSGTYPE; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::MSGTYPE; } -#line 1297 "parser.cc" // lalr1.cc:859 +#line 1360 "parser.cc" break; case 56: -#line 509 "parser.yy" // lalr1.cc:859 +#line 509 "parser.yy" { - yylhs.value.as< TokenPkt4::FieldType > () = TokenPkt4::TRANSID; + yylhs.value.as < TokenPkt4::FieldType > () = TokenPkt4::TRANSID; } -#line 1305 "parser.cc" // lalr1.cc:859 +#line 1368 "parser.cc" break; case 57: -#line 515 "parser.yy" // lalr1.cc:859 +#line 515 "parser.yy" { - yylhs.value.as< TokenPkt6::FieldType > () = TokenPkt6::MSGTYPE; + yylhs.value.as < TokenPkt6::FieldType > () = TokenPkt6::MSGTYPE; } -#line 1313 "parser.cc" // lalr1.cc:859 +#line 1376 "parser.cc" break; case 58: -#line 519 "parser.yy" // lalr1.cc:859 +#line 519 "parser.yy" { - yylhs.value.as< TokenPkt6::FieldType > () = TokenPkt6::TRANSID; + yylhs.value.as < TokenPkt6::FieldType > () = TokenPkt6::TRANSID; } -#line 1321 "parser.cc" // lalr1.cc:859 +#line 1384 "parser.cc" break; case 59: -#line 525 "parser.yy" // lalr1.cc:859 +#line 525 "parser.yy" { - yylhs.value.as< TokenRelay6Field::FieldType > () = TokenRelay6Field::PEERADDR; + yylhs.value.as < TokenRelay6Field::FieldType > () = TokenRelay6Field::PEERADDR; } -#line 1329 "parser.cc" // lalr1.cc:859 +#line 1392 "parser.cc" break; case 60: -#line 529 "parser.yy" // lalr1.cc:859 +#line 529 "parser.yy" { - yylhs.value.as< TokenRelay6Field::FieldType > () = TokenRelay6Field::LINKADDR; + yylhs.value.as < TokenRelay6Field::FieldType > () = TokenRelay6Field::LINKADDR; } -#line 1337 "parser.cc" // lalr1.cc:859 +#line 1400 "parser.cc" break; case 61: -#line 535 "parser.yy" // lalr1.cc:859 +#line 535 "parser.yy" { - TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ())); + TokenPtr str(new TokenString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(str); } -#line 1346 "parser.cc" // lalr1.cc:859 +#line 1409 "parser.cc" break; case 62: -#line 542 "parser.yy" // lalr1.cc:859 +#line 542 "parser.yy" { - TokenPtr str(new TokenString(yystack_[0].value.as< std::string > ())); + TokenPtr str(new TokenString(yystack_[0].value.as < std::string > ())); ctx.expression.push_back(str); } -#line 1355 "parser.cc" // lalr1.cc:859 +#line 1418 "parser.cc" break; case 63: -#line 547 "parser.yy" // lalr1.cc:859 +#line 547 "parser.yy" { TokenPtr str(new TokenString("all")); ctx.expression.push_back(str); } -#line 1364 "parser.cc" // lalr1.cc:859 +#line 1427 "parser.cc" break; -#line 1368 "parser.cc" // lalr1.cc:859 +#line 1431 "parser.cc" + default: break; } } +#if YY_EXCEPTIONS catch (const syntax_error& yyexc) { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); YYERROR; } +#endif // YY_EXCEPTIONS YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; YY_STACK_PRINT (); // Shift the result of the reduction. - yypush_ (YY_NULLPTR, yylhs); + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); } goto yynewstate; + /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ @@ -1420,19 +1488,18 @@ namespace isc { namespace eval { | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ if (false) - goto yyerrorlab; - yyerror_range[1].location = yystack_[yylen - 1].location; + YYERROR; + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); yylen = 0; goto yyerrlab1; + /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ @@ -1469,20 +1536,30 @@ namespace isc { namespace eval { // Shift the error token. error_token.state = yyn; - yypush_ ("Shifting", error_token); + yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; - // Accept. + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; - // Abort. + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ yyreturn: if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); @@ -1498,12 +1575,12 @@ namespace isc { namespace eval { return yyresult; } +#if YY_EXCEPTIONS catch (...) { - YYCDEBUG << "Exception caught: cleaning lookahead and stack" - << std::endl; + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; // Do not try to display the values of the reclaimed symbols, - // as their printer might throw an exception. + // as their printers might throw an exception. if (!yyla.empty ()) yy_destroy_ (YY_NULLPTR, yyla); @@ -1514,12 +1591,13 @@ namespace isc { namespace eval { } throw; } +#endif // YY_EXCEPTIONS } void EvalParser::error (const syntax_error& yyexc) { - error (yyexc.location, yyexc.what()); + error (yyexc.location, yyexc.what ()); } // Generate an error message. @@ -1595,12 +1673,13 @@ namespace isc { namespace eval { case N: \ yyformat = S; \ break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); + default: // Avoid compiler warnings. + YYCASE_ (0, YY_("syntax error")); + YYCASE_ (1, YY_("syntax error, unexpected %s")); + YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } @@ -1623,7 +1702,7 @@ namespace isc { namespace eval { const signed char EvalParser::yytable_ninf_ = -1; - const short int + const short EvalParser::yypact_[] = { 18, 25, 72, 32, 25, 25, 14, 26, 37, 70, @@ -1669,14 +1748,14 @@ namespace isc { namespace eval { 0, 0, 12, 22, 15, 32 }; - const short int + const short EvalParser::yypgoto_[] = { -114, -114, -114, 4, -2, -114, -35, -113, 133, -114, -40, -114, -114, -114, -114, -114 }; - const short int + const short EvalParser::yydefgoto_[] = { -1, 3, 22, 23, 24, 25, 60, 131, 63, 69, @@ -1708,7 +1787,7 @@ namespace isc { namespace eval { 170, 0, 171 }; - const short int + const short EvalParser::yycheck_[] = { 2, 36, 115, 6, 7, 35, 20, 47, 4, 5, @@ -1805,7 +1884,7 @@ namespace isc { namespace eval { }; #if EVALDEBUG - const unsigned short int + const unsigned short EvalParser::yyrline_[] = { 0, 119, 119, 120, 125, 128, 129, 134, 139, 144, @@ -1827,18 +1906,18 @@ namespace isc { namespace eval { i_end = yystack_.end (); i != i_end; ++i) *yycdebug_ << ' ' << i->state; - *yycdebug_ << std::endl; + *yycdebug_ << '\n'; } // Report on the debug stream that the rule \a yyrule is going to be reduced. void EvalParser::yy_reduce_print_ (int yyrule) { - unsigned int yylno = yyrline_[yyrule]; + unsigned yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 - << " (line " << yylno << "):" << std::endl; + << " (line " << yylno << "):\n"; // The symbols being reduced. for (int yyi = 0; yyi < yynrhs; yyi++) YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", @@ -1847,10 +1926,11 @@ namespace isc { namespace eval { #endif // EVALDEBUG -#line 14 "parser.yy" // lalr1.cc:1167 +#line 14 "parser.yy" } } // isc::eval -#line 1853 "parser.cc" // lalr1.cc:1167 -#line 553 "parser.yy" // lalr1.cc:1168 +#line 1932 "parser.cc" + +#line 553 "parser.yy" void isc::eval::EvalParser::error(const location_type& loc, diff --git a/src/lib/eval/parser.h b/src/lib/eval/parser.h index 7b8614a2ad..846b4a09bd 100644 --- a/src/lib/eval/parser.h +++ b/src/lib/eval/parser.h @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.4.1. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. + /** ** \file parser.h ** Define the isc::eval::parser class. @@ -37,10 +38,13 @@ // C++ LALR(1) parser skeleton written by Akim Demaille. +// Undocumented macros, especially those whose name start with YY_, +// are private implementation details. Do not rely on them. + #ifndef YY_EVAL_PARSER_H_INCLUDED # define YY_EVAL_PARSER_H_INCLUDED // // "%code requires" blocks. -#line 17 "parser.yy" // lalr1.cc:377 +#line 17 "parser.yy" #include #include @@ -51,7 +55,7 @@ using namespace isc::dhcp; using namespace isc::eval; -#line 55 "parser.h" // lalr1.cc:377 +#line 59 "parser.h" # include # include // std::abort @@ -59,7 +63,43 @@ using namespace isc::eval; # include # include # include -# include "stack.hh" + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif # include "location.hh" #include #ifndef YYASSERT @@ -86,15 +126,6 @@ using namespace isc::eval; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -102,7 +133,7 @@ using namespace isc::eval; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -121,6 +152,18 @@ using namespace isc::eval; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + /* Debug traces. */ #ifndef EVALDEBUG # if defined YYDEBUG @@ -134,120 +177,175 @@ using namespace isc::eval; # endif /* ! defined YYDEBUG */ #endif /* ! defined EVALDEBUG */ -#line 14 "parser.yy" // lalr1.cc:377 +#line 14 "parser.yy" namespace isc { namespace eval { -#line 140 "parser.h" // lalr1.cc:377 +#line 183 "parser.h" - /// A char[S] buffer to store and retrieve objects. + + /// A Bison parser. + class EvalParser + { + public: +#ifndef EVALSTYPE + /// 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 state. - template - struct variant + /// via the current parser state. + class semantic_type { + public: /// Type of *this. - typedef variant self_type; + typedef semantic_type self_type; /// Empty construction. - variant () - : yytypeid_ (YY_NULLPTR) + semantic_type () YY_NOEXCEPT + : yybuffer_ () + , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template - variant (const T& t) + semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { - YYASSERT (sizeof (T) <= S); - new (yyas_ ()) T (t); + YYASSERT (sizeof (T) <= size); + new (yyas_ ()) T (YY_MOVE (t)); } /// Destruction, allowed only if empty. - ~variant () + ~semantic_type () YY_NOEXCEPT { YYASSERT (!yytypeid_); } +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + YYASSERT (!yytypeid_); + YYASSERT (sizeof (T) <= size); + yytypeid_ = & typeid (T); + return *new (yyas_ ()) T (std::forward (u)...); + } +# else /// Instantiate an empty \a T in here. template T& - build () + emplace () { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); - return *new (yyas_ ()) T; + return *new (yyas_ ()) T (); } /// Instantiate a \a T in here from \a t. template T& - build (const T& t) + emplace (const T& t) { YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (t); } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } /// Accessor to a built \a T. template T& - as () + as () YY_NOEXCEPT { + YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& - as () const + as () const YY_NOEXCEPT { + YYASSERT (yytypeid_); YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= S); + YYASSERT (sizeof (T) <= size); return *yyas_ (); } - /// Swap the content with \a other, of same type. + /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which - /// should not be the variant's responsability. + /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with - /// variant::move (). + /// self_type::move (). template void - swap (self_type& other) + swap (self_type& that) YY_NOEXCEPT { YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *other.yytypeid_); - std::swap (as (), other.as ()); + YYASSERT (*yytypeid_ == *that.yytypeid_); + std::swap (as (), that.as ()); } - /// Move the content of \a other to this. + /// Move the content of \a that to this. /// - /// Destroys \a other. + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. template void - move (self_type& other) + move (self_type&& that) { - build (); - swap (other); - other.destroy (); + emplace (std::move (that.as ())); + that.destroy (); } +#endif - /// Copy the content of \a other to this. + /// Copy the content of \a that to this. template void - copy (const self_type& other) + copy (const self_type& that) { - build (other.as ()); + emplace (that.as ()); } /// Destroy the stored \a T. @@ -261,13 +359,13 @@ namespace isc { namespace eval { private: /// Prohibit blind copies. - self_type& operator=(const self_type&); - variant (const self_type&); + self_type& operator= (const self_type&); + semantic_type (const self_type&); /// Accessor to raw memory as \a T. template T* - yyas_ () + yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); @@ -276,68 +374,64 @@ namespace isc { namespace eval { /// Const accessor to raw memory as \a T. template const T* - yyas_ () const + yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } - union - { - /// Strongest alignment constraints. - long double yyalign_me; - /// A buffer large enough to store any of the semantic values. - char yyraw[S]; - } yybuffer_; - - /// Whether the content is built: if defined, the name of the stored type. - const std::type_info *yytypeid_; - }; - - - /// A Bison parser. - class EvalParser - { - public: -#ifndef EVALSTYPE /// An auxiliary type to compute the largest semantic type. union union_type { // option_repr_type - char dummy1[sizeof(TokenOption::RepresentationType)]; + char dummy1[sizeof (TokenOption::RepresentationType)]; // pkt4_field - char dummy2[sizeof(TokenPkt4::FieldType)]; + char dummy2[sizeof (TokenPkt4::FieldType)]; // pkt6_field - char dummy3[sizeof(TokenPkt6::FieldType)]; + char dummy3[sizeof (TokenPkt6::FieldType)]; // pkt_metadata - char dummy4[sizeof(TokenPkt::MetadataType)]; + char dummy4[sizeof (TokenPkt::MetadataType)]; // relay6_field - char dummy5[sizeof(TokenRelay6Field::FieldType)]; + char dummy5[sizeof (TokenRelay6Field::FieldType)]; // nest_level - char dummy6[sizeof(int8_t)]; + char dummy6[sizeof (int8_t)]; // "constant string" // "integer" // "constant hexstring" // "option name" // "ip address" - char dummy7[sizeof(std::string)]; + char dummy7[sizeof (std::string)]; // option_code - char dummy8[sizeof(uint16_t)]; + char dummy8[sizeof (uint16_t)]; // integer_expr // enterprise_id - char dummy9[sizeof(uint32_t)]; -}; + char dummy9[sizeof (uint32_t)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me; + /// A buffer large enough to store any of the semantic values. + char yyraw[size]; + } yybuffer_; + + /// Whether the content is built: if defined, the name of the stored type. + const std::type_info *yytypeid_; + }; - /// Symbol semantic values. - typedef variant semantic_type; #else typedef EVALSTYPE semantic_type; #endif @@ -347,7 +441,18 @@ namespace isc { namespace eval { /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { - syntax_error (const location_type& l, const std::string& m); + syntax_error (const location_type& l, const std::string& m) + : std::runtime_error (m) + , location (l) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + , location (s.location) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + location_type location; }; @@ -426,7 +531,7 @@ namespace isc { namespace eval { /// A complete symbol. /// /// Expects its Base type to provide access to the symbol type - /// via type_get(). + /// via type_get (). /// /// Provide access to semantic value and location. template @@ -436,47 +541,221 @@ namespace isc { namespace eval { typedef Base super_type; /// Default constructor. - basic_symbol (); + basic_symbol () + : value () + , location () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that); +#endif /// Copy constructor. - basic_symbol (const basic_symbol& other); + basic_symbol (const basic_symbol& that); /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l) + : Base (t) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const location_type& l) + : Base (t) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenOption::RepresentationType&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const TokenOption::RepresentationType& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenPkt4::FieldType&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const TokenPkt4::FieldType& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenPkt6::FieldType&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenPkt::MetadataType&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenRelay6Field::FieldType&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int8_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const int8_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, uint16_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const uint16_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, uint32_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const uint32_t& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif - basic_symbol (typename Base::kind_type t, const location_type& l); - - basic_symbol (typename Base::kind_type t, const TokenOption::RepresentationType v, const location_type& l); - - basic_symbol (typename Base::kind_type t, const TokenPkt4::FieldType v, const location_type& l); + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } - basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType v, const location_type& l); + /// Destroy contents, and record that is empty. + void clear () + { + // User destructor. + symbol_number_type yytype = this->type_get (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yytype) + { + default: + break; + } + + // Type destructor. +switch (yytype) + { + case 61: // option_repr_type + value.template destroy< TokenOption::RepresentationType > (); + break; - basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType v, const location_type& l); + case 65: // pkt4_field + value.template destroy< TokenPkt4::FieldType > (); + break; - basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType v, const location_type& l); + case 66: // pkt6_field + value.template destroy< TokenPkt6::FieldType > (); + break; - basic_symbol (typename Base::kind_type t, const int8_t v, const location_type& l); + case 63: // pkt_metadata + value.template destroy< TokenPkt::MetadataType > (); + break; - basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l); + case 67: // relay6_field + value.template destroy< TokenRelay6Field::FieldType > (); + break; - basic_symbol (typename Base::kind_type t, const uint16_t v, const location_type& l); + case 62: // nest_level + value.template destroy< int8_t > (); + break; - basic_symbol (typename Base::kind_type t, const uint32_t v, const location_type& l); + case 49: // "constant string" + case 50: // "integer" + case 51: // "constant hexstring" + case 52: // "option name" + case 53: // "ip address" + value.template destroy< std::string > (); + break; + case 60: // option_code + value.template destroy< uint16_t > (); + break; - /// Constructor for symbols with semantic value. - basic_symbol (typename Base::kind_type t, - const semantic_type& v, - const location_type& l); + case 59: // integer_expr + case 64: // enterprise_id + value.template destroy< uint32_t > (); + break; - /// Destroy the symbol. - ~basic_symbol (); + default: + break; + } - /// Destroy contents, and record that is empty. - void clear (); + Base::clear (); + } /// Whether empty. - bool empty () const; + bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); @@ -488,8 +767,10 @@ namespace isc { namespace eval { location_type location; private: +#if YY_CPLUSPLUS < 201103L /// Assignment operator. - basic_symbol& operator= (const basic_symbol& other); + basic_symbol& operator= (const basic_symbol& that); +#endif }; /// Type access provider for token (enum) based symbols. @@ -498,8 +779,13 @@ namespace isc { namespace eval { /// Default constructor. by_type (); +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_type (by_type&& that); +#endif + /// Copy constructor. - by_type (const by_type& other); + by_type (const by_type& that); /// The symbol type as needed by the constructor. typedef token_type kind_type; @@ -515,10 +801,10 @@ namespace isc { namespace eval { /// The (internal) type number (corresponding to \a type). /// \a empty when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The token. - token_type token () const; + token_type token () const YY_NOEXCEPT; /// The symbol type. /// \a empty_symbol when empty. @@ -527,222 +813,51 @@ namespace isc { namespace eval { }; /// "External" symbols: returned by the scanner. - typedef basic_symbol symbol_type; - - // Symbol constructors declarations. - static inline - symbol_type - make_END (const location_type& l); - - static inline - symbol_type - make_LPAREN (const location_type& l); - - static inline - symbol_type - make_RPAREN (const location_type& l); - - static inline - symbol_type - make_NOT (const location_type& l); - - static inline - symbol_type - make_AND (const location_type& l); - - static inline - symbol_type - make_OR (const location_type& l); - - static inline - symbol_type - make_EQUAL (const location_type& l); - - static inline - symbol_type - make_OPTION (const location_type& l); - - static inline - symbol_type - make_RELAY4 (const location_type& l); - - static inline - symbol_type - make_RELAY6 (const location_type& l); - - static inline - symbol_type - make_MEMBER (const location_type& l); - - static inline - symbol_type - make_PEERADDR (const location_type& l); - - static inline - symbol_type - make_LINKADDR (const location_type& l); - - static inline - symbol_type - make_LBRACKET (const location_type& l); - - static inline - symbol_type - make_RBRACKET (const location_type& l); - - static inline - symbol_type - make_DOT (const location_type& l); - - static inline - symbol_type - make_TEXT (const location_type& l); - - static inline - symbol_type - make_HEX (const location_type& l); - - static inline - symbol_type - make_EXISTS (const location_type& l); - - static inline - symbol_type - make_PKT (const location_type& l); - - static inline - symbol_type - make_IFACE (const location_type& l); - - static inline - symbol_type - make_SRC (const location_type& l); - - static inline - symbol_type - make_DST (const location_type& l); - - static inline - symbol_type - make_LEN (const location_type& l); - - static inline - symbol_type - make_PKT4 (const location_type& l); - - static inline - symbol_type - make_CHADDR (const location_type& l); - - static inline - symbol_type - make_HLEN (const location_type& l); - - static inline - symbol_type - make_HTYPE (const location_type& l); - - static inline - symbol_type - make_CIADDR (const location_type& l); - - static inline - symbol_type - make_GIADDR (const location_type& l); - - static inline - symbol_type - make_YIADDR (const location_type& l); - - static inline - symbol_type - make_SIADDR (const location_type& l); - - static inline - symbol_type - make_SUBSTRING (const location_type& l); - - static inline - symbol_type - make_ALL (const location_type& l); - - static inline - symbol_type - make_COMA (const location_type& l); - - static inline - symbol_type - make_CONCAT (const location_type& l); - - static inline - symbol_type - make_IFELSE (const location_type& l); - - static inline - symbol_type - make_PKT6 (const location_type& l); - - static inline - symbol_type - make_MSGTYPE (const location_type& l); - - static inline - symbol_type - make_TRANSID (const location_type& l); - - static inline - symbol_type - make_VENDOR_CLASS (const location_type& l); - - static inline - symbol_type - make_VENDOR (const location_type& l); - - static inline - symbol_type - make_ANY (const location_type& l); - - static inline - symbol_type - make_DATA (const location_type& l); - - static inline - symbol_type - make_ENTERPRISE (const location_type& l); - - static inline - symbol_type - make_TOPLEVEL_BOOL (const location_type& l); - - static inline - symbol_type - make_TOPLEVEL_STRING (const location_type& l); - - static inline - symbol_type - make_STRING (const std::string& v, const location_type& l); - - static inline - symbol_type - make_INTEGER (const std::string& v, const location_type& l); - - static inline - symbol_type - make_HEXSTRING (const std::string& v, const location_type& l); - - static inline - symbol_type - make_OPTION_NAME (const std::string& v, const location_type& l); + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; - static inline - symbol_type - make_IP_ADDRESS (const std::string& v, const location_type& l); + /// Empty symbol. + symbol_type () {} + /// 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)) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_LPAREN || tok == token::TOKEN_RPAREN || tok == token::TOKEN_NOT || tok == token::TOKEN_AND || tok == token::TOKEN_OR || tok == token::TOKEN_EQUAL || tok == token::TOKEN_OPTION || tok == token::TOKEN_RELAY4 || tok == token::TOKEN_RELAY6 || tok == token::TOKEN_MEMBER || tok == token::TOKEN_PEERADDR || tok == token::TOKEN_LINKADDR || tok == token::TOKEN_LBRACKET || tok == token::TOKEN_RBRACKET || tok == token::TOKEN_DOT || tok == token::TOKEN_TEXT || tok == token::TOKEN_HEX || tok == token::TOKEN_EXISTS || tok == token::TOKEN_PKT || tok == token::TOKEN_IFACE || tok == token::TOKEN_SRC || tok == token::TOKEN_DST || tok == token::TOKEN_LEN || tok == token::TOKEN_PKT4 || tok == token::TOKEN_CHADDR || tok == token::TOKEN_HLEN || tok == token::TOKEN_HTYPE || tok == token::TOKEN_CIADDR || tok == token::TOKEN_GIADDR || tok == token::TOKEN_YIADDR || tok == token::TOKEN_SIADDR || tok == token::TOKEN_SUBSTRING || tok == token::TOKEN_ALL || tok == token::TOKEN_COMA || tok == token::TOKEN_CONCAT || tok == token::TOKEN_IFELSE || tok == token::TOKEN_PKT6 || tok == token::TOKEN_MSGTYPE || tok == token::TOKEN_TRANSID || tok == token::TOKEN_VENDOR_CLASS || tok == token::TOKEN_VENDOR || tok == token::TOKEN_ANY || tok == token::TOKEN_DATA || tok == token::TOKEN_ENTERPRISE || tok == token::TOKEN_TOPLEVEL_BOOL || tok == token::TOKEN_TOPLEVEL_STRING); + } +#else + symbol_type (int tok, const location_type& l) + : super_type(token_type (tok), l) + { + YYASSERT (tok == token::TOKEN_END || tok == token::TOKEN_LPAREN || tok == token::TOKEN_RPAREN || tok == token::TOKEN_NOT || tok == token::TOKEN_AND || tok == token::TOKEN_OR || tok == token::TOKEN_EQUAL || tok == token::TOKEN_OPTION || tok == token::TOKEN_RELAY4 || tok == token::TOKEN_RELAY6 || tok == token::TOKEN_MEMBER || tok == token::TOKEN_PEERADDR || tok == token::TOKEN_LINKADDR || tok == token::TOKEN_LBRACKET || tok == token::TOKEN_RBRACKET || tok == token::TOKEN_DOT || tok == token::TOKEN_TEXT || tok == token::TOKEN_HEX || tok == token::TOKEN_EXISTS || tok == token::TOKEN_PKT || tok == token::TOKEN_IFACE || tok == token::TOKEN_SRC || tok == token::TOKEN_DST || tok == token::TOKEN_LEN || tok == token::TOKEN_PKT4 || tok == token::TOKEN_CHADDR || tok == token::TOKEN_HLEN || tok == token::TOKEN_HTYPE || tok == token::TOKEN_CIADDR || tok == token::TOKEN_GIADDR || tok == token::TOKEN_YIADDR || tok == token::TOKEN_SIADDR || tok == token::TOKEN_SUBSTRING || tok == token::TOKEN_ALL || tok == token::TOKEN_COMA || tok == token::TOKEN_CONCAT || tok == token::TOKEN_IFELSE || tok == token::TOKEN_PKT6 || tok == token::TOKEN_MSGTYPE || tok == token::TOKEN_TRANSID || tok == token::TOKEN_VENDOR_CLASS || tok == token::TOKEN_VENDOR || tok == token::TOKEN_ANY || tok == token::TOKEN_DATA || tok == token::TOKEN_ENTERPRISE || tok == token::TOKEN_TOPLEVEL_BOOL || tok == token::TOKEN_TOPLEVEL_STRING); + } +#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)) + { + YYASSERT (tok == token::TOKEN_STRING || tok == token::TOKEN_INTEGER || tok == token::TOKEN_HEXSTRING || tok == token::TOKEN_OPTION_NAME || tok == token::TOKEN_IP_ADDRESS); + } +#else + symbol_type (int tok, const std::string& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YYASSERT (tok == token::TOKEN_STRING || tok == token::TOKEN_INTEGER || tok == token::TOKEN_HEXSTRING || tok == token::TOKEN_OPTION_NAME || tok == token::TOKEN_IP_ADDRESS); + } +#endif + }; /// Build a parser object. EvalParser (EvalContext& ctx_yyarg); virtual ~EvalParser (); + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + /// Parse. /// \returns 0 iff parsing succeeded. virtual int parse (); @@ -769,32 +884,815 @@ namespace isc { namespace eval { /// Report a syntax error. void error (const syntax_error& err); - private: - /// This class is not copyable. - EvalParser (const EvalParser&); - EvalParser& operator= (const EvalParser&); - - /// State numbers. - typedef int state_type; - - /// Generate an error message. - /// \param yystate the state where the error occurred. - /// \param yyla the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, - const symbol_type& yyla) const; - - /// Compute post-reduction state. - /// \param yystate the current state - /// \param yysym the nonterminal to push on the stack - state_type yy_lr_goto_state_ (state_type yystate, int yysym); - - /// 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); - - /// 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); + // Implementation of make_symbol for each symbol type. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_END (location_type l) + { + return symbol_type (token::TOKEN_END, std::move (l)); + } +#else + static + symbol_type + make_END (const location_type& l) + { + return symbol_type (token::TOKEN_END, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LPAREN (location_type l) + { + return symbol_type (token::TOKEN_LPAREN, std::move (l)); + } +#else + static + symbol_type + make_LPAREN (const location_type& l) + { + return symbol_type (token::TOKEN_LPAREN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RPAREN (location_type l) + { + return symbol_type (token::TOKEN_RPAREN, std::move (l)); + } +#else + static + symbol_type + make_RPAREN (const location_type& l) + { + return symbol_type (token::TOKEN_RPAREN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NOT (location_type l) + { + return symbol_type (token::TOKEN_NOT, std::move (l)); + } +#else + static + symbol_type + make_NOT (const location_type& l) + { + return symbol_type (token::TOKEN_NOT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AND (location_type l) + { + return symbol_type (token::TOKEN_AND, std::move (l)); + } +#else + static + symbol_type + make_AND (const location_type& l) + { + return symbol_type (token::TOKEN_AND, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OR (location_type l) + { + return symbol_type (token::TOKEN_OR, std::move (l)); + } +#else + static + symbol_type + make_OR (const location_type& l) + { + return symbol_type (token::TOKEN_OR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EQUAL (location_type l) + { + return symbol_type (token::TOKEN_EQUAL, std::move (l)); + } +#else + static + symbol_type + make_EQUAL (const location_type& l) + { + return symbol_type (token::TOKEN_EQUAL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTION (location_type l) + { + return symbol_type (token::TOKEN_OPTION, std::move (l)); + } +#else + static + symbol_type + make_OPTION (const location_type& l) + { + return symbol_type (token::TOKEN_OPTION, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RELAY4 (location_type l) + { + return symbol_type (token::TOKEN_RELAY4, std::move (l)); + } +#else + static + symbol_type + make_RELAY4 (const location_type& l) + { + return symbol_type (token::TOKEN_RELAY4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RELAY6 (location_type l) + { + return symbol_type (token::TOKEN_RELAY6, std::move (l)); + } +#else + static + symbol_type + make_RELAY6 (const location_type& l) + { + return symbol_type (token::TOKEN_RELAY6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEMBER (location_type l) + { + return symbol_type (token::TOKEN_MEMBER, std::move (l)); + } +#else + static + symbol_type + make_MEMBER (const location_type& l) + { + return symbol_type (token::TOKEN_MEMBER, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PEERADDR (location_type l) + { + return symbol_type (token::TOKEN_PEERADDR, std::move (l)); + } +#else + static + symbol_type + make_PEERADDR (const location_type& l) + { + return symbol_type (token::TOKEN_PEERADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LINKADDR (location_type l) + { + return symbol_type (token::TOKEN_LINKADDR, std::move (l)); + } +#else + static + symbol_type + make_LINKADDR (const location_type& l) + { + return symbol_type (token::TOKEN_LINKADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LBRACKET (location_type l) + { + return symbol_type (token::TOKEN_LBRACKET, std::move (l)); + } +#else + static + symbol_type + make_LBRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_LBRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RBRACKET (location_type l) + { + return symbol_type (token::TOKEN_RBRACKET, std::move (l)); + } +#else + static + symbol_type + make_RBRACKET (const location_type& l) + { + return symbol_type (token::TOKEN_RBRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DOT (location_type l) + { + return symbol_type (token::TOKEN_DOT, std::move (l)); + } +#else + static + symbol_type + make_DOT (const location_type& l) + { + return symbol_type (token::TOKEN_DOT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TEXT (location_type l) + { + return symbol_type (token::TOKEN_TEXT, std::move (l)); + } +#else + static + symbol_type + make_TEXT (const location_type& l) + { + return symbol_type (token::TOKEN_TEXT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HEX (location_type l) + { + return symbol_type (token::TOKEN_HEX, std::move (l)); + } +#else + static + symbol_type + make_HEX (const location_type& l) + { + return symbol_type (token::TOKEN_HEX, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXISTS (location_type l) + { + return symbol_type (token::TOKEN_EXISTS, std::move (l)); + } +#else + static + symbol_type + make_EXISTS (const location_type& l) + { + return symbol_type (token::TOKEN_EXISTS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PKT (location_type l) + { + return symbol_type (token::TOKEN_PKT, std::move (l)); + } +#else + static + symbol_type + make_PKT (const location_type& l) + { + return symbol_type (token::TOKEN_PKT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFACE (location_type l) + { + return symbol_type (token::TOKEN_IFACE, std::move (l)); + } +#else + static + symbol_type + make_IFACE (const location_type& l) + { + return symbol_type (token::TOKEN_IFACE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SRC (location_type l) + { + return symbol_type (token::TOKEN_SRC, std::move (l)); + } +#else + static + symbol_type + make_SRC (const location_type& l) + { + return symbol_type (token::TOKEN_SRC, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DST (location_type l) + { + return symbol_type (token::TOKEN_DST, std::move (l)); + } +#else + static + symbol_type + make_DST (const location_type& l) + { + return symbol_type (token::TOKEN_DST, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LEN (location_type l) + { + return symbol_type (token::TOKEN_LEN, std::move (l)); + } +#else + static + symbol_type + make_LEN (const location_type& l) + { + return symbol_type (token::TOKEN_LEN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PKT4 (location_type l) + { + return symbol_type (token::TOKEN_PKT4, std::move (l)); + } +#else + static + symbol_type + make_PKT4 (const location_type& l) + { + return symbol_type (token::TOKEN_PKT4, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CHADDR (location_type l) + { + return symbol_type (token::TOKEN_CHADDR, std::move (l)); + } +#else + static + symbol_type + make_CHADDR (const location_type& l) + { + return symbol_type (token::TOKEN_CHADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HLEN (location_type l) + { + return symbol_type (token::TOKEN_HLEN, std::move (l)); + } +#else + static + symbol_type + make_HLEN (const location_type& l) + { + return symbol_type (token::TOKEN_HLEN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HTYPE (location_type l) + { + return symbol_type (token::TOKEN_HTYPE, std::move (l)); + } +#else + static + symbol_type + make_HTYPE (const location_type& l) + { + return symbol_type (token::TOKEN_HTYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CIADDR (location_type l) + { + return symbol_type (token::TOKEN_CIADDR, std::move (l)); + } +#else + static + symbol_type + make_CIADDR (const location_type& l) + { + return symbol_type (token::TOKEN_CIADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_GIADDR (location_type l) + { + return symbol_type (token::TOKEN_GIADDR, std::move (l)); + } +#else + static + symbol_type + make_GIADDR (const location_type& l) + { + return symbol_type (token::TOKEN_GIADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_YIADDR (location_type l) + { + return symbol_type (token::TOKEN_YIADDR, std::move (l)); + } +#else + static + symbol_type + make_YIADDR (const location_type& l) + { + return symbol_type (token::TOKEN_YIADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SIADDR (location_type l) + { + return symbol_type (token::TOKEN_SIADDR, std::move (l)); + } +#else + static + symbol_type + make_SIADDR (const location_type& l) + { + return symbol_type (token::TOKEN_SIADDR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUBSTRING (location_type l) + { + return symbol_type (token::TOKEN_SUBSTRING, std::move (l)); + } +#else + static + symbol_type + make_SUBSTRING (const location_type& l) + { + return symbol_type (token::TOKEN_SUBSTRING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALL (location_type l) + { + return symbol_type (token::TOKEN_ALL, std::move (l)); + } +#else + static + symbol_type + make_ALL (const location_type& l) + { + return symbol_type (token::TOKEN_ALL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMA (location_type l) + { + return symbol_type (token::TOKEN_COMA, std::move (l)); + } +#else + static + symbol_type + make_COMA (const location_type& l) + { + return symbol_type (token::TOKEN_COMA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONCAT (location_type l) + { + return symbol_type (token::TOKEN_CONCAT, std::move (l)); + } +#else + static + symbol_type + make_CONCAT (const location_type& l) + { + return symbol_type (token::TOKEN_CONCAT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFELSE (location_type l) + { + return symbol_type (token::TOKEN_IFELSE, std::move (l)); + } +#else + static + symbol_type + make_IFELSE (const location_type& l) + { + return symbol_type (token::TOKEN_IFELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PKT6 (location_type l) + { + return symbol_type (token::TOKEN_PKT6, std::move (l)); + } +#else + static + symbol_type + make_PKT6 (const location_type& l) + { + return symbol_type (token::TOKEN_PKT6, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MSGTYPE (location_type l) + { + return symbol_type (token::TOKEN_MSGTYPE, std::move (l)); + } +#else + static + symbol_type + make_MSGTYPE (const location_type& l) + { + return symbol_type (token::TOKEN_MSGTYPE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TRANSID (location_type l) + { + return symbol_type (token::TOKEN_TRANSID, std::move (l)); + } +#else + static + symbol_type + make_TRANSID (const location_type& l) + { + return symbol_type (token::TOKEN_TRANSID, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VENDOR_CLASS (location_type l) + { + return symbol_type (token::TOKEN_VENDOR_CLASS, std::move (l)); + } +#else + static + symbol_type + make_VENDOR_CLASS (const location_type& l) + { + return symbol_type (token::TOKEN_VENDOR_CLASS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VENDOR (location_type l) + { + return symbol_type (token::TOKEN_VENDOR, std::move (l)); + } +#else + static + symbol_type + make_VENDOR (const location_type& l) + { + return symbol_type (token::TOKEN_VENDOR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ANY (location_type l) + { + return symbol_type (token::TOKEN_ANY, std::move (l)); + } +#else + static + symbol_type + make_ANY (const location_type& l) + { + return symbol_type (token::TOKEN_ANY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DATA (location_type l) + { + return symbol_type (token::TOKEN_DATA, std::move (l)); + } +#else + static + symbol_type + make_DATA (const location_type& l) + { + return symbol_type (token::TOKEN_DATA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENTERPRISE (location_type l) + { + return symbol_type (token::TOKEN_ENTERPRISE, std::move (l)); + } +#else + static + symbol_type + make_ENTERPRISE (const location_type& l) + { + return symbol_type (token::TOKEN_ENTERPRISE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_BOOL (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_BOOL, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_BOOL (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TOPLEVEL_STRING (location_type l) + { + return symbol_type (token::TOKEN_TOPLEVEL_STRING, std::move (l)); + } +#else + static + symbol_type + make_TOPLEVEL_STRING (const location_type& l) + { + return symbol_type (token::TOKEN_TOPLEVEL_STRING, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v, location_type l) + { + return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_STRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_STRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INTEGER (std::string v, location_type l) + { + return symbol_type (token::TOKEN_INTEGER, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_INTEGER (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_INTEGER, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HEXSTRING (std::string v, location_type l) + { + return symbol_type (token::TOKEN_HEXSTRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_HEXSTRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_HEXSTRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTION_NAME (std::string v, location_type l) + { + return symbol_type (token::TOKEN_OPTION_NAME, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_OPTION_NAME (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_OPTION_NAME, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IP_ADDRESS (std::string v, location_type l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_IP_ADDRESS (const std::string& v, const location_type& l) + { + return symbol_type (token::TOKEN_IP_ADDRESS, v, l); + } +#endif + + + private: + /// This class is not copyable. + EvalParser (const EvalParser&); + EvalParser& operator= (const EvalParser&); + + /// State numbers. + typedef int state_type; + + /// Generate an error message. + /// \param yystate the state where the error occurred. + /// \param yyla the lookahead token. + virtual std::string yysyntax_error_ (state_type yystate, + const symbol_type& yyla) const; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// 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); + + /// 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 const signed char yypact_ninf_; static const signed char yytable_ninf_; @@ -805,7 +1703,7 @@ namespace isc { namespace eval { // Tables. // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing // STATE-NUM. - static const short int yypact_[]; + static const short yypact_[]; // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero @@ -813,17 +1711,17 @@ namespace isc { namespace eval { static const unsigned char yydefact_[]; // YYPGOTO[NTERM-NUM]. - static const short int yypgoto_[]; + static const short yypgoto_[]; // YYDEFGOTO[NTERM-NUM]. - static const short int yydefgoto_[]; + static const short yydefgoto_[]; // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const unsigned char yytable_[]; - static const short int yycheck_[]; + static const short yycheck_[]; // YYSTOS[STATE-NUM] -- The (internal number of the) accessing // symbol of state STATE-NUM. @@ -844,14 +1742,15 @@ namespace isc { namespace eval { static const char* const yytname_[]; #if EVALDEBUG // YYRLINE[YYN] -- Source line where rule number YYN was defined. - static const unsigned short int yyrline_[]; + static const unsigned short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. virtual void yy_reduce_print_ (int r); /// Print the state stack on the debug stream. virtual void yystack_print_ (); - // Debugging. + /// Debugging level. int yydebug_; + /// Debug stream. std::ostream* yycdebug_; /// \brief Display a symbol type, value and location. @@ -873,26 +1772,26 @@ namespace isc { namespace eval { struct by_state { /// Default constructor. - by_state (); + by_state () YY_NOEXCEPT; /// The symbol type as needed by the constructor. typedef state_type kind_type; /// Constructor. - by_state (kind_type s); + by_state (kind_type s) YY_NOEXCEPT; /// Copy constructor. - by_state (const by_state& other); + by_state (const by_state& that) YY_NOEXCEPT; /// Record that this symbol is empty. - void clear (); + void clear () YY_NOEXCEPT; /// Steal the symbol type from \a that. void move (by_state& that); /// The (internal) type number (corresponding to \a state). /// \a empty_symbol when empty. - symbol_number_type type_get () const; + symbol_number_type type_get () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. enum { empty_state = -1 }; @@ -909,12 +1808,141 @@ namespace isc { namespace eval { typedef basic_symbol super_type; /// Construct an empty symbol. stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); /// Steal the contents from \a sym to build this. - stack_symbol_type (state_type s, symbol_type& sym); - /// Assignment, needed by push_back. - stack_symbol_type& operator= (const stack_symbol_type& that); + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::reverse_iterator iterator; + typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::size_type size_type; + + stack (size_type n = 200) + : seq_ (n) + {} + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (size_type i) + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (int i) + { + return operator[] (size_type (i)); + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (size_type i) const + { + return seq_[size () - 1 - i]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (int i) const + { + return operator[] (size_type (i)); + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (int n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + size_type + size () const YY_NOEXCEPT + { + return seq_.size (); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.rbegin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.rend (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, int range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (int i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + int range_; + }; + + private: + stack (const stack&); + stack& operator= (const stack&); + /// The wrapped container. + S seq_; }; + /// Stack type. typedef stack stack_type; @@ -924,20 +1952,20 @@ namespace isc { namespace eval { /// Push a new state on the stack. /// \param m a debug message to display /// if null, no trace is output. - /// \param s the symbol + /// \param sym the symbol /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, stack_symbol_type& s); + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); /// Push a new look ahead token on the state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param s the state /// \param sym the symbol (for its value and location). - /// \warning the contents of \a s.value is stolen. - void yypush_ (const char* m, state_type s, symbol_type& sym); + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); - /// Pop \a n symbols the three stacks. - void yypop_ (unsigned int n = 1); + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); /// Constants. enum @@ -956,160 +1984,91 @@ namespace isc { namespace eval { EvalContext& ctx; }; - // Symbol number corresponding to token number t. inline EvalParser::token_number_type EvalParser::yytranslate_ (token_type t) { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. static const token_number_type translate_table[] = { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53 - }; - const unsigned int user_token_number_max_ = 308; - const token_number_type undef_token_ = 2; - - if (static_cast(t) <= yyeof_) - return yyeof_; - else if (static_cast (t) <= user_token_number_max_) - return translate_table[t]; - else - return undef_token_; - } - - inline - EvalParser::syntax_error::syntax_error (const location_type& l, const std::string& m) - : std::runtime_error (m) - , location (l) - {} - - // basic_symbol. - template - inline - EvalParser::basic_symbol::basic_symbol () - : value () - {} - - template - inline - EvalParser::basic_symbol::basic_symbol (const basic_symbol& other) - : Base (other) - , value () - , location (other.location) - { - switch (other.type_get ()) - { - case 61: // option_repr_type - value.copy< TokenOption::RepresentationType > (other.value); - break; - - case 65: // pkt4_field - value.copy< TokenPkt4::FieldType > (other.value); - break; - - case 66: // pkt6_field - value.copy< TokenPkt6::FieldType > (other.value); - break; - - case 63: // pkt_metadata - value.copy< TokenPkt::MetadataType > (other.value); - break; - - case 67: // relay6_field - value.copy< TokenRelay6Field::FieldType > (other.value); - break; - - case 62: // nest_level - value.copy< int8_t > (other.value); - break; - - case 49: // "constant string" - case 50: // "integer" - case 51: // "constant hexstring" - case 52: // "option name" - case 53: // "ip address" - value.copy< std::string > (other.value); - break; - - case 60: // option_code - value.copy< uint16_t > (other.value); - break; - - case 59: // integer_expr - case 64: // enterprise_id - value.copy< uint32_t > (other.value); - break; - - default: - break; - } + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53 + }; + const unsigned user_token_number_max_ = 308; + const token_number_type undef_token_ = 2; + if (static_cast (t) <= yyeof_) + return yyeof_; + else if (static_cast (t) <= user_token_number_max_) + return translate_table[t]; + else + return undef_token_; } - + // basic_symbol. +#if 201103L <= YY_CPLUSPLUS template - inline - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l) - : Base (t) + EvalParser::basic_symbol::basic_symbol (basic_symbol&& that) + : Base (std::move (that)) , value () - , location (l) + , location (std::move (that.location)) { - (void) v; - switch (this->type_get ()) + switch (this->type_get ()) { case 61: // option_repr_type - value.copy< TokenOption::RepresentationType > (v); + value.move< TokenOption::RepresentationType > (std::move (that.value)); break; case 65: // pkt4_field - value.copy< TokenPkt4::FieldType > (v); + value.move< TokenPkt4::FieldType > (std::move (that.value)); break; case 66: // pkt6_field - value.copy< TokenPkt6::FieldType > (v); + value.move< TokenPkt6::FieldType > (std::move (that.value)); break; case 63: // pkt_metadata - value.copy< TokenPkt::MetadataType > (v); + value.move< TokenPkt::MetadataType > (std::move (that.value)); break; case 67: // relay6_field - value.copy< TokenRelay6Field::FieldType > (v); + value.move< TokenRelay6Field::FieldType > (std::move (that.value)); break; case 62: // nest_level - value.copy< int8_t > (v); + value.move< int8_t > (std::move (that.value)); break; case 49: // "constant string" @@ -1117,144 +2076,55 @@ namespace isc { namespace eval { case 51: // "constant hexstring" case 52: // "option name" case 53: // "ip address" - value.copy< std::string > (v); + value.move< std::string > (std::move (that.value)); break; case 60: // option_code - value.copy< uint16_t > (v); + value.move< uint16_t > (std::move (that.value)); break; case 59: // integer_expr case 64: // enterprise_id - value.copy< uint32_t > (v); + value.move< uint32_t > (std::move (that.value)); break; default: break; } -} - - - // Implementation of basic_symbol constructor for each type. - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) - : Base (t) - , value () - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenOption::RepresentationType v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenPkt4::FieldType v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const int8_t v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const uint16_t v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const uint32_t v, const location_type& l) - : Base (t) - , value (v) - , location (l) - {} - - template - inline - EvalParser::basic_symbol::~basic_symbol () - { - clear (); } +#endif template - inline - void - EvalParser::basic_symbol::clear () + EvalParser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + , location (that.location) { - // User destructor. - symbol_number_type yytype = this->type_get (); - basic_symbol& yysym = *this; - (void) yysym; - switch (yytype) - { - default: - break; - } - - // Type destructor. - switch (yytype) + switch (this->type_get ()) { case 61: // option_repr_type - value.template destroy< TokenOption::RepresentationType > (); + value.copy< TokenOption::RepresentationType > (YY_MOVE (that.value)); break; case 65: // pkt4_field - value.template destroy< TokenPkt4::FieldType > (); + value.copy< TokenPkt4::FieldType > (YY_MOVE (that.value)); break; case 66: // pkt6_field - value.template destroy< TokenPkt6::FieldType > (); + value.copy< TokenPkt6::FieldType > (YY_MOVE (that.value)); break; case 63: // pkt_metadata - value.template destroy< TokenPkt::MetadataType > (); + value.copy< TokenPkt::MetadataType > (YY_MOVE (that.value)); break; case 67: // relay6_field - value.template destroy< TokenRelay6Field::FieldType > (); + value.copy< TokenRelay6Field::FieldType > (YY_MOVE (that.value)); break; case 62: // nest_level - value.template destroy< int8_t > (); + value.copy< int8_t > (YY_MOVE (that.value)); break; case 49: // "constant string" @@ -1262,63 +2132,62 @@ namespace isc { namespace eval { case 51: // "constant hexstring" case 52: // "option name" case 53: // "ip address" - value.template destroy< std::string > (); + value.copy< std::string > (YY_MOVE (that.value)); break; case 60: // option_code - value.template destroy< uint16_t > (); + value.copy< uint16_t > (YY_MOVE (that.value)); break; case 59: // integer_expr case 64: // enterprise_id - value.template destroy< uint32_t > (); + value.copy< uint32_t > (YY_MOVE (that.value)); break; default: break; } - Base::clear (); } + + template - inline bool - EvalParser::basic_symbol::empty () const + EvalParser::basic_symbol::empty () const YY_NOEXCEPT { return Base::type_get () == empty_symbol; } template - inline void EvalParser::basic_symbol::move (basic_symbol& s) { - super_type::move(s); - switch (this->type_get ()) + super_type::move (s); + switch (this->type_get ()) { case 61: // option_repr_type - value.move< TokenOption::RepresentationType > (s.value); + value.move< TokenOption::RepresentationType > (YY_MOVE (s.value)); break; case 65: // pkt4_field - value.move< TokenPkt4::FieldType > (s.value); + value.move< TokenPkt4::FieldType > (YY_MOVE (s.value)); break; case 66: // pkt6_field - value.move< TokenPkt6::FieldType > (s.value); + value.move< TokenPkt6::FieldType > (YY_MOVE (s.value)); break; case 63: // pkt_metadata - value.move< TokenPkt::MetadataType > (s.value); + value.move< TokenPkt::MetadataType > (YY_MOVE (s.value)); break; case 67: // relay6_field - value.move< TokenRelay6Field::FieldType > (s.value); + value.move< TokenRelay6Field::FieldType > (YY_MOVE (s.value)); break; case 62: // nest_level - value.move< int8_t > (s.value); + value.move< int8_t > (YY_MOVE (s.value)); break; case 49: // "constant string" @@ -1326,23 +2195,23 @@ namespace isc { namespace eval { case 51: // "constant hexstring" case 52: // "option name" case 53: // "ip address" - value.move< std::string > (s.value); + value.move< std::string > (YY_MOVE (s.value)); break; case 60: // option_code - value.move< uint16_t > (s.value); + value.move< uint16_t > (YY_MOVE (s.value)); break; case 59: // integer_expr case 64: // enterprise_id - value.move< uint32_t > (s.value); + value.move< uint32_t > (YY_MOVE (s.value)); break; default: break; } - location = s.location; + location = YY_MOVE (s.location); } // by_type. @@ -1351,9 +2220,18 @@ namespace isc { namespace eval { : type (empty_symbol) {} +#if 201103L <= YY_CPLUSPLUS + inline + EvalParser::by_type::by_type (by_type&& that) + : type (that.type) + { + that.clear (); + } +#endif + inline - EvalParser::by_type::by_type (const by_type& other) - : type (other.type) + EvalParser::by_type::by_type (const by_type& that) + : type (that.type) {} inline @@ -1378,19 +2256,19 @@ namespace isc { namespace eval { inline int - EvalParser::by_type::type_get () const + EvalParser::by_type::type_get () const YY_NOEXCEPT { return type; } inline EvalParser::token_type - EvalParser::by_type::token () const + EvalParser::by_type::token () const YY_NOEXCEPT { // YYTOKNUM[NUM] -- (External) token number corresponding to the // (internal) symbol number NUM (which must be that of a token). */ static - const unsigned short int + const unsigned short yytoken_number_[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -1400,325 +2278,13 @@ namespace isc { namespace eval { 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308 }; - return static_cast (yytoken_number_[type]); - } - // Implementation of make_symbol for each symbol type. - EvalParser::symbol_type - EvalParser::make_END (const location_type& l) - { - return symbol_type (token::TOKEN_END, l); - } - - EvalParser::symbol_type - EvalParser::make_LPAREN (const location_type& l) - { - return symbol_type (token::TOKEN_LPAREN, l); - } - - EvalParser::symbol_type - EvalParser::make_RPAREN (const location_type& l) - { - return symbol_type (token::TOKEN_RPAREN, l); - } - - EvalParser::symbol_type - EvalParser::make_NOT (const location_type& l) - { - return symbol_type (token::TOKEN_NOT, l); - } - - EvalParser::symbol_type - EvalParser::make_AND (const location_type& l) - { - return symbol_type (token::TOKEN_AND, l); - } - - EvalParser::symbol_type - EvalParser::make_OR (const location_type& l) - { - return symbol_type (token::TOKEN_OR, l); - } - - EvalParser::symbol_type - EvalParser::make_EQUAL (const location_type& l) - { - return symbol_type (token::TOKEN_EQUAL, l); - } - - EvalParser::symbol_type - EvalParser::make_OPTION (const location_type& l) - { - return symbol_type (token::TOKEN_OPTION, l); - } - - EvalParser::symbol_type - EvalParser::make_RELAY4 (const location_type& l) - { - return symbol_type (token::TOKEN_RELAY4, l); - } - - EvalParser::symbol_type - EvalParser::make_RELAY6 (const location_type& l) - { - return symbol_type (token::TOKEN_RELAY6, l); + return token_type (yytoken_number_[type]); } - EvalParser::symbol_type - EvalParser::make_MEMBER (const location_type& l) - { - return symbol_type (token::TOKEN_MEMBER, l); - } - - EvalParser::symbol_type - EvalParser::make_PEERADDR (const location_type& l) - { - return symbol_type (token::TOKEN_PEERADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_LINKADDR (const location_type& l) - { - return symbol_type (token::TOKEN_LINKADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_LBRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_LBRACKET, l); - } - - EvalParser::symbol_type - EvalParser::make_RBRACKET (const location_type& l) - { - return symbol_type (token::TOKEN_RBRACKET, l); - } - - EvalParser::symbol_type - EvalParser::make_DOT (const location_type& l) - { - return symbol_type (token::TOKEN_DOT, l); - } - - EvalParser::symbol_type - EvalParser::make_TEXT (const location_type& l) - { - return symbol_type (token::TOKEN_TEXT, l); - } - - EvalParser::symbol_type - EvalParser::make_HEX (const location_type& l) - { - return symbol_type (token::TOKEN_HEX, l); - } - - EvalParser::symbol_type - EvalParser::make_EXISTS (const location_type& l) - { - return symbol_type (token::TOKEN_EXISTS, l); - } - - EvalParser::symbol_type - EvalParser::make_PKT (const location_type& l) - { - return symbol_type (token::TOKEN_PKT, l); - } - - EvalParser::symbol_type - EvalParser::make_IFACE (const location_type& l) - { - return symbol_type (token::TOKEN_IFACE, l); - } - - EvalParser::symbol_type - EvalParser::make_SRC (const location_type& l) - { - return symbol_type (token::TOKEN_SRC, l); - } - - EvalParser::symbol_type - EvalParser::make_DST (const location_type& l) - { - return symbol_type (token::TOKEN_DST, l); - } - - EvalParser::symbol_type - EvalParser::make_LEN (const location_type& l) - { - return symbol_type (token::TOKEN_LEN, l); - } - - EvalParser::symbol_type - EvalParser::make_PKT4 (const location_type& l) - { - return symbol_type (token::TOKEN_PKT4, l); - } - - EvalParser::symbol_type - EvalParser::make_CHADDR (const location_type& l) - { - return symbol_type (token::TOKEN_CHADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_HLEN (const location_type& l) - { - return symbol_type (token::TOKEN_HLEN, l); - } - - EvalParser::symbol_type - EvalParser::make_HTYPE (const location_type& l) - { - return symbol_type (token::TOKEN_HTYPE, l); - } - - EvalParser::symbol_type - EvalParser::make_CIADDR (const location_type& l) - { - return symbol_type (token::TOKEN_CIADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_GIADDR (const location_type& l) - { - return symbol_type (token::TOKEN_GIADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_YIADDR (const location_type& l) - { - return symbol_type (token::TOKEN_YIADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_SIADDR (const location_type& l) - { - return symbol_type (token::TOKEN_SIADDR, l); - } - - EvalParser::symbol_type - EvalParser::make_SUBSTRING (const location_type& l) - { - return symbol_type (token::TOKEN_SUBSTRING, l); - } - - EvalParser::symbol_type - EvalParser::make_ALL (const location_type& l) - { - return symbol_type (token::TOKEN_ALL, l); - } - - EvalParser::symbol_type - EvalParser::make_COMA (const location_type& l) - { - return symbol_type (token::TOKEN_COMA, l); - } - - EvalParser::symbol_type - EvalParser::make_CONCAT (const location_type& l) - { - return symbol_type (token::TOKEN_CONCAT, l); - } - - EvalParser::symbol_type - EvalParser::make_IFELSE (const location_type& l) - { - return symbol_type (token::TOKEN_IFELSE, l); - } - - EvalParser::symbol_type - EvalParser::make_PKT6 (const location_type& l) - { - return symbol_type (token::TOKEN_PKT6, l); - } - - EvalParser::symbol_type - EvalParser::make_MSGTYPE (const location_type& l) - { - return symbol_type (token::TOKEN_MSGTYPE, l); - } - - EvalParser::symbol_type - EvalParser::make_TRANSID (const location_type& l) - { - return symbol_type (token::TOKEN_TRANSID, l); - } - - EvalParser::symbol_type - EvalParser::make_VENDOR_CLASS (const location_type& l) - { - return symbol_type (token::TOKEN_VENDOR_CLASS, l); - } - - EvalParser::symbol_type - EvalParser::make_VENDOR (const location_type& l) - { - return symbol_type (token::TOKEN_VENDOR, l); - } - - EvalParser::symbol_type - EvalParser::make_ANY (const location_type& l) - { - return symbol_type (token::TOKEN_ANY, l); - } - - EvalParser::symbol_type - EvalParser::make_DATA (const location_type& l) - { - return symbol_type (token::TOKEN_DATA, l); - } - - EvalParser::symbol_type - EvalParser::make_ENTERPRISE (const location_type& l) - { - return symbol_type (token::TOKEN_ENTERPRISE, l); - } - - EvalParser::symbol_type - EvalParser::make_TOPLEVEL_BOOL (const location_type& l) - { - return symbol_type (token::TOKEN_TOPLEVEL_BOOL, l); - } - - EvalParser::symbol_type - EvalParser::make_TOPLEVEL_STRING (const location_type& l) - { - return symbol_type (token::TOKEN_TOPLEVEL_STRING, l); - } - - EvalParser::symbol_type - EvalParser::make_STRING (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_STRING, v, l); - } - - EvalParser::symbol_type - EvalParser::make_INTEGER (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_INTEGER, v, l); - } - - EvalParser::symbol_type - EvalParser::make_HEXSTRING (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_HEXSTRING, v, l); - } - - EvalParser::symbol_type - EvalParser::make_OPTION_NAME (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_OPTION_NAME, v, l); - } - - EvalParser::symbol_type - EvalParser::make_IP_ADDRESS (const std::string& v, const location_type& l) - { - return symbol_type (token::TOKEN_IP_ADDRESS, v, l); - } - - -#line 14 "parser.yy" // lalr1.cc:377 +#line 14 "parser.yy" } } // isc::eval -#line 1722 "parser.h" // lalr1.cc:377 +#line 2287 "parser.h" + diff --git a/src/lib/eval/position.hh b/src/lib/eval/position.hh index 6d547f2746..23536ce47f 100644 --- a/src/lib/eval/position.hh +++ b/src/lib/eval/position.hh @@ -1,180 +1,12 @@ -// A Bison parser, made by GNU Bison 3.0.4. - -// Positions for Bison parsers in C++ - -// Copyright (C) 2002-2015 Free Software Foundation, Inc. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// As a special exception, you may create a larger work that contains -// part or all of the Bison parser skeleton and distribute that work -// under terms of your choice, so long as that work isn't itself a -// parser generator using the skeleton or a modified version thereof -// as a parser skeleton. Alternatively, if you modify or redistribute -// the parser skeleton itself, you may (at your option) remove this -// special exception, which will cause the skeleton and the resulting -// Bison output files to be licensed under the GNU General Public -// License without this special exception. - -// This special exception was added by the Free Software Foundation in -// version 2.2 of Bison. - -/** - ** \file position.hh - ** Define the isc::eval::position class. - */ - -#ifndef YY_EVAL_POSITION_HH_INCLUDED -# define YY_EVAL_POSITION_HH_INCLUDED - -# include // std::max -# include -# include - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -#line 14 "parser.yy" // location.cc:296 -namespace isc { namespace eval { -#line 56 "position.hh" // location.cc:296 - /// Abstract a position. - class position - { - public: - /// Construct a position. - explicit position (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) - : filename (f) - , line (l) - , column (c) - { - } - - - /// Initialization. - void initialize (std::string* fn = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) - { - filename = fn; - line = l; - column = c; - } - - /** \name Line and Column related manipulators - ** \{ */ - /// (line related) Advance to the COUNT next lines. - void lines (int count = 1) - { - if (count) - { - column = 1u; - line = add_ (line, count, 1); - } - } - - /// (column related) Advance to the COUNT next columns. - void columns (int count = 1) - { - column = add_ (column, count, 1); - } - /** \} */ - - /// File name to which this position refers. - std::string* filename; - /// Current line number. - unsigned int line; - /// Current column number. - unsigned int column; - - private: - /// Compute max(min, lhs+rhs) (provided min <= lhs). - static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min) - { - return (0 < rhs || -static_cast(rhs) < lhs - ? rhs + lhs - : min); - } - }; - - /// Add \a width columns, in place. - inline position& - operator+= (position& res, int width) - { - res.columns (width); - return res; - } - - /// Add \a width columns. - inline position - operator+ (position res, int width) - { - return res += width; - } - - /// Subtract \a width columns, in place. - inline position& - operator-= (position& res, int width) - { - return res += -width; - } - - /// Subtract \a width columns. - inline position - operator- (position res, int width) - { - return res -= width; - } - - /// Compare two position objects. - inline bool - operator== (const position& pos1, const position& pos2) - { - return (pos1.line == pos2.line - && pos1.column == pos2.column - && (pos1.filename == pos2.filename - || (pos1.filename && pos2.filename - && *pos1.filename == *pos2.filename))); - } - - /// Compare two position objects. - inline bool - operator!= (const position& pos1, const position& pos2) - { - return !(pos1 == pos2); - } - - /** \brief Intercept output stream redirection. - ** \param ostr the destination output stream - ** \param pos a reference to the position to redirect - */ - template - inline std::basic_ostream& - operator<< (std::basic_ostream& ostr, const position& pos) - { - if (pos.filename) - ostr << *pos.filename << ':'; - return ostr << pos.line << '.' << pos.column; - } - -#line 14 "parser.yy" // location.cc:296 -} } // isc::eval -#line 180 "position.hh" // location.cc:296 -#endif // !YY_EVAL_POSITION_HH_INCLUDED +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. + +// Starting with Bison 3.2, this file is useless: the structure it +// used to define is now defined in "location.hh". +// +// To get rid of this file: +// 1. add 'require "3.2"' (or newer) to your grammar file +// 2. remove references to this file from your build system +// 3. if you used to include it, include "location.hh" instead. + +#include "location.hh" diff --git a/src/lib/eval/stack.hh b/src/lib/eval/stack.hh index e0d2dfe10f..b90e3e2e0c 100644 --- a/src/lib/eval/stack.hh +++ b/src/lib/eval/stack.hh @@ -1,157 +1,9 @@ -// A Bison parser, made by GNU Bison 3.0.4. - -// Stack handling for Bison parsers in C++ - -// Copyright (C) 2002-2015 Free Software Foundation, Inc. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// As a special exception, you may create a larger work that contains -// part or all of the Bison parser skeleton and distribute that work -// under terms of your choice, so long as that work isn't itself a -// parser generator using the skeleton or a modified version thereof -// as a parser skeleton. Alternatively, if you modify or redistribute -// the parser skeleton itself, you may (at your option) remove this -// special exception, which will cause the skeleton and the resulting -// Bison output files to be licensed under the GNU General Public -// License without this special exception. - -// This special exception was added by the Free Software Foundation in -// version 2.2 of Bison. - -/** - ** \file stack.hh - ** Define the isc::eval::stack class. - */ - -#ifndef YY_EVAL_STACK_HH_INCLUDED -# define YY_EVAL_STACK_HH_INCLUDED - -# include - -#line 14 "parser.yy" // stack.hh:132 -namespace isc { namespace eval { -#line 46 "stack.hh" // stack.hh:132 - template > - class stack - { - public: - // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; - - stack () - : seq_ () - { - seq_.reserve (200); - } - - stack (unsigned int n) - : seq_ (n) - {} - - inline - T& - operator[] (unsigned int i) - { - return seq_[seq_.size () - 1 - i]; - } - - inline - const T& - operator[] (unsigned int i) const - { - return seq_[seq_.size () - 1 - i]; - } - - /// Steal the contents of \a t. - /// - /// Close to move-semantics. - inline - void - push (T& t) - { - seq_.push_back (T()); - operator[](0).move (t); - } - - inline - void - pop (unsigned int n = 1) - { - for (; n; --n) - seq_.pop_back (); - } - - void - clear () - { - seq_.clear (); - } - - inline - typename S::size_type - size () const - { - return seq_.size (); - } - - inline - const_iterator - begin () const - { - return seq_.rbegin (); - } - - inline - const_iterator - end () const - { - return seq_.rend (); - } - - private: - stack (const stack&); - stack& operator= (const stack&); - /// The wrapped container. - S seq_; - }; - - /// Present a slice of the top of a stack. - template > - class slice - { - public: - slice (const S& stack, unsigned int range) - : stack_ (stack) - , range_ (range) - {} - - inline - const T& - operator [] (unsigned int i) const - { - return stack_[range_ - i]; - } - - private: - const S& stack_; - unsigned int range_; - }; - -#line 14 "parser.yy" // stack.hh:132 -} } // isc::eval -#line 156 "stack.hh" // stack.hh:132 - -#endif // !YY_EVAL_STACK_HH_INCLUDED +// Generated 201908191245 +// A Bison parser, made by GNU Bison 3.4.1. + +// Starting with Bison 3.2, this file is useless: the structure it +// used to define is now defined with the parser itself. +// +// To get rid of this file: +// 1. add 'require "3.2"' (or newer) to your grammar file +// 2. remove references to this file from your build system. diff --git a/tools/system_messages.cc b/tools/system_messages.cc index be4f0bf2f4..37cc38e7de 100644 --- a/tools/system_messages.cc +++ b/tools/system_messages.cc @@ -94,7 +94,7 @@ const std::string FILE_HEADER = Kea Messages Manual\n\ \n\ \n\ - 2011-2018\n\ + 2011-2019\n\ Internet Systems Consortium, Inc. (\"ISC\")\n\ \n\ \n\ -- 2.47.2