python-pycparser
Port variant v15
Summary C parser in Python (3.15)
Package version 3.12
Homepage https://github.com/eliben/pycparser
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v14
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 13 NOV 2026, 13:25:52 UTC
Port created 18 SEP 2018, 18:56:45 UTC
Subpackage Descriptions
single ========= pycparser ========= ---- .. contents:: :backlinks: none .. sectnum:: Introduction ============ What is pycparser? ------------------ **pycparser** is a parser for the C language, written in pure Python. It is a module designed to be easily integrated into applications that need to parse C source code. What is it good for? -------------------- Anything that needs C code to be parsed. The following are some uses for **pycparser**, taken from real user reports: * C code obfuscator * Front-end for various specialized C compilers * Static code checker * Automatic unit-test discovery * Adding specialized extensions to the C language One of the most popular uses of **pycparser** is in the [cffi ] library, which uses it to parse the declarations of C functions and types in order to auto-generate FFIs. **pycparser** is unique in the sense that it's written in pure Python - a very high level language that's easy to experiment with and tweak. To people familiar with Lex and Yacc, **pycparser**'s code will be simple to understand. It also has no external dependencies (except for a Python interpreter), making it very simple to install and deploy. Which version of C does pycparser support? ------------------------------------------ **pycparser** aims to support the full C11 language, including earlier revisions like C99. C23 support is conditional on a ``dialect="c23"`` setting, since this revision introduces new keywords like bool that would conflict with existing C code if not handled properly. **pycparser** supports very few GCC extensions, but it's fairly easy to set things up so that it parses code with a lot of GCC-isms successfully. See the [FAQ] for more details. What grammar does pycparser follow? ----------------------------------- **pycparser** very closely follows the C grammar provided in Annex A of the C99 standard (ISO/IEC 9899). How is pycparser licensed? -------------------------- [BSD license]. Contact details --------------- For reporting problems with **pycparser** or submitting feature requests, please open an [issue], or submit a pull request. Installing ========== Prerequisites ------------- **pycparser** is being tested with modern versions of Python on Linux, macOS and Windows. See [the CI dashboard] for details. **pycparser** has no external dependencies. Installation process --------------------
Configuration Switches (platform-specific settings discarded)
PY314 OFF Build using Python 3.14 PY315 ON Build using Python 3.15
Package Dependencies by Type
Build (only) python315:dev:std
python-pip:single:v15
autoselect-python:single:std
Build and Runtime python315:primary:std
Download groups
main mirror://PYPIWHL/b6/ae/315bbeee126a769cbde43cf4908acb4b40408d8bf8bbf334dd7368d8dadf
Distribution File Information
a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e 62600 python-src/pycparser-3.12-py3-none-any.whl
Ports that require python-pycparser:v15
python-cffi:v15 Foreign Function Interface, C (3.15)