artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
# JOURNAL-parse.md
|
||||
|
||||
## 2026-06-15
|
||||
|
||||
### Build
|
||||
|
||||
- Read phase plan from `/home/loops/project-orchestrator/projects/agent-orchestrator-benchmark/plans/calc/parse.md`
|
||||
- Examined existing `calc/lexer.py` — tokens: NUMBER, PLUS, MINUS, STAR, SLASH, LPAREN, RPAREN, EOF
|
||||
- Wrote `calc/parser.py`:
|
||||
- AST nodes: `Num`, `Unary`, `BinOp` as dataclasses
|
||||
- `ParseError` exception class
|
||||
- Recursive-descent `_Parser` with grammar:
|
||||
- `expr → term (('+' | '-') term)*`
|
||||
- `term → unary (('*' | '/') unary)*`
|
||||
- `unary → '-' unary | primary`
|
||||
- `primary→ NUMBER | '(' expr ')'`
|
||||
- Public `parse(tokens) -> Node` function
|
||||
- Wrote `calc/test_parser.py` with 46 tests across 6 test classes covering D1–D5
|
||||
|
||||
### Verification
|
||||
|
||||
- Ran `python -m unittest -q` → 46 tests, 0 failures, 0 errors
|
||||
- Ran plan's cold-verify commands — all match expected output
|
||||
- Verified all D1–D5 gates with explicit assertions
|
||||
|
||||
### Commit
|
||||
|
||||
- `feat: add recursive-descent parser with AST nodes and unittest suite (phase parse)` — pushed to main
|
||||
Reference in New Issue
Block a user