kate-deft/docs
Levi Neely 6341b1ad01 sam: port sam's own regex engine (leftmost-longest, linear-time)
Replace QRegularExpression with SamRegex (src/sam/samregex.{h,cpp}), a
faithful port of plan9port src/cmd/sam/regexp.c: a Thompson/Pike NFA.

  - Leftmost-LONGEST (POSIX): matches real sam exactly, including overlapping
    alternation (a|ab on 'ab' -> 'ab'), eliminating the one remaining
    greedy-vs-longest divergence from PCRE.
  - Linear time, no backtracking: immune to catastrophic blowup ((a*)*b over
    10k 'a' returns instantly).
  - sam dialect only: . * + ? | ( ) [ ] ^ $ and \ escaping (\n = newline);
    ^/$ per-line and ./negated-classes exclude newline, all intrinsic. No
    PCRE extras (\d \w \b, lookaround, non-greedy) — sam never had them.

Port notes: shunting-yard compiler + Pike VM with per-thread capture sets and
leftmost-longest newmatch(). Fixed two porting bugs vs the C original: the
l-union aliasing of OR's left/continuation with .next, and reading the popped
subid during popator for correct capture-group ids.

SamEngine now compiles/matches via SamRegex (search, s, x/y/g/v, replacement
captures). Tests: new test_samregex (18) + updated test_samengine (31, incl.
leftmostLongestSubstitution, sam-dialect capture groups). 18/18 ctest suites.

Docs: rewrite docs/SAM.md (no more PCRE deviation; dialect + semantics are
sam's), update PLAN.md and the panel hint.
2026-10-08 14:44:05 +02:00
..
PERF.md Perf: parallelize the full-N palette scan across the thread pool 2026-10-08 11:38:32 +02:00
PLAN.md sam: port sam's own regex engine (leftmost-longest, linear-time) 2026-10-08 14:44:05 +02:00
SAM.md sam: port sam's own regex engine (leftmost-longest, linear-time) 2026-10-08 14:44:05 +02:00
radials.example.json Radial: cleaner split labels + warp cursor into the created pane 2026-10-08 12:27:07 +02:00