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
- Actively maintained: The repository shows recent activity (last upstream push on 2026-04-29) and multiple versioned updates, including a major v3.00 in 2026.
- Update cadence: There is a relatively tight cluster in 2025 to 2026 (v2.23 on 2025-09-09, v3.00 on 2026-01-21), followed by a much older update (v2.22 on 2024-03-30), suggesting an evolving cadence rather than a strict monthly/quarterly schedule.
AI summary generated 2 weeks ago
Recent updates
release_v3.00
4 months agoRelease 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
8 months agopycparser 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
3/30/2024Release 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