Warning, file /include/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(BOOST_SPIRIT_PARAMETERIZED_AUGUST_09_2009_0539AM)
0009 #define BOOST_SPIRIT_PARAMETERIZED_AUGUST_09_2009_0539AM
0010
0011 #if defined(_MSC_VER)
0012 #pragma once
0013 #endif
0014
0015 #include <boost/ref.hpp>
0016
0017 #include <boost/spirit/home/support/handles_container.hpp>
0018 #include <boost/spirit/home/qi/parser.hpp>
0019
0020 namespace boost { namespace spirit { namespace qi
0021 {
0022
0023
0024
0025
0026 template <typename Subject, typename Params>
0027 struct parameterized_nonterminal
0028 : parser<parameterized_nonterminal<Subject, Params> >
0029 {
0030 parameterized_nonterminal(Subject const& subject, Params const& params_)
0031 : ref(subject), params(params_)
0032 {
0033 }
0034
0035 template <typename Context, typename Iterator>
0036 struct attribute
0037
0038 : Subject::template attribute<Context, Iterator> {};
0039
0040 template <typename Iterator, typename Context
0041 , typename Skipper, typename Attribute>
0042 bool parse(Iterator& first, Iterator const& last
0043 , Context& context, Skipper const& skipper
0044 , Attribute& attr_) const
0045 {
0046
0047
0048 return ref.get().parse(first, last, context, skipper, attr_, params);
0049 }
0050
0051 template <typename Context>
0052 info what(Context& context) const
0053 {
0054
0055 return ref.get().what(context);
0056 }
0057
0058 boost::reference_wrapper<Subject const> ref;
0059 Params params;
0060 };
0061 }}}
0062
0063 namespace boost { namespace spirit { namespace traits
0064 {
0065
0066 template <typename Subject, typename Params, typename Attribute
0067 , typename Context, typename Iterator>
0068 struct handles_container<qi::parameterized_nonterminal<Subject, Params>
0069 , Attribute, Context, Iterator>
0070 : handles_container<typename remove_const<Subject>::type
0071 , Attribute, Context, Iterator>
0072 {};
0073 }}}
0074
0075 #endif