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