pyglsl_parser

Python wrapper around glsl-parser


License
Other
Install
pip install pyglsl_parser==0.6.2

Documentation

https://ci.appveyor.com/api/projects/status/uprol5i785qd5i1s?svg=true

pyglsl_parser

Python wrapper around glsl-parser.

Quick start

>>> from pyglsl_parser import parse
>>> ast = parse('void main();')
>>> print(ast.functions)
Output: [void main();]

Take a look at example.py for a slightly longer example.

License

MIT License (MIT), same as glsl-parser.

Implementation

The glsl-parser code is wrapped via Cython in pyglsl_parser/parser.pyx. Some Python enums are automatically generated from a C header with gen_enums.py.