File indexing completed on 2025-01-31 10:02:34
0001
0002
0003
0004
0005
0006
0007 #if !defined(BOOST_SPIRIT_X3_CHAR_PARSER_APR_16_2006_0906AM)
0008 #define BOOST_SPIRIT_X3_CHAR_PARSER_APR_16_2006_0906AM
0009
0010 #include <boost/spirit/home/x3/core/parser.hpp>
0011 #include <boost/spirit/home/x3/core/skip_over.hpp>
0012 #include <boost/spirit/home/x3/support/traits/move_to.hpp>
0013 #include <boost/spirit/home/x3/support/no_case.hpp>
0014
0015 namespace boost { namespace spirit { namespace x3
0016 {
0017
0018
0019
0020 template <typename Derived>
0021 struct char_parser : parser<Derived>
0022 {
0023 template <typename Iterator, typename Context, typename Attribute>
0024 bool parse(
0025 Iterator& first, Iterator const& last
0026 , Context const& context, unused_type, Attribute& attr) const
0027 {
0028 x3::skip_over(first, last, context);
0029 if (first != last && this->derived().test(*first, context))
0030 {
0031 x3::traits::move_to(*first, attr);
0032 ++first;
0033 return true;
0034 }
0035 return false;
0036 }
0037 };
0038 }}}
0039
0040 #endif