1bf215546Sopenharmony_ciglcpp -- GLSL "C" preprocessor 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ciThis is a simple preprocessor designed to provide the preprocessing 4bf215546Sopenharmony_cineeds of the GLSL language. The requirements for this preprocessor are 5bf215546Sopenharmony_cispecified in the GLSL 1.30 specification availble from: 6bf215546Sopenharmony_ci 7bf215546Sopenharmony_cihttp://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf 8bf215546Sopenharmony_ci 9bf215546Sopenharmony_ciThis specification is not precise on some semantics, (for example, 10bf215546Sopenharmony_ci#define and #if), defining these merely "as is standard for C++ 11bf215546Sopenharmony_cipreprocessors". To fill in these details, I've been using a draft of 12bf215546Sopenharmony_cithe C99 standard as available from: 13bf215546Sopenharmony_ci 14bf215546Sopenharmony_cihttp://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf 15bf215546Sopenharmony_ci 16bf215546Sopenharmony_ciAny downstream compiler accepting output from glcpp should be prepared 17bf215546Sopenharmony_cito encounter and deal with the following preprocessor macros: 18bf215546Sopenharmony_ci 19bf215546Sopenharmony_ci #line 20bf215546Sopenharmony_ci #pragma 21bf215546Sopenharmony_ci #extension 22bf215546Sopenharmony_ci 23bf215546Sopenharmony_ciAll other macros will be handled according to the GLSL specification 24bf215546Sopenharmony_ciand will not appear in the output. 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ciKnown limitations 27bf215546Sopenharmony_ci----------------- 28bf215546Sopenharmony_ciA file that ends with a function-like macro name as the last 29bf215546Sopenharmony_cinon-whitespace token will result in a parse error, (where it should be 30bf215546Sopenharmony_cipassed through as is).