V
- public class ProfilingParseRunner<V> extends AbstractParseRunner<V> implements MatchHandler
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.
Modifier and Type | Class and Description |
---|---|
static class |
ProfilingParseRunner.Report |
static class |
ProfilingParseRunner.RuleReport |
Constructor and Description |
---|
ProfilingParseRunner(Rule rule)
Creates a new ProfilingParseRunner instance for the given rule.
|
Modifier and Type | Method and Description |
---|---|
ProfilingParseRunner.Report |
getReport() |
boolean |
match(MatcherContext<?> context)
Runs the given MatcherContext.
|
ParsingResult<V> |
run(InputBuffer inputBuffer)
Performs the actual parse and creates a corresponding ParsingResult instance.
|
createParsingResult, createRootContext, getParseErrors, getRootMatcher, getValueStack, resetValueStack, run, run, withParseErrors, withValueStack
public ProfilingParseRunner(Rule rule)
rule
- the parser rulepublic ParsingResult<V> run(InputBuffer inputBuffer)
ParseRunner
run
in interface ParseRunner<V>
inputBuffer
- the inputBuffer to usepublic ProfilingParseRunner.Report getReport()
public boolean match(MatcherContext<?> context)
MatchHandler
match
in interface MatchHandler
context
- the MatcherContextCopyright © 2019. All rights reserved.