Pars::Parse
Tools for creating commonly useful Parser instances.
Instance methods
Parser that return the context head if it satisfies block.
expected can be optionally specified for providing a human friendly ParseError on fail.
Creates a Parser(Bytes) that looks at the current parse position and
expects a series of bytes to be consecutively present.
Parser that return the context head if it satisfies block.
expected can be optionally specified for providing a human friendly ParseError on fail.
Parser that succeeds with value if block evaluates to true when passed the value.
In most cases this should not be used externally and is instead a tool for composing parsers.
Always succeeds with value and does not consume any input.
Parser that tests equivalence to value at the parse head.
If equivalent value itself is returned and the parse head progresses.
Creates a Parser(Array(T)) that will continue to parse with parser
delimited by delimter until an error with either occurs.
Functions identically to Parse.one_char_of, but reverses the expected
input. If the current character is present in s, then the parse fails.
Creates a Parser(Char) that looks at the current parse position and
expects the current character to be present in the string s.
Creates a Parser(String) that looks at the current parse position and
expects the array of characters in the string s (s.chars) to be
consecutively present.
Macros
Provides a notation for building complex parsers that combine the result of a number of component parsers.