- Taschenbuch: 289 Seiten
- Verlag: O'Reilly and Associates; Auflage: 1 (18. September 2009)
- Sprache: Englisch
- ISBN-10: 0596155972
- ISBN-13: 978-0596155971
- Größe und/oder Gewicht: 17,8 x 1,5 x 23,3 cm
- Durchschnittliche Kundenbewertung: 1 Kundenrezension
- Amazon Bestseller-Rang: Nr. 128.283 in Fremdsprachige Bücher (Siehe Top 100 in Fremdsprachige Bücher)
flex & bison (Englisch) Taschenbuch – 18. September 2009
|Neu ab||Gebraucht ab|
Kunden, die diesen Artikel gekauft haben, kauften auch
Es wird kein Kindle Gerät benötigt. Laden Sie eine der kostenlosen Kindle Apps herunter und beginnen Sie, Kindle-Bücher auf Ihrem Smartphone, Tablet und Computer zu lesen.
Geben Sie Ihre Mobiltelefonnummer ein, um die kostenfreie App zu beziehen.
Über den Autor und weitere Mitwirkende
John Levine, founder of Taughannock Networks, writes, speaks, and consults on e-mail, the Internet, and other computer topics. He has written over 20 technical books, and is the co-author of O'Reilly's lex & yacc, 2nd Edition and qmail. He's also deeply involved in Internet e-mail in general and spam issues in particular as co-chair of the Internet Research Task Force's Anti-Spam Research Group (http: //asrg.sp.am ) and a board member of the Coalition Against Unsolicited Commercial E-mail (http: //www.cauce.org.) He lives and works in the tiny village of Trumansburg NY (http: //www.trumansburg.ny.us) where he reports that being the municipal sewer commissioner was a much cleaner job than dealing with spammers.
Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
* Levine makes no apologies for the tools. Where there be dragons, he offers practical advice on slaying them or -- better -- walking around them. (It seems like there was a Monty Python sketch about this, or should have been.)
* Generally well written, could have used some more editing to smooth out some convoluted bits.
* More than the usual number of errors, mostly minor and all readily fixable, in the examples.
* There is apparently no code available for download. This may not be a bad thing. I found myself thinking more than usual as I typed, which means I needed to go through the exercise. You're not going to learn how to parse and scan in the real world just by reading about it.
* The exercises are few but highly relevant. You should at least read them even if you have no time to do them.
* The index is good, but you probably won't need it.
Suggestions for Reading Order:
In general, each chapter read is expected to be read as a whole, from beginning to end. Internal back-references within chapters are frequent and effectively demand linear reading and comprehension. This seems to be a deliberate design choice, to avoid the need for more repetition than is absolutely essential. [Insert awful joke about left recursion here.]
The chapters, read as wholes, need not be read in ordinal order. This order worked well for me:
[1,] 2, 3, 7, 8
What You Get
Chapter 1 is the usual get-our-feet-wet chapter. If you don't like what you see, you're done.
Chapters 2 and 3 demonstrate how to apply flex and bison, respectively. Chapter 2 includes simple actions in the scanner, so that the examples *do* something. Old hands will recognize this; new students will see their patience rewarded in Chapter 3 where all but the simplest actions are placed in the parser, relieving the scanner of ill-suited tasks.
Chapter 4 presents a workable parser for SQL. It's an interesting choice and can be skipped if you're pressed for time.
Chapters 5 and 6 are useful references for flex and bison. These are not the typically disappointing rehash of man pages or online documentation. The information is clear, concise and full of essential observations and advice. You can skip these chapters but you will return to them. These two chapters are pretty much the manuals I wish I had when I started using lex and yacc.
Chapter 7 is one of the most coherent *practical* discussions of ambiguity and conflicts I've seen. It's about as good as possible without building the state machines, and Levine leverages the reports generated by bison to avoid discussion of first and follow sets. Instead Levine provides an informal and pragmatic pattern for reasoning about shift/reduce conflicts reported by bison, including the classic if/then/else anti-pattern. This is concise coaching which will help you anticipate and resolve common problems. Levine gently encourages the reader to think carefully about whether ambiguities may be a sign of bad language design and not just conflicts to be resolved by ad hoc rules.
Chapter 8 provides a brief but informative discussion of reporting and recovering from errors. If your language is ever going to have users, you'll have to deal with errors. Error-reporting is easy. Useful error-reporting is a little harder. And error-recovery is non-trivial for all but trivial languages. Levine provides some practical examples which serve to underscore the virtue of failing fast over flailing hard.
Chapter 9 collects some recent developments in flex and bison, some of which may be suitable for production. If you just need to get a parser going quickly and reliably in C for a simple language, or you can call C libraries, then flex and bison are your buddies. Levine provides a frank and fair assessment of the current (ca. 2009) support for implementing C++ parsers and scanners. Along with pure parsers and GLR parsing, these are advanced topics in the sense that their implementations in bison/flex are less mature than LALR targeting C implementation. Levine offers much practical advice which might be summed up as, "I could, but should I?" If the answer for your application is 'Yes, I need to cut against the historical grain of bison/flex,' then you'll do well to become familiar with some of the newer parser-generating kits which were created for that purpose. But if the significance of the question is not obvious, then this book will help you break it down into smaller parts and begin to answer it.
Overall, this is a must-read for anyone trying to make effective use of flex and bison. You could do it the hard way, but your job is going to be hard enough anyway. So you might as well get a good start from someone who knows the stuff inside and out. This book does that.
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.
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.
It had details about each setup and I found the small details that had derailed me for several days.