Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/spirit/home/qi/skip_over.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM)
0008 #define BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM
0009 
0010 #if defined(_MSC_VER)
0011 #pragma once
0012 #endif
0013 
0014 #include <boost/spirit/home/support/unused.hpp>
0015 #include <boost/spirit/home/qi/detail/unused_skipper.hpp>
0016 
0017 namespace boost { namespace spirit { namespace qi
0018 {
0019     ///////////////////////////////////////////////////////////////////////////
0020     // Move the /first/ iterator to the first non-matching position
0021     // given a skip-parser. The function is a no-op if unused_type is
0022     // passed as the skip-parser.
0023     ///////////////////////////////////////////////////////////////////////////
0024     template <typename Iterator, typename T>
0025     inline void skip_over(Iterator& first, Iterator const& last, T const& skipper)
0026     {
0027         while (skipper.parse(first, last, unused, unused, unused))
0028             /***/;
0029     }
0030 
0031     template <typename Iterator>
0032     inline void skip_over(Iterator&, Iterator const&, unused_type)
0033     {
0034     }
0035 
0036     template <typename Iterator, typename Skipper>
0037     inline void skip_over(Iterator&, Iterator const&
0038       , detail::unused_skipper<Skipper> const&)
0039     {
0040     }
0041 
0042 }}}
0043 
0044 #endif