Added more info to ES3 only errors in parser

Added the same info as Angle's for ES3 only errors.

Change-Id: I2f11b34b06f8e1cc1b0a200d568c709ca35469ab
Reviewed-on: https://swiftshader-review.googlesource.com/3639
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/glslang.y b/src/OpenGL/compiler/glslang.y
index 009f81f..b591ee5 100644
--- a/src/OpenGL/compiler/glslang.y
+++ b/src/OpenGL/compiler/glslang.y
@@ -122,9 +122,9 @@
     }  \
 }
 
-#define ES3_ONLY(S, L) {  \
+#define ES3_ONLY(TOKEN, LINE, REASON) {  \
     if (context->getShaderVersion() != 300) {  \
-        context->error(L, " supported in GLSL ES 3.00 only ", S);  \
+        context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN);  \
         context->recover();  \
     }  \
 }
@@ -361,7 +361,7 @@
 function_identifier
     : type_specifier_no_prec {
         if ($1.array) {
-            ES3_ONLY("[]", @1);
+            ES3_ONLY("[]", @1, "array constructor");
         }
         $$ = context->addConstructorFunc($1);
     }
@@ -431,7 +431,7 @@
     | DASH  { $$.line = @1; $$.op = EOpNegative; }
     | BANG  { $$.line = @1; $$.op = EOpLogicalNot; }
     | TILDE {
-        ES3_ONLY("~", @1);
+        ES3_ONLY("~", @1, "bit-wise operator");
         $$.line = @1; $$.op = EOpBitwiseNot;
     }
     ;
@@ -449,7 +449,7 @@
     }
     | multiplicative_expression PERCENT unary_expression {
         FRAG_VERT_ONLY("%", @2);
-        ES3_ONLY("%", @2);
+        ES3_ONLY("%", @2, "integer modulus operator");
         $$ = context->addBinaryMath(EOpIMod, $1, $3, @2);
     }
     ;
@@ -467,11 +467,11 @@
 shift_expression
     : additive_expression { $$ = $1; }
     | shift_expression LEFT_OP additive_expression {
-        ES3_ONLY("<<", @2);
+        ES3_ONLY("<<", @2, "bit-wise operator");
         $$ = context->addBinaryMath(EOpBitShiftLeft, $1, $3, @2);
     }
     | shift_expression RIGHT_OP additive_expression {
-        ES3_ONLY(">>", @2);
+        ES3_ONLY(">>", @2, "bit-wise operator");
         $$ = context->addBinaryMath(EOpBitShiftRight, $1, $3, @2);
     }
     ;
@@ -505,7 +505,7 @@
 and_expression
     : equality_expression { $$ = $1; }
     | and_expression AMPERSAND equality_expression {
-        ES3_ONLY("&", @2);
+        ES3_ONLY("&", @2, "bit-wise operator");
         $$ = context->addBinaryMath(EOpBitwiseAnd, $1, $3, @2);
     }
     ;
@@ -513,7 +513,7 @@
 exclusive_or_expression
     : and_expression { $$ = $1; }
     | exclusive_or_expression CARET and_expression {
-        ES3_ONLY("^", @2);
+        ES3_ONLY("^", @2, "bit-wise operator");
         $$ = context->addBinaryMath(EOpBitwiseXor, $1, $3, @2);
     }
     ;
@@ -521,7 +521,7 @@
 inclusive_or_expression
     : exclusive_or_expression { $$ = $1; }
     | inclusive_or_expression VERTICAL_BAR exclusive_or_expression {
-        ES3_ONLY("|", @2);
+        ES3_ONLY("|", @2, "bit-wise operator");
         $$ = context->addBinaryMath(EOpBitwiseOr, $1, $3, @2);
     }
     ;
