1 /*=============================================================================
2 Copyright (c) 2001-2014 Joel de Guzman
3 Copyright (c) 2001-2011 Hartmut Kaiser
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_SPIRIT_X3_EOI_MARCH_23_2007_0454PM)
9 #define BOOST_SPIRIT_X3_EOI_MARCH_23_2007_0454PM
11 #include <boost/spirit/home/x3/core/skip_over.hpp>
12 #include <boost/spirit/home/x3/core/parser.hpp>
13 #include <boost/spirit/home/x3/support/unused.hpp>
15 namespace boost { namespace spirit { namespace x3
17 struct eoi_parser : parser<eoi_parser>
19 typedef unused_type attribute_type;
20 static bool const has_attribute = false;
22 template <typename Iterator, typename Context, typename Attribute>
23 bool parse(Iterator& first, Iterator const& last
24 , Context const& context, unused_type, Attribute&) const
26 x3::skip_over(first, last, context);
32 struct get_info<eoi_parser>
34 typedef std::string result_type;
35 result_type operator()(eoi_parser const &) const { return "eoi"; }
38 constexpr auto eoi = eoi_parser{};