List price: $29.95 (that's 30% off!)
Used price: $7.50
Buy one from zShops for: $13.99
I had a fair bit of programming experience when I bought the book, but none with Lex or Yacc. Some fundamental questions came up during the course of my muddling through, and these were left unanswered. I actually got more insight into these tools from a ~20-page web site on the topic.
The reference chapters are organized alphabetically ("ambiguities & conflicts", "bugs", ..., "%ident declaration"), and in a way that does not help someone who is looking for a specific answer (in trying to find out about the possibility of more than one parser in a program, who would think to look under 'v' for "variant and multiple grammars"?). These 'reference chapters' seemed more like a place to dump the information not discussed elsewhere.
Maybe it's a lost cause, finding a comprehensive, well-written introduction to such an arcane topic, but I'm still looking.
flex and bison/byacc are easier to find as they are free. They need a bit more spaces. Also, people read a book want to spend less time reading the on-line manuals on screen.
The C part of the examples are not paradigm work. Uninitialized pointers are casually used and memory are some times never freed.
Lex and yacc seems best with well-defined classroom or smaller projects. I am interested to learn how to solve the more complicated real world problems.
Used price: $1.95
Collectible price: $1.99
Buy one from zShops for: $29.99
This is, as John Gunther says, "A brilliantly readable and rewarding book. It is not merely a biography of the fabulous Sherwood, but of the fabulous times he lived in. Beautifully written, lucid, witty, and a thoroughly good job."
Used price: $49.99
Used price: $7.41
Used price: $9.95
Collectible price: $8.99
Used price: $2.00
Collectible price: $6.50
Buy one from zShops for: $25.00
Used price: $0.95
Collectible price: $0.86
Used price: $4.46
Collectible price: $20.00
Used price: $5.39
Collectible price: $5.99
Used price: $1.87
Collectible price: $6.00
The discussion of shift/reduce and reduce/reduce conflicts in chaper 8 is pretty good though and would make a fine introduction for a beginner wanting to learn /basic/ concepts.
Good error handling is definitely a black art, but I still would have liked to have been given more information about it in chapter 9. The examples were also a bit too soft.
Chapters 4 and 5 have some interesting (and highly unusual)examples for scanning and parsing applications, but they do not show off many of the advanced capabilites of lex and yacc. What this book really needs are couple of examples that demonstrate how to overcome classic scanning and parsing horrors (like how to do type checking in, say, C); a chapter like this instead of one of chapters 4 or 5 would be great.
Even today lex and yacc are very important tools in the computer scientist's toolkit. They were designed 25 (or so) years ago, but /real/ documentation is still nonexistant. This means that unfortunately, this book is one of the best.
I think that the FSF's Bison manual is much better value for money. It also does not cover advanced topics in enough depth, but what is does explain, it explains quite clearly.