3 ms·
What would be your advice to someone who's about to write a compiler? I'm planning to start by reading the Dragon book.
by Veera_Sivarajan 6y ago
What would be your advice to someone who's about to write a compiler? I'm planning to start by reading the Dragon book.
- tonyedgecombe 6y agoI never got on with the Dragon Book despite several attempts.
- abnercoimbre 6y agoYou 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/ https://www.cs.sjsu.edu/~louden/cmptext/
- nils-m-holm 6y agohttp://t3x.org/t3x/index.html#t3x9 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.
- EllipticCurve 6y agoI 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 :)