Eliminate flex as the GLSL lexical analyzer, going from two nested lexical analyzers down to one, leaving just the preprocessor's lexical analysis. A new layer replaces it, to translate from the preprocessor's view of tokenization to glslang's view of tokenization.
Also: - change source locations from an int to TSourceLoc (shader number, line number) throughout - various improvements to the preprocessor git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22277 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
73ed17a87b
commit
5f1a0b7998
35 changed files with 2535 additions and 2515 deletions
|
|
@ -81,9 +81,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#if !defined(__SCANNER_H)
|
||||
#define __SCANNER_H 1
|
||||
|
||||
#define MAX_SYMBOL_NAME_LEN 1025
|
||||
#define MAX_STRING_LEN 1025
|
||||
|
||||
#include "preprocess.h"
|
||||
#include "parser.h"
|
||||
|
||||
// Not really atom table stuff but needed first...
|
||||
|
|
@ -91,23 +89,8 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SourceLoc_Rec {
|
||||
unsigned short file, line;
|
||||
} SourceLoc;
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
int yylex_CPP(char* buf, int maxSize);
|
||||
|
||||
typedef struct InputSrc {
|
||||
struct InputSrc *prev;
|
||||
int (*scan)(struct InputSrc *, yystypepp *);
|
||||
int (*getch)(struct InputSrc *, yystypepp *);
|
||||
void (*ungetch)(struct InputSrc *, int, yystypepp *);
|
||||
int name; /* atom */
|
||||
int line;
|
||||
} InputSrc;
|
||||
|
||||
int InitScanner(CPPStruct *cpp); // Intialise the cpp scanner.
|
||||
int ScanFromString(char *); // Start scanning the input from the string mentioned.
|
||||
int check_EOF(int); // check if we hit a EOF abruptly
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue