We will build a full-featured command-line calculator in Rust from scratch. Starting with a minimal REPL, we will gradually add a tokenizer that splits expressions into meaningful tokens, implement the shunting-yard algorithm to convert infix notation to reverse Polish notation, and assemble a stack-based evaluator that calculates the final result.
Along the way, we will practice idiomatic Rust patterns: custom error types with Display, the Result/? pipeline, newtype wrappers, trait implementations (FromStr, Add, Sub, Mul, Div), and test-driven development. By the end, the calculator will handle parenthesized expressions with correct operator precedence, decimal numbers, and clear error messages for invalid input.