Tokenizing Arithmetic expressions - calculator p.1

submited by
Style Pass
2023-11-20 21:30:07

This is the first post of a four part series around implementing and understanding the steps for interpreting arithmetic expressions. The series is meant for explaining key concepts such as lexical analysis, parsing / building the ast, walking the ast / flatting it to byte code, bytecode virtual machines and TDD centered around compilers and interpreters.

This first article contains the introduction to our problem domain, the setup of our project, the basics of TDD and the first steps towards interpreting arithmetic expressions: tokenizing our input / performing lexical analysis

The second article will be centered around converting the list of tokens we created in the first article to an abstract syntax tree, short ast

The third article will be focused on walking the abstract syntax tree and converting nodes into a list of instructions for our virtual machine

The fourth and last article will be consisting of implementing the bytecode virtual machine and executing expressions compiled to bytecode

Leave a Comment