1 /* A Bison parser, made by GNU Bison 3.8.2. */ 2 3 /* Bison interface for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, 6 Inc. 7 8 This program is free software: you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 20 21 /* As a special exception, you may create a larger work that contains 22 part or all of the Bison parser skeleton and distribute that work 23 under terms of your choice, so long as that work isn't itself a 24 parser generator using the skeleton or a modified version thereof 25 as a parser skeleton. Alternatively, if you modify or redistribute 26 the parser skeleton itself, you may (at your option) remove this 27 special exception, which will cause the skeleton and the resulting 28 Bison output files to be licensed under the GNU General Public 29 License without this special exception. 30 31 This special exception was added by the Free Software Foundation in 32 version 2.2 of Bison. */ 33 34 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, 35 especially those whose name start with YY_ or yy_. They are 36 private implementation details that can be changed or removed. */ 37 38 #ifndef YY_YY_GLSLANG_TAB_AUTOGEN_H_INCLUDED 39 #define YY_YY_GLSLANG_TAB_AUTOGEN_H_INCLUDED 40 /* Debug traces. */ 41 #ifndef YYDEBUG 42 # define YYDEBUG 0 43 #endif 44 #if YYDEBUG 45 extern int yydebug; 46 #endif 47 /* "%code requires" blocks. */ 48 49 #define YYLTYPE TSourceLoc 50 #define YYLTYPE_IS_DECLARED 1 51 #define YYLTYPE_IS_TRIVIAL 1 52 53 /* Token kinds. */ 54 #ifndef YYTOKENTYPE 55 # define YYTOKENTYPE 56 enum yytokentype 57 { 58 YYEMPTY = -2, 59 YYEOF = 0, /* "end of file" */ 60 YYerror = 256, /* error */ 61 YYUNDEF = 257, /* "invalid token" */ 62 INVARIANT = 258, /* INVARIANT */ 63 PRECISE = 259, /* PRECISE */ 64 HIGH_PRECISION = 260, /* HIGH_PRECISION */ 65 MEDIUM_PRECISION = 261, /* MEDIUM_PRECISION */ 66 LOW_PRECISION = 262, /* LOW_PRECISION */ 67 PRECISION = 263, /* PRECISION */ 68 ATTRIBUTE = 264, /* ATTRIBUTE */ 69 CONST_QUAL = 265, /* CONST_QUAL */ 70 BOOL_TYPE = 266, /* BOOL_TYPE */ 71 FLOAT_TYPE = 267, /* FLOAT_TYPE */ 72 INT_TYPE = 268, /* INT_TYPE */ 73 UINT_TYPE = 269, /* UINT_TYPE */ 74 BREAK = 270, /* BREAK */ 75 CONTINUE = 271, /* CONTINUE */ 76 DO = 272, /* DO */ 77 ELSE = 273, /* ELSE */ 78 FOR = 274, /* FOR */ 79 IF = 275, /* IF */ 80 DISCARD = 276, /* DISCARD */ 81 RETURN = 277, /* RETURN */ 82 SWITCH = 278, /* SWITCH */ 83 CASE = 279, /* CASE */ 84 DEFAULT = 280, /* DEFAULT */ 85 BVEC2 = 281, /* BVEC2 */ 86 BVEC3 = 282, /* BVEC3 */ 87 BVEC4 = 283, /* BVEC4 */ 88 IVEC2 = 284, /* IVEC2 */ 89 IVEC3 = 285, /* IVEC3 */ 90 IVEC4 = 286, /* IVEC4 */ 91 VEC2 = 287, /* VEC2 */ 92 VEC3 = 288, /* VEC3 */ 93 VEC4 = 289, /* VEC4 */ 94 UVEC2 = 290, /* UVEC2 */ 95 UVEC3 = 291, /* UVEC3 */ 96 UVEC4 = 292, /* UVEC4 */ 97 MATRIX2 = 293, /* MATRIX2 */ 98 MATRIX3 = 294, /* MATRIX3 */ 99 MATRIX4 = 295, /* MATRIX4 */ 100 IN_QUAL = 296, /* IN_QUAL */ 101 OUT_QUAL = 297, /* OUT_QUAL */ 102 INOUT_QUAL = 298, /* INOUT_QUAL */ 103 UNIFORM = 299, /* UNIFORM */ 104 BUFFER = 300, /* BUFFER */ 105 VARYING = 301, /* VARYING */ 106 MATRIX2x3 = 302, /* MATRIX2x3 */ 107 MATRIX3x2 = 303, /* MATRIX3x2 */ 108 MATRIX2x4 = 304, /* MATRIX2x4 */ 109 MATRIX4x2 = 305, /* MATRIX4x2 */ 110 MATRIX3x4 = 306, /* MATRIX3x4 */ 111 MATRIX4x3 = 307, /* MATRIX4x3 */ 112 SAMPLE = 308, /* SAMPLE */ 113 CENTROID = 309, /* CENTROID */ 114 FLAT = 310, /* FLAT */ 115 SMOOTH = 311, /* SMOOTH */ 116 NOPERSPECTIVE = 312, /* NOPERSPECTIVE */ 117 PATCH = 313, /* PATCH */ 118 READONLY = 314, /* READONLY */ 119 WRITEONLY = 315, /* WRITEONLY */ 120 COHERENT = 316, /* COHERENT */ 121 RESTRICT = 317, /* RESTRICT */ 122 VOLATILE = 318, /* VOLATILE */ 123 SHARED = 319, /* SHARED */ 124 STRUCT = 320, /* STRUCT */ 125 VOID_TYPE = 321, /* VOID_TYPE */ 126 WHILE = 322, /* WHILE */ 127 SAMPLER2D = 323, /* SAMPLER2D */ 128 SAMPLERCUBE = 324, /* SAMPLERCUBE */ 129 SAMPLER_EXTERNAL_OES = 325, /* SAMPLER_EXTERNAL_OES */ 130 SAMPLER2DRECT = 326, /* SAMPLER2DRECT */ 131 SAMPLER2DARRAY = 327, /* SAMPLER2DARRAY */ 132 ISAMPLER2D = 328, /* ISAMPLER2D */ 133 ISAMPLER3D = 329, /* ISAMPLER3D */ 134 ISAMPLERCUBE = 330, /* ISAMPLERCUBE */ 135 ISAMPLER2DARRAY = 331, /* ISAMPLER2DARRAY */ 136 USAMPLER2D = 332, /* USAMPLER2D */ 137 USAMPLER3D = 333, /* USAMPLER3D */ 138 USAMPLERCUBE = 334, /* USAMPLERCUBE */ 139 USAMPLER2DARRAY = 335, /* USAMPLER2DARRAY */ 140 SAMPLER2DMS = 336, /* SAMPLER2DMS */ 141 ISAMPLER2DMS = 337, /* ISAMPLER2DMS */ 142 USAMPLER2DMS = 338, /* USAMPLER2DMS */ 143 SAMPLER2DMSARRAY = 339, /* SAMPLER2DMSARRAY */ 144 ISAMPLER2DMSARRAY = 340, /* ISAMPLER2DMSARRAY */ 145 USAMPLER2DMSARRAY = 341, /* USAMPLER2DMSARRAY */ 146 SAMPLER3D = 342, /* SAMPLER3D */ 147 SAMPLER3DRECT = 343, /* SAMPLER3DRECT */ 148 SAMPLER2DSHADOW = 344, /* SAMPLER2DSHADOW */ 149 SAMPLERCUBESHADOW = 345, /* SAMPLERCUBESHADOW */ 150 SAMPLER2DARRAYSHADOW = 346, /* SAMPLER2DARRAYSHADOW */ 151 SAMPLERVIDEOWEBGL = 347, /* SAMPLERVIDEOWEBGL */ 152 SAMPLERCUBEARRAYOES = 348, /* SAMPLERCUBEARRAYOES */ 153 SAMPLERCUBEARRAYSHADOWOES = 349, /* SAMPLERCUBEARRAYSHADOWOES */ 154 ISAMPLERCUBEARRAYOES = 350, /* ISAMPLERCUBEARRAYOES */ 155 USAMPLERCUBEARRAYOES = 351, /* USAMPLERCUBEARRAYOES */ 156 SAMPLERCUBEARRAYEXT = 352, /* SAMPLERCUBEARRAYEXT */ 157 SAMPLERCUBEARRAYSHADOWEXT = 353, /* SAMPLERCUBEARRAYSHADOWEXT */ 158 ISAMPLERCUBEARRAYEXT = 354, /* ISAMPLERCUBEARRAYEXT */ 159 USAMPLERCUBEARRAYEXT = 355, /* USAMPLERCUBEARRAYEXT */ 160 SAMPLERBUFFER = 356, /* SAMPLERBUFFER */ 161 ISAMPLERBUFFER = 357, /* ISAMPLERBUFFER */ 162 USAMPLERBUFFER = 358, /* USAMPLERBUFFER */ 163 SAMPLEREXTERNAL2DY2YEXT = 359, /* SAMPLEREXTERNAL2DY2YEXT */ 164 IMAGE2D = 360, /* IMAGE2D */ 165 IIMAGE2D = 361, /* IIMAGE2D */ 166 UIMAGE2D = 362, /* UIMAGE2D */ 167 IMAGE3D = 363, /* IMAGE3D */ 168 IIMAGE3D = 364, /* IIMAGE3D */ 169 UIMAGE3D = 365, /* UIMAGE3D */ 170 IMAGE2DARRAY = 366, /* IMAGE2DARRAY */ 171 IIMAGE2DARRAY = 367, /* IIMAGE2DARRAY */ 172 UIMAGE2DARRAY = 368, /* UIMAGE2DARRAY */ 173 IMAGECUBE = 369, /* IMAGECUBE */ 174 IIMAGECUBE = 370, /* IIMAGECUBE */ 175 UIMAGECUBE = 371, /* UIMAGECUBE */ 176 IMAGECUBEARRAYOES = 372, /* IMAGECUBEARRAYOES */ 177 IIMAGECUBEARRAYOES = 373, /* IIMAGECUBEARRAYOES */ 178 UIMAGECUBEARRAYOES = 374, /* UIMAGECUBEARRAYOES */ 179 IMAGECUBEARRAYEXT = 375, /* IMAGECUBEARRAYEXT */ 180 IIMAGECUBEARRAYEXT = 376, /* IIMAGECUBEARRAYEXT */ 181 UIMAGECUBEARRAYEXT = 377, /* UIMAGECUBEARRAYEXT */ 182 IMAGEBUFFER = 378, /* IMAGEBUFFER */ 183 IIMAGEBUFFER = 379, /* IIMAGEBUFFER */ 184 UIMAGEBUFFER = 380, /* UIMAGEBUFFER */ 185 ATOMICUINT = 381, /* ATOMICUINT */ 186 PIXELLOCALANGLE = 382, /* PIXELLOCALANGLE */ 187 IPIXELLOCALANGLE = 383, /* IPIXELLOCALANGLE */ 188 UPIXELLOCALANGLE = 384, /* UPIXELLOCALANGLE */ 189 LAYOUT = 385, /* LAYOUT */ 190 YUVCSCSTANDARDEXT = 386, /* YUVCSCSTANDARDEXT */ 191 YUVCSCSTANDARDEXTCONSTANT = 387, /* YUVCSCSTANDARDEXTCONSTANT */ 192 IDENTIFIER = 388, /* IDENTIFIER */ 193 TYPE_NAME = 389, /* TYPE_NAME */ 194 FLOATCONSTANT = 390, /* FLOATCONSTANT */ 195 INTCONSTANT = 391, /* INTCONSTANT */ 196 UINTCONSTANT = 392, /* UINTCONSTANT */ 197 BOOLCONSTANT = 393, /* BOOLCONSTANT */ 198 FIELD_SELECTION = 394, /* FIELD_SELECTION */ 199 LEFT_OP = 395, /* LEFT_OP */ 200 RIGHT_OP = 396, /* RIGHT_OP */ 201 INC_OP = 397, /* INC_OP */ 202 DEC_OP = 398, /* DEC_OP */ 203 LE_OP = 399, /* LE_OP */ 204 GE_OP = 400, /* GE_OP */ 205 EQ_OP = 401, /* EQ_OP */ 206 NE_OP = 402, /* NE_OP */ 207 AND_OP = 403, /* AND_OP */ 208 OR_OP = 404, /* OR_OP */ 209 XOR_OP = 405, /* XOR_OP */ 210 MUL_ASSIGN = 406, /* MUL_ASSIGN */ 211 DIV_ASSIGN = 407, /* DIV_ASSIGN */ 212 ADD_ASSIGN = 408, /* ADD_ASSIGN */ 213 MOD_ASSIGN = 409, /* MOD_ASSIGN */ 214 LEFT_ASSIGN = 410, /* LEFT_ASSIGN */ 215 RIGHT_ASSIGN = 411, /* RIGHT_ASSIGN */ 216 AND_ASSIGN = 412, /* AND_ASSIGN */ 217 XOR_ASSIGN = 413, /* XOR_ASSIGN */ 218 OR_ASSIGN = 414, /* OR_ASSIGN */ 219 SUB_ASSIGN = 415, /* SUB_ASSIGN */ 220 LEFT_PAREN = 416, /* LEFT_PAREN */ 221 RIGHT_PAREN = 417, /* RIGHT_PAREN */ 222 LEFT_BRACKET = 418, /* LEFT_BRACKET */ 223 RIGHT_BRACKET = 419, /* RIGHT_BRACKET */ 224 LEFT_BRACE = 420, /* LEFT_BRACE */ 225 RIGHT_BRACE = 421, /* RIGHT_BRACE */ 226 DOT = 422, /* DOT */ 227 COMMA = 423, /* COMMA */ 228 COLON = 424, /* COLON */ 229 EQUAL = 425, /* EQUAL */ 230 SEMICOLON = 426, /* SEMICOLON */ 231 BANG = 427, /* BANG */ 232 DASH = 428, /* DASH */ 233 TILDE = 429, /* TILDE */ 234 PLUS = 430, /* PLUS */ 235 STAR = 431, /* STAR */ 236 SLASH = 432, /* SLASH */ 237 PERCENT = 433, /* PERCENT */ 238 LEFT_ANGLE = 434, /* LEFT_ANGLE */ 239 RIGHT_ANGLE = 435, /* RIGHT_ANGLE */ 240 VERTICAL_BAR = 436, /* VERTICAL_BAR */ 241 CARET = 437, /* CARET */ 242 AMPERSAND = 438, /* AMPERSAND */ 243 QUESTION = 439 /* QUESTION */ 244 }; 245 typedef enum yytokentype yytoken_kind_t; 246 #endif 247 248 /* Value type. */ 249 #if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED 250 union YYSTYPE 251 { 252 253 struct 254 { 255 union 256 { 257 const char *string; // pool allocated. 258 float f; 259 int i; 260 unsigned int u; 261 bool b; 262 }; 263 const TSymbol *symbol; 264 } lex; 265 struct 266 { 267 TOperator op; 268 union 269 { 270 TIntermNode *intermNode; 271 TIntermNodePair nodePair; 272 TIntermTyped *intermTypedNode; 273 TIntermAggregate *intermAggregate; 274 TIntermBlock *intermBlock; 275 TIntermDeclaration *intermDeclaration; 276 TIntermFunctionPrototype *intermFunctionPrototype; 277 TIntermSwitch *intermSwitch; 278 TIntermCase *intermCase; 279 }; 280 union 281 { 282 TVector<unsigned int> *arraySizes; 283 TTypeSpecifierNonArray typeSpecifierNonArray; 284 TPublicType type; 285 TPrecision precision; 286 TLayoutQualifier layoutQualifier; 287 TQualifier qualifier; 288 TFunction *function; 289 TFunctionLookup *functionLookup; 290 TParameter param; 291 TDeclarator *declarator; 292 TDeclaratorList *declaratorList; 293 TFieldList *fieldList; 294 TQualifierWrapperBase *qualifierWrapper; 295 TTypeQualifierBuilder *typeQualifierBuilder; 296 }; 297 } interm; 298 }; 299 typedef union YYSTYPE YYSTYPE; 300 # define YYSTYPE_IS_TRIVIAL 1 301 # define YYSTYPE_IS_DECLARED 1 302 #endif 303 304 /* Location type. */ 305 #if !defined YYLTYPE && !defined YYLTYPE_IS_DECLARED 306 typedef struct YYLTYPE YYLTYPE; 307 struct YYLTYPE 308 { 309 int first_line; 310 int first_column; 311 int last_line; 312 int last_column; 313 }; 314 # define YYLTYPE_IS_DECLARED 1 315 # define YYLTYPE_IS_TRIVIAL 1 316 #endif 317 318 int yyparse(TParseContext *context, void *scanner); 319 320 #endif /* !YY_YY_GLSLANG_TAB_AUTOGEN_H_INCLUDED */ 321