3 ms·
Gentle, yet insistent executive summary: If you don't know how compilers work, then you don't know how computers work. If you're not 100% sure whether you know
by joe_the_user 10y ago
Gentle, yet insistent executive summary: If you don't know how compilers work, then you don't know how computers work. If you're not 100% sure whether you know how compilers work, then you don't know how they work.
As opaque and arrogant as that sounds, the statement is actually fairly accurate.
The way I'd try to put nicely is that compiler construction involves some conceptual barriers that make constructing an interpreter or compiler different than other programs, even other complex programs.
The main difference is that a programming language is an abstract object on a different logical level than, say, a real world object.
I think the best way to understand this is constructing a recursive descent parser. Doing requires one to transform the language you parsing and so get an idea of abstract languages. A lot of the advice people gives, such as using regular expressions, isn't a way to get a complete picture of what's happening in the parser or compiler construction process.