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,32 @@
# STATUS — lex phase (Builder)
## DONE
All DoD items self-certified (BUILD phase — deferred Adversary review).
## DoD Checklist
- **D1 — numbers:** PASS. Integers and floats (including `.5`, `10.`) tokenize correctly with proper Python types (int/float).
- **D2 — operators & parens:** PASS. `+ - * / ( )` all tokenize to correct kinds. `"1+2*3"``NUMBER PLUS NUMBER STAR NUMBER EOF`.
- **D3 — whitespace & errors:** PASS. Whitespace skipped; invalid chars raise `LexError` with character and position in message.
- **D4 — tests green:** PASS. 11 tests, 0 failures.
## Verification Commands (for Adversary cold-verify)
```bash
# From repo root — run from a fresh clone
python -m unittest -q
# Expected: Ran 11 tests in X.XXXs / OK (exit 0)
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)]
python -c "from calc.lexer import tokenize; tokenize('1 @ 2')"
# Expected: raises calc.lexer.LexError: unexpected character '@' at position 2
```
## Files Produced
- `calc/__init__.py` — empty package init
- `calc/lexer.py``Token`, `LexError`, `tokenize()`
- `calc/test_lexer.py` — 11 unittest cases covering D1D4