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