1 ///////////////////////////////////////////////////////////////////////////////
2 // attr_end_matcher.hpp
4 // Copyright 2008 Eric Niebler. Distributed under the Boost
5 // Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ATTR_END_MATCHER_HPP_EAN_06_09_2007
9 #define BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ATTR_END_MATCHER_HPP_EAN_06_09_2007
11 // MS compatible compilers support #pragma once
16 #include <boost/xpressive/detail/detail_fwd.hpp>
17 #include <boost/xpressive/detail/core/quant_style.hpp>
18 #include <boost/xpressive/detail/core/state.hpp>
20 namespace boost { namespace xpressive { namespace detail
23 ///////////////////////////////////////////////////////////////////////////////
26 struct attr_end_matcher
27 : quant_style<quant_none, 0, false>
29 template<typename BidiIter, typename Next>
30 static bool match(match_state<BidiIter> &state, Next const &next)
32 attr_context old_attr_context = state.attr_context_;
33 state.attr_context_ = *old_attr_context.prev_attr_context_;
40 state.attr_context_ = old_attr_context;