Turns a parser into one that consumes surrounding banana brackets (||)
Turns a parser into one that consumes surrounding curly braces {}
Consumes left
and right
, including the trailing and preceding whitespace,
respectively, and returns the value of p
.
Turns a parser into one that consumes surrounding envelope brackets [||]
Turns a parser into one that consumes surrounding parentheses ()
Stateful scanning parser returning a string of all visited chars.
Stateful scanning parser returning a string of all visited chars. Many combinators can be
written in terms of scan
; for instance, take(n)
could be written as
scan(n)((m, _) => m > 0 option m - 1)
.
Parser that consumes horizontal and vertical whitespace
Turns a parser into one that consumes surrounding square brackets []
Parser that matches and returns only s
.
Like string
but case-insensitive s
.
Quoted strings with control and unicode escapes, Java/JSON style.
Quoted strings with control and unicode escapes, Java/JSON style. *
Parser that returns a string of characters matched by p
.
Parser that returns a non-empty string of characters matched by p
.
Parser that returns the next n
characters as a String
.
Parser that consumes and returns all remaining chunks of input.
Parser that consumes and returns all remaining input.
Parser that returns a string of characters passing the supplied predicate.
Parser that returns a string of characters passing the supplied predicate. Equivalent to but
more efficient than stringOf(elem(p))
.
Parser that returns a non-empty string of characters passing the supplied predicate.
Parser that returns a non-empty string of characters passing the supplied predicate. Equivalent
to but more efficient than stringOf1(elem(p))
.
Turns a parser into one that skips trailing whitespace
Text parsers.