@@ -578,19 +578,19 @@
     : EQUAL        {                                    $$.line = @1; $$.op = EOpAssign; }
     | MUL_ASSIGN   { FRAG_VERT_ONLY("*=", @1);     $$.line = @1; $$.op = EOpMulAssign; }
     | DIV_ASSIGN   { FRAG_VERT_ONLY("/=", @1);     $$.line = @1; $$.op = EOpDivAssign; }
-    | MOD_ASSIGN   { ES3_ONLY("%=", @1); 
+    | MOD_ASSIGN   { ES3_ONLY("%=", @1, "integer modulus operator");
                      FRAG_VERT_ONLY("%=", @1);     $$.line = @1; $$.op = EOpIModAssign; }
     | ADD_ASSIGN   {                                    $$.line = @1; $$.op = EOpAddAssign; }
     | SUB_ASSIGN   {                                    $$.line = @1; $$.op = EOpSubAssign; }
-    | LEFT_ASSIGN  { ES3_ONLY("<<=", @1);
+    | LEFT_ASSIGN  { ES3_ONLY("<<=", @1, "bit-wise operator");
                      FRAG_VERT_ONLY("<<=", @1);    $$.line = @1; $$.op = EOpBitShiftLeftAssign; }
-    | RIGHT_ASSIGN { ES3_ONLY(">>=", @1);
+    | RIGHT_ASSIGN { ES3_ONLY(">>=", @1, "bit-wise operator");
                      FRAG_VERT_ONLY(">>=", @1);    $$.line = @1; $$.op = EOpBitShiftRightAssign; }
-    | AND_ASSIGN   { ES3_ONLY("&=", @1);
+    | AND_ASSIGN   { ES3_ONLY("&=", @1, "bit-wise operator");
                      FRAG_VERT_ONLY("&=", @1);     $$.line = @1; $$.op = EOpBitwiseAndAssign; }
-    | XOR_ASSIGN   { ES3_ONLY("^=", @1);
+    | XOR_ASSIGN   { ES3_ONLY("^=", @1, "bit-wise operator");
                      FRAG_VERT_ONLY("^=", @1);     $$.line = @1; $$.op = EOpBitwiseXorAssign; }
-    | OR_ASSIGN    { ES3_ONLY("|=", @1);
+    | OR_ASSIGN    { ES3_ONLY("|=", @1, "bit-wise operator");
                      FRAG_VERT_ONLY("|=", @1);     $$.line = @1; $$.op = EOpBitwiseOrAssign; }
     ;
 
@@ -666,15 +666,15 @@
         $$ = 0;
     }
     | type_qualifier enter_struct struct_declaration_list RIGHT_BRACE SEMICOLON {
-        ES3_ONLY(getQualifierString($1.qualifier), @1);
+        ES3_ONLY(getQualifierString($1.qualifier), @1, "interface blocks");
         $$ = context->addInterfaceBlock($1, @2, *$2.string, $3, NULL, @1, NULL, @1);
     }
     | type_qualifier enter_struct struct_declaration_list RIGHT_BRACE IDENTIFIER SEMICOLON {
-        ES3_ONLY(getQualifierString($1.qualifier), @1);
+        ES3_ONLY(getQualifierString($1.qualifier), @1, "interface blocks");
         $$ = context->addInterfaceBlock($1, @2, *$2.string, $3, $5.string, @5, NULL, @1);
     }
     | type_qualifier enter_struct struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET SEMICOLON {
-        ES3_ONLY(getQualifierString($1.qualifier), @1);
+        ES3_ONLY(getQualifierString($1.qualifier), @1, "interface blocks");
         $$ = context->addInterfaceBlock($1, @2, *$2.string, $3, $5.string, @5, $7, @6);
     }
     | type_qualifier SEMICOLON {
@@ -886,12 +886,12 @@
         $$.intermAggregate = context->parseArrayDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, $5);
     }
     | init_declarator_list COMMA IDENTIFIER LEFT_BRACKET RIGHT_BRACKET EQUAL initializer {
-        ES3_ONLY("[]", @3);
+        ES3_ONLY("[]", @3, "implicitly sized array");
         $$ = $1;
         $$.intermAggregate = context->parseArrayInitDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, nullptr, @6, $7);
     }
     | init_declarator_list COMMA IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET EQUAL initializer {
-        ES3_ONLY("=", @7);
+        ES3_ONLY("=", @7, "first-class arrays (array initializer)");
         $$ = $1;
         $$.intermAggregate = context->parseArrayInitDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, $5, @7, $8);
     }
@@ -915,12 +915,12 @@
         $$.intermAggregate = context->parseSingleArrayDeclaration($$.type, @2, *$2.string, @3, $4);
     }
     | fully_specified_type IDENTIFIER LEFT_BRACKET RIGHT_BRACKET EQUAL initializer {
-        ES3_ONLY("[]", @3);
+        ES3_ONLY("[]", @3, "implicitly sized array");
         $$.type = $1;
         $$.intermAggregate = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, nullptr, @5, $6);
     }
     | fully_specified_type IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET EQUAL initializer {
-        ES3_ONLY("=", @6);
+        ES3_ONLY("=", @6, "first-class arrays (array initializer)");
         $$.type = $1;
         $$.intermAggregate = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, $4, @6, $7);
     }
