| 567 | } |
| 568 | |
| 569 | void github_pr_297() |
| 570 | { |
| 571 | namespace bp = boost::parser; |
| 572 | using namespace github_pr_297_; |
| 573 | |
| 574 | { |
| 575 | const bool bar_required = true; |
| 576 | const bool result = |
| 577 | bp::parse("foo bar", foobar_parser.with(bar_required), bp::blank); |
| 578 | BOOST_TEST(result); |
| 579 | } |
| 580 | { |
| 581 | const bool bar_required = true; |
| 582 | const bool result = |
| 583 | bp::parse("foo", foobar_parser.with(bar_required), bp::blank); |
| 584 | BOOST_TEST(!result); |
| 585 | } |
| 586 | { |
| 587 | const bool bar_required = false; |
| 588 | const bool result = |
| 589 | bp::parse("foo bar", foobar_parser.with(bar_required), bp::blank); |
| 590 | BOOST_TEST(result); |
| 591 | } |
| 592 | { |
| 593 | const bool bar_required = false; |
| 594 | const bool result = |
| 595 | bp::parse("foo", foobar_parser.with(bar_required), bp::blank); |
| 596 | BOOST_TEST(result); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | namespace github_issue_312_ { |
| 601 | /* |