1 /*=============================================================================
2 Copyright (c) 2001-2014 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(BOOST_SPIRIT_X3_CHAR_PARSER_APR_16_2006_0906AM)
8 #define BOOST_SPIRIT_X3_CHAR_PARSER_APR_16_2006_0906AM
10 #include <boost/spirit/home/x3/core/parser.hpp>
11 #include <boost/spirit/home/x3/core/skip_over.hpp>
12 #include <boost/spirit/home/x3/support/traits/move_to.hpp>
13 #include <boost/spirit/home/x3/support/no_case.hpp>
15 namespace boost { namespace spirit { namespace x3
17 ///////////////////////////////////////////////////////////////////////////
18 // The base char_parser
19 ///////////////////////////////////////////////////////////////////////////
20 template <typename Derived>
21 struct char_parser : parser<Derived>
23 template <typename Iterator, typename Context, typename Attribute>
25 Iterator& first, Iterator const& last
26 , Context const& context, unused_type, Attribute& attr) const
28 x3::skip_over(first, last, context);
29 if (first != last && this->derived().test(*first, context))
31 x3::traits::move_to(*first, attr);