@@ -1008,7 +1008,7 @@
         $$ = $1;
 
         if ($1.array) {
-            ES3_ONLY("[]", @1);
+            ES3_ONLY("[]", @1, "first-class-array");
             if (context->getShaderVersion() != 300) {
                 $1.clearArrayness();
             }
@@ -1089,17 +1089,17 @@
 		$$.line = @1;
     }
     | IN_QUAL {
-		ES3_ONLY("in", @1);
+        ES3_ONLY("in", @1, "storage qualifier");
         $$.qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
 		$$.line = @1;
     }
     | OUT_QUAL {
-		ES3_ONLY("out", @1);
+        ES3_ONLY("out", @1, "storage qualifier");
         $$.qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
 		$$.line = @1;
     }
     | CENTROID IN_QUAL {
-		ES3_ONLY("centroid in", @1);
+        ES3_ONLY("centroid in", @1, "storage qualifier");
         if (context->getShaderType() == GL_VERTEX_SHADER)
         {
             context->error(@1, "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
@@ -1108,8 +1108,8 @@
         $$.qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
 		$$.line = @2;
     }
-	| CENTROID OUT_QUAL {
-		ES3_ONLY("centroid out", @1);
+    | CENTROID OUT_QUAL {
+        ES3_ONLY("centroid out", @1, "storage qualifier");
         if (context->getShaderType() == GL_FRAGMENT_SHADER)
         {
             context->error(@1, "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
@@ -1157,7 +1157,7 @@
 
 layout_qualifier
     : LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN {
-        ES3_ONLY("layout", @1);
+        ES3_ONLY("layout", @1, "qualifier");
         $$ = $3;
     }
     ;
@@ -1188,7 +1188,7 @@
         $$ = $1;
     }
     | type_specifier_nonarray LEFT_BRACKET RIGHT_BRACKET {
-        ES3_ONLY("[]", @2);
+        ES3_ONLY("[]", @2, "implicitly sized array");
         $$ = $1;
         $$.setArray(true, 0);
     }
diff --git a/src/OpenGL/compiler/glslang_tab.cpp b/src/OpenGL/compiler/glslang_tab.cpp
index 75f8f59..9ecc6aa 100644
--- a/src/OpenGL/compiler/glslang_tab.cpp
+++ b/src/OpenGL/compiler/glslang_tab.cpp
@@ -358,9 +358,9 @@
     }  \
 }
 
-#define ES3_ONLY(S, L) {  \
+#define ES3_ONLY(TOKEN, LINE, REASON) {  \
     if (context->getShaderVersion() != 300) {  \
-        context->error(L, " supported in GLSL ES 3.00 only ", S);  \
+        context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN);  \
         context->recover();  \
     }  \
 }
@@ -2713,7 +2713,7 @@
 
     {
         if ((yyvsp[(1) - (1)].interm.type).array) {
-            ES3_ONLY("[]", (yylsp[(1) - (1)]));
+            ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor");
         }
         (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
     }
@@ -2816,7 +2816,7 @@
   case 36:
 
     {
-        ES3_ONLY("~", (yylsp[(1) - (1)]));
+        ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator");
         (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseNot;
     }
     break;
@@ -2846,7 +2846,7 @@
 
     {
         FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
-        ES3_ONLY("%", (yylsp[(2) - (3)]));
+        ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator");
         (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
     }
     break;
@@ -2878,7 +2878,7 @@
   case 45:
 
     {
-        ES3_ONLY("<<", (yylsp[(2) - (3)]));
+        ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator");
         (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
     }
     break;
@@ -2886,7 +2886,7 @@
   case 46:
 
     {
-        ES3_ONLY(">>", (yylsp[(2) - (3)]));
+        ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator");
         (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
     }
     break;
@@ -2951,7 +2951,7 @@
   case 56:
 
     {
-        ES3_ONLY("&", (yylsp[(2) - (3)]));
+        ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator");
         (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
     }
     break;
@@ -2964,7 +2964,7 @@
   case 58:
 
     {
-        ES3_ONLY("^", (yylsp[(2) - (3)]));
+        ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator");
         (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
     }
     break;
@@ -2977,7 +2977,7 @@
   case 60:
 
     {
-        ES3_ONLY("|", (yylsp[(2) - (3)]));
+        ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator");
         (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
     }
     break;
@@ -3072,7 +3072,7 @@
 
   case 74:
 
-    { ES3_ONLY("%=", (yylsp[(1) - (1)])); 
+    { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator");
                      FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)]));     (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpIModAssign; }
     break;
 
@@ -3088,31 +3088,31 @@
 
   case 77:
 
-    { ES3_ONLY("<<=", (yylsp[(1) - (1)]));
+    { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator");
                      FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)]));    (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftLeftAssign; }
     break;
 
   case 78:
 
-    { ES3_ONLY(">>=", (yylsp[(1) - (1)]));
+    { ES3_ONLY(">>=", (yylsp[(1) - (1)]), "bit-wise operator");
                      FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)]));    (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftRightAssign; }
     break;
 
   case 79:
 
-    { ES3_ONLY("&=", (yylsp[(1) - (1)]));
+    { ES3_ONLY("&=", (yylsp[(1) - (1)]), "bit-wise operator");
                      FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)]));     (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseAndAssign; }
     break;
 
   case 80:
 
-    { ES3_ONLY("^=", (yylsp[(1) - (1)]));
+    { ES3_ONLY("^=", (yylsp[(1) - (1)]), "bit-wise operator");
                      FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)]));     (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseXorAssign; }
     break;
 
   case 81:
 
