6_2.hpp 579 B

123456789101112131415161718192021222324252627
  1. #ifndef BOOST_METAPARSE_GETTING_STARTED_6_2_HPP
  2. #define BOOST_METAPARSE_GETTING_STARTED_6_2_HPP
  3. // Automatically generated header file
  4. // Definitions before section 6.1
  5. #include "6_1.hpp"
  6. // Definitions of section 6.1
  7. using minus_token = token<lit_c<'-'>>;
  8. #include <boost/metaparse/one_of.hpp>
  9. using exp_parser12 =
  10. build_parser<
  11. foldl_start_with_parser<
  12. sequence<one_of<plus_token, minus_token>, int_token>,
  13. int_token,
  14. boost::mpl::quote2<sum_items>
  15. >
  16. >;
  17. // query:
  18. // exp_parser12::apply<BOOST_METAPARSE_STRING("1 + 2 - 3")>::type
  19. #endif