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