A modern, Python-based parser for C++ header files. It can parse C++ headers into an AST and optionally generate a JSON representation. Version 1.7.0 supports Python >=3.6. Releases are occasional, with active maintenance.
pip install cxxheaderparserVerified import paths — ran on the pinned version, not inferred.
Parse a simple header string and access parsed functions.
Run your code through a preprocessor (e.g., cpp) before parsing, or avoid macro-heavy headers.
Stick to C++17 or earlier for reliable parsing. Consider libclang-based alternatives if full standard support is needed.
Use `from cxxheaderparser import parse_file` instead of `from cxxheaderparser import parse`.
No dependency data recorded yet.