https://github.com/michaelmdresser/dicelang
Dice expression parser and evaluator in Rust
https://github.com/michaelmdresser/dicelang
dice-roller dnd parser
Last synced: 17 days ago
JSON representation
Dice expression parser and evaluator in Rust
- Host: GitHub
- URL: https://github.com/michaelmdresser/dicelang
- Owner: michaelmdresser
- Created: 2023-03-19T21:16:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T09:27:40.000Z (about 1 year ago)
- Last Synced: 2025-04-01T10:29:33.410Z (about 1 year ago)
- Topics: dice-roller, dnd, parser
- Language: Rust
- Homepage:
- Size: 120 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dicelang: dice expression parser and evaluator in Rust
Rust crate capable of parsing and evaluating dice expressions like
`d20+1d4-1d6+3`. The main crate (here) provides parsing and evaluation
facilities. There are also sub-crates for [CLI](./dicelang-cli) and [WebAssembly (WASM)](./dicelang-wasm) support. See their
READMEs for more more information.
A live WASM demo can be found on my [website](https://michaeldresser.io/).

## Acknowledgements
Thanks to Robert Nystrom's book _Crafting Interpreters_ for providing the foundation for this small project.