Commit c9f140d8 by Jamie Madill

Add preprocess bison files to the gyp files.

We had accidentally left out the y and l files from our generation scripts, causing us to miss several instances of updated enum names. BUG=angle:550 Change-Id: I8790742fbaab5435e4c0db4f61c3e8194a231550 Reviewed-on: https://chromium-review.googlesource.com/186972Reviewed-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 61b54433
...@@ -110,6 +110,8 @@ ...@@ -110,6 +110,8 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\src\angle.gyp"/> <None Include="..\..\src\angle.gyp"/>
<None Include="..\..\src\compiler\preprocessor\ExpressionParser.y"/>
<None Include="..\..\src\compiler\preprocessor\Tokenizer.l"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\src\compiler\preprocessor\length_limits.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\length_limits.h"/>
...@@ -122,9 +124,9 @@ ...@@ -122,9 +124,9 @@
<ClInclude Include="..\..\src\compiler\preprocessor\Macro.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\Macro.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\pp_utils.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\pp_utils.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\Input.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\Input.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\numeric_lex.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\numeric_lex.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\DirectiveParser.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\DirectiveParser.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\DiagnosticsBase.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\DiagnosticsBase.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\DirectiveHandlerBase.h"/> <ClInclude Include="..\..\src\compiler\preprocessor\DirectiveHandlerBase.h"/>
</ItemGroup> </ItemGroup>
......
...@@ -16,12 +16,18 @@ ...@@ -16,12 +16,18 @@
<ClCompile Include="..\..\src\compiler\preprocessor\Input.cpp"> <ClCompile Include="..\..\src\compiler\preprocessor\Input.cpp">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClCompile> </ClCompile>
<None Include="..\..\src\compiler\preprocessor\ExpressionParser.y">
<Filter>compiler\preprocessor</Filter>
</None>
<ClInclude Include="..\..\src\compiler\preprocessor\length_limits.h"> <ClInclude Include="..\..\src\compiler\preprocessor\length_limits.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\compiler\preprocessor\Tokenizer.cpp"> <ClCompile Include="..\..\src\compiler\preprocessor\Tokenizer.cpp">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClCompile> </ClCompile>
<None Include="..\..\src\compiler\preprocessor\Tokenizer.l">
<Filter>compiler\preprocessor</Filter>
</None>
<ClInclude Include="..\..\src\compiler\preprocessor\Tokenizer.h"> <ClInclude Include="..\..\src\compiler\preprocessor\Tokenizer.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClInclude>
...@@ -67,18 +73,18 @@ ...@@ -67,18 +73,18 @@
<ClInclude Include="..\..\src\compiler\preprocessor\Input.h"> <ClInclude Include="..\..\src\compiler\preprocessor\Input.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h"> <ClCompile Include="..\..\src\compiler\preprocessor\DirectiveParser.cpp">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClCompile>
<ClInclude Include="..\..\src\compiler\preprocessor\numeric_lex.h"> <ClInclude Include="..\..\src\compiler\preprocessor\numeric_lex.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\compiler\preprocessor\DirectiveParser.h"> <ClInclude Include="..\..\src\compiler\preprocessor\DirectiveParser.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\compiler\preprocessor\DirectiveParser.cpp"> <ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClCompile> </ClInclude>
<ClInclude Include="..\..\src\compiler\preprocessor\DiagnosticsBase.h"> <ClInclude Include="..\..\src\compiler\preprocessor\DiagnosticsBase.h">
<Filter>compiler\preprocessor</Filter> <Filter>compiler\preprocessor</Filter>
</ClInclude> </ClInclude>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
'target_name': 'preprocessor', 'target_name': 'preprocessor',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ ], 'include_dirs': [ ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler/preprocessor -types *.cpp *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler/preprocessor -types *.cpp *.h *.y *.l )' ],
# TODO(jschuh): http://crbug.com/167187 size_t -> int # TODO(jschuh): http://crbug.com/167187 size_t -> int
'msvs_disabled_warnings': [ 4267 ], 'msvs_disabled_warnings': [ 4267 ],
}, },
......
...@@ -510,9 +510,9 @@ static const yytype_int8 yyrhs[] = ...@@ -510,9 +510,9 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] = static const yytype_uint8 yyrline[] =
{ {
0, 91, 91, 98, 99, 102, 105, 108, 111, 114, 0, 97, 97, 104, 105, 108, 111, 114, 117, 120,
117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 123, 126, 129, 132, 135, 138, 141, 144, 147, 150,
157, 170, 173, 176, 179, 182, 185 163, 176, 179, 182, 185, 188, 191
}; };
#endif #endif
......
...@@ -152,7 +152,7 @@ expression ...@@ -152,7 +152,7 @@ expression
std::ostringstream stream; std::ostringstream stream;
stream << $1 << " % " << $3; stream << $1 << " % " << $3;
std::string text = stream.str(); std::string text = stream.str();
context->diagnostics->report(pp::Diagnostics::DIVISION_BY_ZERO, context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
context->token->location, context->token->location,
text.c_str()); text.c_str());
YYABORT; YYABORT;
...@@ -165,7 +165,7 @@ expression ...@@ -165,7 +165,7 @@ expression
std::ostringstream stream; std::ostringstream stream;
stream << $1 << " / " << $3; stream << $1 << " / " << $3;
std::string text = stream.str(); std::string text = stream.str();
context->diagnostics->report(pp::Diagnostics::DIVISION_BY_ZERO, context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO,
context->token->location, context->token->location,
text.c_str()); text.c_str());
YYABORT; YYABORT;
...@@ -207,7 +207,7 @@ int yylex(YYSTYPE* lvalp, Context* context) ...@@ -207,7 +207,7 @@ int yylex(YYSTYPE* lvalp, Context* context)
unsigned int val = 0; unsigned int val = 0;
if (!token->uValue(&val)) if (!token->uValue(&val))
{ {
context->diagnostics->report(pp::Diagnostics::INTEGER_OVERFLOW, context->diagnostics->report(pp::Diagnostics::PP_INTEGER_OVERFLOW,
token->location, token->text); token->location, token->text);
} }
*lvalp = static_cast<YYSTYPE>(val); *lvalp = static_cast<YYSTYPE>(val);
...@@ -248,7 +248,7 @@ int yylex(YYSTYPE* lvalp, Context* context) ...@@ -248,7 +248,7 @@ int yylex(YYSTYPE* lvalp, Context* context)
void yyerror(Context* context, const char* reason) void yyerror(Context* context, const char* reason)
{ {
context->diagnostics->report(pp::Diagnostics::INVALID_EXPRESSION, context->diagnostics->report(pp::Diagnostics::PP_INVALID_EXPRESSION,
context->token->location, context->token->location,
reason); reason);
} }
...@@ -276,12 +276,12 @@ bool ExpressionParser::parse(Token* token, int* result) ...@@ -276,12 +276,12 @@ bool ExpressionParser::parse(Token* token, int* result)
break; break;
case 2: case 2:
mDiagnostics->report(Diagnostics::OUT_OF_MEMORY, token->location, ""); mDiagnostics->report(Diagnostics::PP_OUT_OF_MEMORY, token->location, "");
break; break;
default: default:
assert(false); assert(false);
mDiagnostics->report(Diagnostics::INTERNAL_ERROR, token->location, ""); mDiagnostics->report(Diagnostics::PP_INTERNAL_ERROR, token->location, "");
break; break;
} }
......
...@@ -257,7 +257,7 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".") ...@@ -257,7 +257,7 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
if (YY_START == COMMENT) if (YY_START == COMMENT)
{ {
yyextra->diagnostics->report(pp::Diagnostics::EOF_IN_COMMENT, yyextra->diagnostics->report(pp::Diagnostics::PP_EOF_IN_COMMENT,
pp::SourceLocation(yyfileno, yylineno), pp::SourceLocation(yyfileno, yylineno),
""); "");
} }
...@@ -307,7 +307,7 @@ void Tokenizer::lex(Token* token) ...@@ -307,7 +307,7 @@ void Tokenizer::lex(Token* token)
token->type = yylex(&token->text, &token->location, mHandle); token->type = yylex(&token->text, &token->location, mHandle);
if (token->text.size() > kMaxTokenLength) if (token->text.size() > kMaxTokenLength)
{ {
mContext.diagnostics->report(Diagnostics::TOKEN_TOO_LONG, mContext.diagnostics->report(Diagnostics::PP_TOKEN_TOO_LONG,
token->location, token->text); token->location, token->text);
token->text.erase(kMaxTokenLength); token->text.erase(kMaxTokenLength);
} }
......
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