| Modifier and Type | Method | Description |
|---|---|---|
static Parser |
Chars.any() |
Deprecated.
|
static Parser |
Chars.any(String message) |
Deprecated.
|
static Parser |
Chars.anyOf(String characters) |
Deprecated.
|
static Parser |
Chars.anyOf(String characters,
String message) |
Deprecated.
|
static Parser |
Chars.character(char character) |
Deprecated.
|
static Parser |
Chars.character(char character,
String message) |
Deprecated.
|
static Parser |
Chars.digit() |
Deprecated.
|
static Parser |
Chars.digit(String message) |
Deprecated.
|
static Parser |
Parsers.epsilon() |
Deprecated.
|
static Parser |
Parsers.failure(String message) |
Deprecated.
|
static Parser |
Chars.letter() |
Deprecated.
|
static Parser |
Chars.letter(String message) |
Deprecated.
|
static Parser |
Chars.lowerCase() |
Deprecated.
|
static Parser |
Chars.lowerCase(String message) |
Deprecated.
|
static Parser |
Chars.pattern(String pattern) |
Deprecated.
|
static Parser |
Chars.pattern(String pattern,
String message) |
Deprecated.
|
static Parser |
Chars.range(char start,
char stop) |
Deprecated.
|
static Parser |
Chars.range(char start,
char stop,
String message) |
Deprecated.
|
static Parser |
Parsers.string(String string) |
Deprecated.
|
static Parser |
Parsers.string(String string,
String message) |
Deprecated.
|
static Parser |
Parsers.stringIgnoreCase(String string) |
Deprecated.
|
static Parser |
Parsers.stringIgnoreCase(String string,
String message) |
Deprecated.
|
static Parser |
Chars.upperCase() |
Deprecated.
|
static Parser |
Chars.upperCase(String message) |
Deprecated.
|
static Parser |
Chars.whitespace() |
Deprecated.
|
static Parser |
Chars.whitespace(String message) |
Deprecated.
|
static Parser |
Chars.word() |
Deprecated.
|
static Parser |
Chars.word(String message) |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
Parsing.accepts(Parser parser,
String string) |
Deprecated.
|
static <T> List<T> |
Parsing.matches(Parser parser,
String string) |
Deprecated.
|
static <T> List<T> |
Parsing.matchesSkipping(Parser parser,
String string) |
Deprecated.
|
static Result |
Parsing.parse(Parser parser,
String string) |
Deprecated.
|
| Modifier and Type | Field | Description |
|---|---|---|
static Parser |
Token.NEWLINE_PARSER |
Returns a parser for that detects newlines platform independently.
|
| Modifier and Type | Method | Description |
|---|---|---|
Parser |
Parser.and() |
Returns a parser (logical and-predicate) that succeeds whenever the receiver does, but never
consumes input.
|
Parser |
Parser.callCC(ContinuationParser.ContinuationHandler handler) |
Returns a parser that is called with its current continuation.
|
abstract Parser |
Parser.copy() |
Returns a shallow copy of the receiver.
|
Parser |
Parser.delimitedBy(Parser separator) |
Returns a new parser that parses the receiver one or more times, separated
and possibly ended by a
separator." |
Parser |
Parser.end() |
Returns a parser that succeeds only if the receiver consumes the complete input.
|
Parser |
Parser.end(String message) |
Returns a parser that succeeds only if the receiver consumes the complete input, otherwise
return a failure with the
message. |
Parser |
Parser.flatten() |
Returns a parser that discards the result of the receiver, and returns a sub-string of the
consumed range in the string/list being parsed.
|
<A,B> Parser |
Parser.map(Function<A,B> function) |
Returns a parser that evaluates a
function as the production action on success of the
receiver. |
Parser |
Parser.neg() |
Returns a parser that consumes any input token (character), but the receiver.
|
Parser |
Parser.neg(String message) |
Returns a parser that consumes any input token (character), but the receiver.
|
Parser |
Parser.not() |
Returns a parser (logical not-predicate) that succeeds whenever the receiver fails, but never
consumes input.
|
Parser |
Parser.not(String message) |
Returns a parser (logical not-predicate) that succeeds whenever the receiver fails, but never
consumes input.
|
Parser |
Parser.optional() |
Returns new parser that accepts the receiver, if possible.
|
Parser |
Parser.optional(Object otherwise) |
Returns new parser that accepts the receiver, if possible.
|
Parser |
Parser.permute(int... indexes) |
Returns a parser that transforms a successful parse result by returning the permuted elements
at
indexes of a list. |
Parser |
Parser.pick(int index) |
Returns a parser that transform a successful parse result by returning the element at
index of a list. |
Parser |
Parser.plus() |
Returns a parser that accepts the receiver one or more times.
|
Parser |
Parser.plusGreedy(Parser limit) |
Returns a parser that parses the receiver one or more times until it reaches
limit. |
Parser |
Parser.plusLazy(Parser limit) |
Returns a parser that parses the receiver one or more times until it reaches a
limit. |
Parser |
Parser.repeat(int min,
int max) |
Returns a parser that accepts the receiver between
min and max times. |
Parser |
Parser.repeatGreedy(Parser limit,
int min,
int max) |
Returns a parser that parses the receiver at least
min and at most max times
until it reaches a limit. |
Parser |
Parser.repeatLazy(Parser limit,
int min,
int max) |
Returns a parser that parses the receiver at least
min and at most max times
until it reaches a limit. |
Parser |
Parser.separatedBy(Parser separator) |
Returns a new parser that parses the receiver one or more times, separated
by a
separator. |
Parser |
Parser.star() |
Returns a parser that accepts the receiver zero or more times.
|
Parser |
Parser.starGreedy(Parser limit) |
Returns a parser that parses the receiver zero or more times until it reaches a
limit. |
Parser |
Parser.starLazy(Parser limit) |
Returns a parser that parses the receiver zero or more times until it reaches a
limit. |
Parser |
Parser.times(int count) |
Returns a parser that accepts the receiver exactly
count times. |
Parser |
Parser.token() |
Returns a parser that returns a
Token. |
Parser |
Parser.trim() |
Returns a parser that consumes whitespace before and after the receiver.
|
Parser |
Parser.trim(Parser both) |
Returns a parser that consumes input on
both sides of the receiver. |
Parser |
Parser.trim(Parser before,
Parser after) |
Returns a parser that consumes input
before and after the receiver. |
| Modifier and Type | Method | Description |
|---|---|---|
List<Parser> |
Parser.getChildren() |
Returns a list of directly referring parsers.
|
| Modifier and Type | Method | Description |
|---|---|---|
Parser |
Parser.delimitedBy(Parser separator) |
Returns a new parser that parses the receiver one or more times, separated
and possibly ended by a
separator." |
protected boolean |
Parser.hasEqualChildren(Parser other,
Set<Parser> seen) |
Compares the children of two parsers.
|
protected boolean |
Parser.hasEqualProperties(Parser other) |
Compares the properties of two parsers.
|
boolean |
Parser.isEqualTo(Parser other) |
Recursively tests for structural similarity of two parsers.
|
protected boolean |
Parser.isEqualTo(Parser other,
Set<Parser> seen) |
Recursively tests for structural similarity of two parsers.
|
ChoiceParser |
Parser.or(Parser... others) |
Returns a parser that accepts the receiver or
other. |
Parser |
Parser.plusGreedy(Parser limit) |
Returns a parser that parses the receiver one or more times until it reaches
limit. |
Parser |
Parser.plusLazy(Parser limit) |
Returns a parser that parses the receiver one or more times until it reaches a
limit. |
Parser |
Parser.repeatGreedy(Parser limit,
int min,
int max) |
Returns a parser that parses the receiver at least
min and at most max times
until it reaches a limit. |
Parser |
Parser.repeatLazy(Parser limit,
int min,
int max) |
Returns a parser that parses the receiver at least
min and at most max times
until it reaches a limit. |
void |
Parser.replace(Parser source,
Parser target) |
Replaces the referring parser
source with target. |
Parser |
Parser.separatedBy(Parser separator) |
Returns a new parser that parses the receiver one or more times, separated
by a
separator. |
SequenceParser |
Parser.seq(Parser... others) |
Returns a parser that accepts the receiver followed by
others. |
Parser |
Parser.starGreedy(Parser limit) |
Returns a parser that parses the receiver zero or more times until it reaches a
limit. |
Parser |
Parser.starLazy(Parser limit) |
Returns a parser that parses the receiver zero or more times until it reaches a
limit. |
Parser |
Parser.trim(Parser both) |
Returns a parser that consumes input on
both sides of the receiver. |
Parser |
Parser.trim(Parser before,
Parser after) |
Returns a parser that consumes input
before and after the receiver. |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
Parser.hasEqualChildren(Parser other,
Set<Parser> seen) |
Compares the children of two parsers.
|
protected boolean |
Parser.isEqualTo(Parser other,
Set<Parser> seen) |
Recursively tests for structural similarity of two parsers.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
ActionParser<T,R> |
A parser that performs a transformation with a given function on the successful parse result of
the delegate.
|
class |
ContinuationParser |
Continuation parser that when activated captures a continuation function and passes it together
with the current context into the handler.
|
class |
FlattenParser |
A parser that answers a flat copy of the range my delegate parses.
|
class |
TokenParser |
A parser that creates a token from the parsed input.
|
class |
TrimmingParser |
A parser that silently consumes a before and after the delegate parser.
|
| Modifier and Type | Method | Description |
|---|---|---|
List<Parser> |
TrimmingParser.getChildren() |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
ActionParser.hasEqualProperties(Parser other) |
|
protected boolean |
ContinuationParser.hasEqualProperties(Parser other) |
|
void |
TrimmingParser.replace(Parser source,
Parser target) |
| Constructor | Description |
|---|---|
ActionParser(Parser delegate,
Function<T,R> function) |
|
ContinuationParser(Parser delegate,
ContinuationParser.ContinuationHandler handler) |
|
FlattenParser(Parser delegate) |
|
TokenParser(Parser delegate) |
|
TrimmingParser(Parser delegate,
Parser left,
Parser right) |
| Modifier and Type | Class | Description |
|---|---|---|
class |
AndParser |
The and-predicate, a parser that succeeds whenever its delegate does, but does not consume the
input stream [Parr 1994, 1995].
|
class |
ChoiceParser |
A parser that uses the first parser that succeeds.
|
class |
DelegateParser |
A parser that delegates to another one.
|
class |
EndOfInputParser |
A parser that succeeds only at the end of the input stream.
|
class |
ListParser |
Abstract parser that parses a list of things in some way (to be specified by the subclasses).
|
class |
NotParser |
The not-predicate, a parser that succeeds whenever its delegate does not, but consumes no input
[Parr 1994, 1995].
|
class |
OptionalParser |
A parser that optionally parsers its delegate, or answers nil.
|
class |
SequenceParser |
A parser that parses a sequence of parsers.
|
class |
SettableParser |
A parser that can be set to behave like another parser.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected Parser |
DelegateParser.delegate |
|
protected Parser[] |
ListParser.parsers |
| Modifier and Type | Method | Description |
|---|---|---|
Parser |
SettableParser.get() |
Return the current referred parser.
|
| Modifier and Type | Method | Description |
|---|---|---|
List<Parser> |
DelegateParser.getChildren() |
|
List<Parser> |
ListParser.getChildren() |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
EndOfInputParser.hasEqualProperties(Parser other) |
|
protected boolean |
NotParser.hasEqualProperties(Parser other) |
|
protected boolean |
OptionalParser.hasEqualProperties(Parser other) |
|
ChoiceParser |
ChoiceParser.or(Parser... others) |
|
void |
DelegateParser.replace(Parser source,
Parser target) |
|
void |
ListParser.replace(Parser source,
Parser target) |
|
SequenceParser |
SequenceParser.seq(Parser... others) |
|
void |
SettableParser.set(Parser delegate) |
Replace the current referred parser with a new
delegate. |
static SettableParser |
SettableParser.with(Parser parser) |
Constructs a
SettableParser referring to the supplied parser. |
| Constructor | Description |
|---|---|
AndParser(Parser delegate) |
|
ChoiceParser(Parser... parsers) |
|
DelegateParser(Parser delegate) |
|
EndOfInputParser(Parser delegate,
String message) |
|
ListParser(Parser... parsers) |
|
NotParser(Parser delegate,
String message) |
|
OptionalParser(Parser delegate,
Object otherwise) |
|
SequenceParser(Parser... parsers) |
|
SettableParser(Parser delegate) |
| Modifier and Type | Class | Description |
|---|---|---|
class |
CharacterParser |
Parses a single character.
|
class |
EpsilonParser |
A parser that consumes nothing and always succeeds.
|
class |
FailureParser |
A parser that consumes nothing and always fails.
|
class |
StringParser |
Parses a sequence of characters.
|
| Modifier and Type | Method | Description |
|---|---|---|
static Parser |
StringParser.of(String value) |
Construct a parser that accepts the provides
String value. |
static Parser |
StringParser.of(String value,
String message) |
Construct a parser that accepts the provides
String value, and that fails with
the error provided error message. |
static Parser |
StringParser.ofIgnoringCase(String value) |
Construct a parser that accepts the provides
String value case insensitive. |
static Parser |
StringParser.ofIgnoringCase(String value,
String message) |
Construct a parser that accepts the provides
String value case insensitive, and
that fails with the error provided error message. |
static Parser |
FailureParser.withMessage(String message) |
Construct a
FailureParser that fails with the supplied message. |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
CharacterParser.hasEqualProperties(Parser other) |
|
protected boolean |
FailureParser.hasEqualProperties(Parser other) |
|
protected boolean |
StringParser.hasEqualProperties(Parser other) |
| Modifier and Type | Class | Description |
|---|---|---|
class |
GreedyRepeatingParser |
A greedy repeating parser, commonly seen in regular expression implementations.
|
class |
LazyRepeatingParser |
A lazy repeating parser, commonly seen in regular expression implementations.
|
class |
LimitedRepeatingParser |
An abstract parser that repeatedly parses between 'min' and 'max' instances of its delegate and
that requires the input to be completed with a specified parser 'limit'.
|
class |
PossessiveRepeatingParser |
A greedy parser that repeatedly parses between 'min' and 'max' instances of its delegate.
|
class |
RepeatingParser |
An abstract parser that repeatedly parses between 'min' and 'max' instances of its delegate.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected Parser |
LimitedRepeatingParser.limit |
| Modifier and Type | Method | Description |
|---|---|---|
List<Parser> |
LimitedRepeatingParser.getChildren() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
RepeatingParser.hasEqualProperties(Parser other) |
|
void |
LimitedRepeatingParser.replace(Parser source,
Parser target) |
| Constructor | Description |
|---|---|
GreedyRepeatingParser(Parser delegate,
Parser limit,
int min,
int max) |
|
LazyRepeatingParser(Parser delegate,
Parser limit,
int min,
int max) |
|
LimitedRepeatingParser(Parser delegate,
Parser limit,
int min,
int max) |
|
PossessiveRepeatingParser(Parser delegate,
int min,
int max) |
|
RepeatingParser(Parser delegate,
int min,
int max) |
| Modifier and Type | Class | Description |
|---|---|---|
class |
CompositeParser |
Deprecated.
|
class |
GrammarParser |
A helper to build a parser from a
GrammarDefinition. |
| Modifier and Type | Method | Description |
|---|---|---|
Parser |
ExpressionBuilder.build() |
Builds the expression parser.
|
Parser |
GrammarDefinition.build() |
Builds a parser starting from the production
"start". |
Parser |
GrammarDefinition.build(String name) |
Builds a parser starting from the provided production
name. |
Parser |
CompositeParser.ref(String name) |
Deprecated.
Returns a reference to the production with the given
name. |
protected Parser |
GrammarDefinition.ref(String name) |
Returns a reference to the production with the given
name. |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
CompositeParser.def(String name,
Parser parser) |
Deprecated.
Defines a production with a
name and a parser. |
protected void |
GrammarDefinition.def(String name,
Parser parser) |
Defines a production with a
name and a parser. |
ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.left(Parser parser) |
Adds a left-associative operator
parser. |
<T,R> ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.left(Parser parser,
Function<T,R> action) |
Adds a left-associative operator
parser. |
ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.postfix(Parser parser) |
Adds a postfix operator
parser. |
<T,R> ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.postfix(Parser parser,
Function<T,R> action) |
Adds a postfix operator
parser. |
ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.prefix(Parser parser) |
Adds a prefix operator
parser. |
<T,R> ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.prefix(Parser parser,
Function<T,R> action) |
Adds a prefix operator
parser. |
ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.primitive(Parser parser) |
Defines a new primitive or literal
parser. |
protected void |
CompositeParser.redef(String name,
Parser parser) |
Deprecated.
Redefines an existing production with a
name and a new parser. |
protected void |
GrammarDefinition.redef(String name,
Parser parser) |
Redefines an existing production with a
name and a new parser. |
ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.right(Parser parser) |
Adds a right-associative operator
parser. |
<T,R> ExpressionBuilder.ExpressionGroup |
ExpressionBuilder.ExpressionGroup.right(Parser parser,
Function<T,R> action) |
Adds a right-associative operator
parser. |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
CompositeParser.redef(String name,
Function<Parser,Parser> function) |
Deprecated.
Redefines an existing production with a
name and a function producing a new
parser. |
protected void |
CompositeParser.redef(String name,
Function<Parser,Parser> function) |
Deprecated.
Redefines an existing production with a
name and a function producing a new
parser. |
protected void |
GrammarDefinition.redef(String name,
Function<Parser,Parser> function) |
Redefines an existing production with a
name and a function producing a new
parser. |
protected void |
GrammarDefinition.redef(String name,
Function<Parser,Parser> function) |
Redefines an existing production with a
name and a function producing a new
parser. |
| Modifier and Type | Field | Description |
|---|---|---|
Parser |
Profiler.Profile.parser |
The parser being profiled.
|
Parser |
Tracer.TraceEvent.parser |
The parser being traced.
|
| Modifier and Type | Method | Description |
|---|---|---|
static Parser |
Profiler.on(Parser source,
Consumer<Profiler.Profile> consumer) |
Returns a parser that calls the provided consumer with a
Profiler.Profile of every parser. |
static Parser |
Tracer.on(Parser source,
Consumer<Tracer.TraceEvent> consumer) |
Returns a parser that calls the provided consumer with a
Tracer.TraceEvent whenever a parser
is activated or returning. |
Parser |
Mirror.transform(Function<Parser,Parser> transformer) |
Returns a transformed copy of all parsers reachable from
parser. |
Parser |
Optimizer.transform(Parser parser) |
Transforms the provided parsers using the selected optimizations.
|
| Modifier and Type | Method | Description |
|---|---|---|
Iterator<Parser> |
Mirror.iterator() |
Returns an
Iterator over parser and all its reachable descendants. |
Stream<Parser> |
Mirror.stream() |
Returns a
Stream over parser and all its reachable descendants. |
| Modifier and Type | Method | Description |
|---|---|---|
static Mirror |
Mirror.of(Parser parser) |
Constructs a mirror of the provided
parser. |
static Parser |
Profiler.on(Parser source,
Consumer<Profiler.Profile> consumer) |
Returns a parser that calls the provided consumer with a
Profiler.Profile of every parser. |
static Parser |
Tracer.on(Parser source,
Consumer<Tracer.TraceEvent> consumer) |
Returns a parser that calls the provided consumer with a
Tracer.TraceEvent whenever a parser
is activated or returning. |
Parser |
Optimizer.transform(Parser parser) |
Transforms the provided parsers using the selected optimizations.
|
| Modifier and Type | Method | Description |
|---|---|---|
Optimizer |
Optimizer.add(Function<Parser,Parser> transformer) |
Adds a generic transformer.
|
Optimizer |
Optimizer.add(Function<Parser,Parser> transformer) |
Adds a generic transformer.
|
Parser |
Mirror.transform(Function<Parser,Parser> transformer) |
Returns a transformed copy of all parsers reachable from
parser. |
Parser |
Mirror.transform(Function<Parser,Parser> transformer) |
Returns a transformed copy of all parsers reachable from
parser. |
Copyright © 2018 PetitParser. All rights reserved.