We have a fully working ASPL VM now, although its current functionality is rather limited. Right now it is nothing more than a simple arithmetic calculator. Today we’ll start extending its capabilities to work towards a fully capable programming language implementation. We start by adding support for boolean expressions. But before we can do that, we have to revisit ASPL’s grammar rules and make some important changes.
Last time we started working on the VM, we implemented the basic framework for executing bytecode, integrated the compiler into the VM, paved the way for our VM to execute bytecode. We added some helpers to read opcodes and constants from the bytecode and finally implemented a debugger / disassembler feature as well. Today we will finish up the work, and implement the necessary bytecode–executing functions so our VM will be able to execute all promised arithmetic operations.
Last time we implemented the compiler, so we can now generate bytecode from the source code. To complete the cycle and implement a complete (limited functionality for now) interpreter for ASPL we still need a virtual machine. This is what we will do today.