| |
| /* A Bison parser, made by GNU Bison 2.4.1. */ |
| |
| /* Skeleton implementation for Bison's Yacc-like parsers in C |
| |
| Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| Free Software Foundation, Inc. |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
| the Free Software Foundation, either version 3 of the License, or |
| (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License |
| along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| |
| /* As a special exception, you may create a larger work that contains |
| part or all of the Bison parser skeleton and distribute that work |
| under terms of your choice, so long as that work isn't itself a |
| parser generator using the skeleton or a modified version thereof |
| as a parser skeleton. Alternatively, if you modify or redistribute |
| the parser skeleton itself, you may (at your option) remove this |
| special exception, which will cause the skeleton and the resulting |
| Bison output files to be licensed under the GNU General Public |
| License without this special exception. |
| |
| This special exception was added by the Free Software Foundation in |
| version 2.2 of Bison. */ |
| |
| /* C LALR(1) parser skeleton written by Richard Stallman, by |
| simplifying the original so-called "semantic" parser. */ |
| |
| /* All symbols defined below should begin with yy or YY, to avoid |
| infringing on user name space. This should be done even for local |
| variables, as they might otherwise be expanded by user macros. |
| There are some unavoidable exceptions within include files to |
| define necessary library symbols; they are noted "INFRINGES ON |
| USER NAME SPACE" below. */ |
| |
| /* Identify Bison output. */ |
| #define YYBISON 1 |
| |
| /* Bison version. */ |
| #define YYBISON_VERSION "2.4.1" |
| |
| /* Skeleton name. */ |
| #define YYSKELETON_NAME "yacc.c" |
| |
| /* Pure parsers. */ |
| #define YYPURE 1 |
| |
| /* Push parsers. */ |
| #define YYPUSH 0 |
| |
| /* Pull parsers. */ |
| #define YYPULL 1 |
| |
| /* Using locations. */ |
| #define YYLSP_NEEDED 1 |
| |
| |
| |
| /* Copy the first part of user declarations. */ |
| |
| |
| // |
| // Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // |
| |
| // This file is auto-generated by generate_parser.sh. DO NOT EDIT! |
| |
| // 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: 4505) |
| #pragma warning(disable: 4701) |
| #endif |
| |
| #include "SymbolTable.h" |
| #include "ParseHelper.h" |
| |
| #define YYENABLE_NLS 0 |
| |
| #define YYLEX_PARAM context->scanner |
| |
| |
| |
| /* Enabling traces. */ |
| #ifndef YYDEBUG |
| # define YYDEBUG 0 |
| #endif |
| |
| /* Enabling verbose error messages. */ |
| #ifdef YYERROR_VERBOSE |
| # undef YYERROR_VERBOSE |
| # define YYERROR_VERBOSE 1 |
| #else |
| # define YYERROR_VERBOSE 0 |
| #endif |
| |
| /* Enabling the token table. */ |
| #ifndef YYTOKEN_TABLE |
| # define YYTOKEN_TABLE 0 |
| #endif |
| |
| /* "%code requires" blocks. */ |
| |
| |
| #define YYLTYPE TSourceLoc |
| #define YYLTYPE_IS_DECLARED 1 |
| |
| |
| |
| |
| /* Tokens. */ |
| #ifndef YYTOKENTYPE |
| # define YYTOKENTYPE |
| /* Put the tokens into the symbol table, so that GDB and other debuggers |
| know about them. */ |
| enum yytokentype { |
| INVARIANT = 258, |
| HIGH_PRECISION = 259, |
| MEDIUM_PRECISION = 260, |
| LOW_PRECISION = 261, |
| PRECISION = 262, |
| ATTRIBUTE = 263, |
| CONST_QUAL = 264, |
| BOOL_TYPE = 265, |
| FLOAT_TYPE = 266, |
| INT_TYPE = 267, |
| UINT_TYPE = 268, |
| BREAK = 269, |
| CONTINUE = 270, |
| DO = 271, |
| ELSE = 272, |
| FOR = 273, |
| IF = 274, |
| DISCARD = 275, |
| RETURN = 276, |
| SWITCH = 277, |
| CASE = 278, |
| DEFAULT = 279, |
| BVEC2 = 280, |
| BVEC3 = 281, |
| BVEC4 = 282, |
| IVEC2 = 283, |
| IVEC3 = 284, |
| IVEC4 = 285, |
| VEC2 = 286, |
| VEC3 = 287, |
| VEC4 = 288, |
| UVEC2 = 289, |
| UVEC3 = 290, |
| UVEC4 = 291, |
| MATRIX2 = 292, |
| MATRIX3 = 293, |
| MATRIX4 = 294, |
| IN_QUAL = 295, |
| OUT_QUAL = 296, |
| INOUT_QUAL = 297, |
| UNIFORM = 298, |
| VARYING = 299, |
| MATRIX2x3 = 300, |
| MATRIX3x2 = 301, |
| MATRIX2x4 = 302, |
| MATRIX4x2 = 303, |
| MATRIX3x4 = 304, |
| MATRIX4x3 = 305, |
| CENTROID = 306, |
| FLAT = 307, |
| SMOOTH = 308, |
| STRUCT = 309, |
| VOID_TYPE = 310, |
| WHILE = 311, |
| SAMPLER2D = 312, |
| SAMPLERCUBE = 313, |
| SAMPLER_EXTERNAL_OES = 314, |
| SAMPLER2DRECT = 315, |
| SAMPLER2DARRAY = 316, |
| ISAMPLER2D = 317, |
| ISAMPLER3D = 318, |
| ISAMPLERCUBE = 319, |
| ISAMPLER2DARRAY = 320, |
| USAMPLER2D = 321, |
| USAMPLER3D = 322, |
| USAMPLERCUBE = 323, |
| USAMPLER2DARRAY = 324, |
| SAMPLER3D = 325, |
| SAMPLER3DRECT = 326, |
| SAMPLER2DSHADOW = 327, |
| SAMPLERCUBESHADOW = 328, |
| SAMPLER2DARRAYSHADOW = 329, |
| LAYOUT = 330, |
| IDENTIFIER = 331, |
| TYPE_NAME = 332, |
| FLOATCONSTANT = 333, |
| INTCONSTANT = 334, |
| UINTCONSTANT = 335, |
| BOOLCONSTANT = 336, |
| FIELD_SELECTION = 337, |
| LEFT_OP = 338, |
| RIGHT_OP = 339, |
| INC_OP = 340, |
| DEC_OP = 341, |
| LE_OP = 342, |
| GE_OP = 343, |
| EQ_OP = 344, |
| NE_OP = 345, |
| AND_OP = 346, |
| OR_OP = 347, |
| XOR_OP = 348, |
| MUL_ASSIGN = 349, |
| DIV_ASSIGN = 350, |
| ADD_ASSIGN = 351, |
| MOD_ASSIGN = 352, |
| LEFT_ASSIGN = 353, |
| RIGHT_ASSIGN = 354, |
| AND_ASSIGN = 355, |
| XOR_ASSIGN = 356, |
| OR_ASSIGN = 357, |
| SUB_ASSIGN = 358, |
| LEFT_PAREN = 359, |
| RIGHT_PAREN = 360, |
| LEFT_BRACKET = 361, |
| RIGHT_BRACKET = 362, |
| LEFT_BRACE = 363, |
| RIGHT_BRACE = 364, |
| DOT = 365, |
| COMMA = 366, |
| COLON = 367, |
| EQUAL = 368, |
| SEMICOLON = 369, |
| BANG = 370, |
| DASH = 371, |
| TILDE = 372, |
| PLUS = 373, |
| STAR = 374, |
| SLASH = 375, |
| PERCENT = 376, |
| LEFT_ANGLE = 377, |
| RIGHT_ANGLE = 378, |
| VERTICAL_BAR = 379, |
| CARET = 380, |
| AMPERSAND = 381, |
| QUESTION = 382 |
| }; |
| #endif |
| |
| |
| |
| #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| typedef union YYSTYPE |
| { |
| |
| |
| struct { |
| TSourceLoc line; |
| union { |
| TString *string; |
| float f; |
| int i; |
| unsigned int u; |
| bool b; |
| }; |
| TSymbol* symbol; |
| } lex; |
| struct { |
| TSourceLoc line; |
| TOperator op; |
| union { |
| TIntermNode* intermNode; |
| TIntermNodePair nodePair; |
| TIntermTyped* intermTypedNode; |
| TIntermAggregate* intermAggregate; |
| TIntermSwitch* intermSwitch; |
| TIntermCase* intermCase; |
| }; |
| union { |
| TPublicType type; |
| TPrecision precision; |
| TLayoutQualifier layoutQualifier; |
| TQualifier qualifier; |
| TFunction* function; |
| TParameter param; |
| TField* field; |
| TFieldList* fieldList; |
| }; |
| } interm; |
| |
| |
| |
| } YYSTYPE; |
| # define YYSTYPE_IS_TRIVIAL 1 |
| # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| # define YYSTYPE_IS_DECLARED 1 |
| #endif |
| |
| #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
| typedef struct YYLTYPE |
| { |
| int first_line; |
| int first_column; |
| int last_line; |
| int last_column; |
| } YYLTYPE; |
| # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ |
| # define YYLTYPE_IS_DECLARED 1 |
| # define YYLTYPE_IS_TRIVIAL 1 |
| #endif |
| |
| |
| /* Copy the second part of user declarations. */ |
| |
| |
| extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); |
| extern void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason); |
| |
| #define YYLLOC_DEFAULT(Current, Rhs, N) do { (Current) = YYRHSLOC(Rhs, N ? 1 : 0); } while (0) |
| |
| #define FRAG_VERT_ONLY(S, L) { \ |
| if (context->shaderType != GL_FRAGMENT_SHADER && \ |
| context->shaderType != GL_VERTEX_SHADER) { \ |
| context->error(L, " supported in vertex/fragment shaders only ", S); \ |
| context->recover(); \ |
| } \ |
| } |
| |
| #define VERTEX_ONLY(S, L) { \ |
| if (context->shaderType != GL_VERTEX_SHADER) { \ |
| context->error(L, " supported in vertex shaders only ", S); \ |
| context->recover(); \ |
| } \ |
| } |
| |
| #define FRAG_ONLY(S, L) { \ |
| if (context->shaderType != GL_FRAGMENT_SHADER) { \ |
| context->error(L, " supported in fragment shaders only ", S); \ |
| context->recover(); \ |
| } \ |
| } |
| |
| #define ES2_ONLY(S, L) { \ |
| if (context->shaderVersion != 100) { \ |
| context->error(L, " supported in GLSL ES 1.00 only ", S); \ |
| context->recover(); \ |
| } \ |
| } |
| |
| #define ES3_ONLY(S, L) { \ |
| if (context->shaderVersion != 300) { \ |
| context->error(L, " supported in GLSL ES 3.00 only ", S); \ |
| context->recover(); \ |
| } \ |
| } |
| |
| |
| |
| #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; |
| #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| typedef signed char yytype_int8; |
| #else |
| typedef short int yytype_int8; |
| #endif |
| |
| #ifdef YYTYPE_UINT16 |
| typedef YYTYPE_UINT16 yytype_uint16; |
| #else |
| typedef unsigned short int yytype_uint16; |
| #endif |
| |
| #ifdef YYTYPE_INT16 |
| typedef YYTYPE_INT16 yytype_int16; |
| #else |
| typedef short int yytype_int16; |
| #endif |
| |
| #ifndef YYSIZE_T |
| # ifdef __SIZE_TYPE__ |
| # define YYSIZE_T __SIZE_TYPE__ |
| # elif defined size_t |
| # define YYSIZE_T size_t |
| # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| # define YYSIZE_T size_t |
| # else |
| # define YYSIZE_T unsigned int |
| # endif |
| #endif |
| |
| #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| |
| #ifndef YY_ |
| # if 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 |
| |
| /* Suppress unused-variable warnings by "using" E. */ |
| #if ! defined lint || defined __GNUC__ |
| # define YYUSE(e) ((void) (e)) |
| #else |
| # define YYUSE(e) /* empty */ |
| #endif |
| |
| /* Identity function, used to suppress warnings about constant conditions. */ |
| #ifndef lint |
| # define YYID(n) (n) |
| #else |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static int |
| YYID (int yyi) |
| #else |
| static int |
| YYID (yyi) |
| int yyi; |
| #endif |
| { |
| return yyi; |
| } |
| #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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| # ifndef _STDLIB_H |
| # define _STDLIB_H 1 |
| # endif |
| # endif |
| # endif |
| # endif |
| # endif |
| |
| # ifdef YYSTACK_ALLOC |
| /* Pacify GCC's `empty if-body' warning. */ |
| # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (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 _STDLIB_H \ |
| && ! ((defined YYMALLOC || defined malloc) \ |
| && (defined YYFREE || defined free))) |
| # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| # ifndef _STDLIB_H |
| # define _STDLIB_H 1 |
| # endif |
| # endif |
| # ifndef YYMALLOC |
| # define YYMALLOC malloc |
| # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| # endif |
| # endif |
| # ifndef YYFREE |
| # define YYFREE free |
| # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| 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) |
| |
| /* Copy COUNT objects from FROM to TO. The source and destination do |
| not overlap. */ |
| # ifndef YYCOPY |
| # if defined __GNUC__ && 1 < __GNUC__ |
| # define YYCOPY(To, From, Count) \ |
| __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| # else |
| # define YYCOPY(To, From, Count) \ |
| do \ |
| { \ |
| YYSIZE_T yyi; \ |
| for (yyi = 0; yyi < (Count); yyi++) \ |
| (To)[yyi] = (From)[yyi]; \ |
| } \ |
| while (YYID (0)) |
| # endif |
| # endif |
| |
| /* 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 (YYID (0)) |
| |
| #endif |
| |
| /* YYFINAL -- State number of the termination state. */ |
| #define YYFINAL 110 |
| /* YYLAST -- Last index in YYTABLE. */ |
| #define YYLAST 2519 |
| |
| /* YYNTOKENS -- Number of terminals. */ |
| #define YYNTOKENS 128 |
| /* YYNNTS -- Number of nonterminals. */ |
| #define YYNNTS 93 |
| /* YYNRULES -- Number of rules. */ |
| #define YYNRULES 270 |
| /* YYNRULES -- Number of states. */ |
| #define YYNSTATES 410 |
| |
| /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| #define YYUNDEFTOK 2 |
| #define YYMAXUTOK 382 |
| |
| #define YYTRANSLATE(YYX) \ |
| ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| |
| /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to 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 |
| }; |
| |
| #if YYDEBUG |
| /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| YYRHS. */ |
| static const yytype_uint16 yyprhs[] = |
| { |
| 0, 0, 3, 5, 7, 9, 11, 13, 15, 19, |
| 21, 26, 28, 32, 35, 38, 40, 42, 44, 48, |
| 51, 54, 57, 59, 62, 66, 69, 71, 73, 75, |
| 77, 80, 83, 86, 88, 90, 92, 94, 96, 100, |
| 104, 108, 110, 114, 118, 120, 124, 128, 130, 134, |
| 138, 142, 146, 148, 152, 156, 158, 162, 164, 168, |
| 170, 174, 176, 180, 182, 186, 188, 192, 194, 200, |
| 202, 206, 208, 210, 212, 214, 216, 218, 220, 222, |
| 224, 226, 228, 230, 234, 236, 239, 242, 245, 250, |
| 256, 263, 273, 276, 279, 281, 283, 286, 290, 294, |
| 297, 303, 307, 310, 314, 317, 318, 320, 322, 324, |
| 326, 328, 332, 339, 347, 356, 362, 364, 367, 373, |
| 380, 388, 393, 396, 398, 401, 403, 405, 407, 409, |
| 411, 414, 416, 419, 421, 423, 426, 428, 430, 432, |
| 435, 438, 440, 442, 445, 447, 449, 451, 456, 458, |
| 462, 464, 468, 472, 474, 478, 483, 485, 487, 489, |
| 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, |
| 511, 513, 515, 517, 519, 521, 523, 525, 527, 529, |
| 531, 533, 535, 537, 539, 541, 543, 545, 547, 549, |
| 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, |
| 571, 572, 579, 580, 586, 588, 591, 595, 600, 602, |
| 606, 608, 613, 615, 617, 619, 621, 623, 625, 627, |
| 629, 631, 633, 635, 638, 639, 640, 646, 648, 650, |
| 651, 654, 655, 658, 661, 665, 667, 670, 672, 675, |
| 681, 685, 687, 688, 695, 699, 702, 704, 709, 710, |
| 717, 718, 727, 728, 736, 738, 740, 742, 743, 746, |
| 750, 753, 756, 759, 763, 766, 768, 771, 773, 775, |
| 776 |
| }; |
| |
| /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| static const yytype_int16 yyrhs[] = |
| { |
| 217, 0, -1, 76, -1, 129, -1, 79, -1, 80, |
| -1, 78, -1, 81, -1, 104, 156, 105, -1, 130, |
| -1, 131, 106, 132, 107, -1, 133, -1, 131, 110, |
| 82, -1, 131, 85, -1, 131, 86, -1, 156, -1, |
| 134, -1, 135, -1, 131, 110, 135, -1, 137, 105, |
| -1, 136, 105, -1, 138, 55, -1, 138, -1, 138, |
| 154, -1, 137, 111, 154, -1, 139, 104, -1, 180, |
| -1, 76, -1, 82, -1, 131, -1, 85, 140, -1, |
| 86, 140, -1, 141, 140, -1, 118, -1, 116, -1, |
| 115, -1, 117, -1, 140, -1, 142, 119, 140, -1, |
| 142, 120, 140, -1, 142, 121, 140, -1, 142, -1, |
| 143, 118, 142, -1, 143, 116, 142, -1, 143, -1, |
| 144, 83, 143, -1, 144, 84, 143, -1, 144, -1, |
| 145, 122, 144, -1, 145, 123, 144, -1, 145, 87, |
| 144, -1, 145, 88, 144, -1, 145, -1, 146, 89, |
| 145, -1, 146, 90, 145, -1, 146, -1, 147, 126, |
| 146, -1, 147, -1, 148, 125, 147, -1, 148, -1, |
| 149, 124, 148, -1, 149, -1, 150, 91, 149, -1, |
| 150, -1, 151, 93, 150, -1, 151, -1, 152, 92, |
| 151, -1, 152, -1, 152, 127, 156, 112, 154, -1, |
| 153, -1, 140, 155, 154, -1, 113, -1, 94, -1, |
| 95, -1, 97, -1, 96, -1, 103, -1, 98, -1, |
| 99, -1, 100, -1, 101, -1, 102, -1, 154, -1, |
| 156, 111, 154, -1, 153, -1, 76, 108, -1, 160, |
| 114, -1, 168, 114, -1, 7, 176, 180, 114, -1, |
| 173, 158, 185, 109, 114, -1, 173, 158, 185, 109, |
| 76, 114, -1, 173, 158, 185, 109, 76, 106, 157, |
| 107, 114, -1, 173, 114, -1, 161, 105, -1, 163, |
| -1, 162, -1, 163, 165, -1, 162, 111, 165, -1, |
| 170, 76, 104, -1, 175, 76, -1, 175, 76, 106, |
| 157, 107, -1, 172, 166, 164, -1, 166, 164, -1, |
| 172, 166, 167, -1, 166, 167, -1, -1, 40, -1, |
| 41, -1, 42, -1, 175, -1, 169, -1, 168, 111, |
| 76, -1, 168, 111, 76, 106, 157, 107, -1, 168, |
| 111, 76, 106, 107, 113, 189, -1, 168, 111, 76, |
| 106, 157, 107, 113, 189, -1, 168, 111, 76, 113, |
| 189, -1, 170, -1, 170, 76, -1, 170, 76, 106, |
| 157, 107, -1, 170, 76, 106, 107, 113, 189, -1, |
| 170, 76, 106, 157, 107, 113, 189, -1, 170, 76, |
| 113, 189, -1, 3, 76, -1, 175, -1, 173, 175, |
| -1, 53, -1, 52, -1, 9, -1, 8, -1, 44, |
| -1, 3, 44, -1, 174, -1, 171, 174, -1, 171, |
| -1, 177, -1, 177, 174, -1, 9, -1, 40, -1, |
| 41, -1, 51, 40, -1, 51, 41, -1, 43, -1, |
| 180, -1, 176, 180, -1, 4, -1, 5, -1, 6, |
| -1, 75, 104, 178, 105, -1, 179, -1, 178, 111, |
| 179, -1, 76, -1, 76, 113, 79, -1, 76, 113, |
| 80, -1, 181, -1, 181, 106, 107, -1, 181, 106, |
| 157, 107, -1, 55, -1, 11, -1, 12, -1, 13, |
| -1, 10, -1, 31, -1, 32, -1, 33, -1, 25, |
| -1, 26, -1, 27, -1, 28, -1, 29, -1, 30, |
| -1, 34, -1, 35, -1, 36, -1, 37, -1, 38, |
| -1, 39, -1, 45, -1, 46, -1, 47, -1, 48, |
| -1, 49, -1, 50, -1, 57, -1, 58, -1, 59, |
| -1, 70, -1, 61, -1, 62, -1, 63, -1, 64, |
| -1, 65, -1, 66, -1, 67, -1, 68, -1, 69, |
| -1, 72, -1, 73, -1, 74, -1, 182, -1, 77, |
| -1, -1, 54, 76, 108, 183, 185, 109, -1, -1, |
| 54, 108, 184, 185, 109, -1, 186, -1, 185, 186, |
| -1, 175, 187, 114, -1, 173, 175, 187, 114, -1, |
| 188, -1, 187, 111, 188, -1, 76, -1, 76, 106, |
| 157, 107, -1, 154, -1, 159, -1, 193, -1, 192, |
| -1, 190, -1, 202, -1, 203, -1, 205, -1, 207, |
| -1, 209, -1, 216, -1, 108, 109, -1, -1, -1, |
| 108, 194, 201, 195, 109, -1, 200, -1, 192, -1, |
| -1, 198, 200, -1, -1, 199, 192, -1, 108, 109, |
| -1, 108, 201, 109, -1, 191, -1, 201, 191, -1, |
| 114, -1, 156, 114, -1, 19, 104, 156, 105, 204, |
| -1, 197, 17, 197, -1, 197, -1, -1, 22, 104, |
| 156, 105, 206, 193, -1, 23, 157, 112, -1, 24, |
| 112, -1, 156, -1, 170, 76, 113, 189, -1, -1, |
| 56, 104, 210, 208, 105, 196, -1, -1, 16, 211, |
| 197, 56, 104, 156, 105, 114, -1, -1, 18, 104, |
| 212, 213, 215, 105, 196, -1, 202, -1, 190, -1, |
| 208, -1, -1, 214, 114, -1, 214, 114, 156, -1, |
| 15, 114, -1, 14, 114, -1, 21, 114, -1, 21, |
| 156, 114, -1, 20, 114, -1, 218, -1, 217, 218, |
| -1, 219, -1, 159, -1, -1, 160, 220, 200, -1 |
| }; |
| |
| /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| static const yytype_uint16 yyrline[] = |
| { |
| 0, 202, 202, 237, 240, 245, 250, 255, 260, 266, |
| 269, 272, 275, 278, 281, 287, 295, 395, 398, 406, |
| 410, 417, 421, 428, 434, 443, 451, 457, 464, 474, |
| 477, 487, 497, 519, 520, 521, 522, 530, 531, 535, |
| 539, 547, 548, 551, 557, 558, 562, 569, 570, 573, |
| 576, 579, 585, 586, 589, 595, 596, 603, 604, 611, |
| 612, 619, 620, 626, 627, 633, 634, 640, 641, 658, |
| 659, 667, 668, 669, 670, 672, 673, 674, 676, 678, |
| 680, 682, 687, 690, 701, 709, 717, 744, 750, 757, |
| 761, 765, 769, 776, 814, 817, 824, 832, 853, 874, |
| 885, 914, 919, 929, 934, 944, 947, 950, 953, 959, |
| 966, 969, 973, 977, 982, 987, 994, 998, 1002, 1006, |
| 1011, 1016, 1020, 1096, 1106, 1112, 1115, 1121, 1127, 1134, |
| 1143, 1152, 1155, 1158, 1165, 1169, 1176, 1180, 1185, 1190, |
| 1200, 1210, 1219, 1229, 1236, 1239, 1242, 1248, 1255, 1258, |
| 1264, 1267, 1270, 1276, 1279, 1284, 1299, 1303, 1307, 1311, |
| 1315, 1319, 1324, 1329, 1334, 1339, 1344, 1349, 1354, 1359, |
| 1364, 1369, 1374, 1379, 1385, 1391, 1397, 1403, 1409, 1415, |
| 1421, 1427, 1433, 1438, 1443, 1452, 1457, 1462, 1467, 1472, |
| 1477, 1482, 1487, 1492, 1497, 1502, 1507, 1512, 1517, 1522, |
| 1535, 1535, 1538, 1538, 1544, 1547, 1563, 1566, 1575, 1579, |
| 1585, 1592, 1607, 1611, 1615, 1616, 1622, 1623, 1624, 1625, |
| 1626, 1627, 1628, 1632, 1633, 1633, 1633, 1643, 1644, 1648, |
| 1648, 1649, 1649, 1654, 1657, 1667, 1670, 1676, 1677, 1681, |
| 1689, 1693, 1700, 1700, 1707, 1710, 1719, 1724, 1741, 1741, |
| 1746, 1746, 1753, 1753, 1761, 1764, 1770, 1773, 1779, 1783, |
| 1790, 1793, 1796, 1799, 1802, 1811, 1815, 1822, 1825, 1831, |
| 1831 |
| }; |
| #endif |
| |
| #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
| /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| static const char *const yytname[] = |
| { |
| "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION", |
| "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE", |
| "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE", |
| "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", |
| "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", |
| "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2", |
| "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", |
| "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2", |
| "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT", |
| "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES", |
| "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D", |
| "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D", |
| "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT", |
| "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT", |
| "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT", |
| "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", |
| "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", |
| "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", |
| "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", |
| "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", |
| "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", |
| "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", |
| "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", |
| "AMPERSAND", "QUESTION", "$accept", "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_qualifier", |
| "parameter_type_specifier", "init_declarator_list", "single_declaration", |
| "fully_specified_type", "interpolation_qualifier", |
| "parameter_type_qualifier", "type_qualifier", "storage_qualifier", |
| "type_specifier", "precision_qualifier", "layout_qualifier", |
| "layout_qualifier_id_list", "layout_qualifier_id", |
| "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", |
| "$@1", "$@2", "struct_declaration_list", "struct_declaration", |
| "struct_declarator_list", "struct_declarator", "initializer", |
| "declaration_statement", "statement", "simple_statement", |
| "compound_statement", "$@3", "$@4", "statement_no_new_scope", |
| "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope", |
| "statement_list", "expression_statement", "selection_statement", |
| "selection_rest_statement", "switch_statement", "$@7", "case_label", |
| "condition", "iteration_statement", "$@8", "$@9", "$@10", |
| "for_init_statement", "conditionopt", "for_rest_statement", |
| "jump_statement", "translation_unit", "external_declaration", |
| "function_definition", "$@11", 0 |
| }; |
| #endif |
| |
| # ifdef YYPRINT |
| /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| token YYLEX-NUM. */ |
| 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 |
| }; |
| # endif |
| |
| /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| static const yytype_uint8 yyr1[] = |
| { |
| 0, 128, 129, 130, 130, 130, 130, 130, 130, 131, |
| 131, 131, 131, 131, 131, 132, 133, 134, 134, 135, |
| 135, 136, 136, 137, 137, 138, 139, 139, 139, 140, |
| 140, 140, 140, 141, 141, 141, 141, 142, 142, 142, |
| 142, 143, 143, 143, 144, 144, 144, 145, 145, 145, |
| 145, 145, 146, 146, 146, 147, 147, 148, 148, 149, |
| 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, |
| 154, 155, 155, 155, 155, 155, 155, 155, 155, 155, |
| 155, 155, 156, 156, 157, 158, 159, 159, 159, 159, |
| 159, 159, 159, 160, 161, 161, 162, 162, 163, 164, |
| 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, |
| 168, 168, 168, 168, 168, 168, 169, 169, 169, 169, |
| 169, 169, 169, 170, 170, 171, 171, 172, 173, 173, |
| 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, |
| 174, 174, 175, 175, 176, 176, 176, 177, 178, 178, |
| 179, 179, 179, 180, 180, 180, 181, 181, 181, 181, |
| 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 183, 182, 184, 182, 185, 185, 186, 186, 187, 187, |
| 188, 188, 189, 190, 191, 191, 192, 192, 192, 192, |
| 192, 192, 192, 193, 194, 195, 193, 196, 196, 198, |
| 197, 199, 197, 200, 200, 201, 201, 202, 202, 203, |
| 204, 204, 206, 205, 207, 207, 208, 208, 210, 209, |
| 211, 209, 212, 209, 213, 213, 214, 214, 215, 215, |
| 216, 216, 216, 216, 216, 217, 217, 218, 218, 220, |
| 219 |
| }; |
| |
| /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| static const yytype_uint8 yyr2[] = |
| { |
| 0, 2, 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, 2, 1, 1, 2, 3, 3, 2, |
| 5, 3, 2, 3, 2, 0, 1, 1, 1, 1, |
| 1, 3, 6, 7, 8, 5, 1, 2, 5, 6, |
| 7, 4, 2, 1, 2, 1, 1, 1, 1, 1, |
| 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, |
| 2, 1, 1, 2, 1, 1, 1, 4, 1, 3, |
| 1, 3, 3, 1, 3, 4, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 0, 6, 0, 5, 1, 2, 3, 4, 1, 3, |
| 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1, 1, 1, 2, 0, 0, 5, 1, 1, 0, |
| 2, 0, 2, 2, 3, 1, 2, 1, 2, 5, |
| 3, 1, 0, 6, 3, 2, 1, 4, 0, 6, |
| 0, 8, 0, 7, 1, 1, 1, 0, 2, 3, |
| 2, 2, 2, 3, 2, 1, 2, 1, 1, 0, |
| 3 |
| }; |
| |
| /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| means the default is an error. */ |
| static const yytype_uint16 yydefact[] = |
| { |
| 0, 0, 144, 145, 146, 0, 128, 136, 160, 157, |
| 158, 159, 164, 165, 166, 167, 168, 169, 161, 162, |
| 163, 170, 171, 172, 173, 174, 175, 137, 138, 141, |
| 129, 176, 177, 178, 179, 180, 181, 0, 126, 125, |
| 0, 156, 182, 183, 184, 186, 187, 188, 189, 190, |
| 191, 192, 193, 194, 185, 195, 196, 197, 0, 199, |
| 268, 269, 0, 95, 105, 0, 110, 116, 133, 0, |
| 131, 123, 0, 134, 142, 153, 198, 0, 265, 267, |
| 130, 122, 0, 139, 140, 0, 202, 0, 86, 0, |
| 93, 105, 127, 106, 107, 108, 96, 0, 105, 0, |
| 87, 117, 132, 0, 92, 0, 124, 143, 135, 0, |
| 1, 266, 0, 200, 0, 150, 0, 148, 0, 270, |
| 97, 102, 104, 109, 0, 111, 98, 0, 0, 85, |
| 0, 0, 0, 0, 204, 2, 6, 4, 5, 7, |
| 28, 0, 0, 0, 154, 35, 34, 36, 33, 3, |
| 9, 29, 11, 16, 17, 0, 0, 22, 0, 37, |
| 0, 41, 44, 47, 52, 55, 57, 59, 61, 63, |
| 65, 67, 84, 0, 26, 88, 0, 0, 0, 147, |
| 0, 0, 0, 250, 0, 0, 0, 0, 0, 0, |
| 0, 0, 224, 233, 237, 37, 69, 82, 0, 213, |
| 0, 142, 216, 235, 215, 214, 0, 217, 218, 219, |
| 220, 221, 222, 99, 101, 103, 0, 0, 0, 0, |
| 212, 121, 0, 210, 0, 208, 0, 205, 30, 31, |
| 0, 13, 14, 0, 0, 20, 19, 0, 156, 23, |
| 25, 32, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 155, 0, 203, 151, 152, 149, 261, 260, |
| 231, 252, 0, 264, 262, 0, 0, 0, 245, 248, |
| 223, 0, 72, 73, 75, 74, 77, 78, 79, 80, |
| 81, 76, 71, 0, 0, 238, 234, 236, 0, 0, |
| 0, 115, 0, 118, 0, 0, 0, 206, 0, 89, |
| 8, 0, 15, 27, 12, 18, 24, 38, 39, 40, |
| 43, 42, 45, 46, 50, 51, 48, 49, 53, 54, |
| 56, 58, 60, 62, 64, 66, 0, 201, 0, 0, |
| 0, 0, 0, 263, 0, 244, 0, 225, 70, 83, |
| 0, 0, 112, 119, 0, 207, 0, 209, 0, 90, |
| 10, 0, 0, 230, 232, 255, 254, 257, 231, 242, |
| 246, 0, 0, 0, 0, 100, 113, 0, 120, 211, |
| 0, 68, 0, 256, 0, 0, 241, 239, 0, 0, |
| 0, 226, 114, 0, 0, 258, 0, 231, 243, 0, |
| 228, 249, 227, 91, 0, 259, 253, 240, 247, 251 |
| }; |
| |
| /* YYDEFGOTO[NTERM-NUM]. */ |
| static const yytype_int16 yydefgoto[] = |
| { |
| -1, 149, 150, 151, 311, 152, 153, 154, 155, 156, |
| 157, 158, 195, 160, 161, 162, 163, 164, 165, 166, |
| 167, 168, 169, 170, 171, 196, 197, 293, 198, 173, |
| 105, 199, 200, 62, 63, 64, 121, 96, 97, 122, |
| 65, 66, 67, 68, 98, 69, 70, 71, 72, 73, |
| 116, 117, 174, 75, 76, 176, 114, 133, 134, 224, |
| 225, 221, 202, 203, 204, 205, 281, 374, 401, 338, |
| 339, 340, 402, 206, 207, 208, 387, 209, 388, 210, |
| 373, 211, 346, 270, 341, 367, 384, 385, 212, 77, |
| 78, 79, 89 |
| }; |
| |
| /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| STATE-NUM. */ |
| #define YYPACT_NINF -331 |
| static const yytype_int16 yypact[] = |
| { |
| 2157, -28, -331, -331, -331, 141, -331, -331, -331, -331, |
| -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, |
| -331, -331, -331, -331, -331, -331, -331, -331, -331, -331, |
| -331, -331, -331, -331, -331, -331, -331, 4, -331, -331, |
| -44, -331, -331, -331, -331, -331, -331, -331, -331, -331, |
| -331, -331, -331, -331, -331, -331, -331, -331, -78, -331, |
| -331, -31, -35, -24, 10, -71, -331, 45, 38, 1176, |
| -331, -331, 2442, 38, -331, 1, -331, 2082, -331, -331, |
| -331, -331, 2442, -331, -331, 49, -331, 72, -331, 51, |
| -331, 19, -331, -331, -331, -331, -331, 2306, 110, 92, |
| -331, -79, -331, 67, -331, 2232, -331, -331, -331, 1246, |
| -331, -331, 25, -331, 2232, 58, -70, -331, 404, -331, |
| -331, -331, -331, 103, 2306, -89, -331, 1344, 1635, -331, |
| 136, 2306, 105, 1827, -331, 78, -331, -331, -331, -331, |
| -331, 1635, 1635, 1635, -331, -331, -331, -331, -331, -331, |
| -331, 16, -331, -331, -331, 79, -21, 1730, 83, -331, |
| 1635, 34, 40, 28, -65, 47, 57, 61, 64, 100, |
| 101, -72, -331, 86, -331, -331, 2232, 1912, 82, -331, |
| 72, 84, 85, -331, 93, 96, 87, 1442, 98, 1635, |
| 91, 106, 102, -331, -331, 188, -331, -331, -15, -331, |
| -31, 108, -331, -331, -331, -331, 520, -331, -331, -331, |
| -331, -331, -331, 90, -331, -331, 1537, 1635, 104, 109, |
| -331, -331, 105, 107, 5, -331, -61, -331, -331, -331, |
| -20, -331, -331, 1635, 2374, -331, -331, 1635, 113, -331, |
| -331, -331, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, |
| 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, |
| 1635, 1635, -331, 1997, -331, -331, -331, -331, -331, -331, |
| 111, -331, 1635, -331, -331, 6, 1635, 97, -331, -331, |
| -331, 636, -331, -331, -331, -331, -331, -331, -331, -331, |
| -331, -331, -331, 1635, 1635, -331, -331, -331, 1635, 112, |
| 114, -331, 1635, 115, 21, 1635, 105, -331, -75, -331, |
| -331, 117, 120, -331, 116, -331, -331, -331, -331, -331, |
| 34, 34, 40, 40, 28, 28, 28, 28, -65, -65, |
| 47, 57, 61, 64, 100, 101, 31, -331, 159, 51, |
| 868, 984, -17, -331, -5, -331, 1081, 636, -331, -331, |
| 119, 1635, 121, -331, 1635, -331, 125, -331, 1635, -331, |
| -331, 1635, 118, -331, -331, -331, -331, 1081, 111, -331, |
| 120, 157, 2306, 130, 127, -331, -331, 1635, -331, -331, |
| 131, -331, 1635, -331, 126, 134, 224, -331, 138, 129, |
| 752, -331, -331, 133, -1, 1635, 752, 111, -331, 1635, |
| -331, -331, -331, -331, 135, 120, -331, -331, -331, -331 |
| }; |
| |
| /* YYPGOTO[NTERM-NUM]. */ |
| static const yytype_int16 yypgoto[] = |
| { |
| -331, -331, -331, -331, -331, -331, -331, 14, -331, -331, |
| -331, -331, 63, -331, -82, -74, -122, -88, -4, -6, |
| -3, 2, 7, 8, -331, -91, -124, -331, -138, -113, |
| -331, 3, 9, -331, -331, -331, 137, 164, 160, 145, |
| -331, -331, -325, -331, -331, -103, -2, -68, 254, -331, |
| -331, 94, 0, -331, -331, -331, -331, -101, -123, 43, |
| -36, -210, -69, -198, -328, -126, -331, -331, -125, -330, |
| -331, -331, -83, -8, -64, -331, -331, -331, -331, -331, |
| -87, -331, -331, -331, -331, -331, -331, -331, -331, -331, |
| 199, -331, -331 |
| }; |
| |
| /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| positive, shift that token. If negative, reduce the rule which |
| number is the opposite. If zero, do what YYDEFACT says. |
| If YYTABLE_NINF, syntax error. */ |
| #define YYTABLE_NINF -230 |
| static const yytype_int16 yytable[] = |
| { |
| 74, 106, 131, 60, 220, 230, 119, 301, 297, 61, |
| 227, 131, 364, 177, 219, 308, 80, 216, 172, 92, |
| 260, 371, 249, 250, 217, 126, 87, 127, 92, 123, |
| 131, 358, 85, 239, 128, 179, 172, 132, 386, 359, |
| 99, 180, 371, 100, 83, 84, 132, 7, 81, 275, |
| 93, 94, 95, 309, 227, 261, 123, 251, 252, 93, |
| 94, 95, 400, 222, 86, 132, 102, 407, 400, 74, |
| 90, 108, 107, 131, 131, 263, 277, 74, 27, 28, |
| 60, 29, 112, 88, 236, 310, 61, 91, 368, 37, |
| 237, 294, 353, 220, 294, 312, 294, 74, 172, 295, |
| 369, 231, 232, 300, 404, 74, 294, 109, 132, 132, |
| 294, 247, 248, 316, 74, -94, 306, 294, 201, 307, |
| 343, 101, 233, 336, 74, 172, 234, 324, 325, 326, |
| 327, 74, 306, 74, 342, 355, 253, 254, 344, 175, |
| 227, 376, 294, 361, 378, 2, 3, 4, 115, 297, |
| 93, 94, 95, 242, 243, 244, 245, 113, 246, 118, |
| 131, 265, 266, 320, 321, 328, 329, 392, 125, 348, |
| 349, 178, 159, 322, 323, 129, 74, 74, 220, 213, |
| 80, 223, -27, 255, 235, 350, 256, 240, 257, 408, |
| 159, 258, 356, 262, 259, 132, 298, 271, 268, 269, |
| 272, 273, 276, 278, 228, 229, 201, 172, 370, 345, |
| 279, 280, -26, 305, 172, 362, 303, 302, -21, -229, |
| -28, 352, 382, 241, 360, 351, 375, 220, 354, 370, |
| 220, 294, 379, 389, 377, 390, 391, 381, 393, 396, |
| 395, 397, 399, 372, 394, 380, 192, 403, 315, 409, |
| 331, 330, 159, 220, 332, 120, 363, 405, 124, 82, |
| 333, 214, 398, 74, 372, 304, 334, 172, 335, 215, |
| 357, 406, 365, 347, 267, 220, 111, 366, 0, 159, |
| 383, 201, 282, 283, 284, 285, 286, 287, 288, 289, |
| 290, 291, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 292, 0, 0, 106, 317, 318, 319, 159, 159, |
| 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, |
| 159, 159, 159, 159, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 201, 201, 0, 0, 0, 0, 201, 201, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 159, 0, 0, 0, 0, 0, 201, 159, 0, |
| 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 201, 0, 0, 0, 0, 0, 201, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, |
| 4, 5, 6, 7, 8, 9, 10, 11, 181, 182, |
| 183, 159, 184, 185, 186, 187, 188, 189, 190, 12, |
| 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 23, 24, 25, 26, 27, 28, 0, 29, 30, 31, |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
| 191, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 50, 51, 52, 53, 54, 0, 55, 56, 57, 58, |
| 135, 59, 136, 137, 138, 139, 140, 0, 0, 141, |
| 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, |
| 0, 0, 192, 193, 0, 0, 0, 0, 194, 145, |
| 146, 147, 148, 1, 2, 3, 4, 5, 6, 7, |
| 8, 9, 10, 11, 181, 182, 183, 0, 184, 185, |
| 186, 187, 188, 189, 190, 12, 13, 14, 15, 16, |
| 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 27, 28, 0, 29, 30, 31, 32, 33, 34, 35, |
| 36, 37, 38, 39, 40, 41, 191, 42, 43, 44, |
| 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 54, 0, 55, 56, 57, 58, 135, 59, 136, 137, |
| 138, 139, 140, 0, 0, 141, 142, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 143, 0, 0, 0, 192, 296, |
| 0, 0, 0, 0, 194, 145, 146, 147, 148, 1, |
| 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 181, 182, 183, 0, 184, 185, 186, 187, 188, 189, |
| 190, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 21, 22, 23, 24, 25, 26, 27, 28, 0, 29, |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 40, 41, 191, 42, 43, 44, 0, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 57, 58, 135, 59, 136, 137, 138, 139, 140, 0, |
| 0, 141, 142, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 143, 0, 0, 0, 192, 0, 0, 0, 0, 0, |
| 194, 145, 146, 147, 148, 1, 2, 3, 4, 5, |
| 6, 7, 8, 9, 10, 11, 181, 182, 183, 0, |
| 184, 185, 186, 187, 188, 189, 190, 12, 13, 14, |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, 40, 41, 191, 42, |
| 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 0, 55, 56, 57, 58, 135, 59, |
| 136, 137, 138, 139, 140, 0, 0, 141, 142, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 143, 0, 0, 0, |
| 118, 0, 0, 0, 0, 0, 194, 145, 146, 147, |
| 148, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
| 10, 11, 181, 182, 183, 0, 184, 185, 186, 187, |
| 188, 189, 190, 12, 13, 14, 15, 16, 17, 18, |
| 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
| 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, 40, 41, 191, 42, 43, 44, 0, 45, |
| 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, |
| 55, 56, 57, 58, 135, 59, 136, 137, 138, 139, |
| 140, 0, 0, 141, 142, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 143, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 194, 145, 146, 147, 148, 1, 2, 3, |
| 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, |
| 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 23, 24, 25, 26, 27, 28, 0, 29, 30, 31, |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
| 0, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 50, 51, 52, 53, 54, 0, 55, 56, 57, 58, |
| 135, 59, 136, 137, 138, 139, 140, 0, 0, 141, |
| 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 130, 2, 3, 4, 143, 6, |
| 7, 8, 9, 10, 11, 0, 0, 0, 194, 145, |
| 146, 147, 148, 0, 0, 0, 12, 13, 14, 15, |
| 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, |
| 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, |
| 35, 36, 37, 38, 39, 40, 41, 0, 42, 43, |
| 44, 0, 45, 46, 47, 48, 49, 50, 51, 52, |
| 53, 54, 0, 55, 56, 57, 58, 135, 59, 136, |
| 137, 138, 139, 140, 0, 0, 141, 142, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 2, 3, 4, 0, 0, 143, 8, 9, 10, 11, |
| 0, 0, 0, 0, 0, 0, 145, 146, 147, 148, |
| 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, |
| 0, 31, 32, 33, 34, 35, 36, 0, 0, 0, |
| 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 57, 0, 103, 59, 0, 0, 8, 9, 10, 11, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, |
| 104, 31, 32, 33, 34, 35, 36, 0, 0, 0, |
| 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 57, 0, 135, 59, 136, 137, 138, 139, 140, 0, |
| 0, 141, 142, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 143, 0, 0, 144, 8, 9, 10, 11, 0, 0, |
| 0, 145, 146, 147, 148, 0, 0, 0, 0, 12, |
| 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 23, 24, 25, 26, 0, 0, 0, 0, 0, 31, |
| 32, 33, 34, 35, 36, 0, 0, 0, 40, 41, |
| 0, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 50, 51, 52, 53, 54, 0, 55, 56, 57, 0, |
| 135, 59, 136, 137, 138, 139, 140, 0, 0, 141, |
| 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, |
| 0, 218, 8, 9, 10, 11, 0, 0, 0, 145, |
| 146, 147, 148, 0, 0, 0, 0, 12, 13, 14, |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 25, 26, 0, 0, 0, 0, 0, 31, 32, 33, |
| 34, 35, 36, 0, 0, 0, 40, 41, 0, 42, |
| 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 0, 55, 56, 57, 0, 135, 59, |
| 136, 137, 138, 139, 140, 0, 0, 141, 142, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 143, 8, 9, 10, |
| 11, 0, 0, 0, 0, 0, 274, 145, 146, 147, |
| 148, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
| 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, |
| 0, 0, 31, 32, 33, 34, 35, 36, 0, 0, |
| 0, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
| 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 56, 57, 0, 135, 59, 136, 137, 138, 139, 140, |
| 0, 0, 141, 142, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 143, 0, 0, 299, 8, 9, 10, 11, 0, |
| 0, 0, 145, 146, 147, 148, 0, 0, 0, 0, |
| 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, |
| 31, 32, 33, 34, 35, 36, 0, 0, 0, 40, |
| 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 0, 135, 59, 136, 137, 138, 139, 140, 0, 0, |
| 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, |
| 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, |
| 145, 146, 147, 148, 0, 12, 13, 14, 15, 16, |
| 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, |
| 36, 0, 0, 0, 40, 238, 0, 42, 43, 44, |
| 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 54, 0, 55, 56, 57, 0, 135, 59, 136, 137, |
| 138, 139, 140, 0, 0, 141, 142, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 130, 2, 3, 4, 143, 6, 7, 8, 9, 10, |
| 11, 0, 0, 0, 0, 145, 146, 147, 148, 0, |
| 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
| 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 39, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
| 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 56, 57, 58, 0, 59, 0, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 130, 2, 3, 4, 0, |
| 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 226, 12, 13, 14, |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, 40, 41, 0, 42, |
| 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 0, 55, 56, 57, 58, 0, 59, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 130, 2, 3, 4, 0, 6, 7, 8, 9, 10, |
| 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 264, 12, 13, 14, 15, 16, 17, 18, 19, |
| 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 39, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
| 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 56, 57, 58, 0, 59, 0, 0, 0, 0, 0, |
| 0, 0, 110, 0, 0, 1, 2, 3, 4, 5, |
| 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 337, 12, 13, 14, |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, 40, 41, 0, 42, |
| 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 0, 55, 56, 57, 58, 0, 59, |
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
| 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
| 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 39, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
| 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 56, 57, 58, 0, 59, 130, 2, 3, 4, 0, |
| 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, 40, 41, 0, 42, |
| 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 0, 55, 56, 57, 58, 0, 59, |
| 2, 3, 4, 0, 0, 0, 8, 9, 10, 11, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, |
| 0, 31, 32, 33, 34, 35, 36, 0, 0, 0, |
| 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 57, 0, 0, 59, 8, 9, 10, 11, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, |
| 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 23, 24, 25, 26, 0, 0, 0, 0, 0, 31, |
| 32, 33, 34, 35, 36, 0, 0, 0, 40, 41, |
| 0, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 50, 51, 52, 53, 54, 0, 55, 56, 57, 0, |
| 313, 59, 8, 9, 10, 11, 314, 0, 0, 0, |
| 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, |
| 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 25, 26, 0, 0, 0, 0, 0, 31, 32, 33, |
| 34, 35, 36, 0, 0, 0, 40, 41, 0, 42, |
| 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 0, 55, 56, 57, 0, 0, 59 |
| }; |
| |
| static const yytype_int16 yycheck[] = |
| { |
| 0, 69, 105, 0, 128, 143, 89, 217, 206, 0, |
| 133, 114, 340, 114, 127, 76, 44, 106, 109, 9, |
| 92, 346, 87, 88, 113, 104, 104, 106, 9, 97, |
| 133, 106, 76, 157, 113, 105, 127, 105, 368, 114, |
| 111, 111, 367, 114, 40, 41, 114, 9, 76, 187, |
| 40, 41, 42, 114, 177, 127, 124, 122, 123, 40, |
| 41, 42, 390, 131, 108, 133, 68, 397, 396, 69, |
| 105, 73, 72, 176, 177, 176, 189, 77, 40, 41, |
| 77, 43, 82, 114, 105, 105, 77, 111, 105, 51, |
| 111, 111, 302, 217, 111, 233, 111, 97, 189, 114, |
| 105, 85, 86, 216, 105, 105, 111, 106, 176, 177, |
| 111, 83, 84, 237, 114, 105, 111, 111, 118, 114, |
| 114, 76, 106, 261, 124, 216, 110, 249, 250, 251, |
| 252, 131, 111, 133, 272, 114, 89, 90, 276, 114, |
| 263, 351, 111, 112, 354, 4, 5, 6, 76, 347, |
| 40, 41, 42, 119, 120, 121, 116, 108, 118, 108, |
| 263, 79, 80, 245, 246, 253, 254, 377, 76, 293, |
| 294, 113, 109, 247, 248, 108, 176, 177, 302, 76, |
| 44, 76, 104, 126, 105, 298, 125, 104, 124, 399, |
| 127, 91, 305, 107, 93, 263, 106, 104, 114, 114, |
| 104, 114, 104, 112, 141, 142, 206, 298, 346, 112, |
| 104, 109, 104, 106, 305, 56, 107, 113, 105, 108, |
| 104, 107, 104, 160, 107, 113, 107, 351, 113, 367, |
| 354, 111, 107, 76, 113, 105, 109, 361, 107, 105, |
| 114, 17, 113, 346, 382, 358, 108, 114, 234, 114, |
| 256, 255, 189, 377, 257, 91, 339, 395, 98, 5, |
| 258, 124, 388, 263, 367, 222, 259, 358, 260, 124, |
| 306, 396, 341, 281, 180, 399, 77, 341, -1, 216, |
| 367, 281, 94, 95, 96, 97, 98, 99, 100, 101, |
| 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, 113, -1, -1, 372, 242, 243, 244, 245, 246, |
| 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, |
| 257, 258, 259, 260, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 340, 341, -1, -1, -1, -1, 346, 347, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, 298, -1, -1, -1, -1, -1, 367, 305, -1, |
| -1, -1, 372, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 390, -1, -1, -1, -1, -1, 396, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, |
| 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 16, 358, 18, 19, 20, 21, 22, 23, 24, 25, |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, |
| 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, |
| 56, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
| 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, |
| 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, |
| 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, |
| -1, -1, 108, 109, -1, -1, -1, -1, 114, 115, |
| 116, 117, 118, 3, 4, 5, 6, 7, 8, 9, |
| 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, |
| 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, |
| 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, |
| -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
| 70, -1, 72, 73, 74, 75, 76, 77, 78, 79, |
| 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, 104, -1, -1, -1, 108, 109, |
| -1, -1, -1, -1, 114, 115, 116, 117, 118, 3, |
| 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
| 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, |
| 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, |
| 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 54, 55, 56, 57, 58, 59, -1, 61, 62, 63, |
| 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, |
| -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 104, -1, -1, -1, 108, -1, -1, -1, -1, -1, |
| 114, 115, 116, 117, 118, 3, 4, 5, 6, 7, |
| 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, |
| 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
| 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, -1, 72, 73, 74, 75, 76, 77, |
| 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, |
| 108, -1, -1, -1, -1, -1, 114, 115, 116, 117, |
| 118, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, |
| 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
| 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
| -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, |
| 52, 53, 54, 55, 56, 57, 58, 59, -1, 61, |
| 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, |
| 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, |
| 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, 104, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, 114, 115, 116, 117, 118, 3, 4, 5, |
| 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, |
| 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, |
| -1, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
| 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, |
| 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, |
| 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, 3, 4, 5, 6, 104, 8, |
| 9, 10, 11, 12, 13, -1, -1, -1, 114, 115, |
| 116, 117, 118, -1, -1, -1, 25, 26, 27, 28, |
| 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, |
| 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, |
| 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, |
| 69, 70, -1, 72, 73, 74, 75, 76, 77, 78, |
| 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 4, 5, 6, -1, -1, 104, 10, 11, 12, 13, |
| -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, |
| -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, |
| -1, 45, 46, 47, 48, 49, 50, -1, -1, -1, |
| 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 74, -1, 76, 77, -1, -1, 10, 11, 12, 13, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, |
| 114, 45, 46, 47, 48, 49, 50, -1, -1, -1, |
| 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 74, -1, 76, 77, 78, 79, 80, 81, 82, -1, |
| -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 104, -1, -1, 107, 10, 11, 12, 13, -1, -1, |
| -1, 115, 116, 117, 118, -1, -1, -1, -1, 25, |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, |
| 46, 47, 48, 49, 50, -1, -1, -1, 54, 55, |
| -1, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
| 66, 67, 68, 69, 70, -1, 72, 73, 74, -1, |
| 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, |
| 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, |
| -1, 107, 10, 11, 12, 13, -1, -1, -1, 115, |
| 116, 117, 118, -1, -1, -1, -1, 25, 26, 27, |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, |
| 48, 49, 50, -1, -1, -1, 54, 55, -1, 57, |
| 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, -1, 72, 73, 74, -1, 76, 77, |
| 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 104, 10, 11, 12, |
| 13, -1, -1, -1, -1, -1, 114, 115, 116, 117, |
| 118, -1, 25, 26, 27, 28, 29, 30, 31, 32, |
| 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, |
| -1, -1, 45, 46, 47, 48, 49, 50, -1, -1, |
| -1, 54, 55, -1, 57, 58, 59, -1, 61, 62, |
| 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
| 73, 74, -1, 76, 77, 78, 79, 80, 81, 82, |
| -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, 104, -1, -1, 107, 10, 11, 12, 13, -1, |
| -1, -1, 115, 116, 117, 118, -1, -1, -1, -1, |
| 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, |
| 45, 46, 47, 48, 49, 50, -1, -1, -1, 54, |
| 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| -1, 76, 77, 78, 79, 80, 81, 82, -1, -1, |
| 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, |
| 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, |
| 115, 116, 117, 118, -1, 25, 26, 27, 28, 29, |
| 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, |
| 50, -1, -1, -1, 54, 55, -1, 57, 58, 59, |
| -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
| 70, -1, 72, 73, 74, -1, 76, 77, 78, 79, |
| 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 3, 4, 5, 6, 104, 8, 9, 10, 11, 12, |
| 13, -1, -1, -1, -1, 115, 116, 117, 118, -1, |
| -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, |
| 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, |
| 53, 54, 55, -1, 57, 58, 59, -1, 61, 62, |
| 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
| 73, 74, 75, -1, 77, -1, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, 3, 4, 5, 6, -1, |
| 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 109, 25, 26, 27, |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, |
| 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, -1, 72, 73, 74, 75, -1, 77, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 3, 4, 5, 6, -1, 8, 9, 10, 11, 12, |
| 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, 109, 25, 26, 27, 28, 29, 30, 31, 32, |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, |
| 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, |
| 53, 54, 55, -1, 57, 58, 59, -1, 61, 62, |
| 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
| 73, 74, 75, -1, 77, -1, -1, -1, -1, -1, |
| -1, -1, 0, -1, -1, 3, 4, 5, 6, 7, |
| 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, 109, 25, 26, 27, |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, |
| 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, -1, 72, 73, 74, 75, -1, 77, |
| 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, |
| 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, |
| 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, |
| 53, 54, 55, -1, 57, 58, 59, -1, 61, 62, |
| 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
| 73, 74, 75, -1, 77, 3, 4, 5, 6, -1, |
| 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, |
| 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, |
| 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, -1, 72, 73, 74, 75, -1, 77, |
| 4, 5, 6, -1, -1, -1, 10, 11, 12, 13, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, |
| -1, 45, 46, 47, 48, 49, 50, -1, -1, -1, |
| 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 74, -1, -1, 77, 10, 11, 12, 13, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, |
| 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, |
| 46, 47, 48, 49, 50, -1, -1, -1, 54, 55, |
| -1, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
| 66, 67, 68, 69, 70, -1, 72, 73, 74, -1, |
| 76, 77, 10, 11, 12, 13, 82, -1, -1, -1, |
| -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, |
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, |
| 48, 49, 50, -1, -1, -1, 54, 55, -1, 57, |
| 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
| 68, 69, 70, -1, 72, 73, 74, -1, -1, 77 |
| }; |
| |
| /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| symbol of state STATE-NUM. */ |
| static const yytype_uint8 yystos[] = |
| { |
| 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 12, 13, 25, 26, 27, 28, 29, 30, 31, 32, |
| 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, |
| 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 54, 55, 57, 58, 59, 61, 62, 63, 64, 65, |
| 66, 67, 68, 69, 70, 72, 73, 74, 75, 77, |
| 159, 160, 161, 162, 163, 168, 169, 170, 171, 173, |
| 174, 175, 176, 177, 180, 181, 182, 217, 218, 219, |
| 44, 76, 176, 40, 41, 76, 108, 104, 114, 220, |
| 105, 111, 9, 40, 41, 42, 165, 166, 172, 111, |
| 114, 76, 174, 76, 114, 158, 175, 180, 174, 106, |
| 0, 218, 180, 108, 184, 76, 178, 179, 108, 200, |
| 165, 164, 167, 175, 166, 76, 104, 106, 113, 108, |
| 3, 173, 175, 185, 186, 76, 78, 79, 80, 81, |
| 82, 85, 86, 104, 107, 115, 116, 117, 118, 129, |
| 130, 131, 133, 134, 135, 136, 137, 138, 139, 140, |
| 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, |
| 151, 152, 153, 157, 180, 114, 183, 185, 113, 105, |
| 111, 14, 15, 16, 18, 19, 20, 21, 22, 23, |
| 24, 56, 108, 109, 114, 140, 153, 154, 156, 159, |
| 160, 180, 190, 191, 192, 193, 201, 202, 203, 205, |
| 207, 209, 216, 76, 164, 167, 106, 113, 107, 157, |
| 154, 189, 175, 76, 187, 188, 109, 186, 140, 140, |
| 156, 85, 86, 106, 110, 105, 105, 111, 55, 154, |
| 104, 140, 119, 120, 121, 116, 118, 83, 84, 87, |
| 88, 122, 123, 89, 90, 126, 125, 124, 91, 93, |
| 92, 127, 107, 185, 109, 79, 80, 179, 114, 114, |
| 211, 104, 104, 114, 114, 156, 104, 157, 112, 104, |
| 109, 194, 94, 95, 96, 97, 98, 99, 100, 101, |
| 102, 103, 113, 155, 111, 114, 109, 191, 106, 107, |
| 157, 189, 113, 107, 187, 106, 111, 114, 76, 114, |
| 105, 132, 156, 76, 82, 135, 154, 140, 140, 140, |
| 142, 142, 143, 143, 144, 144, 144, 144, 145, 145, |
| 146, 147, 148, 149, 150, 151, 156, 109, 197, 198, |
| 199, 212, 156, 114, 156, 112, 210, 201, 154, 154, |
| 157, 113, 107, 189, 113, 114, 157, 188, 106, 114, |
| 107, 112, 56, 200, 192, 190, 202, 213, 105, 105, |
| 156, 170, 173, 208, 195, 107, 189, 113, 189, 107, |
| 157, 154, 104, 208, 214, 215, 197, 204, 206, 76, |
| 105, 109, 189, 107, 156, 114, 105, 17, 193, 113, |
| 192, 196, 200, 114, 105, 156, 196, 197, 189, 114 |
| }; |
| |
| #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 |
| |
| |
| /* Like YYERROR except do call yyerror. This remains here temporarily |
| to ease the transition to the new meaning of YYERROR, for GCC. |
| Once GCC version 2 has supplanted version 1, this can go. */ |
| |
| #define YYFAIL goto yyerrlab |
| |
| #define YYRECOVERING() (!!yyerrstatus) |
| |
| #define YYBACKUP(Token, Value) \ |
| do \ |
| if (yychar == YYEMPTY && yylen == 1) \ |
| { \ |
| yychar = (Token); \ |
| yylval = (Value); \ |
| yytoken = YYTRANSLATE (yychar); \ |
| YYPOPSTACK (1); \ |
| goto yybackup; \ |
| } \ |
| else \ |
| { \ |
| yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \ |
| YYERROR; \ |
| } \ |
| while (YYID (0)) |
| |
| |
| #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). */ |
| |
| #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| #ifndef YYLLOC_DEFAULT |
| # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| do \ |
| if (YYID (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 (YYID (0)) |
| #endif |
| |
| |
| /* 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 YYLTYPE_IS_TRIVIAL |
| # define YY_LOCATION_PRINT(File, Loc) \ |
| fprintf (File, "%d.%d-%d.%d", \ |
| (Loc).first_line, (Loc).first_column, \ |
| (Loc).last_line, (Loc).last_column) |
| # else |
| # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| # endif |
| #endif |
| |
| |
| /* YYLEX -- calling `yylex' with the right arguments. */ |
| |
| #ifdef YYLEX_PARAM |
| # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
| #else |
| # define YYLEX yylex (&yylval, &yylloc) |
| #endif |
| |
| /* 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 (YYID (0)) |
| |
| # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| do { \ |
| if (yydebug) \ |
| { \ |
| YYFPRINTF (stderr, "%s ", Title); \ |
| yy_symbol_print (stderr, \ |
| Type, Value, Location, context); \ |
| YYFPRINTF (stderr, "\n"); \ |
| } \ |
| } while (YYID (0)) |
| |
| |
| /*--------------------------------. |
| | Print this symbol on YYOUTPUT. | |
| `--------------------------------*/ |
| |
| /*ARGSUSED*/ |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static void |
| yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context) |
| #else |
| static void |
| yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) |
| FILE *yyoutput; |
| int yytype; |
| YYSTYPE const * const yyvaluep; |
| YYLTYPE const * const yylocationp; |
| TParseContext* context; |
| #endif |
| { |
| if (!yyvaluep) |
| return; |
| YYUSE (yylocationp); |
| YYUSE (context); |
| # ifdef YYPRINT |
| if (yytype < YYNTOKENS) |
| YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| # else |
| YYUSE (yyoutput); |
| # endif |
| switch (yytype) |
| { |
| default: |
| break; |
| } |
| } |
| |
| |
| /*--------------------------------. |
| | Print this symbol on YYOUTPUT. | |
| `--------------------------------*/ |
| |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static void |
| yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context) |
| #else |
| static void |
| yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) |
| FILE *yyoutput; |
| int yytype; |
| YYSTYPE const * const yyvaluep; |
| YYLTYPE const * const yylocationp; |
| TParseContext* context; |
| #endif |
| { |
| if (yytype < YYNTOKENS) |
| YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| else |
| YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| |
| YY_LOCATION_PRINT (yyoutput, *yylocationp); |
| YYFPRINTF (yyoutput, ": "); |
| yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context); |
| YYFPRINTF (yyoutput, ")"); |
| } |
| |
| /*------------------------------------------------------------------. |
| | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| | TOP (included). | |
| `------------------------------------------------------------------*/ |
| |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static void |
| yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
| #else |
| static void |
| yy_stack_print (yybottom, yytop) |
| yytype_int16 *yybottom; |
| yytype_int16 *yytop; |
| #endif |
| { |
| 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 (YYID (0)) |
| |
| |
| /*------------------------------------------------. |
| | Report that the YYRULE is going to be reduced. | |
| `------------------------------------------------*/ |
| |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static void |
| yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context) |
| #else |
| static void |
| yy_reduce_print (yyvsp, yylsp, yyrule, context) |
| YYSTYPE *yyvsp; |
| YYLTYPE *yylsp; |
| int yyrule; |
| TParseContext* context; |
| #endif |
| { |
| int yynrhs = yyr2[yyrule]; |
| int yyi; |
| unsigned long int yylno = yyrline[yyrule]; |
| 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, yyrhs[yyprhs[yyrule] + yyi], |
| &(yyvsp[(yyi + 1) - (yynrhs)]) |
| , &(yylsp[(yyi + 1) - (yynrhs)]) , context); |
| YYFPRINTF (stderr, "\n"); |
| } |
| } |
| |
| # define YY_REDUCE_PRINT(Rule) \ |
| do { \ |
| if (yydebug) \ |
| yy_reduce_print (yyvsp, yylsp, Rule, context); \ |
| } while (YYID (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. */ |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static YYSIZE_T |
| yystrlen (const char *yystr) |
| #else |
| static YYSIZE_T |
| yystrlen (yystr) |
| const char *yystr; |
| #endif |
| { |
| 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. */ |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static char * |
| yystpcpy (char *yydest, const char *yysrc) |
| #else |
| static char * |
| yystpcpy (yydest, yysrc) |
| char *yydest; |
| const char *yysrc; |
| #endif |
| { |
| char *yyd = yydest; |
| const char *yys = yysrc; |
| |
| while ((*yyd++ = *yys++) != '\0') |
| continue; |
| |
| return yyd - 1; |
| } |
| # endif |
| # endif |
| |
| # ifndef yytnamerr |
| /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| quotes and backslashes, so that it's suitable for yyerror. The |
| heuristic is that double-quoting is unnecessary unless the string |
| contains an apostrophe, a comma, or backslash (other than |
| backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| null, do not copy; instead, return the length of what the result |
| would have been. */ |
| static YYSIZE_T |
| yytnamerr (char *yyres, const char *yystr) |
| { |
| if (*yystr == '"') |
| { |
| YYSIZE_T yyn = 0; |
| char const *yyp = yystr; |
| |
| for (;;) |
| switch (*++yyp) |
| { |
| case '\'': |
| case ',': |
| goto do_not_strip_quotes; |
| |
| case '\\': |
| if (*++yyp != '\\') |
| goto do_not_strip_quotes; |
| /* Fall through. */ |
| default: |
| if (yyres) |
| yyres[yyn] = *yyp; |
| yyn++; |
| break; |
| |
| case '"': |
| if (yyres) |
| yyres[yyn] = '\0'; |
| return yyn; |
| } |
| do_not_strip_quotes: ; |
| } |
| |
| if (! yyres) |
| return yystrlen (yystr); |
| |
| return yystpcpy (yyres, yystr) - yyres; |
| } |
| # endif |
| |
| /* Copy into YYRESULT an error message about the unexpected token |
| YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| including the terminating null byte. If YYRESULT is null, do not |
| copy anything; just return the number of bytes that would be |
| copied. As a special case, return 0 if an ordinary "syntax error" |
| message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| size calculation. */ |
| static YYSIZE_T |
| yysyntax_error (char *yyresult, int yystate, int yychar) |
| { |
| int yyn = yypact[yystate]; |
| |
| if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
| return 0; |
| else |
| { |
| int yytype = YYTRANSLATE (yychar); |
| YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| YYSIZE_T yysize = yysize0; |
| YYSIZE_T yysize1; |
| int yysize_overflow = 0; |
| enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| int yyx; |
| |
| # if 0 |
| /* This is so xgettext sees the translatable formats that are |
| constructed on the fly. */ |
| YY_("syntax error, unexpected %s"); |
| YY_("syntax error, unexpected %s, expecting %s"); |
| YY_("syntax error, unexpected %s, expecting %s or %s"); |
| YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| # endif |
| char *yyfmt; |
| char const *yyf; |
| static char const yyunexpected[] = "syntax error, unexpected %s"; |
| static char const yyexpecting[] = ", expecting %s"; |
| static char const yyor[] = " or %s"; |
| char yyformat[sizeof yyunexpected |
| + sizeof yyexpecting - 1 |
| + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| * (sizeof yyor - 1))]; |
| char const *yyprefix = yyexpecting; |
| |
| /* Start YYX at -YYN if negative to avoid negative indexes in |
| YYCHECK. */ |
| 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 yycount = 1; |
| |
| yyarg[0] = yytname[yytype]; |
| yyfmt = yystpcpy (yyformat, yyunexpected); |
| |
| for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| { |
| if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| { |
| yycount = 1; |
| yysize = yysize0; |
| yyformat[sizeof yyunexpected - 1] = '\0'; |
| break; |
| } |
| yyarg[yycount++] = yytname[yyx]; |
| yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| yysize_overflow |= (yysize1 < yysize); |
| yysize = yysize1; |
| yyfmt = yystpcpy (yyfmt, yyprefix); |
| yyprefix = yyor; |
| } |
| |
| yyf = YY_(yyformat); |
| yysize1 = yysize + yystrlen (yyf); |
| yysize_overflow |= (yysize1 < yysize); |
| yysize = yysize1; |
| |
| if (yysize_overflow) |
| return YYSIZE_MAXIMUM; |
| |
| if (yyresult) |
| { |
| /* 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 = yyresult; |
| int yyi = 0; |
| while ((*yyp = *yyf) != '\0') |
| { |
| if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| { |
| yyp += yytnamerr (yyp, yyarg[yyi++]); |
| yyf += 2; |
| } |
| else |
| { |
| yyp++; |
| yyf++; |
| } |
| } |
| } |
| return yysize; |
| } |
| } |
| #endif /* YYERROR_VERBOSE */ |
| |
| |
| /*-----------------------------------------------. |
| | Release the memory associated to this symbol. | |
| `-----------------------------------------------*/ |
| |
| /*ARGSUSED*/ |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| static void |
| yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context) |
| #else |
| static void |
| yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) |
| const char *yymsg; |
| int yytype; |
| YYSTYPE *yyvaluep; |
| YYLTYPE *yylocationp; |
| TParseContext* context; |
| #endif |
| { |
| YYUSE (yyvaluep); |
| YYUSE (yylocationp); |
| YYUSE (context); |
| |
| if (!yymsg) |
| yymsg = "Deleting"; |
| YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| |
| switch (yytype) |
| { |
| |
| default: |
| break; |
| } |
| } |
| |
| /* Prevent warnings from -Wmissing-prototypes. */ |
| #ifdef YYPARSE_PARAM |
| #if defined __STDC__ || defined __cplusplus |
| int yyparse (void *YYPARSE_PARAM); |
| #else |
| int yyparse (); |
| #endif |
| #else /* ! YYPARSE_PARAM */ |
| #if defined __STDC__ || defined __cplusplus |
| int yyparse (TParseContext* context); |
| #else |
| int yyparse (); |
| #endif |
| #endif /* ! YYPARSE_PARAM */ |
| |
| |
| |
| |
| |
| /*-------------------------. |
| | yyparse or yypush_parse. | |
| `-------------------------*/ |
| |
| #ifdef YYPARSE_PARAM |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| int |
| yyparse (void *YYPARSE_PARAM) |
| #else |
| int |
| yyparse (YYPARSE_PARAM) |
| void *YYPARSE_PARAM; |
| #endif |
| #else /* ! YYPARSE_PARAM */ |
| #if (defined __STDC__ || defined __C99__FUNC__ \ |
| || defined __cplusplus || defined _MSC_VER) |
| int |
| yyparse (TParseContext* context) |
| #else |
| int |
| yyparse (context) |
| TParseContext* context; |
| #endif |
| #endif |
| { |
| /* The lookahead symbol. */ |
| int yychar; |
| |
| /* The semantic value of the lookahead symbol. */ |
| YYSTYPE yylval; |
| |
| /* Location data for the lookahead symbol. */ |
| YYLTYPE yylloc; |
| |
| /* 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 thru 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[2]; |
| |
| YYSIZE_T yystacksize; |
| |
| int yyn; |
| int yyresult; |
| /* Lookahead token as an internal (translated) token number. */ |
| int yytoken; |
| /* 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; |
| |
| yytoken = 0; |
| yyss = yyssa; |
| yyvs = yyvsa; |
| yyls = yylsa; |
| yystacksize = YYINITDEPTH; |
| |
| YYDPRINTF ((stderr, "Starting parse\n")); |
| |
| yystate = 0; |
| yyerrstatus = 0; |
| yynerrs = 0; |
| yychar = YYEMPTY; /* Cause a token to be read. */ |
| |
| /* Initialize stack pointers. |
| Waste one element of value and location stack |
| so that they stay on the same level as the state stack. |
| The wasted elements are never initialized. */ |
| yyssp = yyss; |
| yyvsp = yyvs; |
| yylsp = yyls; |
| |
| #if YYLTYPE_IS_TRIVIAL |
| /* Initialize the default location before parsing starts. */ |
| yylloc.first_line = yylloc.last_line = 1; |
| yylloc.first_column = yylloc.last_column = 1; |
| #endif |
| |
| goto yysetstate; |
| |
| /*------------------------------------------------------------. |
| | yynewstate -- Push a new state, which is found in yystate. | |
| `------------------------------------------------------------*/ |
| yynewstate: |
| /* In all cases, when you get here, the value and location stacks |
| have just been pushed. So pushing a state here evens the stacks. */ |
| yyssp++; |
| |
| yysetstate: |
| *yyssp = yystate; |
| |
| if (yyss + yystacksize - 1 <= yyssp) |
| { |
| /* Get the current used size of the three stacks, in elements. */ |
| YYSIZE_T yysize = yyssp - yyss + 1; |
| |
| #ifdef yyoverflow |
| { |
| /* Give user a chance to reallocate the stack. Use copies of |
| these so that the &'s don't force the real ones into |
| memory. */ |
| YYSTYPE *yyvs1 = yyvs; |
| yytype_int16 *yyss1 = yyss; |
| YYLTYPE *yyls1 = yyls; |
| |
| /* Each stack pointer address is followed by the size of the |
| data in use in that stack, in bytes. This used to be a |
| conditional around just the two extra args, but that might |
| be undefined if yyoverflow is a macro. */ |
| yyoverflow (YY_("memory exhausted"), |
| &yyss1, yysize * sizeof (*yyssp), |
| &yyvs1, yysize * sizeof (*yyvsp), |
| &yyls1, yysize * sizeof (*yylsp), |
| &yystacksize); |
| |
| yyls = yyls1; |
| yyss = yyss1; |
| yyvs = yyvs1; |
| } |
| #else /* no yyoverflow */ |
| # ifndef YYSTACK_RELOCATE |
| goto yyexhaustedlab; |
| # else |
| /* Extend the stack our own way. */ |
| if (YYMAXDEPTH <= yystacksize) |
| goto yyexhaustedlab; |
| yystacksize *= 2; |
| if (YYMAXDEPTH < yystacksize) |
| yystacksize = YYMAXDEPTH; |
| |
| { |
| yytype_int16 *yyss1 = yyss; |
| union yyalloc *yyptr = |
| (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| if (! yyptr) |
| goto yyexhaustedlab; |
| YYSTACK_RELOCATE (yyss_alloc, yyss); |
| YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
| YYSTACK_RELOCATE (yyls_alloc, yyls); |
| # undef YYSTACK_RELOCATE |
| if (yyss1 != yyssa) |
| YYSTACK_FREE (yyss1); |
| } |
| # endif |
| #endif /* no yyoverflow */ |
| |
| yyssp = yyss + yysize - 1; |
| yyvsp = yyvs + yysize - 1; |
| yylsp = yyls + yysize - 1; |
| |
| YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| (unsigned long int) yystacksize)); |
| |
| if (yyss + yystacksize - 1 <= yyssp) |
| YYABORT; |
| } |
| |
| YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| |
| if (yystate == YYFINAL) |
| YYACCEPT; |
| |
| goto yybackup; |
| |
| /*-----------. |
| | yybackup. | |
| `-----------*/ |
| yybackup: |
| |
| /* Do appropriate processing given the current state. Read a |
| lookahead token if we need one and don't already have one. */ |
| |
| /* First try to decide what to do without reference to lookahead token. */ |
| yyn = yypact[yystate]; |
| if (yyn == YYPACT_NINF) |
| 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; |
| } |
| |
| 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 (yyn == 0 || yyn == YYTABLE_NINF) |
| 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; |
| *++yyvsp = yylval; |
| *++yylsp = yylloc; |
| goto yynewstate; |
| |
| |
| /*-----------------------------------------------------------. |
| | yydefault -- do the default action for the current state. | |
| `-----------------------------------------------------------*/ |
| yydefault: |
| yyn = yydefact[yystate]; |
| if (yyn == 0) |
| goto yyerrlab; |
| goto yyreduce; |
| |
| |
| /*-----------------------------. |
| | yyreduce -- Do a reduction. | |
| `-----------------------------*/ |
| yyreduce: |
| /* yyn is the number of a rule to reduce with. */ |
| yylen = yyr2[yyn]; |
| |
| /* If YYLEN is nonzero, implement the default value of the action: |
| `$$ = $1'. |
| |
| Otherwise, the following line sets YYVAL to garbage. |
| This behavior is undocumented and Bison |
| users should not rely upon it. Assigning to YYVAL |
| unconditionally makes the parser a bit smaller, and it avoids a |
| GCC warning that YYVAL may be used uninitialized. */ |
| yyval = yyvsp[1-yylen]; |
| |
| /* Default location. */ |
| YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
| YY_REDUCE_PRINT (yyn); |
| switch (yyn) |
| { |
| case 2: |
| |
| { |
| // The symbol table search was done in the lexical phase |
| const TSymbol* symbol = (yyvsp[(1) - (1)].lex).symbol; |
| const TVariable* variable; |
| if (symbol == 0) { |
| context->error((yylsp[(1) - (1)]), "undeclared identifier", (yyvsp[(1) - (1)].lex).string->c_str()); |
| context->recover(); |
| TType type(EbtFloat, EbpUndefined); |
| TVariable* fakeVariable = new TVariable((yyvsp[(1) - (1)].lex).string, type); |
| context->symbolTable.declare(*fakeVariable); |
| variable = fakeVariable; |
| } else { |
| // This identifier can only be a variable type symbol |
| if (! symbol->isVariable()) { |
| context->error((yylsp[(1) - (1)]), "variable expected", (yyvsp[(1) - (1)].lex).string->c_str()); |
| context->recover(); |
| } |
| variable = static_cast<const TVariable*>(symbol); |
| } |
| |
| // don't delete $1.string, it's used by error recovery, and the pool |
| // pop will reclaim the memory |
| |
| if (variable->getType().getQualifier() == EvqConstExpr ) { |
| ConstantUnion* constArray = variable->getConstPointer(); |
| TType t(variable->getType()); |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)])); |
| } else |
| (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(), |
| variable->getName(), |
| variable->getType(), (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 3: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 4: |
| |
| { |
| ConstantUnion *unionArray = new ConstantUnion[1]; |
| unionArray->setIConst((yyvsp[(1) - (1)].lex).i); |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 5: |
| |
| { |
| ConstantUnion *unionArray = new ConstantUnion[1]; |
| unionArray->setUConst((yyvsp[(1) - (1)].lex).u); |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 6: |
| |
| { |
| ConstantUnion *unionArray = new ConstantUnion[1]; |
| unionArray->setFConst((yyvsp[(1) - (1)].lex).f); |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 7: |
| |
| { |
| ConstantUnion *unionArray = new ConstantUnion[1]; |
| unionArray->setBConst((yyvsp[(1) - (1)].lex).b); |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 8: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 9: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 10: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[(1) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 11: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 12: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yylsp[(3) - (3)])); |
| } |
| break; |
| |
| case 13: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)])); |
| } |
| break; |
| |
| case 14: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)])); |
| } |
| break; |
| |
| case 15: |
| |
| { |
| if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]")) |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 16: |
| |
| { |
| TFunction* fnCall = (yyvsp[(1) - (1)].interm).function; |
| TOperator op = fnCall->getBuiltInOp(); |
| |
| if (op != EOpNull) |
| { |
| // |
| // Then this should be a constructor. |
| // Don't go through the symbol table for constructors. |
| // Their parameters will be verified algorithmically. |
| // |
| TType type(EbtVoid, EbpUndefined); // use this to get the type back |
| if (context->constructorErrorCheck((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].interm).intermNode, *fnCall, op, &type)) { |
| (yyval.interm.intermTypedNode) = 0; |
| } else { |
| // |
| // It's a constructor, of type 'type'. |
| // |
| (yyval.interm.intermTypedNode) = context->addConstructor((yyvsp[(1) - (1)].interm).intermNode, &type, op, fnCall, (yylsp[(1) - (1)])); |
| } |
| |
| if ((yyval.interm.intermTypedNode) == 0) { |
| context->recover(); |
| (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator(0, op, (yylsp[(1) - (1)])); |
| } |
| (yyval.interm.intermTypedNode)->setType(type); |
| } else { |
| // |
| // Not a constructor. Find it in the symbol table. |
| // |
| const TFunction* fnCandidate; |
| bool builtIn; |
| fnCandidate = context->findFunction((yylsp[(1) - (1)]), fnCall, &builtIn); |
| if (fnCandidate) { |
| // |
| // A declared function. |
| // |
| if (builtIn && !fnCandidate->getExtension().empty() && |
| context->extensionErrorCheck((yylsp[(1) - (1)]), fnCandidate->getExtension())) { |
| context->recover(); |
| } |
| op = fnCandidate->getBuiltInOp(); |
| if (builtIn && op != EOpNull) { |
| // |
| // A function call mapped to a built-in operation. |
| // |
| if (fnCandidate->getParamCount() == 1) { |
| // |
| // Treat it like a built-in unary operator. |
| // |
| (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(op, (yyvsp[(1) - (1)].interm).intermNode, 0); |
| if ((yyval.interm.intermTypedNode) == 0) { |
| std::stringstream extraInfoStream; |
| extraInfoStream << "built in unary operator function. Type: " << static_cast<TIntermTyped*>((yyvsp[(1) - (1)].interm).intermNode)->getCompleteString(); |
| std::string extraInfo = extraInfoStream.str(); |
| context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), " wrong operand type", "Internal Error", extraInfo.c_str()); |
| YYERROR; |
| } |
| } else { |
| (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, op, (yylsp[(1) - (1)])); |
| } |
| } else { |
| // This is a real function call |
| |
| (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, EOpFunctionCall, (yylsp[(1) - (1)])); |
| (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType()); |
| |
| // this is how we know whether the given function is a builtIn function or a user defined function |
| // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also |
| // if builtIn == true, it's definitely a builtIn function with EOpNull |
| if (!builtIn) |
| (yyval.interm.intermTypedNode)->getAsAggregate()->setUserDefined(); |
| (yyval.interm.intermTypedNode)->getAsAggregate()->setName(fnCandidate->getMangledName()); |
| |
| TQualifier qual; |
| for (size_t i = 0; i < fnCandidate->getParamCount(); ++i) { |
| qual = fnCandidate->getParam(i).type->getQualifier(); |
| if (qual == EvqOut || qual == EvqInOut) { |
| if (context->lValueErrorCheck((yyval.interm.intermTypedNode)->getLine(), "assign", (yyval.interm.intermTypedNode)->getAsAggregate()->getSequence()[i]->getAsTyped())) { |
| context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error"); |
| context->recover(); |
| } |
| } |
| } |
| } |
| (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType()); |
| } else { |
| // error message was put out by PaFindFunction() |
| // Put on a dummy node for error recovery |
| ConstantUnion *unionArray = new ConstantUnion[1]; |
| unionArray->setFConst(0.0f); |
| (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
| context->recover(); |
| } |
| } |
| delete fnCall; |
| } |
| break; |
| |
| case 17: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (1)].interm); |
| } |
| break; |
| |
| case 18: |
| |
| { |
| context->error((yylsp[(3) - (3)]), "methods are not supported", ""); |
| context->recover(); |
| (yyval.interm) = (yyvsp[(3) - (3)].interm); |
| } |
| break; |
| |
| case 19: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (2)].interm); |
| (yyval.interm).line = (yylsp[(2) - (2)]); |
| } |
| break; |
| |
| case 20: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (2)].interm); |
| (yyval.interm).line = (yylsp[(2) - (2)]); |
| } |
| break; |
| |
| case 21: |
| |
| { |
| (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| (yyval.interm).intermNode = 0; |
| } |
| break; |
| |
| case 22: |
| |
| { |
| (yyval.interm).function = (yyvsp[(1) - (1)].interm.function); |
| (yyval.interm).intermNode = 0; |
| } |
| break; |
| |
| case 23: |
| |
| { |
| TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) }; |
| (yyvsp[(1) - (2)].interm.function)->addParameter(param); |
| (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 24: |
| |
| { |
| TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) }; |
| (yyvsp[(1) - (3)].interm).function->addParameter(param); |
| (yyval.interm).function = (yyvsp[(1) - (3)].interm).function; |
| (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 25: |
| |
| { |
| (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); |
| } |
| break; |
| |
| case 26: |
| |
| { |
| if ((yyvsp[(1) - (1)].interm.type).array) { |
| ES3_ONLY("[]", (yylsp[(1) - (1)])); |
| } |
| (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type)); |
| } |
| break; |
| |
| case 27: |
| |
| { |
| if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
| context->recover(); |
| TType type(EbtVoid, EbpUndefined); |
| TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); |
| (yyval.interm.function) = function; |
| } |
| break; |
| |
| case 28: |
| |
| { |
| if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
| context->recover(); |
| TType type(EbtVoid, EbpUndefined); |
| TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); |
| (yyval.interm.function) = function; |
| } |
| break; |
| |
| case 29: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 30: |
| |
| { |
| if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode))) |
| context->recover(); |
| (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)])); |
| if ((yyval.interm.intermTypedNode) == 0) { |
| context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| } |
| } |
| break; |
| |
| case 31: |
| |
| { |
| if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode))) |
| context->recover(); |
| (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)])); |
| if ((yyval.interm.intermTypedNode) == 0) { |
| context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| } |
| } |
| break; |
| |
| case 32: |
| |
| { |
| if ((yyvsp[(1) - (2)].interm).op != EOpNull) { |
| (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)])); |
| if ((yyval.interm.intermTypedNode) == 0) { |
| const char* errorOp = ""; |
| switch((yyvsp[(1) - (2)].interm).op) { |
| case EOpNegative: errorOp = "-"; break; |
| case EOpLogicalNot: errorOp = "!"; break; |
| case EOpBitwiseNot: errorOp = "~"; break; |
| default: break; |
| } |
| context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| } |
| } else |
| (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 33: |
| |
| { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNull; } |
| break; |
| |
| case 34: |
| |
| { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNegative; } |
| break; |
| |
| case 35: |
| |
| { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpLogicalNot; } |
| break; |
| |
| case 36: |
| |
| { |
| ES3_ONLY("~", (yylsp[(1) - (1)])); |
| (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseNot; |
| } |
| break; |
| |
| case 37: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 38: |
| |
| { |
| FRAG_VERT_ONLY("*", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 39: |
| |
| { |
| FRAG_VERT_ONLY("/", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 40: |
| |
| { |
| FRAG_VERT_ONLY("%", (yylsp[(2) - (3)])); |
| ES3_ONLY("%", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 41: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 42: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 43: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 44: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 45: |
| |
| { |
| ES3_ONLY("<<", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 46: |
| |
| { |
| ES3_ONLY(">>", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 47: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 48: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 49: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 50: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 51: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 52: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 53: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 54: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 55: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 56: |
| |
| { |
| ES3_ONLY("&", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 57: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 58: |
| |
| { |
| ES3_ONLY("^", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 59: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 60: |
| |
| { |
| ES3_ONLY("|", (yylsp[(2) - (3)])); |
| (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 61: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 62: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 63: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 64: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 65: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 66: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 67: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 68: |
| |
| { |
| if (context->boolErrorCheck((yylsp[(2) - (5)]), (yyvsp[(1) - (5)].interm.intermTypedNode))) |
| context->recover(); |
| |
| (yyval.interm.intermTypedNode) = context->intermediate.addSelection((yyvsp[(1) - (5)].interm.intermTypedNode), (yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.intermTypedNode), (yylsp[(2) - (5)])); |
| if ((yyvsp[(3) - (5)].interm.intermTypedNode)->getType() != (yyvsp[(5) - (5)].interm.intermTypedNode)->getType()) |
| (yyval.interm.intermTypedNode) = 0; |
| |
| if ((yyval.interm.intermTypedNode) == 0) { |
| context->binaryOpError((yylsp[(2) - (5)]), ":", (yyvsp[(3) - (5)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(5) - (5)].interm.intermTypedNode)->getCompleteString()); |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode); |
| } |
| } |
| break; |
| |
| case 69: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 70: |
| |
| { |
| if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode))) |
| context->recover(); |
| (yyval.interm.intermTypedNode) = context->addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| } |
| break; |
| |
| case 71: |
| |
| { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAssign; } |
| break; |
| |
| case 72: |
| |
| { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpMulAssign; } |
| break; |
| |
| case 73: |
| |
| { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpDivAssign; } |
| break; |
| |
| case 74: |
| |
| { ES3_ONLY("%=", (yylsp[(1) - (1)])); |
| FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpIModAssign; } |
| break; |
| |
| case 75: |
| |
| { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAddAssign; } |
| break; |
| |
| case 76: |
| |
| { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpSubAssign; } |
| break; |
| |
| case 77: |
| |
| { ES3_ONLY("<<=", (yylsp[(1) - (1)])); |
| FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftLeftAssign; } |
| break; |
| |
| case 78: |
| |
| { ES3_ONLY(">>=", (yylsp[(1) - (1)])); |
| FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftRightAssign; } |
| break; |
| |
| case 79: |
| |
| { ES3_ONLY("&=", (yylsp[(1) - (1)])); |
| FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseAndAssign; } |
| break; |
| |
| case 80: |
| |
| { ES3_ONLY("^=", (yylsp[(1) - (1)])); |
| FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseXorAssign; } |
| break; |
| |
| case 81: |
| |
| { ES3_ONLY("|=", (yylsp[(1) - (1)])); |
| FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseOrAssign; } |
| break; |
| |
| case 82: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 83: |
| |
| { |
| (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
| if ((yyval.interm.intermTypedNode) == 0) { |
| context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); |
| } |
| } |
| break; |
| |
| case 84: |
| |
| { |
| if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode))) |
| context->recover(); |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 85: |
| |
| { |
| if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string)) |
| context->recover(); |
| (yyval.lex) = (yyvsp[(1) - (2)].lex); |
| } |
| break; |
| |
| case 86: |
| |
| { |
| TFunction &function = *((yyvsp[(1) - (2)].interm).function); |
| |
| TIntermAggregate *prototype = new TIntermAggregate; |
| prototype->setType(function.getReturnType()); |
| prototype->setName(function.getName()); |
| |
| for (size_t i = 0; i < function.getParamCount(); i++) |
| { |
| const TParameter ¶m = function.getParam(i); |
| if (param.name != 0) |
| { |
| TVariable variable(param.name, *param.type); |
| |
| prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[(1) - (2)])), (yylsp[(1) - (2)])); |
| } |
| else |
| { |
| prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)])); |
| } |
| } |
| |
| prototype->setOp(EOpPrototype); |
| (yyval.interm.intermNode) = prototype; |
| |
| context->symbolTable.pop(); |
| } |
| break; |
| |
| case 87: |
| |
| { |
| TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate; |
| if (aggNode && aggNode->getOp() == EOpNull) |
| aggNode->setOp(EOpDeclaration); |
| (yyval.interm.intermNode) = aggNode; |
| } |
| break; |
| |
| case 88: |
| |
| { |
| if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) { |
| context->error((yylsp[(1) - (4)]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[(3) - (4)].interm.type).type)); |
| context->recover(); |
| } |
| (yyval.interm.intermNode) = 0; |
| } |
| break; |
| |
| case 89: |
| |
| { |
| ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)])); |
| (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.fieldList), NULL, (yylsp[(1) - (5)]), NULL, (yylsp[(1) - (5)])); |
| } |
| break; |
| |
| case 90: |
| |
| { |
| ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)])); |
| (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (6)].interm.type), (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yyvsp[(3) - (6)].interm.fieldList), (yyvsp[(5) - (6)].lex).string, (yylsp[(5) - (6)]), NULL, (yylsp[(1) - (6)])); |
| } |
| break; |
| |
| case 91: |
| |
| { |
| ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)])); |
| (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (9)].interm.type), (yylsp[(2) - (9)]), *(yyvsp[(2) - (9)].lex).string, (yyvsp[(3) - (9)].interm.fieldList), (yyvsp[(5) - (9)].lex).string, (yylsp[(5) - (9)]), (yyvsp[(7) - (9)].interm.intermTypedNode), (yylsp[(6) - (9)])); |
| } |
| break; |
| |
| case 92: |
| |
| { |
| context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type)); |
| (yyval.interm.intermNode) = 0; |
| } |
| break; |
| |
| case 93: |
| |
| { |
| // |
| // Multiple declarations of the same function are allowed. |
| // |
| // If this is a definition, the definition production code will check for redefinitions |
| // (we don't know at this point if it's a definition or not). |
| // |
| // Redeclarations are allowed. But, return types and parameter qualifiers must match. |
| // |
| TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->shaderVersion)); |
| if (prevDec) { |
| if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) { |
| context->error((yylsp[(2) - (2)]), "overloaded functions must have the same return type", (yyvsp[(1) - (2)].interm.function)->getReturnType().getBasicString()); |
| context->recover(); |
| } |
| for (size_t i = 0; i < prevDec->getParamCount(); ++i) { |
| if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) { |
| context->error((yylsp[(2) - (2)]), "overloaded functions must have the same parameter qualifiers", (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifierString()); |
| context->recover(); |
| } |
| } |
| } |
| |
| // |
| // If this is a redeclaration, it could also be a definition, |
| // in which case, we want to use the variable names from this one, and not the one that's |
| // being redeclared. So, pass back up this declaration, not the one in the symbol table. |
| // |
| (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| (yyval.interm).line = (yylsp[(2) - (2)]); |
| |
| // We're at the inner scope level of the function's arguments and body statement. |
| // Add the function prototype to the surrounding scope instead. |
| context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function); |
| } |
| break; |
| |
| case 94: |
| |
| { |
| (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); |
| } |
| break; |
| |
| case 95: |
| |
| { |
| (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); |
| } |
| break; |
| |
| case 96: |
| |
| { |
| // Add the parameter |
| (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); |
| if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid) |
| (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); |
| else |
| delete (yyvsp[(2) - (2)].interm).param.type; |
| } |
| break; |
| |
| case 97: |
| |
| { |
| // |
| // 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[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) { |
| // |
| // This parameter > first is void |
| // |
| context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void"); |
| context->recover(); |
| delete (yyvsp[(3) - (3)].interm).param.type; |
| } else { |
| // Add the parameter |
| (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); |
| (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); |
| } |
| } |
| break; |
| |
| case 98: |
| |
| { |
| if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) { |
| context->error((yylsp[(2) - (3)]), "no qualifiers allowed for function return", getQualifierString((yyvsp[(1) - (3)].interm.type).qualifier)); |
| context->recover(); |
| } |
| // make sure a sampler is not involved as well... |
| if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type))) |
| context->recover(); |
| |
| // Add the function as a prototype after parsing it (we do not support recursion) |
| TFunction *function; |
| TType type((yyvsp[(1) - (3)].interm.type)); |
| function = new TFunction((yyvsp[(2) - (3)].lex).string, type); |
| (yyval.interm.function) = function; |
| |
| context->symbolTable.push(); |
| } |
| break; |
| |
| case 99: |
| |
| { |
| if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) { |
| context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str()); |
| context->recover(); |
| } |
| if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) |
| context->recover(); |
| TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))}; |
| (yyval.interm).line = (yylsp[(2) - (2)]); |
| (yyval.interm).param = param; |
| } |
| break; |
| |
| case 100: |
| |
| { |
| // Check that we can make an array out of this type |
| if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type))) |
| context->recover(); |
| |
| if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string)) |
| context->recover(); |
| |
| int size; |
| if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size)) |
| context->recover(); |
| (yyvsp[(1) - (5)].interm.type).setArray(true, size); |
| |
| TType* type = new TType((yyvsp[(1) - (5)].interm.type)); |
| TParameter param = { (yyvsp[(2) - (5)].lex).string, type }; |
| (yyval.interm).line = (yylsp[(2) - (5)]); |
| (yyval.interm).param = param; |
| } |
| break; |
| |
| case 101: |
| |
| { |
| (yyval.interm) = (yyvsp[(3) - (3)].interm); |
| if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type)) |
| context->recover(); |
| } |
| break; |
| |
| case 102: |
| |
| { |
| (yyval.interm) = (yyvsp[(2) - (2)].interm); |
| if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type)) |
| context->recover(); |
| if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type)) |
| context->recover(); |
| } |
| break; |
| |
| case 103: |
| |
| { |
| (yyval.interm) = (yyvsp[(3) - (3)].interm); |
| if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type)) |
| context->recover(); |
| } |
| break; |
| |
| case 104: |
| |
| { |
| (yyval.interm) = (yyvsp[(2) - (2)].interm); |
| if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type)) |
| context->recover(); |
| if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type)) |
| context->recover(); |
| } |
| break; |
| |
| case 105: |
| |
| { |
| (yyval.interm.qualifier) = EvqIn; |
| } |
| break; |
| |
| case 106: |
| |
| { |
| (yyval.interm.qualifier) = EvqIn; |
| } |
| break; |
| |
| case 107: |
| |
| { |
| (yyval.interm.qualifier) = EvqOut; |
| } |
| break; |
| |
| case 108: |
| |
| { |
| (yyval.interm.qualifier) = EvqInOut; |
| } |
| break; |
| |
| case 109: |
| |
| { |
| TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; |
| (yyval.interm).param = param; |
| } |
| break; |
| |
| case 110: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (1)].interm); |
| } |
| break; |
| |
| case 111: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (3)].interm); |
| (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[(1) - (3)].interm).intermAggregate, (yylsp[(3) - (3)]), *(yyvsp[(3) - (3)].lex).string); |
| } |
| break; |
| |
| case 112: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (6)].interm); |
| (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[(1) - (6)].interm).intermAggregate, (yylsp[(3) - (6)]), *(yyvsp[(3) - (6)].lex).string, (yylsp[(4) - (6)]), (yyvsp[(5) - (6)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 113: |
| |
| { |
| ES3_ONLY("[]", (yylsp[(3) - (7)])); |
| (yyval.interm) = (yyvsp[(1) - (7)].interm); |
| (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (7)].interm).intermAggregate, (yylsp[(3) - (7)]), *(yyvsp[(3) - (7)].lex).string, (yylsp[(4) - (7)]), nullptr, (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 114: |
| |
| { |
| ES3_ONLY("=", (yylsp[(7) - (8)])); |
| (yyval.interm) = (yyvsp[(1) - (8)].interm); |
| (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (8)].interm).intermAggregate, (yylsp[(3) - (8)]), *(yyvsp[(3) - (8)].lex).string, (yylsp[(4) - (8)]), (yyvsp[(5) - (8)].interm.intermTypedNode), (yylsp[(7) - (8)]), (yyvsp[(8) - (8)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 115: |
| |
| { |
| (yyval.interm) = (yyvsp[(1) - (5)].interm); |
| (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[(1) - (5)].interm).intermAggregate, (yylsp[(3) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yylsp[(4) - (5)]), (yyvsp[(5) - (5)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 116: |
| |
| { |
| (yyval.interm).type = (yyvsp[(1) - (1)].interm.type); |
| (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), ""); |
| } |
| break; |
| |
| case 117: |
| |
| { |
| (yyval.interm).type = (yyvsp[(1) - (2)].interm.type); |
| (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string); |
| } |
| break; |
| |
| case 118: |
| |
| { |
| (yyval.interm).type = (yyvsp[(1) - (5)].interm.type); |
| (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 119: |
| |
| { |
| ES3_ONLY("[]", (yylsp[(3) - (6)])); |
| (yyval.interm).type = (yyvsp[(1) - (6)].interm.type); |
| (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yylsp[(3) - (6)]), nullptr, (yylsp[(5) - (6)]), (yyvsp[(6) - (6)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 120: |
| |
| { |
| ES3_ONLY("=", (yylsp[(6) - (7)])); |
| (yyval.interm).type = (yyvsp[(1) - (7)].interm.type); |
| (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (7)]), *(yyvsp[(2) - (7)].lex).string, (yylsp[(3) - (7)]), (yyvsp[(4) - (7)].interm.intermTypedNode), (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 121: |
| |
| { |
| (yyval.interm).type = (yyvsp[(1) - (4)].interm.type); |
| (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yylsp[(3) - (4)]), (yyvsp[(4) - (4)].interm.intermTypedNode)); |
| } |
| break; |
| |
| case 122: |
| |
| { |
| // $$.type is not used in invariant declarations. |
| (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[(1) - (2)]), (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].lex).string, (yyvsp[(2) - (2)].lex).symbol); |
| } |
| break; |
| |
| case 123: |
| |
| { |
| (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| |
| if ((yyvsp[(1) - (1)].interm.type).array) { |
| ES3_ONLY("[]", (yylsp[(1) - (1)])); |
| if (context->getShaderVersion() != 300) { |
| (yyvsp[(1) - (1)].interm.type).clearArrayness(); |
| } |
| } |
| } |
| break; |
| |
| case 124: |
| |
| { |
| (yyval.interm.type) = context->addFullySpecifiedType((yyvsp[(1) - (2)].interm.type).qualifier, (yyvsp[(1) - (2)].interm.type).invariant, (yyvsp[(1) - (2)].interm.type).layoutQualifier, (yyvsp[(2) - (2)].interm.type)); |
| } |
| break; |
| |
| case 125: |
| |
| { |
| (yyval.interm.type).qualifier = EvqSmooth; |
| } |
| break; |
| |
| case 126: |
| |
| { |
| (yyval.interm.type).qualifier = EvqFlat; |
| } |
| break; |
| |
| case 127: |
| |
| { |
| (yyval.interm.qualifier) = EvqConstReadOnly; |
| } |
| break; |
| |
| case 128: |
| |
| { |
| VERTEX_ONLY("attribute", (yylsp[(1) - (1)])); |
| ES2_ONLY("attribute", (yylsp[(1) - (1)])); |
| if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute")) |
| context->recover(); |
| (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 129: |
| |
| { |
| ES2_ONLY("varying", (yylsp[(1) - (1)])); |
| if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying")) |
| context->recover(); |
| if (context->shaderType == GL_VERTEX_SHADER) |
| (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)])); |
| else |
| (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 130: |
| |
| { |
| ES2_ONLY("varying", (yylsp[(1) - (2)])); |
| if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying")) |
| context->recover(); |
| if (context->shaderType == GL_VERTEX_SHADER) |
| (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)])); |
| else |
| (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)])); |
| } |
| break; |
| |
| case 131: |
| |
| { |
| (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 132: |
| |
| { |
| (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(1) - (2)]), (yyvsp[(1) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].interm.type).qualifier); |
| } |
| break; |
| |
| case 133: |
| |
| { |
| context->error((yylsp[(1) - (1)]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getQualifierString((yyvsp[(1) - (1)].interm.type).qualifier)); |
| context->recover(); |
| |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 134: |
| |
| { |
| (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier); |
| } |
| break; |
| |
| case 135: |
| |
| { |
| (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)])); |
| (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier); |
| } |
| break; |
| |
| case 136: |
| |
| { |
| (yyval.interm.type).qualifier = EvqConstExpr; |
| (yyval.interm.type).line = (yylsp[(1) - (1)]); |
| } |
| break; |
| |
| case 137: |
| |
| { |
| ES3_ONLY("in", (yylsp[(1) - (1)])); |
| (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn; |
| (yyval.interm.type).line = (yylsp[(1) - (1)]); |
| } |
| break; |
| |
| case 138: |
| |
| { |
| ES3_ONLY("out", (yylsp[(1) - (1)])); |
| (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut; |
| (yyval.interm.type).line = (yylsp[(1) - (1)]); |
| } |
| break; |
| |
| case 139: |
| |
| { |
| ES3_ONLY("centroid in", (yylsp[(1) - (2)])); |
| if (context->shaderType == GL_VERTEX_SHADER) |
| { |
| context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader"); |
| context->recover(); |
| } |
| (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn; |
| (yyval.interm.type).line = (yylsp[(2) - (2)]); |
| } |
| break; |
| |
| case 140: |
| |
| { |
| ES3_ONLY("centroid out", (yylsp[(1) - (2)])); |
| if (context->shaderType == GL_FRAGMENT_SHADER) |
| { |
| context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader"); |
| context->recover(); |
| } |
| (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut; |
| (yyval.interm.type).line = (yylsp[(2) - (2)]); |
| } |
| break; |
| |
| case 141: |
| |
| { |
| if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform")) |
| context->recover(); |
| (yyval.interm.type).qualifier = EvqUniform; |
| (yyval.interm.type).line = (yylsp[(1) - (1)]); |
| } |
| break; |
| |
| case 142: |
| |
| { |
| (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| |
| if ((yyval.interm.type).precision == EbpUndefined) { |
| (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type); |
| if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) { |
| context->recover(); |
| } |
| } |
| } |
| break; |
| |
| case 143: |
| |
| { |
| (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); |
| (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision); |
| } |
| break; |
| |
| case 144: |
| |
| { |
| (yyval.interm.precision) = EbpHigh; |
| } |
| break; |
| |
| case 145: |
| |
| { |
| (yyval.interm.precision) = EbpMedium; |
| } |
| break; |
| |
| case 146: |
| |
| { |
| (yyval.interm.precision) = EbpLow; |
| } |
| break; |
| |
| case 147: |
| |
| { |
| ES3_ONLY("layout", (yylsp[(1) - (4)])); |
| (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier); |
| } |
| break; |
| |
| case 148: |
| |
| { |
| (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier); |
| } |
| break; |
| |
| case 149: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier)); |
| } |
| break; |
| |
| case 150: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 151: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)])); |
| } |
| break; |
| |
| case 152: |
| |
| { |
| (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)])); |
| } |
| break; |
| |
| case 153: |
| |
| { |
| (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| } |
| break; |
| |
| case 154: |
| |
| { |
| ES3_ONLY("[]", (yylsp[(2) - (3)])); |
| (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type); |
| (yyval.interm.type).setArray(true, 0); |
| } |
| break; |
| |
| case 155: |
| |
| { |
| (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type); |
| |
| if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
| context->recover(); |
| else { |
| int size; |
| if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size)) |
| context->recover(); |
| (yyval.interm.type).setArray(true, size); |
| } |
| } |
| break; |
| |
| case 156: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 157: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 158: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 159: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 160: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 161: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(2); |
| } |
| break; |
| |
| case 162: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(3); |
| } |
| break; |
| |
| case 163: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(4); |
| } |
| break; |
| |
| case 164: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(2); |
| } |
| break; |
| |
| case 165: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(3); |
| } |
| break; |
| |
| case 166: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(4); |
| } |
| break; |
| |
| case 167: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(2); |
| } |
| break; |
| |
| case 168: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(3); |
| } |
| break; |
| |
| case 169: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(4); |
| } |
| break; |
| |
| case 170: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(2); |
| } |
| break; |
| |
| case 171: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(3); |
| } |
| break; |
| |
| case 172: |
| |
| { |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setAggregate(4); |
| } |
| break; |
| |
| case 173: |
| |
| { |
| FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(2, 2); |
| } |
| break; |
| |
| case 174: |
| |
| { |
| FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(3, 3); |
| } |
| break; |
| |
| case 175: |
| |
| { |
| FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(4, 4); |
| } |
| break; |
| |
| case 176: |
| |
| { |
| FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(2, 3); |
| } |
| break; |
| |
| case 177: |
| |
| { |
| FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(3, 2); |
| } |
| break; |
| |
| case 178: |
| |
| { |
| FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(2, 4); |
| } |
| break; |
| |
| case 179: |
| |
| { |
| FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(4, 2); |
| } |
| break; |
| |
| case 180: |
| |
| { |
| FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(3, 4); |
| } |
| break; |
| |
| case 181: |
| |
| { |
| FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).setMatrix(4, 3); |
| } |
| break; |
| |
| case 182: |
| |
| { |
| FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 183: |
| |
| { |
| FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 184: |
| |
| { |
| if (!context->supportsExtension("GL_OES_EGL_image_external")) { |
| context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", ""); |
| context->recover(); |
| } |
| FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 185: |
| |
| { |
| FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 186: |
| |
| { |
| FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 187: |
| |
| { |
| FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 188: |
| |
| { |
| FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 189: |
| |
| { |
| FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 190: |
| |
| { |
| FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 191: |
| |
| { |
| FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 192: |
| |
| { |
| FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 193: |
| |
| { |
| FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 194: |
| |
| { |
| FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 195: |
| |
| { |
| FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 196: |
| |
| { |
| FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 197: |
| |
| { |
| FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)])); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 198: |
| |
| { |
| FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)])); |
| (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| } |
| break; |
| |
| case 199: |
| |
| { |
| // |
| // This is for user defined type names. The lexical phase looked up the |
| // type. |
| // |
| TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType(); |
| TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)])); |
| (yyval.interm.type).userDef = &structure; |
| } |
| break; |
| |
| case 200: |
| |
| { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); } |
| break; |
| |
| case 201: |
| |
| { |
| (yyval.interm.type) = context->addStructure((yylsp[(1) - (6)]), (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].lex).string, (yyvsp[(5) - (6)].interm.fieldList)); |
| } |
| break; |
| |
| case 202: |
| |
| { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); } |
| break; |
| |
| case 203: |
| |
| { |
| (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList)); |
| } |
| break; |
| |
| case 204: |
| |
| { |
| (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList); |
| } |
| break; |
| |
| case 205: |
| |
| { |
| (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList); |
| for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) { |
| TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i]; |
| for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) { |
| if ((*(yyval.interm.fieldList))[j]->name() == field->name()) { |
| context->error((*(yyvsp[(2) - (2)].interm.fieldList))[i]->line(), "duplicate field name in structure:", "struct", field->name().c_str()); |
| context->recover(); |
| } |
| } |
| (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]); |
| } |
| } |
| break; |
| |
| case 206: |
| |
| { |
| (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList)); |
| } |
| break; |
| |
| case 207: |
| |
| { |
| // ES3 Only, but errors should be handled elsewhere |
| (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier; |
| (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier; |
| (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList)); |
| } |
| break; |
| |
| case 208: |
| |
| { |
| (yyval.interm.fieldList) = NewPoolTFieldList(); |
| (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field)); |
| } |
| break; |
| |
| case 209: |
| |
| { |
| (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field)); |
| } |
| break; |
| |
| case 210: |
| |
| { |
| if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
| context->recover(); |
| |
| TType* type = new TType(EbtVoid, EbpUndefined); |
| (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)])); |
| } |
| break; |
| |
| case 211: |
| |
| { |
| if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string)) |
| context->recover(); |
| |
| TType* type = new TType(EbtVoid, EbpUndefined); |
| int size; |
| if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size)) |
| context->recover(); |
| type->setArraySize(size); |
| |
| (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)])); |
| } |
| break; |
| |
| case 212: |
| |
| { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| break; |
| |
| case 213: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 214: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); } |
| break; |
| |
| case 215: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 216: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 217: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 218: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 219: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); } |
| break; |
| |
| case 220: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); } |
| break; |
| |
| case 221: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 222: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 223: |
| |
| { (yyval.interm.intermAggregate) = 0; } |
| break; |
| |
| case 224: |
| |
| { context->symbolTable.push(); } |
| break; |
| |
| case 225: |
| |
| { context->symbolTable.pop(); } |
| break; |
| |
| case 226: |
| |
| { |
| if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) { |
| (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence); |
| (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)])); |
| } |
| (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate); |
| } |
| break; |
| |
| case 227: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 228: |
| |
| { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
| break; |
| |
| case 229: |
| |
| { context->symbolTable.push(); } |
| break; |
| |
| case 230: |
| |
| { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } |
| break; |
| |
| case 231: |
| |
| { context->symbolTable.push(); } |
| break; |
| |
| case 232: |
| |
| { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } |
| break; |
| |
| case 233: |
| |
| { |
| (yyval.interm.intermNode) = 0; |
| } |
| break; |
| |
| case 234: |
| |
| { |
| if ((yyvsp[(2) - (3)].interm.intermAggregate)) { |
| (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence); |
| (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)])); |
| } |
| (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate); |
| } |
| break; |
| |
| case 235: |
| |
| { |
| (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0); |
| } |
| break; |
| |
| case 236: |
| |
| { |
| (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0); |
| } |
| break; |
| |
| case 237: |
| |
| { (yyval.interm.intermNode) = 0; } |
| break; |
| |
| case 238: |
| |
| { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); } |
| break; |
| |
| case 239: |
| |
| { |
| if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode))) |
| context->recover(); |
| (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yylsp[(1) - (5)])); |
| } |
| break; |
| |
| case 240: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); |
| (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); |
| } |
| break; |
| |
| case 241: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); |
| (yyval.interm.nodePair).node2 = 0; |
| } |
| break; |
| |
| case 242: |
| |
| { context->incrSwitchNestingLevel(); } |
| break; |
| |
| case 243: |
| |
| { |
| (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)])); |
| context->decrSwitchNestingLevel(); |
| } |
| break; |
| |
| case 244: |
| |
| { |
| (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)])); |
| } |
| break; |
| |
| case 245: |
| |
| { |
| (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)])); |
| } |
| break; |
| |
| case 246: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode))) |
| context->recover(); |
| } |
| break; |
| |
| case 247: |
| |
| { |
| TIntermNode* intermNode; |
| if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
| context->recover(); |
| if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
| context->recover(); |
| |
| if (!context->executeInitializer((yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), &intermNode)) |
| (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode); |
| else { |
| context->recover(); |
| (yyval.interm.intermTypedNode) = 0; |
| } |
| } |
| break; |
| |
| case 248: |
| |
| { context->symbolTable.push(); ++context->loopNestingLevel; } |
| break; |
| |
| case 249: |
| |
| { |
| context->symbolTable.pop(); |
| (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yylsp[(1) - (6)])); |
| --context->loopNestingLevel; |
| } |
| break; |
| |
| case 250: |
| |
| { ++context->loopNestingLevel; } |
| break; |
| |
| case 251: |
| |
| { |
| if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode))) |
| context->recover(); |
| |
| (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yylsp[(4) - (8)])); |
| --context->loopNestingLevel; |
| } |
| break; |
| |
| case 252: |
| |
| { context->symbolTable.push(); ++context->loopNestingLevel; } |
| break; |
| |
| case 253: |
| |
| { |
| context->symbolTable.pop(); |
| (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[(4) - (7)].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node2), (yyvsp[(7) - (7)].interm.intermNode), (yylsp[(1) - (7)])); |
| --context->loopNestingLevel; |
| } |
| break; |
| |
| case 254: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| } |
| break; |
| |
| case 255: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| } |
| break; |
| |
| case 256: |
| |
| { |
| (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 257: |
| |
| { |
| (yyval.interm.intermTypedNode) = 0; |
| } |
| break; |
| |
| case 258: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); |
| (yyval.interm.nodePair).node2 = 0; |
| } |
| break; |
| |
| case 259: |
| |
| { |
| (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); |
| (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); |
| } |
| break; |
| |
| case 260: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)])); |
| } |
| break; |
| |
| case 261: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)])); |
| } |
| break; |
| |
| case 262: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)])); |
| } |
| break; |
| |
| case 263: |
| |
| { |
| (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)])); |
| } |
| break; |
| |
| case 264: |
| |
| { |
| FRAG_ONLY("discard", (yylsp[(1) - (2)])); |
| (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)])); |
| } |
| break; |
| |
| case 265: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| context->treeRoot = (yyval.interm.intermNode); |
| } |
| break; |
| |
| case 266: |
| |
| { |
| (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0); |
| context->treeRoot = (yyval.interm.intermNode); |
| } |
| break; |
| |
| case 267: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| } |
| break; |
| |
| case 268: |
| |
| { |
| (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| } |
| break; |
| |
| case 269: |
| |
| { |
| TFunction* function = (yyvsp[(1) - (1)].interm).function; |
| |
| const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->shaderVersion); |
| |
| if (builtIn) |
| { |
| context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str()); |
| context->recover(); |
| } |
| |
| TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->shaderVersion)); |
| // |
| // Note: 'prevDec' could be 'function' if this is the first time we've seen function |
| // as it would have just been put in the symbol table. Otherwise, we're looking up |
| // an earlier occurance. |
| // |
| if (prevDec->isDefined()) { |
| // |
| // Then this function already has a body. |
| // |
| context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str()); |
| context->recover(); |
| } |
| prevDec->setDefined(); |
| |
| // |
| // Raise error message if main function takes any parameters or return anything other than void |
| // |
| if (function->getName() == "main") { |
| if (function->getParamCount() > 0) { |
| context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str()); |
| context->recover(); |
| } |
| if (function->getReturnType().getBasicType() != EbtVoid) { |
| context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value"); |
| context->recover(); |
| } |
| } |
| |
| // |
| // Remember the return type for later checking for RETURN statements. |
| // |
| context->currentFunctionType = &(prevDec->getReturnType()); |
| context->functionReturnsValue = false; |
| |
| // |
| // Insert parameters into the symbol table. |
| // If the parameter has no name, it's not an error, just don't insert it |
| // (could be used for unused args). |
| // |
| // Also, accumulate the list of parameters into the HIL, so lower level code |
| // knows where to find parameters. |
| // |
| TIntermAggregate* paramNodes = new TIntermAggregate; |
| for (size_t i = 0; i < function->getParamCount(); i++) { |
| const TParameter& param = function->getParam(i); |
| if (param.name != 0) { |
| TVariable *variable = new TVariable(param.name, *param.type); |
| // |
| // Insert the parameters with name in the symbol table. |
| // |
| if (! context->symbolTable.declare(*variable)) { |
| context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str()); |
| context->recover(); |
| delete variable; |
| } |
| |
| // |
| // Add the parameter to the HIL |
| // |
| paramNodes = context->intermediate.growAggregate( |
| paramNodes, |
| context->intermediate.addSymbol(variable->getUniqueId(), |
| variable->getName(), |
| variable->getType(), (yylsp[(1) - (1)])), |
| (yylsp[(1) - (1)])); |
| } else { |
| paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)])); |
| } |
| } |
| context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)])); |
| (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes; |
| context->loopNestingLevel = 0; |
| } |
| break; |
| |
| case 270: |
| |
| { |
| //?? Check that all paths return a value if return type != void ? |
| // May be best done as post process phase on intermediate code |
| if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->functionReturnsValue) { |
| context->error((yylsp[(1) - (3)]), "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str()); |
| context->recover(); |
| } |
| |
| (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), 0); |
| context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)])); |
| (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str()); |
| (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType()); |
| |
| // store the pragma information for debug and optimize and other vendor specific |
| // information. This information can be queried from the parse tree |
| (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize); |
| (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug); |
| |
| if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()) |
| (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine()); |
| |
| context->symbolTable.pop(); |
| } |
| break; |
| |
| |
| |
| default: break; |
| } |
| YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| |
| YYPOPSTACK (yylen); |
| yylen = 0; |
| YY_STACK_PRINT (yyss, yyssp); |
| |
| *++yyvsp = yyval; |
| *++yylsp = yyloc; |
| |
| /* Now `shift' the result of the reduction. Determine what state |
| that goes to, based on the state we popped back to and the rule |
| number reduced by. */ |
| |
| yyn = yyr1[yyn]; |
| |
| yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| yystate = yytable[yystate]; |
| else |
| yystate = yydefgoto[yyn - YYNTOKENS]; |
| |
| goto yynewstate; |
| |
| |
| /*------------------------------------. |
| | yyerrlab -- here on detecting error | |
| `------------------------------------*/ |
| yyerrlab: |
| /* If not already recovering from an error, report this error. */ |
| if (!yyerrstatus) |
| { |
| ++yynerrs; |
| #if ! YYERROR_VERBOSE |
| yyerror (&yylloc, context, YY_("syntax error")); |
| #else |
| { |
| YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| { |
| YYSIZE_T yyalloc = 2 * yysize; |
| if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| if (yymsg != yymsgbuf) |
| YYSTACK_FREE (yymsg); |
| yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| if (yymsg) |
| yymsg_alloc = yyalloc; |
| else |
| { |
| yymsg = yymsgbuf; |
| yymsg_alloc = sizeof yymsgbuf; |
| } |
| } |
| |
| if (0 < yysize && yysize <= yymsg_alloc) |
| { |
| (void) yysyntax_error (yymsg, yystate, yychar); |
| yyerror (&yylloc, context, yymsg); |
| } |
| else |
| { |
| yyerror (&yylloc, context, YY_("syntax error")); |
| if (yysize != 0) |
| goto yyexhaustedlab; |
| } |
| } |
| #endif |
| } |
| |
| yyerror_range[0] = 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); |
| yychar = YYEMPTY; |
| } |
| } |
| |
| /* Else will try to reuse lookahead token after shifting the error |
| token. */ |
| goto yyerrlab1; |
| |
| |
| /*---------------------------------------------------. |
| | yyerrorlab -- error raised explicitly by YYERROR. | |
| `---------------------------------------------------*/ |
| yyerrorlab: |
| |
| /* Pacify compilers like GCC when the user code never invokes |
| YYERROR and the label yyerrorlab therefore never appears in user |
| code. */ |
| if (/*CONSTCOND*/ 0) |
| goto yyerrorlab; |
| |
| yyerror_range[0] = yylsp[1-yylen]; |
| /* Do not reclaim the symbols of the rule which 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 (yyn != YYPACT_NINF) |
| { |
| 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[0] = *yylsp; |
| yydestruct ("Error: popping", |
| yystos[yystate], yyvsp, yylsp, context); |
| YYPOPSTACK (1); |
| yystate = *yyssp; |
| YY_STACK_PRINT (yyss, yyssp); |
| } |
| |
| *++yyvsp = yylval; |
| |
| yyerror_range[1] = yylloc; |
| /* Using YYLLOC is tempting, but would change the location of |
| the lookahead. YYLOC is available though. */ |
| YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 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, YY_("memory exhausted")); |
| yyresult = 2; |
| /* Fall through. */ |
| #endif |
| |
| yyreturn: |
| if (yychar != YYEMPTY) |
| yydestruct ("Cleanup: discarding lookahead", |
| yytoken, &yylval, &yylloc, context); |
| /* Do not reclaim the symbols of the rule which action triggered |
| this YYABORT or YYACCEPT. */ |
| YYPOPSTACK (yylen); |
| YY_STACK_PRINT (yyss, yyssp); |
| while (yyssp != yyss) |
| { |
| yydestruct ("Cleanup: popping", |
| yystos[*yyssp], yyvsp, yylsp, context); |
| YYPOPSTACK (1); |
| } |
| #ifndef yyoverflow |
| if (yyss != yyssa) |
| YYSTACK_FREE (yyss); |
| #endif |
| #if YYERROR_VERBOSE |
| if (yymsg != yymsgbuf) |
| YYSTACK_FREE (yymsg); |
| #endif |
| /* Make sure YYID is used. */ |
| return YYID (yyresult); |
| } |
| |
| |
| |
| |
| |
| int glslang_parse(TParseContext* context) { |
| return yyparse(context); |
| } |
| |