https://github.com/fflorent/rust-rpn
A Reverse Polish Notation lib + executable
https://github.com/fflorent/rust-rpn
Last synced: 8 months ago
JSON representation
A Reverse Polish Notation lib + executable
- Host: GitHub
- URL: https://github.com/fflorent/rust-rpn
- Owner: fflorent
- License: mit
- Created: 2016-09-12T16:55:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-05T19:20:33.000Z (over 9 years ago)
- Last Synced: 2025-10-09T22:33:28.852Z (8 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 10
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Reverse Polish Notation written in Rust
This package contains both an executable and a library for [Reverse Polish Notation](https://en.wikipedia.org/wiki/Reverse_Polish_notation) (aka RPN) calculation.
## Executable
In order to run a REPL to evaluate RPNÂ expressions, just run `cargo run`.
## Library
If you want to evaluate use the library, take a look at `rpn::evaluate(expr: &str) -> Result`:
```rust
extern crate rpn;
let result:f32 = rpn::evaluate("5 2 +").unwrap();
```
## License
MIT