From: Francis Dupont Date: Tue, 27 Nov 2018 13:45:23 +0000 (+0000) Subject: [master] Regen flex/bison (with bison 3.2.2) X-Git-Tag: 136-add-global-host-reservation-examples_base X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a427e9e3daba2061aa5b44a5a25d7c5fa3305b6;p=thirdparty%2Fkea.git [master] Regen flex/bison (with bison 3.2.2) --- diff --git a/src/bin/agent/agent_parser.cc b/src/bin/agent/agent_parser.cc index 37c6c4ff49..3b2362e8c6 100644 --- a/src/bin/agent/agent_parser.cc +++ b/src/bin/agent/agent_parser.cc @@ -271,7 +271,7 @@ namespace isc { namespace agent { break; } -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif @@ -312,7 +312,7 @@ namespace isc { namespace agent { that.type = empty_symbol; } -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L AgentParser::stack_symbol_type& AgentParser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -446,7 +446,7 @@ namespace isc { namespace agent { void AgentParser::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); diff --git a/src/bin/agent/agent_parser.h b/src/bin/agent/agent_parser.h index 0b665060de..96a0ff1840 100644 --- a/src/bin/agent/agent_parser.h +++ b/src/bin/agent/agent_parser.h @@ -64,8 +64,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&& @@ -157,7 +163,7 @@ using namespace std; #line 14 "agent_parser.yy" // lalr1.cc:404 namespace isc { namespace agent { -#line 161 "agent_parser.h" // lalr1.cc:404 +#line 167 "agent_parser.h" // lalr1.cc:404 /// A stack with random access from its top. template > @@ -323,7 +329,7 @@ namespace isc { namespace agent { return *new (yyas_ ()) T (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& @@ -411,7 +417,7 @@ namespace isc { namespace agent { void move (self_type& other) { -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS emplace (std::move (other.as ())); # else emplace (); @@ -420,7 +426,7 @@ namespace isc { namespace agent { other.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Move the content of \a other to this. template void @@ -608,12 +614,36 @@ namespace isc { namespace agent { /// 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); +#else + basic_symbol (typename Base::kind_type t, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l); +#endif /// Destroy the symbol. @@ -635,7 +665,7 @@ namespace isc { namespace agent { location_type location; private: -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L /// Assignment operator. basic_symbol& operator= (const basic_symbol& other); #endif @@ -1032,7 +1062,7 @@ namespace isc { namespace agent { 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 +#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); @@ -1182,47 +1212,94 @@ namespace isc { namespace agent { // Implementation of basic_symbol constructor for each type. +# if 201103L <= YY_CPLUSPLUS template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) - , location (YY_MOVE (l)) + , location (std::move (l)) {} - +#else template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS + template + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + AgentParser::basic_symbol::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 + template + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif +# if 201103L <= YY_CPLUSPLUS + template + AgentParser::basic_symbol::basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif template @@ -1682,7 +1759,7 @@ namespace isc { namespace agent { #line 14 "agent_parser.yy" // lalr1.cc:404 } } // isc::agent -#line 1686 "agent_parser.h" // lalr1.cc:404 +#line 1763 "agent_parser.h" // lalr1.cc:404 diff --git a/src/bin/agent/location.hh b/src/bin/agent/location.hh index 997ac4d413..de8e50df63 100644 --- a/src/bin/agent/location.hh +++ b/src/bin/agent/location.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Locations for Bison parsers in C++ diff --git a/src/bin/agent/position.hh b/src/bin/agent/position.hh index 9f3dfeedf8..86db4af678 100644 --- a/src/bin/agent/position.hh +++ b/src/bin/agent/position.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/agent/stack.hh b/src/bin/agent/stack.hh index c0ca3f35b5..64a6403bce 100644 --- a/src/bin/agent/stack.hh +++ b/src/bin/agent/stack.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/d2/d2_parser.cc b/src/bin/d2/d2_parser.cc index 52d8551b74..72d47f37b2 100644 --- a/src/bin/d2/d2_parser.cc +++ b/src/bin/d2/d2_parser.cc @@ -271,7 +271,7 @@ namespace isc { namespace d2 { break; } -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif @@ -312,7 +312,7 @@ namespace isc { namespace d2 { that.type = empty_symbol; } -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L D2Parser::stack_symbol_type& D2Parser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -446,7 +446,7 @@ namespace isc { namespace d2 { void D2Parser::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); diff --git a/src/bin/d2/d2_parser.h b/src/bin/d2/d2_parser.h index d34ca13a1d..c32be0d7c0 100644 --- a/src/bin/d2/d2_parser.h +++ b/src/bin/d2/d2_parser.h @@ -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&& @@ -158,7 +164,7 @@ using namespace std; #line 14 "d2_parser.yy" // lalr1.cc:404 namespace isc { namespace d2 { -#line 162 "d2_parser.h" // lalr1.cc:404 +#line 168 "d2_parser.h" // lalr1.cc:404 /// A stack with random access from its top. template > @@ -324,7 +330,7 @@ namespace isc { namespace d2 { return *new (yyas_ ()) T (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& @@ -412,7 +418,7 @@ namespace isc { namespace d2 { void move (self_type& other) { -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS emplace (std::move (other.as ())); # else emplace (); @@ -421,7 +427,7 @@ namespace isc { namespace d2 { other.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Move the content of \a other to this. template void @@ -621,12 +627,36 @@ namespace isc { namespace d2 { /// 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); +#else + basic_symbol (typename Base::kind_type t, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l); +#endif /// Destroy the symbol. @@ -648,7 +678,7 @@ namespace isc { namespace d2 { location_type location; private: -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L /// Assignment operator. basic_symbol& operator= (const basic_symbol& other); #endif @@ -1093,7 +1123,7 @@ namespace isc { namespace d2 { 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 +#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); @@ -1245,47 +1275,94 @@ namespace isc { namespace d2 { // Implementation of basic_symbol constructor for each type. +# if 201103L <= YY_CPLUSPLUS template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) - , location (YY_MOVE (l)) + , location (std::move (l)) {} - +#else template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS + template + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + D2Parser::basic_symbol::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 + template + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif +# if 201103L <= YY_CPLUSPLUS + template + D2Parser::basic_symbol::basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif template @@ -1830,7 +1907,7 @@ namespace isc { namespace d2 { #line 14 "d2_parser.yy" // lalr1.cc:404 } } // isc::d2 -#line 1834 "d2_parser.h" // lalr1.cc:404 +#line 1911 "d2_parser.h" // lalr1.cc:404 diff --git a/src/bin/d2/location.hh b/src/bin/d2/location.hh index 6416014f7b..0b7e416642 100644 --- a/src/bin/d2/location.hh +++ b/src/bin/d2/location.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Locations for Bison parsers in C++ diff --git a/src/bin/d2/position.hh b/src/bin/d2/position.hh index 9f3dfeedf8..5a854e9334 100644 --- a/src/bin/d2/position.hh +++ b/src/bin/d2/position.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/d2/stack.hh b/src/bin/d2/stack.hh index c0ca3f35b5..4fcda222f5 100644 --- a/src/bin/d2/stack.hh +++ b/src/bin/d2/stack.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/dhcp4/dhcp4_parser.cc b/src/bin/dhcp4/dhcp4_parser.cc index b0a842d6ef..053941784e 100644 --- a/src/bin/dhcp4/dhcp4_parser.cc +++ b/src/bin/dhcp4/dhcp4_parser.cc @@ -276,7 +276,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 +322,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) { @@ -496,7 +496,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); diff --git a/src/bin/dhcp4/dhcp4_parser.h b/src/bin/dhcp4/dhcp4_parser.h index 4709d258fc..22a0e1fea9 100644 --- a/src/bin/dhcp4/dhcp4_parser.h +++ b/src/bin/dhcp4/dhcp4_parser.h @@ -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&& @@ -158,7 +164,7 @@ using namespace std; #line 14 "dhcp4_parser.yy" // lalr1.cc:404 namespace isc { namespace dhcp { -#line 162 "dhcp4_parser.h" // lalr1.cc:404 +#line 168 "dhcp4_parser.h" // lalr1.cc:404 /// A stack with random access from its top. template > @@ -324,7 +330,7 @@ namespace isc { namespace dhcp { return *new (yyas_ ()) T (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& @@ -412,7 +418,7 @@ namespace isc { namespace dhcp { void move (self_type& other) { -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS emplace (std::move (other.as ())); # else emplace (); @@ -421,7 +427,7 @@ namespace isc { namespace dhcp { other.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Move the content of \a other to this. template void @@ -738,12 +744,36 @@ namespace isc { namespace dhcp { /// 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); +#else + basic_symbol (typename Base::kind_type t, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l); +#endif /// Destroy the symbol. @@ -765,7 +795,7 @@ 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); #endif @@ -1658,7 +1688,7 @@ namespace isc { namespace dhcp { 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 +#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); @@ -1826,47 +1856,94 @@ namespace isc { namespace dhcp { // Implementation of basic_symbol constructor for each type. +# if 201103L <= YY_CPLUSPLUS template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) - , location (YY_MOVE (l)) + , location (std::move (l)) {} - +#else template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS + template + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + Dhcp4Parser::basic_symbol::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 + template + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + Dhcp4Parser::basic_symbol::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 + template + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + Dhcp4Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif template @@ -3216,7 +3293,7 @@ namespace isc { namespace dhcp { #line 14 "dhcp4_parser.yy" // lalr1.cc:404 } } // isc::dhcp -#line 3220 "dhcp4_parser.h" // lalr1.cc:404 +#line 3297 "dhcp4_parser.h" // lalr1.cc:404 diff --git a/src/bin/dhcp4/location.hh b/src/bin/dhcp4/location.hh index cc89256d69..e5854ce4d9 100644 --- a/src/bin/dhcp4/location.hh +++ b/src/bin/dhcp4/location.hh @@ -1,4 +1,4 @@ -// Generated 201811202257 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Locations for Bison parsers in C++ diff --git a/src/bin/dhcp4/position.hh b/src/bin/dhcp4/position.hh index c9749a5d1a..86db4af678 100644 --- a/src/bin/dhcp4/position.hh +++ b/src/bin/dhcp4/position.hh @@ -1,4 +1,4 @@ -// Generated 201811202257 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/dhcp4/stack.hh b/src/bin/dhcp4/stack.hh index 63282a8b87..64a6403bce 100644 --- a/src/bin/dhcp4/stack.hh +++ b/src/bin/dhcp4/stack.hh @@ -1,4 +1,4 @@ -// Generated 201811202257 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/dhcp6/dhcp6_parser.cc b/src/bin/dhcp6/dhcp6_parser.cc index b346417260..4b51c72fc1 100644 --- a/src/bin/dhcp6/dhcp6_parser.cc +++ b/src/bin/dhcp6/dhcp6_parser.cc @@ -275,7 +275,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 +320,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) { @@ -486,7 +486,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); diff --git a/src/bin/dhcp6/dhcp6_parser.h b/src/bin/dhcp6/dhcp6_parser.h index f9052cf4f9..fc3f9229f7 100644 --- a/src/bin/dhcp6/dhcp6_parser.h +++ b/src/bin/dhcp6/dhcp6_parser.h @@ -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&& @@ -158,7 +164,7 @@ using namespace std; #line 14 "dhcp6_parser.yy" // lalr1.cc:404 namespace isc { namespace dhcp { -#line 162 "dhcp6_parser.h" // lalr1.cc:404 +#line 168 "dhcp6_parser.h" // lalr1.cc:404 /// A stack with random access from its top. template > @@ -324,7 +330,7 @@ namespace isc { namespace dhcp { return *new (yyas_ ()) T (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& @@ -412,7 +418,7 @@ namespace isc { namespace dhcp { void move (self_type& other) { -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS emplace (std::move (other.as ())); # else emplace (); @@ -421,7 +427,7 @@ namespace isc { namespace dhcp { other.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Move the content of \a other to this. template void @@ -742,12 +748,36 @@ namespace isc { namespace dhcp { /// 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); +#else + basic_symbol (typename Base::kind_type t, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l); +#endif /// Destroy the symbol. @@ -769,7 +799,7 @@ 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); #endif @@ -1682,7 +1712,7 @@ namespace isc { namespace dhcp { 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 +#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); @@ -1849,47 +1879,94 @@ namespace isc { namespace dhcp { // Implementation of basic_symbol constructor for each type. +# if 201103L <= YY_CPLUSPLUS template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) - , location (YY_MOVE (l)) + , location (std::move (l)) {} - +#else template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS + template + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + Dhcp6Parser::basic_symbol::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 + template + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + Dhcp6Parser::basic_symbol::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 + template + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + Dhcp6Parser::basic_symbol::basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif template @@ -3273,7 +3350,7 @@ namespace isc { namespace dhcp { #line 14 "dhcp6_parser.yy" // lalr1.cc:404 } } // isc::dhcp -#line 3277 "dhcp6_parser.h" // lalr1.cc:404 +#line 3354 "dhcp6_parser.h" // lalr1.cc:404 diff --git a/src/bin/dhcp6/location.hh b/src/bin/dhcp6/location.hh index d87a94ca6b..b8566ea677 100644 --- a/src/bin/dhcp6/location.hh +++ b/src/bin/dhcp6/location.hh @@ -1,4 +1,4 @@ -// Generated 201811202258 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Locations for Bison parsers in C++ diff --git a/src/bin/dhcp6/position.hh b/src/bin/dhcp6/position.hh index a5b8de040e..86db4af678 100644 --- a/src/bin/dhcp6/position.hh +++ b/src/bin/dhcp6/position.hh @@ -1,4 +1,4 @@ -// Generated 201811202258 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/dhcp6/stack.hh b/src/bin/dhcp6/stack.hh index 4a5cf50be7..64a6403bce 100644 --- a/src/bin/dhcp6/stack.hh +++ b/src/bin/dhcp6/stack.hh @@ -1,4 +1,4 @@ -// Generated 201811202258 +// Generated 201811271343 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/netconf/location.hh b/src/bin/netconf/location.hh index b7fe430ae0..512cf3f889 100644 --- a/src/bin/netconf/location.hh +++ b/src/bin/netconf/location.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Locations for Bison parsers in C++ diff --git a/src/bin/netconf/netconf_parser.cc b/src/bin/netconf/netconf_parser.cc index c2e7950403..823c6c7431 100644 --- a/src/bin/netconf/netconf_parser.cc +++ b/src/bin/netconf/netconf_parser.cc @@ -271,7 +271,7 @@ namespace isc { namespace netconf { break; } -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif @@ -312,7 +312,7 @@ namespace isc { namespace netconf { that.type = empty_symbol; } -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L NetconfParser::stack_symbol_type& NetconfParser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -446,7 +446,7 @@ namespace isc { namespace netconf { void NetconfParser::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); diff --git a/src/bin/netconf/netconf_parser.h b/src/bin/netconf/netconf_parser.h index 42d5ac211b..30de6c1faa 100644 --- a/src/bin/netconf/netconf_parser.h +++ b/src/bin/netconf/netconf_parser.h @@ -64,8 +64,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&& @@ -157,7 +163,7 @@ using namespace std; #line 14 "netconf_parser.yy" // lalr1.cc:404 namespace isc { namespace netconf { -#line 161 "netconf_parser.h" // lalr1.cc:404 +#line 167 "netconf_parser.h" // lalr1.cc:404 /// A stack with random access from its top. template > @@ -323,7 +329,7 @@ namespace isc { namespace netconf { return *new (yyas_ ()) T (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& @@ -411,7 +417,7 @@ namespace isc { namespace netconf { void move (self_type& other) { -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS emplace (std::move (other.as ())); # else emplace (); @@ -420,7 +426,7 @@ namespace isc { namespace netconf { other.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Move the content of \a other to this. template void @@ -612,12 +618,36 @@ namespace isc { namespace netconf { /// 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); +#else + basic_symbol (typename Base::kind_type t, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const double& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const int64_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l); +#endif /// Destroy the symbol. @@ -639,7 +669,7 @@ namespace isc { namespace netconf { location_type location; private: -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L /// Assignment operator. basic_symbol& operator= (const basic_symbol& other); #endif @@ -1052,7 +1082,7 @@ namespace isc { namespace netconf { 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 +#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); @@ -1203,47 +1233,94 @@ namespace isc { namespace netconf { // Implementation of basic_symbol constructor for each type. +# if 201103L <= YY_CPLUSPLUS template - NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) - , location (YY_MOVE (l)) + , location (std::move (l)) {} - +#else template - NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (ElementPtr) v, YY_RVREF (location_type) l) + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (bool) v, YY_RVREF (location_type) l) + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, ElementPtr&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (double) v, YY_RVREF (location_type) l) + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, const ElementPtr& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int64_t) v, YY_RVREF (location_type) l) + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS + template + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, double&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + NetconfParser::basic_symbol::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 + template + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, int64_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + NetconfParser::basic_symbol::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 + template + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + template + NetconfParser::basic_symbol::basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif template @@ -1731,7 +1808,7 @@ namespace isc { namespace netconf { #line 14 "netconf_parser.yy" // lalr1.cc:404 } } // isc::netconf -#line 1735 "netconf_parser.h" // lalr1.cc:404 +#line 1812 "netconf_parser.h" // lalr1.cc:404 diff --git a/src/bin/netconf/position.hh b/src/bin/netconf/position.hh index 9f3dfeedf8..5a854e9334 100644 --- a/src/bin/netconf/position.hh +++ b/src/bin/netconf/position.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/bin/netconf/stack.hh b/src/bin/netconf/stack.hh index c0ca3f35b5..4fcda222f5 100644 --- a/src/bin/netconf/stack.hh +++ b/src/bin/netconf/stack.hh @@ -1,4 +1,4 @@ -// Generated 201811172153 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/lib/eval/location.hh b/src/lib/eval/location.hh index a41ad5249b..dcb0136511 100644 --- a/src/lib/eval/location.hh +++ b/src/lib/eval/location.hh @@ -1,4 +1,4 @@ -// Generated 201811172152 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Locations for Bison parsers in C++ diff --git a/src/lib/eval/parser.cc b/src/lib/eval/parser.cc index 402a987d1c..b35e7497f9 100644 --- a/src/lib/eval/parser.cc +++ b/src/lib/eval/parser.cc @@ -290,7 +290,7 @@ namespace isc { namespace eval { break; } -#if defined __cplusplus && 201103L <= __cplusplus +#if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif @@ -350,7 +350,7 @@ namespace isc { namespace eval { that.type = empty_symbol; } -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L EvalParser::stack_symbol_type& EvalParser::stack_symbol_type::operator= (stack_symbol_type& that) { @@ -552,7 +552,7 @@ namespace isc { namespace eval { void EvalParser::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); diff --git a/src/lib/eval/parser.h b/src/lib/eval/parser.h index 7a3a14c82f..6d5b96d07a 100644 --- a/src/lib/eval/parser.h +++ b/src/lib/eval/parser.h @@ -64,8 +64,14 @@ using namespace isc::eval; # 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&& @@ -157,7 +163,7 @@ using namespace isc::eval; #line 14 "parser.yy" // lalr1.cc:404 namespace isc { namespace eval { -#line 161 "parser.h" // lalr1.cc:404 +#line 167 "parser.h" // lalr1.cc:404 /// A stack with random access from its top. template > @@ -323,7 +329,7 @@ namespace isc { namespace eval { return *new (yyas_ ()) T (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& @@ -411,7 +417,7 @@ namespace isc { namespace eval { void move (self_type& other) { -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS emplace (std::move (other.as ())); # else emplace (); @@ -420,7 +426,7 @@ namespace isc { namespace eval { other.destroy (); } -# if defined __cplusplus && 201103L <= __cplusplus +# if 201103L <= YY_CPLUSPLUS /// Move the content of \a other to this. template void @@ -633,16 +639,56 @@ namespace isc { namespace eval { /// 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 (TokenOption::RepresentationType) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (TokenPkt4::FieldType) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (TokenPkt6::FieldType) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (TokenPkt::MetadataType) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (TokenRelay6Field::FieldType) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (int8_t) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (uint16_t) v, YY_RVREF (location_type) l); - basic_symbol (typename Base::kind_type t, YY_RVREF (uint32_t) v, YY_RVREF (location_type) l); +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenOption::RepresentationType&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const TokenOption::RepresentationType& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenPkt4::FieldType&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const TokenPkt4::FieldType& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenPkt6::FieldType&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenPkt::MetadataType&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, TokenRelay6Field::FieldType&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const TokenRelay6Field::FieldType& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int8_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const int8_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, uint16_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const uint16_t& v, const location_type& l); +#endif +# if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, uint32_t&& v, location_type&& l); +#else + basic_symbol (typename Base::kind_type t, const uint32_t& v, const location_type& l); +#endif /// Destroy the symbol. @@ -664,7 +710,7 @@ namespace isc { namespace eval { location_type location; private: -#if !defined __cplusplus || __cplusplus < 201103L +#if YY_CPLUSPLUS < 201103L /// Assignment operator. basic_symbol& operator= (const basic_symbol& other); #endif @@ -1101,7 +1147,7 @@ namespace isc { namespace eval { 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 +#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); @@ -1271,75 +1317,154 @@ namespace isc { namespace eval { // Implementation of basic_symbol constructor for each type. +# if 201103L <= YY_CPLUSPLUS template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) - , location (YY_MOVE (l)) + , location (std::move (l)) {} - +#else template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (TokenOption::RepresentationType) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (TokenPkt4::FieldType) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, TokenOption::RepresentationType&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (TokenPkt6::FieldType) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenOption::RepresentationType& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (TokenPkt::MetadataType) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, TokenPkt4::FieldType&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (TokenRelay6Field::FieldType) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenPkt4::FieldType& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (int8_t) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, TokenPkt6::FieldType&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (std::string) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenPkt6::FieldType& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (uint16_t) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, TokenPkt::MetadataType&& v, location_type&& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (std::move (v)) + , location (std::move (l)) {} - +#else template - EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (uint32_t) v, YY_RVREF (location_type) l) + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, const TokenPkt::MetadataType& v, const location_type& l) : Base (t) - , value (YY_MOVE (v)) - , location (YY_MOVE (l)) + , value (v) + , location (l) {} - +#endif +# if 201103L <= YY_CPLUSPLUS + template + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, TokenRelay6Field::FieldType&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif +# if 201103L <= YY_CPLUSPLUS + template + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, int8_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif +# if 201103L <= YY_CPLUSPLUS + template + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif +# if 201103L <= YY_CPLUSPLUS + template + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, uint16_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif +# if 201103L <= YY_CPLUSPLUS + template + EvalParser::basic_symbol::basic_symbol (typename Base::kind_type t, uint32_t&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + 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) + {} +#endif template @@ -1908,7 +2033,7 @@ namespace isc { namespace eval { #line 14 "parser.yy" // lalr1.cc:404 } } // isc::eval -#line 1912 "parser.h" // lalr1.cc:404 +#line 2037 "parser.h" // lalr1.cc:404 diff --git a/src/lib/eval/position.hh b/src/lib/eval/position.hh index 65e51f41eb..5a854e9334 100644 --- a/src/lib/eval/position.hh +++ b/src/lib/eval/position.hh @@ -1,4 +1,4 @@ -// Generated 201811172152 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it diff --git a/src/lib/eval/stack.hh b/src/lib/eval/stack.hh index e1904b0494..4fcda222f5 100644 --- a/src/lib/eval/stack.hh +++ b/src/lib/eval/stack.hh @@ -1,4 +1,4 @@ -// Generated 201811172152 +// Generated 201811271344 // A Bison parser, made by GNU Bison 3.2.1. // Starting with Bison 3.2, this file is useless: the structure it