1 #ifndef BOOST_METAPARSE_GETTING_STARTED_5_2_3_HPP
2 #define BOOST_METAPARSE_GETTING_STARTED_5_2_3_HPP
4 // Automatically generated header file
6 // Definitions before section 5.2.2
9 // Definitions of section 5.2.2
13 int_token, /* parse the first <number> */
15 repeated<sequence<plus_token, int_token>>, /* parse the "+ <number>" elements */
16 /* lambda expression summarising the "+ <number>" elements using fold */
18 /* The folding expression we have just created */
20 boost::mpl::_1, /* the argument of the lambda expression, the result */
21 /* of the repeated<...> parser */
23 boost::mpl::quote2<sum_items>
31 // exp_parser8::apply<BOOST_METAPARSE_STRING("1 + 2 + 3 + 4")>::type
36 /* What we had so far */
40 repeated<sequence<plus_token, int_token>>,
45 boost::mpl::quote2<sum_items>
50 boost::mpl::quote1<sum_vector> /* summarise the vector of numbers */
55 // exp_parser9::apply<BOOST_METAPARSE_STRING("1 + 2 + 3 + 4")>::type