Commit 5c55caf3 by Jamie Madill

Fix bugged tokens marked as reserved/free in ES2.

We had accidentally marked 'smoooth', 'centroid' and 'case' as reserved in ES2, when they are available as identifiers. Additionally 'sampler2DShadow' was marked as free, instead of reserved. BUG=angle:550 Change-Id: I33ec1b790ad5b4d9a6f4d2ea2e91cec1ca8e7320 Reviewed-on: https://chromium-review.googlesource.com/186970Reviewed-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent d2d648cc
...@@ -102,12 +102,12 @@ O [0-7] ...@@ -102,12 +102,12 @@ O [0-7]
"if" { return IF; } "if" { return IF; }
"else" { return ELSE; } "else" { return ELSE; }
"switch" { return ES2_reserved_ES3_keyword(context, SWITCH); } "switch" { return ES2_reserved_ES3_keyword(context, SWITCH); }
"case" { return ES2_reserved_ES3_keyword(context, CASE); } "case" { return ES2_ident_ES3_keyword(context, CASE); }
"default" { return ES2_reserved_ES3_keyword(context, DEFAULT); } "default" { return ES2_reserved_ES3_keyword(context, DEFAULT); }
"centroid" { return ES2_reserved_ES3_keyword(context, CENTROID); } "centroid" { return ES2_ident_ES3_keyword(context, CENTROID); }
"flat" { return ES2_reserved_ES3_keyword(context, FLAT); } "flat" { return ES2_reserved_ES3_keyword(context, FLAT); }
"smooth" { return ES2_reserved_ES3_keyword(context, SMOOTH); } "smooth" { return ES2_ident_ES3_keyword(context, SMOOTH); }
"in" { return IN_QUAL; } "in" { return IN_QUAL; }
"out" { return OUT_QUAL; } "out" { return OUT_QUAL; }
...@@ -167,7 +167,7 @@ O [0-7] ...@@ -167,7 +167,7 @@ O [0-7]
"usampler3D" { return ES2_ident_ES3_keyword(context, USAMPLER3D); } "usampler3D" { return ES2_ident_ES3_keyword(context, USAMPLER3D); }
"usamplerCube" { return ES2_ident_ES3_keyword(context, USAMPLERCUBE); } "usamplerCube" { return ES2_ident_ES3_keyword(context, USAMPLERCUBE); }
"usampler2DArray" { return ES2_ident_ES3_keyword(context, USAMPLER2DARRAY); } "usampler2DArray" { return ES2_ident_ES3_keyword(context, USAMPLER2DARRAY); }
"sampler2DShadow" { return ES2_ident_ES3_keyword(context, SAMPLER2DSHADOW); } "sampler2DShadow" { return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
"samplerCubeShadow" { return ES2_ident_ES3_keyword(context, SAMPLERCUBESHADOW); } "samplerCubeShadow" { return ES2_ident_ES3_keyword(context, SAMPLERCUBESHADOW); }
"sampler2DArrayShadow" { return ES2_ident_ES3_keyword(context, SAMPLER2DARRAYSHADOW); } "sampler2DArrayShadow" { return ES2_ident_ES3_keyword(context, SAMPLER2DARRAYSHADOW); }
......
...@@ -15,7 +15,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -15,7 +15,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
%{ %{
// //
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
......
...@@ -1420,7 +1420,7 @@ YY_RULE_SETUP ...@@ -1420,7 +1420,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, CASE); } { return ES2_ident_ES3_keyword(context, CASE); }
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1428,7 +1428,7 @@ YY_RULE_SETUP ...@@ -1428,7 +1428,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, CENTROID); } { return ES2_ident_ES3_keyword(context, CENTROID); }
YY_BREAK YY_BREAK
case 21: case 21:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1436,7 +1436,7 @@ YY_RULE_SETUP ...@@ -1436,7 +1436,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SMOOTH); } { return ES2_ident_ES3_keyword(context, SMOOTH); }
YY_BREAK YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
...@@ -1644,7 +1644,7 @@ YY_RULE_SETUP ...@@ -1644,7 +1644,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 74: case 74:
YY_RULE_SETUP YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, SAMPLER2DSHADOW); } { return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
YY_BREAK YY_BREAK
case 75: case 75:
YY_RULE_SETUP YY_RULE_SETUP
......
/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* A Bison parser, made by GNU Bison 2.7.1. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.7.12-4996" #define YYBISON_VERSION "2.7.1"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
......
/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* A Bison parser, made by GNU Bison 2.7.1. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
......
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