Warning, file /include/boost/spirit/home/lex/tokenize_and_parse_attr.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_PP_IS_ITERATING)
0009
0010 #if !defined(BOOST_SPIRIT_LEXER_PARSE_ATTR_MAY_27_2009_0926AM)
0011 #define BOOST_SPIRIT_LEXER_PARSE_ATTR_MAY_27_2009_0926AM
0012
0013 #include <boost/spirit/home/lex/tokenize_and_parse.hpp>
0014
0015 #include <boost/fusion/include/vector.hpp>
0016 #include <boost/preprocessor/cat.hpp>
0017 #include <boost/preprocessor/iterate.hpp>
0018 #include <boost/preprocessor/repetition/enum.hpp>
0019 #include <boost/preprocessor/repetition/enum_params.hpp>
0020 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0021
0022 #define BOOST_PP_FILENAME_1 <boost/spirit/home/lex/tokenize_and_parse_attr.hpp>
0023 #define BOOST_PP_ITERATION_LIMITS (2, SPIRIT_ARGUMENTS_LIMIT)
0024 #include BOOST_PP_ITERATE()
0025
0026 #endif
0027
0028
0029
0030
0031
0032
0033 #else
0034
0035 #define N BOOST_PP_ITERATION()
0036 #define BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE(z, n, A) BOOST_PP_CAT(A, n)&
0037
0038 namespace boost { namespace spirit { namespace lex
0039 {
0040 template <typename Iterator, typename Lexer, typename ParserExpr
0041 , BOOST_PP_ENUM_PARAMS(N, typename A)>
0042 inline bool
0043 tokenize_and_parse(Iterator& first, Iterator last, Lexer const& lex
0044 , ParserExpr const& expr, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & attr))
0045 {
0046
0047
0048
0049 BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr);
0050
0051 typedef fusion::vector<
0052 BOOST_PP_ENUM(N, BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE, A)
0053 > vector_type;
0054
0055 vector_type attr (BOOST_PP_ENUM_PARAMS(N, attr));
0056 typename Lexer::iterator_type iter = lex.begin(first, last);
0057 return compile<qi::domain>(expr).parse(
0058 iter, lex.end(), unused, unused, attr);
0059 }
0060 }}}
0061
0062 #undef BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE
0063 #undef N
0064
0065 #endif
0066