• src/syncterm/scripts/syncterm.wrensrc/syncterm/re1/parse.y regexp.h y.

    From Deuc¨@VERT to Git commit to main/sbbs/master on Monday, April 27, 2026 16:09:27
    https://gitlab.synchro.net/main/sbbs/-/commit/d22b21d57a0d129e795878a1
    Added Files:
    src/syncterm/scripts/syncterm.wren
    Modified Files:
    src/syncterm/re1/parse.y regexp.h y.tab.c src/syncterm/scripts/runtests.wren src/syncterm/wren_bind.c wren_host.c
    Log Message:
    SyncTERM: extract syncterm Wren module to scripts/syncterm.wren

    The 740-line foreign-class-declaration string literal in wren_host.c
    moves to scripts/syncterm.wren as plain Wren source. Now editable
    with syntax highlighting, comments stay readable, no escape-quote
    gymnastics. The build embeds it via the existing scripts/*.wren
    glob alongside connected.wren and console.wren.

    Load order: wren_host_init() now resolves "syncterm" first (preferring
    a user override at scripts/syncterm.wren on disk, falling back to the
    embedded copy), captures the Cell/Cells/KeyEvent/MouseEvent class
    handles, then walks the rest of EMBEDDED_SCRIPTS[] and the user
    script dir Ä both passes skip the syncterm entry to avoid double-load.

    Bonus fix shaken out by the move: parse() in RE1 unconditionally
    prepended `.*?` to every pattern for match-anywhere semantics, which
    defeated the streaming dispatcher's IMPOSSIBLE-shift trim. Add parse_unanchored() that returns the user's pattern wrapped only in
    the implicit group-0 capture; Hook.onMatch uses it. parse() keeps
    its original behavior for any future buffer-shaped caller.

    scripts/runtests.wren needed an explicit `import "syncterm" for Hook`
    since it loads as its own "runtests" module (not embedded, not in
    the syncterm scope).

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net