-    { ES3_ONLY("|=", (yylsp[(1) - (1)]));
+    { ES3_ONLY("|=", (yylsp[(1) - (1)]), "bit-wise operator");
                      FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)]));     (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseOrAssign; }
     break;
 
@@ -3208,7 +3208,7 @@
   case 89:
 
     {
-        ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]));
+        ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
         (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.fieldList), NULL, (yylsp[(1) - (5)]), NULL, (yylsp[(1) - (5)]));
     }
     break;
@@ -3216,7 +3216,7 @@
   case 90:
 
     {
-        ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]));
+        ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
         (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (6)].interm.type), (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yyvsp[(3) - (6)].interm.fieldList), (yyvsp[(5) - (6)].lex).string, (yylsp[(5) - (6)]), NULL, (yylsp[(1) - (6)]));
     }
     break;
@@ -3224,7 +3224,7 @@
   case 91:
 
     {
-        ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]));
+        ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
         (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (9)].interm.type), (yylsp[(2) - (9)]), *(yyvsp[(2) - (9)].lex).string, (yyvsp[(3) - (9)].interm.fieldList), (yyvsp[(5) - (9)].lex).string, (yylsp[(5) - (9)]), (yyvsp[(7) - (9)].interm.intermTypedNode), (yylsp[(6) - (9)]));
     }
     break;
