https://github.com/inducer/cgen
C/C++ source generation from an AST
https://github.com/inducer/cgen
abstract-syntax-tree ast c code-generation python
Last synced: about 2 months ago
JSON representation
C/C++ source generation from an AST
- Host: GitHub
- URL: https://github.com/inducer/cgen
- Owner: inducer
- License: other
- Created: 2011-07-02T18:02:04.000Z (over 14 years ago)
- Default Branch: main
- Last Pushed: 2025-01-10T18:03:10.000Z (12 months ago)
- Last Synced: 2025-05-09T09:53:36.060Z (8 months ago)
- Topics: abstract-syntax-tree, ast, c, code-generation, python
- Language: Python
- Homepage: http://pypi.python.org/pypi/cgen
- Size: 274 KB
- Stars: 163
- Watchers: 9
- Forks: 34
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
cgen: An Abstract Syntax Tree for C, in Python
----------------------------------------------
.. image:: https://gitlab.tiker.net/inducer/cgen/badges/main/pipeline.svg
:alt: Gitlab Build Status
:target: https://gitlab.tiker.net/inducer/cgen/commits/main
.. image:: https://github.com/inducer/cgen/actions/workflows/ci.yml/badge.svg
:alt: Github Build Status
:target: https://github.com/inducer/cgen/actions/workflows/ci.yml
.. image:: https://badge.fury.io/py/cgen.svg
:alt: Python Package Index Release Page
:target: https://pypi.org/project/cgen/
cgen offers a simple abstract syntax tree for C and related languages
(C++/CUDA/OpenCL) to allow structured code generation from Python.
To represent mathematical expressions, cgen can be used with `pymbolic
`__.
Places on the web related to cgen:
* `Python package index `__ (download releases)
* `Documentation `__ (read how things work)
* `Github `__ (get latest source code, file bugs)
cgen is licensed under the liberal `MIT license
`__ and free for commercial, academic,
and private use. All of cgen's dependencies can be automatically installed from
the package index after using::
pip install cgen