Exploring C++ 20

Project 4, Exploration 74: Calculator

The calculator project is the most complicated one, being the last. I recommend following the six steps I outline in Exploration 74. The files below show the evolution of my solution as I follow the six steps. The parser undergoes the greatest change, although its central spirit remains the same throughout all steps.

In this project, I use Google Test for the unit-testing framework. The project was just too complicated for the trivial test.hpp file that other projects use.

See also the main chapters page.

  1. Simple parser, arithmetic expressions
  2. Add variables and assignment
  3. Store and evaluate parse trees
  4. Define simple functions
  5. Save and load libraries
  6. Support additional data types