Hacker Newsnew | past | comments | ask | show | jobs | submit | Veera_Sivarajan's commentslogin

What would be your advice to someone who's about to write a compiler? I'm planning to start by reading the Dragon book.


I never got on with the Dragon Book despite several attempts.


You both should try "Compiler Construction: Principles and Practice" [0]. Theory is interleaved with substantial examples and exercises. You create an entire compiler for a tiny language called TINY (hah.) You write it in C and generate code for a portable virtual machine -- the book also goes into detail on the VM, with source code.

Lastly, the book's appendix has guidance for writing a compiler for a subset of the C language.

[0] https://www.cs.sjsu.edu/~louden/cmptext/


I didn't really read any books on that topic. But did lots of general research about compiler stages. I also posted a few links some comments up, that helped a lot.

For for it! Start small and increase. But seeing a program in your own language output something makes it all worth it :)


http://t3x.org/t3x/index.html#t3x9

If you plan to buy the book, you will have to go to Lulu.com and search for it, as order links seem to be down after a site redesign.


Mind sharing the title of the book?


I'm a student and I always scout for books online. I promise myself that, if the book helps me, I'll buy a copy of it in the future.


Yes. Until a couple of weeks ago I would be able to view individual photos but now I can only view the profile until I hit the login restriction.


Right click the post and select open in new tab. This doesn't fix the problem of not being able to scroll through the history though.


I'm learning Mandarin and Web Development


Merry Christmas!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: