|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.parboiled.parserunners.AbstractParseRunner<V>
org.parboiled.parserunners.ReportingParseRunner<V>
org.parboiled.parserunners.TracingParseRunner<V>
public class TracingParseRunner<V>
A ParseRunner implementation used for debugging purposes.
It exhibits the same behavior as the ReportingParseRunner but collects debugging information as to which
rules did match and which didn't.
| Constructor Summary | |
|---|---|
TracingParseRunner(Rule rule)
Creates a new TracingParseRunner instance without filter and a console log for the given rule. |
|
| Method Summary | |
|---|---|
Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
getFilter()
|
Sink<java.lang.String> |
getLog()
|
boolean |
match(MatcherContext<?> context)
Runs the given MatcherContext. |
TracingParseRunner<V> |
withFilter(Predicate<?> filter)
Attaches the given filter to this TracingParseRunner instance. |
TracingParseRunner<V> |
withLog(Sink<java.lang.String> log)
Attaches the given log to this TracingParseRunner instance. |
| Methods inherited from class org.parboiled.parserunners.ReportingParseRunner |
|---|
run, run |
| Methods inherited from class org.parboiled.parserunners.AbstractParseRunner |
|---|
getParseErrors, getRootMatcher, getValueStack, run, run, withParseErrors, withValueStack |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TracingParseRunner(Rule rule)
rule - the parser rule| Method Detail |
|---|
public TracingParseRunner<V> withFilter(Predicate<?> filter)
Predicates operations and the predefined predicate constructors in Filters
much more cumbersome to write (due to Java limited type parameters inference logic you would have to explicitly
state the type parameters in many places).
filter - the matcher filter selecting the matchers to print tracing statements for. Must be of type
Predicatepublic Predicate<Tuple2<Context<?>,java.lang.Boolean>> getFilter()
public TracingParseRunner<V> withLog(Sink<java.lang.String> log)
log - the log to use
public Sink<java.lang.String> getLog()
public boolean match(MatcherContext<?> context)
MatchHandler
match in interface MatchHandlercontext - the MatcherContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||