90 of 94 people found the following review helpful:
2.0 out of 5 stars
Mak is useful, but do use it with caution., April 15, 2000
This review is from: Writing Compilers and Interpreters (Paperback)
There are several things you should know about this book:
1) The book implements a top-down or recursive-descent parser, as opposed to a standard shift-reduce parser. This is *very* important, as lex/yacc, Visual Parse++, and other parsing tools are efficient shift-reduce macines. Thus, the parser isn't really portable. Even so, I did find the the symbol table design that's used by the parser to be critical for what I needed.
2) The printed material is mostly (say 70%) code listings, thus even though the book is a whopping 838 pages, it would be much slimmer with fewer listings. The code is downloadable from the pusblisher's (Wiley) site.
3) The 30% of text and figures that are in the book could be much more insightful. For example, Chapter 11 - the interactive debugger should at least have some description (screenshots perhaps) of how to use the debugger. (Hint, the commands end with a semi-colon.)
4) Even though this book is C++ oriented, it doesn't use standard containers like linked lists, or trees (maps/sets). The classes have pointers in them that makes the class also act as a its own node in a list or whatever. This makes the design much more confusing than it needs to be.
5) The symbol table implementation has heavy circular dependencies. Quite honestly I don't know of a better implementation (yet). This does, however pose a problem if you'll need to extend the design (to use STL containers, to self-serialize, etc.)
The book has been a godsend, but I couldn't honestly let the 4 and 5 star reviews sit unchallenged. If I had known the above sooner, I could have saved quite a few weekends.
I think an Ideal Writing Compilers book would come bundled with a thirty day version of Visual Parse++ or Dr. Parse, and work from there.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
14 of 14 people found the following review helpful:
4.0 out of 5 stars
Good, Maybe a little too focused on one solution., June 16, 1999
This review is from: Writing Compilers and Interpreters (Paperback)
The book describes step-by-step how the author would write a compiler for PASCAL. It could do with some more explanations of the logic behind some of the decisions,as it tends to quickly explain what the following C++ code does,before launching into pages of (well written) programming. If you have been tasked to write a specific compiler, then this book is probably what you want to get. If you are wanting to further your knowledge of the art, then you would be better looking at some of the more weighty volumes.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
11 of 11 people found the following review helpful:
5.0 out of 5 stars
Excellent Treatment of a Tough Subject, September 27, 2001
This review is from: Writing Compilers and Interpreters (Paperback)
I bought this book in 1996 when I was a CS graduate student. The course text was the traditional "dragon book" which is a complete nigthmare to understand. I read this book in hopes of better understanding how compilers and interpreters are implemented and to this day I feel like I hit the jackpot.
The book focuses primarily on the practical implementation of language interpreters and compilers and includes the code (C++) for a full featured Pascal interpreter (not just a minimal implementation that interprets a few statements). The author walks the reader through each class virtually line by line and presents the material in a way that any intermediate level C++ developer can easily understand.
Notwithstanding the pragmatic focus of this book, it also provides excellent treatment of the theory of compiler design. While it is at least 5 years old, I still keep this book in my library.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No