Deleted unnecessary TParseContext::AfterEOF.

TBR=kbr@chromium.org

Review URL: https://codereview.appspot.com/8927045

git-svn-id: http://angleproject.googlecode.com/svn/trunk@2188 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ParseHelper.h b/src/compiler/ParseHelper.h
index 26a3ea1..fc58153 100644
--- a/src/compiler/ParseHelper.h
+++ b/src/compiler/ParseHelper.h
@@ -60,7 +60,6 @@
     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.
     TString HashErrMsg;
-    bool AfterEOF;
     TDiagnostics diagnostics;
     TDirectiveHandler directiveHandler;
     pp::Preprocessor preprocessor;
diff --git a/src/compiler/glslang.l b/src/compiler/glslang.l
index 3fba683..2b7734d 100644
--- a/src/compiler/glslang.l
+++ b/src/compiler/glslang.l
@@ -265,7 +265,7 @@
 <FIELDS>[ \t\v\f\r] {}
 
 [ \t\v\n\f\r]   {  }
-<*><<EOF>>      { context->AfterEOF = true; yyterminate(); }
+<*><<EOF>>      { yyterminate(); }
 <*>.            { context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
 
 %%
@@ -312,11 +312,7 @@
 void yyerror(TParseContext* context, const char* reason) {
     struct yyguts_t* yyg = (struct yyguts_t*) context->scanner;
 
-    if (context->AfterEOF) {
-        context->error(yylineno, reason, "unexpected EOF");
-    } else {
-        context->error(yylineno, reason, yytext);
-    }
+    context->error(yylineno, reason, yytext);
     context->recover();
 }
 
@@ -343,7 +339,6 @@
                  TParseContext* context) {
     yyrestart(NULL, context->scanner);
     yyset_lineno(EncodeSourceLoc(0, 1), context->scanner);
-    context->AfterEOF = false;
 
     // Initialize preprocessor.
     if (!context->preprocessor.init(count, string, length))
diff --git a/src/compiler/glslang_lex.cpp b/src/compiler/glslang_lex.cpp
index 092942d..f5d2b60 100644
--- a/src/compiler/glslang_lex.cpp
+++ b/src/compiler/glslang_lex.cpp
@@ -1769,7 +1769,7 @@
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(COMMENT):
 case YY_STATE_EOF(FIELDS):
-{ context->AfterEOF = true; yyterminate(); }
+{ yyterminate(); }
 	YY_BREAK
 case 154:
 YY_RULE_SETUP
@@ -2990,11 +2990,7 @@
 void yyerror(TParseContext* context, const char* reason) {
     struct yyguts_t* yyg = (struct yyguts_t*) context->scanner;
 
-    if (context->AfterEOF) {
-        context->error(yylineno, reason, "unexpected EOF");
-    } else {
-        context->error(yylineno, reason, yytext);
-    }
+    context->error(yylineno, reason, yytext);
     context->recover();
 }
 
@@ -3021,7 +3017,6 @@
                  TParseContext* context) {
     yyrestart(NULL,context->scanner);
     yyset_lineno(EncodeSourceLoc(0, 1),context->scanner);
-    context->AfterEOF = false;
 
     // Initialize preprocessor.
     if (!context->preprocessor.init(count, string, length))