
pycparser 3.0
C parser in Python
pycparser is a Python package that provides a complete parser for the C programming language. It is written purely in Python and is often used as a front-end for C compilers or analysis tools. The package can parse C source code into an abstract syntax tree (AST), which can then be traversed and manipulated using Python. pycparser is library for developers that want to analyze or transform C code programmatically.
The eliben/pycparser repo was created 12 years ago and the last code push was 3 weeks ago.
The project is very popular with an impressive 3471 github stars!
How to Install pycparser
You can install pycparser using pip
pip install pycparser
or add it to a project with poetry
poetry add pycparser
Package Details
- Author
- None
- License
- None
- Homepage
- None
- PyPi:
- https://pypi.org/project/pycparser/
- GitHub Repo:
- https://github.com/eliben/pycparser
Classifiers
Related Packages
Errors
A list of common pycparser errors.
Code Examples
Here are some pycparser code examples and snippets.
GitHub Issues
The pycparser package has 31 open issues on GitHub
- PSA: Please try the new pycparser 3.00 release
- Add support for C11 _Generic selection (#559)
- parsing error on '0u'
- Generating compound expression returning compound literal incorrectly omits final semicolon
- Empty case statements
- Constant string concatenation
- Implement the collections.abc.Sequence interface for e. g. class Node
- Add end of token coord
- Named initializer AST is ambiguous for [ENUMERATOR] = … vs .prop = …
- Escapes in unified string literals
- Generator generates incorrect code for 1-line type aliases
pythonfix







