| /* A Bison parser, made by GNU Bison 3.3.2. */ |
| |
| /* Bison implementation for Yacc-like parsers in C |
| |
| Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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. */ |
| |
| /* Undocumented macros, especially those whose name start with YY_, |
| are private implementation details. Do not rely on them. */ |
| |
| /* Identify Bison output. */ |
| #define YYBISON 1 |
| |
| /* Bison version. */ |
| #define YYBISON_VERSION "3.3.2" |
| |
| /* Skeleton name. */ |
| #define YYSKELETON_NAME "yacc.c" |
| |
| /* Pure parsers. */ |
| #define YYPURE 2 |
| |
| /* Push parsers. */ |
| #define YYPUSH 0 |
| |
| /* Pull parsers. */ |
| #define YYPULL 1 |
| |
| /* First part of user prologue. */ |
| |
| // GENERATED FILE - DO NOT EDIT. |
| // Generated by generate_parser.py from glslang.y |
| // |
| // Copyright 2019 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. |
| // |
| // glslang.y: |
| // Parser for the OpenGL shading language. |
| |
| // 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 |
| #if defined(__clang__) |
| # pragma clang diagnostic ignored "-Wunreachable-code" |
| #endif |
| |
| #include "GLSLANG/ShaderLang.h" |
| #include "angle_gl.h" |
| #include "compiler/translator/Declarator.h" |
| #include "compiler/translator/ParseContext.h" |
| #include "compiler/translator/SymbolTable.h" |
| |
| #define YYENABLE_NLS 0 |
| |
| using namespace sh; |
| |
| #ifndef YY_NULLPTR |
| # if defined __cplusplus |
| # if 201103L <= __cplusplus |
| # define YY_NULLPTR nullptr |
| # else |
| # define YY_NULLPTR 0 |
| # endif |
| # else |
| # define YY_NULLPTR ((void *)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_autogen.h". */ |
| #ifndef YY_YY_GLSLANG_TAB_AUTOGEN_H_INCLUDED |
| # define YY_YY_GLSLANG_TAB_AUTOGEN_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 |
| # define YYLTYPE_IS_TRIVIAL 1 |
| |
| /* Token type. */ |
| # ifndef YYTOKENTYPE |
| # define YYTOKENTYPE |
| enum yytokentype |
| { |
| INVARIANT = 258, |
| PRECISE = 259, |
| HIGH_PRECISION = 260, |
| MEDIUM_PRECISION = 261, |
| LOW_PRECISION = 262, |
| PRECISION = 263, |
| ATTRIBUTE = 264, |
| CONST_QUAL = 265, |
| BOOL_TYPE = 266, |
| FLOAT_TYPE = 267, |
| INT_TYPE = 268, |
| UINT_TYPE = 269, |
| BREAK = 270, |
| CONTINUE = 271, |
| DO = 272, |
| ELSE = 273, |
| FOR = 274, |
| IF = 275, |
| DISCARD = 276, |
| RETURN = 277, |
| SWITCH = 278, |
| CASE = 279, |
| DEFAULT = 280, |
| BVEC2 = 281, |
| BVEC3 = 282, |
| BVEC4 = 283, |
| IVEC2 = 284, |
| IVEC3 = 285, |
| IVEC4 = 286, |
| VEC2 = 287, |
| VEC3 = 288, |
| VEC4 = 289, |
| UVEC2 = 290, |
| UVEC3 = 291, |
| UVEC4 = 292, |
| MATRIX2 = 293, |
| MATRIX3 = 294, |
| MATRIX4 = 295, |
| IN_QUAL = 296, |
| OUT_QUAL = 297, |
| INOUT_QUAL = 298, |
| UNIFORM = 299, |
| BUFFER = 300, |
| VARYING = 301, |
| MATRIX2x3 = 302, |
| MATRIX3x2 = 303, |
| MATRIX2x4 = 304, |
| MATRIX4x2 = 305, |
| MATRIX3x4 = 306, |
| MATRIX4x3 = 307, |
| CENTROID = 308, |
| FLAT = 309, |
| SMOOTH = 310, |
| NOPERSPECTIVE = 311, |
| READONLY = 312, |
| WRITEONLY = 313, |
| COHERENT = 314, |
| RESTRICT = 315, |
| VOLATILE = 316, |
| SHARED = 317, |
| STRUCT = 318, |
| VOID_TYPE = 319, |
| WHILE = 320, |
| SAMPLER2D = 321, |
| SAMPLERCUBE = 322, |
| SAMPLER_EXTERNAL_OES = 323, |
| SAMPLER2DRECT = 324, |
| SAMPLER2DARRAY = 325, |
| ISAMPLER2D = 326, |
| ISAMPLER3D = 327, |
| ISAMPLERCUBE = 328, |
| ISAMPLER2DARRAY = 329, |
| USAMPLER2D = 330, |
| USAMPLER3D = 331, |
| USAMPLERCUBE = 332, |
| USAMPLER2DARRAY = 333, |
| SAMPLER2DMS = 334, |
| ISAMPLER2DMS = 335, |
| USAMPLER2DMS = 336, |
| SAMPLER2DMSARRAY = 337, |
| ISAMPLER2DMSARRAY = 338, |
| USAMPLER2DMSARRAY = 339, |
| SAMPLER3D = 340, |
| SAMPLER3DRECT = 341, |
| SAMPLER2DSHADOW = 342, |
| SAMPLERCUBESHADOW = 343, |
| SAMPLER2DARRAYSHADOW = 344, |
| SAMPLERVIDEOWEBGL = 345, |
| SAMPLEREXTERNAL2DY2YEXT = 346, |
| IMAGE2D = 347, |
| IIMAGE2D = 348, |
| UIMAGE2D = 349, |
| IMAGE3D = 350, |
| IIMAGE3D = 351, |
| UIMAGE3D = 352, |
| IMAGE2DARRAY = 353, |
| IIMAGE2DARRAY = 354, |
| UIMAGE2DARRAY = 355, |
| IMAGECUBE = 356, |
| IIMAGECUBE = 357, |
| UIMAGECUBE = 358, |
| ATOMICUINT = 359, |
| LAYOUT = 360, |
| YUVCSCSTANDARDEXT = 361, |
| YUVCSCSTANDARDEXTCONSTANT = 362, |
| IDENTIFIER = 363, |
| TYPE_NAME = 364, |
| FLOATCONSTANT = 365, |
| INTCONSTANT = 366, |
| UINTCONSTANT = 367, |
| BOOLCONSTANT = 368, |
| FIELD_SELECTION = 369, |
| LEFT_OP = 370, |
| RIGHT_OP = 371, |
| INC_OP = 372, |
| DEC_OP = 373, |
| LE_OP = 374, |
| GE_OP = 375, |
| EQ_OP = 376, |
| NE_OP = 377, |
| AND_OP = 378, |
| OR_OP = 379, |
| XOR_OP = 380, |
| MUL_ASSIGN = 381, |
| DIV_ASSIGN = 382, |
| ADD_ASSIGN = 383, |
| MOD_ASSIGN = 384, |
| LEFT_ASSIGN = 385, |
| RIGHT_ASSIGN = 386, |
| AND_ASSIGN = 387, |
| XOR_ASSIGN = 388, |
| OR_ASSIGN = 389, |
| SUB_ASSIGN = 390, |
| LEFT_PAREN = 391, |
| RIGHT_PAREN = 392, |
| LEFT_BRACKET = 393, |
| RIGHT_BRACKET = 394, |
| LEFT_BRACE = 395, |
| RIGHT_BRACE = 396, |
| DOT = 397, |
| COMMA = 398, |
| COLON = 399, |
| EQUAL = 400, |
| SEMICOLON = 401, |
| BANG = 402, |
| DASH = 403, |
| TILDE = 404, |
| PLUS = 405, |
| STAR = 406, |
| SLASH = 407, |
| PERCENT = 408, |
| LEFT_ANGLE = 409, |
| RIGHT_ANGLE = 410, |
| VERTICAL_BAR = 411, |
| CARET = 412, |
| AMPERSAND = 413, |
| QUESTION = 414 |
| }; |
| # endif |
| |
| /* Value type. */ |
| # if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED |
| |
| union YYSTYPE |
| { |
| |
| struct |
| { |
| union |
| { |
| const char *string; // pool allocated. |
| float f; |
| int i; |
| unsigned int u; |
| bool b; |
| }; |
| const TSymbol *symbol; |
| } lex; |
| struct |
| { |
| TOperator op; |
| union |
| { |
| TIntermNode *intermNode; |
| TIntermNodePair nodePair; |
| TIntermTyped *intermTypedNode; |
| TIntermAggregate *intermAggregate; |
| TIntermBlock *intermBlock; |
| TIntermDeclaration *intermDeclaration; |
| TIntermFunctionPrototype *intermFunctionPrototype; |
| TIntermSwitch *intermSwitch; |
| TIntermCase *intermCase; |
| }; |
| union |
| { |
| TVector<unsigned int> *arraySizes; |
| TTypeSpecifierNonArray typeSpecifierNonArray; |
| TPublicType type; |
| TPrecision precision; |
| TLayoutQualifier layoutQualifier; |
| TQualifier qualifier; |
| TFunction *function; |
| TFunctionLookup *functionLookup; |
| TParameter param; |
| TDeclarator *declarator; |
| TDeclaratorList *declaratorList; |
| 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_AUTOGEN_H_INCLUDED */ |
| |
| /* Second part of user prologue. */ |
| |
| 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) \ |
| do \ |
| { \ |
| if (context->getShaderType() != GL_VERTEX_SHADER) \ |
| { \ |
| context->error(L, " supported in vertex shaders only", S); \ |
| } \ |
| } while (0) |
| |
| #define COMPUTE_ONLY(S, L) \ |
| do \ |
| { \ |
| if (context->getShaderType() != GL_COMPUTE_SHADER) \ |
| { \ |
| context->error(L, " supported in compute shaders only", S); \ |
| } \ |
| } while (0) |
| |
| #define ES2_ONLY(S, L) \ |
| do \ |
| { \ |
| if (context->getShaderVersion() != 100) \ |
| { \ |
| context->error(L, " supported in GLSL ES 1.00 only", S); \ |
| } \ |
| } while (0) |
| |
| #define ES3_OR_NEWER(TOKEN, LINE, REASON) \ |
| do \ |
| { \ |
| if (context->getShaderVersion() < 300) \ |
| { \ |
| context->error(LINE, REASON " supported in GLSL ES 3.00 and above only", TOKEN); \ |
| } \ |
| } while (0) |
| |
| #define ES3_1_ONLY(TOKEN, LINE, REASON) \ |
| do \ |
| { \ |
| if (context->getShaderVersion() != 310) \ |
| { \ |
| context->error(LINE, REASON " supported in GLSL ES 3.10 only", TOKEN); \ |
| } \ |
| } while (0) |
| |
| #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 yytype_uint16; |
| #endif |
| |
| #ifdef YYTYPE_INT16 |
| typedef YYTYPE_INT16 yytype_int16; |
| #else |
| typedef short 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 |
| # 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 |
| |
| /* 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__ && !defined __ICC && 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 142 |
| /* YYLAST -- Last index in YYTABLE. */ |
| #define YYLAST 3017 |
| |
| /* YYNTOKENS -- Number of terminals. */ |
| #define YYNTOKENS 160 |
| /* YYNNTS -- Number of nonterminals. */ |
| #define YYNNTS 96 |
| /* YYNRULES -- Number of rules. */ |
| #define YYNRULES 304 |
| /* YYNSTATES -- Number of states. */ |
| #define YYNSTATES 430 |
| |
| #define YYUNDEFTOK 2 |
| #define YYMAXUTOK 414 |
| |
| /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
| as returned by yylex, with out-of-bounds checking. */ |
| #define YYTRANSLATE(YYX) ((unsigned)(YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| |
| /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
| as returned by yylex. */ |
| 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, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159}; |
| |
| #if YYDEBUG |
| /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
| static const yytype_uint16 yyrline[] = { |
| 0, 251, 251, 252, 255, 262, 265, 270, 275, 280, 285, 294, 300, 303, 306, 309, |
| 312, 315, 321, 328, 334, 337, 345, 348, 354, 357, 363, 367, 374, 382, 385, 388, |
| 394, 397, 400, 403, 410, 411, 412, 413, 421, 422, 425, 428, 435, 436, 439, 445, |
| 446, 450, 457, 458, 461, 464, 467, 473, 474, 477, 483, 484, 491, 492, 499, 500, |
| 507, 508, 514, 515, 521, 522, 528, 529, 535, 536, 542, 543, 544, 545, 549, 550, |
| 551, 555, 559, 563, 567, 574, 577, 583, 590, 597, 600, 603, 607, 611, 615, 619, |
| 623, 630, 637, 640, 647, 655, 672, 682, 685, 691, 695, 699, 703, 710, 717, 720, |
| 724, 728, 733, 740, 744, 748, 752, 757, 764, 768, 774, 777, 780, 790, 794, 801, |
| 807, 813, 817, 821, 824, 827, 831, 839, 844, 848, 851, 854, 857, 860, 864, 867, |
| 871, 874, 877, 880, 883, 886, 893, 900, 903, 906, 912, 919, 922, 928, 931, 934, |
| 937, 943, 946, 953, 958, 965, 970, 981, 984, 987, 990, 993, 996, 1000, 1004, 1008, |
| 1012, 1016, 1020, 1024, 1028, 1032, 1036, 1040, 1044, 1048, 1052, 1056, 1060, 1064, 1068, 1072, |
| 1076, 1080, 1087, 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1111, 1114, 1117, 1120, 1123, 1126, |
| 1129, 1132, 1135, 1138, 1141, 1144, 1147, 1150, 1157, 1167, 1174, 1181, 1184, 1187, 1190, 1193, |
| 1196, 1199, 1202, 1205, 1208, 1211, 1214, 1217, 1220, 1223, 1231, 1231, 1234, 1234, 1240, 1243, |
| 1249, 1252, 1259, 1263, 1269, 1272, 1278, 1282, 1286, 1287, 1293, 1294, 1295, 1296, 1297, 1298, |
| 1299, 1303, 1307, 1307, 1307, 1314, 1315, 1319, 1319, 1320, 1320, 1325, 1329, 1336, 1340, 1347, |
| 1348, 1352, 1358, 1362, 1371, 1371, 1378, 1381, 1387, 1391, 1397, 1397, 1402, 1402, 1406, 1406, |
| 1414, 1417, 1423, 1426, 1432, 1436, 1443, 1446, 1449, 1452, 1455, 1463, 1469, 1475, 1478, 1484, |
| 1484}; |
| #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", |
| "PRECISE", |
| "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", |
| "BUFFER", |
| "VARYING", |
| "MATRIX2x3", |
| "MATRIX3x2", |
| "MATRIX2x4", |
| "MATRIX4x2", |
| "MATRIX3x4", |
| "MATRIX4x3", |
| "CENTROID", |
| "FLAT", |
| "SMOOTH", |
| "NOPERSPECTIVE", |
| "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", |
| "SAMPLER2DMS", |
| "ISAMPLER2DMS", |
| "USAMPLER2DMS", |
| "SAMPLER2DMSARRAY", |
| "ISAMPLER2DMSARRAY", |
| "USAMPLER2DMSARRAY", |
| "SAMPLER3D", |
| "SAMPLER3DRECT", |
| "SAMPLER2DSHADOW", |
| "SAMPLERCUBESHADOW", |
| "SAMPLER2DARRAYSHADOW", |
| "SAMPLERVIDEOWEBGL", |
| "SAMPLEREXTERNAL2DY2YEXT", |
| "IMAGE2D", |
| "IIMAGE2D", |
| "UIMAGE2D", |
| "IMAGE3D", |
| "IIMAGE3D", |
| "UIMAGE3D", |
| "IMAGE2DARRAY", |
| "IIMAGE2DARRAY", |
| "UIMAGE2DARRAY", |
| "IMAGECUBE", |
| "IIMAGECUBE", |
| "UIMAGECUBE", |
| "ATOMICUINT", |
| "LAYOUT", |
| "YUVCSCSTANDARDEXT", |
| "YUVCSCSTANDARDEXTCONSTANT", |
| "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", |
| "precise_qualifier", |
| "single_type_qualifier", |
| "storage_qualifier", |
| "type_specifier", |
| "precision_qualifier", |
| "layout_qualifier", |
| "layout_qualifier_id_list", |
| "layout_qualifier_id", |
| "type_specifier_no_prec", |
| "array_specifier", |
| "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_with_scope", |
| "$@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, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414}; |
| #endif |
| |
| #define YYPACT_NINF -368 |
| |
| #define yypact_value_is_default(Yystate) (!!((Yystate) == (-368))) |
| |
| #define YYTABLE_NINF -264 |
| |
| #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[] = { |
| 2603, -368, -368, -368, -368, -368, 151, -368, -368, -368, -368, -368, -368, -368, -368, -368, |
| -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, |
| -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, |
| -368, -368, -85, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, |
| -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, |
| -368, -368, -368, -368, -368, -368, -368, -368, -368, -368, -79, -368, -368, -368, -98, -57, |
| -76, 2710, -113, -368, -24, -368, 1410, -368, -368, -368, -368, -368, -368, -368, -368, -47, |
| -368, 2496, -368, -368, 2908, -368, -368, -368, -26, -46, -368, -5, -368, 2710, -368, -368, |
| -368, 2710, 33, 33, -368, -35, -110, -97, -368, 2710, -368, -368, 1510, -42, -368, -368, |
| -2, 2710, -368, -368, 19, -90, -368, 414, -368, -368, -368, -368, -47, -70, -368, 1894, |
| -69, -368, -368, 2710, 33, 2148, -368, -368, 26, -368, -368, -368, -368, -368, 1894, 1894, |
| 1894, -368, -368, -368, -368, -368, -368, -368, -52, -368, -368, -368, 29, -48, 2020, 38, |
| -368, 1894, 8, -40, 31, -94, 28, 20, 23, 21, 61, 73, -82, -368, 60, -368, |
| 1639, -368, 2264, 2710, 41, -368, -46, 54, 55, -368, 66, 67, 59, 1768, 72, 1894, |
| 65, 76, 74, -368, -368, 62, -368, -368, -37, -368, -98, 77, -368, -368, -368, -368, |
| 562, -368, -368, -368, -368, -368, -368, -42, 1894, -67, -368, -368, 1894, 33, -47, -31, |
| -368, -88, -368, -368, -368, -44, -368, -368, 1894, 2809, -368, -368, 1894, 79, -368, -368, |
| -368, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, |
| 1894, 1894, 1894, 1894, 1894, -368, -368, 75, -368, 2380, -368, -368, -368, -368, -368, 78, |
| -368, 1894, -368, -368, -19, 1894, 97, -368, -368, -368, 710, -368, -368, -368, -368, -368, |
| -368, -368, -368, -368, -368, -368, 1894, 1894, -368, -368, -368, -368, 1894, -368, -7, -42, |
| 33, -368, -107, -368, -368, 80, 100, -368, 81, -368, -368, -368, -368, -368, 8, 8, |
| -40, -40, 31, 31, 31, 31, -94, -94, 28, 20, 23, 21, 61, 73, 25, -368, |
| -368, 179, -5, 1006, 1154, -43, -368, -39, -368, 1282, 710, -368, -368, -368, -368, -368, |
| 1894, -368, -368, 1894, 109, -368, -368, -368, -368, 1282, 78, -368, 100, 33, 2710, 110, |
| 105, 112, -368, 1894, -368, 102, 115, 235, -368, 114, 111, 858, -368, 113, -32, 1894, |
| 858, 78, -368, 1894, -368, -368, -368, -368, 116, 100, -368, -368, -368, -368}; |
| |
| /* 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, 128, 151, 152, 153, 0, 135, 137, 171, 168, 169, 170, 175, 176, 177, 178, 179, 180, |
| 172, 173, 174, 181, 182, 183, 184, 185, 186, 138, 139, 140, 142, 143, 136, 187, 188, 189, 190, |
| 191, 192, 141, 123, 122, 124, 144, 145, 146, 147, 148, 149, 0, 167, 194, 196, 216, 218, 197, |
| 200, 201, 202, 203, 206, 207, 208, 209, 198, 204, 210, 199, 205, 211, 195, 212, 213, 214, 215, |
| 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 0, 193, 233, 302, 303, |
| 0, 99, 98, 0, 110, 115, 132, 0, 133, 134, 125, 129, 120, 131, 130, 150, 161, 232, 0, |
| 299, 301, 0, 2, 3, 236, 0, 0, 89, 0, 97, 0, 106, 100, 108, 0, 109, 0, 90, |
| 2, 116, 0, 95, 0, 126, 121, 0, 162, 1, 300, 0, 0, 234, 160, 157, 0, 155, 0, |
| 304, 101, 105, 107, 103, 111, 102, 0, 117, 88, 96, 0, 0, 0, 238, 10, 4, 8, 6, |
| 7, 9, 31, 0, 0, 0, 163, 38, 37, 39, 36, 5, 12, 32, 14, 19, 20, 0, 0, |
| 25, 0, 40, 0, 44, 47, 50, 55, 58, 60, 62, 64, 66, 68, 70, 87, 0, 29, 0, |
| 91, 0, 0, 0, 154, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 0, 258, 267, |
| 271, 40, 72, 85, 0, 247, 0, 150, 250, 269, 249, 248, 0, 251, 252, 253, 254, 255, 256, |
| 104, 0, 112, 246, 119, 0, 0, 244, 0, 242, 0, 239, 33, 34, 0, 16, 17, 0, 0, |
| 23, 22, 0, 167, 26, 28, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 164, 165, 0, 237, 0, 158, 159, 156, 295, 294, 265, |
| 286, 0, 298, 296, 0, 0, 0, 279, 282, 257, 0, 75, 76, 78, 77, 80, 81, 82, 83, |
| 84, 79, 74, 0, 0, 272, 268, 270, 114, 0, 118, 0, 245, 0, 240, 0, 92, 11, 0, |
| 18, 30, 15, 21, 27, 41, 42, 43, 46, 45, 48, 49, 53, 54, 51, 52, 56, 57, 59, |
| 61, 63, 65, 67, 69, 0, 166, 235, 0, 0, 0, 0, 0, 297, 0, 278, 0, 259, 73, |
| 86, 113, 241, 243, 0, 93, 13, 0, 0, 264, 266, 289, 288, 291, 265, 276, 280, 0, 0, |
| 0, 0, 0, 71, 0, 290, 0, 0, 275, 273, 0, 0, 0, 260, 0, 0, 292, 0, 265, |
| 277, 0, 262, 283, 261, 94, 0, 293, 287, 274, 281, 285}; |
| |
| /* YYPGOTO[NTERM-NUM]. */ |
| static const yytype_int16 yypgoto[] = { |
| -368, -49, -368, -368, -368, -368, -368, -368, -8, -368, -368, -368, -368, -53, -368, -104, |
| -103, -149, -99, -28, -27, -25, -23, -29, -22, -368, -135, -145, -368, -138, -201, -368, |
| 15, 17, -368, -368, -368, 135, 142, 139, -368, -368, -356, -368, -91, -368, -368, -100, |
| -368, -93, 264, -368, -368, 57, 0, -116, -368, -368, -368, -368, -132, -154, 22, -64, |
| -240, -96, -230, -352, -136, -368, -368, -137, -367, -368, -368, -120, -36, -92, -368, -368, |
| -368, -368, -368, -112, -368, -368, -368, -368, -368, -368, -368, -368, -368, 169, -368, -368}; |
| |
| /* YYDEFGOTO[NTERM-NUM]. */ |
| static const yytype_int16 yydefgoto[] = { |
| -1, 254, 182, 183, 184, 341, 185, 186, 187, 188, 189, 190, 191, 229, 193, 194, |
| 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 230, 231, 326, 232, 206, 137, |
| 233, 234, 95, 96, 97, 126, 127, 128, 98, 99, 100, 101, 102, 103, 104, 105, |
| 106, 107, 108, 109, 149, 150, 207, 141, 111, 112, 211, 145, 165, 166, 255, 256, |
| 251, 236, 237, 238, 239, 314, 400, 421, 369, 370, 371, 422, 240, 241, 242, 408, |
| 243, 409, 244, 399, 245, 377, 303, 372, 393, 405, 406, 246, 113, 114, 115, 123}; |
| |
| /* 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[] = { |
| 110, 120, 138, 152, 130, 205, 129, 295, 331, 139, 330, 258, 333, 210, 250, 93, 147, 94, 160, |
| 390, 338, 397, 310, 117, 118, 280, 281, 407, 140, 138, 131, 384, 130, 132, 129, 159, 130, 397, |
| 261, 385, 247, 249, 291, 161, 164, 270, 163, 213, 122, 162, 427, 134, 164, 214, 163, 119, 258, |
| 121, 339, 420, 282, 283, 148, 138, 420, 262, 263, 125, 140, 208, 253, 208, 164, 205, 163, 248, |
| 252, 292, 332, 297, 124, 156, 157, 308, 133, 118, 264, 192, 205, 267, 265, 140, 381, 340, 394, |
| 268, 208, 110, 395, 327, 327, 158, 110, 250, 327, 424, 327, 250, 276, 328, 277, 327, 336, 110, |
| 146, 337, 144, 164, 164, 163, 163, 259, 260, 346, 327, 110, 342, 374, 93, 110, 94, 354, 355, |
| 356, 357, 151, 336, 110, 335, 382, 272, 117, 118, 258, 209, 110, 278, 279, 330, 284, 285, 235, |
| 298, 299, 366, 192, 3, 4, 5, 273, 274, 275, -30, 110, 212, 110, 266, 373, 327, 387, 192, |
| 375, 350, 351, 271, 352, 353, 288, 286, 428, 287, 379, 380, 401, 289, 358, 359, 250, 315, 316, |
| 317, 318, 319, 320, 321, 322, 323, 324, 290, 293, 301, 302, 304, 305, 164, 306, 163, 325, 309, |
| 311, 110, 110, 312, -29, 367, 313, -24, -31, -263, 386, 347, 348, 349, 192, 192, 192, 192, 192, |
| 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 396, 235, 376, 402, 327, 388, 403, 412, |
| 411, 415, 205, 389, 413, 416, 417, 226, 396, 419, 345, 360, 423, 361, 364, 429, 362, 154, 414, |
| 363, 153, 155, 365, 116, 300, 383, 418, 250, 334, 391, 425, 378, 426, 392, 404, 143, 0, 0, |
| 0, 398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 138, 0, 0, 0, 398, 0, |
| 0, 139, 0, 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 235, 0, 0, 0, 0, 235, 235, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, 0, 0, 110, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, 0, 0, 235, 1, |
| 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 215, 216, 217, 0, 218, 219, 220, 221, |
| 222, 223, 224, 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, 225, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, |
| 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, |
| 84, 85, 86, 87, 88, 89, 90, 91, 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, |
| 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, |
| 0, 0, 0, 226, 227, 0, 0, 0, 0, 228, 178, 179, 180, 181, 1, 2, 3, 4, 5, |
| 6, 7, 8, 9, 10, 11, 12, 215, 216, 217, 0, 218, 219, 220, 221, 222, 223, 224, 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, |
| 225, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
| 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, |
| 88, 89, 90, 91, 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, 0, 0, 226, |
| 329, 0, 0, 0, 0, 228, 178, 179, 180, 181, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
| 10, 11, 12, 215, 216, 217, 0, 218, 219, 220, 221, 222, 223, 224, 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, 225, 52, 53, 54, |
| 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, |
| 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, |
| 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, 0, 0, 226, 0, 0, 0, 0, |
| 0, 228, 178, 179, 180, 181, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 215, |
| 216, 217, 0, 218, 219, 220, 221, 222, 223, 224, 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, 225, 52, 53, 54, 55, 56, 57, 58, |
| 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, |
| 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 167, 168, 92, 169, |
| 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 176, 0, 0, 0, 151, 0, 0, 0, 0, 0, 228, 178, 179, |
| 180, 181, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 215, 216, 217, 0, 218, |
| 219, 220, 221, 222, 223, 224, 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, 225, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, |
| 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, |
| 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 167, 168, 92, 169, 170, 171, 172, 173, |
| 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 178, 179, 180, 181, 1, 2, |
| 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 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, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, |
| 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
| 85, 86, 87, 88, 89, 90, 91, 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 176, 7, |
| 8, 9, 10, 11, 12, 0, 0, 0, 228, 178, 179, 180, 181, 0, 0, 0, 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, 0, 52, |
| 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, |
| 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, |
| 90, 91, 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 176, 7, 8, 9, 10, 11, 12, |
| 0, 0, 0, 0, 178, 179, 180, 181, 0, 0, 0, 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, 0, 52, 53, 54, 55, 56, 57, |
| 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, |
| 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 135, 92, |
| 0, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, |
| 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 136, 34, |
| 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 52, |
| 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, |
| 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, |
| 0, 91, 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, 0, 177, 9, 10, 11, |
| 12, 0, 0, 0, 178, 179, 180, 181, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, |
| 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, |
| 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 52, 53, 54, 55, 56, |
| 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, |
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 0, 91, 167, 168, |
| 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, 0, 294, 9, 10, 11, 12, 0, 0, 0, |
| 178, 179, 180, 181, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
| 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, |
| 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, |
| 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 0, 91, 167, 168, 92, 169, 170, 171, |
| 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 176, 9, 10, 11, 12, 0, 0, 0, 0, 0, 307, 178, 179, 180, 181, |
| 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, |
| 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 50, 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, |
| 86, 87, 88, 89, 0, 91, 167, 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 9, 10, |
| 11, 12, 0, 0, 0, 0, 0, 0, 178, 179, 180, 181, 0, 13, 14, 15, 16, 17, 18, |
| 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, |
| 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 269, 0, 52, 53, 54, 55, |
| 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, |
| 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 0, 91, 167, |
| 168, 92, 169, 170, 171, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 1, 2, 3, 4, 5, 176, 7, 8, 9, 10, 11, 12, 0, 0, 0, |
| 0, 178, 179, 180, 181, 0, 0, 0, 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, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, |
| 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, |
| 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 92, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 12, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, 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, 0, 52, 53, 54, 55, 56, 57, 58, |
| 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, |
| 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 92, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, |
| 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 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, 0, 52, 53, 54, 55, 56, |
| 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, |
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, |
| 92, 0, 0, 0, 0, 0, 0, 142, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
| 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 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, 0, 52, 53, 54, |
| 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, |
| 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, |
| 0, 0, 92, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 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, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, |
| 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, |
| 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 92, 1, 2, 3, 4, |
| 5, 0, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 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, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, |
| 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
| 87, 88, 89, 90, 91, 0, 0, 92, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
| 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 50, 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, |
| 83, 84, 85, 86, 87, 88, 89, 0, 91, 0, 343, 92, 9, 10, 11, 12, 344, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
| 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, |
| 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, 72, 73, 74, 75, 76, 77, 78, |
| 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 0, 91, 0, 0, 92}; |
| |
| static const yytype_int16 yycheck[] = { |
| 0, 50, 102, 123, 97, 140, 97, 208, 248, 102, 240, 165, 252, 145, 159, 0, 62, 0, 134, |
| 371, 108, 377, 223, 108, 109, 119, 120, 394, 138, 129, 143, 138, 125, 146, 125, 145, 129, 393, |
| 176, 146, 156, 157, 124, 140, 137, 190, 137, 137, 146, 146, 417, 100, 145, 143, 145, 140, 210, |
| 136, 146, 411, 154, 155, 108, 163, 416, 117, 118, 143, 138, 138, 163, 138, 165, 208, 165, 145, |
| 145, 159, 145, 211, 137, 130, 131, 221, 108, 109, 138, 140, 223, 137, 142, 138, 332, 137, 137, |
| 143, 138, 97, 137, 143, 143, 136, 102, 248, 143, 137, 143, 252, 148, 146, 150, 143, 143, 113, |
| 140, 146, 116, 210, 211, 210, 211, 174, 175, 268, 143, 125, 264, 146, 113, 129, 113, 280, 281, |
| 282, 283, 140, 143, 137, 254, 146, 193, 108, 109, 297, 146, 145, 115, 116, 378, 121, 122, 151, |
| 111, 112, 292, 208, 5, 6, 7, 151, 152, 153, 136, 163, 145, 165, 137, 305, 143, 144, 223, |
| 309, 276, 277, 136, 278, 279, 156, 158, 419, 157, 326, 327, 384, 123, 284, 285, 332, 126, 127, |
| 128, 129, 130, 131, 132, 133, 134, 135, 125, 139, 146, 146, 136, 136, 297, 146, 297, 145, 136, |
| 144, 210, 211, 136, 136, 139, 141, 137, 136, 140, 139, 273, 274, 275, 276, 277, 278, 279, 280, |
| 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 377, 240, 144, 387, 143, 65, 136, 141, |
| 137, 146, 384, 370, 139, 137, 18, 140, 393, 145, 265, 286, 146, 287, 290, 146, 288, 129, 403, |
| 289, 125, 129, 291, 6, 214, 336, 409, 419, 253, 372, 415, 314, 416, 372, 393, 113, -1, -1, |
| -1, 377, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 297, 398, -1, -1, -1, 393, -1, |
| -1, 398, -1, -1, -1, -1, -1, -1, -1, -1, 314, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 371, 372, -1, -1, -1, -1, 377, 378, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 393, -1, -1, -1, -1, 398, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 411, -1, -1, -1, -1, 416, 3, |
| 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 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, -1, 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, -1, -1, 117, |
| 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 136, |
| -1, -1, -1, 140, 141, -1, -1, -1, -1, 146, 147, 148, 149, 150, 3, 4, 5, 6, 7, |
| 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 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, -1, 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, -1, -1, 117, 118, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 136, -1, -1, -1, 140, |
| 141, -1, -1, -1, -1, 146, 147, 148, 149, 150, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 12, 13, 14, 15, 16, 17, -1, 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, -1, 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, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 136, -1, -1, -1, 140, -1, -1, -1, -1, |
| -1, 146, 147, 148, 149, 150, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 16, 17, -1, 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, -1, 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, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 136, -1, -1, -1, 140, -1, -1, -1, -1, -1, 146, 147, 148, |
| 149, 150, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, 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, -1, 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, |
| -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, 136, -1, -1, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, 3, 4, |
| 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, 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, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, |
| 81, 82, 83, 84, 85, -1, 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, -1, -1, 117, 118, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 136, 9, |
| 10, 11, 12, 13, 14, -1, -1, -1, 146, 147, 148, 149, 150, -1, -1, -1, 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, -1, 66, |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, |
| -1, 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, -1, -1, 117, 118, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 136, 9, 10, 11, 12, 13, 14, |
| -1, -1, -1, -1, 147, 148, 149, 150, -1, -1, -1, 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, -1, 66, 67, 68, 69, 70, 71, |
| 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, |
| 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 108, 109, |
| -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, 146, 47, |
| 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, 64, -1, 66, |
| 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, |
| -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
| -1, 106, 107, 108, 109, 110, 111, 112, 113, 114, -1, -1, 117, 118, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 136, -1, -1, 139, 11, 12, 13, |
| 14, -1, -1, -1, 147, 148, 149, 150, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, |
| 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, |
| 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, 64, -1, 66, 67, 68, 69, 70, |
| 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, |
| 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, -1, 106, 107, 108, |
| 109, 110, 111, 112, 113, 114, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, 136, -1, -1, 139, 11, 12, 13, 14, -1, -1, -1, |
| 147, 148, 149, 150, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, |
| 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 63, 64, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, |
| 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, -1, 106, 107, 108, 109, 110, 111, 112, |
| 113, 114, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, 136, 11, 12, 13, 14, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, |
| -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, |
| -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 63, 64, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, |
| 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, |
| 101, 102, 103, 104, -1, 106, 107, 108, 109, 110, 111, 112, 113, 114, -1, -1, 117, 118, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 136, 11, 12, |
| 13, 14, -1, -1, -1, -1, -1, -1, 147, 148, 149, 150, -1, 26, 27, 28, 29, 30, 31, |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, |
| 51, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, 64, -1, 66, 67, 68, 69, |
| 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, |
| 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, -1, 106, 107, |
| 108, 109, 110, 111, 112, 113, 114, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, 3, 4, 5, 6, 7, 136, 9, 10, 11, 12, 13, 14, -1, -1, -1, |
| -1, 147, 148, 149, 150, -1, -1, -1, 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, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, |
| 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 109, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, 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, -1, 66, 67, 68, 69, 70, 71, 72, |
| 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, |
| 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 109, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, |
| 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, 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, -1, 66, 67, 68, 69, 70, |
| 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, |
| 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, |
| 109, -1, -1, -1, -1, -1, -1, 0, -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, 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, -1, 66, 67, 68, |
| 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, |
| 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, |
| -1, -1, 109, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 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, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, |
| 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, 94, |
| 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 109, 3, 4, 5, 6, |
| 7, -1, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 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, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, |
| 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, |
| 102, 103, 104, 105, 106, -1, -1, 109, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, 63, 64, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, |
| 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, |
| 98, 99, 100, 101, 102, 103, 104, -1, 106, -1, 108, 109, 11, 12, 13, 14, 114, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, |
| 37, 38, 39, 40, -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, 51, 52, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 63, 64, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 87, 88, 89, 90, 91, 92, 93, |
| 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, -1, 106, -1, -1, 109}; |
| |
| /* 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, 14, 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, 66, 67, 68, 69, 70, |
| 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89, 90, |
| 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 109, 192, 193, |
| 194, 195, 196, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 214, 216, 217, 252, |
| 253, 254, 210, 108, 109, 140, 161, 136, 146, 255, 137, 143, 197, 198, 199, 204, 209, 143, 146, |
| 108, 161, 108, 146, 191, 207, 209, 138, 215, 0, 253, 214, 219, 140, 62, 108, 212, 213, 140, |
| 235, 198, 197, 199, 161, 161, 136, 145, 215, 140, 146, 204, 209, 220, 221, 107, 108, 110, 111, |
| 112, 113, 114, 117, 118, 136, 139, 147, 148, 149, 150, 162, 163, 164, 166, 167, 168, 169, 170, |
| 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 190, 214, 138, |
| 146, 220, 218, 145, 137, 143, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 65, 140, 141, |
| 146, 173, 186, 187, 189, 192, 193, 214, 225, 226, 227, 228, 236, 237, 238, 240, 242, 244, 251, |
| 215, 145, 215, 187, 224, 145, 209, 161, 222, 223, 141, 221, 173, 173, 189, 117, 118, 138, 142, |
| 137, 137, 143, 64, 187, 136, 173, 151, 152, 153, 148, 150, 115, 116, 119, 120, 154, 155, 121, |
| 122, 158, 157, 156, 123, 125, 124, 159, 139, 139, 190, 141, 220, 111, 112, 213, 146, 146, 246, |
| 136, 136, 146, 146, 189, 136, 190, 144, 136, 141, 229, 126, 127, 128, 129, 130, 131, 132, 133, |
| 134, 135, 145, 188, 143, 146, 141, 226, 224, 145, 224, 222, 215, 143, 146, 108, 146, 137, 165, |
| 189, 108, 114, 168, 187, 173, 173, 173, 175, 175, 176, 176, 177, 177, 177, 177, 178, 178, 179, |
| 180, 181, 182, 183, 184, 189, 139, 141, 232, 233, 234, 247, 189, 146, 189, 144, 245, 236, 187, |
| 187, 224, 146, 223, 138, 146, 139, 144, 65, 235, 227, 225, 237, 248, 137, 137, 189, 202, 204, |
| 243, 230, 190, 187, 136, 243, 249, 250, 232, 239, 241, 161, 137, 141, 139, 189, 146, 137, 18, |
| 228, 145, 227, 231, 235, 146, 137, 189, 231, 232, 224, 146}; |
| |
| /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| static const yytype_uint8 yyr1[] = { |
| 0, 160, 161, 161, 162, 163, 163, 163, 163, 163, 163, 163, 164, 164, 164, 164, 164, 164, |
| 165, 166, 167, 167, 168, 168, 169, 169, 170, 170, 171, 172, 172, 172, 173, 173, 173, 173, |
| 174, 174, 174, 174, 175, 175, 175, 175, 176, 176, 176, 177, 177, 177, 178, 178, 178, 178, |
| 178, 179, 179, 179, 180, 180, 181, 181, 182, 182, 183, 183, 184, 184, 185, 185, 186, 186, |
| 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 189, 189, 190, 191, 192, |
| 192, 192, 192, 192, 192, 192, 192, 193, 194, 194, 195, 195, 196, 197, 197, 198, 198, 198, |
| 198, 199, 200, 200, 200, 200, 200, 201, 201, 201, 201, 201, 202, 202, 203, 203, 203, 204, |
| 204, 205, 206, 207, 207, 207, 207, 207, 207, 208, 208, 208, 208, 208, 208, 208, 208, 208, |
| 208, 208, 208, 208, 208, 208, 209, 210, 210, 210, 211, 212, 212, 213, 213, 213, 213, 214, |
| 214, 215, 215, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, |
| 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, |
| 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, |
| 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, |
| 218, 217, 219, 217, 220, 220, 221, 221, 222, 222, 223, 223, 224, 225, 226, 226, 227, 227, |
| 227, 227, 227, 227, 227, 228, 229, 230, 228, 231, 231, 233, 232, 234, 232, 235, 235, 236, |
| 236, 237, 237, 238, 239, 239, 241, 240, 242, 242, 243, 243, 245, 244, 246, 244, 247, 244, |
| 248, 248, 249, 249, 250, 250, 251, 251, 251, 251, 251, 252, 252, 253, 253, 255, 254}; |
| |
| /* 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, 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, 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, 2, 3, 5, 4, 1, 2, 1, 1, |
| 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, |
| 1, 3, 1, 3, 3, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, 1, 0, 2, 0, 2, 2, 3, 1, 2, 1, 2, 5, 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 int yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp) |
| { |
| int 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 YYO. | |
| `-----------------------------------*/ |
| |
| static void yy_symbol_value_print(FILE *yyo, |
| int yytype, |
| YYSTYPE const *const yyvaluep, |
| YYLTYPE const *const yylocationp, |
| TParseContext *context, |
| void *scanner) |
| { |
| FILE *yyoutput = yyo; |
| YYUSE(yyoutput); |
| YYUSE(yylocationp); |
| YYUSE(context); |
| YYUSE(scanner); |
| if (!yyvaluep) |
| return; |
| # ifdef YYPRINT |
| if (yytype < YYNTOKENS) |
| YYPRINT(yyo, yytoknum[yytype], *yyvaluep); |
| # endif |
| YYUSE(yytype); |
| } |
| |
| /*---------------------------. |
| | Print this symbol on YYO. | |
| `---------------------------*/ |
| |
| static void yy_symbol_print(FILE *yyo, |
| int yytype, |
| YYSTYPE const *const yyvaluep, |
| YYLTYPE const *const yylocationp, |
| TParseContext *context, |
| void *scanner) |
| { |
| YYFPRINTF(yyo, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
| |
| YY_LOCATION_PRINT(yyo, *yylocationp); |
| YYFPRINTF(yyo, ": "); |
| yy_symbol_value_print(yyo, yytype, yyvaluep, yylocationp, context, scanner); |
| YYFPRINTF(yyo, ")"); |
| } |
| |
| /*------------------------------------------------------------------. |
| | 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 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; |
| else |
| goto append; |
| |
| append: |
| 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 (YYSIZE_T)(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) |
| yysize = yysize1; |
| else |
| return 2; |
| } |
| } |
| } |
| } |
| |
| switch (yycount) |
| { |
| # define YYCASE_(N, S) \ |
| case N: \ |
| yyformat = S; \ |
| break |
| default: /* Avoid compiler warnings. */ |
| 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) |
| yysize = yysize1; |
| else |
| return 2; |
| } |
| |
| 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++; |
| |
| /*--------------------------------------------------------------------. |
| | yynewstate -- set current state (the top of the stack) to yystate. | |
| `--------------------------------------------------------------------*/ |
| yysetstate: |
| *yyssp = (yytype_int16)yystate; |
| |
| if (yyss + yystacksize - 1 <= yyssp) |
| #if !defined yyoverflow && !defined YYSTACK_RELOCATE |
| goto yyexhaustedlab; |
| #else |
| { |
| /* Get the current used size of the three stacks, in elements. */ |
| YYSIZE_T yysize = (YYSIZE_T)(yyssp - yyss + 1); |
| |
| # if defined 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); |
| yyss = yyss1; |
| yyvs = yyvs1; |
| yyls = yyls1; |
| } |
| # else /* defined YYSTACK_RELOCATE */ |
| /* 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 |
| |
| yyssp = yyss + yysize - 1; |
| yyvsp = yyvs + yysize - 1; |
| yylsp = yyls + yysize - 1; |
| |
| YYDPRINTF((stderr, "Stack size increased to %lu\n", (unsigned long)yystacksize)); |
| |
| if (yyss + yystacksize - 1 <= yyssp) |
| YYABORT; |
| } |
| #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
| |
| 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); |
| yyerror_range[1] = yyloc; |
| 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]), ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol); |
| } |
| |
| 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->addScalarLiteral(unionArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 7: |
| |
| { |
| TConstantUnion *unionArray = new TConstantUnion[1]; |
| unionArray->setUConst((yyvsp[0].lex).u); |
| (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 8: |
| |
| { |
| TConstantUnion *unionArray = new TConstantUnion[1]; |
| unionArray->setFConst((yyvsp[0].lex).f); |
| (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 9: |
| |
| { |
| TConstantUnion *unionArray = new TConstantUnion[1]; |
| unionArray->setBConst((yyvsp[0].lex).b); |
| (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 10: |
| |
| { |
| if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target)) |
| { |
| context->error((yylsp[0]), "unsupported value", |
| ImmutableString((yyvsp[0].lex).string)); |
| } |
| TConstantUnion *unionArray = new TConstantUnion[1]; |
| unionArray->setYuvCscStandardEXTConst( |
| getYuvCscStandardEXT(ImmutableString((yyvsp[0].lex).string))); |
| (yyval.interm.intermTypedNode) = context->addScalarLiteral(unionArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 11: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 12: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 13: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), |
| (yyvsp[-1].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 14: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 15: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression( |
| (yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), |
| ImmutableString((yyvsp[0].lex).string), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 16: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( |
| EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 17: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( |
| EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 18: |
| |
| { |
| context->checkIsScalarInteger((yyvsp[0].interm.intermTypedNode), "[]"); |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 19: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addFunctionCallOrMethod((yyvsp[0].interm.functionLookup), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 20: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup); |
| } |
| |
| break; |
| |
| case 21: |
| |
| { |
| ES3_OR_NEWER("", (yylsp[0]), "methods"); |
| (yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup); |
| (yyval.interm.functionLookup)->setThisNode((yyvsp[-2].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 22: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); |
| } |
| |
| break; |
| |
| case 23: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); |
| } |
| |
| break; |
| |
| case 24: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); |
| } |
| |
| break; |
| |
| case 25: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[0].interm.functionLookup); |
| } |
| |
| break; |
| |
| case 26: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); |
| (yyval.interm.functionLookup)->addArgument((yyvsp[0].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 27: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[-2].interm.functionLookup); |
| (yyval.interm.functionLookup)->addArgument((yyvsp[0].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 28: |
| |
| { |
| (yyval.interm.functionLookup) = (yyvsp[-1].interm.functionLookup); |
| } |
| |
| break; |
| |
| case 29: |
| |
| { |
| (yyval.interm.functionLookup) = context->addConstructorFunc((yyvsp[0].interm.type)); |
| } |
| |
| break; |
| |
| case 30: |
| |
| { |
| (yyval.interm.functionLookup) = context->addNonConstructorFunc( |
| ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol); |
| } |
| |
| break; |
| |
| case 31: |
| |
| { |
| (yyval.interm.functionLookup) = context->addNonConstructorFunc( |
| ImmutableString((yyvsp[0].lex).string), (yyvsp[0].lex).symbol); |
| } |
| |
| break; |
| |
| case 32: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 33: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( |
| EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 34: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue( |
| EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 35: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMath( |
| (yyvsp[-1].interm.op), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 36: |
| |
| { |
| (yyval.interm.op) = EOpPositive; |
| } |
| |
| break; |
| |
| case 37: |
| |
| { |
| (yyval.interm.op) = EOpNegative; |
| } |
| |
| break; |
| |
| case 38: |
| |
| { |
| (yyval.interm.op) = EOpLogicalNot; |
| } |
| |
| break; |
| |
| case 39: |
| |
| { |
| ES3_OR_NEWER("~", (yyloc), "bit-wise operator"); |
| (yyval.interm.op) = EOpBitwiseNot; |
| } |
| |
| break; |
| |
| case 40: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 41: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 42: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 43: |
| |
| { |
| 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 44: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 45: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 46: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 47: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 48: |
| |
| { |
| 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 49: |
| |
| { |
| 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 50: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 51: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 52: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( |
| EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 53: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( |
| EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 54: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( |
| EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 55: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 56: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 57: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 58: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 59: |
| |
| { |
| 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 60: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 61: |
| |
| { |
| 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 62: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 63: |
| |
| { |
| 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 64: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 65: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( |
| EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 66: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 67: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( |
| EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 68: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 69: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult( |
| EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), |
| (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 70: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 71: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addTernarySelection( |
| (yyvsp[-4].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-3])); |
| } |
| |
| break; |
| |
| case 72: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 73: |
| |
| { |
| (yyval.interm.intermTypedNode) = |
| context->addAssign((yyvsp[-1].interm.op), (yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 74: |
| |
| { |
| (yyval.interm.op) = EOpAssign; |
| } |
| |
| break; |
| |
| case 75: |
| |
| { |
| (yyval.interm.op) = EOpMulAssign; |
| } |
| |
| break; |
| |
| case 76: |
| |
| { |
| (yyval.interm.op) = EOpDivAssign; |
| } |
| |
| break; |
| |
| case 77: |
| |
| { |
| ES3_OR_NEWER("%=", (yyloc), "integer modulus operator"); |
| (yyval.interm.op) = EOpIModAssign; |
| } |
| |
| break; |
| |
| case 78: |
| |
| { |
| (yyval.interm.op) = EOpAddAssign; |
| } |
| |
| break; |
| |
| case 79: |
| |
| { |
| (yyval.interm.op) = EOpSubAssign; |
| } |
| |
| break; |
| |
| case 80: |
| |
| { |
| ES3_OR_NEWER("<<=", (yyloc), "bit-wise operator"); |
| (yyval.interm.op) = EOpBitShiftLeftAssign; |
| } |
| |
| break; |
| |
| case 81: |
| |
| { |
| ES3_OR_NEWER(">>=", (yyloc), "bit-wise operator"); |
| (yyval.interm.op) = EOpBitShiftRightAssign; |
| } |
| |
| break; |
| |
| case 82: |
| |
| { |
| ES3_OR_NEWER("&=", (yyloc), "bit-wise operator"); |
| (yyval.interm.op) = EOpBitwiseAndAssign; |
| } |
| |
| break; |
| |
| case 83: |
| |
| { |
| ES3_OR_NEWER("^=", (yyloc), "bit-wise operator"); |
| (yyval.interm.op) = EOpBitwiseXorAssign; |
| } |
| |
| break; |
| |
| case 84: |
| |
| { |
| ES3_OR_NEWER("|=", (yyloc), "bit-wise operator"); |
| (yyval.interm.op) = EOpBitwiseOrAssign; |
| } |
| |
| break; |
| |
| case 85: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 86: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addComma( |
| (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 87: |
| |
| { |
| context->checkIsConst((yyvsp[0].interm.intermTypedNode)); |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 88: |
| |
| { |
| context->enterStructDeclaration((yylsp[-1]), ImmutableString((yyvsp[-1].lex).string)); |
| (yyval.lex) = (yyvsp[-1].lex); |
| } |
| |
| break; |
| |
| case 89: |
| |
| { |
| (yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration( |
| *((yyvsp[-1].interm).function), (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 90: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[-1].interm).intermDeclaration; |
| } |
| |
| break; |
| |
| case 91: |
| |
| { |
| context->parseDefaultPrecisionQualifier((yyvsp[-2].interm.precision), |
| (yyvsp[-1].interm.type), (yylsp[-3])); |
| (yyval.interm.intermNode) = nullptr; |
| } |
| |
| break; |
| |
| case 92: |
| |
| { |
| ES3_OR_NEWER(ImmutableString((yyvsp[-3].lex).string), (yylsp[-4]), "interface blocks"); |
| (yyval.interm.intermNode) = context->addInterfaceBlock( |
| *(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]), |
| ImmutableString((yyvsp[-3].lex).string), (yyvsp[-2].interm.fieldList), |
| kEmptyImmutableString, (yyloc), NULL, (yyloc)); |
| } |
| |
| break; |
| |
| case 93: |
| |
| { |
| ES3_OR_NEWER(ImmutableString((yyvsp[-4].lex).string), (yylsp[-5]), "interface blocks"); |
| (yyval.interm.intermNode) = context->addInterfaceBlock( |
| *(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]), |
| ImmutableString((yyvsp[-4].lex).string), (yyvsp[-3].interm.fieldList), |
| ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), NULL, (yyloc)); |
| } |
| |
| break; |
| |
| case 94: |
| |
| { |
| ES3_OR_NEWER(ImmutableString((yyvsp[-7].lex).string), (yylsp[-8]), "interface blocks"); |
| (yyval.interm.intermNode) = context->addInterfaceBlock( |
| *(yyvsp[-8].interm.typeQualifierBuilder), (yylsp[-7]), |
| ImmutableString((yyvsp[-7].lex).string), (yyvsp[-6].interm.fieldList), |
| ImmutableString((yyvsp[-4].lex).string), (yylsp[-4]), |
| (yyvsp[-2].interm.intermTypedNode), (yylsp[-3])); |
| } |
| |
| break; |
| |
| case 95: |
| |
| { |
| context->parseGlobalLayoutQualifier(*(yyvsp[-1].interm.typeQualifierBuilder)); |
| (yyval.interm.intermNode) = nullptr; |
| } |
| |
| break; |
| |
| case 96: |
| |
| { |
| (yyval.interm.intermNode) = context->parseGlobalQualifierDeclaration( |
| *(yyvsp[-2].interm.typeQualifierBuilder), (yylsp[-1]), |
| ImmutableString((yyvsp[-1].lex).string), (yyvsp[-1].lex).symbol); |
| } |
| |
| break; |
| |
| case 97: |
| |
| { |
| (yyval.interm).function = |
| context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function)); |
| context->exitFunctionDeclaration(); |
| } |
| |
| break; |
| |
| case 98: |
| |
| { |
| (yyval.interm.function) = (yyvsp[0].interm.function); |
| } |
| |
| break; |
| |
| case 99: |
| |
| { |
| (yyval.interm.function) = (yyvsp[0].interm.function); |
| } |
| |
| break; |
| |
| case 100: |
| |
| { |
| // 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).createVariable(&context->symbolTable)); |
| } |
| } |
| |
| break; |
| |
| case 101: |
| |
| { |
| (yyval.interm.function) = (yyvsp[-2].interm.function); |
| // 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 a parameter type except for '(void)'", |
| "void"); |
| } |
| else |
| { |
| (yyvsp[-2].interm.function) |
| ->addParameter((yyvsp[0].interm.param).createVariable(&context->symbolTable)); |
| } |
| } |
| |
| break; |
| |
| case 102: |
| |
| { |
| (yyval.interm.function) = context->parseFunctionHeader( |
| (yyvsp[-2].interm.type), ImmutableString((yyvsp[-1].lex).string), (yylsp[-1])); |
| |
| context->symbolTable.push(); |
| context->enterFunctionDeclaration(); |
| } |
| |
| break; |
| |
| case 103: |
| |
| { |
| (yyval.interm.param) = context->parseParameterDeclarator( |
| (yyvsp[-1].interm.type), ImmutableString((yyvsp[0].lex).string), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 104: |
| |
| { |
| (yyval.interm.param) = context->parseParameterArrayDeclarator( |
| ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), |
| *((yyvsp[0].interm.arraySizes)), (yylsp[0]), &(yyvsp[-2].interm.type)); |
| } |
| |
| break; |
| |
| case 105: |
| |
| { |
| (yyval.interm.param) = (yyvsp[0].interm.param); |
| context->checkIsParameterQualifierValid( |
| (yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.param).type); |
| } |
| |
| break; |
| |
| case 106: |
| |
| { |
| (yyval.interm.param) = (yyvsp[0].interm.param); |
| (yyval.interm.param).type->setQualifier(EvqIn); |
| } |
| |
| break; |
| |
| case 107: |
| |
| { |
| (yyval.interm.param) = (yyvsp[0].interm.param); |
| context->checkIsParameterQualifierValid( |
| (yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.param).type); |
| } |
| |
| break; |
| |
| case 108: |
| |
| { |
| (yyval.interm.param) = (yyvsp[0].interm.param); |
| (yyval.interm.param).type->setQualifier(EvqIn); |
| } |
| |
| break; |
| |
| case 109: |
| |
| { |
| TParameter param = {0, new TType((yyvsp[0].interm.type))}; |
| (yyval.interm.param) = param; |
| } |
| |
| break; |
| |
| case 110: |
| |
| { |
| (yyval.interm) = (yyvsp[0].interm); |
| } |
| |
| break; |
| |
| case 111: |
| |
| { |
| (yyval.interm) = (yyvsp[-2].interm); |
| context->parseDeclarator((yyval.interm).type, (yylsp[0]), |
| ImmutableString((yyvsp[0].lex).string), |
| (yyval.interm).intermDeclaration); |
| } |
| |
| break; |
| |
| case 112: |
| |
| { |
| (yyval.interm) = (yyvsp[-3].interm); |
| context->parseArrayDeclarator( |
| (yyval.interm).type, (yylsp[-1]), ImmutableString((yyvsp[-1].lex).string), |
| (yylsp[0]), *((yyvsp[0].interm.arraySizes)), (yyval.interm).intermDeclaration); |
| } |
| |
| break; |
| |
| case 113: |
| |
| { |
| ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); |
| (yyval.interm) = (yyvsp[-5].interm); |
| context->parseArrayInitDeclarator( |
| (yyval.interm).type, (yylsp[-3]), ImmutableString((yyvsp[-3].lex).string), |
| (yylsp[-2]), *((yyvsp[-2].interm.arraySizes)), (yylsp[-1]), |
| (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); |
| } |
| |
| break; |
| |
| case 114: |
| |
| { |
| (yyval.interm) = (yyvsp[-4].interm); |
| context->parseInitDeclarator( |
| (yyval.interm).type, (yylsp[-2]), ImmutableString((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]), kEmptyImmutableString); |
| } |
| |
| break; |
| |
| case 116: |
| |
| { |
| (yyval.interm).type = (yyvsp[-1].interm.type); |
| (yyval.interm).intermDeclaration = context->parseSingleDeclaration( |
| (yyval.interm).type, (yylsp[0]), ImmutableString((yyvsp[0].lex).string)); |
| } |
| |
| break; |
| |
| case 117: |
| |
| { |
| (yyval.interm).type = (yyvsp[-2].interm.type); |
| (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration( |
| (yyval.interm).type, (yylsp[-1]), ImmutableString((yyvsp[-1].lex).string), |
| (yylsp[0]), *((yyvsp[0].interm.arraySizes))); |
| } |
| |
| break; |
| |
| case 118: |
| |
| { |
| ES3_OR_NEWER("[]", (yylsp[-2]), "first-class arrays (array initializer)"); |
| (yyval.interm).type = (yyvsp[-4].interm.type); |
| (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration( |
| (yyval.interm).type, (yylsp[-3]), ImmutableString((yyvsp[-3].lex).string), |
| (yylsp[-2]), *((yyvsp[-2].interm.arraySizes)), (yylsp[-1]), |
| (yyvsp[0].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 119: |
| |
| { |
| (yyval.interm).type = (yyvsp[-3].interm.type); |
| (yyval.interm).intermDeclaration = context->parseSingleInitDeclaration( |
| (yyval.interm).type, (yylsp[-2]), ImmutableString((yyvsp[-2].lex).string), |
| (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 120: |
| |
| { |
| context->addFullySpecifiedType(&(yyvsp[0].interm.type)); |
| (yyval.interm.type) = (yyvsp[0].interm.type); |
| } |
| |
| break; |
| |
| case 121: |
| |
| { |
| (yyval.interm.type) = context->addFullySpecifiedType( |
| *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.type)); |
| } |
| |
| break; |
| |
| case 122: |
| |
| { |
| (yyval.interm.qualifier) = EvqSmooth; |
| } |
| |
| break; |
| |
| case 123: |
| |
| { |
| (yyval.interm.qualifier) = EvqFlat; |
| } |
| |
| break; |
| |
| case 124: |
| |
| { |
| if (!context->checkCanUseExtension((yylsp[0]), |
| TExtension::NV_shader_noperspective_interpolation)) |
| { |
| context->error((yylsp[0]), "unsupported interpolation qualifier", "noperspective"); |
| } |
| (yyval.interm.qualifier) = EvqNoPerspective; |
| } |
| |
| 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: |
| |
| { |
| // empty |
| } |
| |
| break; |
| |
| case 129: |
| |
| { |
| context->checkLocalVariableConstStorageQualifier(*(yyvsp[0].interm.qualifierWrapper)); |
| (yyval.interm.qualifierWrapper) = (yyvsp[0].interm.qualifierWrapper); |
| } |
| |
| break; |
| |
| case 130: |
| |
| { |
| context->checkIsAtGlobalLevel((yylsp[0]), "layout"); |
| (yyval.interm.qualifierWrapper) = |
| new TLayoutQualifierWrapper((yyvsp[0].interm.layoutQualifier), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 131: |
| |
| { |
| (yyval.interm.qualifierWrapper) = |
| new TPrecisionQualifierWrapper((yyvsp[0].interm.precision), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 132: |
| |
| { |
| (yyval.interm.qualifierWrapper) = |
| new TInterpolationQualifierWrapper((yyvsp[0].interm.qualifier), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 133: |
| |
| { |
| context->checkIsAtGlobalLevel((yylsp[0]), "invariant"); |
| (yyval.interm.qualifierWrapper) = new TInvariantQualifierWrapper((yylsp[0])); |
| } |
| |
| break; |
| |
| case 134: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TPreciseQualifierWrapper((yylsp[0])); |
| } |
| |
| break; |
| |
| case 135: |
| |
| { |
| VERTEX_ONLY("attribute", (yylsp[0])); |
| ES2_ONLY("attribute", (yylsp[0])); |
| (yyval.interm.qualifierWrapper) = |
| context->parseGlobalStorageQualifier(EvqAttribute, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 136: |
| |
| { |
| ES2_ONLY("varying", (yylsp[0])); |
| (yyval.interm.qualifierWrapper) = context->parseVaryingQualifier((yylsp[0])); |
| } |
| |
| break; |
| |
| case 137: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqConst, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 138: |
| |
| { |
| (yyval.interm.qualifierWrapper) = context->parseInQualifier((yylsp[0])); |
| } |
| |
| break; |
| |
| case 139: |
| |
| { |
| (yyval.interm.qualifierWrapper) = context->parseOutQualifier((yylsp[0])); |
| } |
| |
| break; |
| |
| case 140: |
| |
| { |
| (yyval.interm.qualifierWrapper) = context->parseInOutQualifier((yylsp[0])); |
| } |
| |
| break; |
| |
| case 141: |
| |
| { |
| ES3_OR_NEWER("centroid", (yylsp[0]), "storage qualifier"); |
| (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqCentroid, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 142: |
| |
| { |
| (yyval.interm.qualifierWrapper) = |
| context->parseGlobalStorageQualifier(EvqUniform, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 143: |
| |
| { |
| ES3_1_ONLY("buffer", (yylsp[0]), "storage qualifier"); |
| (yyval.interm.qualifierWrapper) = |
| context->parseGlobalStorageQualifier(EvqBuffer, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 144: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqReadOnly, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 145: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqWriteOnly, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 146: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqCoherent, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 147: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqRestrict, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 148: |
| |
| { |
| (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqVolatile, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 149: |
| |
| { |
| COMPUTE_ONLY("shared", (yylsp[0])); |
| (yyval.interm.qualifierWrapper) = |
| context->parseGlobalStorageQualifier(EvqShared, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 150: |
| |
| { |
| (yyval.interm.type) = (yyvsp[0].interm.type); |
| (yyval.interm.type).precision = |
| context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).getBasicType()); |
| } |
| |
| break; |
| |
| case 151: |
| |
| { |
| (yyval.interm.precision) = EbpHigh; |
| } |
| |
| break; |
| |
| case 152: |
| |
| { |
| (yyval.interm.precision) = EbpMedium; |
| } |
| |
| break; |
| |
| case 153: |
| |
| { |
| (yyval.interm.precision) = EbpLow; |
| } |
| |
| break; |
| |
| case 154: |
| |
| { |
| ES3_OR_NEWER("layout", (yylsp[-3]), "qualifier"); |
| (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier); |
| } |
| |
| break; |
| |
| case 155: |
| |
| { |
| (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier); |
| } |
| |
| break; |
| |
| case 156: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers( |
| (yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 157: |
| |
| { |
| (yyval.interm.layoutQualifier) = |
| context->parseLayoutQualifier(ImmutableString((yyvsp[0].lex).string), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 158: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier( |
| ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 159: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier( |
| ImmutableString((yyvsp[-2].lex).string), (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 160: |
| |
| { |
| (yyval.interm.layoutQualifier) = |
| context->parseLayoutQualifier(ImmutableString("shared"), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 161: |
| |
| { |
| (yyval.interm.type) |
| .initialize((yyvsp[0].interm.typeSpecifierNonArray), |
| (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); |
| } |
| |
| break; |
| |
| case 162: |
| |
| { |
| (yyval.interm.type) |
| .initialize((yyvsp[-1].interm.typeSpecifierNonArray), |
| (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); |
| (yyval.interm.type).setArraySizes((yyvsp[0].interm.arraySizes)); |
| } |
| |
| break; |
| |
| case 163: |
| |
| { |
| ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array"); |
| (yyval.interm.arraySizes) = new TVector<unsigned int>(); |
| (yyval.interm.arraySizes)->push_back(0u); |
| } |
| |
| break; |
| |
| case 164: |
| |
| { |
| (yyval.interm.arraySizes) = new TVector<unsigned int>(); |
| unsigned int size = |
| context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); |
| // Make the type an array even if size check failed. |
| // This ensures useless error messages regarding a variable's non-arrayness won't |
| // follow. |
| (yyval.interm.arraySizes)->push_back(size); |
| } |
| |
| break; |
| |
| case 165: |
| |
| { |
| ES3_1_ONLY("[]", (yylsp[-1]), "arrays of arrays"); |
| (yyval.interm.arraySizes) = (yyvsp[-2].interm.arraySizes); |
| (yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), 0u); |
| } |
| |
| break; |
| |
| case 166: |
| |
| { |
| ES3_1_ONLY("[]", (yylsp[-2]), "arrays of arrays"); |
| (yyval.interm.arraySizes) = (yyvsp[-3].interm.arraySizes); |
| unsigned int size = |
| context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); |
| // Make the type an array even if size check failed. |
| // This ensures useless error messages regarding a variable's non-arrayness won't |
| // follow. |
| (yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), size); |
| } |
| |
| break; |
| |
| case 167: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtVoid, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 168: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 169: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 170: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 171: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 172: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); |
| } |
| |
| break; |
| |
| case 173: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); |
| } |
| |
| break; |
| |
| case 174: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); |
| } |
| |
| break; |
| |
| case 175: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); |
| } |
| |
| break; |
| |
| case 176: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); |
| } |
| |
| break; |
| |
| case 177: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); |
| } |
| |
| break; |
| |
| case 178: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); |
| } |
| |
| break; |
| |
| case 179: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); |
| } |
| |
| break; |
| |
| case 180: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); |
| } |
| |
| break; |
| |
| case 181: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(2); |
| } |
| |
| break; |
| |
| case 182: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(3); |
| } |
| |
| break; |
| |
| case 183: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setAggregate(4); |
| } |
| |
| break; |
| |
| case 184: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(2, 2); |
| } |
| |
| break; |
| |
| case 185: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(3, 3); |
| } |
| |
| break; |
| |
| case 186: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(4, 4); |
| } |
| |
| break; |
| |
| case 187: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(2, 3); |
| } |
| |
| break; |
| |
| case 188: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(3, 2); |
| } |
| |
| break; |
| |
| case 189: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(2, 4); |
| } |
| |
| break; |
| |
| case 190: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(4, 2); |
| } |
| |
| break; |
| |
| case 191: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(3, 4); |
| } |
| |
| break; |
| |
| case 192: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); |
| (yyval.interm.typeSpecifierNonArray).setMatrix(4, 3); |
| } |
| |
| break; |
| |
| case 193: |
| |
| { |
| if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target)) |
| { |
| context->error((yylsp[0]), "unsupported type", "yuvCscStandardEXT"); |
| } |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtYuvCscStandardEXT, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 194: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 195: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler3D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 196: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCube, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 197: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 198: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMS, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 199: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DMSArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 200: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 201: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler3D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 202: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCube, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 203: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 204: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMS, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 205: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DMSArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 206: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 207: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler3D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 208: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCube, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 209: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 210: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMS, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 211: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DMSArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 212: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DShadow, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 213: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeShadow, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 214: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArrayShadow, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 215: |
| |
| { |
| if (!context->checkCanUseExtension((yylsp[0]), TExtension::WEBGL_video_texture)) |
| { |
| context->error((yylsp[0]), "unsupported type", "samplerVideoWEBGL"); |
| } |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerVideoWEBGL, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 216: |
| |
| { |
| constexpr std::array<TExtension, 3u> extensions{ |
| {TExtension::NV_EGL_stream_consumer_external, |
| TExtension::OES_EGL_image_external_essl3, TExtension::OES_EGL_image_external}}; |
| if (!context->checkCanUseOneOfExtensions((yylsp[0]), extensions)) |
| { |
| context->error((yylsp[0]), "unsupported type", "samplerExternalOES"); |
| } |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternalOES, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 217: |
| |
| { |
| if (!context->checkCanUseExtension((yylsp[0]), TExtension::EXT_YUV_target)) |
| { |
| context->error((yylsp[0]), "unsupported type", "__samplerExternal2DY2YEXT"); |
| } |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternal2DY2YEXT, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 218: |
| |
| { |
| if (!context->checkCanUseExtension((yylsp[0]), TExtension::ARB_texture_rectangle)) |
| { |
| context->error((yylsp[0]), "unsupported type", "sampler2DRect"); |
| } |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DRect, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 219: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 220: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 221: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 222: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImage3D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 223: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage3D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 224: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage3D, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 225: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2DArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 226: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2DArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 227: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2DArray, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 228: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtImageCube, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 229: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCube, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 230: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCube, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 231: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray).initialize(EbtAtomicCounter, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 232: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray) = (yyvsp[0].interm.typeSpecifierNonArray); |
| } |
| |
| break; |
| |
| case 233: |
| |
| { |
| // This is for user defined type names. The lexical phase looked up the type. |
| const TStructure *structure = static_cast<const TStructure *>((yyvsp[0].lex).symbol); |
| (yyval.interm.typeSpecifierNonArray).initializeStruct(structure, false, (yylsp[0])); |
| } |
| |
| break; |
| |
| case 234: |
| |
| { |
| context->enterStructDeclaration((yylsp[-1]), ImmutableString((yyvsp[-1].lex).string)); |
| } |
| |
| break; |
| |
| case 235: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray) = context->addStructure( |
| (yylsp[-5]), (yylsp[-4]), ImmutableString((yyvsp[-4].lex).string), |
| (yyvsp[-1].interm.fieldList)); |
| } |
| |
| break; |
| |
| case 236: |
| |
| { |
| context->enterStructDeclaration((yylsp[0]), kEmptyImmutableString); |
| } |
| |
| break; |
| |
| case 237: |
| |
| { |
| (yyval.interm.typeSpecifierNonArray) = context->addStructure( |
| (yylsp[-4]), (yyloc), kEmptyImmutableString, (yyvsp[-1].interm.fieldList)); |
| } |
| |
| break; |
| |
| case 238: |
| |
| { |
| (yyval.interm.fieldList) = |
| context->addStructFieldList((yyvsp[0].interm.fieldList), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 239: |
| |
| { |
| (yyval.interm.fieldList) = context->combineStructFieldLists( |
| (yyvsp[-1].interm.fieldList), (yyvsp[0].interm.fieldList), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 240: |
| |
| { |
| (yyval.interm.fieldList) = context->addStructDeclaratorList( |
| (yyvsp[-2].interm.type), (yyvsp[-1].interm.declaratorList)); |
| } |
| |
| break; |
| |
| case 241: |
| |
| { |
| // ES3 Only, but errors should be handled elsewhere |
| (yyval.interm.fieldList) = context->addStructDeclaratorListWithQualifiers( |
| *(yyvsp[-3].interm.typeQualifierBuilder), &(yyvsp[-2].interm.type), |
| (yyvsp[-1].interm.declaratorList)); |
| } |
| |
| break; |
| |
| case 242: |
| |
| { |
| (yyval.interm.declaratorList) = new TDeclaratorList(); |
| (yyval.interm.declaratorList)->push_back((yyvsp[0].interm.declarator)); |
| } |
| |
| break; |
| |
| case 243: |
| |
| { |
| (yyval.interm.declaratorList)->push_back((yyvsp[0].interm.declarator)); |
| } |
| |
| break; |
| |
| case 244: |
| |
| { |
| (yyval.interm.declarator) = |
| context->parseStructDeclarator(ImmutableString((yyvsp[0].lex).string), (yylsp[0])); |
| } |
| |
| break; |
| |
| case 245: |
| |
| { |
| (yyval.interm.declarator) = context->parseStructArrayDeclarator( |
| ImmutableString((yyvsp[-1].lex).string), (yylsp[-1]), (yyvsp[0].interm.arraySizes)); |
| } |
| |
| break; |
| |
| case 246: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 247: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 248: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); |
| } |
| |
| break; |
| |
| case 249: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 250: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 251: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 252: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 253: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); |
| } |
| |
| break; |
| |
| case 254: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); |
| } |
| |
| break; |
| |
| case 255: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 256: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 257: |
| |
| { |
| (yyval.interm.intermBlock) = new TIntermBlock(); |
| (yyval.interm.intermBlock)->setLine((yyloc)); |
| } |
| |
| break; |
| |
| case 258: |
| |
| { |
| context->symbolTable.push(); |
| } |
| |
| break; |
| |
| case 259: |
| |
| { |
| context->symbolTable.pop(); |
| } |
| |
| break; |
| |
| case 260: |
| |
| { |
| (yyvsp[-2].interm.intermBlock)->setLine((yyloc)); |
| (yyval.interm.intermBlock) = (yyvsp[-2].interm.intermBlock); |
| } |
| |
| break; |
| |
| case 261: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); |
| } |
| |
| break; |
| |
| case 262: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 263: |
| |
| { |
| context->symbolTable.push(); |
| } |
| |
| break; |
| |
| case 264: |
| |
| { |
| context->symbolTable.pop(); |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); |
| } |
| |
| break; |
| |
| case 265: |
| |
| { |
| context->symbolTable.push(); |
| } |
| |
| break; |
| |
| case 266: |
| |
| { |
| context->symbolTable.pop(); |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 267: |
| |
| { |
| (yyval.interm.intermBlock) = new TIntermBlock(); |
| (yyval.interm.intermBlock)->setLine((yyloc)); |
| } |
| |
| break; |
| |
| case 268: |
| |
| { |
| (yyvsp[-1].interm.intermBlock)->setLine((yyloc)); |
| (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); |
| } |
| |
| break; |
| |
| case 269: |
| |
| { |
| (yyval.interm.intermBlock) = new TIntermBlock(); |
| context->appendStatement((yyval.interm.intermBlock), (yyvsp[0].interm.intermNode)); |
| } |
| |
| break; |
| |
| case 270: |
| |
| { |
| (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); |
| context->appendStatement((yyval.interm.intermBlock), (yyvsp[0].interm.intermNode)); |
| } |
| |
| break; |
| |
| case 271: |
| |
| { |
| (yyval.interm.intermNode) = context->addEmptyStatement((yyloc)); |
| } |
| |
| break; |
| |
| case 272: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[-1].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 273: |
| |
| { |
| (yyval.interm.intermNode) = context->addIfElse((yyvsp[-2].interm.intermTypedNode), |
| (yyvsp[0].interm.nodePair), (yylsp[-4])); |
| } |
| |
| break; |
| |
| case 274: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); |
| (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 275: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); |
| (yyval.interm.nodePair).node2 = nullptr; |
| } |
| |
| break; |
| |
| case 276: |
| |
| { |
| context->incrSwitchNestingLevel(); |
| } |
| |
| break; |
| |
| case 277: |
| |
| { |
| (yyval.interm.intermSwitch) = context->addSwitch( |
| (yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermBlock), (yylsp[-5])); |
| context->decrSwitchNestingLevel(); |
| } |
| |
| break; |
| |
| case 278: |
| |
| { |
| (yyval.interm.intermCase) = |
| context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); |
| } |
| |
| break; |
| |
| case 279: |
| |
| { |
| (yyval.interm.intermCase) = context->addDefault((yylsp[-1])); |
| } |
| |
| break; |
| |
| case 280: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode); |
| context->checkIsScalarBool((yyvsp[0].interm.intermTypedNode)->getLine(), |
| (yyvsp[0].interm.intermTypedNode)); |
| } |
| |
| break; |
| |
| case 281: |
| |
| { |
| (yyval.interm.intermNode) = context->addConditionInitializer( |
| (yyvsp[-3].interm.type), ImmutableString((yyvsp[-2].lex).string), |
| (yyvsp[0].interm.intermTypedNode), (yylsp[-2])); |
| } |
| |
| break; |
| |
| case 282: |
| |
| { |
| context->symbolTable.push(); |
| context->incrLoopNestingLevel(); |
| } |
| |
| break; |
| |
| case 283: |
| |
| { |
| context->symbolTable.pop(); |
| (yyval.interm.intermNode) = |
| context->addLoop(ELoopWhile, 0, (yyvsp[-2].interm.intermNode), 0, |
| (yyvsp[0].interm.intermNode), (yylsp[-5])); |
| context->decrLoopNestingLevel(); |
| } |
| |
| break; |
| |
| case 284: |
| |
| { |
| context->incrLoopNestingLevel(); |
| } |
| |
| break; |
| |
| case 285: |
| |
| { |
| (yyval.interm.intermNode) = |
| context->addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, |
| (yyvsp[-5].interm.intermNode), (yylsp[-4])); |
| context->decrLoopNestingLevel(); |
| } |
| |
| break; |
| |
| case 286: |
| |
| { |
| context->symbolTable.push(); |
| context->incrLoopNestingLevel(); |
| } |
| |
| break; |
| |
| case 287: |
| |
| { |
| context->symbolTable.pop(); |
| (yyval.interm.intermNode) = context->addLoop( |
| ELoopFor, (yyvsp[-3].interm.intermNode), (yyvsp[-2].interm.nodePair).node1, |
| reinterpret_cast<TIntermTyped *>((yyvsp[-2].interm.nodePair).node2), |
| (yyvsp[0].interm.intermNode), (yylsp[-6])); |
| context->decrLoopNestingLevel(); |
| } |
| |
| break; |
| |
| case 288: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 289: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 290: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 291: |
| |
| { |
| (yyval.interm.intermNode) = nullptr; |
| } |
| |
| break; |
| |
| case 292: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermNode); |
| (yyval.interm.nodePair).node2 = 0; |
| } |
| |
| break; |
| |
| case 293: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); |
| (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); |
| } |
| |
| break; |
| |
| case 294: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 295: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 296: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 297: |
| |
| { |
| (yyval.interm.intermNode) = |
| context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); |
| } |
| |
| break; |
| |
| case 298: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1])); |
| } |
| |
| break; |
| |
| case 299: |
| |
| { |
| (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 300: |
| |
| { |
| (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); |
| } |
| |
| break; |
| |
| case 301: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 302: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
| } |
| |
| break; |
| |
| case 303: |
| |
| { |
| context->parseFunctionDefinitionHeader((yylsp[0]), (yyvsp[0].interm).function, |
| &((yyvsp[0].interm).intermFunctionPrototype)); |
| } |
| |
| break; |
| |
| case 304: |
| |
| { |
| (yyval.interm.intermNode) = |
| context->addFunctionDefinition((yyvsp[-2].interm).intermFunctionPrototype, |
| (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. */ |
| { |
| const int yylhs = yyr1[yyn] - YYNTOKENS; |
| const int yyi = yypgoto[yylhs] + *yyssp; |
| yystate = |
| (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); |
| } |
| |
| 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 when the user code never invokes YYERROR and the |
| label yyerrorlab therefore never appears in user code. */ |
| if (0) |
| YYERROR; |
| |
| /* 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 -- parsing is finished, return the result. | |
| `-----------------------------------------------------*/ |
| 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()); |
| } |