eliben/pycparser

:snake: Complete C99 parser in pure Python

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 11 minutes ago
Added to GitGenius on September 19th, 2026
Created on June 9th, 2013
Open Issues & Pull Requests: 30 (+0)
GitHub issues: Enabled
Number of forks: 650
Total Stargazers: 3,571 (+0)
Total Subscribers: 87 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 21.2 hours
Mean response time: 74.9 days
90th percentile: 299.9 days
Tracked items: 49

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 15
New in 7 days: 0
Closed in 7 days: 1
Avg open age: 1,141 days
Stale 30+ days: 14
Stale 90+ days: 14

Recent activity

Opened in 7 days: 0
Closed in 7 days: 1
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • patches-welcome (19)
  • enhancement (5)
  • pending-user-input (4)
  • usage-question (4)
  • c-generator (3)
  • blocking-next-release (1)
  • bug (1)
  • easy (1)

Detailed Description

pycparser is a parser for the C language written in pure Python.

pycparser solves the problem of parsing C source code within Python applications. It implements a complete C99 parser that closely follows the grammar specified in the C99 standard, with some support for C11 features and limited GCC extensions. The parser is written entirely in Python with no external dependencies beyond a Python interpreter, making it straightforward to install and integrate into projects that need to analyze or manipulate C code.

The tool suits projects that need to work with C code programmatically, such as code obfuscators, specialized compiler front-ends, static analysis tools, or automatic test discovery systems. It is particularly well-suited for applications where ease of experimentation and modification matter more than raw parsing speed, since the pure Python implementation prioritizes readability and accessibility over performance. The tool is widely used in the cffi library for parsing C function and type declarations to auto-generate foreign function interfaces. Anyone adopting pycparser should be aware that it requires preprocessed C code as input, meaning the C preprocessor must be run first to handle directives like #include and #define; the tool provides a parse_file function that handles this automatically if cpp is available in the system PATH.

The project maintains active continuous integration testing across Linux, macOS, and Windows with modern Python versions. Development activity shows responsiveness to user-reported issues and feature requests through the issue tracker and pull request process.