Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
regex_actions.hpp File Reference

Defines the syntax elements of xpressive's action expressions. More...

#include <boost/config.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>
#include <boost/ref.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/noncopyable.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/throw_exception.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/core/state.hpp>
#include <boost/xpressive/detail/core/matcher/attr_matcher.hpp>
#include <boost/xpressive/detail/core/matcher/attr_end_matcher.hpp>
#include <boost/xpressive/detail/core/matcher/attr_begin_matcher.hpp>
#include <boost/xpressive/detail/core/matcher/predicate_matcher.hpp>
#include <boost/xpressive/detail/utility/ignore_unused.hpp>
#include <boost/xpressive/detail/static/type_traits.hpp>
#include <boost/typeof/std/map.hpp>
#include <boost/typeof/std/string.hpp>
#include <boost/proto/core.hpp>
#include <boost/proto/transform.hpp>
#include <boost/xpressive/detail/core/matcher/action_matcher.hpp>
#include <BOOST_PROTO_LOCAL_ITERATE()>
Include dependency graph for regex_actions.hpp:

Classes

struct  boost::xpressive::detail::action_arg< T, U >
 
struct  boost::xpressive::detail::value_wrapper< T >
 
struct  boost::xpressive::detail::check_tag
 
struct  boost::xpressive::detail::BindArg
 
struct  boost::xpressive::detail::BindArg::result< Sig >
 
struct  boost::xpressive::detail::BindArg::result< This(MatchResults, Expr)>
 
struct  boost::xpressive::detail::let_tag
 
struct  boost::xpressive::detail::BindArgs
 
struct  boost::xpressive::detail::let_domain
 
struct  boost::xpressive::detail::let_< Expr >
 
struct  boost::xpressive::op::at
 at is a PolymorphicFunctionObject for indexing into a sequence More...
 
struct  boost::xpressive::op::at::result< Sig >
 
struct  boost::xpressive::op::at::result< This(Cont &, Idx)>
 
struct  boost::xpressive::op::at::result< This(Cont const &, Idx)>
 
struct  boost::xpressive::op::at::result< This(Cont, Idx)>
 
struct  boost::xpressive::op::push
 push is a PolymorphicFunctionObject for pushing an element into a container. More...
 
struct  boost::xpressive::op::push_back
 push_back is a PolymorphicFunctionObject for pushing an element into the back of a container. More...
 
struct  boost::xpressive::op::push_front
 push_front is a PolymorphicFunctionObject for pushing an element into the front of a container. More...
 
struct  boost::xpressive::op::pop
 pop is a PolymorphicFunctionObject for popping an element from a container. More...
 
struct  boost::xpressive::op::pop_back
 pop_back is a PolymorphicFunctionObject for popping an element from the back of a container. More...
 
struct  boost::xpressive::op::pop_front
 pop_front is a PolymorphicFunctionObject for popping an element from the front of a container. More...
 
struct  boost::xpressive::op::front
 front is a PolymorphicFunctionObject for fetching the front element of a container. More...
 
struct  boost::xpressive::op::front::result< Sig >
 
struct  boost::xpressive::op::front::result< This(Sequence)>
 
struct  boost::xpressive::op::back
 back is a PolymorphicFunctionObject for fetching the back element of a container. More...
 
struct  boost::xpressive::op::back::result< Sig >
 
struct  boost::xpressive::op::back::result< This(Sequence)>
 
struct  boost::xpressive::op::top
 top is a PolymorphicFunctionObject for fetching the top element of a stack. More...
 
struct  boost::xpressive::op::top::result< Sig >
 
struct  boost::xpressive::op::top::result< This(Sequence)>
 
struct  boost::xpressive::op::first
 first is a PolymorphicFunctionObject for fetching the first element of a pair. More...
 
struct  boost::xpressive::op::first::result< Sig >
 
struct  boost::xpressive::op::first::result< This(Pair)>
 
struct  boost::xpressive::op::second
 second is a PolymorphicFunctionObject for fetching the second element of a pair. More...
 
struct  boost::xpressive::op::second::result< Sig >
 
struct  boost::xpressive::op::second::result< This(Pair)>
 
struct  boost::xpressive::op::matched
 matched is a PolymorphicFunctionObject for assessing whether a sub_match object matched or not. More...
 
