File indexing completed on 2025-01-18 09:53:49
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_XPRESSIVE_DETAIL_CORE_FLOW_CONTROL_HPP_EAN_10_04_2005
0009 #define BOOST_XPRESSIVE_DETAIL_CORE_FLOW_CONTROL_HPP_EAN_10_04_2005
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/core/regex_impl.hpp>
0018 #include <boost/xpressive/detail/core/state.hpp>
0019 #include <boost/xpressive/detail/utility/ignore_unused.hpp>
0020
0021 namespace boost { namespace xpressive { namespace detail
0022 {
0023
0024
0025
0026
0027 template<typename BidiIter>
0028 inline bool push_context_match
0029 (
0030 regex_impl<BidiIter> const &impl
0031 , match_state<BidiIter> &state
0032 , matchable<BidiIter> const &next
0033 )
0034 {
0035
0036
0037
0038 if(state.is_active_regex(impl) && state.cur_ == state.sub_match(0).begin_)
0039 {
0040 return next.match(state);
0041 }
0042
0043
0044 match_context<BidiIter> context = state.push_context(impl, next, context);
0045 detail::ignore_unused(context);
0046
0047
0048
0049 return state.pop_context(impl, impl.xpr_->match(state));
0050 }
0051
0052
0053
0054
0055 template<typename BidiIter>
0056 inline bool pop_context_match(match_state<BidiIter> &state)
0057 {
0058
0059
0060 match_context<BidiIter> &context(*state.context_.prev_context_);
0061 state.swap_context(context);
0062
0063
0064 bool success = context.next_ptr_->match(state);
0065
0066
0067 state.swap_context(context);
0068 return success;
0069 }
0070
0071 }}}
0072
0073 #endif
0074