Build a math expression evaluator
- Tokenizer
- Parser
- Evaluator
- The input is taken in as a string and the white-spaces are removed.
- A tokenizer is instantiated that creates tokens by iterating through each character of the input.
- An Abstract Syntax Tree is generated from the tokens.
- Evaluation is then performed, generating a single f64 value
(5*32-2^5)*0.125 #16.0
Make sure you have rust tool-chain installed, if not go here
cargo run
And then enter the expressions you want to evaluate.
Use ctrl+c to exit the program.