template<typename Parser>
class fcppt::parse::repetition< Parser >
Tries a parser repeatedly, producing a vector of results.
Let p
be a parser and rep = repetition{p}
. Initially, the result r
is the empty vector. A single parsing step consists of the following actions: First, the current position pos
is saved. Then, the skipper is run. After that, the parser p
is tried. If it succeeds with result s
, then s
is added to r
. These steps continue as long as p
does not return an error. Once this happens, if the returned error is fatal, then rep
also returns a fatal error. Otherwise, rep
backtracks to pos
and returns r
.