3 ms·
Take a look at the evergreen Let's Build a Compiler, by Jack Crenshaw https://compilers.iecc.com/crenshaw/ https://compilers.iecc.com/crenshaw/ Chapter 2 and
by ksherlock 2y ago
Take a look at the evergreen Let's Build a Compiler, by Jack Crenshaw
https://compilers.iecc.com/crenshaw/ https://compilers.iecc.com/crenshaw/
Chapter 2 and 3, expression parsing, should give you the idea. Instead of building the AST, you build code. So you're cutting out the middle man (AST).