Home | History | Annotate | Line # | Download | only in glcpp
      1  1.1  mrg glcpp -- GLSL "C" preprocessor
      2  1.1  mrg 
      3  1.1  mrg This is a simple preprocessor designed to provide the preprocessing
      4  1.1  mrg needs of the GLSL language. The requirements for this preprocessor are
      5  1.1  mrg specified in the GLSL 1.30 specification availble from:
      6  1.1  mrg 
      7  1.1  mrg http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf
      8  1.1  mrg 
      9  1.1  mrg This specification is not precise on some semantics, (for example,
     10  1.1  mrg #define and #if), defining these merely "as is standard for C++
     11  1.1  mrg preprocessors". To fill in these details, I've been using a draft of
     12  1.1  mrg the C99 standard as available from:
     13  1.1  mrg 
     14  1.1  mrg http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
     15  1.1  mrg 
     16  1.1  mrg Any downstream compiler accepting output from glcpp should be prepared
     17  1.1  mrg to encounter and deal with the following preprocessor macros:
     18  1.1  mrg 
     19  1.1  mrg 	#line
     20  1.1  mrg 	#pragma
     21  1.1  mrg 	#extension
     22  1.1  mrg 
     23  1.1  mrg All other macros will be handled according to the GLSL specification
     24  1.1  mrg and will not appear in the output.
     25  1.1  mrg 
     26  1.1  mrg Known limitations
     27  1.1  mrg -----------------
     28  1.1  mrg A file that ends with a function-like macro name as the last
     29  1.1  mrg non-whitespace token will result in a parse error, (where it should be
     30  1.1  mrg passed through as is).