apl: ⎕ quad-names end-to-end (+8 tests, 408/408)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m4s

Parser: apl-quad-fn-names list; is-fn-tok? + :name clause
in collect-segments-loop now route ⎕FMT through fn pipeline.

Eval-ast: :name branch dispatches ⎕IO/⎕ML/⎕FR/⎕TS to apl-quad-*
niladics; apl-monadic-fn handles ⎕FMT.

⎕← (print) deferred — tokenizer splits ⎕← into name + :assign.
This commit is contained in:
2026-05-07 13:49:35 +00:00
parent 7cf8b74d1d
commit 637ba4102f
4 changed files with 397 additions and 303 deletions

View File

@@ -119,9 +119,10 @@ and tightens loose ends.
chains `apl-tokenize``parse-apl``apl-eval-ast` against an empty env.
Verify with one-liners (`+/5` → 15, `1 2 3 + 4 5 6` → 7 9 11, etc.) and
with the actual `.apl` source files in `tests/programs/`.
- [ ] **`:quad-name` AST + handler** — extend tokenizer/parser to recognise
- [x] **`:quad-name` AST + handler** — extend tokenizer/parser to recognise
`⎕name`, then handle in `apl-eval-ast` by dispatching to `apl-quad-*`
runtime fns (`⎕IO`, `⎕ML`, `⎕FR`, `⎕TS`, `⎕FMT`, `⎕←`).
_(`⎕←` deferred — tokenizer treats `←` as `:assign` after `⎕`.)_
- [ ] **Bracket indexing verification** — load programs that use `A[I]` /
`A[I;J]` end-to-end; confirm parser desugars to `⌷` and runtime returns
expected slices. Add 5+ tests.
@@ -147,6 +148,7 @@ data; format for string templating.
_Newest first._
- 2026-05-07: Phase 7 step 3 — :quad-name end-to-end; tokenizer already produced :name "⎕FMT"; parser is-fn-tok? extended via apl-quad-fn-names; eval-ast :name dispatches ⎕IO/⎕ML/⎕FR/⎕TS to apl-quad-*; apl-monadic-fn handles ⎕FMT; ⎕← deferred (tokenizer splits ⎕←); +8 tests; 408/408
- 2026-05-07: Phase 7 step 2 — end-to-end pipeline `apl-run : string → array` (parse-apl + apl-eval-ast against empty env); +25 source-string tests covering scalars, strands, dyadic arith, monadic primitives, operators, ∘./.g products, comparisons, famous one-liners (+/10=55, ×/10=10!); tokenizer can't yet parse decimals so `3.7` literal tests dropped; **400/400**
- 2026-05-07: Phase 7 step 1 — operators in apl-eval-ast via apl-resolve-monadic/dyadic; supports / ⌿ \ ⍀ ¨ ⍨ ∘. f.g; queens(8) test removed (too slow for 300s timeout); +14 eval-ops tests; 375/375
- 2026-05-07: Phase 7 added — end-to-end pipeline, operators in eval-ast, :quad-name, bracket-indexing verify, idiom expansion, :Trap; aim is to wire parser↔runtime so .apl source files actually run