Metadata-Version: 2.4
Name: cppast
Version: 1.0.0
Summary: C++ AST CLI tool with AST/graph visualization and pattern matching
Home-page: https://github.com/amanhas/cppast
Author: Abhishek Manhas
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: clang
Requires-Dist: graphviz
Requires-Dist: networkx
Requires-Dist: typer[all]
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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:

![](https://github.com/quarktetra23/cppast/raw/main/images/cmdhelp.png)

Functionality:

![](https://github.com/quarktetra23/cppast/raw/main/images/combined.jpeg)

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.
