Errata

Getting Started with Pyparsing

Errata for Getting Started with Pyparsing

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page 7
Last bit in the box on best practice

| means either item may occur

This is not the case.

| means one of the items must occur.

e.g. A | B means either A appears or B appears. The option that A or B both do not appear isn't allowed.

Note from the Author or Editor:
Good point. Should be reworded as:

| means one of the alternative items must occur

Nick  Dec 21, 2011 
PDF
Page 21
last paragraph

In "To do this, we insert calls to setResults-Name into our grammar", "setResults-Name" should be "setResultsName" without the hyphen.

Note from the Author or Editor:
Thank you. The layout of this ebook was reformatted at the last minute to make all sidebars into full-page box notes, and the code formatting and hyphenation in related text and code samples were not re-edited.

Frau Sma  Sep 20, 2011 
Page 21
last paragraph

In "so that expressions will label the tokens as they are accumulated into the Parse-Results for the overall grammar", "Parse-Results" should be "ParseResults" without the hyphen.

Note from the Author or Editor:
Thank you. The layout of this ebook was reformatted at the last minute to make all sidebars into full-page box notes, and the code formatting and hyphenation in related text and code samples was not re-edited.

Frau Sma  Sep 20, 2011 
Page 27
first paragraph of "Note"

"although they intolerant of HTML that is not well behaved" should be "although they are intolerant ...".

Note from the Author or Editor:
Yes, missing the word "are" as suggested, thanks!

Frau Sma  Sep 20, 2011 
Page 33
third code example

In "conversion = trStart + fromUnits + toUnits + conversionValue + trEnd", "fromUnits" should be "fromUnit" and "toUnits" should be "toUnit".

Note from the Author or Editor:
Yes, those variable names should be changed as suggested - a careless typo on my part, thanks!

Frau Sma  Sep 20, 2011 
Page 37
4th paragraph

Missing parenthesis at the end of the line
sexp << ( alphaword | integer | ( LPAREN + ZeroOrMore(sexp) + RPAREN )

Note from the Author or Editor:
Yes, this line should have an additional ')' at the end.

Anonymous  May 03, 2011 
Page 37
LPAREN

Page 37 and Page 38

On page 37

LPAREN = Suppress ('(')
RPAREN = Suppress (')')

On page 38

sexp << (alphaword | integer | Group (LPAR + ZeroOrMore (sexp) + RPAR)

There is an inconsistency, LPAREN and LPAR, RPAREN and RPAR

Note from the Author or Editor:
Yes, the variables on p.38 should be LPAREN and RPAREN, not LPAR and RPAR.

Nick  Dec 21, 2011 
Page 41
7th section of code

the BNF was defined in the previous page as <token-char> but defined here as <tokenchar>;
also the pyparsing defined previously as token_char defined here as tokenchar

Note from the Author or Editor:
Yes, all instances of token_char should be tokenchar, thanks!

Anonymous  Jan 12, 2010