Commit graph

5 commits

Author SHA1 Message Date
Stephen Dennis
fbeca3a7b7 Prototype parser-controlled lexer modes for noeval 2026-03-23 12:32:35 -06:00
Stephen Dennis
ec4999f317 Fix 5 build system bugs: deps, paths, version stamping
1. db/Makefile: Fix SQLite path (../mux/src/sqlite → ../mux/sqlite)
   and add -I for sqlite3.h in C++ compile rules.

2. mux/src/Makefile.am: Fix version stamping — target
   netmux-version.o (Automake's per-program prefix) instead of
   version.o, so MUX_BUILD_DATE/MUX_BUILD_NUM actually reach
   the linker.

3. mux/lib/Makefile.am: Add -MMD -MF to .lo pattern rules and
   -include the generated .d files. Header changes in mux/include/
   now trigger correct incremental rebuilds of libmux.so.

4. mux/modules/engine/Makefile.am: Same -MMD -MF treatment for .eo
   pattern rules. engine.so now tracks header dependencies.

5. parser/Makefile: Add mux_parse.h as explicit dependency for all
   three standalone tools.

Verified: touching mux/include/hir.h correctly triggers rebuild of
all engine .eo files that include it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:22:09 -06:00
Stephen Dennis
60f668bfd9 Add AST evaluator with 50+ builtin functions
Stage 3 of parser study: tree-walking evaluator that demonstrates
pure-expression MUX softcode CAN be evaluated from an AST. Implements
arithmetic, string, list, comparison, boolean, register, and control
flow functions. Includes 64-test harness.

Key finding: FN_NOEVAL functions (iter, switch, if) need deferred
argument evaluation — the evaluator must pass unevaluated AST subtrees
rather than pre-evaluated strings. Solvable but requires a different
dispatch mechanism than simple string-in/string-out handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:06:59 -07:00
Stephen Dennis
a5aa9efacb Add recursive-descent parser and enhanced tokenizer
Stage 2 of parser study: recursive-descent parser that builds an AST
from the token stream. Handles static function calls, dynamic/computed
calls (DynCall), eval brackets, brace groups, and nested arglists.
Enhanced tokenizer with full L2 %-substitution coverage. Added test
corpus covering all major expression patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:06:59 -07:00
Stephen Dennis
666759ca39 Add parser architecture study and tokenizer prototype
Document the three-layer parser architecture (command, expression,
lock) in docs/PARSER.md with analysis of mux_exec internals, the
backwards function name recognition challenge, and a staged plan
for potential AST generation. Include a standalone tokenizer CLI
tool in parser/ for studying MUX expression structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:06:59 -07:00