|
|||||||||||||||||||||||||||||||||||
|
18 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
39 of 40 people found the following review helpful:
3.0 out of 5 stars
Fair -- But somewhat incomplete,
By
This review is from: Building Parsers With Java™ (Paperback)
This book is well written with few spelling/typographical errors. However, it's title is a bit misleading. I expected the book to explain how to develop a parser from the ground up (tokenizing the input strings, recognizing the syntax, dispatching to appropriate code based on the recognized symbols, etc.)Instead, the book shows how to build parsers using the authors own parser toolkit. The toolkit seems to be quite good, with lots of useful facilities. However I found myself frustrated because it seemed like the most interesting topics were effectively avoided by making them part of the toolkit. Want to build an interpreter? Use the author's "Engine" class -- just pass it your language rules. Want to parse a different language? Use the author's parser tools, just pass it information about the syntax. Still, the book does provide good descriptions of the spaces between the low-level details of tokenizing and interpreting. It's just dissapointing that it doesn't provide more coverage of the "black arts" of parser design.
39 of 41 people found the following review helpful:
5.0 out of 5 stars
John Vlissides Foreword is right on the money,
By
This review is from: Building Parsers With Java™ (Paperback)
The foreword says "Traditional parsing tools are overkill at best, antiquated and unusable at worst. The result? Ad hoc has become the parsing approach of choice.But when I read this book, I had a change of heart." So did I. I came across this book (a week and a half ago) when I was just about to begin designing a small language to embed in an application. I was loathing the task to come because the parser development tools are all oriented towards large languages and there's nothing to help with small ones. I really didn't want to go learn all about JavaCC or SableCC. They are both excellent tools, but overkill for my tiny language. The first day, I read chapters 1-5 and wrote a couple of experimental attempts at pieces of our desired langauge to prove that it would work. The second day, reading material from chapters 4 (on testing), 5 (on data languages), and 6 (on transforming grammars), I paired with another developer and we developed the entire grammar for our little language. The third day, we used chapter 5 again and bits of chapters 10 (Matching Mechanics) and 16 (Parsing an Imperative Language) to develop the actions in our language. Absolutely fantastic. Useful. Practical. On topic without the wasted digressions introducing basic Java concepts that are so prevalent in many Java books.
13 of 15 people found the following review helpful:
3.0 out of 5 stars
Beware the Parser Framework!,
By
Amazon Verified Purchase(What's this?)
This review is from: Building Parsers With Java™ (Paperback)
I agree with the other 3-star reviews of this book. It's full of fascinating ideas about a very advanced topic, but the fact that everything is so dependent on the included framework makes it difficult to learn from. I think the best programming books teach you how to build step-by-step from the ground up. Instead, this book expects you to immerse yourself in the code first, and then figure things out from there.
12 of 14 people found the following review helpful:
3.0 out of 5 stars
Nice if you want to write your own scripting language/input,
By
This review is from: Building Parsers With Java™ (Paperback)
I own arround 80 books about compiler/language design, and this is what I have to say about this book.
It's a FIVE star, if you are looking for a easy cookbook to deal with simple free text input in your application (e.g. a command line to enter commands in your application, or write your own scripting language). However it's a ONE star, if you want to learn or write your own compiler or want to deal with very complex free format text input (e.g. a real programming language). This book doesn't really cover the theory behind parsing and scanning although there are some chapters about Logic programming. Everyone can read this book. It doesn't rely on 'higher math'. It is not a dry text. With this book everyone can write a descent text processor. The problem with this book (which is a advantage for novice people, and a disadvantage for people who want to learn something about compiling), is that this book rely on a parsing/scanning/interpreter framework/library of the author. This framework is not described in this book. You only learn how to use this framework. This is nice for people who only want to build a parser based on this framework, but a disadvantage for people who want to learn something about the theory or the algorithms (used in this framework or in parsers/scanners in general).
9 of 10 people found the following review helpful:
5.0 out of 5 stars
caution - ignore bad reviews,
By Luscher (Goyim City, Wisconsin, United States) - See all my reviews
Amazon Verified Purchase(What's this?)
This review is from: Building Parsers With Java™ (Paperback)
this review is intended to help potential customers better decide for themselves ; i was nearly dissuaded from purchasing a copy due to the reviews by inexperienced ( and apparently lazy ) programmers
the provided code, and related concepts, are examined fully in the text. the code is so OOP-trivial ( this is a good Java design rather than rehashed procedural code clumsily ported to the OO-Language du-jour ) that anyone familiar with the basics of Java, C++ or C# should be able to compose their own library in a short period of time. in the preface the author suggests the reader be familiar with Design Patterns and UML, but he has included sections which address the minimal use he makes of UML. most 'somewhat experienced' programmers will be able to see through the scant UML diagrams to the underlying concepts they address, but he explains the notation anyway. as for Patterns, they are mentioned in passing but are not examined in any way which might hinder the uninitiated one reviewer laments that ''... the author's explanation of his code library is virtually non-existent -- you're going to have to figure out what he's talking about all on your own'' - this was not the same book i read. in addition to including comprehensive javadoc ( Java documentation in HTML format is provided on the CD as well as his web site, if you're buying a used copy ) to help guide readers interested in ''digging into his code'', the author walks the reader through the concepts presented in this book in an incremental and rather intuitive way. starting from ''the ground-up'' is not always a good idea, and i'm glad this author followed his instincts rather than the herd the code supplied is working code ( a feat almost unheard of today ), the examination of which helps to illustrate function better than any equivalent volume of text could. in fact the code is so well decomposed in terms of OOP that the text cannot fail to assist even entry-level programmers in the creation of their own parsers using the concepts presented. as for the difficulty of making oneself independent of 'his toolkit', i can only say that more than 95% of the class methods are under ten lines of code ( most are under six ), so it seems that anyone willing to apply themselves should be able to succeed in doing so ; especially considering the fact that his included code covers far more ground than a more sharply focused ( 'real world' ) implementation would ( meaning that, in terms of volume, you would only need to write or implement a tiny fraction of what is included with the book to satisfy any specific implementation ) some reviewers have unambiguously reported putting the concepts presented in this book to work - and quickly - which says a great deal given the perceived complexity of the subject. indeed, creating a parser for a macro assembler for a particular embedded processor was so trivial ( thanks to the concepts in this book ) that i am confident modifying it for other targets will be trivial, as it was modeled after the author's OOP examples. having said that, the OOP perspective this author has provided seems the principal way in which this book is differentiated, making space for itself in an already crowded marketplace ignorance of the subject matter can be blamed for many of these negative reviews ; some reviewers are so unfamiliar with the subject matter as to call all compiler related concepts 'black-box'. each of the compiler books on my shelf examines a recursive descent parser, but in a far less practical way, and typically in pseudo-code ( including a prominent example claiming to use Java, but instead presenting what i consider to be nothing more than procedural C pseudo-code fragments ). BPWJ follows a preferable route, and anyone who has inordinate difficulty might better fail with a more abstract text on the subject before blaming this author for their own inadequacies one reviewer complains about the onus of being expected to participate in order to gain comprehension by stating ''To compound it, that code can be a bit perplexing when 95% of his variables have one-letter names -- it just isn't very readable if you're not already familiar with his ideas and approach'', which mystifies me, given that well over 95% of the class methods are under ten lines of code ( most are under six ) ... what kind of neurological damage would account for an inability to retain the type of an identifier within the span of six lines ? for example : Token t = new Token(); Assembly a = new Assembly(); String s = "some string given the highly problematic identifier s'' should the time a programmer saves by using OOP be squandered on thinking up unnecessary, lengthy names whose lifespan is less than ten lines ? especially considering that peripheral vision will nearly always encompass the code in question, a scant few lines above ? now ... what was 't' again ??? to round-out his list of disappointments, this same reviewer states ''The good news is that you'll be up and running and writing simple grammars and parsers in very little time. The bad news is that if you're working on anything [...] find yourself forced to peer into the black box to figure what the heck [his code] actually IS doing'', with which i agree - the code included is not geared to any specific project you may have in mind ; rather it is nearly exhaustive so that a working example for you to study is always at hand. warning : you will need to participate if you wish to make use of what you can learn by studying this book. if you are willing to do that, success can be yours ... passively being granted mastery in any area of programming ? i'll take the Vegas odds on that ! another reviewer makes several complaints ... in order : ''(1) ... everything is so dependent on the included framework makes it difficult to learn from. (2) I think the best programming books teach you how to build step-by-step from the ground up. (3) Instead, this book expects you to immerse yourself in the code first'' (1) the code, and related concepts, are examined fully in the text. the code is well designed OOP, rather than a ham-fisted port of procedural code, meaning that anyone with minimal experience in any OO language should be able to write their own, rapidly turning his ''fascinating ideas'' into a coded reality all their own (2) as for ''learning from the ground up'', the text progresses slowly, beginning with a general overview ( to help readers get their bearings within the overarching conceptual framework being presented ) and moving into actual, albeit initially trivial, examples ( as any good programming book should ) and progresses from that point with chapters focusing on discrete aspects of the subject, as well as considering various implementation domains (3) good code ( especially *working* code ) helps to illustrate function better than any equivalent volume of text could. having said that, the author forces no one to immerse themselves in code. naturally code is presented - this is a programming book after all, and not a purely theoretical one. the presented code is so well decomposed ( into OO Java ) that the text cannot fail to guide a programmer in the creation of his own parsers using the concepts presented ... so making oneself independent of his 'framework' seems trivial enough, given, again, a minimal competency in nearly any relatively modern OO language. as already indicated, the code is slowly examined initially, and given the brevity of procedures ( mentioned above ) it seems reasonable that anyone willing to apply themselves should be able to master the concepts presented in this book i cannot abide an above average programming text being trashed by the inexperienced, who might have anticipated possessing ''mad 3l33t haxor skilz'' after flipping through the pages - reviewers reporting having used the material presented in this book tell us more than any failure ever could warning : anyone who considers studying clear Java code difficult, or is unwilling to expend the effort needed to succeed in learning a new task, should avoid this book and every other book on the subject. perhaps IDG should be made aware of the sales they could expect for a new 'Dummies' title. then these unhappy campers could enjoy cartoons ( ''to spice things up'' ) and be given strained examples, twisted for the sole purpose of setting-up some moronic joke one note about the code : it was written under an early version of Java ( the book was published in 2001, remember ) and to bring it up to current standards will require hitting the files over the head with a compiler. NetBeans quickly directed me to add annotations, mostly @pragma, which took a few minutes. not a big deal, but now you know OK, now it's up to you to choose
5 of 6 people found the following review helpful:
5.0 out of 5 stars
This book answers "Why do we need parsing?",
By
This review is from: Building Parsers With Java™ (Paperback)
The most interesting thing that this book discuss is the reason why we even bother to learn parsing today: Modern enterprise-level software development. This type of software development has the responsibility to bridge the gap between software design expert and business expert. One very effective and flexible way to do this is by creating and using mini-languages (this is where the book comes in) that are tailored specifically for each business domain. This mini-languages are not used by developers, rather the business experts themselves. The result is an enterprise system that is built, customized and maintained by business experts. This will minimize (even eliminate) the hefty building, customizing, and maintaining cost if they were done by developers (i.e. very appealing and cost-effetive business case!). I also like the way the author establishes the scope of the discussions such as how he sticks with one out of three or four available parsing methods. This alone has decreased the level of complexity of this book from textbook to practical level.
5 of 6 people found the following review helpful:
5.0 out of 5 stars
Good practical book on building parsers,
Amazon Verified Purchase(What's this?)
This review is from: Building Parsers With Java™ (Paperback)
This book does not assume that you understand compilers or programming language theory. However, the beauty and eloquence of what the book is trying to teach you will be far clearer if you do understand these disciplines. This book teaches you how to build nondeterministic recursive-descent parsers. If you are interested in other kinds of parsers, then you need to consult another source. The classic source on these other kinds of parsers is "Compilers: Principles, Techniques, and Tools" by Aho, also known as "The Dragon Book".
This book explains how to write parsers for new computer languages that you create. Each chapter focuses on either background, techniques, or applications. A chart at the beginning of chapter one shows you which chapter focuses on each topic. Each chapter builds on the material presented in preceding chapters, so you should probably proceed through this book linearly. I review this book in the context of the table of contents: 1. Introduction - Just performs an overview of the book. 2. The Elements of a Parser - Explains what a parser is, introduces the building blocks of applied parsers, and shows how to compose new parsers from existing ones. 3. Building a Parser - Explains the steps in designing and coding a parser. 4. Testing a Parser - How to test a new language's features and also how to use random testing to detect ambiguity and other problems. 5. Parsing Data Languages - Shows how to create a parser that reads the elements of a data language. A data language is a set of strings that describe objects following a local convention. 6. Transforming a Grammar - How to ensure the correct behavior of operators in a language and how to avoid looping in a parser, which can follow from loops in a grammar. 7. Parsing Arithmetic - This chapter develops an arithmetic parser. Arithmetic usually appears as part of a larger language. 8. Parsing Regular Expressions - develops a regular expression parser. A regular expression is a string that uses symbols to describe a pattern of characters. 9. Advanced Tokenizing - Describes the tokenizers that are part of the Java programming language as well as the customizable tokenizer of this particular book. Tokenizing a string means breaking the string into logical nuggets so that you can define your parser in terms of these nuggets rather than individual characters. 10. Matching Mechanics - Explains how the fundamental types of parsers in this book match text. 11. Extending the Parser Toolkit - How to extend a parser toolkit which includes introducing new types of terminals or completely different parser types. 12. Engines - Introduces a logic engine, which is a piece of software that is able to return objects and groups of objects in response to a logical query. 13. Logic Programming - Shows how to program with facts and rules. 14. Parsing a Logic Language - How to construct a parser for a logic language. It shows how to build a parser for the Logikus programming language that was introduced in the previous chapter. 15. Parsing a Query Language - Constructs a parser for a query language. A query language parser translates textual queries into calls to an engine. The engine proves the query against a source of rules and data and returns successful proofs as the result of the query. 16. Parsing an Imperative Language - Shows how to create a parser for imperative languages. An imperative language parser translates a textual script into a composition of commands that direct a sequence of actions. 17. Directions - Points out areas for further reading and programming. I used this book to create a parser for a visual language, and I found the instructions in this book very complete and helpful. I would recommend the following books if you are interested in getting deeper into the theory behind this book - "Programming Language Pragmatics" and also "Introduction to the Theory of Computation" by Sipser.
2 of 2 people found the following review helpful:
5.0 out of 5 stars
Great Book for Building a Compiler,
By
This review is from: Building Parsers With Java™ (Paperback)
Before reading the book I was unsure of where to start. We had a large language, similar to Java which we wanted to parse, and we wanted to do it without using a compiler-compiler. By changing the author's design slightly so that the parsers were singletons and only a single assembly was ever created, we were able to parse large and complex files very quickly. More importantly, the design is such that making changes to your language is a snap. This was a must for us since our language is still in flux. If you have any kind of language you need to parse, Java is your implementation language, and for whatever reason you cannot use a compiler-compiler, then this is the book for you. The author's code included with the book will get you on your feet and running quickly. If Java is not your implementation language then keep in mind that the patterns taught in this book will work in any Object-Oriented language. Thanks to this book we now have an a new programming language which we have open sourced. Five-stars, thanks so much for the great book!
4 of 5 people found the following review helpful:
5.0 out of 5 stars
Parser Design for the 21st century,
By Grant Steinfeld (New York, ny United States) - See all my reviews
This review is from: Building Parsers With Java™ (Paperback)
I found this powerful parser framework easy to understand (with a little help from my friends) and a pleasure to incorporate into my programmers toolbox.Aho is for Computer Scientists and Mathematicians, while the organic nature of Steve's thinking and elegant application of Design Patterns to the problem of creating an extensible parser, is more up a Biologist turned webmaster alley. In less that a few days we were able to convert IDL to WSDL, in less than 100 lines of code! The only issue I had was the text sometimes could have benefited with some graphical depiction of the concepts, or even an accompanying flash animation / demo website. Maybe in the next edition?
4 of 5 people found the following review helpful:
5.0 out of 5 stars
Best example of design patterns in a complex system,
By
This review is from: Building Parsers With Java™ (Paperback)
I purchased this book for two reasons.1. My compiler class in college was the only CS class I took that really kicked my butt in the code. Maybe because it was the first application I had to write in school and live with it for a whole semester? Always felt guilty about my 'lack' of knowledge in this area and wanted to do something about it. 2. I was hitting the wall with how far I could push XML at work. I had been converting a config data file to an XML file as a go between for an embeded system and a Java application. The embedded guys added meta information to the legacy config file with special comments. All of the sudden a simple convert to XML and back via XSL wan't going to cut it! Panic!!! <grin> I stumbled over this book last week while getting the new Applied Java Patterns book. The preface for this book was by one of the authors from the GoF book.(Vlissides) After reading his comments I figured he was a smart guy and learned something so surely I could as well. WOW! With this book and the excellant supporting code library I was able to write a parser that contained around 15 simple tokens in one week. The author's code is free to use as long as you don't claim it as your own. The supplied code is one of the best uses I've seen to date on how to solve a serious and complex problem with design patterns. College kids having to build a parser from scratch for a class may not like this book. I would still consider this a great intro or refresher since you have working code to play with. Caution: If you know design patterns 'just a little' and your curious about parsers think of this book as a working model to play with, embrace and extend. You could possibly use this book to learn design patterns. It is well written code that solves some cool problems. Oh! Before I forget. If you do not know what recursion means or how it works. Your not ready for this book. If your on a deadline an you need something quick, look here first. Best code I've seen packaged with a development book. I also liked how the code was installed by using an install.html file that detected your OS with a trusted applet and then installed the code AND the JVM. Nice touch for people that can't download a 30MB JDK over a 56K modem. :-) Great book I would highly recomend to any Senior Level Java Developer or college student in a compiler class. |
|
Most Helpful First | Newest First
|
|
Building Parsers With Java™ by Steven John Metsker (Paperback - April 5, 2001)
$49.99 $36.62
In Stock | ||