|
I am sorry you had such a difficult experience with the examples in the book. The example of parsing data from a table is the first non-trivial example in the book of using pyparsing to combine smaller grammar expressions into larger, more complex expressions, and grouping and naming the returned results. If this example is difficult for you, you really should study it and understand it before moving on to the rest.
At the end of the book is a note box titled "For More Help". It lists a number of online resources for downloading pyparsing examples and discussions.
There is an online article at the O'Reilly OnLAMP Python section, titled "Building Recursive Descent Parsers with Python." (http://www.onlamp.com/pub/a/python/2006/01/26/pyparsing.html?CMP=AFC-ak_article&ATT=Building+Recursive+Descent+Parsers+with+Python) You can also find my pyparsing presentations from PyCon'06 in the pyparsing source and docs distributions in the docs directory. And I think other pyparsing users will agree that I am fairly accessible over the pyparsing mailing list and Wiki discussion forums, to get help on specific questions.
Writing parsers *can* be brain-bending at times. With pyparsing I try to simplify some of the mechanics so that developers can focus on defining and solving their data extraction problems.
(Oddly, before seeing your review I noticed your posting to pastebin.com http://pastebin.com/f1a175c7a, to retrieve data from the weather.com web site and extract it using pyparsing. From this script, I was under the impression that you *do* understand pyparsing, it seems to work well enough. Keep working at it!)
|