| Building Parsers with Java |
By Steven John Metsker
|Table of Contents|
I never used to like parsing, either in theory or in practice. For one thing, all the parsing theory I've studied suffers from an overabundance of funny characters and symbols. I'm all for rigor, but not at the expense of clarity or the typesetter's sanity . Whatever concrete examples there have been, moreover, tend to be obscure and ignore the problems of modern programming. In fact, most texts on parsing reflect decades-old perspectives on software design and development. And most explanations , it seems, come encased in wooden prose .
The practice of parsing has fared no better. 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.
Steve Metsker's up-to-date take on parsing is as accessible as anything I've read on the subject. I even venture that this is the most accessible book-length work, both for its foundation on widely appealing technologies like Java and XML and for its clear, simple, engaging presentation.
This book's appeal cannot be limited to a small cadre of language developers and implementers. Sooner or later, every programmer worth his or her salt will need to parse something. When that time comes, said programmer can turn to this book and be enlightened, as opposed to being intimidated or bored to tears. Now you too can understand when to use XML versus building your own parser, what to tokenize versus parse, and when to settle for regular expressions versus a query, imperative, or logic language. And that's just for starters. Indeed, the concepts explained here are so handy and fundamental that all developers should learn them. You might know about tokenizing and grammars and eliminating left recursion without claiming to be a software professional, but the reverse doesn't hold.
Steve has made parsing downright enjoyable. Keep reading and you'll agree.