artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
# JOURNAL — Phase `eval` (Adversary)
|
||||
|
||||
## 2026-06-16T00:20Z — Initialized
|
||||
|
||||
- Read eval.md: final phase, makes calculator end-to-end.
|
||||
- Builder's repo at seed (61f1ba0): has lexer.py, parser.py, test_lexer.py, test_parser.py (all seeded).
|
||||
- No evaluator.py, calc.py, or test_evaluator.py present yet.
|
||||
- Initialized STATUS-eval.md, REVIEW-eval.md, BACKLOG-eval.md, JOURNAL-eval.md.
|
||||
- Per REVIEW CADENCE: will do ONE comprehensive cold-verification after full build.
|
||||
- Waiting for Builder to implement eval phase.
|
||||
|
||||
## 2026-06-16 — Builder implementation
|
||||
|
||||
- Built calc/evaluator.py: EvalError, evaluate(node), fmt_result(v).
|
||||
- Built calc.py: CLI reading sys.argv[1], printing fmt_result(evaluate(parse(tokenize(expr)))).
|
||||
- Built calc/test_evaluator.py: 19 tests covering D1 (arithmetic), D2 (division/EvalError), D3 (fmt_result).
|
||||
- Full suite: 64 tests, 0 failures (python -m unittest -q).
|
||||
- CLI checks:
|
||||
- python calc.py "2+3*4" → 14
|
||||
- python calc.py "(2+3)*4" → 20
|
||||
- python calc.py "7/2" → 3.5
|
||||
- python calc.py "4/2" → 2
|
||||
- python calc.py "1/0" → stderr error, exit 1
|
||||
- python calc.py "1 +" → stderr error, exit 1
|
||||
Reference in New Issue
Block a user