Generates an abstract syntax tree for GLSL sources

Niels Nesse 7bd70e11fc On second thought glsl_ast_walk() is less useful than hand coding a walk il y a 9 ans
.gitignore 944d21999e Give bison and flex output files better names il y a 9 ans
AstNodes.md b55fc7abbe Documentation edit il y a 9 ans
LICENSE cd4f3c4814 Initial commit il y a 9 ans
Makefile 62e94b0a22 Don't specify header file names in lex & yacc sources il y a 9 ans
Readme.md c7960ede79 Support file parameters in parser test program il y a 9 ans
glsl.lex 8d8ddb768c Integer parsing bug il y a 9 ans
glsl.y 82999b477b Add FIELD_IDENTIFIER token il y a 9 ans
glsl_ast.c 7bd70e11fc On second thought glsl_ast_walk() is less useful than hand coding a walk il y a 9 ans
glsl_ast.h 7bd70e11fc On second thought glsl_ast_walk() is less useful than hand coding a walk il y a 9 ans
glsl_parser.h 1b0d1e1daf Handle errors in a callback instead of writing to stderr il y a 9 ans
glsl_parser_test.c c7960ede79 Support file parameters in parser test program il y a 9 ans

Readme.md

glsl-parser

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 a file or standard input and prints out a human readable version of the shader's AST and attempts to regenerate the input shader from the AST.