Chris@102: /*============================================================================= Chris@102: Copyright (c) 2001-2014 Joel de Guzman Chris@102: Copyright (c) 2001-2011 Hartmut Kaiser Chris@102: Chris@102: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@102: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@102: =============================================================================*/ Chris@102: #if !defined(SPIRIT_PLUS_MARCH_13_2007_0127PM) Chris@102: #define SPIRIT_PLUS_MARCH_13_2007_0127PM Chris@102: Chris@102: #if defined(_MSC_VER) Chris@102: #pragma once Chris@102: #endif Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: namespace boost { namespace spirit { namespace x3 Chris@102: { Chris@102: template Chris@102: struct plus : unary_parser> Chris@102: { Chris@102: typedef unary_parser> base_type; Chris@102: static bool const handles_container = true; Chris@102: Chris@102: plus(Subject const& subject) Chris@102: : base_type(subject) {} Chris@102: Chris@102: template Chris@102: bool parse(Iterator& first, Iterator const& last Chris@102: , Context const& context, RContext& rcontext, Attribute& attr) const Chris@102: { Chris@102: if (!detail::parse_into_container( Chris@102: this->subject, first, last, context, rcontext, attr)) Chris@102: return false; Chris@102: Chris@102: while (detail::parse_into_container( Chris@102: this->subject, first, last, context, rcontext, attr)) Chris@102: ; Chris@102: return true; Chris@102: } Chris@102: }; Chris@102: Chris@102: template Chris@102: inline plus::value_type> Chris@102: operator+(Subject const& subject) Chris@102: { Chris@102: return {as_parser(subject)}; Chris@102: } Chris@102: }}} Chris@102: Chris@102: namespace boost { namespace spirit { namespace x3 { namespace traits Chris@102: { Chris@102: template Chris@102: struct attribute_of, Context> Chris@102: : build_container< Chris@102: typename attribute_of::type> {}; Chris@102: }}}} Chris@102: Chris@102: #endif