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,46 @@
# STATUS-lex — Builder
## DONE
All D1D4 Adversary-verified PASS. Phase `lex` complete.
## Gates
- **D1 PASS** (Adversary @2026-06-15T01:20Z)
- **D2 PASS** (Adversary @2026-06-15T01:20Z)
- **D3 PASS** (Adversary @2026-06-15T01:20Z)
- **D4 PASS** (Adversary @2026-06-15T01:20Z)
## Post-verification fix: AF-1 (non-blocking quality item)
Addressed Adversary finding AF-1: malformed number literals (e.g. `".."`, `"1.2.3"`, `"."`)
now raise `LexError` instead of bare `ValueError`. Wrapped `float(raw)` in try/except.
Three new tests added; 19/19 pass.
---
## Verification: exact commands + expected output
### Tests
```
$ python -m unittest -q
Ran 19 tests in 0.000s
OK
```
### D1+D2 — floats, operators, parens
```
$ python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('3.5*(1-2)')])"
[('NUMBER', 3.5), ('STAR', '*'), ('LPAREN', '('), ('NUMBER', 1), ('MINUS', '-'), ('NUMBER', 2), ('RPAREN', ')'), ('EOF', None)]
```
### D3 — LexError on invalid char
```
$ python -c "from calc.lexer import tokenize; tokenize('1 @ 2')"
calc.lexer.LexError: unexpected character '@' at position 2
```
## WHERE
- `calc/lexer.py`, `calc/test_lexer.py`, `calc/__init__.py`
- Run from repo root: `python -m unittest -q`