/*============================================================================= Copyright (c) 2001-2014 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #if !defined(SPIRIT_SEQUENCE_JAN_06_2013_1015AM) #define SPIRIT_SEQUENCE_JAN_06_2013_1015AM #if defined(_MSC_VER) #pragma once #endif #include #include #include #include namespace boost { namespace spirit { namespace x3 { template struct sequence : binary_parser> { typedef binary_parser> base_type; sequence(Left left, Right right) : base_type(left, right) {} template bool parse( Iterator& first, Iterator const& last , Context const& context, RContext& rcontext, unused_type) const { Iterator save = first; if (this->left.parse(first, last, context, rcontext, unused) && this->right.parse(first, last, context, rcontext, unused)) return true; first = save; return false; } template bool parse( Iterator& first, Iterator const& last , Context const& context, RContext& rcontext, Attribute& attr) const { return detail::parse_sequence(*this, first, last, context, rcontext, attr , typename traits::attribute_category::type()); } }; template inline sequence< typename extension::as_parser::value_type , typename extension::as_parser::value_type> operator>>(Left const& left, Right const& right) { return {as_parser(left), as_parser(right)}; } template inline sequence< typename extension::as_parser::value_type , expect_directive::value_type>> operator>(Left const& left, Right const& right) { return {as_parser(left), as_parser(right)}; } }}} namespace boost { namespace spirit { namespace x3 { namespace traits { template struct attribute_of, Context> : x3::detail::attribute_of_sequence {}; }}}} #endif