File indexing completed on 2025-01-18 09:52:30
0001
0002
0003
0004
0005
0006 #if !defined(BOOST_SPIRIT_REPOSITORY_QI_ITER_POS_NOV_20_2009_1245PM)
0007 #define BOOST_SPIRIT_REPOSITORY_QI_ITER_POS_NOV_20_2009_1245PM
0008
0009 #include <boost/spirit/include/qi_parse.hpp>
0010
0011
0012
0013 namespace boost { namespace spirit { namespace repository { namespace qi
0014 {
0015 BOOST_SPIRIT_TERMINAL(iter_pos)
0016 }}}}
0017
0018
0019
0020 namespace boost { namespace spirit
0021 {
0022
0023
0024 template <>
0025 struct use_terminal<qi::domain, repository::qi::tag::iter_pos>
0026 : mpl::true_
0027 {};
0028 }}
0029
0030
0031
0032 namespace boost { namespace spirit { namespace repository { namespace qi
0033 {
0034 struct iter_pos_parser
0035 : boost::spirit::qi::primitive_parser<iter_pos_parser>
0036 {
0037
0038 template <typename Context, typename Iterator>
0039 struct attribute
0040 {
0041 typedef Iterator type;
0042 };
0043
0044
0045 template <typename Iterator, typename Context
0046 , typename Skipper, typename Attribute>
0047 bool parse(Iterator& first, Iterator const& last
0048 , Context&, Skipper const& skipper, Attribute& attr) const
0049 {
0050 boost::spirit::qi::skip_over(first, last, skipper);
0051 boost::spirit::traits::assign_to(first, attr);
0052 return true;
0053 }
0054
0055
0056
0057 template <typename Context>
0058 boost::spirit::info what(Context&) const
0059 {
0060 return boost::spirit::info("iter_pos");
0061 }
0062 };
0063 }}}}
0064
0065
0066
0067 namespace boost { namespace spirit { namespace qi
0068 {
0069
0070
0071 template <typename Modifiers>
0072 struct make_primitive<repository::qi::tag::iter_pos, Modifiers>
0073 {
0074 typedef repository::qi::iter_pos_parser result_type;
0075
0076 result_type operator()(unused_type, unused_type) const
0077 {
0078 return result_type();
0079 }
0080 };
0081 }}}
0082
0083 #endif