6 ms·
One of the best resources I've seen on this is Capon and Jinks 'Compiler Engineering Using Pascal' (1988; ISBN 0-333-47155-5) if you can get hold of it http://
by mtkd 9y ago
One of the best resources I've seen on this is Capon and Jinks 'Compiler Engineering Using Pascal' (1988; ISBN 0-333-47155-5) if you can get hold of it
http://www.cs.man.ac.uk/~pjj/book.html http://www.cs.man.ac.uk/~pjj/book.html
- jonsen 9y agoAlso Brinch Hansen on Pascal Compilers: https://www.amazon.com/Brinch-Hansen-Pascal-Compilers/dp/0130830984/ https://www.amazon.com/Brinch-Hansen-Pascal-Compilers/dp/013...
- pjmlp 9y ago> 1 New from $3,000.00 Uau! I should take care of my old books.
- robertbaruch 9y agoHaha, don't forget there has to be a seller AND a buyer for a price to hold true.
- kazinator 9y agoThere also has to be volume for a price to hold true. Even if someone buys that one for $3000, that doesn't mean it's the price if it only happens once.
- soegaard 9y agoBrinch Hansen's book is a classic. It contains all necessary code for a self-compiling Pascal compiler (If I recall correctly).
- skate22 9y agoI took "compiler techniques" at UMASS Amherst where we built a compiler for a subset of pascal. It was one of the hardest classes i took for my undergrad, but i learnt so much from it. I think building a compiler is somthing every cs major should do once, even if it's just for a subset of a language.
- js2 9y agoDoes no one refer to the dragon book anymore? https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniq...
- neurotrace 9y agoThe dragon book is very informative but is harder to parse (ha) than many other compiler books. People should definitely read it, it just might be hard to read as a "My First Compiler" book.
- jcranberry 9y agoI started reading it a while ago when I wanted to properly learn compilers. I actually thought it was very readable.
- kqr 9y agoI must agree. It may be that you and I lean more toward the theoretical side and want more of a "grounds up" material (a chapter about transforming regexes to state machines? seriously?) than a "here's what to do to get it done by next thursday" book.
- jcranberry 9y agoLOL. Anyone attempting to build a compiler by next thursday is in for a rude awakening. In any case you're probably right, given that I like math and (so far) prefer algebra to analysis or applied mathematics.
- Athas 9y agoWhile there are some good bits in the dragon book, some of its advice on the engineering of a compiler is pretty dated. For example, most of the parsing chapter(s) seem to have the notion that there is a single (global?) symbol table to which tokens and various other things refer, and which is gradually refined and updated throughout compilation. I think that may have been a widespread design once, but it's a bizarre anachronism now. Nowadays, information is often embedded directly into the AST, and compiler passes often create and destroy multiple ad-hoc symbol tables as necessary. I would primarily trust the dragon book for its theoretical content, although even that likely no longer represents the state of the art. I'm not all that knowledgeable about the state of the art in parsers, but I know that compiler optimisations have certainly moved beyond what is in the dragon book. In short, while the dragon book still contains useful information, I don't think its notion of how a compiler is constructed is close to how compilers are actually constructed today.
- msla 9y agoThere's also "Let's Build A Compiler" by Jack Crenshaw: https://compilers.iecc.com/crenshaw/ https://compilers.iecc.com/crenshaw/ This page links to that and another, "A Nanopass Framework for Compiler Education" by Sarkar, Waddell, and Dybvig: http://prog21.dadgum.com/30.html http://prog21.dadgum.com/30.html http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf