Skip to content
Paul McGuire edited this page Sep 9, 2021 · 48 revisions

Welcome to the pyparsing wiki!

I started writing pyparsing in 2003, about a year after starting to learn Python. This followed on the heels of many years of programming in many different programming languages, and a long interest in text processing and parsing. Combined with a fear/dismay at using regular expressions, I wanted an object-assembly model for building up parsers. Since then, tools of this style have come to be called PEG's, or Parsing Expression Grammars. I also related to Python's operator overloading features, and so pyparsing has become an embedded DSL within Python, making heavy use of operators for grammar construction and call syntax for grammar element naming.

Discussion

You can read and post comments, links, questions, and suggestions (and brag on your own cool parser projects) by posting to the pyparsing sub-reddit - r/pyparsing.

Who's Using Pyparsing

  • pyparsing_helper - GUI for experimenting and testing your pyparsing parsers GitHub repo; from Catherine Devlin's original blog post, saved to GitHub by techtonik
  • setuptools - parser for cracking various version dependency strings
  • httplib2 - parser for auth headers GitHub repo
  • Parametric_Curve_FP - parses mathematical expressions to visualize resulting curves GitHub repo
  • copybook - parser for VSAM copybooks GitHub repo
  • handcalcs - library to render Python calculation code automatically in Latex, especially useful in Jupyter Notebooks GitHub repo
  • matplotlib - TeX parser in mathtext
  • pydot - parser of Graphviz DOT language
  • poetry - parsing requirement and marker strings
  • pccc (Python Conventional Commit Checker) - parser/validator of commit messages per the Conventional Commits specification - GitHub repo
  • ProDy - Protein Dynamics and Sequence Analysis - parser of a sophisticated atom selection grammar. "This makes every user a power user by enabling fast access to and easy handling of atomic data via simple selection statements." (http://prody.csb.pitt.edu/index.html)
  • classad - parser of ClassAd syntax for HTCondor GitHub repo / language specification
  • graphql-python - experimental parser of the GraphQL language GitHub repo
  • zhpy - interpreter pre-processor to convert Chinese keywords into Python English GitHub repo
  • whoosh - search library using pyparsing as a search query parser
  • pingparsing - parser for ping command on various OS GitHub repo
  • PyContracts - parser of parameter preconditions (a='int,>0') GitHub repo
  • ViperMonkey - a VBA parser and emulation engine to analyze malicious macros
  • ddlparse - parser for SQL DDL CREATE TABLE statements GitHub repo
  • undebt - code refactoring and cleanup utility, developed by Yelp Engineering
  • recurser - interactive web demo to illustrate principles of recursion; implements a simple language for user-input recursive code GitHub repo
  • nginxparser - an nginx configuration parser GitHub repo
  • pyparsing-highlighting - alternative to Pygments using pyparsing parsers GitHub repo
  • ezdxf - DXF document parser (https://ezdxf.mozman.at/)
  • bob - BobBuildTool - parser of build commands GitHub repo
  • Crumble - automation scripting language - Redfern Electronics
  • RoboComp - open source robotics framework GitHub repo

See this list at libraries.io.

Notable Projects

See this article on discriminatory insurance pricing, supported by this data analysis of submitted documents using pyparsing to extract several megabytes of data from the PDFs submitted by Allstate Insurance.

Also, there is this fascinating SlideShare presentation on how pyparsing was used to decipher obfuscated flight plans in tracking down international arms dealer Viktor Bout!

Enterprise Support

Pyparsing is freely available under the MIT License. pyparsing is now included as part of the Tidelift Subscription. Get commercial maintenance and assurances, while supporting my work. More info at Tidelift.com

Acknowledgments

Special thanks to JetBrains for providing a full professional development license for their suite of products, in support of this open source project!