Skip to content
Snippets Groups Projects
Commit 61f205ec authored by John Kessenich's avatar John Kessenich
Browse files

Remove too aggressive and redundant lexical keyword check: attribute and...

Remove too aggressive and redundant lexical keyword check: attribute and varying can always be error checked in the grammar.



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21443 e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent 52ac67e9
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,6 @@ LF [lL][fF]
#include "glslang_tab.cpp.h"
void PaReservedWord();
void PaCompatibilityWord(TParseContext&);
int PaIdentOrType(const char* yytext, TParseContext&, YYSTYPE* pyylval);
int PaIdentOrReserved(bool reserved, TParseContext&, int line, const char* text, YYSTYPE* pyylval);
int PaES30ReservedFromGLSL(int version, TParseContext& pc, int line, const char* text, YYSTYPE* pyylval, int keyword);
......@@ -110,7 +109,6 @@ int yy_input(char* buf, int max_size);
"attribute" { pyylval->lex.line = yylineno;
if (parseContext.profile == EEsProfile && parseContext.version >= 300)
PaReservedWord();
PaCompatibilityWord(parseContext);
return ATTRIBUTE;
}
"const" { pyylval->lex.line = yylineno;
......@@ -122,7 +120,6 @@ int yy_input(char* buf, int max_size);
"varying" { pyylval->lex.line = yylineno;
if (parseContext.profile == EEsProfile && parseContext.version >= 300)
PaReservedWord();
PaCompatibilityWord(parseContext);
return VARYING;
}
"buffer" { pyylval->lex.line = yylineno;
......@@ -744,15 +741,6 @@ void PaReservedWord()
GlobalParseContext->recover();
}
void PaCompatibilityWord(TParseContext& parseContextlocal)
{
if (parseContextlocal.profile != EEsProfile && parseContextlocal.profile != ECompatibilityProfile &&
parseContextlocal.version > 150) {
GlobalParseContext->error(yylineno, "Keyword requires compatibility profile.", yytext, "", "");
GlobalParseContext->recover();
}
}
int PaIdentOrType(const char* yytext, TParseContext& parseContextLocal, YYSTYPE* pyylval)
{
pyylval->lex.string = NewPoolTString(yytext);
......
......@@ -1724,8 +1724,8 @@ storage_qualifier
}
| ATTRIBUTE {
parseContext.requireStage($1.line, EShLangVertexMask, "attribute");
parseContext.checkDeprecated($1.line, ECoreProfile, 150, "attribute");
parseContext.checkDeprecated($1.line, ENoProfile, 140, "attribute");
parseContext.checkDeprecated($1.line, ECoreProfile, 130, "attribute");
parseContext.checkDeprecated($1.line, ENoProfile, 130, "attribute");
parseContext.requireNotRemoved($1.line, ECoreProfile, 420, "attribute");
parseContext.requireNotRemoved($1.line, EEsProfile, 300, "attribute");
......@@ -1736,8 +1736,8 @@ storage_qualifier
$$.qualifier.storage = EvqVaryingIn;
}
| VARYING {
parseContext.checkDeprecated($1.line, ENoProfile, 140, "varying");
parseContext.checkDeprecated($1.line, ECoreProfile, 150, "varying");
parseContext.checkDeprecated($1.line, ENoProfile, 130, "varying");
parseContext.checkDeprecated($1.line, ECoreProfile, 130, "varying");
parseContext.requireNotRemoved($1.line, ECoreProfile, 420, "varying");
parseContext.requireNotRemoved($1.line, EEsProfile, 300, "varying");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment