A Bytecode VM for Arithmetic: The Parser
In this series of posts, we write a bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics: In this series of posts, we write a bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics: Parsing arithmetic expressions to Abstract Syntax Trees (ASTs). Compiling AST s to bytecode. s to bytecode. Interpreting AST s. s. Efficiently executing bytecode in a virtual machine (VM). Disassembling bytecode and decomp