ParseTree against a tree pattern.
| Modifier and Type | Field and Description |
|---|---|
| private final MultiMap | labels
This is the backing field for |
| private final ParseTree | mismatchedNode
This is the backing field for |
| private final ParseTreePattern | pattern
This is the backing field for |
| private final ParseTree |
| Access | Constructor and Description |
|---|---|
| public | ParseTreeMatch(ParseTree
The parse tree to match against the pattern. tree, ParseTreePattern The parse tree pattern. pattern, MultiMap<String, ParseTree> A mapping from label names to collections of
labels, ParseTree ParseTree objects located by the tree pattern matching process.The first node which failed to match the tree
pattern during the matching process. mismatchedNode)Constructs a new instance of |
| Modifier and Type | Method and Description |
|---|---|
| public ParseTree | |
| public List | |
| public MultiMap | Returns: A mapping from labels to parse tree nodes. If the parse tree pattern did not contain any rule or token tags, this map will be empty.Return a mapping from label → [list of nodes]. |
| public ParseTree | Returns: the node at which we first detected a mismatch, ornull
if the match was successful.Get the node at which we first detected a mismatch. |
| public ParseTreePattern | Returns: The tree pattern we are matching against.Get the tree pattern we are matching against. |
| public ParseTree | |
| public boolean | Returns: true if the match operation succeeded; otherwise,
false.Gets a value indicating whether the match operation succeeded. |
| public String |
| labels | back to summary |
|---|---|
| private final MultiMap<String, ParseTree> labels This is the backing field for | |
| mismatchedNode | back to summary |
|---|---|
| private final ParseTree mismatchedNode This is the backing field for | |
| pattern | back to summary |
|---|---|
| private final ParseTreePattern pattern This is the backing field for | |
| tree | back to summary |
|---|---|
| private final ParseTree tree This is the backing field for | |
| ParseTreeMatch | back to summary |
|---|---|
| public ParseTreeMatch(ParseTree tree, ParseTreePattern pattern, MultiMap<String, ParseTree> labels, ParseTree mismatchedNode) Constructs a new instance of
| |
| get | back to summary |
|---|---|
| public ParseTree get(String label) Get the last node associated with a specific For example, for pattern Pattern tags like | |
| getAll | back to summary |
|---|---|
| public List Return all nodes matching a rule or token tag with the specified label. If the
| |
| getLabels | back to summary |
|---|---|
| public MultiMap Return a mapping from label → [list of nodes]. The map includes special entries corresponding to the names of rules and
tokens referenced in tags in the original pattern. For additional
information, see the description of | |
| getMismatchedNode | back to summary |
|---|---|
| public ParseTree getMismatchedNode() Get the node at which we first detected a mismatch. | |
| getPattern | back to summary |
|---|---|
| public ParseTreePattern getPattern() Get the tree pattern we are matching against.
| |
| getTree | back to summary |
|---|---|
| public ParseTree getTree() Get the parse tree we are trying to match to a pattern. | |
| succeeded | back to summary |
|---|---|
| public boolean succeeded() Gets a value indicating whether the match operation succeeded.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |