Fixes to scanning:

- do version checking for the line-continuation character
 - check for built-in names in #undef
 - bug fix for #elif after #else
 - do version checking for use of floating point suffixes (f, LF, etc.)


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24011 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-12 03:31:24 +00:00
parent 67c9f3a720
commit 69aa9c1b84
21 changed files with 210 additions and 59 deletions

View file

@ -196,9 +196,9 @@ protected:
static const int maxMacroArgs = 64;
static const int maxIfNesting = 64;
int ifdepth; // current #if-#else-#endif nesting in the cpp.c file (pre-processor)
int elsedepth[maxIfNesting]; // Keep a track of #if depth..Max allowed is 64.
int elsetracker; // #if-#else and #endif constructs...Counter.
int ifdepth; // current #if-#else-#endif nesting in the cpp.c file (pre-processor)
bool elseSeen[maxIfNesting]; // Keep a track of whether an else has been seen at a particular depth
int elsetracker; // #if-#else and #endif constructs...Counter.
const char *ErrMsg;
struct MacroInputSrc {
@ -262,7 +262,6 @@ protected:
static int macro_scan(TPpContext* pp, InputSrc *inInput, TPpToken * ppToken);
static int zero_scan(TPpContext* pp, InputSrc *inInput, TPpToken * ppToken);
int MacroExpand(int atom, TPpToken* ppToken, int expandUndef);
int ChkCorrectElseNesting();
//
// from PpSymbols.cpp