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

https://github.com/deciduously/rpn

RPN evaluator in Rust
https://github.com/deciduously/rpn

Last synced: 10 months ago
JSON representation

RPN evaluator in Rust

Awesome Lists containing this project

README

          

# rpn
Quick RPN calculator in Rust
## Dependencies
Stable Rust v1.25.0+
## Usage
`cargo test` to test the example found on [Wikipedia](https://en.wikipedia.org/wiki/Reverse_Polish_notation#Example).

`cargo run` with no arguments will prompt for a line of input to evaluate, or attempt to evaluate any args passed as input. Be careful - `*` and `-` should be in quotes to avoid your shell parsing it as a glob!

For example: `cargo run -- 15 7 1 1 + '-' / 3 '*' 2 1 1 + + '-'`.

Rinse, repeat.