Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
tests/ | 22-Nov-2023 | - | 1,672 | 829 | ||
.gitignore | D | 22-Nov-2023 | 87 | 8 | 7 | |
Makefile.am | D | 22-Nov-2023 | 1.7 KiB | 55 | 25 | |
README | D | 22-Nov-2023 | 1.1 KiB | 32 | 23 | |
glcpp-lex.l | D | 22-Nov-2023 | 6.7 KiB | 320 | 223 | |
glcpp-parse.y | D | 22-Nov-2023 | 46.5 KiB | 1,968 | 1,474 | |
glcpp.c | D | 22-Nov-2023 | 2.9 KiB | 123 | 77 | |
glcpp.h | D | 22-Nov-2023 | 5.3 KiB | 230 | 160 | |
pp.c | D | 22-Nov-2023 | 5.2 KiB | 176 | 119 |
README
1glcpp -- GLSL "C" preprocessor 2 3This is a simple preprocessor designed to provide the preprocessing 4needs of the GLSL language. The requirements for this preprocessor are 5specified in the GLSL 1.30 specification availble from: 6 7http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf 8 9This specification is not precise on some semantics, (for example, 10#define and #if), defining these merely "as is standard for C++ 11preprocessors". To fill in these details, I've been using a draft of 12the C99 standard as available from: 13 14http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf 15 16Any downstream compiler accepting output from glcpp should be prepared 17to encounter and deal with the following preprocessor macros: 18 19 #line 20 #pragma 21 #extension 22 23All other macros will be handles according to the GLSL specification 24and will not appear in the output. 25 26Known limitations 27----------------- 28The __LINE__ and __FILE__ macros are not yet supported. 29 30A file that ends with a function-like macro name as the last 31non-whitespace token will result in a parse error, (where it should be 32passed through as is).