M-Calculator Version 4
M-Calculator Version 4 is the fourth iteration of my first non-trivial C project. It is a command-line scientific calculator which can either be run using command-line arguments are in read-eval-print loop (REPL) mode. The calculator uses a recursive-descent parser to evaluate expressions. The calculator supports arithmetic operations, order of operations, exponentiation, logarithms, trigonometric functions, variables, and constants (e and π).
I started this project because I wanted to start learning about compiler design, and I figured they best way to do that is by learning how to tokenize and parse a mathematical expression. I do still plan to make my own programming language and compiler, but I have taken a break from that goal to focus on other projects. When I do get around to writing a compiler, I want to use Rust, because string parsing in C is a massive pain. In fact, this project led to me writing to helper libraries: M-Logging for logging and Arachne for string handling.