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