Rating: Summary: Good, Maybe a little too focused on one solution. Review: 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.
Rating: Summary: Mak is useful, but do use it with caution. Review: 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.
Rating: Summary: A fine book on compiler construction using C++. Review: This book gives a very detailed discussion of how to write a compiler using C++. As such it could function as a supplementary textbook for a course in compilers or as one for an advanced course in C++. The author describes in detail every step of the way, and it makes interesting and fun reading. Buy it: it is well worth the price.
Rating: Summary: Ver informative Review: This book provides a detailed explanation on how compilers and interpretors (a high level concept) reads near human language text, and creates byte code that can be interpreted or executed on your system. Using Pascal as an example, it begins by building a scanner, defining tokens, and reading a text stream. Complete examples allow the audience to either read through the example while reading the explanation, or copy the code into any C compiler for a quick test drive. The explanations and the level of complexity increase as he reaches further toward building a full compiler, yet stops short of creating a full Pascal compiler. The reason being .. he gives the audience everything they need to complete the job, and let's them figure it out. Overall, this is a good book for anyone interested in parsing any type of document. There are no drastic jumps or leaps of intuition that need to be made. It provides a good understanding of how to parse other languages like C, Java, HTML, XML, or otherwise.
Rating: Summary: Very technical, at times heavy reading Review: This is a down'n'dirty book on how to create a complete Pascal compiler. The book is heavily loaded with massive amounts of code, code which is at times very repetitive, since the author keeps improving on his classes time after time, writing the complete class code each time. If you can read C++ code as well as english, this is a great book to learn every detail about creating a compiler.
The book also cover alot of interesting off-topics, such as programming technique and code management. It is quite obvious that Roald Mak is a very gifted programmer.
I would not recommend this book to anyone who hasn't been doing regular C++ programming for at least 2-3 years. But then again, who else would care about creating their own compilers? ;)
Rating: Summary: Great Introduction Review: This is a good introduction for people with no previous knowledge of writing a compiler. I recommend good working knowledge of C++; and if you know Pascal, you're even better off. Knowledge of basic data structures (Stacks, Linked Lists, Binary Trees) is also important. The language that he implements is Pascal, but it would be a simple task to implement another language.
Rating: Summary: Excellent Review: This is one of the finest books on compiler design that I have read. The greatest thing about this book is author's writing style, conceptual integrity and a balance between theory and practise. Another thing that programmers will really like, is Ronald's application of solid design principals to a complex application like a compiler.
Rating: Summary: Excellent practical introduction to the subject Review: This text fully accomplishes its goal of providing a simple and practical introduction to this subject. Students and self-taught programmers having difficulty understanding compiler theory from texts like the "dragon book" will find this book very useful in getting started. Working thru all the well written C++ code also provides excerise in polishing your C++ programming skills, beyond the first class introducing C++. Though there is a lot of code, I feel there is significant "added value" in the presentation of code segments and textual descriptions which helps novices grasp implementation of the concepts being discussed. As every author knows, books like all other projects can be refined further. One enhancement to this book is that every chapter should include a (small) section dedicated discussing the theoretical concepts without any reference to the code. Alternative approaches and advanced concepts could be mentioned here with a word about using simple techniques to stay in line with the goal of the book.
|