summaryrefslogtreecommitdiff
path: root/boost/spirit/repository/home
diff options
context:
space:
mode:
Diffstat (limited to 'boost/spirit/repository/home')
-rw-r--r--boost/spirit/repository/home/karma/directive/confix.hpp4
-rw-r--r--boost/spirit/repository/home/karma/nonterminal/subrule.hpp179
-rw-r--r--boost/spirit/repository/home/qi/directive/confix.hpp4
-rw-r--r--boost/spirit/repository/home/qi/directive/distinct.hpp4
-rw-r--r--boost/spirit/repository/home/qi/directive/kwd.hpp18
-rw-r--r--boost/spirit/repository/home/qi/directive/seek.hpp4
-rw-r--r--boost/spirit/repository/home/qi/nonterminal/subrule.hpp166
-rw-r--r--boost/spirit/repository/home/qi/operator/detail/keywords.hpp42
-rw-r--r--boost/spirit/repository/home/qi/operator/keywords.hpp1
-rw-r--r--boost/spirit/repository/home/qi/primitive/advance.hpp3
-rw-r--r--boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp4
-rw-r--r--boost/spirit/repository/home/qi/primitive/iter_pos.hpp2
-rw-r--r--boost/spirit/repository/home/support/seek.hpp4
13 files changed, 251 insertions, 184 deletions
diff --git a/boost/spirit/repository/home/karma/directive/confix.hpp b/boost/spirit/repository/home/karma/directive/confix.hpp
index cc7bd99898..1f3d3ef950 100644
--- a/boost/spirit/repository/home/karma/directive/confix.hpp
+++ b/boost/spirit/repository/home/karma/directive/confix.hpp
@@ -45,8 +45,10 @@ namespace boost { namespace spirit
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace repository { namespace karma
{
- using repository::confix_type;
+#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
using repository::confix;
+#endif
+ using repository::confix_type;
///////////////////////////////////////////////////////////////////////////
template <typename Subject, typename Prefix, typename Suffix>
diff --git a/boost/spirit/repository/home/karma/nonterminal/subrule.hpp b/boost/spirit/repository/home/karma/nonterminal/subrule.hpp
index a2893bc404..4eaee8e33a 100644
--- a/boost/spirit/repository/home/karma/nonterminal/subrule.hpp
+++ b/boost/spirit/repository/home/karma/nonterminal/subrule.hpp
@@ -54,55 +54,24 @@
namespace boost { namespace spirit { namespace repository { namespace karma
{
///////////////////////////////////////////////////////////////////////////
- // subrule_group:
+ // subrule_group_generator:
// - generator representing a group of subrule definitions (one or more),
// invokes first subrule on entry,
- // - also a Proto terminal, so that a group behaves like any Spirit
- // expression.
///////////////////////////////////////////////////////////////////////////
template <typename Defs>
- struct subrule_group
- : proto::extends<
- typename proto::terminal<
- spirit::karma::reference<subrule_group<Defs> const>
- >::type
- , subrule_group<Defs>
- >
- , spirit::karma::generator<subrule_group<Defs> >
+ struct subrule_group_generator
+ : spirit::karma::generator<subrule_group_generator<Defs> >
{
- struct properties
- // Forward to first subrule.
- : remove_reference<
- typename fusion::result_of::front<Defs>::type
- >::type::second_type::subject_type::properties {};
-
// Fusion associative sequence, associating each subrule ID in this
// group (as an MPL integral constant) with its definition
typedef Defs defs_type;
- typedef subrule_group<Defs> this_type;
- typedef spirit::karma::reference<this_type const> reference_;
- typedef typename proto::terminal<reference_>::type terminal;
- typedef proto::extends<terminal, this_type> base_type;
-
- static size_t const params_size =
- // Forward to first subrule.
- remove_reference<
- typename fusion::result_of::front<Defs>::type
- >::type::second_type::params_size;
-
- subrule_group(subrule_group const& rhs)
- : base_type(terminal::make(reference_(*this)))
- , defs(rhs.defs)
- {
- }
+ typedef subrule_group_generator<Defs> this_type;
- explicit subrule_group(Defs const& defs)
- : base_type(terminal::make(reference_(*this)))
- , defs(defs)
+ explicit subrule_group_generator(Defs const& defs)
+ : defs(defs)
{
}
-
// from a subrule ID, get the type of a reference to its definition
template <int ID>
struct def_type
@@ -255,6 +224,47 @@ namespace boost { namespace spirit { namespace repository { namespace karma
return fusion::front(defs).second.binder.g.what(context);
}
+ Defs defs;
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ // subrule_group:
+ // - a Proto terminal, so that a group behaves like any Spirit
+ // expression.
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename Defs>
+ struct subrule_group
+ : proto::extends<
+ typename proto::terminal<
+ subrule_group_generator<Defs>
+ >::type
+ , subrule_group<Defs>
+ >
+ {
+ typedef subrule_group_generator<Defs> generator_type;
+ typedef typename proto::terminal<generator_type>::type terminal;
+
+ struct properties
+ // Forward to first subrule.
+ : remove_reference<
+ typename fusion::result_of::front<Defs>::type
+ >::type::second_type::subject_type::properties {};
+
+ static size_t const params_size =
+ // Forward to first subrule.
+ remove_reference<
+ typename fusion::result_of::front<Defs>::type
+ >::type::second_type::params_size;
+
+ explicit subrule_group(Defs const& defs)
+ : subrule_group::proto_extends(terminal::make(generator_type(defs)))
+ {
+ }
+
+ generator_type const& generator() const { return proto::value(*this); }
+
+ Defs const& defs() const { return generator().defs; }
+
template <typename Defs2>
subrule_group<
typename fusion::result_of::as_map<
@@ -266,15 +276,29 @@ namespace boost { namespace spirit { namespace repository { namespace karma
typename fusion::result_of::as_map<
typename fusion::result_of::join<
Defs const, Defs2 const>::type>::type> result_type;
- return result_type(fusion::as_map(fusion::join(defs, other.defs)));
+ return result_type(fusion::as_map(fusion::join(defs(), other.defs())));
+ }
+
+ // non-const versions needed to suppress proto's comma op kicking in
+ template <typename Defs2>
+ friend subrule_group<
+ typename fusion::result_of::as_map<
+ typename fusion::result_of::join<
+ Defs const, Defs2 const>::type>::type>
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ operator,(subrule_group&& left, subrule_group<Defs2>&& other)
+#else
+ operator,(subrule_group& left, subrule_group<Defs2>& other)
+#endif
+ {
+ return static_cast<subrule_group const&>(left)
+ .operator,(static_cast<subrule_group<Defs2> const&>(other));
}
// bring in the operator() overloads
- this_type const& get_parameterized_subject() const { return *this; }
- typedef this_type parameterized_subject_type;
+ generator_type const& get_parameterized_subject() const { return generator(); }
+ typedef generator_type parameterized_subject_type;
#include <boost/spirit/home/karma/nonterminal/detail/fcall.hpp>
-
- Defs defs;
};
///////////////////////////////////////////////////////////////////////////
@@ -351,13 +375,20 @@ namespace boost { namespace spirit { namespace repository { namespace karma
typedef mpl::vector<T1, T2> template_params;
- // locals_type is a sequence of types to be used as local variables
+ // The subrule's locals_type: a sequence of types to be used as local variables
typedef typename
spirit::detail::extract_locals<template_params>::type
locals_type;
+ // The subrule's encoding type
+ typedef typename
+ spirit::detail::extract_encoding<template_params>::type
+ encoding_type;
+
+ // The subrule's signature
typedef typename
- spirit::detail::extract_sig<template_params>::type
+ spirit::detail::extract_sig<template_params, encoding_type
+ , spirit::karma::domain>::type
sig_type;
// This is the subrule's attribute type
@@ -435,42 +466,34 @@ namespace boost { namespace spirit { namespace repository { namespace karma
def_type(compile<spirit::karma::domain>(expr), name_)));
}
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule const& sr, Expr const& expr)
- {
- typedef group_type_helper<Expr, true> helper;
- typedef typename helper::def_type def_type;
- typedef typename helper::type result_type;
- return result_type(fusion::make_map<id_type>(
- def_type(compile<spirit::karma::domain>(expr), sr.name_)));
- }
+#define SUBRULE_MODULUS_ASSIGN_OPERATOR(lhs_ref, rhs_ref) \
+ template <typename Expr> \
+ friend typename group_type_helper<Expr, true>::type \
+ operator%=(subrule lhs_ref sr, Expr rhs_ref expr) \
+ { \
+ typedef group_type_helper<Expr, true> helper; \
+ typedef typename helper::def_type def_type; \
+ typedef typename helper::type result_type; \
+ return result_type(fusion::make_map<id_type>( \
+ def_type(compile<spirit::karma::domain>(expr), sr.name_))); \
+ } \
+ /**/
// non-const versions needed to suppress proto's %= kicking in
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule const& sr, Expr& expr)
- {
- return operator%=(
- sr
- , static_cast<Expr const&>(expr));
- }
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule& sr, Expr const& expr)
- {
- return operator%=(
- static_cast<subrule const&>(sr)
- , expr);
- }
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule& sr, Expr& expr)
- {
- return operator%=(
- static_cast<subrule const&>(sr)
- , static_cast<Expr const&>(expr));
- }
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(const&, const&)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(const&, &&)
+#else
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(const&, &)
+#endif
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(&, const&)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(&, &&)
+#else
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(&, &)
+#endif
+
+#undef SUBRULE_MODULUS_ASSIGN_OPERATOR
std::string const& name() const
{
diff --git a/boost/spirit/repository/home/qi/directive/confix.hpp b/boost/spirit/repository/home/qi/directive/confix.hpp
index d51b0011af..80118c7720 100644
--- a/boost/spirit/repository/home/qi/directive/confix.hpp
+++ b/boost/spirit/repository/home/qi/directive/confix.hpp
@@ -46,8 +46,10 @@ namespace boost { namespace spirit
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace repository { namespace qi
{
- using repository::confix_type;
+#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
using repository::confix;
+#endif
+ using repository::confix_type;
///////////////////////////////////////////////////////////////////////////
// the confix() generated parser
diff --git a/boost/spirit/repository/home/qi/directive/distinct.hpp b/boost/spirit/repository/home/qi/directive/distinct.hpp
index 740694559e..fc6bd5f307 100644
--- a/boost/spirit/repository/home/qi/directive/distinct.hpp
+++ b/boost/spirit/repository/home/qi/directive/distinct.hpp
@@ -56,8 +56,10 @@ namespace boost { namespace spirit
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace repository {namespace qi
{
- using repository::distinct_type;
+#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
using repository::distinct;
+#endif
+ using repository::distinct_type;
template <typename Subject, typename Tail, typename Modifier>
struct distinct_parser
diff --git a/boost/spirit/repository/home/qi/directive/kwd.hpp b/boost/spirit/repository/home/qi/directive/kwd.hpp
index 98f49409ba..e7338df432 100644
--- a/boost/spirit/repository/home/qi/directive/kwd.hpp
+++ b/boost/spirit/repository/home/qi/directive/kwd.hpp
@@ -16,13 +16,13 @@
#include <boost/spirit/home/qi/parser.hpp>
#include <boost/spirit/home/qi/auxiliary/lazy.hpp>
#include <boost/spirit/home/qi/operator/kleene.hpp>
+#include <boost/spirit/home/qi/string/lit.hpp>
#include <boost/spirit/home/support/container.hpp>
#include <boost/spirit/home/qi/detail/attributes.hpp>
#include <boost/spirit/home/qi/detail/fail_function.hpp>
#include <boost/spirit/home/support/info.hpp>
#include <boost/spirit/repository/home/support/kwd.hpp>
#include <boost/fusion/include/at.hpp>
-#include <boost/foreach.hpp>
#include <vector>
namespace boost { namespace spirit
@@ -148,11 +148,17 @@ namespace boost { namespace spirit
namespace boost { namespace spirit { namespace repository { namespace qi
{
+#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
using repository::kwd;
using repository::ikwd;
using repository::dkwd;
using repository::idkwd;
using spirit::inf;
+#endif
+ using repository::kwd_type;
+ using repository::ikwd_type;
+ using repository::dkwd_type;
+ using repository::idkwd_type;
using spirit::inf_type;
template <typename T>
@@ -160,7 +166,7 @@ template <typename T>
{
kwd_pass_iterator() {}
bool flag_init() const { return true; }
- bool register_successful_parse(bool &flag,T &i) const {
+ bool register_successful_parse(bool &flag,T &/*i*/) const {
flag=true;
return true;
}
@@ -650,7 +656,7 @@ namespace boost { namespace spirit { namespace qi
);
}
template <typename Terminal>
- result_type create_kwd(Terminal const &term, Subject const & subject, Modifiers const& modifiers, boost::mpl::true_ ) const
+ result_type create_kwd(Terminal const &term, Subject const & subject, Modifiers const& /*modifiers*/, boost::mpl::true_ ) const
{
return create_kwd_string(term,subject,no_case());
}
@@ -721,7 +727,7 @@ namespace boost { namespace spirit { namespace qi
);
}
template <typename Terminal>
- result_type create_kwd(Terminal const &term, Subject const & subject, Modifiers const& modifiers, boost::mpl::true_ ) const
+ result_type create_kwd(Terminal const &term, Subject const & subject, Modifiers const& /*modifiers*/, boost::mpl::true_ ) const
{
return create_kwd_string(term,subject,no_case());
}
@@ -896,7 +902,7 @@ namespace boost { namespace spirit { namespace qi
template <typename Terminal>
result_type operator()(
- Terminal const& term, Subject const& subject, Modifiers const& modifiers) const
+ Terminal const& term, Subject const& subject, Modifiers const& /*modifiers*/) const
{
typename spirit::detail::get_encoding<Modifiers,
spirit::char_encoding::standard>::type encoding;
@@ -919,7 +925,7 @@ namespace boost { namespace spirit { namespace qi
template <typename Terminal>
result_type operator()(
- Terminal const& term, Subject const& subject, Modifiers const& modifiers) const
+ Terminal const& term, Subject const& subject, Modifiers const& /*modifiers*/) const
{
typename spirit::detail::get_encoding<Modifiers,
spirit::char_encoding::standard>::type encoding;
diff --git a/boost/spirit/repository/home/qi/directive/seek.hpp b/boost/spirit/repository/home/qi/directive/seek.hpp
index 951a337cbe..34bdd83892 100644
--- a/boost/spirit/repository/home/qi/directive/seek.hpp
+++ b/boost/spirit/repository/home/qi/directive/seek.hpp
@@ -1,9 +1,9 @@
-/*//////////////////////////////////////////////////////////////////////////////
+/*=============================================================================
Copyright (c) 2011 Jamboree
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//////////////////////////////////////////////////////////////////////////////*/
+=============================================================================*/
#ifndef BOOST_SPIRIT_REPOSITORY_QI_SEEK
#define BOOST_SPIRIT_REPOSITORY_QI_SEEK
diff --git a/boost/spirit/repository/home/qi/nonterminal/subrule.hpp b/boost/spirit/repository/home/qi/nonterminal/subrule.hpp
index 4a29f44e65..23892e0dcf 100644
--- a/boost/spirit/repository/home/qi/nonterminal/subrule.hpp
+++ b/boost/spirit/repository/home/qi/nonterminal/subrule.hpp
@@ -54,46 +54,22 @@
namespace boost { namespace spirit { namespace repository { namespace qi
{
///////////////////////////////////////////////////////////////////////////
- // subrule_group:
+ // subrule_group_parser:
// - parser representing a group of subrule definitions (one or more),
// invokes first subrule on entry,
- // - also a Proto terminal, so that a group behaves like any Spirit
- // expression.
///////////////////////////////////////////////////////////////////////////
template <typename Defs>
- struct subrule_group
- : proto::extends<
- typename proto::terminal<
- spirit::qi::reference<subrule_group<Defs> const>
- >::type
- , subrule_group<Defs>
- >
- , spirit::qi::parser<subrule_group<Defs> >
+ struct subrule_group_parser
+ : spirit::qi::parser<subrule_group_parser<Defs> >
{
// Fusion associative sequence, associating each subrule ID in this
// group (as an MPL integral constant) with its definition
typedef Defs defs_type;
- typedef subrule_group<Defs> this_type;
- typedef spirit::qi::reference<this_type const> reference_;
- typedef typename proto::terminal<reference_>::type terminal;
- typedef proto::extends<terminal, this_type> base_type;
-
- static size_t const params_size =
- // Forward to first subrule.
- remove_reference<
- typename fusion::result_of::front<Defs>::type
- >::type::second_type::params_size;
+ typedef subrule_group_parser<Defs> this_type;
- subrule_group(subrule_group const& rhs)
- : base_type(terminal::make(reference_(*this)))
- , defs(rhs.defs)
- {
- }
-
- explicit subrule_group(Defs const& defs)
- : base_type(terminal::make(reference_(*this)))
- , defs(defs)
+ explicit subrule_group_parser(Defs const& defs)
+ : defs(defs)
{
}
@@ -287,6 +263,41 @@ namespace boost { namespace spirit { namespace repository { namespace qi
return fusion::front(defs).second.binder.p.what(context);
}
+ Defs defs;
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ // subrule_group:
+ // - a Proto terminal, so that a group behaves like any Spirit
+ // expression.
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename Defs>
+ struct subrule_group
+ : proto::extends<
+ typename proto::terminal<
+ subrule_group_parser<Defs>
+ >::type
+ , subrule_group<Defs>
+ >
+ {
+ typedef subrule_group_parser<Defs> parser_type;
+ typedef typename proto::terminal<parser_type>::type terminal;
+
+ static size_t const params_size =
+ // Forward to first subrule.
+ remove_reference<
+ typename fusion::result_of::front<Defs>::type
+ >::type::second_type::params_size;
+
+ explicit subrule_group(Defs const& defs)
+ : subrule_group::proto_extends(terminal::make(parser_type(defs)))
+ {
+ }
+
+ parser_type const& parser() const { return proto::value(*this); }
+
+ Defs const& defs() const { return parser().defs; }
+
template <typename Defs2>
subrule_group<
typename fusion::result_of::as_map<
@@ -298,15 +309,29 @@ namespace boost { namespace spirit { namespace repository { namespace qi
typename fusion::result_of::as_map<
typename fusion::result_of::join<
Defs const, Defs2 const>::type>::type> result_type;
- return result_type(fusion::as_map(fusion::join(defs, other.defs)));
+ return result_type(fusion::as_map(fusion::join(defs(), other.defs())));
+ }
+
+ // non-const versions needed to suppress proto's comma op kicking in
+ template <typename Defs2>
+ friend subrule_group<
+ typename fusion::result_of::as_map<
+ typename fusion::result_of::join<
+ Defs const, Defs2 const>::type>::type>
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ operator,(subrule_group&& left, subrule_group<Defs2>&& other)
+#else
+ operator,(subrule_group& left, subrule_group<Defs2>& other)
+#endif
+ {
+ return static_cast<subrule_group const&>(left)
+ .operator,(static_cast<subrule_group<Defs2> const&>(other));
}
// bring in the operator() overloads
- this_type const& get_parameterized_subject() const { return *this; }
- typedef this_type parameterized_subject_type;
+ parser_type const& get_parameterized_subject() const { return parser(); }
+ typedef parser_type parameterized_subject_type;
#include <boost/spirit/home/qi/nonterminal/detail/fcall.hpp>
-
- Defs defs;
};
///////////////////////////////////////////////////////////////////////////
@@ -378,13 +403,20 @@ namespace boost { namespace spirit { namespace repository { namespace qi
typedef mpl::vector<T1, T2> template_params;
- // locals_type is a sequence of types to be used as local variables
+ // The subrule's locals_type: a sequence of types to be used as local variables
typedef typename
spirit::detail::extract_locals<template_params>::type
locals_type;
+ // The subrule's encoding type
typedef typename
- spirit::detail::extract_sig<template_params>::type
+ spirit::detail::extract_encoding<template_params>::type
+ encoding_type;
+
+ // The subrule's signature
+ typedef typename
+ spirit::detail::extract_sig<template_params, encoding_type
+ , spirit::qi::domain>::type
sig_type;
// This is the subrule's attribute type
@@ -461,42 +493,34 @@ namespace boost { namespace spirit { namespace repository { namespace qi
def_type(compile<spirit::qi::domain>(expr), name_)));
}
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule const& sr, Expr const& expr)
- {
- typedef group_type_helper<Expr, true> helper;
- typedef typename helper::def_type def_type;
- typedef typename helper::type result_type;
- return result_type(fusion::make_map<id_type>(
- def_type(compile<spirit::qi::domain>(expr), sr.name_)));
- }
+#define SUBRULE_MODULUS_ASSIGN_OPERATOR(lhs_ref, rhs_ref) \
+ template <typename Expr> \
+ friend typename group_type_helper<Expr, true>::type \
+ operator%=(subrule lhs_ref sr, Expr rhs_ref expr) \
+ { \
+ typedef group_type_helper<Expr, true> helper; \
+ typedef typename helper::def_type def_type; \
+ typedef typename helper::type result_type; \
+ return result_type(fusion::make_map<id_type>( \
+ def_type(compile<spirit::qi::domain>(expr), sr.name_))); \
+ } \
+ /**/
// non-const versions needed to suppress proto's %= kicking in
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule const& sr, Expr& expr)
- {
- return operator%=(
- sr
- , static_cast<Expr const&>(expr));
- }
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule& sr, Expr const& expr)
- {
- return operator%=(
- static_cast<subrule const&>(sr)
- , expr);
- }
- template <typename Expr>
- friend typename group_type_helper<Expr, true>::type
- operator%=(subrule& sr, Expr& expr)
- {
- return operator%=(
- static_cast<subrule const&>(sr)
- , static_cast<Expr const&>(expr));
- }
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(const&, const&)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(const&, &&)
+#else
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(const&, &)
+#endif
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(&, const&)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(&, &&)
+#else
+ SUBRULE_MODULUS_ASSIGN_OPERATOR(&, &)
+#endif
+
+#undef SUBRULE_MODULUS_ASSIGN_OPERATOR
std::string const& name() const
{
diff --git a/boost/spirit/repository/home/qi/operator/detail/keywords.hpp b/boost/spirit/repository/home/qi/operator/detail/keywords.hpp
index 43aa133468..ee58cdc278 100644
--- a/boost/spirit/repository/home/qi/operator/detail/keywords.hpp
+++ b/boost/spirit/repository/home/qi/operator/detail/keywords.hpp
@@ -57,7 +57,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
bool call_subject_unused(
Subject const &subject, Iterator &first, Iterator const &last
, Context& context, Skipper const& skipper
- , Index& idx ) const
+ , Index& /*idx*/ ) const
{
Iterator save = first;
skipper_keyword_marker<Skipper,NoCasePass>
@@ -76,7 +76,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
bool call_subject(
Subject const &subject, Iterator &first, Iterator const &last
, Context& context, Skipper const& skipper
- , Index& idx ) const
+ , Index& /*idx*/ ) const
{
Iterator save = first;
@@ -164,9 +164,11 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
};
// never called, but needed for decltype-based result_of (C++0x)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Element>
typename result<element_char_type(Element)>::type
- operator()(Element&) const;
+ operator()(Element&&) const;
+#endif
};
// Compute the list of character types of the child kwd directives
@@ -264,9 +266,11 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
};
// never called, but needed for decltype-based result_of (C++0x)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Element>
typename result<element_case_type(Element)>::type
- operator()(Element&) const;
+ operator()(Element&&) const;
+#endif
};
// Compute the list of character types of the child kwd directives
@@ -440,7 +444,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
Iterator &first,
const Iterator &last,
const ParseVisitor &parse_visitor,
- const Skipper &skipper) const
+ const Skipper &/*skipper*/) const
{
if(parser_index_type* val_ptr =
lookup->find(first,last,first_pass_filter_type()))
@@ -459,7 +463,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
const Iterator &last,
const ParseVisitor &parse_visitor,
const NoCaseParseVisitor &no_case_parse_visitor,
- const Skipper &skipper) const
+ const Skipper &/*skipper*/) const
{
Iterator saved_first = first;
if(parser_index_type* val_ptr =
@@ -503,27 +507,27 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
template <typename Iterator,typename ParseVisitor, typename NoCaseParseVisitor,typename Skipper>
bool parse(
- Iterator &first,
- const Iterator &last,
- const ParseVisitor &parse_visitor,
- const NoCaseParseVisitor &no_case_parse_visitor,
- const Skipper &skipper) const
+ Iterator &/*first*/,
+ const Iterator &/*last*/,
+ const ParseVisitor &/*parse_visitor*/,
+ const NoCaseParseVisitor &/*no_case_parse_visitor*/,
+ const Skipper &/*skipper*/) const
{
return false;
}
template <typename Iterator,typename ParseVisitor, typename Skipper>
bool parse(
- Iterator &first,
- const Iterator &last,
- const ParseVisitor &parse_visitor,
- const Skipper &skipper) const
+ Iterator &/*first*/,
+ const Iterator &/*last*/,
+ const ParseVisitor &/*parse_visitor*/,
+ const Skipper &/*skipper*/) const
{
return false;
}
template <typename ParseFunction>
- bool parse( ParseFunction &function ) const
+ bool parse( ParseFunction &/*function*/ ) const
{
return false;
}
@@ -550,7 +554,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
}
template <typename T, typename Position, typename Action>
- int call(const spirit::qi::action<T,Action> &parser, const Position position ) const
+ int call(const spirit::qi::action<T,Action> &parser, const Position /*position*/ ) const
{
// Get the initial state of the flags array and store it in the flags initializer
flags[Position::value]=parser.subject.iter.flag_init();
@@ -558,7 +562,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
}
template <typename T, typename Position>
- int call( const T & parser, const Position position) const
+ int call( const T & parser, const Position /*position*/) const
{
// Get the initial state of the flags array and store it in the flags initializer
flags[Position::value]=parser.iter.flag_init();
@@ -566,7 +570,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names
}
template <typename T, typename Position>
- int call( const spirit::qi::hold_directive<T> & parser, const Position position) const
+ int call( const spirit::qi::hold_directive<T> & parser, const Position /*position*/) const
{
// Get the initial state of the flags array and store it in the flags initializer
flags[Position::value]=parser.subject.iter.flag_init();
diff --git a/boost/spirit/repository/home/qi/operator/keywords.hpp b/boost/spirit/repository/home/qi/operator/keywords.hpp
index f6b05fcb39..350c2fe775 100644
--- a/boost/spirit/repository/home/qi/operator/keywords.hpp
+++ b/boost/spirit/repository/home/qi/operator/keywords.hpp
@@ -31,6 +31,7 @@
#include <boost/spirit/home/qi/action/action.hpp>
#include <boost/spirit/home/qi/directive/hold.hpp>
#include <boost/mpl/count_if.hpp>
+#include <boost/mpl/greater.hpp>
#include <boost/mpl/range_c.hpp>
#include <boost/mpl/copy.hpp>
#include <boost/mpl/size.hpp>
diff --git a/boost/spirit/repository/home/qi/primitive/advance.hpp b/boost/spirit/repository/home/qi/primitive/advance.hpp
index 11a74bbb13..f4cb1918bd 100644
--- a/boost/spirit/repository/home/qi/primitive/advance.hpp
+++ b/boost/spirit/repository/home/qi/primitive/advance.hpp
@@ -6,13 +6,14 @@
#if !defined(BOOST_SPIRIT_REPOSITORY_QI_ADVANCE_JAN_23_2011_1203PM)
#define BOOST_SPIRIT_REPOSITORY_QI_ADVANCE_JAN_23_2011_1203PM
+#include <boost/spirit/home/support/terminal.hpp>
#include <boost/spirit/include/qi_parse.hpp>
///////////////////////////////////////////////////////////////////////////////
// definition the place holder
namespace boost { namespace spirit { namespace repository { namespace qi
{
- BOOST_SPIRIT_TERMINAL_EX(advance);
+ BOOST_SPIRIT_TERMINAL_EX(advance)
}}}}
///////////////////////////////////////////////////////////////////////////////
diff --git a/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp b/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp
index cd4ab0c0ca..48c799dca0 100644
--- a/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp
+++ b/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp
@@ -37,8 +37,10 @@ namespace boost { namespace spirit
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace repository { namespace qi
{
- using repository::flush_multi_pass_type;
+#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
using repository::flush_multi_pass;
+#endif
+ using repository::flush_multi_pass_type;
///////////////////////////////////////////////////////////////////////////
// for a flush_multi_pass_parser generated parser
diff --git a/boost/spirit/repository/home/qi/primitive/iter_pos.hpp b/boost/spirit/repository/home/qi/primitive/iter_pos.hpp
index 6925ac2241..487ff9410c 100644
--- a/boost/spirit/repository/home/qi/primitive/iter_pos.hpp
+++ b/boost/spirit/repository/home/qi/primitive/iter_pos.hpp
@@ -12,7 +12,7 @@
// definition the place holder
namespace boost { namespace spirit { namespace repository { namespace qi
{
- BOOST_SPIRIT_TERMINAL(iter_pos);
+ BOOST_SPIRIT_TERMINAL(iter_pos)
}}}}
///////////////////////////////////////////////////////////////////////////////
diff --git a/boost/spirit/repository/home/support/seek.hpp b/boost/spirit/repository/home/support/seek.hpp
index bb9e04e1b7..71cabce07d 100644
--- a/boost/spirit/repository/home/support/seek.hpp
+++ b/boost/spirit/repository/home/support/seek.hpp
@@ -1,9 +1,9 @@
-/*//////////////////////////////////////////////////////////////////////////////
+/*=============================================================================
Copyright (c) 2011 Jamboree
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//////////////////////////////////////////////////////////////////////////////*/
+=============================================================================*/
#ifndef BOOST_SPIRIT_REPOSITORY_SUPPORT_SEEK
#define BOOST_SPIRIT_REPOSITORY_SUPPORT_SEEK