A parser generator for non-empty repetitions.
A parser generator for non-empty repetitions.
rep1(f, p) first uses f' (which must succeed) and then repeatedly uses
p' to
parse the input until p' fails
(the result is a
List' of the consecutive results of f' and
p')
a Parser' that parses the first piece of input
a Parser' that is to be applied successively to the rest of the input (if any)
A parser that returns a list of results produced by first applying f' and then
repeatedly
p' to the input (it only succeeds if f' matches).
A parser generator for non-empty repetitions.
A parser generator for non-empty repetitions.
rep1sep(first, p, q) starts by using first', followed by repeatedly uses of
p' interleaved with q'
to parse the input, until
p' fails. first' must succeed (the result is a
List' of the
consecutive results of first' and
p')
a Parser' that is to be applied successively to the input
a Parser' that parses the elements that separate the elements parsed by
p'
(interleaved with q')
A parser that returns a list of results produced by repeatedly applying p' to the input
(and that only succeeds if
p' matches at least once).
The results of p' are collected in a list. The results of
q' are discarded.
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0
(Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0