glslang_tab_autogen.cpp (229396B)
1 /* A Bison parser, made by GNU Bison 3.8.2. */ 2 3 /* Bison implementation 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 /* C LALR(1) parser skeleton written by Richard Stallman, by 35 simplifying the original so-called "semantic" parser. */ 36 37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, 38 especially those whose name start with YY_ or yy_. They are 39 private implementation details that can be changed or removed. */ 40 41 /* All symbols defined below should begin with yy or YY, to avoid 42 infringing on user name space. This should be done even for local 43 variables, as they might otherwise be expanded by user macros. 44 There are some unavoidable exceptions within include files to 45 define necessary library symbols; they are noted "INFRINGES ON 46 USER NAME SPACE" below. */ 47 48 /* Identify Bison output, and Bison version. */ 49 #define YYBISON 30802 50 51 /* Bison version string. */ 52 #define YYBISON_VERSION "3.8.2" 53 54 /* Skeleton name. */ 55 #define YYSKELETON_NAME "yacc.c" 56 57 /* Pure parsers. */ 58 #define YYPURE 2 59 60 /* Push parsers. */ 61 #define YYPUSH 0 62 63 /* Pull parsers. */ 64 #define YYPULL 1 65 66 /* First part of user prologue. */ 67 68 // GENERATED FILE - DO NOT EDIT. 69 // Generated by generate_parser.py from glslang.y 70 // 71 // Copyright 2019 The ANGLE Project Authors. All rights reserved. 72 // Use of this source code is governed by a BSD-style license that can be 73 // found in the LICENSE file. 74 // 75 // glslang.y: 76 // Parser for the OpenGL shading language. 77 78 // Ignore errors in auto-generated code. 79 #if defined(__GNUC__) 80 # pragma GCC diagnostic ignored "-Wunused-function" 81 # pragma GCC diagnostic ignored "-Wunused-variable" 82 # pragma GCC diagnostic ignored "-Wswitch-enum" 83 #elif defined(_MSC_VER) 84 # pragma warning(disable : 4065) 85 # pragma warning(disable : 4189) 86 # pragma warning(disable : 4244) 87 # pragma warning(disable : 4505) 88 # pragma warning(disable : 4701) 89 # pragma warning(disable : 4702) 90 #endif 91 #if defined(__clang__) 92 # pragma clang diagnostic ignored "-Wunreachable-code" 93 # pragma clang diagnostic ignored "-Wunused-but-set-variable" 94 #endif 95 96 #include "GLSLANG/ShaderLang.h" 97 #include "angle_gl.h" 98 #include "compiler/translator/Declarator.h" 99 #include "compiler/translator/ParseContext.h" 100 #include "compiler/translator/SymbolTable.h" 101 102 #define YYENABLE_NLS 0 103 104 using namespace sh; 105 106 #ifndef YY_CAST 107 # ifdef __cplusplus 108 # define YY_CAST(Type, Val) static_cast<Type>(Val) 109 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type>(Val) 110 # else 111 # define YY_CAST(Type, Val) ((Type)(Val)) 112 # define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val)) 113 # endif 114 #endif 115 #ifndef YY_NULLPTR 116 # if defined __cplusplus 117 # if 201103L <= __cplusplus 118 # define YY_NULLPTR nullptr 119 # else 120 # define YY_NULLPTR 0 121 # endif 122 # else 123 # define YY_NULLPTR ((void *)0) 124 # endif 125 #endif 126 127 #include "glslang_tab_autogen.h" 128 /* Symbol kind. */ 129 enum yysymbol_kind_t 130 { 131 YYSYMBOL_YYEMPTY = -2, 132 YYSYMBOL_YYEOF = 0, /* "end of file" */ 133 YYSYMBOL_YYerror = 1, /* error */ 134 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ 135 YYSYMBOL_INVARIANT = 3, /* INVARIANT */ 136 YYSYMBOL_PRECISE = 4, /* PRECISE */ 137 YYSYMBOL_HIGH_PRECISION = 5, /* HIGH_PRECISION */ 138 YYSYMBOL_MEDIUM_PRECISION = 6, /* MEDIUM_PRECISION */ 139 YYSYMBOL_LOW_PRECISION = 7, /* LOW_PRECISION */ 140 YYSYMBOL_PRECISION = 8, /* PRECISION */ 141 YYSYMBOL_ATTRIBUTE = 9, /* ATTRIBUTE */ 142 YYSYMBOL_CONST_QUAL = 10, /* CONST_QUAL */ 143 YYSYMBOL_BOOL_TYPE = 11, /* BOOL_TYPE */ 144 YYSYMBOL_FLOAT_TYPE = 12, /* FLOAT_TYPE */ 145 YYSYMBOL_INT_TYPE = 13, /* INT_TYPE */ 146 YYSYMBOL_UINT_TYPE = 14, /* UINT_TYPE */ 147 YYSYMBOL_BREAK = 15, /* BREAK */ 148 YYSYMBOL_CONTINUE = 16, /* CONTINUE */ 149 YYSYMBOL_DO = 17, /* DO */ 150 YYSYMBOL_ELSE = 18, /* ELSE */ 151 YYSYMBOL_FOR = 19, /* FOR */ 152 YYSYMBOL_IF = 20, /* IF */ 153 YYSYMBOL_DISCARD = 21, /* DISCARD */ 154 YYSYMBOL_RETURN = 22, /* RETURN */ 155 YYSYMBOL_SWITCH = 23, /* SWITCH */ 156 YYSYMBOL_CASE = 24, /* CASE */ 157 YYSYMBOL_DEFAULT = 25, /* DEFAULT */ 158 YYSYMBOL_BVEC2 = 26, /* BVEC2 */ 159 YYSYMBOL_BVEC3 = 27, /* BVEC3 */ 160 YYSYMBOL_BVEC4 = 28, /* BVEC4 */ 161 YYSYMBOL_IVEC2 = 29, /* IVEC2 */ 162 YYSYMBOL_IVEC3 = 30, /* IVEC3 */ 163 YYSYMBOL_IVEC4 = 31, /* IVEC4 */ 164 YYSYMBOL_VEC2 = 32, /* VEC2 */ 165 YYSYMBOL_VEC3 = 33, /* VEC3 */ 166 YYSYMBOL_VEC4 = 34, /* VEC4 */ 167 YYSYMBOL_UVEC2 = 35, /* UVEC2 */ 168 YYSYMBOL_UVEC3 = 36, /* UVEC3 */ 169 YYSYMBOL_UVEC4 = 37, /* UVEC4 */ 170 YYSYMBOL_MATRIX2 = 38, /* MATRIX2 */ 171 YYSYMBOL_MATRIX3 = 39, /* MATRIX3 */ 172 YYSYMBOL_MATRIX4 = 40, /* MATRIX4 */ 173 YYSYMBOL_IN_QUAL = 41, /* IN_QUAL */ 174 YYSYMBOL_OUT_QUAL = 42, /* OUT_QUAL */ 175 YYSYMBOL_INOUT_QUAL = 43, /* INOUT_QUAL */ 176 YYSYMBOL_UNIFORM = 44, /* UNIFORM */ 177 YYSYMBOL_BUFFER = 45, /* BUFFER */ 178 YYSYMBOL_VARYING = 46, /* VARYING */ 179 YYSYMBOL_MATRIX2x3 = 47, /* MATRIX2x3 */ 180 YYSYMBOL_MATRIX3x2 = 48, /* MATRIX3x2 */ 181 YYSYMBOL_MATRIX2x4 = 49, /* MATRIX2x4 */ 182 YYSYMBOL_MATRIX4x2 = 50, /* MATRIX4x2 */ 183 YYSYMBOL_MATRIX3x4 = 51, /* MATRIX3x4 */ 184 YYSYMBOL_MATRIX4x3 = 52, /* MATRIX4x3 */ 185 YYSYMBOL_SAMPLE = 53, /* SAMPLE */ 186 YYSYMBOL_CENTROID = 54, /* CENTROID */ 187 YYSYMBOL_FLAT = 55, /* FLAT */ 188 YYSYMBOL_SMOOTH = 56, /* SMOOTH */ 189 YYSYMBOL_NOPERSPECTIVE = 57, /* NOPERSPECTIVE */ 190 YYSYMBOL_PATCH = 58, /* PATCH */ 191 YYSYMBOL_READONLY = 59, /* READONLY */ 192 YYSYMBOL_WRITEONLY = 60, /* WRITEONLY */ 193 YYSYMBOL_COHERENT = 61, /* COHERENT */ 194 YYSYMBOL_RESTRICT = 62, /* RESTRICT */ 195 YYSYMBOL_VOLATILE = 63, /* VOLATILE */ 196 YYSYMBOL_SHARED = 64, /* SHARED */ 197 YYSYMBOL_STRUCT = 65, /* STRUCT */ 198 YYSYMBOL_VOID_TYPE = 66, /* VOID_TYPE */ 199 YYSYMBOL_WHILE = 67, /* WHILE */ 200 YYSYMBOL_SAMPLER2D = 68, /* SAMPLER2D */ 201 YYSYMBOL_SAMPLERCUBE = 69, /* SAMPLERCUBE */ 202 YYSYMBOL_SAMPLER_EXTERNAL_OES = 70, /* SAMPLER_EXTERNAL_OES */ 203 YYSYMBOL_SAMPLER2DRECT = 71, /* SAMPLER2DRECT */ 204 YYSYMBOL_SAMPLER2DARRAY = 72, /* SAMPLER2DARRAY */ 205 YYSYMBOL_ISAMPLER2D = 73, /* ISAMPLER2D */ 206 YYSYMBOL_ISAMPLER3D = 74, /* ISAMPLER3D */ 207 YYSYMBOL_ISAMPLERCUBE = 75, /* ISAMPLERCUBE */ 208 YYSYMBOL_ISAMPLER2DARRAY = 76, /* ISAMPLER2DARRAY */ 209 YYSYMBOL_USAMPLER2D = 77, /* USAMPLER2D */ 210 YYSYMBOL_USAMPLER3D = 78, /* USAMPLER3D */ 211 YYSYMBOL_USAMPLERCUBE = 79, /* USAMPLERCUBE */ 212 YYSYMBOL_USAMPLER2DARRAY = 80, /* USAMPLER2DARRAY */ 213 YYSYMBOL_SAMPLER2DMS = 81, /* SAMPLER2DMS */ 214 YYSYMBOL_ISAMPLER2DMS = 82, /* ISAMPLER2DMS */ 215 YYSYMBOL_USAMPLER2DMS = 83, /* USAMPLER2DMS */ 216 YYSYMBOL_SAMPLER2DMSARRAY = 84, /* SAMPLER2DMSARRAY */ 217 YYSYMBOL_ISAMPLER2DMSARRAY = 85, /* ISAMPLER2DMSARRAY */ 218 YYSYMBOL_USAMPLER2DMSARRAY = 86, /* USAMPLER2DMSARRAY */ 219 YYSYMBOL_SAMPLER3D = 87, /* SAMPLER3D */ 220 YYSYMBOL_SAMPLER3DRECT = 88, /* SAMPLER3DRECT */ 221 YYSYMBOL_SAMPLER2DSHADOW = 89, /* SAMPLER2DSHADOW */ 222 YYSYMBOL_SAMPLERCUBESHADOW = 90, /* SAMPLERCUBESHADOW */ 223 YYSYMBOL_SAMPLER2DARRAYSHADOW = 91, /* SAMPLER2DARRAYSHADOW */ 224 YYSYMBOL_SAMPLERVIDEOWEBGL = 92, /* SAMPLERVIDEOWEBGL */ 225 YYSYMBOL_SAMPLERCUBEARRAYOES = 93, /* SAMPLERCUBEARRAYOES */ 226 YYSYMBOL_SAMPLERCUBEARRAYSHADOWOES = 94, /* SAMPLERCUBEARRAYSHADOWOES */ 227 YYSYMBOL_ISAMPLERCUBEARRAYOES = 95, /* ISAMPLERCUBEARRAYOES */ 228 YYSYMBOL_USAMPLERCUBEARRAYOES = 96, /* USAMPLERCUBEARRAYOES */ 229 YYSYMBOL_SAMPLERCUBEARRAYEXT = 97, /* SAMPLERCUBEARRAYEXT */ 230 YYSYMBOL_SAMPLERCUBEARRAYSHADOWEXT = 98, /* SAMPLERCUBEARRAYSHADOWEXT */ 231 YYSYMBOL_ISAMPLERCUBEARRAYEXT = 99, /* ISAMPLERCUBEARRAYEXT */ 232 YYSYMBOL_USAMPLERCUBEARRAYEXT = 100, /* USAMPLERCUBEARRAYEXT */ 233 YYSYMBOL_SAMPLERBUFFER = 101, /* SAMPLERBUFFER */ 234 YYSYMBOL_ISAMPLERBUFFER = 102, /* ISAMPLERBUFFER */ 235 YYSYMBOL_USAMPLERBUFFER = 103, /* USAMPLERBUFFER */ 236 YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 104, /* SAMPLEREXTERNAL2DY2YEXT */ 237 YYSYMBOL_IMAGE2D = 105, /* IMAGE2D */ 238 YYSYMBOL_IIMAGE2D = 106, /* IIMAGE2D */ 239 YYSYMBOL_UIMAGE2D = 107, /* UIMAGE2D */ 240 YYSYMBOL_IMAGE3D = 108, /* IMAGE3D */ 241 YYSYMBOL_IIMAGE3D = 109, /* IIMAGE3D */ 242 YYSYMBOL_UIMAGE3D = 110, /* UIMAGE3D */ 243 YYSYMBOL_IMAGE2DARRAY = 111, /* IMAGE2DARRAY */ 244 YYSYMBOL_IIMAGE2DARRAY = 112, /* IIMAGE2DARRAY */ 245 YYSYMBOL_UIMAGE2DARRAY = 113, /* UIMAGE2DARRAY */ 246 YYSYMBOL_IMAGECUBE = 114, /* IMAGECUBE */ 247 YYSYMBOL_IIMAGECUBE = 115, /* IIMAGECUBE */ 248 YYSYMBOL_UIMAGECUBE = 116, /* UIMAGECUBE */ 249 YYSYMBOL_IMAGECUBEARRAYOES = 117, /* IMAGECUBEARRAYOES */ 250 YYSYMBOL_IIMAGECUBEARRAYOES = 118, /* IIMAGECUBEARRAYOES */ 251 YYSYMBOL_UIMAGECUBEARRAYOES = 119, /* UIMAGECUBEARRAYOES */ 252 YYSYMBOL_IMAGECUBEARRAYEXT = 120, /* IMAGECUBEARRAYEXT */ 253 YYSYMBOL_IIMAGECUBEARRAYEXT = 121, /* IIMAGECUBEARRAYEXT */ 254 YYSYMBOL_UIMAGECUBEARRAYEXT = 122, /* UIMAGECUBEARRAYEXT */ 255 YYSYMBOL_IMAGEBUFFER = 123, /* IMAGEBUFFER */ 256 YYSYMBOL_IIMAGEBUFFER = 124, /* IIMAGEBUFFER */ 257 YYSYMBOL_UIMAGEBUFFER = 125, /* UIMAGEBUFFER */ 258 YYSYMBOL_ATOMICUINT = 126, /* ATOMICUINT */ 259 YYSYMBOL_PIXELLOCALANGLE = 127, /* PIXELLOCALANGLE */ 260 YYSYMBOL_IPIXELLOCALANGLE = 128, /* IPIXELLOCALANGLE */ 261 YYSYMBOL_UPIXELLOCALANGLE = 129, /* UPIXELLOCALANGLE */ 262 YYSYMBOL_LAYOUT = 130, /* LAYOUT */ 263 YYSYMBOL_YUVCSCSTANDARDEXT = 131, /* YUVCSCSTANDARDEXT */ 264 YYSYMBOL_YUVCSCSTANDARDEXTCONSTANT = 132, /* YUVCSCSTANDARDEXTCONSTANT */ 265 YYSYMBOL_IDENTIFIER = 133, /* IDENTIFIER */ 266 YYSYMBOL_TYPE_NAME = 134, /* TYPE_NAME */ 267 YYSYMBOL_FLOATCONSTANT = 135, /* FLOATCONSTANT */ 268 YYSYMBOL_INTCONSTANT = 136, /* INTCONSTANT */ 269 YYSYMBOL_UINTCONSTANT = 137, /* UINTCONSTANT */ 270 YYSYMBOL_BOOLCONSTANT = 138, /* BOOLCONSTANT */ 271 YYSYMBOL_FIELD_SELECTION = 139, /* FIELD_SELECTION */ 272 YYSYMBOL_LEFT_OP = 140, /* LEFT_OP */ 273 YYSYMBOL_RIGHT_OP = 141, /* RIGHT_OP */ 274 YYSYMBOL_INC_OP = 142, /* INC_OP */ 275 YYSYMBOL_DEC_OP = 143, /* DEC_OP */ 276 YYSYMBOL_LE_OP = 144, /* LE_OP */ 277 YYSYMBOL_GE_OP = 145, /* GE_OP */ 278 YYSYMBOL_EQ_OP = 146, /* EQ_OP */ 279 YYSYMBOL_NE_OP = 147, /* NE_OP */ 280 YYSYMBOL_AND_OP = 148, /* AND_OP */ 281 YYSYMBOL_OR_OP = 149, /* OR_OP */ 282 YYSYMBOL_XOR_OP = 150, /* XOR_OP */ 283 YYSYMBOL_MUL_ASSIGN = 151, /* MUL_ASSIGN */ 284 YYSYMBOL_DIV_ASSIGN = 152, /* DIV_ASSIGN */ 285 YYSYMBOL_ADD_ASSIGN = 153, /* ADD_ASSIGN */ 286 YYSYMBOL_MOD_ASSIGN = 154, /* MOD_ASSIGN */ 287 YYSYMBOL_LEFT_ASSIGN = 155, /* LEFT_ASSIGN */ 288 YYSYMBOL_RIGHT_ASSIGN = 156, /* RIGHT_ASSIGN */ 289 YYSYMBOL_AND_ASSIGN = 157, /* AND_ASSIGN */ 290 YYSYMBOL_XOR_ASSIGN = 158, /* XOR_ASSIGN */ 291 YYSYMBOL_OR_ASSIGN = 159, /* OR_ASSIGN */ 292 YYSYMBOL_SUB_ASSIGN = 160, /* SUB_ASSIGN */ 293 YYSYMBOL_LEFT_PAREN = 161, /* LEFT_PAREN */ 294 YYSYMBOL_RIGHT_PAREN = 162, /* RIGHT_PAREN */ 295 YYSYMBOL_LEFT_BRACKET = 163, /* LEFT_BRACKET */ 296 YYSYMBOL_RIGHT_BRACKET = 164, /* RIGHT_BRACKET */ 297 YYSYMBOL_LEFT_BRACE = 165, /* LEFT_BRACE */ 298 YYSYMBOL_RIGHT_BRACE = 166, /* RIGHT_BRACE */ 299 YYSYMBOL_DOT = 167, /* DOT */ 300 YYSYMBOL_COMMA = 168, /* COMMA */ 301 YYSYMBOL_COLON = 169, /* COLON */ 302 YYSYMBOL_EQUAL = 170, /* EQUAL */ 303 YYSYMBOL_SEMICOLON = 171, /* SEMICOLON */ 304 YYSYMBOL_BANG = 172, /* BANG */ 305 YYSYMBOL_DASH = 173, /* DASH */ 306 YYSYMBOL_TILDE = 174, /* TILDE */ 307 YYSYMBOL_PLUS = 175, /* PLUS */ 308 YYSYMBOL_STAR = 176, /* STAR */ 309 YYSYMBOL_SLASH = 177, /* SLASH */ 310 YYSYMBOL_PERCENT = 178, /* PERCENT */ 311 YYSYMBOL_LEFT_ANGLE = 179, /* LEFT_ANGLE */ 312 YYSYMBOL_RIGHT_ANGLE = 180, /* RIGHT_ANGLE */ 313 YYSYMBOL_VERTICAL_BAR = 181, /* VERTICAL_BAR */ 314 YYSYMBOL_CARET = 182, /* CARET */ 315 YYSYMBOL_AMPERSAND = 183, /* AMPERSAND */ 316 YYSYMBOL_QUESTION = 184, /* QUESTION */ 317 YYSYMBOL_YYACCEPT = 185, /* $accept */ 318 YYSYMBOL_identifier = 186, /* identifier */ 319 YYSYMBOL_variable_identifier = 187, /* variable_identifier */ 320 YYSYMBOL_primary_expression = 188, /* primary_expression */ 321 YYSYMBOL_postfix_expression = 189, /* postfix_expression */ 322 YYSYMBOL_integer_expression = 190, /* integer_expression */ 323 YYSYMBOL_function_call = 191, /* function_call */ 324 YYSYMBOL_function_call_or_method = 192, /* function_call_or_method */ 325 YYSYMBOL_function_call_generic = 193, /* function_call_generic */ 326 YYSYMBOL_function_call_header_no_parameters = 194, /* function_call_header_no_parameters */ 327 YYSYMBOL_function_call_header_with_parameters = 195, /* function_call_header_with_parameters */ 328 YYSYMBOL_function_call_header = 196, /* function_call_header */ 329 YYSYMBOL_function_identifier = 197, /* function_identifier */ 330 YYSYMBOL_unary_expression = 198, /* unary_expression */ 331 YYSYMBOL_unary_operator = 199, /* unary_operator */ 332 YYSYMBOL_multiplicative_expression = 200, /* multiplicative_expression */ 333 YYSYMBOL_additive_expression = 201, /* additive_expression */ 334 YYSYMBOL_shift_expression = 202, /* shift_expression */ 335 YYSYMBOL_relational_expression = 203, /* relational_expression */ 336 YYSYMBOL_equality_expression = 204, /* equality_expression */ 337 YYSYMBOL_and_expression = 205, /* and_expression */ 338 YYSYMBOL_exclusive_or_expression = 206, /* exclusive_or_expression */ 339 YYSYMBOL_inclusive_or_expression = 207, /* inclusive_or_expression */ 340 YYSYMBOL_logical_and_expression = 208, /* logical_and_expression */ 341 YYSYMBOL_logical_xor_expression = 209, /* logical_xor_expression */ 342 YYSYMBOL_logical_or_expression = 210, /* logical_or_expression */ 343 YYSYMBOL_conditional_expression = 211, /* conditional_expression */ 344 YYSYMBOL_assignment_expression = 212, /* assignment_expression */ 345 YYSYMBOL_assignment_operator = 213, /* assignment_operator */ 346 YYSYMBOL_expression = 214, /* expression */ 347 YYSYMBOL_constant_expression = 215, /* constant_expression */ 348 YYSYMBOL_enter_struct = 216, /* enter_struct */ 349 YYSYMBOL_declaration = 217, /* declaration */ 350 YYSYMBOL_function_prototype = 218, /* function_prototype */ 351 YYSYMBOL_function_declarator = 219, /* function_declarator */ 352 YYSYMBOL_function_header_with_parameters = 220, /* function_header_with_parameters */ 353 YYSYMBOL_function_header = 221, /* function_header */ 354 YYSYMBOL_parameter_declarator = 222, /* parameter_declarator */ 355 YYSYMBOL_parameter_declaration = 223, /* parameter_declaration */ 356 YYSYMBOL_parameter_type_specifier = 224, /* parameter_type_specifier */ 357 YYSYMBOL_init_declarator_list = 225, /* init_declarator_list */ 358 YYSYMBOL_single_declaration = 226, /* single_declaration */ 359 YYSYMBOL_fully_specified_type = 227, /* fully_specified_type */ 360 YYSYMBOL_interpolation_qualifier = 228, /* interpolation_qualifier */ 361 YYSYMBOL_type_qualifier = 229, /* type_qualifier */ 362 YYSYMBOL_invariant_qualifier = 230, /* invariant_qualifier */ 363 YYSYMBOL_precise_qualifier = 231, /* precise_qualifier */ 364 YYSYMBOL_single_type_qualifier = 232, /* single_type_qualifier */ 365 YYSYMBOL_storage_qualifier = 233, /* storage_qualifier */ 366 YYSYMBOL_type_specifier = 234, /* type_specifier */ 367 YYSYMBOL_precision_qualifier = 235, /* precision_qualifier */ 368 YYSYMBOL_layout_qualifier = 236, /* layout_qualifier */ 369 YYSYMBOL_layout_qualifier_id_list = 237, /* layout_qualifier_id_list */ 370 YYSYMBOL_layout_qualifier_id = 238, /* layout_qualifier_id */ 371 YYSYMBOL_type_specifier_no_prec = 239, /* type_specifier_no_prec */ 372 YYSYMBOL_array_specifier = 240, /* array_specifier */ 373 YYSYMBOL_type_specifier_nonarray = 241, /* type_specifier_nonarray */ 374 YYSYMBOL_struct_specifier = 242, /* struct_specifier */ 375 YYSYMBOL_243_1 = 243, /* $@1 */ 376 YYSYMBOL_244_2 = 244, /* $@2 */ 377 YYSYMBOL_struct_declaration_list = 245, /* struct_declaration_list */ 378 YYSYMBOL_struct_declaration = 246, /* struct_declaration */ 379 YYSYMBOL_struct_declarator_list = 247, /* struct_declarator_list */ 380 YYSYMBOL_struct_declarator = 248, /* struct_declarator */ 381 YYSYMBOL_initializer = 249, /* initializer */ 382 YYSYMBOL_declaration_statement = 250, /* declaration_statement */ 383 YYSYMBOL_statement = 251, /* statement */ 384 YYSYMBOL_simple_statement = 252, /* simple_statement */ 385 YYSYMBOL_compound_statement_with_scope = 253, /* compound_statement_with_scope */ 386 YYSYMBOL_254_3 = 254, /* $@3 */ 387 YYSYMBOL_255_4 = 255, /* $@4 */ 388 YYSYMBOL_statement_no_new_scope = 256, /* statement_no_new_scope */ 389 YYSYMBOL_statement_with_scope = 257, /* statement_with_scope */ 390 YYSYMBOL_258_5 = 258, /* $@5 */ 391 YYSYMBOL_259_6 = 259, /* $@6 */ 392 YYSYMBOL_compound_statement_no_new_scope = 260, /* compound_statement_no_new_scope */ 393 YYSYMBOL_statement_list = 261, /* statement_list */ 394 YYSYMBOL_expression_statement = 262, /* expression_statement */ 395 YYSYMBOL_selection_statement = 263, /* selection_statement */ 396 YYSYMBOL_selection_rest_statement = 264, /* selection_rest_statement */ 397 YYSYMBOL_switch_statement = 265, /* switch_statement */ 398 YYSYMBOL_266_7 = 266, /* $@7 */ 399 YYSYMBOL_case_label = 267, /* case_label */ 400 YYSYMBOL_condition = 268, /* condition */ 401 YYSYMBOL_iteration_statement = 269, /* iteration_statement */ 402 YYSYMBOL_270_8 = 270, /* $@8 */ 403 YYSYMBOL_271_9 = 271, /* $@9 */ 404 YYSYMBOL_272_10 = 272, /* $@10 */ 405 YYSYMBOL_for_init_statement = 273, /* for_init_statement */ 406 YYSYMBOL_conditionopt = 274, /* conditionopt */ 407 YYSYMBOL_for_rest_statement = 275, /* for_rest_statement */ 408 YYSYMBOL_jump_statement = 276, /* jump_statement */ 409 YYSYMBOL_translation_unit = 277, /* translation_unit */ 410 YYSYMBOL_external_declaration = 278, /* external_declaration */ 411 YYSYMBOL_function_definition = 279, /* function_definition */ 412 YYSYMBOL_280_11 = 280 /* $@11 */ 413 }; 414 typedef enum yysymbol_kind_t yysymbol_kind_t; 415 416 /* Second part of user prologue. */ 417 418 extern int yylex(YYSTYPE *yylval, YYLTYPE *yylloc, void *yyscanner); 419 extern void yyerror(YYLTYPE *yylloc, TParseContext *context, void *scanner, const char *reason); 420 421 #define YYLLOC_DEFAULT(Current, Rhs, N) \ 422 do \ 423 { \ 424 if (N) \ 425 { \ 426 (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \ 427 (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ 428 (Current).last_file = YYRHSLOC(Rhs, N).last_file; \ 429 (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ 430 } \ 431 else \ 432 { \ 433 (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \ 434 (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \ 435 (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \ 436 (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ 437 } \ 438 } while (0) 439 440 #define VERTEX_ONLY(S, L) \ 441 do \ 442 { \ 443 if (context->getShaderType() != GL_VERTEX_SHADER) \ 444 { \ 445 context->error(L, " supported in vertex shaders only", S); \ 446 } \ 447 } while (0) 448 449 #define COMPUTE_ONLY(S, L) \ 450 do \ 451 { \ 452 if (context->getShaderType() != GL_COMPUTE_SHADER) \ 453 { \ 454 context->error(L, " supported in compute shaders only", S); \ 455 } \ 456 } while (0) 457 458 #define ES2_ONLY(S, L) \ 459 do \ 460 { \ 461 if (context->getShaderVersion() != 100) \ 462 { \ 463 context->error(L, " supported in GLSL ES 1.00 only", S); \ 464 } \ 465 } while (0) 466 467 #define ES3_OR_NEWER(TOKEN, LINE, REASON) \ 468 do \ 469 { \ 470 if (context->getShaderVersion() < 300) \ 471 { \ 472 context->error(LINE, REASON " supported in GLSL ES 3.00 and above only", TOKEN); \ 473 } \ 474 } while (0) 475 476 #define ES3_1_OR_NEWER(TOKEN, LINE, REASON) \ 477 do \ 478 { \ 479 if (context->getShaderVersion() < 310) \ 480 { \ 481 context->error(LINE, REASON " supported in GLSL ES 3.10 and above only", TOKEN); \ 482 } \ 483 } while (0) 484 485 #ifdef short 486 # undef short 487 #endif 488 489 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure 490 <limits.h> and (if available) <stdint.h> are included 491 so that the code can choose integer types of a good width. */ 492 493 #ifndef __PTRDIFF_MAX__ 494 # include <limits.h> /* INFRINGES ON USER NAME SPACE */ 495 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ 496 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */ 497 # define YY_STDINT_H 498 # endif 499 #endif 500 501 /* Narrow types that promote to a signed type and that can represent a 502 signed or unsigned integer of at least N bits. In tables they can 503 save space and decrease cache pressure. Promoting to a signed type 504 helps avoid bugs in integer arithmetic. */ 505 506 #ifdef __INT_LEAST8_MAX__ 507 typedef __INT_LEAST8_TYPE__ yytype_int8; 508 #elif defined YY_STDINT_H 509 typedef int_least8_t yytype_int8; 510 #else 511 typedef signed char yytype_int8; 512 #endif 513 514 #ifdef __INT_LEAST16_MAX__ 515 typedef __INT_LEAST16_TYPE__ yytype_int16; 516 #elif defined YY_STDINT_H 517 typedef int_least16_t yytype_int16; 518 #else 519 typedef short yytype_int16; 520 #endif 521 522 /* Work around bug in HP-UX 11.23, which defines these macros 523 incorrectly for preprocessor constants. This workaround can likely 524 be removed in 2023, as HPE has promised support for HP-UX 11.23 525 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of 526 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ 527 #ifdef __hpux 528 # undef UINT_LEAST8_MAX 529 # undef UINT_LEAST16_MAX 530 # define UINT_LEAST8_MAX 255 531 # define UINT_LEAST16_MAX 65535 532 #endif 533 534 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ 535 typedef __UINT_LEAST8_TYPE__ yytype_uint8; 536 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX) 537 typedef uint_least8_t yytype_uint8; 538 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX 539 typedef unsigned char yytype_uint8; 540 #else 541 typedef short yytype_uint8; 542 #endif 543 544 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ 545 typedef __UINT_LEAST16_TYPE__ yytype_uint16; 546 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX) 547 typedef uint_least16_t yytype_uint16; 548 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX 549 typedef unsigned short yytype_uint16; 550 #else 551 typedef int yytype_uint16; 552 #endif 553 554 #ifndef YYPTRDIFF_T 555 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ 556 # define YYPTRDIFF_T __PTRDIFF_TYPE__ 557 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ 558 # elif defined PTRDIFF_MAX 559 # ifndef ptrdiff_t 560 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 561 # endif 562 # define YYPTRDIFF_T ptrdiff_t 563 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX 564 # else 565 # define YYPTRDIFF_T long 566 # define YYPTRDIFF_MAXIMUM LONG_MAX 567 # endif 568 #endif 569 570 #ifndef YYSIZE_T 571 # ifdef __SIZE_TYPE__ 572 # define YYSIZE_T __SIZE_TYPE__ 573 # elif defined size_t 574 # define YYSIZE_T size_t 575 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ 576 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 577 # define YYSIZE_T size_t 578 # else 579 # define YYSIZE_T unsigned 580 # endif 581 #endif 582 583 #define YYSIZE_MAXIMUM \ 584 YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM \ 585 : YY_CAST(YYSIZE_T, -1))) 586 587 #define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X)) 588 589 /* Stored state numbers (used for stacks). */ 590 typedef yytype_int16 yy_state_t; 591 592 /* State numbers in computations. */ 593 typedef int yy_state_fast_t; 594 595 #ifndef YY_ 596 # if defined YYENABLE_NLS && YYENABLE_NLS 597 # if ENABLE_NLS 598 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 599 # define YY_(Msgid) dgettext("bison-runtime", Msgid) 600 # endif 601 # endif 602 # ifndef YY_ 603 # define YY_(Msgid) Msgid 604 # endif 605 #endif 606 607 #ifndef YY_ATTRIBUTE_PURE 608 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) 609 # define YY_ATTRIBUTE_PURE __attribute__((__pure__)) 610 # else 611 # define YY_ATTRIBUTE_PURE 612 # endif 613 #endif 614 615 #ifndef YY_ATTRIBUTE_UNUSED 616 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) 617 # define YY_ATTRIBUTE_UNUSED __attribute__((__unused__)) 618 # else 619 # define YY_ATTRIBUTE_UNUSED 620 # endif 621 #endif 622 623 /* Suppress unused-variable warnings by "using" E. */ 624 #if !defined lint || defined __GNUC__ 625 # define YY_USE(E) ((void)(E)) 626 #else 627 # define YY_USE(E) /* empty */ 628 #endif 629 630 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 631 #if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ 632 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407 633 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 634 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") 635 # else 636 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 637 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \ 638 _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 639 # endif 640 # define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop") 641 #else 642 # define YY_INITIAL_VALUE(Value) Value 643 #endif 644 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 645 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 646 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 647 #endif 648 #ifndef YY_INITIAL_VALUE 649 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 650 #endif 651 652 #if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__ 653 # define YY_IGNORE_USELESS_CAST_BEGIN \ 654 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") 655 # define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop") 656 #endif 657 #ifndef YY_IGNORE_USELESS_CAST_BEGIN 658 # define YY_IGNORE_USELESS_CAST_BEGIN 659 # define YY_IGNORE_USELESS_CAST_END 660 #endif 661 662 #define YY_ASSERT(E) ((void)(0 && (E))) 663 664 #if !defined yyoverflow 665 666 /* The parser invokes alloca or malloc; define the necessary symbols. */ 667 668 # ifdef YYSTACK_USE_ALLOCA 669 # if YYSTACK_USE_ALLOCA 670 # ifdef __GNUC__ 671 # define YYSTACK_ALLOC __builtin_alloca 672 # elif defined __BUILTIN_VA_ARG_INCR 673 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 674 # elif defined _AIX 675 # define YYSTACK_ALLOC __alloca 676 # elif defined _MSC_VER 677 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 678 # define alloca _alloca 679 # else 680 # define YYSTACK_ALLOC alloca 681 # if !defined _ALLOCA_H && !defined EXIT_SUCCESS 682 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 683 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 684 # ifndef EXIT_SUCCESS 685 # define EXIT_SUCCESS 0 686 # endif 687 # endif 688 # endif 689 # endif 690 # endif 691 692 # ifdef YYSTACK_ALLOC 693 /* Pacify GCC's 'empty if-body' warning. */ 694 # define YYSTACK_FREE(Ptr) \ 695 do \ 696 { /* empty */ \ 697 ; \ 698 } while (0) 699 # ifndef YYSTACK_ALLOC_MAXIMUM 700 /* The OS might guarantee only one guard page at the bottom of the stack, 701 and a page size can be as small as 4096 bytes. So we cannot safely 702 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 703 to allow for a few compiler-allocated temporary stack slots. */ 704 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 705 # endif 706 # else 707 # define YYSTACK_ALLOC YYMALLOC 708 # define YYSTACK_FREE YYFREE 709 # ifndef YYSTACK_ALLOC_MAXIMUM 710 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 711 # endif 712 # if (defined __cplusplus && !defined EXIT_SUCCESS && \ 713 !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) 714 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 715 # ifndef EXIT_SUCCESS 716 # define EXIT_SUCCESS 0 717 # endif 718 # endif 719 # ifndef YYMALLOC 720 # define YYMALLOC malloc 721 # if !defined malloc && !defined EXIT_SUCCESS 722 void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 723 # endif 724 # endif 725 # ifndef YYFREE 726 # define YYFREE free 727 # if !defined free && !defined EXIT_SUCCESS 728 void free(void *); /* INFRINGES ON USER NAME SPACE */ 729 # endif 730 # endif 731 # endif 732 #endif /* !defined yyoverflow */ 733 734 #if (!defined yyoverflow && \ 735 (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \ 736 defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 737 738 /* A type that is properly aligned for any stack member. */ 739 union yyalloc 740 { 741 yy_state_t yyss_alloc; 742 YYSTYPE yyvs_alloc; 743 YYLTYPE yyls_alloc; 744 }; 745 746 /* The size of the maximum gap between one aligned stack and the next. */ 747 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1) 748 749 /* The size of an array large to enough to hold all stacks, each with 750 N elements. */ 751 # define YYSTACK_BYTES(N) \ 752 ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + \ 753 2 * YYSTACK_GAP_MAXIMUM) 754 755 # define YYCOPY_NEEDED 1 756 757 /* Relocate STACK from its old location to the new one. The 758 local variables YYSIZE and YYSTACKSIZE give the old and new number of 759 elements in the stack, and YYPTR gives the new location of the 760 stack. Advance YYPTR to a properly aligned location for the next 761 stack. */ 762 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 763 do \ 764 { \ 765 YYPTRDIFF_T yynewbytes; \ 766 YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \ 767 Stack = &yyptr->Stack_alloc; \ 768 yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \ 769 yyptr += yynewbytes / YYSIZEOF(*yyptr); \ 770 } while (0) 771 772 #endif 773 774 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 775 /* Copy COUNT objects from SRC to DST. The source and destination do 776 not overlap. */ 777 # ifndef YYCOPY 778 # if defined __GNUC__ && 1 < __GNUC__ 779 # define YYCOPY(Dst, Src, Count) \ 780 __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src))) 781 # else 782 # define YYCOPY(Dst, Src, Count) \ 783 do \ 784 { \ 785 YYPTRDIFF_T yyi; \ 786 for (yyi = 0; yyi < (Count); yyi++) \ 787 (Dst)[yyi] = (Src)[yyi]; \ 788 } while (0) 789 # endif 790 # endif 791 #endif /* !YYCOPY_NEEDED */ 792 793 /* YYFINAL -- State number of the termination state. */ 794 #define YYFINAL 167 795 /* YYLAST -- Last index in YYTABLE. */ 796 #define YYLAST 3566 797 798 /* YYNTOKENS -- Number of terminals. */ 799 #define YYNTOKENS 185 800 /* YYNNTS -- Number of nonterminals. */ 801 #define YYNNTS 96 802 /* YYNRULES -- Number of rules. */ 803 #define YYNRULES 329 804 /* YYNSTATES -- Number of states. */ 805 #define YYNSTATES 453 806 807 /* YYMAXUTOK -- Last valid token kind. */ 808 #define YYMAXUTOK 439 809 810 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM 811 as returned by yylex, with out-of-bounds checking. */ 812 #define YYTRANSLATE(YYX) \ 813 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) \ 814 : YYSYMBOL_YYUNDEF) 815 816 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 817 as returned by yylex. */ 818 static const yytype_uint8 yytranslate[] = { 819 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 820 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 821 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 822 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 823 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 824 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 825 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 826 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 827 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 828 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 829 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 830 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 831 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 832 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 833 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 834 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 835 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 836 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 837 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 838 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 839 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 840 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 841 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 842 182, 183, 184}; 843 844 #if YYDEBUG 845 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 846 static const yytype_int16 yyrline[] = { 847 0, 259, 259, 260, 263, 270, 273, 278, 283, 288, 293, 302, 308, 311, 314, 317, 848 320, 323, 329, 336, 342, 345, 353, 356, 362, 365, 371, 375, 382, 390, 393, 396, 849 402, 405, 408, 411, 418, 419, 420, 421, 429, 430, 433, 436, 443, 444, 447, 453, 850 454, 458, 465, 466, 469, 472, 475, 481, 482, 485, 491, 492, 499, 500, 507, 508, 851 515, 516, 522, 523, 529, 530, 536, 537, 543, 544, 550, 551, 552, 553, 557, 558, 852 559, 563, 567, 571, 575, 582, 585, 591, 598, 605, 608, 611, 615, 619, 623, 627, 853 631, 638, 645, 648, 655, 668, 691, 701, 704, 710, 714, 718, 722, 729, 736, 739, 854 743, 747, 752, 759, 763, 767, 771, 776, 783, 787, 793, 796, 799, 809, 813, 820, 855 826, 832, 836, 840, 843, 846, 850, 858, 863, 867, 870, 873, 876, 879, 883, 891, 856 894, 898, 901, 904, 907, 910, 913, 917, 924, 931, 934, 937, 943, 950, 953, 959, 857 962, 965, 968, 974, 977, 984, 989, 996, 1001, 1012, 1015, 1018, 1021, 1024, 1027, 1031, 858 1035, 1039, 1043, 1047, 1051, 1055, 1059, 1063, 1067, 1071, 1075, 1079, 1083, 1087, 1091, 1095, 859 1099, 1103, 1107, 1111, 1118, 1121, 1124, 1127, 1130, 1133, 1136, 1144, 1152, 1162, 1165, 1168, 860 1171, 1174, 1177, 1180, 1188, 1196, 1206, 1209, 1212, 1215, 1218, 1221, 1224, 1232, 1240, 1250, 861 1253, 1256, 1259, 1267, 1275, 1282, 1292, 1299, 1306, 1309, 1312, 1315, 1318, 1321, 1324, 1327, 862 1330, 1333, 1336, 1339, 1342, 1350, 1358, 1366, 1374, 1382, 1390, 1400, 1410, 1420, 1423, 1430, 863 1437, 1444, 1447, 1455, 1455, 1458, 1458, 1464, 1467, 1473, 1476, 1483, 1487, 1493, 1496, 1502, 864 1506, 1510, 1511, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1527, 1531, 1531, 1531, 1538, 1539, 865 1543, 1543, 1544, 1544, 1549, 1553, 1560, 1564, 1571, 1572, 1576, 1582, 1586, 1595, 1595, 1602, 866 1605, 1611, 1615, 1621, 1621, 1626, 1626, 1630, 1630, 1638, 1641, 1647, 1650, 1656, 1660, 1667, 867 1670, 1673, 1676, 1679, 1687, 1693, 1699, 1702, 1708, 1708}; 868 #endif 869 870 /** Accessing symbol of state STATE. */ 871 #define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State]) 872 873 #if YYDEBUG || 0 874 /* The user-facing name of the symbol whose (internal) number is 875 YYSYMBOL. No bounds checking. */ 876 static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; 877 878 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 879 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 880 static const char *const yytname[] = {"\"end of file\"", 881 "error", 882 "\"invalid token\"", 883 "INVARIANT", 884 "PRECISE", 885 "HIGH_PRECISION", 886 "MEDIUM_PRECISION", 887 "LOW_PRECISION", 888 "PRECISION", 889 "ATTRIBUTE", 890 "CONST_QUAL", 891 "BOOL_TYPE", 892 "FLOAT_TYPE", 893 "INT_TYPE", 894 "UINT_TYPE", 895 "BREAK", 896 "CONTINUE", 897 "DO", 898 "ELSE", 899 "FOR", 900 "IF", 901 "DISCARD", 902 "RETURN", 903 "SWITCH", 904 "CASE", 905 "DEFAULT", 906 "BVEC2", 907 "BVEC3", 908 "BVEC4", 909 "IVEC2", 910 "IVEC3", 911 "IVEC4", 912 "VEC2", 913 "VEC3", 914 "VEC4", 915 "UVEC2", 916 "UVEC3", 917 "UVEC4", 918 "MATRIX2", 919 "MATRIX3", 920 "MATRIX4", 921 "IN_QUAL", 922 "OUT_QUAL", 923 "INOUT_QUAL", 924 "UNIFORM", 925 "BUFFER", 926 "VARYING", 927 "MATRIX2x3", 928 "MATRIX3x2", 929 "MATRIX2x4", 930 "MATRIX4x2", 931 "MATRIX3x4", 932 "MATRIX4x3", 933 "SAMPLE", 934 "CENTROID", 935 "FLAT", 936 "SMOOTH", 937 "NOPERSPECTIVE", 938 "PATCH", 939 "READONLY", 940 "WRITEONLY", 941 "COHERENT", 942 "RESTRICT", 943 "VOLATILE", 944 "SHARED", 945 "STRUCT", 946 "VOID_TYPE", 947 "WHILE", 948 "SAMPLER2D", 949 "SAMPLERCUBE", 950 "SAMPLER_EXTERNAL_OES", 951 "SAMPLER2DRECT", 952 "SAMPLER2DARRAY", 953 "ISAMPLER2D", 954 "ISAMPLER3D", 955 "ISAMPLERCUBE", 956 "ISAMPLER2DARRAY", 957 "USAMPLER2D", 958 "USAMPLER3D", 959 "USAMPLERCUBE", 960 "USAMPLER2DARRAY", 961 "SAMPLER2DMS", 962 "ISAMPLER2DMS", 963 "USAMPLER2DMS", 964 "SAMPLER2DMSARRAY", 965 "ISAMPLER2DMSARRAY", 966 "USAMPLER2DMSARRAY", 967 "SAMPLER3D", 968 "SAMPLER3DRECT", 969 "SAMPLER2DSHADOW", 970 "SAMPLERCUBESHADOW", 971 "SAMPLER2DARRAYSHADOW", 972 "SAMPLERVIDEOWEBGL", 973 "SAMPLERCUBEARRAYOES", 974 "SAMPLERCUBEARRAYSHADOWOES", 975 "ISAMPLERCUBEARRAYOES", 976 "USAMPLERCUBEARRAYOES", 977 "SAMPLERCUBEARRAYEXT", 978 "SAMPLERCUBEARRAYSHADOWEXT", 979 "ISAMPLERCUBEARRAYEXT", 980 "USAMPLERCUBEARRAYEXT", 981 "SAMPLERBUFFER", 982 "ISAMPLERBUFFER", 983 "USAMPLERBUFFER", 984 "SAMPLEREXTERNAL2DY2YEXT", 985 "IMAGE2D", 986 "IIMAGE2D", 987 "UIMAGE2D", 988 "IMAGE3D", 989 "IIMAGE3D", 990 "UIMAGE3D", 991 "IMAGE2DARRAY", 992 "IIMAGE2DARRAY", 993 "UIMAGE2DARRAY", 994 "IMAGECUBE", 995 "IIMAGECUBE", 996 "UIMAGECUBE", 997 "IMAGECUBEARRAYOES", 998 "IIMAGECUBEARRAYOES", 999 "UIMAGECUBEARRAYOES", 1000 "IMAGECUBEARRAYEXT", 1001 "IIMAGECUBEARRAYEXT", 1002 "UIMAGECUBEARRAYEXT", 1003 "IMAGEBUFFER", 1004 "IIMAGEBUFFER", 1005 "UIMAGEBUFFER", 1006 "ATOMICUINT", 1007 "PIXELLOCALANGLE", 1008 "IPIXELLOCALANGLE", 1009 "UPIXELLOCALANGLE", 1010 "LAYOUT", 1011 "YUVCSCSTANDARDEXT", 1012 "YUVCSCSTANDARDEXTCONSTANT", 1013 "IDENTIFIER", 1014 "TYPE_NAME", 1015 "FLOATCONSTANT", 1016 "INTCONSTANT", 1017 "UINTCONSTANT", 1018 "BOOLCONSTANT", 1019 "FIELD_SELECTION", 1020 "LEFT_OP", 1021 "RIGHT_OP", 1022 "INC_OP", 1023 "DEC_OP", 1024 "LE_OP", 1025 "GE_OP", 1026 "EQ_OP", 1027 "NE_OP", 1028 "AND_OP", 1029 "OR_OP", 1030 "XOR_OP", 1031 "MUL_ASSIGN", 1032 "DIV_ASSIGN", 1033 "ADD_ASSIGN", 1034 "MOD_ASSIGN", 1035 "LEFT_ASSIGN", 1036 "RIGHT_ASSIGN", 1037 "AND_ASSIGN", 1038 "XOR_ASSIGN", 1039 "OR_ASSIGN", 1040 "SUB_ASSIGN", 1041 "LEFT_PAREN", 1042 "RIGHT_PAREN", 1043 "LEFT_BRACKET", 1044 "RIGHT_BRACKET", 1045 "LEFT_BRACE", 1046 "RIGHT_BRACE", 1047 "DOT", 1048 "COMMA", 1049 "COLON", 1050 "EQUAL", 1051 "SEMICOLON", 1052 "BANG", 1053 "DASH", 1054 "TILDE", 1055 "PLUS", 1056 "STAR", 1057 "SLASH", 1058 "PERCENT", 1059 "LEFT_ANGLE", 1060 "RIGHT_ANGLE", 1061 "VERTICAL_BAR", 1062 "CARET", 1063 "AMPERSAND", 1064 "QUESTION", 1065 "$accept", 1066 "identifier", 1067 "variable_identifier", 1068 "primary_expression", 1069 "postfix_expression", 1070 "integer_expression", 1071 "function_call", 1072 "function_call_or_method", 1073 "function_call_generic", 1074 "function_call_header_no_parameters", 1075 "function_call_header_with_parameters", 1076 "function_call_header", 1077 "function_identifier", 1078 "unary_expression", 1079 "unary_operator", 1080 "multiplicative_expression", 1081 "additive_expression", 1082 "shift_expression", 1083 "relational_expression", 1084 "equality_expression", 1085 "and_expression", 1086 "exclusive_or_expression", 1087 "inclusive_or_expression", 1088 "logical_and_expression", 1089 "logical_xor_expression", 1090 "logical_or_expression", 1091 "conditional_expression", 1092 "assignment_expression", 1093 "assignment_operator", 1094 "expression", 1095 "constant_expression", 1096 "enter_struct", 1097 "declaration", 1098 "function_prototype", 1099 "function_declarator", 1100 "function_header_with_parameters", 1101 "function_header", 1102 "parameter_declarator", 1103 "parameter_declaration", 1104 "parameter_type_specifier", 1105 "init_declarator_list", 1106 "single_declaration", 1107 "fully_specified_type", 1108 "interpolation_qualifier", 1109 "type_qualifier", 1110 "invariant_qualifier", 1111 "precise_qualifier", 1112 "single_type_qualifier", 1113 "storage_qualifier", 1114 "type_specifier", 1115 "precision_qualifier", 1116 "layout_qualifier", 1117 "layout_qualifier_id_list", 1118 "layout_qualifier_id", 1119 "type_specifier_no_prec", 1120 "array_specifier", 1121 "type_specifier_nonarray", 1122 "struct_specifier", 1123 "$@1", 1124 "$@2", 1125 "struct_declaration_list", 1126 "struct_declaration", 1127 "struct_declarator_list", 1128 "struct_declarator", 1129 "initializer", 1130 "declaration_statement", 1131 "statement", 1132 "simple_statement", 1133 "compound_statement_with_scope", 1134 "$@3", 1135 "$@4", 1136 "statement_no_new_scope", 1137 "statement_with_scope", 1138 "$@5", 1139 "$@6", 1140 "compound_statement_no_new_scope", 1141 "statement_list", 1142 "expression_statement", 1143 "selection_statement", 1144 "selection_rest_statement", 1145 "switch_statement", 1146 "$@7", 1147 "case_label", 1148 "condition", 1149 "iteration_statement", 1150 "$@8", 1151 "$@9", 1152 "$@10", 1153 "for_init_statement", 1154 "conditionopt", 1155 "for_rest_statement", 1156 "jump_statement", 1157 "translation_unit", 1158 "external_declaration", 1159 "function_definition", 1160 "$@11", 1161 YY_NULLPTR}; 1162 1163 static const char *yysymbol_name(yysymbol_kind_t yysymbol) 1164 { 1165 return yytname[yysymbol]; 1166 } 1167 #endif 1168 1169 #define YYPACT_NINF (-397) 1170 1171 #define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) 1172 1173 #define YYTABLE_NINF (-289) 1174 1175 #define yytable_value_is_error(Yyn) 0 1176 1177 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1178 STATE-NUM. */ 1179 static const yytype_int16 yypact[] = { 1180 3052, -397, -397, -397, -397, -397, 105, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1181 -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1182 -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1183 -397, -397, -397, -397, -94, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1184 -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1185 -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1186 -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 1187 -397, -397, -397, -132, -397, -397, -397, -81, -41, -49, 3184, -90, -397, -86, -397, 1609, 1188 -397, -397, -397, -397, -397, -397, -397, -397, -39, -397, 2920, -397, -397, 3432, -397, -397, 1189 -397, -31, -47, -397, -26, -397, 3184, -397, -397, -397, 3184, 3, 3, -397, -35, -135, 1190 -114, -397, 3184, -397, -397, 1734, -10, -397, -397, -6, 3184, -397, -397, -9, -93, -397, 1191 438, -397, -397, -397, -397, -39, -97, -397, 2193, -87, -397, -397, 3184, 3, 2497, -397, 1192 -397, 7, -397, -397, -397, -397, -397, 2193, 2193, 2193, -397, -397, -397, -397, -397, -397, 1193 -397, -78, -397, -397, -397, 12, -69, 2344, 8, -397, 2193, -33, -96, -116, -124, 5, 1194 -12, -7, -4, 31, 30, -123, -397, 17, -397, 1888, -397, 2638, 3184, 19, -397, -47, 1195 13, 14, -397, 22, 25, 16, 2042, 28, 2193, 32, 44, 37, -397, -397, 40, -397, 1196 -397, -80, -397, -81, 45, -397, -397, -397, -397, 611, -397, -397, -397, -397, -397, -397, 1197 -10, 2193, -83, -397, -397, 2193, 3, -39, -76, -397, -111, -397, -397, -397, -62, -397, 1198 -397, 2193, 3308, -397, -397, 2193, 46, -397, -397, -397, 2193, 2193, 2193, 2193, 2193, 2193, 1199 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193, -397, -397, 1200 47, -397, 2779, -397, -397, -397, -397, -397, 48, -397, 2193, -397, -397, -48, 2193, 43, 1201 -397, -397, -397, 784, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, 2193, 1202 2193, -397, -397, -397, -397, 2193, -397, -43, -10, 3, -397, -122, -397, -397, 51, 41, 1203 -397, 55, -397, -397, -397, -397, -397, -33, -33, -96, -96, -116, -116, -116, -116, -124, 1204 -124, 5, -12, -7, -4, 31, 30, -11, -397, -397, 150, -26, 1130, 1303, -60, -397, 1205 -59, -397, 1456, 784, -397, -397, -397, -397, -397, -397, -109, -397, 2193, 57, -397, -397, 1206 -397, -397, 1456, 48, -397, 41, 3, 3184, 58, 56, -397, -397, 2193, -397, 50, 61, 1207 206, -397, 60, 59, 957, -397, -55, 2193, 957, 48, -397, 2193, -397, -397, -397, 63, 1208 41, -397, -397, -397, -397}; 1209 1210 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 1211 Performed when YYTABLE does not specify something else to do. Zero 1212 means the default is an error. */ 1213 static const yytype_int16 yydefact[] = { 1214 0, 127, 128, 153, 154, 155, 0, 135, 137, 173, 170, 171, 172, 177, 178, 179, 180, 181, 182, 1215 174, 175, 176, 183, 184, 185, 186, 187, 188, 138, 139, 140, 143, 144, 136, 189, 190, 191, 192, 1216 193, 194, 151, 141, 123, 122, 124, 142, 145, 146, 147, 148, 149, 150, 0, 169, 196, 198, 229, 1217 231, 199, 205, 206, 207, 208, 214, 215, 216, 217, 200, 209, 218, 201, 210, 219, 197, 223, 224, 1218 225, 228, 202, 226, 211, 220, 203, 227, 212, 221, 204, 213, 222, 230, 232, 233, 234, 235, 236, 1219 237, 238, 239, 240, 241, 242, 243, 244, 246, 248, 245, 247, 249, 250, 251, 252, 253, 254, 255, 1220 256, 0, 195, 258, 327, 328, 0, 99, 98, 0, 110, 115, 132, 0, 133, 134, 125, 129, 120, 1221 131, 130, 152, 163, 257, 0, 324, 326, 0, 2, 3, 261, 0, 0, 89, 0, 97, 0, 106, 1222 100, 108, 0, 109, 0, 90, 2, 116, 0, 95, 0, 126, 121, 0, 164, 1, 325, 0, 0, 1223 259, 162, 159, 0, 157, 0, 329, 101, 105, 107, 103, 111, 102, 0, 117, 88, 96, 0, 0, 1224 0, 263, 10, 4, 8, 6, 7, 9, 31, 0, 0, 0, 165, 38, 37, 39, 36, 5, 12, 1225 32, 14, 19, 20, 0, 0, 25, 0, 40, 0, 44, 47, 50, 55, 58, 60, 62, 64, 66, 1226 68, 70, 87, 0, 29, 0, 91, 0, 0, 0, 156, 0, 0, 0, 309, 0, 0, 0, 0, 1227 0, 0, 0, 0, 283, 292, 296, 40, 72, 85, 0, 272, 0, 152, 275, 294, 274, 273, 0, 1228 276, 277, 278, 279, 280, 281, 104, 0, 112, 271, 119, 0, 0, 269, 0, 267, 0, 264, 33, 1229 34, 0, 16, 17, 0, 0, 23, 22, 0, 169, 26, 28, 35, 0, 0, 0, 0, 0, 0, 1230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 167, 0, 262, 0, 1231 160, 161, 158, 320, 319, 290, 311, 0, 323, 321, 0, 0, 0, 304, 307, 282, 0, 75, 76, 1232 78, 77, 80, 81, 82, 83, 84, 79, 74, 0, 0, 297, 293, 295, 114, 0, 118, 0, 270, 1233 0, 265, 0, 92, 11, 0, 18, 30, 15, 21, 27, 41, 42, 43, 46, 45, 48, 49, 53, 1234 54, 51, 52, 56, 57, 59, 61, 63, 65, 67, 69, 0, 168, 260, 0, 0, 0, 0, 0, 1235 322, 0, 303, 0, 284, 73, 86, 113, 266, 268, 93, 0, 13, 0, 0, 289, 291, 314, 313, 1236 316, 290, 301, 305, 0, 0, 0, 0, 94, 71, 0, 315, 0, 0, 300, 298, 0, 0, 0, 1237 285, 0, 317, 0, 290, 302, 0, 287, 308, 286, 0, 318, 312, 299, 306, 310}; 1238 1239 /* YYPGOTO[NTERM-NUM]. */ 1240 static const yytype_int16 yypgoto[] = { 1241 -397, -51, -397, -397, -397, -397, -397, -397, -64, -397, -397, -397, -397, 42, -397, -142, 1242 -140, -175, -143, -84, -75, -85, -82, -77, -73, -397, -151, -179, -397, -188, -202, -397, 1243 9, 10, -397, -397, -397, 77, 89, 90, -397, -397, -375, -397, -118, -397, -397, -121, 1244 -397, -120, 239, -397, -397, 15, 0, -144, -397, -397, -397, -397, -152, -182, -32, -113, 1245 -261, -150, -254, -377, -185, -397, -397, -187, -396, -397, -397, -145, -72, -141, -397, -397, 1246 -397, -397, -397, -166, -397, -397, -397, -397, -397, -397, -397, -397, -397, 117, -397, -397}; 1247 1248 /* YYDEFGOTO[NTERM-NUM]. */ 1249 static const yytype_int16 yydefgoto[] = { 1250 0, 279, 207, 208, 209, 366, 210, 211, 212, 213, 214, 215, 216, 254, 218, 219, 1251 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 255, 256, 351, 257, 231, 162, 1252 258, 259, 120, 121, 122, 151, 152, 153, 123, 124, 125, 126, 127, 128, 129, 130, 1253 131, 132, 133, 134, 174, 175, 232, 166, 136, 137, 236, 170, 190, 191, 280, 281, 1254 276, 261, 262, 263, 264, 339, 425, 445, 394, 395, 396, 446, 265, 266, 267, 433, 1255 268, 434, 269, 424, 270, 402, 328, 397, 418, 430, 431, 271, 138, 139, 140, 148}; 1256 1257 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 1258 positive, shift that token. If negative, reduce the rule whose 1259 number is the opposite. If YYTABLE_NINF, syntax error. */ 1260 static const yytype_int16 yytable[] = { 1261 135, 145, 155, 177, 154, 275, 163, 164, 283, 118, 119, 355, 356, 286, 230, 185, 358, 172, 235, 1262 415, 305, 306, 363, 432, 303, 304, 316, 422, 165, 146, 155, 320, 154, 163, 155, 184, 295, 272, 1263 274, 142, 143, 165, 189, 422, 188, 450, 335, 158, 143, 409, 189, 186, 188, 283, 233, 307, 308, 1264 187, 333, 444, 364, 317, 426, 444, 287, 288, 165, 163, 278, 238, 189, 144, 188, 273, 159, 239, 1265 233, 301, 156, 302, 233, 157, 230, 277, 322, 289, 173, 357, 352, 290, 147, 353, 361, 292, 275, 1266 362, 406, 230, 275, 293, 365, 367, 419, 420, 181, 182, 352, 447, 352, 352, 3, 4, 5, 352, 1267 371, 189, 189, 188, 188, 150, 352, 149, 135, 399, 165, 361, 183, 135, 407, 391, 379, 380, 381, 1268 382, 171, 360, 142, 143, 135, 176, 283, 169, 398, 298, 299, 300, 400, 118, 119, 355, 135, 309, 1269 310, 233, 135, 323, 324, 352, 412, 375, 376, 237, 135, 377, 378, 234, 383, 384, -30, 296, 135, 1270 311, 404, 405, 291, 312, 260, 313, 275, 314, 315, 318, 451, 329, 326, 327, 330, 331, 135, 334, 1271 135, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 336, 189, 338, 188, 337, -29, 217, -24, 1272 352, 350, 392, 401, -288, 421, 411, -31, 413, 428, 410, 436, 439, 437, 440, 441, 251, 370, 385, 1273 387, 443, 421, 179, 388, 427, 452, 135, 135, 386, 389, 178, 438, 284, 285, 390, 180, 141, 359, 1274 416, 408, 442, 414, 448, 429, 449, 325, 168, 417, 0, 0, 0, 297, 0, 0, 0, 275, 260, 1275 0, 403, 0, 0, 0, 0, 0, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 423, 1276 0, 0, 0, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, 0, 163, 164, 1277 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 1278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 372, 373, 1279 374, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 0, 0, 1280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 0, 1281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 260, 0, 1282 0, 0, 0, 260, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1283 260, 0, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 1284 0, 0, 0, 260, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 240, 241, 242, 1285 0, 243, 244, 245, 246, 247, 248, 249, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1286 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 1287 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 250, 54, 55, 56, 57, 58, 59, 60, 1288 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 1289 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1290 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 1291 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 1292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 251, 252, 0, 0, 0, 1293 0, 253, 203, 204, 205, 206, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 240, 1294 241, 242, 0, 243, 244, 245, 246, 247, 248, 249, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1295 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1296 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 250, 54, 55, 56, 57, 58, 1297 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 1298 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 1299 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 1300 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 0, 0, 1301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 251, 354, 0, 1302 0, 0, 0, 253, 203, 204, 205, 206, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1303 12, 240, 241, 242, 0, 243, 244, 245, 246, 247, 248, 249, 13, 14, 15, 16, 17, 18, 19, 1304 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 1305 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 250, 54, 55, 56, 1306 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 1307 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 1308 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 1309 113, 114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 1310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 251, 1311 0, 0, 0, 0, 0, 253, 203, 204, 205, 206, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1312 10, 11, 12, 240, 241, 242, 0, 243, 244, 245, 246, 247, 248, 249, 13, 14, 15, 16, 17, 1313 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1314 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 250, 54, 1315 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 1316 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 1317 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1318 111, 112, 113, 114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 1319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 1320 0, 176, 0, 0, 0, 0, 0, 253, 203, 204, 205, 206, 1, 2, 3, 4, 5, 6, 7, 1321 8, 9, 10, 11, 12, 240, 241, 242, 0, 243, 244, 245, 246, 247, 248, 249, 13, 14, 15, 1322 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1323 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1324 250, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 1325 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 1326 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 1327 109, 110, 111, 112, 113, 114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 1328 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 1329 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 203, 204, 205, 206, 1, 2, 3, 4, 5, 1330 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1331 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1332 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 1333 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 1334 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1335 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 1336 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 1337 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 1338 5, 201, 7, 8, 9, 10, 11, 12, 0, 0, 0, 253, 203, 204, 205, 206, 0, 0, 0, 1339 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1340 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1341 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1342 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 1343 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 1344 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 192, 193, 117, 194, 195, 196, 197, 198, 1345 0, 0, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 1346 4, 5, 201, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, 1347 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1348 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 1349 50, 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 1350 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 1351 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 1352 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, 160, 117, 0, 9, 10, 11, 1353 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 1354 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 161, 34, 35, 36, 37, 38, 1355 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 1356 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 1357 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 1358 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 1359 113, 114, 0, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 0, 0, 1360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 202, 9, 1361 10, 11, 12, 0, 0, 0, 203, 204, 205, 206, 0, 0, 0, 0, 13, 14, 15, 16, 17, 1362 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 1363 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 1364 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 1365 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 1366 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1367 111, 112, 113, 114, 0, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 1368 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 1369 319, 9, 10, 11, 12, 0, 0, 0, 203, 204, 205, 206, 0, 0, 0, 0, 13, 14, 15, 1370 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 1371 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 1372 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 1373 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 1374 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 1375 109, 110, 111, 112, 113, 114, 0, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 1376 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 1377 9, 10, 11, 12, 0, 0, 0, 0, 0, 332, 203, 204, 205, 206, 0, 13, 14, 15, 16, 1378 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 1379 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 1380 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 1381 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 1382 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 1383 110, 111, 112, 113, 114, 0, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 1384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 9, 1385 10, 11, 12, 0, 0, 0, 0, 0, 0, 203, 204, 205, 206, 0, 13, 14, 15, 16, 17, 1386 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 1387 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 294, 0, 54, 1388 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 1389 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 1390 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1391 111, 112, 113, 114, 0, 116, 192, 193, 117, 194, 195, 196, 197, 198, 0, 0, 199, 200, 0, 1392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 201, 7, 8, 1393 9, 10, 11, 12, 0, 0, 0, 0, 203, 204, 205, 206, 0, 0, 0, 13, 14, 15, 16, 1394 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1395 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 1396 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 1397 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 1398 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 1399 110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1400 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 1401 0, 0, 0, 282, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 1402 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 1403 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1404 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 1405 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1406 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 0, 1407 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 1408 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 13, 14, 15, 16, 17, 18, 19, 1409 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 1410 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 1411 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 1412 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 1413 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 1414 113, 114, 115, 116, 0, 0, 117, 0, 0, 0, 0, 0, 0, 167, 0, 0, 1, 2, 3, 1415 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1416 393, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1417 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 1418 50, 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 1419 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 1420 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 1421 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 1, 2, 3, 4, 1422 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1423 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1424 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1425 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1426 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 1427 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 1428 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 1, 2, 3, 4, 5, 1429 0, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1430 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1431 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 1432 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 1433 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1434 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 1435 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, 0, 117, 9, 10, 11, 12, 0, 0, 1436 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1437 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 1438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 1439 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 1440 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 1441 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 1442 116, 0, 368, 117, 9, 10, 11, 12, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1443 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 1444 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1445 0, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1446 69, 70, 71, 72, 73, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 1447 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 1448 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 116, 0, 0, 117}; 1449 1450 static const yytype_int16 yycheck[] = { 1451 0, 52, 122, 148, 122, 184, 127, 127, 190, 0, 0, 265, 273, 201, 165, 159, 277, 64, 170, 1452 396, 144, 145, 133, 419, 140, 141, 149, 402, 163, 161, 150, 233, 150, 154, 154, 170, 215, 181, 1453 182, 133, 134, 163, 162, 418, 162, 441, 248, 133, 134, 171, 170, 165, 170, 235, 163, 179, 180, 1454 171, 246, 436, 171, 184, 171, 440, 142, 143, 163, 188, 188, 162, 190, 165, 190, 170, 125, 168, 1455 163, 173, 168, 175, 163, 171, 233, 170, 236, 163, 133, 170, 168, 167, 171, 171, 168, 162, 273, 1456 171, 357, 248, 277, 168, 162, 289, 162, 162, 155, 156, 168, 162, 168, 168, 5, 6, 7, 168, 1457 293, 235, 236, 235, 236, 168, 168, 162, 122, 171, 163, 168, 161, 127, 171, 317, 305, 306, 307, 1458 308, 165, 279, 133, 134, 138, 165, 322, 141, 330, 176, 177, 178, 334, 138, 138, 403, 150, 146, 1459 147, 163, 154, 136, 137, 168, 169, 301, 302, 170, 162, 303, 304, 171, 309, 310, 161, 161, 170, 1460 183, 351, 352, 162, 182, 176, 181, 357, 148, 150, 164, 443, 161, 171, 171, 161, 171, 188, 161, 1461 190, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 169, 322, 166, 322, 161, 161, 165, 162, 1462 168, 170, 164, 169, 165, 402, 164, 161, 67, 161, 363, 162, 171, 166, 162, 18, 165, 290, 311, 1463 313, 170, 418, 154, 314, 412, 171, 235, 236, 312, 315, 150, 428, 199, 200, 316, 154, 6, 278, 1464 397, 361, 434, 395, 439, 418, 440, 239, 138, 397, -1, -1, -1, 218, -1, -1, -1, 443, 265, 1465 -1, 339, -1, -1, -1, -1, -1, -1, -1, 233, -1, -1, -1, -1, -1, -1, -1, -1, 402, 1466 -1, -1, -1, -1, -1, 248, -1, -1, -1, -1, -1, -1, -1, -1, -1, 418, -1, 423, 423, 1467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 322, 1468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, 298, 299, 1469 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, 1470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 422, -1, -1, -1, -1, -1, -1, -1, -1, 1471 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 396, 397, -1, 1472 -1, -1, -1, 402, 403, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1473 418, -1, -1, -1, -1, 423, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 1474 -1, -1, -1, 440, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1475 -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1476 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 1477 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 1478 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 1479 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 1480 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 1481 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, 1482 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, -1, 165, 166, -1, -1, -1, 1483 -1, 171, 172, 173, 174, 175, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1484 16, 17, -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1485 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1486 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 1487 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 1488 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1489 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 1490 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, -1, -1, 1491 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, -1, 165, 166, -1, 1492 -1, -1, -1, 171, 172, 173, 174, 175, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1493 14, 15, 16, 17, -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1494 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 1495 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 1496 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 1497 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 1498 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 1499 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, 1500 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, -1, 165, 1501 -1, -1, -1, -1, -1, 171, 172, 173, 174, 175, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1502 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1503 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 1504 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1505 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1506 -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 1507 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 1508 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, 1509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, 1510 -1, 165, -1, -1, -1, -1, -1, 171, 172, 173, 174, 175, 3, 4, 5, 6, 7, 8, 9, 1511 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1512 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 1513 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 1514 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 1515 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 1516 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 1517 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 1518 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, 1519 -1, -1, -1, -1, -1, -1, -1, -1, -1, 171, 172, 173, 174, 175, 3, 4, 5, 6, 7, 1520 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 1521 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1522 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1523 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 1524 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1525 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 1526 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, 1527 -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 1528 7, 161, 9, 10, 11, 12, 13, 14, -1, -1, -1, 171, 172, 173, 174, 175, -1, -1, -1, 1529 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1530 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1531 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 1532 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1533 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 1534 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 1535 -1, -1, 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 1536 6, 7, 161, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, 172, 173, 174, 175, -1, -1, 1537 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 1538 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 1539 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 1540 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1541 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 1542 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, 134, -1, 11, 12, 13, 1543 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 1544 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, 171, 47, 48, 49, 50, 51, 1545 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 1546 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 1547 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 1548 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 1549 128, 129, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, -1, -1, 1550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, 164, 11, 1551 12, 13, 14, -1, -1, -1, 172, 173, 174, 175, -1, -1, -1, -1, 26, 27, 28, 29, 30, 1552 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 1553 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 1554 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1555 -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 1556 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 1557 126, 127, 128, 129, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, 1558 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, -1, 1559 164, 11, 12, 13, 14, -1, -1, -1, 172, 173, 174, 175, -1, -1, -1, -1, 26, 27, 28, 1560 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 1561 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, 1562 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 1563 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 1564 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 1565 124, 125, 126, 127, 128, 129, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 1566 143, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, 1567 11, 12, 13, 14, -1, -1, -1, -1, -1, 171, 172, 173, 174, 175, -1, 26, 27, 28, 29, 1568 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 1569 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 1570 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 1571 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 1572 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 1573 125, 126, 127, 128, 129, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, 1574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, 11, 1575 12, 13, 14, -1, -1, -1, -1, -1, -1, 172, 173, 174, 175, -1, 26, 27, 28, 29, 30, 1576 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 1577 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 1578 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1579 -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 1580 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 1581 126, 127, 128, 129, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 142, 143, -1, 1582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 161, 9, 10, 1583 11, 12, 13, 14, -1, -1, -1, -1, 172, 173, 174, 175, -1, -1, -1, 26, 27, 28, 29, 1584 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 1585 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 1586 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 1587 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 1588 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 1589 125, 126, 127, 128, 129, 130, 131, -1, -1, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1590 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, 1591 -1, -1, -1, 166, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1592 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 1593 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 1594 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1595 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 1596 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, -1, 134, -1, 1597 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 1598 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 166, 26, 27, 28, 29, 30, 31, 32, 1599 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 1600 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, 70, 1601 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 1602 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 1603 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 1604 128, 129, 130, 131, -1, -1, 134, -1, -1, -1, -1, -1, -1, 0, -1, -1, 3, 4, 5, 1605 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1606 166, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 1607 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 1608 63, 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 1609 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1610 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 1611 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, -1, 134, 3, 4, 5, 6, 1612 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1613 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1614 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1615 64, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 1616 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1617 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 1618 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, -1, 134, 3, 4, 5, 6, 7, 1619 -1, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 1620 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1621 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1622 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 1623 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1624 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 1625 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, -1, 134, 11, 12, 13, 14, -1, -1, 1626 -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1627 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, 1628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 1629 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 1630 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 1631 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 1632 131, -1, 133, 134, 11, 12, 13, 14, 139, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1633 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, 1634 -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1635 -1, 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 1636 83, 84, 85, 86, 87, -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1637 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 1638 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, 131, -1, -1, 134}; 1639 1640 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of 1641 state STATE-NUM. */ 1642 static const yytype_int16 yystos[] = { 1643 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 26, 27, 28, 29, 30, 31, 1644 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1645 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 1646 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 1647 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 1648 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 1649 129, 130, 131, 134, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 1650 235, 236, 239, 241, 242, 277, 278, 279, 235, 133, 134, 165, 186, 161, 171, 280, 162, 168, 222, 1651 223, 224, 229, 234, 168, 171, 133, 186, 133, 171, 216, 232, 234, 163, 240, 0, 278, 239, 244, 1652 165, 64, 133, 237, 238, 165, 260, 223, 222, 224, 186, 186, 161, 170, 240, 165, 171, 229, 234, 1653 245, 246, 132, 133, 135, 136, 137, 138, 139, 142, 143, 161, 164, 172, 173, 174, 175, 187, 188, 1654 189, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 1655 209, 210, 211, 215, 239, 163, 171, 245, 243, 170, 162, 168, 15, 16, 17, 19, 20, 21, 22, 1656 23, 24, 25, 67, 165, 166, 171, 198, 211, 212, 214, 217, 218, 239, 250, 251, 252, 253, 261, 1657 262, 263, 265, 267, 269, 276, 240, 170, 240, 212, 249, 170, 234, 186, 247, 248, 166, 246, 198, 1658 198, 214, 142, 143, 163, 167, 162, 162, 168, 66, 212, 161, 198, 176, 177, 178, 173, 175, 140, 1659 141, 144, 145, 179, 180, 146, 147, 183, 182, 181, 148, 150, 149, 184, 164, 164, 215, 166, 245, 1660 136, 137, 238, 171, 171, 271, 161, 161, 171, 171, 214, 161, 215, 169, 161, 166, 254, 151, 152, 1661 153, 154, 155, 156, 157, 158, 159, 160, 170, 213, 168, 171, 166, 251, 249, 170, 249, 247, 240, 1662 168, 171, 133, 171, 162, 190, 214, 133, 139, 193, 212, 198, 198, 198, 200, 200, 201, 201, 202, 1663 202, 202, 202, 203, 203, 204, 205, 206, 207, 208, 209, 214, 164, 166, 257, 258, 259, 272, 214, 1664 171, 214, 169, 270, 261, 212, 212, 249, 171, 248, 171, 240, 164, 169, 67, 260, 252, 250, 262, 1665 273, 162, 162, 214, 227, 229, 268, 255, 171, 212, 161, 268, 274, 275, 257, 264, 266, 186, 162, 1666 166, 214, 171, 162, 18, 253, 170, 252, 256, 260, 162, 214, 256, 257, 249, 171}; 1667 1668 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ 1669 static const yytype_int16 yyr1[] = { 1670 0, 185, 186, 186, 187, 188, 188, 188, 188, 188, 188, 188, 189, 189, 189, 189, 189, 189, 190, 1671 191, 192, 192, 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, 198, 198, 198, 198, 199, 199, 1672 199, 199, 200, 200, 200, 200, 201, 201, 201, 202, 202, 202, 203, 203, 203, 203, 203, 204, 204, 1673 204, 205, 205, 206, 206, 207, 207, 208, 208, 209, 209, 210, 210, 211, 211, 212, 212, 213, 213, 1674 213, 213, 213, 213, 213, 213, 213, 213, 213, 214, 214, 215, 216, 217, 217, 217, 217, 217, 217, 1675 217, 217, 218, 219, 219, 220, 220, 221, 222, 222, 223, 223, 223, 223, 224, 225, 225, 225, 225, 1676 225, 226, 226, 226, 226, 226, 227, 227, 228, 228, 228, 229, 229, 230, 231, 232, 232, 232, 232, 1677 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 1678 234, 235, 235, 235, 236, 237, 237, 238, 238, 238, 238, 239, 239, 240, 240, 240, 240, 241, 241, 1679 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 1680 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 1681 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 1682 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 1683 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 243, 242, 244, 242, 245, 245, 246, 1684 246, 247, 247, 248, 248, 249, 250, 251, 251, 252, 252, 252, 252, 252, 252, 252, 253, 254, 255, 1685 253, 256, 256, 258, 257, 259, 257, 260, 260, 261, 261, 262, 262, 263, 264, 264, 266, 265, 267, 1686 267, 268, 268, 270, 269, 271, 269, 272, 269, 273, 273, 274, 274, 275, 275, 276, 276, 276, 276, 1687 276, 277, 277, 278, 278, 280, 279}; 1688 1689 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ 1690 static const yytype_int8 yyr2[] = { 1691 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 3, 2, 2, 1, 1, 1, 3, 2, 2, 2, 1, 2, 3, 2, 1, 1692 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1693 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 2, 1694 2, 4, 5, 6, 7, 2, 3, 2, 1, 1, 2, 3, 3, 2, 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, 2, 3, 5, 4, 1695 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1696 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, 3, 3, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1697 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1699 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, 0, 5, 1, 2, 3, 4, 1, 3, 1, 1700 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, 1, 0, 2, 0, 2, 2, 3, 1, 2, 1, 2, 5, 3, 1701 1, 0, 6, 3, 2, 1, 4, 0, 6, 0, 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, 2, 2, 3, 2, 1, 2, 1, 1, 0, 3}; 1702 1703 enum 1704 { 1705 YYENOMEM = -2 1706 }; 1707 1708 #define yyerrok (yyerrstatus = 0) 1709 #define yyclearin (yychar = YYEMPTY) 1710 1711 #define YYACCEPT goto yyacceptlab 1712 #define YYABORT goto yyabortlab 1713 #define YYERROR goto yyerrorlab 1714 #define YYNOMEM goto yyexhaustedlab 1715 1716 #define YYRECOVERING() (!!yyerrstatus) 1717 1718 #define YYBACKUP(Token, Value) \ 1719 do \ 1720 if (yychar == YYEMPTY) \ 1721 { \ 1722 yychar = (Token); \ 1723 yylval = (Value); \ 1724 YYPOPSTACK(yylen); \ 1725 yystate = *yyssp; \ 1726 goto yybackup; \ 1727 } \ 1728 else \ 1729 { \ 1730 yyerror(&yylloc, context, scanner, YY_("syntax error: cannot back up")); \ 1731 YYERROR; \ 1732 } \ 1733 while (0) 1734 1735 /* Backward compatibility with an undocumented macro. 1736 Use YYerror or YYUNDEF. */ 1737 #define YYERRCODE YYUNDEF 1738 1739 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 1740 If N is 0, then set CURRENT to the empty location which ends 1741 the previous symbol: RHS[0] (always defined). */ 1742 1743 #ifndef YYLLOC_DEFAULT 1744 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 1745 do \ 1746 if (N) \ 1747 { \ 1748 (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ 1749 (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ 1750 (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ 1751 (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ 1752 } \ 1753 else \ 1754 { \ 1755 (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ 1756 (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \ 1757 } \ 1758 while (0) 1759 #endif 1760 1761 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 1762 1763 /* Enable debugging if requested. */ 1764 #if YYDEBUG 1765 1766 # ifndef YYFPRINTF 1767 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1768 # define YYFPRINTF fprintf 1769 # endif 1770 1771 # define YYDPRINTF(Args) \ 1772 do \ 1773 { \ 1774 if (yydebug) \ 1775 YYFPRINTF Args; \ 1776 } while (0) 1777 1778 /* YYLOCATION_PRINT -- Print the location on the stream. 1779 This macro was not mandated originally: define only if we know 1780 we won't break user code: when these are the locations we know. */ 1781 1782 # ifndef YYLOCATION_PRINT 1783 1784 # if defined YY_LOCATION_PRINT 1785 1786 /* Temporary convenience wrapper in case some people defined the 1787 undocumented and private YY_LOCATION_PRINT macros. */ 1788 # define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) 1789 1790 # elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1791 1792 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ 1793 1794 YY_ATTRIBUTE_UNUSED 1795 static int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) 1796 { 1797 int res = 0; 1798 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; 1799 if (0 <= yylocp->first_line) 1800 { 1801 res += YYFPRINTF(yyo, "%d", yylocp->first_line); 1802 if (0 <= yylocp->first_column) 1803 res += YYFPRINTF(yyo, ".%d", yylocp->first_column); 1804 } 1805 if (0 <= yylocp->last_line) 1806 { 1807 if (yylocp->first_line < yylocp->last_line) 1808 { 1809 res += YYFPRINTF(yyo, "-%d", yylocp->last_line); 1810 if (0 <= end_col) 1811 res += YYFPRINTF(yyo, ".%d", end_col); 1812 } 1813 else if (0 <= end_col && yylocp->first_column < end_col) 1814 res += YYFPRINTF(yyo, "-%d", end_col); 1815 } 1816 return res; 1817 } 1818 1819 # define YYLOCATION_PRINT yy_location_print_ 1820 1821 /* Temporary convenience wrapper in case some people defined the 1822 undocumented and private YY_LOCATION_PRINT macros. */ 1823 # define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) 1824 1825 # else 1826 1827 # define YYLOCATION_PRINT(File, Loc) ((void)0) 1828 /* Temporary convenience wrapper in case some people defined the 1829 undocumented and private YY_LOCATION_PRINT macros. */ 1830 # define YY_LOCATION_PRINT YYLOCATION_PRINT 1831 1832 # endif 1833 # endif /* !defined YYLOCATION_PRINT */ 1834 1835 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ 1836 do \ 1837 { \ 1838 if (yydebug) \ 1839 { \ 1840 YYFPRINTF(stderr, "%s ", Title); \ 1841 yy_symbol_print(stderr, Kind, Value, Location, context, scanner); \ 1842 YYFPRINTF(stderr, "\n"); \ 1843 } \ 1844 } while (0) 1845 1846 /*-----------------------------------. 1847 | Print this symbol's value on YYO. | 1848 `-----------------------------------*/ 1849 1850 static void yy_symbol_value_print(FILE *yyo, 1851 yysymbol_kind_t yykind, 1852 YYSTYPE const *const yyvaluep, 1853 YYLTYPE const *const yylocationp, 1854 TParseContext *context, 1855 void *scanner) 1856 { 1857 FILE *yyoutput = yyo; 1858 YY_USE(yyoutput); 1859 YY_USE(yylocationp); 1860 YY_USE(context); 1861 YY_USE(scanner); 1862 if (!yyvaluep) 1863 return; 1864 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1865 YY_USE(yykind); 1866 YY_IGNORE_MAYBE_UNINITIALIZED_END 1867 } 1868 1869 /*---------------------------. 1870 | Print this symbol on YYO. | 1871 `---------------------------*/ 1872 1873 static void yy_symbol_print(FILE *yyo, 1874 yysymbol_kind_t yykind, 1875 YYSTYPE const *const yyvaluep, 1876 YYLTYPE const *const yylocationp, 1877 TParseContext *context, 1878 void *scanner) 1879 { 1880 YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind)); 1881 1882 YYLOCATION_PRINT(yyo, yylocationp); 1883 YYFPRINTF(yyo, ": "); 1884 yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp, context, scanner); 1885 YYFPRINTF(yyo, ")"); 1886 } 1887 1888 /*------------------------------------------------------------------. 1889 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1890 | TOP (included). | 1891 `------------------------------------------------------------------*/ 1892 1893 static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop) 1894 { 1895 YYFPRINTF(stderr, "Stack now"); 1896 for (; yybottom <= yytop; yybottom++) 1897 { 1898 int yybot = *yybottom; 1899 YYFPRINTF(stderr, " %d", yybot); 1900 } 1901 YYFPRINTF(stderr, "\n"); 1902 } 1903 1904 # define YY_STACK_PRINT(Bottom, Top) \ 1905 do \ 1906 { \ 1907 if (yydebug) \ 1908 yy_stack_print((Bottom), (Top)); \ 1909 } while (0) 1910 1911 /*------------------------------------------------. 1912 | Report that the YYRULE is going to be reduced. | 1913 `------------------------------------------------*/ 1914 1915 static void yy_reduce_print(yy_state_t *yyssp, 1916 YYSTYPE *yyvsp, 1917 YYLTYPE *yylsp, 1918 int yyrule, 1919 TParseContext *context, 1920 void *scanner) 1921 { 1922 int yylno = yyrline[yyrule]; 1923 int yynrhs = yyr2[yyrule]; 1924 int yyi; 1925 YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); 1926 /* The symbols being reduced. */ 1927 for (yyi = 0; yyi < yynrhs; yyi++) 1928 { 1929 YYFPRINTF(stderr, " $%d = ", yyi + 1); 1930 yy_symbol_print(stderr, YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]), 1931 &yyvsp[(yyi + 1) - (yynrhs)], &(yylsp[(yyi + 1) - (yynrhs)]), context, 1932 scanner); 1933 YYFPRINTF(stderr, "\n"); 1934 } 1935 } 1936 1937 # define YY_REDUCE_PRINT(Rule) \ 1938 do \ 1939 { \ 1940 if (yydebug) \ 1941 yy_reduce_print(yyssp, yyvsp, yylsp, Rule, context, scanner); \ 1942 } while (0) 1943 1944 /* Nonzero means print parse trace. It is left uninitialized so that 1945 multiple parsers can coexist. */ 1946 int yydebug; 1947 #else /* !YYDEBUG */ 1948 # define YYDPRINTF(Args) ((void)0) 1949 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) 1950 # define YY_STACK_PRINT(Bottom, Top) 1951 # define YY_REDUCE_PRINT(Rule) 1952 #endif /* !YYDEBUG */ 1953 1954 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1955 #ifndef YYINITDEPTH 1956 # define YYINITDEPTH 200 1957 #endif 1958 1959 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1960 if the built-in stack extension method is used). 1961 1962 Do not make this value too large; the results are undefined if 1963 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1964 evaluated with infinite-precision integer arithmetic. */ 1965 1966 #ifndef YYMAXDEPTH 1967 # define YYMAXDEPTH 10000 1968 #endif 1969 1970 /*-----------------------------------------------. 1971 | Release the memory associated to this symbol. | 1972 `-----------------------------------------------*/ 1973 1974 static void yydestruct(const char *yymsg, 1975 yysymbol_kind_t yykind, 1976 YYSTYPE *yyvaluep, 1977 YYLTYPE *yylocationp, 1978 TParseContext *context, 1979 void *scanner) 1980 { 1981 YY_USE(yyvaluep); 1982 YY_USE(yylocationp); 1983 YY_USE(context); 1984 YY_USE(scanner); 1985 if (!yymsg) 1986 yymsg = "Deleting"; 1987 YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp); 1988 1989 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1990 YY_USE(yykind); 1991 YY_IGNORE_MAYBE_UNINITIALIZED_END 1992 } 1993 1994 /*----------. 1995 | yyparse. | 1996 `----------*/ 1997 1998 int yyparse(TParseContext *context, void *scanner) 1999 { 2000 /* Lookahead token kind. */ 2001 int yychar; 2002 2003 /* The semantic value of the lookahead symbol. */ 2004 /* Default value used for initialization, for pacifying older GCCs 2005 or non-GCC compilers. */ 2006 YY_INITIAL_VALUE(static YYSTYPE yyval_default;) 2007 YYSTYPE yylval YY_INITIAL_VALUE(= yyval_default); 2008 2009 /* Location data for the lookahead symbol. */ 2010 static YYLTYPE yyloc_default 2011 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 2012 = {1, 1, 1, 1} 2013 #endif 2014 ; 2015 YYLTYPE yylloc = yyloc_default; 2016 2017 /* Number of syntax errors so far. */ 2018 int yynerrs = 0; 2019 2020 yy_state_fast_t yystate = 0; 2021 /* Number of tokens to shift before error messages enabled. */ 2022 int yyerrstatus = 0; 2023 2024 /* Refer to the stacks through separate pointers, to allow yyoverflow 2025 to reallocate them elsewhere. */ 2026 2027 /* Their size. */ 2028 YYPTRDIFF_T yystacksize = YYINITDEPTH; 2029 2030 /* The state stack: array, bottom, top. */ 2031 yy_state_t yyssa[YYINITDEPTH]; 2032 yy_state_t *yyss = yyssa; 2033 yy_state_t *yyssp = yyss; 2034 2035 /* The semantic value stack: array, bottom, top. */ 2036 YYSTYPE yyvsa[YYINITDEPTH]; 2037 YYSTYPE *yyvs = yyvsa; 2038 YYSTYPE *yyvsp = yyvs; 2039 2040 /* The location stack: array, bottom, top. */ 2041 YYLTYPE yylsa[YYINITDEPTH]; 2042 YYLTYPE *yyls = yylsa; 2043 YYLTYPE *yylsp = yyls; 2044 2045 int yyn; 2046 /* The return value of yyparse. */ 2047 int yyresult; 2048 /* Lookahead symbol kind. */ 2049 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; 2050 /* The variables used to return semantic value and location from the 2051 action routines. */ 2052 YYSTYPE yyval; 2053 YYLTYPE yyloc; 2054 2055 /* The locations where the error started and ended. */ 2056 YYLTYPE yyerror_range[3]; 2057 2058 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 2059 2060 /* The number of symbols on the RHS of the reduced rule. 2061 Keep to zero when no symbol should be popped. */ 2062 int yylen = 0; 2063 2064 YYDPRINTF((stderr, "Starting parse\n")); 2065 2066 yychar = YYEMPTY; /* Cause a token to be read. */ 2067 2068 yylsp[0] = yylloc; 2069 goto yysetstate; 2070 2071 /*------------------------------------------------------------. 2072 | yynewstate -- push a new state, which is found in yystate. | 2073 `------------------------------------------------------------*/ 2074 yynewstate: 2075 /* In all cases, when you get here, the value and location stacks 2076 have just been pushed. So pushing a state here evens the stacks. */ 2077 yyssp++; 2078 2079 /*--------------------------------------------------------------------. 2080 | yysetstate -- set current state (the top of the stack) to yystate. | 2081 `--------------------------------------------------------------------*/ 2082 yysetstate: 2083 YYDPRINTF((stderr, "Entering state %d\n", yystate)); 2084 YY_ASSERT(0 <= yystate && yystate < YYNSTATES); 2085 YY_IGNORE_USELESS_CAST_BEGIN 2086 *yyssp = YY_CAST(yy_state_t, yystate); 2087 YY_IGNORE_USELESS_CAST_END 2088 YY_STACK_PRINT(yyss, yyssp); 2089 2090 if (yyss + yystacksize - 1 <= yyssp) 2091 #if !defined yyoverflow && !defined YYSTACK_RELOCATE 2092 YYNOMEM; 2093 #else 2094 { 2095 /* Get the current used size of the three stacks, in elements. */ 2096 YYPTRDIFF_T yysize = yyssp - yyss + 1; 2097 2098 # if defined yyoverflow 2099 { 2100 /* Give user a chance to reallocate the stack. Use copies of 2101 these so that the &'s don't force the real ones into 2102 memory. */ 2103 yy_state_t *yyss1 = yyss; 2104 YYSTYPE *yyvs1 = yyvs; 2105 YYLTYPE *yyls1 = yyls; 2106 2107 /* Each stack pointer address is followed by the size of the 2108 data in use in that stack, in bytes. This used to be a 2109 conditional around just the two extra args, but that might 2110 be undefined if yyoverflow is a macro. */ 2111 yyoverflow(YY_("memory exhausted"), &yyss1, yysize * YYSIZEOF(*yyssp), &yyvs1, 2112 yysize * YYSIZEOF(*yyvsp), &yyls1, yysize * YYSIZEOF(*yylsp), &yystacksize); 2113 yyss = yyss1; 2114 yyvs = yyvs1; 2115 yyls = yyls1; 2116 } 2117 # else /* defined YYSTACK_RELOCATE */ 2118 /* Extend the stack our own way. */ 2119 if (YYMAXDEPTH <= yystacksize) 2120 YYNOMEM; 2121 yystacksize *= 2; 2122 if (YYMAXDEPTH < yystacksize) 2123 yystacksize = YYMAXDEPTH; 2124 2125 { 2126 yy_state_t *yyss1 = yyss; 2127 union yyalloc *yyptr = YY_CAST( 2128 union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize)))); 2129 if (!yyptr) 2130 YYNOMEM; 2131 YYSTACK_RELOCATE(yyss_alloc, yyss); 2132 YYSTACK_RELOCATE(yyvs_alloc, yyvs); 2133 YYSTACK_RELOCATE(yyls_alloc, yyls); 2134 # undef YYSTACK_RELOCATE 2135 if (yyss1 != yyssa) 2136 YYSTACK_FREE(yyss1); 2137 } 2138 # endif 2139 2140 yyssp = yyss + yysize - 1; 2141 yyvsp = yyvs + yysize - 1; 2142 yylsp = yyls + yysize - 1; 2143 2144 YY_IGNORE_USELESS_CAST_BEGIN 2145 YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize))); 2146 YY_IGNORE_USELESS_CAST_END 2147 2148 if (yyss + yystacksize - 1 <= yyssp) 2149 YYABORT; 2150 } 2151 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ 2152 2153 if (yystate == YYFINAL) 2154 YYACCEPT; 2155 2156 goto yybackup; 2157 2158 /*-----------. 2159 | yybackup. | 2160 `-----------*/ 2161 yybackup: 2162 /* Do appropriate processing given the current state. Read a 2163 lookahead token if we need one and don't already have one. */ 2164 2165 /* First try to decide what to do without reference to lookahead token. */ 2166 yyn = yypact[yystate]; 2167 if (yypact_value_is_default(yyn)) 2168 goto yydefault; 2169 2170 /* Not known => get a lookahead token if don't already have one. */ 2171 2172 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ 2173 if (yychar == YYEMPTY) 2174 { 2175 YYDPRINTF((stderr, "Reading a token\n")); 2176 yychar = yylex(&yylval, &yylloc, scanner); 2177 } 2178 2179 if (yychar <= YYEOF) 2180 { 2181 yychar = YYEOF; 2182 yytoken = YYSYMBOL_YYEOF; 2183 YYDPRINTF((stderr, "Now at end of input.\n")); 2184 } 2185 else if (yychar == YYerror) 2186 { 2187 /* The scanner already issued an error message, process directly 2188 to error recovery. But do not keep the error token as 2189 lookahead, it is too special and may lead us to an endless 2190 loop in error recovery. */ 2191 yychar = YYUNDEF; 2192 yytoken = YYSYMBOL_YYerror; 2193 yyerror_range[1] = yylloc; 2194 goto yyerrlab1; 2195 } 2196 else 2197 { 2198 yytoken = YYTRANSLATE(yychar); 2199 YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc); 2200 } 2201 2202 /* If the proper action on seeing token YYTOKEN is to reduce or to 2203 detect an error, take that action. */ 2204 yyn += yytoken; 2205 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2206 goto yydefault; 2207 yyn = yytable[yyn]; 2208 if (yyn <= 0) 2209 { 2210 if (yytable_value_is_error(yyn)) 2211 goto yyerrlab; 2212 yyn = -yyn; 2213 goto yyreduce; 2214 } 2215 2216 /* Count tokens shifted since error; after three, turn off error 2217 status. */ 2218 if (yyerrstatus) 2219 yyerrstatus--; 2220 2221 /* Shift the lookahead token. */ 2222 YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc); 2223 yystate = yyn; 2224 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 2225 *++yyvsp = yylval; 2226 YY_IGNORE_MAYBE_UNINITIALIZED_END 2227 *++yylsp = yylloc; 2228 2229 /* Discard the shifted token. */ 2230 yychar = YYEMPTY; 2231 goto yynewstate; 2232 2233 /*-----------------------------------------------------------. 2234 | yydefault -- do the default action for the current state. | 2235 `-----------------------------------------------------------*/ 2236 yydefault: 2237 yyn = yydefact[yystate]; 2238 if (yyn == 0) 2239 goto yyerrlab; 2240 goto yyreduce; 2241 2242 /*-----------------------------. 2243 | yyreduce -- do a reduction. | 2244 `-----------------------------*/ 2245 yyreduce: 2246 /* yyn is the number of a rule to reduce with. */ 2247 yylen = yyr2[yyn]; 2248 2249 /* If YYLEN is nonzero, implement the default value of the action: 2250 '$$ = $1'. 2251 2252 Otherwise, the following line sets YYVAL to garbage. 2253 This behavior is undocumented and Bison 2254 users should not rely upon it. Assigning to YYVAL 2255 unconditionally makes the parser a bit smaller, and it avoids a 2256 GCC warning that YYVAL may be used uninitialized. */ 2257 yyval = yyvsp[1 - yylen]; 2258 2259 /* Default location. */ 2260 YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen); 2261 yyerror_range[1] = yyloc; 2262 YY_REDUCE_PRINT(yyn); 2263 switch (yyn) 2264 { 2265 case 4: /* variable_identifier: IDENTIFIER */ 2266 { 2267 // The symbol table search was done in the lexical phase 2268 (yyval.interm.intermTypedNode) = context->parseVariableIdentifier( 2269 (yylsp[0]), ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol); 2270 } 2271 break; 2272 2273 case 5: /* primary_expression: variable_identifier */ 2274 { 2275 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2276 } 2277 break; 2278 2279 case 6: /* primary_expression: INTCONSTANT */ 2280 { 2281 TConstantUnion *unionArray = new TConstantUnion[1]; 2282 unionArray->setIConst((yyvsp[0].lex).i); 2283 (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); 2284 } 2285 break; 2286 2287 case 7: /* primary_expression: UINTCONSTANT */ 2288 { 2289 TConstantUnion *unionArray = new TConstantUnion[1]; 2290 unionArray->setUConst((yyvsp[0].lex).u); 2291 (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); 2292 } 2293 break; 2294 2295 case 8: /* primary_expression: FLOATCONSTANT */ 2296 { 2297 TConstantUnion *unionArray = new TConstantUnion[1]; 2298 unionArray->setFConst((yyvsp[0].lex).f); 2299 (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); 2300 } 2301 break; 2302 2303 case 9: /* primary_expression: BOOLCONSTANT */ 2304 { 2305 TConstantUnion *unionArray = new TConstantUnion[1]; 2306 unionArray->setBConst((yyvsp[0].lex).b); 2307 (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); 2308 } 2309 break; 2310 2311 case 10: /* primary_expression: YUVCSCSTANDARDEXTCONSTANT */ 2312 { 2313 if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target)) 2314 { 2315 context->error((yylsp[0]), "unsupported value", 2316 ImmutableString((yyvsp[0].lex).string)); 2317 } 2318 TConstantUnion *unionArray = new TConstantUnion[1]; 2319 unionArray->setYuvCscStandardEXTConst( 2320 getYuvCscStandardEXT(ImmutableString((yyvsp[0].lex).string))); 2321 (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); 2322 } 2323 break; 2324 2325 case 11: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ 2326 { 2327 (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); 2328 } 2329 break; 2330 2331 case 12: /* postfix_expression: primary_expression */ 2332 { 2333 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2334 } 2335 break; 2336 2337 case 13: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression 2338 RIGHT_BRACKET */ 2339 { 2340 (yyval.interm.intermTypedNode) = 2341 context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), 2342 (yyvsp[-1].interm.intermTypedNode)); 2343 } 2344 break; 2345 2346 case 14: /* postfix_expression: function_call */ 2347 { 2348 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2349 } 2350 break; 2351 2352 case 15: /* postfix_expression: postfix_expression DOT FIELD_SELECTION */ 2353 { 2354 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression( 2355 (yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), 2356 ImmutableString((yyvsp[0].lex).string), (yylsp[0])); 2357 } 2358 break; 2359 2360 case 16: /* postfix_expression: postfix_expression INC_OP */ 2361 { 2362 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( 2363 EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); 2364 } 2365 break; 2366 2367 case 17: /* postfix_expression: postfix_expression DEC_OP */ 2368 { 2369 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( 2370 EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); 2371 } 2372 break; 2373 2374 case 18: /* integer_expression: expression */ 2375 { 2376 context->checkIsScalarInteger((yyvsp[0].interm.intermTypedNode), "[]"); 2377 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2378 } 2379 break; 2380 2381 case 19: /* function_call: function_call_or_method */ 2382 { 2383 (yyval.interm.intermTypedNode) = 2384 context->addFunctionCallOrMethod((yyvsp[0].interm.functionLookup), (yylsp[0])); 2385 } 2386 break; 2387 2388 case 20: /* function_call_or_method: function_call_generic */ 2389 { 2390 (yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup); 2391 } 2392 break; 2393 2394 case 21: /* function_call_or_method: postfix_expression DOT function_call_generic */ 2395 { 2396 ES3_OR_NEWER("", (yylsp[0]), "methods"); 2397 (yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup); 2398 (yyval.interm.functionLookup)->setThisNode((yyvsp[-2].interm.intermTypedNode)); 2399 } 2400 break; 2401 2402 case 22: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ 2403 { 2404 (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); 2405 } 2406 break; 2407 2408 case 23: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ 2409 { 2410 (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); 2411 } 2412 break; 2413 2414 case 24: /* function_call_header_no_parameters: function_call_header VOID_TYPE */ 2415 { 2416 (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); 2417 } 2418 break; 2419 2420 case 25: /* function_call_header_no_parameters: function_call_header */ 2421 { 2422 (yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup); 2423 } 2424 break; 2425 2426 case 26: /* function_call_header_with_parameters: function_call_header assignment_expression 2427 */ 2428 { 2429 (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); 2430 (yyval.interm.functionLookup)->addArgument((yyvsp[0].interm.intermTypedNode)); 2431 } 2432 break; 2433 2434 case 27: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA 2435 assignment_expression */ 2436 { 2437 (yyval.interm.functionLookup) = (yyvsp[-2].interm.functionLookup); 2438 (yyval.interm.functionLookup)->addArgument((yyvsp[0].interm.intermTypedNode)); 2439 } 2440 break; 2441 2442 case 28: /* function_call_header: function_identifier LEFT_PAREN */ 2443 { 2444 (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); 2445 } 2446 break; 2447 2448 case 29: /* function_identifier: type_specifier_no_prec */ 2449 { 2450 (yyval.interm.functionLookup) = context->addConstructorFunc((yyvsp[0].interm.type)); 2451 } 2452 break; 2453 2454 case 30: /* function_identifier: IDENTIFIER */ 2455 { 2456 (yyval.interm.functionLookup) = context->addNonConstructorFunc( 2457 ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol); 2458 } 2459 break; 2460 2461 case 31: /* function_identifier: FIELD_SELECTION */ 2462 { 2463 (yyval.interm.functionLookup) = context->addNonConstructorFunc( 2464 ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol); 2465 } 2466 break; 2467 2468 case 32: /* unary_expression: postfix_expression */ 2469 { 2470 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2471 } 2472 break; 2473 2474 case 33: /* unary_expression: INC_OP unary_expression */ 2475 { 2476 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( 2477 EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2478 } 2479 break; 2480 2481 case 34: /* unary_expression: DEC_OP unary_expression */ 2482 { 2483 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( 2484 EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2485 } 2486 break; 2487 2488 case 35: /* unary_expression: unary_operator unary_expression */ 2489 { 2490 (yyval.interm.intermTypedNode) = context->addUnaryMath( 2491 (yyvsp[-1].interm.op), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2492 } 2493 break; 2494 2495 case 36: /* unary_operator: PLUS */ 2496 { 2497 (yyval.interm.op) = EOpPositive; 2498 } 2499 break; 2500 2501 case 37: /* unary_operator: DASH */ 2502 { 2503 (yyval.interm.op) = EOpNegative; 2504 } 2505 break; 2506 2507 case 38: /* unary_operator: BANG */ 2508 { 2509 (yyval.interm.op) = EOpLogicalNot; 2510 } 2511 break; 2512 2513 case 39: /* unary_operator: TILDE */ 2514 { 2515 ES3_OR_NEWER("~", (yyloc), "bit-wise operator"); 2516 (yyval.interm.op) = EOpBitwiseNot; 2517 } 2518 break; 2519 2520 case 40: /* multiplicative_expression: unary_expression */ 2521 { 2522 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2523 } 2524 break; 2525 2526 case 41: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ 2527 { 2528 (yyval.interm.intermTypedNode) = 2529 context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), 2530 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2531 } 2532 break; 2533 2534 case 42: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ 2535 { 2536 (yyval.interm.intermTypedNode) = 2537 context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), 2538 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2539 } 2540 break; 2541 2542 case 43: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ 2543 { 2544 ES3_OR_NEWER("%", (yylsp[-1]), "integer modulus operator"); 2545 (yyval.interm.intermTypedNode) = 2546 context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), 2547 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2548 } 2549 break; 2550 2551 case 44: /* additive_expression: multiplicative_expression */ 2552 { 2553 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2554 } 2555 break; 2556 2557 case 45: /* additive_expression: additive_expression PLUS multiplicative_expression */ 2558 { 2559 (yyval.interm.intermTypedNode) = 2560 context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), 2561 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2562 } 2563 break; 2564 2565 case 46: /* additive_expression: additive_expression DASH multiplicative_expression */ 2566 { 2567 (yyval.interm.intermTypedNode) = 2568 context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), 2569 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2570 } 2571 break; 2572 2573 case 47: /* shift_expression: additive_expression */ 2574 { 2575 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2576 } 2577 break; 2578 2579 case 48: /* shift_expression: shift_expression LEFT_OP additive_expression */ 2580 { 2581 ES3_OR_NEWER("<<", (yylsp[-1]), "bit-wise operator"); 2582 (yyval.interm.intermTypedNode) = 2583 context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), 2584 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2585 } 2586 break; 2587 2588 case 49: /* shift_expression: shift_expression RIGHT_OP additive_expression */ 2589 { 2590 ES3_OR_NEWER(">>", (yylsp[-1]), "bit-wise operator"); 2591 (yyval.interm.intermTypedNode) = 2592 context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), 2593 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2594 } 2595 break; 2596 2597 case 50: /* relational_expression: shift_expression */ 2598 { 2599 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2600 } 2601 break; 2602 2603 case 51: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ 2604 { 2605 (yyval.interm.intermTypedNode) = 2606 context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), 2607 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2608 } 2609 break; 2610 2611 case 52: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ 2612 { 2613 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( 2614 EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), 2615 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2616 } 2617 break; 2618 2619 case 53: /* relational_expression: relational_expression LE_OP shift_expression */ 2620 { 2621 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( 2622 EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), 2623 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2624 } 2625 break; 2626 2627 case 54: /* relational_expression: relational_expression GE_OP shift_expression */ 2628 { 2629 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( 2630 EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), 2631 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2632 } 2633 break; 2634 2635 case 55: /* equality_expression: relational_expression */ 2636 { 2637 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2638 } 2639 break; 2640 2641 case 56: /* equality_expression: equality_expression EQ_OP relational_expression */ 2642 { 2643 (yyval.interm.intermTypedNode) = 2644 context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), 2645 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2646 } 2647 break; 2648 2649 case 57: /* equality_expression: equality_expression NE_OP relational_expression */ 2650 { 2651 (yyval.interm.intermTypedNode) = 2652 context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), 2653 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2654 } 2655 break; 2656 2657 case 58: /* and_expression: equality_expression */ 2658 { 2659 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2660 } 2661 break; 2662 2663 case 59: /* and_expression: and_expression AMPERSAND equality_expression */ 2664 { 2665 ES3_OR_NEWER("&", (yylsp[-1]), "bit-wise operator"); 2666 (yyval.interm.intermTypedNode) = 2667 context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), 2668 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2669 } 2670 break; 2671 2672 case 60: /* exclusive_or_expression: and_expression */ 2673 { 2674 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2675 } 2676 break; 2677 2678 case 61: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ 2679 { 2680 ES3_OR_NEWER("^", (yylsp[-1]), "bit-wise operator"); 2681 (yyval.interm.intermTypedNode) = 2682 context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), 2683 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2684 } 2685 break; 2686 2687 case 62: /* inclusive_or_expression: exclusive_or_expression */ 2688 { 2689 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2690 } 2691 break; 2692 2693 case 63: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR 2694 exclusive_or_expression */ 2695 { 2696 ES3_OR_NEWER("|", (yylsp[-1]), "bit-wise operator"); 2697 (yyval.interm.intermTypedNode) = 2698 context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), 2699 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2700 } 2701 break; 2702 2703 case 64: /* logical_and_expression: inclusive_or_expression */ 2704 { 2705 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2706 } 2707 break; 2708 2709 case 65: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ 2710 { 2711 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( 2712 EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), 2713 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2714 } 2715 break; 2716 2717 case 66: /* logical_xor_expression: logical_and_expression */ 2718 { 2719 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2720 } 2721 break; 2722 2723 case 67: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ 2724 { 2725 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( 2726 EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), 2727 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2728 } 2729 break; 2730 2731 case 68: /* logical_or_expression: logical_xor_expression */ 2732 { 2733 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2734 } 2735 break; 2736 2737 case 69: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ 2738 { 2739 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( 2740 EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), 2741 (yylsp[-1])); 2742 } 2743 break; 2744 2745 case 70: /* conditional_expression: logical_or_expression */ 2746 { 2747 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2748 } 2749 break; 2750 2751 case 71: /* conditional_expression: logical_or_expression QUESTION expression COLON 2752 assignment_expression */ 2753 { 2754 (yyval.interm.intermTypedNode) = context->addTernarySelection( 2755 (yyvsp[-4].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), 2756 (yyvsp[0].interm.intermTypedNode), (yylsp[-3])); 2757 } 2758 break; 2759 2760 case 72: /* assignment_expression: conditional_expression */ 2761 { 2762 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2763 } 2764 break; 2765 2766 case 73: /* assignment_expression: unary_expression assignment_operator 2767 assignment_expression */ 2768 { 2769 (yyval.interm.intermTypedNode) = 2770 context->addAssign((yyvsp[-1].interm.op), (yyvsp[-2].interm.intermTypedNode), 2771 (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2772 } 2773 break; 2774 2775 case 74: /* assignment_operator: EQUAL */ 2776 { 2777 (yyval.interm.op) = EOpAssign; 2778 } 2779 break; 2780 2781 case 75: /* assignment_operator: MUL_ASSIGN */ 2782 { 2783 (yyval.interm.op) = EOpMulAssign; 2784 } 2785 break; 2786 2787 case 76: /* assignment_operator: DIV_ASSIGN */ 2788 { 2789 (yyval.interm.op) = EOpDivAssign; 2790 } 2791 break; 2792 2793 case 77: /* assignment_operator: MOD_ASSIGN */ 2794 { 2795 ES3_OR_NEWER("%=", (yyloc), "integer modulus operator"); 2796 (yyval.interm.op) = EOpIModAssign; 2797 } 2798 break; 2799 2800 case 78: /* assignment_operator: ADD_ASSIGN */ 2801 { 2802 (yyval.interm.op) = EOpAddAssign; 2803 } 2804 break; 2805 2806 case 79: /* assignment_operator: SUB_ASSIGN */ 2807 { 2808 (yyval.interm.op) = EOpSubAssign; 2809 } 2810 break; 2811 2812 case 80: /* assignment_operator: LEFT_ASSIGN */ 2813 { 2814 ES3_OR_NEWER("<<=", (yyloc), "bit-wise operator"); 2815 (yyval.interm.op) = EOpBitShiftLeftAssign; 2816 } 2817 break; 2818 2819 case 81: /* assignment_operator: RIGHT_ASSIGN */ 2820 { 2821 ES3_OR_NEWER(">>=", (yyloc), "bit-wise operator"); 2822 (yyval.interm.op) = EOpBitShiftRightAssign; 2823 } 2824 break; 2825 2826 case 82: /* assignment_operator: AND_ASSIGN */ 2827 { 2828 ES3_OR_NEWER("&=", (yyloc), "bit-wise operator"); 2829 (yyval.interm.op) = EOpBitwiseAndAssign; 2830 } 2831 break; 2832 2833 case 83: /* assignment_operator: XOR_ASSIGN */ 2834 { 2835 ES3_OR_NEWER("^=", (yyloc), "bit-wise operator"); 2836 (yyval.interm.op) = EOpBitwiseXorAssign; 2837 } 2838 break; 2839 2840 case 84: /* assignment_operator: OR_ASSIGN */ 2841 { 2842 ES3_OR_NEWER("|=", (yyloc), "bit-wise operator"); 2843 (yyval.interm.op) = EOpBitwiseOrAssign; 2844 } 2845 break; 2846 2847 case 85: /* expression: assignment_expression */ 2848 { 2849 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2850 } 2851 break; 2852 2853 case 86: /* expression: expression COMMA assignment_expression */ 2854 { 2855 (yyval.interm.intermTypedNode) = context->addComma( 2856 (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); 2857 } 2858 break; 2859 2860 case 87: /* constant_expression: conditional_expression */ 2861 { 2862 context->checkIsConst((yyvsp[0].interm.intermTypedNode)); 2863 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 2864 } 2865 break; 2866 2867 case 88: /* enter_struct: IDENTIFIER LEFT_BRACE */ 2868 { 2869 context->enterStructDeclaration((yylsp[-1]), ImmutableString((yyvsp[-1].lex).string)); 2870 (yyval.lex) = (yyvsp[-1].lex); 2871 } 2872 break; 2873 2874 case 89: /* declaration: function_prototype SEMICOLON */ 2875 { 2876 (yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration( 2877 *((yyvsp[-1].interm).function), (yylsp[-1])); 2878 } 2879 break; 2880 2881 case 90: /* declaration: init_declarator_list SEMICOLON */ 2882 { 2883 (yyval.interm.intermNode) = (yyvsp[-1].interm).intermDeclaration; 2884 } 2885 break; 2886 2887 case 91: /* declaration: PRECISION precision_qualifier type_specifier_no_prec SEMICOLON */ 2888 { 2889 context->parseDefaultPrecisionQualifier((yyvsp[-2].interm.precision), 2890 (yyvsp[-1].interm.type), (yylsp[-3])); 2891 (yyval.interm.intermNode) = nullptr; 2892 } 2893 break; 2894 2895 case 92: /* declaration: type_qualifier enter_struct struct_declaration_list RIGHT_BRACE 2896 SEMICOLON */ 2897 { 2898 ES3_OR_NEWER(ImmutableString((yyvsp[-3].lex).string), (yylsp[-4]), "interface blocks"); 2899 (yyval.interm.intermNode) = context->addInterfaceBlock( 2900 *(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]), 2901 ImmutableString((yyvsp[-3].lex).string), (yyvsp[-2].interm.fieldList), 2902 kEmptyImmutableString, (yyloc), NULL, (yyloc)); 2903 } 2904 break; 2905 2906 case 93: /* declaration: type_qualifier enter_struct struct_declaration_list RIGHT_BRACE 2907 IDENTIFIER SEMICOLON */ 2908 { 2909 ES3_OR_NEWER(ImmutableString((yyvsp[-4].lex).string), (yylsp[-5]), "interface blocks"); 2910 (yyval.interm.intermNode) = context->addInterfaceBlock( 2911 *(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]), 2912 ImmutableString((yyvsp[-4].lex).string), (yyvsp[-3].interm.fieldList), 2913 ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), NULL, (yyloc)); 2914 } 2915 break; 2916 2917 case 94: /* declaration: type_qualifier enter_struct struct_declaration_list RIGHT_BRACE 2918 IDENTIFIER array_specifier SEMICOLON */ 2919 { 2920 ES3_OR_NEWER(ImmutableString((yyvsp[-5].lex).string), (yylsp[-6]), "interface blocks"); 2921 (yyval.interm.intermNode) = context->addInterfaceBlock( 2922 *(yyvsp[-6].interm.typeQualifierBuilder), (yylsp[-5]), 2923 ImmutableString((yyvsp[-5].lex).string), (yyvsp[-4].interm.fieldList), 2924 ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[-1].interm.arraySizes), 2925 (yylsp[-1])); 2926 } 2927 break; 2928 2929 case 95: /* declaration: type_qualifier SEMICOLON */ 2930 { 2931 context->parseGlobalLayoutQualifier(*(yyvsp[-1].interm.typeQualifierBuilder)); 2932 (yyval.interm.intermNode) = nullptr; 2933 } 2934 break; 2935 2936 case 96: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ 2937 { 2938 (yyval.interm.intermNode) = context->parseGlobalQualifierDeclaration( 2939 *(yyvsp[-2].interm.typeQualifierBuilder), (yylsp[-1]), 2940 ImmutableString((yyvsp[-1].lex).string), (yyvsp[-1].lex).symbol); 2941 } 2942 break; 2943 2944 case 97: /* function_prototype: function_declarator RIGHT_PAREN */ 2945 { 2946 (yyval.interm).function = 2947 context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function)); 2948 context->exitFunctionDeclaration(); 2949 } 2950 break; 2951 2952 case 98: /* function_declarator: function_header */ 2953 { 2954 (yyval.interm.function) = (yyvsp[0].interm.function); 2955 } 2956 break; 2957 2958 case 99: /* function_declarator: function_header_with_parameters */ 2959 { 2960 (yyval.interm.function) = (yyvsp[0].interm.function); 2961 } 2962 break; 2963 2964 case 100: /* function_header_with_parameters: function_header parameter_declaration */ 2965 { 2966 // Add the parameter 2967 (yyval.interm.function) = (yyvsp[-1].interm.function); 2968 if ((yyvsp[0].interm.param).type->getBasicType() != EbtVoid) 2969 { 2970 (yyvsp[-1].interm.function) 2971 ->addParameter((yyvsp[0].interm.param).createVariable(&context->symbolTable)); 2972 } 2973 else 2974 { 2975 // Remember that void was seen, so error can be generated if another parameter is 2976 // seen. 2977 (yyvsp[-1].interm.function)->setHasVoidParameter(); 2978 } 2979 } 2980 break; 2981 2982 case 101: /* function_header_with_parameters: function_header_with_parameters COMMA 2983 parameter_declaration */ 2984 { 2985 (yyval.interm.function) = (yyvsp[-2].interm.function); 2986 // Only first parameter of one-parameter functions can be void 2987 // The check for named parameters not being void is done in parameter_declarator 2988 if ((yyvsp[0].interm.param).type->getBasicType() == EbtVoid) 2989 { 2990 // This parameter > first is void 2991 context->error((yylsp[-1]), "cannot be a parameter type except for '(void)'", 2992 "void"); 2993 } 2994 else 2995 { 2996 if ((yyvsp[-2].interm.function)->hasVoidParameter()) 2997 { 2998 // Only first parameter of one-parameter functions can be void. This check 2999 // prevents (void, non_void) parameters. 3000 context->error((yylsp[-1]), "cannot be a parameter type except for '(void)'", 3001 "void"); 3002 } 3003 (yyvsp[-2].interm.function) 3004 ->addParameter((yyvsp[0].interm.param).createVariable(&context->symbolTable)); 3005 } 3006 } 3007 break; 3008 3009 case 102: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ 3010 { 3011 (yyval.interm.function) = context->parseFunctionHeader( 3012 (yyvsp[-2].interm.type), ImmutableString((yyvsp[-1].lex).string), (yylsp[-1])); 3013 3014 context->symbolTable.push(); 3015 context->enterFunctionDeclaration(); 3016 } 3017 break; 3018 3019 case 103: /* parameter_declarator: type_specifier identifier */ 3020 { 3021 (yyval.interm.param) = context->parseParameterDeclarator( 3022 (yyvsp[-1].interm.type), ImmutableString((yyvsp[0].lex).string), (yylsp[0])); 3023 } 3024 break; 3025 3026 case 104: /* parameter_declarator: type_specifier identifier array_specifier */ 3027 { 3028 (yyval.interm.param) = context->parseParameterArrayDeclarator( 3029 ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), 3030 *((yyvsp[0].interm.arraySizes)), (yylsp[0]), &(yyvsp[-2].interm.type)); 3031 } 3032 break; 3033 3034 case 105: /* parameter_declaration: type_qualifier parameter_declarator */ 3035 { 3036 (yyval.interm.param) = (yyvsp[0].interm.param); 3037 context->checkIsParameterQualifierValid( 3038 (yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.param).type); 3039 } 3040 break; 3041 3042 case 106: /* parameter_declaration: parameter_declarator */ 3043 { 3044 (yyval.interm.param) = (yyvsp[0].interm.param); 3045 (yyval.interm.param).type->setQualifier(EvqParamIn); 3046 } 3047 break; 3048 3049 case 107: /* parameter_declaration: type_qualifier parameter_type_specifier */ 3050 { 3051 (yyval.interm.param) = (yyvsp[0].interm.param); 3052 context->checkIsParameterQualifierValid( 3053 (yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.param).type); 3054 } 3055 break; 3056 3057 case 108: /* parameter_declaration: parameter_type_specifier */ 3058 { 3059 (yyval.interm.param) = (yyvsp[0].interm.param); 3060 (yyval.interm.param).type->setQualifier(EvqParamIn); 3061 } 3062 break; 3063 3064 case 109: /* parameter_type_specifier: type_specifier */ 3065 { 3066 TParameter param = {0, new TType((yyvsp[0].interm.type))}; 3067 (yyval.interm.param) = param; 3068 } 3069 break; 3070 3071 case 110: /* init_declarator_list: single_declaration */ 3072 { 3073 (yyval.interm) = (yyvsp[0].interm); 3074 } 3075 break; 3076 3077 case 111: /* init_declarator_list: init_declarator_list COMMA identifier */ 3078 { 3079 (yyval.interm) = (yyvsp[-2].interm); 3080 context->parseDeclarator((yyval.interm).type, (yylsp[0]), 3081 ImmutableString((yyvsp[0].lex).string), 3082 (yyval.interm).intermDeclaration); 3083 } 3084 break; 3085 3086 case 112: /* init_declarator_list: init_declarator_list COMMA identifier array_specifier */ 3087 { 3088 (yyval.interm) = (yyvsp[-3].interm); 3089 context->parseArrayDeclarator( 3090 (yyval.interm).type, (yylsp[-1]), ImmutableString((yyvsp[-1].lex).string), 3091 (yylsp[0]), *((yyvsp[0].interm.arraySizes)), (yyval.interm).intermDeclaration); 3092 } 3093 break; 3094 3095 case 113: /* init_declarator_list: init_declarator_list COMMA identifier array_specifier 3096 EQUAL initializer */ 3097 { 3098 ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); 3099 (yyval.interm) = (yyvsp[-5].interm); 3100 context->parseArrayInitDeclarator( 3101 (yyval.interm).type, (yylsp[-3]), ImmutableString((yyvsp[-3].lex).string), 3102 (yylsp[-2]), *((yyvsp[-2].interm.arraySizes)), (yylsp[-1]), 3103 (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); 3104 } 3105 break; 3106 3107 case 114: /* init_declarator_list: init_declarator_list COMMA identifier EQUAL initializer 3108 */ 3109 { 3110 (yyval.interm) = (yyvsp[-4].interm); 3111 context->parseInitDeclarator( 3112 (yyval.interm).type, (yylsp[-2]), ImmutableString((yyvsp[-2].lex).string), 3113 (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); 3114 } 3115 break; 3116 3117 case 115: /* single_declaration: fully_specified_type */ 3118 { 3119 (yyval.interm).type = (yyvsp[0].interm.type); 3120 (yyval.interm).intermDeclaration = context->parseSingleDeclaration( 3121 (yyval.interm).type, (yylsp[0]), kEmptyImmutableString); 3122 } 3123 break; 3124 3125 case 116: /* single_declaration: fully_specified_type identifier */ 3126 { 3127 (yyval.interm).type = (yyvsp[-1].interm.type); 3128 (yyval.interm).intermDeclaration = context->parseSingleDeclaration( 3129 (yyval.interm).type, (yylsp[0]), ImmutableString((yyvsp[0].lex).string)); 3130 } 3131 break; 3132 3133 case 117: /* single_declaration: fully_specified_type identifier array_specifier */ 3134 { 3135 (yyval.interm).type = (yyvsp[-2].interm.type); 3136 (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration( 3137 (yyval.interm).type, (yylsp[-1]), ImmutableString((yyvsp[-1].lex).string), 3138 (yylsp[0]), *((yyvsp[0].interm.arraySizes))); 3139 } 3140 break; 3141 3142 case 118: /* single_declaration: fully_specified_type identifier array_specifier EQUAL 3143 initializer */ 3144 { 3145 ES3_OR_NEWER("[]", (yylsp[-2]), "first-class arrays (array initializer)"); 3146 (yyval.interm).type = (yyvsp[-4].interm.type); 3147 (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration( 3148 (yyval.interm).type, (yylsp[-3]), ImmutableString((yyvsp[-3].lex).string), 3149 (yylsp[-2]), *((yyvsp[-2].interm.arraySizes)), (yylsp[-1]), 3150 (yyvsp[0].interm.intermTypedNode)); 3151 } 3152 break; 3153 3154 case 119: /* single_declaration: fully_specified_type identifier EQUAL initializer */ 3155 { 3156 (yyval.interm).type = (yyvsp[-3].interm.type); 3157 (yyval.interm).intermDeclaration = context->parseSingleInitDeclaration( 3158 (yyval.interm).type, (yylsp[-2]), ImmutableString((yyvsp[-2].lex).string), 3159 (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); 3160 } 3161 break; 3162 3163 case 120: /* fully_specified_type: type_specifier */ 3164 { 3165 context->addFullySpecifiedType(&(yyvsp[0].interm.type)); 3166 (yyval.interm.type) = (yyvsp[0].interm.type); 3167 } 3168 break; 3169 3170 case 121: /* fully_specified_type: type_qualifier type_specifier */ 3171 { 3172 (yyval.interm.type) = context->addFullySpecifiedType( 3173 *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.type)); 3174 } 3175 break; 3176 3177 case 122: /* interpolation_qualifier: SMOOTH */ 3178 { 3179 (yyval.interm.qualifier) = EvqSmooth; 3180 } 3181 break; 3182 3183 case 123: /* interpolation_qualifier: FLAT */ 3184 { 3185 (yyval.interm.qualifier) = EvqFlat; 3186 } 3187 break; 3188 3189 case 124: /* interpolation_qualifier: NOPERSPECTIVE */ 3190 { 3191 if (!context->checkCanUseExtension((yylsp[0]), 3192 TExtension::NV_shader_noperspective_interpolation)) 3193 { 3194 context->error((yylsp[0]), "unsupported interpolation qualifier", "noperspective"); 3195 } 3196 (yyval.interm.qualifier) = EvqNoPerspective; 3197 } 3198 break; 3199 3200 case 125: /* type_qualifier: single_type_qualifier */ 3201 { 3202 (yyval.interm.typeQualifierBuilder) = context->createTypeQualifierBuilder((yylsp[0])); 3203 (yyval.interm.typeQualifierBuilder) 3204 ->appendQualifier((yyvsp[0].interm.qualifierWrapper)); 3205 } 3206 break; 3207 3208 case 126: /* type_qualifier: type_qualifier single_type_qualifier */ 3209 { 3210 (yyval.interm.typeQualifierBuilder) = (yyvsp[-1].interm.typeQualifierBuilder); 3211 (yyval.interm.typeQualifierBuilder) 3212 ->appendQualifier((yyvsp[0].interm.qualifierWrapper)); 3213 } 3214 break; 3215 3216 case 127: /* invariant_qualifier: INVARIANT */ 3217 { 3218 // empty 3219 } 3220 break; 3221 3222 case 128: /* precise_qualifier: PRECISE */ 3223 { 3224 context->markShaderHasPrecise(); 3225 } 3226 break; 3227 3228 case 129: /* single_type_qualifier: storage_qualifier */ 3229 { 3230 context->checkLocalVariableConstStorageQualifier(*(yyvsp[0].interm.qualifierWrapper)); 3231 (yyval.interm.qualifierWrapper) = (yyvsp[0].interm.qualifierWrapper); 3232 } 3233 break; 3234 3235 case 130: /* single_type_qualifier: layout_qualifier */ 3236 { 3237 context->checkIsAtGlobalLevel((yylsp[0]), "layout"); 3238 (yyval.interm.qualifierWrapper) = 3239 new TLayoutQualifierWrapper((yyvsp[0].interm.layoutQualifier), (yylsp[0])); 3240 } 3241 break; 3242 3243 case 131: /* single_type_qualifier: precision_qualifier */ 3244 { 3245 (yyval.interm.qualifierWrapper) = 3246 new TPrecisionQualifierWrapper((yyvsp[0].interm.precision), (yylsp[0])); 3247 } 3248 break; 3249 3250 case 132: /* single_type_qualifier: interpolation_qualifier */ 3251 { 3252 (yyval.interm.qualifierWrapper) = 3253 new TInterpolationQualifierWrapper((yyvsp[0].interm.qualifier), (yylsp[0])); 3254 } 3255 break; 3256 3257 case 133: /* single_type_qualifier: invariant_qualifier */ 3258 { 3259 context->checkIsAtGlobalLevel((yylsp[0]), "invariant"); 3260 (yyval.interm.qualifierWrapper) = new TInvariantQualifierWrapper((yylsp[0])); 3261 } 3262 break; 3263 3264 case 134: /* single_type_qualifier: precise_qualifier */ 3265 { 3266 (yyval.interm.qualifierWrapper) = new TPreciseQualifierWrapper((yylsp[0])); 3267 } 3268 break; 3269 3270 case 135: /* storage_qualifier: ATTRIBUTE */ 3271 { 3272 VERTEX_ONLY("attribute", (yylsp[0])); 3273 ES2_ONLY("attribute", (yylsp[0])); 3274 (yyval.interm.qualifierWrapper) = 3275 context->parseGlobalStorageQualifier(EvqAttribute, (yylsp[0])); 3276 } 3277 break; 3278 3279 case 136: /* storage_qualifier: VARYING */ 3280 { 3281 ES2_ONLY("varying", (yylsp[0])); 3282 (yyval.interm.qualifierWrapper) = context->parseVaryingQualifier((yylsp[0])); 3283 } 3284 break; 3285 3286 case 137: /* storage_qualifier: CONST_QUAL */ 3287 { 3288 (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqConst, (yylsp[0])); 3289 } 3290 break; 3291 3292 case 138: /* storage_qualifier: IN_QUAL */ 3293 { 3294 (yyval.interm.qualifierWrapper) = context->parseInQualifier((yylsp[0])); 3295 } 3296 break; 3297 3298 case 139: /* storage_qualifier: OUT_QUAL */ 3299 { 3300 (yyval.interm.qualifierWrapper) = context->parseOutQualifier((yylsp[0])); 3301 } 3302 break; 3303 3304 case 140: /* storage_qualifier: INOUT_QUAL */ 3305 { 3306 (yyval.interm.qualifierWrapper) = context->parseInOutQualifier((yylsp[0])); 3307 } 3308 break; 3309 3310 case 141: /* storage_qualifier: CENTROID */ 3311 { 3312 ES3_OR_NEWER("centroid", (yylsp[0]), "storage qualifier"); 3313 (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqCentroid, (yylsp[0])); 3314 } 3315 break; 3316 3317 case 142: /* storage_qualifier: PATCH */ 3318 { 3319 if (context->getShaderVersion() < 320 && 3320 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_tessellation_shader)) 3321 { 3322 context->error((yylsp[0]), "unsupported storage qualifier", "patch"); 3323 } 3324 (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqPatch, (yylsp[0])); 3325 } 3326 break; 3327 3328 case 143: /* storage_qualifier: UNIFORM */ 3329 { 3330 (yyval.interm.qualifierWrapper) = 3331 context->parseGlobalStorageQualifier(EvqUniform, (yylsp[0])); 3332 } 3333 break; 3334 3335 case 144: /* storage_qualifier: BUFFER */ 3336 { 3337 ES3_1_OR_NEWER("buffer", (yylsp[0]), "storage qualifier"); 3338 (yyval.interm.qualifierWrapper) = 3339 context->parseGlobalStorageQualifier(EvqBuffer, (yylsp[0])); 3340 } 3341 break; 3342 3343 case 145: /* storage_qualifier: READONLY */ 3344 { 3345 (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqReadOnly, (yylsp[0])); 3346 } 3347 break; 3348 3349 case 146: /* storage_qualifier: WRITEONLY */ 3350 { 3351 (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqWriteOnly, (yylsp[0])); 3352 } 3353 break; 3354 3355 case 147: /* storage_qualifier: COHERENT */ 3356 { 3357 (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqCoherent, (yylsp[0])); 3358 } 3359 break; 3360 3361 case 148: /* storage_qualifier: RESTRICT */ 3362 { 3363 (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqRestrict, (yylsp[0])); 3364 } 3365 break; 3366 3367 case 149: /* storage_qualifier: VOLATILE */ 3368 { 3369 (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqVolatile, (yylsp[0])); 3370 } 3371 break; 3372 3373 case 150: /* storage_qualifier: SHARED */ 3374 { 3375 COMPUTE_ONLY("shared", (yylsp[0])); 3376 (yyval.interm.qualifierWrapper) = 3377 context->parseGlobalStorageQualifier(EvqShared, (yylsp[0])); 3378 } 3379 break; 3380 3381 case 151: /* storage_qualifier: SAMPLE */ 3382 { 3383 ES3_OR_NEWER("sample", (yylsp[0]), "storage qualifier"); 3384 (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqSample, (yylsp[0])); 3385 } 3386 break; 3387 3388 case 152: /* type_specifier: type_specifier_no_prec */ 3389 { 3390 (yyval.interm.type) = (yyvsp[0].interm.type); 3391 (yyval.interm.type).precision = 3392 context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).getBasicType()); 3393 } 3394 break; 3395 3396 case 153: /* precision_qualifier: HIGH_PRECISION */ 3397 { 3398 (yyval.interm.precision) = EbpHigh; 3399 } 3400 break; 3401 3402 case 154: /* precision_qualifier: MEDIUM_PRECISION */ 3403 { 3404 (yyval.interm.precision) = EbpMedium; 3405 } 3406 break; 3407 3408 case 155: /* precision_qualifier: LOW_PRECISION */ 3409 { 3410 (yyval.interm.precision) = EbpLow; 3411 } 3412 break; 3413 3414 case 156: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ 3415 { 3416 context->checkCanUseLayoutQualifier((yylsp[-3])); 3417 (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier); 3418 } 3419 break; 3420 3421 case 157: /* layout_qualifier_id_list: layout_qualifier_id */ 3422 { 3423 (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier); 3424 } 3425 break; 3426 3427 case 158: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ 3428 { 3429 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers( 3430 (yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0])); 3431 } 3432 break; 3433 3434 case 159: /* layout_qualifier_id: IDENTIFIER */ 3435 { 3436 (yyval.interm.layoutQualifier) = 3437 context->parseLayoutQualifier(ImmutableString((yyvsp[0].lex).string), (yylsp[0])); 3438 } 3439 break; 3440 3441 case 160: /* layout_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ 3442 { 3443 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier( 3444 ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); 3445 } 3446 break; 3447 3448 case 161: /* layout_qualifier_id: IDENTIFIER EQUAL UINTCONSTANT */ 3449 { 3450 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier( 3451 ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); 3452 } 3453 break; 3454 3455 case 162: /* layout_qualifier_id: SHARED */ 3456 { 3457 (yyval.interm.layoutQualifier) = 3458 context->parseLayoutQualifier(ImmutableString("shared"), (yylsp[0])); 3459 } 3460 break; 3461 3462 case 163: /* type_specifier_no_prec: type_specifier_nonarray */ 3463 { 3464 (yyval.interm.type) 3465 .initialize((yyvsp[0].interm.typeSpecifierNonArray), 3466 (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); 3467 } 3468 break; 3469 3470 case 164: /* type_specifier_no_prec: type_specifier_nonarray array_specifier */ 3471 { 3472 (yyval.interm.type) 3473 .initialize((yyvsp[-1].interm.typeSpecifierNonArray), 3474 (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); 3475 (yyval.interm.type).setArraySizes((yyvsp[0].interm.arraySizes)); 3476 } 3477 break; 3478 3479 case 165: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ 3480 { 3481 ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array"); 3482 (yyval.interm.arraySizes) = new TVector<unsigned int>(); 3483 (yyval.interm.arraySizes)->push_back(0u); 3484 } 3485 break; 3486 3487 case 166: /* array_specifier: LEFT_BRACKET constant_expression RIGHT_BRACKET */ 3488 { 3489 (yyval.interm.arraySizes) = new TVector<unsigned int>(); 3490 unsigned int size = 3491 context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); 3492 // Make the type an array even if size check failed. 3493 // This ensures useless error messages regarding a variable's non-arrayness won't 3494 // follow. 3495 (yyval.interm.arraySizes)->push_back(size); 3496 } 3497 break; 3498 3499 case 167: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ 3500 { 3501 ES3_1_OR_NEWER("[]", (yylsp[-1]), "arrays of arrays"); 3502 (yyval.interm.arraySizes) = (yyvsp[-2].interm.arraySizes); 3503 (yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), 0u); 3504 } 3505 break; 3506 3507 case 168: /* array_specifier: array_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET 3508 */ 3509 { 3510 ES3_1_OR_NEWER("[]", (yylsp[-2]), "arrays of arrays"); 3511 (yyval.interm.arraySizes) = (yyvsp[-3].interm.arraySizes); 3512 unsigned int size = 3513 context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); 3514 // Make the type an array even if size check failed. 3515 // This ensures useless error messages regarding a variable's non-arrayness won't 3516 // follow. 3517 (yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), size); 3518 } 3519 break; 3520 3521 case 169: /* type_specifier_nonarray: VOID_TYPE */ 3522 { 3523 (yyval.interm.typeSpecifierNonArray).initialize(EbtVoid, (yylsp[0])); 3524 } 3525 break; 3526 3527 case 170: /* type_specifier_nonarray: FLOAT_TYPE */ 3528 { 3529 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3530 } 3531 break; 3532 3533 case 171: /* type_specifier_nonarray: INT_TYPE */ 3534 { 3535 (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); 3536 } 3537 break; 3538 3539 case 172: /* type_specifier_nonarray: UINT_TYPE */ 3540 { 3541 (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); 3542 } 3543 break; 3544 3545 case 173: /* type_specifier_nonarray: BOOL_TYPE */ 3546 { 3547 (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); 3548 } 3549 break; 3550 3551 case 174: /* type_specifier_nonarray: VEC2 */ 3552 { 3553 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3554 (yyval.interm.typeSpecifierNonArray).setAggregate(2); 3555 } 3556 break; 3557 3558 case 175: /* type_specifier_nonarray: VEC3 */ 3559 { 3560 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3561 (yyval.interm.typeSpecifierNonArray).setAggregate(3); 3562 } 3563 break; 3564 3565 case 176: /* type_specifier_nonarray: VEC4 */ 3566 { 3567 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3568 (yyval.interm.typeSpecifierNonArray).setAggregate(4); 3569 } 3570 break; 3571 3572 case 177: /* type_specifier_nonarray: BVEC2 */ 3573 { 3574 (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); 3575 (yyval.interm.typeSpecifierNonArray).setAggregate(2); 3576 } 3577 break; 3578 3579 case 178: /* type_specifier_nonarray: BVEC3 */ 3580 { 3581 (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); 3582 (yyval.interm.typeSpecifierNonArray).setAggregate(3); 3583 } 3584 break; 3585 3586 case 179: /* type_specifier_nonarray: BVEC4 */ 3587 { 3588 (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); 3589 (yyval.interm.typeSpecifierNonArray).setAggregate(4); 3590 } 3591 break; 3592 3593 case 180: /* type_specifier_nonarray: IVEC2 */ 3594 { 3595 (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); 3596 (yyval.interm.typeSpecifierNonArray).setAggregate(2); 3597 } 3598 break; 3599 3600 case 181: /* type_specifier_nonarray: IVEC3 */ 3601 { 3602 (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); 3603 (yyval.interm.typeSpecifierNonArray).setAggregate(3); 3604 } 3605 break; 3606 3607 case 182: /* type_specifier_nonarray: IVEC4 */ 3608 { 3609 (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); 3610 (yyval.interm.typeSpecifierNonArray).setAggregate(4); 3611 } 3612 break; 3613 3614 case 183: /* type_specifier_nonarray: UVEC2 */ 3615 { 3616 (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); 3617 (yyval.interm.typeSpecifierNonArray).setAggregate(2); 3618 } 3619 break; 3620 3621 case 184: /* type_specifier_nonarray: UVEC3 */ 3622 { 3623 (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); 3624 (yyval.interm.typeSpecifierNonArray).setAggregate(3); 3625 } 3626 break; 3627 3628 case 185: /* type_specifier_nonarray: UVEC4 */ 3629 { 3630 (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); 3631 (yyval.interm.typeSpecifierNonArray).setAggregate(4); 3632 } 3633 break; 3634 3635 case 186: /* type_specifier_nonarray: MATRIX2 */ 3636 { 3637 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3638 (yyval.interm.typeSpecifierNonArray).setMatrix(2, 2); 3639 } 3640 break; 3641 3642 case 187: /* type_specifier_nonarray: MATRIX3 */ 3643 { 3644 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3645 (yyval.interm.typeSpecifierNonArray).setMatrix(3, 3); 3646 } 3647 break; 3648 3649 case 188: /* type_specifier_nonarray: MATRIX4 */ 3650 { 3651 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3652 (yyval.interm.typeSpecifierNonArray).setMatrix(4, 4); 3653 } 3654 break; 3655 3656 case 189: /* type_specifier_nonarray: MATRIX2x3 */ 3657 { 3658 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3659 (yyval.interm.typeSpecifierNonArray).setMatrix(2, 3); 3660 } 3661 break; 3662 3663 case 190: /* type_specifier_nonarray: MATRIX3x2 */ 3664 { 3665 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3666 (yyval.interm.typeSpecifierNonArray).setMatrix(3, 2); 3667 } 3668 break; 3669 3670 case 191: /* type_specifier_nonarray: MATRIX2x4 */ 3671 { 3672 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3673 (yyval.interm.typeSpecifierNonArray).setMatrix(2, 4); 3674 } 3675 break; 3676 3677 case 192: /* type_specifier_nonarray: MATRIX4x2 */ 3678 { 3679 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3680 (yyval.interm.typeSpecifierNonArray).setMatrix(4, 2); 3681 } 3682 break; 3683 3684 case 193: /* type_specifier_nonarray: MATRIX3x4 */ 3685 { 3686 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3687 (yyval.interm.typeSpecifierNonArray).setMatrix(3, 4); 3688 } 3689 break; 3690 3691 case 194: /* type_specifier_nonarray: MATRIX4x3 */ 3692 { 3693 (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); 3694 (yyval.interm.typeSpecifierNonArray).setMatrix(4, 3); 3695 } 3696 break; 3697 3698 case 195: /* type_specifier_nonarray: YUVCSCSTANDARDEXT */ 3699 { 3700 if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target)) 3701 { 3702 context->error((yylsp[0]), "unsupported type", "yuvCscStandardEXT"); 3703 } 3704 (yyval.interm.typeSpecifierNonArray).initialize(EbtYuvCscStandardEXT, (yylsp[0])); 3705 } 3706 break; 3707 3708 case 196: /* type_specifier_nonarray: SAMPLER2D */ 3709 { 3710 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2D, (yylsp[0])); 3711 } 3712 break; 3713 3714 case 197: /* type_specifier_nonarray: SAMPLER3D */ 3715 { 3716 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler3D, (yylsp[0])); 3717 } 3718 break; 3719 3720 case 198: /* type_specifier_nonarray: SAMPLERCUBE */ 3721 { 3722 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCube, (yylsp[0])); 3723 } 3724 break; 3725 3726 case 199: /* type_specifier_nonarray: SAMPLER2DARRAY */ 3727 { 3728 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArray, (yylsp[0])); 3729 } 3730 break; 3731 3732 case 200: /* type_specifier_nonarray: SAMPLER2DMS */ 3733 { 3734 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMS, (yylsp[0])); 3735 } 3736 break; 3737 3738 case 201: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ 3739 { 3740 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMSArray, (yylsp[0])); 3741 } 3742 break; 3743 3744 case 202: /* type_specifier_nonarray: SAMPLERCUBEARRAYOES */ 3745 { 3746 if (context->getShaderVersion() < 320 && 3747 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 3748 { 3749 context->error((yylsp[0]), "unsupported type", "__samplerCubeArray"); 3750 } 3751 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArray, (yylsp[0])); 3752 } 3753 break; 3754 3755 case 203: /* type_specifier_nonarray: SAMPLERCUBEARRAYEXT */ 3756 { 3757 if (context->getShaderVersion() < 320 && 3758 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 3759 { 3760 context->error((yylsp[0]), "unsupported type", "__samplerCubeArray"); 3761 } 3762 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArray, (yylsp[0])); 3763 } 3764 break; 3765 3766 case 204: /* type_specifier_nonarray: SAMPLERBUFFER */ 3767 { 3768 constexpr std::array<TExtension, 2u> extensions{ 3769 {TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}}; 3770 if (context->getShaderVersion() < 320 && 3771 !context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 3772 { 3773 context->error((yylsp[0]), "unsupported type", "__samplerBuffer"); 3774 } 3775 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerBuffer, (yylsp[0])); 3776 } 3777 break; 3778 3779 case 205: /* type_specifier_nonarray: ISAMPLER2D */ 3780 { 3781 (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2D, (yylsp[0])); 3782 } 3783 break; 3784 3785 case 206: /* type_specifier_nonarray: ISAMPLER3D */ 3786 { 3787 (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler3D, (yylsp[0])); 3788 } 3789 break; 3790 3791 case 207: /* type_specifier_nonarray: ISAMPLERCUBE */ 3792 { 3793 (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCube, (yylsp[0])); 3794 } 3795 break; 3796 3797 case 208: /* type_specifier_nonarray: ISAMPLER2DARRAY */ 3798 { 3799 (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DArray, (yylsp[0])); 3800 } 3801 break; 3802 3803 case 209: /* type_specifier_nonarray: ISAMPLER2DMS */ 3804 { 3805 (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMS, (yylsp[0])); 3806 } 3807 break; 3808 3809 case 210: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ 3810 { 3811 (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMSArray, (yylsp[0])); 3812 } 3813 break; 3814 3815 case 211: /* type_specifier_nonarray: ISAMPLERCUBEARRAYOES */ 3816 { 3817 if (context->getShaderVersion() < 320 && 3818 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 3819 { 3820 context->error((yylsp[0]), "unsupported type", "__isamplerCubeArray"); 3821 } 3822 (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCubeArray, (yylsp[0])); 3823 } 3824 break; 3825 3826 case 212: /* type_specifier_nonarray: ISAMPLERCUBEARRAYEXT */ 3827 { 3828 if (context->getShaderVersion() < 320 && 3829 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 3830 { 3831 context->error((yylsp[0]), "unsupported type", "__isamplerCubeArray"); 3832 } 3833 (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCubeArray, (yylsp[0])); 3834 } 3835 break; 3836 3837 case 213: /* type_specifier_nonarray: ISAMPLERBUFFER */ 3838 { 3839 constexpr std::array<TExtension, 2u> extensions{ 3840 {TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}}; 3841 if (context->getShaderVersion() < 320 && 3842 !context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 3843 { 3844 context->error((yylsp[0]), "unsupported type", "__isamplerBuffer"); 3845 } 3846 (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerBuffer, (yylsp[0])); 3847 } 3848 break; 3849 3850 case 214: /* type_specifier_nonarray: USAMPLER2D */ 3851 { 3852 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2D, (yylsp[0])); 3853 } 3854 break; 3855 3856 case 215: /* type_specifier_nonarray: USAMPLER3D */ 3857 { 3858 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler3D, (yylsp[0])); 3859 } 3860 break; 3861 3862 case 216: /* type_specifier_nonarray: USAMPLERCUBE */ 3863 { 3864 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCube, (yylsp[0])); 3865 } 3866 break; 3867 3868 case 217: /* type_specifier_nonarray: USAMPLER2DARRAY */ 3869 { 3870 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DArray, (yylsp[0])); 3871 } 3872 break; 3873 3874 case 218: /* type_specifier_nonarray: USAMPLER2DMS */ 3875 { 3876 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMS, (yylsp[0])); 3877 } 3878 break; 3879 3880 case 219: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ 3881 { 3882 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMSArray, (yylsp[0])); 3883 } 3884 break; 3885 3886 case 220: /* type_specifier_nonarray: USAMPLERCUBEARRAYOES */ 3887 { 3888 if (context->getShaderVersion() < 320 && 3889 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 3890 { 3891 context->error((yylsp[0]), "unsupported type", "__usamplerCubeArray"); 3892 } 3893 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCubeArray, (yylsp[0])); 3894 } 3895 break; 3896 3897 case 221: /* type_specifier_nonarray: USAMPLERCUBEARRAYEXT */ 3898 { 3899 if (context->getShaderVersion() < 320 && 3900 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 3901 { 3902 context->error((yylsp[0]), "unsupported type", "__usamplerCubeArray"); 3903 } 3904 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCubeArray, (yylsp[0])); 3905 } 3906 break; 3907 3908 case 222: /* type_specifier_nonarray: USAMPLERBUFFER */ 3909 { 3910 constexpr std::array<TExtension, 2u> extensions{ 3911 {TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}}; 3912 if (context->getShaderVersion() < 320 && 3913 !context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 3914 { 3915 context->error((yylsp[0]), "unsupported type", "__usamplerBuffer"); 3916 } 3917 (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerBuffer, (yylsp[0])); 3918 } 3919 break; 3920 3921 case 223: /* type_specifier_nonarray: SAMPLER2DSHADOW */ 3922 { 3923 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DShadow, (yylsp[0])); 3924 } 3925 break; 3926 3927 case 224: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ 3928 { 3929 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeShadow, (yylsp[0])); 3930 } 3931 break; 3932 3933 case 225: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ 3934 { 3935 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArrayShadow, (yylsp[0])); 3936 } 3937 break; 3938 3939 case 226: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOWOES */ 3940 { 3941 if (context->getShaderVersion() < 320 && 3942 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 3943 { 3944 context->error((yylsp[0]), "unsupported type", "__samplerCubeArrayShadow"); 3945 } 3946 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArrayShadow, (yylsp[0])); 3947 } 3948 break; 3949 3950 case 227: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOWEXT */ 3951 { 3952 if (context->getShaderVersion() < 320 && 3953 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 3954 { 3955 context->error((yylsp[0]), "unsupported type", "__samplerCubeArrayShadow"); 3956 } 3957 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeArrayShadow, (yylsp[0])); 3958 } 3959 break; 3960 3961 case 228: /* type_specifier_nonarray: SAMPLERVIDEOWEBGL */ 3962 { 3963 if (!context->checkCanUseExtension((yylsp[0]), TExtension::WEBGL_video_texture)) 3964 { 3965 context->error((yylsp[0]), "unsupported type", "samplerVideoWEBGL"); 3966 } 3967 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerVideoWEBGL, (yylsp[0])); 3968 } 3969 break; 3970 3971 case 229: /* type_specifier_nonarray: SAMPLER_EXTERNAL_OES */ 3972 { 3973 constexpr std::array<TExtension, 3u> extensions{ 3974 {TExtension::NV_EGL_stream_consumer_external, 3975 TExtension::OES_EGL_image_external_essl3, TExtension::OES_EGL_image_external}}; 3976 if (!context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 3977 { 3978 context->error((yylsp[0]), "unsupported type", "samplerExternalOES"); 3979 } 3980 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternalOES, (yylsp[0])); 3981 } 3982 break; 3983 3984 case 230: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ 3985 { 3986 if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target)) 3987 { 3988 context->error((yylsp[0]), "unsupported type", "__samplerExternal2DY2YEXT"); 3989 } 3990 (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternal2DY2YEXT, (yylsp[0])); 3991 } 3992 break; 3993 3994 case 231: /* type_specifier_nonarray: SAMPLER2DRECT */ 3995 { 3996 if (!context->checkCanUseExtension((yylsp[0]), TExtension::ARB_texture_rectangle)) 3997 { 3998 context->error((yylsp[0]), "unsupported type", "sampler2DRect"); 3999 } 4000 (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DRect, (yylsp[0])); 4001 } 4002 break; 4003 4004 case 232: /* type_specifier_nonarray: IMAGE2D */ 4005 { 4006 (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2D, (yylsp[0])); 4007 } 4008 break; 4009 4010 case 233: /* type_specifier_nonarray: IIMAGE2D */ 4011 { 4012 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2D, (yylsp[0])); 4013 } 4014 break; 4015 4016 case 234: /* type_specifier_nonarray: UIMAGE2D */ 4017 { 4018 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2D, (yylsp[0])); 4019 } 4020 break; 4021 4022 case 235: /* type_specifier_nonarray: IMAGE3D */ 4023 { 4024 (yyval.interm.typeSpecifierNonArray).initialize(EbtImage3D, (yylsp[0])); 4025 } 4026 break; 4027 4028 case 236: /* type_specifier_nonarray: IIMAGE3D */ 4029 { 4030 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage3D, (yylsp[0])); 4031 } 4032 break; 4033 4034 case 237: /* type_specifier_nonarray: UIMAGE3D */ 4035 { 4036 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage3D, (yylsp[0])); 4037 } 4038 break; 4039 4040 case 238: /* type_specifier_nonarray: IMAGE2DARRAY */ 4041 { 4042 (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2DArray, (yylsp[0])); 4043 } 4044 break; 4045 4046 case 239: /* type_specifier_nonarray: IIMAGE2DARRAY */ 4047 { 4048 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2DArray, (yylsp[0])); 4049 } 4050 break; 4051 4052 case 240: /* type_specifier_nonarray: UIMAGE2DARRAY */ 4053 { 4054 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2DArray, (yylsp[0])); 4055 } 4056 break; 4057 4058 case 241: /* type_specifier_nonarray: IMAGECUBE */ 4059 { 4060 (yyval.interm.typeSpecifierNonArray).initialize(EbtImageCube, (yylsp[0])); 4061 } 4062 break; 4063 4064 case 242: /* type_specifier_nonarray: IIMAGECUBE */ 4065 { 4066 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCube, (yylsp[0])); 4067 } 4068 break; 4069 4070 case 243: /* type_specifier_nonarray: UIMAGECUBE */ 4071 { 4072 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCube, (yylsp[0])); 4073 } 4074 break; 4075 4076 case 244: /* type_specifier_nonarray: IMAGECUBEARRAYOES */ 4077 { 4078 if (context->getShaderVersion() < 320 && 4079 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 4080 { 4081 context->error((yylsp[0]), "unsupported type", "__imageCubeArray"); 4082 } 4083 (yyval.interm.typeSpecifierNonArray).initialize(EbtImageCubeArray, (yylsp[0])); 4084 } 4085 break; 4086 4087 case 245: /* type_specifier_nonarray: IMAGECUBEARRAYEXT */ 4088 { 4089 if (context->getShaderVersion() < 320 && 4090 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 4091 { 4092 context->error((yylsp[0]), "unsupported type", "__imageCubeArray"); 4093 } 4094 (yyval.interm.typeSpecifierNonArray).initialize(EbtImageCubeArray, (yylsp[0])); 4095 } 4096 break; 4097 4098 case 246: /* type_specifier_nonarray: IIMAGECUBEARRAYOES */ 4099 { 4100 if (context->getShaderVersion() < 320 && 4101 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 4102 { 4103 context->error((yylsp[0]), "unsupported type", "__iimageCubeArray"); 4104 } 4105 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCubeArray, (yylsp[0])); 4106 } 4107 break; 4108 4109 case 247: /* type_specifier_nonarray: IIMAGECUBEARRAYEXT */ 4110 { 4111 if (context->getShaderVersion() < 320 && 4112 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 4113 { 4114 context->error((yylsp[0]), "unsupported type", "__iimageCubeArray"); 4115 } 4116 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCubeArray, (yylsp[0])); 4117 } 4118 break; 4119 4120 case 248: /* type_specifier_nonarray: UIMAGECUBEARRAYOES */ 4121 { 4122 if (context->getShaderVersion() < 320 && 4123 !context->checkCanUseExtension((yylsp[0]), TExtension::OES_texture_cube_map_array)) 4124 { 4125 context->error((yylsp[0]), "unsupported type", "__uimageCubeArray"); 4126 } 4127 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCubeArray, (yylsp[0])); 4128 } 4129 break; 4130 4131 case 249: /* type_specifier_nonarray: UIMAGECUBEARRAYEXT */ 4132 { 4133 if (context->getShaderVersion() < 320 && 4134 !context->checkCanUseExtension((yylsp[0]), TExtension::EXT_texture_cube_map_array)) 4135 { 4136 context->error((yylsp[0]), "unsupported type", "__uimageCubeArray"); 4137 } 4138 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCubeArray, (yylsp[0])); 4139 } 4140 break; 4141 4142 case 250: /* type_specifier_nonarray: IMAGEBUFFER */ 4143 { 4144 constexpr std::array<TExtension, 2u> extensions{ 4145 {TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}}; 4146 if (context->getShaderVersion() < 320 && 4147 !context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 4148 { 4149 context->error((yylsp[0]), "unsupported type", "__imageBuffer"); 4150 } 4151 (yyval.interm.typeSpecifierNonArray).initialize(EbtImageBuffer, (yylsp[0])); 4152 } 4153 break; 4154 4155 case 251: /* type_specifier_nonarray: IIMAGEBUFFER */ 4156 { 4157 constexpr std::array<TExtension, 2u> extensions{ 4158 {TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}}; 4159 if (context->getShaderVersion() < 320 && 4160 !context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 4161 { 4162 context->error((yylsp[0]), "unsupported type", "__iimageBuffer"); 4163 } 4164 (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageBuffer, (yylsp[0])); 4165 } 4166 break; 4167 4168 case 252: /* type_specifier_nonarray: UIMAGEBUFFER */ 4169 { 4170 constexpr std::array<TExtension, 2u> extensions{ 4171 {TExtension::OES_texture_buffer, TExtension::EXT_texture_buffer}}; 4172 if (context->getShaderVersion() < 320 && 4173 !context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) 4174 { 4175 context->error((yylsp[0]), "unsupported type", "__uimageBuffer"); 4176 } 4177 (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageBuffer, (yylsp[0])); 4178 } 4179 break; 4180 4181 case 253: /* type_specifier_nonarray: ATOMICUINT */ 4182 { 4183 (yyval.interm.typeSpecifierNonArray).initialize(EbtAtomicCounter, (yylsp[0])); 4184 } 4185 break; 4186 4187 case 254: /* type_specifier_nonarray: PIXELLOCALANGLE */ 4188 { 4189 if (!context->checkCanUseExtension((yylsp[0]), 4190 TExtension::ANGLE_shader_pixel_local_storage)) 4191 { 4192 context->error((yylsp[0]), "unsupported type", "__pixelLocalANGLE"); 4193 } 4194 (yyval.interm.typeSpecifierNonArray).initialize(EbtPixelLocalANGLE, (yylsp[0])); 4195 } 4196 break; 4197 4198 case 255: /* type_specifier_nonarray: IPIXELLOCALANGLE */ 4199 { 4200 if (!context->checkCanUseExtension((yylsp[0]), 4201 TExtension::ANGLE_shader_pixel_local_storage)) 4202 { 4203 context->error((yylsp[0]), "unsupported type", "__ipixelLocalANGLE"); 4204 } 4205 (yyval.interm.typeSpecifierNonArray).initialize(EbtIPixelLocalANGLE, (yylsp[0])); 4206 } 4207 break; 4208 4209 case 256: /* type_specifier_nonarray: UPIXELLOCALANGLE */ 4210 { 4211 if (!context->checkCanUseExtension((yylsp[0]), 4212 TExtension::ANGLE_shader_pixel_local_storage)) 4213 { 4214 context->error((yylsp[0]), "unsupported type", "__upixelLocalANGLE"); 4215 } 4216 (yyval.interm.typeSpecifierNonArray).initialize(EbtUPixelLocalANGLE, (yylsp[0])); 4217 } 4218 break; 4219 4220 case 257: /* type_specifier_nonarray: struct_specifier */ 4221 { 4222 (yyval.interm.typeSpecifierNonArray) = (yyvsp[0].interm.typeSpecifierNonArray); 4223 } 4224 break; 4225 4226 case 258: /* type_specifier_nonarray: TYPE_NAME */ 4227 { 4228 // This is for user defined type names. The lexical phase looked up the type. 4229 const TStructure *structure = static_cast<const TStructure *>((yyvsp[0].lex).symbol); 4230 (yyval.interm.typeSpecifierNonArray).initializeStruct(structure, false, (yylsp[0])); 4231 } 4232 break; 4233 4234 case 259: /* $@1: %empty */ 4235 { 4236 context->enterStructDeclaration((yylsp[-1]), ImmutableString((yyvsp[-1].lex).string)); 4237 } 4238 break; 4239 4240 case 260: /* struct_specifier: STRUCT identifier LEFT_BRACE $@1 struct_declaration_list 4241 RIGHT_BRACE */ 4242 { 4243 (yyval.interm.typeSpecifierNonArray) = context->addStructure( 4244 (yylsp[-5]), (yylsp[-4]), ImmutableString((yyvsp[-4].lex).string), 4245 (yyvsp[-1].interm.fieldList)); 4246 } 4247 break; 4248 4249 case 261: /* $@2: %empty */ 4250 { 4251 context->enterStructDeclaration((yylsp[0]), kEmptyImmutableString); 4252 } 4253 break; 4254 4255 case 262: /* struct_specifier: STRUCT LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ 4256 { 4257 (yyval.interm.typeSpecifierNonArray) = context->addStructure( 4258 (yylsp[-4]), (yyloc), kEmptyImmutableString, (yyvsp[-1].interm.fieldList)); 4259 } 4260 break; 4261 4262 case 263: /* struct_declaration_list: struct_declaration */ 4263 { 4264 (yyval.interm.fieldList) = 4265 context->addStructFieldList((yyvsp[0].interm.fieldList), (yylsp[0])); 4266 } 4267 break; 4268 4269 case 264: /* struct_declaration_list: struct_declaration_list struct_declaration */ 4270 { 4271 (yyval.interm.fieldList) = context->combineStructFieldLists( 4272 (yyvsp[-1].interm.fieldList), (yyvsp[0].interm.fieldList), (yylsp[0])); 4273 } 4274 break; 4275 4276 case 265: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ 4277 { 4278 (yyval.interm.fieldList) = context->addStructDeclaratorList( 4279 (yyvsp[-2].interm.type), (yyvsp[-1].interm.declaratorList)); 4280 } 4281 break; 4282 4283 case 266: /* struct_declaration: type_qualifier type_specifier struct_declarator_list 4284 SEMICOLON */ 4285 { 4286 // ES3 Only, but errors should be handled elsewhere 4287 (yyval.interm.fieldList) = context->addStructDeclaratorListWithQualifiers( 4288 *(yyvsp[-3].interm.typeQualifierBuilder), &(yyvsp[-2].interm.type), 4289 (yyvsp[-1].interm.declaratorList)); 4290 } 4291 break; 4292 4293 case 267: /* struct_declarator_list: struct_declarator */ 4294 { 4295 (yyval.interm.declaratorList) = new TDeclaratorList(); 4296 (yyval.interm.declaratorList)->push_back((yyvsp[0].interm.declarator)); 4297 } 4298 break; 4299 4300 case 268: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ 4301 { 4302 (yyval.interm.declaratorList)->push_back((yyvsp[0].interm.declarator)); 4303 } 4304 break; 4305 4306 case 269: /* struct_declarator: identifier */ 4307 { 4308 (yyval.interm.declarator) = 4309 context->parseStructDeclarator(ImmutableString((yyvsp[0].lex).string), (yylsp[0])); 4310 } 4311 break; 4312 4313 case 270: /* struct_declarator: identifier array_specifier */ 4314 { 4315 (yyval.interm.declarator) = context->parseStructArrayDeclarator( 4316 ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), (yyvsp[0].interm.arraySizes)); 4317 } 4318 break; 4319 4320 case 271: /* initializer: assignment_expression */ 4321 { 4322 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); 4323 } 4324 break; 4325 4326 case 272: /* declaration_statement: declaration */ 4327 { 4328 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4329 } 4330 break; 4331 4332 case 273: /* statement: compound_statement_with_scope */ 4333 { 4334 (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); 4335 } 4336 break; 4337 4338 case 274: /* statement: simple_statement */ 4339 { 4340 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4341 } 4342 break; 4343 4344 case 275: /* simple_statement: declaration_statement */ 4345 { 4346 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4347 } 4348 break; 4349 4350 case 276: /* simple_statement: expression_statement */ 4351 { 4352 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4353 } 4354 break; 4355 4356 case 277: /* simple_statement: selection_statement */ 4357 { 4358 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4359 } 4360 break; 4361 4362 case 278: /* simple_statement: switch_statement */ 4363 { 4364 (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); 4365 } 4366 break; 4367 4368 case 279: /* simple_statement: case_label */ 4369 { 4370 (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); 4371 } 4372 break; 4373 4374 case 280: /* simple_statement: iteration_statement */ 4375 { 4376 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4377 } 4378 break; 4379 4380 case 281: /* simple_statement: jump_statement */ 4381 { 4382 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4383 } 4384 break; 4385 4386 case 282: /* compound_statement_with_scope: LEFT_BRACE RIGHT_BRACE */ 4387 { 4388 (yyval.interm.intermBlock) = new TIntermBlock(); 4389 (yyval.interm.intermBlock)->setLine((yyloc)); 4390 } 4391 break; 4392 4393 case 283: /* $@3: %empty */ 4394 { 4395 context->symbolTable.push(); 4396 } 4397 break; 4398 4399 case 284: /* $@4: %empty */ 4400 { 4401 context->symbolTable.pop(); 4402 } 4403 break; 4404 4405 case 285: /* compound_statement_with_scope: LEFT_BRACE $@3 statement_list $@4 RIGHT_BRACE */ 4406 { 4407 (yyvsp[-2].interm.intermBlock)->setLine((yyloc)); 4408 (yyval.interm.intermBlock) = (yyvsp[-2].interm.intermBlock); 4409 } 4410 break; 4411 4412 case 286: /* statement_no_new_scope: compound_statement_no_new_scope */ 4413 { 4414 (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); 4415 } 4416 break; 4417 4418 case 287: /* statement_no_new_scope: simple_statement */ 4419 { 4420 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4421 } 4422 break; 4423 4424 case 288: /* $@5: %empty */ 4425 { 4426 context->symbolTable.push(); 4427 } 4428 break; 4429 4430 case 289: /* statement_with_scope: $@5 compound_statement_no_new_scope */ 4431 { 4432 context->symbolTable.pop(); 4433 (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); 4434 } 4435 break; 4436 4437 case 290: /* $@6: %empty */ 4438 { 4439 context->symbolTable.push(); 4440 } 4441 break; 4442 4443 case 291: /* statement_with_scope: $@6 simple_statement */ 4444 { 4445 context->symbolTable.pop(); 4446 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4447 } 4448 break; 4449 4450 case 292: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ 4451 { 4452 (yyval.interm.intermBlock) = new TIntermBlock(); 4453 (yyval.interm.intermBlock)->setLine((yyloc)); 4454 } 4455 break; 4456 4457 case 293: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ 4458 { 4459 (yyvsp[-1].interm.intermBlock)->setLine((yyloc)); 4460 (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); 4461 } 4462 break; 4463 4464 case 294: /* statement_list: statement */ 4465 { 4466 (yyval.interm.intermBlock) = new TIntermBlock(); 4467 context->appendStatement((yyval.interm.intermBlock), (yyvsp[0].interm.intermNode)); 4468 } 4469 break; 4470 4471 case 295: /* statement_list: statement_list statement */ 4472 { 4473 (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); 4474 context->appendStatement((yyval.interm.intermBlock), (yyvsp[0].interm.intermNode)); 4475 } 4476 break; 4477 4478 case 296: /* expression_statement: SEMICOLON */ 4479 { 4480 (yyval.interm.intermNode) = context->addEmptyStatement((yyloc)); 4481 } 4482 break; 4483 4484 case 297: /* expression_statement: expression SEMICOLON */ 4485 { 4486 (yyval.interm.intermNode) = (yyvsp[-1].interm.intermTypedNode); 4487 } 4488 break; 4489 4490 case 298: /* selection_statement: IF LEFT_PAREN expression RIGHT_PAREN 4491 selection_rest_statement */ 4492 { 4493 (yyval.interm.intermNode) = context->addIfElse((yyvsp[-2].interm.intermTypedNode), 4494 (yyvsp[0].interm.nodePair), (yylsp[-4])); 4495 } 4496 break; 4497 4498 case 299: /* selection_rest_statement: statement_with_scope ELSE statement_with_scope */ 4499 { 4500 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); 4501 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); 4502 } 4503 break; 4504 4505 case 300: /* selection_rest_statement: statement_with_scope */ 4506 { 4507 (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); 4508 (yyval.interm.nodePair).node2 = nullptr; 4509 } 4510 break; 4511 4512 case 301: /* $@7: %empty */ 4513 { 4514 context->incrSwitchNestingLevel(); 4515 } 4516 break; 4517 4518 case 302: /* switch_statement: SWITCH LEFT_PAREN expression RIGHT_PAREN $@7 4519 compound_statement_with_scope */ 4520 { 4521 (yyval.interm.intermSwitch) = context->addSwitch( 4522 (yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermBlock), (yylsp[-5])); 4523 context->decrSwitchNestingLevel(); 4524 } 4525 break; 4526 4527 case 303: /* case_label: CASE constant_expression COLON */ 4528 { 4529 (yyval.interm.intermCase) = 4530 context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); 4531 } 4532 break; 4533 4534 case 304: /* case_label: DEFAULT COLON */ 4535 { 4536 (yyval.interm.intermCase) = context->addDefault((yylsp[-1])); 4537 } 4538 break; 4539 4540 case 305: /* condition: expression */ 4541 { 4542 (yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode); 4543 context->checkIsScalarBool((yyvsp[0].interm.intermTypedNode)->getLine(), 4544 (yyvsp[0].interm.intermTypedNode)); 4545 } 4546 break; 4547 4548 case 306: /* condition: fully_specified_type identifier EQUAL initializer */ 4549 { 4550 (yyval.interm.intermNode) = context->addConditionInitializer( 4551 (yyvsp[-3].interm.type), ImmutableString((yyvsp[-2].lex).string), 4552 (yyvsp[0].interm.intermTypedNode), (yylsp[-2])); 4553 } 4554 break; 4555 4556 case 307: /* $@8: %empty */ 4557 { 4558 context->symbolTable.push(); 4559 context->incrLoopNestingLevel(); 4560 } 4561 break; 4562 4563 case 308: /* iteration_statement: WHILE LEFT_PAREN $@8 condition RIGHT_PAREN 4564 statement_no_new_scope */ 4565 { 4566 context->symbolTable.pop(); 4567 (yyval.interm.intermNode) = 4568 context->addLoop(ELoopWhile, 0, (yyvsp[-2].interm.intermNode), 0, 4569 (yyvsp[0].interm.intermNode), (yylsp[-5])); 4570 context->decrLoopNestingLevel(); 4571 } 4572 break; 4573 4574 case 309: /* $@9: %empty */ 4575 { 4576 context->incrLoopNestingLevel(); 4577 } 4578 break; 4579 4580 case 310: /* iteration_statement: DO $@9 statement_with_scope WHILE LEFT_PAREN expression 4581 RIGHT_PAREN SEMICOLON */ 4582 { 4583 (yyval.interm.intermNode) = 4584 context->addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, 4585 (yyvsp[-5].interm.intermNode), (yylsp[-4])); 4586 context->decrLoopNestingLevel(); 4587 } 4588 break; 4589 4590 case 311: /* $@10: %empty */ 4591 { 4592 context->symbolTable.push(); 4593 context->incrLoopNestingLevel(); 4594 } 4595 break; 4596 4597 case 312: /* iteration_statement: FOR LEFT_PAREN $@10 for_init_statement for_rest_statement 4598 RIGHT_PAREN statement_no_new_scope */ 4599 { 4600 context->symbolTable.pop(); 4601 (yyval.interm.intermNode) = context->addLoop( 4602 ELoopFor, (yyvsp[-3].interm.intermNode), (yyvsp[-2].interm.nodePair).node1, 4603 reinterpret_cast<TIntermTyped *>((yyvsp[-2].interm.nodePair).node2), 4604 (yyvsp[0].interm.intermNode), (yylsp[-6])); 4605 context->decrLoopNestingLevel(); 4606 } 4607 break; 4608 4609 case 313: /* for_init_statement: expression_statement */ 4610 { 4611 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4612 } 4613 break; 4614 4615 case 314: /* for_init_statement: declaration_statement */ 4616 { 4617 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4618 } 4619 break; 4620 4621 case 315: /* conditionopt: condition */ 4622 { 4623 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4624 } 4625 break; 4626 4627 case 316: /* conditionopt: %empty */ 4628 { 4629 (yyval.interm.intermNode) = nullptr; 4630 } 4631 break; 4632 4633 case 317: /* for_rest_statement: conditionopt SEMICOLON */ 4634 { 4635 (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermNode); 4636 (yyval.interm.nodePair).node2 = 0; 4637 } 4638 break; 4639 4640 case 318: /* for_rest_statement: conditionopt SEMICOLON expression */ 4641 { 4642 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); 4643 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); 4644 } 4645 break; 4646 4647 case 319: /* jump_statement: CONTINUE SEMICOLON */ 4648 { 4649 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1])); 4650 } 4651 break; 4652 4653 case 320: /* jump_statement: BREAK SEMICOLON */ 4654 { 4655 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1])); 4656 } 4657 break; 4658 4659 case 321: /* jump_statement: RETURN SEMICOLON */ 4660 { 4661 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1])); 4662 } 4663 break; 4664 4665 case 322: /* jump_statement: RETURN expression SEMICOLON */ 4666 { 4667 (yyval.interm.intermNode) = 4668 context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); 4669 } 4670 break; 4671 4672 case 323: /* jump_statement: DISCARD SEMICOLON */ 4673 { 4674 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1])); 4675 } 4676 break; 4677 4678 case 324: /* translation_unit: external_declaration */ 4679 { 4680 (yyval.interm.intermBlock) = new TIntermBlock(); 4681 (yyval.interm.intermBlock)->setLine((yyloc)); 4682 (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); 4683 context->setTreeRoot((yyval.interm.intermBlock)); 4684 } 4685 break; 4686 4687 case 325: /* translation_unit: translation_unit external_declaration */ 4688 { 4689 (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); 4690 } 4691 break; 4692 4693 case 326: /* external_declaration: function_definition */ 4694 { 4695 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4696 } 4697 break; 4698 4699 case 327: /* external_declaration: declaration */ 4700 { 4701 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); 4702 } 4703 break; 4704 4705 case 328: /* $@11: %empty */ 4706 { 4707 context->parseFunctionDefinitionHeader((yylsp[0]), (yyvsp[0].interm).function, 4708 &((yyvsp[0].interm).intermFunctionPrototype)); 4709 } 4710 break; 4711 4712 case 329: /* function_definition: function_prototype $@11 compound_statement_no_new_scope */ 4713 { 4714 (yyval.interm.intermNode) = 4715 context->addFunctionDefinition((yyvsp[-2].interm).intermFunctionPrototype, 4716 (yyvsp[0].interm.intermBlock), (yylsp[-2])); 4717 } 4718 break; 4719 4720 default: 4721 break; 4722 } 4723 /* User semantic actions sometimes alter yychar, and that requires 4724 that yytoken be updated with the new translation. We take the 4725 approach of translating immediately before every use of yytoken. 4726 One alternative is translating here after every semantic action, 4727 but that translation would be missed if the semantic action invokes 4728 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 4729 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 4730 incorrect destructor might then be invoked immediately. In the 4731 case of YYERROR or YYBACKUP, subsequent parser actions might lead 4732 to an incorrect destructor call or verbose syntax error message 4733 before the lookahead is translated. */ 4734 YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); 4735 4736 YYPOPSTACK(yylen); 4737 yylen = 0; 4738 4739 *++yyvsp = yyval; 4740 *++yylsp = yyloc; 4741 4742 /* Now 'shift' the result of the reduction. Determine what state 4743 that goes to, based on the state we popped back to and the rule 4744 number reduced by. */ 4745 { 4746 const int yylhs = yyr1[yyn] - YYNTOKENS; 4747 const int yyi = yypgoto[yylhs] + *yyssp; 4748 yystate = 4749 (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); 4750 } 4751 4752 goto yynewstate; 4753 4754 /*--------------------------------------. 4755 | yyerrlab -- here on detecting error. | 4756 `--------------------------------------*/ 4757 yyerrlab: 4758 /* Make sure we have latest lookahead translation. See comments at 4759 user semantic actions for why this is necessary. */ 4760 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar); 4761 /* If not already recovering from an error, report this error. */ 4762 if (!yyerrstatus) 4763 { 4764 ++yynerrs; 4765 yyerror(&yylloc, context, scanner, YY_("syntax error")); 4766 } 4767 4768 yyerror_range[1] = yylloc; 4769 if (yyerrstatus == 3) 4770 { 4771 /* If just tried and failed to reuse lookahead token after an 4772 error, discard it. */ 4773 4774 if (yychar <= YYEOF) 4775 { 4776 /* Return failure if at end of input. */ 4777 if (yychar == YYEOF) 4778 YYABORT; 4779 } 4780 else 4781 { 4782 yydestruct("Error: discarding", yytoken, &yylval, &yylloc, context, scanner); 4783 yychar = YYEMPTY; 4784 } 4785 } 4786 4787 /* Else will try to reuse lookahead token after shifting the error 4788 token. */ 4789 goto yyerrlab1; 4790 4791 /*---------------------------------------------------. 4792 | yyerrorlab -- error raised explicitly by YYERROR. | 4793 `---------------------------------------------------*/ 4794 yyerrorlab: 4795 /* Pacify compilers when the user code never invokes YYERROR and the 4796 label yyerrorlab therefore never appears in user code. */ 4797 if (0) 4798 YYERROR; 4799 ++yynerrs; 4800 4801 /* Do not reclaim the symbols of the rule whose action triggered 4802 this YYERROR. */ 4803 YYPOPSTACK(yylen); 4804 yylen = 0; 4805 YY_STACK_PRINT(yyss, yyssp); 4806 yystate = *yyssp; 4807 goto yyerrlab1; 4808 4809 /*-------------------------------------------------------------. 4810 | yyerrlab1 -- common code for both syntax error and YYERROR. | 4811 `-------------------------------------------------------------*/ 4812 yyerrlab1: 4813 yyerrstatus = 3; /* Each real token shifted decrements this. */ 4814 4815 /* Pop stack until we find a state that shifts the error token. */ 4816 for (;;) 4817 { 4818 yyn = yypact[yystate]; 4819 if (!yypact_value_is_default(yyn)) 4820 { 4821 yyn += YYSYMBOL_YYerror; 4822 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) 4823 { 4824 yyn = yytable[yyn]; 4825 if (0 < yyn) 4826 break; 4827 } 4828 } 4829 4830 /* Pop the current state because it cannot handle the error token. */ 4831 if (yyssp == yyss) 4832 YYABORT; 4833 4834 yyerror_range[1] = *yylsp; 4835 yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp, context, scanner); 4836 YYPOPSTACK(1); 4837 yystate = *yyssp; 4838 YY_STACK_PRINT(yyss, yyssp); 4839 } 4840 4841 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 4842 *++yyvsp = yylval; 4843 YY_IGNORE_MAYBE_UNINITIALIZED_END 4844 4845 yyerror_range[2] = yylloc; 4846 ++yylsp; 4847 YYLLOC_DEFAULT(*yylsp, yyerror_range, 2); 4848 4849 /* Shift the error token. */ 4850 YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp); 4851 4852 yystate = yyn; 4853 goto yynewstate; 4854 4855 /*-------------------------------------. 4856 | yyacceptlab -- YYACCEPT comes here. | 4857 `-------------------------------------*/ 4858 yyacceptlab: 4859 yyresult = 0; 4860 goto yyreturnlab; 4861 4862 /*-----------------------------------. 4863 | yyabortlab -- YYABORT comes here. | 4864 `-----------------------------------*/ 4865 yyabortlab: 4866 yyresult = 1; 4867 goto yyreturnlab; 4868 4869 /*-----------------------------------------------------------. 4870 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | 4871 `-----------------------------------------------------------*/ 4872 yyexhaustedlab: 4873 yyerror(&yylloc, context, scanner, YY_("memory exhausted")); 4874 yyresult = 2; 4875 goto yyreturnlab; 4876 4877 /*----------------------------------------------------------. 4878 | yyreturnlab -- parsing is finished, clean up and return. | 4879 `----------------------------------------------------------*/ 4880 yyreturnlab: 4881 if (yychar != YYEMPTY) 4882 { 4883 /* Make sure we have latest lookahead translation. See comments at 4884 user semantic actions for why this is necessary. */ 4885 yytoken = YYTRANSLATE(yychar); 4886 yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, context, scanner); 4887 } 4888 /* Do not reclaim the symbols of the rule whose action triggered 4889 this YYABORT or YYACCEPT. */ 4890 YYPOPSTACK(yylen); 4891 YY_STACK_PRINT(yyss, yyssp); 4892 while (yyssp != yyss) 4893 { 4894 yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp, context, 4895 scanner); 4896 YYPOPSTACK(1); 4897 } 4898 #ifndef yyoverflow 4899 if (yyss != yyssa) 4900 YYSTACK_FREE(yyss); 4901 #endif 4902 4903 return yyresult; 4904 } 4905 4906 int glslang_parse(TParseContext *context) 4907 { 4908 return yyparse(context, context->getScanner()); 4909 }