@@ -3484,7 +3484,7 @@
   case 113:
 
     {
-        ES3_ONLY("[]", (yylsp[(3) - (7)]));
+        ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array");
         (yyval.interm) = (yyvsp[(1) - (7)].interm);
         (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (7)].interm).intermAggregate, (yylsp[(3) - (7)]), *(yyvsp[(3) - (7)].lex).string, (yylsp[(4) - (7)]), nullptr, (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode));
     }
@@ -3493,7 +3493,7 @@
   case 114:
 
     {
-        ES3_ONLY("=", (yylsp[(7) - (8)]));
+        ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)");
         (yyval.interm) = (yyvsp[(1) - (8)].interm);
         (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (8)].interm).intermAggregate, (yylsp[(3) - (8)]), *(yyvsp[(3) - (8)].lex).string, (yylsp[(4) - (8)]), (yyvsp[(5) - (8)].interm.intermTypedNode), (yylsp[(7) - (8)]), (yyvsp[(8) - (8)].interm.intermTypedNode));
     }
@@ -3534,7 +3534,7 @@
   case 119:
 
     {
-        ES3_ONLY("[]", (yylsp[(3) - (6)]));
+        ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array");
         (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
         (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yylsp[(3) - (6)]), nullptr, (yylsp[(5) - (6)]), (yyvsp[(6) - (6)].interm.intermTypedNode));
     }
@@ -3543,7 +3543,7 @@
   case 120:
 
     {
-        ES3_ONLY("=", (yylsp[(6) - (7)]));
+        ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)");
         (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
         (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (7)]), *(yyvsp[(2) - (7)].lex).string, (yylsp[(3) - (7)]), (yyvsp[(4) - (7)].interm.intermTypedNode), (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode));
     }
@@ -3571,7 +3571,7 @@
         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
 
         if ((yyvsp[(1) - (1)].interm.type).array) {
-            ES3_ONLY("[]", (yylsp[(1) - (1)]));
+            ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array");
             if (context->getShaderVersion() != 300) {
                 (yyvsp[(1) - (1)].interm.type).clearArrayness();
             }
@@ -3696,7 +3696,7 @@
   case 137:
 
     {
-		ES3_ONLY("in", (yylsp[(1) - (1)]));
+        ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
         (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
 		(yyval.interm.type).line = (yylsp[(1) - (1)]);
     }
@@ -3705,7 +3705,7 @@
   case 138:
 
     {
-		ES3_ONLY("out", (yylsp[(1) - (1)]));
+        ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
         (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
 		(yyval.interm.type).line = (yylsp[(1) - (1)]);
     }
@@ -3714,7 +3714,7 @@
   case 139:
 
     {
-		ES3_ONLY("centroid in", (yylsp[(1) - (2)]));
+        ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
         if (context->getShaderType() == GL_VERTEX_SHADER)
         {
             context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
@@ -3728,7 +3728,7 @@
   case 140:
 
     {
-		ES3_ONLY("centroid out", (yylsp[(1) - (2)]));
+        ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
         if (context->getShaderType() == GL_FRAGMENT_SHADER)
         {
             context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
@@ -3795,7 +3795,7 @@
   case 147:
 
     {
-        ES3_ONLY("layout", (yylsp[(1) - (4)]));
+        ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
         (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
     }
     break;
@@ -3845,7 +3845,7 @@
   case 154:
 
     {
-        ES3_ONLY("[]", (yylsp[(2) - (3)]));
+        ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array");
         (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type);
         (yyval.interm.type).setArray(true, 0);
     }