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, |
| 782 | 265, 268, 271, 274, 277, 283, 291, 302, 305, 313, |
| 783 | 316, 322, 326, 333, 339, 348, 356, 362, 369, 379, |
| 784 | 382, 392, 402, 424, 425, 426, 427, 435, 436, 440, |
| 785 | 444, 452, 453, 456, 462, 463, 467, 474, 475, 478, |
| 786 | 481, 484, 490, 491, 494, 500, 501, 508, 509, 516, |
| 787 | 517, 524, 525, 531, 532, 538, 539, 545, 546, 552, |
| 788 | 553, 561, 562, 563, 564, 566, 567, 568, 571, 574, |
| 789 | 577, 580, 586, 589, 600, 608, 616, 643, 649, 656, |
| 790 | 660, 664, 668, 675, 712, 715, 722, 730, 751, 772, |
| 791 | 782, 810, 815, 825, 830, 840, 843, 846, 849, 855, |
| 792 | 862, 865, 869, 873, 878, 883, 890, 894, 898, 902, |
| 793 | 907, 912, 916, 923, 933, 939, 942, 948, 954, 961, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 794 | 970, 979, 982, 985, 992, 996, 1000, 1005, 1013, 1016, |
| 795 | 1020, 1024, 1033, 1042, 1050, 1060, 1067, 1070, 1073, 1079, |
| 796 | 1086, 1089, 1095, 1098, 1101, 1107, 1110, 1115, 1130, 1134, |
| 797 | 1138, 1142, 1146, 1150, 1155, 1160, 1165, 1170, 1175, 1180, |
| 798 | 1185, 1190, 1195, 1200, 1205, 1210, 1216, 1222, 1228, 1234, |
| 799 | 1240, 1246, 1252, 1258, 1264, 1269, 1274, 1283, 1288, 1293, |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 800 | 1298, 1303, 1308, 1313, 1318, 1323, 1328, 1333, 1338, 1343, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 801 | 1348, 1353, 1366, 1366, 1369, 1369, 1375, 1378, 1394, 1397, |
| 802 | 1406, 1410, 1416, 1423, 1438, 1442, 1446, 1447, 1453, 1454, |
| 803 | 1455, 1456, 1457, 1458, 1459, 1463, 1464, 1464, 1464, 1474, |
| 804 | 1475, 1479, 1479, 1480, 1480, 1485, 1488, 1498, 1501, 1507, |
| 805 | 1508, 1512, 1520, 1524, 1531, 1531, 1538, 1541, 1550, 1555, |
| 806 | 1572, 1572, 1577, 1577, 1584, 1584, 1592, 1595, 1601, 1604, |
| 807 | 1610, 1614, 1621, 1624, 1627, 1630, 1633, 1642, 1646, 1653, |
| 808 | 1656, 1662, 1662 |
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; |
| 2631 | (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode, nullptr, (yylsp[(1) - (1)]), &fatalError); |
| 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); |
| 2643 | } |
| 2644 | break; |
| 2645 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2646 | case 18: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2647 | |
| 2648 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2649 | context->error((yylsp[(3) - (3)]), "methods are not supported", ""); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2650 | context->recover(); |
| 2651 | (yyval.interm) = (yyvsp[(3) - (3)].interm); |
| 2652 | } |
| 2653 | break; |
| 2654 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2655 | case 19: |
| 2656 | |
| 2657 | { |
| 2658 | (yyval.interm) = (yyvsp[(1) - (2)].interm); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2659 | } |
| 2660 | break; |
| 2661 | |
| 2662 | case 20: |
| 2663 | |
| 2664 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2665 | (yyval.interm) = (yyvsp[(1) - (2)].interm); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2666 | } |
| 2667 | break; |
| 2668 | |
| 2669 | case 21: |
| 2670 | |
| 2671 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2672 | (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| 2673 | (yyval.interm).intermNode = 0; |
| 2674 | } |
| 2675 | break; |
| 2676 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2677 | case 22: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2678 | |
| 2679 | { |
| 2680 | (yyval.interm).function = (yyvsp[(1) - (1)].interm.function); |
| 2681 | (yyval.interm).intermNode = 0; |
| 2682 | } |
| 2683 | break; |
| 2684 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2685 | case 23: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2686 | |
| 2687 | { |
| 2688 | TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) }; |
| 2689 | (yyvsp[(1) - (2)].interm.function)->addParameter(param); |
| 2690 | (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
| 2691 | (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2692 | } |
| 2693 | break; |
| 2694 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2695 | case 24: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2696 | |
| 2697 | { |
| 2698 | TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) }; |
| 2699 | (yyvsp[(1) - (3)].interm).function->addParameter(param); |
| 2700 | (yyval.interm).function = (yyvsp[(1) - (3)].interm).function; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2701 | (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2702 | } |
| 2703 | break; |
| 2704 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2705 | case 25: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2706 | |
| 2707 | { |
| 2708 | (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); |
| 2709 | } |
| 2710 | break; |
| 2711 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2712 | case 26: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2713 | |
| 2714 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 2715 | if ((yyvsp[(1) - (1)].interm.type).array) { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2716 | ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor"); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2717 | } |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 2718 | (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2719 | } |
| 2720 | break; |
| 2721 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2722 | case 27: |
| 2723 | |
| 2724 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2725 | if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2726 | context->recover(); |
| 2727 | TType type(EbtVoid, EbpUndefined); |
| 2728 | TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); |
| 2729 | (yyval.interm.function) = function; |
| 2730 | } |
| 2731 | break; |
| 2732 | |
| 2733 | case 28: |
| 2734 | |
| 2735 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2736 | if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2737 | context->recover(); |
| 2738 | TType type(EbtVoid, EbpUndefined); |
| 2739 | TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); |
| 2740 | (yyval.interm.function) = function; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2741 | } |
| 2742 | break; |
| 2743 | |
| 2744 | case 29: |
| 2745 | |
| 2746 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2747 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 2748 | } |
| 2749 | break; |
| 2750 | |
| 2751 | case 30: |
| 2752 | |
| 2753 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2754 | if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2755 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2756 | (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] | 2757 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2758 | context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2759 | context->recover(); |
| 2760 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2761 | } |
| 2762 | } |
| 2763 | break; |
| 2764 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2765 | case 31: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2766 | |
| 2767 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2768 | if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2769 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2770 | (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] | 2771 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2772 | context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2773 | context->recover(); |
| 2774 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2775 | } |
| 2776 | } |
| 2777 | break; |
| 2778 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2779 | case 32: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2780 | |
| 2781 | { |
| 2782 | if ((yyvsp[(1) - (2)].interm).op != EOpNull) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2783 | (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] | 2784 | if ((yyval.interm.intermTypedNode) == 0) { |
| 2785 | const char* errorOp = ""; |
| 2786 | switch((yyvsp[(1) - (2)].interm).op) { |
| 2787 | case EOpNegative: errorOp = "-"; break; |
| 2788 | case EOpLogicalNot: errorOp = "!"; break; |
Alexis Hetu | d061e42 | 2015-05-13 16:37:50 -0400 | [diff] [blame] | 2789 | case EOpBitwiseNot: errorOp = "~"; break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2790 | default: break; |
| 2791 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2792 | context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2793 | context->recover(); |
| 2794 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2795 | } |
| 2796 | } else |
| 2797 | (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); |
| 2798 | } |
| 2799 | break; |
| 2800 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2801 | case 33: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2802 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2803 | { (yyval.interm).op = EOpNull; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2804 | break; |
| 2805 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2806 | case 34: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2807 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2808 | { (yyval.interm).op = EOpNegative; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2809 | break; |
| 2810 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2811 | case 35: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2812 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2813 | { (yyval.interm).op = EOpLogicalNot; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2814 | break; |
| 2815 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2816 | case 36: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2817 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2818 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2819 | ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2820 | (yyval.interm).op = EOpBitwiseNot; |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2821 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2822 | break; |
| 2823 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2824 | case 37: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2825 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2826 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2827 | break; |
| 2828 | |
| 2829 | case 38: |
| 2830 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2831 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2832 | FRAG_VERT_ONLY("*", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2833 | (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] | 2834 | } |
| 2835 | break; |
| 2836 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2837 | case 39: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2838 | |
| 2839 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2840 | FRAG_VERT_ONLY("/", (yylsp[(2) - (3)])); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2841 | (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] | 2842 | } |
| 2843 | break; |
| 2844 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2845 | case 40: |
| 2846 | |
| 2847 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2848 | FRAG_VERT_ONLY("%", (yylsp[(2) - (3)])); |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2849 | ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator"); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2850 | (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] | 2851 | } |
| 2852 | break; |
| 2853 | |
| 2854 | case 41: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2855 | |
| 2856 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2857 | break; |
| 2858 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2859 | case 42: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2860 | |
| 2861 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2862 | (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] | 2863 | } |
| 2864 | break; |
| 2865 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2866 | case 43: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2867 | |
| 2868 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2869 | (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] | 2870 | } |
| 2871 | break; |
| 2872 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2873 | case 44: |
| 2874 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2875 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2876 | break; |
| 2877 | |
| 2878 | case 45: |
| 2879 | |
| 2880 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2881 | ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator"); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2882 | (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] | 2883 | } |
| 2884 | break; |
| 2885 | |
| 2886 | case 46: |
| 2887 | |
| 2888 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2889 | ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator"); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2890 | (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] | 2891 | } |
| 2892 | break; |
| 2893 | |
| 2894 | case 47: |
| 2895 | |
| 2896 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2897 | break; |
| 2898 | |
| 2899 | case 48: |
| 2900 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2901 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2902 | (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] | 2903 | } |
| 2904 | break; |
| 2905 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2906 | case 49: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2907 | |
| 2908 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2909 | (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] | 2910 | } |
| 2911 | break; |
| 2912 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2913 | case 50: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2914 | |
| 2915 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2916 | (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] | 2917 | } |
| 2918 | break; |
| 2919 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2920 | case 51: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2921 | |
| 2922 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2923 | (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] | 2924 | } |
| 2925 | break; |
| 2926 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2927 | case 52: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2928 | |
| 2929 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2930 | break; |
| 2931 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2932 | case 53: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2933 | |
| 2934 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2935 | (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] | 2936 | } |
| 2937 | break; |
| 2938 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2939 | case 54: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2940 | |
| 2941 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2942 | (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] | 2943 | } |
| 2944 | break; |
| 2945 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2946 | case 55: |
| 2947 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2948 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2949 | break; |
| 2950 | |
| 2951 | case 56: |
| 2952 | |
| 2953 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2954 | ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator"); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2955 | (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] | 2956 | } |
| 2957 | break; |
| 2958 | |
| 2959 | case 57: |
| 2960 | |
| 2961 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2962 | break; |
| 2963 | |
| 2964 | case 58: |
| 2965 | |
| 2966 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2967 | ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator"); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2968 | (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] | 2969 | } |
| 2970 | break; |
| 2971 | |
| 2972 | case 59: |
| 2973 | |
| 2974 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2975 | break; |
| 2976 | |
| 2977 | case 60: |
| 2978 | |
| 2979 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 2980 | ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator"); |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2981 | (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] | 2982 | } |
| 2983 | break; |
| 2984 | |
| 2985 | case 61: |
| 2986 | |
| 2987 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 2988 | break; |
| 2989 | |
| 2990 | case 62: |
| 2991 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2992 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 2993 | (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] | 2994 | } |
| 2995 | break; |
| 2996 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2997 | case 63: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2998 | |
| 2999 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3000 | break; |
| 3001 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3002 | case 64: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3003 | |
| 3004 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 3005 | (yyval.interm.intermTypedNode) = context->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] | 3006 | } |
| 3007 | break; |
| 3008 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3009 | case 65: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3010 | |
| 3011 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3012 | break; |
| 3013 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3014 | case 66: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3015 | |
| 3016 | { |
Alexis Hetu | b476958 | 2015-06-16 12:19:50 -0400 | [diff] [blame] | 3017 | (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] | 3018 | } |
| 3019 | break; |
| 3020 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3021 | case 67: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3022 | |
| 3023 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3024 | break; |
| 3025 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3026 | case 68: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3027 | |
| 3028 | { |
Alexis Hetu | eee212e | 2015-07-07 17:13:30 -0400 | [diff] [blame] | 3029 | (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] | 3030 | } |
| 3031 | break; |
| 3032 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3033 | case 69: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3034 | |
| 3035 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
| 3036 | break; |
| 3037 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3038 | case 70: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3039 | |
| 3040 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3041 | if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3042 | context->recover(); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3043 | (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] | 3044 | } |
| 3045 | break; |
| 3046 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3047 | case 71: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3048 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3049 | { (yyval.interm).op = EOpAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3050 | break; |
| 3051 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3052 | case 72: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3053 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3054 | { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpMulAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3055 | break; |
| 3056 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3057 | case 73: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3058 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3059 | { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpDivAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3060 | break; |
| 3061 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3062 | case 74: |
| 3063 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3064 | { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3065 | FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpIModAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3066 | break; |
| 3067 | |
| 3068 | case 75: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3069 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3070 | { (yyval.interm).op = EOpAddAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3071 | break; |
| 3072 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3073 | case 76: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3074 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3075 | { (yyval.interm).op = EOpSubAssign; } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3076 | break; |
| 3077 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3078 | case 77: |
| 3079 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3080 | { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3081 | FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)])); |
| 3082 | (yyval.interm).op = EOpBitShiftLeftAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3083 | break; |
| 3084 | |
| 3085 | case 78: |
| 3086 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3087 | { ES3_ONLY(">>=", (yylsp[(1) - (1)]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3088 | FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)])); |
| 3089 | (yyval.interm).op = EOpBitShiftRightAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3090 | break; |
| 3091 | |
| 3092 | case 79: |
| 3093 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3094 | { ES3_ONLY("&=", (yylsp[(1) - (1)]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3095 | FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)])); |
| 3096 | (yyval.interm).op = EOpBitwiseAndAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3097 | break; |
| 3098 | |
| 3099 | case 80: |
| 3100 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3101 | { ES3_ONLY("^=", (yylsp[(1) - (1)]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3102 | FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)])); |
| 3103 | (yyval.interm).op = EOpBitwiseXorAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3104 | break; |
| 3105 | |
| 3106 | case 81: |
| 3107 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3108 | { ES3_ONLY("|=", (yylsp[(1) - (1)]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3109 | FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)])); |
| 3110 | (yyval.interm).op = EOpBitwiseOrAssign; } |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3111 | break; |
| 3112 | |
| 3113 | case 82: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3114 | |
| 3115 | { |
| 3116 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 3117 | } |
| 3118 | break; |
| 3119 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3120 | case 83: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3121 | |
| 3122 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3123 | (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] | 3124 | if ((yyval.interm.intermTypedNode) == 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3125 | 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] | 3126 | context->recover(); |
| 3127 | (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); |
| 3128 | } |
| 3129 | } |
| 3130 | break; |
| 3131 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3132 | case 84: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3133 | |
| 3134 | { |
| 3135 | if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode))) |
| 3136 | context->recover(); |
| 3137 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 3138 | } |
| 3139 | break; |
| 3140 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3141 | case 85: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3142 | |
| 3143 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3144 | if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3145 | context->recover(); |
| 3146 | (yyval.lex) = (yyvsp[(1) - (2)].lex); |
| 3147 | } |
| 3148 | break; |
| 3149 | |
| 3150 | case 86: |
| 3151 | |
| 3152 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3153 | TFunction &function = *((yyvsp[(1) - (2)].interm).function); |
| 3154 | |
| 3155 | TIntermAggregate *prototype = new TIntermAggregate; |
| 3156 | prototype->setType(function.getReturnType()); |
| 3157 | prototype->setName(function.getName()); |
| 3158 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 3159 | for (size_t i = 0; i < function.getParamCount(); i++) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3160 | { |
| 3161 | const TParameter ¶m = function.getParam(i); |
| 3162 | if (param.name != 0) |
| 3163 | { |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3164 | TVariable variable(param.name, *param.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3165 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3166 | 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] | 3167 | } |
| 3168 | else |
| 3169 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3170 | 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] | 3171 | } |
| 3172 | } |
| 3173 | |
| 3174 | prototype->setOp(EOpPrototype); |
| 3175 | (yyval.interm.intermNode) = prototype; |
| 3176 | |
| 3177 | context->symbolTable.pop(); |
| 3178 | } |
| 3179 | break; |
| 3180 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3181 | case 87: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3182 | |
| 3183 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3184 | TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate; |
| 3185 | if (aggNode && aggNode->getOp() == EOpNull) |
| 3186 | aggNode->setOp(EOpDeclaration); |
| 3187 | (yyval.interm.intermNode) = aggNode; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3188 | } |
| 3189 | break; |
| 3190 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3191 | case 88: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3192 | |
| 3193 | { |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3194 | 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] | 3195 | 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] | 3196 | context->recover(); |
| 3197 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3198 | (yyval.interm.intermNode) = 0; |
| 3199 | } |
| 3200 | break; |
| 3201 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3202 | case 89: |
| 3203 | |
| 3204 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3205 | 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] | 3206 | (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] | 3207 | } |
| 3208 | break; |
| 3209 | |
| 3210 | case 90: |
| 3211 | |
| 3212 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3213 | 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] | 3214 | (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] | 3215 | } |
| 3216 | break; |
| 3217 | |
| 3218 | case 91: |
| 3219 | |
| 3220 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3221 | 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] | 3222 | (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] | 3223 | } |
| 3224 | break; |
| 3225 | |
| 3226 | case 92: |
| 3227 | |
| 3228 | { |
| 3229 | context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type)); |
| 3230 | (yyval.interm.intermNode) = 0; |
| 3231 | } |
| 3232 | break; |
| 3233 | |
| 3234 | case 93: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3235 | |
| 3236 | { |
| 3237 | // |
| 3238 | // Multiple declarations of the same function are allowed. |
| 3239 | // |
| 3240 | // If this is a definition, the definition production code will check for redefinitions |
| 3241 | // (we don't know at this point if it's a definition or not). |
| 3242 | // |
| 3243 | // Redeclarations are allowed. But, return types and parameter qualifiers must match. |
| 3244 | // |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3245 | 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] | 3246 | if (prevDec) { |
| 3247 | if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3248 | 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] | 3249 | context->recover(); |
| 3250 | } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 3251 | for (size_t i = 0; i < prevDec->getParamCount(); ++i) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3252 | 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] | 3253 | 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] | 3254 | context->recover(); |
| 3255 | } |
| 3256 | } |
| 3257 | } |
| 3258 | |
| 3259 | // |
| 3260 | // If this is a redeclaration, it could also be a definition, |
| 3261 | // in which case, we want to use the variable names from this one, and not the one that's |
| 3262 | // being redeclared. So, pass back up this declaration, not the one in the symbol table. |
| 3263 | // |
| 3264 | (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3265 | |
| 3266 | // We're at the inner scope level of the function's arguments and body statement. |
| 3267 | // Add the function prototype to the surrounding scope instead. |
| 3268 | context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function); |
| 3269 | } |
| 3270 | break; |
| 3271 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3272 | case 94: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3273 | |
| 3274 | { |
| 3275 | (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); |
| 3276 | } |
| 3277 | break; |
| 3278 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3279 | case 95: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3280 | |
| 3281 | { |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3282 | (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); |
| 3283 | } |
| 3284 | break; |
| 3285 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3286 | case 96: |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3287 | |
| 3288 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3289 | // Add the parameter |
| 3290 | (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); |
| 3291 | if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid) |
| 3292 | (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); |
| 3293 | else |
| 3294 | delete (yyvsp[(2) - (2)].interm).param.type; |
| 3295 | } |
| 3296 | break; |
| 3297 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3298 | case 97: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3299 | |
| 3300 | { |
| 3301 | // |
| 3302 | // Only first parameter of one-parameter functions can be void |
| 3303 | // The check for named parameters not being void is done in parameter_declarator |
| 3304 | // |
| 3305 | if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) { |
| 3306 | // |
| 3307 | // This parameter > first is void |
| 3308 | // |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3309 | 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] | 3310 | context->recover(); |
| 3311 | delete (yyvsp[(3) - (3)].interm).param.type; |
| 3312 | } else { |
| 3313 | // Add the parameter |
| 3314 | (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); |
| 3315 | (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); |
| 3316 | } |
| 3317 | } |
| 3318 | break; |
| 3319 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3320 | case 98: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3321 | |
| 3322 | { |
| 3323 | 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] | 3324 | 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] | 3325 | context->recover(); |
| 3326 | } |
| 3327 | // make sure a sampler is not involved as well... |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3328 | if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3329 | context->recover(); |
| 3330 | |
| 3331 | // Add the function as a prototype after parsing it (we do not support recursion) |
| 3332 | TFunction *function; |
| 3333 | TType type((yyvsp[(1) - (3)].interm.type)); |
| 3334 | function = new TFunction((yyvsp[(2) - (3)].lex).string, type); |
| 3335 | (yyval.interm.function) = function; |
| 3336 | |
| 3337 | context->symbolTable.push(); |
| 3338 | } |
| 3339 | break; |
| 3340 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3341 | case 99: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3342 | |
| 3343 | { |
| 3344 | if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3345 | 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] | 3346 | context->recover(); |
| 3347 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3348 | if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3349 | context->recover(); |
| 3350 | 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] | 3351 | (yyval.interm).param = param; |
| 3352 | } |
| 3353 | break; |
| 3354 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3355 | case 100: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3356 | |
| 3357 | { |
| 3358 | // Check that we can make an array out of this type |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3359 | if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3360 | context->recover(); |
| 3361 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3362 | if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3363 | context->recover(); |
| 3364 | |
| 3365 | int size; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3366 | if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3367 | context->recover(); |
| 3368 | (yyvsp[(1) - (5)].interm.type).setArray(true, size); |
| 3369 | |
| 3370 | TType* type = new TType((yyvsp[(1) - (5)].interm.type)); |
| 3371 | TParameter param = { (yyvsp[(2) - (5)].lex).string, type }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3372 | (yyval.interm).param = param; |
| 3373 | } |
| 3374 | break; |
| 3375 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3376 | case 101: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3377 | |
| 3378 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3379 | (yyval.interm) = (yyvsp[(3) - (3)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3380 | 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] | 3381 | context->recover(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3382 | } |
| 3383 | break; |
| 3384 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3385 | case 102: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3386 | |
| 3387 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3388 | (yyval.interm) = (yyvsp[(2) - (2)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3389 | 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] | 3390 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3391 | 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] | 3392 | context->recover(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3393 | } |
| 3394 | break; |
| 3395 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3396 | case 103: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3397 | |
| 3398 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3399 | (yyval.interm) = (yyvsp[(3) - (3)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3400 | 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] | 3401 | context->recover(); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3402 | } |
| 3403 | break; |
| 3404 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3405 | case 104: |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3406 | |
| 3407 | { |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3408 | (yyval.interm) = (yyvsp[(2) - (2)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3409 | 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] | 3410 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3411 | 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] | 3412 | context->recover(); |
| 3413 | } |
| 3414 | break; |
| 3415 | |
| 3416 | case 105: |
| 3417 | |
| 3418 | { |
| 3419 | (yyval.interm.qualifier) = EvqIn; |
| 3420 | } |
| 3421 | break; |
| 3422 | |
| 3423 | case 106: |
| 3424 | |
| 3425 | { |
| 3426 | (yyval.interm.qualifier) = EvqIn; |
| 3427 | } |
| 3428 | break; |
| 3429 | |
| 3430 | case 107: |
| 3431 | |
| 3432 | { |
| 3433 | (yyval.interm.qualifier) = EvqOut; |
| 3434 | } |
| 3435 | break; |
| 3436 | |
| 3437 | case 108: |
| 3438 | |
| 3439 | { |
| 3440 | (yyval.interm.qualifier) = EvqInOut; |
| 3441 | } |
| 3442 | break; |
| 3443 | |
| 3444 | case 109: |
| 3445 | |
| 3446 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3447 | TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; |
| 3448 | (yyval.interm).param = param; |
| 3449 | } |
| 3450 | break; |
| 3451 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3452 | case 110: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3453 | |
| 3454 | { |
| 3455 | (yyval.interm) = (yyvsp[(1) - (1)].interm); |
| 3456 | } |
| 3457 | break; |
| 3458 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3459 | case 111: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3460 | |
| 3461 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3462 | (yyval.interm) = (yyvsp[(1) - (3)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3463 | (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] | 3464 | } |
| 3465 | break; |
| 3466 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3467 | case 112: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3468 | |
| 3469 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3470 | (yyval.interm) = (yyvsp[(1) - (6)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3471 | (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] | 3472 | } |
| 3473 | break; |
| 3474 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3475 | case 113: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3476 | |
| 3477 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3478 | ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array"); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3479 | (yyval.interm) = (yyvsp[(1) - (7)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3480 | (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] | 3481 | } |
| 3482 | break; |
| 3483 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3484 | case 114: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3485 | |
| 3486 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3487 | ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)"); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3488 | (yyval.interm) = (yyvsp[(1) - (8)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3489 | (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] | 3490 | } |
| 3491 | break; |
| 3492 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3493 | case 115: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3494 | |
| 3495 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3496 | (yyval.interm) = (yyvsp[(1) - (5)].interm); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3497 | (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] | 3498 | } |
| 3499 | break; |
| 3500 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3501 | case 116: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3502 | |
| 3503 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3504 | (yyval.interm).type = (yyvsp[(1) - (1)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3505 | (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), ""); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3506 | } |
| 3507 | break; |
| 3508 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3509 | case 117: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3510 | |
| 3511 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3512 | (yyval.interm).type = (yyvsp[(1) - (2)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3513 | (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] | 3514 | } |
| 3515 | break; |
| 3516 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3517 | case 118: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3518 | |
| 3519 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3520 | (yyval.interm).type = (yyvsp[(1) - (5)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3521 | (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] | 3522 | } |
| 3523 | break; |
| 3524 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3525 | case 119: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3526 | |
| 3527 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3528 | ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array"); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3529 | (yyval.interm).type = (yyvsp[(1) - (6)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3530 | (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] | 3531 | } |
| 3532 | break; |
| 3533 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3534 | case 120: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3535 | |
| 3536 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3537 | ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)"); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3538 | (yyval.interm).type = (yyvsp[(1) - (7)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3539 | (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] | 3540 | } |
| 3541 | break; |
| 3542 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3543 | case 121: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3544 | |
| 3545 | { |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3546 | (yyval.interm).type = (yyvsp[(1) - (4)].interm.type); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3547 | (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] | 3548 | } |
| 3549 | break; |
| 3550 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3551 | case 122: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3552 | |
| 3553 | { |
| 3554 | // $$.type is not used in invariant declarations. |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3555 | (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] | 3556 | } |
| 3557 | break; |
| 3558 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3559 | case 123: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3560 | |
| 3561 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3562 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 3563 | |
| 3564 | if ((yyvsp[(1) - (1)].interm.type).array) { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3565 | ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array"); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3566 | if (context->getShaderVersion() != 300) { |
| 3567 | (yyvsp[(1) - (1)].interm.type).clearArrayness(); |
| 3568 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3569 | } |
| 3570 | } |
| 3571 | break; |
| 3572 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3573 | case 124: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3574 | |
| 3575 | { |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3576 | (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] | 3577 | } |
| 3578 | break; |
| 3579 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3580 | case 125: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3581 | |
| 3582 | { |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3583 | (yyval.interm.type).qualifier = EvqSmooth; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3584 | } |
| 3585 | break; |
| 3586 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3587 | case 126: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3588 | |
| 3589 | { |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3590 | (yyval.interm.type).qualifier = EvqFlat; |
| 3591 | } |
| 3592 | break; |
| 3593 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3594 | case 127: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3595 | |
| 3596 | { |
| 3597 | (yyval.interm.qualifier) = EvqConstReadOnly; |
| 3598 | } |
| 3599 | break; |
| 3600 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3601 | case 128: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3602 | |
| 3603 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3604 | VERTEX_ONLY("attribute", (yylsp[(1) - (1)])); |
| 3605 | ES2_ONLY("attribute", (yylsp[(1) - (1)])); |
| 3606 | if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3607 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3608 | (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3609 | } |
| 3610 | break; |
| 3611 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3612 | case 129: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3613 | |
| 3614 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3615 | ES2_ONLY("varying", (yylsp[(1) - (1)])); |
| 3616 | if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3617 | context->recover(); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3618 | if (context->getShaderType() == GL_VERTEX_SHADER) |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3619 | (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3620 | else |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3621 | (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3622 | } |
| 3623 | break; |
| 3624 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3625 | case 130: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3626 | |
| 3627 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3628 | ES2_ONLY("varying", (yylsp[(1) - (2)])); |
| 3629 | if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3630 | context->recover(); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3631 | if (context->getShaderType() == GL_VERTEX_SHADER) |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3632 | (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3633 | else |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3634 | (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3635 | } |
| 3636 | break; |
| 3637 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3638 | case 131: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3639 | |
| 3640 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3641 | (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] | 3642 | } |
| 3643 | break; |
| 3644 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3645 | case 132: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3646 | |
| 3647 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3648 | (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] | 3649 | } |
| 3650 | break; |
| 3651 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3652 | case 133: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3653 | |
| 3654 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3655 | 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] | 3656 | context->recover(); |
| 3657 | |
| 3658 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3659 | (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3660 | } |
| 3661 | break; |
| 3662 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3663 | case 134: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3664 | |
| 3665 | { |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3666 | (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 3667 | (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier); |
| 3668 | } |
| 3669 | break; |
| 3670 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3671 | case 135: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3672 | |
| 3673 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3674 | (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] | 3675 | (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier); |
| 3676 | } |
| 3677 | break; |
| 3678 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3679 | case 136: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3680 | |
| 3681 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3682 | context->es3InvariantErrorCheck((yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(1) - (2)])); |
| 3683 | (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)])); |
| 3684 | (yyval.interm.type).invariant = true; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3685 | } |
| 3686 | break; |
| 3687 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3688 | case 137: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3689 | |
| 3690 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3691 | context->es3InvariantErrorCheck((yyvsp[(3) - (3)].interm.type).qualifier, (yylsp[(1) - (3)])); |
| 3692 | (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(2) - (3)]), (yyvsp[(2) - (3)].interm.type).qualifier, (yylsp[(3) - (3)]), (yyvsp[(3) - (3)].interm.type).qualifier); |
| 3693 | (yyval.interm.type).invariant = true; |
| 3694 | } |
| 3695 | break; |
| 3696 | |
| 3697 | case 138: |
| 3698 | |
| 3699 | { |
| 3700 | (yyval.interm.type).qualifier = EvqConstExpr; |
| 3701 | } |
| 3702 | break; |
| 3703 | |
| 3704 | case 139: |
| 3705 | |
| 3706 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3707 | ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3708 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3709 | } |
| 3710 | break; |
| 3711 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3712 | case 140: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3713 | |
| 3714 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3715 | ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3716 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3717 | } |
| 3718 | break; |
| 3719 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3720 | case 141: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3721 | |
| 3722 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3723 | ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3724 | if (context->getShaderType() == GL_VERTEX_SHADER) |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3725 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3726 | 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] | 3727 | context->recover(); |
| 3728 | } |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3729 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3730 | } |
| 3731 | break; |
| 3732 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3733 | case 142: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3734 | |
| 3735 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3736 | ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3737 | if (context->getShaderType() == GL_FRAGMENT_SHADER) |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3738 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3739 | 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] | 3740 | context->recover(); |
| 3741 | } |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3742 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3743 | } |
| 3744 | break; |
| 3745 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3746 | case 143: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3747 | |
| 3748 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3749 | if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform")) |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3750 | context->recover(); |
| 3751 | (yyval.interm.type).qualifier = EvqUniform; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3752 | } |
| 3753 | break; |
| 3754 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3755 | case 144: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3756 | |
| 3757 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3758 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 3759 | |
| 3760 | if ((yyval.interm.type).precision == EbpUndefined) { |
| 3761 | (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] | 3762 | 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] | 3763 | context->recover(); |
| 3764 | } |
| 3765 | } |
| 3766 | } |
| 3767 | break; |
| 3768 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3769 | case 145: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3770 | |
| 3771 | { |
| 3772 | (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); |
| 3773 | (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision); |
| 3774 | } |
| 3775 | break; |
| 3776 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3777 | case 146: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3778 | |
| 3779 | { |
| 3780 | (yyval.interm.precision) = EbpHigh; |
| 3781 | } |
| 3782 | break; |
| 3783 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3784 | case 147: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3785 | |
| 3786 | { |
| 3787 | (yyval.interm.precision) = EbpMedium; |
| 3788 | } |
| 3789 | break; |
| 3790 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3791 | case 148: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3792 | |
| 3793 | { |
| 3794 | (yyval.interm.precision) = EbpLow; |
| 3795 | } |
| 3796 | break; |
| 3797 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3798 | case 149: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3799 | |
| 3800 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3801 | ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier"); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3802 | (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier); |
| 3803 | } |
| 3804 | break; |
| 3805 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3806 | case 150: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3807 | |
| 3808 | { |
| 3809 | (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier); |
| 3810 | } |
| 3811 | break; |
| 3812 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3813 | case 151: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3814 | |
| 3815 | { |
| 3816 | (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier)); |
| 3817 | } |
| 3818 | break; |
| 3819 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3820 | case 152: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3821 | |
| 3822 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3823 | (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] | 3824 | } |
| 3825 | break; |
| 3826 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3827 | case 153: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3828 | |
| 3829 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3830 | (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)])); |
| 3831 | } |
| 3832 | break; |
| 3833 | |
| 3834 | case 154: |
| 3835 | |
| 3836 | { |
| 3837 | (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)])); |
| 3838 | } |
| 3839 | break; |
| 3840 | |
| 3841 | case 155: |
| 3842 | |
| 3843 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3844 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 3845 | } |
| 3846 | break; |
| 3847 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3848 | case 156: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3849 | |
| 3850 | { |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 3851 | ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array"); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3852 | (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type); |
| 3853 | (yyval.interm.type).setArray(true, 0); |
| 3854 | } |
| 3855 | break; |
| 3856 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3857 | case 157: |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3858 | |
| 3859 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3860 | (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type); |
| 3861 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3862 | if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3863 | context->recover(); |
| 3864 | else { |
| 3865 | int size; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3866 | if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3867 | context->recover(); |
| 3868 | (yyval.interm.type).setArray(true, size); |
| 3869 | } |
| 3870 | } |
| 3871 | break; |
| 3872 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3873 | case 158: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3874 | |
| 3875 | { |
| 3876 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 3877 | (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3878 | } |
| 3879 | break; |
| 3880 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3881 | case 159: |
| 3882 | |
| 3883 | { |
| 3884 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3885 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3886 | } |
| 3887 | break; |
| 3888 | |
| 3889 | case 160: |
| 3890 | |
| 3891 | { |
| 3892 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3893 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3894 | } |
| 3895 | break; |
| 3896 | |
| 3897 | case 161: |
| 3898 | |
| 3899 | { |
| 3900 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3901 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3902 | } |
| 3903 | break; |
| 3904 | |
| 3905 | case 162: |
| 3906 | |
| 3907 | { |
| 3908 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3909 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3910 | } |
| 3911 | break; |
| 3912 | |
| 3913 | case 163: |
| 3914 | |
| 3915 | { |
| 3916 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3917 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3918 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3919 | } |
| 3920 | break; |
| 3921 | |
| 3922 | case 164: |
| 3923 | |
| 3924 | { |
| 3925 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3926 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| 3927 | (yyval.interm.type).setAggregate(3); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3928 | } |
| 3929 | break; |
| 3930 | |
| 3931 | case 165: |
| 3932 | |
| 3933 | { |
| 3934 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3935 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
| 3936 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3937 | } |
| 3938 | break; |
| 3939 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3940 | case 166: |
| 3941 | |
| 3942 | { |
| 3943 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3944 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3945 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3946 | } |
| 3947 | break; |
| 3948 | |
| 3949 | case 167: |
| 3950 | |
| 3951 | { |
| 3952 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3953 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
| 3954 | (yyval.interm.type).setAggregate(3); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3955 | } |
| 3956 | break; |
| 3957 | |
| 3958 | case 168: |
| 3959 | |
| 3960 | { |
| 3961 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3962 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)])); |
| 3963 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3964 | } |
| 3965 | break; |
| 3966 | |
| 3967 | case 169: |
| 3968 | |
| 3969 | { |
| 3970 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3971 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3972 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3973 | } |
| 3974 | break; |
| 3975 | |
| 3976 | case 170: |
| 3977 | |
| 3978 | { |
| 3979 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3980 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
| 3981 | (yyval.interm.type).setAggregate(3); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3982 | } |
| 3983 | break; |
| 3984 | |
| 3985 | case 171: |
| 3986 | |
| 3987 | { |
| 3988 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3989 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)])); |
| 3990 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3991 | } |
| 3992 | break; |
| 3993 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3994 | case 172: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3995 | |
| 3996 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3997 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 3998 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 3999 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4000 | } |
| 4001 | break; |
| 4002 | |
| 4003 | case 173: |
| 4004 | |
| 4005 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4006 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 4007 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
| 4008 | (yyval.interm.type).setAggregate(3); |
| 4009 | } |
| 4010 | break; |
| 4011 | |
| 4012 | case 174: |
| 4013 | |
| 4014 | { |
| 4015 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 4016 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)])); |
| 4017 | (yyval.interm.type).setAggregate(4); |
| 4018 | } |
| 4019 | break; |
| 4020 | |
| 4021 | case 175: |
| 4022 | |
| 4023 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4024 | FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4025 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4026 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4027 | (yyval.interm.type).setMatrix(2, 2); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4028 | } |
| 4029 | break; |
| 4030 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4031 | case 176: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4032 | |
| 4033 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4034 | FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4035 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4036 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4037 | (yyval.interm.type).setMatrix(3, 3); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4038 | } |
| 4039 | break; |
| 4040 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4041 | case 177: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4042 | |
| 4043 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4044 | FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4045 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4046 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4047 | (yyval.interm.type).setMatrix(4, 4); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4048 | } |
| 4049 | break; |
| 4050 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4051 | case 178: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4052 | |
| 4053 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4054 | FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4055 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4056 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4057 | (yyval.interm.type).setMatrix(2, 3); |
| 4058 | } |
| 4059 | break; |
| 4060 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4061 | case 179: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4062 | |
| 4063 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4064 | FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4065 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4066 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4067 | (yyval.interm.type).setMatrix(3, 2); |
| 4068 | } |
| 4069 | break; |
| 4070 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4071 | case 180: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4072 | |
| 4073 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4074 | FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4075 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4076 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4077 | (yyval.interm.type).setMatrix(2, 4); |
| 4078 | } |
| 4079 | break; |
| 4080 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4081 | case 181: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4082 | |
| 4083 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4084 | FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4085 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4086 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4087 | (yyval.interm.type).setMatrix(4, 2); |
| 4088 | } |
| 4089 | break; |
| 4090 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4091 | case 182: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4092 | |
| 4093 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4094 | FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4095 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4096 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4097 | (yyval.interm.type).setMatrix(3, 4); |
| 4098 | } |
| 4099 | break; |
| 4100 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4101 | case 183: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4102 | |
| 4103 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4104 | FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4105 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4106 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4107 | (yyval.interm.type).setMatrix(4, 3); |
| 4108 | } |
| 4109 | break; |
| 4110 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4111 | case 184: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4112 | |
| 4113 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4114 | FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4115 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4116 | (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4117 | } |
| 4118 | break; |
| 4119 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4120 | case 185: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4121 | |
| 4122 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4123 | FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4124 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4125 | (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4126 | } |
| 4127 | break; |
| 4128 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4129 | case 186: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4130 | |
| 4131 | { |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4132 | if (!context->supportsExtension("GL_OES_EGL_image_external")) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4133 | context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", ""); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4134 | context->recover(); |
| 4135 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4136 | FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)])); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4137 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4138 | (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)])); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4139 | } |
| 4140 | break; |
| 4141 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4142 | case 187: |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4143 | |
| 4144 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4145 | FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)])); |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4146 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4147 | (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4148 | } |
| 4149 | break; |
| 4150 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4151 | case 188: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4152 | |
| 4153 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4154 | FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4155 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4156 | (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4157 | } |
| 4158 | break; |
| 4159 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4160 | case 189: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4161 | |
| 4162 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4163 | FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4164 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4165 | (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4166 | } |
| 4167 | break; |
| 4168 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4169 | case 190: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4170 | |
| 4171 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4172 | FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4173 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4174 | (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4175 | } |
| 4176 | break; |
| 4177 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4178 | case 191: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4179 | |
| 4180 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4181 | FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4182 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4183 | (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4184 | } |
| 4185 | break; |
| 4186 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4187 | case 192: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4188 | |
| 4189 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4190 | FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4191 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4192 | (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4193 | } |
| 4194 | break; |
| 4195 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4196 | case 193: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4197 | |
| 4198 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4199 | FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4200 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4201 | (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4202 | } |
| 4203 | break; |
| 4204 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4205 | case 194: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4206 | |
| 4207 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4208 | FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4209 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4210 | (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4211 | } |
| 4212 | break; |
| 4213 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4214 | case 195: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4215 | |
| 4216 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4217 | FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4218 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4219 | (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4220 | } |
| 4221 | break; |
| 4222 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4223 | case 196: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4224 | |
| 4225 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4226 | FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4227 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4228 | (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4229 | } |
| 4230 | break; |
| 4231 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4232 | case 197: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4233 | |
| 4234 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4235 | FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4236 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4237 | (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4238 | } |
| 4239 | break; |
| 4240 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4241 | case 198: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4242 | |
| 4243 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4244 | FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4245 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4246 | (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4247 | } |
| 4248 | break; |
| 4249 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4250 | case 199: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4251 | |
| 4252 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4253 | FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4254 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4255 | (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4256 | } |
| 4257 | break; |
| 4258 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4259 | case 200: |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4260 | |
| 4261 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4262 | FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4263 | (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); |
| 4264 | (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 4265 | } |
| 4266 | break; |
| 4267 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4268 | case 201: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4269 | |
| 4270 | { |
| 4271 | // |
| 4272 | // This is for user defined type names. The lexical phase looked up the |
| 4273 | // type. |
| 4274 | // |
| 4275 | TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType(); |
| 4276 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4277 | (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4278 | (yyval.interm.type).userDef = &structure; |
| 4279 | } |
| 4280 | break; |
| 4281 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4282 | case 202: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4283 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4284 | { 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] | 4285 | break; |
| 4286 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4287 | case 203: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4288 | |
| 4289 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4290 | (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] | 4291 | } |
| 4292 | break; |
| 4293 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4294 | case 204: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4295 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4296 | { 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] | 4297 | break; |
| 4298 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4299 | case 205: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4300 | |
| 4301 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4302 | (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] | 4303 | } |
| 4304 | break; |
| 4305 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4306 | case 206: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4307 | |
| 4308 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4309 | (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4310 | } |
| 4311 | break; |
| 4312 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4313 | case 207: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4314 | |
| 4315 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4316 | (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList); |
| 4317 | for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) { |
| 4318 | TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i]; |
| 4319 | for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) { |
| 4320 | if ((*(yyval.interm.fieldList))[j]->name() == field->name()) { |
| 4321 | 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] | 4322 | context->recover(); |
| 4323 | } |
| 4324 | } |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4325 | (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4326 | } |
| 4327 | } |
| 4328 | break; |
| 4329 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4330 | case 208: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4331 | |
| 4332 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4333 | (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] | 4334 | } |
| 4335 | break; |
| 4336 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4337 | case 209: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4338 | |
| 4339 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4340 | // ES3 Only, but errors should be handled elsewhere |
| 4341 | (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier; |
| 4342 | (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier; |
| 4343 | (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList)); |
| 4344 | } |
| 4345 | break; |
| 4346 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4347 | case 210: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4348 | |
| 4349 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4350 | (yyval.interm.fieldList) = NewPoolTFieldList(); |
| 4351 | (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4352 | } |
| 4353 | break; |
| 4354 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4355 | case 211: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4356 | |
| 4357 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4358 | (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4359 | } |
| 4360 | break; |
| 4361 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4362 | case 212: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4363 | |
| 4364 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4365 | if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4366 | context->recover(); |
| 4367 | |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4368 | TType* type = new TType(EbtVoid, EbpUndefined); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4369 | (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] | 4370 | } |
| 4371 | break; |
| 4372 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4373 | case 213: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4374 | |
| 4375 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4376 | if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4377 | context->recover(); |
| 4378 | |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4379 | TType* type = new TType(EbtVoid, EbpUndefined); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4380 | int size; |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4381 | 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] | 4382 | context->recover(); |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4383 | type->setArraySize(size); |
| 4384 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4385 | (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] | 4386 | } |
| 4387 | break; |
| 4388 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4389 | case 214: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4390 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4391 | { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4392 | break; |
| 4393 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4394 | case 215: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4395 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4396 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4397 | break; |
| 4398 | |
| 4399 | case 216: |
| 4400 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4401 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); } |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4402 | break; |
| 4403 | |
| 4404 | case 217: |
| 4405 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4406 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4407 | break; |
| 4408 | |
| 4409 | case 218: |
| 4410 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4411 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4412 | break; |
| 4413 | |
| 4414 | case 219: |
| 4415 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4416 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4417 | break; |
| 4418 | |
| 4419 | case 220: |
| 4420 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4421 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4422 | break; |
| 4423 | |
| 4424 | case 221: |
| 4425 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4426 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4427 | break; |
| 4428 | |
| 4429 | case 222: |
| 4430 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4431 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4432 | break; |
| 4433 | |
| 4434 | case 223: |
| 4435 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4436 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4437 | break; |
| 4438 | |
| 4439 | case 224: |
| 4440 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4441 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4442 | break; |
| 4443 | |
| 4444 | case 225: |
| 4445 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4446 | { (yyval.interm.intermAggregate) = 0; } |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4447 | break; |
| 4448 | |
| 4449 | case 226: |
| 4450 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4451 | { context->symbolTable.push(); } |
| 4452 | break; |
| 4453 | |
| 4454 | case 227: |
| 4455 | |
| 4456 | { context->symbolTable.pop(); } |
| 4457 | break; |
| 4458 | |
| 4459 | case 228: |
| 4460 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4461 | { |
| 4462 | if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) { |
| 4463 | (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4464 | (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4465 | } |
| 4466 | (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate); |
| 4467 | } |
| 4468 | break; |
| 4469 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4470 | case 229: |
| 4471 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4472 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4473 | break; |
| 4474 | |
| 4475 | case 230: |
| 4476 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4477 | { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4478 | break; |
| 4479 | |
| 4480 | case 231: |
| 4481 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4482 | { context->symbolTable.push(); } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4483 | break; |
| 4484 | |
| 4485 | case 232: |
| 4486 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4487 | { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } |
| 4488 | break; |
| 4489 | |
| 4490 | case 233: |
| 4491 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4492 | { context->symbolTable.push(); } |
| 4493 | break; |
| 4494 | |
| 4495 | case 234: |
| 4496 | |
| 4497 | { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); } |
| 4498 | break; |
| 4499 | |
| 4500 | case 235: |
| 4501 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4502 | { |
| 4503 | (yyval.interm.intermNode) = 0; |
| 4504 | } |
| 4505 | break; |
| 4506 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4507 | case 236: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4508 | |
| 4509 | { |
| 4510 | if ((yyvsp[(2) - (3)].interm.intermAggregate)) { |
| 4511 | (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4512 | (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4513 | } |
| 4514 | (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate); |
| 4515 | } |
| 4516 | break; |
| 4517 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4518 | case 237: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4519 | |
| 4520 | { |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 4521 | (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4522 | } |
| 4523 | break; |
| 4524 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4525 | case 238: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4526 | |
| 4527 | { |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 4528 | (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] | 4529 | } |
| 4530 | break; |
| 4531 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4532 | case 239: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4533 | |
| 4534 | { (yyval.interm.intermNode) = 0; } |
| 4535 | break; |
| 4536 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4537 | case 240: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4538 | |
| 4539 | { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); } |
| 4540 | break; |
| 4541 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4542 | case 241: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4543 | |
| 4544 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4545 | if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4546 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4547 | (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] | 4548 | } |
| 4549 | break; |
| 4550 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4551 | case 242: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4552 | |
| 4553 | { |
| 4554 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); |
| 4555 | (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); |
| 4556 | } |
| 4557 | break; |
| 4558 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4559 | case 243: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4560 | |
| 4561 | { |
| 4562 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); |
| 4563 | (yyval.interm.nodePair).node2 = 0; |
| 4564 | } |
| 4565 | break; |
| 4566 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4567 | case 244: |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4568 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4569 | { context->incrSwitchNestingLevel(); } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4570 | break; |
| 4571 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4572 | case 245: |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4573 | |
| 4574 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4575 | (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)])); |
| 4576 | context->decrSwitchNestingLevel(); |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4577 | } |
| 4578 | break; |
| 4579 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4580 | case 246: |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4581 | |
| 4582 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4583 | (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] | 4584 | } |
| 4585 | break; |
| 4586 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4587 | case 247: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4588 | |
| 4589 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4590 | (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)])); |
| 4591 | } |
| 4592 | break; |
| 4593 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4594 | case 248: |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4595 | |
| 4596 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4597 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 4598 | if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode))) |
| 4599 | context->recover(); |
| 4600 | } |
| 4601 | break; |
| 4602 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4603 | case 249: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4604 | |
| 4605 | { |
| 4606 | TIntermNode* intermNode; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4607 | if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4608 | context->recover(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4609 | if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4610 | context->recover(); |
| 4611 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4612 | 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] | 4613 | (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode); |
| 4614 | else { |
| 4615 | context->recover(); |
| 4616 | (yyval.interm.intermTypedNode) = 0; |
| 4617 | } |
| 4618 | } |
| 4619 | break; |
| 4620 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4621 | case 250: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4622 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4623 | { context->symbolTable.push(); context->incrLoopNestingLevel(); } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4624 | break; |
| 4625 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4626 | case 251: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4627 | |
| 4628 | { |
| 4629 | context->symbolTable.pop(); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4630 | (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] | 4631 | context->decrLoopNestingLevel(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4632 | } |
| 4633 | break; |
| 4634 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4635 | case 252: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4636 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4637 | { context->incrLoopNestingLevel(); } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4638 | break; |
| 4639 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4640 | case 253: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4641 | |
| 4642 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4643 | if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4644 | context->recover(); |
| 4645 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4646 | (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] | 4647 | context->decrLoopNestingLevel(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4648 | } |
| 4649 | break; |
| 4650 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4651 | case 254: |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4652 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4653 | { context->symbolTable.push(); context->incrLoopNestingLevel(); } |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 4654 | break; |
| 4655 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4656 | case 255: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4657 | |
| 4658 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4659 | context->symbolTable.pop(); |
| 4660 | (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] | 4661 | context->decrLoopNestingLevel(); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4662 | } |
| 4663 | break; |
| 4664 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4665 | case 256: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4666 | |
| 4667 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4668 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4669 | } |
| 4670 | break; |
| 4671 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4672 | case 257: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4673 | |
| 4674 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4675 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4676 | } |
| 4677 | break; |
| 4678 | |
| 4679 | case 258: |
| 4680 | |
| 4681 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4682 | (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); |
| 4683 | } |
| 4684 | break; |
| 4685 | |
| 4686 | case 259: |
| 4687 | |
| 4688 | { |
| 4689 | (yyval.interm.intermTypedNode) = 0; |
| 4690 | } |
| 4691 | break; |
| 4692 | |
| 4693 | case 260: |
| 4694 | |
| 4695 | { |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4696 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); |
| 4697 | (yyval.interm.nodePair).node2 = 0; |
| 4698 | } |
| 4699 | break; |
| 4700 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4701 | case 261: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4702 | |
| 4703 | { |
| 4704 | (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); |
| 4705 | (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); |
| 4706 | } |
| 4707 | break; |
| 4708 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4709 | case 262: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4710 | |
| 4711 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4712 | (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4713 | } |
| 4714 | break; |
| 4715 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4716 | case 263: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4717 | |
| 4718 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4719 | (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4720 | } |
| 4721 | break; |
| 4722 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4723 | case 264: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4724 | |
| 4725 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4726 | (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4727 | } |
| 4728 | break; |
| 4729 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4730 | case 265: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4731 | |
| 4732 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4733 | (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] | 4734 | } |
| 4735 | break; |
| 4736 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4737 | case 266: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4738 | |
| 4739 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4740 | FRAG_ONLY("discard", (yylsp[(1) - (2)])); |
| 4741 | (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4742 | } |
| 4743 | break; |
| 4744 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4745 | case 267: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4746 | |
| 4747 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4748 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4749 | context->setTreeRoot((yyval.interm.intermNode)); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4750 | } |
| 4751 | break; |
| 4752 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4753 | case 268: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4754 | |
| 4755 | { |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 4756 | (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] | 4757 | context->setTreeRoot((yyval.interm.intermNode)); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4758 | } |
| 4759 | break; |
| 4760 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4761 | case 269: |
| 4762 | |
| 4763 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4764 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| 4765 | } |
| 4766 | break; |
| 4767 | |
| 4768 | case 270: |
| 4769 | |
| 4770 | { |
| 4771 | (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); |
| 4772 | } |
| 4773 | break; |
| 4774 | |
| 4775 | case 271: |
| 4776 | |
| 4777 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4778 | TFunction* function = (yyvsp[(1) - (1)].interm).function; |
| 4779 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4780 | const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4781 | |
| 4782 | if (builtIn) |
| 4783 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4784 | 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] | 4785 | context->recover(); |
| 4786 | } |
| 4787 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4788 | TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion())); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4789 | // |
| 4790 | // Note: 'prevDec' could be 'function' if this is the first time we've seen function |
| 4791 | // as it would have just been put in the symbol table. Otherwise, we're looking up |
| 4792 | // an earlier occurance. |
| 4793 | // |
| 4794 | if (prevDec->isDefined()) { |
| 4795 | // |
| 4796 | // Then this function already has a body. |
| 4797 | // |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4798 | 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] | 4799 | context->recover(); |
| 4800 | } |
| 4801 | prevDec->setDefined(); |
| 4802 | |
| 4803 | // |
| 4804 | // Raise error message if main function takes any parameters or return anything other than void |
| 4805 | // |
| 4806 | if (function->getName() == "main") { |
| 4807 | if (function->getParamCount() > 0) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4808 | 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] | 4809 | context->recover(); |
| 4810 | } |
| 4811 | if (function->getReturnType().getBasicType() != EbtVoid) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4812 | 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] | 4813 | context->recover(); |
| 4814 | } |
| 4815 | } |
| 4816 | |
| 4817 | // |
| 4818 | // Remember the return type for later checking for RETURN statements. |
| 4819 | // |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4820 | context->setCurrentFunctionType(&(prevDec->getReturnType())); |
| 4821 | context->setFunctionReturnsValue(false); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4822 | |
| 4823 | // |
| 4824 | // Insert parameters into the symbol table. |
| 4825 | // If the parameter has no name, it's not an error, just don't insert it |
| 4826 | // (could be used for unused args). |
| 4827 | // |
| 4828 | // Also, accumulate the list of parameters into the HIL, so lower level code |
| 4829 | // knows where to find parameters. |
| 4830 | // |
| 4831 | TIntermAggregate* paramNodes = new TIntermAggregate; |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4832 | for (size_t i = 0; i < function->getParamCount(); i++) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4833 | const TParameter& param = function->getParam(i); |
| 4834 | if (param.name != 0) { |
| 4835 | TVariable *variable = new TVariable(param.name, *param.type); |
| 4836 | // |
| 4837 | // Insert the parameters with name in the symbol table. |
| 4838 | // |
Nicolas Capens | d603ecd | 2015-02-18 14:52:21 -0500 | [diff] [blame] | 4839 | if (! context->symbolTable.declare(*variable)) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4840 | context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4841 | context->recover(); |
| 4842 | delete variable; |
| 4843 | } |
| 4844 | |
| 4845 | // |
| 4846 | // Add the parameter to the HIL |
| 4847 | // |
| 4848 | paramNodes = context->intermediate.growAggregate( |
| 4849 | paramNodes, |
| 4850 | context->intermediate.addSymbol(variable->getUniqueId(), |
| 4851 | variable->getName(), |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4852 | variable->getType(), (yylsp[(1) - (1)])), |
| 4853 | (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4854 | } else { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4855 | 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] | 4856 | } |
| 4857 | } |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4858 | context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4859 | (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes; |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4860 | context->setLoopNestingLevel(0); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4861 | } |
| 4862 | break; |
| 4863 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame^] | 4864 | case 272: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4865 | |
| 4866 | { |
| 4867 | //?? Check that all paths return a value if return type != void ? |
| 4868 | // May be best done as post process phase on intermediate code |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4869 | if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4870 | 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] | 4871 | context->recover(); |
| 4872 | } |
| 4873 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 4874 | (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] | 4875 | context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4876 | (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str()); |
| 4877 | (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType()); |
| 4878 | |
| 4879 | // store the pragma information for debug and optimize and other vendor specific |
| 4880 | // information. This information can be queried from the parse tree |
| 4881 | (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize); |
| 4882 | (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug); |
| 4883 | |
| 4884 | if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()) |
| 4885 | (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine()); |
| 4886 | |
| 4887 | context->symbolTable.pop(); |
| 4888 | } |
| 4889 | break; |
| 4890 | |
| 4891 | |
| 4892 | |
| 4893 | default: break; |
| 4894 | } |
| 4895 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 4896 | |
| 4897 | YYPOPSTACK (yylen); |
| 4898 | yylen = 0; |
| 4899 | YY_STACK_PRINT (yyss, yyssp); |
| 4900 | |
| 4901 | *++yyvsp = yyval; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4902 | *++yylsp = yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4903 | |
| 4904 | /* Now `shift' the result of the reduction. Determine what state |
| 4905 | that goes to, based on the state we popped back to and the rule |
| 4906 | number reduced by. */ |
| 4907 | |
| 4908 | yyn = yyr1[yyn]; |
| 4909 | |
| 4910 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 4911 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 4912 | yystate = yytable[yystate]; |
| 4913 | else |
| 4914 | yystate = yydefgoto[yyn - YYNTOKENS]; |
| 4915 | |
| 4916 | goto yynewstate; |
| 4917 | |
| 4918 | |
| 4919 | /*------------------------------------. |
| 4920 | | yyerrlab -- here on detecting error | |
| 4921 | `------------------------------------*/ |
| 4922 | yyerrlab: |
| 4923 | /* If not already recovering from an error, report this error. */ |
| 4924 | if (!yyerrstatus) |
| 4925 | { |
| 4926 | ++yynerrs; |
| 4927 | #if ! YYERROR_VERBOSE |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4928 | yyerror (&yylloc, context, YY_("syntax error")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4929 | #else |
| 4930 | { |
| 4931 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
| 4932 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
| 4933 | { |
| 4934 | YYSIZE_T yyalloc = 2 * yysize; |
| 4935 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 4936 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
| 4937 | if (yymsg != yymsgbuf) |
| 4938 | YYSTACK_FREE (yymsg); |
| 4939 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
| 4940 | if (yymsg) |
| 4941 | yymsg_alloc = yyalloc; |
| 4942 | else |
| 4943 | { |
| 4944 | yymsg = yymsgbuf; |
| 4945 | yymsg_alloc = sizeof yymsgbuf; |
| 4946 | } |
| 4947 | } |
| 4948 | |
| 4949 | if (0 < yysize && yysize <= yymsg_alloc) |
| 4950 | { |
| 4951 | (void) yysyntax_error (yymsg, yystate, yychar); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4952 | yyerror (&yylloc, context, yymsg); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4953 | } |
| 4954 | else |
| 4955 | { |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4956 | yyerror (&yylloc, context, YY_("syntax error")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4957 | if (yysize != 0) |
| 4958 | goto yyexhaustedlab; |
| 4959 | } |
| 4960 | } |
| 4961 | #endif |
| 4962 | } |
| 4963 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4964 | yyerror_range[0] = yylloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4965 | |
| 4966 | if (yyerrstatus == 3) |
| 4967 | { |
| 4968 | /* If just tried and failed to reuse lookahead token after an |
| 4969 | error, discard it. */ |
| 4970 | |
| 4971 | if (yychar <= YYEOF) |
| 4972 | { |
| 4973 | /* Return failure if at end of input. */ |
| 4974 | if (yychar == YYEOF) |
| 4975 | YYABORT; |
| 4976 | } |
| 4977 | else |
| 4978 | { |
| 4979 | yydestruct ("Error: discarding", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 4980 | yytoken, &yylval, &yylloc, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4981 | yychar = YYEMPTY; |
| 4982 | } |
| 4983 | } |
| 4984 | |
| 4985 | /* Else will try to reuse lookahead token after shifting the error |
| 4986 | token. */ |
| 4987 | goto yyerrlab1; |
| 4988 | |
| 4989 | |
| 4990 | /*---------------------------------------------------. |
| 4991 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 4992 | `---------------------------------------------------*/ |
| 4993 | yyerrorlab: |
| 4994 | |
| 4995 | /* Pacify compilers like GCC when the user code never invokes |
| 4996 | YYERROR and the label yyerrorlab therefore never appears in user |
| 4997 | code. */ |
| 4998 | if (/*CONSTCOND*/ 0) |
| 4999 | goto yyerrorlab; |
| 5000 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5001 | yyerror_range[0] = yylsp[1-yylen]; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5002 | /* Do not reclaim the symbols of the rule which action triggered |
| 5003 | this YYERROR. */ |
| 5004 | YYPOPSTACK (yylen); |
| 5005 | yylen = 0; |
| 5006 | YY_STACK_PRINT (yyss, yyssp); |
| 5007 | yystate = *yyssp; |
| 5008 | goto yyerrlab1; |
| 5009 | |
| 5010 | |
| 5011 | /*-------------------------------------------------------------. |
| 5012 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 5013 | `-------------------------------------------------------------*/ |
| 5014 | yyerrlab1: |
| 5015 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 5016 | |
| 5017 | for (;;) |
| 5018 | { |
| 5019 | yyn = yypact[yystate]; |
| 5020 | if (yyn != YYPACT_NINF) |
| 5021 | { |
| 5022 | yyn += YYTERROR; |
| 5023 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 5024 | { |
| 5025 | yyn = yytable[yyn]; |
| 5026 | if (0 < yyn) |
| 5027 | break; |
| 5028 | } |
| 5029 | } |
| 5030 | |
| 5031 | /* Pop the current state because it cannot handle the error token. */ |
| 5032 | if (yyssp == yyss) |
| 5033 | YYABORT; |
| 5034 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5035 | yyerror_range[0] = *yylsp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5036 | yydestruct ("Error: popping", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5037 | yystos[yystate], yyvsp, yylsp, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5038 | YYPOPSTACK (1); |
| 5039 | yystate = *yyssp; |
| 5040 | YY_STACK_PRINT (yyss, yyssp); |
| 5041 | } |
| 5042 | |
| 5043 | *++yyvsp = yylval; |
| 5044 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5045 | yyerror_range[1] = yylloc; |
| 5046 | /* Using YYLLOC is tempting, but would change the location of |
| 5047 | the lookahead. YYLOC is available though. */ |
| 5048 | YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); |
| 5049 | *++yylsp = yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5050 | |
| 5051 | /* Shift the error token. */ |
| 5052 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 5053 | |
| 5054 | yystate = yyn; |
| 5055 | goto yynewstate; |
| 5056 | |
| 5057 | |
| 5058 | /*-------------------------------------. |
| 5059 | | yyacceptlab -- YYACCEPT comes here. | |
| 5060 | `-------------------------------------*/ |
| 5061 | yyacceptlab: |
| 5062 | yyresult = 0; |
| 5063 | goto yyreturn; |
| 5064 | |
| 5065 | /*-----------------------------------. |
| 5066 | | yyabortlab -- YYABORT comes here. | |
| 5067 | `-----------------------------------*/ |
| 5068 | yyabortlab: |
| 5069 | yyresult = 1; |
| 5070 | goto yyreturn; |
| 5071 | |
| 5072 | #if !defined(yyoverflow) || YYERROR_VERBOSE |
| 5073 | /*-------------------------------------------------. |
| 5074 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 5075 | `-------------------------------------------------*/ |
| 5076 | yyexhaustedlab: |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5077 | yyerror (&yylloc, context, YY_("memory exhausted")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5078 | yyresult = 2; |
| 5079 | /* Fall through. */ |
| 5080 | #endif |
| 5081 | |
| 5082 | yyreturn: |
| 5083 | if (yychar != YYEMPTY) |
| 5084 | yydestruct ("Cleanup: discarding lookahead", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5085 | yytoken, &yylval, &yylloc, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5086 | /* Do not reclaim the symbols of the rule which action triggered |
| 5087 | this YYABORT or YYACCEPT. */ |
| 5088 | YYPOPSTACK (yylen); |
| 5089 | YY_STACK_PRINT (yyss, yyssp); |
| 5090 | while (yyssp != yyss) |
| 5091 | { |
| 5092 | yydestruct ("Cleanup: popping", |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5093 | yystos[*yyssp], yyvsp, yylsp, context); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5094 | YYPOPSTACK (1); |
| 5095 | } |
| 5096 | #ifndef yyoverflow |
| 5097 | if (yyss != yyssa) |
| 5098 | YYSTACK_FREE (yyss); |
| 5099 | #endif |
| 5100 | #if YYERROR_VERBOSE |
| 5101 | if (yymsg != yymsgbuf) |
| 5102 | YYSTACK_FREE (yymsg); |
| 5103 | #endif |
| 5104 | /* Make sure YYID is used. */ |
| 5105 | return YYID (yyresult); |
| 5106 | } |
| 5107 | |
| 5108 | |
| 5109 | |
| 5110 | |
| 5111 | |
| 5112 | int glslang_parse(TParseContext* context) { |
| 5113 | return yyparse(context); |
| 5114 | } |
| 5115 | |