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
- Host: GitHub
- URL: https://github.com/deciduously/rpn
- Owner: deciduously
- License: mit
- Created: 2018-04-01T15:05:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-01T15:41:42.000Z (about 8 years ago)
- Last Synced: 2025-08-02T15:00:50.314Z (10 months ago)
- Language: Rust
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.