From e3e605bd33fc5be56cb7ec842449718bc5337a75 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 17:46:11 -0300 Subject: A class with non-ASCII runes matches them: [éa-z] is taken as (é|[a-z]), a range up to 256 runes spelled out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mvzr's classes hold bytes, and it refused a multibyte member as a bad expression. Rewriting the class before compiling, as ^a|^b already is, needs no mvzr patch; runes that differ only in their last byte go as one alternative (\xc3[\xa0-\xbf] for [à-ÿ]) so a 256-rune range fits the 512-operation limit, which counts the pattern as rewritten. A wider range and [^é] are refused, naming why. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/fs.md b/docs/fs.md index 8464768b..af64fded 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -733,7 +733,12 @@ unanchored branches (`^def|x`) is refused, `bad regular expression`, since mvzr keeps `^` only first. A pattern may be up to 512 of mvzr's operations, about 512 characters (mvzr's own is 64; pardes builds it with more); a longer one is refused, `bad regular expression: longer than mvzr's 512 -operations`. An expression is +operations`. A class may hold non-ASCII runes (`[éa-z]`, `[à-ÿ]`): it is +taken as an alternation of them (`(é|[a-z])`), a range of up to 256 runes +spelled out, and the 512 counts the pattern as rewritten. A wider range +(`a range of runes wider than 256 in [...] is not supported`) and a negated +class with a non-ASCII rune (`[^é]`) are refused, since mvzr's classes hold +bytes. An expression is evaluated from the current address, the range last written to `addr` (or left by the last `data` write, just past it), as acme evaluates it from `w->addr` (xfid.c:446): `.` is that address, not the selection (`dot` is -- cgit v1.3