Commit Graph

2 Commits

Author SHA1 Message Date
a04de3e02b bufio: make scanning bounded and incremental 2026-08-09 18:17:42 +09:00
34101508be lib: split bufio into stream+scanner per ref/hare/bufio
Pure file-boundary move of lib/bufio/bufio.ww along its three banner
seams: buffered stream + vtable callbacks -> stream.ww (per
ref/hare/bufio/stream.ha), scanner + BUFSZ + overflow -> scanner.ww
(per ref/hare/bufio/scanner.ha). Head defs split by ownership:
flushdefault + rtabort (unread's assert) stay with stream, BUFSZ
(scanner.ha:11) + overflow with scanner. The module head comment
stays with stream.ww. No code, name, signature, or behavior change;
the three banner lines are deleted (file names carry them) and three
comment self-citations re-point (bufio.ww:87-89 -> stream.ww:73-75,
bufio.ww:46-50 -> stream.ww:46-50, bufio.ww:77 -> scanner.ww:15), plus
the lib/regex/regex.ww:1117 citation of lib/bufio/bufio.ww now names
scanner.ww. import bufio resolves by directory (cmd/ww locate_import
dir pass), so no consumer path lists change; bufio_test.ww is
untouched (its split is blocked by the shared putstr helper vs the
composed-mode duplicate-symbol reject; reported upstream).

Validation: out/bin/ww test -I lib/ww lib/bufio/bufio_test.ww (26
passed) and out/bin/ww test lib/bufio (ok, external) both green;
lib/regex/regex_test.ww (bufio importer) 33 passed.
2026-08-08 17:17:34 +09:00