Contents

pycparser 3.0

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.

Stars: 3471, Watchers: 3471, Forks: 639, Open Issues: 31

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

No  pycparser  pypi packages just yet.

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

See more issues on GitHub

Related Packages & Articles

syslogmp 0.4

A parser for BSD syslog protocol (RFC 3164) messages

oletools 0.60.2

Python tools to analyze security characteristics of MS Office and OLE files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), for Malware Analysis and Incident Response #DFIR