# transformers 5.24.1 (Apache-2.0), harvested by tools/harvest_corpus.py
=== input
Single pass over the watched delimiters, using the `regex` module's
        partial matching to decide -- per delimiter -- whether it can be committed
        now or must be held. Returns `(best, hold_start)`:

        * `best` is the earliest-starting delimiter we can safely commit *now*
          (longest on ties, opens before closes), or `None`.
        * `hold_start` is the leftmost buffer position occupied by a still-pending
          match: a partial (incomplete) delimiter, or a complete one ending at the
          buffer edge that more input could still grow. Bytes before it are safe to
          emit; bytes from it onward must be held. It stays `len(self._buffer)` when
          nothing is pending, letting the caller flush the whole buffer.

        A complete match is committable only if it starts strictly before
        `hold_start` -- otherwise an earlier (or co-located) pending delimiter could
        turn out to be the real one. At EOS nothing can grow, so partial matching is
        skipped and every complete match is committable.

        (The `regex` module always reports the empty string as a live prefix, so a
        partial search with no real match returns a zero-width match at the buffer
        end; that lands in the pending branch with `start == len(self._buffer)`, a
        no-op for `hold_start`.)
        
=== parse google
short_description: |
  Single pass over the watched delimiters, using the `regex` module's
  partial matching to decide -- per delimiter -- whether it can be committed
  now or must be held. Returns `(best, hold_start)`:
long_description: |
  * `best` is the earliest-starting delimiter we can safely commit *now*
    (longest on ties, opens before closes), or `None`.
  * `hold_start` is the leftmost buffer position occupied by a still-pending
    match: a partial (incomplete) delimiter, or a complete one ending at the
    buffer edge that more input could still grow. Bytes before it are safe to
    emit; bytes from it onward must be held. It stays `len(self._buffer)` when
    nothing is pending, letting the caller flush the whole buffer.
  
  A complete match is committable only if it starts strictly before
  `hold_start` -- otherwise an earlier (or co-located) pending delimiter could
  turn out to be the real one. At EOS nothing can grow, so partial matching is
  skipped and every complete match is committable.
  
  (The `regex` module always reports the empty string as a live prefix, so a
  partial search with no real match returns a zero-width match at the buffer
  end; that lands in the pending branch with `start == len(self._buffer)`, a
  no-op for `hold_start`.)
blank_after_short_description: True
blank_after_long_description: False
style: google
=== detect
rest
=== compose google
Single pass over the watched delimiters, using the `regex` module's
partial matching to decide -- per delimiter -- whether it can be committed
now or must be held. Returns `(best, hold_start)`:

* `best` is the earliest-starting delimiter we can safely commit *now*
  (longest on ties, opens before closes), or `None`.
* `hold_start` is the leftmost buffer position occupied by a still-pending
  match: a partial (incomplete) delimiter, or a complete one ending at the
  buffer edge that more input could still grow. Bytes before it are safe to
  emit; bytes from it onward must be held. It stays `len(self._buffer)` when
  nothing is pending, letting the caller flush the whole buffer.

A complete match is committable only if it starts strictly before
`hold_start` -- otherwise an earlier (or co-located) pending delimiter could
turn out to be the real one. At EOS nothing can grow, so partial matching is
skipped and every complete match is committable.

(The `regex` module always reports the empty string as a live prefix, so a
partial search with no real match returns a zero-width match at the buffer
end; that lands in the pending branch with `start == len(self._buffer)`, a
no-op for `hold_start`.)
