• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef BOOST_METAPARSE_GETTING_STARTED_10_HPP
2 #define BOOST_METAPARSE_GETTING_STARTED_10_HPP
3 
4 // Automatically generated header file
5 
6 // Definitions before section 9
7 #include "9.hpp"
8 
9 // Definitions of section 9
10 #include <boost/mpl/negate.hpp>
11 
12 using unary_exp1 =
13  foldr_start_with_parser<
14    minus_token,
15    int_token,
16    boost::mpl::lambda<boost::mpl::negate<boost::mpl::_1>>::type
17  >;
18 
19 using mult_exp4 =
20  foldl_start_with_parser<
21    sequence<one_of<times_token, divides_token>, unary_exp1>,
22    unary_exp1,
23    boost::mpl::quote2<binary_op>
24  >;
25 
26 using exp_parser18 =
27  build_parser<
28    foldl_start_with_parser<
29      sequence<one_of<plus_token, minus_token>, mult_exp4>,
30      mult_exp4,
31      boost::mpl::quote2<binary_op>
32    >
33  >;
34 
35 // query:
36 //    exp_parser18::apply<BOOST_METAPARSE_STRING("---13")>::type
37 
38 // query:
39 //    exp_parser18::apply<BOOST_METAPARSE_STRING("13")>::type
40 
41 #endif
42 
43