Repository navigation
Teaser
We explore the concepts of language, interpreters, compilers, and hardware architecture by building a simple pocket calculator.
These are the components that make up our calculator:
- An arithmetic language embedded into Haskell.
- Language interpreters to work out the value of an expression and pretty print it.
- A virtual stack machine to simulate the calculator hardware.
- A compiler to transform language expressions into low-level instructions the machine can run.
Even though this is just a toy, it should give us a fairly good idea of how to conceptualise the problem and design a solution.