public class Filters
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Predicate<Node<java.lang.Object>> |
SKIP_EMPTY_OPTS
A predicate for Node tree printing, suppresses printing of parse tree nodes for Optional rules that
do not have sub nodes.
|
static Predicate<Node<java.lang.Object>> |
SKIP_EMPTY_OPTS_AND_ZOMS
A predicate for Node tree printing, suppresses printing of parse tree nodes for Optional and ZeroOrMore rules
that do not have sub nodes.
|
static Predicate<Node<java.lang.Object>> |
SKIP_EMPTY_ZOMS
A predicate for Node tree printing, suppresses printing of parse tree nodes for ZeroOrMore rules that
do not have sub nodes.
|
Constructor and Description |
---|
Filters() |
Modifier and Type | Method and Description |
---|---|
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
fromLine(int firstLine)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
lines(int firstLine,
int lastLine)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
onlyMatches()
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
onlyMismatches()
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
onlyRules(Rule... rules)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Matcher> |
preventLoops()
A predicate for rule tree printing.
|
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
rules(Rule... rules)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
rulesBelow(Rule... rules)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
untilLine(int lastLine)
A predicate usable as a filter (element) of a
TracingParseRunner . |
public static final Predicate<Node<java.lang.Object>> SKIP_EMPTY_OPTS
public static final Predicate<Node<java.lang.Object>> SKIP_EMPTY_ZOMS
public static Predicate<Matcher> preventLoops()
public static Predicate<Tuple2<Context<?>,java.lang.Boolean>> lines(int firstLine, int lastLine)
TracingParseRunner
.
Enables printing of rule tracing log messages for all input in the given range of input lines.firstLine
- the number of the first input line to generate tracing message forlastLine
- the number of the last input line to generate tracing message forpublic static Predicate<Tuple2<Context<?>,java.lang.Boolean>> fromLine(int firstLine)
TracingParseRunner
.
Enables printing of rule tracing log messages for all input in the given range of input lines.firstLine
- the number of the first input line to generate tracing message forpublic static Predicate<Tuple2<Context<?>,java.lang.Boolean>> untilLine(int lastLine)
TracingParseRunner
.
Enables printing of rule tracing log messages for all input in the given range of input lines.lastLine
- the number of the last input line to generate tracing message forpublic static Predicate<Tuple2<Context<?>,java.lang.Boolean>> rules(Rule... rules)
TracingParseRunner
.
Enables printing of rule tracing log messages for all given rules and their sub rules.rules
- the rules to generate tracing message forpublic static Predicate<Tuple2<Context<?>,java.lang.Boolean>> onlyRules(Rule... rules)
TracingParseRunner
.
Enables printing of rule tracing log messages for all given rules (without their sub rules).rules
- the rules to generate tracing message forpublic static Predicate<Tuple2<Context<?>,java.lang.Boolean>> rulesBelow(Rule... rules)
TracingParseRunner
.
Enables printing of rule tracing log messages for all sub rules of the given rules.rules
- the rules whose sub rules to generate tracing message forpublic static Predicate<Tuple2<Context<?>,java.lang.Boolean>> onlyMatches()
TracingParseRunner
.
Enables printing of rule tracing log messages for all matched rules.public static Predicate<Tuple2<Context<?>,java.lang.Boolean>> onlyMismatches()
TracingParseRunner
.
Enables printing of rule tracing log messages for all mismatched rules.