Restore r26245 and all tests and test results since 4/1:
r26245: Remove "not yet complete" warning for versions 130 and 140, after tidying up a bit and adding tests. Token pasting is the only known missing feature, and gives its own message now on use. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
dd09c05e5b
commit
cf0206c341
125 changed files with 14154 additions and 212 deletions
|
|
@ -933,9 +933,9 @@ int TPpContext::tZeroInput::scan(TPpToken* ppToken)
|
|||
|
||||
//
|
||||
// Check an identifier (atom) to see if it is a macro that should be expanded.
|
||||
// If it is, and defined, push an tInput that will produce the appropriate expansion
|
||||
// If it is, and defined, push a tInput that will produce the appropriate expansion
|
||||
// and return 1.
|
||||
// If it is, but undefined, and expandUndef is requested, push an tInput that will
|
||||
// If it is, but undefined, and expandUndef is requested, push a tInput that will
|
||||
// expand to 0 and return -1.
|
||||
// Otherwise, return 0 to indicate no expansion, which is not necessarily an error.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ protected:
|
|||
//
|
||||
void lAddByte(TokenStream *fTok, unsigned char fVal);
|
||||
int lReadByte(TokenStream *pTok);
|
||||
void lUnreadByte(TokenStream *pTok);
|
||||
void RecordToken(TokenStream* pTok, int token, TPpToken* ppToken);
|
||||
void RewindTokenStream(TokenStream *pTok);
|
||||
int ReadToken(TokenStream* pTok, TPpToken* ppToken);
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
len = 0;
|
||||
switch (ch) {
|
||||
default:
|
||||
return ch; // Single character token, including '\' (escaped newlines are handled at a lower level, so this is just a '\' token)
|
||||
return ch; // Single character token, including '#' and '\' (escaped newlines are handled at a lower level, so this is just a '\' token)
|
||||
|
||||
case EOF:
|
||||
return endOfInput;
|
||||
|
|
|
|||
|
|
@ -112,6 +112,12 @@ int TPpContext::lReadByte(TokenStream *pTok)
|
|||
return tInput::endOfInput;
|
||||
}
|
||||
|
||||
void TPpContext::lUnreadByte(TokenStream *pTok)
|
||||
{
|
||||
if (pTok->current > 0)
|
||||
--pTok->current;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a token to the end of a list for later playback.
|
||||
*/
|
||||
|
|
@ -171,6 +177,16 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
|
|||
if (ltoken > 127)
|
||||
ltoken += 128;
|
||||
switch (ltoken) {
|
||||
case '#':
|
||||
if (lReadByte(pTok) == '#') {
|
||||
parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)");
|
||||
parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)");
|
||||
parseContext.error(ppToken->loc, "token pasting not implemented (internal error)", "##", "");
|
||||
//return CPP_TOKEN_PASTE;
|
||||
return ReadToken(pTok, ppToken);
|
||||
} else
|
||||
lUnreadByte(pTok);
|
||||
break;
|
||||
case CPP_STRCONSTANT:
|
||||
case CPP_IDENTIFIER:
|
||||
case CPP_FLOATCONSTANT:
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define CPP_RIGHT_BRACE 288
|
||||
#define CPP_UINTCONSTANT 289
|
||||
#define CPP_DOUBLECONSTANT 290
|
||||
#define CPP_TOKEN_PASTE 291
|
||||
|
||||
#define CPP_FIRST_USER_TOKEN_SY 291
|
||||
#define CPP_FIRST_USER_TOKEN_SY 292
|
||||
|
||||
#endif /* not PARSER_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue