Niels Nesse 793fa269cf Merge remote-tracking branch 'glsl-parser/master' | il y a 9 ans | |
---|---|---|
.. | ||
.gitignore | il y a 9 ans | |
AstNodes.md | il y a 9 ans | |
LICENSE | il y a 9 ans | |
Makefile | il y a 9 ans | |
Readme.md | il y a 9 ans | |
glsl.lex | il y a 9 ans | |
glsl.y | il y a 9 ans | |
glsl_ast.c | il y a 9 ans | |
glsl_ast.h | il y a 9 ans | |
glsl_parser.h | il y a 9 ans | |
glsl_parser_test.c | il y a 9 ans | |
glsl_regen.c | il y a 9 ans |
This is a GLSL parser implemented with flex
and bison
. The grammar is based on the OpenGL 4.5 reference specs. The parser generates an AST represented in C data structures. The AST structure is documented in AstNodes.md.
The header file glsl_parser.h
documents the interface to the parser and the header file glsl_ast.h
defines some useful functions for working with the AST it generates.
The included Makefile builds a test program that reads a shader from standard input and prints out a human readable version of the shader's AST and attempts to regenerate the input shader from the AST.