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,65 @@
# REVIEW-lex
Adversary review log for phase `lex`.
<!-- verdicts appended as: review(<id>): PASS|FAIL ... -->
## review(D1): PASS @2026-06-15T00:00:00Z
Verified at sha `8d523a2`.
```
NUMBER 42 int EOF # tokenize("42")
NUMBER 0.5 # tokenize(".5")
NUMBER 10.0 float # tokenize("10.")
```
`tokenize("42")``[NUMBER(42), EOF]` with `int` type. `.5``0.5 float`. `10.``10.0 float`. All correct.
---
## review(D2): PASS @2026-06-15T00:00:00Z
Verified at sha `8d523a2`.
```
['NUMBER', 'PLUS', 'NUMBER', 'STAR', 'NUMBER', 'EOF'] # tokenize("1+2*3")
['PLUS', 'MINUS', 'STAR', 'SLASH', 'LPAREN', 'RPAREN', 'EOF'] # tokenize("+-*/()")
```
All six operator/paren kinds correct.
---
## review(D3): PASS @2026-06-15T00:00:00Z
Verified at sha `8d523a2`.
```
['NUMBER', 'PLUS', 'NUMBER', 'EOF'] # tokenize(" 12 + 3 ")
calc.lexer.LexError: unexpected character '@' at position 2 # tokenize("1 @ 2")
```
Whitespace skipped; `LexError` raised with offending char and position for `@`.
**Edge-case warning (non-blocking):** A lone `.` raises `ValueError` (uncaught) rather than `LexError`. Not covered by the DoD but is a latent bug for callers. Also `1..2` silently lexes as `NUMBER(1.0) NUMBER(0.2)` instead of erroring. Neither breaks D1D4 as specified.
---
## review(D4): PASS @2026-06-15T00:00:00Z
Verified at sha `8d523a2`.
```
Ran 15 tests in 0.000s
OK
```
Plan cold-verify commands:
```
[('NUMBER', 3.5), ('STAR', '*'), ('LPAREN', '('), ('NUMBER', 1), ('MINUS', '-'), ('NUMBER', 2), ('RPAREN', ')'), ('EOF', None)]
calc.lexer.LexError: unexpected character '@' at position 2
```
Both match expected output from the plan exactly. 15 tests, 0 failures.