return matchedParts;
}
public void visitTree(Tree t) {
int numMatches = 0;
TregexMatcher match = p.matcher(t);
List<Tree> matchedPartList = null; // initialize lazily, since usually most trees don't match!
while (match.find()) {
Tree curMatch = match.getMatch();
//System.out.println("Found match is: " + curMatch);
if (matchedPartList == null) matchedPartList = new ArrayList<Tree>();
matchedPartList.add(curMatch);
numMatches++;
} // end while match.find()