- accept(String) - Method in class org.petitparser.parser.Parser
-
Tests if the input can be successfully parsed.
- accepts(Parser, String) - Static method in class org.petitparser.Parsing
-
Deprecated.
- action(String, Function<S, T>) - Method in class org.petitparser.tools.CompositeParser
-
Deprecated.
Attaches an action function to an existing production name.
- action(String, Function<S, T>) - Method in class org.petitparser.tools.GrammarDefinition
-
Attaches an action function to an existing production name.
- ActionParser<T,R> - Class in org.petitparser.parser.actions
-
A parser that performs a transformation with a given function on the successful parse result of
the delegate.
- ActionParser(Parser, Function<T, R>) - Constructor for class org.petitparser.parser.actions.ActionParser
-
- activationCount - Variable in class org.petitparser.utils.Profiler.Profile
-
The number of times the parser got activated on the top-level.
- add(Function<Parser, Parser>) - Method in class org.petitparser.utils.Optimizer
-
Adds a generic transformer.
- and() - Method in class org.petitparser.parser.Parser
-
Returns a parser (logical and-predicate) that succeeds whenever the receiver does, but never
consumes input.
- AndParser - Class in org.petitparser.parser.combinators
-
The and-predicate, a parser that succeeds whenever its delegate does, but does not consume the
input stream [Parr 1994, 1995].
- AndParser(Parser) - Constructor for class org.petitparser.parser.combinators.AndParser
-
- any() - Static method in class org.petitparser.Chars
-
Deprecated.
- any() - Static method in class org.petitparser.parser.primitive.CharacterParser
-
Returns a parser that accepts any character.
- any() - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches any character.
- any(String) - Static method in class org.petitparser.Chars
-
Deprecated.
- any(String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
- anyOf(String) - Static method in class org.petitparser.Chars
-
Deprecated.
- anyOf(String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
Returns a parser that accepts any of the provided characters.
- anyOf(String) - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches any of the characters in string.
- anyOf(String, String) - Static method in class org.petitparser.Chars
-
Deprecated.
- anyOf(String, String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
- apply(Function<Context, Result>, Context) - Method in interface org.petitparser.parser.actions.ContinuationParser.ContinuationHandler
-
- get() - Method in class org.petitparser.context.Failure
-
- get() - Method in class org.petitparser.context.Result
-
Returns the result of this parse context.
- get() - Method in class org.petitparser.context.Success
-
- get() - Method in class org.petitparser.parser.combinators.SettableParser
-
Return the current referred parser.
- getBuffer() - Method in class org.petitparser.context.Context
-
Returns the input buffer.
- getBuffer() - Method in class org.petitparser.context.Token
-
The backing buffer of the token.
- getChildren() - Method in class org.petitparser.parser.actions.TrimmingParser
-
- getChildren() - Method in class org.petitparser.parser.combinators.DelegateParser
-
- getChildren() - Method in class org.petitparser.parser.combinators.ListParser
-
- getChildren() - Method in class org.petitparser.parser.Parser
-
Returns a list of directly referring parsers.
- getChildren() - Method in class org.petitparser.parser.repeating.LimitedRepeatingParser
-
- getColumn() - Method in class org.petitparser.context.Token
-
The column number of this token.
- getFailure() - Method in exception org.petitparser.context.ParseError
-
Return the parse
Context causing this error.
- getInput() - Method in class org.petitparser.context.Token
-
The consumed input of the token.
- getLength() - Method in class org.petitparser.context.Token
-
The consumed input length of the token.
- getLevel() - Method in class org.petitparser.utils.Tracer.TraceEvent
-
The current invocation level.
- getLine() - Method in class org.petitparser.context.Token
-
The line number of the token.
- getMessage() - Method in class org.petitparser.context.Failure
-
- getMessage() - Method in class org.petitparser.context.Result
-
Returns the message of this parse context, only set in case of failure.
- getPosition() - Method in class org.petitparser.context.Context
-
Returns the current position.
- getStart() - Method in class org.petitparser.context.Token
-
The start position of the token in the buffer.
- getStop() - Method in class org.petitparser.context.Token
-
The stop position of the token in the buffer.
- getValue() - Method in class org.petitparser.context.Token
-
The resulting value of the token.
- GrammarDefinition - Class in org.petitparser.tools
-
Helper to conveniently define and build complex, recursive grammars using plain Java code.
- GrammarDefinition() - Constructor for class org.petitparser.tools.GrammarDefinition
-
- GrammarParser - Class in org.petitparser.tools
-
- GrammarParser(GrammarDefinition) - Constructor for class org.petitparser.tools.GrammarParser
-
- GrammarParser(GrammarDefinition, String) - Constructor for class org.petitparser.tools.GrammarParser
-
- GreedyRepeatingParser - Class in org.petitparser.parser.repeating
-
A greedy repeating parser, commonly seen in regular expression implementations.
- GreedyRepeatingParser(Parser, Parser, int, int) - Constructor for class org.petitparser.parser.repeating.GreedyRepeatingParser
-
- group() - Method in class org.petitparser.tools.ExpressionBuilder
-
Creates a new group of operators that share the same priority.
- neg() - Method in class org.petitparser.parser.Parser
-
Returns a parser that consumes any input token (character), but the receiver.
- neg(String) - Method in class org.petitparser.parser.Parser
-
Returns a parser that consumes any input token (character), but the receiver.
- neg(String) - Method in class org.petitparser.parser.primitive.CharacterParser
-
- NEWLINE_PARSER - Static variable in class org.petitparser.context.Token
-
Returns a parser for that detects newlines platform independently.
- none() - Static method in class org.petitparser.parser.primitive.CharacterParser
-
Returns a parser that accepts no character.
- none() - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches no character.
- none(String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
- noneOf(String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
Returns a parser that accepts none of the provided characters.
- noneOf(String) - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches none of the characters in string.
- noneOf(String, String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
- not() - Method in class org.petitparser.parser.Parser
-
Returns a parser (logical not-predicate) that succeeds whenever the receiver fails, but never
consumes input.
- not() - Method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Negates this character predicate.
- not() - Method in class org.petitparser.parser.primitive.CharacterPredicate.NotCharacterPredicate
-
- not(String) - Method in class org.petitparser.parser.Parser
-
Returns a parser (logical not-predicate) that succeeds whenever the receiver fails, but never
consumes input.
- NotCharacterPredicate(CharacterPredicate) - Constructor for class org.petitparser.parser.primitive.CharacterPredicate.NotCharacterPredicate
-
- NotParser - Class in org.petitparser.parser.combinators
-
The not-predicate, a parser that succeeds whenever its delegate does not, but consumes no input
[Parr 1994, 1995].
- NotParser(Parser, String) - Constructor for class org.petitparser.parser.combinators.NotParser
-
- nthOfList(int) - Static method in class org.petitparser.utils.Functions
-
Returns a function that returns the value at the given index.
- parent - Variable in class org.petitparser.utils.Tracer.TraceEvent
-
The parent of this event.
- parse(String) - Method in class org.petitparser.parser.Parser
-
Returns the parse result of the input.
- parse(Parser, String) - Static method in class org.petitparser.Parsing
-
Deprecated.
- ParseError - Exception in org.petitparser.context
-
A parse error.
- ParseError(Failure) - Constructor for exception org.petitparser.context.ParseError
-
- parseOn(Context) - Method in class org.petitparser.parser.actions.ActionParser
-
- parseOn(Context) - Method in class org.petitparser.parser.actions.ContinuationParser
-
- parseOn(Context) - Method in class org.petitparser.parser.actions.FlattenParser
-
- parseOn(Context) - Method in class org.petitparser.parser.actions.TokenParser
-
- parseOn(Context) - Method in class org.petitparser.parser.actions.TrimmingParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.AndParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.ChoiceParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.DelegateParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.EndOfInputParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.NotParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.OptionalParser
-
- parseOn(Context) - Method in class org.petitparser.parser.combinators.SequenceParser
-
- parseOn(Context) - Method in class org.petitparser.parser.Parser
-
Primitive method doing the actual parsing.
- parseOn(Context) - Method in class org.petitparser.parser.primitive.CharacterParser
-
- parseOn(Context) - Method in class org.petitparser.parser.primitive.EpsilonParser
-
- parseOn(Context) - Method in class org.petitparser.parser.primitive.FailureParser
-
- parseOn(Context) - Method in class org.petitparser.parser.primitive.StringParser
-
- parseOn(Context) - Method in class org.petitparser.parser.repeating.GreedyRepeatingParser
-
- parseOn(Context) - Method in class org.petitparser.parser.repeating.LazyRepeatingParser
-
- parseOn(Context) - Method in class org.petitparser.parser.repeating.PossessiveRepeatingParser
-
- parser - Variable in class org.petitparser.utils.Profiler.Profile
-
The parser being profiled.
- parser - Variable in class org.petitparser.utils.Tracer.TraceEvent
-
The parser being traced.
- Parser - Class in org.petitparser.parser
-
An abstract parser that forms the root of all parsers in this package.
- Parser() - Constructor for class org.petitparser.parser.Parser
-
- parsers - Variable in class org.petitparser.parser.combinators.ListParser
-
- Parsers - Class in org.petitparser
-
Deprecated.
- Parsing - Class in org.petitparser
-
Deprecated.
- pattern(String) - Static method in class org.petitparser.Chars
-
Deprecated.
- pattern(String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
Returns a parser that accepts a specific character pattern.
- pattern(String) - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches the provided pattern.
- pattern(String, String) - Static method in class org.petitparser.Chars
-
Deprecated.
- pattern(String, String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
- PatternParser() - Constructor for class org.petitparser.parser.primitive.CharacterPredicate.PatternParser
-
- permutationOfList(int...) - Static method in class org.petitparser.utils.Functions
-
Returns a function that returns the permutation of a given list.
- permute(int...) - Method in class org.petitparser.parser.Parser
-
Returns a parser that transforms a successful parse result by returning the permuted elements
at indexes of a list.
- pick(int) - Method in class org.petitparser.parser.Parser
-
Returns a parser that transform a successful parse result by returning the element at
index of a list.
- plus() - Method in class org.petitparser.parser.Parser
-
Returns a parser that accepts the receiver one or more times.
- plusGreedy(Parser) - Method in class org.petitparser.parser.Parser
-
Returns a parser that parses the receiver one or more times until it reaches limit.
- plusLazy(Parser) - Method in class org.petitparser.parser.Parser
-
Returns a parser that parses the receiver one or more times until it reaches a limit.
- position - Variable in class org.petitparser.context.Context
-
The current position.
- PossessiveRepeatingParser - Class in org.petitparser.parser.repeating
-
A greedy parser that repeatedly parses between 'min' and 'max' instances of its delegate.
- PossessiveRepeatingParser(Parser, int, int) - Constructor for class org.petitparser.parser.repeating.PossessiveRepeatingParser
-
- postfix(Parser) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Adds a postfix operator parser.
- postfix(Parser, Function<T, R>) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Adds a postfix operator parser.
- prefix(Parser) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Adds a prefix operator parser.
- prefix(Parser, Function<T, R>) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Adds a prefix operator parser.
- primitive(Parser) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Defines a new primitive or literal parser.
- Profiler - Class in org.petitparser.utils
-
Profiles the run-time of parsers.
- Profiler.Profile - Class in org.petitparser.utils
-
The profile information about a parser.
- range(char, char) - Static method in class org.petitparser.Chars
-
Deprecated.
- range(char, char) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
Returns a parser that accepts a specific character range.
- range(char, char) - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches any character between start and
stop.
- range(char, char, String) - Static method in class org.petitparser.Chars
-
Deprecated.
- range(char, char, String) - Static method in class org.petitparser.parser.primitive.CharacterParser
-
- ranges(char[], char[]) - Static method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Returns a character predicate that matches character ranges between starts and
stops.
- redef(String, Function<Parser, Parser>) - Method in class org.petitparser.tools.CompositeParser
-
Deprecated.
Redefines an existing production with a name and a function producing a new
parser.
- redef(String, Function<Parser, Parser>) - Method in class org.petitparser.tools.GrammarDefinition
-
Redefines an existing production with a name and a function producing a new
parser.
- redef(String, Parser) - Method in class org.petitparser.tools.CompositeParser
-
Deprecated.
Redefines an existing production with a name and a new parser.
- redef(String, Parser) - Method in class org.petitparser.tools.GrammarDefinition
-
Redefines an existing production with a name and a new parser.
- ref(String) - Method in class org.petitparser.tools.CompositeParser
-
Deprecated.
Returns a reference to the production with the given name.
- ref(String) - Method in class org.petitparser.tools.GrammarDefinition
-
Returns a reference to the production with the given name.
- removeDelegates() - Method in class org.petitparser.utils.Optimizer
-
Adds a transformer that removes unnecessary delegates.
- removeDuplicates() - Method in class org.petitparser.utils.Optimizer
-
Adds a transformer that collapses unnecessary copies of parsers.
- repeat(int, int) - Method in class org.petitparser.parser.Parser
-
Returns a parser that accepts the receiver between min and max times.
- repeatGreedy(Parser, int, int) - Method in class org.petitparser.parser.Parser
-
Returns a parser that parses the receiver at least min and at most max times
until it reaches a limit.
- RepeatingParser - Class in org.petitparser.parser.repeating
-
An abstract parser that repeatedly parses between 'min' and 'max' instances of its delegate.
- RepeatingParser(Parser, int, int) - Constructor for class org.petitparser.parser.repeating.RepeatingParser
-
- repeatLazy(Parser, int, int) - Method in class org.petitparser.parser.Parser
-
Returns a parser that parses the receiver at least min and at most max times
until it reaches a limit.
- replace(Parser, Parser) - Method in class org.petitparser.parser.actions.TrimmingParser
-
- replace(Parser, Parser) - Method in class org.petitparser.parser.combinators.DelegateParser
-
- replace(Parser, Parser) - Method in class org.petitparser.parser.combinators.ListParser
-
- replace(Parser, Parser) - Method in class org.petitparser.parser.Parser
-
Replaces the referring parser source with target.
- replace(Parser, Parser) - Method in class org.petitparser.parser.repeating.LimitedRepeatingParser
-
- Result - Class in org.petitparser.context
-
An immutable abstract parse result.
- Result(String, int) - Constructor for class org.petitparser.context.Result
-
- right(Parser) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Adds a right-associative operator parser.
- right(Parser, Function<T, R>) - Method in class org.petitparser.tools.ExpressionBuilder.ExpressionGroup
-
Adds a right-associative operator parser.
- separatedBy(Parser) - Method in class org.petitparser.parser.Parser
-
Returns a new parser that parses the receiver one or more times, separated
by a separator.
- seq(Parser...) - Method in class org.petitparser.parser.combinators.SequenceParser
-
- seq(Parser...) - Method in class org.petitparser.parser.Parser
-
Returns a parser that accepts the receiver followed by others.
- SequenceParser - Class in org.petitparser.parser.combinators
-
A parser that parses a sequence of parsers.
- SequenceParser(Parser...) - Constructor for class org.petitparser.parser.combinators.SequenceParser
-
- set(Parser) - Method in class org.petitparser.parser.combinators.SettableParser
-
Replace the current referred parser with a new delegate.
- settable() - Method in class org.petitparser.parser.Parser
-
Returns a parser that points to the receiver, but can be changed to point to something else at
a later point in time.
- SettableParser - Class in org.petitparser.parser.combinators
-
A parser that can be set to behave like another parser.
- SettableParser(Parser) - Constructor for class org.petitparser.parser.combinators.SettableParser
-
- star() - Method in class org.petitparser.parser.Parser
-
Returns a parser that accepts the receiver zero or more times.
- starGreedy(Parser) - Method in class org.petitparser.parser.Parser
-
Returns a parser that parses the receiver zero or more times until it reaches a limit.
- starLazy(Parser) - Method in class org.petitparser.parser.Parser
-
Returns a parser that parses the receiver zero or more times until it reaches a limit.
- stream() - Method in class org.petitparser.utils.Mirror
-
Returns a
Stream over
parser and all its reachable descendants.
- string(String) - Static method in class org.petitparser.Parsers
-
Deprecated.
- string(String, String) - Static method in class org.petitparser.Parsers
-
Deprecated.
- stringIgnoreCase(String) - Static method in class org.petitparser.Parsers
-
Deprecated.
- stringIgnoreCase(String, String) - Static method in class org.petitparser.Parsers
-
Deprecated.
- StringParser - Class in org.petitparser.parser.primitive
-
Parses a sequence of characters.
- success(Object) - Method in class org.petitparser.context.Context
-
Returns a successful parse result at the current position.
- success(Object, int) - Method in class org.petitparser.context.Context
-
Returns a successful parse result.
- Success - Class in org.petitparser.context
-
An immutable parse success.
- Success(String, int, Object) - Constructor for class org.petitparser.context.Success
-
- test(char) - Method in class org.petitparser.parser.primitive.CharacterPredicate.NotCharacterPredicate
-
- test(char) - Method in interface org.petitparser.parser.primitive.CharacterPredicate
-
Tests if the character predicate is satisfied.
- times(int) - Method in class org.petitparser.parser.Parser
-
Returns a parser that accepts the receiver exactly count times.
- token() - Method in class org.petitparser.parser.Parser
-
Returns a parser that returns a
Token.
- Token - Class in org.petitparser.context
-
A immutable token represents a parsed part of the input.
- Token(String, int, int, Object) - Constructor for class org.petitparser.context.Token
-
Constructs a token from the parsed value, the input buffer, and the start and stop position in
the input buffer.
- TokenParser - Class in org.petitparser.parser.actions
-
A parser that creates a token from the parsed input.
- TokenParser(Parser) - Constructor for class org.petitparser.parser.actions.TokenParser
-
- toString() - Method in class org.petitparser.context.Context
-
- toString() - Method in class org.petitparser.context.Failure
-
- toString() - Method in class org.petitparser.context.Success
-
- toString() - Method in class org.petitparser.context.Token
-
- toString() - Method in class org.petitparser.parser.combinators.EndOfInputParser
-
- toString() - Method in class org.petitparser.parser.combinators.NotParser
-
- toString() - Method in class org.petitparser.parser.Parser
-
Returns a human readable string identifying this parser.
- toString() - Method in class org.petitparser.parser.primitive.CharacterParser
-
- toString() - Method in class org.petitparser.parser.primitive.FailureParser
-
- toString() - Method in class org.petitparser.parser.primitive.StringParser
-
- toString() - Method in class org.petitparser.parser.repeating.RepeatingParser
-
- toString() - Method in class org.petitparser.utils.Mirror
-
- toString() - Method in class org.petitparser.utils.Profiler.Profile
-
- toString() - Method in class org.petitparser.utils.Tracer.TraceEvent
-
- totalActivationCount - Variable in class org.petitparser.utils.Profiler.Profile
-
The number of times the parser got activated in total (including nested calls).
- Tracer - Class in org.petitparser.utils
-
Traces the activation and return of parsers.
- Tracer() - Constructor for class org.petitparser.utils.Tracer
-
- Tracer.TraceEvent - Class in org.petitparser.utils
-
The trace event holding all relevant data.
- Tracer.TraceEventType - Enum in org.petitparser.utils
-
The trace event type differentiating between activation and return.
- transform(Function<Parser, Parser>) - Method in class org.petitparser.utils.Mirror
-
Returns a transformed copy of all parsers reachable from parser.
- transform(Parser) - Method in class org.petitparser.utils.Optimizer
-
Transforms the provided parsers using the selected optimizations.
- trim() - Method in class org.petitparser.parser.Parser
-
Returns a parser that consumes whitespace before and after the receiver.
- trim(Parser) - Method in class org.petitparser.parser.Parser
-
Returns a parser that consumes input on both sides of the receiver.
- trim(Parser, Parser) - Method in class org.petitparser.parser.Parser
-
Returns a parser that consumes input before and after the receiver.
- TrimmingParser - Class in org.petitparser.parser.actions
-
A parser that silently consumes a before and after the delegate parser.
- TrimmingParser(Parser, Parser, Parser) - Constructor for class org.petitparser.parser.actions.TrimmingParser
-
- type - Variable in class org.petitparser.utils.Tracer.TraceEvent
-
The type of this event.