#ifndef SPROUT_WEED_PARSER_AUXILIARY_EOI_HPP #define SPROUT_WEED_PARSER_AUXILIARY_EOI_HPP #include #include #include #include #include namespace sprout { namespace weed { // // eoi_p // struct eoi_p : public sprout::weed::parser_base { public: template struct attribute { public: typedef sprout::weed::unused type; }; template struct result { public: typedef sprout::weed::parser_result::type> type; }; public: template SPROUT_CONSTEXPR typename result::type operator()( Iterator first, Iterator last, Context const& ) const { typedef typename result::type result_type; typedef typename attribute::type attribute_type; return result_type(first == last, first, attribute_type()); } }; // // eoi // SPROUT_STATIC_CONSTEXPR sprout::weed::eoi_p eoi = sprout::weed::eoi_p(); } // namespace weed } // namespace sprout #endif // #ifndef SPROUT_WEED_PARSER_AUXILIARY_EOI_HPP