# pyparsing/pyparsing

Python library for creating PEG parsers

Repository: https://github.com/pyparsing/pyparsing
Canonical: https://ross.abutalabs.com/products/pyparsing
Language: Python
License: MIT
License Family: permissive
Topics: python, python2, python3, python-2, python-3, parser-combinators, parsing-expression-grammar, parsing, parsing-library, text-processing, peg-parsers
Last push: 2026-08-18T04:25:14+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 54, longevity 100
- inputs: {"age_days": 3398, "days_push": 15, "days_rel": 224, "gap_med": 54.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2485, forks 323 (observed 2026-08-28T04:06:55.547227+00:00)

## What it is
pyparsing is a Python library for building Parsing Expression Grammar (PEG) parsers directly in Python code using composable classes and operators. It offers a readable alternative to lex/yacc or regex-based parsing, handling whitespace, quoted strings, and embedded comments automatically.

## Use cases
- parse structured text like config files or log formats in Python
- build a DSL or small language parser without lex/yacc
- parse SQL or algebraic expressions
- replace fragile regex parsing with a real grammar
- extract fields from text with readable grammar definitions

## When to choose
- you want to define grammars directly in readable Python code
- you need a lightweight pure-Python parser with no build step
- your grammar is small to medium complexity
- you want quick parsing of text formats like config files or formulas

## When to avoid
- you need maximum parsing performance for large inputs
- you require full lexer/parser tooling like error recovery of yacc-grade tools
- you are parsing very large or complex grammars where a generator like ANTLR fits better

## Facets
- artifact type: library
- maturity: stable
- function: parser
- domain: parsers, programming-languages, developer-tools
- platform: python, cross-platform
- tags: peg, parser-combinators, text-processing, grammar

## Member repositories
- pyparsing/pyparsing (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.547227+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:04.458167+00:00, confidence not recorded.
  - readme: https://github.com/pyparsing/pyparsing (fetched 2026-08-28T04:06:55.547227+00:00, sha a54fcf38a7d5)
  - registry_pypi: https://pypi.org/pypi/pyparsing/json (fetched 2026-08-29T10:10:10.088654+00:00, sha d1d77af4b699)
- Data as of 2026-08-30T08:39:29.467469+00:00.
