Chris@102: /*============================================================================= Chris@102: Copyright (c) 2001-2014 Joel de Guzman Chris@102: Chris@102: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@102: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@102: ==============================================================================*/ Chris@102: #if !defined(BOOST_SPIRIT_X3_CHAR_PARSER_APR_16_2006_0906AM) Chris@102: #define BOOST_SPIRIT_X3_CHAR_PARSER_APR_16_2006_0906AM Chris@102: Chris@102: #if defined(_MSC_VER) Chris@102: #pragma once Chris@102: #endif Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: namespace boost { namespace spirit { namespace x3 Chris@102: { Chris@102: /////////////////////////////////////////////////////////////////////////// Chris@102: // The base char_parser Chris@102: /////////////////////////////////////////////////////////////////////////// Chris@102: template Chris@102: struct char_parser : parser Chris@102: { Chris@102: template Chris@102: bool parse( Chris@102: Iterator& first, Iterator const& last Chris@102: , Context const& context, unused_type, Attribute& attr) const Chris@102: { Chris@102: x3::skip_over(first, last, context); Chris@102: Chris@102: if (first != last && this->derived().test(*first, context)) Chris@102: { Chris@102: x3::traits::move_to(*first, attr); Chris@102: ++first; Chris@102: return true; Chris@102: } Chris@102: return false; Chris@102: } Chris@102: }; Chris@102: }}} Chris@102: Chris@102: #endif