for (String line; (line = br.readLine()) != null; ) {
TregexPattern matchPattern = tpc.compile(line);
tsp.clear();
if (DEBUG) System.err.println("Pattern is " + line + " [" + matchPattern + ']');
while (continuing(line = br.readLine())) {
TsurgeonPattern p = Tsurgeon.parseOperation(line);
if (DEBUG) System.err.println("Operation is " + line + " [" + p + ']');
tsp.add(p);
}
if ( ! tsp.isEmpty()) {
TsurgeonPattern tp = Tsurgeon.collectOperations(tsp);
ops.add(new Pair<TregexPattern,TsurgeonPattern>(matchPattern, tp));
}
} // while not at end of file
} catch (IOException ioe) {
ioe.printStackTrace();