|
|
2fa0bb4df1
|
tcl: Phase 6 — namespace, list ops, dict additions, scan/format, exec [WIP]
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Phase 6a (namespace `::` prefix):
- tcl-global-ref?/strip-global helpers
- tcl-var-get/set route ::name to root frame
- tokenizer parse-var-sub accepts `::` start so $::var works
- tcl-call-proc forwards :fileevents/:timers/:procs/:commands
- char-at fast-path optimization on var-get/set hot path
Phase 6b (list ops): added lassign, lrepeat, lset, lmap.
Phase 6c (dict additions): added dict lappend, remove, filter -key.
Phase 6d (scan/format):
- printf-spec SX primitive wrapping OCaml Printf via Scanf.format_from_string
- scan-spec SX primitive (manual scanner for d/i/u/x/X/o/c/s/f/e/g)
- Tcl format dispatches via printf-spec; tcl-cmd-scan walks fmt and dispatches
Phase 6e (exec):
- exec-process SX primitive wraps Unix.create_process + waitpid
- Tcl `exec cmd arg...` returns trimmed stdout; raises on non-zero exit
test.sh inner timeout 3600s → 7200s (post-merge JIT recursion is slow).
+27 idiom tests covering ns, list ops, dict, format, scan, exec.
[WIP — full suite verification still pending]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-08 08:28:05 +00:00 |
|
|
|
559b0df900
|
GUEST: step 3 — lib/guest/lex.sx character-class + token primitives
Extracted shared tokeniser primitives:
- Char-class predicates: lex-digit?, lex-hex-digit?, lex-alpha?
(alias lex-letter?), lex-alnum?, lex-ident-start?, lex-ident-char?,
lex-space? (no newline), lex-whitespace? (incl newline). All nil-safe.
- Token record: lex-make-token, lex-make-token-spanning, accessors.
Ported lib/lua/tokenizer.sx and lib/tcl/tokenizer.sx — 7 lua and 5 tcl
predicate definitions collapsed into prefix-rename calls that alias
lua-/tcl- names to lex- primitives. Test scripts (lua/test.sh,
tcl/test.sh, tcl/conformance.sh) load lib/guest/lex.sx and prefix.sx
before the per-language tokenizer.
Verification:
- lua/test.sh: 185/185 = baseline
- tcl/test.sh: 342/342 (parse 67 + eval 169 + error 39 + namespace 22
+ coro 20 + idiom 25)
- tcl/conformance.sh: 3/4 = baseline (event-loop failure is pre-existing)
Two consumers verified — step complete.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-06 23:06:12 +00:00 |
|