Lexer does not need to handle unknown-char case.

It is handled by the preprocessor. Added an assert. TEST=WebGL conformance tests. TBR=kbr@chromium.org Review URL: https://codereview.appspot.com/8653052 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2231 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 95d411fb
......@@ -69,10 +69,6 @@ O [0-7]
%%
%{
TParseContext* context = yyextra;
%}
"invariant" { return INVARIANT; }
"highp" { return HIGH_PRECISION; }
"mediump" { return MEDIUM_PRECISION; }
......@@ -255,7 +251,7 @@ O [0-7]
[ \t\v\n\f\r] { }
<*><<EOF>> { yyterminate(); }
<*>. { context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
<*>. { assert(false); return 0; }
%%
......
......@@ -1037,8 +1037,6 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
TParseContext* context = yyextra;
yylval = yylval_param;
if ( !yyg->yy_init )
......@@ -1732,7 +1730,7 @@ case YY_STATE_EOF(FIELDS):
YY_BREAK
case 148:
YY_RULE_SETUP
{ context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
{ assert(false); return 0; }
YY_BREAK
case 149:
YY_RULE_SETUP
......
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