Compiler Construction: Principles and Practice
T**A
Excellent book
I rate Compiler Construction: Principles and Practice to the same category as legendary Kernighan/Ritchie C Programming Language, Petzold's Programming Windows or Richter's Programming Server Side Applications for MS Windows 2000. This is one of the best books I have ever read.Compiler construction is relatively hard topic with lot of theory needed to be understood before you can write even the most trivial compiler. Regular expressions, finite automata, BNF or attribute grammars are just few things you need to know and known them very well before you can write you own compiler.Many books paying too much attention to theory, but theory itself without many practical examples is nearly useless - especially if you are new in this field. You need examples, very good, thoroughly explained examples and even better source code where theory is transformed into practice. This is something that the book does and does it very well.Every topic is covered by such examples and at the end of every chapter there is practical implementation of scanner, parser (recursive descent), semantic analyzer and code generator in 'raw' C, using very simple (but useful) language called TINY.Another great thing is how the book is organized. First chapter introduces major steps in compiler design like scanning, parsing, semantic, runtime environment, code generation and subsequent chapters dealing with these topics. That's great, because after finishing each chapter you can write your own scanner (chapter 2), top down parser (chapter 4), bottom up parser (chapter 5), semantic analyzer (chapter 6) and runtime environment and code generation (last 2 chapters).Probably the best 'proof' how great this book is, is the fact that I as an absolute beginner in compiler construction (I have been working professionally as developer for 10 years), was able to write down my own scanner, parser (LL(1), LR(1), and also LALR(1)), semantic analyzer and code generator to 0x86 MASM ASSEMBLER in 'raw' C#, without using of any automatic generators like Lex or Yacc for simple C- language presented in the book (language has global and local variables, procedures, simple arrays and strings).Compiler Construction: Principles and Practice is the best book for everyone who has no previous experience with compiler construction. Book doesn't cover all advanced topics but it's the best material for those ones who are new in this field. After finishing book you will have enough theoretical and practical experiences to move to more advanced books (but also much more difficult to grasp) like famous Dragon book.
I**I
Quite dated and not comprehensive but gets the job done
This book goes through the front-end and middle-end of compiler construction, though not so much on the back-end. It serves as a great introductory material on parsing methods, however it dismisses some more modern techniques onto its "references" section at the end of the chapter. As such, this book comes across as an introductory book, despite what its title suggests.I would thereby caution the prospective compiler writer/student looking to study compiler construction in-depth to avoid this book. Nevertheless I was quite pleased with the book because it presents the front and middle ends of compiler construction in a clear and concise way. Furthermore, it contains excerpts of code that implement a working compiler for a 'theoretical' language and a theoretical architecture (albeit in text. Unofficial code is available on github though). Which is surprising despite the lack of coverage on subjects like register allocation, dataflow analysis, etc.Tl;Dr, if you're looking for an introductory compiler book, without the complexities of back-end compiler construction, I recommend one to get this. Otherwise, either get the Dragon book or eingeering a compiler. This book wouldn't satisfy the adventurous compiler writer/student.
R**Z
Well explained subject
Compilers are a complicated subject, thankfully the lecturer in college in charge of the course used this book that explains the subject carefully and with many examples and appropriate diagramas. I have contacted the author and the editorial regarding a digital edition of the book, hopefully we will see it soon. Amazing book.
M**N
A great book
This is the best compiler book I have read. I have gone through 4 different compiler books. All have clear problems. This one is totally different, it is easy to read and understand. Furthermore, it is full of examples and come with solution manual for instructors. IMHO, it is the most suitable textbook for an introductory course in compilers.
S**S
Purchased for school
This was a book I purchased for class. Now that I have a better understanding I would like to go back and re-read this book. I think it skips some steps and does not show you how to build a compiler from the ground up. But it is still a great resource if you ever wanted to make your own compiler.
K**5
Five Stars
service was fast this is a really good book on compilers
I**.
Wish the book existed as pdf.
One of the best and more real hands-on books on compiler construction.
G**O
Great Book
So much easier to read and follow than the Dragon Book. It is more like a tutorial with good theory background.
V**.
Great quick intro with practical examples in C
If you know very little about compiler construction than this book is a good one to start with, although dated the basic principles haven't changed in last 30+ years so everything you learn in this book is still valid. All the basic principles are discussed, lexical analysis including work with lex/flex, syntax analysis with the appropriate CF grammar theory, LL and LR parsers including usage of parser generator yacc/bison, semantic analysis like type checking, organization of run-time environments and basic code generation. There is very little about garbage collection or compiler optimizations but these are bit more advanced topics anyway. Very useful is the real implementation of a compiler of a tiny language in C, source code included, for a virtual machine called tiny machine, which is a limited computer with few registers. Over all great introductory text, which is not enough by itself but the topic is so huge that none of the books are covering everything.
D**Y
Very heavy subject and not for the faint hearted. ...
Very heavy subject and not for the faint hearted. Compiler design is a very complex subject however many of the principles on compiler design can be used for other areas of software development. Abstract Data Trees in particular Alison with parsing techniques are well worth understanding. I read about a third of the book many many times and found it very interesting. I have read so many books on software development however the last half of this book is tough and I moved on to researching chemistry instead.
Trustpilot
3 weeks ago
1 day ago