8_1.hpp 827 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_METAPARSE_GETTING_STARTED_8_1_HPP
  2. #define BOOST_METAPARSE_GETTING_STARTED_8_1_HPP
  3. // Automatically generated header file
  4. // Definitions before section 8
  5. #include "8.hpp"
  6. // Definitions of section 8
  7. #include <boost/mpl/divides.hpp>
  8. template <class L, class R> struct eval_binary_op<L, '/', R> : boost::mpl::divides<L, R>::type {};
  9. using divides_token = token<lit_c<'/'>>;
  10. using mult_exp2 =
  11. foldl_start_with_parser<
  12. sequence<one_of<times_token, divides_token>, int_token>,
  13. int_token,
  14. boost::mpl::quote2<binary_op>
  15. >;
  16. using exp_parser16 =
  17. build_parser<
  18. foldl_start_with_parser<
  19. sequence<one_of<plus_token, minus_token>, mult_exp2>,
  20. mult_exp2,
  21. boost::mpl::quote2<binary_op>
  22. >
  23. >;
  24. // query:
  25. // exp_parser16::apply<BOOST_METAPARSE_STRING("8 / 4")>::type
  26. #endif