struct  boost::xpressive::op::length
 length is a PolymorphicFunctionObject for fetching the length of sub_match. More...
 
struct  boost::xpressive::op::length::result< Sig >
 
struct  boost::xpressive::op::length::result< This(Sub)>
 
struct  boost::xpressive::op::str
 str is a PolymorphicFunctionObject for turning a sub_match into an equivalent std::string. More...
 
struct  boost::xpressive::op::str::result< Sig >
 
struct  boost::xpressive::op::str::result< This(Sub)>
 
struct  boost::xpressive::op::insert
 insert is a PolymorphicFunctionObject for inserting a value or a sequence of values into a sequence container, an associative container, or a string. More...
 
struct  boost::xpressive::op::insert::detail
 INTERNAL ONLY. More...
 
struct  boost::xpressive::op::insert::detail::result_detail< Sig, EnableIf >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, Value), void >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, It, Value), typename disable_if< mpl::or_< is_integral< typename remove_cv< typename remove_reference< It >::type >::type >, is_same< typename remove_cv< typename remove_reference< It >::type >::type, typename remove_cv< typename remove_reference< Value >::type >::type > > >::type >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, Size, T), typename enable_if< is_integral< typename remove_cv< typename remove_reference< Size >::type >::type > >::type >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, It, It), void >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, It, Size, Value), typename disable_if< is_integral< typename remove_cv< typename remove_reference< It >::type >::type > >::type >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, Size, A0, A1), typename enable_if< is_integral< typename remove_cv< typename remove_reference< Size >::type >::type > >::type >
 
struct  boost::xpressive::op::insert::detail::result_detail< This(Cont, Pos0, String, Pos1, Length)>
 
struct  boost::xpressive::op::insert::result< Sig >
 
struct  boost::xpressive::op::make_pair
 make_pair is a PolymorphicFunctionObject for building a std::pair out of two parameters More...
 
struct  boost::xpressive::op::make_pair::result< Sig >
 
struct  boost::xpressive::op::make_pair::result< This(First, Second)>
 
struct  boost::xpressive::op::as< T >
 as<> is a PolymorphicFunctionObject for lexically casting a parameter to a different type. More...
 
struct  boost::xpressive::op::static_cast_< T >
 static_cast_<> is a PolymorphicFunctionObject for statically casting a parameter to a different type. More...
 
struct  boost::xpressive::op::dynamic_cast_< T >
 dynamic_cast_<> is a PolymorphicFunctionObject for dynamically casting a parameter to a different type. More...
 
struct  boost::xpressive::op::const_cast_< T >
 const_cast_<> is a PolymorphicFunctionObject for const-casting a parameter to a cv qualification. More...
 
struct  boost::xpressive::op::construct< T >
 construct<> is a PolymorphicFunctionObject for constructing a new object. More...
 
struct  boost::xpressive::op::throw_< Except >
 throw_<> is a PolymorphicFunctionObject for throwing an exception. More...
 
struct  boost::xpressive::op::unwrap_reference
 unwrap_reference is a PolymorphicFunctionObject for unwrapping a boost::reference_wrapper<>. More...
 
struct  boost::xpressive::op::unwrap_reference::result< Sig >
 
struct  boost::xpressive::op::unwrap_reference::result< This(Ref)>
 
struct  boost::xpressive::op::unwrap_reference::result< This(Ref &)>
 
struct  boost::xpressive::function< PolymorphicFunctionObject >
 A unary metafunction that turns an ordinary function object type into the type of a deferred function object for use in xpressive semantic actions. More...
 
struct  boost::xpressive::value< T >
 value<> is a lazy wrapper for a value that can be used in xpressive semantic actions. More...
 
struct  boost::xpressive::reference< T >
 reference<> is a lazy wrapper for a reference that can be used in xpressive semantic actions. More...
 
struct  boost::xpressive::local< T >
 local<> is a lazy wrapper for a reference to a value that is stored within the local itself. More...
 
struct  boost::xpressive::placeholder< T, I, Dummy >
 For defining a placeholder to stand in for a variable a semantic action. More...
 
struct  boost::xpressive::detail::mark_nbr
 
struct  boost::xpressive::detail::ReplaceAlgo
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::xpressive
 
 boost::xpressive::detail
 
 boost::xpressive::op
 

