Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:02:34

0001 /*=============================================================================
0002     Copyright (c) 2001-2014 Joel de Guzman
0003     Copyright (c) 2001-2011 Hartmut Kaiser
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(BOOST_SPIRIT_X3_EOI_MARCH_23_2007_0454PM)
0009 #define BOOST_SPIRIT_X3_EOI_MARCH_23_2007_0454PM
0010 
0011 #include <boost/spirit/home/x3/core/skip_over.hpp>
0012 #include <boost/spirit/home/x3/core/parser.hpp>
0013 #include <boost/spirit/home/x3/support/unused.hpp>
0014 
0015 namespace boost { namespace spirit { namespace x3
0016 {
0017     struct eoi_parser : parser<eoi_parser>
0018     {
0019         typedef unused_type attribute_type;
0020         static bool const has_attribute = false;
0021 
0022         template <typename Iterator, typename Context, typename Attribute>
0023         bool parse(Iterator& first, Iterator const& last
0024           , Context const& context, unused_type, Attribute&) const
0025         {
0026             x3::skip_over(first, last, context);
0027             return first == last;
0028         }
0029     };
0030 
0031     template<>
0032     struct get_info<eoi_parser>
0033     {
0034         typedef std::string result_type;
0035         result_type operator()(eoi_parser const &) const { return "eoi"; }
0036     };
0037 
0038     constexpr auto eoi = eoi_parser{};
0039 }}}
0040 
0041 #endif