Commit fe345bfd by Jamie Madill Committed by Shannon Woods

Deleted unnecessary TParseContext::AfterEOF.

TRAC #23158 Signed-off-by: Nicolas Capens Merged-by: Jamie Madill Authored-by: alokp@chromium.org git-svn-url: https://code.google.com/p/angleproject/source/detail?r=2188 Review URL: https://codereview.appspot.com/8927045
parent 56b06519
...@@ -62,7 +62,6 @@ struct TParseContext { ...@@ -62,7 +62,6 @@ struct TParseContext {
bool checksPrecisionErrors; // true if an error will be generated when a variable is declared without precision, explicit or implicit. bool checksPrecisionErrors; // true if an error will be generated when a variable is declared without precision, explicit or implicit.
bool fragmentPrecisionHigh; // true if highp precision is supported in the fragment language. bool fragmentPrecisionHigh; // true if highp precision is supported in the fragment language.
TString HashErrMsg; TString HashErrMsg;
bool AfterEOF;
TDiagnostics diagnostics; TDiagnostics diagnostics;
TDirectiveHandler directiveHandler; TDirectiveHandler directiveHandler;
pp::Preprocessor preprocessor; pp::Preprocessor preprocessor;
......
...@@ -376,7 +376,7 @@ O [0-7] ...@@ -376,7 +376,7 @@ O [0-7]
<FIELDS>[ \t\v\f\r] {} <FIELDS>[ \t\v\f\r] {}
[ \t\v\n\f\r] { } [ \t\v\n\f\r] { }
<*><<EOF>> { context->AfterEOF = true; yyterminate(); } <*><<EOF>> { yyterminate(); }
<*>. { context->warning(yylineno, "Unknown char", yytext, ""); return 0; } <*>. { context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
%% %%
...@@ -495,11 +495,7 @@ int floatsuffix_check(TParseContext* context) ...@@ -495,11 +495,7 @@ int floatsuffix_check(TParseContext* context)
void yyerror(TParseContext* context, const char* reason) { void yyerror(TParseContext* context, const char* reason) {
struct yyguts_t* yyg = (struct yyguts_t*) context->scanner; struct yyguts_t* yyg = (struct yyguts_t*) context->scanner;
if (context->AfterEOF) { context->error(yylineno, reason, yytext);
context->error(yylineno, reason, "unexpected EOF");
} else {
context->error(yylineno, reason, yytext);
}
context->recover(); context->recover();
} }
...@@ -526,7 +522,6 @@ int glslang_scan(size_t count, const char* const string[], const int length[], ...@@ -526,7 +522,6 @@ int glslang_scan(size_t count, const char* const string[], const int length[],
TParseContext* context) { TParseContext* context) {
yyrestart(NULL, context->scanner); yyrestart(NULL, context->scanner);
yyset_lineno(EncodeSourceLoc(0, 1), context->scanner); yyset_lineno(EncodeSourceLoc(0, 1), context->scanner);
context->AfterEOF = false;
// Initialize preprocessor. // Initialize preprocessor.
if (!context->preprocessor.init(count, string, length)) if (!context->preprocessor.init(count, string, length))
......
...@@ -2009,7 +2009,7 @@ YY_RULE_SETUP ...@@ -2009,7 +2009,7 @@ YY_RULE_SETUP
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(FIELDS): case YY_STATE_EOF(FIELDS):
{ context->AfterEOF = true; yyterminate(); } { yyterminate(); }
YY_BREAK YY_BREAK
case 233: case 233:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -3302,11 +3302,7 @@ int floatsuffix_check(TParseContext* context) ...@@ -3302,11 +3302,7 @@ int floatsuffix_check(TParseContext* context)
void yyerror(TParseContext* context, const char* reason) { void yyerror(TParseContext* context, const char* reason) {
struct yyguts_t* yyg = (struct yyguts_t*) context->scanner; struct yyguts_t* yyg = (struct yyguts_t*) context->scanner;
if (context->AfterEOF) { context->error(yylineno, reason, yytext);
context->error(yylineno, reason, "unexpected EOF");
} else {
context->error(yylineno, reason, yytext);
}
context->recover(); context->recover();
} }
...@@ -3333,7 +3329,6 @@ int glslang_scan(size_t count, const char* const string[], const int length[], ...@@ -3333,7 +3329,6 @@ int glslang_scan(size_t count, const char* const string[], const int length[],
TParseContext* context) { TParseContext* context) {
yyrestart(NULL,context->scanner); yyrestart(NULL,context->scanner);
yyset_lineno(EncodeSourceLoc(0, 1),context->scanner); yyset_lineno(EncodeSourceLoc(0, 1),context->scanner);
context->AfterEOF = false;
// Initialize preprocessor. // Initialize preprocessor.
if (!context->preprocessor.init(count, string, length)) if (!context->preprocessor.init(count, string, length))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment