Skip to content
README.rst 1.47 KiB
Newer Older
cgen: An Abstract Syntax Tree for C, in Python
----------------------------------------------

.. image:: https://gitlab.tiker.net/inducer/cgen/badges/master/pipeline.svg
Andreas Klöckner's avatar
Andreas Klöckner committed
    :alt: Gitlab Build Status
    :target: https://gitlab.tiker.net/inducer/cgen/commits/master
.. image:: https://github.com/inducer/cgen/workflows/CI/badge.svg?branch=master&event=push
    :alt: Github Build Status
    :target: https://github.com/inducer/cgen/actions?query=branch%3Amaster+workflow%3ACI+event%3Apush
.. image:: https://badge.fury.io/py/cgen.png
Andreas Klöckner's avatar
Andreas Klöckner committed
    :alt: Python Package Index Release Page
    :target: https://pypi.org/project/cgen/
Andreas Klöckner's avatar
Andreas Klöckner committed
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
<https://github.com/inducer/pymbolic>`_.
Andreas Klöckner's avatar
Andreas Klöckner committed

Places on the web related to cgen:

* `Python package index <http://pypi.python.org/pypi/cgen>`_ (download releases)

  .. image:: https://badge.fury.io/py/cgen.png
      :target: http://pypi.python.org/pypi/cgen

* `Documentation <http://documen.tician.de/cgen>`_ (read how things work)
* `Github <http://github.com/inducer/cgen>`_ (get latest source code, file bugs)

cgen is licensed under the liberal `MIT license
<http://en.wikipedia.org/wiki/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