47 #define YYBISON_VERSION "2.7"
50 #define YYSKELETON_NAME "yacc.c"
77 #pragma GCC diagnostic ignored "-Wunused-function"
78 #pragma GCC diagnostic ignored "-Wunused-variable"
79 #pragma GCC diagnostic ignored "-Wswitch-enum"
80 #elif defined(_MSC_VER)
81 #pragma warning(disable: 4065)
82 #pragma warning(disable: 4189)
83 #pragma warning(disable: 4505)
84 #pragma warning(disable: 4701)
91 #define YYENABLE_NLS 0
93 #define YYLEX_PARAM context->scanner
98 # if defined __cplusplus && 201103L <= __cplusplus
99 # define YY_NULL nullptr
106 #ifdef YYERROR_VERBOSE
107 # undef YYERROR_VERBOSE
108 # define YYERROR_VERBOSE 1
110 # define YYERROR_VERBOSE 0
115 #ifndef YY_YY_GLSLANG_TAB_H_INCLUDED
116 # define YY_YY_GLSLANG_TAB_H_INCLUDED
127 #define YYLTYPE TSourceLoc
128 #define YYLTYPE_IS_DECLARED 1
235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
271 # define YYSTYPE_IS_TRIVIAL 1
272 # define yystype YYSTYPE
273 # define YYSTYPE_IS_DECLARED 1
276 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
284 # define yyltype YYLTYPE
285 # define YYLTYPE_IS_DECLARED 1
286 # define YYLTYPE_IS_TRIVIAL 1
291 #if defined __STDC__ || defined __cplusplus
292 int yyparse (
void *YYPARSE_PARAM);
297 #if defined __STDC__ || defined __cplusplus
312 #define YYLLOC_DEFAULT(Current, Rhs, N) \
315 (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \
316 (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
317 (Current).last_file = YYRHSLOC(Rhs, N).last_file; \
318 (Current).last_line = YYRHSLOC(Rhs, N).last_line; \
321 (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \
322 (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \
323 (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \
324 (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
328 #define VERTEX_ONLY(S, L) { \
329 if (context->shaderType != SH_VERTEX_SHADER) { \
330 context->error(L, " supported in vertex shaders only ", S); \
331 context->recover(); \
335 #define FRAG_ONLY(S, L) { \
336 if (context->shaderType != SH_FRAGMENT_SHADER) { \
337 context->error(L, " supported in fragment shaders only ", S); \
338 context->recover(); \
356 #elif (defined __STDC__ || defined __C99__FUNC__ \
357 || defined __cplusplus || defined _MSC_VER)
376 # ifdef __SIZE_TYPE__
377 # define YYSIZE_T __SIZE_TYPE__
378 # elif defined size_t
379 # define YYSIZE_T size_t
380 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
381 || defined __cplusplus || defined _MSC_VER)
383 # define YYSIZE_T size_t
385 # define YYSIZE_T unsigned int
389 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
392 # if defined YYENABLE_NLS && YYENABLE_NLS
394 # include <libintl.h>
395 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
399 # define YY_(Msgid) Msgid
404 #if ! defined lint || defined __GNUC__
405 # define YYUSE(E) ((void) (E))
414 #if (defined __STDC__ || defined __C99__FUNC__ \
415 || defined __cplusplus || defined _MSC_VER)
428 #if ! defined yyoverflow || YYERROR_VERBOSE
432 # ifdef YYSTACK_USE_ALLOCA
433 # if YYSTACK_USE_ALLOCA
435 # define YYSTACK_ALLOC __builtin_alloca
436 # elif defined __BUILTIN_VA_ARG_INCR
439 # define YYSTACK_ALLOC __alloca
440 # elif defined _MSC_VER
442 # define alloca _alloca
444 # define YYSTACK_ALLOC alloca
445 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
446 || defined __cplusplus || defined _MSC_VER)
449 # ifndef EXIT_SUCCESS
450 # define EXIT_SUCCESS 0
457 # ifdef YYSTACK_ALLOC
459 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
460 # ifndef YYSTACK_ALLOC_MAXIMUM
465 # define YYSTACK_ALLOC_MAXIMUM 4032
468 # define YYSTACK_ALLOC YYMALLOC
469 # define YYSTACK_FREE YYFREE
470 # ifndef YYSTACK_ALLOC_MAXIMUM
471 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
473 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
474 && ! ((defined YYMALLOC || defined malloc) \
475 && (defined YYFREE || defined free)))
477 # ifndef EXIT_SUCCESS
478 # define EXIT_SUCCESS 0
482 # define YYMALLOC malloc
483 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
484 || defined __cplusplus || defined _MSC_VER)
490 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
491 || defined __cplusplus || defined _MSC_VER)
499 #if (! defined yyoverflow \
500 && (! defined __cplusplus \
501 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
502 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
513 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
517 # define YYSTACK_BYTES(N) \
518 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
519 + 2 * YYSTACK_GAP_MAXIMUM)
521 # define YYCOPY_NEEDED 1
528 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
531 YYSIZE_T yynewbytes; \
532 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
533 Stack = &yyptr->Stack_alloc; \
534 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
535 yyptr += yynewbytes / sizeof (*yyptr); \
541 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
545 # if defined __GNUC__ && 1 < __GNUC__
546 # define YYCOPY(Dst, Src, Count) \
547 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
549 # define YYCOPY(Dst, Src, Count) \
553 for (yyi = 0; yyi < (Count); yyi++) \
554 (Dst)[yyi] = (Src)[yyi]; \
573 #define YYNSTATES 307
577 #define YYMAXUTOK 349
579 #define YYTRANSLATE(YYX) \
580 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
585 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
595 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
596 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
605 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
611 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
612 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
613 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
614 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
615 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
616 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
617 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
618 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
619 85, 86, 87, 88, 89, 90, 91, 92, 93, 94
627 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
628 21, 23, 28, 30, 34, 37, 40, 42, 44, 46,
629 50, 53, 56, 59, 61, 64, 68, 71, 73, 75,
630 77, 80, 83, 86, 88, 90, 92, 94, 98, 102,
631 104, 108, 112, 114, 116, 120, 124, 128, 132, 134,
632 138, 142, 144, 146, 148, 150, 154, 156, 160, 162,
633 166, 168, 174, 176, 180, 182, 184, 186, 188, 190,
634 192, 196, 198, 201, 204, 209, 212, 214, 216, 219,
635 223, 227, 230, 236, 240, 243, 247, 250, 251, 253,
636 255, 257, 259, 261, 265, 271, 278, 284, 286, 289,
637 294, 300, 305, 308, 310, 313, 315, 317, 319, 322,
638 324, 326, 329, 331, 333, 335, 337, 342, 344, 346,
639 348, 350, 352, 354, 356, 358, 360, 362, 364, 366,
640 368, 370, 372, 374, 376, 378, 380, 382, 384, 386,
641 387, 394, 395, 401, 403, 406, 410, 412, 416, 418,
642 423, 425, 427, 429, 431, 433, 435, 437, 439, 441,
643 444, 445, 446, 452, 454, 456, 457, 460, 461, 464,
644 467, 471, 473, 476, 478, 481, 487, 491, 493, 495,
645 500, 501, 508, 509, 518, 519, 527, 529, 531, 533,
646 534, 537, 541, 544, 547, 550, 554, 557, 559, 562,
653 175, 0, -1, 45, -1, 46, -1, 45, -1, 97,
654 -1, 48, -1, 47, -1, 49, -1, 71, 124, 72,
655 -1, 98, -1, 99, 73, 100, 74, -1, 101, -1,
656 99, 77, 96, -1, 99, 52, -1, 99, 53, -1,
657 124, -1, 102, -1, 103, -1, 99, 77, 103, -1,
658 105, 72, -1, 104, 72, -1, 106, 39, -1, 106,
659 -1, 106, 122, -1, 105, 78, 122, -1, 107, 71,
660 -1, 142, -1, 45, -1, 99, -1, 52, 108, -1,
661 53, 108, -1, 109, 108, -1, 85, -1, 83, -1,
662 82, -1, 108, -1, 110, 86, 108, -1, 110, 87,
663 108, -1, 110, -1, 111, 85, 110, -1, 111, 83,
664 110, -1, 111, -1, 112, -1, 113, 89, 112, -1,
665 113, 90, 112, -1, 113, 54, 112, -1, 113, 55,
666 112, -1, 113, -1, 114, 56, 113, -1, 114, 57,
667 113, -1, 114, -1, 115, -1, 116, -1, 117, -1,
668 118, 58, 117, -1, 118, -1, 119, 60, 118, -1,
669 119, -1, 120, 59, 119, -1, 120, -1, 120, 94,
670 124, 79, 122, -1, 121, -1, 108, 123, 122, -1,
671 80, -1, 61, -1, 62, -1, 63, -1, 70, -1,
672 122, -1, 124, 78, 122, -1, 121, -1, 127, 81,
673 -1, 135, 81, -1, 7, 140, 141, 81, -1, 128,
674 72, -1, 130, -1, 129, -1, 130, 132, -1, 129,
675 78, 132, -1, 137, 45, 71, -1, 139, 96, -1,
676 139, 96, 73, 125, 74, -1, 138, 133, 131, -1,
677 133, 131, -1, 138, 133, 134, -1, 133, 134, -1,
678 -1, 33, -1, 34, -1, 35, -1, 139, -1, 136,
679 -1, 135, 78, 96, -1, 135, 78, 96, 73, 74,
680 -1, 135, 78, 96, 73, 125, 74, -1, 135, 78,
681 96, 80, 150, -1, 137, -1, 137, 96, -1, 137,
682 96, 73, 74, -1, 137, 96, 73, 125, 74, -1,
683 137, 96, 80, 150, -1, 3, 45, -1, 139, -1,
684 138, 139, -1, 9, -1, 8, -1, 37, -1, 3,
685 37, -1, 36, -1, 141, -1, 140, 141, -1, 4,
686 -1, 5, -1, 6, -1, 142, -1, 142, 73, 125,
687 74, -1, 39, -1, 11, -1, 12, -1, 10, -1,
688 27, -1, 28, -1, 29, -1, 21, -1, 22, -1,
689 23, -1, 24, -1, 25, -1, 26, -1, 30, -1,
690 31, -1, 32, -1, 41, -1, 42, -1, 43, -1,
691 44, -1, 143, -1, 46, -1, -1, 38, 96, 75,
692 144, 146, 76, -1, -1, 38, 75, 145, 146, 76,
693 -1, 147, -1, 146, 147, -1, 139, 148, 81, -1,
694 149, -1, 148, 78, 149, -1, 96, -1, 96, 73,
695 125, 74, -1, 122, -1, 126, -1, 154, -1, 153,
696 -1, 151, -1, 163, -1, 164, -1, 167, -1, 174,
697 -1, 75, 76, -1, -1, -1, 75, 155, 162, 156,
698 76, -1, 161, -1, 153, -1, -1, 159, 161, -1,
699 -1, 160, 153, -1, 75, 76, -1, 75, 162, 76,
700 -1, 152, -1, 162, 152, -1, 81, -1, 124, 81,
701 -1, 18, 71, 124, 72, 165, -1, 158, 16, 158,
702 -1, 158, -1, 124, -1, 137, 96, 80, 150, -1,
703 -1, 40, 71, 168, 166, 72, 157, -1, -1, 15,
704 169, 158, 40, 71, 124, 72, 81, -1, -1, 17,
705 71, 170, 171, 173, 72, 157, -1, 163, -1, 151,
706 -1, 166, -1, -1, 172, 81, -1, 172, 81, 124,
707 -1, 14, 81, -1, 13, 81, -1, 20, 81, -1,
708 20, 124, 81, -1, 19, 81, -1, 176, -1, 175,
709 176, -1, 177, -1, 126, -1, -1, 127, 178, 161,
716 0, 179, 179, 180, 183, 226, 229, 242, 247, 252,
717 258, 261, 264, 267, 362, 372, 385, 393, 493, 496,
718 504, 507, 513, 517, 524, 530, 539, 547, 602, 612,
719 615, 625, 635, 656, 657, 658, 663, 664, 672, 683,
720 684, 692, 703, 707, 708, 718, 728, 738, 751, 752,
721 762, 775, 779, 783, 787, 788, 801, 802, 815, 816,
722 829, 830, 847, 848, 861, 862, 863, 864, 865, 869,
723 872, 883, 891, 918, 923, 937, 992, 995, 1002, 1010,
724 1031, 1052, 1062, 1090, 1095, 1105, 1110, 1120, 1123, 1126,
725 1129, 1135, 1142, 1145, 1167, 1185, 1209, 1232, 1236, 1254,
726 1262, 1294, 1314, 1335, 1344, 1367, 1370, 1376, 1384, 1392,
727 1400, 1410, 1417, 1420, 1423, 1429, 1432, 1447, 1451, 1455,
728 1459, 1463, 1468, 1473, 1478, 1483, 1488, 1493, 1498, 1503,
729 1508, 1513, 1518, 1523, 1527, 1531, 1539, 1547, 1551, 1564,
730 1564, 1578, 1578, 1587, 1590, 1606, 1639, 1643, 1649, 1656,
731 1671, 1675, 1679, 1680, 1686, 1687, 1688, 1689, 1690, 1694,
732 1695, 1695, 1695, 1705, 1706, 1710, 1710, 1711, 1711, 1716,
733 1719, 1729, 1732, 1738, 1739, 1743, 1751, 1755, 1765, 1770,
734 1787, 1787, 1792, 1792, 1799, 1799, 1807, 1810, 1816, 1819,
735 1825, 1829, 1836, 1843, 1850, 1857, 1868, 1877, 1881, 1888,
740 #if YYDEBUG || YYERROR_VERBOSE || 0
743 static const char *
const yytname[] =
745 "$end",
"error",
"$undefined",
"INVARIANT",
"HIGH_PRECISION",
746 "MEDIUM_PRECISION",
"LOW_PRECISION",
"PRECISION",
"ATTRIBUTE",
747 "CONST_QUAL",
"BOOL_TYPE",
"FLOAT_TYPE",
"INT_TYPE",
"BREAK",
"CONTINUE",
748 "DO",
"ELSE",
"FOR",
"IF",
"DISCARD",
"RETURN",
"BVEC2",
"BVEC3",
749 "BVEC4",
"IVEC2",
"IVEC3",
"IVEC4",
"VEC2",
"VEC3",
"VEC4",
"MATRIX2",
750 "MATRIX3",
"MATRIX4",
"IN_QUAL",
"OUT_QUAL",
"INOUT_QUAL",
"UNIFORM",
751 "VARYING",
"STRUCT",
"VOID_TYPE",
"WHILE",
"SAMPLER2D",
"SAMPLERCUBE",
752 "SAMPLER_EXTERNAL_OES",
"SAMPLER2DRECT",
"IDENTIFIER",
"TYPE_NAME",
753 "FLOATCONSTANT",
"INTCONSTANT",
"BOOLCONSTANT",
"LEFT_OP",
"RIGHT_OP",
754 "INC_OP",
"DEC_OP",
"LE_OP",
"GE_OP",
"EQ_OP",
"NE_OP",
"AND_OP",
755 "OR_OP",
"XOR_OP",
"MUL_ASSIGN",
"DIV_ASSIGN",
"ADD_ASSIGN",
756 "MOD_ASSIGN",
"LEFT_ASSIGN",
"RIGHT_ASSIGN",
"AND_ASSIGN",
"XOR_ASSIGN",
757 "OR_ASSIGN",
"SUB_ASSIGN",
"LEFT_PAREN",
"RIGHT_PAREN",
"LEFT_BRACKET",
758 "RIGHT_BRACKET",
"LEFT_BRACE",
"RIGHT_BRACE",
"DOT",
"COMMA",
"COLON",
759 "EQUAL",
"SEMICOLON",
"BANG",
"DASH",
"TILDE",
"PLUS",
"STAR",
"SLASH",
760 "PERCENT",
"LEFT_ANGLE",
"RIGHT_ANGLE",
"VERTICAL_BAR",
"CARET",
761 "AMPERSAND",
"QUESTION",
"$accept",
"identifier",
"variable_identifier",
762 "primary_expression",
"postfix_expression",
"integer_expression",
763 "function_call",
"function_call_or_method",
"function_call_generic",
764 "function_call_header_no_parameters",
765 "function_call_header_with_parameters",
"function_call_header",
766 "function_identifier",
"unary_expression",
"unary_operator",
767 "multiplicative_expression",
"additive_expression",
"shift_expression",
768 "relational_expression",
"equality_expression",
"and_expression",
769 "exclusive_or_expression",
"inclusive_or_expression",
770 "logical_and_expression",
"logical_xor_expression",
771 "logical_or_expression",
"conditional_expression",
772 "assignment_expression",
"assignment_operator",
"expression",
773 "constant_expression",
"declaration",
"function_prototype",
774 "function_declarator",
"function_header_with_parameters",
775 "function_header",
"parameter_declarator",
"parameter_declaration",
776 "parameter_qualifier",
"parameter_type_specifier",
777 "init_declarator_list",
"single_declaration",
"fully_specified_type",
778 "type_qualifier",
"type_specifier",
"precision_qualifier",
779 "type_specifier_no_prec",
"type_specifier_nonarray",
"struct_specifier",
780 "$@1",
"$@2",
"struct_declaration_list",
"struct_declaration",
781 "struct_declarator_list",
"struct_declarator",
"initializer",
782 "declaration_statement",
"statement",
"simple_statement",
783 "compound_statement",
"$@3",
"$@4",
"statement_no_new_scope",
784 "statement_with_scope",
"$@5",
"$@6",
"compound_statement_no_new_scope",
785 "statement_list",
"expression_statement",
"selection_statement",
786 "selection_rest_statement",
"condition",
"iteration_statement",
"$@7",
787 "$@8",
"$@9",
"for_init_statement",
"conditionopt",
"for_rest_statement",
788 "jump_statement",
"translation_unit",
"external_declaration",
789 "function_definition",
"$@10",
YY_NULL
798 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
799 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
800 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
801 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
802 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
803 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
804 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
805 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
806 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
807 345, 346, 347, 348, 349
814 0, 95, 96, 96, 97, 98, 98, 98, 98, 98,
815 99, 99, 99, 99, 99, 99, 100, 101, 102, 102,
816 103, 103, 104, 104, 105, 105, 106, 107, 107, 108,
817 108, 108, 108, 109, 109, 109, 110, 110, 110, 111,
818 111, 111, 112, 113, 113, 113, 113, 113, 114, 114,
819 114, 115, 116, 117, 118, 118, 119, 119, 120, 120,
820 121, 121, 122, 122, 123, 123, 123, 123, 123, 124,
821 124, 125, 126, 126, 126, 127, 128, 128, 129, 129,
822 130, 131, 131, 132, 132, 132, 132, 133, 133, 133,
823 133, 134, 135, 135, 135, 135, 135, 136, 136, 136,
824 136, 136, 136, 137, 137, 138, 138, 138, 138, 138,
825 139, 139, 140, 140, 140, 141, 141, 142, 142, 142,
826 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
827 142, 142, 142, 142, 142, 142, 142, 142, 142, 144,
828 143, 145, 143, 146, 146, 147, 148, 148, 149, 149,
829 150, 151, 152, 152, 153, 153, 153, 153, 153, 154,
830 155, 156, 154, 157, 157, 159, 158, 160, 158, 161,
831 161, 162, 162, 163, 163, 164, 165, 165, 166, 166,
832 168, 167, 169, 167, 170, 167, 171, 171, 172, 172,
833 173, 173, 174, 174, 174, 174, 174, 175, 175, 176,
840 0, 2, 1, 1, 1, 1, 1, 1, 1, 3,
841 1, 4, 1, 3, 2, 2, 1, 1, 1, 3,
842 2, 2, 2, 1, 2, 3, 2, 1, 1, 1,
843 2, 2, 2, 1, 1, 1, 1, 3, 3, 1,
844 3, 3, 1, 1, 3, 3, 3, 3, 1, 3,
845 3, 1, 1, 1, 1, 3, 1, 3, 1, 3,
846 1, 5, 1, 3, 1, 1, 1, 1, 1, 1,
847 3, 1, 2, 2, 4, 2, 1, 1, 2, 3,
848 3, 2, 5, 3, 2, 3, 2, 0, 1, 1,
849 1, 1, 1, 3, 5, 6, 5, 1, 2, 4,
850 5, 4, 2, 1, 2, 1, 1, 1, 2, 1,
851 1, 2, 1, 1, 1, 1, 4, 1, 1, 1,
852 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
853 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
854 6, 0, 5, 1, 2, 3, 1, 3, 1, 4,
855 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
856 0, 0, 5, 1, 1, 0, 2, 0, 2, 2,
857 3, 1, 2, 1, 2, 5, 3, 1, 1, 4,
858 0, 6, 0, 8, 0, 7, 1, 1, 1, 0,
859 2, 3, 2, 2, 2, 3, 2, 1, 2, 1,
868 0, 0, 112, 113, 114, 0, 106, 105, 120, 118,
869 119, 124, 125, 126, 127, 128, 129, 121, 122, 123,
870 130, 131, 132, 109, 107, 0, 117, 133, 134, 135,
871 136, 138, 200, 201, 0, 77, 87, 0, 92, 97,
872 0, 103, 0, 110, 115, 137, 0, 197, 199, 108,
873 102, 0, 2, 3, 141, 0, 72, 0, 75, 87,
874 0, 88, 89, 90, 78, 0, 87, 0, 73, 2,
875 98, 104, 111, 0, 1, 198, 0, 0, 139, 0,
876 202, 79, 84, 86, 91, 0, 93, 80, 0, 0,
877 4, 7, 6, 8, 0, 0, 0, 35, 34, 33,
878 5, 10, 29, 12, 17, 18, 0, 0, 23, 0,
879 36, 0, 39, 42, 43, 48, 51, 52, 53, 54,
880 56, 58, 60, 71, 0, 27, 74, 0, 0, 143,
881 0, 0, 0, 182, 0, 0, 0, 0, 0, 160,
882 169, 173, 36, 62, 69, 0, 151, 0, 115, 154,
883 171, 153, 152, 0, 155, 156, 157, 158, 81, 83,
884 85, 0, 0, 99, 0, 150, 101, 30, 31, 0,
885 14, 15, 0, 0, 21, 20, 0, 22, 24, 26,
886 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
887 0, 0, 0, 0, 0, 116, 148, 0, 146, 142,
888 144, 0, 193, 192, 167, 184, 0, 196, 194, 0,
889 180, 159, 0, 65, 66, 67, 68, 64, 0, 0,
890 174, 170, 172, 0, 94, 0, 96, 100, 9, 0,
891 16, 2, 3, 13, 19, 25, 37, 38, 41, 40,
892 46, 47, 44, 45, 49, 50, 55, 57, 59, 0,
893 0, 0, 145, 140, 0, 0, 0, 0, 0, 195,
894 0, 161, 63, 70, 0, 95, 11, 0, 0, 147,
895 0, 166, 168, 187, 186, 189, 167, 178, 0, 0,
896 0, 82, 61, 149, 0, 188, 0, 0, 177, 175,
897 0, 0, 162, 0, 190, 0, 167, 0, 164, 181,
898 163, 0, 191, 185, 176, 179, 183
904 -1, 196, 100, 101, 102, 229, 103, 104, 105, 106,
905 107, 108, 109, 142, 111, 112, 113, 114, 115, 116,
906 117, 118, 119, 120, 121, 122, 143, 144, 218, 145,
907 124, 146, 147, 34, 35, 36, 82, 64, 65, 83,
908 37, 38, 39, 40, 41, 42, 43, 125, 45, 130,
909 77, 128, 129, 197, 198, 166, 149, 150, 151, 152,
910 212, 280, 299, 254, 255, 256, 300, 153, 154, 155,
911 289, 279, 156, 260, 204, 257, 275, 286, 287, 157,
917 #define YYPACT_NINF -261
920 1327, -20, -261, -261, -261, 113, -261, -261, -261, -261,
921 -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
922 -261, -261, -261, -261, -261, -19, -261, -261, -261, -261,
923 -261, -261, -261, -61, -40, -28, 75, -7, -261, 24,
924 1370, -261, 1444, -261, -11, -261, 1283, -261, -261, -261,
925 -261, 1444, -261, -261, -261, 6, -261, 54, -261, 88,
926 62, -261, -261, -261, -261, 1370, 59, 91, -261, 36,
927 -50, -261, -261, 1051, -261, -261, 63, 1370, -261, 293,
928 -261, -261, -261, -261, 91, 1370, -12, -261, 856, 1051,
929 77, -261, -261, -261, 1051, 1051, 1051, -261, -261, -261,
930 -261, -261, -14, -261, -261, -261, 84, -44, 1116, 95,
931 -261, 1051, 53, 3, -261, -36, 89, -261, -261, -261,
932 104, 107, -45, -261, 96, -261, -261, 91, 1184, -261,
933 1370, 92, 93, -261, 98, 101, 94, 921, 105, 102,
934 -261, -261, 72, -261, -261, 9, -261, -61, 42, -261,
935 -261, -261, -261, 376, -261, -261, -261, -261, 106, -261,
936 -261, 986, 1051, -261, 103, -261, -261, -261, -261, -41,
937 -261, -261, 1051, 1407, -261, -261, 1051, 110, -261, -261,
938 -261, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051,
939 1051, 1051, 1051, 1051, 1051, -261, 109, 23, -261, -261,
940 -261, 1227, -261, -261, 111, -261, 1051, -261, -261, 25,
941 -261, -261, 459, -261, -261, -261, -261, -261, 1051, 1051,
942 -261, -261, -261, 1051, -261, 114, -261, -261, -261, 115,
943 112, 77, 116, -261, -261, -261, -261, -261, 53, 53,
944 -261, -261, -261, -261, -36, -36, -261, 104, 107, 76,
945 1051, 91, -261, -261, 145, 54, 625, 708, -6, -261,
946 791, 459, -261, -261, 117, -261, -261, 1051, 120, -261,
947 124, -261, -261, -261, -261, 791, 111, 112, 91, 125,
948 122, -261, -261, -261, 1051, -261, 118, 128, 180, -261,
949 126, 542, -261, -5, 1051, 542, 111, 1051, -261, -261,
950 -261, 123, 112, -261, -261, -261, -261
956 -261, -24, -261, -261, -261, -261, -261, -261, 34, -261,
957 -261, -261, -261, 32, -261, -33, -261, -27, -26, -261,
958 -261, -261, 14, 16, 18, -261, -66, -87, -261, -92,
959 -85, 11, 12, -261, -261, -261, 141, 150, 161, 143,
960 -261, -261, -231, 5, -30, 224, -18, 0, -261, -261,
961 -261, 100, -119, -261, -17, -156, -25, -145, -243, -261,
962 -261, -261, -64, -260, -261, -261, -52, 21, -22, -261,
963 -261, -39, -261, -261, -261, -261, -261, -261, -261, -261,
964 -261, 191, -261, -261
970 #define YYTABLE_NINF -166
973 44, 55, 165, 164, 169, 80, 226, 123, 222, 200,
974 71, 32, 33, 272, 193, 70, 288, 49, 185, 186,
975 56, 178, 123, 88, 72, 50, 52, 53, 175, 278,
976 89, 228, 58, 76, 176, 84, 304, 219, 170, 171,
977 44, 66, 44, 86, 278, 209, 44, 127, 298, 194,
978 59, 44, 298, 187, 188, 84, 54, 32, 33, 172,
979 158, 161, 73, 173, 66, 44, 276, 301, 162, 69,
980 53, 67, 219, 219, 68, 165, 225, 44, 60, 148,
981 230, 78, 200, 6, 7, 44, 183, 219, 184, 235,
982 220, 60, 61, 62, 63, 123, 6, 7, 127, 49,
983 127, 251, 249, 219, 252, 110, 259, 87, 61, 62,
984 63, 23, 24, -27, 258, 73, 222, 2, 3, 4,
985 110, 61, 62, 63, 23, 24, 167, 168, 44, 79,
986 44, 262, 263, 213, 214, 215, 52, 53, 264, 181,
987 182, 305, 216, 180, 126, 189, 190, -76, -28, 233,
988 238, 239, 217, 148, 219, 267, 174, 123, 240, 241,
989 242, 243, 191, 244, 245, 268, 179, 192, 277, 205,
990 195, 127, 206, 202, 203, 207, 210, 227, 211, 223,
991 282, -117, 250, 277, 123, 270, -165, -138, 265, 266,
992 219, 281, 293, 110, 283, 284, 296, 291, 292, 294,
993 295, 44, 302, 271, 306, 246, 297, 234, 247, 81,
994 165, 248, 148, 236, 237, 110, 110, 110, 110, 110,
995 110, 110, 110, 110, 110, 110, 159, 85, 160, 51,
996 201, 303, 273, 261, 269, 274, 285, 75, 0, 0,
997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
998 0, 0, 0, 0, 290, 110, 148, 148, 0, 0,
999 148, 148, 0, 0, 0, 0, 0, 0, 0, 0,
1000 0, 0, 0, 0, 0, 148, 0, 0, 0, 0,
1001 0, 0, 110, 0, 0, 0, 0, 0, 0, 0,
1002 0, 148, 0, 0, 0, 148, 1, 2, 3, 4,
1003 5, 6, 7, 8, 9, 10, 131, 132, 133, 0,
1004 134, 135, 136, 137, 11, 12, 13, 14, 15, 16,
1005 17, 18, 19, 20, 21, 22, 0, 0, 0, 23,
1006 24, 25, 26, 138, 27, 28, 29, 30, 90, 31,
1007 91, 92, 93, 0, 0, 94, 95, 0, 0, 0,
1008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1009 0, 0, 0, 0, 96, 0, 0, 0, 139, 140,
1010 0, 0, 0, 0, 141, 97, 98, 0, 99, 1,
1011 2, 3, 4, 5, 6, 7, 8, 9, 10, 131,
1012 132, 133, 0, 134, 135, 136, 137, 11, 12, 13,
1013 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
1014 0, 0, 23, 24, 25, 26, 138, 27, 28, 29,
1015 30, 90, 31, 91, 92, 93, 0, 0, 94, 95,
1016 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1017 0, 0, 0, 0, 0, 0, 0, 96, 0, 0,
1018 0, 139, 221, 0, 0, 0, 0, 141, 97, 98,
1019 0, 99, 1, 2, 3, 4, 5, 6, 7, 8,
1020 9, 10, 131, 132, 133, 0, 134, 135, 136, 137,
1021 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1022 21, 22, 0, 0, 0, 23, 24, 25, 26, 138,
1023 27, 28, 29, 30, 90, 31, 91, 92, 93, 0,
1024 0, 94, 95, 0, 0, 0, 0, 0, 0, 0,
1025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1026 96, 0, 0, 0, 139, 0, 0, 0, 0, 0,
1027 141, 97, 98, 0, 99, 1, 2, 3, 4, 5,
1028 6, 7, 8, 9, 10, 131, 132, 133, 0, 134,
1029 135, 136, 137, 11, 12, 13, 14, 15, 16, 17,
1030 18, 19, 20, 21, 22, 0, 0, 0, 23, 24,
1031 25, 26, 138, 27, 28, 29, 30, 90, 31, 91,
1032 92, 93, 0, 0, 94, 95, 0, 0, 0, 0,
1033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1034 0, 0, 0, 96, 0, 0, 0, 79, 0, 0,
1035 0, 0, 0, 141, 97, 98, 0, 99, 1, 2,
1036 3, 4, 5, 6, 7, 8, 9, 10, 131, 132,
1037 133, 0, 134, 135, 136, 137, 11, 12, 13, 14,
1038 15, 16, 17, 18, 19, 20, 21, 22, 0, 0,
1039 0, 23, 24, 25, 26, 138, 27, 28, 29, 30,
1040 90, 31, 91, 92, 93, 0, 0, 94, 95, 0,
1041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1042 0, 0, 0, 0, 0, 0, 96, 0, 0, 0,
1043 0, 0, 0, 0, 0, 0, 141, 97, 98, 0,
1044 99, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1045 10, 0, 0, 0, 0, 0, 0, 0, 0, 11,
1046 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1047 22, 0, 0, 0, 23, 24, 25, 26, 0, 27,
1048 28, 29, 30, 90, 31, 91, 92, 93, 0, 0,
1049 94, 95, 0, 0, 0, 0, 0, 0, 0, 0,
1050 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,
1051 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
1052 97, 98, 0, 99, 60, 2, 3, 4, 0, 6,
1053 7, 8, 9, 10, 0, 0, 0, 0, 0, 0,
1054 0, 0, 11, 12, 13, 14, 15, 16, 17, 18,
1055 19, 20, 21, 22, 0, 0, 0, 23, 24, 25,
1056 26, 0, 27, 28, 29, 30, 90, 31, 91, 92,
1057 93, 0, 0, 94, 95, 0, 0, 0, 0, 0,
1058 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1059 0, 0, 96, 0, 0, 0, 8, 9, 10, 0,
1060 0, 0, 0, 97, 98, 0, 99, 11, 12, 13,
1061 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
1062 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
1063 30, 90, 31, 91, 92, 93, 0, 0, 94, 95,
1064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1065 0, 0, 0, 0, 0, 0, 0, 96, 0, 0,
1066 163, 8, 9, 10, 0, 0, 0, 0, 97, 98,
1067 0, 99, 11, 12, 13, 14, 15, 16, 17, 18,
1068 19, 20, 21, 22, 0, 0, 0, 0, 0, 25,
1069 26, 0, 27, 28, 29, 30, 90, 31, 91, 92,
1070 93, 0, 0, 94, 95, 0, 0, 0, 0, 0,
1071 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1072 0, 0, 96, 0, 0, 0, 8, 9, 10, 0,
1073 0, 0, 208, 97, 98, 0, 99, 11, 12, 13,
1074 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
1075 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
1076 30, 90, 31, 91, 92, 93, 0, 0, 94, 95,
1077 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1078 0, 0, 0, 0, 0, 0, 0, 96, 0, 0,
1079 224, 8, 9, 10, 0, 0, 0, 0, 97, 98,
1080 0, 99, 11, 12, 13, 14, 15, 16, 17, 18,
1081 19, 20, 21, 22, 0, 0, 0, 0, 0, 25,
1082 26, 0, 27, 28, 29, 30, 90, 31, 91, 92,
1083 93, 0, 0, 94, 95, 0, 0, 0, 0, 0,
1084 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1085 0, 0, 96, 0, 0, 0, 8, 9, 10, 0,
1086 0, 0, 0, 97, 98, 0, 99, 11, 12, 13,
1087 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
1088 0, 0, 0, 0, 25, 177, 0, 27, 28, 29,
1089 30, 90, 31, 91, 92, 93, 0, 0, 94, 95,
1090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1091 0, 0, 0, 0, 0, 0, 0, 96, 2, 3,
1092 4, 0, 0, 0, 8, 9, 10, 0, 97, 98,
1093 0, 99, 0, 0, 0, 11, 12, 13, 14, 15,
1094 16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
1095 0, 0, 25, 26, 0, 27, 28, 29, 30, 0,
1096 31, 2, 3, 4, 0, 0, 0, 8, 9, 10,
1097 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
1098 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1099 199, 0, 0, 0, 0, 25, 26, 0, 27, 28,
1100 29, 30, 0, 31, 0, 0, 0, 0, 0, 0,
1101 0, 0, 0, 74, 0, 0, 1, 2, 3, 4,
1102 5, 6, 7, 8, 9, 10, 0, 0, 0, 0,
1103 0, 0, 0, 253, 11, 12, 13, 14, 15, 16,
1104 17, 18, 19, 20, 21, 22, 0, 0, 0, 23,
1105 24, 25, 26, 0, 27, 28, 29, 30, 0, 31,
1106 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1107 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
1108 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1109 0, 0, 0, 23, 24, 25, 26, 0, 27, 28,
1110 29, 30, 0, 31, 2, 3, 4, 0, 0, 0,
1111 8, 9, 10, 0, 0, 0, 0, 0, 0, 0,
1112 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1113 20, 21, 22, 0, 0, 0, 0, 0, 25, 26,
1114 0, 27, 28, 29, 30, 0, 31, 8, 9, 10,
1115 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
1116 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1117 0, 0, 0, 0, 0, 25, 26, 0, 27, 28,
1118 29, 30, 231, 232, 8, 9, 10, 0, 0, 0,
1119 0, 0, 0, 0, 0, 11, 12, 13, 14, 15,
1120 16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
1121 0, 0, 25, 26, 0, 27, 28, 29, 30, 0,
1125 #define yypact_value_is_default(Yystate) \
1126 (!!((Yystate) == (-261)))
1128 #define yytable_value_is_error(Yytable_value) \
1133 0, 25, 89, 88, 96, 57, 162, 73, 153, 128,
1134 40, 0, 0, 256, 59, 39, 276, 37, 54, 55,
1135 81, 108, 88, 73, 42, 45, 45, 46, 72, 260,
1136 80, 72, 72, 51, 78, 65, 296, 78, 52, 53,
1137 40, 36, 42, 67, 275, 137, 46, 77, 291, 94,
1138 78, 51, 295, 89, 90, 85, 75, 46, 46, 73,
1139 84, 73, 73, 77, 59, 65, 72, 72, 80, 45,
1140 46, 78, 78, 78, 81, 162, 161, 77, 3, 79,
1141 172, 75, 201, 8, 9, 85, 83, 78, 85, 176,
1142 81, 3, 33, 34, 35, 161, 8, 9, 128, 37,
1143 130, 78, 194, 78, 81, 73, 81, 71, 33, 34,
1144 35, 36, 37, 71, 206, 73, 261, 4, 5, 6,
1145 88, 33, 34, 35, 36, 37, 94, 95, 128, 75,
1146 130, 218, 219, 61, 62, 63, 45, 46, 223, 86,
1147 87, 297, 70, 111, 81, 56, 57, 72, 71, 173,
1148 183, 184, 80, 153, 78, 79, 72, 223, 185, 186,
1149 187, 188, 58, 189, 190, 250, 71, 60, 260, 71,
1150 74, 201, 71, 81, 81, 81, 71, 74, 76, 73,
1151 267, 71, 73, 275, 250, 40, 75, 71, 74, 74,
1152 78, 74, 284, 161, 74, 71, 16, 72, 76, 81,
1153 72, 201, 294, 255, 81, 191, 80, 173, 192, 59,
1154 297, 193, 212, 181, 182, 183, 184, 185, 186, 187,
1155 188, 189, 190, 191, 192, 193, 85, 66, 85, 5,
1156 130, 295, 257, 212, 251, 257, 275, 46, -1, -1,
1157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1158 -1, -1, -1, -1, 278, 223, 256, 257, -1, -1,
1159 260, 261, -1, -1, -1, -1, -1, -1, -1, -1,
1160 -1, -1, -1, -1, -1, 275, -1, -1, -1, -1,
1161 -1, -1, 250, -1, -1, -1, -1, -1, -1, -1,
1162 -1, 291, -1, -1, -1, 295, 3, 4, 5, 6,
1163 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
1164 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1165 27, 28, 29, 30, 31, 32, -1, -1, -1, 36,
1166 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
1167 47, 48, 49, -1, -1, 52, 53, -1, -1, -1,
1168 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1169 -1, -1, -1, -1, 71, -1, -1, -1, 75, 76,
1170 -1, -1, -1, -1, 81, 82, 83, -1, 85, 3,
1171 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1172 14, 15, -1, 17, 18, 19, 20, 21, 22, 23,
1173 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
1174 -1, -1, 36, 37, 38, 39, 40, 41, 42, 43,
1175 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
1176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1177 -1, -1, -1, -1, -1, -1, -1, 71, -1, -1,
1178 -1, 75, 76, -1, -1, -1, -1, 81, 82, 83,
1179 -1, 85, 3, 4, 5, 6, 7, 8, 9, 10,
1180 11, 12, 13, 14, 15, -1, 17, 18, 19, 20,
1181 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1182 31, 32, -1, -1, -1, 36, 37, 38, 39, 40,
1183 41, 42, 43, 44, 45, 46, 47, 48, 49, -1,
1184 -1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
1185 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1186 71, -1, -1, -1, 75, -1, -1, -1, -1, -1,
1187 81, 82, 83, -1, 85, 3, 4, 5, 6, 7,
1188 8, 9, 10, 11, 12, 13, 14, 15, -1, 17,
1189 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1190 28, 29, 30, 31, 32, -1, -1, -1, 36, 37,
1191 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1192 48, 49, -1, -1, 52, 53, -1, -1, -1, -1,
1193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1194 -1, -1, -1, 71, -1, -1, -1, 75, -1, -1,
1195 -1, -1, -1, 81, 82, 83, -1, 85, 3, 4,
1196 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1197 15, -1, 17, 18, 19, 20, 21, 22, 23, 24,
1198 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
1199 -1, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1200 45, 46, 47, 48, 49, -1, -1, 52, 53, -1,
1201 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1202 -1, -1, -1, -1, -1, -1, 71, -1, -1, -1,
1203 -1, -1, -1, -1, -1, -1, 81, 82, 83, -1,
1204 85, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1205 12, -1, -1, -1, -1, -1, -1, -1, -1, 21,
1206 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1207 32, -1, -1, -1, 36, 37, 38, 39, -1, 41,
1208 42, 43, 44, 45, 46, 47, 48, 49, -1, -1,
1209 52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
1210 -1, -1, -1, -1, -1, -1, -1, -1, -1, 71,
1211 -1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
1212 82, 83, -1, 85, 3, 4, 5, 6, -1, 8,
1213 9, 10, 11, 12, -1, -1, -1, -1, -1, -1,
1214 -1, -1, 21, 22, 23, 24, 25, 26, 27, 28,
1215 29, 30, 31, 32, -1, -1, -1, 36, 37, 38,
1216 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
1217 49, -1, -1, 52, 53, -1, -1, -1, -1, -1,
1218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1219 -1, -1, 71, -1, -1, -1, 10, 11, 12, -1,
1220 -1, -1, -1, 82, 83, -1, 85, 21, 22, 23,
1221 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
1222 -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
1223 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
1224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1225 -1, -1, -1, -1, -1, -1, -1, 71, -1, -1,
1226 74, 10, 11, 12, -1, -1, -1, -1, 82, 83,
1227 -1, 85, 21, 22, 23, 24, 25, 26, 27, 28,
1228 29, 30, 31, 32, -1, -1, -1, -1, -1, 38,
1229 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
1230 49, -1, -1, 52, 53, -1, -1, -1, -1, -1,
1231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1232 -1, -1, 71, -1, -1, -1, 10, 11, 12, -1,
1233 -1, -1, 81, 82, 83, -1, 85, 21, 22, 23,
1234 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
1235 -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
1236 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
1237 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1238 -1, -1, -1, -1, -1, -1, -1, 71, -1, -1,
1239 74, 10, 11, 12, -1, -1, -1, -1, 82, 83,
1240 -1, 85, 21, 22, 23, 24, 25, 26, 27, 28,
1241 29, 30, 31, 32, -1, -1, -1, -1, -1, 38,
1242 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
1243 49, -1, -1, 52, 53, -1, -1, -1, -1, -1,
1244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1245 -1, -1, 71, -1, -1, -1, 10, 11, 12, -1,
1246 -1, -1, -1, 82, 83, -1, 85, 21, 22, 23,
1247 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
1248 -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
1249 44, 45, 46, 47, 48, 49, -1, -1, 52, 53,
1250 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1251 -1, -1, -1, -1, -1, -1, -1, 71, 4, 5,
1252 6, -1, -1, -1, 10, 11, 12, -1, 82, 83,
1253 -1, 85, -1, -1, -1, 21, 22, 23, 24, 25,
1254 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
1255 -1, -1, 38, 39, -1, 41, 42, 43, 44, -1,
1256 46, 4, 5, 6, -1, -1, -1, 10, 11, 12,
1257 -1, -1, -1, -1, -1, -1, -1, -1, 21, 22,
1258 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1259 76, -1, -1, -1, -1, 38, 39, -1, 41, 42,
1260 43, 44, -1, 46, -1, -1, -1, -1, -1, -1,
1261 -1, -1, -1, 0, -1, -1, 3, 4, 5, 6,
1262 7, 8, 9, 10, 11, 12, -1, -1, -1, -1,
1263 -1, -1, -1, 76, 21, 22, 23, 24, 25, 26,
1264 27, 28, 29, 30, 31, 32, -1, -1, -1, 36,
1265 37, 38, 39, -1, 41, 42, 43, 44, -1, 46,
1266 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1267 -1, -1, -1, -1, -1, -1, -1, -1, 21, 22,
1268 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1269 -1, -1, -1, 36, 37, 38, 39, -1, 41, 42,
1270 43, 44, -1, 46, 4, 5, 6, -1, -1, -1,
1271 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
1272 -1, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1273 30, 31, 32, -1, -1, -1, -1, -1, 38, 39,
1274 -1, 41, 42, 43, 44, -1, 46, 10, 11, 12,
1275 -1, -1, -1, -1, -1, -1, -1, -1, 21, 22,
1276 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1277 -1, -1, -1, -1, -1, 38, 39, -1, 41, 42,
1278 43, 44, 45, 46, 10, 11, 12, -1, -1, -1,
1279 -1, -1, -1, -1, -1, 21, 22, 23, 24, 25,
1280 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
1281 -1, -1, 38, 39, -1, 41, 42, 43, 44, -1,
1289 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1290 12, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1291 30, 31, 32, 36, 37, 38, 39, 41, 42, 43,
1292 44, 46, 126, 127, 128, 129, 130, 135, 136, 137,
1293 138, 139, 140, 141, 142, 143, 175, 176, 177, 37,
1294 45, 140, 45, 46, 75, 96, 81, 178, 72, 78,
1295 3, 33, 34, 35, 132, 133, 138, 78, 81, 45,
1296 96, 139, 141, 73, 0, 176, 141, 145, 75, 75,
1297 161, 132, 131, 134, 139, 133, 96, 71, 73, 80,
1298 45, 47, 48, 49, 52, 53, 71, 82, 83, 85,
1299 97, 98, 99, 101, 102, 103, 104, 105, 106, 107,
1300 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
1301 118, 119, 120, 121, 125, 142, 81, 139, 146, 147,
1302 144, 13, 14, 15, 17, 18, 19, 20, 40, 75,
1303 76, 81, 108, 121, 122, 124, 126, 127, 142, 151,
1304 152, 153, 154, 162, 163, 164, 167, 174, 96, 131,
1305 134, 73, 80, 74, 125, 122, 150, 108, 108, 124,
1306 52, 53, 73, 77, 72, 72, 78, 39, 122, 71,
1307 108, 86, 87, 83, 85, 54, 55, 89, 90, 56,
1308 57, 58, 60, 59, 94, 74, 96, 148, 149, 76,
1309 147, 146, 81, 81, 169, 71, 71, 81, 81, 124,
1310 71, 76, 155, 61, 62, 63, 70, 80, 123, 78,
1311 81, 76, 152, 73, 74, 125, 150, 74, 72, 100,
1312 124, 45, 46, 96, 103, 122, 108, 108, 110, 110,
1313 112, 112, 112, 112, 113, 113, 117, 118, 119, 124,
1314 73, 78, 81, 76, 158, 159, 160, 170, 124, 81,
1315 168, 162, 122, 122, 125, 74, 74, 79, 125, 149,
1316 40, 161, 153, 151, 163, 171, 72, 124, 137, 166,
1317 156, 74, 122, 74, 71, 166, 172, 173, 158, 165,
1318 96, 72, 76, 124, 81, 72, 16, 80, 153, 157,
1319 161, 72, 124, 157, 158, 150, 81
1322 #define yyerrok (yyerrstatus = 0)
1323 #define yyclearin (yychar = YYEMPTY)
1324 #define YYEMPTY (-2)
1327 #define YYACCEPT goto yyacceptlab
1328 #define YYABORT goto yyabortlab
1329 #define YYERROR goto yyerrorlab
1339 #define YYFAIL goto yyerrlab
1347 #define YYRECOVERING() (!!yyerrstatus)
1349 #define YYBACKUP(Token, Value) \
1351 if (yychar == YYEMPTY) \
1355 YYPOPSTACK (yylen); \
1361 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
1368 #define YYERRCODE 256
1375 #ifndef YYLLOC_DEFAULT
1376 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1380 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1381 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1382 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1383 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1387 (Current).first_line = (Current).last_line = \
1388 YYRHSLOC (Rhs, 0).last_line; \
1389 (Current).first_column = (Current).last_column = \
1390 YYRHSLOC (Rhs, 0).last_column; \
1395 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1402 #ifndef YY_LOCATION_PRINT
1403 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1408 #if (defined __STDC__ || defined __C99__FUNC__ \
1409 || defined __cplusplus || defined _MSC_VER)
1411 yy_location_print_ (FILE *yyo,
YYLTYPE const *
const yylocp)
1414 yy_location_print_ (yyo, yylocp)
1420 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1421 if (0 <= yylocp->first_line)
1423 res += fprintf (yyo,
"%d", yylocp->first_line);
1424 if (0 <= yylocp->first_column)
1425 res += fprintf (yyo,
".%d", yylocp->first_column);
1427 if (0 <= yylocp->last_line)
1429 if (yylocp->first_line < yylocp->last_line)
1431 res += fprintf (yyo,
"-%d", yylocp->last_line);
1433 res += fprintf (yyo,
".%d", end_col);
1435 else if (0 <= end_col && yylocp->first_column < end_col)
1436 res += fprintf (yyo,
"-%d", end_col);
1441 # define YY_LOCATION_PRINT(File, Loc) \
1442 yy_location_print_ (File, &(Loc))
1445 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1452 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1454 # define YYLEX yylex (&yylval, &yylloc)
1462 # define YYFPRINTF fprintf
1465 # define YYDPRINTF(Args) \
1471 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1475 YYFPRINTF (stderr, "%s ", Title); \
1476 yy_symbol_print (stderr, \
1477 Type, Value, Location, context); \
1478 YYFPRINTF (stderr, "\n"); \
1488 #if (defined __STDC__ || defined __C99__FUNC__ \
1489 || defined __cplusplus || defined _MSC_VER)
1494 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
1502 FILE *yyo = yyoutput;
1506 YYUSE (yylocationp);
1510 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1526 #if (defined __STDC__ || defined __C99__FUNC__ \
1527 || defined __cplusplus || defined _MSC_VER)
1529 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
YYLTYPE const *
const yylocationp,
TParseContext* context)
1532 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
1541 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
1543 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
1546 YYFPRINTF (yyoutput,
": ");
1547 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
1548 YYFPRINTF (yyoutput,
")");
1556 #if (defined __STDC__ || defined __C99__FUNC__ \
1557 || defined __cplusplus || defined _MSC_VER)
1562 yy_stack_print (yybottom, yytop)
1567 YYFPRINTF (stderr,
"Stack now");
1568 for (; yybottom <= yytop; yybottom++)
1570 int yybot = *yybottom;
1571 YYFPRINTF (stderr,
" %d", yybot);
1573 YYFPRINTF (stderr,
"\n");
1576 # define YY_STACK_PRINT(Bottom, Top) \
1579 yy_stack_print ((Bottom), (Top)); \
1587 #if (defined __STDC__ || defined __C99__FUNC__ \
1588 || defined __cplusplus || defined _MSC_VER)
1593 yy_reduce_print (yyvsp, yylsp, yyrule, context)
1600 int yynrhs = yyr2[yyrule];
1602 unsigned long int yylno = yyrline[yyrule];
1603 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1606 for (yyi = 0; yyi < yynrhs; yyi++)
1608 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
1609 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1610 &(yyvsp[(yyi + 1) - (yynrhs)])
1611 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
1612 YYFPRINTF (stderr,
"\n");
1616 # define YY_REDUCE_PRINT(Rule) \
1619 yy_reduce_print (yyvsp, yylsp, Rule, context); \
1626 # define YYDPRINTF(Args)
1627 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1628 # define YY_STACK_PRINT(Bottom, Top)
1629 # define YY_REDUCE_PRINT(Rule)
1635 # define YYINITDEPTH 200
1646 # define YYMAXDEPTH 10000
1653 # if defined __GLIBC__ && defined _STRING_H
1654 # define yystrlen strlen
1657 #if (defined __STDC__ || defined __C99__FUNC__ \
1658 || defined __cplusplus || defined _MSC_VER)
1660 yystrlen (
const char *yystr)
1668 for (yylen = 0; yystr[
yylen]; yylen++)
1676 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1677 # define yystpcpy stpcpy
1681 #if (defined __STDC__ || defined __C99__FUNC__ \
1682 || defined __cplusplus || defined _MSC_VER)
1684 yystpcpy (
char *yydest,
const char *yysrc)
1687 yystpcpy (yydest, yysrc)
1693 const char *yys = yysrc;
1695 while ((*yyd++ = *yys++) !=
'\0')
1712 yytnamerr (
char *yyres,
const char *yystr)
1717 char const *yyp = yystr;
1724 goto do_not_strip_quotes;
1728 goto do_not_strip_quotes;
1741 do_not_strip_quotes: ;
1745 return yystrlen (yystr);
1747 return yystpcpy (yyres, yystr) - yyres;
1765 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1767 const char *yyformat =
YY_NULL;
1769 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1803 int yyn = yypact[*
yyssp];
1804 yyarg[yycount++] = yytname[
yytoken];
1810 int yyxbegin = yyn < 0 ? -yyn : 0;
1812 int yychecklim =
YYLAST - yyn + 1;
1816 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1817 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
1820 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1826 yyarg[yycount++] = yytname[yyx];
1829 if (! (yysize <= yysize1
1840 # define YYCASE_(N, S) \
1844 YYCASE_(0,
YY_(
"syntax error"));
1845 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1846 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1847 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1848 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1849 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1854 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1860 if (*yymsg_alloc < yysize)
1862 *yymsg_alloc = 2 * yysize;
1863 if (! (yysize <= *yymsg_alloc
1875 while ((*yyp = *yyformat) !=
'\0')
1876 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1878 yyp += yytnamerr (yyp, yyarg[yyi++]);
1896 #if (defined __STDC__ || defined __C99__FUNC__ \
1897 || defined __cplusplus || defined _MSC_VER)
1902 yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
1911 YYUSE (yylocationp);
1933 #ifdef YYPARSE_PARAM
1934 #if (defined __STDC__ || defined __C99__FUNC__ \
1935 || defined __cplusplus || defined _MSC_VER)
1941 void *YYPARSE_PARAM;
1944 #if (defined __STDC__ || defined __C99__FUNC__ \
1945 || defined __cplusplus || defined _MSC_VER)
1959 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1961 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1962 _Pragma ("GCC diagnostic push") \
1963 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1964 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1965 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1966 _Pragma ("GCC diagnostic pop")
1971 # define YY_INITIAL_VALUE(Value) = Value
1974 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1978 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1979 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1980 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1982 #ifndef YY_INITIAL_VALUE
1983 # define YY_INITIAL_VALUE(Value)
2040 char *yymsg = yymsgbuf;
2041 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
2044 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
2050 yyssp = yyss =
yyssa;
2051 yyvsp = yyvs =
yyvsa;
2052 yylsp = yyls =
yylsa;
2055 YYDPRINTF ((stderr,
"Starting parse\n"));
2075 if (yyss + yystacksize - 1 <= yyssp)
2078 YYSIZE_T yysize = yyssp - yyss + 1;
2093 yyoverflow (
YY_(
"memory exhausted"),
2094 &yyss1, yysize *
sizeof (*yyssp),
2095 &yyvs1, yysize *
sizeof (*yyvsp),
2096 &yyls1, yysize *
sizeof (*yylsp),
2104 # ifndef YYSTACK_RELOCATE
2105 goto yyexhaustedlab;
2109 goto yyexhaustedlab;
2119 goto yyexhaustedlab;
2123 # undef YYSTACK_RELOCATE
2130 yyssp = yyss + yysize - 1;
2131 yyvsp = yyvs + yysize - 1;
2132 yylsp = yyls + yysize - 1;
2134 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
2135 (
unsigned long int) yystacksize));
2137 if (yyss + yystacksize - 1 <= yyssp)
2141 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
2166 YYDPRINTF ((stderr,
"Reading a token: "));
2172 yychar = yytoken =
YYEOF;
2173 YYDPRINTF ((stderr,
"Now at end of input.\n"));
2184 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
2239 yyval = yyvsp[1-
yylen];
2250 const TSymbol* symbol = (yyvsp[(1) - (1)].lex).symbol;
2253 context->error((yylsp[(1) - (1)]),
"undeclared identifier", (yyvsp[(1) - (1)].lex).
string->c_str());
2257 context->symbolTable.insert(*fakeVariable);
2258 variable = fakeVariable;
2262 context->error((yylsp[(1) - (1)]),
"variable expected", (yyvsp[(1) - (1)].lex).
string->c_str());
2266 variable =
static_cast<const TVariable*
>(symbol);
2268 if (context->symbolTable.findBuiltIn(variable->
getName()) &&
2270 context->extensionErrorCheck((yylsp[(1) - (1)]), variable->
getExtension())) {
2281 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray,
t, (yylsp[(1) - (1)]));
2283 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->
getUniqueId(),
2286 (yylsp[(1) - (1)]));
2293 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2304 if (abs((yyvsp[(1) - (1)].lex).i) >= (1 << 16)) {
2305 context->error((yylsp[(1) - (1)]),
" integer constant overflow",
"");
2309 unionArray->
setIConst((yyvsp[(1) - (1)].lex).
i);
2318 unionArray->
setFConst((yyvsp[(1) - (1)].lex).
f);
2327 unionArray->
setBConst((yyvsp[(1) - (1)].lex).
b);
2335 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2342 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2349 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[(1) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode));
2356 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2363 if ((yyvsp[(1) - (3)].interm.intermTypedNode)->isArray()) {
2364 context->error((yylsp[(3) - (3)]),
"cannot apply dot operator to an array",
".");
2368 if ((yyvsp[(1) - (3)].interm.intermTypedNode)->isVector()) {
2370 if (! context->parseVectorFields(*(yyvsp[(3) - (3)].lex).string, (yyvsp[(1) - (3)].interm.intermTypedNode)->getNominalSize(), fields, (yylsp[(3) - (3)]))) {
2376 if ((yyvsp[(1) - (3)].interm.intermTypedNode)->getType().getQualifier() ==
EvqConst) {
2377 (yyval.interm.intermTypedNode) = context->addConstVectorNode(fields, (yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(3) - (3)]));
2378 if ((yyval.interm.intermTypedNode) == 0) {
2380 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2383 (yyval.interm.intermTypedNode)->setType(
TType((yyvsp[(1) - (3)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (3)].interm.intermTypedNode)->getPrecision(),
EvqConst, (
int) (*(yyvsp[(3) - (3)].lex).string).
size()));
2385 TString vectorString = *(yyvsp[(3) - (3)].lex).
string;
2386 TIntermTyped*
index = context->intermediate.addSwizzle(fields, (yylsp[(3) - (3)]));
2387 (yyval.interm.intermTypedNode) = context->intermediate.addIndex(
EOpVectorSwizzle, (yyvsp[(1) - (3)].interm.intermTypedNode), index, (yylsp[(2) - (3)]));
2388 (yyval.interm.intermTypedNode)->setType(
TType((yyvsp[(1) - (3)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (3)].interm.intermTypedNode)->getPrecision(),
EvqTemporary, (
int) vectorString.size()));
2390 }
else if ((yyvsp[(1) - (3)].interm.intermTypedNode)->isMatrix()) {
2392 if (! context->parseMatrixFields(*(yyvsp[(3) - (3)].lex).string, (yyvsp[(1) - (3)].interm.intermTypedNode)->getNominalSize(), fields, (yylsp[(3) - (3)]))) {
2401 context->error((yylsp[(2) - (3)]),
" non-scalar fields not implemented yet",
".");
2406 (yyval.interm.intermTypedNode) = context->intermediate.addIndex(
EOpIndexDirect, (yyvsp[(1) - (3)].interm.intermTypedNode), index, (yylsp[(2) - (3)]));
2407 (yyval.interm.intermTypedNode)->setType(
TType((yyvsp[(1) - (3)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (3)].interm.intermTypedNode)->getPrecision(),
EvqTemporary, (yyvsp[(1) - (3)].interm.intermTypedNode)->getNominalSize()));
2410 unionArray->
setIConst(fields.
col * (yyvsp[(1) - (3)].interm.intermTypedNode)->getNominalSize() + fields.
row);
2412 (yyval.interm.intermTypedNode) = context->intermediate.addIndex(
EOpIndexDirect, (yyvsp[(1) - (3)].interm.intermTypedNode), index, (yylsp[(2) - (3)]));
2413 (yyval.interm.intermTypedNode)->setType(
TType((yyvsp[(1) - (3)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (3)].interm.intermTypedNode)->getPrecision()));
2415 }
else if ((yyvsp[(1) - (3)].interm.intermTypedNode)->getBasicType() ==
EbtStruct) {
2416 bool fieldFound =
false;
2417 const TFieldList& fields = (yyvsp[(1) - (3)].interm.intermTypedNode)->getType().getStruct()->fields();
2419 for (i = 0; i < fields.size(); ++
i) {
2420 if (fields[i]->
name() == *(yyvsp[(3) - (3)].lex).
string) {
2426 if ((yyvsp[(1) - (3)].interm.intermTypedNode)->getType().getQualifier() ==
EvqConst) {
2427 (yyval.interm.intermTypedNode) = context->addConstStruct(*(yyvsp[(3) - (3)].lex).string, (yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2428 if ((yyval.interm.intermTypedNode) == 0) {
2430 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2433 (yyval.interm.intermTypedNode)->setType(*fields[i]->
type());
2436 (yyval.interm.intermTypedNode)->getTypePointer()->setQualifier(
EvqConst);
2441 TIntermTyped*
index = context->intermediate.addConstantUnion(unionArray, *fields[i]->
type(), (yylsp[(3) - (3)]));
2442 (yyval.interm.intermTypedNode) = context->intermediate.addIndex(
EOpIndexDirectStruct, (yyvsp[(1) - (3)].interm.intermTypedNode), index, (yylsp[(2) - (3)]));
2443 (yyval.interm.intermTypedNode)->setType(*fields[i]->
type());
2446 context->error((yylsp[(2) - (3)]),
" no such field in structure", (yyvsp[(3) - (3)].lex).
string->c_str());
2448 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2451 context->error((yylsp[(2) - (3)]),
" field selection requires structure, vector, or matrix on left hand side", (yyvsp[(3) - (3)].lex).
string->c_str());
2453 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2462 if (context->lValueErrorCheck((yylsp[(2) - (2)]),
"++", (yyvsp[(1) - (2)].interm.intermTypedNode)))
2464 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(
EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]), context->symbolTable);
2465 if ((yyval.interm.intermTypedNode) == 0) {
2466 context->unaryOpError((yylsp[(2) - (2)]),
"++", (yyvsp[(1) - (2)].interm.intermTypedNode)->getCompleteString());
2468 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
2476 if (context->lValueErrorCheck((yylsp[(2) - (2)]),
"--", (yyvsp[(1) - (2)].interm.intermTypedNode)))
2478 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(
EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]), context->symbolTable);
2479 if ((yyval.interm.intermTypedNode) == 0) {
2480 context->unaryOpError((yylsp[(2) - (2)]),
"--", (yyvsp[(1) - (2)].interm.intermTypedNode)->getCompleteString());
2482 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
2490 if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode),
"[]"))
2492 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2499 TFunction* fnCall = (yyvsp[(1) - (1)].interm).
function;
2510 if (context->constructorErrorCheck((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].interm).intermNode, *fnCall, op, &type)) {
2511 (yyval.interm.intermTypedNode) = 0;
2516 (yyval.interm.intermTypedNode) = context->addConstructor((yyvsp[(1) - (1)].interm).intermNode, &type, op, fnCall, (yylsp[(1) - (1)]));
2519 if ((yyval.interm.intermTypedNode) == 0) {
2521 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator(0, op, (yylsp[(1) - (1)]));
2523 (yyval.interm.intermTypedNode)->setType(type);
2530 fnCandidate = context->findFunction((yylsp[(1) - (1)]), fnCall, &builtIn);
2536 context->extensionErrorCheck((yylsp[(1) - (1)]), fnCandidate->
getExtension())) {
2540 if (builtIn && op !=
EOpNull) {
2548 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(op, (yyvsp[(1) - (1)].interm).intermNode, (yylsp[(1) - (1)]), context->symbolTable);
2549 if ((yyval.interm.intermTypedNode) == 0) {
2550 std::stringstream extraInfoStream;
2551 extraInfoStream <<
"built in unary operator function. Type: " <<
static_cast<TIntermTyped*
>((yyvsp[(1) - (1)].interm).intermNode)->
getCompleteString();
2553 context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(),
" wrong operand type",
"Internal Error", extraInfo.c_str());
2557 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, op, (yylsp[(1) - (1)]));
2562 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate,
EOpFunctionCall, (yylsp[(1) - (1)]));
2563 (yyval.interm.intermTypedNode)->setType(fnCandidate->
getReturnType());
2569 (yyval.interm.intermTypedNode)->getAsAggregate()->setUserDefined();
2570 (yyval.interm.intermTypedNode)->getAsAggregate()->setName(fnCandidate->
getMangledName());
2576 if (context->lValueErrorCheck((yyval.interm.intermTypedNode)->getLine(),
"assign", (yyval.interm.intermTypedNode)->getAsAggregate()->getSequence()[
i]->getAsTyped())) {
2577 context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(),
"Constant value cannot be passed for 'out' or 'inout' parameters.",
"Error");
2583 (yyval.interm.intermTypedNode)->setType(fnCandidate->
getReturnType());
2600 (yyval.interm) = (yyvsp[(1) - (1)].interm);
2607 context->error((yylsp[(3) - (3)]),
"methods are not supported",
"");
2609 (yyval.interm) = (yyvsp[(3) - (3)].interm);
2616 (yyval.interm) = (yyvsp[(1) - (2)].interm);
2623 (yyval.interm) = (yyvsp[(1) - (2)].interm);
2630 (yyval.interm).
function = (yyvsp[(1) - (2)].interm.function);
2631 (yyval.interm).intermNode = 0;
2638 (yyval.interm).
function = (yyvsp[(1) - (1)].interm.function);
2639 (yyval.interm).intermNode = 0;
2647 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2648 (yyval.interm).
function = (yyvsp[(1) - (2)].interm.function);
2649 (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
2656 TParameter param = { 0,
new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2657 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2658 (yyval.interm).
function = (yyvsp[(1) - (3)].interm).function;
2659 (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2666 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2677 if ((yyvsp[(1) - (1)].interm.type).userDef) {
2680 switch ((yyvsp[(1) - (1)].interm.type).type) {
2682 if ((yyvsp[(1) - (1)].interm.type).matrix) {
2683 switch((yyvsp[(1) - (1)].interm.type).size) {
2689 switch((yyvsp[(1) - (1)].interm.type).size) {
2698 switch((yyvsp[(1) - (1)].interm.type).size) {
2706 switch((yyvsp[(1) - (1)].interm.type).size) {
2716 context->error((yylsp[(1) - (1)]),
"cannot construct this type",
getBasicString((yyvsp[(1) - (1)].interm.type).type));
2723 TType type((yyvsp[(1) - (1)].interm.type));
2725 (yyval.interm.function) =
function;
2732 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
2736 (yyval.interm.function) =
function;
2743 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2750 if (context->lValueErrorCheck((yylsp[(1) - (2)]),
"++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
2752 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(
EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]), context->symbolTable);
2753 if ((yyval.interm.intermTypedNode) == 0) {
2754 context->unaryOpError((yylsp[(1) - (2)]),
"++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
2756 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2764 if (context->lValueErrorCheck((yylsp[(1) - (2)]),
"--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
2766 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(
EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]), context->symbolTable);
2767 if ((yyval.interm.intermTypedNode) == 0) {
2768 context->unaryOpError((yylsp[(1) - (2)]),
"--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
2770 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2778 if ((yyvsp[(1) - (2)].interm).op !=
EOpNull) {
2779 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]), context->symbolTable);
2780 if ((yyval.interm.intermTypedNode) == 0) {
2781 const char* errorOp =
"";
2782 switch((yyvsp[(1) - (2)].interm).op) {
2787 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
2789 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2792 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2798 { (yyval.interm).op =
EOpNull; }
2813 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2819 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2820 if ((yyval.interm.intermTypedNode) == 0) {
2821 context->binaryOpError((yylsp[(2) - (3)]),
"*", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2823 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2831 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2832 if ((yyval.interm.intermTypedNode) == 0) {
2833 context->binaryOpError((yylsp[(2) - (3)]),
"/", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2835 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2842 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2848 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2849 if ((yyval.interm.intermTypedNode) == 0) {
2850 context->binaryOpError((yylsp[(2) - (3)]),
"+", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2852 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2860 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2861 if ((yyval.interm.intermTypedNode) == 0) {
2862 context->binaryOpError((yylsp[(2) - (3)]),
"-", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2864 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2871 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2876 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2882 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2883 if ((yyval.interm.intermTypedNode) == 0) {
2884 context->binaryOpError((yylsp[(2) - (3)]),
"<", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2896 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2897 if ((yyval.interm.intermTypedNode) == 0) {
2898 context->binaryOpError((yylsp[(2) - (3)]),
">", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2910 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2911 if ((yyval.interm.intermTypedNode) == 0) {
2912 context->binaryOpError((yylsp[(2) - (3)]),
"<=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2924 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2925 if ((yyval.interm.intermTypedNode) == 0) {
2926 context->binaryOpError((yylsp[(2) - (3)]),
">=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2937 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2943 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2944 if ((yyval.interm.intermTypedNode) == 0) {
2945 context->binaryOpError((yylsp[(2) - (3)]),
"==", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2957 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2958 if ((yyval.interm.intermTypedNode) == 0) {
2959 context->binaryOpError((yylsp[(2) - (3)]),
"!=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2970 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2975 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2980 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2985 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2991 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
2992 if ((yyval.interm.intermTypedNode) == 0) {
2993 context->binaryOpError((yylsp[(2) - (3)]),
"&&", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3004 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3010 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
3011 if ((yyval.interm.intermTypedNode) == 0) {
3012 context->binaryOpError((yylsp[(2) - (3)]),
"^^", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3023 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3029 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(
EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), context->symbolTable);
3030 if ((yyval.interm.intermTypedNode) == 0) {
3031 context->binaryOpError((yylsp[(2) - (3)]),
"||", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3042 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3048 if (context->boolErrorCheck((yylsp[(2) - (5)]), (yyvsp[(1) - (5)].interm.intermTypedNode)))
3051 (yyval.interm.intermTypedNode) = context->intermediate.addSelection((yyvsp[(1) - (5)].interm.intermTypedNode), (yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.intermTypedNode), (yylsp[(2) - (5)]));
3052 if ((yyvsp[(3) - (5)].interm.intermTypedNode)->getType() != (yyvsp[(5) - (5)].interm.intermTypedNode)->getType())
3053 (yyval.interm.intermTypedNode) = 0;
3055 if ((yyval.interm.intermTypedNode) == 0) {
3056 context->binaryOpError((yylsp[(2) - (5)]),
":", (yyvsp[(3) - (5)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(5) - (5)].interm.intermTypedNode)->getCompleteString());
3058 (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode);
3065 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3071 if (context->lValueErrorCheck((yylsp[(2) - (3)]),
"assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
3073 (yyval.interm.intermTypedNode) = context->intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3074 if ((yyval.interm.intermTypedNode) == 0) {
3075 context->assignError((yylsp[(2) - (3)]),
"assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3077 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3110 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3117 (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3118 if ((yyval.interm.intermTypedNode) == 0) {
3119 context->binaryOpError((yylsp[(2) - (3)]),
",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3121 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3129 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3131 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3138 TFunction &
function = *((yyvsp[(1) - (2)].interm).
function);
3141 prototype->
setType(
function.getReturnType());
3142 prototype->
setName(
function.getName());
3144 for (
size_t i = 0;
i <
function.getParamCount();
i++)
3147 if (param.
name != 0)
3151 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.
getUniqueId(), variable.
getName(), variable.
getType(), (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
3155 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0,
"", *param.
type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
3160 (yyval.interm.intermNode) = prototype;
3162 context->symbolTable.pop();
3169 if ((yyvsp[(1) - (2)].interm).intermAggregate)
3171 (yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermAggregate;
3178 if (((yyvsp[(2) - (4)].interm.precision) ==
EbpHigh) && (context->shaderType ==
SH_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
3179 context->error((yylsp[(1) - (4)]),
"precision is not supported in fragment shader",
"highp");
3182 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
3183 context->error((yylsp[(1) - (4)]),
"illegal type argument for default precision qualifier",
getBasicString((yyvsp[(3) - (4)].interm.type).type));
3186 (yyval.interm.intermNode) = 0;
3201 TFunction* prevDec =
static_cast<TFunction*
>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName()));
3203 if (prevDec->
getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
3204 context->error((yylsp[(2) - (2)]),
"overloaded functions must have the same return type", (yyvsp[(1) - (2)].interm.function)->getReturnType().getBasicString());
3209 context->error((yylsp[(2) - (2)]),
"overloaded functions must have the same parameter qualifiers", (yyvsp[(1) - (2)].interm.function)->getParam(
i).type->getQualifierString());
3218 TSymbol *prevSym = context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getName());
3223 context->error((yylsp[(2) - (2)]),
"redefinition", (yyvsp[(1) - (2)].interm.function)->getName().c_str(),
"function");
3230 context->symbolTable.getOuterLevel()->insert((yyvsp[(1) - (2)].interm.function)->getName(), *(yyvsp[(1) - (2)].interm.function));
3238 (yyval.interm).
function = (yyvsp[(1) - (2)].interm.function);
3242 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3249 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3256 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3264 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3265 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() !=
EbtVoid)
3266 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3268 delete (yyvsp[(2) - (2)].interm).param.type;
3279 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() ==
EbtVoid) {
3283 context->error((yylsp[(2) - (3)]),
"cannot be an argument type except for '(void)'",
"void");
3285 delete (yyvsp[(3) - (3)].interm).param.
type;
3288 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3289 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3297 if ((yyvsp[(1) - (3)].interm.type).qualifier !=
EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier !=
EvqTemporary) {
3298 context->error((yylsp[(2) - (3)]),
"no qualifiers allowed for function return",
getQualifierString((yyvsp[(1) - (3)].interm.type).qualifier));
3302 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
3307 TType type((yyvsp[(1) - (3)].interm.type));
3308 function =
new TFunction((yyvsp[(2) - (3)].lex).
string, type);
3309 (yyval.interm.function) =
function;
3311 context->symbolTable.push();
3318 if ((yyvsp[(1) - (2)].interm.type).type ==
EbtVoid) {
3319 context->error((yylsp[(2) - (2)]),
"illegal use of type 'void'", (yyvsp[(2) - (2)].lex).
string->c_str());
3322 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
3324 TParameter param = {(yyvsp[(2) - (2)].lex).
string,
new TType((yyvsp[(1) - (2)].interm.type))};
3325 (yyval.interm).param = param;
3333 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
3336 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
3340 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
3342 (yyvsp[(1) - (5)].interm.type).setArray(
true, size);
3345 TParameter param = { (yyvsp[(2) - (5)].lex).
string, type };
3346 (yyval.interm).param = param;
3353 (yyval.interm) = (yyvsp[(3) - (3)].interm);
3354 if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
3362 (yyval.interm) = (yyvsp[(2) - (2)].interm);
3363 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
3365 if (context->paramErrorCheck((yylsp[(2) - (2)]),
EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
3373 (yyval.interm) = (yyvsp[(3) - (3)].interm);
3374 if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
3382 (yyval.interm) = (yyvsp[(2) - (2)].interm);
3383 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
3385 if (context->paramErrorCheck((yylsp[(2) - (2)]),
EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
3393 (yyval.interm.qualifier) =
EvqIn;
3400 (yyval.interm.qualifier) =
EvqIn;
3407 (yyval.interm.qualifier) =
EvqOut;
3414 (yyval.interm.qualifier) =
EvqInOut;
3422 (yyval.interm).param = param;
3429 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3436 if ((yyvsp[(1) - (3)].interm).type.type ==
EbtInvariant && !(yyvsp[(3) - (3)].lex).symbol)
3438 context->error((yylsp[(3) - (3)]),
"undeclared identifier declared as invariant", (yyvsp[(3) - (3)].lex).
string->c_str());
3442 TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(3) - (3)].lex).
string,
TType((yyvsp[(1) - (3)].interm).type), (yylsp[(3) - (3)]));
3443 (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, symbol, (yylsp[(3) - (3)]));
3445 if (context->structQualifierErrorCheck((yylsp[(3) - (3)]), (yyval.interm).type))
3448 if (context->nonInitConstErrorCheck((yylsp[(3) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type,
false))
3452 if (context->nonInitErrorCheck((yylsp[(3) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type, variable))
3454 if (symbol && variable)
3462 if (context->structQualifierErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm).type))
3465 if (context->nonInitConstErrorCheck((yylsp[(3) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type,
true))
3468 (yyval.interm) = (yyvsp[(1) - (5)].interm);
3470 if (context->arrayTypeErrorCheck((yylsp[(4) - (5)]), (yyvsp[(1) - (5)].interm).type) || context->arrayQualifierErrorCheck((yylsp[(4) - (5)]), (yyvsp[(1) - (5)].interm).type))
3473 (yyvsp[(1) - (5)].interm).type.setArray(
true);
3475 if (context->arrayErrorCheck((yylsp[(4) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, variable))
3484 if (context->structQualifierErrorCheck((yylsp[(3) - (6)]), (yyvsp[(1) - (6)].interm).type))
3487 if (context->nonInitConstErrorCheck((yylsp[(3) - (6)]), *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type,
true))
3490 (yyval.interm) = (yyvsp[(1) - (6)].interm);
3492 if (context->arrayTypeErrorCheck((yylsp[(4) - (6)]), (yyvsp[(1) - (6)].interm).type) || context->arrayQualifierErrorCheck((yylsp[(4) - (6)]), (yyvsp[(1) - (6)].interm).type))
3496 if (context->arraySizeErrorCheck((yylsp[(4) - (6)]), (yyvsp[(5) - (6)].interm.intermTypedNode), size))
3498 (yyvsp[(1) - (6)].interm).type.setArray(
true, size);
3500 if (context->arrayErrorCheck((yylsp[(4) - (6)]), *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, variable))
3502 TType type =
TType((yyvsp[(1) - (6)].interm).type);
3503 type.setArraySize(size);
3504 (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, context->intermediate.addSymbol(variable ? variable->
getUniqueId() : 0, *(yyvsp[(3) - (6)].lex).
string, type, (yylsp[(3) - (6)])), (yylsp[(3) - (6)]));
3512 if (context->structQualifierErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm).type))
3515 (yyval.interm) = (yyvsp[(1) - (5)].interm);
3518 if (!context->executeInitializer((yylsp[(3) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, (yyvsp[(5) - (5)].interm.intermTypedNode), intermNode)) {
3523 (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (5)].interm).intermNode, intermNode, (yylsp[(4) - (5)]));
3525 (yyval.interm).intermAggregate = (yyvsp[(1) - (5)].interm).intermAggregate;
3528 (yyval.interm).intermAggregate = 0;
3536 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
3537 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0,
"",
TType((yyvsp[(1) - (1)].interm.type)), (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
3544 TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).
string,
TType((yyvsp[(1) - (2)].interm.type)), (yylsp[(2) - (2)]));
3545 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yylsp[(2) - (2)]));
3547 if (context->structQualifierErrorCheck((yylsp[(2) - (2)]), (yyval.interm).type))
3550 if (context->nonInitConstErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type,
false))
3553 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
3556 if (context->nonInitErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type, variable))
3558 if (variable && symbol)
3566 context->error((yylsp[(2) - (4)]),
"unsized array declarations not supported", (yyvsp[(2) - (4)].lex).
string->c_str());
3569 TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (4)].lex).
string,
TType((yyvsp[(1) - (4)].interm.type)), (yylsp[(2) - (4)]));
3570 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yylsp[(2) - (4)]));
3571 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
3578 TType type =
TType((yyvsp[(1) - (5)].interm.type));
3580 if (context->arraySizeErrorCheck((yylsp[(2) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
3583 TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (5)].lex).
string, type, (yylsp[(2) - (5)]));
3584 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yylsp[(2) - (5)]));
3586 if (context->structQualifierErrorCheck((yylsp[(2) - (5)]), (yyvsp[(1) - (5)].interm.type)))
3589 if (context->nonInitConstErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type),
true))
3592 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
3594 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)) || context->arrayQualifierErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
3598 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
3601 (yyvsp[(1) - (5)].interm.type).setArray(
true, size);
3603 if (context->arrayErrorCheck((yylsp[(3) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), variable))
3605 if (variable && symbol)
3614 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
3617 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
3620 if (!context->executeInitializer((yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), intermNode)) {
3625 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(intermNode, (yylsp[(3) - (4)]));
3627 (yyval.interm).intermAggregate = 0;
3630 (yyval.interm).intermAggregate = 0;
3638 VERTEX_ONLY(
"invariant declaration", (yylsp[(1) - (2)]));
3639 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(),
"invariant varying"))
3642 if (!(yyvsp[(2) - (2)].lex).symbol)
3644 context->error((yylsp[(2) - (2)]),
"undeclared identifier declared as invariant", (yyvsp[(2) - (2)].lex).
string->c_str());
3647 (yyval.interm).intermAggregate = 0;
3651 TIntermSymbol *symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).
string,
TType((yyval.interm).type), (yylsp[(2) - (2)]));
3652 (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yylsp[(2) - (2)]));
3660 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3662 if ((yyvsp[(1) - (1)].interm.type).array) {
3663 context->error((yylsp[(1) - (1)]),
"not supported",
"first-class array");
3665 (yyvsp[(1) - (1)].interm.type).setArray(
false);
3673 if ((yyvsp[(2) - (2)].interm.type).array) {
3674 context->error((yylsp[(2) - (2)]),
"not supported",
"first-class array");
3676 (yyvsp[(2) - (2)].interm.type).setArray(
false);
3679 if ((yyvsp[(1) - (2)].interm.type).qualifier ==
EvqAttribute &&
3680 ((yyvsp[(2) - (2)].interm.type).type ==
EbtBool || (yyvsp[(2) - (2)].interm.type).type ==
EbtInt)) {
3681 context->error((yylsp[(2) - (2)]),
"cannot be bool or int",
getQualifierString((yyvsp[(1) - (2)].interm.type).qualifier));
3684 if (((yyvsp[(1) - (2)].interm.type).qualifier ==
EvqVaryingIn || (yyvsp[(1) - (2)].interm.type).qualifier ==
EvqVaryingOut) &&
3685 ((yyvsp[(2) - (2)].interm.type).type ==
EbtBool || (yyvsp[(2) - (2)].interm.type).type ==
EbtInt)) {
3686 context->error((yylsp[(2) - (2)]),
"cannot be bool or int",
getQualifierString((yyvsp[(1) - (2)].interm.type).qualifier));
3689 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3690 (yyval.interm.type).qualifier = (yyvsp[(1) - (2)].interm.type).qualifier;
3705 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(),
"attribute"))
3714 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(),
"varying"))
3726 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(),
"invariant varying"))
3738 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(),
"uniform"))
3747 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3750 (yyval.interm.type).
precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
3751 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
3761 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3762 (yyval.interm.type).
precision = (yyvsp[(1) - (2)].interm.precision);
3769 (yyval.interm.precision) =
EbpHigh;
3783 (yyval.interm.precision) =
EbpLow;
3790 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3797 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3799 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
3803 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
3805 (yyval.interm.type).setArray(
true, size);
3814 (yyval.interm.type).setBasic(
EbtVoid, qual, (yylsp[(1) - (1)]));
3822 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3830 (yyval.interm.type).setBasic(
EbtInt, qual, (yylsp[(1) - (1)]));
3838 (yyval.interm.type).setBasic(
EbtBool, qual, (yylsp[(1) - (1)]));
3846 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3847 (yyval.interm.type).setAggregate(2);
3855 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3856 (yyval.interm.type).setAggregate(3);
3864 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3865 (yyval.interm.type).setAggregate(4);
3873 (yyval.interm.type).setBasic(
EbtBool, qual, (yylsp[(1) - (1)]));
3874 (yyval.interm.type).setAggregate(2);
3882 (yyval.interm.type).setBasic(
EbtBool, qual, (yylsp[(1) - (1)]));
3883 (yyval.interm.type).setAggregate(3);
3891 (yyval.interm.type).setBasic(
EbtBool, qual, (yylsp[(1) - (1)]));
3892 (yyval.interm.type).setAggregate(4);
3900 (yyval.interm.type).setBasic(
EbtInt, qual, (yylsp[(1) - (1)]));
3901 (yyval.interm.type).setAggregate(2);
3909 (yyval.interm.type).setBasic(
EbtInt, qual, (yylsp[(1) - (1)]));
3910 (yyval.interm.type).setAggregate(3);
3918 (yyval.interm.type).setBasic(
EbtInt, qual, (yylsp[(1) - (1)]));
3919 (yyval.interm.type).setAggregate(4);
3927 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3928 (yyval.interm.type).setAggregate(2,
true);
3936 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3937 (yyval.interm.type).setAggregate(3,
true);
3945 (yyval.interm.type).setBasic(
EbtFloat, qual, (yylsp[(1) - (1)]));
3946 (yyval.interm.type).setAggregate(4,
true);
3954 (yyval.interm.type).setBasic(
EbtSampler2D, qual, (yylsp[(1) - (1)]));
3962 (yyval.interm.type).setBasic(
EbtSamplerCube, qual, (yylsp[(1) - (1)]));
3969 if (!context->supportsExtension(
"GL_OES_EGL_image_external")) {
3970 context->error((yylsp[(1) - (1)]),
"unsupported type",
"samplerExternalOES");
3981 if (!context->supportsExtension(
"GL_ARB_texture_rectangle")) {
3982 context->error((yylsp[(1) - (1)]),
"unsupported type",
"sampler2DRect");
3993 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4007 (yyval.interm.type).setBasic(
EbtStruct, qual, (yylsp[(1) - (1)]));
4008 (yyval.interm.type).userDef = &structure;
4014 {
if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
4020 if (context->reservedErrorCheck((yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string))
4023 TType* structure =
new TType(
new TStructure((yyvsp[(2) - (6)].lex).
string, (yyvsp[(5) - (6)].interm.fieldList)));
4024 TVariable* userTypeDef =
new TVariable((yyvsp[(2) - (6)].lex).
string, *structure,
true);
4025 if (! context->symbolTable.insert(*userTypeDef)) {
4026 context->error((yylsp[(2) - (6)]),
"redefinition", (yyvsp[(2) - (6)].lex).string->c_str(),
"struct");
4030 (yyval.interm.type).userDef = structure;
4031 context->exitStructDeclaration();
4037 {
if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
4045 (yyval.interm.type).userDef = structure;
4046 context->exitStructDeclaration();
4053 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
4060 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4061 for (
size_t i = 0;
i < (yyvsp[(2) - (2)].interm.fieldList)->
size(); ++
i) {
4062 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[
i];
4063 for (
size_t j = 0;
j < (yyval.interm.fieldList)->
size(); ++
j) {
4064 if ((*(yyval.interm.fieldList))[
j]->name() == field->
name()) {
4065 context->error((yylsp[(2) - (2)]),
"duplicate field name in structure:",
"struct", field->
name().c_str());
4069 (yyval.interm.fieldList)->push_back(field);
4077 (yyval.interm.fieldList) = (yyvsp[(2) - (3)].interm.fieldList);
4079 if (context->voidErrorCheck((yylsp[(1) - (3)]), (*(yyvsp[(2) - (3)].interm.fieldList))[0]->name(), (yyvsp[(1) - (3)].interm.type))) {
4082 for (
unsigned int i = 0;
i < (yyval.interm.fieldList)->
size(); ++
i) {
4086 TType* type = (*(yyval.interm.fieldList))[
i]->type();
4087 type->
setBasicType((yyvsp[(1) - (3)].interm.type).type);
4089 type->
setMatrix((yyvsp[(1) - (3)].interm.type).matrix);
4090 type->
setPrecision((yyvsp[(1) - (3)].interm.type).precision);
4094 if (context->arrayTypeErrorCheck((yylsp[(1) - (3)]), (yyvsp[(1) - (3)].interm.type)))
4097 if ((yyvsp[(1) - (3)].interm.type).array)
4098 type->
setArraySize((yyvsp[(1) - (3)].interm.type).arraySize);
4099 if ((yyvsp[(1) - (3)].interm.type).userDef)
4100 type->
setStruct((yyvsp[(1) - (3)].interm.type).userDef->getStruct());
4102 if (context->structNestingErrorCheck((yylsp[(1) - (3)]), *(*(yyval.interm.fieldList))[
i]))
4112 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
4119 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
4126 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
4130 (yyval.interm.field) =
new TField(type, (yyvsp[(1) - (1)].lex).string);
4137 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
4142 if (context->arraySizeErrorCheck((yylsp[(3) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
4146 (yyval.interm.field) =
new TField(type, (yyvsp[(1) - (4)].lex).string);
4152 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
4157 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4162 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
4167 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4172 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4177 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4182 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4187 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4192 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4197 { (yyval.interm.intermAggregate) = 0; }
4202 { context->symbolTable.push(); }
4207 { context->symbolTable.pop(); }
4213 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4214 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(
EOpSequence);
4215 (yyvsp[(3) - (5)].interm.intermAggregate)->setLine((yyloc));
4217 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4223 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4228 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4233 { context->symbolTable.push(); }
4238 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4243 { context->symbolTable.push(); }
4248 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4254 (yyval.interm.intermNode) = 0;
4261 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4262 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(
EOpSequence);
4263 (yyvsp[(2) - (3)].interm.intermAggregate)->setLine((yyloc));
4265 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4272 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc));
4279 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
4285 { (yyval.interm.intermNode) = 0; }
4290 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4296 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
4298 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yylsp[(1) - (5)]));
4305 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4306 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4313 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4314 (yyval.interm.nodePair).node2 = 0;
4321 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4322 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4331 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
4333 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
4336 if (!context->executeInitializer((yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), intermNode))
4337 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4340 (yyval.interm.intermTypedNode) = 0;
4347 { context->symbolTable.push(); ++context->loopNestingLevel; }
4353 context->symbolTable.pop();
4354 (yyval.interm.intermNode) = context->intermediate.addLoop(
ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yylsp[(1) - (6)]));
4355 --context->loopNestingLevel;
4361 { ++context->loopNestingLevel; }
4367 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
4370 (yyval.interm.intermNode) = context->intermediate.addLoop(
ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yylsp[(4) - (8)]));
4371 --context->loopNestingLevel;
4377 { context->symbolTable.push(); ++context->loopNestingLevel; }
4383 context->symbolTable.pop();
4384 (yyval.interm.intermNode) = context->intermediate.addLoop(
ELoopFor, (yyvsp[(4) - (7)].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node2), (yyvsp[(7) - (7)].interm.intermNode), (yylsp[(1) - (7)]));
4385 --context->loopNestingLevel;
4392 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4399 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4406 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4413 (yyval.interm.intermTypedNode) = 0;
4420 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4421 (yyval.interm.nodePair).node2 = 0;
4428 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4429 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4436 if (context->loopNestingLevel <= 0) {
4437 context->error((yylsp[(1) - (2)]),
"continue statement only allowed in loops",
"");
4440 (yyval.interm.intermNode) = context->intermediate.addBranch(
EOpContinue, (yylsp[(1) - (2)]));
4447 if (context->loopNestingLevel <= 0) {
4448 context->error((yylsp[(1) - (2)]),
"break statement only allowed in loops",
"");
4451 (yyval.interm.intermNode) = context->intermediate.addBranch(
EOpBreak, (yylsp[(1) - (2)]));
4458 (yyval.interm.intermNode) = context->intermediate.addBranch(
EOpReturn, (yylsp[(1) - (2)]));
4459 if (context->currentFunctionType->getBasicType() !=
EbtVoid) {
4460 context->error((yylsp[(1) - (2)]),
"non-void function must return a value",
"return");
4469 (yyval.interm.intermNode) = context->intermediate.addBranch(
EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
4470 context->functionReturnsValue =
true;
4471 if (context->currentFunctionType->getBasicType() ==
EbtVoid) {
4472 context->error((yylsp[(1) - (3)]),
"void function cannot return a value",
"return");
4474 }
else if (*(context->currentFunctionType) != (yyvsp[(2) - (3)].interm.intermTypedNode)->getType()) {
4475 context->error((yylsp[(1) - (3)]),
"function return is not matching type:",
"return");
4484 FRAG_ONLY(
"discard", (yylsp[(1) - (2)]));
4485 (yyval.interm.intermNode) = context->intermediate.addBranch(
EOpKill, (yylsp[(1) - (2)]));
4492 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4493 context->treeRoot = (yyval.interm.intermNode);
4500 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
4501 context->treeRoot = (yyval.interm.intermNode);
4508 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4515 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4522 TFunction*
function = (yyvsp[(1) - (1)].interm).
function;
4524 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName());
4528 context->error((yylsp[(1) - (1)]),
"built-in functions cannot be redefined", function->getName().c_str());
4532 TFunction* prevDec =
static_cast<TFunction*
>(context->symbolTable.find(function->getMangledName()));
4542 context->error((yylsp[(1) - (1)]),
"function already has a body", function->getName().c_str());
4550 if (function->getName() ==
"main") {
4551 if (function->getParamCount() > 0) {
4552 context->error((yylsp[(1) - (1)]),
"function cannot take any parameter(s)", function->getName().c_str());
4555 if (function->getReturnType().getBasicType() !=
EbtVoid) {
4556 context->error((yylsp[(1) - (1)]),
"", function->getReturnType().getBasicString(),
"main function cannot return a value");
4565 context->functionReturnsValue =
false;
4576 for (
size_t i = 0;
i <
function->getParamCount();
i++) {
4578 if (param.
name != 0) {
4583 if (! context->symbolTable.insert(*variable)) {
4584 context->error((yylsp[(1) - (1)]),
"redefinition", variable->
getName().c_str());
4592 paramNodes = context->intermediate.growAggregate(
4594 context->intermediate.addSymbol(variable->
getUniqueId(),
4597 (yylsp[(1) - (1)])),
4598 (yylsp[(1) - (1)]));
4600 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0,
"", *param.
type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
4603 context->intermediate.setAggregateOperator(paramNodes,
EOpParameters, (yylsp[(1) - (1)]));
4604 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
4605 context->loopNestingLevel = 0;
4614 if (context->currentFunctionType->getBasicType() !=
EbtVoid && ! context->functionReturnsValue) {
4615 context->error((yylsp[(1) - (3)]),
"function does not return a value:",
"", (yyvsp[(1) - (3)].interm).function->getName().c_str());
4619 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), (yyloc));
4620 context->intermediate.setAggregateOperator((yyval.interm.intermNode),
EOpFunction, (yylsp[(1) - (3)]));
4621 (yyval.interm.intermNode)->getAsAggregate()->
setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4622 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4626 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4627 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4629 context->symbolTable.pop();
4664 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
4684 #if ! YYERROR_VERBOSE
4685 yyerror (&yylloc, context,
YY_(
"syntax error"));
4687 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4690 char const *yymsgp =
YY_(
"syntax error");
4691 int yysyntax_error_status;
4692 yysyntax_error_status = YYSYNTAX_ERROR;
4693 if (yysyntax_error_status == 0)
4695 else if (yysyntax_error_status == 1)
4697 if (yymsg != yymsgbuf)
4703 yymsg_alloc =
sizeof yymsgbuf;
4704 yysyntax_error_status = 2;
4708 yysyntax_error_status = YYSYNTAX_ERROR;
4712 yyerror (&yylloc, context, yymsgp);
4713 if (yysyntax_error_status == 2)
4714 goto yyexhaustedlab;
4716 # undef YYSYNTAX_ERROR
4720 yyerror_range[1] =
yylloc;
4722 if (yyerrstatus == 3)
4727 if (yychar <=
YYEOF)
4730 if (yychar ==
YYEOF)
4736 yytoken, &
yylval, &yylloc, context);
4757 yyerror_range[1] = yylsp[1-
yylen];
4791 yyerror_range[1] = *
yylsp;
4793 yystos[yystate], yyvsp, yylsp, context);
4803 yyerror_range[2] =
yylloc;
4830 #if !defined yyoverflow || YYERROR_VERBOSE
4847 yytoken, &
yylval, &yylloc, context);
4853 while (yyssp != yyss)
4856 yystos[*yyssp], yyvsp, yylsp, context);
4864 if (yymsg != yymsgbuf)
4868 return YYID (yyresult);
4876 context->
error(*yylloc, reason,
"");
#define YY_REDUCE_PRINT(Rule)
void error(const TSourceLoc &loc, const char *reason, const char *token, const char *extraInfo="")
static const yytype_int16 yytable[]
void setPrecision(TPrecision p)
void setNominalSize(int s)
const TType & getReturnType() const
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
void * yyalloc(yy_size_t, yyscan_t yyscanner)
void setName(const TString &n)
#define YY_STACK_PRINT(Bottom, Top)
static const yytype_uint8 yyr2[]
void setType(const TType &t)
#define YYSTACK_ALLOC_MAXIMUM
TString getCompleteString() const
static const yytype_uint8 yytranslate[]
#define yytable_value_is_error(Yytable_value)
int glslang_parse(TParseContext *context)
#define YY_LOCATION_PRINT(File, Loc)
EGLImageKHR EGLint * name
const TString & name() const
void setBasicType(TBasicType t)
yydestruct("Cleanup: discarding lookahead", yytoken,&yylval,&yylloc, context)
#define YY_INITIAL_VALUE(Value)
static const yytype_uint8 yyr1[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_uint8 yydefact[]
virtual bool isVariable() const
unsigned short int yytype_uint16
static void const char * yymsg
size_t getParamCount() const
const TString & getName() const
#define VERTEX_ONLY(S, L)
TQualifier getQualifier() const
const char * getBasicString(TBasicType t)
TString * NewPoolTString(const char *s)
static YYLTYPE yyloc_default
void setStruct(TStructure *s)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
const TParameter & getParam(size_t i) const
std::basic_string< char, std::char_traits< char >, TStringAllocator > TString
const TString & getExtension() const
virtual bool isFunction() const
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
static const yytype_int16 yypact[]
const TString & getMangledName() const
static const yytype_uint8 yystos[]
static void yyerror(YYLTYPE *yylloc, TParseContext *context, const char *reason)
unsigned char yytype_uint8
static const yytype_int16 yypgoto[]
GLsizei const GLcharARB ** string
const char * getQualifierString(TQualifier q)
static const yytype_int16 yydefgoto[]
#define yypact_value_is_default(Yystate)
GLdouble GLdouble GLdouble b
YYLTYPE yylsa[YYINITDEPTH]
yytype_int16 yyssa[YYINITDEPTH]
#define YYLLOC_DEFAULT(Current, Rhs, N)
GLenum GLint GLint * precision
ConstantUnion * getConstPointer()
YYSTYPE yyvsa[YYINITDEPTH]
static YYSTYPE yyval_default
static const yytype_int16 yycheck[]
TOperator getBuiltInOp() const
TFieldList * NewPoolTFieldList()