HydroRoll-Team / HydroRoll-Team/OneRoll
Implement v2 Pratt precedence and canonical expressions
- Dominant language
- Python
- Stars
- 3
- Forks
- 1
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 2
Description
## Parent
- #7
## What to build
Deliver the accepted v2 precedence contract from pest tokens through a Pratt parser, checked typed evaluation, canonical rendering, Python results, CLI output, and normative conformance.
## Frozen contract
- `**` is right associative and binds before unary signs.
- Unary signs bind before multiplication/division, which bind before addition/subtraction.
- Integer division truncates toward zero.
- Every scalar operator returns Scalar while operand source nodes remain in the trace.
- Negative or oversized exponents fail; `0 ** 0` is `1`.
## Acceptance criteria
- [ ] RFC-0001 arithmetic case IDs pass in Rust and installed Python.
- [ ] Checked i64 arithmetic reports overflow, invalid exponent, and divide-by-zero without panic.
- [ ] Canonical expressions preserve the evaluated tree and option binding.
- [ ] V1 flat precedence and `^` exponent produce compatibility behavior or spanned migration diagnostics.
- [ ] Parenthesized pipelines target the compound result without changing parse precedence.
- [ ] Rust, Python, CLI, and documentation agree.
## Blocked by
- #7
- #17
- #39
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the parent and blocking issues (#7, #17, and #39), then trace pest tokens through the Pratt parser and checked evaluation. Run the RFC-0001 arithmetic cases in Rust and installed Python, and compare canonical expressions, CLI output, and documentation against the frozen precedence and error-handling contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- cli, compilers, documentation, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100