1 #ifndef BOOST_METAPARSE_GETTING_STARTED_12_HPP 2 #define BOOST_METAPARSE_GETTING_STARTED_12_HPP 3 4 // Automatically generated header file 5 6 // Definitions before section 11.3.2 7 #include "11_3_2.hpp" 8 9 // Definitions of section 11.3.2 10 struct plus_exp6; 11 12 using paren_exp5 = middle_of<lparen_token, plus_exp6, rparen_token>; 13 14 using primary_exp4 = one_of<int_token, paren_exp5, fail<missing_primary_expression>>; 15 16 using unary_exp4 = 17 foldr_start_with_parser< 18 minus_token, 19 primary_exp4, 20 boost::mpl::lambda<boost::mpl::negate<boost::mpl::_1>>::type 21 >; 22 23 using mult_exp7 = 24 foldl_reject_incomplete_start_with_parser< 25 sequence<one_of<times_token, divides_token>, unary_exp4>, 26 unary_exp4, 27 boost::mpl::quote2<binary_op> 28 >; 29 30 struct plus_exp6 : 31 foldl_reject_incomplete_start_with_parser< 32 sequence<one_of<plus_token, minus_token>, mult_exp7>, 33 mult_exp7, 34 boost::mpl::quote2<binary_op> 35 > {}; 36 37 using exp_parser23 = build_parser<plus_exp6>; 38 39 // query: 40 // exp_parser23::apply<BOOST_METAPARSE_STRING("1+(2*")>::type 41 42 // query: 43 // exp_parser23::apply<BOOST_METAPARSE_STRING("1+(2*3")>::type 44 45 #endif 46 47