org.parboiled.parserunners
Class ProfilingParseRunner<V>

java.lang.Object
  extended by org.parboiled.parserunners.BasicParseRunner<V>
      extended by org.parboiled.parserunners.ProfilingParseRunner<V>
Type Parameters:
V -
All Implemented Interfaces:
ParseRunner<V>

public class ProfilingParseRunner<V>
extends BasicParseRunner<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
 class ProfilingParseRunner.Handler
           
static class ProfilingParseRunner.Report
           
static class ProfilingParseRunner.RuleReport
           
 
Field Summary
 
Fields inherited from class org.parboiled.parserunners.BasicParseRunner
initialValueStackSnapshot, inputBuffer, matched, parseErrors, rootContext, rootMatcher, valueStack
 
Constructor Summary
ProfilingParseRunner(Rule rule)
          Creates a new ProfilingParseRunner instance for the given rule.
ProfilingParseRunner(Rule rule, ValueStack<V> valueStack)
          Creates a new ProfilingParseRunner instance for the given rule using the given ValueStack instance.
 
Method Summary
 ProfilingParseRunner.Report getReport()
           
protected  boolean runRootContext()
           
 
Methods inherited from class org.parboiled.parserunners.BasicParseRunner
run, run, run, run, runRootContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfilingParseRunner

public ProfilingParseRunner(Rule rule)
Creates a new ProfilingParseRunner instance for the given rule.

Parameters:
rule - the parser rule

ProfilingParseRunner

public ProfilingParseRunner(Rule rule,
                            ValueStack<V> valueStack)
Creates a new ProfilingParseRunner instance for the given rule using the given ValueStack instance.

Parameters:
rule - the parser rule
valueStack - the value stack
Method Detail

runRootContext

protected boolean runRootContext()
Overrides:
runRootContext in class BasicParseRunner<V>

getReport

public ProfilingParseRunner.Report getReport()