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 @@
</ItemDefinitionGroup>
<ItemGroup>
<None Include="..\..\src\angle.gyp"/>
<None Include="..\..\src\compiler\preprocessor\ExpressionParser.y"/>
<None Include="..\..\src\compiler\preprocessor\Tokenizer.l"/>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\compiler\preprocessor\length_limits.h"/>
......@@ -122,9 +124,9 @@
<ClInclude Include="..\..\src\compiler\preprocessor\Macro.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\pp_utils.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\DirectiveParser.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\DiagnosticsBase.h"/>
<ClInclude Include="..\..\src\compiler\preprocessor\DirectiveHandlerBase.h"/>
</ItemGroup>
......
......@@ -16,12 +16,18 @@
<ClCompile Include="..\..\src\compiler\preprocessor\Input.cpp">
<Filter>compiler\preprocessor</Filter>
</ClCompile>
<None Include="..\..\src\compiler\preprocessor\ExpressionParser.y">
<Filter>compiler\preprocessor</Filter>
</None>
<ClInclude Include="..\..\src\compiler\preprocessor\length_limits.h">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
<ClCompile Include="..\..\src\compiler\preprocessor\Tokenizer.cpp">
<Filter>compiler\preprocessor</Filter>
</ClCompile>
<None Include="..\..\src\compiler\preprocessor\Tokenizer.l">
<Filter>compiler\preprocessor</Filter>
</None>
<ClInclude Include="..\..\src\compiler\preprocessor\Tokenizer.h">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
......@@ -67,18 +73,18 @@
<ClInclude Include="..\..\src\compiler\preprocessor\Input.h">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h">
<ClCompile Include="..\..\src\compiler\preprocessor\DirectiveParser.cpp">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
</ClCompile>
<ClInclude Include="..\..\src\compiler\preprocessor\numeric_lex.h">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\preprocessor\DirectiveParser.h">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
<ClCompile Include="..\..\src\compiler\preprocessor\DirectiveParser.cpp">
<ClInclude Include="..\..\src\compiler\preprocessor\SourceLocation.h">
<Filter>compiler\preprocessor</Filter>
</ClCompile>
</ClInclude>
<ClInclude Include="..\..\src\compiler\preprocessor\DiagnosticsBase.h">
<Filter>compiler\preprocessor</Filter>
</ClInclude>
......
......@@ -9,7 +9,7 @@
'target_name': 'preprocessor',
'type': 'static_library',
'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
'msvs_disabled_warnings': [ 4267 ],
},
......
......@@ -510,9 +510,9 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 91, 91, 98, 99, 102, 105, 108, 111, 114,
117, 120, 123, 126, 129, 132, 135, 138, 141, 144,
157, 170, 173, 176, 179, 182, 185
0, 97, 97, 104, 105, 108, 111, 114, 117, 120,
123, 126, 129, 132, 135, 138, 141, 144, 147, 150,
163, 176, 179, 182, 185, 188, 191
};
#endif
......
......@@ -152,7 +152,7 @@ expression
std::ostringstream stream;
stream << $1 << " % " << $3;
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,
text.c_str());
YYABORT;
......@@ -165,7 +165,7 @@ expression
std::ostringstream stream;
stream << $1 << " / " << $3;
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,
text.c_str());
YYABORT;
......@@ -207,7 +207,7 @@ int yylex(YYSTYPE* lvalp, Context* context)
unsigned int val = 0;
if (!token->uValue(&val))
{
context->diagnostics->report(pp::Diagnostics::INTEGER_OVERFLOW,
context->diagnostics->report(pp::Diagnostics::PP_INTEGER_OVERFLOW,
token->location, token->text);
}
*lvalp = static_cast<YYSTYPE>(val);
......@@ -248,7 +248,7 @@ int yylex(YYSTYPE* lvalp, Context* context)
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,
reason);
}
......@@ -276,12 +276,12 @@ bool ExpressionParser::parse(Token* token, int* result)
break;
case 2:
mDiagnostics->report(Diagnostics::OUT_OF_MEMORY, token->location, "");
mDiagnostics->report(Diagnostics::PP_OUT_OF_MEMORY, token->location, "");
break;
default:
assert(false);
mDiagnostics->report(Diagnostics::INTERNAL_ERROR, token->location, "");
mDiagnostics->report(Diagnostics::PP_INTERNAL_ERROR, token->location, "");
break;
}
......
......@@ -257,7 +257,7 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
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),
"");
}
......@@ -307,7 +307,7 @@ void Tokenizer::lex(Token* token)
token->type = yylex(&token->text, &token->location, mHandle);
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->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