/*============================================================================= Copyright (c) 2001-2010 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_APR_22_2006_0811AM) #define SPIRIT_SEQUENCE_APR_22_2006_0811AM #if defined(_MSC_VER) #pragma once #endif #include #include #include namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // Enablers /////////////////////////////////////////////////////////////////////////// template <> struct use_operator // enables >> : mpl::true_ {}; template <> struct flatten_tree // flattens >> : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi { template struct sequence : sequence_base, Elements> { friend struct sequence_base, Elements>; sequence(Elements const& elements) : sequence_base, Elements>(elements) {} private: template static detail::fail_function fail_function( Iterator& first, Iterator const& last , Context& context, Skipper const& skipper) { return detail::fail_function (first, last, context, skipper); } std::string id() const { return "sequence"; } }; /////////////////////////////////////////////////////////////////////////// // Parser generators: make_xxx function (objects) /////////////////////////////////////////////////////////////////////////// template struct make_composite : make_nary_composite {}; // /////////////////////////////////////////////////////////////////////////// // // Define what attributes are compatible with a sequence // template // struct is_attribute_compatible, Context, Iterator> // : mpl::or_< // is_convertible, Context, Iterator>::type> // , traits::is_fusion_sequence_compatible, Context, Iterator> // , traits::is_container_compatible, Context, Iterator> // > // {}; }}} namespace boost { namespace spirit { namespace traits { template struct has_semantic_action > : nary_has_semantic_action {}; }}} #endif