actually the samethese two formulas are true forall xx and true (forall xx )and fortunatelywhen parsed they both produce exactly the same list'true''&''forall'' '[' ''='' 'the parentheses don' matter here because only one valid parse is possible we have now completed the pyparsing first-order logic parserand in factall of the book' pyparsing examples if pyparsing is of interestthe pyparsing web site (pyparsing wikispaces comhas many other examples and extensive documentationand there is also an active wiki and mailing list in the next section we will look at the same examples as we covered in this sectionbut this time using the ply parser which works in very different way from pyparsing lex/yacc-style parsing with ply ||ply (python lex yaccis pure python implementation of the classic unix toolslex and yacc lex is tool that creates lexersand yacc is tool that creates parsers--often using lexer created by lex ply is described by its authordavid beazleyas "reasonably efficient and well suited for larger grammars [itprovides most of the standard lex/yacc features including support for empty productionsprecedence ruleserror recoveryand support for ambiguous grammars ply is straightforward to use and provides very extensive error checking ply is available under the lgpl open source license and so can be used in most contexts like pyparsingply is not included in python' standard libraryso it must be downloaded and installed separately--although for linux users it is almost certainly available through the package management system and from ply version the same ply modules work with both python and python if it is necessary to obtain and install ply manuallyit is available as tarball from www dabeaz com/ply on unix-like systems such as linux and mac os xthe tarball can be unpacked by executing tar xvfz ply- tar gz in console (of coursethe exact ply version may be different windows users can use