3 ms·
You could try Nystrom's "Crafting Interpreters" as an introduction but really you're asking about a topic that is usually covered in the final year of college b
by GrumpyYoungMan 5y ago
You could try Nystrom's "Crafting Interpreters" as an introduction but really you're asking about a topic that is usually covered in the final year of college because it has so much pre-requisite knowledge. You do need to know machine language for at least one processor architecture since that's the ultimate output that source code is being converted to. You also need to be pretty adept at data structures (often derided as useless knowledge by the HN pundits) because you're chopping up that source code into a structure amenable to conversion into machine code. (Ideally, you'd also want to know processor and machine architecture at a fairly detailed level because you can't really reason about performance without knowing the mechanisms by which machine language is actually processed and their constraints.) Only then are you at the point where it makes sense to talk about how the internals of a compiler is implemented.