Macros

#define BOOST_PROTO_LOCAL_MACRO(N, typename_A, A_const_ref, A_const_ref_a, a)
 A lazy funtion for constructing objects objects of the specified type. More...
 
#define BOOST_PROTO_LOCAL_a   BOOST_PROTO_a
 INTERNAL ONLY. More...
 
#define BOOST_PROTO_LOCAL_LIMITS   (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY))
 INTERNAL ONLY. More...
 

Typedefs

typedef
boost::proto::functional::make_expr
< proto::tag::function,
proto::default_domain
boost::xpressive::detail::make_function
 

Functions

template<typename Args , typename BidiIter >
void boost::xpressive::detail::bind_args (let_< Args > const &args, match_results< BidiIter > &what)
 
template<typename T , typename A >
detail::make_function::impl
< op::as< T > const, A const & >
::result_type const 
boost::xpressive::as (A const &a)
 as() is a lazy funtion for lexically casting a parameter to a different type. More...
 
template<typename T , typename A >
detail::make_function::impl
< op::static_cast_< T > const,
A const & >::result_type const 
boost::xpressive::static_cast_ (A const &a)
 static_cast_ is a lazy funtion for statically casting a parameter to a different type. More...
 
template<typename T , typename A >
detail::make_function::impl
< op::dynamic_cast_< T > const,
A const & >::result_type const 
boost::xpressive::dynamic_cast_ (A const &a)
 dynamic_cast_ is a lazy funtion for dynamically casting a parameter to a different type. More...
 
template<typename T , typename A >
detail::make_function::impl
< op::const_cast_< T > const,
A const & >::result_type const 
boost::xpressive::const_cast_ (A const &a)
 dynamic_cast_ is a lazy funtion for const-casting a parameter to a different type. More...
 
template<typename T >
value< T > const boost::xpressive::val (T const &t)
 Helper for constructing value<> objects. More...
 
template<typename T >
reference< T > const boost::xpressive::ref (T &t)
 Helper for constructing reference<> objects. More...
 
template<typename T >
reference< T const > const boost::xpressive::cref (T const &t)
 Helper for constructing reference<> objects that store a reference to const. More...
 
void boost::xpressive::detail::ignore_unused_regex_actions ()
 

Variables

function< op::at >::type const boost::xpressive::at = {{}}
 at is a lazy PolymorphicFunctionObject for indexing into a sequence in an xpressive semantic action. More...
 
function< op::push >::type const boost::xpressive::push = {{}}
 push is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. More...
 
function< op::push_back >
::type const 
boost::xpressive::push_back = {{}}
 push_back is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. More...
 
function< op::push_front >
::type const 
boost::xpressive::push_front = {{}}
 push_front is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. More...
 
function< op::pop >::type const boost::xpressive::pop = {{}}
 pop is a lazy PolymorphicFunctionObject for popping the top element from a sequence in an xpressive semantic action. More...
 
function< op::pop_back >::type
const 
boost::xpressive::pop_back = {{}}
 pop_back is a lazy PolymorphicFunctionObject for popping the back element from a sequence in an xpressive semantic action. More...
 
function< op::pop_front >
::type const 
boost::xpressive::pop_front = {{}}
 pop_front is a lazy PolymorphicFunctionObject for popping the front element from a sequence in an xpressive semantic action. More...
 
function< op::top >::type const boost::xpressive::top = {{}}
 top is a lazy PolymorphicFunctionObject for accessing the top element from a stack in an xpressive semantic action. More...
 
function< op::back >::type const boost::xpressive::back = {{}}
 back is a lazy PolymorphicFunctionObject for fetching the back element of a sequence in an xpressive semantic action. More...
 
function< op::front >::type const boost::xpressive::front = {{}}
 front is a lazy PolymorphicFunctionObject for fetching the front element of a sequence in an xpressive semantic action. More...
 
function< op::first >::type const boost::xpressive::first = {{}}
 first is a lazy PolymorphicFunctionObject for accessing the first element of a std::pair<> in an xpressive semantic action. More...
 
function< op::second >::type const boost::xpressive::second = {{}}
 second is a lazy PolymorphicFunctionObject for accessing the second element of a std::pair<> in an xpressive semantic action. More...
 
