lex & yacc and over 2 million other books are available for Amazon Kindle . Learn more
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

lex & yacc (A Nutshell handbook) Paperback – 11 Oct 1992


See all 2 formats and editions Hide other formats and editions
Amazon Price New from Used from
Kindle Edition
"Please retry"
Paperback
"Please retry"
£11.99 £0.01


Product details

  • Paperback: 388 pages
  • Publisher: O'Reilly Media; 2 edition (11 Oct 1992)
  • Language: French
  • ISBN-10: 1565920007
  • ISBN-13: 978-1565920002
  • Product Dimensions: 15.2 x 2.4 x 22.9 cm
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (4 customer reviews)
  • Amazon Bestsellers Rank: 589,484 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Discover books, learn about writers, and more.

Product Description

From the Publisher

Shows programmers how to use two Unix utilities, lex and yacc, in program development. You'll find tutorial sections for novice users, reference sections for advanced users, and a detailed index. Major MS-DOS and Unix versions of lex and yacc are explored in depth. Also covers Bison and Flex.

About the Author

Gregory Satir helps develop online publishing tools in the Portland, Oregon, office of Electronic Book Technologies. He graduated with a B.S. in computer science from Brown University. Doug Brown is a consultant/contractor in Beaverton, Oregon. He has been developing software for circuit simulation, synthesis, and testing since 1977. Doug coauthored lex & yacc, another O'Reilly & Associates Nutshell Handbook. He received an M.S. in electrical engineering from the University of Illinois at Urbana-Champaign in 1976.

John R. Levine writes, lectures, and consults on Unix and compiler topics. He moderates the online comp.compilers discussion group at Usenet. He worked on Unix versions Lotus 1-2-3 and the Norton Utilities and was one of the architects of AIX for the IBM RT PC. He received a Ph.D in computer science from Yale in 1984.

Tony Mason is currently a member of the AFS development team at Transarc Corporation, a small start-up company specializing in distributed systems software. Previously, he worked with the Distributed Systems Group at Stanford University in the area of distributed operating systems and data communications. He received a B.S. in mathematics from the University of Chicago in 1987.

Customer Reviews

4.2 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

8 of 8 people found the following review helpful By A Customer on 1 May 1997
Format: Paperback
In general this book is very good, and I would highly recommended it for anybody using tools like lex and yacc. It covers all the areas (both good and bad) of these tools. However, I find that the book is frustrating and incomplete in two ways :-

(1) when it comes to solving some of the problems reported by such tools as lex and yacc, there is not enough of examples, especially less-trivial examples, and some of the more potentially obscure problems that can occur.

(2) it is very frustrating that the page numbers listed in the index are out by 1 or 2 pages. In this era of technology this should not happen.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
5 of 5 people found the following review helpful By A Customer on 8 Mar 2000
Format: Paperback
Except for the commercial versions of lex & yacc, there is scant documentation on these potentially very useful tools. This book ought therefore to be very welcome. Unfortunately it fails to deliver some important goods, like an explanation of the cryptic, mostly undocumented diagnostic messages that come out of yacc, or a substantial example of how to embed yyparse in another application--so as to do something useful, other than just validating syntax.
The review of different implementations is valuable, and the comments on portability were extremely helpful to me.
This book has been around for a while, and neither lex nor yacc have evolved much in the last many years, so the authors could reasonably have been asked to produce a more exhaustive second edition by now. It would necessarily have become a standard work. Unfortunately this present volume is often more tantalizing than helpful. Still, it's better than nothing.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By A Customer on 6 Mar 1998
Format: Paperback
A really good book...this is basically the only good tutorial/reference on purely yacc/lex topics. If I have one complaint it is that it should be a little longer, but otherwise it's great; it covers all the lex/yacc versions including flex and bison, has good examples as well as thorough explanations of key concepts. If you need to parse a complex file format or compile a language, this is basically required reading.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 3 people found the following review helpful By A Customer on 1 Jun 1998
Format: Paperback
This book, along with the Dragon Book, forms the required reading for anyone interested in compilers and language processing. I was quite impressed by the clarity of the examples, and the breadth of the different lex and yacc implementations that it covers. If you need to do complex parsing or language design, definitely pick up a copy of this.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Helpful Customer Reviews on Amazon.com (beta)

Amazon.com: 34 reviews
20 of 22 people found the following review helpful
Incomplete, poorly organized, and not very well written 7 April 1999
By A Customer - Published on Amazon.com
Format: Paperback
As with several other O'Reilly books, I found Lex & Yacc to be maddeningly uneven. The approach is to give a too-brief synopsis of the tool, then illustrate its use using a very specific example that, one suspects, is merely the handiest project the authors had available.
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.
23 of 26 people found the following review helpful
ok, but there is a better LEX/YACC book 26 April 2004
By M. Rumore - Published on Amazon.com
Format: Paperback
To keep it simple, the book "Introduction to Compiler Construction in UNIX" introduces and explains LEX/YACC far better than this book. It uses a more realistic example and shows the error handling in more detail. This book is ok for a quick intro, but for a 'real" user, refer to the book I mentioned above.
12 of 14 people found the following review helpful
Disappointing 12 Mar 2004
By J. Buchanan - Published on Amazon.com
Format: Paperback
This book was disappointing. I had hoped for a tutorial and reference on Lex/Yacc Flex/Bison for building language recognisers, but in the tradition of "yet another boring and useless reverse polish notation" calculator - it gives us a desktop infix expression calculator. (How could I have possibly guessed?)
The book presents some interesting material for those who want to parse SQL, but if you're eager to learn about translating programming languages, this book is nearly useless. It gives superficial and confusing treatment of language constructs like "if-then-else" statements, and gives only an exercise for recognising a function call and "playing it back." (I feel these are cop-outs.) It also fails to explain clearly how to construct unambiguous grammars, or use facilities for operator precedence or whatver to control the ambiguity.
To be fair, I am guessing this was meant as a reference for Lex/Yacc for those who already know how to construct language recognisers and have some knowledge of using these tools. But then why bother to give especially bad tutorial material in the early chapters if this were the case?
This books is also in need of a new edition.
5 of 6 people found the following review helpful
Not good, but beggars can't be choosers 9 Oct 2001
By A Customer - Published on Amazon.com
Format: Paperback
There is too much repetition of basic ideas in the first few chapters of the book, and not enough coverage of more advanced topics (like how to use marker nonterminals, how to use $<>$ constructs, etc).
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.
3 of 3 people found the following review helpful
Very good, badly needed, but incomplete and frustrating 1 May 1997
By A Customer - Published on Amazon.com
Format: Paperback
In general this book is very good, and I would highly recommended it for anybody using tools like lex and yacc. It covers all the areas (both good and bad) of these tools. However, I find that the book is frustrating and incomplete in two ways :-

(1) when it comes to solving some of the problems reported by such tools as lex and yacc, there is not enough of examples, especially less-trivial examples, and some of the more potentially obscure problems that can occur.

(2) it is very frustrating that the page numbers listed in the index are out by 1 or 2 pages. In this era of technology this should not happen.
Were these reviews helpful? Let us know


Feedback