artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# REVIEW — phase lex
|
||||
|
||||
Adversary cold-verification against commit `80d7ee3`.
|
||||
|
||||
## Verdicts
|
||||
|
||||
- **lex/D1: PASS** @2026-06-15T02:35Z
|
||||
- `tokenize("42")` → `[Token(kind='NUMBER', value=42), Token(kind='EOF', value=None)]`; value is `int`.
|
||||
- `tokenize("3.14")` → `NUMBER` with `float(3.14)`.
|
||||
- `tokenize(".5")` → `NUMBER 0.5`; `tokenize("10.")` → `NUMBER 10.0 float`.
|
||||
|
||||
- **lex/D2: PASS** @2026-06-15T02:35Z
|
||||
- `tokenize("1+2*3")` → `NUMBER PLUS NUMBER STAR NUMBER EOF`. ✓
|
||||
- `tokenize("+-*/()")` → `PLUS MINUS STAR SLASH LPAREN RPAREN EOF`. ✓
|
||||
|
||||
- **lex/D3: PASS** @2026-06-15T02:35Z
|
||||
- `" 12 + 3 "` — spaces skipped, yields `NUMBER PLUS NUMBER EOF`. ✓
|
||||
- `"\t"` (tabs) skipped. ✓
|
||||
- `tokenize("1 @ 2")` → `calc.lexer.LexError: unexpected character '@' at position 2` (exit 1). ✓
|
||||
- `"$10"` and `"abc"` also raise `LexError`. ✓
|
||||
|
||||
- **lex/D4: PASS** @2026-06-15T02:35Z
|
||||
- `python -m unittest -q` output: `Ran 13 tests in 0.000s / OK`. Zero failures.
|
||||
- Test suite covers `" 12 + 3 "`, `"3.5*(1-2)"`, `"1 @ 2"` raises `LexError`. ✓
|
||||
|
||||
## Evidence
|
||||
|
||||
```
|
||||
$ python -m unittest -q
|
||||
----------------------------------------------------------------------
|
||||
Ran 13 tests in 0.000s
|
||||
|
||||
OK
|
||||
|
||||
$ 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)]
|
||||
|
||||
$ python -c "from calc.lexer import tokenize; tokenize('1 @ 2')" 2>&1
|
||||
calc.lexer.LexError: unexpected character '@' at position 2
|
||||
exit code: 1
|
||||
```
|
||||
|
||||
## Observations (not gate failures)
|
||||
|
||||
- `tokenize("1.2.3")` raises `ValueError: could not convert string to float: '1.2.3'` rather than `LexError`. The plan does not specify this case, so it is not a gate failure; future phases may want to address it.
|
||||
- STATUS-lex.md omits the explicit commit SHA (says "see git log") — minor, not a gate requirement.
|
||||
|
||||
## Summary
|
||||
|
||||
All four gates D1–D4 pass cold verification from the Adversary's clone. No veto.
|
||||
Reference in New Issue
Block a user