From b8cf34c691623e4ec329053cbbf68522a855882d Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 5 Dec 2019 15:12:59 +0900 Subject: Imported Upstream version 1.67.0 --- boost/spirit/home/x3/operator/alternative.hpp | 4 +- boost/spirit/home/x3/operator/and_predicate.hpp | 4 +- .../spirit/home/x3/operator/detail/alternative.hpp | 4 +- boost/spirit/home/x3/operator/detail/sequence.hpp | 62 +++++++++++++++------- boost/spirit/home/x3/operator/difference.hpp | 4 +- boost/spirit/home/x3/operator/kleene.hpp | 4 +- boost/spirit/home/x3/operator/list.hpp | 4 +- boost/spirit/home/x3/operator/not_predicate.hpp | 4 +- boost/spirit/home/x3/operator/optional.hpp | 4 +- boost/spirit/home/x3/operator/plus.hpp | 4 +- boost/spirit/home/x3/operator/sequence.hpp | 4 +- 11 files changed, 63 insertions(+), 39 deletions(-) (limited to 'boost/spirit/home/x3/operator') diff --git a/boost/spirit/home/x3/operator/alternative.hpp b/boost/spirit/home/x3/operator/alternative.hpp index c3a1e40f3f..1a436e1e69 100644 --- a/boost/spirit/home/x3/operator/alternative.hpp +++ b/boost/spirit/home/x3/operator/alternative.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_ALTERNATIVE_JAN_07_2013_1131AM) -#define SPIRIT_ALTERNATIVE_JAN_07_2013_1131AM +#if !defined(BOOST_SPIRIT_X3_ALTERNATIVE_JAN_07_2013_1131AM) +#define BOOST_SPIRIT_X3_ALTERNATIVE_JAN_07_2013_1131AM #include #include diff --git a/boost/spirit/home/x3/operator/and_predicate.hpp b/boost/spirit/home/x3/operator/and_predicate.hpp index 1d650f7521..0ee1652555 100644 --- a/boost/spirit/home/x3/operator/and_predicate.hpp +++ b/boost/spirit/home/x3/operator/and_predicate.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_AND_PREDICATE_MARCH_23_2007_0617PM) -#define SPIRIT_AND_PREDICATE_MARCH_23_2007_0617PM +#if !defined(BOOST_SPIRIT_X3_AND_PREDICATE_MARCH_23_2007_0617PM) +#define BOOST_SPIRIT_X3_AND_PREDICATE_MARCH_23_2007_0617PM #include diff --git a/boost/spirit/home/x3/operator/detail/alternative.hpp b/boost/spirit/home/x3/operator/detail/alternative.hpp index 0043710320..2c87fa0376 100644 --- a/boost/spirit/home/x3/operator/detail/alternative.hpp +++ b/boost/spirit/home/x3/operator/detail/alternative.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_ALTERNATIVE_DETAIL_JAN_07_2013_1245PM) -#define SPIRIT_ALTERNATIVE_DETAIL_JAN_07_2013_1245PM +#if !defined(BOOST_SPIRIT_X3_ALTERNATIVE_DETAIL_JAN_07_2013_1245PM) +#define BOOST_SPIRIT_X3_ALTERNATIVE_DETAIL_JAN_07_2013_1245PM #include #include diff --git a/boost/spirit/home/x3/operator/detail/sequence.hpp b/boost/spirit/home/x3/operator/detail/sequence.hpp index 2c804cc78a..2d3bfec4da 100644 --- a/boost/spirit/home/x3/operator/detail/sequence.hpp +++ b/boost/spirit/home/x3/operator/detail/sequence.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_SEQUENCE_DETAIL_JAN_06_2013_1015AM) -#define SPIRIT_SEQUENCE_DETAIL_JAN_06_2013_1015AM +#if !defined(BOOST_SPIRIT_X3_SEQUENCE_DETAIL_JAN_06_2013_1015AM) +#define BOOST_SPIRIT_X3_SEQUENCE_DETAIL_JAN_06_2013_1015AM #include #include @@ -13,11 +13,13 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -79,14 +81,16 @@ namespace boost { namespace spirit { namespace x3 { namespace detail }; template - struct pass_sequence_attribute_front + struct pass_sequence_attribute_size_one_view { - typedef typename fusion::result_of::front::type type; + typedef typename fusion::result_of::deref< + typename fusion::result_of::begin::type + >::type type; static typename add_reference::type call(Attribute& attr) { - return fusion::front(attr); + return fusion::deref(fusion::begin(attr)); } }; @@ -103,30 +107,30 @@ namespace boost { namespace spirit { namespace x3 { namespace detail } }; - template + template struct pass_sequence_attribute_used : - mpl::if_c< - (!pass_through && traits::is_size_one_sequence::value) - , pass_sequence_attribute_front + mpl::if_< + traits::is_size_one_view + , pass_sequence_attribute_size_one_view , pass_through_sequence_attribute>::type {}; - template + template struct pass_sequence_attribute : mpl::if_< fusion::result_of::empty , pass_sequence_attribute_unused - , pass_sequence_attribute_used>::type {}; + , pass_sequence_attribute_used>::type {}; - template - struct pass_sequence_attribute, Attribute, pass_through> + template + struct pass_sequence_attribute, Attribute> : pass_through_sequence_attribute {}; template struct pass_sequence_attribute_subject : pass_sequence_attribute {}; - template - struct pass_sequence_attribute + struct pass_sequence_attribute::type> : pass_sequence_attribute_subject {}; @@ -150,8 +154,8 @@ namespace boost { namespace spirit { namespace x3 { namespace detail typedef typename fusion::result_of::end::type r_end; typedef fusion::iterator_range l_part; typedef fusion::iterator_range r_part; - typedef pass_sequence_attribute l_pass; - typedef pass_sequence_attribute r_pass; + typedef pass_sequence_attribute l_pass; + typedef pass_sequence_attribute r_pass; static l_part left(Attribute& s) { @@ -175,7 +179,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail typedef unused_type l_part; typedef Attribute& r_part; typedef pass_sequence_attribute_unused l_pass; - typedef pass_sequence_attribute r_pass; + typedef pass_sequence_attribute r_pass; static unused_type left(Attribute&) { @@ -195,7 +199,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail { typedef Attribute& l_part; typedef unused_type r_part; - typedef pass_sequence_attribute l_pass; + typedef pass_sequence_attribute l_pass; typedef pass_sequence_attribute_unused r_pass; static Attribute& left(Attribute& s) @@ -359,6 +363,26 @@ namespace boost { namespace spirit { namespace x3 { namespace detail return parse_sequence_plain(parser, first, last, context, rcontext, attr); } + template + bool parse_sequence( + Parser const& parser, Iterator& first, Iterator const& last + , Context const& context, RContext& rcontext, Attribute& attr + , traits::optional_attribute) + { + return parse_sequence_plain(parser, first, last, context, rcontext, attr); + } + + template + bool parse_sequence( + Parser const& parser, Iterator& first, Iterator const& last + , Context const& context, RContext& rcontext, Attribute& attr + , traits::range_attribute) + { + return parse_sequence_plain(parser, first, last, context, rcontext, attr); + } + template bool parse_sequence( diff --git a/boost/spirit/home/x3/operator/difference.hpp b/boost/spirit/home/x3/operator/difference.hpp index a75e713821..8ca2a96888 100644 --- a/boost/spirit/home/x3/operator/difference.hpp +++ b/boost/spirit/home/x3/operator/difference.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_DIFFERENCE_FEBRUARY_11_2007_1250PM) -#define SPIRIT_DIFFERENCE_FEBRUARY_11_2007_1250PM +#if !defined(BOOST_SPIRIT_X3_DIFFERENCE_FEBRUARY_11_2007_1250PM) +#define BOOST_SPIRIT_X3_DIFFERENCE_FEBRUARY_11_2007_1250PM #include #include diff --git a/boost/spirit/home/x3/operator/kleene.hpp b/boost/spirit/home/x3/operator/kleene.hpp index b0fb5a1df1..1a9dcfaa56 100644 --- a/boost/spirit/home/x3/operator/kleene.hpp +++ b/boost/spirit/home/x3/operator/kleene.hpp @@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_KLEENE_JANUARY_07_2007_0818AM) -#define SPIRIT_KLEENE_JANUARY_07_2007_0818AM +#if !defined(BOOST_SPIRIT_X3_KLEENE_JANUARY_07_2007_0818AM) +#define BOOST_SPIRIT_X3_KLEENE_JANUARY_07_2007_0818AM #include #include diff --git a/boost/spirit/home/x3/operator/list.hpp b/boost/spirit/home/x3/operator/list.hpp index 23b398b128..392a9646a1 100644 --- a/boost/spirit/home/x3/operator/list.hpp +++ b/boost/spirit/home/x3/operator/list.hpp @@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_LIST_MARCH_24_2007_1031AM) -#define SPIRIT_LIST_MARCH_24_2007_1031AM +#if !defined(BOOST_SPIRIT_X3_LIST_MARCH_24_2007_1031AM) +#define BOOST_SPIRIT_X3_LIST_MARCH_24_2007_1031AM #include #include diff --git a/boost/spirit/home/x3/operator/not_predicate.hpp b/boost/spirit/home/x3/operator/not_predicate.hpp index d0302e6142..2fe6edab49 100644 --- a/boost/spirit/home/x3/operator/not_predicate.hpp +++ b/boost/spirit/home/x3/operator/not_predicate.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_NOT_PREDICATE_MARCH_23_2007_0618PM) -#define SPIRIT_NOT_PREDICATE_MARCH_23_2007_0618PM +#if !defined(BOOST_SPIRIT_X3_NOT_PREDICATE_MARCH_23_2007_0618PM) +#define BOOST_SPIRIT_X3_NOT_PREDICATE_MARCH_23_2007_0618PM #include diff --git a/boost/spirit/home/x3/operator/optional.hpp b/boost/spirit/home/x3/operator/optional.hpp index a40228849a..70beefef21 100644 --- a/boost/spirit/home/x3/operator/optional.hpp +++ b/boost/spirit/home/x3/operator/optional.hpp @@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_OPTIONAL_MARCH_23_2007_1117PM) -#define SPIRIT_OPTIONAL_MARCH_23_2007_1117PM +#if !defined(BOOST_SPIRIT_X3_OPTIONAL_MARCH_23_2007_1117PM) +#define BOOST_SPIRIT_X3_OPTIONAL_MARCH_23_2007_1117PM #include #include diff --git a/boost/spirit/home/x3/operator/plus.hpp b/boost/spirit/home/x3/operator/plus.hpp index 152731e622..caf7333892 100644 --- a/boost/spirit/home/x3/operator/plus.hpp +++ b/boost/spirit/home/x3/operator/plus.hpp @@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_PLUS_MARCH_13_2007_0127PM) -#define SPIRIT_PLUS_MARCH_13_2007_0127PM +#if !defined(BOOST_SPIRIT_X3_PLUS_MARCH_13_2007_0127PM) +#define BOOST_SPIRIT_X3_PLUS_MARCH_13_2007_0127PM #include #include diff --git a/boost/spirit/home/x3/operator/sequence.hpp b/boost/spirit/home/x3/operator/sequence.hpp index 661a23cd37..ecf7f45e08 100644 --- a/boost/spirit/home/x3/operator/sequence.hpp +++ b/boost/spirit/home/x3/operator/sequence.hpp @@ -4,8 +4,8 @@ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#if !defined(SPIRIT_SEQUENCE_JAN_06_2013_1015AM) -#define SPIRIT_SEQUENCE_JAN_06_2013_1015AM +#if !defined(BOOST_SPIRIT_X3_SEQUENCE_JAN_06_2013_1015AM) +#define BOOST_SPIRIT_X3_SEQUENCE_JAN_06_2013_1015AM #include #include -- cgit v1.2.3