Chris@16: /*============================================================================= Chris@16: Copyright (c) 2001-2011 Joel de Guzman Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #if !defined(BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM) Chris@16: #define BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM Chris@16: Chris@16: #if defined(_MSC_VER) Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace spirit { namespace qi Chris@16: { Chris@16: /////////////////////////////////////////////////////////////////////////// Chris@16: // Move the /first/ iterator to the first non-matching position Chris@16: // given a skip-parser. The function is a no-op if unused_type is Chris@16: // passed as the skip-parser. Chris@16: /////////////////////////////////////////////////////////////////////////// Chris@16: template Chris@16: inline void skip_over(Iterator& first, Iterator const& last, T const& skipper) Chris@16: { Chris@16: while (first != last && skipper.parse(first, last, unused, unused, unused)) Chris@16: /***/; Chris@16: } Chris@16: Chris@16: template Chris@16: inline void skip_over(Iterator&, Iterator const&, unused_type) Chris@16: { Chris@16: } Chris@16: Chris@16: template Chris@16: inline void skip_over(Iterator&, Iterator const& Chris@16: , detail::unused_skipper const&) Chris@16: { Chris@16: } Chris@16: Chris@16: }}} Chris@16: Chris@16: #endif