File indexing completed on 2025-01-18 09:53:50
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_XPRESSIVE_DETAIL_STATIC_TRANSFORMS_AS_MARKER_HPP_EAN_04_01_2007
0009 #define BOOST_XPRESSIVE_DETAIL_STATIC_TRANSFORMS_AS_MARKER_HPP_EAN_04_01_2007
0010
0011
0012 #if defined(_MSC_VER)
0013 # pragma once
0014 #endif
0015
0016 #include <boost/xpressive/detail/detail_fwd.hpp>
0017 #include <boost/xpressive/detail/static/static.hpp>
0018 #include <boost/proto/core.hpp>
0019
0020 namespace boost { namespace xpressive { namespace grammar_detail
0021 {
0022
0023
0024
0025
0026 struct as_marker : proto::transform<as_marker>
0027 {
0028 template<typename Expr, typename State, typename Data>
0029 struct impl : proto::transform_impl<Expr, State, Data>
0030 {
0031 typedef
0032 typename shift_right<
0033 terminal<detail::mark_begin_matcher>::type
0034 , typename shift_right<
0035 typename proto::result_of::right<typename impl::expr>::type
0036 , terminal<detail::mark_end_matcher>::type
0037 >::type
0038 >::type
0039 result_type;
0040
0041 result_type operator ()(
0042 typename impl::expr_param expr
0043 , typename impl::state_param
0044 , typename impl::data_param
0045 ) const
0046 {
0047 int mark_nbr = detail::get_mark_number(proto::left(expr));
0048 detail::mark_begin_matcher begin(mark_nbr);
0049 detail::mark_end_matcher end(mark_nbr);
0050
0051 result_type that = {{begin}, {proto::right(expr), {end}}};
0052 return that;
0053 }
0054 };
0055 };
0056 }}}
0057
0058 #endif