Module repeat

Source
Expand description

Combinators which take one or more parsers and applies them repeatedly.

Structs§

Chainl1
Chainr1
Count
CountMinMax
Escaped
EscapedState
Iter
Iterate
Many
Many1
RepeatUntil
SepBy
SepBy1
SepEndBy
SepEndBy1
SkipCount
SkipCountMinMax
SkipMany
SkipMany1
SkipRepeatUntil
SkipUntil
TakeUntil

Functions§

chainl1
Parses p 1 or more times separated by op. The value returned is the one produced by the left associative application of the function returned by the parser op.
chainr1
Parses p one or more times separated by op. The value returned is the one produced by the right associative application of the function returned by op.
count
Parses parser from zero up to count times.
count_min_max
Parses parser from min to max times (including min and max).
escaped
Parses an escaped string by first applying parser which accept the normal characters which do not need escaping. Once parser can not consume any more input it checks if the next token is escape. If it is then escape_parser is used to parse the escaped character and then resumes parsing using parser. If escape was not found then the parser finishes successfully.
iterate
many
Parses p zero or more times returning a collection with the values from p.
many1
Parses p one or more times returning a collection with the values from p.
repeat_skip_until
Skips input until end is encountered or end indicates that it has committed input before failing (attempt can be used to continue skipping even if end has committed input)
repeat_until
sep_by
Parses parser zero or more time separated by separator, returning a collection with the values from p.
sep_by1
Parses parser one or more time separated by separator, returning a collection with the values from p.
sep_end_by
Parses parser zero or more times separated and ended by separator, returning a collection with the values from p.
sep_end_by1
Parses parser one or more times separated and ended by separator, returning a collection with the values from p.
skip_count
Parses parser from zero up to count times skipping the output of parser.
skip_count_min_max
Parses parser from min to max times (including min and max) skipping the output of parser.
skip_many
Parses p zero or more times ignoring the result.
skip_many1
Parses p one or more times ignoring the result.
skip_until
Skips input until end is encountered or end indicates that it has committed input before failing (attempt can be used to make it look like it has not committed any input)
take_until
Takes input until end is encountered or end indicates that it has committed input before failing (attempt can be used to make it look like it has not committed any input)