-
From fa666b5328704f147dcc60be45f1bcdf3826bfcb Mon Sep 17 00:00:00 2001
From: Franz Detro <franz.detro@native-instruments.de>
Date: Tue, 4 Sep 2012 15:16:56 +0200
Subject: [PATCH] fix warnings in boost spirit
---
boost/spirit/home/phoenix/core/value.hpp | 4 +-
boost/spirit/home/phoenix/function/function.hpp | 2 +-
boost/spirit/home/phoenix/object/construct.hpp | 2 +-
boost/spirit/home/qi/action/action.hpp | 4 +-
boost/spirit/home/qi/auxiliary/attr.hpp | 4 +-
boost/spirit/home/qi/auxiliary/attr_cast.hpp | 12 ++---
boost/spirit/home/qi/auxiliary/eps.hpp | 4 +-
boost/spirit/home/qi/auxiliary/lazy.hpp | 14 +++---
boost/spirit/home/qi/binary/binary.hpp | 12 ++---
boost/spirit/home/qi/char/char.hpp | 8 +--
boost/spirit/home/qi/char/char_parser.hpp | 8 +--
.../spirit/home/qi/detail/alternative_function.hpp | 14 +++---
boost/spirit/home/qi/detail/expect_function.hpp | 12 ++---
boost/spirit/home/qi/detail/fail_function.hpp | 12 ++---
boost/spirit/home/qi/detail/pass_container.hpp | 4 +-
boost/spirit/home/qi/detail/pass_function.hpp | 12 ++---
boost/spirit/home/qi/detail/permute_function.hpp | 12 ++---
boost/spirit/home/qi/detail/unused_skipper.hpp | 4 +-
boost/spirit/home/qi/directive/as.hpp | 12 ++---
boost/spirit/home/qi/directive/hold.hpp | 10 ++--
boost/spirit/home/qi/directive/lexeme.hpp | 8 +--
boost/spirit/home/qi/directive/matches.hpp | 8 +--
boost/spirit/home/qi/directive/no_skip.hpp | 8 +--
boost/spirit/home/qi/directive/omit.hpp | 8 +--
boost/spirit/home/qi/directive/raw.hpp | 8 +--
boost/spirit/home/qi/directive/repeat.hpp | 28 +++++------
boost/spirit/home/qi/directive/skip.hpp | 16 +++---
boost/spirit/home/qi/nonterminal/debug_handler.hpp | 12 ++---
.../home/qi/nonterminal/detail/parameterized.hpp | 8 +--
.../home/qi/nonterminal/detail/parser_binder.hpp | 8 +--
boost/spirit/home/qi/nonterminal/error_handler.hpp | 6 +--
boost/spirit/home/qi/nonterminal/grammar.hpp | 8 +--
boost/spirit/home/qi/nonterminal/rule.hpp | 26 +++++-----
.../spirit/home/qi/nonterminal/success_handler.hpp | 6 +--
boost/spirit/home/qi/numeric/bool.hpp | 8 +--
boost/spirit/home/qi/numeric/bool_policies.hpp | 16 +++---
boost/spirit/home/qi/numeric/int.hpp | 8 +--
boost/spirit/home/qi/numeric/numeric_utils.hpp | 22 ++++----
boost/spirit/home/qi/numeric/real.hpp | 14 +++---
boost/spirit/home/qi/numeric/real_policies.hpp | 20 ++++----
boost/spirit/home/qi/numeric/uint.hpp | 8 +--
boost/spirit/home/qi/operator/alternative.hpp | 8 +--
boost/spirit/home/qi/operator/and_predicate.hpp | 4 +-
boost/spirit/home/qi/operator/difference.hpp | 8 +--
boost/spirit/home/qi/operator/expect.hpp | 4 +-
boost/spirit/home/qi/operator/kleene.hpp | 10 ++--
boost/spirit/home/qi/operator/list.hpp | 10 ++--
boost/spirit/home/qi/operator/not_predicate.hpp | 4 +-
boost/spirit/home/qi/operator/optional.hpp | 16 +++---
boost/spirit/home/qi/operator/permutation.hpp | 8 +--
boost/spirit/home/qi/operator/plus.hpp | 10 ++--
boost/spirit/home/qi/operator/sequence_base.hpp | 12 ++---
boost/spirit/home/qi/operator/sequential_or.hpp | 8 +--
boost/spirit/home/qi/parse_attr.hpp | 8 +--
boost/spirit/home/qi/reference.hpp | 4 +-
boost/spirit/home/qi/stream/stream.hpp | 4 +-
boost/spirit/home/qi/string/detail/tst.hpp | 4 +-
boost/spirit/home/qi/string/lit.hpp | 12 ++---
boost/spirit/home/qi/string/symbols.hpp | 12 ++---
boost/spirit/home/support/attributes.hpp | 6 +--
boost/spirit/home/support/char_set/range.hpp | 2 +-
boost/spirit/home/support/context.hpp | 4 +-
boost/spirit/home/support/detail/what_function.hpp | 4 +-
boost/spirit/home/support/info.hpp | 36 +++++++-------
.../spirit/home/support/nonterminal/expand_arg.hpp | 4 +-
boost/spirit/home/support/terminal.hpp | 58 +++++++++++-----------
66 files changed, 340 insertions(+), 340 deletions(-)
diff --git a/boost/spirit/home/phoenix/core/value.hpp b/boost/spirit/home/phoenix/core/value.hpp
index a275a7d..5cfd94a 100644
|
a
|
b
|
namespace boost { namespace phoenix
|
| 88 | 88 | type; |
| 89 | 89 | }; |
| 90 | 90 | |
| 91 | | actor_value(Actor const& actor) |
| 92 | | : actor(actor) {} |
| | 91 | actor_value(Actor const& actor_) |
| | 92 | : actor(actor_) {} |
| 93 | 93 | |
| 94 | 94 | template <typename Env> |
| 95 | 95 | typename result<Env>::type |
-
diff --git a/boost/spirit/home/phoenix/function/function.hpp b/boost/spirit/home/phoenix/function/function.hpp
index 1cf4701..e33d02d 100644
|
a
|
b
|
namespace boost { namespace phoenix
|
| 16 | 16 | struct function |
| 17 | 17 | { |
| 18 | 18 | function() : f() {} |
| 19 | | function(F const& f) : f(f) {} |
| | 19 | function(F const& f_) : f(f_) {} |
| 20 | 20 | |
| 21 | 21 | actor<typename as_composite<detail::function_eval<0>, F>::type> |
| 22 | 22 | operator()() const |
-
diff --git a/boost/spirit/home/phoenix/object/construct.hpp b/boost/spirit/home/phoenix/object/construct.hpp
index d26d6a4..ec743b5 100644
|
a
|
b
|
namespace boost { namespace phoenix
|
| 27 | 27 | |
| 28 | 28 | template <typename RT, typename Env> |
| 29 | 29 | static RT |
| 30 | | eval(Env const& env) |
| | 30 | eval(Env const& /*env*/) |
| 31 | 31 | { |
| 32 | 32 | return RT(); |
| 33 | 33 | } |
-
diff --git a/boost/spirit/home/qi/action/action.hpp b/boost/spirit/home/qi/action/action.hpp
index 746dd84..2bdf7d8 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 41 | 41 | : traits::attribute_of<Subject, Context, Iterator> |
| 42 | 42 | {}; |
| 43 | 43 | |
| 44 | | action(Subject const& subject, Action f) |
| 45 | | : subject(subject), f(f) {} |
| | 44 | action(Subject const& subject_, Action f_) |
| | 45 | : subject(subject_), f(f_) {} |
| 46 | 46 | |
| 47 | 47 | #ifndef BOOST_SPIRIT_ACTIONS_ALLOW_ATTR_COMPAT |
| 48 | 48 | template <typename Iterator, typename Context |
-
diff --git a/boost/spirit/home/qi/auxiliary/attr.hpp b/boost/spirit/home/qi/auxiliary/attr.hpp
index 2778a68..fb018e7 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 59 | 59 | , typename Skipper, typename Attribute> |
| 60 | 60 | bool parse(Iterator& /*first*/, Iterator const& /*last*/ |
| 61 | 61 | , Context& /*context*/, Skipper const& /*skipper*/ |
| 62 | | , Attribute& attr) const |
| | 62 | , Attribute& attr_) const |
| 63 | 63 | { |
| 64 | | spirit::traits::assign_to(value_, attr); |
| | 64 | spirit::traits::assign_to(value_, attr_); |
| 65 | 65 | return true; // never consume any input, succeed always |
| 66 | 66 | } |
| 67 | 67 | |
-
diff --git a/boost/spirit/home/qi/auxiliary/attr_cast.hpp b/boost/spirit/home/qi/auxiliary/attr_cast.hpp
index a8fc688..b53c64f 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 53 | 53 | , traits::attribute_of<subject_type> >::type |
| 54 | 54 | transformed_attribute_type; |
| 55 | 55 | |
| 56 | | attr_cast_parser(Subject const& subject) |
| 57 | | : subject(subject) |
| | 56 | attr_cast_parser(Subject const& subject_) |
| | 57 | : subject(subject_) |
| 58 | 58 | { |
| 59 | 59 | // If you got an error_invalid_expression error message here, |
| 60 | 60 | // then the expression (Subject) is not a valid spirit qi |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 75 | 75 | , typename Attribute> |
| 76 | 76 | bool parse(Iterator& first, Iterator const& last |
| 77 | 77 | , Context& context, Skipper const& skipper |
| 78 | | , Attribute& attr) const |
| | 78 | , Attribute& attr_param) const |
| 79 | 79 | { |
| 80 | 80 | // Find the real exposed attribute. If exposed is given, we use it |
| 81 | 81 | // otherwise we assume the exposed attribute type to be the actual |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 90 | 90 | exposed_attribute_type, transformed_attribute_type, domain> |
| 91 | 91 | transform; |
| 92 | 92 | |
| 93 | | typename transform::type attr_ = transform::pre(attr); |
| | 93 | typename transform::type attr_ = transform::pre(attr_param); |
| 94 | 94 | |
| 95 | 95 | if (!compile<qi::domain>(subject). |
| 96 | 96 | parse(first, last, context, skipper, attr_)) |
| 97 | 97 | { |
| 98 | | transform::fail(attr); |
| | 98 | transform::fail(attr_param); |
| 99 | 99 | return false; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | // do up-stream transformation, this mainly integrates the results |
| 103 | 103 | // back into the original attribute value, if appropriate |
| 104 | | traits::post_transform(attr, attr_); |
| | 104 | traits::post_transform(attr_param, attr_); |
| 105 | 105 | return true; |
| 106 | 106 | } |
| 107 | 107 | |
-
diff --git a/boost/spirit/home/qi/auxiliary/eps.hpp b/boost/spirit/home/qi/auxiliary/eps.hpp
index fe23935..4ba6aa4 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 80 | 80 | typedef unused_type type; |
| 81 | 81 | }; |
| 82 | 82 | |
| 83 | | semantic_predicate(bool predicate) |
| 84 | | : predicate(predicate) {} |
| | 83 | semantic_predicate(bool predicate_) |
| | 84 | : predicate(predicate_) {} |
| 85 | 85 | |
| 86 | 86 | template <typename Iterator, typename Context |
| 87 | 87 | , typename Skipper, typename Attribute> |
-
diff --git a/boost/spirit/home/qi/auxiliary/lazy.hpp b/boost/spirit/home/qi/auxiliary/lazy.hpp
index b935261..60b61d4 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 60 | 60 | bool lazy_parse_impl(Parser const& p |
| 61 | 61 | , Iterator& first, Iterator const& last |
| 62 | 62 | , Context& context, Skipper const& skipper |
| 63 | | , Attribute& attr, mpl::true_) |
| | 63 | , Attribute& /*attr*/, mpl::true_) |
| 64 | 64 | { |
| 65 | 65 | // If DeducedAuto is false (semantic actions is present), the |
| 66 | 66 | // component's attribute is unused. |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 111 | 111 | type; |
| 112 | 112 | }; |
| 113 | 113 | |
| 114 | | lazy_parser(Function const& function, Modifiers const& modifiers) |
| 115 | | : function(function), modifiers(modifiers) {} |
| | 114 | lazy_parser(Function const& function_, Modifiers const& modifiers_) |
| | 115 | : function(function_), modifiers(modifiers_) {} |
| 116 | 116 | |
| 117 | 117 | template <typename Iterator, typename Context |
| 118 | 118 | , typename Skipper, typename Attribute> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 183 | 183 | }; |
| 184 | 184 | |
| 185 | 185 | lazy_directive( |
| 186 | | Function const& function |
| 187 | | , Subject const& subject |
| 188 | | , Modifiers const& modifiers) |
| 189 | | : function(function), subject(subject), modifiers(modifiers) {} |
| | 186 | Function const& function_ |
| | 187 | , Subject const& subject_ |
| | 188 | , Modifiers const& modifiers_) |
| | 189 | : function(function_), subject(subject_), modifiers(modifiers_) {} |
| 190 | 190 | |
| 191 | 191 | template <typename Iterator, typename Context |
| 192 | 192 | , typename Skipper, typename Attribute> |
-
diff --git a/boost/spirit/home/qi/binary/binary.hpp b/boost/spirit/home/qi/binary/binary.hpp
index 7d47a6e..a4e83f0 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 241 | 241 | , typename Skipper, typename Attribute> |
| 242 | 242 | bool parse(Iterator& first, Iterator const& last |
| 243 | 243 | , Context& /*context*/, Skipper const& skipper |
| 244 | | , Attribute& attr) const |
| | 244 | , Attribute& attr_param) const |
| 245 | 245 | { |
| 246 | 246 | qi::skip_over(first, last, skipper); |
| 247 | 247 | |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | first = it; |
| 260 | | spirit::traits::assign_to(attr_, attr); |
| | 260 | spirit::traits::assign_to(attr_, attr_param); |
| 261 | 261 | return true; |
| 262 | 262 | } |
| 263 | 263 | |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 280 | 280 | typedef unused_type type; |
| 281 | 281 | }; |
| 282 | 282 | |
| 283 | | binary_lit_parser(V n) |
| 284 | | : n(n) {} |
| | 283 | binary_lit_parser(V n_) |
| | 284 | : n(n_) {} |
| 285 | 285 | |
| 286 | 286 | template <typename Iterator, typename Context |
| 287 | 287 | , typename Skipper, typename Attribute> |
| 288 | 288 | bool parse(Iterator& first, Iterator const& last |
| 289 | 289 | , Context& /*context*/, Skipper const& skipper |
| 290 | | , Attribute& attr) const |
| | 290 | , Attribute& attr_param) const |
| 291 | 291 | { |
| 292 | 292 | qi::skip_over(first, last, skipper); |
| 293 | 293 | |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | first = it; |
| 320 | | spirit::traits::assign_to(attr_, attr); |
| | 320 | spirit::traits::assign_to(attr_, attr_param); |
| 321 | 321 | return true; |
| 322 | 322 | } |
| 323 | 323 | |
-
diff --git a/boost/spirit/home/qi/char/char.hpp b/boost/spirit/home/qi/char/char.hpp
index 7269da4..8c22aaa 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 123 | 123 | typedef CharEncoding char_encoding; |
| 124 | 124 | |
| 125 | 125 | template <typename Char> |
| 126 | | literal_char(Char ch) |
| 127 | | : ch(static_cast<char_type>(ch)) {} |
| | 126 | literal_char(Char ch_) |
| | 127 | : ch(static_cast<char_type>(ch_)) {} |
| 128 | 128 | |
| 129 | 129 | template <typename Context, typename Iterator> |
| 130 | 130 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 201 | 201 | typedef typename CharEncoding::char_type char_type; |
| 202 | 202 | typedef CharEncoding char_encoding; |
| 203 | 203 | |
| 204 | | char_range(char_type from, char_type to) |
| 205 | | : from(from), to(to) {} |
| | 204 | char_range(char_type from_, char_type to_) |
| | 205 | : from(from_), to(to_) {} |
| 206 | 206 | |
| 207 | 207 | template <typename CharParam, typename Context> |
| 208 | 208 | bool test(CharParam ch_, Context&) const |
-
diff --git a/boost/spirit/home/qi/char/char_parser.hpp b/boost/spirit/home/qi/char/char_parser.hpp
index b896f73..1d06d7c 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 61 | 61 | |
| 62 | 62 | template <typename Iterator, typename Context, typename Skipper, typename Attribute> |
| 63 | 63 | bool parse(Iterator& first, Iterator const& last |
| 64 | | , Context& context, Skipper const& skipper, Attribute& attr) const |
| | 64 | , Context& context, Skipper const& skipper, Attribute& attr_) const |
| 65 | 65 | { |
| 66 | 66 | qi::skip_over(first, last, skipper); |
| 67 | 67 | |
| 68 | 68 | if (first != last && this->derived().test(*first, context)) |
| 69 | 69 | { |
| 70 | | spirit::traits::assign_to(*first, attr); |
| | 70 | spirit::traits::assign_to(*first, attr_); |
| 71 | 71 | ++first; |
| 72 | 72 | return true; |
| 73 | 73 | } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 87 | 87 | struct negated_char_parser : |
| 88 | 88 | char_parser<negated_char_parser<Positive>, typename Positive::char_type> |
| 89 | 89 | { |
| 90 | | negated_char_parser(Positive const& positive) |
| 91 | | : positive(positive) {} |
| | 90 | negated_char_parser(Positive const& positive_) |
| | 91 | : positive(positive_) {} |
| 92 | 92 | |
| 93 | 93 | template <typename CharParam, typename Context> |
| 94 | 94 | bool test(CharParam ch, Context& context) const |
-
diff --git a/boost/spirit/home/qi/detail/alternative_function.hpp b/boost/spirit/home/qi/detail/alternative_function.hpp
index aad0c54..e2223b8 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 56 | 56 | struct alternative_function |
| 57 | 57 | { |
| 58 | 58 | alternative_function( |
| 59 | | Iterator& first, Iterator const& last, Context& context, |
| 60 | | Skipper const& skipper, Attribute& attr) |
| 61 | | : first(first), last(last), context(context), skipper(skipper), |
| 62 | | attr(attr) |
| | 59 | Iterator& first_, Iterator const& last_, Context& context_, |
| | 60 | Skipper const& skipper_, Attribute& attr_) |
| | 61 | : first(first_), last(last_), context(context_), skipper(skipper_), |
| | 62 | attr(attr_) |
| 63 | 63 | { |
| 64 | 64 | } |
| 65 | 65 | |
| … |
… |
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 185 | 185 | struct alternative_function<Iterator, Context, Skipper, unused_type const> |
| 186 | 186 | { |
| 187 | 187 | alternative_function( |
| 188 | | Iterator& first, Iterator const& last, Context& context, |
| 189 | | Skipper const& skipper, unused_type) |
| 190 | | : first(first), last(last), context(context), skipper(skipper) |
| | 188 | Iterator& first_, Iterator const& last_, Context& context_, |
| | 189 | Skipper const& skipper_, unused_type) |
| | 190 | : first(first_), last(last_), context(context_), skipper(skipper_) |
| 191 | 191 | { |
| 192 | 192 | } |
| 193 | 193 | |
-
diff --git a/boost/spirit/home/qi/detail/expect_function.hpp b/boost/spirit/home/qi/detail/expect_function.hpp
index 34dd910..920e309 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 26 | 26 | typedef Context context_type; |
| 27 | 27 | |
| 28 | 28 | expect_function( |
| 29 | | Iterator& first, Iterator const& last |
| 30 | | , Context& context, Skipper const& skipper) |
| 31 | | : first(first) |
| 32 | | , last(last) |
| 33 | | , context(context) |
| 34 | | , skipper(skipper) |
| | 29 | Iterator& first_, Iterator const& last_ |
| | 30 | , Context& context_, Skipper const& skipper_) |
| | 31 | : first(first_) |
| | 32 | , last(last_) |
| | 33 | , context(context_) |
| | 34 | , skipper(skipper_) |
| 35 | 35 | , is_first(true) |
| 36 | 36 | { |
| 37 | 37 | } |
-
diff --git a/boost/spirit/home/qi/detail/fail_function.hpp b/boost/spirit/home/qi/detail/fail_function.hpp
index fca03b3..7ab8d82 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 22 | 22 | typedef Context context_type; |
| 23 | 23 | |
| 24 | 24 | fail_function( |
| 25 | | Iterator& first, Iterator const& last |
| 26 | | , Context& context, Skipper const& skipper) |
| 27 | | : first(first) |
| 28 | | , last(last) |
| 29 | | , context(context) |
| 30 | | , skipper(skipper) |
| | 25 | Iterator& first_, Iterator const& last_ |
| | 26 | , Context& context_, Skipper const& skipper_) |
| | 27 | : first(first_) |
| | 28 | , last(last_) |
| | 29 | , context(context_) |
| | 30 | , skipper(skipper_) |
| 31 | 31 | { |
| 32 | 32 | } |
| 33 | 33 | |
-
diff --git a/boost/spirit/home/qi/detail/pass_container.hpp b/boost/spirit/home/qi/detail/pass_container.hpp
index 82e153a..93dcde2 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 247 | 247 | typedef typename F::context_type context_type; |
| 248 | 248 | typedef typename F::iterator_type iterator_type; |
| 249 | 249 | |
| 250 | | pass_container(F const& f, Attr& attr) |
| 251 | | : f(f), attr(attr) {} |
| | 250 | pass_container(F const& f_, Attr& attr_) |
| | 251 | : f(f_), attr(attr_) {} |
| 252 | 252 | |
| 253 | 253 | // this is for the case when the current element exposes an attribute |
| 254 | 254 | // which is pushed back onto the container |
-
diff --git a/boost/spirit/home/qi/detail/pass_function.hpp b/boost/spirit/home/qi/detail/pass_function.hpp
index 2d9e6ba..555adb8 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 20 | 20 | struct pass_function |
| 21 | 21 | { |
| 22 | 22 | pass_function( |
| 23 | | Iterator& first, Iterator const& last |
| 24 | | , Context& context, Skipper const& skipper) |
| 25 | | : first(first) |
| 26 | | , last(last) |
| 27 | | , context(context) |
| 28 | | , skipper(skipper) |
| | 23 | Iterator& first_, Iterator const& last_ |
| | 24 | , Context& context_, Skipper const& skipper_) |
| | 25 | : first(first_) |
| | 26 | , last(last_) |
| | 27 | , context(context_) |
| | 28 | , skipper(skipper_) |
| 29 | 29 | { |
| 30 | 30 | } |
| 31 | 31 | |
-
diff --git a/boost/spirit/home/qi/detail/permute_function.hpp b/boost/spirit/home/qi/detail/permute_function.hpp
index 13c1b8c..8b1ed8a 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 20 | 20 | struct permute_function |
| 21 | 21 | { |
| 22 | 22 | permute_function( |
| 23 | | Iterator& first, Iterator const& last |
| 24 | | , Context& context, Skipper const& skipper) |
| 25 | | : first(first) |
| 26 | | , last(last) |
| 27 | | , context(context) |
| 28 | | , skipper(skipper) |
| | 23 | Iterator& first_, Iterator const& last_ |
| | 24 | , Context& context_, Skipper const& skipper_) |
| | 25 | : first(first_) |
| | 26 | , last(last_) |
| | 27 | , context(context_) |
| | 28 | , skipper(skipper_) |
| 29 | 29 | { |
| 30 | 30 | } |
| 31 | 31 | |
-
diff --git a/boost/spirit/home/qi/detail/unused_skipper.hpp b/boost/spirit/home/qi/detail/unused_skipper.hpp
index c1405d6..6fc7f8d 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 17 | 17 | template <typename Skipper> |
| 18 | 18 | struct unused_skipper : unused_type |
| 19 | 19 | { |
| 20 | | unused_skipper(Skipper const& skipper) |
| 21 | | : skipper(skipper) {} |
| | 20 | unused_skipper(Skipper const& skipper_) |
| | 21 | : skipper(skipper_) {} |
| 22 | 22 | Skipper const& skipper; |
| 23 | 23 | |
| 24 | 24 | private: |
-
diff --git a/boost/spirit/home/qi/directive/as.hpp b/boost/spirit/home/qi/directive/as.hpp
index 9ace587..e0376eb 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 76 | 76 | struct as_directive : unary_parser<as_directive<Subject, T> > |
| 77 | 77 | { |
| 78 | 78 | typedef Subject subject_type; |
| 79 | | as_directive(Subject const& subject) |
| 80 | | : subject(subject) {} |
| | 79 | as_directive(Subject const& subject_) |
| | 80 | : subject(subject_) {} |
| 81 | 81 | |
| 82 | 82 | template <typename Context, typename Iterator> |
| 83 | 83 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 88 | 88 | template <typename Iterator, typename Context |
| 89 | 89 | , typename Skipper, typename Attribute> |
| 90 | 90 | bool parse(Iterator& first, Iterator const& last |
| 91 | | , Context& context, Skipper const& skipper, Attribute& attr) const |
| | 91 | , Context& context, Skipper const& skipper, Attribute& attr_) const |
| 92 | 92 | { |
| 93 | 93 | Iterator i = first; |
| 94 | 94 | T as_attr; |
| 95 | 95 | if (subject.parse(i, last, context, skipper, as_attr)) |
| 96 | 96 | { |
| 97 | | spirit::traits::assign_to(as_attr, attr); |
| | 97 | spirit::traits::assign_to(as_attr, attr_); |
| 98 | 98 | first = i; |
| 99 | 99 | return true; |
| 100 | 100 | } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 103 | 103 | |
| 104 | 104 | template <typename Iterator, typename Context, typename Skipper> |
| 105 | 105 | bool parse(Iterator& first, Iterator const& last |
| 106 | | , Context& context, Skipper const& skipper, T& attr) const |
| | 106 | , Context& context, Skipper const& skipper, T& attr_) const |
| 107 | 107 | { |
| 108 | 108 | Iterator i = first; |
| 109 | | if (subject.parse(i, last, context, skipper, attr)) |
| | 109 | if (subject.parse(i, last, context, skipper, attr_)) |
| 110 | 110 | { |
| 111 | 111 | first = i; |
| 112 | 112 | return true; |
-
diff --git a/boost/spirit/home/qi/directive/hold.hpp b/boost/spirit/home/qi/directive/hold.hpp
index d5b2ed5..9cd905c 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 42 | 42 | struct hold_directive : unary_parser<hold_directive<Subject> > |
| 43 | 43 | { |
| 44 | 44 | typedef Subject subject_type; |
| 45 | | hold_directive(Subject const& subject) |
| 46 | | : subject(subject) {} |
| | 45 | hold_directive(Subject const& subject_) |
| | 46 | : subject(subject_) {} |
| 47 | 47 | |
| 48 | 48 | template <typename Context, typename Iterator> |
| 49 | 49 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 56 | 56 | template <typename Iterator, typename Context |
| 57 | 57 | , typename Skipper, typename Attribute> |
| 58 | 58 | bool parse(Iterator& first, Iterator const& last |
| 59 | | , Context& context, Skipper const& skipper, Attribute& attr) const |
| | 59 | , Context& context, Skipper const& skipper, Attribute& attr_) const |
| 60 | 60 | { |
| 61 | | Attribute copy(attr); |
| | 61 | Attribute copy(attr_); |
| 62 | 62 | if (subject.parse(first, last, context, skipper, copy)) |
| 63 | 63 | { |
| 64 | | traits::swap_impl(copy, attr); |
| | 64 | traits::swap_impl(copy, attr_); |
| 65 | 65 | return true; |
| 66 | 66 | } |
| 67 | 67 | return false; |
-
diff --git a/boost/spirit/home/qi/directive/lexeme.hpp b/boost/spirit/home/qi/directive/lexeme.hpp
index f0b8399..e39fc74 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 42 | 42 | struct lexeme_directive : unary_parser<lexeme_directive<Subject> > |
| 43 | 43 | { |
| 44 | 44 | typedef Subject subject_type; |
| 45 | | lexeme_directive(Subject const& subject) |
| 46 | | : subject(subject) {} |
| | 45 | lexeme_directive(Subject const& subject_) |
| | 46 | : subject(subject_) {} |
| 47 | 47 | |
| 48 | 48 | template <typename Context, typename Iterator> |
| 49 | 49 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 57 | 57 | , typename Skipper, typename Attribute> |
| 58 | 58 | bool parse(Iterator& first, Iterator const& last |
| 59 | 59 | , Context& context, Skipper const& skipper |
| 60 | | , Attribute& attr) const |
| | 60 | , Attribute& attr_) const |
| 61 | 61 | { |
| 62 | 62 | qi::skip_over(first, last, skipper); |
| 63 | 63 | return subject.parse(first, last, context |
| 64 | | , detail::unused_skipper<Skipper>(skipper), attr); |
| | 64 | , detail::unused_skipper<Skipper>(skipper), attr_); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/directive/matches.hpp b/boost/spirit/home/qi/directive/matches.hpp
index b534927..b6fecb9 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 44 | 44 | struct matches_directive : unary_parser<matches_directive<Subject> > |
| 45 | 45 | { |
| 46 | 46 | typedef Subject subject_type; |
| 47 | | matches_directive(Subject const& subject) |
| 48 | | : subject(subject) {} |
| | 47 | matches_directive(Subject const& subject_) |
| | 48 | : subject(subject_) {} |
| 49 | 49 | |
| 50 | 50 | template <typename Context, typename Iterator> |
| 51 | 51 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 56 | 56 | template <typename Iterator, typename Context |
| 57 | 57 | , typename Skipper, typename Attribute> |
| 58 | 58 | bool parse(Iterator& first, Iterator const& last |
| 59 | | , Context& context, Skipper const& skipper, Attribute& attr) const |
| | 59 | , Context& context, Skipper const& skipper, Attribute& attr_) const |
| 60 | 60 | { |
| 61 | 61 | bool result = subject.parse(first, last, context, skipper, unused); |
| 62 | | spirit::traits::assign_to(result, attr); |
| | 62 | spirit::traits::assign_to(result, attr_); |
| 63 | 63 | return true; |
| 64 | 64 | } |
| 65 | 65 | |
-
diff --git a/boost/spirit/home/qi/directive/no_skip.hpp b/boost/spirit/home/qi/directive/no_skip.hpp
index 9764d4a..eeeb33b 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 45 | 45 | struct no_skip_directive : unary_parser<no_skip_directive<Subject> > |
| 46 | 46 | { |
| 47 | 47 | typedef Subject subject_type; |
| 48 | | no_skip_directive(Subject const& subject) |
| 49 | | : subject(subject) {} |
| | 48 | no_skip_directive(Subject const& subject_) |
| | 49 | : subject(subject_) {} |
| 50 | 50 | |
| 51 | 51 | template <typename Context, typename Iterator> |
| 52 | 52 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 60 | 60 | , typename Skipper, typename Attribute> |
| 61 | 61 | bool parse(Iterator& first, Iterator const& last |
| 62 | 62 | , Context& context, Skipper const& skipper |
| 63 | | , Attribute& attr) const |
| | 63 | , Attribute& attr_) const |
| 64 | 64 | { |
| 65 | 65 | return subject.parse(first, last, context |
| 66 | | , detail::unused_skipper<Skipper>(skipper), attr); |
| | 66 | , detail::unused_skipper<Skipper>(skipper), attr_); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/directive/omit.hpp b/boost/spirit/home/qi/directive/omit.hpp
index b0ed86b..05a6a76 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 45 | 45 | struct omit_directive : unary_parser<omit_directive<Subject> > |
| 46 | 46 | { |
| 47 | 47 | typedef Subject subject_type; |
| 48 | | omit_directive(Subject const& subject) |
| 49 | | : subject(subject) {} |
| | 48 | omit_directive(Subject const& subject_) |
| | 49 | : subject(subject_) {} |
| 50 | 50 | |
| 51 | 51 | template <typename Context, typename Iterator> |
| 52 | 52 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 57 | 57 | template <typename Iterator, typename Context |
| 58 | 58 | , typename Skipper, typename Attribute> |
| 59 | 59 | bool parse(Iterator& first, Iterator const& last |
| 60 | | , Context& context, Skipper const& skipper, Attribute& attr) const |
| | 60 | , Context& context, Skipper const& skipper, Attribute& attr_) const |
| 61 | 61 | { |
| 62 | | return subject.parse(first, last, context, skipper, attr); |
| | 62 | return subject.parse(first, last, context, skipper, attr_); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/directive/raw.hpp b/boost/spirit/home/qi/directive/raw.hpp
index b88458e..e1d208e 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 44 | 44 | struct raw_directive : unary_parser<raw_directive<Subject> > |
| 45 | 45 | { |
| 46 | 46 | typedef Subject subject_type; |
| 47 | | raw_directive(Subject const& subject) |
| 48 | | : subject(subject) {} |
| | 47 | raw_directive(Subject const& subject_) |
| | 48 | : subject(subject_) {} |
| 49 | 49 | |
| 50 | 50 | template <typename Context, typename Iterator> |
| 51 | 51 | struct attribute |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 56 | 56 | template <typename Iterator, typename Context |
| 57 | 57 | , typename Skipper, typename Attribute> |
| 58 | 58 | bool parse(Iterator& first, Iterator const& last |
| 59 | | , Context& context, Skipper const& skipper, Attribute& attr) const |
| | 59 | , Context& context, Skipper const& skipper, Attribute& attr_) const |
| 60 | 60 | { |
| 61 | 61 | qi::skip_over(first, last, skipper); |
| 62 | 62 | Iterator i = first; |
| 63 | 63 | if (subject.parse(i, last, context, skipper, unused)) |
| 64 | 64 | { |
| 65 | | spirit::traits::assign_to(first, i, attr); |
| | 65 | spirit::traits::assign_to(first, i, attr_); |
| 66 | 66 | first = i; |
| 67 | 67 | return true; |
| 68 | 68 | } |
-
diff --git a/boost/spirit/home/qi/directive/repeat.hpp b/boost/spirit/home/qi/directive/repeat.hpp
index 252e18f..72c3a99 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 81 | 81 | template <typename T> |
| 82 | 82 | struct exact_iterator // handles repeat(exact)[p] |
| 83 | 83 | { |
| 84 | | exact_iterator(T const exact) |
| 85 | | : exact(exact) {} |
| | 84 | exact_iterator(T const exact_) |
| | 85 | : exact(exact_) {} |
| 86 | 86 | |
| 87 | 87 | typedef T type; |
| 88 | 88 | T start() const { return 0; } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 99 | 99 | template <typename T> |
| 100 | 100 | struct finite_iterator // handles repeat(min, max)[p] |
| 101 | 101 | { |
| 102 | | finite_iterator(T const min, T const max) |
| 103 | | : min BOOST_PREVENT_MACRO_SUBSTITUTION (min) |
| 104 | | , max BOOST_PREVENT_MACRO_SUBSTITUTION (max) {} |
| | 102 | finite_iterator(T const min_, T const max_) |
| | 103 | : min BOOST_PREVENT_MACRO_SUBSTITUTION (min_) |
| | 104 | , max BOOST_PREVENT_MACRO_SUBSTITUTION (max_) {} |
| 105 | 105 | |
| 106 | 106 | typedef T type; |
| 107 | 107 | T start() const { return 0; } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 119 | 119 | template <typename T> |
| 120 | 120 | struct infinite_iterator // handles repeat(min, inf)[p] |
| 121 | 121 | { |
| 122 | | infinite_iterator(T const min) |
| 123 | | : min BOOST_PREVENT_MACRO_SUBSTITUTION (min) {} |
| | 122 | infinite_iterator(T const min_) |
| | 123 | : min BOOST_PREVENT_MACRO_SUBSTITUTION (min_) {} |
| 124 | 124 | |
| 125 | 125 | typedef T type; |
| 126 | 126 | T start() const { return 0; } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 153 | 153 | type; |
| 154 | 154 | }; |
| 155 | 155 | |
| 156 | | repeat_parser(Subject const& subject, LoopIter const& iter) |
| 157 | | : subject(subject), iter(iter) {} |
| | 156 | repeat_parser(Subject const& subject_, LoopIter const& iter_) |
| | 157 | : subject(subject_), iter(iter_) {} |
| 158 | 158 | |
| 159 | 159 | template <typename F> |
| 160 | 160 | bool parse_container(F f) const |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 183 | 183 | , typename Skipper, typename Attribute> |
| 184 | 184 | bool parse(Iterator& first, Iterator const& last |
| 185 | 185 | , Context& context, Skipper const& skipper |
| 186 | | , Attribute& attr) const |
| | 186 | , Attribute& attr_) const |
| 187 | 187 | { |
| 188 | 188 | typedef detail::fail_function<Iterator, Context, Skipper> |
| 189 | 189 | fail_function; |
| 190 | 190 | |
| 191 | 191 | // ensure the attribute is actually a container type |
| 192 | | traits::make_container(attr); |
| | 192 | traits::make_container(attr_); |
| 193 | 193 | |
| 194 | | Iterator iter = first; |
| 195 | | fail_function f(iter, last, context, skipper); |
| 196 | | if (!parse_container(detail::make_pass_container(f, attr))) |
| | 194 | Iterator iter_local = first; |
| | 195 | fail_function f(iter_local, last, context, skipper); |
| | 196 | if (!parse_container(detail::make_pass_container(f, attr_))) |
| 197 | 197 | return false; |
| 198 | 198 | |
| 199 | 199 | first = f.first; |
-
diff --git a/boost/spirit/home/qi/directive/skip.hpp b/boost/spirit/home/qi/directive/skip.hpp
index 28539da..ecf1df2 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 70 | 70 | type; |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | | reskip_parser(Subject const& subject) |
| 74 | | : subject(subject) {} |
| | 73 | reskip_parser(Subject const& subject_) |
| | 74 | : subject(subject_) {} |
| 75 | 75 | |
| 76 | 76 | template <typename Iterator, typename Context |
| 77 | 77 | , typename Skipper, typename Attribute> |
| 78 | 78 | bool parse(Iterator& first, Iterator const& last |
| 79 | 79 | , Context& context, Skipper const& u // --> The skipper is reintroduced |
| 80 | | , Attribute& attr) const |
| | 80 | , Attribute& attr_) const |
| 81 | 81 | { |
| 82 | 82 | return subject.parse(first, last, context |
| 83 | | , detail::get_skipper(u), attr); |
| | 83 | , detail::get_skipper(u), attr_); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | template <typename Context> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 106 | 106 | type; |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | | skip_parser(Subject const& subject, Skipper const& skipper) |
| 110 | | : subject(subject), skipper(skipper) {} |
| | 109 | skip_parser(Subject const& subject_, Skipper const& skipper_) |
| | 110 | : subject(subject_), skipper(skipper_) {} |
| 111 | 111 | |
| 112 | 112 | template <typename Iterator, typename Context |
| 113 | 113 | , typename Skipper_, typename Attribute> |
| 114 | 114 | bool parse(Iterator& first, Iterator const& last |
| 115 | 115 | , Context& context, Skipper_ const& //skipper --> bypass the supplied skipper |
| 116 | | , Attribute& attr) const |
| | 116 | , Attribute& attr_) const |
| 117 | 117 | { |
| 118 | | return subject.parse(first, last, context, skipper, attr); |
| | 118 | return subject.parse(first, last, context, skipper, attr_); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/nonterminal/debug_handler.hpp b/boost/spirit/home/qi/nonterminal/debug_handler.hpp
index 3328732..6a9f536 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 36 | 36 | function_type; |
| 37 | 37 | |
| 38 | 38 | debug_handler( |
| 39 | | function_type subject |
| 40 | | , F f |
| 41 | | , std::string const& rule_name) |
| 42 | | : subject(subject) |
| 43 | | , f(f) |
| 44 | | , rule_name(rule_name) |
| | 39 | function_type subject_ |
| | 40 | , F f_ |
| | 41 | , std::string const& rule_name_) |
| | 42 | : subject(subject_) |
| | 43 | , f(f_) |
| | 44 | , rule_name(rule_name_) |
| 45 | 45 | { |
| 46 | 46 | } |
| 47 | 47 | |
-
diff --git a/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp b/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp
index 0300a06..825fa40 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 27 | 27 | struct parameterized_nonterminal |
| 28 | 28 | : parser<parameterized_nonterminal<Subject, Params> > |
| 29 | 29 | { |
| 30 | | parameterized_nonterminal(Subject const& subject, Params const& params) |
| 31 | | : ref(subject), params(params) |
| | 30 | parameterized_nonterminal(Subject const& subject, Params const& params_) |
| | 31 | : ref(subject), params(params_) |
| 32 | 32 | { |
| 33 | 33 | } |
| 34 | 34 | |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 41 | 41 | , typename Skipper, typename Attribute> |
| 42 | 42 | bool parse(Iterator& first, Iterator const& last |
| 43 | 43 | , Context& context, Skipper const& skipper |
| 44 | | , Attribute& attr) const |
| | 44 | , Attribute& attr_) const |
| 45 | 45 | { |
| 46 | 46 | // Forward to subject, passing the additional |
| 47 | 47 | // params argument to parse. |
| 48 | | return ref.get().parse(first, last, context, skipper, attr, params); |
| | 48 | return ref.get().parse(first, last, context, skipper, attr_, params); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp b/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp
index 91bceba..87d8e84 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 21 | 21 | template <typename Parser, typename Auto> |
| 22 | 22 | struct parser_binder |
| 23 | 23 | { |
| 24 | | parser_binder(Parser const& p) |
| 25 | | : p(p) {} |
| | 24 | parser_binder(Parser const& p_) |
| | 25 | : p(p_) {} |
| 26 | 26 | |
| 27 | 27 | template <typename Iterator, typename Skipper, typename Context> |
| 28 | 28 | bool call(Iterator& first, Iterator const& last |
| … |
… |
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 60 | 60 | template <typename Parser> |
| 61 | 61 | struct parser_binder<Parser, mpl::true_> |
| 62 | 62 | { |
| 63 | | parser_binder(Parser const& p) |
| 64 | | : p(p) {} |
| | 63 | parser_binder(Parser const& p_) |
| | 64 | : p(p_) {} |
| 65 | 65 | |
| 66 | 66 | template <typename Iterator, typename Skipper, typename Context> |
| 67 | 67 | bool operator()( |
-
diff --git a/boost/spirit/home/qi/nonterminal/error_handler.hpp b/boost/spirit/home/qi/nonterminal/error_handler.hpp
index 6dd4f08..e8c4f87 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 76 | 76 | )> |
| 77 | 77 | function_type; |
| 78 | 78 | |
| 79 | | error_handler(function_type subject, F f) |
| 80 | | : subject(subject) |
| 81 | | , f(f) |
| | 79 | error_handler(function_type subject_, F f_) |
| | 80 | : subject(subject_) |
| | 81 | , f(f_) |
| 82 | 82 | { |
| 83 | 83 | } |
| 84 | 84 | |
-
diff --git a/boost/spirit/home/qi/nonterminal/grammar.hpp b/boost/spirit/home/qi/nonterminal/grammar.hpp
index 982e49b..d41590c 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 56 | 56 | |
| 57 | 57 | grammar( |
| 58 | 58 | start_type const& start |
| 59 | | , std::string const& name_ = "unnamed-grammar") |
| | 59 | , std::string const& name = "unnamed-grammar") |
| 60 | 60 | : proto::extends<terminal, base_type>(terminal::make(reference_(start))) |
| 61 | | , name_(name_) |
| | 61 | , name_(name) |
| 62 | 62 | {} |
| 63 | 63 | |
| 64 | 64 | // This constructor is used to catch if the start rule is not |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 90 | 90 | template <typename Context, typename Skipper, typename Attribute> |
| 91 | 91 | bool parse(Iterator& first, Iterator const& last |
| 92 | 92 | , Context& context, Skipper const& skipper |
| 93 | | , Attribute& attr) const |
| | 93 | , Attribute& attr_) const |
| 94 | 94 | { |
| 95 | 95 | return this->proto_base().child0.parse( |
| 96 | | first, last, context, skipper, attr); |
| | 96 | first, last, context, skipper, attr_); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/nonterminal/rule.hpp b/boost/spirit/home/qi/nonterminal/rule.hpp
index 23d2559..8941c23 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 154 | 154 | >::type |
| 155 | 155 | encoding_modifier_type; |
| 156 | 156 | |
| 157 | | explicit rule(std::string const& name_ = "unnamed-rule") |
| | 157 | explicit rule(std::string const& name = "unnamed-rule") |
| 158 | 158 | : base_type(terminal::make(reference_(*this))) |
| 159 | | , name_(name_) |
| | 159 | , name_(name) |
| 160 | 160 | { |
| 161 | 161 | } |
| 162 | 162 | |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | template <typename Auto, typename Expr> |
| 171 | | static void define(rule& lhs, Expr const& expr, mpl::false_) |
| | 171 | static void define(rule& /*lhs*/, Expr const& /*expr*/, mpl::false_) |
| 172 | 172 | { |
| 173 | 173 | // Report invalid expression error as early as possible. |
| 174 | 174 | // If you got an error_invalid_expression error message here, |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | template <typename Expr> |
| 187 | | rule(Expr const& expr, std::string const& name_ = "unnamed-rule") |
| | 187 | rule(Expr const& expr, std::string const& name = "unnamed-rule") |
| 188 | 188 | : base_type(terminal::make(reference_(*this))) |
| 189 | | , name_(name_) |
| | 189 | , name_(name) |
| 190 | 190 | { |
| 191 | 191 | define<mpl::false_>(*this, expr, traits::matches<qi::domain, Expr>()); |
| 192 | 192 | } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 272 | 272 | template <typename Context, typename Skipper, typename Attribute> |
| 273 | 273 | bool parse(Iterator& first, Iterator const& last |
| 274 | 274 | , Context& /*context*/, Skipper const& skipper |
| 275 | | , Attribute& attr) const |
| | 275 | , Attribute& attr_param) const |
| 276 | 276 | { |
| 277 | 277 | if (f) |
| 278 | 278 | { |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 288 | 288 | typename make_attribute::type, attr_type, domain> |
| 289 | 289 | transform; |
| 290 | 290 | |
| 291 | | typename make_attribute::type made_attr = make_attribute::call(attr); |
| | 291 | typename make_attribute::type made_attr = make_attribute::call(attr_param); |
| 292 | 292 | typename transform::type attr_ = transform::pre(made_attr); |
| 293 | 293 | |
| 294 | 294 | // If you are seeing a compilation error here, you are probably |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 304 | 304 | { |
| 305 | 305 | // do up-stream transformation, this integrates the results |
| 306 | 306 | // back into the original attribute value, if appropriate |
| 307 | | traits::post_transform(attr, attr_); |
| | 307 | traits::post_transform(attr_param, attr_); |
| 308 | 308 | return true; |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | // inform attribute transformation of failed rhs |
| 312 | | traits::fail_transform(attr, attr_); |
| | 312 | traits::fail_transform(attr_param, attr_); |
| 313 | 313 | } |
| 314 | 314 | return false; |
| 315 | 315 | } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 318 | 318 | , typename Attribute, typename Params> |
| 319 | 319 | bool parse(Iterator& first, Iterator const& last |
| 320 | 320 | , Context& caller_context, Skipper const& skipper |
| 321 | | , Attribute& attr, Params const& params) const |
| | 321 | , Attribute& attr_param, Params const& params) const |
| 322 | 322 | { |
| 323 | 323 | if (f) |
| 324 | 324 | { |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 334 | 334 | typename make_attribute::type, attr_type, domain> |
| 335 | 335 | transform; |
| 336 | 336 | |
| 337 | | typename make_attribute::type made_attr = make_attribute::call(attr); |
| | 337 | typename make_attribute::type made_attr = make_attribute::call(attr_param); |
| 338 | 338 | typename transform::type attr_ = transform::pre(made_attr); |
| 339 | 339 | |
| 340 | 340 | // If you are seeing a compilation error here, you are probably |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 350 | 350 | { |
| 351 | 351 | // do up-stream transformation, this integrates the results |
| 352 | 352 | // back into the original attribute value, if appropriate |
| 353 | | traits::post_transform(attr, attr_); |
| | 353 | traits::post_transform(attr_param, attr_); |
| 354 | 354 | return true; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | // inform attribute transformation of failed rhs |
| 358 | | traits::fail_transform(attr, attr_); |
| | 358 | traits::fail_transform(attr_param, attr_); |
| 359 | 359 | } |
| 360 | 360 | return false; |
| 361 | 361 | } |
-
diff --git a/boost/spirit/home/qi/nonterminal/success_handler.hpp b/boost/spirit/home/qi/nonterminal/success_handler.hpp
index 3b3133c..5db83a2 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 29 | 29 | )> |
| 30 | 30 | function_type; |
| 31 | 31 | |
| 32 | | success_handler(function_type subject, F f) |
| 33 | | : subject(subject) |
| 34 | | , f(f) |
| | 32 | success_handler(function_type subject_, F f_) |
| | 33 | : subject(subject_) |
| | 34 | , f(f_) |
| 35 | 35 | { |
| 36 | 36 | } |
| 37 | 37 | |
-
diff --git a/boost/spirit/home/qi/numeric/bool.hpp b/boost/spirit/home/qi/numeric/bool.hpp
index 4041fc3..74e1343 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 153 | 153 | , typename Skipper, typename Attribute> |
| 154 | 154 | bool parse(Iterator& first, Iterator const& last |
| 155 | 155 | , Context& /*context*/, Skipper const& skipper |
| 156 | | , Attribute& attr) const |
| | 156 | , Attribute& attr_) const |
| 157 | 157 | { |
| 158 | 158 | typedef detail::bool_impl<T, BoolPolicies> extract; |
| 159 | 159 | qi::skip_over(first, last, skipper); |
| 160 | | return extract::parse(first, last, attr, BoolPolicies()); |
| | 160 | return extract::parse(first, last, attr_, BoolPolicies()); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | template <typename Context> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 184 | 184 | , typename Skipper, typename Attribute> |
| 185 | 185 | bool parse(Iterator& first, Iterator const& last |
| 186 | 186 | , Context& /*context*/, Skipper const& skipper |
| 187 | | , Attribute& attr) const |
| | 187 | , Attribute& attr_) const |
| 188 | 188 | { |
| 189 | 189 | typedef detail::bool_impl<T, BoolPolicies> extract; |
| 190 | 190 | qi::skip_over(first, last, skipper); |
| 191 | | return extract::parse(first, last, attr, BoolPolicies(), n_, n_); |
| | 191 | return extract::parse(first, last, attr_, BoolPolicies(), n_, n_); |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/numeric/bool_policies.hpp b/boost/spirit/home/qi/numeric/bool_policies.hpp
index 1e7c6e5..62641a6 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 24 | 24 | { |
| 25 | 25 | template <typename Iterator, typename Attribute> |
| 26 | 26 | static bool |
| 27 | | parse_true(Iterator& first, Iterator const& last, Attribute& attr) |
| | 27 | parse_true(Iterator& first, Iterator const& last, Attribute& attr_) |
| 28 | 28 | { |
| 29 | 29 | if (detail::string_parse("true", first, last, unused)) |
| 30 | 30 | { |
| 31 | | spirit::traits::assign_to(T(true), attr); // result is true |
| | 31 | spirit::traits::assign_to(T(true), attr_); // result is true |
| 32 | 32 | return true; |
| 33 | 33 | } |
| 34 | 34 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 36 | 36 | |
| 37 | 37 | template <typename Iterator, typename Attribute> |
| 38 | 38 | static bool |
| 39 | | parse_false(Iterator& first, Iterator const& last, Attribute& attr) |
| | 39 | parse_false(Iterator& first, Iterator const& last, Attribute& attr_) |
| 40 | 40 | { |
| 41 | 41 | if (detail::string_parse("false", first, last, unused)) |
| 42 | 42 | { |
| 43 | | spirit::traits::assign_to(T(false), attr); // result is false |
| | 43 | spirit::traits::assign_to(T(false), attr_); // result is false |
| 44 | 44 | return true; |
| 45 | 45 | } |
| 46 | 46 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 53 | 53 | { |
| 54 | 54 | template <typename Iterator, typename Attribute> |
| 55 | 55 | static bool |
| 56 | | parse_true(Iterator& first, Iterator const& last, Attribute& attr) |
| | 56 | parse_true(Iterator& first, Iterator const& last, Attribute& attr_) |
| 57 | 57 | { |
| 58 | 58 | if (detail::string_parse("true", "TRUE", first, last, unused)) |
| 59 | 59 | { |
| 60 | | spirit::traits::assign_to(T(true), attr); // result is true |
| | 60 | spirit::traits::assign_to(T(true), attr_); // result is true |
| 61 | 61 | return true; |
| 62 | 62 | } |
| 63 | 63 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 65 | 65 | |
| 66 | 66 | template <typename Iterator, typename Attribute> |
| 67 | 67 | static bool |
| 68 | | parse_false(Iterator& first, Iterator const& last, Attribute& attr) |
| | 68 | parse_false(Iterator& first, Iterator const& last, Attribute& attr_) |
| 69 | 69 | { |
| 70 | 70 | if (detail::string_parse("false", "FALSE", first, last, unused)) |
| 71 | 71 | { |
| 72 | | spirit::traits::assign_to(T(false), attr); // result is false |
| | 72 | spirit::traits::assign_to(T(false), attr_); // result is false |
| 73 | 73 | return true; |
| 74 | 74 | } |
| 75 | 75 | return false; |
-
diff --git a/boost/spirit/home/qi/numeric/int.hpp b/boost/spirit/home/qi/numeric/int.hpp
index a30bb3f..2da9817 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 198 | 198 | , typename Skipper, typename Attribute> |
| 199 | 199 | bool parse(Iterator& first, Iterator const& last |
| 200 | 200 | , Context& /*context*/, Skipper const& skipper |
| 201 | | , Attribute& attr) const |
| | 201 | , Attribute& attr_) const |
| 202 | 202 | { |
| 203 | 203 | typedef extract_int<T, Radix, MinDigits, MaxDigits> extract; |
| 204 | 204 | qi::skip_over(first, last, skipper); |
| 205 | | return extract::call(first, last, attr); |
| | 205 | return extract::call(first, last, attr_); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | template <typename Context> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 236 | 236 | , typename Skipper, typename Attribute> |
| 237 | 237 | bool parse(Iterator& first, Iterator const& last |
| 238 | 238 | , Context& /*context*/, Skipper const& skipper |
| 239 | | , Attribute& attr) const |
| | 239 | , Attribute& attr_param) const |
| 240 | 240 | { |
| 241 | 241 | typedef extract_int<T, Radix, MinDigits, MaxDigits> extract; |
| 242 | 242 | qi::skip_over(first, last, skipper); |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 246 | 246 | |
| 247 | 247 | if (extract::call(first, last, attr_) && (attr_ == n_)) |
| 248 | 248 | { |
| 249 | | traits::assign_to(attr_, attr); |
| | 249 | traits::assign_to(attr_, attr_param); |
| 250 | 250 | return true; |
| 251 | 251 | } |
| 252 | 252 | |
-
diff --git a/boost/spirit/home/qi/numeric/numeric_utils.hpp b/boost/spirit/home/qi/numeric/numeric_utils.hpp
index 72a54d8..eebf40a 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 53 | 53 | not_supported_radix, ()); |
| 54 | 54 | |
| 55 | 55 | template <typename Iterator> |
| 56 | | inline static bool call(Iterator& first, Iterator const& last, T& attr) |
| | 56 | inline static bool call(Iterator& first, Iterator const& last, T& attr_) |
| 57 | 57 | { |
| 58 | 58 | if (first == last) |
| 59 | 59 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 69 | 69 | |
| 70 | 70 | Iterator save = first; |
| 71 | 71 | if (!extract_type::parse(first, last, |
| 72 | | detail::cast_unsigned<T>::call(attr))) |
| | 72 | detail::cast_unsigned<T>::call(attr_))) |
| 73 | 73 | { |
| 74 | 74 | first = save; |
| 75 | 75 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 81 | 81 | inline static bool call(Iterator& first, Iterator const& last, Attribute& attr_) |
| 82 | 82 | { |
| 83 | 83 | // this case is called when Attribute is not T |
| 84 | | T attr; |
| 85 | | if (call(first, last, attr)) |
| | 84 | T attr_local; |
| | 85 | if (call(first, last, attr_local)) |
| 86 | 86 | { |
| 87 | | traits::assign_to(attr, attr_); |
| | 87 | traits::assign_to(attr_local, attr_); |
| 88 | 88 | return true; |
| 89 | 89 | } |
| 90 | 90 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 103 | 103 | not_supported_radix, ()); |
| 104 | 104 | |
| 105 | 105 | template <typename Iterator> |
| 106 | | inline static bool call(Iterator& first, Iterator const& last, T& attr) |
| | 106 | inline static bool call(Iterator& first, Iterator const& last, T& attr_) |
| 107 | 107 | { |
| 108 | 108 | if (first == last) |
| 109 | 109 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 119 | 119 | Iterator save = first; |
| 120 | 120 | bool hit = extract_sign(first, last); |
| 121 | 121 | if (hit) |
| 122 | | hit = extract_neg_type::parse(first, last, attr); |
| | 122 | hit = extract_neg_type::parse(first, last, attr_); |
| 123 | 123 | else |
| 124 | | hit = extract_pos_type::parse(first, last, attr); |
| | 124 | hit = extract_pos_type::parse(first, last, attr_); |
| 125 | 125 | |
| 126 | 126 | if (!hit) |
| 127 | 127 | { |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 135 | 135 | inline static bool call(Iterator& first, Iterator const& last, Attribute& attr_) |
| 136 | 136 | { |
| 137 | 137 | // this case is called when Attribute is not T |
| 138 | | T attr; |
| 139 | | if (call(first, last, attr)) |
| | 138 | T attr_local; |
| | 139 | if (call(first, last, attr_local)) |
| 140 | 140 | { |
| 141 | | traits::assign_to(attr, attr_); |
| | 141 | traits::assign_to(attr_local, attr_); |
| 142 | 142 | return true; |
| 143 | 143 | } |
| 144 | 144 | return false; |
-
diff --git a/boost/spirit/home/qi/numeric/real.hpp b/boost/spirit/home/qi/numeric/real.hpp
index 325acd5..5c78421 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 161 | 161 | template <typename Iterator, typename Context, typename Skipper> |
| 162 | 162 | bool parse(Iterator& first, Iterator const& last |
| 163 | 163 | , Context& /*context*/, Skipper const& skipper |
| 164 | | , T& attr) const |
| | 164 | , T& attr_) const |
| 165 | 165 | { |
| 166 | 166 | typedef detail::real_impl<T, RealPolicies> extract; |
| 167 | 167 | qi::skip_over(first, last, skipper); |
| 168 | | return extract::parse(first, last, attr, RealPolicies()); |
| | 168 | return extract::parse(first, last, attr_, RealPolicies()); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | template <typename Iterator, typename Context |
| 172 | 172 | , typename Skipper, typename Attribute> |
| 173 | 173 | bool parse(Iterator& first, Iterator const& last |
| 174 | 174 | , Context& context, Skipper const& skipper |
| 175 | | , Attribute& attr) const |
| | 175 | , Attribute& attr_param) const |
| 176 | 176 | { |
| 177 | 177 | // this case is called when Attribute is not T |
| 178 | 178 | T attr_; |
| 179 | 179 | if (parse(first, last, context, skipper, attr_)) |
| 180 | 180 | { |
| 181 | | traits::assign_to(attr_, attr); |
| | 181 | traits::assign_to(attr_, attr_param); |
| 182 | 182 | return true; |
| 183 | 183 | } |
| 184 | 184 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 207 | 207 | template <typename Iterator, typename Context |
| 208 | 208 | , typename Skipper, typename Attribute> |
| 209 | 209 | bool parse(Iterator& first, Iterator const& last |
| 210 | | , Context& context, Skipper const& skipper |
| 211 | | , Attribute& attr) const |
| | 210 | , Context& /*context*/, Skipper const& skipper |
| | 211 | , Attribute& attr_param) const |
| 212 | 212 | { |
| 213 | 213 | typedef detail::real_impl<T, RealPolicies> extract; |
| 214 | 214 | qi::skip_over(first, last, skipper); |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 219 | 219 | if (extract::parse(first, last, attr_, RealPolicies()) && |
| 220 | 220 | (attr_ == n_)) |
| 221 | 221 | { |
| 222 | | traits::assign_to(attr_, attr); |
| | 222 | traits::assign_to(attr_, attr_param); |
| 223 | 223 | return true; |
| 224 | 224 | } |
| 225 | 225 | |
-
diff --git a/boost/spirit/home/qi/numeric/real_policies.hpp b/boost/spirit/home/qi/numeric/real_policies.hpp
index 6512d6f..1315888 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 37 | 37 | |
| 38 | 38 | template <typename Iterator, typename Attribute> |
| 39 | 39 | static bool |
| 40 | | parse_n(Iterator& first, Iterator const& last, Attribute& attr) |
| | 40 | parse_n(Iterator& first, Iterator const& last, Attribute& attr_) |
| 41 | 41 | { |
| 42 | | return extract_uint<T, 10, 1, -1>::call(first, last, attr); |
| | 42 | return extract_uint<T, 10, 1, -1>::call(first, last, attr_); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | template <typename Iterator> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 54 | 54 | |
| 55 | 55 | template <typename Iterator, typename Attribute> |
| 56 | 56 | static bool |
| 57 | | parse_frac_n(Iterator& first, Iterator const& last, Attribute& attr) |
| | 57 | parse_frac_n(Iterator& first, Iterator const& last, Attribute& attr_) |
| 58 | 58 | { |
| 59 | | return extract_uint<T, 10, 1, -1, true>::call(first, last, attr); |
| | 59 | return extract_uint<T, 10, 1, -1, true>::call(first, last, attr_); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | template <typename Iterator> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 71 | 71 | |
| 72 | 72 | template <typename Iterator> |
| 73 | 73 | static bool |
| 74 | | parse_exp_n(Iterator& first, Iterator const& last, int& attr) |
| | 74 | parse_exp_n(Iterator& first, Iterator const& last, int& attr_) |
| 75 | 75 | { |
| 76 | | return extract_int<int, 10, 1, -1>::call(first, last, attr); |
| | 76 | return extract_int<int, 10, 1, -1>::call(first, last, attr_); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /////////////////////////////////////////////////////////////////////// |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 105 | 105 | /////////////////////////////////////////////////////////////////////// |
| 106 | 106 | template <typename Iterator, typename Attribute> |
| 107 | 107 | static bool |
| 108 | | parse_nan(Iterator& first, Iterator const& last, Attribute& attr) |
| | 108 | parse_nan(Iterator& first, Iterator const& last, Attribute& attr_) |
| 109 | 109 | { |
| 110 | 110 | if (first == last) |
| 111 | 111 | return false; // end of input reached |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 128 | 128 | |
| 129 | 129 | first = ++i; |
| 130 | 130 | } |
| 131 | | attr = std::numeric_limits<T>::quiet_NaN(); |
| | 131 | attr_ = std::numeric_limits<T>::quiet_NaN(); |
| 132 | 132 | return true; |
| 133 | 133 | } |
| 134 | 134 | return false; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 136 | 136 | |
| 137 | 137 | template <typename Iterator, typename Attribute> |
| 138 | 138 | static bool |
| 139 | | parse_inf(Iterator& first, Iterator const& last, Attribute& attr) |
| | 139 | parse_inf(Iterator& first, Iterator const& last, Attribute& attr_) |
| 140 | 140 | { |
| 141 | 141 | if (first == last) |
| 142 | 142 | return false; // end of input reached |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 149 | 149 | { |
| 150 | 150 | // skip allowed 'inity' part of infinity |
| 151 | 151 | detail::string_parse("inity", "INITY", first, last, unused); |
| 152 | | attr = std::numeric_limits<T>::infinity(); |
| | 152 | attr_ = std::numeric_limits<T>::infinity(); |
| 153 | 153 | return true; |
| 154 | 154 | } |
| 155 | 155 | return false; |
-
diff --git a/boost/spirit/home/qi/numeric/uint.hpp b/boost/spirit/home/qi/numeric/uint.hpp
index ea763d3..f6d1efd 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 235 | 235 | , typename Skipper, typename Attribute> |
| 236 | 236 | bool parse(Iterator& first, Iterator const& last |
| 237 | 237 | , Context& /*context*/, Skipper const& skipper |
| 238 | | , Attribute& attr) const |
| | 238 | , Attribute& attr_) const |
| 239 | 239 | { |
| 240 | 240 | typedef extract_uint<T, Radix, MinDigits, MaxDigits> extract; |
| 241 | 241 | qi::skip_over(first, last, skipper); |
| 242 | | return extract::call(first, last, attr); |
| | 242 | return extract::call(first, last, attr_); |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | template <typename Context> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 273 | 273 | , typename Skipper, typename Attribute> |
| 274 | 274 | bool parse(Iterator& first, Iterator const& last |
| 275 | 275 | , Context& /*context*/, Skipper const& skipper |
| 276 | | , Attribute& attr) const |
| | 276 | , Attribute& attr_param) const |
| 277 | 277 | { |
| 278 | 278 | typedef extract_uint<T, Radix, MinDigits, MaxDigits> extract; |
| 279 | 279 | qi::skip_over(first, last, skipper); |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 283 | 283 | |
| 284 | 284 | if (extract::call(first, last, attr_) && (attr_ == n_)) |
| 285 | 285 | { |
| 286 | | traits::assign_to(attr_, attr); |
| | 286 | traits::assign_to(attr_, attr_param); |
| 287 | 287 | return true; |
| 288 | 288 | } |
| 289 | 289 | |
-
diff --git a/boost/spirit/home/qi/operator/alternative.hpp b/boost/spirit/home/qi/operator/alternative.hpp
index 9785d45..22cfdef 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 63 | 63 | type; |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | | alternative(Elements const& elements) |
| 67 | | : elements(elements) {} |
| | 66 | alternative(Elements const& elements_) |
| | 67 | : elements(elements_) {} |
| 68 | 68 | |
| 69 | 69 | template <typename Iterator, typename Context |
| 70 | 70 | , typename Skipper, typename Attribute> |
| 71 | 71 | bool parse(Iterator& first, Iterator const& last |
| 72 | 72 | , Context& context, Skipper const& skipper |
| 73 | | , Attribute& attr) const |
| | 73 | , Attribute& attr_) const |
| 74 | 74 | { |
| 75 | 75 | detail::alternative_function<Iterator, Context, Skipper, Attribute> |
| 76 | | f(first, last, context, skipper, attr); |
| | 76 | f(first, last, context, skipper, attr_); |
| 77 | 77 | |
| 78 | 78 | // return true if *any* of the parsers succeed |
| 79 | 79 | return fusion::any(elements, f); |
-
diff --git a/boost/spirit/home/qi/operator/and_predicate.hpp b/boost/spirit/home/qi/operator/and_predicate.hpp
index 031ce1d..0554c10 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 43 | 43 | typedef unused_type type; |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | | and_predicate(Subject const& subject) |
| 47 | | : subject(subject) {} |
| | 46 | and_predicate(Subject const& subject_) |
| | 47 | : subject(subject_) {} |
| 48 | 48 | |
| 49 | 49 | template <typename Iterator, typename Context |
| 50 | 50 | , typename Skipper, typename Attribute> |
-
diff --git a/boost/spirit/home/qi/operator/difference.hpp b/boost/spirit/home/qi/operator/difference.hpp
index 5f8c4c9..f703d7f 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 46 | 46 | type; |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | | difference(Left const& left, Right const& right) |
| 50 | | : left(left), right(right) {} |
| | 49 | difference(Left const& left_, Right const& right_) |
| | 50 | : left(left_), right(right_) {} |
| 51 | 51 | |
| 52 | 52 | template <typename Iterator, typename Context |
| 53 | 53 | , typename Skipper, typename Attribute> |
| 54 | 54 | bool parse(Iterator& first, Iterator const& last |
| 55 | 55 | , Context& context, Skipper const& skipper |
| 56 | | , Attribute& attr) const |
| | 56 | , Attribute& attr_) const |
| 57 | 57 | { |
| 58 | 58 | // Unlike classic Spirit, with this version of difference, the rule |
| 59 | 59 | // lit("policeman") - "police" will always fail to match. |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 71 | 71 | return false; |
| 72 | 72 | } |
| 73 | 73 | // RHS fails, now try LHS |
| 74 | | return left.parse(first, last, context, skipper, attr); |
| | 74 | return left.parse(first, last, context, skipper, attr_); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/operator/expect.hpp b/boost/spirit/home/qi/operator/expect.hpp
index c42b2de..ff279fd 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 39 | 39 | template <typename Iterator> |
| 40 | 40 | struct expectation_failure : std::runtime_error |
| 41 | 41 | { |
| 42 | | expectation_failure(Iterator first, Iterator last, info const& what) |
| | 42 | expectation_failure(Iterator first_, Iterator last_, info const& what) |
| 43 | 43 | : std::runtime_error("boost::spirit::qi::expectation_failure") |
| 44 | | , first(first), last(last), what_(what) |
| | 44 | , first(first_), last(last_), what_(what) |
| 45 | 45 | {} |
| 46 | 46 | ~expectation_failure() throw() {} |
| 47 | 47 | |
-
diff --git a/boost/spirit/home/qi/operator/kleene.hpp b/boost/spirit/home/qi/operator/kleene.hpp
index ae778f0..798e63d 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 56 | 56 | type; |
| 57 | 57 | }; |
| 58 | 58 | |
| 59 | | kleene(Subject const& subject) |
| 60 | | : subject(subject) {} |
| | 59 | kleene(Subject const& subject_) |
| | 60 | : subject(subject_) {} |
| 61 | 61 | |
| 62 | 62 | template <typename F> |
| 63 | 63 | bool parse_container(F f) const |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 71 | 71 | , typename Skipper, typename Attribute> |
| 72 | 72 | bool parse(Iterator& first, Iterator const& last |
| 73 | 73 | , Context& context, Skipper const& skipper |
| 74 | | , Attribute& attr) const |
| | 74 | , Attribute& attr_) const |
| 75 | 75 | { |
| 76 | 76 | // ensure the attribute is actually a container type |
| 77 | | traits::make_container(attr); |
| | 77 | traits::make_container(attr_); |
| 78 | 78 | |
| 79 | 79 | typedef detail::fail_function<Iterator, Context, Skipper> |
| 80 | 80 | fail_function; |
| 81 | 81 | |
| 82 | 82 | Iterator iter = first; |
| 83 | 83 | fail_function f(iter, last, context, skipper); |
| 84 | | parse_container(detail::make_pass_container(f, attr)); |
| | 84 | parse_container(detail::make_pass_container(f, attr_)); |
| 85 | 85 | |
| 86 | 86 | first = f.first; |
| 87 | 87 | return true; |
-
diff --git a/boost/spirit/home/qi/operator/list.hpp b/boost/spirit/home/qi/operator/list.hpp
index cc067cd..c5b3ef6 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 55 | 55 | type; |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | | list(Left const& left, Right const& right) |
| 59 | | : left(left), right(right) {} |
| | 58 | list(Left const& left_, Right const& right_) |
| | 59 | : left(left_), right(right_) {} |
| 60 | 60 | |
| 61 | 61 | template <typename F> |
| 62 | 62 | bool parse_container(F f) const |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 80 | 80 | , typename Skipper, typename Attribute> |
| 81 | 81 | bool parse(Iterator& first, Iterator const& last |
| 82 | 82 | , Context& context, Skipper const& skipper |
| 83 | | , Attribute& attr) const |
| | 83 | , Attribute& attr_) const |
| 84 | 84 | { |
| 85 | 85 | typedef detail::fail_function<Iterator, Context, Skipper> |
| 86 | 86 | fail_function; |
| 87 | 87 | |
| 88 | 88 | // ensure the attribute is actually a container type |
| 89 | | traits::make_container(attr); |
| | 89 | traits::make_container(attr_); |
| 90 | 90 | |
| 91 | 91 | Iterator iter = first; |
| 92 | 92 | fail_function f(iter, last, context, skipper); |
| 93 | | if (!parse_container(detail::make_pass_container(f, attr))) |
| | 93 | if (!parse_container(detail::make_pass_container(f, attr_))) |
| 94 | 94 | return false; |
| 95 | 95 | |
| 96 | 96 | first = f.first; |
-
diff --git a/boost/spirit/home/qi/operator/not_predicate.hpp b/boost/spirit/home/qi/operator/not_predicate.hpp
index 57cbb0d..1fb81cd 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 42 | 42 | typedef unused_type type; |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | | not_predicate(Subject const& subject) |
| 46 | | : subject(subject) {} |
| | 45 | not_predicate(Subject const& subject_) |
| | 46 | : subject(subject_) {} |
| 47 | 47 | |
| 48 | 48 | template <typename Iterator, typename Context |
| 49 | 49 | , typename Skipper, typename Attribute> |
-
diff --git a/boost/spirit/home/qi/operator/optional.hpp b/boost/spirit/home/qi/operator/optional.hpp
index b183ad6..4910c7f 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 55 | 55 | type; |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | | optional(Subject const& subject) |
| 59 | | : subject(subject) {} |
| | 58 | optional(Subject const& subject_) |
| | 59 | : subject(subject_) {} |
| 60 | 60 | |
| 61 | 61 | template <typename Iterator, typename Context |
| 62 | 62 | , typename Skipper, typename Attribute> |
| 63 | 63 | bool parse_impl(Iterator& first, Iterator const& last |
| 64 | 64 | , Context& context, Skipper const& skipper |
| 65 | | , Attribute& attr, mpl::false_) const |
| | 65 | , Attribute& attr_, mpl::false_) const |
| 66 | 66 | { |
| 67 | 67 | // create a local value if Attribute is not unused_type |
| 68 | 68 | typename spirit::result_of::optional_value<Attribute>::type val = |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 71 | 71 | if (subject.parse(first, last, context, skipper, val)) |
| 72 | 72 | { |
| 73 | 73 | // assign the parsed value into our attribute |
| 74 | | spirit::traits::assign_to(val, attr); |
| | 74 | spirit::traits::assign_to(val, attr_); |
| 75 | 75 | } |
| 76 | 76 | return true; |
| 77 | 77 | } |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 80 | 80 | , typename Skipper, typename Attribute> |
| 81 | 81 | bool parse_impl(Iterator& first, Iterator const& last |
| 82 | 82 | , Context& context, Skipper const& skipper |
| 83 | | , Attribute& attr, mpl::true_) const |
| | 83 | , Attribute& attr_, mpl::true_) const |
| 84 | 84 | { |
| 85 | | subject.parse(first, last, context, skipper, attr); |
| | 85 | subject.parse(first, last, context, skipper, attr_); |
| 86 | 86 | return true; |
| 87 | 87 | } |
| 88 | 88 | |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 90 | 90 | , typename Skipper, typename Attribute> |
| 91 | 91 | bool parse(Iterator& first, Iterator const& last |
| 92 | 92 | , Context& context, Skipper const& skipper |
| 93 | | , Attribute& attr) const |
| | 93 | , Attribute& attr_) const |
| 94 | 94 | { |
| 95 | 95 | typedef typename spirit::result_of::optional_value<Attribute>::type |
| 96 | 96 | attribute_type; |
| 97 | 97 | |
| 98 | | return parse_impl(first, last, context, skipper, attr |
| | 98 | return parse_impl(first, last, context, skipper, attr_ |
| 99 | 99 | , traits::is_container<attribute_type>()); |
| 100 | 100 | } |
| 101 | 101 | |
-
diff --git a/boost/spirit/home/qi/operator/permutation.hpp b/boost/spirit/home/qi/operator/permutation.hpp
index 1dcad89..cadfa24 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 62 | 62 | type; |
| 63 | 63 | }; |
| 64 | 64 | |
| 65 | | permutation(Elements const& elements) |
| 66 | | : elements(elements) {} |
| | 65 | permutation(Elements const& elements_) |
| | 66 | : elements(elements_) {} |
| 67 | 67 | |
| 68 | 68 | template <typename Iterator, typename Context |
| 69 | 69 | , typename Skipper, typename Attribute> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // wrap the attribute in a tuple if it is not a tuple |
| 85 | | typename traits::wrap_if_not_tuple<Attribute>::type attr(attr_); |
| | 85 | typename traits::wrap_if_not_tuple<Attribute>::type attr_local(attr_); |
| 86 | 86 | |
| 87 | 87 | // We have a bool array 'flags' with one flag for each parser. |
| 88 | 88 | // permute_function sets the slot to true when the corresponding |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 91 | 91 | |
| 92 | 92 | bool result = false; |
| 93 | 93 | f.taken = flags.begin(); |
| 94 | | while (spirit::any_if_ns(elements, attr, f, predicate())) |
| | 94 | while (spirit::any_if_ns(elements, attr_local, f, predicate())) |
| 95 | 95 | { |
| 96 | 96 | f.taken = flags.begin(); |
| 97 | 97 | result = true; |
-
diff --git a/boost/spirit/home/qi/operator/plus.hpp b/boost/spirit/home/qi/operator/plus.hpp
index 780403a..3c08d1f 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 53 | 53 | type; |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | | plus(Subject const& subject) |
| 57 | | : subject(subject) {} |
| | 56 | plus(Subject const& subject_) |
| | 57 | : subject(subject_) {} |
| 58 | 58 | |
| 59 | 59 | template <typename F> |
| 60 | 60 | bool parse_container(F f) const |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 72 | 72 | , typename Skipper, typename Attribute> |
| 73 | 73 | bool parse(Iterator& first, Iterator const& last |
| 74 | 74 | , Context& context, Skipper const& skipper |
| 75 | | , Attribute& attr) const |
| | 75 | , Attribute& attr_) const |
| 76 | 76 | { |
| 77 | 77 | typedef detail::fail_function<Iterator, Context, Skipper> |
| 78 | 78 | fail_function; |
| 79 | 79 | |
| 80 | 80 | // ensure the attribute is actually a container type |
| 81 | | traits::make_container(attr); |
| | 81 | traits::make_container(attr_); |
| 82 | 82 | |
| 83 | 83 | Iterator iter = first; |
| 84 | 84 | fail_function f(iter, last, context, skipper); |
| 85 | | if (!parse_container(detail::make_pass_container(f, attr))) |
| | 85 | if (!parse_container(detail::make_pass_container(f, attr_))) |
| 86 | 86 | return false; |
| 87 | 87 | |
| 88 | 88 | first = f.first; |
-
diff --git a/boost/spirit/home/qi/operator/sequence_base.hpp b/boost/spirit/home/qi/operator/sequence_base.hpp
index 35f45df..921cf53 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 60 | 60 | type; |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | | sequence_base(Elements const& elements) |
| 64 | | : elements(elements) {} |
| | 63 | sequence_base(Elements const& elements_) |
| | 64 | : elements(elements_) {} |
| 65 | 65 | |
| 66 | 66 | // standard case. Attribute is a fusion tuple |
| 67 | 67 | template <typename Iterator, typename Context |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 81 | 81 | traits::one_element_sequence<attr_type_> |
| 82 | 82 | , mpl::not_<traits::one_element_sequence<Attribute> > |
| 83 | 83 | >::type |
| 84 | | >::type attr(attr_); |
| | 84 | >::type attr_local(attr_); |
| 85 | 85 | |
| 86 | 86 | // return false if *any* of the parsers fail |
| 87 | | if (spirit::any_if(elements, attr |
| | 87 | if (spirit::any_if(elements, attr_local |
| 88 | 88 | , Derived::fail_function(iter, last, context, skipper), predicate())) |
| 89 | 89 | return false; |
| 90 | 90 | first = iter; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 118 | 118 | , typename Skipper, typename Attribute> |
| 119 | 119 | bool parse(Iterator& first, Iterator const& last |
| 120 | 120 | , Context& context, Skipper const& skipper |
| 121 | | , Attribute& attr) const |
| | 121 | , Attribute& attr_) const |
| 122 | 122 | { |
| 123 | | return parse_impl(first, last, context, skipper, attr |
| | 123 | return parse_impl(first, last, context, skipper, attr_ |
| 124 | 124 | , traits::is_container<Attribute>()); |
| 125 | 125 | } |
| 126 | 126 | |
-
diff --git a/boost/spirit/home/qi/operator/sequential_or.hpp b/boost/spirit/home/qi/operator/sequential_or.hpp
index 80b86f3..be0135e 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 57 | 57 | type; |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | | sequential_or(Elements const& elements) |
| 61 | | : elements(elements) {} |
| | 60 | sequential_or(Elements const& elements_) |
| | 61 | : elements(elements_) {} |
| 62 | 62 | |
| 63 | 63 | template <typename Iterator, typename Context |
| 64 | 64 | , typename Skipper, typename Attribute> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 71 | 71 | f(first, last, context, skipper); |
| 72 | 72 | |
| 73 | 73 | // wrap the attribute in a tuple if it is not a tuple |
| 74 | | typename traits::wrap_if_not_tuple<Attribute>::type attr(attr_); |
| | 74 | typename traits::wrap_if_not_tuple<Attribute>::type attr_local(attr_); |
| 75 | 75 | |
| 76 | 76 | // return true if *any* of the parsers succeed |
| 77 | 77 | // (we use the non-short-circuiting version: any_if_ns |
| 78 | 78 | // to force all elements to be tested) |
| 79 | | return spirit::any_if_ns(elements, attr, f, predicate()); |
| | 79 | return spirit::any_if_ns(elements, attr_local, f, predicate()); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/parse_attr.hpp b/boost/spirit/home/qi/parse_attr.hpp
index 1933ffb..6db3300 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 62 | 62 | BOOST_PP_ENUM(N, BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE, A) |
| 63 | 63 | > vector_type; |
| 64 | 64 | |
| 65 | | vector_type attr (BOOST_PP_ENUM_PARAMS(N, attr)); |
| 66 | | return compile<qi::domain>(expr).parse(first, last, unused, unused, attr); |
| | 65 | vector_type lattr (BOOST_PP_ENUM_PARAMS(N, attr)); |
| | 66 | return compile<qi::domain>(expr).parse(first, last, unused, unused, lattr); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | template <typename Iterator, typename Expr |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 113 | 113 | BOOST_PP_ENUM(N, BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE, A) |
| 114 | 114 | > vector_type; |
| 115 | 115 | |
| 116 | | vector_type attr (BOOST_PP_ENUM_PARAMS(N, attr)); |
| | 116 | vector_type lattr (BOOST_PP_ENUM_PARAMS(N, attr)); |
| 117 | 117 | if (!compile<qi::domain>(expr).parse( |
| 118 | | first, last, unused, skipper_, attr)) |
| | 118 | first, last, unused, skipper_, lattr)) |
| 119 | 119 | return false; |
| 120 | 120 | |
| 121 | 121 | if (post_skip == skip_flag::postskip) |
-
diff --git a/boost/spirit/home/qi/reference.hpp b/boost/spirit/home/qi/reference.hpp
index f6fcabc..f1f5c67 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 38 | 38 | , typename Skipper, typename Attribute> |
| 39 | 39 | bool parse(Iterator& first, Iterator const& last |
| 40 | 40 | , Context& context, Skipper const& skipper |
| 41 | | , Attribute& attr) const |
| | 41 | , Attribute& attr_) const |
| 42 | 42 | { |
| 43 | | return ref.get().parse(first, last, context, skipper, attr); |
| | 43 | return ref.get().parse(first, last, context, skipper, attr_); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/stream/stream.hpp b/boost/spirit/home/qi/stream/stream.hpp
index 952f2f9..555f28d 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 58 | 58 | , typename Skipper, typename Attribute> |
| 59 | 59 | bool parse(Iterator& first, Iterator const& last |
| 60 | 60 | , Context& /*context*/, Skipper const& skipper |
| 61 | | , Attribute& attr) const |
| | 61 | , Attribute& attr_) const |
| 62 | 62 | { |
| 63 | 63 | typedef qi::detail::iterator_source<Iterator> source_device; |
| 64 | 64 | typedef boost::iostreams::stream<source_device> instream; |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 66 | 66 | qi::skip_over(first, last, skipper); |
| 67 | 67 | |
| 68 | 68 | instream in(first, last); // copies 'first' |
| 69 | | in >> attr; // use existing operator>>() |
| | 69 | in >> attr_; // use existing operator>>() |
| 70 | 70 | |
| 71 | 71 | // advance the iterator if everything is ok |
| 72 | 72 | if (in.good()) { |
-
diff --git a/boost/spirit/home/qi/string/detail/tst.hpp b/boost/spirit/home/qi/string/detail/tst.hpp
index 989477d..168e4cf 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi { namespace detail
|
| 24 | 24 | template <typename Char, typename T> |
| 25 | 25 | struct tst_node |
| 26 | 26 | { |
| 27 | | tst_node(Char id) |
| 28 | | : id(id), data(0), lt(0), eq(0), gt(0) |
| | 27 | tst_node(Char id_) |
| | 28 | : id(id_), data(0), lt(0), eq(0), gt(0) |
| 29 | 29 | { |
| 30 | 30 | } |
| 31 | 31 | |
-
diff --git a/boost/spirit/home/qi/string/lit.hpp b/boost/spirit/home/qi/string/lit.hpp
index 1b966c3..1e16361 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace qi
|
| 89 | 89 | char_type; |
| 90 | 90 | typedef std::basic_string<char_type> string_type; |
| 91 | 91 | |
| 92 | | literal_string(typename add_reference<String>::type str) |
| 93 | | : str(str) |
| | 92 | literal_string(typename add_reference<String>::type str_) |
| | 93 | : str(str_) |
| 94 | 94 | {} |
| 95 | 95 | |
| 96 | 96 | template <typename Context, typename Iterator> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 104 | 104 | template <typename Iterator, typename Context |
| 105 | 105 | , typename Skipper, typename Attribute> |
| 106 | 106 | bool parse(Iterator& first, Iterator const& last |
| 107 | | , Context& /*context*/, Skipper const& skipper, Attribute& attr) const |
| | 107 | , Context& /*context*/, Skipper const& skipper, Attribute& attr_) const |
| 108 | 108 | { |
| 109 | 109 | qi::skip_over(first, last, skipper); |
| 110 | | return detail::string_parse(str, first, last, attr); |
| | 110 | return detail::string_parse(str, first, last, attr_); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | template <typename Context> |
| … |
… |
namespace boost { namespace spirit { namespace qi
|
| 163 | 163 | template <typename Iterator, typename Context |
| 164 | 164 | , typename Skipper, typename Attribute> |
| 165 | 165 | bool parse(Iterator& first, Iterator const& last |
| 166 | | , Context& /*context*/, Skipper const& skipper, Attribute& attr) const |
| | 166 | , Context& /*context*/, Skipper const& skipper, Attribute& attr_) const |
| 167 | 167 | { |
| 168 | 168 | qi::skip_over(first, last, skipper); |
| 169 | | return detail::string_parse(str_lo, str_hi, first, last, attr); |
| | 169 | return detail::string_parse(str_lo, str_hi, first, last, attr_); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | template <typename Context> |
-
diff --git a/boost/spirit/home/qi/string/symbols.hpp b/boost/spirit/home/qi/string/symbols.hpp
index a9656f1..ae38892 100644
|
a
|
b
|
public:
|
| 257 | 257 | template <typename Iterator, typename Context |
| 258 | 258 | , typename Skipper, typename Attribute> |
| 259 | 259 | bool parse(Iterator& first, Iterator const& last |
| 260 | | , Context& /*context*/, Skipper const& skipper, Attribute& attr) const |
| | 260 | , Context& /*context*/, Skipper const& skipper, Attribute& attr_) const |
| 261 | 261 | { |
| 262 | 262 | qi::skip_over(first, last, skipper); |
| 263 | 263 | |
| 264 | 264 | if (value_type* val_ptr |
| 265 | 265 | = lookup->find(first, last, Filter())) |
| 266 | 266 | { |
| 267 | | spirit::traits::assign_to(*val_ptr, attr); |
| | 267 | spirit::traits::assign_to(*val_ptr, attr_); |
| 268 | 268 | return true; |
| 269 | 269 | } |
| 270 | 270 | return false; |
| … |
… |
public:
|
| 290 | 290 | template <typename, typename = unused_type, typename = unused_type> |
| 291 | 291 | struct result { typedef adder const& type; }; |
| 292 | 292 | |
| 293 | | adder(symbols& sym) |
| 294 | | : sym(sym) |
| | 293 | adder(symbols& sym_) |
| | 294 | : sym(sym_) |
| 295 | 295 | { |
| 296 | 296 | } |
| 297 | 297 | |
| … |
… |
public:
|
| 333 | 333 | template <typename, typename = unused_type, typename = unused_type> |
| 334 | 334 | struct result { typedef remover const& type; }; |
| 335 | 335 | |
| 336 | | remover(symbols& sym) |
| 337 | | : sym(sym) |
| | 336 | remover(symbols& sym_) |
| | 337 | : sym(sym_) |
| 338 | 338 | { |
| 339 | 339 | } |
| 340 | 340 | |
-
diff --git a/boost/spirit/home/support/attributes.hpp b/boost/spirit/home/support/attributes.hpp
index 48bff06..0efb2d5 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace traits
|
| 1158 | 1158 | template <typename Out> |
| 1159 | 1159 | struct print_fusion_sequence |
| 1160 | 1160 | { |
| 1161 | | print_fusion_sequence(Out& out) |
| 1162 | | : out(out), is_first(true) {} |
| | 1161 | print_fusion_sequence(Out& out_) |
| | 1162 | : out(out_), is_first(true) {} |
| 1163 | 1163 | |
| 1164 | 1164 | typedef void result_type; |
| 1165 | 1165 | |
| … |
… |
namespace boost { namespace spirit { namespace traits
|
| 1181 | 1181 | template <typename Out> |
| 1182 | 1182 | struct print_visitor : static_visitor<> |
| 1183 | 1183 | { |
| 1184 | | print_visitor(Out& out) : out(out) {} |
| | 1184 | print_visitor(Out& out_) : out(out_) {} |
| 1185 | 1185 | |
| 1186 | 1186 | template <typename T> |
| 1187 | 1187 | void operator()(T const& val) const |
-
diff --git a/boost/spirit/home/support/char_set/range.hpp b/boost/spirit/home/support/char_set/range.hpp
index 6d1f661..1973889 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace support { namespace detail
|
| 22 | 22 | typedef T value_type; |
| 23 | 23 | |
| 24 | 24 | range() : first(), last() {} |
| 25 | | range(T first, T last) : first(first), last(last) {} |
| | 25 | range(T first_, T last_) : first(first_), last(last_) {} |
| 26 | 26 | |
| 27 | 27 | T first; |
| 28 | 28 | T last; |
-
diff --git a/boost/spirit/home/support/context.hpp b/boost/spirit/home/support/context.hpp
index b728b4f..9c9715f 100644
|
a
|
b
|
namespace boost { namespace spirit
|
| 116 | 116 | ) |
| 117 | 117 | , locals() {} |
| 118 | 118 | |
| 119 | | context(Attributes const& attributes) |
| 120 | | : attributes(attributes), locals() {} |
| | 119 | context(Attributes const& attributes_) |
| | 120 | : attributes(attributes_), locals() {} |
| 121 | 121 | |
| 122 | 122 | Attributes attributes; // The attributes |
| 123 | 123 | Locals locals; // Local variables |
-
diff --git a/boost/spirit/home/support/detail/what_function.hpp b/boost/spirit/home/support/detail/what_function.hpp
index d9678dd..179807b 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace detail
|
| 20 | 20 | template <typename Context> |
| 21 | 21 | struct what_function |
| 22 | 22 | { |
| 23 | | what_function(info& what, Context& context) |
| 24 | | : what(what), context(context) |
| | 23 | what_function(info& what_, Context& context_) |
| | 24 | : what(what_), context(context_) |
| 25 | 25 | { |
| 26 | 26 | what.value = std::list<info>(); |
| 27 | 27 | } |
-
diff --git a/boost/spirit/home/support/info.hpp b/boost/spirit/home/support/info.hpp
index 0701888..a44fab4 100644
|
a
|
b
|
namespace boost { namespace spirit
|
| 40 | 40 | > |
| 41 | 41 | value_type; |
| 42 | 42 | |
| 43 | | explicit info(utf8_string const& tag) |
| 44 | | : tag(tag), value(nil()) {} |
| | 43 | explicit info(utf8_string const& tag_) |
| | 44 | : tag(tag_), value(nil()) {} |
| 45 | 45 | |
| 46 | 46 | template <typename T> |
| 47 | | info(utf8_string const& tag, T const& value) |
| 48 | | : tag(tag), value(value) {} |
| | 47 | info(utf8_string const& tag_, T const& value_) |
| | 48 | : tag(tag_), value(value_) {} |
| 49 | 49 | |
| 50 | | info(utf8_string const& tag, char value) |
| 51 | | : tag(tag), value(utf8_string(1, value)) {} |
| | 50 | info(utf8_string const& tag_, char value_) |
| | 51 | : tag(tag_), value(utf8_string(1, value_)) {} |
| 52 | 52 | |
| 53 | | info(utf8_string const& tag, wchar_t value) |
| 54 | | : tag(tag), value(to_utf8(value)) {} |
| | 53 | info(utf8_string const& tag_, wchar_t value_) |
| | 54 | : tag(tag_), value(to_utf8(value_)) {} |
| 55 | 55 | |
| 56 | | info(utf8_string const& tag, ucs4_char value) |
| 57 | | : tag(tag), value(to_utf8(value)) {} |
| | 56 | info(utf8_string const& tag_, ucs4_char value_) |
| | 57 | : tag(tag_), value(to_utf8(value_)) {} |
| 58 | 58 | |
| 59 | 59 | template <typename Char> |
| 60 | | info(utf8_string const& tag, Char const* str) |
| 61 | | : tag(tag), value(to_utf8(str)) {} |
| | 60 | info(utf8_string const& tag_, Char const* str) |
| | 61 | : tag(tag_), value(to_utf8(str)) {} |
| 62 | 62 | |
| 63 | 63 | template <typename Char, typename Traits, typename Allocator> |
| 64 | | info(utf8_string const& tag |
| | 64 | info(utf8_string const& tag_ |
| 65 | 65 | , std::basic_string<Char, Traits, Allocator> const& str) |
| 66 | | : tag(tag), value(to_utf8(str)) {} |
| | 66 | : tag(tag_), value(to_utf8(str)) {} |
| 67 | 67 | |
| 68 | 68 | utf8_string tag; |
| 69 | 69 | value_type value; |
| … |
… |
namespace boost { namespace spirit
|
| 75 | 75 | typedef void result_type; |
| 76 | 76 | typedef basic_info_walker<Callback> this_type; |
| 77 | 77 | |
| 78 | | basic_info_walker(Callback& callback, utf8_string const& tag, int depth) |
| 79 | | : callback(callback), tag(tag), depth(depth) {} |
| | 78 | basic_info_walker(Callback& callback_, utf8_string const& tag_, int depth_) |
| | 79 | : callback(callback_), tag(tag_), depth(depth_) {} |
| 80 | 80 | |
| 81 | 81 | void operator()(info::nil) const |
| 82 | 82 | { |
| … |
… |
namespace boost { namespace spirit
|
| 128 | 128 | { |
| 129 | 129 | typedef utf8_string string; |
| 130 | 130 | |
| 131 | | simple_printer(Out& out) |
| 132 | | : out(out) {} |
| | 131 | simple_printer(Out& out_) |
| | 132 | : out(out_) {} |
| 133 | 133 | |
| 134 | 134 | void element(string const& tag, string const& value, int /*depth*/) const |
| 135 | 135 | { |
-
diff --git a/boost/spirit/home/support/nonterminal/expand_arg.hpp b/boost/spirit/home/support/nonterminal/expand_arg.hpp
index f037acc..f214096 100644
|
a
|
b
|
namespace boost { namespace spirit { namespace detail
|
| 50 | 50 | struct result<F(A0&)> |
| 51 | 51 | : result_type<A0> {}; |
| 52 | 52 | |
| 53 | | expand_arg(Context& context) |
| 54 | | : context(context) |
| | 53 | expand_arg(Context& context_) |
| | 54 | : context(context_) |
| 55 | 55 | { |
| 56 | 56 | } |
| 57 | 57 | |
-
diff --git a/boost/spirit/home/support/terminal.hpp b/boost/spirit/home/support/terminal.hpp
index d52fad2..f9b23de 100644
|
a
|
b
|
namespace boost { namespace spirit
|
| 33 | 33 | typedef Terminal terminal_type; |
| 34 | 34 | typedef Args args_type; |
| 35 | 35 | |
| 36 | | terminal_ex(Args const& args) |
| 37 | | : args(args) {} |
| 38 | | terminal_ex(Args const& args, Terminal const& term) |
| 39 | | : args(args), term(term) {} |
| | 36 | terminal_ex(Args const& args_) |
| | 37 | : args(args_) {} |
| | 38 | terminal_ex(Args const& args_, Terminal const& term_) |
| | 39 | : args(args_), term(term_) {} |
| 40 | 40 | |
| 41 | 41 | Args args; // Args is guaranteed to be a fusion::vectorN so you |
| 42 | 42 | // can use that template for detection and specialization |
| … |
… |
namespace boost { namespace spirit
|
| 50 | 50 | typedef Actor actor_type; |
| 51 | 51 | static int const arity = Arity; |
| 52 | 52 | |
| 53 | | lazy_terminal(Actor const& actor) |
| 54 | | : actor(actor) {} |
| 55 | | lazy_terminal(Actor const& actor, Terminal const& term) |
| 56 | | : actor(actor), term(term) {} |
| | 53 | lazy_terminal(Actor const& actor_) |
| | 54 | : actor(actor_) {} |
| | 55 | lazy_terminal(Actor const& actor_, Terminal const& term_) |
| | 56 | : actor(actor_), term(term_) {} |
| 57 | 57 | |
| 58 | 58 | Actor actor; |
| 59 | 59 | Terminal term; |
| … |
… |
namespace boost { namespace spirit
|
| 104 | 104 | typedef result_type type; |
| 105 | 105 | |
| 106 | 106 | result_type |
| 107 | | operator()(F f, A0 const& _0) const |
| | 107 | operator()(F f, A0 const& _0_) const |
| 108 | 108 | { |
| 109 | 109 | typedef typename result_type::proto_child0 child_type; |
| 110 | 110 | return result_type::make(child_type( |
| 111 | | phoenix::detail::expression::function_eval<F, A0>::make(f, _0) |
| | 111 | phoenix::detail::expression::function_eval<F, A0>::make(f, _0_) |
| 112 | 112 | , f.proto_base().child0 |
| 113 | 113 | )); |
| 114 | 114 | } |
| … |
… |
namespace boost { namespace spirit
|
| 129 | 129 | typedef result_type type; |
| 130 | 130 | |
| 131 | 131 | result_type |
| 132 | | operator()(F f, A0 const& _0, A1 const& _1) const |
| | 132 | operator()(F f, A0 const& _0_, A1 const& _1_) const |
| 133 | 133 | { |
| 134 | 134 | typedef typename result_type::proto_child0 child_type; |
| 135 | 135 | return result_type::make(child_type( |
| 136 | | phoenix::detail::expression::function_eval<F, A0, A1>::make(f, _0, _1) |
| | 136 | phoenix::detail::expression::function_eval<F, A0, A1>::make(f, _0_, _1_) |
| 137 | 137 | , f.proto_base().child0 |
| 138 | 138 | )); |
| 139 | 139 | } |
| … |
… |
namespace boost { namespace spirit
|
| 154 | 154 | typedef result_type type; |
| 155 | 155 | |
| 156 | 156 | result_type |
| 157 | | operator()(F f, A0 const& _0, A1 const& _1, A2 const& _2) const |
| | 157 | operator()(F f, A0 const& _0_, A1 const& _1_, A2 const& _2_) const |
| 158 | 158 | { |
| 159 | 159 | typedef typename result_type::proto_child0 child_type; |
| 160 | 160 | return result_type::make(child_type( |
| 161 | | phoenix::detail::expression::function_eval<F, A0, A1, A2>::make(f, _0, _1, _2) |
| | 161 | phoenix::detail::expression::function_eval<F, A0, A1, A2>::make(f, _0_, _1_, _2_) |
| 162 | 162 | , f.proto_base().child0 |
| 163 | 163 | )); |
| 164 | 164 | } |
| … |
… |
namespace boost { namespace spirit
|
| 368 | 368 | |
| 369 | 369 | template <typename A0> |
| 370 | 370 | typename result<A0>::type |
| 371 | | operator()(A0 const& _0 |
| | 371 | operator()(A0 const& _0_ |
| 372 | 372 | , typename detail::contains_actor<A0>::is_false = 0) const |
| 373 | 373 | { |
| 374 | 374 | typedef typename result<A0>::type result_type; |
| 375 | 375 | typedef typename result_type::proto_child0 child_type; |
| 376 | 376 | return result_type::make( |
| 377 | 377 | child_type( |
| 378 | | detail::make_vector(_0) |
| | 378 | detail::make_vector(_0_) |
| 379 | 379 | , this->proto_base().child0) |
| 380 | 380 | ); |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | template <typename A0, typename A1> |
| 384 | 384 | typename result<A0, A1>::type |
| 385 | | operator()(A0 const& _0, A1 const& _1 |
| | 385 | operator()(A0 const& _0_, A1 const& _1_ |
| 386 | 386 | , typename detail::contains_actor<A0, A1>::is_false = 0) const |
| 387 | 387 | { |
| 388 | 388 | typedef typename result<A0, A1>::type result_type; |
| 389 | 389 | typedef typename result_type::proto_child0 child_type; |
| 390 | 390 | return result_type::make( |
| 391 | 391 | child_type( |
| 392 | | detail::make_vector(_0, _1) |
| | 392 | detail::make_vector(_0_, _1_) |
| 393 | 393 | , this->proto_base().child0) |
| 394 | 394 | ); |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | template <typename A0, typename A1, typename A2> |
| 398 | 398 | typename result<A0, A1, A2>::type |
| 399 | | operator()(A0 const& _0, A1 const& _1, A2 const& _2 |
| | 399 | operator()(A0 const& _0_, A1 const& _1_, A2 const& _2_ |
| 400 | 400 | , typename detail::contains_actor<A0, A1, A2>::is_false = 0) const |
| 401 | 401 | { |
| 402 | 402 | typedef typename result<A0, A1, A2>::type result_type; |
| 403 | 403 | typedef typename result_type::proto_child0 child_type; |
| 404 | 404 | return result_type::make( |
| 405 | 405 | child_type( |
| 406 | | detail::make_vector(_0, _1, _2) |
| | 406 | detail::make_vector(_0_, _1_, _2_) |
| 407 | 407 | , this->proto_base().child0) |
| 408 | 408 | ); |
| 409 | 409 | } |
| … |
… |
namespace boost { namespace spirit
|
| 412 | 412 | // least one arg is a Phoenix actor. |
| 413 | 413 | template <typename A0> |
| 414 | 414 | typename result<A0>::type |
| 415 | | operator()(A0 const& _0 |
| | 415 | operator()(A0 const& _0_ |
| 416 | 416 | , typename detail::contains_actor<A0>::is_true = 0) const |
| 417 | 417 | { |
| 418 | 418 | return make_lazy<this_type |
| 419 | 419 | , typename phoenix::as_actor<A0>::type>()(*this |
| 420 | | , phoenix::as_actor<A0>::convert(_0)); |
| | 420 | , phoenix::as_actor<A0>::convert(_0_)); |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | template <typename A0, typename A1> |
| 424 | 424 | typename result<A0, A1>::type |
| 425 | | operator()(A0 const& _0, A1 const& _1 |
| | 425 | operator()(A0 const& _0_, A1 const& _1_ |
| 426 | 426 | , typename detail::contains_actor<A0, A1>::is_true = 0) const |
| 427 | 427 | { |
| 428 | 428 | return make_lazy<this_type |
| 429 | 429 | , typename phoenix::as_actor<A0>::type |
| 430 | 430 | , typename phoenix::as_actor<A1>::type>()(*this |
| 431 | | , phoenix::as_actor<A0>::convert(_0) |
| 432 | | , phoenix::as_actor<A1>::convert(_1)); |
| | 431 | , phoenix::as_actor<A0>::convert(_0_) |
| | 432 | , phoenix::as_actor<A1>::convert(_1_)); |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | template <typename A0, typename A1, typename A2> |
| 436 | 436 | typename result<A0, A1, A2>::type |
| 437 | | operator()(A0 const& _0, A1 const& _1, A2 const& _2 |
| | 437 | operator()(A0 const& _0_, A1 const& _1_, A2 const& _2_ |
| 438 | 438 | , typename detail::contains_actor<A0, A1, A2>::is_true = 0) const |
| 439 | 439 | { |
| 440 | 440 | return make_lazy<this_type |
| 441 | 441 | , typename phoenix::as_actor<A0>::type |
| 442 | 442 | , typename phoenix::as_actor<A1>::type |
| 443 | 443 | , typename phoenix::as_actor<A2>::type>()(*this |
| 444 | | , phoenix::as_actor<A0>::convert(_0) |
| 445 | | , phoenix::as_actor<A1>::convert(_1) |
| 446 | | , phoenix::as_actor<A2>::convert(_2)); |
| | 444 | , phoenix::as_actor<A0>::convert(_0_) |
| | 445 | , phoenix::as_actor<A1>::convert(_1_) |
| | 446 | , phoenix::as_actor<A2>::convert(_2_)); |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | private: |