File indexing completed on 2025-01-19 09:47:46
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_HPP
0009 #define BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_HPP
0010
0011 #if defined(_MSC_VER)
0012 #pragma once
0013 #endif
0014
0015 #include <boost/spirit/home/qi/operator/sequence_base.hpp>
0016 #include <boost/spirit/home/qi/detail/fail_function.hpp>
0017 #include <boost/spirit/home/qi/meta_compiler.hpp>
0018 #include <boost/proto/operators.hpp>
0019 #include <boost/proto/tags.hpp>
0020
0021 namespace boost { namespace spirit
0022 {
0023
0024
0025
0026 template <>
0027 struct use_operator<qi::domain, proto::tag::shift_right>
0028 : mpl::true_ {};
0029
0030 template <>
0031 struct flatten_tree<qi::domain, proto::tag::shift_right>
0032 : mpl::true_ {};
0033 }}
0034
0035 namespace boost { namespace spirit { namespace qi
0036 {
0037 template <typename Elements>
0038 struct sequence : sequence_base<sequence<Elements>, Elements>
0039 {
0040 friend struct sequence_base<sequence<Elements>, Elements>;
0041
0042 sequence(Elements const& elements)
0043 : sequence_base<sequence<Elements>, Elements>(elements) {}
0044
0045 private:
0046
0047 template <typename Iterator, typename Context, typename Skipper>
0048 static detail::fail_function<Iterator, Context, Skipper>
0049 fail_function(
0050 Iterator& first, Iterator const& last
0051 , Context& context, Skipper const& skipper)
0052 {
0053 return detail::fail_function<Iterator, Context, Skipper>
0054 (first, last, context, skipper);
0055 }
0056
0057 std::string id() const { return "sequence"; }
0058 };
0059
0060
0061
0062
0063 template <typename Elements, typename Modifiers>
0064 struct make_composite<proto::tag::shift_right, Elements, Modifiers>
0065 : make_nary_composite<Elements, sequence>
0066 {};
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081 }}}
0082
0083 namespace boost { namespace spirit { namespace traits
0084 {
0085
0086 template <typename Elements>
0087 struct has_semantic_action<qi::sequence<Elements> >
0088 : nary_has_semantic_action<Elements> {};
0089
0090
0091 template <typename Elements, typename Attribute, typename Context
0092 , typename Iterator>
0093 struct handles_container<qi::sequence<Elements>, Attribute, Context
0094 , Iterator>
0095 : mpl::true_ {};
0096 }}}
0097
0098 #endif