a recursive descent parser for calculating arithmetic expressions written in Rust
just to get better at writing Rust code and also learning how to write a parser
you can just use cargo run
like below to evaluate the expression:
cargo run -- eval '-(23.56e3 + 2e-3) - (-10.2) * (2 + 8.2 + 2 * (4 + 5)) ^ (-1.2 - 1)'
use the following if you want to get the abstract syntax tree:
cargo run -- ast '-(23.56e3 + 2e-3) - (-10.2) * (2 + 8.2 + 2 * (4 + 5)) ^ (-1.2 - 1)'