![]() |
Home | Libraries | People | FAQ | More |
boost::parser::or_parser
// In header: <boost/parser/parser.hpp> template<typename ParserTuple> struct or_parser { // public member functions (ParserTuple); template<typename Iter, typename Sentinel, typename Context, typename SkipParser> auto (Iter &, Sentinel, Context const &, SkipParser const &, , bool &) ; template<typename Iter, typename Sentinel, typename Context, typename SkipParser, typename Attribute> void (Iter &, Sentinel, Context const &, SkipParser const &, , bool &, Attribute &) ; // public data members ParserTuple parsers_; };
Applies each parser in ParserTuple
, in order, stopping after the application of the first one that succeeds. The parse succeeds iff one of the sub-parsers succeeds. The attribute produced is a std::variant
over the types of attribute produced by the parsers in ParserTuple
.
or_parser
public member functions(ParserTuple parsers);
template<typename Iter, typename Sentinel, typename Context, typename SkipParser> auto (Iter & first, Sentinel last, Context const & context, SkipParser const & skip, flags, bool & success) ;
template<typename Iter, typename Sentinel, typename Context, typename SkipParser, typename Attribute> void (Iter & first, Sentinel last, Context const & context, SkipParser const & skip, flags, bool & success, Attribute & retval) ;