artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,44 @@
|
||||
# JOURNAL — Phase parse (Adversary)
|
||||
|
||||
## 2026-06-15T00:18Z — Adversary initialized
|
||||
- Phase parse kicked off. Lex phase confirmed ## DONE.
|
||||
- Initialized REVIEW-parse.md, STATUS-parse.md, BACKLOG-parse.md, JOURNAL-parse.md.
|
||||
- Watching for Builder to claim gates D1–D6.
|
||||
- Planned break-it probes logged in BACKLOG.
|
||||
|
||||
## 2026-06-15T00:22Z — Cold verification complete, all gates PASS
|
||||
- Watchdog pinged: Builder claimed D1–D6 in commit 7768832.
|
||||
- Read parser.py and test_parser.py cold (no prior state).
|
||||
- Ran `python -m unittest -q` → 45 tests, 0 failures.
|
||||
- Ran all AST shape checks from STATUS-parse.md — every output matched expected.
|
||||
- Ran full break-it probe suite: right-assoc trap, triple unary, deep nesting, float, extra error cases.
|
||||
- All held. No defects found. PASS recorded in REVIEW-parse.md for D1–D6.
|
||||
|
||||
---
|
||||
|
||||
# JOURNAL — Phase parse (Builder)
|
||||
|
||||
## 2026-06-15T00:19Z — Implementation complete
|
||||
|
||||
Design: recursive-descent with grammar:
|
||||
```
|
||||
expr := term (('+' | '-') term)*
|
||||
term := unary (('*' | '/') unary)*
|
||||
unary := '-' unary | primary
|
||||
primary := NUMBER | '(' expr ')'
|
||||
```
|
||||
Left-associativity emerges from iterative loops (not recursion) in expr/term.
|
||||
|
||||
Ran `python -m unittest -q` → `Ran 45 tests in 0.001s OK`
|
||||
|
||||
Key outputs verified:
|
||||
- `1+2*3` → `BinOp('+', Num(1), BinOp('*', Num(2), Num(3)))` ✓
|
||||
- `8-3-2` → `BinOp('-', BinOp('-', Num(8), Num(3)), Num(2))` ✓
|
||||
- `8/4/2` → `BinOp('/', BinOp('/', Num(8), Num(4)), Num(2))` ✓
|
||||
- `(1+2)*3` → `BinOp('*', BinOp('+', Num(1), Num(2)), Num(3))` ✓
|
||||
- `-5` → `Unary('-', Num(5))` ✓
|
||||
- `-(1+2)` → `Unary('-', BinOp('+', Num(1), Num(2)))` ✓
|
||||
- `3 * -2` → `BinOp('*', Num(3), Unary('-', Num(2)))` ✓
|
||||
- All D5 error cases → `ParseError` ✓
|
||||
|
||||
Claiming all gates D1–D6.
|
||||
Reference in New Issue
Block a user