public ParseTreeMatch match(ParseTree tree, ParseTreePattern pattern) {
		MultiMap<String, ParseTree> labels = new MultiMap<String, ParseTree>();
		ParseTree mismatchedNode = matchImpl(tree, pattern.getPatternTree(), labels);
		return new ParseTreeMatch(tree, pattern, labels, mismatchedNode);
	}
Compare {@code pattern} matched against {@code tree} and return a
{@link ParseTreeMatch} object that contains the matched elements, or the
node at which the match failed. Pass in a compiled pattern instead of a
string representation of a tree pattern.
runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java