Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/emgyrz/math_expr_parser

Math expressions parser
https://github.com/emgyrz/math_expr_parser

Last synced: 8 days ago
JSON representation

Math expressions parser

Awesome Lists containing this project

README

        

# Math expressions parser

Just for training

Dijkstra’s algorithm used

### Run
```sh
cargo run -- "5.23 + 41 * 0.79"
cargo run -- "(1 + 2) * -((3 + 4) - 9)"
```

#### Accepts
* floats
* simple math operations `+` | `-` | `*` | `/`
* round brackets `(` | `)`
* negative numbers and expressions in brackets `-9.1`, `-(5 + 2)`
* exponentiation `^`