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