Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:48

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // alternate_end_matcher.hpp
0003 //
0004 //  Copyright 2008 Eric Niebler. Distributed under the Boost
0005 //  Software License, Version 1.0. (See accompanying file
0006 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 
0008 #ifndef BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ALTERNATE_END_MATCHER_HPP_EAN_10_04_2005
0009 #define BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ALTERNATE_END_MATCHER_HPP_EAN_10_04_2005
0010 
0011 // MS compatible compilers support #pragma once
0012 #if defined(_MSC_VER)
0013 # pragma once
0014 # pragma warning(push)
0015 # pragma warning(disable : 4100) // unreferenced formal parameter
0016 #endif
0017 
0018 #include <boost/xpressive/detail/detail_fwd.hpp>
0019 #include <boost/xpressive/detail/core/quant_style.hpp>
0020 #include <boost/xpressive/detail/core/state.hpp>
0021 
0022 namespace boost { namespace xpressive { namespace detail
0023 {
0024 
0025     ///////////////////////////////////////////////////////////////////////////////
0026     // alternate_end_matcher
0027     //
0028     struct alternate_end_matcher
0029       : quant_style_assertion
0030     {
0031         mutable void const *back_;
0032 
0033         alternate_end_matcher()
0034           : back_(0)
0035         {
0036         }
0037 
0038         template<typename BidiIter, typename Next>
0039         bool match(match_state<BidiIter> &state, Next const &next) const
0040         {
0041             return next.pop_match(state, this->back_);
0042         }
0043     };
0044 
0045 }}}
0046 
0047 #if defined(_MSC_VER)
0048 # pragma warning(pop)
0049 #endif
0050 
0051 #endif