Example #1
0
 /**
  * returns a <code>TextStore</code> which contains submatches, if any, pertaining to the most
  * recent match. The object returned should be treated read-only. Its contents are only valid
  * until the next match operation.
  *
  * @throws IllegalStateException if the most recent application of <code>this</code> did not yield
  *     a match.
  */
 public TextStore submatches() {
   if (a == null || a == DfaRun.EOF) {
     throw new IllegalStateException("no recent match available");
   }
   if (!analyzed) {
     analyzed = true;
     ts.clear();
     ts.appendPart(out, 0, out.length());
     smd.analyze(ts, a);
   }
   return ts;
 }