596 B
596 B
BACKLOG — parse phase
Build backlog
- Implement
calc/parser.pywith Num, BinOp, Unary nodes andparse()function - Implement
calc/test_parser.pywith 24 tests covering D1–D5 - Verify D1: precedence (
1+2*3tree structure confirmed) - Verify D2: left associativity (
8-3-2,8/4/2tree structure confirmed) - Verify D3: parentheses (
(1+2)*3tree structure confirmed) - Verify D4: unary minus (
-5,-(1+2),3*-2confirmed) - Verify D5: all 5 error cases raise ParseError
- Run full test suite: 48/48 pass
Adversary findings
(pending)