An open API service indexing awesome lists of open source software.

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

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/).

![](media/cli-shot.png)

## Acknowledgements

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