Skip to main content

Parser CI — C Parser на базе Clang

Инструмент для анализа C-проектов. Работает на базе libclang. Извлекает полезную информацию из исходников: функции, переменные, типы, макросы и контекст.

Возможности

🔧 На уровне проекта:

  1. Перечислить все пользовательские типы данных (структуры, перечисления, typedef и т.д.)
  2. Перечислить все файлы проекта
  3. Подсчитать количество строк (всего / без комментариев / только функциональных)
  4. Перечислить все define-ы (макросы)
  5. Перечислить все глобальные, static и extern переменные
  6. Перечислить все функции (глобальные и static отдельно)
  7. Разделить define-ы на системные и пользовательские

📄 На уровне файла:

  1. Перечислить все функции в файле
  2. Перечислить все зависимости (#include)
  3. Все переменные (глобальные, static, extern)
  4. Все define-ы
  5. Все пользовательские типы
  6. Подсчёт строк (всего / только функциональных)
  7. Диагностика кода (clang diagnostics)

🔁 На уровне функции:

  1. Аргументы и локальные переменные
  2. Имя, шапка, возвращаемый тип и значение
  3. Используемые глобальные переменные
  4. Вызовы других функций
  5. Кол-во строк кода
  6. Извлечение контекста для изолированной компиляции

Установка

pip install parser-ci-AP

Пример использования

from parser_ci import Project
project = Project(Path(r"\path\to\c\project"))
for f in pr.global_functions:
    print(f.name)

Структура проекта

parser-ci/
├── parser_ci_AP/
│   ├── __init__.py
│   ├── define_info.py
│   ├── errors_info.py
│   ├── function_info.py
│   ├── logger.py
│   ├── project.py
│   ├── project_file.py
│   ├── type_info.py
│   └── variable_info.py
├── README.md
├── setup.py
├── LICENSE

Metadata

Release files for parser-ci-AP 0.1.36

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parser-ci-AP 0.1.36
File Size Uploaded Provenance Actions
parser_ci_ap-0.1.36.tar.gz 17.4 kB Without provenance Details for parser_ci_ap-0.1.36.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parser-ci-AP 0.1.36
File Interpreter ABI Platform Actions
parser_ci_ap-0.1.36-py3-none-any.whl Python 3 none any Details for parser_ci_ap-0.1.36-py3-none-any.whl

Total release size: 39.4 kB

Release files / parser_ci_ap-0.1.36.tar.gz

Download URL parser_ci_ap-0.1.36.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7152e161b84197f7c23f8e2f6da553d10dc416ce3370d209794432a29158aa7f
BLAKE2b-256 checksum
How to use checksums
4f2adb44df9edbfd46b1f3d7b6f727e1c8ca6be924c9b18972e5725508366255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / parser_ci_ap-0.1.36-py3-none-any.whl

Download URL parser_ci_ap-0.1.36-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4f58bab9c909db1d7ca833de1e43556041ac0299be6f841b4cb9894d8c3eb34
BLAKE2b-256 checksum
How to use checksums
b6e1ae5b7cf0c1f6008b28463d11de8ec8e9c193d1876b69e82ef9a08559c4c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for parser-ci-AP 0.1.36

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.36 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page