Applies parser p
to input s
.
Applies parser p
to input s
.
Defines a Parser that parses a single character only if the predicate f
returns true for that character.
Defines a Parser that parses a single character only if the predicate f
returns true for that character.
If this parser fails, label
is used as the failure message.
Defines a Parser that parses a single character only if it is contained in legal
.
Defines a Parser that parses a single character only if it is contained in legal
.
Applies parser p
to input s
and returns the completions at verbosity level
.
Applies parser p
to input s
and returns the completions at verbosity level
.
The interpretation of level
is up to parser definitions, but 0 is the default by convention,
with increasing positive numbers corresponding to increasing verbosity. Typically no more than
a few levels are defined.
Applies parser p
to a single character of input.
Applies parser p
to a single character of input.
the type of values that are returned by the parser.
the parser to decorate with a source of examples. All validation and parsing is delegated to this parser, only Parser.completions is modified.
the source of examples when displaying completions to the user.
limits the number of examples that the source of examples should return. This can prevent lengthy pauses and avoids bad interactive user experience.
indicates whether completion examples should be checked for validity (against the given parser). An exception is thrown if the example source contains no valid completion suggestions.
Defines a parser that always fails on any input with message msg
.
Defines a parser that always fails on any input with message msg
.
If definitive
is true
, any failures by later alternatives are discarded.
Defines a parser that always fails on any input with messages msgs
.
Defines a parser that always fails on any input with messages msgs
.
If definitive
is true
, any failures by later alternatives are discarded.
Presents a literal String s
as a Parser that only parses that exact text and provides it as the result.
Presents a literal String s
as a Parser that only parses that exact text and provides it as the result.
Presents a single Char ch
as a Parser that only parses that exact character.
Presents a single Char ch
as a Parser that only parses that exact character.
Parses input str
using parser
.
Parses input str
using parser
. If successful, the result is provided wrapped in Right
. If unsuccessful, an error message is provided in Left
.
Presents a Char range as a Parser.
Presents a Char range as a Parser. A single Char is parsed only if it is in the given range.
Provides combinators for Parsers.
Provides combinators for Parsers.
Convenience method to use when developing a parser.
Convenience method to use when developing a parser.
parser
is applied to the input str
.
If completions
is true, the available completions for the input are displayed.
Otherwise, the result of parsing is printed using the result's toString
method.
If parsing fails, the error message is displayed.
See also sampleParse and sampleCompletions.
Convenience method to use when developing a parser.
Convenience method to use when developing a parser.
parser
is applied to the input str
and the available completions are displayed on separate lines.
If parsing fails, the error message is displayed.
Convenience method to use when developing a parser.
Convenience method to use when developing a parser.
parser
is applied to the input str
and the result of parsing is printed using the result's toString
method.
If parsing fails, the error message is displayed.
Defines a parser that always succeeds on empty input with the result value
.
Defines a parser that always succeeds on empty input with the result value
.
Establishes delegate parser t
as a single token of tab completion.
Establishes delegate parser t
as a single token of tab completion.
When tab completion of part of this token is requested, description
is displayed for suggestions and no completions are ever performed.
Establishes delegate parser t
as a single token of tab completion.
Establishes delegate parser t
as a single token of tab completion.
When tab completion of part of this token is requested, no completions are returned if hide
returns true for the current tab completion level.
Otherwise, the completions provided by the delegate t
or a later derivative are appended to the prefix String already seen by this parser.
Establishes delegate parser t
as a single token of tab completion.
Establishes delegate parser t
as a single token of tab completion.
When tab completion of part of this token is requested, the completions provided by the delegate t
or a later derivative are appended to
the prefix String already seen by this parser.
Establishes delegate parser t
as a single token of tab completion.
Establishes delegate parser t
as a single token of tab completion.
When tab completion of part of this token is requested, display
is used as the printed suggestion, but the completions from the delegate
parser t
are used to complete if unambiguous.
See unapply.
See unapply.
Contains Parser implementation helper methods not typically needed for using parsers.