Writing a C Compiler (2017)

lrsjng | 107 points

Yet another “compiling” course that puts all the emphasis on parsing.

Rule of thumb: parsing/lexing shouldn’t takes more than 10% of your compiler course.

hcks | a year ago

Book version to be released in October '23 : https://nostarch.com/writing-c-compiler

dananjaya86 | a year ago

Has anyone worked through this? Is it a good (soon to be) book?

bigdict | a year ago

[flagged]

e19293001 | a year ago

IMHO writing a compiler for a high-level language, in an even higher level language, somehow feels a bit "anachronistic" (for lack of better word).

userbinator | a year ago

Here is how to write a C compiler in Python that correctly compile the vast majority of C programs per the ISO C standard:

    print(“You have some form of undefined behavior, which means printing this is a valid response per the C standard”)
RcouF1uZ4gsC | a year ago