Live data from Hacker News

Want to write a compiler? Just read these two papers (2008)

prog21.dadgum.com

171–173 of 173 posts

Re: Want to write a compiler? Just read these two papers (2008)

#171
The latest edition (3rd Edition) of Introduction to Compiler Design by Mogensen has new topics on SSA form, garbage collection, polymorphism and translation of pattern matching [1].

[1] Introduction to Compiler Design:

https://link.springer.com/book/10.1007/978-3-031-46460-7

Re: Want to write a compiler? Just read these two papers (2008)

#172
All these years I thought The Dragon Book referred to the “Green” Dragon book (which was the text I used in my compiler class in the very early 80s) only to Just realize that when folks refer to “The Dragon Book” that it is the red/purple book by 2 of the same authors from ‘84.

I remember that I ignored most of the stuff when I did my compiler from the book I used and did a recursive descent parser which the book really, if I remember correctly, did not cover except maybe for a brief mention. The instructor was also pushing everyone to use lex/yacc and I thought that was not the right way to go if you wanted to actually understand things. Interesting most of the folks that used lex/yacc had trouble completing the assignment whereas I thought it was straightforward.

Re: Want to write a compiler? Just read these two papers (2008)

#173
post #118

Earlier quoted context omitted.

It’s academic and comprehensive, that’s the issue. It’s not about writing a production grade compiler, though, in my humble opinion. There are more things to learn for that, unfortunately… is just a pretty big topic with lots of stuff to learn.

the dragon book is all i have on the topic. it was a big investment for me. it taught me to think very differently but i am sure i am still not ready to write a compiler :D

'Engineering a Compiler' by Cooper & Torczon is a great resource. It gives context on each topic, explains them clearly, and at the same time, I think, it is a really good resource from an academic point of view. It still requires some investment in terms of time and effort, but I found it more approachable than the Dragon book. I would say that both cover more or less the same introductory stage to compilers construction. If you have read the Dragon book, I have the feeling that you are perfectly well prepared to write your own compiler.
Post reply on HN