docs: void advance() {
      if (tc.isEntryEnabled())
        tc.entry(this,cclass, "advance");
      if (!prefixDone) {
        Pattern.Clause prefix = pattern.getPrefix();
        if (prefix == null || next >= prefix.items.length) {
          Pattern.Clause suffix = pattern.getSuffix();
          if (suffix != null && suffix != prefix) {
            // SWITCH_TO_SUFFIX
            prefixDone = true;
            next = suffix.items.length-1;
          }
          // else in one of the FINAL_ states, so do nothing
        }
        else
          // somewhere in the body of the prefix, so advance by incrementing
          next++;
      }
      else
        // somewhere in the suffix, so advance by decrementing
        next--;
      if (tc.isEntryEnabled())
        tc.exit(this,cclass, "advance");
    }