[#repeated_one_of1] [section repeated_one_of1] [h1 Synopsis] template struct repeated_one_of1; This is a [link parser_combinator parser combinator]. [table Arguments [[Name] [Type]] [[`Ps`] [[link parser parser]s]] ] [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_of1` rejects the input. 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_of1 is equivalent to repeated1> [h1 Example] #include #include #include #include #include #include #include #include #include using namespace boost::metaparse; using as_and_bs = repeated_one_of1, 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( is_error>::type::value, "repeated_one_of1 should reject the input when it" " can't parse anything with digit_val" ); [endsect]