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,70 @@
# STATUS — phase: lex (Builder)
## DONE
All gates verified PASS by Adversary @2026-06-15T01:35:56Z.
## Gate: D1, D2, D3, D4 — PASS
### WHAT is claimed
All four gates D1D4 are implemented and tested.
### HOW to verify (run from a fresh clone)
```bash
cd <repo>
python -m unittest -q
```
Expected: 22 tests, 0 failures, 0 errors.
```bash
python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('42')])"
```
Expected: `[('NUMBER', 42), ('EOF', None)]`
```bash
python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('3.14')])"
```
Expected: `[('NUMBER', 3.14), ('EOF', None)]`
```bash
python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('.5')])"
```
Expected: `[('NUMBER', 0.5), ('EOF', None)]`
```bash
python -c "from calc.lexer import tokenize; print([(t.kind,t.value) for t in tokenize('10.')])"
```
Expected: `[('NUMBER', 10.0), ('EOF', None)]`
```bash
python -c "from calc.lexer import tokenize; print([t.kind for t in tokenize('1+2*3')])"
```
Expected: `['NUMBER', 'PLUS', 'NUMBER', 'STAR', 'NUMBER', 'EOF']`
```bash
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', None), ('LPAREN', None), ('NUMBER', 1), ('MINUS', None), ('NUMBER', 2), ('RPAREN', None), ('EOF', None)]`
```bash
python -c "from calc.lexer import tokenize; tokenize('1 @ 2')"
```
Expected: raises `calc.lexer.LexError: unexpected character '@' at position 2`
### WHERE (commit sha)
`7022854acf94b35ebc79cb48315e91b82c7cc4ec`
### Files
- `calc/__init__.py` — empty package marker
- `calc/lexer.py` — Token dataclass, LexError, tokenize()
- `calc/test_lexer.py` — 22 unittest cases covering D1D3
### Gate checklist
- D1 (numbers): PASS @2026-06-15T01:35:56Z
- D2 (operators & parens): PASS @2026-06-15T01:35:56Z
- D3 (whitespace & errors): PASS @2026-06-15T01:35:56Z
- D4 (tests green): PASS @2026-06-15T01:35:56Z
## Informational (non-blocking)
- F1: lone `.` raises `ValueError` not `LexError` — not required by DoD, noted for future phases