code: public static Tree processPattern(TregexPattern matchPattern, TsurgeonPattern p, Tree t) {
      TregexMatcher m = matchPattern.matcher(t);
      while(m.find()) {
        t = p.evaluate(t,m);
        if(t==null)
          break;
        m = matchPattern.matcher(t);
      }
      return t;
    }
docs: Tries to match a pattern against a tree.  If it succeeds, apply the surgical operations contained in a {@link TsurgeonPattern}.
  @param matchPattern A {@link TregexPattern} to be matched against a {@link Tree}.
  @param p A {@link TsurgeonPattern} to apply.
  @param t the {@link Tree} to match against and perform surgery on.
  @return t, which has been surgically modified.