| 27 | BOOST_PARSER_DEFINE_RULES(action_param); |
| 28 | |
| 29 | int main() |
| 30 | { |
| 31 | { |
| 32 | std::string const str = "abc"; |
| 33 | auto const result = parse(str, action_param.with(15.0, make_13)); |
| 34 | BOOST_TEST(result); |
| 35 | BOOST_TEST(*result == 15); |
| 36 | } |
| 37 | { |
| 38 | std::string const str = "def"; |
| 39 | auto const result = parse(str, action_param.with(15.0, make_13)); |
| 40 | BOOST_TEST(result); |
| 41 | BOOST_TEST(*result == 13); |
| 42 | } |
| 43 | |
| 44 | return boost::report_errors(); |
| 45 | } |