Skip to main content

C++ AST CLI tool with AST/graph visualization and pattern matching

Project description

cppast

This tool serves mainly serves the purpose of generating and experimenting with AST of C/C++ code. Additional features included in cpast --help as follows:

Functionality:

The above AST and graph are for the following C++ code-

bool verify(int y) {
    if (y > 0) {
        if (y < 10) {
            return true;
        }
    }
    return false;
}

Install through pip

Simply go with $ pip install cppast.

Install cppast through source code

Clone the github repo and to install the dependencies run:

$ pip install -r requirements.txt

Additionally, you would need $ brew install llvm libclang for some of the functions in cli.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cppast-1.0.0.tar.gz (312.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cppast-1.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file cppast-1.0.0.tar.gz.

File metadata

  • Download URL: cppast-1.0.0.tar.gz
  • Upload date:
  • Size: 312.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cppast-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fd7808de335e941b5b114cd518e7537454434e5c013204e1e96002cfefc7a465
MD5 c5745a2517047eb1becb2fd941d9d0f4
BLAKE2b-256 53fdd5b2e9c352006be059027115c2c7279d7fd37c4cd637d5f47248b8df3171

See more details on using hashes here.

Provenance

The following attestation bundles were made for cppast-1.0.0.tar.gz:

Publisher: publish.yml on quarktetra23/cppast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cppast-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cppast-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cppast-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d28e6f00c09ee36e489e021eadcc041ecee543fbbd29585f19060e27bfbaa21e
MD5 16b696a499558e5ca3087b610e36464c
BLAKE2b-256 7b4623f2a1002a6fbf85c80f2f4c806dcd0faf645e297261a795b44f37b43be0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cppast-1.0.0-py3-none-any.whl:

Publisher: publish.yml on quarktetra23/cppast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page