101e04c3fSmrgglcpp -- GLSL "C" preprocessor
201e04c3fSmrg
301e04c3fSmrgThis is a simple preprocessor designed to provide the preprocessing
401e04c3fSmrgneeds of the GLSL language. The requirements for this preprocessor are
501e04c3fSmrgspecified in the GLSL 1.30 specification availble from:
601e04c3fSmrg
701e04c3fSmrghttp://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf
801e04c3fSmrg
901e04c3fSmrgThis specification is not precise on some semantics, (for example,
1001e04c3fSmrg#define and #if), defining these merely "as is standard for C++
1101e04c3fSmrgpreprocessors". To fill in these details, I've been using a draft of
1201e04c3fSmrgthe C99 standard as available from:
1301e04c3fSmrg
1401e04c3fSmrghttp://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
1501e04c3fSmrg
1601e04c3fSmrgAny downstream compiler accepting output from glcpp should be prepared
1701e04c3fSmrgto encounter and deal with the following preprocessor macros:
1801e04c3fSmrg
1901e04c3fSmrg	#line
2001e04c3fSmrg	#pragma
2101e04c3fSmrg	#extension
2201e04c3fSmrg
2301e04c3fSmrgAll other macros will be handled according to the GLSL specification
2401e04c3fSmrgand will not appear in the output.
2501e04c3fSmrg
2601e04c3fSmrgKnown limitations
2701e04c3fSmrg-----------------
2801e04c3fSmrgA file that ends with a function-like macro name as the last
2901e04c3fSmrgnon-whitespace token will result in a parse error, (where it should be
3001e04c3fSmrgpassed through as is).