| /* A Bison parser, made by GNU Bison 3.0.4. */ | |
| /* Bison implementation for Yacc-like parsers in C | |
| Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. | |
| This program is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation, either version 3 of the License, or | |
| (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | |
| You should have received a copy of the GNU General Public License | |
| along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
| /* As a special exception, you may create a larger work that contains | |
| part or all of the Bison parser skeleton and distribute that work | |
| under terms of your choice, so long as that work isn't itself a | |
| parser generator using the skeleton or a modified version thereof | |
| as a parser skeleton. Alternatively, if you modify or redistribute | |
| the parser skeleton itself, you may (at your option) remove this | |
| special exception, which will cause the skeleton and the resulting | |
| Bison output files to be licensed under the GNU General Public | |
| License without this special exception. | |
| This special exception was added by the Free Software Foundation in | |
| version 2.2 of Bison. */ | |
| /* C LALR(1) parser skeleton written by Richard Stallman, by | |
| simplifying the original so-called "semantic" parser. */ | |
| /* All symbols defined below should begin with yy or YY, to avoid | |
| infringing on user name space. This should be done even for local | |
| variables, as they might otherwise be expanded by user macros. | |
| There are some unavoidable exceptions within include files to | |
| define necessary library symbols; they are noted "INFRINGES ON | |
| USER NAME SPACE" below. */ | |
| /* Identify Bison output. */ | |
| #define YYBISON 1 | |
| /* Bison version. */ | |
| #define YYBISON_VERSION "3.0.4" | |
| /* Skeleton name. */ | |
| #define YYSKELETON_NAME "yacc.c" | |
| /* Pure parsers. */ | |
| #define YYPURE 2 | |
| /* Push parsers. */ | |
| #define YYPUSH 0 | |
| /* Pull parsers. */ | |
| #define YYPULL 1 | |
| /* Copy the first part of user declarations. */ | |
| // | |
| // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| // | |
| // This file is auto-generated by generate_parser.sh. DO NOT EDIT! | |
| // clang-format off | |
| // Ignore errors in auto-generated code. | |
| #if defined(__GNUC__) | |
| #pragma GCC diagnostic ignored "-Wunused-function" | |
| #pragma GCC diagnostic ignored "-Wunused-variable" | |
| #pragma GCC diagnostic ignored "-Wswitch-enum" | |
| #elif defined(_MSC_VER) | |
| #pragma warning(disable: 4065) | |
| #pragma warning(disable: 4189) | |
| #pragma warning(disable: 4244) | |
| #pragma warning(disable: 4505) | |
| #pragma warning(disable: 4701) | |
| #pragma warning(disable: 4702) | |
| #endif | |
| #include "angle_gl.h" | |
| #include "compiler/translator/Cache.h" | |
| #include "compiler/translator/SymbolTable.h" | |
| #include "compiler/translator/ParseContext.h" | |
| #include "GLSLANG/ShaderLang.h" | |
| #define YYENABLE_NLS 0 | |
| using namespace sh; | |
| # ifndef YY_NULLPTR | |
| # if defined __cplusplus && 201103L <= __cplusplus | |
| # define YY_NULLPTR nullptr | |
| # else | |
| # define YY_NULLPTR 0 | |
| # endif | |
| # endif | |
| /* Enabling verbose error messages. */ | |
| #ifdef YYERROR_VERBOSE | |
| # undef YYERROR_VERBOSE | |
| # define YYERROR_VERBOSE 1 | |
| #else | |
| # define YYERROR_VERBOSE 0 | |
| #endif | |
| /* In a future release of Bison, this section will be replaced | |
| by #include "glslang_tab.h". */ | |
| #ifndef YY_YY_GLSLANG_TAB_H_INCLUDED | |
| # define YY_YY_GLSLANG_TAB_H_INCLUDED | |
| /* Debug traces. */ | |
| #ifndef YYDEBUG | |
| # define YYDEBUG 0 | |
| #endif | |
| #if YYDEBUG | |
| extern int yydebug; | |
| #endif | |
| /* "%code requires" blocks. */ | |
| #define YYLTYPE TSourceLoc | |
| #define YYLTYPE_IS_DECLARED 1 | |
| /* Token type. */ | |
| #ifndef YYTOKENTYPE | |
| # define YYTOKENTYPE | |
| enum yytokentype | |
| { | |
| INVARIANT = 258, | |
| HIGH_PRECISION = 259, | |
| MEDIUM_PRECISION = 260, | |
| LOW_PRECISION = 261, | |
| PRECISION = 262, | |
| ATTRIBUTE = 263, | |
| CONST_QUAL = 264, | |
| BOOL_TYPE = 265, | |
| FLOAT_TYPE = 266, | |
| INT_TYPE = 267, | |
| UINT_TYPE = 268, | |
| BREAK = 269, | |
| CONTINUE = 270, | |
| DO = 271, | |
| ELSE = 272, | |
| FOR = 273, | |
| IF = 274, | |
| DISCARD = 275, | |
| RETURN = 276, | |
| SWITCH = 277, | |
| CASE = 278, | |
| DEFAULT = 279, | |
| BVEC2 = 280, | |
| BVEC3 = 281, | |
| BVEC4 = 282, | |
| IVEC2 = 283, | |
| IVEC3 = 284, | |
| IVEC4 = 285, | |
| VEC2 = 286, | |
| VEC3 = 287, | |
| VEC4 = 288, | |
| UVEC2 = 289, | |
| UVEC3 = 290, | |
| UVEC4 = 291, | |
| MATRIX2 = 292, | |
| MATRIX3 = 293, | |
| MATRIX4 = 294, | |
| IN_QUAL = 295, | |
| OUT_QUAL = 296, | |
| INOUT_QUAL = 297, | |
| UNIFORM = 298, | |
| VARYING = 299, | |
| MATRIX2x3 = 300, | |
| MATRIX3x2 = 301, | |
| MATRIX2x4 = 302, | |
| MATRIX4x2 = 303, | |
| MATRIX3x4 = 304, | |
| MATRIX4x3 = 305, | |
| CENTROID = 306, | |
| FLAT = 307, | |
| SMOOTH = 308, | |
| READONLY = 309, | |
| WRITEONLY = 310, | |
| COHERENT = 311, | |
| RESTRICT = 312, | |
| VOLATILE = 313, | |
| SHARED = 314, | |
| STRUCT = 315, | |
| VOID_TYPE = 316, | |
| WHILE = 317, | |
| SAMPLER2D = 318, | |
| SAMPLERCUBE = 319, | |
| SAMPLER_EXTERNAL_OES = 320, | |
| SAMPLER2DRECT = 321, | |
| SAMPLER2DARRAY = 322, | |
| ISAMPLER2D = 323, | |
| ISAMPLER3D = 324, | |
| ISAMPLERCUBE = 325, | |
| ISAMPLER2DARRAY = 326, | |
| USAMPLER2D = 327, | |
| USAMPLER3D = 328, | |
| USAMPLERCUBE = 329, | |
| USAMPLER2DARRAY = 330, | |
| SAMPLER3D = 331, | |
| SAMPLER3DRECT = 332, | |
| SAMPLER2DSHADOW = 333, | |
| SAMPLERCUBESHADOW = 334, | |
| SAMPLER2DARRAYSHADOW = 335, | |
| IMAGE2D = 336, | |
| IIMAGE2D = 337, | |
| UIMAGE2D = 338, | |
| IMAGE3D = 339, | |
| IIMAGE3D = 340, | |
| UIMAGE3D = 341, | |
| IMAGE2DARRAY = 342, | |
| IIMAGE2DARRAY = 343, | |
| UIMAGE2DARRAY = 344, | |
| IMAGECUBE = 345, | |
| IIMAGECUBE = 346, | |
| UIMAGECUBE = 347, | |
| LAYOUT = 348, | |
| IDENTIFIER = 349, | |
| TYPE_NAME = 350, | |
| FLOATCONSTANT = 351, | |
| INTCONSTANT = 352, | |
| UINTCONSTANT = 353, | |
| BOOLCONSTANT = 354, | |
| FIELD_SELECTION = 355, | |
| LEFT_OP = 356, | |
| RIGHT_OP = 357, | |
| INC_OP = 358, | |
| DEC_OP = 359, | |
| LE_OP = 360, | |
| GE_OP = 361, | |
| EQ_OP = 362, | |
| NE_OP = 363, | |
| AND_OP = 364, | |
| OR_OP = 365, | |
| XOR_OP = 366, | |
| MUL_ASSIGN = 367, | |
| DIV_ASSIGN = 368, | |
| ADD_ASSIGN = 369, | |
| MOD_ASSIGN = 370, | |
| LEFT_ASSIGN = 371, | |
| RIGHT_ASSIGN = 372, | |
| AND_ASSIGN = 373, | |
| XOR_ASSIGN = 374, | |
| OR_ASSIGN = 375, | |
| SUB_ASSIGN = 376, | |
| LEFT_PAREN = 377, | |
| RIGHT_PAREN = 378, | |
| LEFT_BRACKET = 379, | |
| RIGHT_BRACKET = 380, | |
| LEFT_BRACE = 381, | |
| RIGHT_BRACE = 382, | |
| DOT = 383, | |
| COMMA = 384, | |
| COLON = 385, | |
| EQUAL = 386, | |
| SEMICOLON = 387, | |
| BANG = 388, | |
| DASH = 389, | |
| TILDE = 390, | |
| PLUS = 391, | |
| STAR = 392, | |
| SLASH = 393, | |
| PERCENT = 394, | |
| LEFT_ANGLE = 395, | |
| RIGHT_ANGLE = 396, | |
| VERTICAL_BAR = 397, | |
| CARET = 398, | |
| AMPERSAND = 399, | |
| QUESTION = 400 | |
| }; | |
| #endif | |
| /* Value type. */ | |
| #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | |
| union YYSTYPE | |
| { | |
| struct { | |
| union { | |
| TString *string; | |
| float f; | |
| int i; | |
| unsigned int u; | |
| bool b; | |
| }; | |
| TSymbol* symbol; | |
| } lex; | |
| struct { | |
| TOperator op; | |
| union { | |
| TIntermNode *intermNode; | |
| TIntermNodePair nodePair; | |
| TIntermTyped *intermTypedNode; | |
| TIntermAggregate *intermAggregate; | |
| TIntermBlock *intermBlock; | |
| TIntermDeclaration *intermDeclaration; | |
| TIntermSwitch *intermSwitch; | |
| TIntermCase *intermCase; | |
| }; | |
| union { | |
| TTypeSpecifierNonArray typeSpecifierNonArray; | |
| TPublicType type; | |
| TPrecision precision; | |
| TLayoutQualifier layoutQualifier; | |
| TQualifier qualifier; | |
| TFunction *function; | |
| TParameter param; | |
| TField *field; | |
| TFieldList *fieldList; | |
| TQualifierWrapperBase *qualifierWrapper; | |
| TTypeQualifierBuilder *typeQualifierBuilder; | |
| }; | |
| } interm; | |
| }; | |
| typedef union YYSTYPE YYSTYPE; | |
| # define YYSTYPE_IS_TRIVIAL 1 | |
| # define YYSTYPE_IS_DECLARED 1 | |
| #endif | |
| /* Location type. */ | |
| #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED | |
| typedef struct YYLTYPE YYLTYPE; | |
| struct YYLTYPE | |
| { | |
| int first_line; | |
| int first_column; | |
| int last_line; | |
| int last_column; | |
| }; | |
| # define YYLTYPE_IS_DECLARED 1 | |
| # define YYLTYPE_IS_TRIVIAL 1 | |
| #endif | |
| int yyparse (TParseContext* context, void *scanner); | |
| #endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */ | |
| /* Copy the second part of user declarations. */ | |
| extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); | |
| extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, const char* reason); | |
| #define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
| do { \ | |
| if (N) { \ | |
| (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \ | |
| (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ | |
| (Current).last_file = YYRHSLOC(Rhs, N).last_file; \ | |
| (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ | |
| } \ | |
| else { \ | |
| (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \ | |
| (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \ | |
| (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \ | |
| (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ | |
| } \ | |
| } while (0) | |
| #define VERTEX_ONLY(S, L) { \ | |
| if (context->getShaderType() != GL_VERTEX_SHADER) { \ | |
| context->error(L, " supported in vertex shaders only ", S); \ | |
| } \ | |
| } | |
| #define FRAG_ONLY(S, L) { \ | |
| if (context->getShaderType() != GL_FRAGMENT_SHADER) { \ | |
| context->error(L, " supported in fragment shaders only ", S); \ | |
| } \ | |
| } | |
| #define COMPUTE_ONLY(S, L) { \ | |
| if (context->getShaderType() != GL_COMPUTE_SHADER) { \ | |
| context->error(L, " supported in compute shaders only ", S); \ | |
| } \ | |
| } | |
| #define NON_COMPUTE_ONLY(S, L) { \ | |
| if (context->getShaderType() != GL_VERTEX_SHADER && context->getShaderType() != GL_FRAGMENT_SHADER) { \ | |
| context->error(L, " supported in vertex and fragment shaders only ", S); \ | |
| } \ | |
| } | |
| #define ES2_ONLY(S, L) { \ | |
| if (context->getShaderVersion() != 100) { \ | |
| context->error(L, " supported in GLSL ES 1.00 only ", S); \ | |
| } \ | |
| } | |
| #define ES3_OR_NEWER(TOKEN, LINE, REASON) { \ | |
| if (context->getShaderVersion() < 300) { \ | |
| context->error(LINE, REASON " supported in GLSL ES 3.00 and above only ", TOKEN); \ | |
| } \ | |
| } | |
| #define ES3_1_ONLY(TOKEN, LINE, REASON) { \ | |
| if (context->getShaderVersion() != 310) { \ | |
| context->error(LINE, REASON " supported in GLSL ES 3.10 only ", TOKEN); \ | |
| } \ | |
| } | |
| #ifdef short | |
| # undef short | |
| #endif | |
| #ifdef YYTYPE_UINT8 | |
| typedef YYTYPE_UINT8 yytype_uint8; | |
| #else | |
| typedef unsigned char yytype_uint8; | |
| #endif | |
| #ifdef YYTYPE_INT8 | |
| typedef YYTYPE_INT8 yytype_int8; | |
| #else | |
| typedef signed char yytype_int8; | |
| #endif | |
| #ifdef YYTYPE_UINT16 | |
| typedef YYTYPE_UINT16 yytype_uint16; | |
| #else | |
| typedef unsigned short int yytype_uint16; | |
| #endif | |
| #ifdef YYTYPE_INT16 | |
| typedef YYTYPE_INT16 yytype_int16; | |
| #else | |
| typedef short int yytype_int16; | |
| #endif | |
| #ifndef YYSIZE_T | |
| # ifdef __SIZE_TYPE__ | |
| # define YYSIZE_T __SIZE_TYPE__ | |
| # elif defined size_t | |
| # define YYSIZE_T size_t | |
| # elif ! defined YYSIZE_T | |
| # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
| # define YYSIZE_T size_t | |
| # else | |
| # define YYSIZE_T unsigned int | |
| # endif | |
| #endif | |
| #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) | |
| #ifndef YY_ | |
| # if defined YYENABLE_NLS && YYENABLE_NLS | |
| # if ENABLE_NLS | |
| # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | |
| # define YY_(Msgid) dgettext ("bison-runtime", Msgid) | |
| # endif | |
| # endif | |
| # ifndef YY_ | |
| # define YY_(Msgid) Msgid | |
| # endif | |
| #endif | |
| #ifndef YY_ATTRIBUTE | |
| # if (defined __GNUC__ \ | |
| && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ | |
| || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C | |
| # define YY_ATTRIBUTE(Spec) __attribute__(Spec) | |
| # else | |
| # define YY_ATTRIBUTE(Spec) /* empty */ | |
| # endif | |
| #endif | |
| #ifndef YY_ATTRIBUTE_PURE | |
| # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) | |
| #endif | |
| #ifndef YY_ATTRIBUTE_UNUSED | |
| # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) | |
| #endif | |
| #if !defined _Noreturn \ | |
| && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) | |
| # if defined _MSC_VER && 1200 <= _MSC_VER | |
| # define _Noreturn __declspec (noreturn) | |
| # else | |
| # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) | |
| # endif | |
| #endif | |
| /* Suppress unused-variable warnings by "using" E. */ | |
| #if ! defined lint || defined __GNUC__ | |
| # define YYUSE(E) ((void) (E)) | |
| #else | |
| # define YYUSE(E) /* empty */ | |
| #endif | |
| #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ | |
| /* Suppress an incorrect diagnostic about yylval being uninitialized. */ | |
| # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ | |
| _Pragma ("GCC diagnostic push") \ | |
| _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ | |
| _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | |
| # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ | |
| _Pragma ("GCC diagnostic pop") | |
| #else | |
| # define YY_INITIAL_VALUE(Value) Value | |
| #endif | |
| #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN | |
| # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN | |
| # define YY_IGNORE_MAYBE_UNINITIALIZED_END | |
| #endif | |
| #ifndef YY_INITIAL_VALUE | |
| # define YY_INITIAL_VALUE(Value) /* Nothing. */ | |
| #endif | |
| #if ! defined yyoverflow || YYERROR_VERBOSE | |
| /* The parser invokes alloca or malloc; define the necessary symbols. */ | |
| # ifdef YYSTACK_USE_ALLOCA | |
| # if YYSTACK_USE_ALLOCA | |
| # ifdef __GNUC__ | |
| # define YYSTACK_ALLOC __builtin_alloca | |
| # elif defined __BUILTIN_VA_ARG_INCR | |
| # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | |
| # elif defined _AIX | |
| # define YYSTACK_ALLOC __alloca | |
| # elif defined _MSC_VER | |
| # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ | |
| # define alloca _alloca | |
| # else | |
| # define YYSTACK_ALLOC alloca | |
| # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS | |
| # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
| /* Use EXIT_SUCCESS as a witness for stdlib.h. */ | |
| # ifndef EXIT_SUCCESS | |
| # define EXIT_SUCCESS 0 | |
| # endif | |
| # endif | |
| # endif | |
| # endif | |
| # endif | |
| # ifdef YYSTACK_ALLOC | |
| /* Pacify GCC's 'empty if-body' warning. */ | |
| # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) | |
| # ifndef YYSTACK_ALLOC_MAXIMUM | |
| /* The OS might guarantee only one guard page at the bottom of the stack, | |
| and a page size can be as small as 4096 bytes. So we cannot safely | |
| invoke alloca (N) if N exceeds 4096. Use a slightly smaller number | |
| to allow for a few compiler-allocated temporary stack slots. */ | |
| # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ | |
| # endif | |
| # else | |
| # define YYSTACK_ALLOC YYMALLOC | |
| # define YYSTACK_FREE YYFREE | |
| # ifndef YYSTACK_ALLOC_MAXIMUM | |
| # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | |
| # endif | |
| # if (defined __cplusplus && ! defined EXIT_SUCCESS \ | |
| && ! ((defined YYMALLOC || defined malloc) \ | |
| && (defined YYFREE || defined free))) | |
| # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
| # ifndef EXIT_SUCCESS | |
| # define EXIT_SUCCESS 0 | |
| # endif | |
| # endif | |
| # ifndef YYMALLOC | |
| # define YYMALLOC malloc | |
| # if ! defined malloc && ! defined EXIT_SUCCESS | |
| void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | |
| # endif | |
| # endif | |
| # ifndef YYFREE | |
| # define YYFREE free | |
| # if ! defined free && ! defined EXIT_SUCCESS | |
| void free (void *); /* INFRINGES ON USER NAME SPACE */ | |
| # endif | |
| # endif | |
| # endif | |
| #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ | |
| #if (! defined yyoverflow \ | |
| && (! defined __cplusplus \ | |
| || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ | |
| && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | |
| /* A type that is properly aligned for any stack member. */ | |
| union yyalloc | |
| { | |
| yytype_int16 yyss_alloc; | |
| YYSTYPE yyvs_alloc; | |
| YYLTYPE yyls_alloc; | |
| }; | |
| /* The size of the maximum gap between one aligned stack and the next. */ | |
| # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | |
| /* The size of an array large to enough to hold all stacks, each with | |
| N elements. */ | |
| # define YYSTACK_BYTES(N) \ | |
| ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ | |
| + 2 * YYSTACK_GAP_MAXIMUM) | |
| # define YYCOPY_NEEDED 1 | |
| /* Relocate STACK from its old location to the new one. The | |
| local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
| elements in the stack, and YYPTR gives the new location of the | |
| stack. Advance YYPTR to a properly aligned location for the next | |
| stack. */ | |
| # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ | |
| do \ | |
| { \ | |
| YYSIZE_T yynewbytes; \ | |
| YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ | |
| Stack = &yyptr->Stack_alloc; \ | |
| yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | |
| yyptr += yynewbytes / sizeof (*yyptr); \ | |
| } \ | |
| while (0) | |
| #endif | |
| #if defined YYCOPY_NEEDED && YYCOPY_NEEDED | |
| /* Copy COUNT objects from SRC to DST. The source and destination do | |
| not overlap. */ | |
| # ifndef YYCOPY | |
| # if defined __GNUC__ && 1 < __GNUC__ | |
| # define YYCOPY(Dst, Src, Count) \ | |
| __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) | |
| # else | |
| # define YYCOPY(Dst, Src, Count) \ | |
| do \ | |
| { \ | |
| YYSIZE_T yyi; \ | |
| for (yyi = 0; yyi < (Count); yyi++) \ | |
| (Dst)[yyi] = (Src)[yyi]; \ | |
| } \ | |
| while (0) | |
| # endif | |
| # endif | |
| #endif /* !YYCOPY_NEEDED */ | |
| /* YYFINAL -- State number of the termination state. */ | |
| #define YYFINAL 127 | |
| /* YYLAST -- Last index in YYTABLE. */ | |
| #define YYLAST 2847 | |
| /* YYNTOKENS -- Number of terminals. */ | |
| #define YYNTOKENS 146 | |
| /* YYNNTS -- Number of nonterminals. */ | |
| #define YYNNTS 94 | |
| /* YYNRULES -- Number of rules. */ | |
| #define YYNRULES 288 | |
| /* YYNSTATES -- Number of states. */ | |
| #define YYNSTATES 424 | |
| /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned | |
| by yylex, with out-of-bounds checking. */ | |
| #define YYUNDEFTOK 2 | |
| #define YYMAXUTOK 400 | |
| #define YYTRANSLATE(YYX) \ | |
| ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | |
| /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM | |
| as returned by yylex, without out-of-bounds checking. */ | |
| static const yytype_uint8 yytranslate[] = | |
| { | |
| 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
| 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | |
| 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
| 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
| 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
| 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | |
| 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, | |
| 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | |
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, | |
| 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, | |
| 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, | |
| 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, | |
| 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, | |
| 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, | |
| 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, | |
| 145 | |
| }; | |
| #if YYDEBUG | |
| /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ | |
| static const yytype_uint16 yyrline[] = | |
| { | |
| 0, 243, 243, 244, 247, 257, 260, 265, 270, 275, | |
| 280, 286, 289, 292, 295, 298, 301, 307, 314, 325, | |
| 329, 337, 340, 346, 350, 357, 363, 372, 380, 386, | |
| 392, 401, 404, 407, 410, 420, 421, 422, 423, 431, | |
| 432, 435, 438, 445, 446, 449, 455, 456, 460, 467, | |
| 468, 471, 474, 477, 483, 484, 487, 493, 494, 501, | |
| 502, 509, 510, 517, 518, 524, 525, 531, 532, 538, | |
| 539, 545, 546, 553, 554, 555, 556, 560, 561, 562, | |
| 566, 570, 574, 578, 585, 588, 594, 601, 608, 611, | |
| 614, 623, 627, 631, 635, 639, 646, 653, 656, 663, | |
| 671, 691, 701, 709, 734, 738, 742, 746, 753, 760, | |
| 763, 767, 771, 776, 781, 788, 792, 796, 800, 805, | |
| 810, 817, 821, 827, 830, 836, 840, 847, 853, 857, | |
| 861, 864, 867, 876, 882, 890, 893, 913, 932, 939, | |
| 943, 947, 950, 953, 956, 959, 962, 970, 977, 980, | |
| 983, 989, 996, 999, 1005, 1008, 1011, 1014, 1020, 1023, | |
| 1028, 1039, 1042, 1045, 1048, 1051, 1054, 1058, 1062, 1066, | |
| 1070, 1074, 1078, 1082, 1086, 1090, 1094, 1098, 1102, 1106, | |
| 1110, 1114, 1118, 1122, 1126, 1130, 1134, 1138, 1141, 1144, | |
| 1147, 1150, 1153, 1156, 1159, 1162, 1165, 1168, 1171, 1174, | |
| 1177, 1180, 1183, 1190, 1196, 1199, 1202, 1205, 1208, 1211, | |
| 1214, 1217, 1220, 1223, 1226, 1229, 1232, 1235, 1247, 1247, | |
| 1250, 1250, 1256, 1259, 1274, 1277, 1284, 1288, 1294, 1300, | |
| 1312, 1316, 1320, 1321, 1327, 1328, 1329, 1330, 1331, 1332, | |
| 1333, 1337, 1338, 1338, 1338, 1347, 1348, 1352, 1352, 1353, | |
| 1353, 1358, 1361, 1370, 1375, 1382, 1383, 1387, 1394, 1398, | |
| 1405, 1405, 1412, 1415, 1422, 1426, 1439, 1439, 1444, 1444, | |
| 1450, 1450, 1458, 1461, 1467, 1470, 1476, 1480, 1487, 1490, | |
| 1493, 1496, 1499, 1508, 1514, 1520, 1523, 1529, 1529 | |
| }; | |
| #endif | |
| #if YYDEBUG || YYERROR_VERBOSE || 0 | |
| /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | |
| First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | |
| static const char *const yytname[] = | |
| { | |
| "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION", | |
| "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE", | |
| "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE", | |
| "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", | |
| "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", | |
| "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2", | |
| "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", | |
| "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2", | |
| "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "READONLY", | |
| "WRITEONLY", "COHERENT", "RESTRICT", "VOLATILE", "SHARED", "STRUCT", | |
| "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES", | |
| "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D", | |
| "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D", | |
| "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT", | |
| "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", | |
| "IMAGE2D", "IIMAGE2D", "UIMAGE2D", "IMAGE3D", "IIMAGE3D", "UIMAGE3D", | |
| "IMAGE2DARRAY", "IIMAGE2DARRAY", "UIMAGE2DARRAY", "IMAGECUBE", | |
| "IIMAGECUBE", "UIMAGECUBE", "LAYOUT", "IDENTIFIER", "TYPE_NAME", | |
| "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", | |
| "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", | |
| "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", | |
| "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", | |
| "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", | |
| "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", | |
| "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", | |
| "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", | |
| "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION", | |
| "$accept", "identifier", "variable_identifier", "primary_expression", | |
| "postfix_expression", "integer_expression", "function_call", | |
| "function_call_or_method", "function_call_generic", | |
| "function_call_header_no_parameters", | |
| "function_call_header_with_parameters", "function_call_header", | |
| "function_identifier", "unary_expression", "unary_operator", | |
| "multiplicative_expression", "additive_expression", "shift_expression", | |
| "relational_expression", "equality_expression", "and_expression", | |
| "exclusive_or_expression", "inclusive_or_expression", | |
| "logical_and_expression", "logical_xor_expression", | |
| "logical_or_expression", "conditional_expression", | |
| "assignment_expression", "assignment_operator", "expression", | |
| "constant_expression", "enter_struct", "declaration", | |
| "function_prototype", "function_declarator", | |
| "function_header_with_parameters", "function_header", | |
| "parameter_declarator", "parameter_declaration", | |
| "parameter_type_specifier", "init_declarator_list", "single_declaration", | |
| "fully_specified_type", "interpolation_qualifier", "type_qualifier", | |
| "invariant_qualifier", "single_type_qualifier", "storage_qualifier", | |
| "type_specifier", "precision_qualifier", "layout_qualifier", | |
| "layout_qualifier_id_list", "layout_qualifier_id", | |
| "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", | |
| "$@1", "$@2", "struct_declaration_list", "struct_declaration", | |
| "struct_declarator_list", "struct_declarator", "initializer", | |
| "declaration_statement", "statement", "simple_statement", | |
| "compound_statement", "$@3", "$@4", "statement_no_new_scope", | |
| "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope", | |
| "statement_list", "expression_statement", "selection_statement", | |
| "selection_rest_statement", "switch_statement", "$@7", "case_label", | |
| "condition", "iteration_statement", "$@8", "$@9", "$@10", | |
| "for_init_statement", "conditionopt", "for_rest_statement", | |
| "jump_statement", "translation_unit", "external_declaration", | |
| "function_definition", "$@11", YY_NULLPTR | |
| }; | |
| #endif | |
| # ifdef YYPRINT | |
| /* YYTOKNUM[NUM] -- (External) token number corresponding to the | |
| (internal) symbol number NUM (which must be that of a token). */ | |
| static const yytype_uint16 yytoknum[] = | |
| { | |
| 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | |
| 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | |
| 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | |
| 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | |
| 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | |
| 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, | |
| 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, | |
| 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, | |
| 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, | |
| 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, | |
| 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, | |
| 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, | |
| 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, | |
| 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, | |
| 395, 396, 397, 398, 399, 400 | |
| }; | |
| # endif | |
| #define YYPACT_NINF -359 | |
| #define yypact_value_is_default(Yystate) \ | |
| (!!((Yystate) == (-359))) | |
| #define YYTABLE_NINF -248 | |
| #define yytable_value_is_error(Yytable_value) \ | |
| 0 | |
| /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | |
| STATE-NUM. */ | |
| static const yytype_int16 yypact[] = | |
| { | |
| 2487, -359, -359, -359, -359, 148, -359, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -74, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, -78, -359, | |
| -359, -101, -37, -38, 2580, -100, -359, 30, -359, 1308, | |
| -359, -359, -359, -359, -359, -359, -359, -31, -359, 2394, | |
| -359, -359, 2752, -359, -359, -359, -19, -43, -359, 5, | |
| -359, 2580, -359, -359, -359, 2580, 44, 44, -359, -27, | |
| -98, -66, -359, 2580, -359, -359, 1396, -359, -359, 13, | |
| 2580, -359, -359, 16, -42, -359, 408, -359, -359, -359, | |
| -359, 10, -84, -359, 1512, 1857, -359, -359, 2580, 44, | |
| 2085, -359, 7, -359, -359, -359, -359, -359, 1857, 1857, | |
| 1857, -359, -359, -359, -359, -359, -359, -359, -45, -359, | |
| -359, -359, 26, -41, 1970, 47, -359, 1857, 18, -56, | |
| 41, -68, 51, 28, 32, 34, 71, 70, -88, -359, | |
| 58, -359, -359, 2188, 2580, 65, -359, -43, 52, 53, | |
| -359, 64, 67, 55, 1628, 69, 1857, 62, 73, 74, | |
| -359, -359, 98, -359, -359, -86, -359, -101, 75, -359, | |
| -359, -359, -359, 542, -359, -359, -359, -359, -359, -359, | |
| 1857, 1741, 1857, 72, 77, -359, -359, 44, 76, -26, | |
| -359, -76, -359, -359, -359, -33, -359, -359, 1857, 2666, | |
| -359, -359, 1857, 82, -359, -359, -359, 1857, 1857, 1857, | |
| 1857, 1857, 1857, 1857, 1857, 1857, 1857, 1857, 1857, 1857, | |
| 1857, 1857, 1857, 1857, 1857, 1857, 1857, -359, -359, 2291, | |
| -359, -359, -359, -359, -359, 80, -359, 1857, -359, -359, | |
| -24, 1857, 66, -359, -359, -359, 676, -359, -359, -359, | |
| -359, -359, -359, -359, -359, -359, -359, -359, 1857, 1857, | |
| -359, -359, -359, 84, 89, 96, -359, 1857, 91, 3, | |
| 1857, 44, -359, -97, -359, -359, 99, 97, -359, 103, | |
| -359, -359, -359, -359, -359, 18, 18, -56, -56, 41, | |
| 41, 41, 41, -68, -68, 51, 28, 32, 34, 71, | |
| 70, 35, -359, 165, 5, 944, 1078, -25, -359, -3, | |
| -359, 1193, 676, -359, -359, -359, 1857, 104, -359, 1857, | |
| -359, 105, -359, 1857, -359, -359, 1857, 114, -359, -359, | |
| -359, -359, 1193, 80, -359, 97, 44, 2580, 115, 110, | |
| -359, 1857, -359, -359, 119, -359, 1857, -359, 107, 117, | |
| 228, -359, 120, 116, 810, -359, -359, 118, -2, 1857, | |
| 810, 80, -359, 1857, -359, -359, -359, -359, 121, 97, | |
| -359, -359, -359, -359 | |
| }; | |
| /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. | |
| Performed when YYTABLE does not specify something else to do. Zero | |
| means the default is an error. */ | |
| static const yytype_uint16 yydefact[] = | |
| { | |
| 0, 127, 148, 149, 150, 0, 133, 135, 165, 162, | |
| 163, 164, 169, 170, 171, 172, 173, 174, 166, 167, | |
| 168, 175, 176, 177, 178, 179, 180, 136, 137, 138, | |
| 140, 134, 181, 182, 183, 184, 185, 186, 139, 124, | |
| 123, 141, 142, 143, 144, 145, 146, 0, 161, 187, | |
| 189, 202, 203, 190, 191, 192, 193, 194, 195, 196, | |
| 197, 198, 188, 199, 200, 201, 205, 206, 207, 208, | |
| 209, 210, 211, 212, 213, 214, 215, 216, 0, 217, | |
| 286, 287, 0, 98, 97, 0, 109, 115, 131, 0, | |
| 132, 125, 128, 121, 130, 129, 147, 158, 204, 0, | |
| 283, 285, 0, 2, 3, 220, 0, 0, 88, 0, | |
| 96, 0, 105, 99, 107, 0, 108, 0, 89, 2, | |
| 116, 0, 94, 0, 126, 122, 0, 1, 284, 0, | |
| 0, 218, 157, 154, 0, 152, 0, 288, 100, 104, | |
| 106, 102, 110, 101, 0, 0, 87, 95, 0, 0, | |
| 0, 222, 4, 8, 6, 7, 9, 30, 0, 0, | |
| 0, 159, 37, 36, 38, 35, 5, 11, 31, 13, | |
| 18, 19, 0, 0, 24, 0, 39, 0, 43, 46, | |
| 49, 54, 57, 59, 61, 63, 65, 67, 69, 86, | |
| 0, 28, 90, 0, 0, 0, 151, 0, 0, 0, | |
| 268, 0, 0, 0, 0, 0, 0, 0, 0, 242, | |
| 251, 255, 39, 71, 84, 0, 231, 0, 147, 234, | |
| 253, 233, 232, 0, 235, 236, 237, 238, 239, 240, | |
| 0, 0, 0, 0, 0, 230, 120, 0, 228, 0, | |
| 226, 0, 223, 32, 33, 0, 15, 16, 0, 0, | |
| 22, 21, 0, 161, 25, 27, 34, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 160, 221, 0, | |
| 155, 156, 153, 279, 278, 249, 270, 0, 282, 280, | |
| 0, 0, 0, 263, 266, 241, 0, 74, 75, 77, | |
| 76, 79, 80, 81, 82, 83, 78, 73, 0, 0, | |
| 256, 252, 254, 0, 0, 0, 114, 0, 117, 0, | |
| 0, 0, 224, 0, 91, 10, 0, 17, 29, 14, | |
| 20, 26, 40, 41, 42, 45, 44, 47, 48, 52, | |
| 53, 50, 51, 55, 56, 58, 60, 62, 64, 66, | |
| 68, 0, 219, 0, 0, 0, 0, 0, 281, 0, | |
| 262, 0, 243, 72, 85, 103, 0, 111, 118, 0, | |
| 225, 0, 227, 0, 92, 12, 0, 0, 248, 250, | |
| 273, 272, 275, 249, 260, 264, 0, 0, 0, 0, | |
| 112, 0, 119, 229, 0, 70, 0, 274, 0, 0, | |
| 259, 257, 0, 0, 0, 244, 113, 0, 0, 276, | |
| 0, 249, 261, 0, 246, 267, 245, 93, 0, 277, | |
| 271, 258, 265, 269 | |
| }; | |
| /* YYPGOTO[NTERM-NUM]. */ | |
| static const yytype_int16 yypgoto[] = | |
| { | |
| -359, -46, -359, -359, -359, -359, -359, -359, -1, -359, | |
| -359, -359, -359, 2, -359, -93, -92, -202, -91, -16, | |
| -20, -15, 8, 6, -17, -359, -121, -135, -359, -154, | |
| -130, -359, 15, 17, -359, -359, -359, 167, 172, 169, | |
| -359, -359, -337, -359, -75, -359, -87, -359, -81, 280, | |
| -359, -359, 90, 0, -359, -359, -359, -359, -117, -139, | |
| 54, -32, -225, -64, -211, -336, -114, -359, -359, -120, | |
| -358, -359, -359, -105, 1, -63, -359, -359, -359, -359, | |
| -359, -83, -359, -359, -359, -359, -359, -359, -359, -359, | |
| -359, 195, -359, -359 | |
| }; | |
| /* YYDEFGOTO[NTERM-NUM]. */ | |
| static const yytype_int16 yydefgoto[] = | |
| { | |
| -1, 238, 166, 167, 168, 326, 169, 170, 171, 172, | |
| 173, 174, 175, 212, 177, 178, 179, 180, 181, 182, | |
| 183, 184, 185, 186, 187, 188, 213, 214, 308, 215, | |
| 190, 123, 216, 217, 82, 83, 84, 112, 113, 114, | |
| 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, | |
| 95, 134, 135, 191, 97, 98, 194, 130, 150, 151, | |
| 239, 240, 236, 219, 220, 221, 222, 296, 389, 415, | |
| 353, 354, 355, 416, 223, 224, 225, 401, 226, 402, | |
| 227, 388, 228, 361, 285, 356, 382, 398, 399, 229, | |
| 99, 100, 101, 109 | |
| }; | |
| /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If | |
| positive, shift that token. If negative, reduce the rule whose | |
| number is the opposite. If YYTABLE_NINF, syntax error. */ | |
| static const yytype_int16 yytable[] = | |
| { | |
| 96, 106, 124, 116, 137, 189, 245, 316, 125, 115, | |
| 235, 242, 312, 193, 234, 80, 132, 81, 323, 379, | |
| 103, 104, 275, 189, 386, 400, 144, 373, 124, 117, | |
| 116, 108, 118, 145, 116, 374, 115, 264, 265, 254, | |
| 231, 120, 149, 309, 107, 386, 310, 232, 148, 149, | |
| 290, 133, 105, 421, 242, 148, 324, 276, 246, 247, | |
| 146, 124, 339, 340, 341, 342, 147, 237, 414, 149, | |
| 141, 142, 266, 267, 414, 148, 292, 279, 260, 248, | |
| 261, 196, 251, 249, 96, 189, 110, 197, 252, 96, | |
| 325, 111, 368, 126, 327, 143, 309, 235, 383, 96, | |
| 313, 315, 129, 321, 309, 309, 322, 131, 358, 189, | |
| 189, 96, 149, 149, 80, 96, 81, 331, 148, 148, | |
| 384, 418, 351, 96, 119, 104, 309, 309, 176, -29, | |
| 96, 136, 321, 357, 230, 370, 218, 359, 103, 104, | |
| 242, 390, 262, 263, 392, 192, 176, 195, 96, 250, | |
| 96, 312, 2, 3, 4, 257, 258, 259, 268, 269, | |
| 243, 244, 280, 281, 309, 376, 406, 335, 336, 255, | |
| 337, 338, 270, 363, 364, 271, 272, 343, 344, 256, | |
| 273, 274, 235, 277, 283, 284, 286, 288, 422, 287, | |
| 371, 291, 293, 96, 96, 294, 360, -28, 149, 189, | |
| 320, 295, 318, 317, 148, -23, -247, 385, 176, 365, | |
| 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, | |
| 366, 367, 369, 218, 375, -30, 309, 377, 385, 307, | |
| 393, 235, 176, 176, 235, 391, 396, 405, 404, 409, | |
| 410, 395, 408, 394, 407, 411, 209, 413, 330, 378, | |
| 417, 346, 189, 423, 345, 419, 235, 347, 350, 332, | |
| 333, 334, 176, 176, 176, 176, 176, 176, 176, 176, | |
| 176, 176, 176, 176, 176, 176, 176, 176, 235, 96, | |
| 349, 348, 139, 138, 140, 102, 387, 282, 412, 372, | |
| 420, 319, 380, 381, 128, 0, 218, 362, 0, 397, | |
| 124, 0, 0, 0, 0, 0, 125, 387, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 176, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 218, 218, 0, 0, 0, | |
| 0, 218, 218, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 176, 0, 0, 0, 0, | |
| 0, 0, 218, 0, 0, 0, 0, 96, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 218, 0, 0, 0, 0, 0, | |
| 218, 1, 2, 3, 4, 5, 6, 7, 8, 9, | |
| 10, 11, 198, 199, 200, 0, 201, 202, 203, 204, | |
| 205, 206, 207, 12, 13, 14, 15, 16, 17, 18, | |
| 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, | |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, | |
| 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, | |
| 208, 49, 50, 51, 52, 53, 54, 55, 56, 57, | |
| 58, 59, 60, 61, 62, 0, 63, 64, 65, 66, | |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, | |
| 77, 78, 152, 79, 153, 154, 155, 156, 157, 0, | |
| 0, 158, 159, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 160, 0, 0, 0, 209, 210, 0, 0, 0, 0, | |
| 211, 162, 163, 164, 165, 1, 2, 3, 4, 5, | |
| 6, 7, 8, 9, 10, 11, 198, 199, 200, 0, | |
| 201, 202, 203, 204, 205, 206, 207, 12, 13, 14, | |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
| 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
| 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
| 45, 46, 47, 48, 208, 49, 50, 51, 52, 53, | |
| 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, | |
| 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, | |
| 73, 74, 75, 76, 77, 78, 152, 79, 153, 154, | |
| 155, 156, 157, 0, 0, 158, 159, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 160, 0, 0, 0, 209, 311, | |
| 0, 0, 0, 0, 211, 162, 163, 164, 165, 1, | |
| 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, | |
| 198, 199, 200, 0, 201, 202, 203, 204, 205, 206, | |
| 207, 12, 13, 14, 15, 16, 17, 18, 19, 20, | |
| 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, | |
| 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, | |
| 41, 42, 43, 44, 45, 46, 47, 48, 208, 49, | |
| 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, | |
| 60, 61, 62, 0, 63, 64, 65, 66, 67, 68, | |
| 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, | |
| 152, 79, 153, 154, 155, 156, 157, 0, 0, 158, | |
| 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, | |
| 0, 0, 209, 0, 0, 0, 0, 0, 211, 162, | |
| 163, 164, 165, 1, 2, 3, 4, 5, 6, 7, | |
| 8, 9, 10, 11, 198, 199, 200, 0, 201, 202, | |
| 203, 204, 205, 206, 207, 12, 13, 14, 15, 16, | |
| 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, | |
| 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, | |
| 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, | |
| 47, 48, 208, 49, 50, 51, 52, 53, 54, 55, | |
| 56, 57, 58, 59, 60, 61, 62, 0, 63, 64, | |
| 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | |
| 75, 76, 77, 78, 152, 79, 153, 154, 155, 156, | |
| 157, 0, 0, 158, 159, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 160, 0, 0, 0, 136, 0, 0, 0, | |
| 0, 0, 211, 162, 163, 164, 165, 1, 2, 3, | |
| 4, 5, 6, 7, 8, 9, 10, 11, 198, 199, | |
| 200, 0, 201, 202, 203, 204, 205, 206, 207, 12, | |
| 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, | |
| 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, | |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, | |
| 43, 44, 45, 46, 47, 48, 208, 49, 50, 51, | |
| 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
| 62, 0, 63, 64, 65, 66, 67, 68, 69, 70, | |
| 71, 72, 73, 74, 75, 76, 77, 78, 152, 79, | |
| 153, 154, 155, 156, 157, 0, 0, 158, 159, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 211, 162, 163, 164, | |
| 165, 1, 2, 3, 4, 5, 6, 7, 8, 9, | |
| 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, | |
| 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, | |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, | |
| 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, | |
| 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, | |
| 58, 59, 60, 61, 62, 0, 63, 64, 65, 66, | |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, | |
| 77, 78, 152, 79, 153, 154, 155, 156, 157, 0, | |
| 0, 158, 159, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, | |
| 160, 6, 7, 8, 9, 10, 11, 0, 0, 0, | |
| 211, 162, 163, 164, 165, 0, 0, 0, 12, 13, | |
| 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, | |
| 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, | |
| 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, | |
| 44, 45, 46, 47, 48, 0, 49, 50, 51, 52, | |
| 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, | |
| 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, | |
| 72, 73, 74, 75, 76, 77, 78, 152, 79, 153, | |
| 154, 155, 156, 157, 0, 0, 158, 159, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 1, 2, 3, 4, 160, 6, 7, 8, 9, | |
| 10, 11, 0, 0, 0, 0, 162, 163, 164, 165, | |
| 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, | |
| 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, | |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, | |
| 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, | |
| 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, | |
| 58, 59, 60, 61, 62, 0, 63, 64, 65, 66, | |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, | |
| 77, 78, 121, 79, 0, 0, 8, 9, 10, 11, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, | |
| 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, | |
| 122, 32, 33, 34, 35, 36, 37, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 47, 48, 0, 49, | |
| 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, | |
| 60, 61, 62, 0, 63, 64, 65, 66, 67, 68, | |
| 69, 70, 71, 72, 73, 74, 75, 76, 77, 0, | |
| 152, 79, 153, 154, 155, 156, 157, 0, 0, 158, | |
| 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, | |
| 0, 161, 8, 9, 10, 11, 0, 0, 0, 162, | |
| 163, 164, 165, 0, 0, 0, 0, 12, 13, 14, | |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
| 25, 26, 0, 0, 0, 0, 0, 32, 33, 34, | |
| 35, 36, 37, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 47, 48, 0, 49, 50, 51, 52, 53, | |
| 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, | |
| 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, | |
| 73, 74, 75, 76, 77, 0, 152, 79, 153, 154, | |
| 155, 156, 157, 0, 0, 158, 159, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 160, 0, 0, 233, 8, 9, | |
| 10, 11, 0, 0, 0, 162, 163, 164, 165, 0, | |
| 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, | |
| 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, | |
| 0, 0, 0, 32, 33, 34, 35, 36, 37, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, | |
| 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, | |
| 58, 59, 60, 61, 62, 0, 63, 64, 65, 66, | |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, | |
| 77, 0, 152, 79, 153, 154, 155, 156, 157, 0, | |
| 0, 158, 159, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 160, 8, 9, 10, 11, 0, 0, 0, 0, 0, | |
| 289, 162, 163, 164, 165, 0, 12, 13, 14, 15, | |
| 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, | |
| 26, 0, 0, 0, 0, 0, 32, 33, 34, 35, | |
| 36, 37, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 47, 48, 0, 49, 50, 51, 52, 53, 54, | |
| 55, 56, 57, 58, 59, 60, 61, 62, 0, 63, | |
| 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, | |
| 74, 75, 76, 77, 0, 152, 79, 153, 154, 155, | |
| 156, 157, 0, 0, 158, 159, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 160, 0, 0, 314, 8, 9, 10, | |
| 11, 0, 0, 0, 162, 163, 164, 165, 0, 0, | |
| 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, | |
| 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, | |
| 0, 0, 32, 33, 34, 35, 36, 37, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 47, 48, 0, | |
| 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, | |
| 59, 60, 61, 62, 0, 63, 64, 65, 66, 67, | |
| 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, | |
| 0, 152, 79, 153, 154, 155, 156, 157, 0, 0, | |
| 158, 159, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, | |
| 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, | |
| 162, 163, 164, 165, 0, 12, 13, 14, 15, 16, | |
| 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, | |
| 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, | |
| 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 47, 253, 0, 49, 50, 51, 52, 53, 54, 55, | |
| 56, 57, 58, 59, 60, 61, 62, 0, 63, 64, | |
| 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | |
| 75, 76, 77, 0, 152, 79, 153, 154, 155, 156, | |
| 157, 0, 0, 158, 159, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, | |
| 3, 4, 160, 6, 7, 8, 9, 10, 11, 0, | |
| 0, 0, 0, 162, 163, 164, 165, 0, 0, 0, | |
| 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, | |
| 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | |
| 42, 43, 44, 45, 46, 47, 48, 0, 49, 50, | |
| 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, | |
| 61, 62, 0, 63, 64, 65, 66, 67, 68, 69, | |
| 70, 71, 72, 73, 74, 75, 76, 77, 78, 0, | |
| 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 1, 2, 3, 4, 0, 6, 7, 8, 9, | |
| 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 241, 12, 13, 14, 15, 16, 17, 18, | |
| 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, | |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, | |
| 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, | |
| 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, | |
| 58, 59, 60, 61, 62, 0, 63, 64, 65, 66, | |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, | |
| 77, 78, 0, 79, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 1, 2, 3, 4, 0, 6, | |
| 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 278, 12, 13, 14, 15, | |
| 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, | |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, | |
| 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, | |
| 46, 47, 48, 0, 49, 50, 51, 52, 53, 54, | |
| 55, 56, 57, 58, 59, 60, 61, 62, 0, 63, | |
| 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, | |
| 74, 75, 76, 77, 78, 0, 79, 0, 0, 0, | |
| 0, 0, 0, 0, 127, 0, 0, 1, 2, 3, | |
| 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 352, 12, | |
| 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, | |
| 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, | |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, | |
| 43, 44, 45, 46, 47, 48, 0, 49, 50, 51, | |
| 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
| 62, 0, 63, 64, 65, 66, 67, 68, 69, 70, | |
| 71, 72, 73, 74, 75, 76, 77, 78, 0, 79, | |
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, | |
| 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, | |
| 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, | |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, | |
| 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, | |
| 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, | |
| 59, 60, 61, 62, 0, 63, 64, 65, 66, 67, | |
| 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, | |
| 78, 0, 79, 1, 2, 3, 4, 0, 6, 7, | |
| 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, | |
| 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, | |
| 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, | |
| 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, | |
| 47, 48, 0, 49, 50, 51, 52, 53, 54, 55, | |
| 56, 57, 58, 59, 60, 61, 62, 0, 63, 64, | |
| 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | |
| 75, 76, 77, 78, 0, 79, 8, 9, 10, 11, | |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, | |
| 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, | |
| 0, 32, 33, 34, 35, 36, 37, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 47, 48, 0, 49, | |
| 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, | |
| 60, 61, 62, 0, 63, 64, 65, 66, 67, 68, | |
| 69, 70, 71, 72, 73, 74, 75, 76, 77, 0, | |
| 328, 79, 8, 9, 10, 11, 329, 0, 0, 0, | |
| 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, | |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
| 25, 26, 0, 0, 0, 0, 0, 32, 33, 34, | |
| 35, 36, 37, 0, 0, 0, 0, 0, 0, 0, | |
| 0, 0, 47, 48, 0, 49, 50, 51, 52, 53, | |
| 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, | |
| 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, | |
| 73, 74, 75, 76, 77, 0, 0, 79 | |
| }; | |
| static const yytype_int16 yycheck[] = | |
| { | |
| 0, 47, 89, 84, 109, 126, 160, 232, 89, 84, | |
| 145, 150, 223, 130, 144, 0, 59, 0, 94, 355, | |
| 94, 95, 110, 144, 361, 383, 124, 124, 115, 129, | |
| 111, 132, 132, 131, 115, 132, 111, 105, 106, 174, | |
| 124, 87, 123, 129, 122, 382, 132, 131, 123, 130, | |
| 204, 94, 126, 411, 193, 130, 132, 145, 103, 104, | |
| 126, 148, 264, 265, 266, 267, 132, 148, 404, 150, | |
| 116, 117, 140, 141, 410, 150, 206, 194, 134, 124, | |
| 136, 123, 123, 128, 84, 206, 123, 129, 129, 89, | |
| 123, 129, 317, 124, 248, 122, 129, 232, 123, 99, | |
| 230, 231, 102, 129, 129, 129, 132, 126, 132, 230, | |
| 231, 111, 193, 194, 99, 115, 99, 252, 193, 194, | |
| 123, 123, 276, 123, 94, 95, 129, 129, 126, 122, | |
| 130, 126, 129, 287, 124, 132, 136, 291, 94, 95, | |
| 279, 366, 101, 102, 369, 132, 144, 131, 148, 123, | |
| 150, 362, 4, 5, 6, 137, 138, 139, 107, 108, | |
| 158, 159, 97, 98, 129, 130, 391, 260, 261, 122, | |
| 262, 263, 144, 308, 309, 143, 142, 268, 269, 177, | |
| 109, 111, 317, 125, 132, 132, 122, 132, 413, 122, | |
| 320, 122, 130, 193, 194, 122, 130, 122, 279, 320, | |
| 124, 127, 125, 131, 279, 123, 126, 361, 206, 125, | |
| 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, | |
| 131, 125, 131, 223, 125, 122, 129, 62, 382, 131, | |
| 125, 366, 230, 231, 369, 131, 122, 127, 123, 132, | |
| 123, 376, 396, 373, 125, 17, 126, 131, 249, 354, | |
| 132, 271, 373, 132, 270, 409, 391, 272, 275, 257, | |
| 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, | |
| 268, 269, 270, 271, 272, 273, 274, 275, 413, 279, | |
| 274, 273, 115, 111, 115, 5, 361, 197, 402, 321, | |
| 410, 237, 356, 356, 99, -1, 296, 296, -1, 382, | |
| 387, -1, -1, -1, -1, -1, 387, 382, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, 320, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| 386, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, 355, 356, -1, -1, -1, | |
| -1, 361, 362, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, 373, -1, -1, -1, -1, | |
| -1, -1, 382, -1, -1, -1, -1, 387, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, 404, -1, -1, -1, -1, -1, | |
| 410, 3, 4, 5, 6, 7, 8, 9, 10, 11, | |
| 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, | |
| 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | |
| 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | |
| 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
| 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, | |
| 72, 73, 74, 75, 76, -1, 78, 79, 80, 81, | |
| 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, | |
| 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, | |
| -1, 103, 104, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| 122, -1, -1, -1, 126, 127, -1, -1, -1, -1, | |
| 132, 133, 134, 135, 136, 3, 4, 5, 6, 7, | |
| 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, | |
| 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, | |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, | |
| 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, | |
| 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, | |
| 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, | |
| 68, 69, 70, 71, 72, 73, 74, 75, 76, -1, | |
| 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, | |
| 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, | |
| 98, 99, 100, -1, -1, 103, 104, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, 122, -1, -1, -1, 126, 127, | |
| -1, -1, -1, -1, 132, 133, 134, 135, 136, 3, | |
| 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, | |
| 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, | |
| 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, | |
| 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, | |
| 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, | |
| 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, | |
| 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, | |
| 74, 75, 76, -1, 78, 79, 80, 81, 82, 83, | |
| 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, | |
| 94, 95, 96, 97, 98, 99, 100, -1, -1, 103, | |
| 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, 122, -1, | |
| -1, -1, 126, -1, -1, -1, -1, -1, 132, 133, | |
| 134, 135, 136, 3, 4, 5, 6, 7, 8, 9, | |
| 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, | |
| 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, | |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, | |
| 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, | |
| 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, | |
| 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, | |
| 70, 71, 72, 73, 74, 75, 76, -1, 78, 79, | |
| 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, | |
| 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, | |
| 100, -1, -1, 103, 104, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, 122, -1, -1, -1, 126, -1, -1, -1, | |
| -1, -1, 132, 133, 134, 135, 136, 3, 4, 5, | |
| 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | |
| 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, | |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, | |
| 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, | |
| 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, | |
| 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, | |
| 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, | |
| 76, -1, 78, 79, 80, 81, 82, 83, 84, 85, | |
| 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, | |
| 96, 97, 98, 99, 100, -1, -1, 103, 104, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, 122, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, 132, 133, 134, 135, | |
| 136, 3, 4, 5, 6, 7, 8, 9, 10, 11, | |
| 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, | |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | |
| 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | |
| 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
| -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, | |
| 72, 73, 74, 75, 76, -1, 78, 79, 80, 81, | |
| 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, | |
| 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, | |
| -1, 103, 104, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, | |
| 122, 8, 9, 10, 11, 12, 13, -1, -1, -1, | |
| 132, 133, 134, 135, 136, -1, -1, -1, 25, 26, | |
| 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, | |
| 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, | |
| 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, | |
| 57, 58, 59, 60, 61, -1, 63, 64, 65, 66, | |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, | |
| -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, | |
| 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, | |
| 97, 98, 99, 100, -1, -1, 103, 104, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, 3, 4, 5, 6, 122, 8, 9, 10, 11, | |
| 12, 13, -1, -1, -1, -1, 133, 134, 135, 136, | |
| -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, | |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | |
| 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | |
| 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
| -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, | |
| 72, 73, 74, 75, 76, -1, 78, 79, 80, 81, | |
| 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, | |
| 92, 93, 94, 95, -1, -1, 10, 11, 12, 13, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, | |
| 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, | |
| 132, 45, 46, 47, 48, 49, 50, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, 60, 61, -1, 63, | |
| 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, | |
| 74, 75, 76, -1, 78, 79, 80, 81, 82, 83, | |
| 84, 85, 86, 87, 88, 89, 90, 91, 92, -1, | |
| 94, 95, 96, 97, 98, 99, 100, -1, -1, 103, | |
| 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, 122, -1, | |
| -1, 125, 10, 11, 12, 13, -1, -1, -1, 133, | |
| 134, 135, 136, -1, -1, -1, -1, 25, 26, 27, | |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, | |
| 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, | |
| 48, 49, 50, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, 60, 61, -1, 63, 64, 65, 66, 67, | |
| 68, 69, 70, 71, 72, 73, 74, 75, 76, -1, | |
| 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, | |
| 88, 89, 90, 91, 92, -1, 94, 95, 96, 97, | |
| 98, 99, 100, -1, -1, 103, 104, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, 122, -1, -1, 125, 10, 11, | |
| 12, 13, -1, -1, -1, 133, 134, 135, 136, -1, | |
| -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, | |
| 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, | |
| -1, -1, -1, 45, 46, 47, 48, 49, 50, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, | |
| -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, | |
| 72, 73, 74, 75, 76, -1, 78, 79, 80, 81, | |
| 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, | |
| 92, -1, 94, 95, 96, 97, 98, 99, 100, -1, | |
| -1, 103, 104, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| 122, 10, 11, 12, 13, -1, -1, -1, -1, -1, | |
| 132, 133, 134, 135, 136, -1, 25, 26, 27, 28, | |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, | |
| 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, | |
| 49, 50, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, 60, 61, -1, 63, 64, 65, 66, 67, 68, | |
| 69, 70, 71, 72, 73, 74, 75, 76, -1, 78, | |
| 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, | |
| 89, 90, 91, 92, -1, 94, 95, 96, 97, 98, | |
| 99, 100, -1, -1, 103, 104, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, 122, -1, -1, 125, 10, 11, 12, | |
| 13, -1, -1, -1, 133, 134, 135, 136, -1, -1, | |
| -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, | |
| 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, | |
| -1, -1, 45, 46, 47, 48, 49, 50, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, 60, 61, -1, | |
| 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, | |
| 73, 74, 75, 76, -1, 78, 79, 80, 81, 82, | |
| 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, | |
| -1, 94, 95, 96, 97, 98, 99, 100, -1, -1, | |
| 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, | |
| 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, | |
| 133, 134, 135, 136, -1, 25, 26, 27, 28, 29, | |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, | |
| -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, | |
| 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| 60, 61, -1, 63, 64, 65, 66, 67, 68, 69, | |
| 70, 71, 72, 73, 74, 75, 76, -1, 78, 79, | |
| 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, | |
| 90, 91, 92, -1, 94, 95, 96, 97, 98, 99, | |
| 100, -1, -1, 103, 104, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, | |
| 5, 6, 122, 8, 9, 10, 11, 12, 13, -1, | |
| -1, -1, -1, 133, 134, 135, 136, -1, -1, -1, | |
| 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
| 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
| 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | |
| 55, 56, 57, 58, 59, 60, 61, -1, 63, 64, | |
| 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, | |
| 75, 76, -1, 78, 79, 80, 81, 82, 83, 84, | |
| 85, 86, 87, 88, 89, 90, 91, 92, 93, -1, | |
| 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, 3, 4, 5, 6, -1, 8, 9, 10, 11, | |
| 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, 127, 25, 26, 27, 28, 29, 30, 31, | |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, | |
| 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | |
| 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
| -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, | |
| 72, 73, 74, 75, 76, -1, 78, 79, 80, 81, | |
| 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, | |
| 92, 93, -1, 95, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, 3, 4, 5, 6, -1, 8, | |
| 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, 127, 25, 26, 27, 28, | |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, | |
| 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, | |
| 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, | |
| 59, 60, 61, -1, 63, 64, 65, 66, 67, 68, | |
| 69, 70, 71, 72, 73, 74, 75, 76, -1, 78, | |
| 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, | |
| 89, 90, 91, 92, 93, -1, 95, -1, -1, -1, | |
| -1, -1, -1, -1, 0, -1, -1, 3, 4, 5, | |
| 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, -1, 127, 25, | |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, | |
| 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, | |
| 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, | |
| 56, 57, 58, 59, 60, 61, -1, 63, 64, 65, | |
| 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, | |
| 76, -1, 78, 79, 80, 81, 82, 83, 84, 85, | |
| 86, 87, 88, 89, 90, 91, 92, 93, -1, 95, | |
| 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, | |
| 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, | |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, | |
| 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, | |
| 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, | |
| 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, | |
| 73, 74, 75, 76, -1, 78, 79, 80, 81, 82, | |
| 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, | |
| 93, -1, 95, 3, 4, 5, 6, -1, 8, 9, | |
| 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, | |
| -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, | |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, | |
| 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, | |
| 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, | |
| 60, 61, -1, 63, 64, 65, 66, 67, 68, 69, | |
| 70, 71, 72, 73, 74, 75, 76, -1, 78, 79, | |
| 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, | |
| 90, 91, 92, 93, -1, 95, 10, 11, 12, 13, | |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
| -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, | |
| 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, | |
| -1, 45, 46, 47, 48, 49, 50, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, 60, 61, -1, 63, | |
| 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, | |
| 74, 75, 76, -1, 78, 79, 80, 81, 82, 83, | |
| 84, 85, 86, 87, 88, 89, 90, 91, 92, -1, | |
| 94, 95, 10, 11, 12, 13, 100, -1, -1, -1, | |
| -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, | |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, | |
| 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, | |
| 48, 49, 50, -1, -1, -1, -1, -1, -1, -1, | |
| -1, -1, 60, 61, -1, 63, 64, 65, 66, 67, | |
| 68, 69, 70, 71, 72, 73, 74, 75, 76, -1, | |
| 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, | |
| 88, 89, 90, 91, 92, -1, -1, 95 | |
| }; | |
| /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | |
| symbol of state STATE-NUM. */ | |
| static const yytype_uint8 yystos[] = | |
| { | |
| 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, | |
| 12, 13, 25, 26, 27, 28, 29, 30, 31, 32, | |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, | |
| 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, | |
| 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, | |
| 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, | |
| 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, | |
| 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, | |
| 178, 179, 180, 181, 182, 186, 187, 188, 189, 190, | |
| 191, 192, 193, 194, 195, 196, 199, 200, 201, 236, | |
| 237, 238, 195, 94, 95, 126, 147, 122, 132, 239, | |
| 123, 129, 183, 184, 185, 190, 194, 129, 132, 94, | |
| 147, 94, 132, 177, 192, 194, 124, 0, 237, 199, | |
| 203, 126, 59, 94, 197, 198, 126, 219, 184, 183, | |
| 185, 147, 147, 122, 124, 131, 126, 132, 190, 194, | |
| 204, 205, 94, 96, 97, 98, 99, 100, 103, 104, | |
| 122, 125, 133, 134, 135, 136, 148, 149, 150, 152, | |
| 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, | |
| 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, | |
| 176, 199, 132, 204, 202, 131, 123, 129, 14, 15, | |
| 16, 18, 19, 20, 21, 22, 23, 24, 62, 126, | |
| 127, 132, 159, 172, 173, 175, 178, 179, 199, 209, | |
| 210, 211, 212, 220, 221, 222, 224, 226, 228, 235, | |
| 124, 124, 131, 125, 176, 173, 208, 194, 147, 206, | |
| 207, 127, 205, 159, 159, 175, 103, 104, 124, 128, | |
| 123, 123, 129, 61, 173, 122, 159, 137, 138, 139, | |
| 134, 136, 101, 102, 105, 106, 140, 141, 107, 108, | |
| 144, 143, 142, 109, 111, 110, 145, 125, 127, 204, | |
| 97, 98, 198, 132, 132, 230, 122, 122, 132, 132, | |
| 175, 122, 176, 130, 122, 127, 213, 112, 113, 114, | |
| 115, 116, 117, 118, 119, 120, 121, 131, 174, 129, | |
| 132, 127, 210, 176, 125, 176, 208, 131, 125, 206, | |
| 124, 129, 132, 94, 132, 123, 151, 175, 94, 100, | |
| 154, 173, 159, 159, 159, 161, 161, 162, 162, 163, | |
| 163, 163, 163, 164, 164, 165, 166, 167, 168, 169, | |
| 170, 175, 127, 216, 217, 218, 231, 175, 132, 175, | |
| 130, 229, 220, 173, 173, 125, 131, 125, 208, 131, | |
| 132, 176, 207, 124, 132, 125, 130, 62, 219, 211, | |
| 209, 221, 232, 123, 123, 175, 188, 190, 227, 214, | |
| 208, 131, 208, 125, 176, 173, 122, 227, 233, 234, | |
| 216, 223, 225, 147, 123, 127, 208, 125, 175, 132, | |
| 123, 17, 212, 131, 211, 215, 219, 132, 123, 175, | |
| 215, 216, 208, 132 | |
| }; | |
| /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
| static const yytype_uint8 yyr1[] = | |
| { | |
| 0, 146, 147, 147, 148, 149, 149, 149, 149, 149, | |
| 149, 150, 150, 150, 150, 150, 150, 151, 152, 153, | |
| 153, 154, 154, 155, 155, 156, 156, 157, 158, 158, | |
| 158, 159, 159, 159, 159, 160, 160, 160, 160, 161, | |
| 161, 161, 161, 162, 162, 162, 163, 163, 163, 164, | |
| 164, 164, 164, 164, 165, 165, 165, 166, 166, 167, | |
| 167, 168, 168, 169, 169, 170, 170, 171, 171, 172, | |
| 172, 173, 173, 174, 174, 174, 174, 174, 174, 174, | |
| 174, 174, 174, 174, 175, 175, 176, 177, 178, 178, | |
| 178, 178, 178, 178, 178, 178, 179, 180, 180, 181, | |
| 181, 182, 183, 183, 184, 184, 184, 184, 185, 186, | |
| 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, | |
| 187, 188, 188, 189, 189, 190, 190, 191, 192, 192, | |
| 192, 192, 192, 193, 193, 193, 193, 193, 193, 193, | |
| 193, 193, 193, 193, 193, 193, 193, 194, 195, 195, | |
| 195, 196, 197, 197, 198, 198, 198, 198, 199, 199, | |
| 199, 200, 200, 200, 200, 200, 200, 200, 200, 200, | |
| 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, | |
| 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, | |
| 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, | |
| 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, | |
| 200, 200, 200, 200, 200, 200, 200, 200, 202, 201, | |
| 203, 201, 204, 204, 205, 205, 206, 206, 207, 207, | |
| 208, 209, 210, 210, 211, 211, 211, 211, 211, 211, | |
| 211, 212, 213, 214, 212, 215, 215, 217, 216, 218, | |
| 216, 219, 219, 220, 220, 221, 221, 222, 223, 223, | |
| 225, 224, 226, 226, 227, 227, 229, 228, 230, 228, | |
| 231, 228, 232, 232, 233, 233, 234, 234, 235, 235, | |
| 235, 235, 235, 236, 236, 237, 237, 239, 238 | |
| }; | |
| /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ | |
| static const yytype_uint8 yyr2[] = | |
| { | |
| 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 3, 1, 4, 1, 3, 2, 2, 1, 1, 1, | |
| 3, 2, 2, 2, 1, 2, 3, 2, 1, 1, | |
| 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, | |
| 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, | |
| 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, | |
| 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, | |
| 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 3, 1, 2, 2, 2, | |
| 4, 5, 6, 9, 2, 3, 2, 1, 1, 2, | |
| 3, 3, 2, 5, 2, 1, 2, 1, 1, 1, | |
| 3, 6, 7, 8, 5, 1, 2, 5, 6, 7, | |
| 4, 1, 2, 1, 1, 1, 2, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 4, 1, 3, 1, 3, 3, 1, 1, 3, | |
| 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, | |
| 0, 5, 1, 2, 3, 4, 1, 3, 1, 4, | |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1, 2, 0, 0, 5, 1, 1, 0, 2, 0, | |
| 2, 2, 3, 1, 2, 1, 2, 5, 3, 1, | |
| 0, 6, 3, 2, 1, 4, 0, 6, 0, 8, | |
| 0, 7, 1, 1, 1, 0, 2, 3, 2, 2, | |
| 2, 3, 2, 1, 2, 1, 1, 0, 3 | |
| }; | |
| #define yyerrok (yyerrstatus = 0) | |
| #define yyclearin (yychar = YYEMPTY) | |
| #define YYEMPTY (-2) | |
| #define YYEOF 0 | |
| #define YYACCEPT goto yyacceptlab | |
| #define YYABORT goto yyabortlab | |
| #define YYERROR goto yyerrorlab | |
| #define YYRECOVERING() (!!yyerrstatus) | |
| #define YYBACKUP(Token, Value) \ | |
| do \ | |
| if (yychar == YYEMPTY) \ | |
| { \ | |
| yychar = (Token); \ | |
| yylval = (Value); \ | |
| YYPOPSTACK (yylen); \ | |
| yystate = *yyssp; \ | |
| goto yybackup; \ | |
| } \ | |
| else \ | |
| { \ | |
| yyerror (&yylloc, context, scanner, YY_("syntax error: cannot back up")); \ | |
| YYERROR; \ | |
| } \ | |
| while (0) | |
| /* Error token number */ | |
| #define YYTERROR 1 | |
| #define YYERRCODE 256 | |
| /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | |
| If N is 0, then set CURRENT to the empty location which ends | |
| the previous symbol: RHS[0] (always defined). */ | |
| #ifndef YYLLOC_DEFAULT | |
| # define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
| do \ | |
| if (N) \ | |
| { \ | |
| (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ | |
| (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | |
| (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | |
| (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | |
| } \ | |
| else \ | |
| { \ | |
| (Current).first_line = (Current).last_line = \ | |
| YYRHSLOC (Rhs, 0).last_line; \ | |
| (Current).first_column = (Current).last_column = \ | |
| YYRHSLOC (Rhs, 0).last_column; \ | |
| } \ | |
| while (0) | |
| #endif | |
| #define YYRHSLOC(Rhs, K) ((Rhs)[K]) | |
| /* Enable debugging if requested. */ | |
| #if YYDEBUG | |
| # ifndef YYFPRINTF | |
| # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | |
| # define YYFPRINTF fprintf | |
| # endif | |
| # define YYDPRINTF(Args) \ | |
| do { \ | |
| if (yydebug) \ | |
| YYFPRINTF Args; \ | |
| } while (0) | |
| /* YY_LOCATION_PRINT -- Print the location on the stream. | |
| This macro was not mandated originally: define only if we know | |
| we won't break user code: when these are the locations we know. */ | |
| #ifndef YY_LOCATION_PRINT | |
| # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL | |
| /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ | |
| YY_ATTRIBUTE_UNUSED | |
| static unsigned | |
| yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) | |
| { | |
| unsigned res = 0; | |
| int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; | |
| if (0 <= yylocp->first_line) | |
| { | |
| res += YYFPRINTF (yyo, "%d", yylocp->first_line); | |
| if (0 <= yylocp->first_column) | |
| res += YYFPRINTF (yyo, ".%d", yylocp->first_column); | |
| } | |
| if (0 <= yylocp->last_line) | |
| { | |
| if (yylocp->first_line < yylocp->last_line) | |
| { | |
| res += YYFPRINTF (yyo, "-%d", yylocp->last_line); | |
| if (0 <= end_col) | |
| res += YYFPRINTF (yyo, ".%d", end_col); | |
| } | |
| else if (0 <= end_col && yylocp->first_column < end_col) | |
| res += YYFPRINTF (yyo, "-%d", end_col); | |
| } | |
| return res; | |
| } | |
| # define YY_LOCATION_PRINT(File, Loc) \ | |
| yy_location_print_ (File, &(Loc)) | |
| # else | |
| # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | |
| # endif | |
| #endif | |
| # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ | |
| do { \ | |
| if (yydebug) \ | |
| { \ | |
| YYFPRINTF (stderr, "%s ", Title); \ | |
| yy_symbol_print (stderr, \ | |
| Type, Value, Location, context, scanner); \ | |
| YYFPRINTF (stderr, "\n"); \ | |
| } \ | |
| } while (0) | |
| /*----------------------------------------. | |
| | Print this symbol's value on YYOUTPUT. | | |
| `----------------------------------------*/ | |
| static void | |
| yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void *scanner) | |
| { | |
| FILE *yyo = yyoutput; | |
| YYUSE (yyo); | |
| YYUSE (yylocationp); | |
| YYUSE (context); | |
| YYUSE (scanner); | |
| if (!yyvaluep) | |
| return; | |
| # ifdef YYPRINT | |
| if (yytype < YYNTOKENS) | |
| YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | |
| # endif | |
| YYUSE (yytype); | |
| } | |
| /*--------------------------------. | |
| | Print this symbol on YYOUTPUT. | | |
| `--------------------------------*/ | |
| static void | |
| yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void *scanner) | |
| { | |
| YYFPRINTF (yyoutput, "%s %s (", | |
| yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); | |
| YY_LOCATION_PRINT (yyoutput, *yylocationp); | |
| YYFPRINTF (yyoutput, ": "); | |
| yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, scanner); | |
| YYFPRINTF (yyoutput, ")"); | |
| } | |
| /*------------------------------------------------------------------. | |
| | yy_stack_print -- Print the state stack from its BOTTOM up to its | | |
| | TOP (included). | | |
| `------------------------------------------------------------------*/ | |
| static void | |
| yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) | |
| { | |
| YYFPRINTF (stderr, "Stack now"); | |
| for (; yybottom <= yytop; yybottom++) | |
| { | |
| int yybot = *yybottom; | |
| YYFPRINTF (stderr, " %d", yybot); | |
| } | |
| YYFPRINTF (stderr, "\n"); | |
| } | |
| # define YY_STACK_PRINT(Bottom, Top) \ | |
| do { \ | |
| if (yydebug) \ | |
| yy_stack_print ((Bottom), (Top)); \ | |
| } while (0) | |
| /*------------------------------------------------. | |
| | Report that the YYRULE is going to be reduced. | | |
| `------------------------------------------------*/ | |
| static void | |
| yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void *scanner) | |
| { | |
| unsigned long int yylno = yyrline[yyrule]; | |
| int yynrhs = yyr2[yyrule]; | |
| int yyi; | |
| YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", | |
| yyrule - 1, yylno); | |
| /* The symbols being reduced. */ | |
| for (yyi = 0; yyi < yynrhs; yyi++) | |
| { | |
| YYFPRINTF (stderr, " $%d = ", yyi + 1); | |
| yy_symbol_print (stderr, | |
| yystos[yyssp[yyi + 1 - yynrhs]], | |
| &(yyvsp[(yyi + 1) - (yynrhs)]) | |
| , &(yylsp[(yyi + 1) - (yynrhs)]) , context, scanner); | |
| YYFPRINTF (stderr, "\n"); | |
| } | |
| } | |
| # define YY_REDUCE_PRINT(Rule) \ | |
| do { \ | |
| if (yydebug) \ | |
| yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, scanner); \ | |
| } while (0) | |
| /* Nonzero means print parse trace. It is left uninitialized so that | |
| multiple parsers can coexist. */ | |
| int yydebug; | |
| #else /* !YYDEBUG */ | |
| # define YYDPRINTF(Args) | |
| # define YY_SYMBOL_PRINT(Title, Type, Value, Location) | |
| # define YY_STACK_PRINT(Bottom, Top) | |
| # define YY_REDUCE_PRINT(Rule) | |
| #endif /* !YYDEBUG */ | |
| /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
| #ifndef YYINITDEPTH | |
| # define YYINITDEPTH 200 | |
| #endif | |
| /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only | |
| if the built-in stack extension method is used). | |
| Do not make this value too large; the results are undefined if | |
| YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) | |
| evaluated with infinite-precision integer arithmetic. */ | |
| #ifndef YYMAXDEPTH | |
| # define YYMAXDEPTH 10000 | |
| #endif | |
| #if YYERROR_VERBOSE | |
| # ifndef yystrlen | |
| # if defined __GLIBC__ && defined _STRING_H | |
| # define yystrlen strlen | |
| # else | |
| /* Return the length of YYSTR. */ | |
| static YYSIZE_T | |
| yystrlen (const char *yystr) | |
| { | |
| YYSIZE_T yylen; | |
| for (yylen = 0; yystr[yylen]; yylen++) | |
| continue; | |
| return yylen; | |
| } | |
| # endif | |
| # endif | |
| # ifndef yystpcpy | |
| # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE | |
| # define yystpcpy stpcpy | |
| # else | |
| /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
| YYDEST. */ | |
| static char * | |
| yystpcpy (char *yydest, const char *yysrc) | |
| { | |
| char *yyd = yydest; | |
| const char *yys = yysrc; | |
| while ((*yyd++ = *yys++) != '\0') | |
| continue; | |
| return yyd - 1; | |
| } | |
| # endif | |
| # endif | |
| # ifndef yytnamerr | |
| /* Copy to YYRES the contents of YYSTR after stripping away unnecessary | |
| quotes and backslashes, so that it's suitable for yyerror. The | |
| heuristic is that double-quoting is unnecessary unless the string | |
| contains an apostrophe, a comma, or backslash (other than | |
| backslash-backslash). YYSTR is taken from yytname. If YYRES is | |
| null, do not copy; instead, return the length of what the result | |
| would have been. */ | |
| static YYSIZE_T | |
| yytnamerr (char *yyres, const char *yystr) | |
| { | |
| if (*yystr == '"') | |
| { | |
| YYSIZE_T yyn = 0; | |
| char const *yyp = yystr; | |
| for (;;) | |
| switch (*++yyp) | |
| { | |
| case '\'': | |
| case ',': | |
| goto do_not_strip_quotes; | |
| case '\\': | |
| if (*++yyp != '\\') | |
| goto do_not_strip_quotes; | |
| /* Fall through. */ | |
| default: | |
| if (yyres) | |
| yyres[yyn] = *yyp; | |
| yyn++; | |
| break; | |
| case '"': | |
| if (yyres) | |
| yyres[yyn] = '\0'; | |
| return yyn; | |
| } | |
| do_not_strip_quotes: ; | |
| } | |
| if (! yyres) | |
| return yystrlen (yystr); | |
| return yystpcpy (yyres, yystr) - yyres; | |
| } | |
| # endif | |
| /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message | |
| about the unexpected token YYTOKEN for the state stack whose top is | |
| YYSSP. | |
| Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is | |
| not large enough to hold the message. In that case, also set | |
| *YYMSG_ALLOC to the required number of bytes. Return 2 if the | |
| required number of bytes is too large to store. */ | |
| static int | |
| yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | |
| yytype_int16 *yyssp, int yytoken) | |
| { | |
| YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); | |
| YYSIZE_T yysize = yysize0; | |
| enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | |
| /* Internationalized format string. */ | |
| const char *yyformat = YY_NULLPTR; | |
| /* Arguments of yyformat. */ | |
| char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | |
| /* Number of reported tokens (one for the "unexpected", one per | |
| "expected"). */ | |
| int yycount = 0; | |
| /* There are many possibilities here to consider: | |
| - If this state is a consistent state with a default action, then | |
| the only way this function was invoked is if the default action | |
| is an error action. In that case, don't check for expected | |
| tokens because there are none. | |
| - The only way there can be no lookahead present (in yychar) is if | |
| this state is a consistent state with a default action. Thus, | |
| detecting the absence of a lookahead is sufficient to determine | |
| that there is no unexpected or expected token to report. In that | |
| case, just report a simple "syntax error". | |
| - Don't assume there isn't a lookahead just because this state is a | |
| consistent state with a default action. There might have been a | |
| previous inconsistent state, consistent state with a non-default | |
| action, or user semantic action that manipulated yychar. | |
| - Of course, the expected token list depends on states to have | |
| correct lookahead information, and it depends on the parser not | |
| to perform extra reductions after fetching a lookahead from the | |
| scanner and before detecting a syntax error. Thus, state merging | |
| (from LALR or IELR) and default reductions corrupt the expected | |
| token list. However, the list is correct for canonical LR with | |
| one exception: it will still contain any token that will not be | |
| accepted due to an error action in a later state. | |
| */ | |
| if (yytoken != YYEMPTY) | |
| { | |
| int yyn = yypact[*yyssp]; | |
| yyarg[yycount++] = yytname[yytoken]; | |
| if (!yypact_value_is_default (yyn)) | |
| { | |
| /* Start YYX at -YYN if negative to avoid negative indexes in | |
| YYCHECK. In other words, skip the first -YYN actions for | |
| this state because they are default actions. */ | |
| int yyxbegin = yyn < 0 ? -yyn : 0; | |
| /* Stay within bounds of both yycheck and yytname. */ | |
| int yychecklim = YYLAST - yyn + 1; | |
| int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | |
| int yyx; | |
| for (yyx = yyxbegin; yyx < yyxend; ++yyx) | |
| if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR | |
| && !yytable_value_is_error (yytable[yyx + yyn])) | |
| { | |
| if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | |
| { | |
| yycount = 1; | |
| yysize = yysize0; | |
| break; | |
| } | |
| yyarg[yycount++] = yytname[yyx]; | |
| { | |
| YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); | |
| if (! (yysize <= yysize1 | |
| && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) | |
| return 2; | |
| yysize = yysize1; | |
| } | |
| } | |
| } | |
| } | |
| switch (yycount) | |
| { | |
| # define YYCASE_(N, S) \ | |
| case N: \ | |
| yyformat = S; \ | |
| break | |
| YYCASE_(0, YY_("syntax error")); | |
| YYCASE_(1, YY_("syntax error, unexpected %s")); | |
| YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); | |
| YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); | |
| YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); | |
| YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); | |
| # undef YYCASE_ | |
| } | |
| { | |
| YYSIZE_T yysize1 = yysize + yystrlen (yyformat); | |
| if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) | |
| return 2; | |
| yysize = yysize1; | |
| } | |
| if (*yymsg_alloc < yysize) | |
| { | |
| *yymsg_alloc = 2 * yysize; | |
| if (! (yysize <= *yymsg_alloc | |
| && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) | |
| *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; | |
| return 1; | |
| } | |
| /* Avoid sprintf, as that infringes on the user's name space. | |
| Don't have undefined behavior even if the translation | |
| produced a string with the wrong number of "%s"s. */ | |
| { | |
| char *yyp = *yymsg; | |
| int yyi = 0; | |
| while ((*yyp = *yyformat) != '\0') | |
| if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) | |
| { | |
| yyp += yytnamerr (yyp, yyarg[yyi++]); | |
| yyformat += 2; | |
| } | |
| else | |
| { | |
| yyp++; | |
| yyformat++; | |
| } | |
| } | |
| return 0; | |
| } | |
| #endif /* YYERROR_VERBOSE */ | |
| /*-----------------------------------------------. | |
| | Release the memory associated to this symbol. | | |
| `-----------------------------------------------*/ | |
| static void | |
| yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void *scanner) | |
| { | |
| YYUSE (yyvaluep); | |
| YYUSE (yylocationp); | |
| YYUSE (context); | |
| YYUSE (scanner); | |
| if (!yymsg) | |
| yymsg = "Deleting"; | |
| YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | |
| YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN | |
| YYUSE (yytype); | |
| YY_IGNORE_MAYBE_UNINITIALIZED_END | |
| } | |
| /*----------. | |
| | yyparse. | | |
| `----------*/ | |
| int | |
| yyparse (TParseContext* context, void *scanner) | |
| { | |
| /* The lookahead symbol. */ | |
| int yychar; | |
| /* The semantic value of the lookahead symbol. */ | |
| /* Default value used for initialization, for pacifying older GCCs | |
| or non-GCC compilers. */ | |
| YY_INITIAL_VALUE (static YYSTYPE yyval_default;) | |
| YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | |
| /* Location data for the lookahead symbol. */ | |
| static YYLTYPE yyloc_default | |
| # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL | |
| = { 1, 1, 1, 1 } | |
| # endif | |
| ; | |
| YYLTYPE yylloc = yyloc_default; | |
| /* Number of syntax errors so far. */ | |
| int yynerrs; | |
| int yystate; | |
| /* Number of tokens to shift before error messages enabled. */ | |
| int yyerrstatus; | |
| /* The stacks and their tools: | |
| 'yyss': related to states. | |
| 'yyvs': related to semantic values. | |
| 'yyls': related to locations. | |
| Refer to the stacks through separate pointers, to allow yyoverflow | |
| to reallocate them elsewhere. */ | |
| /* The state stack. */ | |
| yytype_int16 yyssa[YYINITDEPTH]; | |
| yytype_int16 *yyss; | |
| yytype_int16 *yyssp; | |
| /* The semantic value stack. */ | |
| YYSTYPE yyvsa[YYINITDEPTH]; | |
| YYSTYPE *yyvs; | |
| YYSTYPE *yyvsp; | |
| /* The location stack. */ | |
| YYLTYPE yylsa[YYINITDEPTH]; | |
| YYLTYPE *yyls; | |
| YYLTYPE *yylsp; | |
| /* The locations where the error started and ended. */ | |
| YYLTYPE yyerror_range[3]; | |
| YYSIZE_T yystacksize; | |
| int yyn; | |
| int yyresult; | |
| /* Lookahead token as an internal (translated) token number. */ | |
| int yytoken = 0; | |
| /* The variables used to return semantic value and location from the | |
| action routines. */ | |
| YYSTYPE yyval; | |
| YYLTYPE yyloc; | |
| #if YYERROR_VERBOSE | |
| /* Buffer for error messages, and its allocated size. */ | |
| char yymsgbuf[128]; | |
| char *yymsg = yymsgbuf; | |
| YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | |
| #endif | |
| #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) | |
| /* The number of symbols on the RHS of the reduced rule. | |
| Keep to zero when no symbol should be popped. */ | |
| int yylen = 0; | |
| yyssp = yyss = yyssa; | |
| yyvsp = yyvs = yyvsa; | |
| yylsp = yyls = yylsa; | |
| yystacksize = YYINITDEPTH; | |
| YYDPRINTF ((stderr, "Starting parse\n")); | |
| yystate = 0; | |
| yyerrstatus = 0; | |
| yynerrs = 0; | |
| yychar = YYEMPTY; /* Cause a token to be read. */ | |
| yylsp[0] = yylloc; | |
| goto yysetstate; | |
| /*------------------------------------------------------------. | |
| | yynewstate -- Push a new state, which is found in yystate. | | |
| `------------------------------------------------------------*/ | |
| yynewstate: | |
| /* In all cases, when you get here, the value and location stacks | |
| have just been pushed. So pushing a state here evens the stacks. */ | |
| yyssp++; | |
| yysetstate: | |
| *yyssp = yystate; | |
| if (yyss + yystacksize - 1 <= yyssp) | |
| { | |
| /* Get the current used size of the three stacks, in elements. */ | |
| YYSIZE_T yysize = yyssp - yyss + 1; | |
| #ifdef yyoverflow | |
| { | |
| /* Give user a chance to reallocate the stack. Use copies of | |
| these so that the &'s don't force the real ones into | |
| memory. */ | |
| YYSTYPE *yyvs1 = yyvs; | |
| yytype_int16 *yyss1 = yyss; | |
| YYLTYPE *yyls1 = yyls; | |
| /* Each stack pointer address is followed by the size of the | |
| data in use in that stack, in bytes. This used to be a | |
| conditional around just the two extra args, but that might | |
| be undefined if yyoverflow is a macro. */ | |
| yyoverflow (YY_("memory exhausted"), | |
| &yyss1, yysize * sizeof (*yyssp), | |
| &yyvs1, yysize * sizeof (*yyvsp), | |
| &yyls1, yysize * sizeof (*yylsp), | |
| &yystacksize); | |
| yyls = yyls1; | |
| yyss = yyss1; | |
| yyvs = yyvs1; | |
| } | |
| #else /* no yyoverflow */ | |
| # ifndef YYSTACK_RELOCATE | |
| goto yyexhaustedlab; | |
| # else | |
| /* Extend the stack our own way. */ | |
| if (YYMAXDEPTH <= yystacksize) | |
| goto yyexhaustedlab; | |
| yystacksize *= 2; | |
| if (YYMAXDEPTH < yystacksize) | |
| yystacksize = YYMAXDEPTH; | |
| { | |
| yytype_int16 *yyss1 = yyss; | |
| union yyalloc *yyptr = | |
| (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
| if (! yyptr) | |
| goto yyexhaustedlab; | |
| YYSTACK_RELOCATE (yyss_alloc, yyss); | |
| YYSTACK_RELOCATE (yyvs_alloc, yyvs); | |
| YYSTACK_RELOCATE (yyls_alloc, yyls); | |
| # undef YYSTACK_RELOCATE | |
| if (yyss1 != yyssa) | |
| YYSTACK_FREE (yyss1); | |
| } | |
| # endif | |
| #endif /* no yyoverflow */ | |
| yyssp = yyss + yysize - 1; | |
| yyvsp = yyvs + yysize - 1; | |
| yylsp = yyls + yysize - 1; | |
| YYDPRINTF ((stderr, "Stack size increased to %lu\n", | |
| (unsigned long int) yystacksize)); | |
| if (yyss + yystacksize - 1 <= yyssp) | |
| YYABORT; | |
| } | |
| YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | |
| if (yystate == YYFINAL) | |
| YYACCEPT; | |
| goto yybackup; | |
| /*-----------. | |
| | yybackup. | | |
| `-----------*/ | |
| yybackup: | |
| /* Do appropriate processing given the current state. Read a | |
| lookahead token if we need one and don't already have one. */ | |
| /* First try to decide what to do without reference to lookahead token. */ | |
| yyn = yypact[yystate]; | |
| if (yypact_value_is_default (yyn)) | |
| goto yydefault; | |
| /* Not known => get a lookahead token if don't already have one. */ | |
| /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ | |
| if (yychar == YYEMPTY) | |
| { | |
| YYDPRINTF ((stderr, "Reading a token: ")); | |
| yychar = yylex (&yylval, &yylloc, scanner); | |
| } | |
| if (yychar <= YYEOF) | |
| { | |
| yychar = yytoken = YYEOF; | |
| YYDPRINTF ((stderr, "Now at end of input.\n")); | |
| } | |
| else | |
| { | |
| yytoken = YYTRANSLATE (yychar); | |
| YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); | |
| } | |
| /* If the proper action on seeing token YYTOKEN is to reduce or to | |
| detect an error, take that action. */ | |
| yyn += yytoken; | |
| if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | |
| goto yydefault; | |
| yyn = yytable[yyn]; | |
| if (yyn <= 0) | |
| { | |
| if (yytable_value_is_error (yyn)) | |
| goto yyerrlab; | |
| yyn = -yyn; | |
| goto yyreduce; | |
| } | |
| /* Count tokens shifted since error; after three, turn off error | |
| status. */ | |
| if (yyerrstatus) | |
| yyerrstatus--; | |
| /* Shift the lookahead token. */ | |
| YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | |
| /* Discard the shifted token. */ | |
| yychar = YYEMPTY; | |
| yystate = yyn; | |
| YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN | |
| *++yyvsp = yylval; | |
| YY_IGNORE_MAYBE_UNINITIALIZED_END | |
| *++yylsp = yylloc; | |
| goto yynewstate; | |
| /*-----------------------------------------------------------. | |
| | yydefault -- do the default action for the current state. | | |
| `-----------------------------------------------------------*/ | |
| yydefault: | |
| yyn = yydefact[yystate]; | |
| if (yyn == 0) | |
| goto yyerrlab; | |
| goto yyreduce; | |
| /*-----------------------------. | |
| | yyreduce -- Do a reduction. | | |
| `-----------------------------*/ | |
| yyreduce: | |
| /* yyn is the number of a rule to reduce with. */ | |
| yylen = yyr2[yyn]; | |
| /* If YYLEN is nonzero, implement the default value of the action: | |
| '$$ = $1'. | |
| Otherwise, the following line sets YYVAL to garbage. | |
| This behavior is undocumented and Bison | |
| users should not rely upon it. Assigning to YYVAL | |
| unconditionally makes the parser a bit smaller, and it avoids a | |
| GCC warning that YYVAL may be used uninitialized. */ | |
| yyval = yyvsp[1-yylen]; | |
| /* Default location. */ | |
| YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); | |
| YY_REDUCE_PRINT (yyn); | |
| switch (yyn) | |
| { | |
| case 4: | |
| { | |
| // The symbol table search was done in the lexical phase | |
| (yyval.interm.intermTypedNode) = context->parseVariableIdentifier((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol); | |
| // don't delete $1.string, it's used by error recovery, and the pool | |
| // pop will reclaim the memory | |
| } | |
| break; | |
| case 5: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 6: | |
| { | |
| TConstantUnion *unionArray = new TConstantUnion[1]; | |
| unionArray->setIConst((yyvsp[0].lex).i); | |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yylsp[0])); | |
| } | |
| break; | |
| case 7: | |
| { | |
| TConstantUnion *unionArray = new TConstantUnion[1]; | |
| unionArray->setUConst((yyvsp[0].lex).u); | |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConst), (yylsp[0])); | |
| } | |
| break; | |
| case 8: | |
| { | |
| TConstantUnion *unionArray = new TConstantUnion[1]; | |
| unionArray->setFConst((yyvsp[0].lex).f); | |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yylsp[0])); | |
| } | |
| break; | |
| case 9: | |
| { | |
| TConstantUnion *unionArray = new TConstantUnion[1]; | |
| unionArray->setBConst((yyvsp[0].lex).b); | |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[0])); | |
| } | |
| break; | |
| case 10: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); | |
| } | |
| break; | |
| case 11: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 12: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); | |
| } | |
| break; | |
| case 13: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 14: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0])); | |
| } | |
| break; | |
| case 15: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); | |
| } | |
| break; | |
| case 16: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); | |
| } | |
| break; | |
| case 17: | |
| { | |
| context->checkIsScalarInteger((yyvsp[0].interm.intermTypedNode), "[]"); | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 18: | |
| { | |
| bool fatalError = false; | |
| (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[0].interm).function, (yyvsp[0].interm).nodePair.node1, (yyvsp[0].interm).nodePair.node2, (yylsp[0]), &fatalError); | |
| if (fatalError) | |
| { | |
| YYERROR; | |
| } | |
| } | |
| break; | |
| case 19: | |
| { | |
| (yyval.interm) = (yyvsp[0].interm); | |
| (yyval.interm).nodePair.node2 = nullptr; | |
| } | |
| break; | |
| case 20: | |
| { | |
| ES3_OR_NEWER("", (yylsp[0]), "methods"); | |
| (yyval.interm) = (yyvsp[0].interm); | |
| (yyval.interm).nodePair.node2 = (yyvsp[-2].interm.intermTypedNode); | |
| } | |
| break; | |
| case 21: | |
| { | |
| (yyval.interm) = (yyvsp[-1].interm); | |
| } | |
| break; | |
| case 22: | |
| { | |
| (yyval.interm) = (yyvsp[-1].interm); | |
| } | |
| break; | |
| case 23: | |
| { | |
| (yyval.interm).function = (yyvsp[-1].interm.function); | |
| (yyval.interm).nodePair.node1 = nullptr; | |
| } | |
| break; | |
| case 24: | |
| { | |
| (yyval.interm).function = (yyvsp[0].interm.function); | |
| (yyval.interm).nodePair.node1 = nullptr; | |
| } | |
| break; | |
| case 25: | |
| { | |
| const TType *type = new TType((yyvsp[0].interm.intermTypedNode)->getType()); | |
| (yyvsp[-1].interm.function)->addParameter(TConstParameter(type)); | |
| (yyval.interm).function = (yyvsp[-1].interm.function); | |
| (yyval.interm).nodePair.node1 = TIntermediate::MakeAggregate((yyvsp[0].interm.intermTypedNode), (yylsp[0])); | |
| } | |
| break; | |
| case 26: | |
| { | |
| const TType *type = new TType((yyvsp[0].interm.intermTypedNode)->getType()); | |
| (yyvsp[-2].interm).function->addParameter(TConstParameter(type)); | |
| (yyval.interm).function = (yyvsp[-2].interm).function; | |
| (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 27: | |
| { | |
| (yyval.interm.function) = (yyvsp[-1].interm.function); | |
| } | |
| break; | |
| case 28: | |
| { | |
| if ((yyvsp[0].interm.type).array) { | |
| ES3_OR_NEWER("[]", (yylsp[0]), "array constructor"); | |
| } | |
| (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type)); | |
| } | |
| break; | |
| case 29: | |
| { | |
| context->checkIsNotReserved((yylsp[0]), *(yyvsp[0].lex).string); | |
| const TType *type = TCache::getType(EbtVoid, EbpUndefined); | |
| TFunction *function = new TFunction((yyvsp[0].lex).string, type); | |
| (yyval.interm.function) = function; | |
| } | |
| break; | |
| case 30: | |
| { | |
| context->checkIsNotReserved((yylsp[0]), *(yyvsp[0].lex).string); | |
| const TType *type = TCache::getType(EbtVoid, EbpUndefined); | |
| TFunction *function = new TFunction((yyvsp[0].lex).string, type); | |
| (yyval.interm.function) = function; | |
| } | |
| break; | |
| case 31: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 32: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 33: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 34: | |
| { | |
| if ((yyvsp[-1].interm).op != EOpNull) { | |
| (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } else | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 35: | |
| { (yyval.interm).op = EOpPositive; } | |
| break; | |
| case 36: | |
| { (yyval.interm).op = EOpNegative; } | |
| break; | |
| case 37: | |
| { (yyval.interm).op = EOpLogicalNot; } | |
| break; | |
| case 38: | |
| { | |
| ES3_OR_NEWER("~", (yyloc), "bit-wise operator"); | |
| (yyval.interm).op = EOpBitwiseNot; | |
| } | |
| break; | |
| case 39: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 40: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 41: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 42: | |
| { | |
| ES3_OR_NEWER("%", (yylsp[-1]), "integer modulus operator"); | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 43: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 44: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 45: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 46: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 47: | |
| { | |
| ES3_OR_NEWER("<<", (yylsp[-1]), "bit-wise operator"); | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 48: | |
| { | |
| ES3_OR_NEWER(">>", (yylsp[-1]), "bit-wise operator"); | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 49: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 50: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 51: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 52: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 53: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 54: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 55: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 56: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 57: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 58: | |
| { | |
| ES3_OR_NEWER("&", (yylsp[-1]), "bit-wise operator"); | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 59: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 60: | |
| { | |
| ES3_OR_NEWER("^", (yylsp[-1]), "bit-wise operator"); | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 61: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 62: | |
| { | |
| ES3_OR_NEWER("|", (yylsp[-1]), "bit-wise operator"); | |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 63: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 64: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 65: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 66: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 67: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 68: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 69: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 70: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addTernarySelection((yyvsp[-4].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-3])); | |
| } | |
| break; | |
| case 71: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 72: | |
| { | |
| context->checkCanBeLValue((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)); | |
| (yyval.interm.intermTypedNode) = context->addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 73: | |
| { (yyval.interm).op = EOpAssign; } | |
| break; | |
| case 74: | |
| { (yyval.interm).op = EOpMulAssign; } | |
| break; | |
| case 75: | |
| { (yyval.interm).op = EOpDivAssign; } | |
| break; | |
| case 76: | |
| { | |
| ES3_OR_NEWER("%=", (yyloc), "integer modulus operator"); | |
| (yyval.interm).op = EOpIModAssign; | |
| } | |
| break; | |
| case 77: | |
| { (yyval.interm).op = EOpAddAssign; } | |
| break; | |
| case 78: | |
| { (yyval.interm).op = EOpSubAssign; } | |
| break; | |
| case 79: | |
| { | |
| ES3_OR_NEWER("<<=", (yyloc), "bit-wise operator"); | |
| (yyval.interm).op = EOpBitShiftLeftAssign; | |
| } | |
| break; | |
| case 80: | |
| { | |
| ES3_OR_NEWER(">>=", (yyloc), "bit-wise operator"); | |
| (yyval.interm).op = EOpBitShiftRightAssign; | |
| } | |
| break; | |
| case 81: | |
| { | |
| ES3_OR_NEWER("&=", (yyloc), "bit-wise operator"); | |
| (yyval.interm).op = EOpBitwiseAndAssign; | |
| } | |
| break; | |
| case 82: | |
| { | |
| ES3_OR_NEWER("^=", (yyloc), "bit-wise operator"); | |
| (yyval.interm).op = EOpBitwiseXorAssign; | |
| } | |
| break; | |
| case 83: | |
| { | |
| ES3_OR_NEWER("|=", (yyloc), "bit-wise operator"); | |
| (yyval.interm).op = EOpBitwiseOrAssign; | |
| } | |
| break; | |
| case 84: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 85: | |
| { | |
| (yyval.interm.intermTypedNode) = context->addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); | |
| } | |
| break; | |
| case 86: | |
| { | |
| context->checkIsConst((yyvsp[0].interm.intermTypedNode)); | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 87: | |
| { | |
| context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string); | |
| (yyval.lex) = (yyvsp[-1].lex); | |
| } | |
| break; | |
| case 88: | |
| { | |
| (yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration(*((yyvsp[-1].interm).function), (yylsp[-1])); | |
| } | |
| break; | |
| case 89: | |
| { | |
| (yyval.interm.intermNode) = (yyvsp[-1].interm).intermDeclaration; | |
| } | |
| break; | |
| case 90: | |
| { | |
| if (((yyvsp[-2].interm.precision) == EbpHigh) && (context->getShaderType() == GL_FRAGMENT_SHADER) && !context->getFragmentPrecisionHigh()) { | |
| context->error((yylsp[-3]), "precision is not supported in fragment shader", "highp"); | |
| } | |
| if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) { | |
| context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).getBasicType())); | |
| } | |
| (yyval.interm.intermNode) = 0; | |
| } | |
| break; | |
| case 91: | |
| { | |
| ES3_OR_NEWER((yyvsp[-3].lex).string->c_str(), (yylsp[-4]), "interface blocks"); | |
| (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yyloc), NULL, (yyloc)); | |
| } | |
| break; | |
| case 92: | |
| { | |
| ES3_OR_NEWER((yyvsp[-4].lex).string->c_str(), (yylsp[-5]), "interface blocks"); | |
| (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yyloc)); | |
| } | |
| break; | |
| case 93: | |
| { | |
| ES3_OR_NEWER((yyvsp[-7].lex).string->c_str(), (yylsp[-8]), "interface blocks"); | |
| (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-8].interm.typeQualifierBuilder), (yylsp[-7]), *(yyvsp[-7].lex).string, (yyvsp[-6].interm.fieldList), (yyvsp[-4].lex).string, (yylsp[-4]), (yyvsp[-2].interm.intermTypedNode), (yylsp[-3])); | |
| } | |
| break; | |
| case 94: | |
| { | |
| context->parseGlobalLayoutQualifier(*(yyvsp[-1].interm.typeQualifierBuilder)); | |
| (yyval.interm.intermNode) = 0; | |
| } | |
| break; | |
| case 95: | |
| { | |
| (yyval.interm.intermNode) = context->parseInvariantDeclaration(*(yyvsp[-2].interm.typeQualifierBuilder), (yylsp[-1]), (yyvsp[-1].lex).string, (yyvsp[-1].lex).symbol); | |
| } | |
| break; | |
| case 96: | |
| { | |
| (yyval.interm).function = context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function)); | |
| context->exitFunctionDeclaration(); | |
| } | |
| break; | |
| case 97: | |
| { | |
| (yyval.interm.function) = (yyvsp[0].interm.function); | |
| } | |
| break; | |
| case 98: | |
| { | |
| (yyval.interm.function) = (yyvsp[0].interm.function); | |
| } | |
| break; | |
| case 99: | |
| { | |
| // Add the parameter | |
| (yyval.interm.function) = (yyvsp[-1].interm.function); | |
| if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) | |
| (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param.turnToConst()); | |
| else | |
| delete (yyvsp[0].interm).param.type; | |
| } | |
| break; | |
| case 100: | |
| { | |
| // | |
| // Only first parameter of one-parameter functions can be void | |
| // The check for named parameters not being void is done in parameter_declarator | |
| // | |
| if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) { | |
| // | |
| // This parameter > first is void | |
| // | |
| context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void"); | |
| delete (yyvsp[0].interm).param.type; | |
| } else { | |
| // Add the parameter | |
| (yyval.interm.function) = (yyvsp[-2].interm.function); | |
| (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param.turnToConst()); | |
| } | |
| } | |
| break; | |
| case 101: | |
| { | |
| (yyval.interm.function) = context->parseFunctionHeader((yyvsp[-2].interm.type), (yyvsp[-1].lex).string, (yylsp[-1])); | |
| context->symbolTable.push(); | |
| context->enterFunctionDeclaration(); | |
| } | |
| break; | |
| case 102: | |
| { | |
| if ((yyvsp[-1].interm.type).getBasicType() == EbtVoid) { | |
| context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str()); | |
| } | |
| context->checkIsNotReserved((yylsp[0]), *(yyvsp[0].lex).string); | |
| TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))}; | |
| (yyval.interm).param = param; | |
| } | |
| break; | |
| case 103: | |
| { | |
| // Check that we can make an array out of this type | |
| context->checkIsValidTypeForArray((yylsp[-2]), (yyvsp[-4].interm.type)); | |
| context->checkIsNotReserved((yylsp[-3]), *(yyvsp[-3].lex).string); | |
| unsigned int size = context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); | |
| (yyvsp[-4].interm.type).setArraySize(size); | |
| TType* type = new TType((yyvsp[-4].interm.type)); | |
| TParameter param = { (yyvsp[-3].lex).string, type }; | |
| (yyval.interm).param = param; | |
| } | |
| break; | |
| case 104: | |
| { | |
| (yyval.interm) = (yyvsp[0].interm); | |
| context->checkIsParameterQualifierValid((yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm).param.type); | |
| } | |
| break; | |
| case 105: | |
| { | |
| (yyval.interm) = (yyvsp[0].interm); | |
| (yyval.interm).param.type->setQualifier(EvqIn); | |
| } | |
| break; | |
| case 106: | |
| { | |
| (yyval.interm) = (yyvsp[0].interm); | |
| context->checkIsParameterQualifierValid((yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm).param.type); | |
| } | |
| break; | |
| case 107: | |
| { | |
| (yyval.interm) = (yyvsp[0].interm); | |
| (yyval.interm).param.type->setQualifier(EvqIn); | |
| } | |
| break; | |
| case 108: | |
| { | |
| TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; | |
| (yyval.interm).param = param; | |
| } | |
| break; | |
| case 109: | |
| { | |
| (yyval.interm) = (yyvsp[0].interm); | |
| } | |
| break; | |
| case 110: | |
| { | |
| (yyval.interm) = (yyvsp[-2].interm); | |
| context->parseDeclarator((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string, (yyval.interm).intermDeclaration); | |
| } | |
| break; | |
| case 111: | |
| { | |
| (yyval.interm) = (yyvsp[-5].interm); | |
| context->parseArrayDeclarator((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), (yyval.interm).intermDeclaration); | |
| } | |
| break; | |
| case 112: | |
| { | |
| ES3_OR_NEWER("[]", (yylsp[-4]), "implicitly sized array"); | |
| (yyval.interm) = (yyvsp[-6].interm); | |
| context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); | |
| } | |
| break; | |
| case 113: | |
| { | |
| ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); | |
| (yyval.interm) = (yyvsp[-7].interm); | |
| context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); | |
| } | |
| break; | |
| case 114: | |
| { | |
| (yyval.interm) = (yyvsp[-4].interm); | |
| context->parseInitDeclarator((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); | |
| } | |
| break; | |
| case 115: | |
| { | |
| (yyval.interm).type = (yyvsp[0].interm.type); | |
| (yyval.interm).intermDeclaration = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), ""); | |
| } | |
| break; | |
| case 116: | |
| { | |
| (yyval.interm).type = (yyvsp[-1].interm.type); | |
| (yyval.interm).intermDeclaration = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string); | |
| } | |
| break; | |
| case 117: | |
| { | |
| (yyval.interm).type = (yyvsp[-4].interm.type); | |
| (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); | |
| } | |
| break; | |
| case 118: | |
| { | |
| ES3_OR_NEWER("[]", (yylsp[-3]), "implicitly sized array"); | |
| (yyval.interm).type = (yyvsp[-5].interm.type); | |
| (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); | |
| } | |
| break; | |
| case 119: | |
| { | |
| ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); | |
| (yyval.interm).type = (yyvsp[-6].interm.type); | |
| (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); | |
| } | |
| break; | |
| case 120: | |
| { | |
| (yyval.interm).type = (yyvsp[-3].interm.type); | |
| (yyval.interm).intermDeclaration = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); | |
| } | |
| break; | |
| case 121: | |
| { | |
| context->addFullySpecifiedType(&(yyvsp[0].interm.type)); | |
| (yyval.interm.type) = (yyvsp[0].interm.type); | |
| } | |
| break; | |
| case 122: | |
| { | |
| (yyval.interm.type) = context->addFullySpecifiedType(*(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.type)); | |
| } | |
| break; | |
| case 123: | |
| { | |
| (yyval.interm.qualifier) = EvqSmooth; | |
| } | |
| break; | |
| case 124: | |
| { | |
| (yyval.interm.qualifier) = EvqFlat; | |
| } | |
| break; | |
| case 125: | |
| { | |
| (yyval.interm.typeQualifierBuilder) = context->createTypeQualifierBuilder((yylsp[0])); | |
| (yyval.interm.typeQualifierBuilder)->appendQualifier((yyvsp[0].interm.qualifierWrapper)); | |
| } | |
| break; | |
| case 126: | |
| { | |
| (yyval.interm.typeQualifierBuilder) = (yyvsp[-1].interm.typeQualifierBuilder); | |
| (yyval.interm.typeQualifierBuilder)->appendQualifier((yyvsp[0].interm.qualifierWrapper)); | |
| } | |
| break; | |
| case 127: | |
| { | |
| // empty | |
| } | |
| break; | |
| case 128: | |
| { | |
| context->checkLocalVariableConstStorageQualifier(*(yyvsp[0].interm.qualifierWrapper)); | |
| (yyval.interm.qualifierWrapper) = (yyvsp[0].interm.qualifierWrapper); | |
| } | |
| break; | |
| case 129: | |
| { | |
| context->checkIsAtGlobalLevel((yylsp[0]), "layout"); | |
| (yyval.interm.qualifierWrapper) = new TLayoutQualifierWrapper((yyvsp[0].interm.layoutQualifier), (yylsp[0])); | |
| } | |
| break; | |
| case 130: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TPrecisionQualifierWrapper((yyvsp[0].interm.precision), (yylsp[0])); | |
| } | |
| break; | |
| case 131: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TInterpolationQualifierWrapper((yyvsp[0].interm.qualifier), (yylsp[0])); | |
| } | |
| break; | |
| case 132: | |
| { | |
| context->checkIsAtGlobalLevel((yylsp[0]), "invariant"); | |
| (yyval.interm.qualifierWrapper) = new TInvariantQualifierWrapper((yylsp[0])); | |
| } | |
| break; | |
| case 133: | |
| { | |
| VERTEX_ONLY("attribute", (yylsp[0])); | |
| ES2_ONLY("attribute", (yylsp[0])); | |
| context->checkIsAtGlobalLevel((yylsp[0]), "attribute"); | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqAttribute, (yylsp[0])); | |
| } | |
| break; | |
| case 134: | |
| { | |
| ES2_ONLY("varying", (yylsp[0])); | |
| context->checkIsAtGlobalLevel((yylsp[0]), "varying"); | |
| if (context->getShaderType() == GL_VERTEX_SHADER) | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVaryingOut, (yylsp[0])); | |
| else | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVaryingIn, (yylsp[0])); | |
| } | |
| break; | |
| case 135: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqConst, (yylsp[0])); | |
| } | |
| break; | |
| case 136: | |
| { | |
| if (context->declaringFunction()) | |
| { | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqIn, (yylsp[0])); | |
| } | |
| else if (context->getShaderType() == GL_FRAGMENT_SHADER) | |
| { | |
| ES3_OR_NEWER("in", (yylsp[0]), "storage qualifier"); | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqFragmentIn, (yylsp[0])); | |
| } | |
| else if (context->getShaderType() == GL_VERTEX_SHADER) | |
| { | |
| ES3_OR_NEWER("in", (yylsp[0]), "storage qualifier"); | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVertexIn, (yylsp[0])); | |
| } | |
| else | |
| { | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqComputeIn, (yylsp[0])); | |
| } | |
| } | |
| break; | |
| case 137: | |
| { | |
| if (context->declaringFunction()) | |
| { | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqOut, (yylsp[0])); | |
| } | |
| else | |
| { | |
| ES3_OR_NEWER("out", (yylsp[0]), "storage qualifier"); | |
| NON_COMPUTE_ONLY("out", (yylsp[0])); | |
| if (context->getShaderType() == GL_FRAGMENT_SHADER) | |
| { | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqFragmentOut, (yylsp[0])); | |
| } | |
| else | |
| { | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVertexOut, (yylsp[0])); | |
| } | |
| } | |
| } | |
| break; | |
| case 138: | |
| { | |
| if (!context->declaringFunction()) | |
| { | |
| context->error((yylsp[0]), "invalid inout qualifier", "'inout' can be only used with function parameters"); | |
| } | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqInOut, (yylsp[0])); | |
| } | |
| break; | |
| case 139: | |
| { | |
| ES3_OR_NEWER("centroid", (yylsp[0]), "storage qualifier"); | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqCentroid, (yylsp[0])); | |
| } | |
| break; | |
| case 140: | |
| { | |
| context->checkIsAtGlobalLevel((yylsp[0]), "uniform"); | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqUniform, (yylsp[0])); | |
| } | |
| break; | |
| case 141: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqReadOnly, (yylsp[0])); | |
| } | |
| break; | |
| case 142: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqWriteOnly, (yylsp[0])); | |
| } | |
| break; | |
| case 143: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqCoherent, (yylsp[0])); | |
| } | |
| break; | |
| case 144: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqRestrict, (yylsp[0])); | |
| } | |
| break; | |
| case 145: | |
| { | |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqVolatile, (yylsp[0])); | |
| } | |
| break; | |
| case 146: | |
| { | |
| context->checkIsAtGlobalLevel((yylsp[0]), "shared"); | |
| COMPUTE_ONLY("shared", (yylsp[0])); | |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqShared, (yylsp[0])); | |
| } | |
| break; | |
| case 147: | |
| { | |
| (yyval.interm.type) = (yyvsp[0].interm.type); | |
| (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).getBasicType()); | |
| } | |
| break; | |
| case 148: | |
| { | |
| (yyval.interm.precision) = EbpHigh; | |
| } | |
| break; | |
| case 149: | |
| { | |
| (yyval.interm.precision) = EbpMedium; | |
| } | |
| break; | |
| case 150: | |
| { | |
| (yyval.interm.precision) = EbpLow; | |
| } | |
| break; | |
| case 151: | |
| { | |
| ES3_OR_NEWER("layout", (yylsp[-3]), "qualifier"); | |
| (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier); | |
| } | |
| break; | |
| case 152: | |
| { | |
| (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier); | |
| } | |
| break; | |
| case 153: | |
| { | |
| (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0])); | |
| } | |
| break; | |
| case 154: | |
| { | |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0])); | |
| } | |
| break; | |
| case 155: | |
| { | |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); | |
| } | |
| break; | |
| case 156: | |
| { | |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); | |
| } | |
| break; | |
| case 157: | |
| { | |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier("shared", (yylsp[0])); | |
| } | |
| break; | |
| case 158: | |
| { | |
| (yyval.interm.type).initialize((yyvsp[0].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); | |
| } | |
| break; | |
| case 159: | |
| { | |
| ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array"); | |
| (yyval.interm.type).initialize((yyvsp[-2].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); | |
| (yyval.interm.type).setArraySize(0); | |
| } | |
| break; | |
| case 160: | |
| { | |
| (yyval.interm.type).initialize((yyvsp[-3].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); | |
| if (context->checkIsValidTypeForArray((yylsp[-2]), (yyval.interm.type))) | |
| { | |
| unsigned int size = context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); | |
| (yyval.interm.type).setArraySize(size); | |
| } | |
| } | |
| break; | |
| case 161: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtVoid, (yylsp[0])); | |
| } | |
| break; | |
| case 162: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| } | |
| break; | |
| case 163: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); | |
| } | |
| break; | |
| case 164: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); | |
| } | |
| break; | |
| case 165: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); | |
| } | |
| break; | |
| case 166: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); | |
| } | |
| break; | |
| case 167: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); | |
| } | |
| break; | |
| case 168: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); | |
| } | |
| break; | |
| case 169: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); | |
| } | |
| break; | |
| case 170: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); | |
| } | |
| break; | |
| case 171: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); | |
| } | |
| break; | |
| case 172: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); | |
| } | |
| break; | |
| case 173: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); | |
| } | |
| break; | |
| case 174: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); | |
| } | |
| break; | |
| case 175: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); | |
| } | |
| break; | |
| case 176: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); | |
| } | |
| break; | |
| case 177: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); | |
| } | |
| break; | |
| case 178: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(2, 2); | |
| } | |
| break; | |
| case 179: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(3, 3); | |
| } | |
| break; | |
| case 180: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(4, 4); | |
| } | |
| break; | |
| case 181: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(2, 3); | |
| } | |
| break; | |
| case 182: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(3, 2); | |
| } | |
| break; | |
| case 183: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(2, 4); | |
| } | |
| break; | |
| case 184: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(4, 2); | |
| } | |
| break; | |
| case 185: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(3, 4); | |
| } | |
| break; | |
| case 186: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).setMatrix(4, 3); | |
| } | |
| break; | |
| case 187: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2D, (yylsp[0])); | |
| } | |
| break; | |
| case 188: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler3D, (yylsp[0])); | |
| } | |
| break; | |
| case 189: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCube, (yylsp[0])); | |
| } | |
| break; | |
| case 190: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArray, (yylsp[0])); | |
| } | |
| break; | |
| case 191: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2D, (yylsp[0])); | |
| } | |
| break; | |
| case 192: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler3D, (yylsp[0])); | |
| } | |
| break; | |
| case 193: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCube, (yylsp[0])); | |
| } | |
| break; | |
| case 194: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DArray, (yylsp[0])); | |
| } | |
| break; | |
| case 195: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2D, (yylsp[0])); | |
| } | |
| break; | |
| case 196: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler3D, (yylsp[0])); | |
| } | |
| break; | |
| case 197: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCube, (yylsp[0])); | |
| } | |
| break; | |
| case 198: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DArray, (yylsp[0])); | |
| } | |
| break; | |
| case 199: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DShadow, (yylsp[0])); | |
| } | |
| break; | |
| case 200: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeShadow, (yylsp[0])); | |
| } | |
| break; | |
| case 201: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArrayShadow, (yylsp[0])); | |
| } | |
| break; | |
| case 202: | |
| { | |
| if (!context->supportsExtension("GL_OES_EGL_image_external") && | |
| !context->supportsExtension("GL_NV_EGL_stream_consumer_external")) { | |
| context->error((yylsp[0]), "unsupported type", "samplerExternalOES"); | |
| } | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternalOES, (yylsp[0])); | |
| } | |
| break; | |
| case 203: | |
| { | |
| if (!context->supportsExtension("GL_ARB_texture_rectangle")) { | |
| context->error((yylsp[0]), "unsupported type", "sampler2DRect"); | |
| } | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DRect, (yylsp[0])); | |
| } | |
| break; | |
| case 204: | |
| { | |
| (yyval.interm.typeSpecifierNonArray) = (yyvsp[0].interm.typeSpecifierNonArray); | |
| } | |
| break; | |
| case 205: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2D, (yylsp[0])); | |
| } | |
| break; | |
| case 206: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2D, (yylsp[0])); | |
| } | |
| break; | |
| case 207: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2D, (yylsp[0])); | |
| } | |
| break; | |
| case 208: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImage3D, (yylsp[0])); | |
| } | |
| break; | |
| case 209: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage3D, (yylsp[0])); | |
| } | |
| break; | |
| case 210: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage3D, (yylsp[0])); | |
| } | |
| break; | |
| case 211: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2DArray, (yylsp[0])); | |
| } | |
| break; | |
| case 212: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2DArray, (yylsp[0])); | |
| } | |
| break; | |
| case 213: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2DArray, (yylsp[0])); | |
| } | |
| break; | |
| case 214: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImageCube, (yylsp[0])); | |
| } | |
| break; | |
| case 215: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCube, (yylsp[0])); | |
| } | |
| break; | |
| case 216: | |
| { | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCube, (yylsp[0])); | |
| } | |
| break; | |
| case 217: | |
| { | |
| // | |
| // This is for user defined type names. The lexical phase looked up the | |
| // type. | |
| // | |
| TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType(); | |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtStruct, (yylsp[0])); | |
| (yyval.interm.typeSpecifierNonArray).userDef = &structure; | |
| } | |
| break; | |
| case 218: | |
| { context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string); } | |
| break; | |
| case 219: | |
| { | |
| (yyval.interm.typeSpecifierNonArray) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList)); | |
| } | |
| break; | |
| case 220: | |
| { context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string); } | |
| break; | |
| case 221: | |
| { | |
| (yyval.interm.typeSpecifierNonArray) = context->addStructure((yylsp[-4]), (yyloc), NewPoolTString(""), (yyvsp[-1].interm.fieldList)); | |
| } | |
| break; | |
| case 222: | |
| { | |
| (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList); | |
| } | |
| break; | |
| case 223: | |
| { | |
| (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList); | |
| for (size_t i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) { | |
| TField* field = (*(yyvsp[0].interm.fieldList))[i]; | |
| for (size_t j = 0; j < (yyval.interm.fieldList)->size(); ++j) { | |
| if ((*(yyval.interm.fieldList))[j]->name() == field->name()) { | |
| context->error((yylsp[0]), "duplicate field name in structure:", "struct", field->name().c_str()); | |
| } | |
| } | |
| (yyval.interm.fieldList)->push_back(field); | |
| } | |
| } | |
| break; | |
| case 224: | |
| { | |
| (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); | |
| } | |
| break; | |
| case 225: | |
| { | |
| // ES3 Only, but errors should be handled elsewhere | |
| (yyval.interm.fieldList) = context->addStructDeclaratorListWithQualifiers(*(yyvsp[-3].interm.typeQualifierBuilder), &(yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); | |
| } | |
| break; | |
| case 226: | |
| { | |
| (yyval.interm.fieldList) = NewPoolTFieldList(); | |
| (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field)); | |
| } | |
| break; | |
| case 227: | |
| { | |
| (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field)); | |
| } | |
| break; | |
| case 228: | |
| { | |
| context->checkIsNotReserved((yylsp[0]), *(yyvsp[0].lex).string); | |
| TType* type = new TType(EbtVoid, EbpUndefined); | |
| (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0])); | |
| } | |
| break; | |
| case 229: | |
| { | |
| context->checkIsNotReserved((yylsp[-3]), *(yyvsp[-3].lex).string); | |
| TType* type = new TType(EbtVoid, EbpUndefined); | |
| unsigned int size = context->checkIsValidArraySize((yylsp[-1]), (yyvsp[-1].interm.intermTypedNode)); | |
| type->setArraySize(size); | |
| (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3])); | |
| } | |
| break; | |
| case 230: | |
| { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } | |
| break; | |
| case 231: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 232: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); } | |
| break; | |
| case 233: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 234: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 235: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 236: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 237: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); } | |
| break; | |
| case 238: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); } | |
| break; | |
| case 239: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 240: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 241: | |
| { (yyval.interm.intermBlock) = 0; } | |
| break; | |
| case 242: | |
| { context->symbolTable.push(); } | |
| break; | |
| case 243: | |
| { context->symbolTable.pop(); } | |
| break; | |
| case 244: | |
| { | |
| if ((yyvsp[-2].interm.intermBlock) != 0) { | |
| (yyvsp[-2].interm.intermBlock)->setLine((yyloc)); | |
| } | |
| (yyval.interm.intermBlock) = (yyvsp[-2].interm.intermBlock); | |
| } | |
| break; | |
| case 245: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); } | |
| break; | |
| case 246: | |
| { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 247: | |
| { context->symbolTable.push(); } | |
| break; | |
| case 248: | |
| { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); } | |
| break; | |
| case 249: | |
| { context->symbolTable.push(); } | |
| break; | |
| case 250: | |
| { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } | |
| break; | |
| case 251: | |
| { | |
| (yyval.interm.intermBlock) = 0; | |
| } | |
| break; | |
| case 252: | |
| { | |
| if ((yyvsp[-1].interm.intermBlock)) { | |
| (yyvsp[-1].interm.intermBlock)->setLine((yyloc)); | |
| } | |
| (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); | |
| } | |
| break; | |
| case 253: | |
| { | |
| (yyval.interm.intermBlock) = new TIntermBlock(); | |
| (yyval.interm.intermBlock)->setLine((yyloc)); | |
| (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); | |
| } | |
| break; | |
| case 254: | |
| { | |
| (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); | |
| (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); | |
| } | |
| break; | |
| case 255: | |
| { (yyval.interm.intermNode) = 0; } | |
| break; | |
| case 256: | |
| { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); } | |
| break; | |
| case 257: | |
| { | |
| context->checkIsScalarBool((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)); | |
| (yyval.interm.intermNode) = context->intermediate.addIfElse((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4])); | |
| } | |
| break; | |
| case 258: | |
| { | |
| (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); | |
| (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); | |
| } | |
| break; | |
| case 259: | |
| { | |
| (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); | |
| (yyval.interm.nodePair).node2 = 0; | |
| } | |
| break; | |
| case 260: | |
| { context->incrSwitchNestingLevel(); } | |
| break; | |
| case 261: | |
| { | |
| (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermBlock), (yylsp[-5])); | |
| context->decrSwitchNestingLevel(); | |
| } | |
| break; | |
| case 262: | |
| { | |
| (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); | |
| } | |
| break; | |
| case 263: | |
| { | |
| (yyval.interm.intermCase) = context->addDefault((yylsp[-1])); | |
| } | |
| break; | |
| case 264: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| context->checkIsScalarBool((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)); | |
| } | |
| break; | |
| case 265: | |
| { | |
| TIntermBinary *initNode = nullptr; | |
| context->checkIsScalarBool((yylsp[-2]), (yyvsp[-3].interm.type)); | |
| if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &initNode)) | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| else { | |
| (yyval.interm.intermTypedNode) = 0; | |
| } | |
| } | |
| break; | |
| case 266: | |
| { context->symbolTable.push(); context->incrLoopNestingLevel(); } | |
| break; | |
| case 267: | |
| { | |
| context->symbolTable.pop(); | |
| (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[0].interm.intermNode), (yylsp[-5])); | |
| context->decrLoopNestingLevel(); | |
| } | |
| break; | |
| case 268: | |
| { context->incrLoopNestingLevel(); } | |
| break; | |
| case 269: | |
| { | |
| context->checkIsScalarBool((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)); | |
| (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[-5].interm.intermNode), (yylsp[-4])); | |
| context->decrLoopNestingLevel(); | |
| } | |
| break; | |
| case 270: | |
| { context->symbolTable.push(); context->incrLoopNestingLevel(); } | |
| break; | |
| case 271: | |
| { | |
| context->symbolTable.pop(); | |
| (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6])); | |
| context->decrLoopNestingLevel(); | |
| } | |
| break; | |
| case 272: | |
| { | |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); | |
| } | |
| break; | |
| case 273: | |
| { | |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); | |
| } | |
| break; | |
| case 274: | |
| { | |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 275: | |
| { | |
| (yyval.interm.intermTypedNode) = 0; | |
| } | |
| break; | |
| case 276: | |
| { | |
| (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); | |
| (yyval.interm.nodePair).node2 = 0; | |
| } | |
| break; | |
| case 277: | |
| { | |
| (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); | |
| (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); | |
| } | |
| break; | |
| case 278: | |
| { | |
| (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1])); | |
| } | |
| break; | |
| case 279: | |
| { | |
| (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1])); | |
| } | |
| break; | |
| case 280: | |
| { | |
| (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1])); | |
| } | |
| break; | |
| case 281: | |
| { | |
| (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); | |
| } | |
| break; | |
| case 282: | |
| { | |
| FRAG_ONLY("discard", (yylsp[-1])); | |
| (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1])); | |
| } | |
| break; | |
| case 283: | |
| { | |
| (yyval.interm.intermBlock) = new TIntermBlock(); | |
| (yyval.interm.intermBlock)->setLine((yyloc)); | |
| (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); | |
| context->setTreeRoot((yyval.interm.intermBlock)); | |
| } | |
| break; | |
| case 284: | |
| { | |
| (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); | |
| } | |
| break; | |
| case 285: | |
| { | |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); | |
| } | |
| break; | |
| case 286: | |
| { | |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); | |
| } | |
| break; | |
| case 287: | |
| { | |
| context->parseFunctionDefinitionHeader((yylsp[0]), &((yyvsp[0].interm).function), &(yyvsp[0].interm).intermAggregate); | |
| } | |
| break; | |
| case 288: | |
| { | |
| (yyval.interm.intermNode) = context->addFunctionDefinition(*((yyvsp[-2].interm).function), (yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermBlock), (yylsp[-2])); | |
| } | |
| break; | |
| default: break; | |
| } | |
| /* User semantic actions sometimes alter yychar, and that requires | |
| that yytoken be updated with the new translation. We take the | |
| approach of translating immediately before every use of yytoken. | |
| One alternative is translating here after every semantic action, | |
| but that translation would be missed if the semantic action invokes | |
| YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or | |
| if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an | |
| incorrect destructor might then be invoked immediately. In the | |
| case of YYERROR or YYBACKUP, subsequent parser actions might lead | |
| to an incorrect destructor call or verbose syntax error message | |
| before the lookahead is translated. */ | |
| YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); | |
| YYPOPSTACK (yylen); | |
| yylen = 0; | |
| YY_STACK_PRINT (yyss, yyssp); | |
| *++yyvsp = yyval; | |
| *++yylsp = yyloc; | |
| /* Now 'shift' the result of the reduction. Determine what state | |
| that goes to, based on the state we popped back to and the rule | |
| number reduced by. */ | |
| yyn = yyr1[yyn]; | |
| yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; | |
| if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
| yystate = yytable[yystate]; | |
| else | |
| yystate = yydefgoto[yyn - YYNTOKENS]; | |
| goto yynewstate; | |
| /*--------------------------------------. | |
| | yyerrlab -- here on detecting error. | | |
| `--------------------------------------*/ | |
| yyerrlab: | |
| /* Make sure we have latest lookahead translation. See comments at | |
| user semantic actions for why this is necessary. */ | |
| yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); | |
| /* If not already recovering from an error, report this error. */ | |
| if (!yyerrstatus) | |
| { | |
| ++yynerrs; | |
| #if ! YYERROR_VERBOSE | |
| yyerror (&yylloc, context, scanner, YY_("syntax error")); | |
| #else | |
| # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ | |
| yyssp, yytoken) | |
| { | |
| char const *yymsgp = YY_("syntax error"); | |
| int yysyntax_error_status; | |
| yysyntax_error_status = YYSYNTAX_ERROR; | |
| if (yysyntax_error_status == 0) | |
| yymsgp = yymsg; | |
| else if (yysyntax_error_status == 1) | |
| { | |
| if (yymsg != yymsgbuf) | |
| YYSTACK_FREE (yymsg); | |
| yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); | |
| if (!yymsg) | |
| { | |
| yymsg = yymsgbuf; | |
| yymsg_alloc = sizeof yymsgbuf; | |
| yysyntax_error_status = 2; | |
| } | |
| else | |
| { | |
| yysyntax_error_status = YYSYNTAX_ERROR; | |
| yymsgp = yymsg; | |
| } | |
| } | |
| yyerror (&yylloc, context, scanner, yymsgp); | |
| if (yysyntax_error_status == 2) | |
| goto yyexhaustedlab; | |
| } | |
| # undef YYSYNTAX_ERROR | |
| #endif | |
| } | |
| yyerror_range[1] = yylloc; | |
| if (yyerrstatus == 3) | |
| { | |
| /* If just tried and failed to reuse lookahead token after an | |
| error, discard it. */ | |
| if (yychar <= YYEOF) | |
| { | |
| /* Return failure if at end of input. */ | |
| if (yychar == YYEOF) | |
| YYABORT; | |
| } | |
| else | |
| { | |
| yydestruct ("Error: discarding", | |
| yytoken, &yylval, &yylloc, context, scanner); | |
| yychar = YYEMPTY; | |
| } | |
| } | |
| /* Else will try to reuse lookahead token after shifting the error | |
| token. */ | |
| goto yyerrlab1; | |
| /*---------------------------------------------------. | |
| | yyerrorlab -- error raised explicitly by YYERROR. | | |
| `---------------------------------------------------*/ | |
| yyerrorlab: | |
| /* Pacify compilers like GCC when the user code never invokes | |
| YYERROR and the label yyerrorlab therefore never appears in user | |
| code. */ | |
| if (/*CONSTCOND*/ 0) | |
| goto yyerrorlab; | |
| yyerror_range[1] = yylsp[1-yylen]; | |
| /* Do not reclaim the symbols of the rule whose action triggered | |
| this YYERROR. */ | |
| YYPOPSTACK (yylen); | |
| yylen = 0; | |
| YY_STACK_PRINT (yyss, yyssp); | |
| yystate = *yyssp; | |
| goto yyerrlab1; | |
| /*-------------------------------------------------------------. | |
| | yyerrlab1 -- common code for both syntax error and YYERROR. | | |
| `-------------------------------------------------------------*/ | |
| yyerrlab1: | |
| yyerrstatus = 3; /* Each real token shifted decrements this. */ | |
| for (;;) | |
| { | |
| yyn = yypact[yystate]; | |
| if (!yypact_value_is_default (yyn)) | |
| { | |
| yyn += YYTERROR; | |
| if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) | |
| { | |
| yyn = yytable[yyn]; | |
| if (0 < yyn) | |
| break; | |
| } | |
| } | |
| /* Pop the current state because it cannot handle the error token. */ | |
| if (yyssp == yyss) | |
| YYABORT; | |
| yyerror_range[1] = *yylsp; | |
| yydestruct ("Error: popping", | |
| yystos[yystate], yyvsp, yylsp, context, scanner); | |
| YYPOPSTACK (1); | |
| yystate = *yyssp; | |
| YY_STACK_PRINT (yyss, yyssp); | |
| } | |
| YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN | |
| *++yyvsp = yylval; | |
| YY_IGNORE_MAYBE_UNINITIALIZED_END | |
| yyerror_range[2] = yylloc; | |
| /* Using YYLLOC is tempting, but would change the location of | |
| the lookahead. YYLOC is available though. */ | |
| YYLLOC_DEFAULT (yyloc, yyerror_range, 2); | |
| *++yylsp = yyloc; | |
| /* Shift the error token. */ | |
| YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); | |
| yystate = yyn; | |
| goto yynewstate; | |
| /*-------------------------------------. | |
| | yyacceptlab -- YYACCEPT comes here. | | |
| `-------------------------------------*/ | |
| yyacceptlab: | |
| yyresult = 0; | |
| goto yyreturn; | |
| /*-----------------------------------. | |
| | yyabortlab -- YYABORT comes here. | | |
| `-----------------------------------*/ | |
| yyabortlab: | |
| yyresult = 1; | |
| goto yyreturn; | |
| #if !defined yyoverflow || YYERROR_VERBOSE | |
| /*-------------------------------------------------. | |
| | yyexhaustedlab -- memory exhaustion comes here. | | |
| `-------------------------------------------------*/ | |
| yyexhaustedlab: | |
| yyerror (&yylloc, context, scanner, YY_("memory exhausted")); | |
| yyresult = 2; | |
| /* Fall through. */ | |
| #endif | |
| yyreturn: | |
| if (yychar != YYEMPTY) | |
| { | |
| /* Make sure we have latest lookahead translation. See comments at | |
| user semantic actions for why this is necessary. */ | |
| yytoken = YYTRANSLATE (yychar); | |
| yydestruct ("Cleanup: discarding lookahead", | |
| yytoken, &yylval, &yylloc, context, scanner); | |
| } | |
| /* Do not reclaim the symbols of the rule whose action triggered | |
| this YYABORT or YYACCEPT. */ | |
| YYPOPSTACK (yylen); | |
| YY_STACK_PRINT (yyss, yyssp); | |
| while (yyssp != yyss) | |
| { | |
| yydestruct ("Cleanup: popping", | |
| yystos[*yyssp], yyvsp, yylsp, context, scanner); | |
| YYPOPSTACK (1); | |
| } | |
| #ifndef yyoverflow | |
| if (yyss != yyssa) | |
| YYSTACK_FREE (yyss); | |
| #endif | |
| #if YYERROR_VERBOSE | |
| if (yymsg != yymsgbuf) | |
| YYSTACK_FREE (yymsg); | |
| #endif | |
| return yyresult; | |
| } | |
| int glslang_parse(TParseContext* context) { | |
| return yyparse(context, context->getScanner()); | |
| } |