https://github.com/bclehmann/calculator
A simple repo for learning rust and getting familiar with parser generators
https://github.com/bclehmann/calculator
Last synced: about 1 month ago
JSON representation
A simple repo for learning rust and getting familiar with parser generators
- Host: GitHub
- URL: https://github.com/bclehmann/calculator
- Owner: bclehmann
- License: unlicense
- Created: 2022-12-09T22:34:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T22:43:57.000Z (over 3 years ago)
- Last Synced: 2025-01-10T22:42:13.352Z (over 1 year ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# calculator
A simple project for learning rust and getting familiar with parser generators.
This uses the [pest](https://crates.io/crates/pest) parser generator to create a 4-function calculator, with support for order of operations and parentheses.
In hindsight, I didn't learn much rust (it's barely a hundred lines), but this was a good intro into more complicated grammars. It made compilers and interpreters
drastically less intimidating.