Package | Description |
---|---|
org.parboiled.common | |
org.parboiled.parserunners | |
org.parboiled.support | |
org.parboiled.test | |
org.parboiled.trees |
Modifier and Type | Class and Description |
---|---|
private static class |
Predicates.AlwaysFalsePredicate |
private static class |
Predicates.AlwaysTruePredicate |
private static class |
Predicates.AndPredicate<T> |
private static class |
Predicates.InPredicate<T> |
private static class |
Predicates.InstanceOfPredicate |
private static class |
Predicates.IsEqualToPredicate<T> |
private static class |
Predicates.IsNullPredicate |
private static class |
Predicates.NotNullPredicate |
private static class |
Predicates.NotPredicate<T> |
private static class |
Predicates.OrPredicate<T> |
Modifier and Type | Field and Description |
---|---|
private static Predicate<java.lang.Object> |
Predicates.AlwaysTruePredicate.INSTANCE |
private static Predicate<java.lang.Object> |
Predicates.AlwaysFalsePredicate.INSTANCE |
private static Predicate<java.lang.Object> |
Predicates.IsNullPredicate.INSTANCE |
private static Predicate<java.lang.Object> |
Predicates.NotNullPredicate.INSTANCE |
private Predicate<T> |
Predicates.NotPredicate.predicate |
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<? extends Predicate<? super T>> |
Predicates.AndPredicate.components |
private java.util.Collection<? extends Predicate<? super T>> |
Predicates.OrPredicate.components |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicates.alwaysFalse()
Returns a predicate that always evaluates to
false . |
static <T> Predicate<T> |
Predicates.alwaysTrue()
Returns a predicate that always evaluates to
true . |
static <T> Predicate<T> |
Predicates.and(java.util.Collection<? extends Predicate<? super T>> components)
Returns a predicate that evaluates to
true if each of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.and(Predicate<? super T>... components)
Returns a predicate that evaluates to
true if each of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.and(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if both of its
components evaluate to true . |
static <T> Predicate<T> |
Predicates.equalTo(T target)
Returns a predicate that evaluates to
true if the object being
tested equals() the given target or both are null. |
static <T> Predicate<T> |
Predicates.in(java.util.Collection<? extends T> target)
Returns a predicate that evaluates to
true if the object reference
being tested is a member of the given collection. |
static Predicate<java.lang.Object> |
Predicates.instanceOf(java.lang.Class<?> clazz)
Returns a predicate that evaluates to
true if the object being
tested is an instance of the given class. |
static <T> Predicate<T> |
Predicates.isNull()
Returns a predicate that evaluates to
true if the object reference
being tested is null. |
static <T> Predicate<T> |
Predicates.not(Predicate<T> predicate)
Returns a predicate that evaluates to
true if the given predicate
evaluates to false . |
static <T> Predicate<T> |
Predicates.notNull()
Returns a predicate that evaluates to
true if the object reference
being tested is not null. |
static <T> Predicate<T> |
Predicates.or(java.util.Collection<? extends Predicate<? super T>> components)
Returns a predicate that evaluates to
true if any one of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T>... components)
Returns a predicate that evaluates to
true if any one of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if either of its
components evaluates to true . |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicates.and(Predicate<? super T>... components)
Returns a predicate that evaluates to
true if each of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.and(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if both of its
components evaluate to true . |
static <T> Predicate<T> |
Predicates.and(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if both of its
components evaluate to true . |
static <T> Predicate<T> |
Predicates.not(Predicate<T> predicate)
Returns a predicate that evaluates to
true if the given predicate
evaluates to false . |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T>... components)
Returns a predicate that evaluates to
true if any one of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if either of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.or(Predicate<? super T> first,
Predicate<? super T> second)
Returns a predicate that evaluates to
true if either of its
components evaluates to true . |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicates.and(java.util.Collection<? extends Predicate<? super T>> components)
Returns a predicate that evaluates to
true if each of its
components evaluates to true . |
static <T> Predicate<T> |
Predicates.or(java.util.Collection<? extends Predicate<? super T>> components)
Returns a predicate that evaluates to
true if any one of its
components evaluates to true . |
Constructor and Description |
---|
NotPredicate(Predicate<T> predicate) |
Constructor and Description |
---|
AndPredicate(java.util.Collection<? extends Predicate<? super T>> components) |
OrPredicate(java.util.Collection<? extends Predicate<? super T>> components) |
Modifier and Type | Field and Description |
---|---|
static Predicate<ProfilingParseRunner.RuleReport> |
ProfilingParseRunner.Report.allRules |
private Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
TracingParseRunner.filter |
static Predicate<ProfilingParseRunner.RuleReport> |
ProfilingParseRunner.Report.namedRules |
Modifier and Type | Method and Description |
---|---|
Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
TracingParseRunner.getFilter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
ProfilingParseRunner.Report.printTopRules(int count,
Predicate<ProfilingParseRunner.RuleReport> filter) |
TracingParseRunner<V> |
TracingParseRunner.withFilter(Predicate<?> filter)
Attaches the given filter to this TracingParseRunner instance.
|
Modifier and Type | Class and Description |
---|---|
class |
LabelPrefixPredicate<V>
A simple Node predicate determining whether a Node matches a given label prefix.
|
Modifier and Type | Field and Description |
---|---|
static Predicate<Node<java.lang.Object>> |
Filters.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>> |
Filters.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>> |
Filters.SKIP_EMPTY_ZOMS
A predicate for Node tree printing, suppresses printing of parse tree nodes for ZeroOrMore rules that
do not have sub nodes.
|
Modifier and Type | Method and Description |
---|---|
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.fromLine(int firstLine)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.lines(int firstLine,
int lastLine)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.onlyMatches()
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.onlyMismatches()
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.onlyRules(Rule... rules)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Matcher> |
Filters.preventLoops()
A predicate for rule tree printing.
|
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.rules(Rule... rules)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.rulesBelow(Rule... rules)
A predicate usable as a filter (element) of a
TracingParseRunner . |
static Predicate<Tuple2<Context<?>,java.lang.Boolean>> |
Filters.untilLine(int lastLine)
A predicate usable as a filter (element) of a
TracingParseRunner . |
Modifier and Type | Method and Description |
---|---|
static <V,C extends java.util.Collection<Node<V>>> |
ParseTreeUtils.collectNodes(java.util.List<Node<V>> parents,
Predicate<Node<V>> predicate,
C collection)
Collects all nodes underneath the given parents for which the given predicate evaluates to true.
|
static <V,C extends java.util.Collection<Node<V>>> |
ParseTreeUtils.collectNodes(Node<V> parent,
Predicate<Node<V>> predicate,
C collection)
Collects all nodes underneath the given parent for which the given predicate evaluates to true.
|
static <V> Node<V> |
ParseTreeUtils.findLastNode(java.util.List<Node<V>> parents,
Predicate<Node<V>> predicate)
Returns the last node underneath the given parents for which the given predicate evaluates to true.
|
static <V> Node<V> |
ParseTreeUtils.findLastNode(Node<V> parent,
Predicate<Node<V>> predicate)
Returns the last node underneath the given parent for which the given predicate evaluates to true.
|
static <V> Node<V> |
ParseTreeUtils.findNode(java.util.List<Node<V>> parents,
Predicate<Node<V>> predicate)
Returns the first node underneath the given parents for which the given predicate evaluates to true.
|
static <V> Node<V> |
ParseTreeUtils.findNode(Node<V> parent,
Predicate<Node<V>> predicate)
Returns the first node underneath the given parent for which the given predicate evaluates to true.
|
static <V> java.lang.String |
ParseTreeUtils.printNodeTree(ParsingResult<V> parsingResult,
Predicate<Node<V>> nodeFilter,
Predicate<Node<V>> subTreeFilter)
Creates a readable string represenation of the parse tree in thee given
ParsingResult object. |
static <V> java.lang.String |
ParseTreeUtils.printNodeTree(ParsingResult<V> parsingResult,
Predicate<Node<V>> nodeFilter,
Predicate<Node<V>> subTreeFilter)
Creates a readable string represenation of the parse tree in thee given
ParsingResult object. |
Modifier and Type | Method and Description |
---|---|
ParboiledTest.TestResult<V> |
ParboiledTest.TestResult.hasParseTree(Predicate<Node<V>> nodeFilter,
Predicate<Node<V>> subTreeFilter,
java.lang.String expectedTree) |
ParboiledTest.TestResult<V> |
ParboiledTest.TestResult.hasParseTree(Predicate<Node<V>> nodeFilter,
Predicate<Node<V>> subTreeFilter,
java.lang.String expectedTree) |
Modifier and Type | Method and Description |
---|---|
static <T extends GraphNode<T>> |
GraphUtils.printTree(T node,
Formatter<T> formatter,
Predicate<T> nodeFilter,
Predicate<T> subTreeFilter)
Creates a string representation of the graph reachable from the given node using the given formatter.
|
static <T extends GraphNode<T>> |
GraphUtils.printTree(T node,
Formatter<T> formatter,
Predicate<T> nodeFilter,
Predicate<T> subTreeFilter)
Creates a string representation of the graph reachable from the given node using the given formatter.
|
private static <T extends GraphNode<T>> |
GraphUtils.printTree(T node,
Formatter<T> formatter,
java.lang.String indent,
java.lang.StringBuilder sb,
Predicate<T> nodeFilter,
Predicate<T> subTreeFilter) |
private static <T extends GraphNode<T>> |
GraphUtils.printTree(T node,
Formatter<T> formatter,
java.lang.String indent,
java.lang.StringBuilder sb,
Predicate<T> nodeFilter,
Predicate<T> subTreeFilter) |