Package | Description |
---|---|
org.parboiled | |
org.parboiled.support | |
org.parboiled.test |
Modifier and Type | Class and Description |
---|---|
(package private) class |
NodeImpl<V>
An immutable implementation of the Node interface.
|
Modifier and Type | Field and Description |
---|---|
private Node<V> |
MatcherContext.node |
Modifier and Type | Field and Description |
---|---|
private ImmutableLinkedList<Node<V>> |
MatcherContext.subNodes |
Modifier and Type | Method and Description |
---|---|
Node<V> |
MatcherContext.getNode() |
Modifier and Type | Method and Description |
---|---|
ImmutableLinkedList<Node<V>> |
MatcherContext.getSubNodes() |
java.util.List<Node<V>> |
Context.getSubNodes()
Returns the parse tree subnodes already created in the current context scope.
|
private static <V> ImmutableLinkedList<Node<V>> |
MatcherContext.getSubNodes(ImmutableLinkedList<Node<V>> remaining,
ImmutableLinkedList<Node<V>> tail) |
Modifier and Type | Method and Description |
---|---|
private static <V> ImmutableLinkedList<Node<V>> |
MatcherContext.getSubNodes(ImmutableLinkedList<Node<V>> remaining,
ImmutableLinkedList<Node<V>> tail) |
private static <V> ImmutableLinkedList<Node<V>> |
MatcherContext.getSubNodes(ImmutableLinkedList<Node<V>> remaining,
ImmutableLinkedList<Node<V>> tail) |
Constructor and Description |
---|
NodeImpl(Matcher matcher,
ImmutableLinkedList<Node<V>> children,
int startIndex,
int endIndex,
V value,
boolean hasError) |
Modifier and Type | Field and Description |
---|---|
Node<V> |
ParsingResult.parseTreeRoot
The root node of the parse tree created by the parsing run.
|
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 <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,C extends java.util.Collection<Node<V>>> |
ParseTreeUtils.collectNodesByPath(java.util.List<Node<V>> parents,
java.lang.String path,
C collection)
Collects all nodes underneath the given parents that match the given path.
|
static <V,C extends java.util.Collection<Node<V>>> |
ParseTreeUtils.collectNodesByPath(Node<V> parent,
java.lang.String path,
C collection)
Collects all nodes underneath the given parent that match the given path.
|
Modifier and Type | Method and Description |
---|---|
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> Node<V> |
ParseTreeUtils.findNodeByLabel(java.util.List<Node<V>> parents,
java.lang.String labelPrefix)
Returns the first node underneath the given parents which matches the given label prefix.
|
static <V> Node<V> |
ParseTreeUtils.findNodeByLabel(Node<V> parent,
java.lang.String labelPrefix)
Returns the first node underneath the given parent for which matches the given label prefix.
|
static <V> Node<V> |
ParseTreeUtils.findNodeByPath(java.util.List<Node<V>> parents,
java.lang.String path)
Returns the node underneath the given parents that matches the given path.
|
static <V> Node<V> |
ParseTreeUtils.findNodeByPath(Node<V> parent,
java.lang.String path)
Returns the parse tree node underneath the given parent that matches the given path.
|
Modifier and Type | Method and Description |
---|---|
boolean |
LabelPrefixPredicate.apply(Node<V> input) |
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,C extends java.util.Collection<Node<V>>> |
ParseTreeUtils.collectNodesByPath(Node<V> parent,
java.lang.String path,
C collection)
Collects all nodes underneath the given parent that match the given path.
|
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(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> Node<V> |
ParseTreeUtils.findNodeByLabel(Node<V> parent,
java.lang.String labelPrefix)
Returns the first node underneath the given parent for which matches the given label prefix.
|
static <V> Node<V> |
ParseTreeUtils.findNodeByPath(Node<V> parent,
java.lang.String path)
Returns the parse tree node underneath the given parent that matches the given path.
|
java.lang.String |
NodeFormatter.format(Node<V> node) |
static java.lang.String |
ParseTreeUtils.getNodeText(Node<?> node,
InputBuffer inputBuffer)
Returns the input text matched by the given node, with error correction.
|
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(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,C extends java.util.Collection<Node<V>>> |
ParseTreeUtils.collectNodesByPath(java.util.List<Node<V>> parents,
java.lang.String path,
C collection)
Collects all nodes underneath the given parents that match the given path.
|
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(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(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> Node<V> |
ParseTreeUtils.findNodeByLabel(java.util.List<Node<V>> parents,
java.lang.String labelPrefix)
Returns the first node underneath the given parents which matches the given label prefix.
|
static <V> Node<V> |
ParseTreeUtils.findNodeByPath(java.util.List<Node<V>> parents,
java.lang.String path)
Returns the node underneath the given parents that matches the given path.
|
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. |
Constructor and Description |
---|
ParsingResult(boolean matched,
Node<V> parseTreeRoot,
ValueStack<V> valueStack,
java.util.List<ParseError> parseErrors,
InputBuffer inputBuffer)
Creates a new ParsingResult.
|
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) |