function< op::matched >::type const boost::xpressive::matched = {{}}
 matched is a lazy PolymorphicFunctionObject for accessing the matched member of a xpressive::sub_match<> in an xpressive semantic action. More...
 
function< op::length >::type const boost::xpressive::length = {{}}
 length is a lazy PolymorphicFunctionObject for computing the length of a xpressive::sub_match<> in an xpressive semantic action. More...
 
function< op::str >::type const boost::xpressive::str = {{}}
 str is a lazy PolymorphicFunctionObject for converting a xpressive::sub_match<> to a std::basic_string<> in an xpressive semantic action. More...
 
function< op::insert >::type const boost::xpressive::insert = {{}}
 insert is a lazy PolymorphicFunctionObject for inserting a value or a range of values into a sequence in an xpressive semantic action. More...
 
function< op::make_pair >
::type const 
boost::xpressive::make_pair = {{}}
 make_pair is a lazy PolymorphicFunctionObject for making a std::pair<> in an xpressive semantic action. More...
 
function< op::unwrap_reference >
::type const 
boost::xpressive::unwrap_reference = {{}}
 unwrap_reference is a lazy PolymorphicFunctionObject for unwrapping a boost::reference_wrapper<> in an xpressive semantic action. More...
 
proto::terminal
< detail::check_tag >::type
const 
boost::xpressive::check = {{}}
 For adding user-defined assertions to your regular expressions. More...
 
detail::let_< proto::terminal
< detail::let_tag >::type >
const 
boost::xpressive::let = {{{}}}
 For binding local variables to placeholders in semantic actions when constructing a regex_iterator or a regex_token_iterator. More...
 

Detailed Description

Defines the syntax elements of xpressive's action expressions.

Macro Definition Documentation

#define BOOST_PROTO_LOCAL_a   BOOST_PROTO_a

INTERNAL ONLY.

#define BOOST_PROTO_LOCAL_LIMITS   (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY))

INTERNAL ONLY.

#define BOOST_PROTO_LOCAL_MACRO (   N,
  typename_A,
  A_const_ref,
  A_const_ref_a,
 
)
Value:
template<typename X2_0 BOOST_PP_COMMA_IF(N) typename_A(N)> \
typename detail::make_function::impl< \
op::construct<X2_0> const \
BOOST_PP_COMMA_IF(N) A_const_ref(N) \
construct(A_const_ref_a(N)) \
{ \
return detail::make_function::impl< \
op::construct<X2_0> const \
BOOST_PP_COMMA_IF(N) A_const_ref(N) \
>()((op::construct<X2_0>()) BOOST_PP_COMMA_IF(N) a(N)); \
} \
\
template<typename X2_0 BOOST_PP_COMMA_IF(N) typename_A(N)> \
typename detail::make_function::impl< \
op::throw_<X2_0> const \
BOOST_PP_COMMA_IF(N) A_const_ref(N) \
throw_(A_const_ref_a(N)) \
{ \
return detail::make_function::impl< \
op::throw_<X2_0> const \
BOOST_PP_COMMA_IF(N) A_const_ref(N) \
>()((op::throw_<X2_0>()) BOOST_PP_COMMA_IF(N) a(N)); \
} \
expression::throw_< ThrowExpr >::type const throw_(ThrowExpr const &throw_expr)
Definition: throw.hpp:67
void const
Definition: is_convertible.hpp:460
#define BOOST_PP_COMMA_IF(cond)
Definition: comma_if.hpp:27
#define template
Definition: instances.hpp:126
boost::proto::functional::make_expr< proto::tag::function, proto::default_domain > make_function
Definition: regex_actions.hpp:150
#define N
Definition: forward_adapter.hpp:198
Allocator Allocator a
Definition: function_template.hpp:727
result_traits< R, F >::type result_type
Definition: bind_template.hpp:15
enable_if< has_static_bounds< Type >, Type >::type construct(const typename interval_traits< Type >::domain_type &low, const typename interval_traits< Type >::domain_type &up)
Definition: interval.hpp:236

A lazy funtion for constructing objects objects of the specified type.

Template Parameters
TThe type of object to construct.
Parameters
argsThe arguments to the constructor.
Returns
A lazy object that, when evaluated, returns T(xs...), where xs... is the result of evaluating the lazy arguments args.... INTERNAL ONLY