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