...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::parser::parse
// In header: <boost/parser/parser.hpp> template<parsable_range R, typename Parser, typename GlobalState, typename ErrorHandler> auto parse(R const & r, parser_interface< Parser, GlobalState, ErrorHandler > const & parser, trace trace_mode = trace::off);
Parses r
using parser
. Returns a std::optional
containing the attribute produced by parser
on parse success, and std::nullopt
on parse failure. The entire input range r
must be consumed for the parse to be considered successful. If trace_mode == trace::on
, a verbose trace of the parse will be streamed to std::cout
.
Template Parameters: |
|