[#repeated_one_of] [section repeated_one_of] [h1 Synopsis] template struct repeated_one_of1; [table Arguments [[Name] [Type]] [[`Ps`] [[link parser parser]s]] ] This is a [link parser_combinator parser combinator]. [h1 Description] It applies the `Ps...` parsers repeatedly as long as any of them accepts the input. In each iteration the parsers are tried in order and the first one accepting the input is used, therefore in case of ambiguous grammars the result of parsing depends on the order of the `Ps...` parsers. The result of parsing with this [link parser_combinator parser combinator] is a sequence of the individual parsing results. When none of the `Ps...` parsers accept the input in the first iteration, `repeated_one_of` accepts the input and the result of parsing is an empty sequence. On compilers, which are not C++11-compliant, the maximum number of accepted parsers is defined by the `BOOST_METAPARSE_LIMIT_ONE_OF_SIZE` macro. Its default value is 20. [h1 Header] #include [h1 Expression semantics] For any `p1`, ..., `pn` parsers repeated_one_of is equivalent to repeated> [h1 Example] #include #include #include #include #include #include #include #include using namespace boost::metaparse; using as_and_bs = repeated_one_of, lit_c<'b'>>; static_assert( boost::mpl::equal< get_result>::type, boost::mpl::vector< boost::mpl::char_<'a'>, boost::mpl::char_<'b'>, boost::mpl::char_<'a'>, boost::mpl::char_<'a'>, boost::mpl::char_<'b'> > >::type::value, "the result of parsing should be the list of results" ); static_assert( boost::mpl::equal< get_result>::type, boost::mpl::vector<> >::type::value, "repeated_one_of should accept the input when it" " can't parse anything with digit_val" ); [endsect]