Commit b8b0122f by Martin Radev Committed by Commit Bot

Add compiler support for shared memory

The patch adds handling of the 'shared' qualifier in the shader compiler. BUG=angleproject:1442 TEST=angle_unittests Change-Id: Iaa288026af0faf2a30e40495faa6ea1f5ff02323 Reviewed-on: https://chromium-review.googlesource.com/413200 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c31b7411
......@@ -504,6 +504,7 @@ enum TQualifier
EvqCentroidIn, // Implies smooth
// GLSL ES 3.1 compute shader special variables
EvqShared,
EvqComputeIn,
EvqNumWorkGroups,
EvqWorkGroupSize,
......@@ -707,6 +708,7 @@ inline const char *getQualifierString(TQualifier q)
case EvqCentroid: return "centroid";
case EvqFlat: return "flat";
case EvqSmooth: return "smooth";
case EvqShared: return "shared";
case EvqComputeIn: return "in";
case EvqNumWorkGroups: return "NumWorkGroups";
case EvqWorkGroupSize: return "WorkGroupSize";
......
......@@ -1099,6 +1099,21 @@ bool TParseContext::checkCanUseExtension(const TSourceLoc &line, const TString &
return true;
}
void TParseContext::emptyDeclarationErrorCheck(const TPublicType &publicType,
const TSourceLoc &location)
{
if (publicType.isUnsizedArray())
{
// ESSL3 spec section 4.1.9: Array declaration which leaves the size unspecified is an
// error. It is assumed that this applies to empty declarations as well.
error(location, "empty array declaration needs to specify a size", "");
}
if (publicType.qualifier == EvqShared && !publicType.layoutQualifier.isEmpty())
{
error(location, "Shared memory declarations cannot have layout specified", "layout");
}
}
// These checks are common for all declarations starting a declarator list, and declarators that
// follow an empty declaration.
void TParseContext::singleDeclarationErrorCheck(const TPublicType &publicType,
......@@ -1900,13 +1915,7 @@ TIntermDeclaration *TParseContext::parseSingleDeclaration(
if (emptyDeclaration)
{
if (publicType.isUnsizedArray())
{
// ESSL3 spec section 4.1.9: Array declaration which leaves the size unspecified is an
// error. It is assumed that this applies to empty declarations as well.
error(identifierOrTypeLocation, "empty array declaration needs to specify a size",
identifier.c_str());
}
emptyDeclarationErrorCheck(publicType, identifierOrTypeLocation);
}
else
{
......
......@@ -145,6 +145,7 @@ class TParseContext : angle::NonCopyable
bool checkCanUseExtension(const TSourceLoc &line, const TString &extension);
void singleDeclarationErrorCheck(const TPublicType &publicType,
const TSourceLoc &identifierLocation);
void emptyDeclarationErrorCheck(const TPublicType &publicType, const TSourceLoc &location);
void checkLayoutQualifierSupported(const TSourceLoc &location,
const TString &layoutQualifierName,
int versionRequired);
......
......@@ -78,6 +78,7 @@ static int ES2_keyword_ES3_reserved(TParseContext *context, int token);
static int ES2_ident_ES3_keyword(TParseContext *context, int token);
static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
static int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token);
static int uint_constant(TParseContext *context);
static int int_constant(TParseContext *context);
static int float_constant(yyscan_t yyscanner);
......@@ -131,6 +132,7 @@ O [0-7]
"in" { return IN_QUAL; }
"out" { return OUT_QUAL; }
"inout" { return INOUT_QUAL; }
"shared" { return ES2_and_ES3_ident_ES3_1_keyword(context, SHARED); }
"float" { return FLOAT_TYPE; }
"int" { return INT_TYPE; }
......@@ -516,6 +518,21 @@ int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token)
return token;
}
int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
yyscan_t yyscanner = (yyscan_t) context->getScanner();
// not a reserved word in GLSL ES 1.00 and GLSL ES 3.00, so could be used as an identifier/type name
if (context->getShaderVersion() < 310)
{
yylval->lex.string = NewPoolTString(yytext);
return check_type(yyscanner);
}
return token;
}
int uint_constant(TParseContext *context)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
......
......@@ -169,7 +169,7 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons
%token <lex> MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING
%token <lex> MATRIX2x3 MATRIX3x2 MATRIX2x4 MATRIX4x2 MATRIX3x4 MATRIX4x3
%token <lex> CENTROID FLAT SMOOTH
%token <lex> READONLY WRITEONLY COHERENT RESTRICT VOLATILE
%token <lex> READONLY WRITEONLY COHERENT RESTRICT VOLATILE SHARED
%token <lex> STRUCT VOID_TYPE WHILE
%token <lex> SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES SAMPLER2DRECT SAMPLER2DARRAY
%token <lex> ISAMPLER2D ISAMPLER3D ISAMPLERCUBE ISAMPLER2DARRAY
......@@ -959,6 +959,11 @@ storage_qualifier
| VOLATILE {
$$ = new TMemoryQualifierWrapper(EvqVolatile, @1);
}
| SHARED {
context->checkIsAtGlobalLevel(@1, "shared");
COMPUTE_ONLY("shared", @1);
$$ = new TStorageQualifierWrapper(EvqShared, @1);
}
;
type_specifier
......@@ -1006,6 +1011,9 @@ layout_qualifier_id
| IDENTIFIER EQUAL UINTCONSTANT {
$$ = context->parseLayoutQualifier(*$1.string, @1, $3.i, @3);
}
| SHARED {
$$ = context->parseLayoutQualifier("shared", @1);
}
;
type_specifier_no_prec
......
......@@ -401,8 +401,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 240
#define YY_END_OF_BUFFER 241
#define YY_NUM_RULES 241
#define YY_END_OF_BUFFER 242
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
......@@ -410,98 +410,99 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[820] =
static yyconst flex_int16_t yy_accept[824] =
{ 0,
0, 0, 0, 0, 241, 239, 238, 238, 222, 228,
233, 217, 218, 226, 225, 214, 223, 221, 227, 180,
180, 215, 211, 229, 216, 230, 234, 177, 219, 220,
232, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 212, 231, 213, 224, 237, 236, 240, 235, 208,
194, 213, 202, 197, 192, 200, 190, 201, 191, 186,
193, 185, 179, 180, 0, 183, 0, 220, 212, 219,
209, 205, 207, 206, 210, 177, 198, 204, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
12, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 15, 177, 177, 23, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 199, 203, 235, 0, 189, 185, 0, 188, 182,
0, 184, 178, 195, 196, 177, 137, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
13, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 27, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 24, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 0, 186,
0, 185, 187, 181, 177, 177, 177, 30, 177, 177,
18, 174, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 16, 140, 177, 177, 177, 177, 21, 177,
177, 144, 155, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 152, 4, 35, 36, 37,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 143, 31, 177, 177, 28, 177,
177, 177, 177, 177, 177, 177, 47, 48, 49, 29,
177, 177, 177, 177, 177, 177, 10, 53, 54, 55,
177, 138, 177, 177, 7, 177, 177, 177, 177, 164,
165, 166, 177, 32, 177, 156, 26, 167, 168, 169,
2, 161, 162, 163, 177, 177, 177, 25, 159, 177,
177, 177, 50, 51, 52, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 99, 177, 177, 177,
177, 177, 177, 177, 153, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 139, 177, 177, 176,
56, 57, 58, 177, 177, 14, 177, 104, 177, 177,
177, 177, 102, 177, 177, 177, 154, 149, 105, 177,
177, 177, 177, 177, 177, 145, 177, 177, 177, 78,
38, 41, 43, 42, 39, 45, 44, 46, 40, 177,
177, 177, 177, 160, 136, 177, 177, 147, 177, 177,
177, 34, 100, 173, 22, 148, 77, 177, 158, 17,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 19, 33, 177, 177, 177, 177,
177, 177, 106, 79, 85, 177, 177, 177, 177, 177,
3, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 141, 177, 177, 177, 177, 177, 8, 177,
177, 9, 177, 177, 177, 177, 20, 93, 11, 150,
107, 80, 87, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 146, 177, 177, 177, 91,
96, 94, 177, 177, 177, 177, 177, 177, 177, 142,
108, 81, 86, 177, 177, 157, 177, 95, 177, 177,
6, 177, 177, 177, 177, 177, 177, 177, 177, 177,
90, 151, 1, 177, 177, 177, 177, 177, 175, 177,
103, 5, 170, 59, 62, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 177, 92, 177,
177, 177, 177, 88, 177, 177, 177, 177, 177, 121,
66, 67, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 101, 177, 177, 177, 89,
123, 70, 71, 177, 177, 97, 177, 177, 177, 177,
177, 177, 177, 116, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 130, 177, 177, 177, 177, 60,
177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
177, 177, 117, 109, 177, 82, 177, 177, 177, 131,
177, 177, 68, 177, 177, 177, 177, 177, 177, 177,
177, 177, 177, 177, 177, 177, 118, 177, 177, 132,
177, 177, 72, 110, 83, 177, 112, 177, 113, 177,
177, 177, 177, 177, 98, 177, 177, 177, 177, 64,
177, 63, 127, 177, 177, 111, 84, 177, 177, 177,
177, 177, 177, 177, 177, 177, 177, 125, 128, 119,
177, 65, 177, 177, 177, 177, 177, 177, 177, 177,
126, 129, 177, 177, 122, 69, 177, 177, 171, 177,
177, 177, 74, 177, 177, 124, 73, 177, 177, 177,
177, 177, 177, 133, 177, 177, 177, 177, 177, 177,
134, 177, 177, 177, 75, 177, 135, 114, 115, 177,
177, 177, 61, 177, 177, 172, 120, 76, 0
0, 0, 0, 0, 242, 240, 239, 239, 223, 229,
234, 218, 219, 227, 226, 215, 224, 222, 228, 181,
181, 216, 212, 230, 217, 231, 235, 178, 220, 221,
233, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 213, 232, 214, 225, 238, 237, 241, 236, 209,
195, 214, 203, 198, 193, 201, 191, 202, 192, 187,
194, 186, 180, 181, 0, 184, 0, 221, 213, 220,
210, 206, 208, 207, 211, 178, 199, 205, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
12, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 15, 178, 178, 23, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 200, 204, 236, 0, 190, 186, 0, 189, 183,
0, 185, 179, 196, 197, 178, 138, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
13, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 28, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 24, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 0,
187, 0, 186, 188, 182, 178, 178, 178, 31, 178,
178, 18, 175, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 16, 141, 178, 178, 178, 178, 21,
178, 178, 145, 156, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 153, 4, 36, 37,
38, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 144, 32, 178, 178,
29, 178, 178, 178, 178, 178, 178, 178, 48, 49,
50, 30, 178, 178, 178, 178, 178, 178, 10, 54,
55, 56, 178, 139, 178, 178, 7, 178, 178, 178,
178, 165, 166, 167, 178, 33, 178, 157, 27, 168,
169, 170, 2, 162, 163, 164, 178, 178, 178, 25,
160, 178, 178, 178, 51, 52, 53, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 100, 178,
178, 178, 178, 178, 178, 178, 178, 154, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 140,
178, 178, 177, 57, 58, 59, 178, 178, 14, 178,
105, 178, 178, 178, 178, 103, 178, 178, 178, 155,
150, 106, 178, 178, 178, 178, 178, 178, 146, 178,
178, 178, 79, 39, 42, 44, 43, 40, 46, 45,
47, 41, 178, 178, 178, 178, 161, 137, 178, 178,
148, 178, 178, 178, 35, 101, 26, 174, 22, 149,
78, 178, 159, 17, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 19, 34,
178, 178, 178, 178, 178, 178, 107, 80, 86, 178,
178, 178, 178, 178, 3, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 142, 178, 178, 178,
178, 178, 8, 178, 178, 9, 178, 178, 178, 178,
20, 94, 11, 151, 108, 81, 88, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 147,
178, 178, 178, 92, 97, 95, 178, 178, 178, 178,
178, 178, 178, 143, 109, 82, 87, 178, 178, 158,
178, 96, 178, 178, 6, 178, 178, 178, 178, 178,
178, 178, 178, 178, 91, 152, 1, 178, 178, 178,
178, 178, 176, 178, 104, 5, 171, 60, 63, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 178, 93, 178, 178, 178, 178, 89, 178, 178,
178, 178, 178, 122, 67, 68, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 102,
178, 178, 178, 90, 124, 71, 72, 178, 178, 98,
178, 178, 178, 178, 178, 178, 178, 117, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 131, 178,
178, 178, 178, 61, 178, 178, 178, 178, 178, 178,
178, 178, 178, 178, 178, 178, 118, 110, 178, 83,
178, 178, 178, 132, 178, 178, 69, 178, 178, 178,
178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
119, 178, 178, 133, 178, 178, 73, 111, 84, 178,
113, 178, 114, 178, 178, 178, 178, 178, 99, 178,
178, 178, 178, 65, 178, 64, 128, 178, 178, 112,
85, 178, 178, 178, 178, 178, 178, 178, 178, 178,
178, 126, 129, 120, 178, 66, 178, 178, 178, 178,
178, 178, 178, 178, 127, 130, 178, 178, 123, 70,
178, 178, 172, 178, 178, 178, 75, 178, 178, 125,
74, 178, 178, 178, 178, 178, 178, 134, 178, 178,
178, 178, 178, 178, 135, 178, 178, 178, 76, 178,
136, 115, 116, 178, 178, 178, 62, 178, 178, 173,
121, 77, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
......@@ -548,197 +549,197 @@ static yyconst flex_int32_t yy_meta[73] =
1, 1
} ;
static yyconst flex_int16_t yy_base[825] =
static yyconst flex_int16_t yy_base[829] =
{ 0,
0, 0, 72, 0, 1016, 1017, 1017, 1017, 990, 120,
141, 1017, 1017, 989, 138, 1017, 137, 135, 988, 154,
208, 986, 1017, 154, 986, 132, 1017, 0, 1017, 1017,
139, 130, 123, 140, 147, 133, 177, 952, 186, 151,
139, 116, 161, 946, 173, 959, 193, 199, 208, 215,
108, 1017, 184, 1017, 1017, 1017, 1017, 1017, 0, 1017,
1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 230,
1017, 235, 235, 0, 271, 1017, 0, 1017, 1017, 1017,
982, 1017, 1017, 1017, 981, 0, 1017, 1017, 943, 948,
152, 945, 953, 952, 939, 942, 953, 243, 947, 935,
932, 945, 932, 929, 929, 935, 147, 248, 929, 939,
925, 931, 934, 935, 0, 927, 937, 249, 936, 931,
912, 177, 916, 929, 920, 184, 913, 250, 925, 927,
257, 916, 913, 902, 911, 249, 257, 915, 911, 913,
902, 905, 196, 217, 269, 914, 902, 914, 262, 907,
906, 1017, 1017, 0, 311, 1017, 292, 328, 1017, 1017,
335, 342, 257, 1017, 1017, 905, 0, 901, 896, 900,
909, 906, 315, 890, 890, 901, 893, 215, 903, 900,
900, 898, 895, 887, 893, 880, 878, 890, 876, 892,
0, 889, 877, 884, 881, 885, 886, 879, 876, 865,
864, 877, 880, 868, 876, 864, 870, 861, 316, 866,
869, 860, 867, 856, 860, 851, 865, 864, 855, 861,
307, 845, 848, 846, 856, 846, 841, 839, 841, 851,
837, 839, 836, 847, 846, 849, 831, 316, 839, 835,
833, 842, 821, 353, 839, 841, 830, 822, 363, 370,
378, 389, 1017, 1017, 819, 829, 828, 0, 826, 383,
0, 0, 819, 817, 817, 818, 813, 821, 810, 827,
816, 394, 0, 0, 810, 820, 819, 819, 0, 804,
397, 0, 0, 806, 400, 813, 814, 805, 799, 798,
799, 798, 798, 406, 793, 0, 0, 789, 788, 787,
789, 790, 795, 789, 785, 798, 793, 793, 791, 790,
784, 778, 780, 779, 783, 775, 778, 773, 781, 786,
774, 771, 783, 774, 0, 0, 780, 776, 0, 768,
768, 773, 764, 771, 409, 768, 0, 0, 0, 0,
758, 770, 769, 768, 769, 769, 0, 0, 0, 0,
756, 0, 764, 755, 0, 754, 755, 749, 759, 0,
0, 0, 750, 0, 746, 0, 0, 0, 0, 0,
0, 0, 0, 0, 756, 413, 755, 0, 0, 753,
749, 746, 0, 0, 0, 738, 415, 418, 427, 743,
739, 744, 735, 733, 746, 731, 0, 731, 744, 733,
729, 735, 730, 737, 0, 735, 732, 736, 720, 718,
721, 727, 733, 728, 727, 715, 0, 717, 718, 0,
0, 0, 0, 715, 718, 0, 712, 0, 725, 705,
714, 709, 0, 702, 702, 715, 0, 717, 0, 431,
730, 729, 728, 695, 694, 0, 711, 710, 705, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 694,
707, 694, 691, 0, 0, 696, 695, 0, 692, 699,
698, 0, 684, 0, 0, 0, 0, 681, 0, 0,
680, 691, 434, 684, 690, 689, 686, 681, 678, 671,
671, 684, 669, 681, 0, 0, 674, 697, 696, 695,
662, 661, 427, 428, 0, 673, 676, 674, 663, 659,
0, 671, 668, 667, 657, 656, 646, 663, 649, 441,
657, 660, 0, 677, 676, 675, 642, 641, 0, 655,
642, 0, 652, 645, 646, 649, 0, 0, 0, 0,
669, 668, 0, 645, 648, 633, 640, 631, 638, 639,
639, 638, 624, 451, 636, 0, 637, 626, 625, 0,
0, 0, 650, 649, 648, 615, 614, 610, 618, 0,
646, 645, 0, 622, 625, 0, 458, 0, 603, 612,
0, 608, 607, 616, 616, 604, 618, 602, 616, 611,
0, 0, 0, 628, 627, 626, 593, 592, 0, 592,
0, 0, 434, 454, 616, 602, 605, 588, 600, 588,
587, 596, 596, 613, 612, 611, 578, 577, 0, 577,
578, 577, 587, 0, 590, 586, 588, 584, 571, 602,
449, 0, 579, 582, 574, 566, 573, 564, 585, 573,
569, 571, 569, 569, 568, 0, 556, 555, 565, 0,
585, 462, 0, 562, 565, 0, 565, 564, 548, 540,
548, 538, 546, 0, 543, 542, 563, 551, 549, 549,
533, 536, 550, 534, 565, 545, 546, 543, 540, 550,
527, 541, 540, 524, 523, 522, 543, 531, 529, 529,
510, 509, 0, 537, 509, 535, 507, 511, 510, 541,
521, 518, 0, 517, 520, 516, 518, 502, 499, 512,
497, 498, 505, 499, 488, 487, 0, 493, 492, 523,
503, 500, 0, 0, 0, 496, 0, 495, 0, 501,
500, 484, 481, 482, 0, 474, 482, 472, 478, 499,
478, 0, 0, 490, 489, 0, 0, 488, 487, 471,
468, 469, 483, 482, 459, 458, 464, 0, 0, 485,
457, 483, 475, 467, 453, 132, 161, 177, 215, 245,
0, 0, 288, 289, 0, 0, 294, 315, 0, 316,
306, 331, 0, 363, 402, 0, 0, 395, 383, 395,
387, 433, 434, 0, 435, 420, 461, 427, 430, 431,
0, 450, 452, 443, 0, 464, 0, 0, 0, 445,
446, 440, 0, 441, 442, 0, 0, 0, 1017, 506,
509, 512, 513, 514
0, 0, 72, 0, 1020, 1021, 1021, 1021, 994, 120,
141, 1021, 1021, 993, 138, 1021, 137, 135, 992, 154,
208, 990, 1021, 154, 990, 132, 1021, 0, 1021, 1021,
139, 130, 123, 140, 147, 133, 177, 956, 186, 151,
139, 116, 161, 950, 173, 963, 193, 199, 208, 215,
108, 1021, 184, 1021, 1021, 1021, 1021, 1021, 0, 1021,
1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 230,
1021, 235, 235, 0, 271, 1021, 0, 1021, 1021, 1021,
986, 1021, 1021, 1021, 985, 0, 1021, 1021, 947, 952,
152, 949, 957, 956, 943, 946, 957, 243, 951, 939,
936, 949, 936, 933, 933, 939, 147, 248, 933, 943,
929, 935, 938, 939, 0, 931, 941, 249, 940, 935,
916, 177, 920, 933, 924, 184, 917, 250, 929, 931,
257, 920, 251, 907, 916, 260, 257, 920, 916, 918,
907, 910, 196, 217, 269, 919, 907, 919, 262, 912,
911, 1021, 1021, 0, 311, 1021, 292, 328, 1021, 1021,
335, 342, 325, 1021, 1021, 910, 0, 906, 901, 905,
914, 911, 316, 895, 895, 906, 898, 215, 908, 905,
905, 903, 900, 892, 898, 885, 883, 895, 881, 897,
0, 894, 882, 889, 886, 890, 891, 884, 881, 870,
869, 882, 885, 873, 881, 869, 875, 866, 316, 871,
874, 865, 872, 861, 865, 856, 870, 869, 860, 866,
308, 850, 853, 851, 850, 860, 850, 845, 843, 845,
855, 841, 843, 840, 851, 850, 853, 835, 318, 843,
839, 837, 846, 825, 354, 843, 845, 834, 826, 364,
378, 385, 397, 1021, 1021, 823, 833, 832, 0, 830,
372, 0, 0, 823, 821, 821, 822, 817, 825, 814,
831, 820, 390, 0, 0, 814, 824, 823, 823, 0,
808, 402, 0, 0, 810, 405, 817, 818, 809, 803,
802, 803, 802, 802, 408, 797, 0, 0, 793, 792,
791, 793, 794, 799, 793, 789, 802, 797, 797, 795,
794, 788, 782, 784, 783, 787, 792, 778, 781, 776,
784, 789, 777, 774, 786, 777, 0, 0, 783, 779,
0, 771, 771, 776, 767, 774, 414, 771, 0, 0,
0, 0, 761, 773, 772, 771, 772, 772, 0, 0,
0, 0, 759, 0, 767, 758, 0, 757, 758, 752,
762, 0, 0, 0, 753, 0, 749, 0, 0, 0,
0, 0, 0, 0, 0, 0, 759, 419, 758, 0,
0, 756, 752, 749, 0, 0, 0, 741, 421, 424,
427, 746, 742, 747, 738, 736, 749, 734, 0, 734,
747, 736, 732, 738, 733, 740, 740, 0, 737, 734,
738, 722, 720, 723, 729, 735, 730, 729, 717, 0,
719, 720, 0, 0, 0, 0, 717, 720, 0, 714,
0, 727, 707, 716, 711, 0, 704, 704, 717, 0,
719, 0, 434, 732, 731, 730, 697, 696, 0, 713,
712, 707, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 696, 709, 696, 693, 0, 0, 698, 697,
0, 694, 701, 700, 0, 686, 0, 0, 0, 0,
0, 683, 0, 0, 682, 693, 437, 686, 692, 691,
688, 683, 680, 673, 673, 686, 671, 683, 0, 0,
676, 699, 698, 697, 664, 663, 339, 430, 0, 675,
678, 676, 665, 661, 0, 673, 670, 669, 659, 658,
648, 665, 651, 443, 659, 662, 0, 679, 678, 677,
644, 643, 0, 657, 644, 0, 654, 647, 648, 651,
0, 0, 0, 0, 671, 670, 0, 647, 650, 635,
642, 633, 640, 641, 641, 640, 626, 453, 638, 0,
639, 628, 627, 0, 0, 0, 652, 651, 650, 617,
616, 612, 620, 0, 648, 647, 0, 624, 627, 0,
460, 0, 605, 614, 0, 610, 609, 618, 618, 606,
620, 604, 618, 613, 0, 0, 0, 630, 629, 628,
595, 594, 0, 594, 0, 0, 446, 457, 618, 604,
607, 590, 602, 590, 589, 598, 598, 615, 614, 613,
580, 579, 0, 579, 580, 579, 589, 0, 592, 588,
590, 586, 573, 604, 451, 0, 581, 584, 576, 568,
575, 566, 587, 575, 571, 573, 571, 571, 570, 0,
558, 557, 567, 0, 587, 463, 0, 564, 567, 0,
567, 566, 550, 542, 550, 540, 548, 0, 545, 544,
565, 553, 551, 551, 535, 538, 552, 536, 567, 547,
548, 545, 542, 552, 529, 543, 542, 526, 525, 524,
545, 533, 531, 531, 512, 511, 0, 539, 511, 537,
509, 513, 512, 543, 523, 520, 0, 519, 522, 518,
520, 504, 501, 514, 499, 500, 507, 501, 490, 489,
0, 495, 494, 525, 505, 502, 0, 0, 0, 498,
0, 497, 0, 503, 502, 486, 483, 484, 0, 476,
484, 474, 480, 501, 480, 0, 0, 492, 491, 0,
0, 490, 489, 473, 470, 471, 485, 484, 461, 460,
466, 0, 0, 487, 459, 485, 477, 128, 151, 196,
227, 227, 269, 277, 0, 0, 291, 321, 0, 0,
329, 334, 0, 335, 343, 384, 0, 376, 420, 0,
0, 412, 404, 407, 413, 436, 442, 0, 445, 431,
465, 432, 436, 437, 0, 455, 456, 447, 0, 468,
0, 0, 0, 449, 450, 444, 0, 445, 446, 0,
0, 0, 1021, 510, 513, 516, 517, 518
} ;
static yyconst flex_int16_t yy_def[825] =
static yyconst flex_int16_t yy_def[829] =
{ 0,
819, 1, 819, 3, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 820, 819, 819,
819, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 819, 819, 819, 819, 819, 819, 819, 821, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 822,
819, 823, 20, 21, 819, 819, 824, 819, 819, 819,
819, 819, 819, 819, 819, 820, 819, 819, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 819, 819, 821, 819, 819, 823, 819, 819, 819,
819, 819, 824, 819, 819, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 819, 819,
819, 819, 819, 819, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 820, 820, 0, 819,
819, 819, 819, 819
823, 1, 823, 3, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 824, 823, 823,
823, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 823, 823, 823, 823, 823, 823, 823, 825, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 826,
823, 827, 20, 21, 823, 823, 828, 823, 823, 823,
823, 823, 823, 823, 823, 824, 823, 823, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 823, 823, 825, 823, 823, 827, 823, 823, 823,
823, 823, 828, 823, 823, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 823,
823, 823, 823, 823, 823, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
824, 824, 0, 823, 823, 823, 823, 823
} ;
static yyconst flex_int16_t yy_nxt[1090] =
static yyconst flex_int16_t yy_nxt[1094] =
{ 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 21, 21, 21, 21,
......@@ -758,110 +759,112 @@ static yyconst flex_int16_t yy_nxt[1090] =
56, 56, 56, 56, 61, 62, 63, 66, 68, 70,
70, 70, 70, 70, 70, 70, 84, 85, 79, 150,
123, 69, 67, 87, 124, 64, 72, 151, 73, 73,
73, 73, 73, 73, 74, 80, 89, 81, 82, 784,
73, 73, 73, 73, 74, 80, 89, 81, 82, 786,
92, 88, 93, 121, 95, 75, 94, 103, 96, 104,
90, 91, 76, 77, 97, 99, 122, 98, 105, 100,
115, 187, 75, 116, 101, 125, 117, 118, 152, 168,
102, 119, 188, 169, 120, 785, 76, 128, 126, 77,
102, 119, 188, 169, 120, 787, 76, 128, 126, 77,
72, 106, 74, 74, 74, 74, 74, 74, 74, 107,
112, 108, 129, 207, 109, 130, 212, 132, 113, 75,
110, 208, 213, 786, 133, 134, 76, 139, 135, 114,
140, 236, 237, 153, 136, 137, 75, 138, 141, 147,
143, 155, 156, 148, 144, 142, 158, 159, 145, 238,
76, 146, 149, 160, 819, 267, 268, 239, 155, 156,
161, 787, 161, 158, 159, 162, 162, 162, 162, 162,
162, 162, 189, 227, 176, 254, 215, 160, 177, 178,
819, 220, 229, 199, 788, 190, 200, 201, 228, 216,
202, 217, 203, 240, 245, 230, 246, 221, 222, 254,
249, 241, 249, 158, 159, 250, 250, 250, 250, 250,
250, 250, 298, 299, 300, 789, 790, 251, 791, 251,
158, 159, 252, 252, 252, 252, 252, 252, 252, 162,
110, 208, 213, 788, 133, 134, 76, 139, 135, 114,
140, 237, 238, 153, 136, 137, 75, 138, 141, 147,
143, 155, 156, 148, 144, 142, 158, 159, 145, 239,
76, 146, 149, 160, 823, 268, 269, 240, 155, 156,
161, 789, 161, 158, 159, 162, 162, 162, 162, 162,
162, 162, 189, 790, 176, 224, 215, 160, 177, 178,
823, 220, 230, 199, 228, 190, 200, 201, 225, 216,
202, 217, 203, 241, 246, 231, 247, 221, 222, 229,
250, 242, 250, 158, 159, 251, 251, 251, 251, 251,
251, 251, 299, 300, 301, 791, 792, 252, 793, 252,
158, 159, 253, 253, 253, 253, 253, 253, 253, 162,
162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
162, 162, 162, 261, 312, 330, 792, 793, 313, 337,
338, 339, 794, 331, 253, 795, 262, 250, 250, 250,
250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
250, 253, 252, 252, 252, 252, 252, 252, 252, 348,
349, 350, 156, 252, 252, 252, 252, 252, 252, 252,
360, 361, 362, 368, 369, 370, 372, 373, 374, 156,
796, 159, 383, 384, 385, 421, 422, 423, 441, 442,
443, 451, 452, 453, 454, 455, 456, 797, 159, 798,
799, 444, 445, 457, 458, 459, 498, 499, 500, 524,
525, 526, 800, 801, 546, 548, 563, 564, 565, 501,
502, 636, 527, 528, 547, 549, 594, 595, 596, 566,
567, 637, 568, 614, 615, 616, 666, 802, 803, 597,
598, 638, 804, 667, 805, 668, 617, 618, 639, 686,
640, 641, 806, 807, 808, 809, 687, 810, 688, 811,
812, 813, 814, 815, 816, 817, 818, 86, 86, 86,
154, 154, 154, 70, 157, 163, 163, 783, 782, 781,
780, 779, 778, 777, 776, 775, 774, 773, 772, 771,
770, 769, 768, 767, 766, 765, 764, 763, 762, 761,
760, 759, 758, 757, 756, 755, 754, 753, 752, 751,
750, 749, 748, 747, 746, 745, 744, 743, 742, 741,
740, 739, 738, 737, 736, 735, 734, 733, 732, 731,
730, 729, 728, 727, 726, 725, 724, 723, 722, 721,
720, 719, 718, 717, 716, 715, 714, 713, 712, 711,
710, 709, 708, 707, 706, 705, 704, 703, 702, 701,
700, 699, 698, 697, 696, 695, 694, 693, 692, 691,
690, 689, 685, 684, 683, 682, 681, 680, 679, 678,
677, 676, 675, 674, 673, 672, 671, 670, 669, 665,
664, 663, 662, 661, 660, 659, 658, 657, 656, 655,
654, 653, 652, 651, 650, 649, 648, 647, 646, 645,
644, 643, 642, 635, 634, 633, 632, 631, 630, 629,
628, 627, 626, 625, 624, 623, 622, 621, 620, 619,
613, 612, 611, 610, 609, 608, 607, 606, 605, 604,
603, 602, 601, 600, 599, 593, 592, 591, 590, 589,
588, 587, 586, 585, 584, 583, 582, 581, 580, 579,
578, 577, 576, 575, 574, 573, 572, 571, 570, 569,
562, 561, 560, 559, 558, 557, 556, 555, 554, 553,
552, 551, 550, 545, 544, 543, 542, 541, 540, 539,
538, 537, 536, 535, 534, 533, 532, 531, 530, 529,
523, 522, 521, 520, 519, 518, 517, 516, 515, 514,
513, 512, 511, 510, 509, 508, 507, 506, 505, 504,
503, 497, 496, 495, 494, 493, 492, 491, 490, 489,
488, 487, 486, 485, 484, 483, 482, 481, 480, 479,
478, 477, 476, 475, 474, 473, 472, 471, 470, 469,
468, 467, 466, 465, 464, 463, 462, 461, 460, 450,
449, 448, 447, 446, 440, 439, 438, 437, 436, 435,
434, 433, 432, 431, 430, 429, 428, 427, 426, 425,
424, 420, 419, 418, 417, 416, 415, 414, 413, 412,
411, 410, 409, 408, 407, 406, 405, 404, 403, 402,
401, 400, 399, 398, 397, 396, 395, 394, 393, 392,
391, 390, 389, 388, 387, 386, 382, 381, 380, 379,
378, 377, 376, 375, 371, 367, 366, 365, 364, 363,
359, 358, 357, 356, 355, 354, 353, 352, 351, 347,
346, 345, 344, 343, 342, 341, 340, 336, 335, 334,
333, 332, 329, 328, 327, 326, 325, 324, 323, 322,
321, 320, 319, 318, 317, 316, 315, 314, 311, 310,
309, 308, 307, 306, 305, 304, 303, 302, 301, 297,
296, 295, 294, 293, 292, 291, 290, 289, 288, 287,
286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
276, 275, 274, 273, 272, 271, 270, 269, 266, 265,
264, 263, 260, 259, 258, 257, 256, 255, 248, 247,
244, 243, 242, 235, 234, 233, 232, 231, 226, 225,
224, 223, 219, 218, 214, 211, 210, 209, 206, 205,
204, 198, 197, 196, 195, 194, 193, 192, 191, 186,
185, 184, 183, 182, 181, 180, 179, 175, 174, 173,
172, 171, 170, 167, 166, 165, 164, 131, 127, 111,
83, 78, 71, 65, 60, 819, 5, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819
162, 162, 162, 255, 262, 313, 550, 332, 794, 314,
339, 340, 341, 795, 254, 333, 551, 263, 251, 251,
251, 251, 251, 251, 251, 796, 797, 255, 350, 351,
352, 254, 251, 251, 251, 251, 251, 251, 251, 253,
253, 253, 253, 253, 253, 253, 362, 363, 364, 798,
156, 253, 253, 253, 253, 253, 253, 253, 370, 371,
372, 374, 375, 376, 385, 386, 387, 156, 799, 159,
424, 425, 426, 800, 444, 445, 446, 454, 455, 456,
457, 458, 459, 460, 461, 462, 159, 447, 448, 502,
503, 504, 528, 529, 530, 801, 802, 552, 567, 568,
569, 803, 505, 506, 804, 531, 532, 553, 598, 599,
600, 570, 571, 640, 572, 618, 619, 620, 670, 805,
806, 601, 602, 641, 642, 671, 807, 672, 621, 622,
690, 643, 808, 644, 645, 809, 810, 691, 811, 692,
812, 813, 814, 815, 816, 817, 818, 819, 820, 821,
822, 86, 86, 86, 154, 154, 154, 70, 157, 163,
163, 785, 784, 783, 782, 781, 780, 779, 778, 777,
776, 775, 774, 773, 772, 771, 770, 769, 768, 767,
766, 765, 764, 763, 762, 761, 760, 759, 758, 757,
756, 755, 754, 753, 752, 751, 750, 749, 748, 747,
746, 745, 744, 743, 742, 741, 740, 739, 738, 737,
736, 735, 734, 733, 732, 731, 730, 729, 728, 727,
726, 725, 724, 723, 722, 721, 720, 719, 718, 717,
716, 715, 714, 713, 712, 711, 710, 709, 708, 707,
706, 705, 704, 703, 702, 701, 700, 699, 698, 697,
696, 695, 694, 693, 689, 688, 687, 686, 685, 684,
683, 682, 681, 680, 679, 678, 677, 676, 675, 674,
673, 669, 668, 667, 666, 665, 664, 663, 662, 661,
660, 659, 658, 657, 656, 655, 654, 653, 652, 651,
650, 649, 648, 647, 646, 639, 638, 637, 636, 635,
634, 633, 632, 631, 630, 629, 628, 627, 626, 625,
624, 623, 617, 616, 615, 614, 613, 612, 611, 610,
609, 608, 607, 606, 605, 604, 603, 597, 596, 595,
594, 593, 592, 591, 590, 589, 588, 587, 586, 585,
584, 583, 582, 581, 580, 579, 578, 577, 576, 575,
574, 573, 566, 565, 564, 563, 562, 561, 560, 559,
558, 557, 556, 555, 554, 549, 548, 547, 546, 545,
544, 543, 542, 541, 540, 539, 538, 537, 536, 535,
534, 533, 527, 526, 525, 524, 523, 522, 521, 520,
519, 518, 517, 516, 515, 514, 513, 512, 511, 510,
509, 508, 507, 501, 500, 499, 498, 497, 496, 495,
494, 493, 492, 491, 490, 489, 488, 487, 486, 485,
484, 483, 482, 481, 480, 479, 478, 477, 476, 475,
474, 473, 472, 471, 470, 469, 468, 467, 466, 465,
464, 463, 453, 452, 451, 450, 449, 443, 442, 441,
440, 439, 438, 437, 436, 435, 434, 433, 432, 431,
430, 429, 428, 427, 423, 422, 421, 420, 419, 418,
417, 416, 415, 414, 413, 412, 411, 410, 409, 408,
407, 406, 405, 404, 403, 402, 401, 400, 399, 398,
397, 396, 395, 394, 393, 392, 391, 390, 389, 388,
384, 383, 382, 381, 380, 379, 378, 377, 373, 369,
368, 367, 366, 365, 361, 360, 359, 358, 357, 356,
355, 354, 353, 349, 348, 347, 346, 345, 344, 343,
342, 338, 337, 336, 335, 334, 331, 330, 329, 328,
327, 326, 325, 324, 323, 322, 321, 320, 319, 318,
317, 316, 315, 312, 311, 310, 309, 308, 307, 306,
305, 304, 303, 302, 298, 297, 296, 295, 294, 293,
292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
272, 271, 270, 267, 266, 265, 264, 261, 260, 259,
258, 257, 256, 249, 248, 245, 244, 243, 236, 235,
234, 233, 232, 227, 226, 223, 219, 218, 214, 211,
210, 209, 206, 205, 204, 198, 197, 196, 195, 194,
193, 192, 191, 186, 185, 184, 183, 182, 181, 180,
179, 175, 174, 173, 172, 171, 170, 167, 166, 165,
164, 131, 127, 111, 83, 78, 71, 65, 60, 823,
5, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823
} ;
static yyconst flex_int16_t yy_chk[1090] =
static yyconst flex_int16_t yy_chk[1094] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
......@@ -881,111 +884,113 @@ static yyconst flex_int16_t yy_chk[1090] =
3, 3, 3, 3, 10, 10, 11, 15, 17, 18,
18, 18, 18, 18, 18, 18, 26, 26, 24, 51,
42, 17, 15, 31, 42, 11, 20, 51, 20, 20,
20, 20, 20, 20, 20, 24, 32, 24, 24, 766,
20, 20, 20, 20, 20, 24, 32, 24, 24, 768,
33, 31, 33, 41, 34, 20, 33, 36, 34, 36,
32, 32, 20, 20, 34, 35, 41, 34, 36, 35,
40, 107, 20, 40, 35, 43, 40, 40, 53, 91,
35, 40, 107, 91, 40, 767, 20, 45, 43, 20,
35, 40, 107, 91, 40, 769, 20, 45, 43, 20,
21, 37, 21, 21, 21, 21, 21, 21, 21, 37,
39, 37, 45, 122, 37, 45, 126, 47, 39, 21,
37, 122, 126, 768, 47, 47, 21, 48, 47, 39,
37, 122, 126, 770, 47, 47, 21, 48, 47, 39,
48, 143, 143, 53, 47, 47, 21, 47, 48, 50,
49, 70, 70, 50, 49, 48, 72, 72, 49, 144,
21, 49, 50, 73, 73, 178, 178, 144, 70, 70,
75, 769, 75, 72, 72, 75, 75, 75, 75, 75,
75, 75, 108, 136, 98, 163, 128, 73, 98, 98,
75, 771, 75, 72, 72, 75, 75, 75, 75, 75,
75, 75, 108, 772, 98, 133, 128, 73, 98, 98,
73, 131, 137, 118, 770, 108, 118, 118, 136, 128,
118, 128, 118, 145, 149, 137, 149, 131, 131, 163,
73, 131, 137, 118, 136, 108, 118, 118, 133, 128,
118, 128, 118, 145, 149, 137, 149, 131, 131, 136,
155, 145, 155, 157, 157, 155, 155, 155, 155, 155,
155, 155, 209, 209, 209, 773, 774, 158, 777, 158,
157, 157, 158, 158, 158, 158, 158, 158, 158, 161,
161, 161, 161, 161, 161, 161, 162, 162, 162, 162,
162, 162, 162, 173, 221, 238, 778, 780, 221, 244,
244, 244, 781, 238, 162, 782, 173, 249, 249, 249,
249, 249, 249, 249, 250, 250, 250, 250, 250, 250,
250, 162, 251, 251, 251, 251, 251, 251, 251, 260,
260, 260, 250, 252, 252, 252, 252, 252, 252, 252,
272, 272, 272, 281, 281, 281, 285, 285, 285, 250,
784, 252, 294, 294, 294, 335, 335, 335, 376, 376,
376, 387, 387, 387, 388, 388, 388, 785, 252, 788,
789, 376, 376, 389, 389, 389, 440, 440, 440, 483,
483, 483, 790, 791, 503, 504, 520, 520, 520, 440,
440, 603, 483, 483, 503, 504, 554, 554, 554, 520,
520, 603, 520, 577, 577, 577, 631, 792, 793, 554,
554, 604, 795, 631, 796, 631, 577, 577, 604, 652,
604, 604, 797, 798, 799, 800, 652, 802, 652, 803,
804, 806, 810, 811, 812, 814, 815, 820, 820, 820,
821, 821, 821, 822, 823, 824, 824, 765, 764, 763,
762, 761, 760, 757, 756, 755, 754, 753, 752, 751,
750, 749, 748, 745, 744, 741, 740, 739, 738, 737,
736, 734, 733, 732, 731, 730, 728, 726, 722, 721,
720, 719, 718, 716, 715, 714, 713, 712, 711, 710,
709, 708, 707, 706, 705, 704, 702, 701, 700, 699,
698, 697, 696, 695, 694, 692, 691, 690, 689, 688,
687, 686, 685, 684, 683, 682, 681, 680, 679, 678,
677, 676, 675, 674, 673, 672, 671, 670, 669, 668,
667, 666, 665, 663, 662, 661, 660, 659, 658, 657,
655, 654, 651, 649, 648, 647, 645, 644, 643, 642,
641, 640, 639, 638, 637, 636, 635, 634, 633, 630,
629, 628, 627, 626, 625, 623, 622, 621, 620, 618,
617, 616, 615, 614, 613, 612, 611, 610, 609, 608,
607, 606, 605, 600, 598, 597, 596, 595, 594, 590,
589, 588, 587, 586, 585, 584, 583, 582, 580, 579,
575, 574, 572, 571, 569, 568, 567, 566, 565, 564,
563, 559, 558, 557, 555, 553, 552, 551, 550, 549,
548, 547, 546, 545, 544, 542, 541, 536, 535, 534,
533, 531, 530, 528, 527, 526, 525, 524, 522, 521,
519, 518, 517, 516, 515, 514, 513, 512, 510, 509,
508, 507, 506, 502, 501, 500, 499, 498, 497, 494,
493, 492, 491, 490, 489, 488, 487, 486, 485, 484,
482, 481, 478, 473, 471, 470, 469, 467, 466, 463,
462, 461, 460, 449, 448, 447, 445, 444, 443, 442,
441, 438, 436, 435, 434, 432, 431, 430, 429, 427,
425, 424, 419, 418, 416, 415, 414, 413, 412, 411,
410, 409, 408, 407, 406, 404, 403, 402, 401, 400,
399, 398, 396, 395, 394, 393, 392, 391, 390, 386,
382, 381, 380, 377, 375, 365, 363, 359, 358, 357,
356, 354, 353, 351, 346, 345, 344, 343, 342, 341,
336, 334, 333, 332, 331, 330, 328, 327, 324, 323,
322, 321, 320, 319, 318, 317, 316, 315, 314, 313,
312, 311, 310, 309, 308, 307, 306, 305, 304, 303,
302, 301, 300, 299, 298, 295, 293, 292, 291, 290,
289, 288, 287, 286, 284, 280, 278, 277, 276, 275,
271, 270, 269, 268, 267, 266, 265, 264, 263, 259,
257, 256, 255, 248, 247, 246, 245, 243, 242, 241,
240, 239, 237, 236, 235, 234, 233, 232, 231, 230,
229, 228, 227, 226, 225, 224, 223, 222, 220, 219,
218, 217, 216, 215, 214, 213, 212, 211, 210, 208,
207, 206, 205, 204, 203, 202, 201, 200, 199, 198,
197, 196, 195, 194, 193, 192, 190, 189, 188, 187,
186, 185, 184, 183, 182, 181, 180, 179, 177, 176,
175, 174, 172, 171, 170, 169, 168, 166, 151, 150,
148, 147, 146, 142, 141, 140, 139, 138, 135, 134,
133, 132, 130, 129, 127, 125, 124, 123, 121, 120,
119, 117, 116, 114, 113, 112, 111, 110, 109, 106,
105, 104, 103, 102, 101, 100, 99, 97, 96, 95,
94, 93, 92, 90, 89, 85, 81, 46, 44, 38,
25, 22, 19, 14, 9, 5, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819, 819,
819, 819, 819, 819, 819, 819, 819, 819, 819
162, 162, 162, 163, 173, 221, 507, 239, 778, 221,
245, 245, 245, 781, 162, 239, 507, 173, 250, 250,
250, 250, 250, 250, 250, 782, 784, 163, 261, 261,
261, 162, 251, 251, 251, 251, 251, 251, 251, 252,
252, 252, 252, 252, 252, 252, 273, 273, 273, 785,
251, 253, 253, 253, 253, 253, 253, 253, 282, 282,
282, 286, 286, 286, 295, 295, 295, 251, 786, 253,
337, 337, 337, 788, 378, 378, 378, 389, 389, 389,
390, 390, 390, 391, 391, 391, 253, 378, 378, 443,
443, 443, 487, 487, 487, 789, 792, 508, 524, 524,
524, 793, 443, 443, 794, 487, 487, 508, 558, 558,
558, 524, 524, 607, 524, 581, 581, 581, 635, 795,
796, 558, 558, 607, 608, 635, 797, 635, 581, 581,
656, 608, 799, 608, 608, 800, 801, 656, 802, 656,
803, 804, 806, 807, 808, 810, 814, 815, 816, 818,
819, 824, 824, 824, 825, 825, 825, 826, 827, 828,
828, 767, 766, 765, 764, 761, 760, 759, 758, 757,
756, 755, 754, 753, 752, 749, 748, 745, 744, 743,
742, 741, 740, 738, 737, 736, 735, 734, 732, 730,
726, 725, 724, 723, 722, 720, 719, 718, 717, 716,
715, 714, 713, 712, 711, 710, 709, 708, 706, 705,
704, 703, 702, 701, 700, 699, 698, 696, 695, 694,
693, 692, 691, 690, 689, 688, 687, 686, 685, 684,
683, 682, 681, 680, 679, 678, 677, 676, 675, 674,
673, 672, 671, 670, 669, 667, 666, 665, 664, 663,
662, 661, 659, 658, 655, 653, 652, 651, 649, 648,
647, 646, 645, 644, 643, 642, 641, 640, 639, 638,
637, 634, 633, 632, 631, 630, 629, 627, 626, 625,
624, 622, 621, 620, 619, 618, 617, 616, 615, 614,
613, 612, 611, 610, 609, 604, 602, 601, 600, 599,
598, 594, 593, 592, 591, 590, 589, 588, 587, 586,
584, 583, 579, 578, 576, 575, 573, 572, 571, 570,
569, 568, 567, 563, 562, 561, 559, 557, 556, 555,
554, 553, 552, 551, 550, 549, 548, 546, 545, 540,
539, 538, 537, 535, 534, 532, 531, 530, 529, 528,
526, 525, 523, 522, 521, 520, 519, 518, 517, 516,
514, 513, 512, 511, 510, 506, 505, 504, 503, 502,
501, 498, 497, 496, 495, 494, 493, 492, 491, 490,
489, 488, 486, 485, 482, 476, 474, 473, 472, 470,
469, 466, 465, 464, 463, 452, 451, 450, 448, 447,
446, 445, 444, 441, 439, 438, 437, 435, 434, 433,
432, 430, 428, 427, 422, 421, 419, 418, 417, 416,
415, 414, 413, 412, 411, 410, 409, 407, 406, 405,
404, 403, 402, 401, 400, 398, 397, 396, 395, 394,
393, 392, 388, 384, 383, 382, 379, 377, 367, 365,
361, 360, 359, 358, 356, 355, 353, 348, 347, 346,
345, 344, 343, 338, 336, 335, 334, 333, 332, 330,
329, 326, 325, 324, 323, 322, 321, 320, 319, 318,
317, 316, 315, 314, 313, 312, 311, 310, 309, 308,
307, 306, 305, 304, 303, 302, 301, 300, 299, 296,
294, 293, 292, 291, 290, 289, 288, 287, 285, 281,
279, 278, 277, 276, 272, 271, 270, 269, 268, 267,
266, 265, 264, 260, 258, 257, 256, 249, 248, 247,
246, 244, 243, 242, 241, 240, 238, 237, 236, 235,
234, 233, 232, 231, 230, 229, 228, 227, 226, 225,
224, 223, 222, 220, 219, 218, 217, 216, 215, 214,
213, 212, 211, 210, 208, 207, 206, 205, 204, 203,
202, 201, 200, 199, 198, 197, 196, 195, 194, 193,
192, 190, 189, 188, 187, 186, 185, 184, 183, 182,
181, 180, 179, 177, 176, 175, 174, 172, 171, 170,
169, 168, 166, 151, 150, 148, 147, 146, 142, 141,
140, 139, 138, 135, 134, 132, 130, 129, 127, 125,
124, 123, 121, 120, 119, 117, 116, 114, 113, 112,
111, 110, 109, 106, 105, 104, 103, 102, 101, 100,
99, 97, 96, 95, 94, 93, 92, 90, 89, 85,
81, 46, 44, 38, 25, 22, 19, 14, 9, 5,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823, 823, 823, 823, 823, 823, 823, 823,
823, 823, 823
} ;
/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[241] =
static yyconst flex_int32_t yy_rule_can_match_eol[242] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
......@@ -998,8 +1003,8 @@ static yyconst flex_int32_t yy_rule_can_match_eol[241] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, };
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
......@@ -1060,6 +1065,7 @@ static int ES2_keyword_ES3_reserved(TParseContext *context, int token);
static int ES2_ident_ES3_keyword(TParseContext *context, int token);
static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
static int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token);
static int uint_constant(TParseContext *context);
static int int_constant(TParseContext *context);
static int float_constant(yyscan_t yyscanner);
......@@ -1356,13 +1362,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 820 )
if ( yy_current_state >= 824 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 819 );
while ( yy_current_state != 823 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
......@@ -1496,286 +1502,289 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
{ return FLOAT_TYPE; }
{ return ES2_and_ES3_ident_ES3_1_keyword(context, SHARED); }
YY_BREAK
case 27:
YY_RULE_SETUP
{ return INT_TYPE; }
{ return FLOAT_TYPE; }
YY_BREAK
case 28:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UINT_TYPE); }
{ return INT_TYPE; }
YY_BREAK
case 29:
YY_RULE_SETUP
{ return VOID_TYPE; }
{ return ES2_ident_ES3_keyword(context, UINT_TYPE); }
YY_BREAK
case 30:
YY_RULE_SETUP
{ return BOOL_TYPE; }
{ return VOID_TYPE; }
YY_BREAK
case 31:
YY_RULE_SETUP
{ yylval->lex.b = true; return BOOLCONSTANT; }
{ return BOOL_TYPE; }
YY_BREAK
case 32:
YY_RULE_SETUP
{ yylval->lex.b = false; return BOOLCONSTANT; }
{ yylval->lex.b = true; return BOOLCONSTANT; }
YY_BREAK
case 33:
YY_RULE_SETUP
{ return DISCARD; }
{ yylval->lex.b = false; return BOOLCONSTANT; }
YY_BREAK
case 34:
YY_RULE_SETUP
{ return RETURN; }
{ return DISCARD; }
YY_BREAK
case 35:
YY_RULE_SETUP
{ return MATRIX2; }
{ return RETURN; }
YY_BREAK
case 36:
YY_RULE_SETUP
{ return MATRIX3; }
{ return MATRIX2; }
YY_BREAK
case 37:
YY_RULE_SETUP
{ return MATRIX4; }
{ return MATRIX3; }
YY_BREAK
case 38:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX2); }
{ return MATRIX4; }
YY_BREAK
case 39:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX3); }
{ return ES2_ident_ES3_keyword(context, MATRIX2); }
YY_BREAK
case 40:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX4); }
{ return ES2_ident_ES3_keyword(context, MATRIX3); }
YY_BREAK
case 41:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX2x3); }
{ return ES2_ident_ES3_keyword(context, MATRIX4); }
YY_BREAK
case 42:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX3x2); }
{ return ES2_ident_ES3_keyword(context, MATRIX2x3); }
YY_BREAK
case 43:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX2x4); }
{ return ES2_ident_ES3_keyword(context, MATRIX3x2); }
YY_BREAK
case 44:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX4x2); }
{ return ES2_ident_ES3_keyword(context, MATRIX2x4); }
YY_BREAK
case 45:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX3x4); }
{ return ES2_ident_ES3_keyword(context, MATRIX4x2); }
YY_BREAK
case 46:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, MATRIX4x3); }
{ return ES2_ident_ES3_keyword(context, MATRIX3x4); }
YY_BREAK
case 47:
YY_RULE_SETUP
{ return VEC2; }
{ return ES2_ident_ES3_keyword(context, MATRIX4x3); }
YY_BREAK
case 48:
YY_RULE_SETUP
{ return VEC3; }
{ return VEC2; }
YY_BREAK
case 49:
YY_RULE_SETUP
{ return VEC4; }
{ return VEC3; }
YY_BREAK
case 50:
YY_RULE_SETUP
{ return IVEC2; }
{ return VEC4; }
YY_BREAK
case 51:
YY_RULE_SETUP
{ return IVEC3; }
{ return IVEC2; }
YY_BREAK
case 52:
YY_RULE_SETUP
{ return IVEC4; }
{ return IVEC3; }
YY_BREAK
case 53:
YY_RULE_SETUP
{ return BVEC2; }
{ return IVEC4; }
YY_BREAK
case 54:
YY_RULE_SETUP
{ return BVEC3; }
{ return BVEC2; }
YY_BREAK
case 55:
YY_RULE_SETUP
{ return BVEC4; }
{ return BVEC3; }
YY_BREAK
case 56:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UVEC2); }
{ return BVEC4; }
YY_BREAK
case 57:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UVEC3); }
{ return ES2_ident_ES3_keyword(context, UVEC2); }
YY_BREAK
case 58:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, UVEC4); }
{ return ES2_ident_ES3_keyword(context, UVEC3); }
YY_BREAK
case 59:
YY_RULE_SETUP
{ return SAMPLER2D; }
{ return ES2_ident_ES3_keyword(context, UVEC4); }
YY_BREAK
case 60:
YY_RULE_SETUP
{ return SAMPLERCUBE; }
{ return SAMPLER2D; }
YY_BREAK
case 61:
YY_RULE_SETUP
{ return SAMPLER_EXTERNAL_OES; }
{ return SAMPLERCUBE; }
YY_BREAK
case 62:
YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER3D); }
{ return SAMPLER_EXTERNAL_OES; }
YY_BREAK
case 63:
YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER3DRECT); }
{ return ES2_reserved_ES3_keyword(context, SAMPLER3D); }
YY_BREAK
case 64:
YY_RULE_SETUP
{ return SAMPLER2DRECT; }
{ return ES2_reserved_ES3_keyword(context, SAMPLER3DRECT); }
YY_BREAK
case 65:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, SAMPLER2DARRAY); }
{ return SAMPLER2DRECT; }
YY_BREAK
case 66:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, ISAMPLER2D); }
{ return ES2_ident_ES3_keyword(context, SAMPLER2DARRAY); }
YY_BREAK
case 67:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, ISAMPLER3D); }
{ return ES2_ident_ES3_keyword(context, ISAMPLER2D); }
YY_BREAK
case 68:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, ISAMPLERCUBE); }
{ return ES2_ident_ES3_keyword(context, ISAMPLER3D); }
YY_BREAK
case 69:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, ISAMPLER2DARRAY); }
{ return ES2_ident_ES3_keyword(context, ISAMPLERCUBE); }
YY_BREAK
case 70:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, USAMPLER2D); }
{ return ES2_ident_ES3_keyword(context, ISAMPLER2DARRAY); }
YY_BREAK
case 71:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, USAMPLER3D); }
{ return ES2_ident_ES3_keyword(context, USAMPLER2D); }
YY_BREAK
case 72:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, USAMPLERCUBE); }
{ return ES2_ident_ES3_keyword(context, USAMPLER3D); }
YY_BREAK
case 73:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, USAMPLER2DARRAY); }
{ return ES2_ident_ES3_keyword(context, USAMPLERCUBE); }
YY_BREAK
case 74:
YY_RULE_SETUP
{ return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
{ return ES2_ident_ES3_keyword(context, USAMPLER2DARRAY); }
YY_BREAK
case 75:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, SAMPLERCUBESHADOW); }
{ return ES2_reserved_ES3_keyword(context, SAMPLER2DSHADOW); }
YY_BREAK
case 76:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, SAMPLER2DARRAYSHADOW); }
{ return ES2_ident_ES3_keyword(context, SAMPLERCUBESHADOW); }
YY_BREAK
case 77:
YY_RULE_SETUP
{ return STRUCT; }
{ return ES2_ident_ES3_keyword(context, SAMPLER2DARRAYSHADOW); }
YY_BREAK
case 78:
YY_RULE_SETUP
{ return ES2_ident_ES3_keyword(context, LAYOUT); }
{ return STRUCT; }
YY_BREAK
case 79:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2D); }
{ return ES2_ident_ES3_keyword(context, LAYOUT); }
YY_BREAK
case 80:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2D); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2D); }
YY_BREAK
case 81:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2D); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2D); }
YY_BREAK
case 82:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2DARRAY); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2D); }
YY_BREAK
case 83:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2DARRAY); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2DARRAY); }
YY_BREAK
case 84:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2DARRAY); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2DARRAY); }
YY_BREAK
case 85:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE3D); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2DARRAY); }
YY_BREAK
case 86:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE3D); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE3D); }
YY_BREAK
case 87:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE3D); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE3D); }
YY_BREAK
case 88:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGECUBE); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE3D); }
YY_BREAK
case 89:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGECUBE); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGECUBE); }
YY_BREAK
case 90:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGECUBE); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGECUBE); }
YY_BREAK
case 91:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, READONLY); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGECUBE); }
YY_BREAK
case 92:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, WRITEONLY); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, READONLY); }
YY_BREAK
case 93:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, COHERENT); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, WRITEONLY); }
YY_BREAK
case 94:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, RESTRICT); }
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, COHERENT); }
YY_BREAK
case 95:
YY_RULE_SETUP
{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, RESTRICT); }
YY_BREAK
case 96:
YY_RULE_SETUP
{ return ES2_and_ES3_reserved_ES3_1_keyword(context, VOLATILE); }
YY_BREAK
/* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */
case 96:
case 97:
case 98:
case 99:
......@@ -1815,6 +1824,7 @@ case 132:
case 133:
case 134:
case 135:
case 136:
YY_RULE_SETUP
{
if (context->getShaderVersion() < 300) {
......@@ -1825,7 +1835,7 @@ YY_RULE_SETUP
}
YY_BREAK
/* Reserved keywords in GLSL ES 1.00 that are not reserved in GLSL ES 3.00 */
case 136:
case 137:
YY_RULE_SETUP
{
if (context->getShaderVersion() >= 300)
......@@ -1838,7 +1848,6 @@ YY_RULE_SETUP
}
YY_BREAK
/* Reserved keywords */
case 137:
case 138:
case 139:
case 140:
......@@ -1878,20 +1887,17 @@ case 173:
case 174:
case 175:
case 176:
case 177:
YY_RULE_SETUP
{ return reserved_word(yyscanner); }
YY_BREAK
case 177:
case 178:
YY_RULE_SETUP
{
yylval->lex.string = NewPoolTString(yytext);
return check_type(yyscanner);
}
YY_BREAK
case 178:
YY_RULE_SETUP
{ return int_constant(context); }
YY_BREAK
case 179:
YY_RULE_SETUP
{ return int_constant(context); }
......@@ -1902,7 +1908,7 @@ YY_RULE_SETUP
YY_BREAK
case 181:
YY_RULE_SETUP
{ return uint_constant(context); }
{ return int_constant(context); }
YY_BREAK
case 182:
YY_RULE_SETUP
......@@ -1914,7 +1920,7 @@ YY_RULE_SETUP
YY_BREAK
case 184:
YY_RULE_SETUP
{ return float_constant(yyscanner); }
{ return uint_constant(context); }
YY_BREAK
case 185:
YY_RULE_SETUP
......@@ -1926,7 +1932,7 @@ YY_RULE_SETUP
YY_BREAK
case 187:
YY_RULE_SETUP
{ return floatsuffix_check(context); }
{ return float_constant(yyscanner); }
YY_BREAK
case 188:
YY_RULE_SETUP
......@@ -1938,205 +1944,209 @@ YY_RULE_SETUP
YY_BREAK
case 190:
YY_RULE_SETUP
{ return ADD_ASSIGN; }
{ return floatsuffix_check(context); }
YY_BREAK
case 191:
YY_RULE_SETUP
{ return SUB_ASSIGN; }
{ return ADD_ASSIGN; }
YY_BREAK
case 192:
YY_RULE_SETUP
{ return MUL_ASSIGN; }
{ return SUB_ASSIGN; }
YY_BREAK
case 193:
YY_RULE_SETUP
{ return DIV_ASSIGN; }
{ return MUL_ASSIGN; }
YY_BREAK
case 194:
YY_RULE_SETUP
{ return MOD_ASSIGN; }
{ return DIV_ASSIGN; }
YY_BREAK
case 195:
YY_RULE_SETUP
{ return LEFT_ASSIGN; }
{ return MOD_ASSIGN; }
YY_BREAK
case 196:
YY_RULE_SETUP
{ return RIGHT_ASSIGN; }
{ return LEFT_ASSIGN; }
YY_BREAK
case 197:
YY_RULE_SETUP
{ return AND_ASSIGN; }
{ return RIGHT_ASSIGN; }
YY_BREAK
case 198:
YY_RULE_SETUP
{ return XOR_ASSIGN; }
{ return AND_ASSIGN; }
YY_BREAK
case 199:
YY_RULE_SETUP
{ return OR_ASSIGN; }
{ return XOR_ASSIGN; }
YY_BREAK
case 200:
YY_RULE_SETUP
{ return INC_OP; }
{ return OR_ASSIGN; }
YY_BREAK
case 201:
YY_RULE_SETUP
{ return DEC_OP; }
{ return INC_OP; }
YY_BREAK
case 202:
YY_RULE_SETUP
{ return AND_OP; }
{ return DEC_OP; }
YY_BREAK
case 203:
YY_RULE_SETUP
{ return OR_OP; }
{ return AND_OP; }
YY_BREAK
case 204:
YY_RULE_SETUP
{ return XOR_OP; }
{ return OR_OP; }
YY_BREAK
case 205:
YY_RULE_SETUP
{ return LE_OP; }
{ return XOR_OP; }
YY_BREAK
case 206:
YY_RULE_SETUP
{ return GE_OP; }
{ return LE_OP; }
YY_BREAK
case 207:
YY_RULE_SETUP
{ return EQ_OP; }
{ return GE_OP; }
YY_BREAK
case 208:
YY_RULE_SETUP
{ return NE_OP; }
{ return EQ_OP; }
YY_BREAK
case 209:
YY_RULE_SETUP
{ return LEFT_OP; }
{ return NE_OP; }
YY_BREAK
case 210:
YY_RULE_SETUP
{ return RIGHT_OP; }
{ return LEFT_OP; }
YY_BREAK
case 211:
YY_RULE_SETUP
{ return SEMICOLON; }
{ return RIGHT_OP; }
YY_BREAK
case 212:
YY_RULE_SETUP
{ return LEFT_BRACE; }
{ return SEMICOLON; }
YY_BREAK
case 213:
YY_RULE_SETUP
{ return RIGHT_BRACE; }
{ return LEFT_BRACE; }
YY_BREAK
case 214:
YY_RULE_SETUP
{ return COMMA; }
{ return RIGHT_BRACE; }
YY_BREAK
case 215:
YY_RULE_SETUP
{ return COLON; }
{ return COMMA; }
YY_BREAK
case 216:
YY_RULE_SETUP
{ return EQUAL; }
{ return COLON; }
YY_BREAK
case 217:
YY_RULE_SETUP
{ return LEFT_PAREN; }
{ return EQUAL; }
YY_BREAK
case 218:
YY_RULE_SETUP
{ return RIGHT_PAREN; }
{ return LEFT_PAREN; }
YY_BREAK
case 219:
YY_RULE_SETUP
{ return LEFT_BRACKET; }
{ return RIGHT_PAREN; }
YY_BREAK
case 220:
YY_RULE_SETUP
{ return RIGHT_BRACKET; }
{ return LEFT_BRACKET; }
YY_BREAK
case 221:
YY_RULE_SETUP
{ BEGIN(FIELDS); return DOT; }
{ return RIGHT_BRACKET; }
YY_BREAK
case 222:
YY_RULE_SETUP
{ return BANG; }
{ BEGIN(FIELDS); return DOT; }
YY_BREAK
case 223:
YY_RULE_SETUP
{ return DASH; }
{ return BANG; }
YY_BREAK
case 224:
YY_RULE_SETUP
{ return TILDE; }
{ return DASH; }
YY_BREAK
case 225:
YY_RULE_SETUP
{ return PLUS; }
{ return TILDE; }
YY_BREAK
case 226:
YY_RULE_SETUP
{ return STAR; }
{ return PLUS; }
YY_BREAK
case 227:
YY_RULE_SETUP
{ return SLASH; }
{ return STAR; }
YY_BREAK
case 228:
YY_RULE_SETUP
{ return PERCENT; }
{ return SLASH; }
YY_BREAK
case 229:
YY_RULE_SETUP
{ return LEFT_ANGLE; }
{ return PERCENT; }
YY_BREAK
case 230:
YY_RULE_SETUP
{ return RIGHT_ANGLE; }
{ return LEFT_ANGLE; }
YY_BREAK
case 231:
YY_RULE_SETUP
{ return VERTICAL_BAR; }
{ return RIGHT_ANGLE; }
YY_BREAK
case 232:
YY_RULE_SETUP
{ return CARET; }
{ return VERTICAL_BAR; }
YY_BREAK
case 233:
YY_RULE_SETUP
{ return AMPERSAND; }
{ return CARET; }
YY_BREAK
case 234:
YY_RULE_SETUP
{ return QUESTION; }
{ return AMPERSAND; }
YY_BREAK
case 235:
YY_RULE_SETUP
{ return QUESTION; }
YY_BREAK
case 236:
YY_RULE_SETUP
{
BEGIN(INITIAL);
yylval->lex.string = NewPoolTString(yytext);
return FIELD_SELECTION;
}
YY_BREAK
case 236:
case 237:
YY_RULE_SETUP
{}
YY_BREAK
case 237:
case 238:
YY_RULE_SETUP
{
yyextra->error(*yylloc, "Illegal character at fieldname start", yytext, "");
return 0;
}
YY_BREAK
case 238:
/* rule 238 can match eol */
case 239:
/* rule 239 can match eol */
YY_RULE_SETUP
{ }
YY_BREAK
......@@ -2144,11 +2154,11 @@ case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(FIELDS):
{ yyterminate(); }
YY_BREAK
case 239:
case 240:
YY_RULE_SETUP
{ assert(false); return 0; }
YY_BREAK
case 240:
case 241:
YY_RULE_SETUP
ECHO;
YY_BREAK
......@@ -2447,7 +2457,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 820 )
if ( yy_current_state >= 824 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
......@@ -2476,11 +2486,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 820 )
if ( yy_current_state >= 824 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 819);
yy_is_jam = (yy_current_state == 823);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state;
......@@ -3405,6 +3415,21 @@ int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token)
return token;
}
int ES2_and_ES3_ident_ES3_1_keyword(TParseContext *context, int token)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
yyscan_t yyscanner = (yyscan_t) context->getScanner();
// not a reserved word in GLSL ES 1.00 and GLSL ES 3.00, so could be used as an identifier/type name
if (context->getShaderVersion() < 310)
{
yylval->lex.string = NewPoolTString(yytext);
return check_type(yyscanner);
}
return token;
}
int uint_constant(TParseContext *context)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -105,92 +105,93 @@ enum yytokentype
COHERENT = 311,
RESTRICT = 312,
VOLATILE = 313,
STRUCT = 314,
VOID_TYPE = 315,
WHILE = 316,
SAMPLER2D = 317,
SAMPLERCUBE = 318,
SAMPLER_EXTERNAL_OES = 319,
SAMPLER2DRECT = 320,
SAMPLER2DARRAY = 321,
ISAMPLER2D = 322,
ISAMPLER3D = 323,
ISAMPLERCUBE = 324,
ISAMPLER2DARRAY = 325,
USAMPLER2D = 326,
USAMPLER3D = 327,
USAMPLERCUBE = 328,
USAMPLER2DARRAY = 329,
SAMPLER3D = 330,
SAMPLER3DRECT = 331,
SAMPLER2DSHADOW = 332,
SAMPLERCUBESHADOW = 333,
SAMPLER2DARRAYSHADOW = 334,
IMAGE2D = 335,
IIMAGE2D = 336,
UIMAGE2D = 337,
IMAGE3D = 338,
IIMAGE3D = 339,
UIMAGE3D = 340,
IMAGE2DARRAY = 341,
IIMAGE2DARRAY = 342,
UIMAGE2DARRAY = 343,
IMAGECUBE = 344,
IIMAGECUBE = 345,
UIMAGECUBE = 346,
LAYOUT = 347,
IDENTIFIER = 348,
TYPE_NAME = 349,
FLOATCONSTANT = 350,
INTCONSTANT = 351,
UINTCONSTANT = 352,
BOOLCONSTANT = 353,
FIELD_SELECTION = 354,
LEFT_OP = 355,
RIGHT_OP = 356,
INC_OP = 357,
DEC_OP = 358,
LE_OP = 359,
GE_OP = 360,
EQ_OP = 361,
NE_OP = 362,
AND_OP = 363,
OR_OP = 364,
XOR_OP = 365,
MUL_ASSIGN = 366,
DIV_ASSIGN = 367,
ADD_ASSIGN = 368,
MOD_ASSIGN = 369,
LEFT_ASSIGN = 370,
RIGHT_ASSIGN = 371,
AND_ASSIGN = 372,
XOR_ASSIGN = 373,
OR_ASSIGN = 374,
SUB_ASSIGN = 375,
LEFT_PAREN = 376,
RIGHT_PAREN = 377,
LEFT_BRACKET = 378,
RIGHT_BRACKET = 379,
LEFT_BRACE = 380,
RIGHT_BRACE = 381,
DOT = 382,
COMMA = 383,
COLON = 384,
EQUAL = 385,
SEMICOLON = 386,
BANG = 387,
DASH = 388,
TILDE = 389,
PLUS = 390,
STAR = 391,
SLASH = 392,
PERCENT = 393,
LEFT_ANGLE = 394,
RIGHT_ANGLE = 395,
VERTICAL_BAR = 396,
CARET = 397,
AMPERSAND = 398,
QUESTION = 399
SHARED = 314,
STRUCT = 315,
VOID_TYPE = 316,
WHILE = 317,
SAMPLER2D = 318,
SAMPLERCUBE = 319,
SAMPLER_EXTERNAL_OES = 320,
SAMPLER2DRECT = 321,
SAMPLER2DARRAY = 322,
ISAMPLER2D = 323,
ISAMPLER3D = 324,
ISAMPLERCUBE = 325,
ISAMPLER2DARRAY = 326,
USAMPLER2D = 327,
USAMPLER3D = 328,
USAMPLERCUBE = 329,
USAMPLER2DARRAY = 330,
SAMPLER3D = 331,
SAMPLER3DRECT = 332,
SAMPLER2DSHADOW = 333,
SAMPLERCUBESHADOW = 334,
SAMPLER2DARRAYSHADOW = 335,
IMAGE2D = 336,
IIMAGE2D = 337,
UIMAGE2D = 338,
IMAGE3D = 339,
IIMAGE3D = 340,
UIMAGE3D = 341,
IMAGE2DARRAY = 342,
IIMAGE2DARRAY = 343,
UIMAGE2DARRAY = 344,
IMAGECUBE = 345,
IIMAGECUBE = 346,
UIMAGECUBE = 347,
LAYOUT = 348,
IDENTIFIER = 349,
TYPE_NAME = 350,
FLOATCONSTANT = 351,
INTCONSTANT = 352,
UINTCONSTANT = 353,
BOOLCONSTANT = 354,
FIELD_SELECTION = 355,
LEFT_OP = 356,
RIGHT_OP = 357,
INC_OP = 358,
DEC_OP = 359,
LE_OP = 360,
GE_OP = 361,
EQ_OP = 362,
NE_OP = 363,
AND_OP = 364,
OR_OP = 365,
XOR_OP = 366,
MUL_ASSIGN = 367,
DIV_ASSIGN = 368,
ADD_ASSIGN = 369,
MOD_ASSIGN = 370,
LEFT_ASSIGN = 371,
RIGHT_ASSIGN = 372,
AND_ASSIGN = 373,
XOR_ASSIGN = 374,
OR_ASSIGN = 375,
SUB_ASSIGN = 376,
LEFT_PAREN = 377,
RIGHT_PAREN = 378,
LEFT_BRACKET = 379,
RIGHT_BRACKET = 380,
LEFT_BRACE = 381,
RIGHT_BRACE = 382,
DOT = 383,
COMMA = 384,
COLON = 385,
EQUAL = 386,
SEMICOLON = 387,
BANG = 388,
DASH = 389,
TILDE = 390,
PLUS = 391,
STAR = 392,
SLASH = 393,
PERCENT = 394,
LEFT_ANGLE = 395,
RIGHT_ANGLE = 396,
VERTICAL_BAR = 397,
CARET = 398,
AMPERSAND = 399,
QUESTION = 400
};
#endif
......
......@@ -3130,3 +3130,202 @@ TEST_F(MalformedComputeShaderTest, WorkGroupSizeAsArraySize)
FAIL() << "Shader compilation failed, expecting success " << mInfoLog;
}
}
// Shared memory variables cannot be used inside a vertex shader.
// GLSL ES 3.10 Revision 4, 4.3.8 Shared Variables
TEST_F(MalformedVertexShaderGLES31Test, VertexShaderSharedMemory)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"in vec4 i;\n"
"shared float myShared[10];\n"
"void main() {\n"
" gl_Position = i;\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// Shared memory variables cannot be used inside a fragment shader.
// GLSL ES 3.10 Revision 4, 4.3.8 Shared Variables
TEST_F(MalformedFragmentShaderGLES31Test, FragmentShaderSharedMemory)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"shared float myShared[10];\n"
"out vec4 color;\n"
"void main() {\n"
" color = vec4(1.0);\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// Shared memory cannot be combined with any other storage qualifier.
TEST_F(MalformedComputeShaderTest, UniformSharedMemory)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"uniform shared float myShared[100];\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// Correct usage of shared memory variables.
TEST_F(MalformedComputeShaderTest, CorrectUsageOfSharedMemory)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"shared float myShared[100];\n"
"void main() {\n"
" myShared[gl_LocalInvocationID.x] = 1.0;\n"
"}\n";
if (!compile(shaderString))
{
FAIL() << "Shader compilation failed, expecting success " << mInfoLog;
}
}
// Shared memory variables cannot be initialized.
// GLSL ES 3.10 Revision 4, 4.3.8 Shared Variables
TEST_F(MalformedComputeShaderTest, SharedVariableInitialization)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"shared int myShared = 0;\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// Local variables cannot be qualified as shared.
// GLSL ES 3.10 Revision 4, 4.3 Storage Qualifiers
TEST_F(MalformedComputeShaderTest, SharedMemoryInFunctionBody)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"void func() {\n"
" shared int myShared;\n"
"}\n"
"void main() {\n"
" func();\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// Struct members cannot be qualified as shared.
TEST_F(MalformedComputeShaderTest, SharedMemoryInStruct)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"struct MyStruct {\n"
" shared int myShared;\n"
"};\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// Interface block members cannot be qualified as shared.
TEST_F(MalformedComputeShaderTest, SharedMemoryInInterfaceBlock)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"uniform Myblock {\n"
" shared int myShared;\n"
"};\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// The shared qualifier cannot be used with any other qualifier.
TEST_F(MalformedComputeShaderTest, SharedWithInvariant)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"invariant shared int myShared;\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// The shared qualifier cannot be used with any other qualifier.
TEST_F(MalformedComputeShaderTest, SharedWithMemoryQualifier)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"readonly shared int myShared;\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
// The shared qualifier cannot be used with any other qualifier.
TEST_F(MalformedComputeShaderTest, SharedGlobalLayoutDeclaration)
{
const std::string &shaderString =
"#version 310 es\n"
"precision mediump float;\n"
"layout(local_size_x = 5) in;\n"
"layout(row_major) shared mat4;\n"
"void main() {\n"
"}\n";
if (compile(shaderString))
{
FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog;
}
}
\ No newline at end of file
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