flex & bison
T**Y
I love the O'Reilly books because of their approach to tech
I love the O'Reilly books because of their approach to tech. This one fits into that mold.The topic isn't for everybody and the approach in the book are to tell you how to use these tools. Flex is the GNU version of "lex" (note: NOT the Adobe Flex product) and Bison is the GNU version of "yacc". Flex/lex is a tool for building lexical analyzers and bison/yacc is a tool for building parsers. This goes so much farther than the HOC example in "The Unix Programming Environment" The Unix Programming Environment (Prentice-Hall Software Series) (and that wonderful book is now beyond reasonable price).An example of how you might use flex/bison is if you have a logically formatted file (XML, vendor data feeds, etc) and you want to write your own processing around the constructs in the syntax. Yes, I said XML... I'm still looking for a library that will let me read an XML file and exclude certain tags fitting certain conditions while keeping the comments and formatting from the original file. I used flex/bison to write my own. Done.Another example was when I needed to define the layout of daily graphs for a variety of financial instruments. Instead of modifying the jobs I had for generating the pages, I wrote my own front end by defining a page layout language and translated the simpler commands into the required underlying instructions that the graphics software needed. Reduced page modification time from hours to minutes. Magic.By the way, you can probably find a copy of this book online for free, but there are still those of us who feel it is worth paying for worthwhile products.As to the difference between the "lex/yacc" copy and the "flex/bison" version, they are quite similar as would be completely reasonable. The flex/bison version, however, includes GNU improvements. As mentioned in another review, this book won't tell you how to use flex and bison with any IDE or other product. It isn't meant to. I use flex and bison with GNU "make" Managing Projects with GNU Make: The Power of GNU Make for Building Anything (Nutshell Handbooks) and am happy with both. But then, I prefer vi/vim to an IDE. (<religious_rant>Learn to write clear, concise code and the IDE will have far less to help you with</religious_rant>). ;)This is a great book if you know that you want to use flex and bison or if you believe you want to learn parsers and compiler building. I use it as a reference book and refer to it often. I also own the dead tree edition of the lex/yacc book. For further study on compiler design, many of my friends recommend "the dragon book" as a companion Principles of Compiler Design (Addison-Wesley series in computer science and information processing) . Personally, I'm good with writing interpreters and formatted file parsers.
D**S
You have to laugh a *little*
at the poor author for leaving so many errata to find in this book. It's funny (it *is* funny, I swear) only because there aren't too many people who are going to go looking for book about writing parsers, and the type of people who are interested in making a computer process input into a context free grammar are...well, let's just say they might expect the book on it to have *perfect* grammar. I would say that it's funny because it's ironic, but I fear that it might have to be 'ironical.' :)(http://english.stackexchange.com/questions/28423/ironic-vs-ironical)I've only been reading the book a few days (my physical copy arrived today, I've been reading a version I "found" online for three), and from what I've seen in my physical copy thus far, purchased 6/2014, Oreilly have corrected many of the errors (which are present in the copy I found on "teh google.") Having said that, given the standing error rate, I expect there are more to find.At any rate, the conversational nature of this text is much easier to approach than the GNU documentation (or sourceforge docs for flex), though I suspect I will end up reading those as well, and they are good, they're just a bit too much for my initial tastes.So four stars for now, for at least being more approachable than the GNU documentation, though I will update my rating when I finish the book.
D**R
good parser tutorial
I wanted this book for months. I was trying to write Qt code for Nokia MeeGo and it has an inbuilt parser.flex and bison are open source parsers and scanners that generate C code that is compiled to process tokens in a computer language or any other structured data. Someone has even used flex and bison on chemical formulae to check they are correct!This lived up to what I expected and has many quite deep examples. I will be reading snippets to get my head round parsing lingo and scripting to let me generate Qt or other scripting or data intensive coding on Linux or UNIX or Windows with mingw or similar UNIX emulators on Windows.This guy is a legend.It is well worth the read for a computer programmer. I did a BSc in computer science so the Backus Naur Form (BNF) was used in Pascal programming way back at the University of Queensland when I studying as an undergraduate.It is not for non-technical folk. Don't buy it unless you can understand computer languages. If you can though, buy it as it will deepen your knowledge to handle intractable computing problems in the Web or large data repositories in the semantic Web or mobile phone application sphere like where I am at present trying to make headway.This is a good string to your bow to attack intractable data or programming problems on new platforms or with large amounts of data that can be formidable in C or even Python.Why I bought it was because I had an introduction to computer science and it introduced me to compiler theory and this is a much more thorough book on compiler theory and computer language parsing and processing which will help get your head around computer language issues like in mobile phones apps and frameworks.
J**J
Nothing else in ebooks yet.
It is not bad. It is slightly deceptive. Nearly identical copies of older books titled "lex & yacc" are still for sale. Luckily they are all the same price.This book will not tell you how to USE flex & bison within your IDE (say Xcode?). It also tends to jump at times, seeming to gloss over some valuable details. Unfortunately, you are going to have to supplement this with lots of other things online. Unfortunately, lots of examples here and elsewhere want to show you a damned calculator, even though you really want to learn to parse programming languages and data formats.If you want something better in a book on flex & bison, you are going to have buy out-of-print real books + search the web a bit.
Z**I
Five Stars
Very good technical book, just what I needed.
B**U
Five Stars
Good introductory book on flex and bison tool
写**郎
久々のbisonとflex本
3章まで読んだ時点での感想です。手を動かしながら読むと理解がはかどります。例題は、少し大きめ。初学者向きの本ではないですが、flexとbisonについてのまとまった本として参考になります。SQLの例題はどうしようか迷うところですが、読み進めます。
G**I
両方載っている本
軸解析と構文解析のlexとyaccの両方が書かれている本です。使う人はもっていると重宝します。
Trustpilot
5 days ago
3 weeks ago