Delete dead-code for handling comments and invalid octal integers. These are…

Delete dead-code for handling comments and invalid octal integers. These are already handled by the preprocessor. TEST=WebGL conformance tests. Review URL: https://codereview.appspot.com/8632053 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2228 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent b867ebb8
...@@ -60,7 +60,7 @@ static int reserved_word(yyscan_t yyscanner); ...@@ -60,7 +60,7 @@ static int reserved_word(yyscan_t yyscanner);
%option yylineno reentrant bison-bridge %option yylineno reentrant bison-bridge
%option stack %option stack
%option extra-type="TParseContext*" %option extra-type="TParseContext*"
%x COMMENT FIELDS %x FIELDS
D [0-9] D [0-9]
L [a-zA-Z_] L [a-zA-Z_]
...@@ -74,15 +74,6 @@ O [0-7] ...@@ -74,15 +74,6 @@ O [0-7]
TParseContext* context = yyextra; TParseContext* context = yyextra;
%} %}
/* Single-line comments */
"//"[^\n]* ;
/* Multi-line comments */
"/*" { yy_push_state(COMMENT, yyscanner); }
<COMMENT>. |
<COMMENT>\n ;
<COMMENT>"*/" { yy_pop_state(yyscanner); }
"invariant" { return INVARIANT; } "invariant" { return INVARIANT; }
"highp" { return HIGH_PRECISION; } "highp" { return HIGH_PRECISION; }
"mediump" { return MEDIUM_PRECISION; } "mediump" { return MEDIUM_PRECISION; }
...@@ -203,7 +194,6 @@ O [0-7] ...@@ -203,7 +194,6 @@ O [0-7]
0[xX]{H}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } 0[xX]{H}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; }
0{O}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } 0{O}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; }
0{D}+ { context->error(yylineno, "Invalid Octal number.", yytext); context->recover(); return 0;}
{D}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } {D}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; }
{D}+{E} { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } {D}+{E} { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; }
......
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