pycparser is a complete C99 parser written in pure Python, designed to parse C source code for applications that need to analyze or transform it. It is useful for tasks like static code checking, building a front end for specialized C compilers, and generating information such as unit-test discovery, and it can integrate with CFFI to parse C function and type declarations.
Project status
- The repository (eliben/pycparser) appears actively maintained, with an upstream push as recent as 2026-06-08 and the latest published updates on 2026-01-21.
- The apparent update cadence is irregular but recent, with v3.00 (2026-01-21) followed by no tagged release yet in 2026 after that, and earlier tags at 2025-09-09 and 2024-03-30.
AI summary generated 2026-06-09
Recent updates
release_v3.00
2026-01-21Release v3.00 removes the PLY dependency by replacing the C parsing pipeline with a hand-written lexer and recursive-descent parser, with the intent to keep the same AST output. The release also updates CI/tooling to support Python 3.14 and refreshes project metadata for modern packaging.
Featuresrelease_v2.23
2025-09-09pycparser v2.23 adds several grammar support fixes (abstract declarator with static, labels/case/default with empty statements, and comment handling) and improves correctness for hex float typing. It also updates CI to test against Python 3.13 and adds new fake typedefs for GNU integer extensions and some common Linux types.
Featuresrelease_v2.22
2024-03-30Release v2.22 of pycparser updates parsing capabilities and broadens interpreter support. It adds pragma support (and fixes related parsing behavior), extends parse_file with an encoding parameter, and improves table caching behavior during build. It also adds support for Python 3.11 and 3.12.
Features