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. */ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 64 | #define YYLSP_NEEDED 1 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 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 |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 95 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 96 | #define YYLEX_PARAM context->scanner |
| 97 | |
| 98 | |
| 99 | |
| 100 | /* Enabling traces. */ |
| 101 | #ifndef YYDEBUG |
| 102 | # define YYDEBUG 0 |
| 103 | #endif |
| 104 | |
| 105 | /* Enabling verbose error messages. */ |
| 106 | #ifdef YYERROR_VERBOSE |
| 107 | # undef YYERROR_VERBOSE |
| 108 | # define YYERROR_VERBOSE 1 |
| 109 | #else |
| 110 | # define YYERROR_VERBOSE 0 |
| 111 | #endif |
| 112 | |
| 113 | /* Enabling the token table. */ |
| 114 | #ifndef YYTOKEN_TABLE |
| 115 | # define YYTOKEN_TABLE 0 |
| 116 | #endif |
| 117 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 118 | /* "%code requires" blocks. */ |
| 119 | |
| 120 | |
| 121 | #define YYLTYPE TSourceLoc |
| 122 | #define YYLTYPE_IS_DECLARED 1 |
| 123 | |
| 124 | |
| 125 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 126 | |
| 127 | /* Tokens. */ |
| 128 | #ifndef YYTOKENTYPE |
| 129 | # define YYTOKENTYPE |
| 130 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 131 | know about them. */ |
| 132 | enum yytokentype { |
| 133 | INVARIANT = 258, |
| 134 | HIGH_PRECISION = 259, |
| 135 | MEDIUM_PRECISION = 260, |
| 136 | LOW_PRECISION = 261, |
| 137 | PRECISION = 262, |
| 138 | ATTRIBUTE = 263, |
| 139 | CONST_QUAL = 264, |
| 140 | BOOL_TYPE = 265, |
| 141 | FLOAT_TYPE = 266, |
| 142 | INT_TYPE = 267, |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 143 | UINT_TYPE = 268, |
| 144 | BREAK = 269, |
| 145 | CONTINUE = 270, |
| 146 | DO = 271, |
| 147 | ELSE = 272, |
| 148 | FOR = 273, |
| 149 | IF = 274, |
| 150 | DISCARD = 275, |
| 151 | RETURN = 276, |
| 152 | SWITCH = 277, |
| 153 | CASE = 278, |
| 154 | DEFAULT = 279, |
| 155 | BVEC2 = 280, |
| 156 | BVEC3 = 281, |
| 157 | BVEC4 = 282, |
| 158 | IVEC2 = 283, |
| 159 | IVEC3 = 284, |
| 160 | IVEC4 = 285, |
| 161 | VEC2 = 286, |
| 162 | VEC3 = 287, |
| 163 | VEC4 = 288, |
Nicolas Capens | e4b1b1d | 2015-02-17 17:26:01 -0500 | [diff] [blame] | 164 | UVEC2 = 289, |
| 165 | UVEC3 = 290, |
| 166 | UVEC4 = 291, |
| 167 | MATRIX2 = 292, |
| 168 | MATRIX3 = 293, |
| 169 | MATRIX4 = 294, |
| 170 | IN_QUAL = 295, |
| 171 | OUT_QUAL = 296, |
| 172 | INOUT_QUAL = 297, |
| 173 | UNIFORM = 298, |
| 174 | VARYING = 299, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 175 | MATRIX2x3 = 300, |
| 176 | MATRIX3x2 = 301, |
| 177 | MATRIX2x4 = 302, |
| 178 | MATRIX4x2 = 303, |
| 179 | MATRIX3x4 = 304, |
| 180 | MATRIX4x3 = 305, |
| 181 | CENTROID = 306, |
| 182 | FLAT = 307, |
| 183 | SMOOTH = 308, |
| 184 | STRUCT = 309, |
| 185 | VOID_TYPE = 310, |
| 186 | WHILE = 311, |
| 187 | SAMPLER2D = 312, |
| 188 | SAMPLERCUBE = 313, |
| 189 | SAMPLER_EXTERNAL_OES = 314, |
| 190 | SAMPLER2DRECT = 315, |
| 191 | SAMPLER2DARRAY = 316, |
| 192 | ISAMPLER2D = 317, |
| 193 | ISAMPLER3D = 318, |
| 194 | ISAMPLERCUBE = 319, |
| 195 | ISAMPLER2DARRAY = 320, |
| 196 | USAMPLER2D = 321, |
| 197 | USAMPLER3D = 322, |
| 198 | USAMPLERCUBE = 323, |
| 199 | USAMPLER2DARRAY = 324, |
| 200 | SAMPLER3D = 325, |
| 201 | SAMPLER3DRECT = 326, |
| 202 | SAMPLER2DSHADOW = 327, |
| 203 | SAMPLERCUBESHADOW = 328, |
| 204 | SAMPLER2DARRAYSHADOW = 329, |
| 205 | LAYOUT = 330, |
| 206 | IDENTIFIER = 331, |
| 207 | TYPE_NAME = 332, |
| 208 | FLOATCONSTANT = 333, |
| 209 | INTCONSTANT = 334, |
| 210 | UINTCONSTANT = 335, |
| 211 | BOOLCONSTANT = 336, |
| 212 | FIELD_SELECTION = 337, |
| 213 | LEFT_OP = 338, |
| 214 | RIGHT_OP = 339, |
| 215 | INC_OP = 340, |
| 216 | DEC_OP = 341, |
| 217 | LE_OP = 342, |
| 218 | GE_OP = 343, |
| 219 | EQ_OP = 344, |
| 220 | NE_OP = 345, |
| 221 | AND_OP = 346, |
| 222 | OR_OP = 347, |
| 223 | XOR_OP = 348, |
| 224 | MUL_ASSIGN = 349, |
| 225 | DIV_ASSIGN = 350, |
| 226 | ADD_ASSIGN = 351, |
| 227 | MOD_ASSIGN = 352, |
| 228 | LEFT_ASSIGN = 353, |
| 229 | RIGHT_ASSIGN = 354, |
| 230 | AND_ASSIGN = 355, |
| 231 | XOR_ASSIGN = 356, |
| 232 | OR_ASSIGN = 357, |
| 233 | SUB_ASSIGN = 358, |
| 234 | LEFT_PAREN = 359, |
| 235 | RIGHT_PAREN = 360, |
| 236 | LEFT_BRACKET = 361, |
| 237 | RIGHT_BRACKET = 362, |
| 238 | LEFT_BRACE = 363, |
| 239 | RIGHT_BRACE = 364, |
| 240 | DOT = 365, |
| 241 | COMMA = 366, |
| 242 | COLON = 367, |
| 243 | EQUAL = 368, |
| 244 | SEMICOLON = 369, |
| 245 | BANG = 370, |
| 246 | DASH = 371, |
| 247 | TILDE = 372, |
| 248 | PLUS = 373, |
| 249 | STAR = 374, |
| 250 | SLASH = 375, |
| 251 | PERCENT = 376, |
| 252 | LEFT_ANGLE = 377, |
| 253 | RIGHT_ANGLE = 378, |
| 254 | VERTICAL_BAR = 379, |
| 255 | CARET = 380, |
| 256 | AMPERSAND = 381, |
| 257 | QUESTION = 382 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 258 | }; |
| 259 | #endif |
| 260 | |
| 261 | |
| 262 | |
| 263 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 264 | typedef union YYSTYPE |
| 265 | { |
| 266 | |
| 267 | |
| 268 | struct { |
| 269 | TSourceLoc line; |
| 270 | union { |
| 271 | TString *string; |
| 272 | float f; |
| 273 | int i; |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 274 | unsigned int u; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 275 | bool b; |
| 276 | }; |
| 277 | TSymbol* symbol; |
| 278 | } lex; |
| 279 | struct { |
| 280 | TSourceLoc line; |
| 281 | TOperator op; |
| 282 | union { |
| 283 | TIntermNode* intermNode; |
| 284 | TIntermNodePair nodePair; |
| 285 | TIntermTyped* intermTypedNode; |
| 286 | TIntermAggregate* intermAggregate; |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 287 | TIntermSwitch* intermSwitch; |
| 288 | TIntermCase* intermCase; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 289 | }; |
| 290 | union { |
| 291 | TPublicType type; |
| 292 | TPrecision precision; |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 293 | TLayoutQualifier layoutQualifier; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 294 | TQualifier qualifier; |
| 295 | TFunction* function; |
| 296 | TParameter param; |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 297 | TField* field; |
| 298 | TFieldList* fieldList; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 299 | }; |
| 300 | } interm; |
| 301 | |
| 302 | |
| 303 | |
| 304 | } YYSTYPE; |
| 305 | # define YYSTYPE_IS_TRIVIAL 1 |
| 306 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 307 | # define YYSTYPE_IS_DECLARED 1 |
| 308 | #endif |
| 309 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 310 | #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
| 311 | typedef struct YYLTYPE |
| 312 | { |
| 313 | int first_line; |
| 314 | int first_column; |
| 315 | int last_line; |
| 316 | int last_column; |
| 317 | } YYLTYPE; |
| 318 | # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ |
| 319 | # define YYLTYPE_IS_DECLARED 1 |
| 320 | # define YYLTYPE_IS_TRIVIAL 1 |
| 321 | #endif |
| 322 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 323 | |
| 324 | /* Copy the second part of user declarations. */ |
| 325 | |
| 326 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 327 | extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); |
| 328 | extern void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason); |
| 329 | |
| 330 | #define YYLLOC_DEFAULT(Current, Rhs, N) do { (Current) = YYRHSLOC(Rhs, N ? 1 : 0); } while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 331 | |
| 332 | #define FRAG_VERT_ONLY(S, L) { \ |
Nicolas Capens | 08ca3c6 | 2015-02-13 16:06:45 -0500 | [diff] [blame] | 333 | if (context->shaderType != GL_FRAGMENT_SHADER && \ |
| 334 | context->shaderType != GL_VERTEX_SHADER) { \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 335 | context->error(L, " supported in vertex/fragment shaders only ", S); \ |
| 336 | context->recover(); \ |
| 337 | } \ |
| 338 | } |
| 339 | |
| 340 | #define VERTEX_ONLY(S, L) { \ |
Nicolas Capens | 08ca3c6 | 2015-02-13 16:06:45 -0500 | [diff] [blame] | 341 | if (context->shaderType != GL_VERTEX_SHADER) { \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 342 | context->error(L, " supported in vertex shaders only ", S); \ |
| 343 | context->recover(); \ |
| 344 | } \ |
| 345 | } |
| 346 | |
| 347 | #define FRAG_ONLY(S, L) { \ |
Nicolas Capens | 08ca3c6 | 2015-02-13 16:06:45 -0500 | [diff] [blame] | 348 | if (context->shaderType != GL_FRAGMENT_SHADER) { \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 349 | context->error(L, " supported in fragment shaders only ", S); \ |
| 350 | context->recover(); \ |
| 351 | } \ |
| 352 | } |
| 353 | |
Nicolas Capens | c684185 | 2015-02-15 14:25:37 -0500 | [diff] [blame] | 354 | #define ES2_ONLY(S, L) { \ |
| 355 | if (context->shaderVersion != 100) { \ |
| 356 | context->error(L, " supported in GLSL ES 1.00 only ", S); \ |
| 357 | context->recover(); \ |
| 358 | } \ |
| 359 | } |
| 360 | |
| 361 | #define ES3_ONLY(S, L) { \ |
| 362 | if (context->shaderVersion != 300) { \ |
| 363 | context->error(L, " supported in GLSL ES 3.00 only ", S); \ |
| 364 | context->recover(); \ |
| 365 | } \ |
| 366 | } |
| 367 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 368 | |
| 369 | |
| 370 | #ifdef short |
| 371 | # undef short |
| 372 | #endif |
| 373 | |
| 374 | #ifdef YYTYPE_UINT8 |
| 375 | typedef YYTYPE_UINT8 yytype_uint8; |
| 376 | #else |
| 377 | typedef unsigned char yytype_uint8; |
| 378 | #endif |
| 379 | |
| 380 | #ifdef YYTYPE_INT8 |
| 381 | typedef YYTYPE_INT8 yytype_int8; |
| 382 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
| 383 | || defined __cplusplus || defined _MSC_VER) |
| 384 | typedef signed char yytype_int8; |
| 385 | #else |
| 386 | typedef short int yytype_int8; |
| 387 | #endif |
| 388 | |
| 389 | #ifdef YYTYPE_UINT16 |
| 390 | typedef YYTYPE_UINT16 yytype_uint16; |
| 391 | #else |
| 392 | typedef unsigned short int yytype_uint16; |
| 393 | #endif |
| 394 | |
| 395 | #ifdef YYTYPE_INT16 |
| 396 | typedef YYTYPE_INT16 yytype_int16; |
| 397 | #else |
| 398 | typedef short int yytype_int16; |
| 399 | #endif |
| 400 | |
| 401 | #ifndef YYSIZE_T |
| 402 | # ifdef __SIZE_TYPE__ |
| 403 | # define YYSIZE_T __SIZE_TYPE__ |
| 404 | # elif defined size_t |
| 405 | # define YYSIZE_T size_t |
| 406 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
| 407 | || defined __cplusplus || defined _MSC_VER) |
| 408 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 409 | # define YYSIZE_T size_t |
| 410 | # else |
| 411 | # define YYSIZE_T unsigned int |
| 412 | # endif |
| 413 | #endif |
| 414 | |
| 415 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 416 | |
| 417 | #ifndef YY_ |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 418 | # if YYENABLE_NLS |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 419 | # if ENABLE_NLS |
| 420 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 421 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
| 422 | # endif |
| 423 | # endif |
| 424 | # ifndef YY_ |
| 425 | # define YY_(msgid) msgid |
| 426 | # endif |
| 427 | #endif |
| 428 | |
| 429 | /* Suppress unused-variable warnings by "using" E. */ |
| 430 | #if ! defined lint || defined __GNUC__ |
| 431 | # define YYUSE(e) ((void) (e)) |
| 432 | #else |
| 433 | # define YYUSE(e) /* empty */ |
| 434 | #endif |
| 435 | |
| 436 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 437 | #ifndef lint |
| 438 | # define YYID(n) (n) |
| 439 | #else |
| 440 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 441 | || defined __cplusplus || defined _MSC_VER) |
| 442 | static int |
| 443 | YYID (int yyi) |
| 444 | #else |
| 445 | static int |
| 446 | YYID (yyi) |
| 447 | int yyi; |
| 448 | #endif |
| 449 | { |
| 450 | return yyi; |
| 451 | } |
| 452 | #endif |
| 453 | |
| 454 | #if ! defined yyoverflow || YYERROR_VERBOSE |
| 455 | |
| 456 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 457 | |
| 458 | # ifdef YYSTACK_USE_ALLOCA |
| 459 | # if YYSTACK_USE_ALLOCA |
| 460 | # ifdef __GNUC__ |
| 461 | # define YYSTACK_ALLOC __builtin_alloca |
| 462 | # elif defined __BUILTIN_VA_ARG_INCR |
| 463 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 464 | # elif defined _AIX |
| 465 | # define YYSTACK_ALLOC __alloca |
| 466 | # elif defined _MSC_VER |
| 467 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 468 | # define alloca _alloca |
| 469 | # else |
| 470 | # define YYSTACK_ALLOC alloca |
| 471 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 472 | || defined __cplusplus || defined _MSC_VER) |
| 473 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 474 | # ifndef _STDLIB_H |
| 475 | # define _STDLIB_H 1 |
| 476 | # endif |
| 477 | # endif |
| 478 | # endif |
| 479 | # endif |
| 480 | # endif |
| 481 | |
| 482 | # ifdef YYSTACK_ALLOC |
| 483 | /* Pacify GCC's `empty if-body' warning. */ |
| 484 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
| 485 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 486 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 487 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 488 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 489 | to allow for a few compiler-allocated temporary stack slots. */ |
| 490 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
| 491 | # endif |
| 492 | # else |
| 493 | # define YYSTACK_ALLOC YYMALLOC |
| 494 | # define YYSTACK_FREE YYFREE |
| 495 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 496 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 497 | # endif |
| 498 | # if (defined __cplusplus && ! defined _STDLIB_H \ |
| 499 | && ! ((defined YYMALLOC || defined malloc) \ |
| 500 | && (defined YYFREE || defined free))) |
| 501 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 502 | # ifndef _STDLIB_H |
| 503 | # define _STDLIB_H 1 |
| 504 | # endif |
| 505 | # endif |
| 506 | # ifndef YYMALLOC |
| 507 | # define YYMALLOC malloc |
| 508 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 509 | || defined __cplusplus || defined _MSC_VER) |
| 510 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 511 | # endif |
| 512 | # endif |
| 513 | # ifndef YYFREE |
| 514 | # define YYFREE free |
| 515 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
| 516 | || defined __cplusplus || defined _MSC_VER) |
| 517 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 518 | # endif |
| 519 | # endif |
| 520 | # endif |
| 521 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 522 | |
| 523 | |
| 524 | #if (! defined yyoverflow \ |
| 525 | && (! defined __cplusplus \ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 526 | || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
| 527 | && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 528 | |
| 529 | /* A type that is properly aligned for any stack member. */ |
| 530 | union yyalloc |
| 531 | { |
| 532 | yytype_int16 yyss_alloc; |
| 533 | YYSTYPE yyvs_alloc; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 534 | YYLTYPE yyls_alloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 535 | }; |
| 536 | |
| 537 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 538 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| 539 | |
| 540 | /* The size of an array large to enough to hold all stacks, each with |
| 541 | N elements. */ |
| 542 | # define YYSTACK_BYTES(N) \ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 543 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
| 544 | + 2 * YYSTACK_GAP_MAXIMUM) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 545 | |
| 546 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 547 | not overlap. */ |
| 548 | # ifndef YYCOPY |
| 549 | # if defined __GNUC__ && 1 < __GNUC__ |
| 550 | # define YYCOPY(To, From, Count) \ |
| 551 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 552 | # else |
| 553 | # define YYCOPY(To, From, Count) \ |
| 554 | do \ |
| 555 | { \ |
| 556 | YYSIZE_T yyi; \ |
| 557 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 558 | (To)[yyi] = (From)[yyi]; \ |
| 559 | } \ |
| 560 | while (YYID (0)) |
| 561 | # endif |
| 562 | # endif |
| 563 | |
| 564 | /* Relocate STACK from its old location to the new one. The |
| 565 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 566 | elements in the stack, and YYPTR gives the new location of the |
| 567 | stack. Advance YYPTR to a properly aligned location for the next |
| 568 | stack. */ |
| 569 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 570 | do \ |
| 571 | { \ |
| 572 | YYSIZE_T yynewbytes; \ |
| 573 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 574 | Stack = &yyptr->Stack_alloc; \ |
| 575 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 576 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 577 | } \ |
| 578 | while (YYID (0)) |
| 579 | |
| 580 | #endif |
| 581 | |
| 582 | /* YYFINAL -- State number of the termination state. */ |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 583 | #define YYFINAL 110 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 584 | /* YYLAST -- Last index in YYTABLE. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 585 | #define YYLAST 2412 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 586 | |
| 587 | /* YYNTOKENS -- Number of terminals. */ |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 588 | #define YYNTOKENS 128 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 589 | /* YYNNTS -- Number of nonterminals. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 590 | #define YYNNTS 93 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 591 | /* YYNRULES -- Number of rules. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 592 | #define YYNRULES 269 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 593 | /* YYNRULES -- Number of states. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 594 | #define YYNSTATES 409 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 595 | |
| 596 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 597 | #define YYUNDEFTOK 2 |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 598 | #define YYMAXUTOK 382 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 599 | |
| 600 | #define YYTRANSLATE(YYX) \ |
| 601 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| 602 | |
| 603 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
| 604 | static const yytype_uint8 yytranslate[] = |
| 605 | { |
| 606 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 607 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 608 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 609 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 610 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 611 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 612 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 613 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 614 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 615 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 616 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 617 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 618 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 619 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 620 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 621 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 622 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 623 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 624 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 625 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 626 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 627 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 628 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 629 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 630 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 631 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 632 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 633 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 634 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 635 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 636 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 637 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 638 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 639 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 640 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 641 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 642 | 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, |
| 643 | 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, |
| 644 | 125, 126, 127 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 645 | }; |
| 646 | |
| 647 | #if YYDEBUG |
| 648 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 649 | YYRHS. */ |
| 650 | static const yytype_uint16 yyprhs[] = |
| 651 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 652 | 0, 0, 3, 5, 7, 9, 11, 13, 15, 19, |
| 653 | 21, 26, 28, 32, 35, 38, 40, 42, 44, 48, |
| 654 | 51, 54, 57, 59, 62, 66, 69, 71, 73, 75, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 655 | 77, 80, 83, 86, 88, 90, 92, 94, 96, 100, |
| 656 | 104, 108, 110, 114, 118, 120, 124, 128, 130, 134, |
| 657 | 138, 142, 146, 148, 152, 156, 158, 162, 164, 168, |
| 658 | 170, 174, 176, 180, 182, 186, 188, 192, 194, 200, |
| 659 | 202, 206, 208, 210, 212, 214, 216, 218, 220, 222, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 660 | 224, 226, 228, 230, 234, 236, 239, 242, 245, 250, |
| 661 | 256, 263, 273, 276, 279, 281, 283, 286, 290, 294, |
| 662 | 297, 303, 307, 310, 314, 317, 318, 320, 322, 324, |
| 663 | 326, 328, 332, 339, 347, 356, 362, 364, 367, 373, |
| 664 | 380, 388, 393, 396, 398, 401, 403, 405, 407, 409, |
| 665 | 411, 414, 416, 419, 421, 423, 426, 428, 430, 432, |
| 666 | 435, 438, 440, 442, 445, 447, 449, 451, 456, 458, |
| 667 | 462, 464, 468, 472, 474, 479, 481, 483, 485, 487, |
| 668 | 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, |
| 669 | 509, 511, 513, 515, 517, 519, 521, 523, 525, 527, |
| 670 | 529, 531, 533, 535, 537, 539, 541, 543, 545, 547, |
| 671 | 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, |
| 672 | 568, 575, 576, 582, 584, 587, 591, 596, 598, 602, |
| 673 | 604, 609, 611, 613, 615, 617, 619, 621, 623, 625, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 674 | 627, 629, 631, 634, 635, 636, 642, 644, 646, 647, |
| 675 | 650, 651, 654, 657, 661, 663, 666, 668, 671, 677, |
| 676 | 681, 683, 684, 691, 695, 698, 700, 705, 706, 713, |
| 677 | 714, 723, 724, 732, 734, 736, 738, 739, 742, 746, |
| 678 | 749, 752, 755, 759, 762, 764, 767, 769, 771, 772 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 679 | }; |
| 680 | |
| 681 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 682 | static const yytype_int16 yyrhs[] = |
| 683 | { |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 684 | 217, 0, -1, 76, -1, 129, -1, 79, -1, 80, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 685 | -1, 78, -1, 81, -1, 104, 156, 105, -1, 130, |
| 686 | -1, 131, 106, 132, 107, -1, 133, -1, 131, 110, |
| 687 | 82, -1, 131, 85, -1, 131, 86, -1, 156, -1, |
| 688 | 134, -1, 135, -1, 131, 110, 135, -1, 137, 105, |
| 689 | -1, 136, 105, -1, 138, 55, -1, 138, -1, 138, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 690 | 154, -1, 137, 111, 154, -1, 139, 104, -1, 181, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 691 | -1, 76, -1, 82, -1, 131, -1, 85, 140, -1, |
| 692 | 86, 140, -1, 141, 140, -1, 118, -1, 116, -1, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 693 | 115, -1, 117, -1, 140, -1, 142, 119, 140, -1, |
| 694 | 142, 120, 140, -1, 142, 121, 140, -1, 142, -1, |
| 695 | 143, 118, 142, -1, 143, 116, 142, -1, 143, -1, |
| 696 | 144, 83, 143, -1, 144, 84, 143, -1, 144, -1, |
| 697 | 145, 122, 144, -1, 145, 123, 144, -1, 145, 87, |
| 698 | 144, -1, 145, 88, 144, -1, 145, -1, 146, 89, |
| 699 | 145, -1, 146, 90, 145, -1, 146, -1, 147, 126, |
| 700 | 146, -1, 147, -1, 148, 125, 147, -1, 148, -1, |
| 701 | 149, 124, 148, -1, 149, -1, 150, 91, 149, -1, |
| 702 | 150, -1, 151, 93, 150, -1, 151, -1, 152, 92, |
| 703 | 151, -1, 152, -1, 152, 127, 156, 112, 154, -1, |
| 704 | 153, -1, 140, 155, 154, -1, 113, -1, 94, -1, |
| 705 | 95, -1, 97, -1, 96, -1, 103, -1, 98, -1, |
| 706 | 99, -1, 100, -1, 101, -1, 102, -1, 154, -1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 707 | 156, 111, 154, -1, 153, -1, 76, 108, -1, 160, |
| 708 | 114, -1, 168, 114, -1, 7, 176, 180, 114, -1, |
| 709 | 173, 158, 185, 109, 114, -1, 173, 158, 185, 109, |
| 710 | 76, 114, -1, 173, 158, 185, 109, 76, 106, 157, |
| 711 | 107, 114, -1, 173, 114, -1, 161, 105, -1, 163, |
| 712 | -1, 162, -1, 163, 165, -1, 162, 111, 165, -1, |
| 713 | 170, 76, 104, -1, 175, 76, -1, 175, 76, 106, |
| 714 | 157, 107, -1, 172, 166, 164, -1, 166, 164, -1, |
| 715 | 172, 166, 167, -1, 166, 167, -1, -1, 40, -1, |
| 716 | 41, -1, 42, -1, 175, -1, 169, -1, 168, 111, |
| 717 | 76, -1, 168, 111, 76, 106, 157, 107, -1, 168, |
| 718 | 111, 76, 106, 107, 113, 189, -1, 168, 111, 76, |
| 719 | 106, 157, 107, 113, 189, -1, 168, 111, 76, 113, |
| 720 | 189, -1, 170, -1, 170, 76, -1, 170, 76, 106, |
| 721 | 157, 107, -1, 170, 76, 106, 107, 113, 189, -1, |
| 722 | 170, 76, 106, 157, 107, 113, 189, -1, 170, 76, |
| 723 | 113, 189, -1, 3, 76, -1, 175, -1, 173, 175, |
| 724 | -1, 53, -1, 52, -1, 9, -1, 8, -1, 44, |
| 725 | -1, 3, 44, -1, 174, -1, 171, 174, -1, 171, |
| 726 | -1, 177, -1, 177, 174, -1, 9, -1, 40, -1, |
| 727 | 41, -1, 51, 40, -1, 51, 41, -1, 43, -1, |
| 728 | 180, -1, 176, 180, -1, 4, -1, 5, -1, 6, |
| 729 | -1, 75, 104, 178, 105, -1, 179, -1, 178, 111, |
| 730 | 179, -1, 76, -1, 76, 113, 79, -1, 76, 113, |
| 731 | 80, -1, 181, -1, 181, 106, 157, 107, -1, 55, |
| 732 | -1, 11, -1, 12, -1, 13, -1, 10, -1, 31, |
| 733 | -1, 32, -1, 33, -1, 25, -1, 26, -1, 27, |
| 734 | -1, 28, -1, 29, -1, 30, -1, 34, -1, 35, |
| 735 | -1, 36, -1, 37, -1, 38, -1, 39, -1, 45, |
| 736 | -1, 46, -1, 47, -1, 48, -1, 49, -1, 50, |
| 737 | -1, 57, -1, 58, -1, 59, -1, 70, -1, 61, |
| 738 | -1, 62, -1, 63, -1, 64, -1, 65, -1, 66, |
| 739 | -1, 67, -1, 68, -1, 69, -1, 72, -1, 73, |
| 740 | -1, 74, -1, 182, -1, 77, -1, -1, 54, 76, |
| 741 | 108, 183, 185, 109, -1, -1, 54, 108, 184, 185, |
| 742 | 109, -1, 186, -1, 185, 186, -1, 175, 187, 114, |
| 743 | -1, 173, 175, 187, 114, -1, 188, -1, 187, 111, |
| 744 | 188, -1, 76, -1, 76, 106, 157, 107, -1, 154, |
| 745 | -1, 159, -1, 193, -1, 192, -1, 190, -1, 202, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 746 | -1, 203, -1, 205, -1, 207, -1, 209, -1, 216, |
| 747 | -1, 108, 109, -1, -1, -1, 108, 194, 201, 195, |
| 748 | 109, -1, 200, -1, 192, -1, -1, 198, 200, -1, |
| 749 | -1, 199, 192, -1, 108, 109, -1, 108, 201, 109, |
| 750 | -1, 191, -1, 201, 191, -1, 114, -1, 156, 114, |
| 751 | -1, 19, 104, 156, 105, 204, -1, 197, 17, 197, |
| 752 | -1, 197, -1, -1, 22, 104, 156, 105, 206, 193, |
| 753 | -1, 23, 157, 112, -1, 24, 112, -1, 156, -1, |
| 754 | 170, 76, 113, 189, -1, -1, 56, 104, 210, 208, |
| 755 | 105, 196, -1, -1, 16, 211, 197, 56, 104, 156, |
| 756 | 105, 114, -1, -1, 18, 104, 212, 213, 215, 105, |
| 757 | 196, -1, 202, -1, 190, -1, 208, -1, -1, 214, |
| 758 | 114, -1, 214, 114, 156, -1, 15, 114, -1, 14, |
| 759 | 114, -1, 21, 114, -1, 21, 156, 114, -1, 20, |
| 760 | 114, -1, 218, -1, 217, 218, -1, 219, -1, 159, |
| 761 | -1, -1, 160, 220, 200, -1 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 762 | }; |
| 763 | |
| 764 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 765 | static const yytype_uint16 yyrline[] = |
| 766 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 767 | 0, 202, 202, 237, 240, 245, 250, 255, 260, 266, |
| 768 | 269, 272, 275, 278, 281, 287, 295, 395, 398, 406, |
| 769 | 410, 417, 421, 428, 434, 443, 451, 528, 535, 545, |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 770 | 548, 558, 568, 590, 591, 592, 593, 601, 602, 606, |
| 771 | 610, 618, 619, 622, 628, 629, 633, 640, 641, 644, |
| 772 | 647, 650, 656, 657, 660, 666, 667, 674, 675, 682, |
| 773 | 683, 690, 691, 697, 698, 704, 705, 711, 712, 729, |
| 774 | 730, 743, 744, 745, 746, 748, 749, 750, 752, 754, |
| 775 | 756, 758, 763, 766, 777, 785, 793, 820, 826, 833, |
| 776 | 837, 841, 845, 852, 890, 893, 900, 908, 929, 950, |
| 777 | 961, 990, 995, 1005, 1010, 1020, 1023, 1026, 1029, 1035, |
| 778 | 1042, 1045, 1049, 1053, 1058, 1063, 1070, 1074, 1078, 1082, |
| 779 | 1087, 1092, 1096, 1172, 1182, 1188, 1191, 1197, 1203, 1210, |
| 780 | 1219, 1228, 1231, 1234, 1241, 1245, 1252, 1256, 1261, 1266, |
| 781 | 1276, 1286, 1295, 1305, 1312, 1315, 1318, 1324, 1331, 1334, |
| 782 | 1340, 1343, 1346, 1352, 1355, 1370, 1374, 1378, 1382, 1386, |
| 783 | 1390, 1395, 1400, 1405, 1410, 1415, 1420, 1425, 1430, 1435, |
| 784 | 1440, 1445, 1450, 1456, 1462, 1468, 1474, 1480, 1486, 1492, |
| 785 | 1498, 1504, 1509, 1514, 1523, 1528, 1533, 1538, 1543, 1548, |
| 786 | 1553, 1558, 1563, 1568, 1573, 1578, 1583, 1588, 1593, 1606, |
| 787 | 1606, 1609, 1609, 1615, 1618, 1634, 1637, 1646, 1650, 1656, |
| 788 | 1663, 1678, 1682, 1686, 1687, 1693, 1694, 1695, 1696, 1697, |
| 789 | 1698, 1699, 1703, 1704, 1704, 1704, 1714, 1715, 1719, 1719, |
| 790 | 1720, 1720, 1725, 1728, 1738, 1741, 1747, 1748, 1752, 1760, |
| 791 | 1764, 1771, 1771, 1778, 1781, 1790, 1795, 1812, 1812, 1817, |
| 792 | 1817, 1824, 1824, 1832, 1835, 1841, 1844, 1850, 1854, 1861, |
| 793 | 1864, 1867, 1870, 1873, 1882, 1886, 1893, 1896, 1902, 1902 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 794 | }; |
| 795 | #endif |
| 796 | |
| 797 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
| 798 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 799 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 800 | static const char *const yytname[] = |
| 801 | { |
| 802 | "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION", |
| 803 | "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE", |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 804 | "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE", |
| 805 | "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", |
| 806 | "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", |
Nicolas Capens | e4b1b1d | 2015-02-17 17:26:01 -0500 | [diff] [blame] | 807 | "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2", |
| 808 | "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 809 | "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2", |
| 810 | "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT", |
| 811 | "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES", |
| 812 | "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D", |
| 813 | "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D", |
| 814 | "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT", |
| 815 | "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT", |
| 816 | "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT", |
| 817 | "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", |
| 818 | "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", |
| 819 | "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", |
| 820 | "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", |
| 821 | "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 822 | "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", |
| 823 | "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", |
| 824 | "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", |
| 825 | "AMPERSAND", "QUESTION", "$accept", "variable_identifier", |
| 826 | "primary_expression", "postfix_expression", "integer_expression", |
| 827 | "function_call", "function_call_or_method", "function_call_generic", |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 828 | "function_call_header_no_parameters", |
| 829 | "function_call_header_with_parameters", "function_call_header", |
| 830 | "function_identifier", "unary_expression", "unary_operator", |
| 831 | "multiplicative_expression", "additive_expression", "shift_expression", |
| 832 | "relational_expression", "equality_expression", "and_expression", |
| 833 | "exclusive_or_expression", "inclusive_or_expression", |
| 834 | "logical_and_expression", "logical_xor_expression", |
| 835 | "logical_or_expression", "conditional_expression", |
| 836 | "assignment_expression", "assignment_operator", "expression", |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 837 | "constant_expression", "enter_struct", "declaration", |
| 838 | "function_prototype", "function_declarator", |
| 839 | "function_header_with_parameters", "function_header", |
| 840 | "parameter_declarator", "parameter_declaration", "parameter_qualifier", |
| 841 | "parameter_type_specifier", "init_declarator_list", "single_declaration", |
| 842 | "fully_specified_type", "interpolation_qualifier", |
| 843 | "parameter_type_qualifier", "type_qualifier", "storage_qualifier", |
| 844 | "type_specifier", "precision_qualifier", "layout_qualifier", |
| 845 | "layout_qualifier_id_list", "layout_qualifier_id", |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 846 | "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", |
| 847 | "$@1", "$@2", "struct_declaration_list", "struct_declaration", |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 848 | "struct_declarator_list", "struct_declarator", "initializer", |
| 849 | "declaration_statement", "statement", "simple_statement", |
| 850 | "compound_statement", "$@3", "$@4", "statement_no_new_scope", |
| 851 | "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope", |
| 852 | "statement_list", "expression_statement", "selection_statement", |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 853 | "selection_rest_statement", "switch_statement", "$@7", "case_label", |
| 854 | "condition", "iteration_statement", "$@8", "$@9", "$@10", |
| 855 | "for_init_statement", "conditionopt", "for_rest_statement", |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 856 | "jump_statement", "translation_unit", "external_declaration", |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 857 | "function_definition", "$@11", 0 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 858 | }; |
| 859 | #endif |
| 860 | |
| 861 | # ifdef YYPRINT |
| 862 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 863 | token YYLEX-NUM. */ |
| 864 | static const yytype_uint16 yytoknum[] = |
| 865 | { |
| 866 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 867 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 868 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 869 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 870 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 871 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 872 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 873 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 874 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
Nicolas Capens | c684185 | 2015-02-15 14:25:37 -0500 | [diff] [blame] | 875 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 876 | 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 877 | 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, |
| 878 | 375, 376, 377, 378, 379, 380, 381, 382 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 879 | }; |
| 880 | # endif |
| 881 | |
| 882 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 883 | static const yytype_uint8 yyr1[] = |
| 884 | { |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 885 | 0, 128, 129, 130, 130, 130, 130, 130, 130, 131, |
| 886 | 131, 131, 131, 131, 131, 132, 133, 134, 134, 135, |
| 887 | 135, 136, 136, 137, 137, 138, 139, 139, 139, 140, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 888 | 140, 140, 140, 141, 141, 141, 141, 142, 142, 142, |
| 889 | 142, 143, 143, 143, 144, 144, 144, 145, 145, 145, |
| 890 | 145, 145, 146, 146, 146, 147, 147, 148, 148, 149, |
| 891 | 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, |
| 892 | 154, 155, 155, 155, 155, 155, 155, 155, 155, 155, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 893 | 155, 155, 156, 156, 157, 158, 159, 159, 159, 159, |
| 894 | 159, 159, 159, 160, 161, 161, 162, 162, 163, 164, |
| 895 | 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, |
| 896 | 168, 168, 168, 168, 168, 168, 169, 169, 169, 169, |
| 897 | 169, 169, 169, 170, 170, 171, 171, 172, 173, 173, |
| 898 | 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, |
| 899 | 174, 174, 175, 175, 176, 176, 176, 177, 178, 178, |
| 900 | 179, 179, 179, 180, 180, 181, 181, 181, 181, 181, |
| 901 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 902 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 903 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 904 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 183, |
| 905 | 182, 184, 182, 185, 185, 186, 186, 187, 187, 188, |
| 906 | 188, 189, 190, 191, 191, 192, 192, 192, 192, 192, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 907 | 192, 192, 193, 194, 195, 193, 196, 196, 198, 197, |
| 908 | 199, 197, 200, 200, 201, 201, 202, 202, 203, 204, |
| 909 | 204, 206, 205, 207, 207, 208, 208, 210, 209, 211, |
| 910 | 209, 212, 209, 213, 213, 214, 214, 215, 215, 216, |
| 911 | 216, 216, 216, 216, 217, 217, 218, 218, 220, 219 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 912 | }; |
| 913 | |
| 914 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 915 | static const yytype_uint8 yyr2[] = |
| 916 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 917 | 0, 2, 1, 1, 1, 1, 1, 1, 3, 1, |
| 918 | 4, 1, 3, 2, 2, 1, 1, 1, 3, 2, |
| 919 | 2, 2, 1, 2, 3, 2, 1, 1, 1, 1, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 920 | 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, |
| 921 | 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, |
| 922 | 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, |
| 923 | 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, |
| 924 | 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 925 | 1, 1, 1, 3, 1, 2, 2, 2, 4, 5, |
| 926 | 6, 9, 2, 2, 1, 1, 2, 3, 3, 2, |
| 927 | 5, 3, 2, 3, 2, 0, 1, 1, 1, 1, |
| 928 | 1, 3, 6, 7, 8, 5, 1, 2, 5, 6, |
| 929 | 7, 4, 2, 1, 2, 1, 1, 1, 1, 1, |
| 930 | 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, |
| 931 | 2, 1, 1, 2, 1, 1, 1, 4, 1, 3, |
| 932 | 1, 3, 3, 1, 4, 1, 1, 1, 1, 1, |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 933 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 934 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 935 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 936 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, |
| 937 | 6, 0, 5, 1, 2, 3, 4, 1, 3, 1, |
| 938 | 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 939 | 1, 1, 2, 0, 0, 5, 1, 1, 0, 2, |
| 940 | 0, 2, 2, 3, 1, 2, 1, 2, 5, 3, |
| 941 | 1, 0, 6, 3, 2, 1, 4, 0, 6, 0, |
| 942 | 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, |
| 943 | 2, 2, 3, 2, 1, 2, 1, 1, 0, 3 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 944 | }; |
| 945 | |
| 946 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 947 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 948 | means the default is an error. */ |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 949 | static const yytype_uint16 yydefact[] = |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 950 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 951 | 0, 0, 144, 145, 146, 0, 128, 136, 159, 156, |
| 952 | 157, 158, 163, 164, 165, 166, 167, 168, 160, 161, |
| 953 | 162, 169, 170, 171, 172, 173, 174, 137, 138, 141, |
| 954 | 129, 175, 176, 177, 178, 179, 180, 0, 126, 125, |
| 955 | 0, 155, 181, 182, 183, 185, 186, 187, 188, 189, |
| 956 | 190, 191, 192, 193, 184, 194, 195, 196, 0, 198, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 957 | 267, 268, 0, 95, 105, 0, 110, 116, 133, 0, |
| 958 | 131, 123, 0, 134, 142, 153, 197, 0, 264, 266, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 959 | 130, 122, 0, 139, 140, 0, 201, 0, 86, 0, |
| 960 | 93, 105, 127, 106, 107, 108, 96, 0, 105, 0, |
| 961 | 87, 117, 132, 0, 92, 0, 124, 143, 135, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 962 | 1, 265, 0, 199, 0, 150, 0, 148, 0, 269, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 963 | 97, 102, 104, 109, 0, 111, 98, 0, 0, 85, |
| 964 | 0, 0, 0, 0, 203, 2, 6, 4, 5, 7, |
| 965 | 28, 0, 0, 0, 35, 34, 36, 33, 3, 9, |
| 966 | 29, 11, 16, 17, 0, 0, 22, 0, 37, 0, |
| 967 | 41, 44, 47, 52, 55, 57, 59, 61, 63, 65, |
| 968 | 67, 84, 0, 26, 88, 0, 0, 0, 147, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 969 | 0, 0, 249, 0, 0, 0, 0, 0, 0, 0, |
| 970 | 0, 223, 232, 236, 37, 69, 82, 0, 212, 0, |
| 971 | 153, 215, 234, 214, 213, 0, 216, 217, 218, 219, |
| 972 | 220, 221, 99, 101, 103, 0, 0, 0, 0, 211, |
| 973 | 121, 0, 209, 0, 207, 0, 204, 30, 31, 0, |
| 974 | 13, 14, 0, 0, 20, 19, 0, 21, 23, 25, |
| 975 | 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 976 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 977 | 0, 154, 0, 202, 151, 152, 149, 260, 259, 230, |
| 978 | 251, 0, 263, 261, 0, 0, 0, 244, 247, 222, |
| 979 | 0, 72, 73, 75, 74, 77, 78, 79, 80, 81, |
| 980 | 76, 71, 0, 0, 237, 233, 235, 0, 0, 0, |
| 981 | 115, 0, 118, 0, 0, 0, 205, 0, 89, 8, |
| 982 | 0, 15, 27, 12, 18, 24, 38, 39, 40, 43, |
| 983 | 42, 45, 46, 50, 51, 48, 49, 53, 54, 56, |
| 984 | 58, 60, 62, 64, 66, 0, 200, 0, 0, 0, |
| 985 | 0, 0, 262, 0, 243, 0, 224, 70, 83, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 986 | 0, 112, 119, 0, 206, 0, 208, 0, 90, 10, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 987 | 0, 0, 229, 231, 254, 253, 256, 230, 241, 245, |
| 988 | 0, 0, 0, 0, 100, 113, 0, 120, 210, 0, |
| 989 | 68, 0, 255, 0, 0, 240, 238, 0, 0, 0, |
| 990 | 225, 114, 0, 0, 257, 0, 230, 242, 0, 227, |
| 991 | 248, 226, 91, 0, 258, 252, 239, 246, 250 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 992 | }; |
| 993 | |
| 994 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 995 | static const yytype_int16 yydefgoto[] = |
| 996 | { |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 997 | -1, 148, 149, 150, 310, 151, 152, 153, 154, 155, |
| 998 | 156, 157, 194, 159, 160, 161, 162, 163, 164, 165, |
| 999 | 166, 167, 168, 169, 170, 195, 196, 292, 197, 172, |
| 1000 | 105, 198, 199, 62, 63, 64, 121, 96, 97, 122, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1001 | 65, 66, 67, 68, 98, 69, 70, 71, 72, 73, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1002 | 116, 117, 74, 173, 76, 175, 114, 133, 134, 223, |
| 1003 | 224, 220, 201, 202, 203, 204, 280, 373, 400, 337, |
| 1004 | 338, 339, 401, 205, 206, 207, 386, 208, 387, 209, |
| 1005 | 372, 210, 345, 269, 340, 366, 383, 384, 211, 77, |
| 1006 | 78, 79, 89 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1007 | }; |
| 1008 | |
| 1009 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 1010 | STATE-NUM. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1011 | #define YYPACT_NINF -333 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1012 | static const yytype_int16 yypact[] = |
| 1013 | { |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1014 | 2050, -21, -333, -333, -333, 21, -333, -333, -333, -333, |
| 1015 | -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, |
| 1016 | -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, |
| 1017 | -333, -333, -333, -333, -333, -333, -333, 26, -333, -333, |
| 1018 | -46, -333, -333, -333, -333, -333, -333, -333, -333, -333, |
| 1019 | -333, -333, -333, -333, -333, -333, -333, -333, -25, -333, |
| 1020 | -333, -78, -16, -15, -1, -43, -333, 34, 7, 1167, |
| 1021 | -333, -333, 2335, 7, -333, 31, -333, 1975, -333, -333, |
| 1022 | -333, -333, 2335, -333, -333, 5, -333, 47, -333, 54, |
| 1023 | -333, 19, -333, -333, -333, -333, -333, 2199, 114, 49, |
| 1024 | -333, -23, -333, 58, -333, 2125, -333, -333, -333, 1528, |
| 1025 | -333, -333, 13, -333, 2125, 33, -12, -333, 395, -333, |
| 1026 | -333, -333, -333, 104, 2199, -26, -333, 1237, 1528, -333, |
| 1027 | 139, 2199, 113, 1720, -333, 86, -333, -333, -333, -333, |
| 1028 | -333, 1528, 1528, 1528, -333, -333, -333, -333, -333, -333, |
| 1029 | 30, -333, -333, -333, 88, -5, 1623, 91, -333, 1528, |
| 1030 | 38, 45, 1, -69, 75, 70, 72, 74, 109, 108, |
| 1031 | -70, -333, 95, -333, -333, 2125, 1805, 92, -333, 47, |
| 1032 | 93, 94, -333, 102, 105, 107, 1335, 118, 1528, 111, |
| 1033 | 120, 122, -333, -333, 117, -333, -333, -13, -333, -78, |
| 1034 | 39, -333, -333, -333, -333, 511, -333, -333, -333, -333, |
| 1035 | -333, -333, 121, -333, -333, 1430, 1528, 119, 126, -333, |
| 1036 | -333, 113, 128, 18, -333, -63, -333, -333, -333, -2, |
| 1037 | -333, -333, 1528, 2267, -333, -333, 1528, 131, -333, -333, |
| 1038 | -333, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, |
| 1039 | 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, |
| 1040 | 1528, -333, 1890, -333, -333, -333, -333, -333, -333, 129, |
| 1041 | -333, 1528, -333, -333, 27, 1528, 127, -333, -333, -333, |
| 1042 | 627, -333, -333, -333, -333, -333, -333, -333, -333, -333, |
| 1043 | -333, -333, 1528, 1528, -333, -333, -333, 1528, 125, 134, |
| 1044 | -333, 1528, 132, 28, 1528, 113, -333, -62, -333, -333, |
| 1045 | 135, 136, -333, 142, -333, -333, -333, -333, -333, 38, |
| 1046 | 38, 45, 45, 1, 1, 1, 1, -69, -69, 75, |
| 1047 | 70, 72, 74, 109, 108, 62, -333, 192, 54, 859, |
| 1048 | 975, 6, -333, 15, -333, 1072, 627, -333, -333, 143, |
| 1049 | 1528, 138, -333, 1528, -333, 149, -333, 1528, -333, -333, |
| 1050 | 1528, 145, -333, -333, -333, -333, 1072, 129, -333, 136, |
| 1051 | 181, 2199, 153, 150, -333, -333, 1528, -333, -333, 154, |
| 1052 | -333, 1528, -333, 146, 160, 249, -333, 159, 155, 743, |
| 1053 | -333, -333, 156, 17, 1528, 743, 129, -333, 1528, -333, |
| 1054 | -333, -333, -333, 157, 136, -333, -333, -333, -333 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1055 | }; |
| 1056 | |
| 1057 | /* YYPGOTO[NTERM-NUM]. */ |
| 1058 | static const yytype_int16 yypgoto[] = |
| 1059 | { |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1060 | -333, -333, -333, -333, -333, -333, -333, 36, -333, -333, |
| 1061 | -333, -333, 40, -333, -66, -61, -98, -65, 22, 20, |
| 1062 | 16, 43, 44, 14, -333, -94, -124, -333, -141, -113, |
| 1063 | -333, 9, 11, -333, -333, -333, 177, 186, 180, 182, |
| 1064 | -333, -333, -324, -333, -333, -102, -30, -68, 274, -333, |
| 1065 | -333, 130, -48, 0, -333, -333, -333, -97, -127, 83, |
| 1066 | 2, -206, -35, -198, -319, -79, -333, -333, -85, -332, |
| 1067 | -333, -333, -84, 32, -29, -333, -333, -333, -333, -333, |
| 1068 | -53, -333, -333, -333, -333, -333, -333, -333, -333, -333, |
| 1069 | 237, -333, -333 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1070 | }; |
| 1071 | |
| 1072 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 1073 | positive, shift that token. If negative, reduce the rule which |
| 1074 | number is the opposite. If zero, do what YYDEFACT says. |
| 1075 | If YYTABLE_NINF, syntax error. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1076 | #define YYTABLE_NINF -229 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1077 | static const yytype_int16 yytable[] = |
| 1078 | { |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1079 | 75, 106, 229, 131, 219, 119, 226, 296, 92, 60, |
| 1080 | 300, 61, 131, 307, 218, 171, 7, 176, 248, 249, |
| 1081 | 363, 370, 259, 80, 107, 2, 3, 4, 92, 123, |
| 1082 | 85, 131, 238, 171, 112, 385, 88, 132, 102, 93, |
| 1083 | 94, 95, 370, 108, 357, 274, 132, 27, 28, 226, |
| 1084 | 29, 308, 358, 250, 251, 81, 123, 260, 37, 93, |
| 1085 | 94, 95, 86, 221, 406, 132, 83, 84, 99, 75, |
| 1086 | 399, 100, 75, 131, 131, 276, 399, 75, 262, 87, |
| 1087 | 215, 126, 75, 127, 246, 247, 60, 216, 61, 90, |
| 1088 | 128, 311, 219, 178, 171, 352, 91, 75, 293, 179, |
| 1089 | 235, 294, 299, 309, -94, 75, 236, 132, 132, 293, |
| 1090 | 101, 367, 315, 113, 75, 230, 231, 293, 200, 335, |
| 1091 | 368, 171, 403, 115, 75, 125, 293, 174, 293, 305, |
| 1092 | 341, 75, 306, 75, 343, 226, 232, 109, 293, 305, |
| 1093 | 233, 342, 354, -26, 375, 109, 177, 377, 296, 158, |
| 1094 | 323, 324, 325, 326, 93, 94, 95, 241, 242, 243, |
| 1095 | 131, 244, 118, 245, 252, 253, 129, 158, 347, 348, |
| 1096 | 391, 264, 265, 293, 360, 75, 75, 219, 319, 320, |
| 1097 | 212, 227, 228, 80, 349, 321, 322, 327, 328, 222, |
| 1098 | -27, 355, 407, 234, 132, 239, 254, 255, 256, 240, |
| 1099 | 257, 258, 261, 171, 369, 200, 270, 267, 268, 271, |
| 1100 | 171, 281, 282, 283, 284, 285, 286, 287, 288, 289, |
| 1101 | 290, 272, 275, 277, 278, 369, 219, 297, 158, 219, |
| 1102 | 291, 279, 301, 302, 304, -155, 380, -228, 350, 344, |
| 1103 | 393, 351, 359, 371, 379, 353, -28, 293, 361, 381, |
| 1104 | 374, 376, 219, 404, 362, 158, 378, 388, 389, 390, |
| 1105 | 394, 392, 75, 171, 371, 395, 396, 191, 398, 314, |
| 1106 | 402, 408, 331, 334, 219, 330, 329, 120, 124, 82, |
| 1107 | 200, 316, 317, 318, 158, 158, 158, 158, 158, 158, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1108 | 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1109 | 332, 213, 333, 106, 303, 364, 214, 356, 397, 266, |
| 1110 | 405, 365, 346, 382, 111, 0, 0, 0, 0, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1111 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1112 | 0, 0, 0, 0, 0, 0, 0, 158, 0, 200, |
| 1113 | 200, 0, 0, 0, 158, 200, 200, 0, 0, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1114 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1115 | 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, |
| 1116 | 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1117 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, |
| 1118 | 0, 0, 0, 0, 0, 200, 0, 158, 1, 2, |
| 1119 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 180, |
| 1120 | 181, 182, 0, 183, 184, 185, 186, 187, 188, 189, |
| 1121 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1122 | 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, |
| 1123 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1124 | 41, 190, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1125 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 1126 | 58, 135, 59, 136, 137, 138, 139, 140, 0, 0, |
| 1127 | 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1128 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, |
| 1129 | 0, 0, 0, 191, 192, 0, 0, 0, 0, 193, |
| 1130 | 144, 145, 146, 147, 1, 2, 3, 4, 5, 6, |
| 1131 | 7, 8, 9, 10, 11, 180, 181, 182, 0, 183, |
| 1132 | 184, 185, 186, 187, 188, 189, 12, 13, 14, 15, |
| 1133 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, |
| 1134 | 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, |
| 1135 | 35, 36, 37, 38, 39, 40, 41, 190, 42, 43, |
| 1136 | 44, 0, 45, 46, 47, 48, 49, 50, 51, 52, |
| 1137 | 53, 54, 0, 55, 56, 57, 58, 135, 59, 136, |
| 1138 | 137, 138, 139, 140, 0, 0, 141, 142, 0, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1139 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1140 | 0, 0, 0, 0, 0, 143, 0, 0, 0, 191, |
| 1141 | 295, 0, 0, 0, 0, 193, 144, 145, 146, 147, |
| 1142 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
| 1143 | 11, 180, 181, 182, 0, 183, 184, 185, 186, 187, |
| 1144 | 188, 189, 12, 13, 14, 15, 16, 17, 18, 19, |
| 1145 | 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, |
| 1146 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 1147 | 39, 40, 41, 190, 42, 43, 44, 0, 45, 46, |
| 1148 | 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 1149 | 56, 57, 58, 135, 59, 136, 137, 138, 139, 140, |
| 1150 | 0, 0, 141, 142, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1151 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1152 | 0, 143, 0, 0, 0, 191, 0, 0, 0, 0, |
| 1153 | 0, 193, 144, 145, 146, 147, 1, 2, 3, 4, |
| 1154 | 5, 6, 7, 8, 9, 10, 11, 180, 181, 182, |
| 1155 | 0, 183, 184, 185, 186, 187, 188, 189, 12, 13, |
| 1156 | 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
| 1157 | 24, 25, 26, 27, 28, 0, 29, 30, 31, 32, |
| 1158 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 190, |
| 1159 | 42, 43, 44, 0, 45, 46, 47, 48, 49, 50, |
| 1160 | 51, 52, 53, 54, 0, 55, 56, 57, 58, 135, |
| 1161 | 59, 136, 137, 138, 139, 140, 0, 0, 141, 142, |
| 1162 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1163 | 0, 0, 0, 0, 0, 0, 0, 143, 0, 0, |
| 1164 | 0, 118, 0, 0, 0, 0, 0, 193, 144, 145, |
| 1165 | 146, 147, 1, 2, 3, 4, 5, 6, 7, 8, |
| 1166 | 9, 10, 11, 180, 181, 182, 0, 183, 184, 185, |
| 1167 | 186, 187, 188, 189, 12, 13, 14, 15, 16, 17, |
| 1168 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
| 1169 | 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, |
| 1170 | 37, 38, 39, 40, 41, 190, 42, 43, 44, 0, |
| 1171 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1172 | 0, 55, 56, 57, 58, 135, 59, 136, 137, 138, |
| 1173 | 139, 140, 0, 0, 141, 142, 0, 0, 0, 0, |
| 1174 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1175 | 0, 0, 0, 143, 0, 0, 0, 0, 0, 0, |
| 1176 | 0, 0, 0, 193, 144, 145, 146, 147, 1, 2, |
| 1177 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, |
| 1178 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1179 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1180 | 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, |
| 1181 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1182 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1183 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 1184 | 58, 135, 59, 136, 137, 138, 139, 140, 0, 0, |
| 1185 | 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1186 | 0, 0, 0, 0, 0, 130, 2, 3, 4, 143, |
| 1187 | 6, 7, 8, 9, 10, 11, 0, 0, 0, 193, |
| 1188 | 144, 145, 146, 147, 0, 0, 0, 12, 13, 14, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1189 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1190 | 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1191 | 34, 35, 36, 37, 38, 39, 40, 41, 0, 42, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1192 | 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1193 | 52, 53, 54, 0, 55, 56, 57, 58, 135, 59, |
| 1194 | 136, 137, 138, 139, 140, 0, 0, 141, 142, 0, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1195 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1196 | 0, 2, 3, 4, 0, 0, 143, 8, 9, 10, |
| 1197 | 11, 0, 0, 0, 0, 0, 0, 144, 145, 146, |
| 1198 | 147, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
| 1199 | 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, |
| 1200 | 0, 0, 31, 32, 33, 34, 35, 36, 0, 0, |
| 1201 | 0, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1202 | 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1203 | 56, 57, 0, 103, 59, 0, 0, 8, 9, 10, |
| 1204 | 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1205 | 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
| 1206 | 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, |
| 1207 | 0, 104, 31, 32, 33, 34, 35, 36, 0, 0, |
| 1208 | 0, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
| 1209 | 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 1210 | 56, 57, 0, 135, 59, 136, 137, 138, 139, 140, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1211 | 0, 0, 141, 142, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1212 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1213 | 0, 143, 0, 0, 217, 8, 9, 10, 11, 0, |
| 1214 | 0, 0, 144, 145, 146, 147, 0, 0, 0, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1215 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1216 | 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, |
| 1217 | 31, 32, 33, 34, 35, 36, 0, 0, 0, 40, |
| 1218 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1219 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 1220 | 0, 135, 59, 136, 137, 138, 139, 140, 0, 0, |
| 1221 | 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1222 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1223 | 8, 9, 10, 11, 0, 0, 0, 0, 0, 273, |
| 1224 | 144, 145, 146, 147, 0, 12, 13, 14, 15, 16, |
| 1225 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1226 | 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, |
| 1227 | 36, 0, 0, 0, 40, 41, 0, 42, 43, 44, |
| 1228 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1229 | 54, 0, 55, 56, 57, 0, 135, 59, 136, 137, |
| 1230 | 138, 139, 140, 0, 0, 141, 142, 0, 0, 0, |
| 1231 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1232 | 0, 0, 0, 0, 143, 0, 0, 298, 8, 9, |
| 1233 | 10, 11, 0, 0, 0, 144, 145, 146, 147, 0, |
| 1234 | 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, |
| 1235 | 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, |
| 1236 | 0, 0, 0, 31, 32, 33, 34, 35, 36, 0, |
| 1237 | 0, 0, 40, 41, 0, 42, 43, 44, 0, 45, |
| 1238 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, |
| 1239 | 55, 56, 57, 0, 135, 59, 136, 137, 138, 139, |
| 1240 | 140, 0, 0, 141, 142, 0, 0, 0, 0, 0, |
| 1241 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1242 | 0, 0, 143, 8, 9, 10, 11, 0, 0, 0, |
| 1243 | 0, 0, 0, 144, 145, 146, 147, 0, 12, 13, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1244 | 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
| 1245 | 24, 25, 26, 0, 0, 0, 0, 0, 31, 32, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1246 | 33, 34, 35, 36, 0, 0, 0, 40, 237, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1247 | 42, 43, 44, 0, 45, 46, 47, 48, 49, 50, |
| 1248 | 51, 52, 53, 54, 0, 55, 56, 57, 0, 135, |
| 1249 | 59, 136, 137, 138, 139, 140, 0, 0, 141, 142, |
| 1250 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1251 | 0, 0, 0, 130, 2, 3, 4, 143, 6, 7, |
| 1252 | 8, 9, 10, 11, 0, 0, 0, 0, 144, 145, |
| 1253 | 146, 147, 0, 0, 0, 12, 13, 14, 15, 16, |
| 1254 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1255 | 27, 28, 0, 29, 30, 31, 32, 33, 34, 35, |
| 1256 | 36, 37, 38, 39, 40, 41, 0, 42, 43, 44, |
| 1257 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1258 | 54, 0, 55, 56, 57, 58, 0, 59, 0, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1259 | 0, 0, 0, 0, 0, 0, 0, 0, 130, 2, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1260 | 3, 4, 0, 6, 7, 8, 9, 10, 11, 0, |
| 1261 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1262 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1263 | 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, |
| 1264 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1265 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1266 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 1267 | 58, 0, 59, 0, 0, 0, 0, 0, 0, 0, |
| 1268 | 0, 0, 0, 130, 2, 3, 4, 0, 6, 7, |
| 1269 | 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1270 | 0, 0, 0, 0, 263, 12, 13, 14, 15, 16, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1271 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1272 | 27, 28, 0, 29, 30, 31, 32, 33, 34, 35, |
| 1273 | 36, 37, 38, 39, 40, 41, 0, 42, 43, 44, |
| 1274 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1275 | 54, 0, 55, 56, 57, 58, 0, 59, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1276 | 0, 0, 0, 0, 0, 110, 0, 0, 1, 2, |
| 1277 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, |
| 1278 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1279 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1280 | 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, |
| 1281 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1282 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1283 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1284 | 58, 0, 59, 1, 2, 3, 4, 5, 6, 7, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1285 | 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1286 | 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1287 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1288 | 27, 28, 0, 29, 30, 31, 32, 33, 34, 35, |
| 1289 | 36, 37, 38, 39, 40, 41, 0, 42, 43, 44, |
| 1290 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1291 | 54, 0, 55, 56, 57, 58, 0, 59, 130, 2, |
| 1292 | 3, 4, 0, 6, 7, 8, 9, 10, 11, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1293 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1294 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1295 | 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, |
| 1296 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1297 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1298 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1299 | 58, 0, 59, 2, 3, 4, 0, 0, 0, 8, |
| 1300 | 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, |
| 1301 | 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, |
| 1302 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, |
| 1303 | 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, |
| 1304 | 0, 0, 0, 40, 41, 0, 42, 43, 44, 0, |
| 1305 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1306 | 0, 55, 56, 57, 0, 0, 59, 8, 9, 10, |
| 1307 | 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1308 | 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
| 1309 | 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, |
| 1310 | 0, 0, 31, 32, 33, 34, 35, 36, 0, 0, |
| 1311 | 0, 40, 41, 0, 42, 43, 44, 0, 45, 46, |
| 1312 | 47, 48, 49, 50, 51, 52, 53, 54, 0, 55, |
| 1313 | 56, 57, 0, 312, 59, 8, 9, 10, 11, 313, |
| 1314 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1315 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1316 | 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, |
| 1317 | 31, 32, 33, 34, 35, 36, 0, 0, 0, 40, |
| 1318 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1319 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 1320 | 0, 0, 59 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1321 | }; |
| 1322 | |
| 1323 | static const yytype_int16 yycheck[] = |
| 1324 | { |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1325 | 0, 69, 143, 105, 128, 89, 133, 205, 9, 0, |
| 1326 | 216, 0, 114, 76, 127, 109, 9, 114, 87, 88, |
| 1327 | 339, 345, 92, 44, 72, 4, 5, 6, 9, 97, |
| 1328 | 76, 133, 156, 127, 82, 367, 114, 105, 68, 40, |
| 1329 | 41, 42, 366, 73, 106, 186, 114, 40, 41, 176, |
| 1330 | 43, 114, 114, 122, 123, 76, 124, 127, 51, 40, |
| 1331 | 41, 42, 108, 131, 396, 133, 40, 41, 111, 69, |
| 1332 | 389, 114, 72, 175, 176, 188, 395, 77, 175, 104, |
| 1333 | 106, 104, 82, 106, 83, 84, 77, 113, 77, 105, |
| 1334 | 113, 232, 216, 105, 188, 301, 111, 97, 111, 111, |
| 1335 | 105, 114, 215, 105, 105, 105, 111, 175, 176, 111, |
| 1336 | 76, 105, 236, 108, 114, 85, 86, 111, 118, 260, |
| 1337 | 105, 215, 105, 76, 124, 76, 111, 114, 111, 111, |
| 1338 | 271, 131, 114, 133, 275, 262, 106, 106, 111, 111, |
| 1339 | 110, 114, 114, 104, 350, 106, 113, 353, 346, 109, |
| 1340 | 248, 249, 250, 251, 40, 41, 42, 119, 120, 121, |
| 1341 | 262, 116, 108, 118, 89, 90, 108, 127, 292, 293, |
| 1342 | 376, 79, 80, 111, 112, 175, 176, 301, 244, 245, |
| 1343 | 76, 141, 142, 44, 297, 246, 247, 252, 253, 76, |
| 1344 | 104, 304, 398, 105, 262, 104, 126, 125, 124, 159, |
| 1345 | 91, 93, 107, 297, 345, 205, 104, 114, 114, 104, |
| 1346 | 304, 94, 95, 96, 97, 98, 99, 100, 101, 102, |
| 1347 | 103, 114, 104, 112, 104, 366, 350, 106, 188, 353, |
| 1348 | 113, 109, 113, 107, 106, 104, 360, 108, 113, 112, |
| 1349 | 381, 107, 107, 345, 357, 113, 104, 111, 56, 104, |
| 1350 | 107, 113, 376, 394, 338, 215, 107, 76, 105, 109, |
| 1351 | 114, 107, 262, 357, 366, 105, 17, 108, 113, 233, |
| 1352 | 114, 114, 256, 259, 398, 255, 254, 91, 98, 5, |
| 1353 | 280, 241, 242, 243, 244, 245, 246, 247, 248, 249, |
| 1354 | 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, |
| 1355 | 257, 124, 258, 371, 221, 340, 124, 305, 387, 179, |
| 1356 | 395, 340, 280, 366, 77, -1, -1, -1, -1, -1, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1357 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1358 | -1, -1, -1, -1, -1, -1, -1, 297, -1, 339, |
| 1359 | 340, -1, -1, -1, 304, 345, 346, -1, -1, -1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1360 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1361 | -1, -1, -1, -1, -1, -1, 366, -1, -1, -1, |
| 1362 | -1, 371, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1363 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 389, |
| 1364 | -1, -1, -1, -1, -1, 395, -1, 357, 3, 4, |
| 1365 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 1366 | 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, |
| 1367 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1368 | 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, |
| 1369 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1370 | 55, 56, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1371 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| 1372 | 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, |
| 1373 | 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1374 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, |
| 1375 | -1, -1, -1, 108, 109, -1, -1, -1, -1, 114, |
| 1376 | 115, 116, 117, 118, 3, 4, 5, 6, 7, 8, |
| 1377 | 9, 10, 11, 12, 13, 14, 15, 16, -1, 18, |
| 1378 | 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
| 1379 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 1380 | 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, |
| 1381 | 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, |
| 1382 | 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, |
| 1383 | 69, 70, -1, 72, 73, 74, 75, 76, 77, 78, |
| 1384 | 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1385 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1386 | -1, -1, -1, -1, -1, 104, -1, -1, -1, 108, |
| 1387 | 109, -1, -1, -1, -1, 114, 115, 116, 117, 118, |
| 1388 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, |
| 1389 | 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, |
| 1390 | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, |
| 1391 | 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, |
| 1392 | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, |
| 1393 | 53, 54, 55, 56, 57, 58, 59, -1, 61, 62, |
| 1394 | 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
| 1395 | 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, |
| 1396 | -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1397 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1398 | -1, 104, -1, -1, -1, 108, -1, -1, -1, -1, |
| 1399 | -1, 114, 115, 116, 117, 118, 3, 4, 5, 6, |
| 1400 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
| 1401 | -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1402 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, |
| 1403 | 37, 38, 39, 40, 41, -1, 43, 44, 45, 46, |
| 1404 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
| 1405 | 57, 58, 59, -1, 61, 62, 63, 64, 65, 66, |
| 1406 | 67, 68, 69, 70, -1, 72, 73, 74, 75, 76, |
| 1407 | 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, |
| 1408 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1409 | -1, -1, -1, -1, -1, -1, -1, 104, -1, -1, |
| 1410 | -1, 108, -1, -1, -1, -1, -1, 114, 115, 116, |
| 1411 | 117, 118, 3, 4, 5, 6, 7, 8, 9, 10, |
| 1412 | 11, 12, 13, 14, 15, 16, -1, 18, 19, 20, |
| 1413 | 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, |
| 1414 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1415 | 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, |
| 1416 | 51, 52, 53, 54, 55, 56, 57, 58, 59, -1, |
| 1417 | 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, |
| 1418 | -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, |
| 1419 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, |
| 1420 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1421 | -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, |
| 1422 | -1, -1, -1, 114, 115, 116, 117, 118, 3, 4, |
| 1423 | 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, |
| 1424 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1425 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1426 | 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, |
| 1427 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1428 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1429 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| 1430 | 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, |
| 1431 | 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1432 | -1, -1, -1, -1, -1, 3, 4, 5, 6, 104, |
| 1433 | 8, 9, 10, 11, 12, 13, -1, -1, -1, 114, |
| 1434 | 115, 116, 117, 118, -1, -1, -1, 25, 26, 27, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1435 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1436 | 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1437 | 48, 49, 50, 51, 52, 53, 54, 55, -1, 57, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1438 | 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1439 | 68, 69, 70, -1, 72, 73, 74, 75, 76, 77, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1440 | 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, |
| 1441 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1442 | -1, 4, 5, 6, -1, -1, 104, 10, 11, 12, |
| 1443 | 13, -1, -1, -1, -1, -1, -1, 115, 116, 117, |
| 1444 | 118, -1, 25, 26, 27, 28, 29, 30, 31, 32, |
| 1445 | 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, |
| 1446 | -1, -1, 45, 46, 47, 48, 49, 50, -1, -1, |
| 1447 | -1, 54, 55, -1, 57, 58, 59, -1, 61, 62, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1448 | 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1449 | 73, 74, -1, 76, 77, -1, -1, 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, 114, 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, 78, 79, 80, 81, 82, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1457 | -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1458 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1459 | -1, 104, -1, -1, 107, 10, 11, 12, 13, -1, |
| 1460 | -1, -1, 115, 116, 117, 118, -1, -1, -1, -1, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1461 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1462 | 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, |
| 1463 | 45, 46, 47, 48, 49, 50, -1, -1, -1, 54, |
| 1464 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1465 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| 1466 | -1, 76, 77, 78, 79, 80, 81, 82, -1, -1, |
| 1467 | 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1468 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1469 | 10, 11, 12, 13, -1, -1, -1, -1, -1, 114, |
| 1470 | 115, 116, 117, 118, -1, 25, 26, 27, 28, 29, |
| 1471 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1472 | -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, |
| 1473 | 50, -1, -1, -1, 54, 55, -1, 57, 58, 59, |
| 1474 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
| 1475 | 70, -1, 72, 73, 74, -1, 76, 77, 78, 79, |
| 1476 | 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, |
| 1477 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1478 | -1, -1, -1, -1, 104, -1, -1, 107, 10, 11, |
| 1479 | 12, 13, -1, -1, -1, 115, 116, 117, 118, -1, |
| 1480 | -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, |
| 1481 | 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, |
| 1482 | -1, -1, -1, 45, 46, 47, 48, 49, 50, -1, |
| 1483 | -1, -1, 54, 55, -1, 57, 58, 59, -1, 61, |
| 1484 | 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, |
| 1485 | 72, 73, 74, -1, 76, 77, 78, 79, 80, 81, |
| 1486 | 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, |
| 1487 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1488 | -1, -1, 104, 10, 11, 12, 13, -1, -1, -1, |
| 1489 | -1, -1, -1, 115, 116, 117, 118, -1, 25, 26, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 1490 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1491 | 37, 38, 39, -1, -1, -1, -1, -1, 45, 46, |
| 1492 | 47, 48, 49, 50, -1, -1, -1, 54, 55, -1, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 1493 | 57, 58, 59, -1, 61, 62, 63, 64, 65, 66, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1494 | 67, 68, 69, 70, -1, 72, 73, 74, -1, 76, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 1495 | 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, |
| 1496 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1497 | -1, -1, -1, 3, 4, 5, 6, 104, 8, 9, |
| 1498 | 10, 11, 12, 13, -1, -1, -1, -1, 115, 116, |
| 1499 | 117, 118, -1, -1, -1, 25, 26, 27, 28, 29, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1500 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1501 | 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, |
| 1502 | 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, |
| 1503 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1504 | 70, -1, 72, 73, 74, 75, -1, 77, -1, -1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1505 | -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, |
| 1506 | 5, 6, -1, 8, 9, 10, 11, 12, 13, -1, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1507 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 109, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1508 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1509 | 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, |
| 1510 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1511 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1512 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1513 | 75, -1, 77, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1514 | -1, -1, -1, 3, 4, 5, 6, -1, 8, 9, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1515 | 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1516 | -1, -1, -1, -1, 109, 25, 26, 27, 28, 29, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1517 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1518 | 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, |
| 1519 | 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, |
| 1520 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1521 | 70, -1, 72, 73, 74, 75, -1, 77, -1, -1, |
| 1522 | -1, -1, -1, -1, -1, 0, -1, -1, 3, 4, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1523 | 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1524 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 109, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1525 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1526 | 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, |
| 1527 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1528 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1529 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1530 | 75, -1, 77, 3, 4, 5, 6, 7, 8, 9, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1531 | 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, |
| 1532 | -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, |
| 1533 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1534 | 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, |
| 1535 | 50, 51, 52, 53, 54, 55, -1, 57, 58, 59, |
| 1536 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1537 | 70, -1, 72, 73, 74, 75, -1, 77, 3, 4, |
| 1538 | 5, 6, -1, 8, 9, 10, 11, 12, 13, -1, |
| 1539 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1540 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1541 | 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, |
| 1542 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1543 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1544 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| 1545 | 75, -1, 77, 4, 5, 6, -1, -1, -1, 10, |
| 1546 | 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, |
| 1547 | -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, |
| 1548 | 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, |
| 1549 | -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, |
| 1550 | -1, -1, -1, 54, 55, -1, 57, 58, 59, -1, |
| 1551 | 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, |
| 1552 | -1, 72, 73, 74, -1, -1, 77, 10, 11, 12, |
| 1553 | 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1554 | -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, |
| 1555 | 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, |
| 1556 | -1, -1, 45, 46, 47, 48, 49, 50, -1, -1, |
| 1557 | -1, 54, 55, -1, 57, 58, 59, -1, 61, 62, |
| 1558 | 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, |
| 1559 | 73, 74, -1, 76, 77, 10, 11, 12, 13, 82, |
| 1560 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1561 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1562 | 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, |
| 1563 | 45, 46, 47, 48, 49, 50, -1, -1, -1, 54, |
| 1564 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1565 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| 1566 | -1, -1, 77 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1567 | }; |
| 1568 | |
| 1569 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1570 | symbol of state STATE-NUM. */ |
| 1571 | static const yytype_uint8 yystos[] = |
| 1572 | { |
| 1573 | 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 1574 | 12, 13, 25, 26, 27, 28, 29, 30, 31, 32, |
Nicolas Capens | e4b1b1d | 2015-02-17 17:26:01 -0500 | [diff] [blame] | 1575 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 1576 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1577 | 54, 55, 57, 58, 59, 61, 62, 63, 64, 65, |
| 1578 | 66, 67, 68, 69, 70, 72, 73, 74, 75, 77, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1579 | 159, 160, 161, 162, 163, 168, 169, 170, 171, 173, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1580 | 174, 175, 176, 177, 180, 181, 182, 217, 218, 219, |
| 1581 | 44, 76, 176, 40, 41, 76, 108, 104, 114, 220, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1582 | 105, 111, 9, 40, 41, 42, 165, 166, 172, 111, |
| 1583 | 114, 76, 174, 76, 114, 158, 175, 180, 174, 106, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1584 | 0, 218, 180, 108, 184, 76, 178, 179, 108, 200, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1585 | 165, 164, 167, 175, 166, 76, 104, 106, 113, 108, |
| 1586 | 3, 173, 175, 185, 186, 76, 78, 79, 80, 81, |
| 1587 | 82, 85, 86, 104, 115, 116, 117, 118, 129, 130, |
| 1588 | 131, 133, 134, 135, 136, 137, 138, 139, 140, 141, |
| 1589 | 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, |
| 1590 | 152, 153, 157, 181, 114, 183, 185, 113, 105, 111, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1591 | 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, |
| 1592 | 56, 108, 109, 114, 140, 153, 154, 156, 159, 160, |
| 1593 | 181, 190, 191, 192, 193, 201, 202, 203, 205, 207, |
| 1594 | 209, 216, 76, 164, 167, 106, 113, 107, 157, 154, |
| 1595 | 189, 175, 76, 187, 188, 109, 186, 140, 140, 156, |
| 1596 | 85, 86, 106, 110, 105, 105, 111, 55, 154, 104, |
| 1597 | 140, 119, 120, 121, 116, 118, 83, 84, 87, 88, |
| 1598 | 122, 123, 89, 90, 126, 125, 124, 91, 93, 92, |
| 1599 | 127, 107, 185, 109, 79, 80, 179, 114, 114, 211, |
| 1600 | 104, 104, 114, 114, 156, 104, 157, 112, 104, 109, |
| 1601 | 194, 94, 95, 96, 97, 98, 99, 100, 101, 102, |
| 1602 | 103, 113, 155, 111, 114, 109, 191, 106, 107, 157, |
| 1603 | 189, 113, 107, 187, 106, 111, 114, 76, 114, 105, |
| 1604 | 132, 156, 76, 82, 135, 154, 140, 140, 140, 142, |
| 1605 | 142, 143, 143, 144, 144, 144, 144, 145, 145, 146, |
| 1606 | 147, 148, 149, 150, 151, 156, 109, 197, 198, 199, |
| 1607 | 212, 156, 114, 156, 112, 210, 201, 154, 154, 157, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1608 | 113, 107, 189, 113, 114, 157, 188, 106, 114, 107, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1609 | 112, 56, 200, 192, 190, 202, 213, 105, 105, 156, |
| 1610 | 170, 173, 208, 195, 107, 189, 113, 189, 107, 157, |
| 1611 | 154, 104, 208, 214, 215, 197, 204, 206, 76, 105, |
| 1612 | 109, 189, 107, 156, 114, 105, 17, 193, 113, 192, |
| 1613 | 196, 200, 114, 105, 156, 196, 197, 189, 114 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1614 | }; |
| 1615 | |
| 1616 | #define yyerrok (yyerrstatus = 0) |
| 1617 | #define yyclearin (yychar = YYEMPTY) |
| 1618 | #define YYEMPTY (-2) |
| 1619 | #define YYEOF 0 |
| 1620 | |
| 1621 | #define YYACCEPT goto yyacceptlab |
| 1622 | #define YYABORT goto yyabortlab |
| 1623 | #define YYERROR goto yyerrorlab |
| 1624 | |
| 1625 | |
| 1626 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1627 | to ease the transition to the new meaning of YYERROR, for GCC. |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 1628 | Once GCC version 2 has supplanted version 1, this can go. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1629 | |
| 1630 | #define YYFAIL goto yyerrlab |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1631 | |
| 1632 | #define YYRECOVERING() (!!yyerrstatus) |
| 1633 | |
| 1634 | #define YYBACKUP(Token, Value) \ |
| 1635 | do \ |
| 1636 | if (yychar == YYEMPTY && yylen == 1) \ |
| 1637 | { \ |
| 1638 | yychar = (Token); \ |
| 1639 | yylval = (Value); \ |
| 1640 | yytoken = YYTRANSLATE (yychar); \ |
| 1641 | YYPOPSTACK (1); \ |
| 1642 | goto yybackup; \ |
| 1643 | } \ |
| 1644 | else \ |
| 1645 | { \ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1646 | yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1647 | YYERROR; \ |
| 1648 | } \ |
| 1649 | while (YYID (0)) |
| 1650 | |
| 1651 | |
| 1652 | #define YYTERROR 1 |
| 1653 | #define YYERRCODE 256 |
| 1654 | |
| 1655 | |
| 1656 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1657 | If N is 0, then set CURRENT to the empty location which ends |
| 1658 | the previous symbol: RHS[0] (always defined). */ |
| 1659 | |
| 1660 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| 1661 | #ifndef YYLLOC_DEFAULT |
| 1662 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 1663 | do \ |
| 1664 | if (YYID (N)) \ |
| 1665 | { \ |
| 1666 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 1667 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 1668 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 1669 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 1670 | } \ |
| 1671 | else \ |
| 1672 | { \ |
| 1673 | (Current).first_line = (Current).last_line = \ |
| 1674 | YYRHSLOC (Rhs, 0).last_line; \ |
| 1675 | (Current).first_column = (Current).last_column = \ |
| 1676 | YYRHSLOC (Rhs, 0).last_column; \ |
| 1677 | } \ |
| 1678 | while (YYID (0)) |
| 1679 | #endif |
| 1680 | |
| 1681 | |
| 1682 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1683 | This macro was not mandated originally: define only if we know |
| 1684 | we won't break user code: when these are the locations we know. */ |
| 1685 | |
| 1686 | #ifndef YY_LOCATION_PRINT |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 1687 | # if YYLTYPE_IS_TRIVIAL |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1688 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 1689 | fprintf (File, "%d.%d-%d.%d", \ |
| 1690 | (Loc).first_line, (Loc).first_column, \ |
| 1691 | (Loc).last_line, (Loc).last_column) |
| 1692 | # else |
| 1693 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 1694 | # endif |
| 1695 | #endif |
| 1696 | |
| 1697 | |
| 1698 | /* YYLEX -- calling `yylex' with the right arguments. */ |
| 1699 | |
| 1700 | #ifdef YYLEX_PARAM |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1701 | # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1702 | #else |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1703 | # define YYLEX yylex (&yylval, &yylloc) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1704 | #endif |
| 1705 | |
| 1706 | /* Enable debugging if requested. */ |
| 1707 | #if YYDEBUG |
| 1708 | |
| 1709 | # ifndef YYFPRINTF |
| 1710 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1711 | # define YYFPRINTF fprintf |
| 1712 | # endif |
| 1713 | |
| 1714 | # define YYDPRINTF(Args) \ |
| 1715 | do { \ |
| 1716 | if (yydebug) \ |
| 1717 | YYFPRINTF Args; \ |
| 1718 | } while (YYID (0)) |
| 1719 | |
| 1720 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1721 | do { \ |
| 1722 | if (yydebug) \ |
| 1723 | { \ |
| 1724 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1725 | yy_symbol_print (stderr, \ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1726 | Type, Value, Location, context); \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1727 | YYFPRINTF (stderr, "\n"); \ |
| 1728 | } \ |
| 1729 | } while (YYID (0)) |
| 1730 | |
| 1731 | |
| 1732 | /*--------------------------------. |
| 1733 | | Print this symbol on YYOUTPUT. | |
| 1734 | `--------------------------------*/ |
| 1735 | |
| 1736 | /*ARGSUSED*/ |
| 1737 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1738 | || defined __cplusplus || defined _MSC_VER) |
| 1739 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1740 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1741 | #else |
| 1742 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1743 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1744 | FILE *yyoutput; |
| 1745 | int yytype; |
| 1746 | YYSTYPE const * const yyvaluep; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1747 | YYLTYPE const * const yylocationp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1748 | TParseContext* context; |
| 1749 | #endif |
| 1750 | { |
| 1751 | if (!yyvaluep) |
| 1752 | return; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1753 | YYUSE (yylocationp); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1754 | YYUSE (context); |
| 1755 | # ifdef YYPRINT |
| 1756 | if (yytype < YYNTOKENS) |
| 1757 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1758 | # else |
| 1759 | YYUSE (yyoutput); |
| 1760 | # endif |
| 1761 | switch (yytype) |
| 1762 | { |
| 1763 | default: |
| 1764 | break; |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | |
| 1769 | /*--------------------------------. |
| 1770 | | Print this symbol on YYOUTPUT. | |
| 1771 | `--------------------------------*/ |
| 1772 | |
| 1773 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1774 | || defined __cplusplus || defined _MSC_VER) |
| 1775 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1776 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1777 | #else |
| 1778 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1779 | yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1780 | FILE *yyoutput; |
| 1781 | int yytype; |
| 1782 | YYSTYPE const * const yyvaluep; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1783 | YYLTYPE const * const yylocationp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1784 | TParseContext* context; |
| 1785 | #endif |
| 1786 | { |
| 1787 | if (yytype < YYNTOKENS) |
| 1788 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1789 | else |
| 1790 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1791 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1792 | YY_LOCATION_PRINT (yyoutput, *yylocationp); |
| 1793 | YYFPRINTF (yyoutput, ": "); |
| 1794 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1795 | YYFPRINTF (yyoutput, ")"); |
| 1796 | } |
| 1797 | |
| 1798 | /*------------------------------------------------------------------. |
| 1799 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1800 | | TOP (included). | |
| 1801 | `------------------------------------------------------------------*/ |
| 1802 | |
| 1803 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1804 | || defined __cplusplus || defined _MSC_VER) |
| 1805 | static void |
| 1806 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
| 1807 | #else |
| 1808 | static void |
| 1809 | yy_stack_print (yybottom, yytop) |
| 1810 | yytype_int16 *yybottom; |
| 1811 | yytype_int16 *yytop; |
| 1812 | #endif |
| 1813 | { |
| 1814 | YYFPRINTF (stderr, "Stack now"); |
| 1815 | for (; yybottom <= yytop; yybottom++) |
| 1816 | { |
| 1817 | int yybot = *yybottom; |
| 1818 | YYFPRINTF (stderr, " %d", yybot); |
| 1819 | } |
| 1820 | YYFPRINTF (stderr, "\n"); |
| 1821 | } |
| 1822 | |
| 1823 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1824 | do { \ |
| 1825 | if (yydebug) \ |
| 1826 | yy_stack_print ((Bottom), (Top)); \ |
| 1827 | } while (YYID (0)) |
| 1828 | |
| 1829 | |
| 1830 | /*------------------------------------------------. |
| 1831 | | Report that the YYRULE is going to be reduced. | |
| 1832 | `------------------------------------------------*/ |
| 1833 | |
| 1834 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1835 | || defined __cplusplus || defined _MSC_VER) |
| 1836 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1837 | yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1838 | #else |
| 1839 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1840 | yy_reduce_print (yyvsp, yylsp, yyrule, context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1841 | YYSTYPE *yyvsp; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1842 | YYLTYPE *yylsp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1843 | int yyrule; |
| 1844 | TParseContext* context; |
| 1845 | #endif |
| 1846 | { |
| 1847 | int yynrhs = yyr2[yyrule]; |
| 1848 | int yyi; |
| 1849 | unsigned long int yylno = yyrline[yyrule]; |
| 1850 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 1851 | yyrule - 1, yylno); |
| 1852 | /* The symbols being reduced. */ |
| 1853 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1854 | { |
| 1855 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
| 1856 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1857 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1858 | , &(yylsp[(yyi + 1) - (yynrhs)]) , context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1859 | YYFPRINTF (stderr, "\n"); |
| 1860 | } |
| 1861 | } |
| 1862 | |
| 1863 | # define YY_REDUCE_PRINT(Rule) \ |
| 1864 | do { \ |
| 1865 | if (yydebug) \ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1866 | yy_reduce_print (yyvsp, yylsp, Rule, context); \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1867 | } while (YYID (0)) |
| 1868 | |
| 1869 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1870 | multiple parsers can coexist. */ |
| 1871 | int yydebug; |
| 1872 | #else /* !YYDEBUG */ |
| 1873 | # define YYDPRINTF(Args) |
| 1874 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1875 | # define YY_STACK_PRINT(Bottom, Top) |
| 1876 | # define YY_REDUCE_PRINT(Rule) |
| 1877 | #endif /* !YYDEBUG */ |
| 1878 | |
| 1879 | |
| 1880 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 1881 | #ifndef YYINITDEPTH |
| 1882 | # define YYINITDEPTH 200 |
| 1883 | #endif |
| 1884 | |
| 1885 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1886 | if the built-in stack extension method is used). |
| 1887 | |
| 1888 | Do not make this value too large; the results are undefined if |
| 1889 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 1890 | evaluated with infinite-precision integer arithmetic. */ |
| 1891 | |
| 1892 | #ifndef YYMAXDEPTH |
| 1893 | # define YYMAXDEPTH 10000 |
| 1894 | #endif |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | #if YYERROR_VERBOSE |
| 1899 | |
| 1900 | # ifndef yystrlen |
| 1901 | # if defined __GLIBC__ && defined _STRING_H |
| 1902 | # define yystrlen strlen |
| 1903 | # else |
| 1904 | /* Return the length of YYSTR. */ |
| 1905 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1906 | || defined __cplusplus || defined _MSC_VER) |
| 1907 | static YYSIZE_T |
| 1908 | yystrlen (const char *yystr) |
| 1909 | #else |
| 1910 | static YYSIZE_T |
| 1911 | yystrlen (yystr) |
| 1912 | const char *yystr; |
| 1913 | #endif |
| 1914 | { |
| 1915 | YYSIZE_T yylen; |
| 1916 | for (yylen = 0; yystr[yylen]; yylen++) |
| 1917 | continue; |
| 1918 | return yylen; |
| 1919 | } |
| 1920 | # endif |
| 1921 | # endif |
| 1922 | |
| 1923 | # ifndef yystpcpy |
| 1924 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
| 1925 | # define yystpcpy stpcpy |
| 1926 | # else |
| 1927 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1928 | YYDEST. */ |
| 1929 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 1930 | || defined __cplusplus || defined _MSC_VER) |
| 1931 | static char * |
| 1932 | yystpcpy (char *yydest, const char *yysrc) |
| 1933 | #else |
| 1934 | static char * |
| 1935 | yystpcpy (yydest, yysrc) |
| 1936 | char *yydest; |
| 1937 | const char *yysrc; |
| 1938 | #endif |
| 1939 | { |
| 1940 | char *yyd = yydest; |
| 1941 | const char *yys = yysrc; |
| 1942 | |
| 1943 | while ((*yyd++ = *yys++) != '\0') |
| 1944 | continue; |
| 1945 | |
| 1946 | return yyd - 1; |
| 1947 | } |
| 1948 | # endif |
| 1949 | # endif |
| 1950 | |
| 1951 | # ifndef yytnamerr |
| 1952 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1953 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1954 | heuristic is that double-quoting is unnecessary unless the string |
| 1955 | contains an apostrophe, a comma, or backslash (other than |
| 1956 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1957 | null, do not copy; instead, return the length of what the result |
| 1958 | would have been. */ |
| 1959 | static YYSIZE_T |
| 1960 | yytnamerr (char *yyres, const char *yystr) |
| 1961 | { |
| 1962 | if (*yystr == '"') |
| 1963 | { |
| 1964 | YYSIZE_T yyn = 0; |
| 1965 | char const *yyp = yystr; |
| 1966 | |
| 1967 | for (;;) |
| 1968 | switch (*++yyp) |
| 1969 | { |
| 1970 | case '\'': |
| 1971 | case ',': |
| 1972 | goto do_not_strip_quotes; |
| 1973 | |
| 1974 | case '\\': |
| 1975 | if (*++yyp != '\\') |
| 1976 | goto do_not_strip_quotes; |
| 1977 | /* Fall through. */ |
| 1978 | default: |
| 1979 | if (yyres) |
| 1980 | yyres[yyn] = *yyp; |
| 1981 | yyn++; |
| 1982 | break; |
| 1983 | |
| 1984 | case '"': |
| 1985 | if (yyres) |
| 1986 | yyres[yyn] = '\0'; |
| 1987 | return yyn; |
| 1988 | } |
| 1989 | do_not_strip_quotes: ; |
| 1990 | } |
| 1991 | |
| 1992 | if (! yyres) |
| 1993 | return yystrlen (yystr); |
| 1994 | |
| 1995 | return yystpcpy (yyres, yystr) - yyres; |
| 1996 | } |
| 1997 | # endif |
| 1998 | |
| 1999 | /* Copy into YYRESULT an error message about the unexpected token |
| 2000 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 2001 | including the terminating null byte. If YYRESULT is null, do not |
| 2002 | copy anything; just return the number of bytes that would be |
| 2003 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 2004 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 2005 | size calculation. */ |
| 2006 | static YYSIZE_T |
| 2007 | yysyntax_error (char *yyresult, int yystate, int yychar) |
| 2008 | { |
| 2009 | int yyn = yypact[yystate]; |
| 2010 | |
| 2011 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
| 2012 | return 0; |
| 2013 | else |
| 2014 | { |
| 2015 | int yytype = YYTRANSLATE (yychar); |
| 2016 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| 2017 | YYSIZE_T yysize = yysize0; |
| 2018 | YYSIZE_T yysize1; |
| 2019 | int yysize_overflow = 0; |
| 2020 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 2021 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 2022 | int yyx; |
| 2023 | |
| 2024 | # if 0 |
| 2025 | /* This is so xgettext sees the translatable formats that are |
| 2026 | constructed on the fly. */ |
| 2027 | YY_("syntax error, unexpected %s"); |
| 2028 | YY_("syntax error, unexpected %s, expecting %s"); |
| 2029 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
| 2030 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| 2031 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| 2032 | # endif |
| 2033 | char *yyfmt; |
| 2034 | char const *yyf; |
| 2035 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 2036 | static char const yyexpecting[] = ", expecting %s"; |
| 2037 | static char const yyor[] = " or %s"; |
| 2038 | char yyformat[sizeof yyunexpected |
| 2039 | + sizeof yyexpecting - 1 |
| 2040 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 2041 | * (sizeof yyor - 1))]; |
| 2042 | char const *yyprefix = yyexpecting; |
| 2043 | |
| 2044 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 2045 | YYCHECK. */ |
| 2046 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 2047 | |
| 2048 | /* Stay within bounds of both yycheck and yytname. */ |
| 2049 | int yychecklim = YYLAST - yyn + 1; |
| 2050 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 2051 | int yycount = 1; |
| 2052 | |
| 2053 | yyarg[0] = yytname[yytype]; |
| 2054 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 2055 | |
| 2056 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 2057 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 2058 | { |
| 2059 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 2060 | { |
| 2061 | yycount = 1; |
| 2062 | yysize = yysize0; |
| 2063 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 2064 | break; |
| 2065 | } |
| 2066 | yyarg[yycount++] = yytname[yyx]; |
| 2067 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 2068 | yysize_overflow |= (yysize1 < yysize); |
| 2069 | yysize = yysize1; |
| 2070 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 2071 | yyprefix = yyor; |
| 2072 | } |
| 2073 | |
| 2074 | yyf = YY_(yyformat); |
| 2075 | yysize1 = yysize + yystrlen (yyf); |
| 2076 | yysize_overflow |= (yysize1 < yysize); |
| 2077 | yysize = yysize1; |
| 2078 | |
| 2079 | if (yysize_overflow) |
| 2080 | return YYSIZE_MAXIMUM; |
| 2081 | |
| 2082 | if (yyresult) |
| 2083 | { |
| 2084 | /* Avoid sprintf, as that infringes on the user's name space. |
| 2085 | Don't have undefined behavior even if the translation |
| 2086 | produced a string with the wrong number of "%s"s. */ |
| 2087 | char *yyp = yyresult; |
| 2088 | int yyi = 0; |
| 2089 | while ((*yyp = *yyf) != '\0') |
| 2090 | { |
| 2091 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 2092 | { |
| 2093 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 2094 | yyf += 2; |
| 2095 | } |
| 2096 | else |
| 2097 | { |
| 2098 | yyp++; |
| 2099 | yyf++; |
| 2100 | } |
| 2101 | } |
| 2102 | } |
| 2103 | return yysize; |
| 2104 | } |
| 2105 | } |
| 2106 | #endif /* YYERROR_VERBOSE */ |
| 2107 | |
| 2108 | |
| 2109 | /*-----------------------------------------------. |
| 2110 | | Release the memory associated to this symbol. | |
| 2111 | `-----------------------------------------------*/ |
| 2112 | |
| 2113 | /*ARGSUSED*/ |
| 2114 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2115 | || defined __cplusplus || defined _MSC_VER) |
| 2116 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2117 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2118 | #else |
| 2119 | static void |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2120 | yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2121 | const char *yymsg; |
| 2122 | int yytype; |
| 2123 | YYSTYPE *yyvaluep; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2124 | YYLTYPE *yylocationp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2125 | TParseContext* context; |
| 2126 | #endif |
| 2127 | { |
| 2128 | YYUSE (yyvaluep); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2129 | YYUSE (yylocationp); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2130 | YYUSE (context); |
| 2131 | |
| 2132 | if (!yymsg) |
| 2133 | yymsg = "Deleting"; |
| 2134 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 2135 | |
| 2136 | switch (yytype) |
| 2137 | { |
| 2138 | |
| 2139 | default: |
| 2140 | break; |
| 2141 | } |
| 2142 | } |
| 2143 | |
| 2144 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 2145 | #ifdef YYPARSE_PARAM |
| 2146 | #if defined __STDC__ || defined __cplusplus |
| 2147 | int yyparse (void *YYPARSE_PARAM); |
| 2148 | #else |
| 2149 | int yyparse (); |
| 2150 | #endif |
| 2151 | #else /* ! YYPARSE_PARAM */ |
| 2152 | #if defined __STDC__ || defined __cplusplus |
| 2153 | int yyparse (TParseContext* context); |
| 2154 | #else |
| 2155 | int yyparse (); |
| 2156 | #endif |
| 2157 | #endif /* ! YYPARSE_PARAM */ |
| 2158 | |
| 2159 | |
| 2160 | |
| 2161 | |
| 2162 | |
| 2163 | /*-------------------------. |
| 2164 | | yyparse or yypush_parse. | |
| 2165 | `-------------------------*/ |
| 2166 | |
| 2167 | #ifdef YYPARSE_PARAM |
| 2168 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2169 | || defined __cplusplus || defined _MSC_VER) |
| 2170 | int |
| 2171 | yyparse (void *YYPARSE_PARAM) |
| 2172 | #else |
| 2173 | int |
| 2174 | yyparse (YYPARSE_PARAM) |
| 2175 | void *YYPARSE_PARAM; |
| 2176 | #endif |
| 2177 | #else /* ! YYPARSE_PARAM */ |
| 2178 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
| 2179 | || defined __cplusplus || defined _MSC_VER) |
| 2180 | int |
| 2181 | yyparse (TParseContext* context) |
| 2182 | #else |
| 2183 | int |
| 2184 | yyparse (context) |
| 2185 | TParseContext* context; |
| 2186 | #endif |
| 2187 | #endif |
| 2188 | { |
| 2189 | /* The lookahead symbol. */ |
| 2190 | int yychar; |
| 2191 | |
| 2192 | /* The semantic value of the lookahead symbol. */ |
| 2193 | YYSTYPE yylval; |
| 2194 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2195 | /* Location data for the lookahead symbol. */ |
| 2196 | YYLTYPE yylloc; |
| 2197 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2198 | /* Number of syntax errors so far. */ |
| 2199 | int yynerrs; |
| 2200 | |
| 2201 | int yystate; |
| 2202 | /* Number of tokens to shift before error messages enabled. */ |
| 2203 | int yyerrstatus; |
| 2204 | |
| 2205 | /* The stacks and their tools: |
| 2206 | `yyss': related to states. |
| 2207 | `yyvs': related to semantic values. |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2208 | `yyls': related to locations. |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2209 | |
| 2210 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 2211 | to reallocate them elsewhere. */ |
| 2212 | |
| 2213 | /* The state stack. */ |
| 2214 | yytype_int16 yyssa[YYINITDEPTH]; |
| 2215 | yytype_int16 *yyss; |
| 2216 | yytype_int16 *yyssp; |
| 2217 | |
| 2218 | /* The semantic value stack. */ |
| 2219 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2220 | YYSTYPE *yyvs; |
| 2221 | YYSTYPE *yyvsp; |
| 2222 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2223 | /* The location stack. */ |
| 2224 | YYLTYPE yylsa[YYINITDEPTH]; |
| 2225 | YYLTYPE *yyls; |
| 2226 | YYLTYPE *yylsp; |
| 2227 | |
| 2228 | /* The locations where the error started and ended. */ |
| 2229 | YYLTYPE yyerror_range[2]; |
| 2230 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2231 | YYSIZE_T yystacksize; |
| 2232 | |
| 2233 | int yyn; |
| 2234 | int yyresult; |
| 2235 | /* Lookahead token as an internal (translated) token number. */ |
| 2236 | int yytoken; |
| 2237 | /* The variables used to return semantic value and location from the |
| 2238 | action routines. */ |
| 2239 | YYSTYPE yyval; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2240 | YYLTYPE yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2241 | |
| 2242 | #if YYERROR_VERBOSE |
| 2243 | /* Buffer for error messages, and its allocated size. */ |
| 2244 | char yymsgbuf[128]; |
| 2245 | char *yymsg = yymsgbuf; |
| 2246 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 2247 | #endif |
| 2248 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2249 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2250 | |
| 2251 | /* The number of symbols on the RHS of the reduced rule. |
| 2252 | Keep to zero when no symbol should be popped. */ |
| 2253 | int yylen = 0; |
| 2254 | |
| 2255 | yytoken = 0; |
| 2256 | yyss = yyssa; |
| 2257 | yyvs = yyvsa; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2258 | yyls = yylsa; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2259 | yystacksize = YYINITDEPTH; |
| 2260 | |
| 2261 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 2262 | |
| 2263 | yystate = 0; |
| 2264 | yyerrstatus = 0; |
| 2265 | yynerrs = 0; |
| 2266 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 2267 | |
| 2268 | /* Initialize stack pointers. |
| 2269 | Waste one element of value and location stack |
| 2270 | so that they stay on the same level as the state stack. |
| 2271 | The wasted elements are never initialized. */ |
| 2272 | yyssp = yyss; |
| 2273 | yyvsp = yyvs; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2274 | yylsp = yyls; |
| 2275 | |
| 2276 | #if YYLTYPE_IS_TRIVIAL |
| 2277 | /* Initialize the default location before parsing starts. */ |
| 2278 | yylloc.first_line = yylloc.last_line = 1; |
| 2279 | yylloc.first_column = yylloc.last_column = 1; |
| 2280 | #endif |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2281 | |
| 2282 | goto yysetstate; |
| 2283 | |
| 2284 | /*------------------------------------------------------------. |
| 2285 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2286 | `------------------------------------------------------------*/ |
| 2287 | yynewstate: |
| 2288 | /* In all cases, when you get here, the value and location stacks |
| 2289 | have just been pushed. So pushing a state here evens the stacks. */ |
| 2290 | yyssp++; |
| 2291 | |
| 2292 | yysetstate: |
| 2293 | *yyssp = yystate; |
| 2294 | |
| 2295 | if (yyss + yystacksize - 1 <= yyssp) |
| 2296 | { |
| 2297 | /* Get the current used size of the three stacks, in elements. */ |
| 2298 | YYSIZE_T yysize = yyssp - yyss + 1; |
| 2299 | |
| 2300 | #ifdef yyoverflow |
| 2301 | { |
| 2302 | /* Give user a chance to reallocate the stack. Use copies of |
| 2303 | these so that the &'s don't force the real ones into |
| 2304 | memory. */ |
| 2305 | YYSTYPE *yyvs1 = yyvs; |
| 2306 | yytype_int16 *yyss1 = yyss; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2307 | YYLTYPE *yyls1 = yyls; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2308 | |
| 2309 | /* Each stack pointer address is followed by the size of the |
| 2310 | data in use in that stack, in bytes. This used to be a |
| 2311 | conditional around just the two extra args, but that might |
| 2312 | be undefined if yyoverflow is a macro. */ |
| 2313 | yyoverflow (YY_("memory exhausted"), |
| 2314 | &yyss1, yysize * sizeof (*yyssp), |
| 2315 | &yyvs1, yysize * sizeof (*yyvsp), |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2316 | &yyls1, yysize * sizeof (*yylsp), |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2317 | &yystacksize); |
| 2318 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2319 | yyls = yyls1; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2320 | yyss = yyss1; |
| 2321 | yyvs = yyvs1; |
| 2322 | } |
| 2323 | #else /* no yyoverflow */ |
| 2324 | # ifndef YYSTACK_RELOCATE |
| 2325 | goto yyexhaustedlab; |
| 2326 | # else |
| 2327 | /* Extend the stack our own way. */ |
| 2328 | if (YYMAXDEPTH <= yystacksize) |
| 2329 | goto yyexhaustedlab; |
| 2330 | yystacksize *= 2; |
| 2331 | if (YYMAXDEPTH < yystacksize) |
| 2332 | yystacksize = YYMAXDEPTH; |
| 2333 | |
| 2334 | { |
| 2335 | yytype_int16 *yyss1 = yyss; |
| 2336 | union yyalloc *yyptr = |
| 2337 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2338 | if (! yyptr) |
| 2339 | goto yyexhaustedlab; |
| 2340 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 2341 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2342 | YYSTACK_RELOCATE (yyls_alloc, yyls); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2343 | # undef YYSTACK_RELOCATE |
| 2344 | if (yyss1 != yyssa) |
| 2345 | YYSTACK_FREE (yyss1); |
| 2346 | } |
| 2347 | # endif |
| 2348 | #endif /* no yyoverflow */ |
| 2349 | |
| 2350 | yyssp = yyss + yysize - 1; |
| 2351 | yyvsp = yyvs + yysize - 1; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2352 | yylsp = yyls + yysize - 1; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2353 | |
| 2354 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 2355 | (unsigned long int) yystacksize)); |
| 2356 | |
| 2357 | if (yyss + yystacksize - 1 <= yyssp) |
| 2358 | YYABORT; |
| 2359 | } |
| 2360 | |
| 2361 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 2362 | |
| 2363 | if (yystate == YYFINAL) |
| 2364 | YYACCEPT; |
| 2365 | |
| 2366 | goto yybackup; |
| 2367 | |
| 2368 | /*-----------. |
| 2369 | | yybackup. | |
| 2370 | `-----------*/ |
| 2371 | yybackup: |
| 2372 | |
| 2373 | /* Do appropriate processing given the current state. Read a |
| 2374 | lookahead token if we need one and don't already have one. */ |
| 2375 | |
| 2376 | /* First try to decide what to do without reference to lookahead token. */ |
| 2377 | yyn = yypact[yystate]; |
| 2378 | if (yyn == YYPACT_NINF) |
| 2379 | goto yydefault; |
| 2380 | |
| 2381 | /* Not known => get a lookahead token if don't already have one. */ |
| 2382 | |
| 2383 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 2384 | if (yychar == YYEMPTY) |
| 2385 | { |
| 2386 | YYDPRINTF ((stderr, "Reading a token: ")); |
| 2387 | yychar = YYLEX; |
| 2388 | } |
| 2389 | |
| 2390 | if (yychar <= YYEOF) |
| 2391 | { |
| 2392 | yychar = yytoken = YYEOF; |
| 2393 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 2394 | } |
| 2395 | else |
| 2396 | { |
| 2397 | yytoken = YYTRANSLATE (yychar); |
| 2398 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 2399 | } |
| 2400 | |
| 2401 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 2402 | detect an error, take that action. */ |
| 2403 | yyn += yytoken; |
| 2404 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
| 2405 | goto yydefault; |
| 2406 | yyn = yytable[yyn]; |
| 2407 | if (yyn <= 0) |
| 2408 | { |
| 2409 | if (yyn == 0 || yyn == YYTABLE_NINF) |
| 2410 | goto yyerrlab; |
| 2411 | yyn = -yyn; |
| 2412 | goto yyreduce; |
| 2413 | } |
| 2414 | |
| 2415 | /* Count tokens shifted since error; after three, turn off error |
| 2416 | status. */ |
| 2417 | if (yyerrstatus) |
| 2418 | yyerrstatus--; |
| 2419 | |
| 2420 | /* Shift the lookahead token. */ |
| 2421 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2422 | |
| 2423 | /* Discard the shifted token. */ |
| 2424 | yychar = YYEMPTY; |
| 2425 | |
| 2426 | yystate = yyn; |
| 2427 | *++yyvsp = yylval; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2428 | *++yylsp = yylloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2429 | goto yynewstate; |
| 2430 | |
| 2431 | |
| 2432 | /*-----------------------------------------------------------. |
| 2433 | | yydefault -- do the default action for the current state. | |
| 2434 | `-----------------------------------------------------------*/ |
| 2435 | yydefault: |
| 2436 | yyn = yydefact[yystate]; |
| 2437 | if (yyn == 0) |
| 2438 | goto yyerrlab; |
| 2439 | goto yyreduce; |
| 2440 | |
| 2441 | |
| 2442 | /*-----------------------------. |
| 2443 | | yyreduce -- Do a reduction. | |
| 2444 | `-----------------------------*/ |
| 2445 | yyreduce: |
| 2446 | /* yyn is the number of a rule to reduce with. */ |
| 2447 | yylen = yyr2[yyn]; |
| 2448 | |
| 2449 | /* If YYLEN is nonzero, implement the default value of the action: |
| 2450 | `$$ = $1'. |
| 2451 | |
| 2452 | Otherwise, the following line sets YYVAL to garbage. |
| 2453 | This behavior is undocumented and Bison |
| 2454 | users should not rely upon it. Assigning to YYVAL |
| 2455 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2456 | GCC warning that YYVAL may be used uninitialized. */ |
| 2457 | yyval = yyvsp[1-yylen]; |
| 2458 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2459 | /* Default location. */ |
| 2460 | YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2461 | YY_REDUCE_PRINT (yyn); |
| 2462 | switch (yyn) |
| 2463 | { |
| 2464 | case 2: |
| 2465 | |
| 2466 | { |
| 2467 | // The symbol table search was done in the lexical phase |
| 2468 | const TSymbol* symbol = (yyvsp[(1) - (1)].lex).symbol; |
| 2469 | const TVariable* variable; |
| 2470 | if (symbol == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2471 | context->error((yylsp[(1) - (1)]), "undeclared identifier", (yyvsp[(1) - (1)].lex).string->c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2472 | context->recover(); |
| 2473 | TType type(EbtFloat, EbpUndefined); |
| 2474 | TVariable* fakeVariable = new TVariable((yyvsp[(1) - (1)].lex).string, type); |
Nicolas Capens | d603ecd | 2015-02-18 14:52:21 -0500 | [diff] [blame] | 2475 | context->symbolTable.declare(*fakeVariable); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2476 | variable = fakeVariable; |
| 2477 | } else { |
| 2478 | // This identifier can only be a variable type symbol |
| 2479 | if (! symbol->isVariable()) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2480 | context->error((yylsp[(1) - (1)]), "variable expected", (yyvsp[(1) - (1)].lex).string->c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2481 | context->recover(); |
| 2482 | } |
| 2483 | variable = static_cast<const TVariable*>(symbol); |
| 2484 | } |
| 2485 | |
| 2486 | // don't delete $1.string, it's used by error recovery, and the pool |
| 2487 | // pop will reclaim the memory |
| 2488 | |
Nicolas Capens | 31ad2aa | 2015-02-26 13:14:27 -0500 | [diff] [blame] | 2489 | if (variable->getType().getQualifier() == EvqConstExpr ) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2490 | ConstantUnion* constArray = variable->getConstPointer(); |
| 2491 | TType t(variable->getType()); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2492 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2493 | } else |
| 2494 | (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(), |
| 2495 | variable->getName(), |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2496 | variable->getType(), (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2497 | } |
| 2498 | break; |
| 2499 | |
| 2500 | case 3: |
| 2501 | |
| 2502 | { |
| 2503 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 2504 | } |
| 2505 | break; |
| 2506 | |
| 2507 | case 4: |
| 2508 | |
| 2509 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2510 | ConstantUnion *unionArray = new ConstantUnion[1]; |
| 2511 | unionArray->setIConst((yyvsp[(1) - (1)].lex).i); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2512 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2513 | } |
| 2514 | break; |
| 2515 | |
| 2516 | case 5: |
| 2517 | |
| 2518 | { |
| 2519 | ConstantUnion *unionArray = new ConstantUnion[1]; |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2520 | unionArray->setUConst((yyvsp[(1) - (1)].lex).u); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2521 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2522 | } |
| 2523 | break; |
| 2524 | |
| 2525 | case 6: |
| 2526 | |
| 2527 | { |
| 2528 | ConstantUnion *unionArray = new ConstantUnion[1]; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2529 | unionArray->setFConst((yyvsp[(1) - (1)].lex).f); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2530 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2531 | } |
| 2532 | break; |
| 2533 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2534 | case 7: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2535 | |
| 2536 | { |
| 2537 | ConstantUnion *unionArray = new ConstantUnion[1]; |
| 2538 | unionArray->setBConst((yyvsp[(1) - (1)].lex).b); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2539 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2540 | } |
| 2541 | break; |
| 2542 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2543 | case 8: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2544 | |
| 2545 | { |
| 2546 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); |
| 2547 | } |
| 2548 | break; |
| 2549 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2550 | case 9: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2551 | |
| 2552 | { |
| 2553 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 2554 | } |
| 2555 | break; |
| 2556 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2557 | case 10: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2558 | |
| 2559 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2560 | (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[(1) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2561 | } |
| 2562 | break; |
| 2563 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2564 | case 11: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2565 | |
| 2566 | { |
| 2567 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 2568 | } |
| 2569 | break; |
| 2570 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2571 | case 12: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2572 | |
| 2573 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2574 | (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yylsp[(3) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2575 | } |
| 2576 | break; |
| 2577 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2578 | case 13: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2579 | |
| 2580 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2581 | (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2582 | } |
| 2583 | break; |
| 2584 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2585 | case 14: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2586 | |
| 2587 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2588 | (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2589 | } |
| 2590 | break; |
| 2591 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2592 | case 15: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2593 | |
| 2594 | { |
| 2595 | if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]")) |
| 2596 | context->recover(); |
| 2597 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 2598 | } |
| 2599 | break; |
| 2600 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2601 | case 16: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2602 | |
| 2603 | { |
| 2604 | TFunction* fnCall = (yyvsp[(1) - (1)].interm).function; |
| 2605 | TOperator op = fnCall->getBuiltInOp(); |
| 2606 | |
| 2607 | if (op != EOpNull) |
| 2608 | { |
| 2609 | // |
| 2610 | // Then this should be a constructor. |
| 2611 | // Don't go through the symbol table for constructors. |
| 2612 | // Their parameters will be verified algorithmically. |
| 2613 | // |
| 2614 | TType type(EbtVoid, EbpUndefined); // use this to get the type back |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2615 | if (context->constructorErrorCheck((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].interm).intermNode, *fnCall, op, &type)) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2616 | (yyval.interm.intermTypedNode) = 0; |
| 2617 | } else { |
| 2618 | // |
| 2619 | // It's a constructor, of type 'type'. |
| 2620 | // |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2621 | (yyval.interm.intermTypedNode) = context->addConstructor((yyvsp[(1) - (1)].interm).intermNode, &type, op, fnCall, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2622 | } |
| 2623 | |
| 2624 | if ((yyval.interm.intermTypedNode) == 0) { |
| 2625 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2626 | (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator(0, op, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2627 | } |
| 2628 | (yyval.interm.intermTypedNode)->setType(type); |
| 2629 | } else { |
| 2630 | // |
| 2631 | // Not a constructor. Find it in the symbol table. |
| 2632 | // |
| 2633 | const TFunction* fnCandidate; |
| 2634 | bool builtIn; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2635 | fnCandidate = context->findFunction((yylsp[(1) - (1)]), fnCall, &builtIn); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2636 | if (fnCandidate) { |
| 2637 | // |
| 2638 | // A declared function. |
| 2639 | // |
| 2640 | if (builtIn && !fnCandidate->getExtension().empty() && |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2641 | context->extensionErrorCheck((yylsp[(1) - (1)]), fnCandidate->getExtension())) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2642 | context->recover(); |
| 2643 | } |
| 2644 | op = fnCandidate->getBuiltInOp(); |
| 2645 | if (builtIn && op != EOpNull) { |
| 2646 | // |
| 2647 | // A function call mapped to a built-in operation. |
| 2648 | // |
| 2649 | if (fnCandidate->getParamCount() == 1) { |
| 2650 | // |
| 2651 | // Treat it like a built-in unary operator. |
| 2652 | // |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 2653 | (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] | 2654 | if ((yyval.interm.intermTypedNode) == 0) { |
| 2655 | std::stringstream extraInfoStream; |
| 2656 | extraInfoStream << "built in unary operator function. Type: " << static_cast<TIntermTyped*>((yyvsp[(1) - (1)].interm).intermNode)->getCompleteString(); |
| 2657 | std::string extraInfo = extraInfoStream.str(); |
| 2658 | context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), " wrong operand type", "Internal Error", extraInfo.c_str()); |
| 2659 | YYERROR; |
| 2660 | } |
| 2661 | } else { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2662 | (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, op, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2663 | } |
| 2664 | } else { |
| 2665 | // This is a real function call |
| 2666 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2667 | (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, EOpFunctionCall, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2668 | (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType()); |
| 2669 | |
| 2670 | // this is how we know whether the given function is a builtIn function or a user defined function |
| 2671 | // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also |
| 2672 | // if builtIn == true, it's definitely a builtIn function with EOpNull |
| 2673 | if (!builtIn) |
| 2674 | (yyval.interm.intermTypedNode)->getAsAggregate()->setUserDefined(); |
| 2675 | (yyval.interm.intermTypedNode)->getAsAggregate()->setName(fnCandidate->getMangledName()); |
| 2676 | |
| 2677 | TQualifier qual; |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 2678 | for (size_t i = 0; i < fnCandidate->getParamCount(); ++i) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2679 | qual = fnCandidate->getParam(i).type->getQualifier(); |
| 2680 | if (qual == EvqOut || qual == EvqInOut) { |
| 2681 | if (context->lValueErrorCheck((yyval.interm.intermTypedNode)->getLine(), "assign", (yyval.interm.intermTypedNode)->getAsAggregate()->getSequence()[i]->getAsTyped())) { |
| 2682 | context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error"); |
| 2683 | context->recover(); |
| 2684 | } |
| 2685 | } |
| 2686 | } |
| 2687 | } |
| 2688 | (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType()); |
| 2689 | } else { |
| 2690 | // error message was put out by PaFindFunction() |
| 2691 | // Put on a dummy node for error recovery |
| 2692 | ConstantUnion *unionArray = new ConstantUnion[1]; |
| 2693 | unionArray->setFConst(0.0f); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2694 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2695 | context->recover(); |
| 2696 | } |
| 2697 | } |
| 2698 | delete fnCall; |
| 2699 | } |
| 2700 | break; |
| 2701 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2702 | case 17: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2703 | |
| 2704 | { |
| 2705 | (yyval.interm) = (yyvsp[(1) - (1)].interm); |
| 2706 | } |
| 2707 | break; |
| 2708 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2709 | case 18: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2710 | |
| 2711 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2712 | context->error((yylsp[(3) - (3)]), "methods are not supported", ""); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2713 | context->recover(); |
| 2714 | (yyval.interm) = (yyvsp[(3) - (3)].interm); |
| 2715 | } |
| 2716 | break; |
| 2717 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2718 | case 19: |
| 2719 | |
| 2720 | { |
| 2721 | (yyval.interm) = (yyvsp[(1) - (2)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2722 | (yyval.interm).line = (yylsp[(2) - (2)]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2723 | } |
| 2724 | break; |
| 2725 | |
| 2726 | case 20: |
| 2727 | |
| 2728 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2729 | (yyval.interm) = (yyvsp[(1) - (2)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2730 | (yyval.interm).line = (yylsp[(2) - (2)]); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2731 | } |
| 2732 | break; |
| 2733 | |
| 2734 | case 21: |
| 2735 | |
| 2736 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2737 | (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| 2738 | (yyval.interm).intermNode = 0; |
| 2739 | } |
| 2740 | break; |
| 2741 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2742 | case 22: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2743 | |
| 2744 | { |
| 2745 | (yyval.interm).function = (yyvsp[(1) - (1)].interm.function); |
| 2746 | (yyval.interm).intermNode = 0; |
| 2747 | } |
| 2748 | break; |
| 2749 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2750 | case 23: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2751 | |
| 2752 | { |
| 2753 | TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) }; |
| 2754 | (yyvsp[(1) - (2)].interm.function)->addParameter(param); |
| 2755 | (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| 2756 | (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2757 | } |
| 2758 | break; |
| 2759 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2760 | case 24: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2761 | |
| 2762 | { |
| 2763 | TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) }; |
| 2764 | (yyvsp[(1) - (3)].interm).function->addParameter(param); |
| 2765 | (yyval.interm).function = (yyvsp[(1) - (3)].interm).function; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2766 | (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2767 | } |
| 2768 | break; |
| 2769 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2770 | case 25: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2771 | |
| 2772 | { |
| 2773 | (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); |
| 2774 | } |
| 2775 | break; |
| 2776 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2777 | case 26: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2778 | |
| 2779 | { |
| 2780 | // |
| 2781 | // Constructor |
| 2782 | // |
| 2783 | TOperator op = EOpNull; |
| 2784 | if ((yyvsp[(1) - (1)].interm.type).userDef) { |
| 2785 | op = EOpConstructStruct; |
| 2786 | } else { |
| 2787 | switch ((yyvsp[(1) - (1)].interm.type).type) { |
| 2788 | case EbtFloat: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 2789 | switch((yyvsp[(1) - (1)].interm.type).primarySize) { |
| 2790 | case 1: |
| 2791 | op = EOpConstructFloat; break; |
| 2792 | case 2: |
| 2793 | switch((yyvsp[(1) - (1)].interm.type).secondarySize) { |
| 2794 | case 1: op = EOpConstructVec2; break; |
| 2795 | case 2: op = EOpConstructMat2; break; |
| 2796 | case 3: op = EOpConstructMat2x3; break; |
| 2797 | case 4: op = EOpConstructMat2x4; break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2798 | } |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 2799 | break; |
| 2800 | case 3: |
| 2801 | switch((yyvsp[(1) - (1)].interm.type).secondarySize) { |
| 2802 | case 1: op = EOpConstructVec3; break; |
| 2803 | case 2: op = EOpConstructMat3x2; break; |
| 2804 | case 3: op = EOpConstructMat3; break; |
| 2805 | case 4: op = EOpConstructMat3x4; break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2806 | } |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 2807 | break; |
| 2808 | case 4: |
| 2809 | switch((yyvsp[(1) - (1)].interm.type).secondarySize) { |
| 2810 | case 1: op = EOpConstructVec4; break; |
| 2811 | case 2: op = EOpConstructMat4x2; break; |
| 2812 | case 3: op = EOpConstructMat4x3; break; |
| 2813 | case 4: op = EOpConstructMat4; break; |
| 2814 | } |
| 2815 | break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2816 | } |
| 2817 | break; |
| 2818 | case EbtInt: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 2819 | switch((yyvsp[(1) - (1)].interm.type).primarySize) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2820 | case 1: op = EOpConstructInt; break; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2821 | case 2: FRAG_VERT_ONLY("ivec2", (yylsp[(1) - (1)])); op = EOpConstructIVec2; break; |
| 2822 | case 3: FRAG_VERT_ONLY("ivec3", (yylsp[(1) - (1)])); op = EOpConstructIVec3; break; |
| 2823 | case 4: FRAG_VERT_ONLY("ivec4", (yylsp[(1) - (1)])); op = EOpConstructIVec4; break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2824 | } |
| 2825 | break; |
Alexis Hetu | b7c46af | 2015-05-12 15:58:09 -0400 | [diff] [blame] | 2826 | case EbtUInt: |
| 2827 | switch((yyvsp[(1) - (1)].interm.type).primarySize) { |
| 2828 | case 1: op = EOpConstructUInt; break; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2829 | case 2: FRAG_VERT_ONLY("uvec2", (yylsp[(1) - (1)])); op = EOpConstructUVec2; break; |
| 2830 | case 3: FRAG_VERT_ONLY("uvec3", (yylsp[(1) - (1)])); op = EOpConstructUVec3; break; |
| 2831 | case 4: FRAG_VERT_ONLY("uvec4", (yylsp[(1) - (1)])); op = EOpConstructUVec4; break; |
Alexis Hetu | b7c46af | 2015-05-12 15:58:09 -0400 | [diff] [blame] | 2832 | } |
| 2833 | break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2834 | case EbtBool: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 2835 | switch((yyvsp[(1) - (1)].interm.type).primarySize) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2836 | case 1: op = EOpConstructBool; break; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2837 | case 2: FRAG_VERT_ONLY("bvec2", (yylsp[(1) - (1)])); op = EOpConstructBVec2; break; |
| 2838 | case 3: FRAG_VERT_ONLY("bvec3", (yylsp[(1) - (1)])); op = EOpConstructBVec3; break; |
| 2839 | case 4: FRAG_VERT_ONLY("bvec4", (yylsp[(1) - (1)])); op = EOpConstructBVec4; break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2840 | } |
| 2841 | break; |
| 2842 | default: break; |
| 2843 | } |
| 2844 | if (op == EOpNull) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2845 | context->error((yylsp[(1) - (1)]), "cannot construct this type", getBasicString((yyvsp[(1) - (1)].interm.type).type)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2846 | context->recover(); |
| 2847 | (yyvsp[(1) - (1)].interm.type).type = EbtFloat; |
| 2848 | op = EOpConstructFloat; |
| 2849 | } |
| 2850 | } |
| 2851 | TString tempString; |
| 2852 | TType type((yyvsp[(1) - (1)].interm.type)); |
| 2853 | TFunction *function = new TFunction(&tempString, type, op); |
| 2854 | (yyval.interm.function) = function; |
| 2855 | } |
| 2856 | break; |
| 2857 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2858 | case 27: |
| 2859 | |
| 2860 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2861 | if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2862 | context->recover(); |
| 2863 | TType type(EbtVoid, EbpUndefined); |
| 2864 | TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); |
| 2865 | (yyval.interm.function) = function; |
| 2866 | } |
| 2867 | break; |
| 2868 | |
| 2869 | case 28: |
| 2870 | |
| 2871 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2872 | if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2873 | context->recover(); |
| 2874 | TType type(EbtVoid, EbpUndefined); |
| 2875 | TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); |
| 2876 | (yyval.interm.function) = function; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2877 | } |
| 2878 | break; |
| 2879 | |
| 2880 | case 29: |
| 2881 | |
| 2882 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2883 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 2884 | } |
| 2885 | break; |
| 2886 | |
| 2887 | case 30: |
| 2888 | |
| 2889 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2890 | if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2891 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2892 | (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2893 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2894 | context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2895 | context->recover(); |
| 2896 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2897 | } |
| 2898 | } |
| 2899 | break; |
| 2900 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2901 | case 31: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2902 | |
| 2903 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2904 | if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2905 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2906 | (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2907 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2908 | context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2909 | context->recover(); |
| 2910 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2911 | } |
| 2912 | } |
| 2913 | break; |
| 2914 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2915 | case 32: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2916 | |
| 2917 | { |
| 2918 | if ((yyvsp[(1) - (2)].interm).op != EOpNull) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2919 | (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2920 | if ((yyval.interm.intermTypedNode) == 0) { |
| 2921 | const char* errorOp = ""; |
| 2922 | switch((yyvsp[(1) - (2)].interm).op) { |
| 2923 | case EOpNegative: errorOp = "-"; break; |
| 2924 | case EOpLogicalNot: errorOp = "!"; break; |
Alexis Hetu | d061e42 | 2015-05-13 16:37:50 -0400 | [diff] [blame] | 2925 | case EOpBitwiseNot: errorOp = "~"; break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2926 | default: break; |
| 2927 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2928 | context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2929 | context->recover(); |
| 2930 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2931 | } |
| 2932 | } else |
| 2933 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2934 | } |
| 2935 | break; |
| 2936 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2937 | case 33: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2938 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2939 | { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNull; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2940 | break; |
| 2941 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2942 | case 34: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2943 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2944 | { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNegative; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2945 | break; |
| 2946 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2947 | case 35: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2948 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2949 | { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpLogicalNot; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2950 | break; |
| 2951 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2952 | case 36: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2953 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2954 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2955 | ES3_ONLY("~", (yylsp[(1) - (1)])); |
| 2956 | (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseNot; |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2957 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2958 | break; |
| 2959 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2960 | case 37: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2961 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2962 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2963 | break; |
| 2964 | |
| 2965 | case 38: |
| 2966 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2967 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2968 | FRAG_VERT_ONLY("*", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 2969 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2970 | } |
| 2971 | break; |
| 2972 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2973 | case 39: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2974 | |
| 2975 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2976 | FRAG_VERT_ONLY("/", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 2977 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2978 | } |
| 2979 | break; |
| 2980 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2981 | case 40: |
| 2982 | |
| 2983 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2984 | FRAG_VERT_ONLY("%", (yylsp[(2) - (3)])); |
| 2985 | ES3_ONLY("%", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 2986 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2987 | } |
| 2988 | break; |
| 2989 | |
| 2990 | case 41: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2991 | |
| 2992 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2993 | break; |
| 2994 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2995 | case 42: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2996 | |
| 2997 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 2998 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2999 | } |
| 3000 | break; |
| 3001 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3002 | case 43: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3003 | |
| 3004 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3005 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3006 | } |
| 3007 | break; |
| 3008 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3009 | case 44: |
| 3010 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3011 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3012 | break; |
| 3013 | |
| 3014 | case 45: |
| 3015 | |
| 3016 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3017 | ES3_ONLY("<<", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3018 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3019 | } |
| 3020 | break; |
| 3021 | |
| 3022 | case 46: |
| 3023 | |
| 3024 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3025 | ES3_ONLY(">>", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3026 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3027 | } |
| 3028 | break; |
| 3029 | |
| 3030 | case 47: |
| 3031 | |
| 3032 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3033 | break; |
| 3034 | |
| 3035 | case 48: |
| 3036 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3037 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3038 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3039 | } |
| 3040 | break; |
| 3041 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3042 | case 49: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3043 | |
| 3044 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3045 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3046 | } |
| 3047 | break; |
| 3048 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3049 | case 50: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3050 | |
| 3051 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3052 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3053 | } |
| 3054 | break; |
| 3055 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3056 | case 51: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3057 | |
| 3058 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3059 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3060 | } |
| 3061 | break; |
| 3062 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3063 | case 52: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3064 | |
| 3065 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3066 | break; |
| 3067 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3068 | case 53: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3069 | |
| 3070 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3071 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3072 | } |
| 3073 | break; |
| 3074 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3075 | case 54: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3076 | |
| 3077 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3078 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3079 | } |
| 3080 | break; |
| 3081 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3082 | case 55: |
| 3083 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3084 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3085 | break; |
| 3086 | |
| 3087 | case 56: |
| 3088 | |
| 3089 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3090 | ES3_ONLY("&", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3091 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3092 | } |
| 3093 | break; |
| 3094 | |
| 3095 | case 57: |
| 3096 | |
| 3097 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3098 | break; |
| 3099 | |
| 3100 | case 58: |
| 3101 | |
| 3102 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3103 | ES3_ONLY("^", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3104 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3105 | } |
| 3106 | break; |
| 3107 | |
| 3108 | case 59: |
| 3109 | |
| 3110 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3111 | break; |
| 3112 | |
| 3113 | case 60: |
| 3114 | |
| 3115 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3116 | ES3_ONLY("|", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3117 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3118 | } |
| 3119 | break; |
| 3120 | |
| 3121 | case 61: |
| 3122 | |
| 3123 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3124 | break; |
| 3125 | |
| 3126 | case 62: |
| 3127 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3128 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3129 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3130 | } |
| 3131 | break; |
| 3132 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3133 | case 63: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3134 | |
| 3135 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3136 | break; |
| 3137 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3138 | case 64: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3139 | |
| 3140 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3141 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3142 | } |
| 3143 | break; |
| 3144 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3145 | case 65: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3146 | |
| 3147 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3148 | break; |
| 3149 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3150 | case 66: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3151 | |
| 3152 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame^] | 3153 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3154 | } |
| 3155 | break; |
| 3156 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3157 | case 67: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3158 | |
| 3159 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3160 | break; |
| 3161 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3162 | case 68: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3163 | |
| 3164 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3165 | if (context->boolErrorCheck((yylsp[(2) - (5)]), (yyvsp[(1) - (5)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3166 | context->recover(); |
| 3167 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3168 | (yyval.interm.intermTypedNode) = context->intermediate.addSelection((yyvsp[(1) - (5)].interm.intermTypedNode), (yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.intermTypedNode), (yylsp[(2) - (5)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3169 | if ((yyvsp[(3) - (5)].interm.intermTypedNode)->getType() != (yyvsp[(5) - (5)].interm.intermTypedNode)->getType()) |
| 3170 | (yyval.interm.intermTypedNode) = 0; |
| 3171 | |
| 3172 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3173 | context->binaryOpError((yylsp[(2) - (5)]), ":", (yyvsp[(3) - (5)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(5) - (5)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3174 | context->recover(); |
| 3175 | (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode); |
| 3176 | } |
| 3177 | } |
| 3178 | break; |
| 3179 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3180 | case 69: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3181 | |
| 3182 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3183 | break; |
| 3184 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3185 | case 70: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3186 | |
| 3187 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3188 | if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3189 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3190 | (yyval.interm.intermTypedNode) = context->intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3191 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3192 | context->assignError((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3193 | context->recover(); |
| 3194 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); |
| 3195 | } |
| 3196 | } |
| 3197 | break; |
| 3198 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3199 | case 71: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3200 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3201 | { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3202 | break; |
| 3203 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3204 | case 72: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3205 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3206 | { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpMulAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3207 | break; |
| 3208 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3209 | case 73: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3210 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3211 | { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpDivAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3212 | break; |
| 3213 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3214 | case 74: |
| 3215 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3216 | { ES3_ONLY("%=", (yylsp[(1) - (1)])); |
| 3217 | FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpIModAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3218 | break; |
| 3219 | |
| 3220 | case 75: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3221 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3222 | { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAddAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3223 | break; |
| 3224 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3225 | case 76: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3226 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3227 | { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpSubAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3228 | break; |
| 3229 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3230 | case 77: |
| 3231 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3232 | { ES3_ONLY("<<=", (yylsp[(1) - (1)])); |
| 3233 | FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftLeftAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3234 | break; |
| 3235 | |
| 3236 | case 78: |
| 3237 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3238 | { ES3_ONLY(">>=", (yylsp[(1) - (1)])); |
| 3239 | FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftRightAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3240 | break; |
| 3241 | |
| 3242 | case 79: |
| 3243 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3244 | { ES3_ONLY("&=", (yylsp[(1) - (1)])); |
| 3245 | FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseAndAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3246 | break; |
| 3247 | |
| 3248 | case 80: |
| 3249 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3250 | { ES3_ONLY("^=", (yylsp[(1) - (1)])); |
| 3251 | FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseXorAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3252 | break; |
| 3253 | |
| 3254 | case 81: |
| 3255 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3256 | { ES3_ONLY("|=", (yylsp[(1) - (1)])); |
| 3257 | FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseOrAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3258 | break; |
| 3259 | |
| 3260 | case 82: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3261 | |
| 3262 | { |
| 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 83: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3268 | |
| 3269 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3270 | (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3271 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3272 | context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3273 | context->recover(); |
| 3274 | (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); |
| 3275 | } |
| 3276 | } |
| 3277 | break; |
| 3278 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3279 | case 84: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3280 | |
| 3281 | { |
| 3282 | if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode))) |
| 3283 | context->recover(); |
| 3284 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 3285 | } |
| 3286 | break; |
| 3287 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3288 | case 85: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3289 | |
| 3290 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3291 | if (context->enterStructDeclaration((yyvsp[(1) - (2)].lex).line, *(yyvsp[(1) - (2)].lex).string)) |
| 3292 | context->recover(); |
| 3293 | (yyval.lex) = (yyvsp[(1) - (2)].lex); |
| 3294 | } |
| 3295 | break; |
| 3296 | |
| 3297 | case 86: |
| 3298 | |
| 3299 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3300 | TFunction &function = *((yyvsp[(1) - (2)].interm).function); |
| 3301 | |
| 3302 | TIntermAggregate *prototype = new TIntermAggregate; |
| 3303 | prototype->setType(function.getReturnType()); |
| 3304 | prototype->setName(function.getName()); |
| 3305 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 3306 | for (size_t i = 0; i < function.getParamCount(); i++) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3307 | { |
| 3308 | const TParameter ¶m = function.getParam(i); |
| 3309 | if (param.name != 0) |
| 3310 | { |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3311 | TVariable variable(param.name, *param.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3312 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3313 | prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[(1) - (2)])), (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3314 | } |
| 3315 | else |
| 3316 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3317 | prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3318 | } |
| 3319 | } |
| 3320 | |
| 3321 | prototype->setOp(EOpPrototype); |
| 3322 | (yyval.interm.intermNode) = prototype; |
| 3323 | |
| 3324 | context->symbolTable.pop(); |
| 3325 | } |
| 3326 | break; |
| 3327 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3328 | case 87: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3329 | |
| 3330 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3331 | TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate; |
| 3332 | if (aggNode && aggNode->getOp() == EOpNull) |
| 3333 | aggNode->setOp(EOpDeclaration); |
| 3334 | (yyval.interm.intermNode) = aggNode; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3335 | } |
| 3336 | break; |
| 3337 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3338 | case 88: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3339 | |
| 3340 | { |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3341 | if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3342 | context->error((yylsp[(1) - (4)]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[(3) - (4)].interm.type).type)); |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3343 | context->recover(); |
| 3344 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3345 | (yyval.interm.intermNode) = 0; |
| 3346 | } |
| 3347 | break; |
| 3348 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3349 | case 89: |
| 3350 | |
| 3351 | { |
| 3352 | ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yyvsp[(1) - (5)].interm.type).line); |
| 3353 | (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.fieldList), NULL, (yyvsp[(1) - (5)].interm.type).line, NULL, (yyvsp[(1) - (5)].interm.type).line); |
| 3354 | } |
| 3355 | break; |
| 3356 | |
| 3357 | case 90: |
| 3358 | |
| 3359 | { |
| 3360 | ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yyvsp[(1) - (6)].interm.type).line); |
| 3361 | (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (6)].interm.type), (yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string, (yyvsp[(3) - (6)].interm.fieldList), (yyvsp[(5) - (6)].lex).string, (yyvsp[(5) - (6)].lex).line, NULL, (yyvsp[(1) - (6)].interm.type).line); |
| 3362 | } |
| 3363 | break; |
| 3364 | |
| 3365 | case 91: |
| 3366 | |
| 3367 | { |
| 3368 | ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yyvsp[(1) - (9)].interm.type).line); |
| 3369 | (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (9)].interm.type), (yyvsp[(2) - (9)].lex).line, *(yyvsp[(2) - (9)].lex).string, (yyvsp[(3) - (9)].interm.fieldList), (yyvsp[(5) - (9)].lex).string, (yyvsp[(5) - (9)].lex).line, (yyvsp[(7) - (9)].interm.intermTypedNode), (yyvsp[(6) - (9)].lex).line); |
| 3370 | } |
| 3371 | break; |
| 3372 | |
| 3373 | case 92: |
| 3374 | |
| 3375 | { |
| 3376 | context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type)); |
| 3377 | (yyval.interm.intermNode) = 0; |
| 3378 | } |
| 3379 | break; |
| 3380 | |
| 3381 | case 93: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3382 | |
| 3383 | { |
| 3384 | // |
| 3385 | // Multiple declarations of the same function are allowed. |
| 3386 | // |
| 3387 | // If this is a definition, the definition production code will check for redefinitions |
| 3388 | // (we don't know at this point if it's a definition or not). |
| 3389 | // |
| 3390 | // Redeclarations are allowed. But, return types and parameter qualifiers must match. |
| 3391 | // |
Nicolas Capens | 0a7f0c2 | 2015-02-18 14:47:31 -0500 | [diff] [blame] | 3392 | 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] | 3393 | if (prevDec) { |
| 3394 | if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3395 | context->error((yylsp[(2) - (2)]), "overloaded functions must have the same return type", (yyvsp[(1) - (2)].interm.function)->getReturnType().getBasicString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3396 | context->recover(); |
| 3397 | } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 3398 | for (size_t i = 0; i < prevDec->getParamCount(); ++i) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3399 | if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3400 | context->error((yylsp[(2) - (2)]), "overloaded functions must have the same parameter qualifiers", (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifierString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3401 | context->recover(); |
| 3402 | } |
| 3403 | } |
| 3404 | } |
| 3405 | |
| 3406 | // |
| 3407 | // If this is a redeclaration, it could also be a definition, |
| 3408 | // in which case, we want to use the variable names from this one, and not the one that's |
| 3409 | // being redeclared. So, pass back up this declaration, not the one in the symbol table. |
| 3410 | // |
| 3411 | (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3412 | (yyval.interm).line = (yylsp[(2) - (2)]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3413 | |
| 3414 | // We're at the inner scope level of the function's arguments and body statement. |
| 3415 | // Add the function prototype to the surrounding scope instead. |
| 3416 | context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function); |
| 3417 | } |
| 3418 | break; |
| 3419 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3420 | case 94: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3421 | |
| 3422 | { |
| 3423 | (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); |
| 3424 | } |
| 3425 | break; |
| 3426 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3427 | case 95: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3428 | |
| 3429 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3430 | (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); |
| 3431 | } |
| 3432 | break; |
| 3433 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3434 | case 96: |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3435 | |
| 3436 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3437 | // Add the parameter |
| 3438 | (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); |
| 3439 | if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid) |
| 3440 | (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); |
| 3441 | else |
| 3442 | delete (yyvsp[(2) - (2)].interm).param.type; |
| 3443 | } |
| 3444 | break; |
| 3445 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3446 | case 97: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3447 | |
| 3448 | { |
| 3449 | // |
| 3450 | // Only first parameter of one-parameter functions can be void |
| 3451 | // The check for named parameters not being void is done in parameter_declarator |
| 3452 | // |
| 3453 | if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) { |
| 3454 | // |
| 3455 | // This parameter > first is void |
| 3456 | // |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3457 | context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void"); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3458 | context->recover(); |
| 3459 | delete (yyvsp[(3) - (3)].interm).param.type; |
| 3460 | } else { |
| 3461 | // Add the parameter |
| 3462 | (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); |
| 3463 | (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); |
| 3464 | } |
| 3465 | } |
| 3466 | break; |
| 3467 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3468 | case 98: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3469 | |
| 3470 | { |
| 3471 | if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3472 | context->error((yylsp[(2) - (3)]), "no qualifiers allowed for function return", getQualifierString((yyvsp[(1) - (3)].interm.type).qualifier)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3473 | context->recover(); |
| 3474 | } |
| 3475 | // make sure a sampler is not involved as well... |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3476 | if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3477 | context->recover(); |
| 3478 | |
| 3479 | // Add the function as a prototype after parsing it (we do not support recursion) |
| 3480 | TFunction *function; |
| 3481 | TType type((yyvsp[(1) - (3)].interm.type)); |
| 3482 | function = new TFunction((yyvsp[(2) - (3)].lex).string, type); |
| 3483 | (yyval.interm.function) = function; |
| 3484 | |
| 3485 | context->symbolTable.push(); |
| 3486 | } |
| 3487 | break; |
| 3488 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3489 | case 99: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3490 | |
| 3491 | { |
| 3492 | if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3493 | context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3494 | context->recover(); |
| 3495 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3496 | if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3497 | context->recover(); |
| 3498 | TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))}; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3499 | (yyval.interm).line = (yylsp[(2) - (2)]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3500 | (yyval.interm).param = param; |
| 3501 | } |
| 3502 | break; |
| 3503 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3504 | case 100: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3505 | |
| 3506 | { |
| 3507 | // Check that we can make an array out of this type |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3508 | if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3509 | context->recover(); |
| 3510 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3511 | if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3512 | context->recover(); |
| 3513 | |
| 3514 | int size; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3515 | if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3516 | context->recover(); |
| 3517 | (yyvsp[(1) - (5)].interm.type).setArray(true, size); |
| 3518 | |
| 3519 | TType* type = new TType((yyvsp[(1) - (5)].interm.type)); |
| 3520 | TParameter param = { (yyvsp[(2) - (5)].lex).string, type }; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3521 | (yyval.interm).line = (yylsp[(2) - (5)]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3522 | (yyval.interm).param = param; |
| 3523 | } |
| 3524 | break; |
| 3525 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3526 | case 101: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3527 | |
| 3528 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3529 | (yyval.interm) = (yyvsp[(3) - (3)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3530 | if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3531 | context->recover(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3532 | } |
| 3533 | break; |
| 3534 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3535 | case 102: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3536 | |
| 3537 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3538 | (yyval.interm) = (yyvsp[(2) - (2)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3539 | if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3540 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3541 | if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3542 | context->recover(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3543 | } |
| 3544 | break; |
| 3545 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3546 | case 103: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3547 | |
| 3548 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3549 | (yyval.interm) = (yyvsp[(3) - (3)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3550 | if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3551 | context->recover(); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3552 | } |
| 3553 | break; |
| 3554 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3555 | case 104: |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3556 | |
| 3557 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3558 | (yyval.interm) = (yyvsp[(2) - (2)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3559 | if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3560 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3561 | if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3562 | context->recover(); |
| 3563 | } |
| 3564 | break; |
| 3565 | |
| 3566 | case 105: |
| 3567 | |
| 3568 | { |
| 3569 | (yyval.interm.qualifier) = EvqIn; |
| 3570 | } |
| 3571 | break; |
| 3572 | |
| 3573 | case 106: |
| 3574 | |
| 3575 | { |
| 3576 | (yyval.interm.qualifier) = EvqIn; |
| 3577 | } |
| 3578 | break; |
| 3579 | |
| 3580 | case 107: |
| 3581 | |
| 3582 | { |
| 3583 | (yyval.interm.qualifier) = EvqOut; |
| 3584 | } |
| 3585 | break; |
| 3586 | |
| 3587 | case 108: |
| 3588 | |
| 3589 | { |
| 3590 | (yyval.interm.qualifier) = EvqInOut; |
| 3591 | } |
| 3592 | break; |
| 3593 | |
| 3594 | case 109: |
| 3595 | |
| 3596 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3597 | TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; |
| 3598 | (yyval.interm).param = param; |
| 3599 | } |
| 3600 | break; |
| 3601 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3602 | case 110: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3603 | |
| 3604 | { |
| 3605 | (yyval.interm) = (yyvsp[(1) - (1)].interm); |
| 3606 | } |
| 3607 | break; |
| 3608 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3609 | case 111: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3610 | |
| 3611 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3612 | (yyval.interm) = (yyvsp[(1) - (3)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3613 | (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[(1) - (3)].interm).intermAggregate, (yylsp[(3) - (3)]), *(yyvsp[(3) - (3)].lex).string); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3614 | } |
| 3615 | break; |
| 3616 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3617 | case 112: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3618 | |
| 3619 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3620 | (yyval.interm) = (yyvsp[(1) - (6)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3621 | (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[(1) - (6)].interm).intermAggregate, (yylsp[(3) - (6)]), *(yyvsp[(3) - (6)].lex).string, (yylsp[(4) - (6)]), (yyvsp[(5) - (6)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3622 | } |
| 3623 | break; |
| 3624 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3625 | case 113: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3626 | |
| 3627 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3628 | ES3_ONLY("[]", (yylsp[(3) - (7)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3629 | (yyval.interm) = (yyvsp[(1) - (7)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3630 | (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (7)].interm).intermAggregate, (yylsp[(3) - (7)]), *(yyvsp[(3) - (7)].lex).string, (yylsp[(4) - (7)]), nullptr, (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3631 | } |
| 3632 | break; |
| 3633 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3634 | case 114: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3635 | |
| 3636 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3637 | ES3_ONLY("=", (yylsp[(7) - (8)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3638 | (yyval.interm) = (yyvsp[(1) - (8)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3639 | (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (8)].interm).intermAggregate, (yylsp[(3) - (8)]), *(yyvsp[(3) - (8)].lex).string, (yylsp[(4) - (8)]), (yyvsp[(5) - (8)].interm.intermTypedNode), (yylsp[(7) - (8)]), (yyvsp[(8) - (8)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3640 | } |
| 3641 | break; |
| 3642 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3643 | case 115: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3644 | |
| 3645 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3646 | (yyval.interm) = (yyvsp[(1) - (5)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3647 | (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[(1) - (5)].interm).intermAggregate, (yylsp[(3) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yylsp[(4) - (5)]), (yyvsp[(5) - (5)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3648 | } |
| 3649 | break; |
| 3650 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3651 | case 116: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3652 | |
| 3653 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3654 | (yyval.interm).type = (yyvsp[(1) - (1)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3655 | (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), ""); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3656 | } |
| 3657 | break; |
| 3658 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3659 | case 117: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3660 | |
| 3661 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3662 | (yyval.interm).type = (yyvsp[(1) - (2)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3663 | (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3664 | } |
| 3665 | break; |
| 3666 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3667 | case 118: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3668 | |
| 3669 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3670 | (yyval.interm).type = (yyvsp[(1) - (5)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3671 | (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3672 | } |
| 3673 | break; |
| 3674 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3675 | case 119: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3676 | |
| 3677 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3678 | ES3_ONLY("[]", (yylsp[(3) - (6)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3679 | (yyval.interm).type = (yyvsp[(1) - (6)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3680 | (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yylsp[(3) - (6)]), nullptr, (yylsp[(5) - (6)]), (yyvsp[(6) - (6)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3681 | } |
| 3682 | break; |
| 3683 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3684 | case 120: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3685 | |
| 3686 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3687 | ES3_ONLY("=", (yylsp[(6) - (7)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3688 | (yyval.interm).type = (yyvsp[(1) - (7)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3689 | (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (7)]), *(yyvsp[(2) - (7)].lex).string, (yylsp[(3) - (7)]), (yyvsp[(4) - (7)].interm.intermTypedNode), (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3690 | } |
| 3691 | break; |
| 3692 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3693 | case 121: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3694 | |
| 3695 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3696 | (yyval.interm).type = (yyvsp[(1) - (4)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3697 | (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yylsp[(3) - (4)]), (yyvsp[(4) - (4)].interm.intermTypedNode)); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3698 | } |
| 3699 | break; |
| 3700 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3701 | case 122: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3702 | |
| 3703 | { |
| 3704 | // $$.type is not used in invariant declarations. |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3705 | (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[(1) - (2)]), (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].lex).string, (yyvsp[(2) - (2)].lex).symbol); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3706 | } |
| 3707 | break; |
| 3708 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3709 | case 123: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3710 | |
| 3711 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3712 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 3713 | |
| 3714 | if ((yyvsp[(1) - (1)].interm.type).array) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3715 | ES3_ONLY("[]", (yylsp[(1) - (1)])); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3716 | if (context->getShaderVersion() != 300) { |
| 3717 | (yyvsp[(1) - (1)].interm.type).clearArrayness(); |
| 3718 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3719 | } |
| 3720 | } |
| 3721 | break; |
| 3722 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3723 | case 124: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3724 | |
| 3725 | { |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3726 | (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] | 3727 | } |
| 3728 | break; |
| 3729 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3730 | case 125: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3731 | |
| 3732 | { |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3733 | (yyval.interm.type).qualifier = EvqSmooth; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3734 | } |
| 3735 | break; |
| 3736 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3737 | case 126: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3738 | |
| 3739 | { |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3740 | (yyval.interm.type).qualifier = EvqFlat; |
| 3741 | } |
| 3742 | break; |
| 3743 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3744 | case 127: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3745 | |
| 3746 | { |
| 3747 | (yyval.interm.qualifier) = EvqConstReadOnly; |
| 3748 | } |
| 3749 | break; |
| 3750 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3751 | case 128: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3752 | |
| 3753 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3754 | VERTEX_ONLY("attribute", (yylsp[(1) - (1)])); |
| 3755 | ES2_ONLY("attribute", (yylsp[(1) - (1)])); |
| 3756 | if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3757 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3758 | (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3759 | } |
| 3760 | break; |
| 3761 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3762 | case 129: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3763 | |
| 3764 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3765 | ES2_ONLY("varying", (yylsp[(1) - (1)])); |
| 3766 | if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3767 | context->recover(); |
Nicolas Capens | 08ca3c6 | 2015-02-13 16:06:45 -0500 | [diff] [blame] | 3768 | if (context->shaderType == GL_VERTEX_SHADER) |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3769 | (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3770 | else |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3771 | (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3772 | } |
| 3773 | break; |
| 3774 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3775 | case 130: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3776 | |
| 3777 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3778 | ES2_ONLY("varying", (yylsp[(1) - (2)])); |
| 3779 | if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3780 | context->recover(); |
Nicolas Capens | 08ca3c6 | 2015-02-13 16:06:45 -0500 | [diff] [blame] | 3781 | if (context->shaderType == GL_VERTEX_SHADER) |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3782 | (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3783 | else |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3784 | (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3785 | } |
| 3786 | break; |
| 3787 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3788 | case 131: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3789 | |
| 3790 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3791 | (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3792 | } |
| 3793 | break; |
| 3794 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3795 | case 132: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3796 | |
| 3797 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3798 | (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(1) - (2)]), (yyvsp[(1) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].interm.type).qualifier); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3799 | } |
| 3800 | break; |
| 3801 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3802 | case 133: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3803 | |
| 3804 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3805 | context->error((yylsp[(1) - (1)]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getQualifierString((yyvsp[(1) - (1)].interm.type).qualifier)); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3806 | context->recover(); |
| 3807 | |
| 3808 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3809 | (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3810 | } |
| 3811 | break; |
| 3812 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3813 | case 134: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3814 | |
| 3815 | { |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3816 | (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 3817 | (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier); |
| 3818 | } |
| 3819 | break; |
| 3820 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3821 | case 135: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3822 | |
| 3823 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3824 | (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3825 | (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier); |
| 3826 | } |
| 3827 | break; |
| 3828 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3829 | case 136: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3830 | |
| 3831 | { |
Nicolas Capens | 31ad2aa | 2015-02-26 13:14:27 -0500 | [diff] [blame] | 3832 | (yyval.interm.type).qualifier = EvqConstExpr; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3833 | (yyval.interm.type).line = (yylsp[(1) - (1)]); |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3834 | } |
| 3835 | break; |
| 3836 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3837 | case 137: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3838 | |
| 3839 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3840 | ES3_ONLY("in", (yylsp[(1) - (1)])); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3841 | (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3842 | (yyval.interm.type).line = (yylsp[(1) - (1)]); |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3843 | } |
| 3844 | break; |
| 3845 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3846 | case 138: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3847 | |
| 3848 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3849 | ES3_ONLY("out", (yylsp[(1) - (1)])); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3850 | (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3851 | (yyval.interm.type).line = (yylsp[(1) - (1)]); |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3852 | } |
| 3853 | break; |
| 3854 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3855 | case 139: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3856 | |
| 3857 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3858 | ES3_ONLY("centroid in", (yylsp[(1) - (2)])); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3859 | if (context->shaderType == GL_VERTEX_SHADER) |
| 3860 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3861 | context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader"); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3862 | context->recover(); |
| 3863 | } |
| 3864 | (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3865 | (yyval.interm.type).line = (yylsp[(2) - (2)]); |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3866 | } |
| 3867 | break; |
| 3868 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3869 | case 140: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3870 | |
| 3871 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3872 | ES3_ONLY("centroid out", (yylsp[(1) - (2)])); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3873 | if (context->shaderType == GL_FRAGMENT_SHADER) |
| 3874 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3875 | context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader"); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3876 | context->recover(); |
| 3877 | } |
| 3878 | (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3879 | (yyval.interm.type).line = (yylsp[(2) - (2)]); |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3880 | } |
| 3881 | break; |
| 3882 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3883 | case 141: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3884 | |
| 3885 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3886 | if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform")) |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3887 | context->recover(); |
| 3888 | (yyval.interm.type).qualifier = EvqUniform; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3889 | (yyval.interm.type).line = (yylsp[(1) - (1)]); |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3890 | } |
| 3891 | break; |
| 3892 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3893 | case 142: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3894 | |
| 3895 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3896 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 3897 | |
| 3898 | if ((yyval.interm.type).precision == EbpUndefined) { |
| 3899 | (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3900 | if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3901 | context->recover(); |
| 3902 | } |
| 3903 | } |
| 3904 | } |
| 3905 | break; |
| 3906 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3907 | case 143: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3908 | |
| 3909 | { |
| 3910 | (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); |
| 3911 | (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision); |
| 3912 | } |
| 3913 | break; |
| 3914 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3915 | case 144: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3916 | |
| 3917 | { |
| 3918 | (yyval.interm.precision) = EbpHigh; |
| 3919 | } |
| 3920 | break; |
| 3921 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3922 | case 145: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3923 | |
| 3924 | { |
| 3925 | (yyval.interm.precision) = EbpMedium; |
| 3926 | } |
| 3927 | break; |
| 3928 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3929 | case 146: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3930 | |
| 3931 | { |
| 3932 | (yyval.interm.precision) = EbpLow; |
| 3933 | } |
| 3934 | break; |
| 3935 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3936 | case 147: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3937 | |
| 3938 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3939 | ES3_ONLY("layout", (yylsp[(1) - (4)])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3940 | (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier); |
| 3941 | } |
| 3942 | break; |
| 3943 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3944 | case 148: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3945 | |
| 3946 | { |
| 3947 | (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier); |
| 3948 | } |
| 3949 | break; |
| 3950 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3951 | case 149: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3952 | |
| 3953 | { |
| 3954 | (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier)); |
| 3955 | } |
| 3956 | break; |
| 3957 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3958 | case 150: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3959 | |
| 3960 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3961 | (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3962 | } |
| 3963 | break; |
| 3964 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3965 | case 151: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3966 | |
| 3967 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3968 | (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3969 | } |
| 3970 | break; |
| 3971 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3972 | case 152: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3973 | |
| 3974 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3975 | (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3976 | } |
| 3977 | break; |
| 3978 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3979 | case 153: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3980 | |
| 3981 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3982 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 3983 | } |
| 3984 | break; |
| 3985 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3986 | case 154: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3987 | |
| 3988 | { |
| 3989 | (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type); |
| 3990 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3991 | if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3992 | context->recover(); |
| 3993 | else { |
| 3994 | int size; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3995 | if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3996 | context->recover(); |
| 3997 | (yyval.interm.type).setArray(true, size); |
| 3998 | } |
| 3999 | } |
| 4000 | break; |
| 4001 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4002 | case 155: |
| 4003 | |
| 4004 | { |
| 4005 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4006 | (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4007 | } |
| 4008 | break; |
| 4009 | |
| 4010 | case 156: |
| 4011 | |
| 4012 | { |
| 4013 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4014 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4015 | } |
| 4016 | break; |
| 4017 | |
| 4018 | case 157: |
| 4019 | |
| 4020 | { |
| 4021 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4022 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4023 | } |
| 4024 | break; |
| 4025 | |
| 4026 | case 158: |
| 4027 | |
| 4028 | { |
| 4029 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4030 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4031 | } |
| 4032 | break; |
| 4033 | |
| 4034 | case 159: |
| 4035 | |
| 4036 | { |
| 4037 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4038 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4039 | } |
| 4040 | break; |
| 4041 | |
| 4042 | case 160: |
| 4043 | |
| 4044 | { |
| 4045 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4046 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4047 | (yyval.interm.type).setAggregate(2); |
| 4048 | } |
| 4049 | break; |
| 4050 | |
| 4051 | case 161: |
| 4052 | |
| 4053 | { |
| 4054 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4055 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4056 | (yyval.interm.type).setAggregate(3); |
| 4057 | } |
| 4058 | break; |
| 4059 | |
| 4060 | case 162: |
| 4061 | |
| 4062 | { |
| 4063 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4064 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4065 | (yyval.interm.type).setAggregate(4); |
| 4066 | } |
| 4067 | break; |
| 4068 | |
| 4069 | case 163: |
| 4070 | |
| 4071 | { |
| 4072 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4073 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4074 | (yyval.interm.type).setAggregate(2); |
| 4075 | } |
| 4076 | break; |
| 4077 | |
| 4078 | case 164: |
| 4079 | |
| 4080 | { |
| 4081 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4082 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4083 | (yyval.interm.type).setAggregate(3); |
| 4084 | } |
| 4085 | break; |
| 4086 | |
| 4087 | case 165: |
| 4088 | |
| 4089 | { |
| 4090 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4091 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4092 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4093 | } |
| 4094 | break; |
| 4095 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4096 | case 166: |
| 4097 | |
| 4098 | { |
| 4099 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4100 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4101 | (yyval.interm.type).setAggregate(2); |
| 4102 | } |
| 4103 | break; |
| 4104 | |
| 4105 | case 167: |
| 4106 | |
| 4107 | { |
| 4108 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4109 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4110 | (yyval.interm.type).setAggregate(3); |
| 4111 | } |
| 4112 | break; |
| 4113 | |
| 4114 | case 168: |
| 4115 | |
| 4116 | { |
| 4117 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4118 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4119 | (yyval.interm.type).setAggregate(4); |
| 4120 | } |
| 4121 | break; |
| 4122 | |
| 4123 | case 169: |
| 4124 | |
| 4125 | { |
| 4126 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4127 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4128 | (yyval.interm.type).setAggregate(2); |
| 4129 | } |
| 4130 | break; |
| 4131 | |
| 4132 | case 170: |
| 4133 | |
| 4134 | { |
| 4135 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4136 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4137 | (yyval.interm.type).setAggregate(3); |
| 4138 | } |
| 4139 | break; |
| 4140 | |
| 4141 | case 171: |
| 4142 | |
| 4143 | { |
| 4144 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4145 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4146 | (yyval.interm.type).setAggregate(4); |
| 4147 | } |
| 4148 | break; |
| 4149 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4150 | case 172: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4151 | |
| 4152 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4153 | FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4154 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4155 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4156 | (yyval.interm.type).setMatrix(2, 2); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4157 | } |
| 4158 | break; |
| 4159 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4160 | case 173: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4161 | |
| 4162 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4163 | FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4164 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4165 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4166 | (yyval.interm.type).setMatrix(3, 3); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4167 | } |
| 4168 | break; |
| 4169 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4170 | case 174: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4171 | |
| 4172 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4173 | FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4174 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4175 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4176 | (yyval.interm.type).setMatrix(4, 4); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4177 | } |
| 4178 | break; |
| 4179 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4180 | case 175: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4181 | |
| 4182 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4183 | FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4184 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4185 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4186 | (yyval.interm.type).setMatrix(2, 3); |
| 4187 | } |
| 4188 | break; |
| 4189 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4190 | case 176: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4191 | |
| 4192 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4193 | FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4194 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4195 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4196 | (yyval.interm.type).setMatrix(3, 2); |
| 4197 | } |
| 4198 | break; |
| 4199 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4200 | case 177: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4201 | |
| 4202 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4203 | FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4204 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4205 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4206 | (yyval.interm.type).setMatrix(2, 4); |
| 4207 | } |
| 4208 | break; |
| 4209 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4210 | case 178: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4211 | |
| 4212 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4213 | FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4214 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4215 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4216 | (yyval.interm.type).setMatrix(4, 2); |
| 4217 | } |
| 4218 | break; |
| 4219 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4220 | case 179: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4221 | |
| 4222 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4223 | FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4224 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4225 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4226 | (yyval.interm.type).setMatrix(3, 4); |
| 4227 | } |
| 4228 | break; |
| 4229 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4230 | case 180: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4231 | |
| 4232 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4233 | FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4234 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4235 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4236 | (yyval.interm.type).setMatrix(4, 3); |
| 4237 | } |
| 4238 | break; |
| 4239 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4240 | case 181: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4241 | |
| 4242 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4243 | FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4244 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4245 | (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4246 | } |
| 4247 | break; |
| 4248 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4249 | case 182: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4250 | |
| 4251 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4252 | FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4253 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4254 | (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4255 | } |
| 4256 | break; |
| 4257 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4258 | case 183: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4259 | |
| 4260 | { |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4261 | if (!context->supportsExtension("GL_OES_EGL_image_external")) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4262 | context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", ""); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4263 | context->recover(); |
| 4264 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4265 | FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)])); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4266 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4267 | (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)])); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4268 | } |
| 4269 | break; |
| 4270 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4271 | case 184: |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4272 | |
| 4273 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4274 | FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)])); |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4275 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4276 | (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4277 | } |
| 4278 | break; |
| 4279 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4280 | case 185: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4281 | |
| 4282 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4283 | FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4284 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4285 | (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4286 | } |
| 4287 | break; |
| 4288 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4289 | case 186: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4290 | |
| 4291 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4292 | FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4293 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4294 | (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4295 | } |
| 4296 | break; |
| 4297 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4298 | case 187: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4299 | |
| 4300 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4301 | FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4302 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4303 | (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4304 | } |
| 4305 | break; |
| 4306 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4307 | case 188: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4308 | |
| 4309 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4310 | FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4311 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4312 | (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4313 | } |
| 4314 | break; |
| 4315 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4316 | case 189: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4317 | |
| 4318 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4319 | FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4320 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4321 | (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4322 | } |
| 4323 | break; |
| 4324 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4325 | case 190: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4326 | |
| 4327 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4328 | FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4329 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4330 | (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4331 | } |
| 4332 | break; |
| 4333 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4334 | case 191: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4335 | |
| 4336 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4337 | FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4338 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4339 | (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4340 | } |
| 4341 | break; |
| 4342 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4343 | case 192: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4344 | |
| 4345 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4346 | FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4347 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4348 | (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4349 | } |
| 4350 | break; |
| 4351 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4352 | case 193: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4353 | |
| 4354 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4355 | FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4356 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4357 | (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4358 | } |
| 4359 | break; |
| 4360 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4361 | case 194: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4362 | |
| 4363 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4364 | FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4365 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4366 | (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4367 | } |
| 4368 | break; |
| 4369 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4370 | case 195: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4371 | |
| 4372 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4373 | FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4374 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4375 | (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4376 | } |
| 4377 | break; |
| 4378 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4379 | case 196: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4380 | |
| 4381 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4382 | FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4383 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4384 | (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4385 | } |
| 4386 | break; |
| 4387 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4388 | case 197: |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4389 | |
| 4390 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4391 | FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4392 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 4393 | (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 4394 | } |
| 4395 | break; |
| 4396 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4397 | case 198: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4398 | |
| 4399 | { |
| 4400 | // |
| 4401 | // This is for user defined type names. The lexical phase looked up the |
| 4402 | // type. |
| 4403 | // |
| 4404 | TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType(); |
| 4405 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4406 | (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4407 | (yyval.interm.type).userDef = &structure; |
| 4408 | } |
| 4409 | break; |
| 4410 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4411 | case 199: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4412 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4413 | { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4414 | break; |
| 4415 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4416 | case 200: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4417 | |
| 4418 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4419 | (yyval.interm.type) = context->addStructure((yylsp[(1) - (6)]), (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].lex).string, (yyvsp[(5) - (6)].interm.fieldList)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4420 | } |
| 4421 | break; |
| 4422 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4423 | case 201: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4424 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4425 | { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4426 | break; |
| 4427 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4428 | case 202: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4429 | |
| 4430 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4431 | (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4432 | } |
| 4433 | break; |
| 4434 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4435 | case 203: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4436 | |
| 4437 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4438 | (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4439 | } |
| 4440 | break; |
| 4441 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4442 | case 204: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4443 | |
| 4444 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4445 | (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList); |
| 4446 | for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) { |
| 4447 | TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i]; |
| 4448 | for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) { |
| 4449 | if ((*(yyval.interm.fieldList))[j]->name() == field->name()) { |
| 4450 | 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] | 4451 | context->recover(); |
| 4452 | } |
| 4453 | } |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4454 | (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4455 | } |
| 4456 | } |
| 4457 | break; |
| 4458 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4459 | case 205: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4460 | |
| 4461 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4462 | (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] | 4463 | } |
| 4464 | break; |
| 4465 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4466 | case 206: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4467 | |
| 4468 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4469 | // ES3 Only, but errors should be handled elsewhere |
| 4470 | (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier; |
| 4471 | (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier; |
| 4472 | (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList)); |
| 4473 | } |
| 4474 | break; |
| 4475 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4476 | case 207: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4477 | |
| 4478 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4479 | (yyval.interm.fieldList) = NewPoolTFieldList(); |
| 4480 | (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4481 | } |
| 4482 | break; |
| 4483 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4484 | case 208: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4485 | |
| 4486 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4487 | (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4488 | } |
| 4489 | break; |
| 4490 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4491 | case 209: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4492 | |
| 4493 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4494 | if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4495 | context->recover(); |
| 4496 | |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4497 | TType* type = new TType(EbtVoid, EbpUndefined); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4498 | (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4499 | } |
| 4500 | break; |
| 4501 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4502 | case 210: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4503 | |
| 4504 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4505 | if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4506 | context->recover(); |
| 4507 | |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4508 | TType* type = new TType(EbtVoid, EbpUndefined); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4509 | int size; |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4510 | 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] | 4511 | context->recover(); |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4512 | type->setArraySize(size); |
| 4513 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4514 | (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4515 | } |
| 4516 | break; |
| 4517 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4518 | case 211: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4519 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4520 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4521 | break; |
| 4522 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4523 | case 212: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4524 | |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4525 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4526 | break; |
| 4527 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4528 | case 213: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4529 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4530 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); } |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4531 | break; |
| 4532 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4533 | case 214: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4534 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4535 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4536 | break; |
| 4537 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4538 | case 215: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4539 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4540 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4541 | break; |
| 4542 | |
| 4543 | case 216: |
| 4544 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4545 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4546 | break; |
| 4547 | |
| 4548 | case 217: |
| 4549 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4550 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4551 | break; |
| 4552 | |
| 4553 | case 218: |
| 4554 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4555 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4556 | break; |
| 4557 | |
| 4558 | case 219: |
| 4559 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4560 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4561 | break; |
| 4562 | |
| 4563 | case 220: |
| 4564 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4565 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4566 | break; |
| 4567 | |
| 4568 | case 221: |
| 4569 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4570 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4571 | break; |
| 4572 | |
| 4573 | case 222: |
| 4574 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4575 | { (yyval.interm.intermAggregate) = 0; } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4576 | break; |
| 4577 | |
| 4578 | case 223: |
| 4579 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4580 | { context->symbolTable.push(); } |
| 4581 | break; |
| 4582 | |
| 4583 | case 224: |
| 4584 | |
| 4585 | { context->symbolTable.pop(); } |
| 4586 | break; |
| 4587 | |
| 4588 | case 225: |
| 4589 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4590 | { |
| 4591 | if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) { |
| 4592 | (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4593 | (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4594 | } |
| 4595 | (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate); |
| 4596 | } |
| 4597 | break; |
| 4598 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4599 | case 226: |
| 4600 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4601 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4602 | break; |
| 4603 | |
| 4604 | case 227: |
| 4605 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4606 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4607 | break; |
| 4608 | |
| 4609 | case 228: |
| 4610 | |
| 4611 | { context->symbolTable.push(); } |
| 4612 | break; |
| 4613 | |
| 4614 | case 229: |
| 4615 | |
| 4616 | { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } |
| 4617 | break; |
| 4618 | |
| 4619 | case 230: |
| 4620 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4621 | { context->symbolTable.push(); } |
| 4622 | break; |
| 4623 | |
| 4624 | case 231: |
| 4625 | |
| 4626 | { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } |
| 4627 | break; |
| 4628 | |
| 4629 | case 232: |
| 4630 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4631 | { |
| 4632 | (yyval.interm.intermNode) = 0; |
| 4633 | } |
| 4634 | break; |
| 4635 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4636 | case 233: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4637 | |
| 4638 | { |
| 4639 | if ((yyvsp[(2) - (3)].interm.intermAggregate)) { |
| 4640 | (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4641 | (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4642 | } |
| 4643 | (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate); |
| 4644 | } |
| 4645 | break; |
| 4646 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4647 | case 234: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4648 | |
| 4649 | { |
| 4650 | (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0); |
| 4651 | } |
| 4652 | break; |
| 4653 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4654 | case 235: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4655 | |
| 4656 | { |
| 4657 | (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0); |
| 4658 | } |
| 4659 | break; |
| 4660 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4661 | case 236: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4662 | |
| 4663 | { (yyval.interm.intermNode) = 0; } |
| 4664 | break; |
| 4665 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4666 | case 237: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4667 | |
| 4668 | { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); } |
| 4669 | break; |
| 4670 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4671 | case 238: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4672 | |
| 4673 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4674 | if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4675 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4676 | (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yylsp[(1) - (5)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4677 | } |
| 4678 | break; |
| 4679 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4680 | case 239: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4681 | |
| 4682 | { |
| 4683 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); |
| 4684 | (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); |
| 4685 | } |
| 4686 | break; |
| 4687 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4688 | case 240: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4689 | |
| 4690 | { |
| 4691 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); |
| 4692 | (yyval.interm.nodePair).node2 = 0; |
| 4693 | } |
| 4694 | break; |
| 4695 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4696 | case 241: |
| 4697 | |
| 4698 | { context->incrSwitchNestingLevel(); } |
| 4699 | break; |
| 4700 | |
| 4701 | case 242: |
| 4702 | |
| 4703 | { |
| 4704 | (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yyvsp[(1) - (6)].lex).line); |
| 4705 | context->decrSwitchNestingLevel(); |
| 4706 | } |
| 4707 | break; |
| 4708 | |
| 4709 | case 243: |
| 4710 | |
| 4711 | { |
| 4712 | (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line); |
| 4713 | } |
| 4714 | break; |
| 4715 | |
| 4716 | case 244: |
| 4717 | |
| 4718 | { |
| 4719 | (yyval.interm.intermCase) = context->addDefault((yyvsp[(1) - (2)].lex).line); |
| 4720 | } |
| 4721 | break; |
| 4722 | |
| 4723 | case 245: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4724 | |
| 4725 | { |
| 4726 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 4727 | if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode))) |
| 4728 | context->recover(); |
| 4729 | } |
| 4730 | break; |
| 4731 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4732 | case 246: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4733 | |
| 4734 | { |
| 4735 | TIntermNode* intermNode; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4736 | if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4737 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4738 | if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4739 | context->recover(); |
| 4740 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4741 | if (!context->executeInitializer((yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), intermNode)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4742 | (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode); |
| 4743 | else { |
| 4744 | context->recover(); |
| 4745 | (yyval.interm.intermTypedNode) = 0; |
| 4746 | } |
| 4747 | } |
| 4748 | break; |
| 4749 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4750 | case 247: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4751 | |
| 4752 | { context->symbolTable.push(); ++context->loopNestingLevel; } |
| 4753 | break; |
| 4754 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4755 | case 248: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4756 | |
| 4757 | { |
| 4758 | context->symbolTable.pop(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4759 | (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yylsp[(1) - (6)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4760 | --context->loopNestingLevel; |
| 4761 | } |
| 4762 | break; |
| 4763 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4764 | case 249: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4765 | |
| 4766 | { ++context->loopNestingLevel; } |
| 4767 | break; |
| 4768 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4769 | case 250: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4770 | |
| 4771 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4772 | if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4773 | context->recover(); |
| 4774 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4775 | (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yylsp[(4) - (8)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4776 | --context->loopNestingLevel; |
| 4777 | } |
| 4778 | break; |
| 4779 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4780 | case 251: |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4781 | |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4782 | { context->symbolTable.push(); ++context->loopNestingLevel; } |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4783 | break; |
| 4784 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4785 | case 252: |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4786 | |
| 4787 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4788 | context->symbolTable.pop(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4789 | (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[(4) - (7)].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node2), (yyvsp[(7) - (7)].interm.intermNode), (yylsp[(1) - (7)])); |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4790 | --context->loopNestingLevel; |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 4791 | } |
| 4792 | break; |
| 4793 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4794 | case 253: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4795 | |
| 4796 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4797 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4798 | } |
| 4799 | break; |
| 4800 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4801 | case 254: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4802 | |
| 4803 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4804 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4805 | } |
| 4806 | break; |
| 4807 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4808 | case 255: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4809 | |
| 4810 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4811 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 4812 | } |
| 4813 | break; |
| 4814 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4815 | case 256: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4816 | |
| 4817 | { |
| 4818 | (yyval.interm.intermTypedNode) = 0; |
| 4819 | } |
| 4820 | break; |
| 4821 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4822 | case 257: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4823 | |
| 4824 | { |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4825 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); |
| 4826 | (yyval.interm.nodePair).node2 = 0; |
| 4827 | } |
| 4828 | break; |
| 4829 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4830 | case 258: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4831 | |
| 4832 | { |
| 4833 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); |
| 4834 | (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); |
| 4835 | } |
| 4836 | break; |
| 4837 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4838 | case 259: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4839 | |
| 4840 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4841 | (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4842 | } |
| 4843 | break; |
| 4844 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4845 | case 260: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4846 | |
| 4847 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4848 | (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4849 | } |
| 4850 | break; |
| 4851 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4852 | case 261: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4853 | |
| 4854 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4855 | (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4856 | } |
| 4857 | break; |
| 4858 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4859 | case 262: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4860 | |
| 4861 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4862 | (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4863 | } |
| 4864 | break; |
| 4865 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4866 | case 263: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4867 | |
| 4868 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4869 | FRAG_ONLY("discard", (yylsp[(1) - (2)])); |
| 4870 | (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4871 | } |
| 4872 | break; |
| 4873 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4874 | case 264: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4875 | |
| 4876 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4877 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4878 | context->treeRoot = (yyval.interm.intermNode); |
| 4879 | } |
| 4880 | break; |
| 4881 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4882 | case 265: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4883 | |
| 4884 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4885 | (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0); |
| 4886 | context->treeRoot = (yyval.interm.intermNode); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4887 | } |
| 4888 | break; |
| 4889 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4890 | case 266: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4891 | |
| 4892 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4893 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| 4894 | } |
| 4895 | break; |
| 4896 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4897 | case 267: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4898 | |
| 4899 | { |
| 4900 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| 4901 | } |
| 4902 | break; |
| 4903 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4904 | case 268: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4905 | |
| 4906 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4907 | TFunction* function = (yyvsp[(1) - (1)].interm).function; |
| 4908 | |
Nicolas Capens | 0a7f0c2 | 2015-02-18 14:47:31 -0500 | [diff] [blame] | 4909 | const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->shaderVersion); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4910 | |
| 4911 | if (builtIn) |
| 4912 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4913 | context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4914 | context->recover(); |
| 4915 | } |
| 4916 | |
Nicolas Capens | 0a7f0c2 | 2015-02-18 14:47:31 -0500 | [diff] [blame] | 4917 | TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->shaderVersion)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4918 | // |
| 4919 | // Note: 'prevDec' could be 'function' if this is the first time we've seen function |
| 4920 | // as it would have just been put in the symbol table. Otherwise, we're looking up |
| 4921 | // an earlier occurance. |
| 4922 | // |
| 4923 | if (prevDec->isDefined()) { |
| 4924 | // |
| 4925 | // Then this function already has a body. |
| 4926 | // |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4927 | context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4928 | context->recover(); |
| 4929 | } |
| 4930 | prevDec->setDefined(); |
| 4931 | |
| 4932 | // |
| 4933 | // Raise error message if main function takes any parameters or return anything other than void |
| 4934 | // |
| 4935 | if (function->getName() == "main") { |
| 4936 | if (function->getParamCount() > 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4937 | context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4938 | context->recover(); |
| 4939 | } |
| 4940 | if (function->getReturnType().getBasicType() != EbtVoid) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4941 | context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value"); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4942 | context->recover(); |
| 4943 | } |
| 4944 | } |
| 4945 | |
| 4946 | // |
| 4947 | // Remember the return type for later checking for RETURN statements. |
| 4948 | // |
| 4949 | context->currentFunctionType = &(prevDec->getReturnType()); |
| 4950 | context->functionReturnsValue = false; |
| 4951 | |
| 4952 | // |
| 4953 | // Insert parameters into the symbol table. |
| 4954 | // If the parameter has no name, it's not an error, just don't insert it |
| 4955 | // (could be used for unused args). |
| 4956 | // |
| 4957 | // Also, accumulate the list of parameters into the HIL, so lower level code |
| 4958 | // knows where to find parameters. |
| 4959 | // |
| 4960 | TIntermAggregate* paramNodes = new TIntermAggregate; |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4961 | for (size_t i = 0; i < function->getParamCount(); i++) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4962 | const TParameter& param = function->getParam(i); |
| 4963 | if (param.name != 0) { |
| 4964 | TVariable *variable = new TVariable(param.name, *param.type); |
| 4965 | // |
| 4966 | // Insert the parameters with name in the symbol table. |
| 4967 | // |
Nicolas Capens | d603ecd | 2015-02-18 14:52:21 -0500 | [diff] [blame] | 4968 | if (! context->symbolTable.declare(*variable)) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4969 | context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4970 | context->recover(); |
| 4971 | delete variable; |
| 4972 | } |
| 4973 | |
| 4974 | // |
| 4975 | // Add the parameter to the HIL |
| 4976 | // |
| 4977 | paramNodes = context->intermediate.growAggregate( |
| 4978 | paramNodes, |
| 4979 | context->intermediate.addSymbol(variable->getUniqueId(), |
| 4980 | variable->getName(), |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4981 | variable->getType(), (yylsp[(1) - (1)])), |
| 4982 | (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4983 | } else { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4984 | paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4985 | } |
| 4986 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4987 | context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4988 | (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes; |
| 4989 | context->loopNestingLevel = 0; |
| 4990 | } |
| 4991 | break; |
| 4992 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4993 | case 269: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4994 | |
| 4995 | { |
| 4996 | //?? Check that all paths return a value if return type != void ? |
| 4997 | // May be best done as post process phase on intermediate code |
| 4998 | if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->functionReturnsValue) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4999 | context->error((yylsp[(1) - (3)]), "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5000 | context->recover(); |
| 5001 | } |
| 5002 | |
| 5003 | (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), 0); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5004 | context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5005 | (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str()); |
| 5006 | (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType()); |
| 5007 | |
| 5008 | // store the pragma information for debug and optimize and other vendor specific |
| 5009 | // information. This information can be queried from the parse tree |
| 5010 | (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize); |
| 5011 | (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug); |
| 5012 | |
| 5013 | if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()) |
| 5014 | (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine()); |
| 5015 | |
| 5016 | context->symbolTable.pop(); |
| 5017 | } |
| 5018 | break; |
| 5019 | |
| 5020 | |
| 5021 | |
| 5022 | default: break; |
| 5023 | } |
| 5024 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 5025 | |
| 5026 | YYPOPSTACK (yylen); |
| 5027 | yylen = 0; |
| 5028 | YY_STACK_PRINT (yyss, yyssp); |
| 5029 | |
| 5030 | *++yyvsp = yyval; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5031 | *++yylsp = yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5032 | |
| 5033 | /* Now `shift' the result of the reduction. Determine what state |
| 5034 | that goes to, based on the state we popped back to and the rule |
| 5035 | number reduced by. */ |
| 5036 | |
| 5037 | yyn = yyr1[yyn]; |
| 5038 | |
| 5039 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 5040 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 5041 | yystate = yytable[yystate]; |
| 5042 | else |
| 5043 | yystate = yydefgoto[yyn - YYNTOKENS]; |
| 5044 | |
| 5045 | goto yynewstate; |
| 5046 | |
| 5047 | |
| 5048 | /*------------------------------------. |
| 5049 | | yyerrlab -- here on detecting error | |
| 5050 | `------------------------------------*/ |
| 5051 | yyerrlab: |
| 5052 | /* If not already recovering from an error, report this error. */ |
| 5053 | if (!yyerrstatus) |
| 5054 | { |
| 5055 | ++yynerrs; |
| 5056 | #if ! YYERROR_VERBOSE |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5057 | yyerror (&yylloc, context, YY_("syntax error")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5058 | #else |
| 5059 | { |
| 5060 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| 5061 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| 5062 | { |
| 5063 | YYSIZE_T yyalloc = 2 * yysize; |
| 5064 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 5065 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| 5066 | if (yymsg != yymsgbuf) |
| 5067 | YYSTACK_FREE (yymsg); |
| 5068 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| 5069 | if (yymsg) |
| 5070 | yymsg_alloc = yyalloc; |
| 5071 | else |
| 5072 | { |
| 5073 | yymsg = yymsgbuf; |
| 5074 | yymsg_alloc = sizeof yymsgbuf; |
| 5075 | } |
| 5076 | } |
| 5077 | |
| 5078 | if (0 < yysize && yysize <= yymsg_alloc) |
| 5079 | { |
| 5080 | (void) yysyntax_error (yymsg, yystate, yychar); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5081 | yyerror (&yylloc, context, yymsg); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5082 | } |
| 5083 | else |
| 5084 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5085 | yyerror (&yylloc, context, YY_("syntax error")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5086 | if (yysize != 0) |
| 5087 | goto yyexhaustedlab; |
| 5088 | } |
| 5089 | } |
| 5090 | #endif |
| 5091 | } |
| 5092 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5093 | yyerror_range[0] = yylloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5094 | |
| 5095 | if (yyerrstatus == 3) |
| 5096 | { |
| 5097 | /* If just tried and failed to reuse lookahead token after an |
| 5098 | error, discard it. */ |
| 5099 | |
| 5100 | if (yychar <= YYEOF) |
| 5101 | { |
| 5102 | /* Return failure if at end of input. */ |
| 5103 | if (yychar == YYEOF) |
| 5104 | YYABORT; |
| 5105 | } |
| 5106 | else |
| 5107 | { |
| 5108 | yydestruct ("Error: discarding", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5109 | yytoken, &yylval, &yylloc, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5110 | yychar = YYEMPTY; |
| 5111 | } |
| 5112 | } |
| 5113 | |
| 5114 | /* Else will try to reuse lookahead token after shifting the error |
| 5115 | token. */ |
| 5116 | goto yyerrlab1; |
| 5117 | |
| 5118 | |
| 5119 | /*---------------------------------------------------. |
| 5120 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 5121 | `---------------------------------------------------*/ |
| 5122 | yyerrorlab: |
| 5123 | |
| 5124 | /* Pacify compilers like GCC when the user code never invokes |
| 5125 | YYERROR and the label yyerrorlab therefore never appears in user |
| 5126 | code. */ |
| 5127 | if (/*CONSTCOND*/ 0) |
| 5128 | goto yyerrorlab; |
| 5129 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5130 | yyerror_range[0] = yylsp[1-yylen]; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5131 | /* Do not reclaim the symbols of the rule which action triggered |
| 5132 | this YYERROR. */ |
| 5133 | YYPOPSTACK (yylen); |
| 5134 | yylen = 0; |
| 5135 | YY_STACK_PRINT (yyss, yyssp); |
| 5136 | yystate = *yyssp; |
| 5137 | goto yyerrlab1; |
| 5138 | |
| 5139 | |
| 5140 | /*-------------------------------------------------------------. |
| 5141 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 5142 | `-------------------------------------------------------------*/ |
| 5143 | yyerrlab1: |
| 5144 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 5145 | |
| 5146 | for (;;) |
| 5147 | { |
| 5148 | yyn = yypact[yystate]; |
| 5149 | if (yyn != YYPACT_NINF) |
| 5150 | { |
| 5151 | yyn += YYTERROR; |
| 5152 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 5153 | { |
| 5154 | yyn = yytable[yyn]; |
| 5155 | if (0 < yyn) |
| 5156 | break; |
| 5157 | } |
| 5158 | } |
| 5159 | |
| 5160 | /* Pop the current state because it cannot handle the error token. */ |
| 5161 | if (yyssp == yyss) |
| 5162 | YYABORT; |
| 5163 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5164 | yyerror_range[0] = *yylsp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5165 | yydestruct ("Error: popping", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5166 | yystos[yystate], yyvsp, yylsp, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5167 | YYPOPSTACK (1); |
| 5168 | yystate = *yyssp; |
| 5169 | YY_STACK_PRINT (yyss, yyssp); |
| 5170 | } |
| 5171 | |
| 5172 | *++yyvsp = yylval; |
| 5173 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5174 | yyerror_range[1] = yylloc; |
| 5175 | /* Using YYLLOC is tempting, but would change the location of |
| 5176 | the lookahead. YYLOC is available though. */ |
| 5177 | YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); |
| 5178 | *++yylsp = yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5179 | |
| 5180 | /* Shift the error token. */ |
| 5181 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 5182 | |
| 5183 | yystate = yyn; |
| 5184 | goto yynewstate; |
| 5185 | |
| 5186 | |
| 5187 | /*-------------------------------------. |
| 5188 | | yyacceptlab -- YYACCEPT comes here. | |
| 5189 | `-------------------------------------*/ |
| 5190 | yyacceptlab: |
| 5191 | yyresult = 0; |
| 5192 | goto yyreturn; |
| 5193 | |
| 5194 | /*-----------------------------------. |
| 5195 | | yyabortlab -- YYABORT comes here. | |
| 5196 | `-----------------------------------*/ |
| 5197 | yyabortlab: |
| 5198 | yyresult = 1; |
| 5199 | goto yyreturn; |
| 5200 | |
| 5201 | #if !defined(yyoverflow) || YYERROR_VERBOSE |
| 5202 | /*-------------------------------------------------. |
| 5203 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 5204 | `-------------------------------------------------*/ |
| 5205 | yyexhaustedlab: |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5206 | yyerror (&yylloc, context, YY_("memory exhausted")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5207 | yyresult = 2; |
| 5208 | /* Fall through. */ |
| 5209 | #endif |
| 5210 | |
| 5211 | yyreturn: |
| 5212 | if (yychar != YYEMPTY) |
| 5213 | yydestruct ("Cleanup: discarding lookahead", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5214 | yytoken, &yylval, &yylloc, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5215 | /* Do not reclaim the symbols of the rule which action triggered |
| 5216 | this YYABORT or YYACCEPT. */ |
| 5217 | YYPOPSTACK (yylen); |
| 5218 | YY_STACK_PRINT (yyss, yyssp); |
| 5219 | while (yyssp != yyss) |
| 5220 | { |
| 5221 | yydestruct ("Cleanup: popping", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5222 | yystos[*yyssp], yyvsp, yylsp, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5223 | YYPOPSTACK (1); |
| 5224 | } |
| 5225 | #ifndef yyoverflow |
| 5226 | if (yyss != yyssa) |
| 5227 | YYSTACK_FREE (yyss); |
| 5228 | #endif |
| 5229 | #if YYERROR_VERBOSE |
| 5230 | if (yymsg != yymsgbuf) |
| 5231 | YYSTACK_FREE (yymsg); |
| 5232 | #endif |
| 5233 | /* Make sure YYID is used. */ |
| 5234 | return YYID (yyresult); |
| 5235 | } |
| 5236 | |
| 5237 | |
| 5238 | |
| 5239 | |
| 5240 | |
| 5241 | int glslang_parse(TParseContext* context) { |
| 5242 | return yyparse(context); |
| 5243 | } |
| 5244 | |