Any book recommendation for writing a compiler?
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Wed Nov 1 22:13:05 UTC 2017
On Wednesday, November 01, 2017 20:53:44 Dr. Assembly via Digitalmars-d-
learn wrote:
> Hey guys, if I were to get into dmd's source code to play a
> little bit (just for fun, no commercial use at all), which
> books/resources do you recommend to start out?
Well, if you're looking to actually buy a book, this is the one that I used
in college and it was good:
https://www.amazon.com/Compiler-Construction-Principles-Kenneth-Louden/dp/0534939724/ref=sr_1_1?ie=UTF8&qid=1509574006&sr=8-1&keywords=louden+compiler
However, the one that folks generally mention is the "dragon book:"
https://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811
I haven't read it though, so I can't comment on its contents, just that it's
commonly recommended. Neither book is exactly cheap though. There may be
some good online resources for learning about compilers, but I don't know
them. However, if you're really serious about it, you'll probably want to
read a textbook, since it's the sort of area where a good theoretical
background to things can be quite useful. Certainly, at minimum, you're
going to want to know the differences between things like a lexer and parser
and what an abstract syntax tree is.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list