Class ProfilingParseRunner<V>
java.lang.Object
org.parboiled.parserunners.AbstractParseRunner<V>
org.parboiled.parserunners.ProfilingParseRunner<V>
- Type Parameters:
V-
- All Implemented Interfaces:
MatchHandler, ParseRunner<V>
The ProfilingParseRunner is a special ParseRunner implementation that "watches" a parser digest a number
of inputs and collects all sorts of statistical data on the what rules have matched how many times, the number
of reincovations of rules at identical input locations, and so on.
The ProfilingParseRunner is typically used during parser debugging and optimization, not in production.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionProfilingParseRunner(Rule rule) Creates a new ProfilingParseRunner instance for the given rule. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatch(MatcherContext<?> context) Runs the given MatcherContext.run(InputBuffer inputBuffer) Performs the actual parse and creates a corresponding ParsingResult instance.Methods inherited from class AbstractParseRunner
createParsingResult, createRootContext, getParseErrors, getRootMatcher, getValueStack, resetValueStack, run, run, withParseErrors, withValueStack
-
Constructor Details
-
ProfilingParseRunner
Creates a new ProfilingParseRunner instance for the given rule.- Parameters:
rule- the parser rule
-
-
Method Details
-
run
Description copied from interface:ParseRunnerPerforms the actual parse and creates a corresponding ParsingResult instance.- Specified by:
runin interfaceParseRunner<V>- Parameters:
inputBuffer- the inputBuffer to use- Returns:
- the ParsingResult for the run
-
getReport
-
match
Description copied from interface:MatchHandlerRuns the given MatcherContext.- Specified by:
matchin interfaceMatchHandler- Parameters:
context- the MatcherContext- Returns:
- true if matched
-