artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs

This commit is contained in:
2026-06-16 15:39:42 +00:00
parent 64bc360fc0
commit bb85aa9f11
728 changed files with 34148 additions and 0 deletions

View File

@ -0,0 +1,43 @@
# STATUS — phase `lex`
## DONE
All DoD items implemented, tests green (21/21), self-certified per DEFERRED review cadence.
---
## Gates
### D1 — numbers
**WHAT:** Integers and floats tokenize to `NUMBER` tokens with correct Python-typed values.
**HOW:** `python -m unittest -q`
**EXPECTED:** 21 tests, 0 failures
**WHERE:** `calc/lexer.py`, `calc/test_lexer.py`
### D2 — operators & parens
**WHAT:** `+ - * / ( )` each produce correct token kinds.
**HOW:** `python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('3.5*(1-2)')])"`
**EXPECTED:** `[('NUMBER', 3.5), ('STAR', '*'), ('LPAREN', '('), ('NUMBER', 1), ('MINUS', '-'), ('NUMBER', 2), ('RPAREN', ')'), ('EOF', None)]`
**WHERE:** `calc/lexer.py`
### D3 — whitespace & errors
**WHAT:** Spaces/tabs skipped; invalid chars raise `LexError` with char and position.
**HOW:** `python -c "from calc.lexer import tokenize; tokenize('1 @ 2')"` — must raise `LexError`
**EXPECTED:** `calc.lexer.LexError: unexpected character '@' at position 2`
**WHERE:** `calc/lexer.py`
### D4 — tests green
**WHAT:** `calc/test_lexer.py` passes under `python -m unittest`, 0 failures.
**HOW:** `python -m unittest -q`
**EXPECTED:** `Ran 21 tests in X.XXXs\nOK`
**WHERE:** `calc/test_lexer.py`
---
## Verification commands (for Adversary cold-verify)
```bash
python -m unittest -q
python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('3.5*(1-2)')])"
python -c "from calc.lexer import tokenize; tokenize('1 @ 2')"
```