pry.combinators

Members

Functions

aa
auto aa(P parser)

Apply parser of key-value pairs (2-tuples) for minTimes times or more up to maxTimes, construct an AA out of the results of parsing.

any
auto any(P parsers)

Try each of provided parsers until one succeeds.

array
auto array(Parser parser)

Apply parser for minTimes times or more and return array of results.

delimited
auto delimited(Item item, Delimiter del)

Parse a sequence of item delimited by del

optional
auto optional(P parser)

Try to apply parser, produce null on failure.

rep
auto rep(Parser parser)

Apply parser for minTimes times or more and return consumed range.

seq
auto seq(P parsers)

Apply multiple parsers one after another as a sequence.

skipWs
auto skipWs(P parser)

Skip whitespace at front then apply the parser.

slice
auto slice(P parser)

Apply parser, discard the value and instead produce the slice of parsed stream.

utfString
auto utfString(Parser parser)

Apply parser for minTimes times or more and encode results to an UTF string.

Templates

map
template map(alias f)

Apply a mapping function to the value of parser.

Meta