4.4.1
|
|
Freundlich's C++ toolkit |
Tries two parsers in succession. Produces a tuple of both results if both parsers do not fail.
Let l
and r
be parsers and seq = sequence{l,r}
. First, the skipper is run. Then, seq
tries the parser l
. If it succeeds, then the skipper is run again. After that, seq
also tries r
. If r
also succeeds, then the tuple of both results is returned. Otherwise, the first error is returned.
See fcppt::parse::sequence_result for this parser's result type.
Public Types | |
using | result_type = fcppt::parse::sequence_result< fcppt::parse::result_of< Left >, fcppt::parse::result_of< Right > > |
Public Member Functions | |
sequence (Left &&, Right &&) | |
template<typename Ch , typename Skipper > | |
fcppt::parse::result< Ch, result_type > | parse (fcppt::reference< fcppt::parse::basic_stream< Ch > >, Skipper const &) const |
using fcppt::parse::sequence< Left, Right >::result_type = fcppt::parse::sequence_result<fcppt::parse::result_of<Left>, fcppt::parse::result_of<Right> > |
fcppt::parse::sequence< Left, Right >::sequence | ( | Left && | , |
Right && | |||
) |
fcppt::parse::result< Ch, result_type > fcppt::parse::sequence< Left, Right >::parse | ( | fcppt::reference< fcppt::parse::basic_stream< Ch > > | , |
Skipper const & | |||
) | const |