Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 3.0.4. */ |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 2 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3 | /* Bison implementation for Yacc-like parsers in C |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5 | Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. |
| 6 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 7 | This program is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation, either version 3 of the License, or |
| 10 | (at your option) any later version. |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 11 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 16 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | |
| 20 | /* As a special exception, you may create a larger work that contains |
| 21 | part or all of the Bison parser skeleton and distribute that work |
| 22 | under terms of your choice, so long as that work isn't itself a |
| 23 | parser generator using the skeleton or a modified version thereof |
| 24 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 25 | the parser skeleton itself, you may (at your option) remove this |
| 26 | special exception, which will cause the skeleton and the resulting |
| 27 | Bison output files to be licensed under the GNU General Public |
| 28 | License without this special exception. |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 29 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 30 | This special exception was added by the Free Software Foundation in |
| 31 | version 2.2 of Bison. */ |
| 32 | |
| 33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 34 | simplifying the original so-called "semantic" parser. */ |
| 35 | |
| 36 | /* All symbols defined below should begin with yy or YY, to avoid |
| 37 | infringing on user name space. This should be done even for local |
| 38 | variables, as they might otherwise be expanded by user macros. |
| 39 | There are some unavoidable exceptions within include files to |
| 40 | define necessary library symbols; they are noted "INFRINGES ON |
| 41 | USER NAME SPACE" below. */ |
| 42 | |
| 43 | /* Identify Bison output. */ |
| 44 | #define YYBISON 1 |
| 45 | |
| 46 | /* Bison version. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 47 | #define YYBISON_VERSION "3.0.4" |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 48 | |
| 49 | /* Skeleton name. */ |
| 50 | #define YYSKELETON_NAME "yacc.c" |
| 51 | |
| 52 | /* Pure parsers. */ |
| 53 | #define YYPURE 1 |
| 54 | |
| 55 | /* Push parsers. */ |
| 56 | #define YYPUSH 0 |
| 57 | |
| 58 | /* Pull parsers. */ |
| 59 | #define YYPULL 1 |
| 60 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 61 | |
| 62 | |
| 63 | |
| 64 | /* Copy the first part of user declarations. */ |
| 65 | |
| 66 | |
| 67 | // |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 68 | // Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved. |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 69 | // Use of this source code is governed by a BSD-style license that can be |
| 70 | // found in the LICENSE file. |
| 71 | // |
| 72 | |
| 73 | // This file is auto-generated by generate_parser.sh. DO NOT EDIT! |
| 74 | |
| 75 | // Ignore errors in auto-generated code. |
| 76 | #if defined(__GNUC__) |
| 77 | #pragma GCC diagnostic ignored "-Wunused-function" |
| 78 | #pragma GCC diagnostic ignored "-Wunused-variable" |
| 79 | #pragma GCC diagnostic ignored "-Wswitch-enum" |
| 80 | #elif defined(_MSC_VER) |
| 81 | #pragma warning(disable: 4065) |
| 82 | #pragma warning(disable: 4189) |
| 83 | #pragma warning(disable: 4505) |
| 84 | #pragma warning(disable: 4701) |
| 85 | #endif |
| 86 | |
Nicolas Capens | cc863da | 2015-01-21 15:50:55 -0500 | [diff] [blame] | 87 | #include "SymbolTable.h" |
| 88 | #include "ParseHelper.h" |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 89 | |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 90 | #define YYENABLE_NLS 0 |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 91 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 92 | |
| 93 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 94 | # ifndef YY_NULLPTR |
| 95 | # if defined __cplusplus && 201103L <= __cplusplus |
| 96 | # define YY_NULLPTR nullptr |
| 97 | # else |
| 98 | # define YY_NULLPTR 0 |
| 99 | # endif |
| 100 | # endif |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 101 | |
| 102 | /* Enabling verbose error messages. */ |
| 103 | #ifdef YYERROR_VERBOSE |
| 104 | # undef YYERROR_VERBOSE |
| 105 | # define YYERROR_VERBOSE 1 |
| 106 | #else |
| 107 | # define YYERROR_VERBOSE 0 |
| 108 | #endif |
| 109 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 110 | /* In a future release of Bison, this section will be replaced |
| 111 | by #include "glslang_tab.h". */ |
| 112 | #ifndef YY_YY_GLSLANG_TAB_H_INCLUDED |
| 113 | # define YY_YY_GLSLANG_TAB_H_INCLUDED |
| 114 | /* Debug traces. */ |
| 115 | #ifndef YYDEBUG |
| 116 | # define YYDEBUG 0 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 117 | #endif |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 118 | #if YYDEBUG |
| 119 | extern int yydebug; |
| 120 | #endif |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 121 | /* "%code requires" blocks. */ |
| 122 | |
| 123 | |
| 124 | #define YYLTYPE TSourceLoc |
| 125 | #define YYLTYPE_IS_DECLARED 1 |
| 126 | |
| 127 | |
| 128 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 129 | /* Token type. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 130 | #ifndef YYTOKENTYPE |
| 131 | # define YYTOKENTYPE |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 132 | enum yytokentype |
| 133 | { |
| 134 | INVARIANT = 258, |
| 135 | HIGH_PRECISION = 259, |
| 136 | MEDIUM_PRECISION = 260, |
| 137 | LOW_PRECISION = 261, |
| 138 | PRECISION = 262, |
| 139 | ATTRIBUTE = 263, |
| 140 | CONST_QUAL = 264, |
| 141 | BOOL_TYPE = 265, |
| 142 | FLOAT_TYPE = 266, |
| 143 | INT_TYPE = 267, |
| 144 | UINT_TYPE = 268, |
| 145 | BREAK = 269, |
| 146 | CONTINUE = 270, |
| 147 | DO = 271, |
| 148 | ELSE = 272, |
| 149 | FOR = 273, |
| 150 | IF = 274, |
| 151 | DISCARD = 275, |
| 152 | RETURN = 276, |
| 153 | SWITCH = 277, |
| 154 | CASE = 278, |
| 155 | DEFAULT = 279, |
| 156 | BVEC2 = 280, |
| 157 | BVEC3 = 281, |
| 158 | BVEC4 = 282, |
| 159 | IVEC2 = 283, |
| 160 | IVEC3 = 284, |
| 161 | IVEC4 = 285, |
| 162 | VEC2 = 286, |
| 163 | VEC3 = 287, |
| 164 | VEC4 = 288, |
| 165 | UVEC2 = 289, |
| 166 | UVEC3 = 290, |
| 167 | UVEC4 = 291, |
| 168 | MATRIX2 = 292, |
| 169 | MATRIX3 = 293, |
| 170 | MATRIX4 = 294, |
| 171 | IN_QUAL = 295, |
| 172 | OUT_QUAL = 296, |
| 173 | INOUT_QUAL = 297, |
| 174 | UNIFORM = 298, |
| 175 | VARYING = 299, |
| 176 | MATRIX2x3 = 300, |
| 177 | MATRIX3x2 = 301, |
| 178 | MATRIX2x4 = 302, |
| 179 | MATRIX4x2 = 303, |
| 180 | MATRIX3x4 = 304, |
| 181 | MATRIX4x3 = 305, |
| 182 | CENTROID = 306, |
| 183 | FLAT = 307, |
| 184 | SMOOTH = 308, |
| 185 | STRUCT = 309, |
| 186 | VOID_TYPE = 310, |
| 187 | WHILE = 311, |
| 188 | SAMPLER2D = 312, |
| 189 | SAMPLERCUBE = 313, |
| 190 | SAMPLER_EXTERNAL_OES = 314, |
| 191 | SAMPLER2DRECT = 315, |
| 192 | SAMPLER2DARRAY = 316, |
| 193 | ISAMPLER2D = 317, |
| 194 | ISAMPLER3D = 318, |
| 195 | ISAMPLERCUBE = 319, |
| 196 | ISAMPLER2DARRAY = 320, |
| 197 | USAMPLER2D = 321, |
| 198 | USAMPLER3D = 322, |
| 199 | USAMPLERCUBE = 323, |
| 200 | USAMPLER2DARRAY = 324, |
| 201 | SAMPLER3D = 325, |
| 202 | SAMPLER3DRECT = 326, |
| 203 | SAMPLER2DSHADOW = 327, |
| 204 | SAMPLERCUBESHADOW = 328, |
| 205 | SAMPLER2DARRAYSHADOW = 329, |
| 206 | LAYOUT = 330, |
| 207 | IDENTIFIER = 331, |
| 208 | TYPE_NAME = 332, |
| 209 | FLOATCONSTANT = 333, |
| 210 | INTCONSTANT = 334, |
| 211 | UINTCONSTANT = 335, |
| 212 | BOOLCONSTANT = 336, |
| 213 | FIELD_SELECTION = 337, |
| 214 | LEFT_OP = 338, |
| 215 | RIGHT_OP = 339, |
| 216 | INC_OP = 340, |
| 217 | DEC_OP = 341, |
| 218 | LE_OP = 342, |
| 219 | GE_OP = 343, |
| 220 | EQ_OP = 344, |
| 221 | NE_OP = 345, |
| 222 | AND_OP = 346, |
| 223 | OR_OP = 347, |
| 224 | XOR_OP = 348, |
| 225 | MUL_ASSIGN = 349, |
| 226 | DIV_ASSIGN = 350, |
| 227 | ADD_ASSIGN = 351, |
| 228 | MOD_ASSIGN = 352, |
| 229 | LEFT_ASSIGN = 353, |
| 230 | RIGHT_ASSIGN = 354, |
| 231 | AND_ASSIGN = 355, |
| 232 | XOR_ASSIGN = 356, |
| 233 | OR_ASSIGN = 357, |
| 234 | SUB_ASSIGN = 358, |
| 235 | LEFT_PAREN = 359, |
| 236 | RIGHT_PAREN = 360, |
| 237 | LEFT_BRACKET = 361, |
| 238 | RIGHT_BRACKET = 362, |
| 239 | LEFT_BRACE = 363, |
| 240 | RIGHT_BRACE = 364, |
| 241 | DOT = 365, |
| 242 | COMMA = 366, |
| 243 | COLON = 367, |
| 244 | EQUAL = 368, |
| 245 | SEMICOLON = 369, |
| 246 | BANG = 370, |
| 247 | DASH = 371, |
| 248 | TILDE = 372, |
| 249 | PLUS = 373, |
| 250 | STAR = 374, |
| 251 | SLASH = 375, |
| 252 | PERCENT = 376, |
| 253 | LEFT_ANGLE = 377, |
| 254 | RIGHT_ANGLE = 378, |
| 255 | VERTICAL_BAR = 379, |
| 256 | CARET = 380, |
| 257 | AMPERSAND = 381, |
| 258 | QUESTION = 382 |
| 259 | }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 260 | #endif |
| 261 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 262 | /* Value type. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 263 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 264 | |
| 265 | union YYSTYPE |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 266 | { |
| 267 | |
| 268 | |
| 269 | struct { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 270 | union { |
| 271 | TString *string; |
| 272 | float f; |
| 273 | int i; |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 274 | unsigned int u; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 275 | bool b; |
| 276 | }; |
| 277 | TSymbol* symbol; |
| 278 | } lex; |
| 279 | struct { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 280 | TOperator op; |
| 281 | union { |
| 282 | TIntermNode* intermNode; |
| 283 | TIntermNodePair nodePair; |
| 284 | TIntermTyped* intermTypedNode; |
| 285 | TIntermAggregate* intermAggregate; |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 286 | TIntermSwitch* intermSwitch; |
| 287 | TIntermCase* intermCase; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 288 | }; |
| 289 | union { |
| 290 | TPublicType type; |
| 291 | TPrecision precision; |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 292 | TLayoutQualifier layoutQualifier; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 293 | TQualifier qualifier; |
| 294 | TFunction* function; |
| 295 | TParameter param; |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 296 | TField* field; |
| 297 | TFieldList* fieldList; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 298 | }; |
| 299 | } interm; |
| 300 | |
| 301 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 302 | }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 303 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 304 | typedef union YYSTYPE YYSTYPE; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 305 | # define YYSTYPE_IS_TRIVIAL 1 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 306 | # define YYSTYPE_IS_DECLARED 1 |
| 307 | #endif |
| 308 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 309 | /* Location type. */ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 310 | #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 311 | typedef struct YYLTYPE YYLTYPE; |
| 312 | struct YYLTYPE |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 313 | { |
| 314 | int first_line; |
| 315 | int first_column; |
| 316 | int last_line; |
| 317 | int last_column; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 318 | }; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 319 | # define YYLTYPE_IS_DECLARED 1 |
| 320 | # define YYLTYPE_IS_TRIVIAL 1 |
| 321 | #endif |
| 322 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 323 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 324 | |
| 325 | int yyparse (TParseContext* context, void* yyscanner); |
| 326 | |
| 327 | #endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */ |
| 328 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 329 | /* Copy the second part of user declarations. */ |
| 330 | |
| 331 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 332 | extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 333 | extern void yyerror(YYLTYPE* lloc, TParseContext* context, void* scanner, const char* reason); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 334 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 335 | #define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 336 | do { \ |
| 337 | if (N) { \ |
| 338 | (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \ |
| 339 | (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ |
| 340 | (Current).last_file = YYRHSLOC(Rhs, N).last_file; \ |
| 341 | (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ |
| 342 | } \ |
| 343 | else { \ |
| 344 | (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \ |
| 345 | (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \ |
| 346 | (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \ |
| 347 | (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \ |
| 348 | } \ |
| 349 | } while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 350 | |
| 351 | #define FRAG_VERT_ONLY(S, L) { \ |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 352 | if (context->getShaderType() != GL_FRAGMENT_SHADER && \ |
| 353 | context->getShaderType() != GL_VERTEX_SHADER) { \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 354 | context->error(L, " supported in vertex/fragment shaders only ", S); \ |
| 355 | context->recover(); \ |
| 356 | } \ |
| 357 | } |
| 358 | |
| 359 | #define VERTEX_ONLY(S, L) { \ |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 360 | if (context->getShaderType() != GL_VERTEX_SHADER) { \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 361 | context->error(L, " supported in vertex shaders only ", S); \ |
| 362 | context->recover(); \ |
| 363 | } \ |
| 364 | } |
| 365 | |
| 366 | #define FRAG_ONLY(S, L) { \ |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 367 | if (context->getShaderType() != GL_FRAGMENT_SHADER) { \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 368 | context->error(L, " supported in fragment shaders only ", S); \ |
| 369 | context->recover(); \ |
| 370 | } \ |
| 371 | } |
| 372 | |
Nicolas Capens | c684185 | 2015-02-15 14:25:37 -0500 | [diff] [blame] | 373 | #define ES2_ONLY(S, L) { \ |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 374 | if (context->getShaderVersion() != 100) { \ |
Nicolas Capens | c684185 | 2015-02-15 14:25:37 -0500 | [diff] [blame] | 375 | context->error(L, " supported in GLSL ES 1.00 only ", S); \ |
| 376 | context->recover(); \ |
| 377 | } \ |
| 378 | } |
| 379 | |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 380 | #define ES3_ONLY(TOKEN, LINE, REASON) { \ |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 381 | if (context->getShaderVersion() != 300) { \ |
Alexis Hetu | 3e9e208 | 2015-07-03 16:20:11 -0400 | [diff] [blame] | 382 | context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \ |
Nicolas Capens | c684185 | 2015-02-15 14:25:37 -0500 | [diff] [blame] | 383 | context->recover(); \ |
| 384 | } \ |
| 385 | } |
| 386 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 387 | |
| 388 | |
| 389 | #ifdef short |
| 390 | # undef short |
| 391 | #endif |
| 392 | |
| 393 | #ifdef YYTYPE_UINT8 |
| 394 | typedef YYTYPE_UINT8 yytype_uint8; |
| 395 | #else |
| 396 | typedef unsigned char yytype_uint8; |
| 397 | #endif |
| 398 | |
| 399 | #ifdef YYTYPE_INT8 |
| 400 | typedef YYTYPE_INT8 yytype_int8; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 401 | #else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 402 | typedef signed char yytype_int8; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 403 | #endif |
| 404 | |
| 405 | #ifdef YYTYPE_UINT16 |
| 406 | typedef YYTYPE_UINT16 yytype_uint16; |
| 407 | #else |
| 408 | typedef unsigned short int yytype_uint16; |
| 409 | #endif |
| 410 | |
| 411 | #ifdef YYTYPE_INT16 |
| 412 | typedef YYTYPE_INT16 yytype_int16; |
| 413 | #else |
| 414 | typedef short int yytype_int16; |
| 415 | #endif |
| 416 | |
| 417 | #ifndef YYSIZE_T |
| 418 | # ifdef __SIZE_TYPE__ |
| 419 | # define YYSIZE_T __SIZE_TYPE__ |
| 420 | # elif defined size_t |
| 421 | # define YYSIZE_T size_t |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 422 | # elif ! defined YYSIZE_T |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 423 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 424 | # define YYSIZE_T size_t |
| 425 | # else |
| 426 | # define YYSIZE_T unsigned int |
| 427 | # endif |
| 428 | #endif |
| 429 | |
| 430 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 431 | |
| 432 | #ifndef YY_ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 433 | # if defined YYENABLE_NLS && YYENABLE_NLS |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 434 | # if ENABLE_NLS |
| 435 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 436 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 437 | # endif |
| 438 | # endif |
| 439 | # ifndef YY_ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 440 | # define YY_(Msgid) Msgid |
| 441 | # endif |
| 442 | #endif |
| 443 | |
| 444 | #ifndef YY_ATTRIBUTE |
| 445 | # if (defined __GNUC__ \ |
| 446 | && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
| 447 | || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
| 448 | # define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
| 449 | # else |
| 450 | # define YY_ATTRIBUTE(Spec) /* empty */ |
| 451 | # endif |
| 452 | #endif |
| 453 | |
| 454 | #ifndef YY_ATTRIBUTE_PURE |
| 455 | # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
| 456 | #endif |
| 457 | |
| 458 | #ifndef YY_ATTRIBUTE_UNUSED |
| 459 | # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
| 460 | #endif |
| 461 | |
| 462 | #if !defined _Noreturn \ |
| 463 | && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) |
| 464 | # if defined _MSC_VER && 1200 <= _MSC_VER |
| 465 | # define _Noreturn __declspec (noreturn) |
| 466 | # else |
| 467 | # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 468 | # endif |
| 469 | #endif |
| 470 | |
| 471 | /* Suppress unused-variable warnings by "using" E. */ |
| 472 | #if ! defined lint || defined __GNUC__ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 473 | # define YYUSE(E) ((void) (E)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 474 | #else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 475 | # define YYUSE(E) /* empty */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 476 | #endif |
| 477 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 478 | #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
| 479 | /* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
| 480 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
| 481 | _Pragma ("GCC diagnostic push") \ |
| 482 | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
| 483 | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
| 484 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
| 485 | _Pragma ("GCC diagnostic pop") |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 486 | #else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 487 | # define YY_INITIAL_VALUE(Value) Value |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 488 | #endif |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 489 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 490 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 491 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 492 | #endif |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 493 | #ifndef YY_INITIAL_VALUE |
| 494 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
| 495 | #endif |
| 496 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 497 | |
| 498 | #if ! defined yyoverflow || YYERROR_VERBOSE |
| 499 | |
| 500 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 501 | |
| 502 | # ifdef YYSTACK_USE_ALLOCA |
| 503 | # if YYSTACK_USE_ALLOCA |
| 504 | # ifdef __GNUC__ |
| 505 | # define YYSTACK_ALLOC __builtin_alloca |
| 506 | # elif defined __BUILTIN_VA_ARG_INCR |
| 507 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 508 | # elif defined _AIX |
| 509 | # define YYSTACK_ALLOC __alloca |
| 510 | # elif defined _MSC_VER |
| 511 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 512 | # define alloca _alloca |
| 513 | # else |
| 514 | # define YYSTACK_ALLOC alloca |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 515 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 516 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 517 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
| 518 | # ifndef EXIT_SUCCESS |
| 519 | # define EXIT_SUCCESS 0 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 520 | # endif |
| 521 | # endif |
| 522 | # endif |
| 523 | # endif |
| 524 | # endif |
| 525 | |
| 526 | # ifdef YYSTACK_ALLOC |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 527 | /* Pacify GCC's 'empty if-body' warning. */ |
| 528 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 529 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 530 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 531 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 532 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 533 | to allow for a few compiler-allocated temporary stack slots. */ |
| 534 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
| 535 | # endif |
| 536 | # else |
| 537 | # define YYSTACK_ALLOC YYMALLOC |
| 538 | # define YYSTACK_FREE YYFREE |
| 539 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 540 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 541 | # endif |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 542 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 543 | && ! ((defined YYMALLOC || defined malloc) \ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 544 | && (defined YYFREE || defined free))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 545 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 546 | # ifndef EXIT_SUCCESS |
| 547 | # define EXIT_SUCCESS 0 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 548 | # endif |
| 549 | # endif |
| 550 | # ifndef YYMALLOC |
| 551 | # define YYMALLOC malloc |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 552 | # if ! defined malloc && ! defined EXIT_SUCCESS |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 553 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 554 | # endif |
| 555 | # endif |
| 556 | # ifndef YYFREE |
| 557 | # define YYFREE free |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 558 | # if ! defined free && ! defined EXIT_SUCCESS |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 559 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 560 | # endif |
| 561 | # endif |
| 562 | # endif |
| 563 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 564 | |
| 565 | |
| 566 | #if (! defined yyoverflow \ |
| 567 | && (! defined __cplusplus \ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 568 | || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
| 569 | && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 570 | |
| 571 | /* A type that is properly aligned for any stack member. */ |
| 572 | union yyalloc |
| 573 | { |
| 574 | yytype_int16 yyss_alloc; |
| 575 | YYSTYPE yyvs_alloc; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 576 | YYLTYPE yyls_alloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 577 | }; |
| 578 | |
| 579 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 580 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| 581 | |
| 582 | /* The size of an array large to enough to hold all stacks, each with |
| 583 | N elements. */ |
| 584 | # define YYSTACK_BYTES(N) \ |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 585 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
| 586 | + 2 * YYSTACK_GAP_MAXIMUM) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 587 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 588 | # define YYCOPY_NEEDED 1 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 589 | |
| 590 | /* Relocate STACK from its old location to the new one. The |
| 591 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 592 | elements in the stack, and YYPTR gives the new location of the |
| 593 | stack. Advance YYPTR to a properly aligned location for the next |
| 594 | stack. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 595 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 596 | do \ |
| 597 | { \ |
| 598 | YYSIZE_T yynewbytes; \ |
| 599 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 600 | Stack = &yyptr->Stack_alloc; \ |
| 601 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 602 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 603 | } \ |
| 604 | while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 605 | |
| 606 | #endif |
| 607 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 608 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
| 609 | /* Copy COUNT objects from SRC to DST. The source and destination do |
| 610 | not overlap. */ |
| 611 | # ifndef YYCOPY |
| 612 | # if defined __GNUC__ && 1 < __GNUC__ |
| 613 | # define YYCOPY(Dst, Src, Count) \ |
| 614 | __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
| 615 | # else |
| 616 | # define YYCOPY(Dst, Src, Count) \ |
| 617 | do \ |
| 618 | { \ |
| 619 | YYSIZE_T yyi; \ |
| 620 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 621 | (Dst)[yyi] = (Src)[yyi]; \ |
| 622 | } \ |
| 623 | while (0) |
| 624 | # endif |
| 625 | # endif |
| 626 | #endif /* !YYCOPY_NEEDED */ |
| 627 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 628 | /* YYFINAL -- State number of the termination state. */ |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 629 | #define YYFINAL 112 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 630 | /* YYLAST -- Last index in YYTABLE. */ |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 631 | #define YYLAST 2513 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 632 | |
| 633 | /* YYNTOKENS -- Number of terminals. */ |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 634 | #define YYNTOKENS 128 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 635 | /* YYNNTS -- Number of nonterminals. */ |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 636 | #define YYNNTS 93 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 637 | /* YYNRULES -- Number of rules. */ |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 638 | #define YYNRULES 272 |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 639 | /* YYNSTATES -- Number of states. */ |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 640 | #define YYNSTATES 413 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 641 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 642 | /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned |
| 643 | by yylex, with out-of-bounds checking. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 644 | #define YYUNDEFTOK 2 |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 645 | #define YYMAXUTOK 382 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 646 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 647 | #define YYTRANSLATE(YYX) \ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 648 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| 649 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 650 | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
| 651 | as returned by yylex, without out-of-bounds checking. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 652 | static const yytype_uint8 yytranslate[] = |
| 653 | { |
| 654 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 655 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 656 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 657 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 658 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 659 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 660 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 661 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 662 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 663 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 664 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 665 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 666 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 667 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 668 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 669 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 670 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 671 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 672 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 673 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 674 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 675 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 676 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 677 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 678 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 679 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 680 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 681 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 682 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 683 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 684 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 685 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 686 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 687 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 688 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 689 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 690 | 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, |
| 691 | 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, |
| 692 | 125, 126, 127 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 693 | }; |
| 694 | |
| 695 | #if YYDEBUG |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 696 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 697 | static const yytype_uint16 yyrline[] = |
| 698 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 699 | 0, 213, 213, 232, 235, 240, 245, 250, 255, 261, |
| 700 | 264, 267, 270, 273, 276, 282, 290, 301, 305, 313, |
| 701 | 316, 322, 326, 333, 339, 348, 356, 362, 369, 379, |
| 702 | 382, 385, 388, 398, 399, 400, 401, 409, 410, 414, |
| 703 | 418, 426, 427, 430, 436, 437, 441, 448, 449, 452, |
| 704 | 455, 458, 464, 465, 468, 474, 475, 482, 483, 490, |
| 705 | 491, 498, 499, 505, 506, 512, 513, 519, 520, 526, |
| 706 | 527, 535, 536, 537, 538, 540, 541, 542, 545, 548, |
| 707 | 551, 554, 560, 563, 574, 582, 590, 617, 623, 630, |
| 708 | 634, 638, 642, 649, 686, 689, 696, 704, 725, 746, |
| 709 | 756, 784, 789, 799, 804, 814, 817, 820, 823, 829, |
| 710 | 836, 839, 843, 847, 852, 857, 864, 868, 872, 876, |
| 711 | 881, 886, 890, 897, 907, 913, 916, 922, 928, 935, |
| 712 | 944, 953, 956, 959, 966, 970, 974, 979, 987, 990, |
| 713 | 994, 998, 1007, 1016, 1024, 1034, 1041, 1044, 1047, 1053, |
| 714 | 1060, 1063, 1069, 1072, 1075, 1081, 1084, 1089, 1104, 1108, |
| 715 | 1112, 1116, 1120, 1124, 1129, 1134, 1139, 1144, 1149, 1154, |
| 716 | 1159, 1164, 1169, 1174, 1179, 1184, 1190, 1196, 1202, 1208, |
| 717 | 1214, 1220, 1226, 1232, 1238, 1243, 1248, 1257, 1262, 1267, |
| 718 | 1272, 1277, 1282, 1287, 1292, 1297, 1302, 1307, 1312, 1317, |
| 719 | 1322, 1327, 1340, 1340, 1343, 1343, 1349, 1352, 1368, 1371, |
| 720 | 1380, 1384, 1390, 1397, 1412, 1416, 1420, 1421, 1427, 1428, |
| 721 | 1429, 1430, 1431, 1432, 1433, 1437, 1438, 1438, 1438, 1448, |
| 722 | 1449, 1453, 1453, 1454, 1454, 1459, 1462, 1472, 1475, 1481, |
| 723 | 1482, 1486, 1494, 1498, 1505, 1505, 1512, 1515, 1524, 1529, |
| 724 | 1546, 1546, 1551, 1551, 1558, 1558, 1566, 1569, 1575, 1578, |
| 725 | 1584, 1588, 1595, 1598, 1601, 1604, 1607, 1616, 1620, 1627, |
| 726 | 1630, 1636, 1636 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 727 | }; |
| 728 | #endif |
| 729 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 730 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 731 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 732 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 733 | static const char *const yytname[] = |
| 734 | { |
| 735 | "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION", |
| 736 | "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE", |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 737 | "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE", |
| 738 | "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", |
| 739 | "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", |
Nicolas Capens | e4b1b1d | 2015-02-17 17:26:01 -0500 | [diff] [blame] | 740 | "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2", |
| 741 | "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 742 | "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2", |
| 743 | "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT", |
| 744 | "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES", |
| 745 | "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D", |
| 746 | "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D", |
| 747 | "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT", |
| 748 | "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT", |
| 749 | "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT", |
| 750 | "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", |
| 751 | "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", |
| 752 | "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", |
| 753 | "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", |
| 754 | "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 755 | "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", |
| 756 | "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", |
| 757 | "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", |
| 758 | "AMPERSAND", "QUESTION", "$accept", "variable_identifier", |
| 759 | "primary_expression", "postfix_expression", "integer_expression", |
| 760 | "function_call", "function_call_or_method", "function_call_generic", |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 761 | "function_call_header_no_parameters", |
| 762 | "function_call_header_with_parameters", "function_call_header", |
| 763 | "function_identifier", "unary_expression", "unary_operator", |
| 764 | "multiplicative_expression", "additive_expression", "shift_expression", |
| 765 | "relational_expression", "equality_expression", "and_expression", |
| 766 | "exclusive_or_expression", "inclusive_or_expression", |
| 767 | "logical_and_expression", "logical_xor_expression", |
| 768 | "logical_or_expression", "conditional_expression", |
| 769 | "assignment_expression", "assignment_operator", "expression", |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 770 | "constant_expression", "enter_struct", "declaration", |
| 771 | "function_prototype", "function_declarator", |
| 772 | "function_header_with_parameters", "function_header", |
| 773 | "parameter_declarator", "parameter_declaration", "parameter_qualifier", |
| 774 | "parameter_type_specifier", "init_declarator_list", "single_declaration", |
| 775 | "fully_specified_type", "interpolation_qualifier", |
| 776 | "parameter_type_qualifier", "type_qualifier", "storage_qualifier", |
| 777 | "type_specifier", "precision_qualifier", "layout_qualifier", |
| 778 | "layout_qualifier_id_list", "layout_qualifier_id", |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 779 | "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", |
| 780 | "$@1", "$@2", "struct_declaration_list", "struct_declaration", |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 781 | "struct_declarator_list", "struct_declarator", "initializer", |
| 782 | "declaration_statement", "statement", "simple_statement", |
| 783 | "compound_statement", "$@3", "$@4", "statement_no_new_scope", |
| 784 | "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope", |
| 785 | "statement_list", "expression_statement", "selection_statement", |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 786 | "selection_rest_statement", "switch_statement", "$@7", "case_label", |
| 787 | "condition", "iteration_statement", "$@8", "$@9", "$@10", |
| 788 | "for_init_statement", "conditionopt", "for_rest_statement", |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 789 | "jump_statement", "translation_unit", "external_declaration", |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 790 | "function_definition", "$@11", YY_NULLPTR |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 791 | }; |
| 792 | #endif |
| 793 | |
| 794 | # ifdef YYPRINT |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 795 | /* YYTOKNUM[NUM] -- (External) token number corresponding to the |
| 796 | (internal) symbol number NUM (which must be that of a token). */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 797 | static const yytype_uint16 yytoknum[] = |
| 798 | { |
| 799 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 800 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 801 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 802 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 803 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 804 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 805 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 806 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 807 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
Nicolas Capens | c684185 | 2015-02-15 14:25:37 -0500 | [diff] [blame] | 808 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 809 | 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 810 | 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, |
| 811 | 375, 376, 377, 378, 379, 380, 381, 382 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 812 | }; |
| 813 | # endif |
| 814 | |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 815 | #define YYPACT_NINF -355 |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 816 | |
| 817 | #define yypact_value_is_default(Yystate) \ |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 818 | (!!((Yystate) == (-355))) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 819 | |
| 820 | #define YYTABLE_NINF -232 |
| 821 | |
| 822 | #define yytable_value_is_error(Yytable_value) \ |
| 823 | 0 |
| 824 | |
| 825 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 826 | STATE-NUM. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 827 | static const yytype_int16 yypact[] = |
| 828 | { |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 829 | 2151, 207, -355, -355, -355, 168, -355, -355, -355, -355, |
| 830 | -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, |
| 831 | -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, |
| 832 | -355, -355, -355, -355, -355, -355, -355, -3, -355, -355, |
| 833 | -56, -355, -355, -355, -355, -355, -355, -355, -355, -355, |
| 834 | -355, -355, -355, -355, -355, -355, -355, -355, -61, -355, |
| 835 | -355, -39, -18, -5, 4, -57, -355, 37, 10, 1170, |
| 836 | -355, -355, 2436, 10, -355, 22, -355, 2076, -355, -355, |
| 837 | -355, -355, 10, -355, 2436, -355, -355, 27, -355, 69, |
| 838 | -355, 41, -355, 61, -355, -355, -355, -355, -355, 2300, |
| 839 | 136, 76, -355, -78, -355, 47, -355, 2226, -355, -355, |
| 840 | -355, 1240, -355, -355, -355, 1, -355, 2226, 44, -63, |
| 841 | -355, 50, -355, -355, -355, -355, 137, 2300, -79, -355, |
| 842 | 1338, 1629, -355, 226, 2300, 138, 1821, -355, 113, -355, |
| 843 | -355, -355, -355, -355, 1629, 1629, 1629, -355, -355, -355, |
| 844 | -355, -355, -355, -355, 38, -355, -355, -355, 115, -23, |
| 845 | 1724, 114, -355, 1629, 68, -45, 13, -58, 36, 96, |
| 846 | 98, 101, 135, 139, -71, -355, 121, -355, -355, 2226, |
| 847 | 1906, 83, -355, 69, -355, 630, 123, -355, -355, 1436, |
| 848 | 1629, 117, 124, 190, -355, -355, -355, 138, 130, 7, |
| 849 | -355, -54, -355, -355, -355, -355, -13, -355, -355, 1629, |
| 850 | 2368, -355, -355, 1629, 133, -355, -355, -355, 1629, 1629, |
| 851 | 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, |
| 852 | 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, -355, 1991, |
| 853 | -355, -355, -355, -355, 126, 127, -355, 140, 141, 142, |
| 854 | 1534, 145, 1629, 143, 148, -355, 29, -355, -39, 149, |
| 855 | -355, -355, -355, -355, 630, -355, -355, -355, -355, -355, |
| 856 | -355, 1629, 150, 147, -355, 1629, 155, -355, -355, -355, |
| 857 | -355, -355, -355, -355, -355, -355, -355, -355, 1629, 39, |
| 858 | 1629, 138, -355, -73, -355, -355, 1629, 164, 151, -355, |
| 859 | 169, -355, -355, -355, -355, -355, 68, 68, -45, -45, |
| 860 | 13, 13, 13, 13, -58, -58, 36, 96, 98, 101, |
| 861 | 135, 139, 55, -355, -355, -355, 166, -355, 1629, -355, |
| 862 | -355, 40, 1629, 160, -355, -355, -355, -355, 171, 174, |
| 863 | 1629, 181, -355, 1629, -355, -355, 175, -355, 1629, -355, |
| 864 | -355, -355, 1629, 239, 188, 862, 978, -11, -355, -1, |
| 865 | -355, 1075, -355, -355, -355, 1629, -355, -355, 191, -355, |
| 866 | 193, 398, -355, -355, -355, -355, 1075, 166, -355, 151, |
| 867 | 223, 2300, 195, -355, 187, 1629, -355, 514, -355, 192, |
| 868 | 197, 288, -355, 41, 194, 746, -355, 11, -355, 1629, |
| 869 | 746, 166, -355, 1629, -355, -355, -355, 196, 151, -355, |
| 870 | -355, -355, -355 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 871 | }; |
| 872 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 873 | /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
| 874 | Performed when YYTABLE does not specify something else to do. Zero |
| 875 | means the default is an error. */ |
| 876 | static const yytype_uint16 yydefact[] = |
| 877 | { |
| 878 | 0, 0, 146, 147, 148, 0, 128, 138, 162, 159, |
| 879 | 160, 161, 166, 167, 168, 169, 170, 171, 163, 164, |
| 880 | 165, 172, 173, 174, 175, 176, 177, 139, 140, 143, |
| 881 | 129, 178, 179, 180, 181, 182, 183, 0, 126, 125, |
| 882 | 0, 158, 184, 185, 186, 188, 189, 190, 191, 192, |
| 883 | 193, 194, 195, 196, 187, 197, 198, 199, 0, 201, |
| 884 | 270, 271, 0, 95, 105, 0, 110, 116, 133, 0, |
| 885 | 131, 123, 0, 134, 144, 155, 200, 0, 267, 269, |
| 886 | 130, 122, 0, 136, 0, 141, 142, 0, 204, 0, |
| 887 | 86, 0, 93, 105, 127, 106, 107, 108, 96, 0, |
| 888 | 105, 0, 87, 117, 132, 0, 92, 0, 124, 145, |
| 889 | 135, 0, 1, 268, 137, 0, 202, 0, 152, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 890 | 150, 226, 272, 97, 102, 104, 109, 0, 111, 98, |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 891 | 0, 0, 85, 0, 0, 0, 0, 206, 2, 6, |
| 892 | 4, 5, 7, 28, 0, 0, 0, 156, 35, 34, |
| 893 | 36, 33, 3, 9, 29, 11, 16, 17, 0, 0, |
| 894 | 22, 0, 37, 0, 41, 44, 47, 52, 55, 57, |
| 895 | 59, 61, 63, 65, 67, 84, 0, 26, 88, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 896 | 0, 0, 149, 0, 225, 0, 99, 101, 103, 0, |
| 897 | 0, 0, 0, 37, 69, 214, 121, 0, 212, 0, |
| 898 | 210, 0, 207, 30, 31, 82, 0, 13, 14, 0, |
| 899 | 0, 20, 19, 0, 158, 23, 25, 32, 0, 0, |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 900 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 901 | 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, |
| 902 | 205, 153, 154, 151, 0, 0, 252, 0, 0, 0, |
| 903 | 0, 0, 0, 0, 0, 239, 0, 215, 0, 144, |
| 904 | 218, 237, 217, 216, 227, 219, 220, 221, 222, 223, |
| 905 | 224, 0, 0, 0, 115, 0, 118, 72, 73, 75, |
| 906 | 74, 77, 78, 79, 80, 81, 76, 71, 0, 0, |
| 907 | 0, 0, 208, 0, 89, 8, 0, 0, 15, 27, |
| 908 | 12, 18, 24, 38, 39, 40, 43, 42, 45, 46, |
| 909 | 50, 51, 48, 49, 53, 54, 56, 58, 60, 62, |
| 910 | 64, 66, 0, 203, 263, 262, 233, 254, 0, 266, |
| 911 | 264, 0, 0, 0, 247, 250, 240, 238, 0, 0, |
| 912 | 0, 112, 119, 0, 70, 209, 0, 211, 0, 90, |
| 913 | 83, 10, 0, 0, 0, 0, 0, 0, 265, 0, |
| 914 | 246, 0, 228, 100, 113, 0, 120, 213, 0, 68, |
| 915 | 0, 0, 232, 234, 257, 256, 259, 233, 244, 248, |
| 916 | 0, 0, 0, 114, 0, 0, 235, 0, 258, 0, |
| 917 | 0, 243, 241, 0, 0, 0, 91, 0, 236, 260, |
| 918 | 0, 233, 245, 0, 230, 251, 229, 0, 261, 255, |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 919 | 242, 249, 253 |
| 920 | }; |
| 921 | |
| 922 | /* YYPGOTO[NTERM-NUM]. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 923 | static const yytype_int16 yypgoto[] = |
| 924 | { |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 925 | -355, -355, -355, -355, -355, -355, -355, 99, -355, -355, |
| 926 | -355, -355, -25, -355, -52, -42, -95, -38, 77, 79, |
| 927 | 81, 78, 80, 82, -355, -106, -128, -355, -142, -115, |
| 928 | -355, 12, 14, -355, -355, -355, 189, 224, 219, 198, |
| 929 | -355, -355, -336, 9, -355, -100, 8, -68, 315, -355, |
| 930 | -355, 144, 0, -355, -355, -355, -355, -101, -125, 125, |
| 931 | 30, -182, -32, -258, -337, -89, -355, -355, -74, -354, |
| 932 | -355, -355, -26, -41, -27, -355, -355, -355, -355, -355, |
| 933 | -44, -355, -355, -355, -355, -355, -355, -355, -355, -355, |
| 934 | 254, -355, -355 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 935 | }; |
| 936 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 937 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 938 | static const yytype_int16 yydefgoto[] = |
| 939 | { |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 940 | -1, 152, 153, 154, 297, 155, 156, 157, 158, 159, |
| 941 | 160, 161, 193, 163, 164, 165, 166, 167, 168, 169, |
| 942 | 170, 171, 172, 173, 174, 194, 205, 288, 256, 176, |
| 943 | 107, 257, 258, 62, 63, 64, 124, 98, 99, 125, |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 944 | 65, 66, 67, 68, 100, 69, 70, 71, 72, 73, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 945 | 119, 120, 177, 75, 76, 179, 117, 136, 137, 199, |
| 946 | 200, 196, 260, 261, 262, 263, 185, 338, 405, 353, |
| 947 | 354, 355, 406, 264, 265, 266, 392, 267, 393, 268, |
| 948 | 382, 269, 361, 326, 356, 376, 389, 390, 270, 77, |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 949 | 78, 79, 91 |
| 950 | }; |
| 951 | |
| 952 | /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
| 953 | positive, shift that token. If negative, reduce the rule whose |
| 954 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 955 | static const yytype_int16 yytable[] = |
| 956 | { |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 957 | 74, 108, 122, 195, 206, 175, 337, 134, 274, 83, |
| 958 | 82, 202, 60, 94, 61, 192, 180, 134, 373, 7, |
| 959 | 87, 236, 293, 391, 175, 380, 129, 189, 130, 225, |
| 960 | 226, 126, 215, 348, 190, 131, 134, 85, 86, 135, |
| 961 | 380, 349, 182, 89, 95, 96, 97, 410, 183, 135, |
| 962 | 27, 28, 88, 29, 101, 202, 237, 102, 404, 126, |
| 963 | 294, 37, 195, 404, 227, 228, 197, 298, 135, 74, |
| 964 | 94, 221, 109, 222, 273, 90, 104, 74, 239, 134, |
| 965 | 134, 110, 212, 175, 115, 302, 162, 92, 213, 60, |
| 966 | 114, 61, 295, 342, 377, 322, 223, 224, 296, 74, |
| 967 | 296, 95, 96, 97, 378, 162, 93, 74, 331, -94, |
| 968 | 296, 135, 135, 103, 202, 178, 407, 74, 291, 203, |
| 969 | 204, 292, 296, 207, 208, 229, 230, 74, 111, 337, |
| 970 | 310, 311, 312, 313, 74, 116, 74, 333, 217, 134, |
| 971 | 296, 83, 82, 336, 209, 118, 175, 195, 210, 121, |
| 972 | 291, 296, 128, 345, 358, 132, 339, 181, 364, 184, |
| 973 | 344, 366, 241, 242, 162, 175, 296, 352, 350, 306, |
| 974 | 307, 135, 2, 3, 4, 346, 95, 96, 97, 74, |
| 975 | 74, 308, 309, 383, 175, 259, 357, 218, 219, 220, |
| 976 | 359, 314, 315, 303, 304, 305, 162, 162, 162, 162, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 977 | 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 978 | 162, 162, 195, 186, 198, 195, 7, -27, 216, 379, |
| 979 | 211, 411, 231, 232, 369, 233, 234, 162, 238, 271, |
| 980 | 275, 276, 235, 368, 379, 7, 290, 195, -21, 74, |
| 981 | 324, 325, 175, 397, 327, 328, 162, 27, 28, 332, |
| 982 | 29, 80, 335, -26, 341, 334, 329, 408, 37, 38, |
| 983 | 39, 381, 296, 340, 259, 162, 27, 28, 343, 29, |
| 984 | 80, 351, 360, -28, -231, 195, 381, 37, 38, 39, |
| 985 | 362, 363, 367, 81, 277, 278, 279, 280, 281, 282, |
| 986 | 283, 284, 285, 286, 365, 370, 371, 385, 384, 394, |
| 987 | 395, 396, 400, 287, 402, 401, 399, 403, 316, 301, |
| 988 | 412, 317, 319, 108, 318, 320, 187, 123, 321, 127, |
| 989 | 84, 347, 289, 162, 374, 188, 409, 243, 372, 375, |
| 990 | 387, 113, 388, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 991 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 992 | 0, 0, 0, 0, 0, 259, 259, 0, 0, 0, |
| 993 | 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, |
| 994 | 0, 259, 0, 0, 0, 0, 259, 0, 0, 0, |
| 995 | 0, 74, 0, 0, 0, 0, 0, 259, 0, 0, |
| 996 | 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, |
| 997 | 259, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
| 998 | 10, 11, 244, 245, 246, 0, 247, 248, 249, 250, |
| 999 | 251, 252, 253, 12, 13, 14, 15, 16, 17, 18, |
| 1000 | 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
| 1001 | 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
| 1002 | 38, 39, 40, 41, 254, 42, 43, 44, 0, 45, |
| 1003 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, |
| 1004 | 55, 56, 57, 58, 138, 59, 139, 140, 141, 142, |
| 1005 | 143, 0, 0, 144, 145, 0, 0, 0, 0, 0, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1006 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1007 | 0, 0, 146, 0, 0, 0, 121, 386, 0, 0, |
| 1008 | 0, 0, 255, 148, 149, 150, 151, 1, 2, 3, |
| 1009 | 4, 5, 6, 7, 8, 9, 10, 11, 244, 245, |
| 1010 | 246, 0, 247, 248, 249, 250, 251, 252, 253, 12, |
| 1011 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 1012 | 23, 24, 25, 26, 27, 28, 0, 29, 30, 31, |
| 1013 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
| 1014 | 254, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 1015 | 50, 51, 52, 53, 54, 0, 55, 56, 57, 58, |
| 1016 | 138, 59, 139, 140, 141, 142, 143, 0, 0, 144, |
| 1017 | 145, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1018 | 0, 0, 0, 0, 0, 0, 0, 0, 146, 0, |
| 1019 | 0, 0, 121, 398, 0, 0, 0, 0, 255, 148, |
| 1020 | 149, 150, 151, 1, 2, 3, 4, 5, 6, 7, |
| 1021 | 8, 9, 10, 11, 244, 245, 246, 0, 247, 248, |
| 1022 | 249, 250, 251, 252, 253, 12, 13, 14, 15, 16, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1023 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1024 | 27, 28, 0, 29, 30, 31, 32, 33, 34, 35, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1025 | 36, 37, 38, 39, 40, 41, 254, 42, 43, 44, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1026 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1027 | 54, 0, 55, 56, 57, 58, 138, 59, 139, 140, |
| 1028 | 141, 142, 143, 0, 0, 144, 145, 0, 0, 0, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1029 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1030 | 0, 0, 0, 0, 146, 0, 0, 0, 121, 0, |
| 1031 | 0, 0, 0, 0, 255, 148, 149, 150, 151, 1, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1032 | 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1033 | 244, 245, 246, 0, 247, 248, 249, 250, 251, 252, |
| 1034 | 253, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1035 | 21, 22, 23, 24, 25, 26, 27, 28, 0, 29, |
| 1036 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1037 | 40, 41, 254, 42, 43, 44, 0, 45, 46, 47, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1038 | 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1039 | 57, 58, 138, 59, 139, 140, 141, 142, 143, 0, |
| 1040 | 0, 144, 145, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1041 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1042 | 146, 0, 0, 0, 371, 0, 0, 0, 0, 0, |
| 1043 | 255, 148, 149, 150, 151, 1, 2, 3, 4, 5, |
| 1044 | 6, 7, 8, 9, 10, 11, 244, 245, 246, 0, |
| 1045 | 247, 248, 249, 250, 251, 252, 253, 12, 13, 14, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1046 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 1047 | 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1048 | 34, 35, 36, 37, 38, 39, 40, 41, 254, 42, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1049 | 43, 44, 0, 45, 46, 47, 48, 49, 50, 51, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1050 | 52, 53, 54, 0, 55, 56, 57, 58, 138, 59, |
| 1051 | 139, 140, 141, 142, 143, 0, 0, 144, 145, 0, |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 1052 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1053 | 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1054 | 0, 0, 0, 0, 0, 0, 255, 148, 149, 150, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1055 | 151, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1056 | 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1057 | 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1058 | 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
| 1059 | 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1060 | 38, 39, 40, 41, 0, 42, 43, 44, 0, 45, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1061 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1062 | 55, 56, 57, 58, 138, 59, 139, 140, 141, 142, |
| 1063 | 143, 0, 0, 144, 145, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1064 | 0, 0, 0, 0, 0, 0, 0, 0, 133, 2, |
| 1065 | 3, 4, 146, 6, 7, 8, 9, 10, 11, 0, |
| 1066 | 0, 0, 255, 148, 149, 150, 151, 0, 0, 0, |
| 1067 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
| 1068 | 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, |
| 1069 | 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 1070 | 41, 0, 42, 43, 44, 0, 45, 46, 47, 48, |
| 1071 | 49, 50, 51, 52, 53, 54, 0, 55, 56, 57, |
| 1072 | 58, 138, 59, 139, 140, 141, 142, 143, 0, 0, |
| 1073 | 144, 145, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1074 | 0, 0, 0, 0, 2, 3, 4, 0, 0, 146, |
| 1075 | 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, |
| 1076 | 148, 149, 150, 151, 0, 12, 13, 14, 15, 16, |
| 1077 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1078 | 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, |
| 1079 | 36, 0, 0, 0, 40, 41, 0, 42, 43, 44, |
| 1080 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1081 | 54, 0, 55, 56, 57, 0, 105, 59, 0, 0, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1082 | 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, |
| 1083 | 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, |
| 1084 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1085 | 0, 0, 0, 0, 106, 31, 32, 33, 34, 35, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1086 | 36, 0, 0, 0, 40, 41, 0, 42, 43, 44, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1087 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1088 | 54, 0, 55, 56, 57, 0, 138, 59, 139, 140, |
| 1089 | 141, 142, 143, 0, 0, 144, 145, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1090 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1091 | 0, 0, 0, 0, 146, 0, 0, 147, 8, 9, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1092 | 10, 11, 0, 0, 0, 148, 149, 150, 151, 0, |
| 1093 | 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, |
| 1094 | 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, |
| 1095 | 0, 0, 0, 31, 32, 33, 34, 35, 36, 0, |
| 1096 | 0, 0, 40, 41, 0, 42, 43, 44, 0, 45, |
| 1097 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, |
| 1098 | 55, 56, 57, 0, 138, 59, 139, 140, 141, 142, |
| 1099 | 143, 0, 0, 144, 145, 0, 0, 0, 0, 0, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1100 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1101 | 0, 0, 146, 0, 0, 191, 8, 9, 10, 11, |
| 1102 | 0, 0, 0, 148, 149, 150, 151, 0, 0, 0, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1103 | 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 1104 | 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, |
| 1105 | 0, 31, 32, 33, 34, 35, 36, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1106 | 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1107 | 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1108 | 57, 0, 138, 59, 139, 140, 141, 142, 143, 0, |
| 1109 | 0, 144, 145, 0, 0, 0, 0, 0, 0, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1110 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1111 | 146, 0, 0, 272, 8, 9, 10, 11, 0, 0, |
| 1112 | 0, 148, 149, 150, 151, 0, 0, 0, 0, 12, |
| 1113 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 1114 | 23, 24, 25, 26, 0, 0, 0, 0, 0, 31, |
| 1115 | 32, 33, 34, 35, 36, 0, 0, 0, 40, 41, |
| 1116 | 0, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 1117 | 50, 51, 52, 53, 54, 0, 55, 56, 57, 0, |
| 1118 | 138, 59, 139, 140, 141, 142, 143, 0, 0, 144, |
| 1119 | 145, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1120 | 0, 0, 0, 0, 0, 0, 0, 0, 146, 8, |
| 1121 | 9, 10, 11, 0, 0, 0, 0, 0, 330, 148, |
| 1122 | 149, 150, 151, 0, 12, 13, 14, 15, 16, 17, |
| 1123 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, |
| 1124 | 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, |
| 1125 | 0, 0, 0, 40, 41, 0, 42, 43, 44, 0, |
| 1126 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1127 | 0, 55, 56, 57, 0, 138, 59, 139, 140, 141, |
| 1128 | 142, 143, 0, 0, 144, 145, 0, 0, 0, 0, |
| 1129 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1130 | 0, 0, 0, 146, 8, 9, 10, 11, 0, 0, |
| 1131 | 0, 0, 0, 0, 148, 149, 150, 151, 0, 12, |
| 1132 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 1133 | 23, 24, 25, 26, 0, 0, 0, 0, 0, 31, |
| 1134 | 32, 33, 34, 35, 36, 0, 0, 0, 40, 214, |
| 1135 | 0, 42, 43, 44, 0, 45, 46, 47, 48, 49, |
| 1136 | 50, 51, 52, 53, 54, 0, 55, 56, 57, 0, |
| 1137 | 138, 59, 139, 140, 141, 142, 143, 0, 0, 144, |
| 1138 | 145, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1139 | 0, 0, 0, 0, 133, 2, 3, 4, 146, 6, |
| 1140 | 7, 8, 9, 10, 11, 0, 0, 0, 0, 148, |
| 1141 | 149, 150, 151, 0, 0, 0, 12, 13, 14, 15, |
| 1142 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, |
| 1143 | 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, |
| 1144 | 35, 36, 37, 38, 39, 40, 41, 0, 42, 43, |
| 1145 | 44, 0, 45, 46, 47, 48, 49, 50, 51, 52, |
| 1146 | 53, 54, 0, 55, 56, 57, 58, 0, 59, 0, |
| 1147 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, |
| 1148 | 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, |
| 1149 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1150 | 201, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 1151 | 21, 22, 23, 24, 25, 26, 27, 28, 0, 29, |
| 1152 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1153 | 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 1154 | 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 1155 | 57, 58, 0, 59, 0, 0, 0, 0, 0, 0, |
| 1156 | 0, 0, 0, 0, 133, 2, 3, 4, 0, 6, |
| 1157 | 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, |
| 1158 | 0, 0, 0, 0, 0, 240, 12, 13, 14, 15, |
| 1159 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, |
| 1160 | 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, |
| 1161 | 35, 36, 37, 38, 39, 40, 41, 0, 42, 43, |
| 1162 | 44, 0, 45, 46, 47, 48, 49, 50, 51, 52, |
| 1163 | 53, 54, 0, 55, 56, 57, 58, 0, 59, 0, |
| 1164 | 0, 0, 0, 0, 0, 0, 112, 0, 0, 1, |
| 1165 | 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 1166 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1167 | 323, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 1168 | 21, 22, 23, 24, 25, 26, 27, 28, 0, 29, |
| 1169 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1170 | 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 1171 | 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 1172 | 57, 58, 0, 59, 1, 2, 3, 4, 5, 6, |
| 1173 | 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, |
| 1174 | 0, 0, 0, 0, 0, 0, 12, 13, 14, 15, |
| 1175 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, |
| 1176 | 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, |
| 1177 | 35, 36, 37, 38, 39, 40, 41, 0, 42, 43, |
| 1178 | 44, 0, 45, 46, 47, 48, 49, 50, 51, 52, |
| 1179 | 53, 54, 0, 55, 56, 57, 58, 0, 59, 133, |
| 1180 | 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, |
| 1181 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1182 | 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 1183 | 21, 22, 23, 24, 25, 26, 27, 28, 0, 29, |
| 1184 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1185 | 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 1186 | 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 1187 | 57, 58, 0, 59, 2, 3, 4, 0, 0, 0, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1188 | 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, |
| 1189 | 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, |
| 1190 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 1191 | 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, |
| 1192 | 36, 0, 0, 0, 40, 41, 0, 42, 43, 44, |
| 1193 | 0, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1194 | 54, 0, 55, 56, 57, 0, 0, 59, 8, 9, |
| 1195 | 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1196 | 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, |
| 1197 | 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, |
| 1198 | 0, 0, 0, 31, 32, 33, 34, 35, 36, 0, |
| 1199 | 0, 0, 40, 41, 0, 42, 43, 44, 0, 45, |
| 1200 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1201 | 55, 56, 57, 0, 299, 59, 8, 9, 10, 11, |
| 1202 | 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1203 | 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
| 1204 | 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, |
| 1205 | 0, 31, 32, 33, 34, 35, 36, 0, 0, 0, |
| 1206 | 40, 41, 0, 42, 43, 44, 0, 45, 46, 47, |
| 1207 | 48, 49, 50, 51, 52, 53, 54, 0, 55, 56, |
| 1208 | 57, 0, 0, 59 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1209 | }; |
| 1210 | |
| 1211 | static const yytype_int16 yycheck[] = |
| 1212 | { |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1213 | 0, 69, 91, 131, 146, 111, 264, 107, 190, 1, |
| 1214 | 1, 136, 0, 9, 0, 130, 117, 117, 355, 9, |
| 1215 | 76, 92, 76, 377, 130, 361, 104, 106, 106, 87, |
| 1216 | 88, 99, 160, 106, 113, 113, 136, 40, 41, 107, |
| 1217 | 376, 114, 105, 104, 40, 41, 42, 401, 111, 117, |
| 1218 | 40, 41, 108, 43, 111, 180, 127, 114, 395, 127, |
| 1219 | 114, 51, 190, 400, 122, 123, 134, 209, 136, 69, |
| 1220 | 9, 116, 72, 118, 189, 114, 68, 77, 179, 179, |
| 1221 | 180, 73, 105, 189, 84, 213, 111, 105, 111, 77, |
| 1222 | 82, 77, 105, 275, 105, 237, 83, 84, 111, 99, |
| 1223 | 111, 40, 41, 42, 105, 130, 111, 107, 250, 105, |
| 1224 | 111, 179, 180, 76, 239, 114, 105, 117, 111, 144, |
| 1225 | 145, 114, 111, 85, 86, 89, 90, 127, 106, 387, |
| 1226 | 225, 226, 227, 228, 134, 108, 136, 252, 163, 239, |
| 1227 | 111, 133, 133, 114, 106, 76, 252, 275, 110, 108, |
| 1228 | 111, 111, 76, 114, 114, 108, 271, 113, 340, 109, |
| 1229 | 288, 343, 79, 80, 189, 271, 111, 112, 296, 221, |
| 1230 | 222, 239, 4, 5, 6, 290, 40, 41, 42, 179, |
| 1231 | 180, 223, 224, 365, 290, 185, 328, 119, 120, 121, |
| 1232 | 332, 229, 230, 218, 219, 220, 221, 222, 223, 224, |
| 1233 | 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, |
| 1234 | 235, 236, 340, 76, 76, 343, 9, 104, 104, 361, |
| 1235 | 105, 403, 126, 125, 352, 124, 91, 252, 107, 106, |
| 1236 | 113, 107, 93, 348, 376, 9, 106, 365, 105, 239, |
| 1237 | 114, 114, 348, 385, 104, 104, 271, 40, 41, 104, |
| 1238 | 43, 44, 104, 104, 107, 112, 114, 399, 51, 52, |
| 1239 | 53, 361, 111, 113, 264, 290, 40, 41, 113, 43, |
| 1240 | 44, 107, 112, 104, 108, 403, 376, 51, 52, 53, |
| 1241 | 109, 107, 107, 76, 94, 95, 96, 97, 98, 99, |
| 1242 | 100, 101, 102, 103, 113, 56, 108, 104, 107, 76, |
| 1243 | 105, 114, 105, 113, 393, 17, 114, 113, 231, 210, |
| 1244 | 114, 232, 234, 381, 233, 235, 127, 93, 236, 100, |
| 1245 | 5, 291, 197, 348, 356, 127, 400, 183, 354, 356, |
| 1246 | 371, 77, 376, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 1247 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1248 | -1, -1, -1, -1, -1, 355, 356, -1, -1, -1, |
| 1249 | -1, 361, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1250 | -1, 371, -1, -1, -1, -1, 376, -1, -1, -1, |
| 1251 | -1, 381, -1, -1, -1, -1, -1, 387, -1, -1, |
| 1252 | -1, -1, -1, -1, -1, 395, -1, -1, -1, -1, |
| 1253 | 400, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1254 | 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, |
| 1255 | 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
| 1256 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
| 1257 | -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, |
| 1258 | 52, 53, 54, 55, 56, 57, 58, 59, -1, 61, |
| 1259 | 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, |
| 1260 | 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, |
| 1261 | 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, |
| 1262 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1263 | -1, -1, 104, -1, -1, -1, 108, 109, -1, -1, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1264 | -1, -1, 114, 115, 116, 117, 118, 3, 4, 5, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1265 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 1266 | 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1267 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 1268 | 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, |
| 1269 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1270 | 56, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1271 | 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, |
| 1272 | 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, |
| 1273 | 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1274 | -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1275 | -1, -1, 108, 109, -1, -1, -1, -1, 114, 115, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1276 | 116, 117, 118, 3, 4, 5, 6, 7, 8, 9, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1277 | 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, |
| 1278 | 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1279 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1280 | 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1281 | 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1282 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
| 1283 | 70, -1, 72, 73, 74, 75, 76, 77, 78, 79, |
| 1284 | 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, |
| 1285 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1286 | -1, -1, -1, -1, 104, -1, -1, -1, 108, -1, |
| 1287 | -1, -1, -1, -1, 114, 115, 116, 117, 118, 3, |
| 1288 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
| 1289 | 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, |
| 1290 | 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 1291 | 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, |
| 1292 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1293 | 54, 55, 56, 57, 58, 59, -1, 61, 62, 63, |
| 1294 | 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 1295 | 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, |
| 1296 | -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, |
| 1297 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1298 | 104, -1, -1, -1, 108, -1, -1, -1, -1, -1, |
| 1299 | 114, 115, 116, 117, 118, 3, 4, 5, 6, 7, |
| 1300 | 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, |
| 1301 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1302 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1303 | 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, |
| 1304 | 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1305 | 58, 59, -1, 61, 62, 63, 64, 65, 66, 67, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1306 | 68, 69, 70, -1, 72, 73, 74, 75, 76, 77, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1307 | 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, |
| 1308 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1309 | -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, |
| 1310 | -1, -1, -1, -1, -1, -1, 114, 115, 116, 117, |
| 1311 | 118, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 1312 | 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1313 | -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, |
| 1314 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
| 1315 | -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, |
| 1316 | 52, 53, 54, 55, -1, 57, 58, 59, -1, 61, |
| 1317 | 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, |
| 1318 | 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, |
| 1319 | 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, |
| 1320 | -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, |
| 1321 | 5, 6, 104, 8, 9, 10, 11, 12, 13, -1, |
| 1322 | -1, -1, 114, 115, 116, 117, 118, -1, -1, -1, |
| 1323 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 1324 | 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, |
| 1325 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 1326 | 55, -1, 57, 58, 59, -1, 61, 62, 63, 64, |
| 1327 | 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, |
| 1328 | 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, |
| 1329 | 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1330 | -1, -1, -1, -1, 4, 5, 6, -1, -1, 104, |
| 1331 | 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, |
| 1332 | 115, 116, 117, 118, -1, 25, 26, 27, 28, 29, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1333 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1334 | -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, |
| 1335 | 50, -1, -1, -1, 54, 55, -1, 57, 58, 59, |
| 1336 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1337 | 70, -1, 72, 73, 74, -1, 76, 77, -1, -1, |
| 1338 | 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, |
| 1339 | -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, |
| 1340 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1341 | -1, -1, -1, -1, 114, 45, 46, 47, 48, 49, |
| 1342 | 50, -1, -1, -1, 54, 55, -1, 57, 58, 59, |
| 1343 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1344 | 70, -1, 72, 73, 74, -1, 76, 77, 78, 79, |
| 1345 | 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, |
| 1346 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1347 | -1, -1, -1, -1, 104, -1, -1, 107, 10, 11, |
| 1348 | 12, 13, -1, -1, -1, 115, 116, 117, 118, -1, |
| 1349 | -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, |
| 1350 | 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, |
| 1351 | -1, -1, -1, 45, 46, 47, 48, 49, 50, -1, |
| 1352 | -1, -1, 54, 55, -1, 57, 58, 59, -1, 61, |
| 1353 | 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, |
| 1354 | 72, 73, 74, -1, 76, 77, 78, 79, 80, 81, |
| 1355 | 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1356 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1357 | -1, -1, 104, -1, -1, 107, 10, 11, 12, 13, |
| 1358 | -1, -1, -1, 115, 116, 117, 118, -1, -1, -1, |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 1359 | -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 1360 | 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, |
| 1361 | -1, 45, 46, 47, 48, 49, 50, -1, -1, -1, |
| 1362 | 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 1363 | 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1364 | 74, -1, 76, 77, 78, 79, 80, 81, 82, -1, |
| 1365 | -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1366 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1367 | 104, -1, -1, 107, 10, 11, 12, 13, -1, -1, |
| 1368 | -1, 115, 116, 117, 118, -1, -1, -1, -1, 25, |
| 1369 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 1370 | 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, |
| 1371 | 46, 47, 48, 49, 50, -1, -1, -1, 54, 55, |
| 1372 | -1, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
| 1373 | 66, 67, 68, 69, 70, -1, 72, 73, 74, -1, |
| 1374 | 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, |
| 1375 | 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1376 | -1, -1, -1, -1, -1, -1, -1, -1, 104, 10, |
| 1377 | 11, 12, 13, -1, -1, -1, -1, -1, 114, 115, |
| 1378 | 116, 117, 118, -1, 25, 26, 27, 28, 29, 30, |
| 1379 | 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, |
| 1380 | -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, |
| 1381 | -1, -1, -1, 54, 55, -1, 57, 58, 59, -1, |
| 1382 | 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, |
| 1383 | -1, 72, 73, 74, -1, 76, 77, 78, 79, 80, |
| 1384 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, |
| 1385 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1386 | -1, -1, -1, 104, 10, 11, 12, 13, -1, -1, |
| 1387 | -1, -1, -1, -1, 115, 116, 117, 118, -1, 25, |
| 1388 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
| 1389 | 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, |
| 1390 | 46, 47, 48, 49, 50, -1, -1, -1, 54, 55, |
| 1391 | -1, 57, 58, 59, -1, 61, 62, 63, 64, 65, |
| 1392 | 66, 67, 68, 69, 70, -1, 72, 73, 74, -1, |
| 1393 | 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, |
| 1394 | 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1395 | -1, -1, -1, -1, 3, 4, 5, 6, 104, 8, |
| 1396 | 9, 10, 11, 12, 13, -1, -1, -1, -1, 115, |
| 1397 | 116, 117, 118, -1, -1, -1, 25, 26, 27, 28, |
| 1398 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 1399 | 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, |
| 1400 | 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, |
| 1401 | 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, |
| 1402 | 69, 70, -1, 72, 73, 74, 75, -1, 77, -1, |
| 1403 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, |
| 1404 | 4, 5, 6, -1, 8, 9, 10, 11, 12, 13, |
| 1405 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1406 | 109, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 1407 | 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, |
| 1408 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1409 | 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 1410 | 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 1411 | 74, 75, -1, 77, -1, -1, -1, -1, -1, -1, |
| 1412 | -1, -1, -1, -1, 3, 4, 5, 6, -1, 8, |
| 1413 | 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, |
| 1414 | -1, -1, -1, -1, -1, 109, 25, 26, 27, 28, |
| 1415 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 1416 | 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, |
| 1417 | 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, |
| 1418 | 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, |
| 1419 | 69, 70, -1, 72, 73, 74, 75, -1, 77, -1, |
| 1420 | -1, -1, -1, -1, -1, -1, 0, -1, -1, 3, |
| 1421 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
| 1422 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1423 | 109, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 1424 | 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, |
| 1425 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1426 | 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 1427 | 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 1428 | 74, 75, -1, 77, 3, 4, 5, 6, 7, 8, |
| 1429 | 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, |
| 1430 | -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, |
| 1431 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
| 1432 | 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, |
| 1433 | 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, |
| 1434 | 59, -1, 61, 62, 63, 64, 65, 66, 67, 68, |
| 1435 | 69, 70, -1, 72, 73, 74, 75, -1, 77, 3, |
| 1436 | 4, 5, 6, -1, 8, 9, 10, 11, 12, 13, |
| 1437 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1438 | -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 1439 | 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, |
| 1440 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1441 | 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 1442 | 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 1443 | 74, 75, -1, 77, 4, 5, 6, -1, -1, -1, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1444 | 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, |
| 1445 | -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, |
| 1446 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 1447 | -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, |
| 1448 | 50, -1, -1, -1, 54, 55, -1, 57, 58, 59, |
| 1449 | -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1450 | 70, -1, 72, 73, 74, -1, -1, 77, 10, 11, |
| 1451 | 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1452 | -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, |
| 1453 | 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, |
| 1454 | -1, -1, -1, 45, 46, 47, 48, 49, 50, -1, |
| 1455 | -1, -1, 54, 55, -1, 57, 58, 59, -1, 61, |
| 1456 | 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1457 | 72, 73, 74, -1, 76, 77, 10, 11, 12, 13, |
| 1458 | 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1459 | -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, |
| 1460 | 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, |
| 1461 | -1, 45, 46, 47, 48, 49, 50, -1, -1, -1, |
| 1462 | 54, 55, -1, 57, 58, 59, -1, 61, 62, 63, |
| 1463 | 64, 65, 66, 67, 68, 69, 70, -1, 72, 73, |
| 1464 | 74, -1, -1, 77 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1465 | }; |
| 1466 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1467 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1468 | symbol of state STATE-NUM. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1469 | static const yytype_uint8 yystos[] = |
| 1470 | { |
| 1471 | 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 1472 | 12, 13, 25, 26, 27, 28, 29, 30, 31, 32, |
Nicolas Capens | e4b1b1d | 2015-02-17 17:26:01 -0500 | [diff] [blame] | 1473 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 1474 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, |
| 1475 | 54, 55, 57, 58, 59, 61, 62, 63, 64, 65, |
| 1476 | 66, 67, 68, 69, 70, 72, 73, 74, 75, 77, |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 1477 | 159, 160, 161, 162, 163, 168, 169, 170, 171, 173, |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 1478 | 174, 175, 176, 177, 180, 181, 182, 217, 218, 219, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1479 | 44, 76, 171, 174, 176, 40, 41, 76, 108, 104, |
| 1480 | 114, 220, 105, 111, 9, 40, 41, 42, 165, 166, |
| 1481 | 172, 111, 114, 76, 174, 76, 114, 158, 175, 180, |
| 1482 | 174, 106, 0, 218, 174, 180, 108, 184, 76, 178, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1483 | 179, 108, 193, 165, 164, 167, 175, 166, 76, 104, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1484 | 106, 113, 108, 3, 173, 175, 185, 186, 76, 78, |
| 1485 | 79, 80, 81, 82, 85, 86, 104, 107, 115, 116, |
| 1486 | 117, 118, 129, 130, 131, 133, 134, 135, 136, 137, |
| 1487 | 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, |
| 1488 | 148, 149, 150, 151, 152, 153, 157, 180, 114, 183, |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 1489 | 185, 113, 105, 111, 109, 194, 76, 164, 167, 106, |
| 1490 | 113, 107, 157, 140, 153, 154, 189, 175, 76, 187, |
| 1491 | 188, 109, 186, 140, 140, 154, 156, 85, 86, 106, |
| 1492 | 110, 105, 105, 111, 55, 154, 104, 140, 119, 120, |
| 1493 | 121, 116, 118, 83, 84, 87, 88, 122, 123, 89, |
| 1494 | 90, 126, 125, 124, 91, 93, 92, 127, 107, 185, |
| 1495 | 109, 79, 80, 179, 14, 15, 16, 18, 19, 20, |
| 1496 | 21, 22, 23, 24, 56, 114, 156, 159, 160, 180, |
| 1497 | 190, 191, 192, 193, 201, 202, 203, 205, 207, 209, |
| 1498 | 216, 106, 107, 157, 189, 113, 107, 94, 95, 96, |
| 1499 | 97, 98, 99, 100, 101, 102, 103, 113, 155, 187, |
| 1500 | 106, 111, 114, 76, 114, 105, 111, 132, 156, 76, |
| 1501 | 82, 135, 154, 140, 140, 140, 142, 142, 143, 143, |
| 1502 | 144, 144, 144, 144, 145, 145, 146, 147, 148, 149, |
| 1503 | 150, 151, 156, 109, 114, 114, 211, 104, 104, 114, |
| 1504 | 114, 156, 104, 157, 112, 104, 114, 191, 195, 157, |
| 1505 | 113, 107, 189, 113, 154, 114, 157, 188, 106, 114, |
| 1506 | 154, 107, 112, 197, 198, 199, 212, 156, 114, 156, |
| 1507 | 112, 210, 109, 107, 189, 113, 189, 107, 157, 154, |
| 1508 | 56, 108, 200, 192, 190, 202, 213, 105, 105, 156, |
| 1509 | 170, 173, 208, 189, 107, 104, 109, 201, 208, 214, |
| 1510 | 215, 197, 204, 206, 76, 105, 114, 156, 109, 114, |
| 1511 | 105, 17, 193, 113, 192, 196, 200, 105, 156, 196, |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 1512 | 197, 189, 114 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1513 | }; |
| 1514 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1515 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 1516 | static const yytype_uint8 yyr1[] = |
| 1517 | { |
| 1518 | 0, 128, 129, 130, 130, 130, 130, 130, 130, 131, |
| 1519 | 131, 131, 131, 131, 131, 132, 133, 134, 134, 135, |
| 1520 | 135, 136, 136, 137, 137, 138, 139, 139, 139, 140, |
| 1521 | 140, 140, 140, 141, 141, 141, 141, 142, 142, 142, |
| 1522 | 142, 143, 143, 143, 144, 144, 144, 145, 145, 145, |
| 1523 | 145, 145, 146, 146, 146, 147, 147, 148, 148, 149, |
| 1524 | 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, |
| 1525 | 154, 155, 155, 155, 155, 155, 155, 155, 155, 155, |
| 1526 | 155, 155, 156, 156, 157, 158, 159, 159, 159, 159, |
| 1527 | 159, 159, 159, 160, 161, 161, 162, 162, 163, 164, |
| 1528 | 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, |
| 1529 | 168, 168, 168, 168, 168, 168, 169, 169, 169, 169, |
| 1530 | 169, 169, 169, 170, 170, 171, 171, 172, 173, 173, |
| 1531 | 173, 173, 173, 173, 173, 173, 173, 173, 174, 174, |
| 1532 | 174, 174, 174, 174, 175, 175, 176, 176, 176, 177, |
| 1533 | 178, 178, 179, 179, 179, 180, 180, 180, 181, 181, |
| 1534 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 1535 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 1536 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 1537 | 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, |
| 1538 | 181, 181, 183, 182, 184, 182, 185, 185, 186, 186, |
| 1539 | 187, 187, 188, 188, 189, 190, 191, 191, 192, 192, |
| 1540 | 192, 192, 192, 192, 192, 193, 194, 195, 193, 196, |
| 1541 | 196, 198, 197, 199, 197, 200, 200, 201, 201, 202, |
| 1542 | 202, 203, 204, 204, 206, 205, 207, 207, 208, 208, |
| 1543 | 210, 209, 211, 209, 212, 209, 213, 213, 214, 214, |
| 1544 | 215, 215, 216, 216, 216, 216, 216, 217, 217, 218, |
| 1545 | 218, 220, 219 |
| 1546 | }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1547 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1548 | /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
| 1549 | static const yytype_uint8 yyr2[] = |
| 1550 | { |
| 1551 | 0, 2, 1, 1, 1, 1, 1, 1, 3, 1, |
| 1552 | 4, 1, 3, 2, 2, 1, 1, 1, 3, 2, |
| 1553 | 2, 2, 1, 2, 3, 2, 1, 1, 1, 1, |
| 1554 | 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, |
| 1555 | 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, |
| 1556 | 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, |
| 1557 | 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, |
| 1558 | 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1559 | 1, 1, 1, 3, 1, 2, 2, 2, 4, 5, |
| 1560 | 6, 9, 2, 2, 1, 1, 2, 3, 3, 2, |
| 1561 | 5, 3, 2, 3, 2, 0, 1, 1, 1, 1, |
| 1562 | 1, 3, 6, 7, 8, 5, 1, 2, 5, 6, |
| 1563 | 7, 4, 2, 1, 2, 1, 1, 1, 1, 1, |
| 1564 | 2, 1, 2, 1, 1, 2, 2, 3, 1, 1, |
| 1565 | 1, 2, 2, 1, 1, 2, 1, 1, 1, 4, |
| 1566 | 1, 3, 1, 3, 3, 1, 3, 4, 1, 1, |
| 1567 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1568 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1569 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1570 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1571 | 1, 1, 0, 6, 0, 5, 1, 2, 3, 4, |
| 1572 | 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, |
| 1573 | 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, |
| 1574 | 1, 0, 2, 0, 2, 2, 3, 1, 2, 1, |
| 1575 | 2, 5, 3, 1, 0, 6, 3, 2, 1, 4, |
| 1576 | 0, 6, 0, 8, 0, 7, 1, 1, 1, 0, |
| 1577 | 2, 3, 2, 2, 2, 3, 2, 1, 2, 1, |
| 1578 | 1, 0, 3 |
| 1579 | }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1580 | |
| 1581 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1582 | #define yyerrok (yyerrstatus = 0) |
| 1583 | #define yyclearin (yychar = YYEMPTY) |
| 1584 | #define YYEMPTY (-2) |
| 1585 | #define YYEOF 0 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1586 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1587 | #define YYACCEPT goto yyacceptlab |
| 1588 | #define YYABORT goto yyabortlab |
| 1589 | #define YYERROR goto yyerrorlab |
| 1590 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1591 | |
| 1592 | #define YYRECOVERING() (!!yyerrstatus) |
| 1593 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1594 | #define YYBACKUP(Token, Value) \ |
| 1595 | do \ |
| 1596 | if (yychar == YYEMPTY) \ |
| 1597 | { \ |
| 1598 | yychar = (Token); \ |
| 1599 | yylval = (Value); \ |
| 1600 | YYPOPSTACK (yylen); \ |
| 1601 | yystate = *yyssp; \ |
| 1602 | goto yybackup; \ |
| 1603 | } \ |
| 1604 | else \ |
| 1605 | { \ |
| 1606 | yyerror (&yylloc, context, yyscanner, YY_("syntax error: cannot back up")); \ |
| 1607 | YYERROR; \ |
| 1608 | } \ |
| 1609 | while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1610 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1611 | /* Error token number */ |
| 1612 | #define YYTERROR 1 |
| 1613 | #define YYERRCODE 256 |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1614 | |
| 1615 | |
| 1616 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1617 | If N is 0, then set CURRENT to the empty location which ends |
| 1618 | the previous symbol: RHS[0] (always defined). */ |
| 1619 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1620 | #ifndef YYLLOC_DEFAULT |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1621 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 1622 | do \ |
| 1623 | if (N) \ |
| 1624 | { \ |
| 1625 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 1626 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 1627 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 1628 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 1629 | } \ |
| 1630 | else \ |
| 1631 | { \ |
| 1632 | (Current).first_line = (Current).last_line = \ |
| 1633 | YYRHSLOC (Rhs, 0).last_line; \ |
| 1634 | (Current).first_column = (Current).last_column = \ |
| 1635 | YYRHSLOC (Rhs, 0).last_column; \ |
| 1636 | } \ |
| 1637 | while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1638 | #endif |
| 1639 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1640 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1641 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1642 | |
| 1643 | /* Enable debugging if requested. */ |
| 1644 | #if YYDEBUG |
| 1645 | |
| 1646 | # ifndef YYFPRINTF |
| 1647 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1648 | # define YYFPRINTF fprintf |
| 1649 | # endif |
| 1650 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1651 | # define YYDPRINTF(Args) \ |
| 1652 | do { \ |
| 1653 | if (yydebug) \ |
| 1654 | YYFPRINTF Args; \ |
| 1655 | } while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1656 | |
| 1657 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1658 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1659 | This macro was not mandated originally: define only if we know |
| 1660 | we won't break user code: when these are the locations we know. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1661 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1662 | #ifndef YY_LOCATION_PRINT |
| 1663 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 1664 | |
| 1665 | /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ |
| 1666 | |
| 1667 | YY_ATTRIBUTE_UNUSED |
| 1668 | static unsigned |
| 1669 | yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1670 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1671 | unsigned res = 0; |
| 1672 | int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; |
| 1673 | if (0 <= yylocp->first_line) |
| 1674 | { |
| 1675 | res += YYFPRINTF (yyo, "%d", yylocp->first_line); |
| 1676 | if (0 <= yylocp->first_column) |
| 1677 | res += YYFPRINTF (yyo, ".%d", yylocp->first_column); |
| 1678 | } |
| 1679 | if (0 <= yylocp->last_line) |
| 1680 | { |
| 1681 | if (yylocp->first_line < yylocp->last_line) |
| 1682 | { |
| 1683 | res += YYFPRINTF (yyo, "-%d", yylocp->last_line); |
| 1684 | if (0 <= end_col) |
| 1685 | res += YYFPRINTF (yyo, ".%d", end_col); |
| 1686 | } |
| 1687 | else if (0 <= end_col && yylocp->first_column < end_col) |
| 1688 | res += YYFPRINTF (yyo, "-%d", end_col); |
| 1689 | } |
| 1690 | return res; |
| 1691 | } |
| 1692 | |
| 1693 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 1694 | yy_location_print_ (File, &(Loc)) |
| 1695 | |
| 1696 | # else |
| 1697 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 1698 | # endif |
| 1699 | #endif |
| 1700 | |
| 1701 | |
| 1702 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1703 | do { \ |
| 1704 | if (yydebug) \ |
| 1705 | { \ |
| 1706 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1707 | yy_symbol_print (stderr, \ |
| 1708 | Type, Value, Location, context, yyscanner); \ |
| 1709 | YYFPRINTF (stderr, "\n"); \ |
| 1710 | } \ |
| 1711 | } while (0) |
| 1712 | |
| 1713 | |
| 1714 | /*----------------------------------------. |
| 1715 | | Print this symbol's value on YYOUTPUT. | |
| 1716 | `----------------------------------------*/ |
| 1717 | |
| 1718 | static void |
| 1719 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner) |
| 1720 | { |
| 1721 | FILE *yyo = yyoutput; |
| 1722 | YYUSE (yyo); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1723 | YYUSE (yylocationp); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1724 | YYUSE (context); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1725 | YYUSE (yyscanner); |
| 1726 | if (!yyvaluep) |
| 1727 | return; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1728 | # ifdef YYPRINT |
| 1729 | if (yytype < YYNTOKENS) |
| 1730 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1731 | # endif |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1732 | YYUSE (yytype); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1733 | } |
| 1734 | |
| 1735 | |
| 1736 | /*--------------------------------. |
| 1737 | | Print this symbol on YYOUTPUT. | |
| 1738 | `--------------------------------*/ |
| 1739 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1740 | static void |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1741 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1742 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1743 | YYFPRINTF (yyoutput, "%s %s (", |
| 1744 | yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1745 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 1746 | YY_LOCATION_PRINT (yyoutput, *yylocationp); |
| 1747 | YYFPRINTF (yyoutput, ": "); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1748 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, yyscanner); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1749 | YYFPRINTF (yyoutput, ")"); |
| 1750 | } |
| 1751 | |
| 1752 | /*------------------------------------------------------------------. |
| 1753 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1754 | | TOP (included). | |
| 1755 | `------------------------------------------------------------------*/ |
| 1756 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1757 | static void |
| 1758 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1759 | { |
| 1760 | YYFPRINTF (stderr, "Stack now"); |
| 1761 | for (; yybottom <= yytop; yybottom++) |
| 1762 | { |
| 1763 | int yybot = *yybottom; |
| 1764 | YYFPRINTF (stderr, " %d", yybot); |
| 1765 | } |
| 1766 | YYFPRINTF (stderr, "\n"); |
| 1767 | } |
| 1768 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1769 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1770 | do { \ |
| 1771 | if (yydebug) \ |
| 1772 | yy_stack_print ((Bottom), (Top)); \ |
| 1773 | } while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1774 | |
| 1775 | |
| 1776 | /*------------------------------------------------. |
| 1777 | | Report that the YYRULE is going to be reduced. | |
| 1778 | `------------------------------------------------*/ |
| 1779 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1780 | static void |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1781 | yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void* yyscanner) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1782 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1783 | unsigned long int yylno = yyrline[yyrule]; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1784 | int yynrhs = yyr2[yyrule]; |
| 1785 | int yyi; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1786 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1787 | yyrule - 1, yylno); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1788 | /* The symbols being reduced. */ |
| 1789 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1790 | { |
| 1791 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1792 | yy_symbol_print (stderr, |
| 1793 | yystos[yyssp[yyi + 1 - yynrhs]], |
| 1794 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1795 | , &(yylsp[(yyi + 1) - (yynrhs)]) , context, yyscanner); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1796 | YYFPRINTF (stderr, "\n"); |
| 1797 | } |
| 1798 | } |
| 1799 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1800 | # define YY_REDUCE_PRINT(Rule) \ |
| 1801 | do { \ |
| 1802 | if (yydebug) \ |
| 1803 | yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, yyscanner); \ |
| 1804 | } while (0) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1805 | |
| 1806 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1807 | multiple parsers can coexist. */ |
| 1808 | int yydebug; |
| 1809 | #else /* !YYDEBUG */ |
| 1810 | # define YYDPRINTF(Args) |
| 1811 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1812 | # define YY_STACK_PRINT(Bottom, Top) |
| 1813 | # define YY_REDUCE_PRINT(Rule) |
| 1814 | #endif /* !YYDEBUG */ |
| 1815 | |
| 1816 | |
| 1817 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1818 | #ifndef YYINITDEPTH |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1819 | # define YYINITDEPTH 200 |
| 1820 | #endif |
| 1821 | |
| 1822 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1823 | if the built-in stack extension method is used). |
| 1824 | |
| 1825 | Do not make this value too large; the results are undefined if |
| 1826 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 1827 | evaluated with infinite-precision integer arithmetic. */ |
| 1828 | |
| 1829 | #ifndef YYMAXDEPTH |
| 1830 | # define YYMAXDEPTH 10000 |
| 1831 | #endif |
| 1832 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1833 | |
| 1834 | #if YYERROR_VERBOSE |
| 1835 | |
| 1836 | # ifndef yystrlen |
| 1837 | # if defined __GLIBC__ && defined _STRING_H |
| 1838 | # define yystrlen strlen |
| 1839 | # else |
| 1840 | /* Return the length of YYSTR. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1841 | static YYSIZE_T |
| 1842 | yystrlen (const char *yystr) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1843 | { |
| 1844 | YYSIZE_T yylen; |
| 1845 | for (yylen = 0; yystr[yylen]; yylen++) |
| 1846 | continue; |
| 1847 | return yylen; |
| 1848 | } |
| 1849 | # endif |
| 1850 | # endif |
| 1851 | |
| 1852 | # ifndef yystpcpy |
| 1853 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
| 1854 | # define yystpcpy stpcpy |
| 1855 | # else |
| 1856 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1857 | YYDEST. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1858 | static char * |
| 1859 | yystpcpy (char *yydest, const char *yysrc) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1860 | { |
| 1861 | char *yyd = yydest; |
| 1862 | const char *yys = yysrc; |
| 1863 | |
| 1864 | while ((*yyd++ = *yys++) != '\0') |
| 1865 | continue; |
| 1866 | |
| 1867 | return yyd - 1; |
| 1868 | } |
| 1869 | # endif |
| 1870 | # endif |
| 1871 | |
| 1872 | # ifndef yytnamerr |
| 1873 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1874 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1875 | heuristic is that double-quoting is unnecessary unless the string |
| 1876 | contains an apostrophe, a comma, or backslash (other than |
| 1877 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1878 | null, do not copy; instead, return the length of what the result |
| 1879 | would have been. */ |
| 1880 | static YYSIZE_T |
| 1881 | yytnamerr (char *yyres, const char *yystr) |
| 1882 | { |
| 1883 | if (*yystr == '"') |
| 1884 | { |
| 1885 | YYSIZE_T yyn = 0; |
| 1886 | char const *yyp = yystr; |
| 1887 | |
| 1888 | for (;;) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1889 | switch (*++yyp) |
| 1890 | { |
| 1891 | case '\'': |
| 1892 | case ',': |
| 1893 | goto do_not_strip_quotes; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1894 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1895 | case '\\': |
| 1896 | if (*++yyp != '\\') |
| 1897 | goto do_not_strip_quotes; |
| 1898 | /* Fall through. */ |
| 1899 | default: |
| 1900 | if (yyres) |
| 1901 | yyres[yyn] = *yyp; |
| 1902 | yyn++; |
| 1903 | break; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1904 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1905 | case '"': |
| 1906 | if (yyres) |
| 1907 | yyres[yyn] = '\0'; |
| 1908 | return yyn; |
| 1909 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1910 | do_not_strip_quotes: ; |
| 1911 | } |
| 1912 | |
| 1913 | if (! yyres) |
| 1914 | return yystrlen (yystr); |
| 1915 | |
| 1916 | return yystpcpy (yyres, yystr) - yyres; |
| 1917 | } |
| 1918 | # endif |
| 1919 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1920 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
| 1921 | about the unexpected token YYTOKEN for the state stack whose top is |
| 1922 | YYSSP. |
| 1923 | |
| 1924 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
| 1925 | not large enough to hold the message. In that case, also set |
| 1926 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
| 1927 | required number of bytes is too large to store. */ |
| 1928 | static int |
| 1929 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
| 1930 | yytype_int16 *yyssp, int yytoken) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1931 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1932 | YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
| 1933 | YYSIZE_T yysize = yysize0; |
| 1934 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1935 | /* Internationalized format string. */ |
| 1936 | const char *yyformat = YY_NULLPTR; |
| 1937 | /* Arguments of yyformat. */ |
| 1938 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1939 | /* Number of reported tokens (one for the "unexpected", one per |
| 1940 | "expected"). */ |
| 1941 | int yycount = 0; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1942 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1943 | /* There are many possibilities here to consider: |
| 1944 | - If this state is a consistent state with a default action, then |
| 1945 | the only way this function was invoked is if the default action |
| 1946 | is an error action. In that case, don't check for expected |
| 1947 | tokens because there are none. |
| 1948 | - The only way there can be no lookahead present (in yychar) is if |
| 1949 | this state is a consistent state with a default action. Thus, |
| 1950 | detecting the absence of a lookahead is sufficient to determine |
| 1951 | that there is no unexpected or expected token to report. In that |
| 1952 | case, just report a simple "syntax error". |
| 1953 | - Don't assume there isn't a lookahead just because this state is a |
| 1954 | consistent state with a default action. There might have been a |
| 1955 | previous inconsistent state, consistent state with a non-default |
| 1956 | action, or user semantic action that manipulated yychar. |
| 1957 | - Of course, the expected token list depends on states to have |
| 1958 | correct lookahead information, and it depends on the parser not |
| 1959 | to perform extra reductions after fetching a lookahead from the |
| 1960 | scanner and before detecting a syntax error. Thus, state merging |
| 1961 | (from LALR or IELR) and default reductions corrupt the expected |
| 1962 | token list. However, the list is correct for canonical LR with |
| 1963 | one exception: it will still contain any token that will not be |
| 1964 | accepted due to an error action in a later state. |
| 1965 | */ |
| 1966 | if (yytoken != YYEMPTY) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1967 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1968 | int yyn = yypact[*yyssp]; |
| 1969 | yyarg[yycount++] = yytname[yytoken]; |
| 1970 | if (!yypact_value_is_default (yyn)) |
| 1971 | { |
| 1972 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1973 | YYCHECK. In other words, skip the first -YYN actions for |
| 1974 | this state because they are default actions. */ |
| 1975 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1976 | /* Stay within bounds of both yycheck and yytname. */ |
| 1977 | int yychecklim = YYLAST - yyn + 1; |
| 1978 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1979 | int yyx; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 1980 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 1981 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1982 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
| 1983 | && !yytable_value_is_error (yytable[yyx + yyn])) |
| 1984 | { |
| 1985 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1986 | { |
| 1987 | yycount = 1; |
| 1988 | yysize = yysize0; |
| 1989 | break; |
| 1990 | } |
| 1991 | yyarg[yycount++] = yytname[yyx]; |
| 1992 | { |
| 1993 | YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
| 1994 | if (! (yysize <= yysize1 |
| 1995 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1996 | return 2; |
| 1997 | yysize = yysize1; |
| 1998 | } |
| 1999 | } |
| 2000 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2001 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2002 | |
| 2003 | switch (yycount) |
| 2004 | { |
| 2005 | # define YYCASE_(N, S) \ |
| 2006 | case N: \ |
| 2007 | yyformat = S; \ |
| 2008 | break |
| 2009 | YYCASE_(0, YY_("syntax error")); |
| 2010 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
| 2011 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
| 2012 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
| 2013 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
| 2014 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
| 2015 | # undef YYCASE_ |
| 2016 | } |
| 2017 | |
| 2018 | { |
| 2019 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
| 2020 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 2021 | return 2; |
| 2022 | yysize = yysize1; |
| 2023 | } |
| 2024 | |
| 2025 | if (*yymsg_alloc < yysize) |
| 2026 | { |
| 2027 | *yymsg_alloc = 2 * yysize; |
| 2028 | if (! (yysize <= *yymsg_alloc |
| 2029 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 2030 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
| 2031 | return 1; |
| 2032 | } |
| 2033 | |
| 2034 | /* Avoid sprintf, as that infringes on the user's name space. |
| 2035 | Don't have undefined behavior even if the translation |
| 2036 | produced a string with the wrong number of "%s"s. */ |
| 2037 | { |
| 2038 | char *yyp = *yymsg; |
| 2039 | int yyi = 0; |
| 2040 | while ((*yyp = *yyformat) != '\0') |
| 2041 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
| 2042 | { |
| 2043 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 2044 | yyformat += 2; |
| 2045 | } |
| 2046 | else |
| 2047 | { |
| 2048 | yyp++; |
| 2049 | yyformat++; |
| 2050 | } |
| 2051 | } |
| 2052 | return 0; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2053 | } |
| 2054 | #endif /* YYERROR_VERBOSE */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2055 | |
| 2056 | /*-----------------------------------------------. |
| 2057 | | Release the memory associated to this symbol. | |
| 2058 | `-----------------------------------------------*/ |
| 2059 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2060 | static void |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2061 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void* yyscanner) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2062 | { |
| 2063 | YYUSE (yyvaluep); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2064 | YYUSE (yylocationp); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2065 | YYUSE (context); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2066 | YYUSE (yyscanner); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2067 | if (!yymsg) |
| 2068 | yymsg = "Deleting"; |
| 2069 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 2070 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2071 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 2072 | YYUSE (yytype); |
| 2073 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2074 | } |
| 2075 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2076 | |
| 2077 | |
| 2078 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2079 | /*----------. |
| 2080 | | yyparse. | |
| 2081 | `----------*/ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2082 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2083 | int |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2084 | yyparse (TParseContext* context, void* yyscanner) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2085 | { |
| 2086 | /* The lookahead symbol. */ |
| 2087 | int yychar; |
| 2088 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2089 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2090 | /* The semantic value of the lookahead symbol. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2091 | /* Default value used for initialization, for pacifying older GCCs |
| 2092 | or non-GCC compilers. */ |
| 2093 | YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
| 2094 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2095 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2096 | /* Location data for the lookahead symbol. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2097 | static YYLTYPE yyloc_default |
| 2098 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 2099 | = { 1, 1, 1, 1 } |
| 2100 | # endif |
| 2101 | ; |
| 2102 | YYLTYPE yylloc = yyloc_default; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2103 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2104 | /* Number of syntax errors so far. */ |
| 2105 | int yynerrs; |
| 2106 | |
| 2107 | int yystate; |
| 2108 | /* Number of tokens to shift before error messages enabled. */ |
| 2109 | int yyerrstatus; |
| 2110 | |
| 2111 | /* The stacks and their tools: |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2112 | 'yyss': related to states. |
| 2113 | 'yyvs': related to semantic values. |
| 2114 | 'yyls': related to locations. |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2115 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2116 | Refer to the stacks through separate pointers, to allow yyoverflow |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2117 | to reallocate them elsewhere. */ |
| 2118 | |
| 2119 | /* The state stack. */ |
| 2120 | yytype_int16 yyssa[YYINITDEPTH]; |
| 2121 | yytype_int16 *yyss; |
| 2122 | yytype_int16 *yyssp; |
| 2123 | |
| 2124 | /* The semantic value stack. */ |
| 2125 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2126 | YYSTYPE *yyvs; |
| 2127 | YYSTYPE *yyvsp; |
| 2128 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2129 | /* The location stack. */ |
| 2130 | YYLTYPE yylsa[YYINITDEPTH]; |
| 2131 | YYLTYPE *yyls; |
| 2132 | YYLTYPE *yylsp; |
| 2133 | |
| 2134 | /* The locations where the error started and ended. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2135 | YYLTYPE yyerror_range[3]; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2136 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2137 | YYSIZE_T yystacksize; |
| 2138 | |
| 2139 | int yyn; |
| 2140 | int yyresult; |
| 2141 | /* Lookahead token as an internal (translated) token number. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2142 | int yytoken = 0; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2143 | /* The variables used to return semantic value and location from the |
| 2144 | action routines. */ |
| 2145 | YYSTYPE yyval; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2146 | YYLTYPE yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2147 | |
| 2148 | #if YYERROR_VERBOSE |
| 2149 | /* Buffer for error messages, and its allocated size. */ |
| 2150 | char yymsgbuf[128]; |
| 2151 | char *yymsg = yymsgbuf; |
| 2152 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 2153 | #endif |
| 2154 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2155 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2156 | |
| 2157 | /* The number of symbols on the RHS of the reduced rule. |
| 2158 | Keep to zero when no symbol should be popped. */ |
| 2159 | int yylen = 0; |
| 2160 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2161 | yyssp = yyss = yyssa; |
| 2162 | yyvsp = yyvs = yyvsa; |
| 2163 | yylsp = yyls = yylsa; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2164 | yystacksize = YYINITDEPTH; |
| 2165 | |
| 2166 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 2167 | |
| 2168 | yystate = 0; |
| 2169 | yyerrstatus = 0; |
| 2170 | yynerrs = 0; |
| 2171 | yychar = YYEMPTY; /* Cause a token to be read. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2172 | yylsp[0] = yylloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2173 | goto yysetstate; |
| 2174 | |
| 2175 | /*------------------------------------------------------------. |
| 2176 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2177 | `------------------------------------------------------------*/ |
| 2178 | yynewstate: |
| 2179 | /* In all cases, when you get here, the value and location stacks |
| 2180 | have just been pushed. So pushing a state here evens the stacks. */ |
| 2181 | yyssp++; |
| 2182 | |
| 2183 | yysetstate: |
| 2184 | *yyssp = yystate; |
| 2185 | |
| 2186 | if (yyss + yystacksize - 1 <= yyssp) |
| 2187 | { |
| 2188 | /* Get the current used size of the three stacks, in elements. */ |
| 2189 | YYSIZE_T yysize = yyssp - yyss + 1; |
| 2190 | |
| 2191 | #ifdef yyoverflow |
| 2192 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2193 | /* Give user a chance to reallocate the stack. Use copies of |
| 2194 | these so that the &'s don't force the real ones into |
| 2195 | memory. */ |
| 2196 | YYSTYPE *yyvs1 = yyvs; |
| 2197 | yytype_int16 *yyss1 = yyss; |
| 2198 | YYLTYPE *yyls1 = yyls; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2199 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2200 | /* Each stack pointer address is followed by the size of the |
| 2201 | data in use in that stack, in bytes. This used to be a |
| 2202 | conditional around just the two extra args, but that might |
| 2203 | be undefined if yyoverflow is a macro. */ |
| 2204 | yyoverflow (YY_("memory exhausted"), |
| 2205 | &yyss1, yysize * sizeof (*yyssp), |
| 2206 | &yyvs1, yysize * sizeof (*yyvsp), |
| 2207 | &yyls1, yysize * sizeof (*yylsp), |
| 2208 | &yystacksize); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2209 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2210 | yyls = yyls1; |
| 2211 | yyss = yyss1; |
| 2212 | yyvs = yyvs1; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2213 | } |
| 2214 | #else /* no yyoverflow */ |
| 2215 | # ifndef YYSTACK_RELOCATE |
| 2216 | goto yyexhaustedlab; |
| 2217 | # else |
| 2218 | /* Extend the stack our own way. */ |
| 2219 | if (YYMAXDEPTH <= yystacksize) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2220 | goto yyexhaustedlab; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2221 | yystacksize *= 2; |
| 2222 | if (YYMAXDEPTH < yystacksize) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2223 | yystacksize = YYMAXDEPTH; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2224 | |
| 2225 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2226 | yytype_int16 *yyss1 = yyss; |
| 2227 | union yyalloc *yyptr = |
| 2228 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2229 | if (! yyptr) |
| 2230 | goto yyexhaustedlab; |
| 2231 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 2232 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
| 2233 | YYSTACK_RELOCATE (yyls_alloc, yyls); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2234 | # undef YYSTACK_RELOCATE |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2235 | if (yyss1 != yyssa) |
| 2236 | YYSTACK_FREE (yyss1); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2237 | } |
| 2238 | # endif |
| 2239 | #endif /* no yyoverflow */ |
| 2240 | |
| 2241 | yyssp = yyss + yysize - 1; |
| 2242 | yyvsp = yyvs + yysize - 1; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2243 | yylsp = yyls + yysize - 1; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2244 | |
| 2245 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2246 | (unsigned long int) yystacksize)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2247 | |
| 2248 | if (yyss + yystacksize - 1 <= yyssp) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2249 | YYABORT; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2250 | } |
| 2251 | |
| 2252 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 2253 | |
| 2254 | if (yystate == YYFINAL) |
| 2255 | YYACCEPT; |
| 2256 | |
| 2257 | goto yybackup; |
| 2258 | |
| 2259 | /*-----------. |
| 2260 | | yybackup. | |
| 2261 | `-----------*/ |
| 2262 | yybackup: |
| 2263 | |
| 2264 | /* Do appropriate processing given the current state. Read a |
| 2265 | lookahead token if we need one and don't already have one. */ |
| 2266 | |
| 2267 | /* First try to decide what to do without reference to lookahead token. */ |
| 2268 | yyn = yypact[yystate]; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2269 | if (yypact_value_is_default (yyn)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2270 | goto yydefault; |
| 2271 | |
| 2272 | /* Not known => get a lookahead token if don't already have one. */ |
| 2273 | |
| 2274 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 2275 | if (yychar == YYEMPTY) |
| 2276 | { |
| 2277 | YYDPRINTF ((stderr, "Reading a token: ")); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2278 | yychar = yylex (&yylval, &yylloc, yyscanner); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2279 | } |
| 2280 | |
| 2281 | if (yychar <= YYEOF) |
| 2282 | { |
| 2283 | yychar = yytoken = YYEOF; |
| 2284 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 2285 | } |
| 2286 | else |
| 2287 | { |
| 2288 | yytoken = YYTRANSLATE (yychar); |
| 2289 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 2290 | } |
| 2291 | |
| 2292 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 2293 | detect an error, take that action. */ |
| 2294 | yyn += yytoken; |
| 2295 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
| 2296 | goto yydefault; |
| 2297 | yyn = yytable[yyn]; |
| 2298 | if (yyn <= 0) |
| 2299 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2300 | if (yytable_value_is_error (yyn)) |
| 2301 | goto yyerrlab; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2302 | yyn = -yyn; |
| 2303 | goto yyreduce; |
| 2304 | } |
| 2305 | |
| 2306 | /* Count tokens shifted since error; after three, turn off error |
| 2307 | status. */ |
| 2308 | if (yyerrstatus) |
| 2309 | yyerrstatus--; |
| 2310 | |
| 2311 | /* Shift the lookahead token. */ |
| 2312 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2313 | |
| 2314 | /* Discard the shifted token. */ |
| 2315 | yychar = YYEMPTY; |
| 2316 | |
| 2317 | yystate = yyn; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2318 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2319 | *++yyvsp = yylval; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2320 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2321 | *++yylsp = yylloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2322 | goto yynewstate; |
| 2323 | |
| 2324 | |
| 2325 | /*-----------------------------------------------------------. |
| 2326 | | yydefault -- do the default action for the current state. | |
| 2327 | `-----------------------------------------------------------*/ |
| 2328 | yydefault: |
| 2329 | yyn = yydefact[yystate]; |
| 2330 | if (yyn == 0) |
| 2331 | goto yyerrlab; |
| 2332 | goto yyreduce; |
| 2333 | |
| 2334 | |
| 2335 | /*-----------------------------. |
| 2336 | | yyreduce -- Do a reduction. | |
| 2337 | `-----------------------------*/ |
| 2338 | yyreduce: |
| 2339 | /* yyn is the number of a rule to reduce with. */ |
| 2340 | yylen = yyr2[yyn]; |
| 2341 | |
| 2342 | /* If YYLEN is nonzero, implement the default value of the action: |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2343 | '$$ = $1'. |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2344 | |
| 2345 | Otherwise, the following line sets YYVAL to garbage. |
| 2346 | This behavior is undocumented and Bison |
| 2347 | users should not rely upon it. Assigning to YYVAL |
| 2348 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2349 | GCC warning that YYVAL may be used uninitialized. */ |
| 2350 | yyval = yyvsp[1-yylen]; |
| 2351 | |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 2352 | /* Default location. */ |
| 2353 | YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2354 | YY_REDUCE_PRINT (yyn); |
| 2355 | switch (yyn) |
| 2356 | { |
| 2357 | case 2: |
| 2358 | |
| 2359 | { |
| 2360 | // The symbol table search was done in the lexical phase |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2361 | const TVariable *variable = context->getNamedVariable((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2362 | |
| 2363 | // don't delete $1.string, it's used by error recovery, and the pool |
| 2364 | // pop will reclaim the memory |
| 2365 | |
Nicolas Capens | 31ad2aa | 2015-02-26 13:14:27 -0500 | [diff] [blame] | 2366 | if (variable->getType().getQualifier() == EvqConstExpr ) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2367 | ConstantUnion* constArray = variable->getConstPointer(); |
| 2368 | TType t(variable->getType()); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2369 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2370 | } else |
| 2371 | (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(), |
| 2372 | variable->getName(), |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2373 | variable->getType(), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2374 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2375 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2376 | break; |
| 2377 | |
| 2378 | case 3: |
| 2379 | |
| 2380 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2381 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2382 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2383 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2384 | break; |
| 2385 | |
| 2386 | case 4: |
| 2387 | |
| 2388 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2389 | ConstantUnion *unionArray = new ConstantUnion[1]; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2390 | unionArray->setIConst((yyvsp[0].lex).i); |
| 2391 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2392 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2393 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2394 | break; |
| 2395 | |
| 2396 | case 5: |
| 2397 | |
| 2398 | { |
| 2399 | ConstantUnion *unionArray = new ConstantUnion[1]; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2400 | unionArray->setUConst((yyvsp[0].lex).u); |
| 2401 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[0])); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2402 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2403 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2404 | break; |
| 2405 | |
| 2406 | case 6: |
| 2407 | |
| 2408 | { |
| 2409 | ConstantUnion *unionArray = new ConstantUnion[1]; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2410 | unionArray->setFConst((yyvsp[0].lex).f); |
| 2411 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2412 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2413 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2414 | break; |
| 2415 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2416 | case 7: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2417 | |
| 2418 | { |
| 2419 | ConstantUnion *unionArray = new ConstantUnion[1]; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2420 | unionArray->setBConst((yyvsp[0].lex).b); |
| 2421 | (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2422 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2423 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2424 | break; |
| 2425 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2426 | case 8: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2427 | |
| 2428 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2429 | (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2430 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2431 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2432 | break; |
| 2433 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2434 | case 9: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2435 | |
| 2436 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2437 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2438 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2439 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2440 | break; |
| 2441 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2442 | case 10: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2443 | |
| 2444 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2445 | (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2446 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2447 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2448 | break; |
| 2449 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2450 | case 11: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2451 | |
| 2452 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2453 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2454 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2455 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2456 | break; |
| 2457 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2458 | case 12: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2459 | |
| 2460 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2461 | (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2462 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2463 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2464 | break; |
| 2465 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2466 | case 13: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2467 | |
| 2468 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2469 | (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2470 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2471 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2472 | break; |
| 2473 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2474 | case 14: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2475 | |
| 2476 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2477 | (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2478 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2479 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2480 | break; |
| 2481 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2482 | case 15: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2483 | |
| 2484 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2485 | if (context->integerErrorCheck((yyvsp[0].interm.intermTypedNode), "[]")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2486 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2487 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2488 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2489 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2490 | break; |
| 2491 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2492 | case 16: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2493 | |
| 2494 | { |
Alexis Hetu | b3ff42c | 2015-07-03 18:19:57 -0400 | [diff] [blame] | 2495 | bool fatalError = false; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2496 | (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[0].interm).function, (yyvsp[0].interm).nodePair.node1, (yyvsp[0].interm).nodePair.node2, (yylsp[0]), &fatalError); |
Alexis Hetu | b3ff42c | 2015-07-03 18:19:57 -0400 | [diff] [blame] | 2497 | if (fatalError) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2498 | { |
Alexis Hetu | b3ff42c | 2015-07-03 18:19:57 -0400 | [diff] [blame] | 2499 | YYERROR; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2500 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2501 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2502 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2503 | break; |
| 2504 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2505 | case 17: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2506 | |
| 2507 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2508 | (yyval.interm) = (yyvsp[0].interm); |
Alexis Hetu | 950cb44 | 2015-07-06 11:38:53 -0400 | [diff] [blame] | 2509 | (yyval.interm).nodePair.node2 = nullptr; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2510 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2511 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2512 | break; |
| 2513 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2514 | case 18: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2515 | |
| 2516 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2517 | ES3_ONLY("", (yylsp[0]), "methods"); |
| 2518 | (yyval.interm) = (yyvsp[0].interm); |
| 2519 | (yyval.interm).nodePair.node2 = (yyvsp[-2].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2520 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2521 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2522 | break; |
| 2523 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2524 | case 19: |
| 2525 | |
| 2526 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2527 | (yyval.interm) = (yyvsp[-1].interm); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2528 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2529 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2530 | break; |
| 2531 | |
| 2532 | case 20: |
| 2533 | |
| 2534 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2535 | (yyval.interm) = (yyvsp[-1].interm); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2536 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2537 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2538 | break; |
| 2539 | |
| 2540 | case 21: |
| 2541 | |
| 2542 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2543 | (yyval.interm).function = (yyvsp[-1].interm.function); |
Alexis Hetu | 950cb44 | 2015-07-06 11:38:53 -0400 | [diff] [blame] | 2544 | (yyval.interm).nodePair.node1 = nullptr; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2545 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2546 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2547 | break; |
| 2548 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2549 | case 22: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2550 | |
| 2551 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2552 | (yyval.interm).function = (yyvsp[0].interm.function); |
Alexis Hetu | 950cb44 | 2015-07-06 11:38:53 -0400 | [diff] [blame] | 2553 | (yyval.interm).nodePair.node1 = nullptr; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2554 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2555 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2556 | break; |
| 2557 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2558 | case 23: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2559 | |
| 2560 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2561 | TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) }; |
| 2562 | (yyvsp[-1].interm.function)->addParameter(param); |
| 2563 | (yyval.interm).function = (yyvsp[-1].interm.function); |
| 2564 | (yyval.interm).nodePair.node1 = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2565 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2566 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2567 | break; |
| 2568 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2569 | case 24: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2570 | |
| 2571 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2572 | TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) }; |
| 2573 | (yyvsp[-2].interm).function->addParameter(param); |
| 2574 | (yyval.interm).function = (yyvsp[-2].interm).function; |
| 2575 | (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2576 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2577 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2578 | break; |
| 2579 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2580 | case 25: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2581 | |
| 2582 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2583 | (yyval.interm.function) = (yyvsp[-1].interm.function); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2584 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2585 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2586 | break; |
| 2587 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2588 | case 26: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2589 | |
| 2590 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2591 | if ((yyvsp[0].interm.type).array) { |
| 2592 | ES3_ONLY("[]", (yylsp[0]), "array constructor"); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2593 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2594 | (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2595 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2596 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2597 | break; |
| 2598 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2599 | case 27: |
| 2600 | |
| 2601 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2602 | if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2603 | context->recover(); |
| 2604 | TType type(EbtVoid, EbpUndefined); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2605 | TFunction *function = new TFunction((yyvsp[0].lex).string, type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2606 | (yyval.interm.function) = function; |
| 2607 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2608 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2609 | break; |
| 2610 | |
| 2611 | case 28: |
| 2612 | |
| 2613 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2614 | if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string)) |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2615 | context->recover(); |
| 2616 | TType type(EbtVoid, EbpUndefined); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2617 | TFunction *function = new TFunction((yyvsp[0].lex).string, type); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2618 | (yyval.interm.function) = function; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2619 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2620 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2621 | break; |
| 2622 | |
| 2623 | case 29: |
| 2624 | |
| 2625 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2626 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2627 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2628 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2629 | break; |
| 2630 | |
| 2631 | case 30: |
| 2632 | |
| 2633 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2634 | (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2635 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2636 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2637 | break; |
| 2638 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2639 | case 31: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2640 | |
| 2641 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2642 | (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2643 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2644 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2645 | break; |
| 2646 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2647 | case 32: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2648 | |
| 2649 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2650 | if ((yyvsp[-1].interm).op != EOpNull) { |
| 2651 | (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2652 | } else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2653 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2654 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2655 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2656 | break; |
| 2657 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2658 | case 33: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2659 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2660 | { (yyval.interm).op = EOpNull; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2661 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2662 | break; |
| 2663 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2664 | case 34: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2665 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2666 | { (yyval.interm).op = EOpNegative; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2667 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2668 | break; |
| 2669 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2670 | case 35: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2671 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2672 | { (yyval.interm).op = EOpLogicalNot; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2673 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2674 | break; |
| 2675 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2676 | case 36: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2677 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2678 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2679 | ES3_ONLY("~", (yylsp[0]), "bit-wise operator"); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2680 | (yyval.interm).op = EOpBitwiseNot; |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2681 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2682 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2683 | break; |
| 2684 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2685 | case 37: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2686 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2687 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2688 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2689 | break; |
| 2690 | |
| 2691 | case 38: |
| 2692 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2693 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2694 | FRAG_VERT_ONLY("*", (yylsp[-1])); |
| 2695 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2696 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2697 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2698 | break; |
| 2699 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2700 | case 39: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2701 | |
| 2702 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2703 | FRAG_VERT_ONLY("/", (yylsp[-1])); |
| 2704 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2705 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2706 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2707 | break; |
| 2708 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2709 | case 40: |
| 2710 | |
| 2711 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2712 | FRAG_VERT_ONLY("%", (yylsp[-1])); |
| 2713 | ES3_ONLY("%", (yylsp[-1]), "integer modulus operator"); |
| 2714 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2715 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2716 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2717 | break; |
| 2718 | |
| 2719 | case 41: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2720 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2721 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2722 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2723 | break; |
| 2724 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2725 | case 42: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2726 | |
| 2727 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2728 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2729 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2730 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2731 | break; |
| 2732 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2733 | case 43: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2734 | |
| 2735 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2736 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2737 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2738 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2739 | break; |
| 2740 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2741 | case 44: |
| 2742 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2743 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2744 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2745 | break; |
| 2746 | |
| 2747 | case 45: |
| 2748 | |
| 2749 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2750 | ES3_ONLY("<<", (yylsp[-1]), "bit-wise operator"); |
| 2751 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2752 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2753 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2754 | break; |
| 2755 | |
| 2756 | case 46: |
| 2757 | |
| 2758 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2759 | ES3_ONLY(">>", (yylsp[-1]), "bit-wise operator"); |
| 2760 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2761 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2762 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2763 | break; |
| 2764 | |
| 2765 | case 47: |
| 2766 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2767 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2768 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2769 | break; |
| 2770 | |
| 2771 | case 48: |
| 2772 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2773 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2774 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2775 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2776 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2777 | break; |
| 2778 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2779 | case 49: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2780 | |
| 2781 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2782 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2783 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2784 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2785 | break; |
| 2786 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2787 | case 50: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2788 | |
| 2789 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2790 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2791 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2792 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2793 | break; |
| 2794 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2795 | case 51: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2796 | |
| 2797 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2798 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2799 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2800 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2801 | break; |
| 2802 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2803 | case 52: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2804 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2805 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2806 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2807 | break; |
| 2808 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2809 | case 53: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2810 | |
| 2811 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2812 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2813 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2814 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2815 | break; |
| 2816 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2817 | case 54: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2818 | |
| 2819 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2820 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2821 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2822 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2823 | break; |
| 2824 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 2825 | case 55: |
| 2826 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2827 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2828 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2829 | break; |
| 2830 | |
| 2831 | case 56: |
| 2832 | |
| 2833 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2834 | ES3_ONLY("&", (yylsp[-1]), "bit-wise operator"); |
| 2835 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2836 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2837 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2838 | break; |
| 2839 | |
| 2840 | case 57: |
| 2841 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2842 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2843 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2844 | break; |
| 2845 | |
| 2846 | case 58: |
| 2847 | |
| 2848 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2849 | ES3_ONLY("^", (yylsp[-1]), "bit-wise operator"); |
| 2850 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2851 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2852 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2853 | break; |
| 2854 | |
| 2855 | case 59: |
| 2856 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2857 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2858 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2859 | break; |
| 2860 | |
| 2861 | case 60: |
| 2862 | |
| 2863 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2864 | ES3_ONLY("|", (yylsp[-1]), "bit-wise operator"); |
| 2865 | (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2866 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2867 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2868 | break; |
| 2869 | |
| 2870 | case 61: |
| 2871 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2872 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2873 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2874 | break; |
| 2875 | |
| 2876 | case 62: |
| 2877 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2878 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2879 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2880 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2881 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2882 | break; |
| 2883 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2884 | case 63: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2885 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2886 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2887 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2888 | break; |
| 2889 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2890 | case 64: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2891 | |
| 2892 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2893 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2894 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2895 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2896 | break; |
| 2897 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2898 | case 65: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2899 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2900 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2901 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2902 | break; |
| 2903 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2904 | case 66: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2905 | |
| 2906 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2907 | (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2908 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2909 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2910 | break; |
| 2911 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2912 | case 67: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2913 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2914 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2915 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2916 | break; |
| 2917 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2918 | case 68: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2919 | |
| 2920 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2921 | (yyval.interm.intermTypedNode) = context->addTernarySelection((yyvsp[-4].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-3])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2922 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2923 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2924 | break; |
| 2925 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2926 | case 69: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2927 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2928 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 2929 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2930 | break; |
| 2931 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2932 | case 70: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2933 | |
| 2934 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2935 | if (context->lValueErrorCheck((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2936 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2937 | (yyval.interm.intermTypedNode) = context->addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2938 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2939 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2940 | break; |
| 2941 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2942 | case 71: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2943 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2944 | { (yyval.interm).op = EOpAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2945 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2946 | break; |
| 2947 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2948 | case 72: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2949 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2950 | { FRAG_VERT_ONLY("*=", (yylsp[0])); (yyval.interm).op = EOpMulAssign; } |
| 2951 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2952 | break; |
| 2953 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2954 | case 73: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2955 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2956 | { FRAG_VERT_ONLY("/=", (yylsp[0])); (yyval.interm).op = EOpDivAssign; } |
| 2957 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2958 | break; |
| 2959 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2960 | case 74: |
| 2961 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2962 | { ES3_ONLY("%=", (yylsp[0]), "integer modulus operator"); |
| 2963 | FRAG_VERT_ONLY("%=", (yylsp[0])); (yyval.interm).op = EOpIModAssign; } |
| 2964 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2965 | break; |
| 2966 | |
| 2967 | case 75: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2968 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2969 | { (yyval.interm).op = EOpAddAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2970 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2971 | break; |
| 2972 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2973 | case 76: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2974 | |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2975 | { (yyval.interm).op = EOpSubAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2976 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 2977 | break; |
| 2978 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2979 | case 77: |
| 2980 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2981 | { ES3_ONLY("<<=", (yylsp[0]), "bit-wise operator"); |
| 2982 | FRAG_VERT_ONLY("<<=", (yylsp[0])); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2983 | (yyval.interm).op = EOpBitShiftLeftAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2984 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2985 | break; |
| 2986 | |
| 2987 | case 78: |
| 2988 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2989 | { ES3_ONLY(">>=", (yylsp[0]), "bit-wise operator"); |
| 2990 | FRAG_VERT_ONLY(">>=", (yylsp[0])); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2991 | (yyval.interm).op = EOpBitShiftRightAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2992 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 2993 | break; |
| 2994 | |
| 2995 | case 79: |
| 2996 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 2997 | { ES3_ONLY("&=", (yylsp[0]), "bit-wise operator"); |
| 2998 | FRAG_VERT_ONLY("&=", (yylsp[0])); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 2999 | (yyval.interm).op = EOpBitwiseAndAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3000 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3001 | break; |
| 3002 | |
| 3003 | case 80: |
| 3004 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3005 | { ES3_ONLY("^=", (yylsp[0]), "bit-wise operator"); |
| 3006 | FRAG_VERT_ONLY("^=", (yylsp[0])); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3007 | (yyval.interm).op = EOpBitwiseXorAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3008 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3009 | break; |
| 3010 | |
| 3011 | case 81: |
| 3012 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3013 | { ES3_ONLY("|=", (yylsp[0]), "bit-wise operator"); |
| 3014 | FRAG_VERT_ONLY("|=", (yylsp[0])); |
Alexis Hetu | 253fdd1 | 2015-07-07 15:12:46 -0400 | [diff] [blame] | 3015 | (yyval.interm).op = EOpBitwiseOrAssign; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3016 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3017 | break; |
| 3018 | |
| 3019 | case 82: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3020 | |
| 3021 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3022 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3023 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3024 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3025 | break; |
| 3026 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3027 | case 83: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3028 | |
| 3029 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3030 | (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3031 | if ((yyval.interm.intermTypedNode) == 0) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3032 | context->binaryOpError((yylsp[-1]), ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3033 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3034 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3035 | } |
| 3036 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3037 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3038 | break; |
| 3039 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3040 | case 84: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3041 | |
| 3042 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3043 | if (context->constErrorCheck((yyvsp[0].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3044 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3045 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3046 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3047 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3048 | break; |
| 3049 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3050 | case 85: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3051 | |
| 3052 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3053 | if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3054 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3055 | (yyval.lex) = (yyvsp[-1].lex); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3056 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3057 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3058 | break; |
| 3059 | |
| 3060 | case 86: |
| 3061 | |
| 3062 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3063 | TFunction &function = *((yyvsp[-1].interm).function); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3064 | |
| 3065 | TIntermAggregate *prototype = new TIntermAggregate; |
| 3066 | prototype->setType(function.getReturnType()); |
| 3067 | prototype->setName(function.getName()); |
| 3068 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 3069 | for (size_t i = 0; i < function.getParamCount(); i++) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3070 | { |
| 3071 | const TParameter ¶m = function.getParam(i); |
| 3072 | if (param.name != 0) |
| 3073 | { |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3074 | TVariable variable(param.name, *param.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3075 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3076 | prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[-1])), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3077 | } |
| 3078 | else |
| 3079 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3080 | prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[-1])), (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3081 | } |
| 3082 | } |
| 3083 | |
| 3084 | prototype->setOp(EOpPrototype); |
| 3085 | (yyval.interm.intermNode) = prototype; |
| 3086 | |
| 3087 | context->symbolTable.pop(); |
| 3088 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3089 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3090 | break; |
| 3091 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3092 | case 87: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3093 | |
| 3094 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3095 | TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate; |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3096 | if (aggNode && aggNode->getOp() == EOpNull) |
| 3097 | aggNode->setOp(EOpDeclaration); |
| 3098 | (yyval.interm.intermNode) = aggNode; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3099 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3100 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3101 | break; |
| 3102 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3103 | case 88: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3104 | |
| 3105 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3106 | if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) { |
| 3107 | context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type)); |
John Bauman | d4ae863 | 2014-05-06 16:18:33 -0400 | [diff] [blame] | 3108 | context->recover(); |
| 3109 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3110 | (yyval.interm.intermNode) = 0; |
| 3111 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3112 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3113 | break; |
| 3114 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3115 | case 89: |
| 3116 | |
| 3117 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3118 | ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks"); |
| 3119 | (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-4].interm.type), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yylsp[-4]), NULL, (yylsp[-4])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3120 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3121 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3122 | break; |
| 3123 | |
| 3124 | case 90: |
| 3125 | |
| 3126 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3127 | ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks"); |
| 3128 | (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-5].interm.type), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yylsp[-5])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3129 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3130 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3131 | break; |
| 3132 | |
| 3133 | case 91: |
| 3134 | |
| 3135 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3136 | ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks"); |
| 3137 | (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-8].interm.type), (yylsp[-7]), *(yyvsp[-7].lex).string, (yyvsp[-6].interm.fieldList), (yyvsp[-4].lex).string, (yylsp[-4]), (yyvsp[-2].interm.intermTypedNode), (yylsp[-3])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3138 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3139 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3140 | break; |
| 3141 | |
| 3142 | case 92: |
| 3143 | |
| 3144 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3145 | context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type)); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3146 | (yyval.interm.intermNode) = 0; |
| 3147 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3148 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3149 | break; |
| 3150 | |
| 3151 | case 93: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3152 | |
| 3153 | { |
| 3154 | // |
| 3155 | // Multiple declarations of the same function are allowed. |
| 3156 | // |
| 3157 | // If this is a definition, the definition production code will check for redefinitions |
| 3158 | // (we don't know at this point if it's a definition or not). |
| 3159 | // |
| 3160 | // Redeclarations are allowed. But, return types and parameter qualifiers must match. |
| 3161 | // |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3162 | TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[-1].interm.function)->getMangledName(), context->getShaderVersion())); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3163 | if (prevDec) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3164 | if (prevDec->getReturnType() != (yyvsp[-1].interm.function)->getReturnType()) { |
| 3165 | context->error((yylsp[0]), "overloaded functions must have the same return type", (yyvsp[-1].interm.function)->getReturnType().getBasicString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3166 | context->recover(); |
| 3167 | } |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 3168 | for (size_t i = 0; i < prevDec->getParamCount(); ++i) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3169 | if (prevDec->getParam(i).type->getQualifier() != (yyvsp[-1].interm.function)->getParam(i).type->getQualifier()) { |
| 3170 | context->error((yylsp[0]), "overloaded functions must have the same parameter qualifiers", (yyvsp[-1].interm.function)->getParam(i).type->getQualifierString()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3171 | context->recover(); |
| 3172 | } |
| 3173 | } |
| 3174 | } |
| 3175 | |
| 3176 | // |
| 3177 | // If this is a redeclaration, it could also be a definition, |
| 3178 | // in which case, we want to use the variable names from this one, and not the one that's |
| 3179 | // being redeclared. So, pass back up this declaration, not the one in the symbol table. |
| 3180 | // |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3181 | (yyval.interm).function = (yyvsp[-1].interm.function); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3182 | |
| 3183 | // We're at the inner scope level of the function's arguments and body statement. |
| 3184 | // Add the function prototype to the surrounding scope instead. |
| 3185 | context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function); |
| 3186 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3187 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3188 | break; |
| 3189 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3190 | case 94: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3191 | |
| 3192 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3193 | (yyval.interm.function) = (yyvsp[0].interm.function); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3194 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3195 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3196 | break; |
| 3197 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3198 | case 95: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3199 | |
| 3200 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3201 | (yyval.interm.function) = (yyvsp[0].interm.function); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3202 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3203 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3204 | break; |
| 3205 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3206 | case 96: |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3207 | |
| 3208 | { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3209 | // Add the parameter |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3210 | (yyval.interm.function) = (yyvsp[-1].interm.function); |
| 3211 | if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) |
| 3212 | (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3213 | else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3214 | delete (yyvsp[0].interm).param.type; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3215 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3216 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3217 | break; |
| 3218 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3219 | case 97: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3220 | |
| 3221 | { |
| 3222 | // |
| 3223 | // Only first parameter of one-parameter functions can be void |
| 3224 | // The check for named parameters not being void is done in parameter_declarator |
| 3225 | // |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3226 | if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3227 | // |
| 3228 | // This parameter > first is void |
| 3229 | // |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3230 | context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void"); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3231 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3232 | delete (yyvsp[0].interm).param.type; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3233 | } else { |
| 3234 | // Add the parameter |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3235 | (yyval.interm.function) = (yyvsp[-2].interm.function); |
| 3236 | (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3237 | } |
| 3238 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3239 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3240 | break; |
| 3241 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3242 | case 98: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3243 | |
| 3244 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3245 | if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) { |
| 3246 | context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3247 | context->recover(); |
| 3248 | } |
| 3249 | // make sure a sampler is not involved as well... |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3250 | if (context->structQualifierErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3251 | context->recover(); |
| 3252 | |
| 3253 | // Add the function as a prototype after parsing it (we do not support recursion) |
| 3254 | TFunction *function; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3255 | TType type((yyvsp[-2].interm.type)); |
| 3256 | function = new TFunction((yyvsp[-1].lex).string, type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3257 | (yyval.interm.function) = function; |
| 3258 | |
| 3259 | context->symbolTable.push(); |
| 3260 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3261 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3262 | break; |
| 3263 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3264 | case 99: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3265 | |
| 3266 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3267 | if ((yyvsp[-1].interm.type).type == EbtVoid) { |
| 3268 | context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3269 | context->recover(); |
| 3270 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3271 | if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3272 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3273 | TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))}; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3274 | (yyval.interm).param = param; |
| 3275 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3276 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3277 | break; |
| 3278 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3279 | case 100: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3280 | |
| 3281 | { |
| 3282 | // Check that we can make an array out of this type |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3283 | if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3284 | context->recover(); |
| 3285 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3286 | if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3287 | context->recover(); |
| 3288 | |
| 3289 | int size; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3290 | if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3291 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3292 | (yyvsp[-4].interm.type).setArray(true, size); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3293 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3294 | TType* type = new TType((yyvsp[-4].interm.type)); |
| 3295 | TParameter param = { (yyvsp[-3].lex).string, type }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3296 | (yyval.interm).param = param; |
| 3297 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3298 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3299 | break; |
| 3300 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3301 | case 101: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3302 | |
| 3303 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3304 | (yyval.interm) = (yyvsp[0].interm); |
| 3305 | if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3306 | context->recover(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3307 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3308 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3309 | break; |
| 3310 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3311 | case 102: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3312 | |
| 3313 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3314 | (yyval.interm) = (yyvsp[0].interm); |
| 3315 | if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3316 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3317 | if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3318 | context->recover(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3319 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3320 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3321 | break; |
| 3322 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3323 | case 103: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3324 | |
| 3325 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3326 | (yyval.interm) = (yyvsp[0].interm); |
| 3327 | if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3328 | context->recover(); |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3329 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3330 | |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3331 | break; |
| 3332 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3333 | case 104: |
Nicolas Capens | 2c1239f | 2015-02-17 17:30:04 -0500 | [diff] [blame] | 3334 | |
| 3335 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3336 | (yyval.interm) = (yyvsp[0].interm); |
| 3337 | if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3338 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3339 | if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type)) |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3340 | context->recover(); |
| 3341 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3342 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3343 | break; |
| 3344 | |
| 3345 | case 105: |
| 3346 | |
| 3347 | { |
| 3348 | (yyval.interm.qualifier) = EvqIn; |
| 3349 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3350 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3351 | break; |
| 3352 | |
| 3353 | case 106: |
| 3354 | |
| 3355 | { |
| 3356 | (yyval.interm.qualifier) = EvqIn; |
| 3357 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3358 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3359 | break; |
| 3360 | |
| 3361 | case 107: |
| 3362 | |
| 3363 | { |
| 3364 | (yyval.interm.qualifier) = EvqOut; |
| 3365 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3366 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3367 | break; |
| 3368 | |
| 3369 | case 108: |
| 3370 | |
| 3371 | { |
| 3372 | (yyval.interm.qualifier) = EvqInOut; |
| 3373 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3374 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3375 | break; |
| 3376 | |
| 3377 | case 109: |
| 3378 | |
| 3379 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3380 | TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3381 | (yyval.interm).param = param; |
| 3382 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3383 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3384 | break; |
| 3385 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3386 | case 110: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3387 | |
| 3388 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3389 | (yyval.interm) = (yyvsp[0].interm); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3390 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3391 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3392 | break; |
| 3393 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3394 | case 111: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3395 | |
| 3396 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3397 | (yyval.interm) = (yyvsp[-2].interm); |
| 3398 | (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yylsp[0]), *(yyvsp[0].lex).string); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3399 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3400 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3401 | break; |
| 3402 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3403 | case 112: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3404 | |
| 3405 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3406 | (yyval.interm) = (yyvsp[-5].interm); |
| 3407 | (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[-5].interm).intermAggregate, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3408 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3409 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3410 | break; |
| 3411 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3412 | case 113: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3413 | |
| 3414 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3415 | ES3_ONLY("[]", (yylsp[-4]), "implicitly sized array"); |
| 3416 | (yyval.interm) = (yyvsp[-6].interm); |
| 3417 | (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[-6].interm).intermAggregate, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3418 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3419 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3420 | break; |
| 3421 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3422 | case 114: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3423 | |
| 3424 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3425 | ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)"); |
| 3426 | (yyval.interm) = (yyvsp[-7].interm); |
| 3427 | (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[-7].interm).intermAggregate, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3428 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3429 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3430 | break; |
| 3431 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3432 | case 115: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3433 | |
| 3434 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3435 | (yyval.interm) = (yyvsp[-4].interm); |
| 3436 | (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[-4].interm).intermAggregate, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3437 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3438 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3439 | break; |
| 3440 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3441 | case 116: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3442 | |
| 3443 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3444 | (yyval.interm).type = (yyvsp[0].interm.type); |
| 3445 | (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), ""); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3446 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3447 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3448 | break; |
| 3449 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3450 | case 117: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3451 | |
| 3452 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3453 | (yyval.interm).type = (yyvsp[-1].interm.type); |
| 3454 | (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3455 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3456 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3457 | break; |
| 3458 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3459 | case 118: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3460 | |
| 3461 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3462 | (yyval.interm).type = (yyvsp[-4].interm.type); |
| 3463 | (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3464 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3465 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3466 | break; |
| 3467 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3468 | case 119: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3469 | |
| 3470 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3471 | ES3_ONLY("[]", (yylsp[-3]), "implicitly sized array"); |
| 3472 | (yyval.interm).type = (yyvsp[-5].interm.type); |
| 3473 | (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3474 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3475 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3476 | break; |
| 3477 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3478 | case 120: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3479 | |
| 3480 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3481 | ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)"); |
| 3482 | (yyval.interm).type = (yyvsp[-6].interm.type); |
| 3483 | (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3484 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3485 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3486 | break; |
| 3487 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3488 | case 121: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3489 | |
| 3490 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3491 | (yyval.interm).type = (yyvsp[-3].interm.type); |
| 3492 | (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3493 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3494 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3495 | break; |
| 3496 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3497 | case 122: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3498 | |
| 3499 | { |
| 3500 | // $$.type is not used in invariant declarations. |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3501 | (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3502 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3503 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3504 | break; |
| 3505 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3506 | case 123: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3507 | |
| 3508 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3509 | (yyval.interm.type) = (yyvsp[0].interm.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3510 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3511 | if ((yyvsp[0].interm.type).array) { |
| 3512 | ES3_ONLY("[]", (yylsp[0]), "first-class-array"); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3513 | if (context->getShaderVersion() != 300) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3514 | (yyvsp[0].interm.type).clearArrayness(); |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3515 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3516 | } |
| 3517 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3518 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3519 | break; |
| 3520 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3521 | case 124: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3522 | |
| 3523 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3524 | (yyval.interm.type) = context->addFullySpecifiedType((yyvsp[-1].interm.type).qualifier, (yyvsp[-1].interm.type).invariant, (yyvsp[-1].interm.type).layoutQualifier, (yyvsp[0].interm.type)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3525 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3526 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3527 | break; |
| 3528 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3529 | case 125: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3530 | |
| 3531 | { |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3532 | (yyval.interm.type).qualifier = EvqSmooth; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3533 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3534 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3535 | break; |
| 3536 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3537 | case 126: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3538 | |
| 3539 | { |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3540 | (yyval.interm.type).qualifier = EvqFlat; |
| 3541 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3542 | |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3543 | break; |
| 3544 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3545 | case 127: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3546 | |
| 3547 | { |
| 3548 | (yyval.interm.qualifier) = EvqConstReadOnly; |
| 3549 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3550 | |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3551 | break; |
| 3552 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3553 | case 128: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3554 | |
| 3555 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3556 | VERTEX_ONLY("attribute", (yylsp[0])); |
| 3557 | ES2_ONLY("attribute", (yylsp[0])); |
| 3558 | if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3559 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3560 | (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3561 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3562 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3563 | break; |
| 3564 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3565 | case 129: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3566 | |
| 3567 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3568 | ES2_ONLY("varying", (yylsp[0])); |
| 3569 | if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3570 | context->recover(); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3571 | if (context->getShaderType() == GL_VERTEX_SHADER) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3572 | (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3573 | else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3574 | (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3575 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3576 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3577 | break; |
| 3578 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3579 | case 130: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3580 | |
| 3581 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3582 | ES2_ONLY("varying", (yylsp[-1])); |
| 3583 | if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying")) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3584 | context->recover(); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3585 | if (context->getShaderType() == GL_VERTEX_SHADER) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3586 | (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3587 | else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3588 | (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3589 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3590 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3591 | break; |
| 3592 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3593 | case 131: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3594 | |
| 3595 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3596 | (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3597 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3598 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3599 | break; |
| 3600 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3601 | case 132: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3602 | |
| 3603 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3604 | (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3605 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3606 | |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3607 | break; |
| 3608 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3609 | case 133: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3610 | |
| 3611 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3612 | context->error((yylsp[0]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getQualifierString((yyvsp[0].interm.type).qualifier)); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3613 | context->recover(); |
| 3614 | |
| 3615 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3616 | (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0])); |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3617 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3618 | |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 3619 | break; |
| 3620 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3621 | case 134: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3622 | |
| 3623 | { |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3624 | (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3625 | (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3626 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3627 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3628 | break; |
| 3629 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3630 | case 135: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3631 | |
| 3632 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3633 | (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0])); |
| 3634 | (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3635 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3636 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3637 | break; |
| 3638 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3639 | case 136: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3640 | |
| 3641 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3642 | context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-1])); |
| 3643 | (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3644 | (yyval.interm.type).invariant = true; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3645 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3646 | |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3647 | break; |
| 3648 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3649 | case 137: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3650 | |
| 3651 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3652 | context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-2])); |
| 3653 | (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3654 | (yyval.interm.type).invariant = true; |
| 3655 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3656 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3657 | break; |
| 3658 | |
| 3659 | case 138: |
| 3660 | |
| 3661 | { |
| 3662 | (yyval.interm.type).qualifier = EvqConstExpr; |
| 3663 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3664 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3665 | break; |
| 3666 | |
| 3667 | case 139: |
| 3668 | |
| 3669 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3670 | ES3_ONLY("in", (yylsp[0]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3671 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3672 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3673 | |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3674 | break; |
| 3675 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3676 | case 140: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3677 | |
| 3678 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3679 | ES3_ONLY("out", (yylsp[0]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3680 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3681 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3682 | |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3683 | break; |
| 3684 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3685 | case 141: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3686 | |
| 3687 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3688 | ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3689 | if (context->getShaderType() == GL_VERTEX_SHADER) |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3690 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3691 | context->error((yylsp[-1]), "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] | 3692 | context->recover(); |
| 3693 | } |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3694 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3695 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3696 | |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3697 | break; |
| 3698 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3699 | case 142: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3700 | |
| 3701 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3702 | ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier"); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3703 | if (context->getShaderType() == GL_FRAGMENT_SHADER) |
Alexis Hetu | 42ff6b1 | 2015-06-03 16:03:48 -0400 | [diff] [blame] | 3704 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3705 | context->error((yylsp[-1]), "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] | 3706 | context->recover(); |
| 3707 | } |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 3708 | (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3709 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3710 | |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3711 | break; |
| 3712 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3713 | case 143: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3714 | |
| 3715 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3716 | if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform")) |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3717 | context->recover(); |
| 3718 | (yyval.interm.type).qualifier = EvqUniform; |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3719 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3720 | |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3721 | break; |
| 3722 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3723 | case 144: |
Nicolas Capens | a6a79ab | 2015-02-17 12:42:14 -0500 | [diff] [blame] | 3724 | |
| 3725 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3726 | (yyval.interm.type) = (yyvsp[0].interm.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3727 | |
| 3728 | if ((yyval.interm.type).precision == EbpUndefined) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3729 | (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type); |
| 3730 | if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3731 | context->recover(); |
| 3732 | } |
| 3733 | } |
| 3734 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3735 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3736 | break; |
| 3737 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3738 | case 145: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3739 | |
| 3740 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3741 | (yyval.interm.type) = (yyvsp[0].interm.type); |
| 3742 | (yyval.interm.type).precision = (yyvsp[-1].interm.precision); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3743 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3744 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3745 | break; |
| 3746 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3747 | case 146: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3748 | |
| 3749 | { |
| 3750 | (yyval.interm.precision) = EbpHigh; |
| 3751 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3752 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3753 | break; |
| 3754 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3755 | case 147: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3756 | |
| 3757 | { |
| 3758 | (yyval.interm.precision) = EbpMedium; |
| 3759 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3760 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3761 | break; |
| 3762 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3763 | case 148: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3764 | |
| 3765 | { |
| 3766 | (yyval.interm.precision) = EbpLow; |
| 3767 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3768 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3769 | break; |
| 3770 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3771 | case 149: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3772 | |
| 3773 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3774 | ES3_ONLY("layout", (yylsp[-3]), "qualifier"); |
| 3775 | (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3776 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3777 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3778 | break; |
| 3779 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3780 | case 150: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3781 | |
| 3782 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3783 | (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3784 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3785 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3786 | break; |
| 3787 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3788 | case 151: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3789 | |
| 3790 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3791 | (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier)); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3792 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3793 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3794 | break; |
| 3795 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3796 | case 152: |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3797 | |
| 3798 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3799 | (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3800 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3801 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 3802 | break; |
| 3803 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3804 | case 153: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3805 | |
| 3806 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3807 | (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3808 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3809 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3810 | break; |
| 3811 | |
| 3812 | case 154: |
| 3813 | |
| 3814 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3815 | (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3816 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3817 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3818 | break; |
| 3819 | |
| 3820 | case 155: |
| 3821 | |
| 3822 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3823 | (yyval.interm.type) = (yyvsp[0].interm.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3824 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3825 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3826 | break; |
| 3827 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3828 | case 156: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3829 | |
| 3830 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3831 | ES3_ONLY("[]", (yylsp[-1]), "implicitly sized array"); |
| 3832 | (yyval.interm.type) = (yyvsp[-2].interm.type); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3833 | (yyval.interm.type).setArray(true, 0); |
| 3834 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3835 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3836 | break; |
| 3837 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3838 | case 157: |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3839 | |
| 3840 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3841 | (yyval.interm.type) = (yyvsp[-3].interm.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3842 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3843 | if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3844 | context->recover(); |
| 3845 | else { |
| 3846 | int size; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3847 | if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3848 | context->recover(); |
| 3849 | (yyval.interm.type).setArray(true, size); |
| 3850 | } |
| 3851 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3852 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 3853 | break; |
| 3854 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3855 | case 158: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3856 | |
| 3857 | { |
| 3858 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3859 | (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3860 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3861 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3862 | break; |
| 3863 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3864 | case 159: |
| 3865 | |
| 3866 | { |
| 3867 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3868 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3869 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3870 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3871 | break; |
| 3872 | |
| 3873 | case 160: |
| 3874 | |
| 3875 | { |
| 3876 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3877 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3878 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3879 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3880 | break; |
| 3881 | |
| 3882 | case 161: |
| 3883 | |
| 3884 | { |
| 3885 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3886 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3887 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3888 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3889 | break; |
| 3890 | |
| 3891 | case 162: |
| 3892 | |
| 3893 | { |
| 3894 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3895 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3896 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3897 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3898 | break; |
| 3899 | |
| 3900 | case 163: |
| 3901 | |
| 3902 | { |
| 3903 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3904 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3905 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3906 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3907 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3908 | break; |
| 3909 | |
| 3910 | case 164: |
| 3911 | |
| 3912 | { |
| 3913 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3914 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3915 | (yyval.interm.type).setAggregate(3); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3916 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3917 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3918 | break; |
| 3919 | |
| 3920 | case 165: |
| 3921 | |
| 3922 | { |
| 3923 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3924 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3925 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3926 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3927 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 3928 | break; |
| 3929 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3930 | case 166: |
| 3931 | |
| 3932 | { |
| 3933 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3934 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3935 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3936 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3937 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3938 | break; |
| 3939 | |
| 3940 | case 167: |
| 3941 | |
| 3942 | { |
| 3943 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3944 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3945 | (yyval.interm.type).setAggregate(3); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3946 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3947 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3948 | break; |
| 3949 | |
| 3950 | case 168: |
| 3951 | |
| 3952 | { |
| 3953 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3954 | (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3955 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3956 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3957 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3958 | break; |
| 3959 | |
| 3960 | case 169: |
| 3961 | |
| 3962 | { |
| 3963 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3964 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3965 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3966 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3967 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3968 | break; |
| 3969 | |
| 3970 | case 170: |
| 3971 | |
| 3972 | { |
| 3973 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3974 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3975 | (yyval.interm.type).setAggregate(3); |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3976 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3977 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3978 | break; |
| 3979 | |
| 3980 | case 171: |
| 3981 | |
| 3982 | { |
| 3983 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3984 | (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3985 | (yyval.interm.type).setAggregate(4); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3986 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3987 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3988 | break; |
| 3989 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 3990 | case 172: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 3991 | |
| 3992 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3993 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3994 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 3995 | (yyval.interm.type).setAggregate(2); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3996 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 3997 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 3998 | break; |
| 3999 | |
| 4000 | case 173: |
| 4001 | |
| 4002 | { |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4003 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4004 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4005 | (yyval.interm.type).setAggregate(3); |
| 4006 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4007 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4008 | break; |
| 4009 | |
| 4010 | case 174: |
| 4011 | |
| 4012 | { |
| 4013 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4014 | (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4015 | (yyval.interm.type).setAggregate(4); |
| 4016 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4017 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4018 | break; |
| 4019 | |
| 4020 | case 175: |
| 4021 | |
| 4022 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4023 | FRAG_VERT_ONLY("mat2", (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4024 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4025 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4026 | (yyval.interm.type).setMatrix(2, 2); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4027 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4028 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 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 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4034 | FRAG_VERT_ONLY("mat3", (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4035 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4036 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
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 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4039 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4040 | break; |
| 4041 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4042 | case 177: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4043 | |
| 4044 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4045 | FRAG_VERT_ONLY("mat4", (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4046 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4047 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4048 | (yyval.interm.type).setMatrix(4, 4); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4049 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4050 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4051 | break; |
| 4052 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4053 | case 178: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4054 | |
| 4055 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4056 | FRAG_VERT_ONLY("mat2x3", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4057 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4058 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4059 | (yyval.interm.type).setMatrix(2, 3); |
| 4060 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4061 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4062 | break; |
| 4063 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4064 | case 179: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4065 | |
| 4066 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4067 | FRAG_VERT_ONLY("mat3x2", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4068 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4069 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4070 | (yyval.interm.type).setMatrix(3, 2); |
| 4071 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4072 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4073 | break; |
| 4074 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4075 | case 180: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4076 | |
| 4077 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4078 | FRAG_VERT_ONLY("mat2x4", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4079 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4080 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4081 | (yyval.interm.type).setMatrix(2, 4); |
| 4082 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4083 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4084 | break; |
| 4085 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4086 | case 181: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4087 | |
| 4088 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4089 | FRAG_VERT_ONLY("mat4x2", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4090 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4091 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4092 | (yyval.interm.type).setMatrix(4, 2); |
| 4093 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4094 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4095 | break; |
| 4096 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4097 | case 182: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4098 | |
| 4099 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4100 | FRAG_VERT_ONLY("mat3x4", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4101 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4102 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4103 | (yyval.interm.type).setMatrix(3, 4); |
| 4104 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4105 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4106 | break; |
| 4107 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4108 | case 183: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4109 | |
| 4110 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4111 | FRAG_VERT_ONLY("mat4x3", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4112 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4113 | (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4114 | (yyval.interm.type).setMatrix(4, 3); |
| 4115 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4116 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4117 | break; |
| 4118 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4119 | case 184: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4120 | |
| 4121 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4122 | FRAG_VERT_ONLY("sampler2D", (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4123 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4124 | (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4125 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4126 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4127 | break; |
| 4128 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4129 | case 185: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4130 | |
| 4131 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4132 | FRAG_VERT_ONLY("samplerCube", (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4133 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4134 | (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4135 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4136 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4137 | break; |
| 4138 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4139 | case 186: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4140 | |
| 4141 | { |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4142 | if (!context->supportsExtension("GL_OES_EGL_image_external")) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4143 | context->error((yylsp[0]), "unsupported type", "samplerExternalOES", ""); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4144 | context->recover(); |
| 4145 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4146 | FRAG_VERT_ONLY("samplerExternalOES", (yylsp[0])); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4147 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4148 | (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0])); |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4149 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4150 | |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4151 | break; |
| 4152 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4153 | case 187: |
Nicolas Capens | e9c5e4f | 2014-05-28 22:46:43 -0400 | [diff] [blame] | 4154 | |
| 4155 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4156 | FRAG_VERT_ONLY("sampler3D", (yylsp[0])); |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4157 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4158 | (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0])); |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4159 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4160 | |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4161 | break; |
| 4162 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4163 | case 188: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4164 | |
| 4165 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4166 | FRAG_VERT_ONLY("sampler2DArray", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4167 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4168 | (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4169 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4170 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4171 | break; |
| 4172 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4173 | case 189: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4174 | |
| 4175 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4176 | FRAG_VERT_ONLY("isampler2D", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4177 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4178 | (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4179 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4180 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4181 | break; |
| 4182 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4183 | case 190: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4184 | |
| 4185 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4186 | FRAG_VERT_ONLY("isampler3D", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4187 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4188 | (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4189 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4190 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4191 | break; |
| 4192 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4193 | case 191: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4194 | |
| 4195 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4196 | FRAG_VERT_ONLY("isamplerCube", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4197 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4198 | (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4199 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4200 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4201 | break; |
| 4202 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4203 | case 192: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4204 | |
| 4205 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4206 | FRAG_VERT_ONLY("isampler2DArray", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4207 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4208 | (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4209 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4210 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4211 | break; |
| 4212 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4213 | case 193: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4214 | |
| 4215 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4216 | FRAG_VERT_ONLY("usampler2D", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4217 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4218 | (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4219 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4220 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4221 | break; |
| 4222 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4223 | case 194: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4224 | |
| 4225 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4226 | FRAG_VERT_ONLY("usampler3D", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4227 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4228 | (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4229 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4230 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4231 | break; |
| 4232 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4233 | case 195: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4234 | |
| 4235 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4236 | FRAG_VERT_ONLY("usamplerCube", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4237 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4238 | (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4239 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4240 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4241 | break; |
| 4242 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4243 | case 196: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4244 | |
| 4245 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4246 | FRAG_VERT_ONLY("usampler2DArray", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4247 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4248 | (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4249 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4250 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4251 | break; |
| 4252 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4253 | case 197: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4254 | |
| 4255 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4256 | FRAG_VERT_ONLY("sampler2DShadow", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4257 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4258 | (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4259 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4260 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4261 | break; |
| 4262 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4263 | case 198: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4264 | |
| 4265 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4266 | FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4267 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4268 | (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4269 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4270 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4271 | break; |
| 4272 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4273 | case 199: |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4274 | |
| 4275 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4276 | FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4277 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4278 | (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0])); |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4279 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4280 | |
Alexis Hetu | b14178b | 2015-04-13 13:23:20 -0400 | [diff] [blame] | 4281 | break; |
| 4282 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4283 | case 200: |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4284 | |
| 4285 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4286 | FRAG_VERT_ONLY("struct", (yylsp[0])); |
| 4287 | (yyval.interm.type) = (yyvsp[0].interm.type); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4288 | (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
| 4289 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4290 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4291 | break; |
| 4292 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4293 | case 201: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4294 | |
| 4295 | { |
| 4296 | // |
| 4297 | // This is for user defined type names. The lexical phase looked up the |
| 4298 | // type. |
| 4299 | // |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4300 | TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4301 | TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4302 | (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4303 | (yyval.interm.type).userDef = &structure; |
| 4304 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4305 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4306 | break; |
| 4307 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4308 | case 202: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4309 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4310 | { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); } |
| 4311 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4312 | break; |
| 4313 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4314 | case 203: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4315 | |
| 4316 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4317 | (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4318 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4319 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4320 | break; |
| 4321 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4322 | case 204: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4323 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4324 | { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); } |
| 4325 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4326 | break; |
| 4327 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4328 | case 205: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4329 | |
| 4330 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4331 | (yyval.interm.type) = context->addStructure((yylsp[-4]), (yylsp[-4]), NewPoolTString(""), (yyvsp[-1].interm.fieldList)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4332 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4333 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4334 | break; |
| 4335 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4336 | case 206: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4337 | |
| 4338 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4339 | (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4340 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4341 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4342 | break; |
| 4343 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4344 | case 207: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4345 | |
| 4346 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4347 | (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList); |
| 4348 | for (unsigned int i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) { |
| 4349 | TField* field = (*(yyvsp[0].interm.fieldList))[i]; |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4350 | for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) { |
| 4351 | if ((*(yyval.interm.fieldList))[j]->name() == field->name()) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4352 | context->error((*(yyvsp[0].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] | 4353 | context->recover(); |
| 4354 | } |
| 4355 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4356 | (yyval.interm.fieldList)->push_back((*(yyvsp[0].interm.fieldList))[i]); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4357 | } |
| 4358 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4359 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4360 | break; |
| 4361 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4362 | case 208: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4363 | |
| 4364 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4365 | (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4366 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4367 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4368 | break; |
| 4369 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4370 | case 209: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4371 | |
| 4372 | { |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4373 | // ES3 Only, but errors should be handled elsewhere |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4374 | (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier; |
| 4375 | (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier; |
| 4376 | (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4377 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4378 | |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4379 | break; |
| 4380 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4381 | case 210: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4382 | |
| 4383 | { |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4384 | (yyval.interm.fieldList) = NewPoolTFieldList(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4385 | (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4386 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4387 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4388 | break; |
| 4389 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4390 | case 211: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4391 | |
| 4392 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4393 | (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4394 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4395 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4396 | break; |
| 4397 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4398 | case 212: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4399 | |
| 4400 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4401 | if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4402 | context->recover(); |
| 4403 | |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4404 | TType* type = new TType(EbtVoid, EbpUndefined); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4405 | (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4406 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4407 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4408 | break; |
| 4409 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4410 | case 213: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4411 | |
| 4412 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4413 | if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4414 | context->recover(); |
| 4415 | |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4416 | TType* type = new TType(EbtVoid, EbpUndefined); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4417 | int size; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4418 | if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size)) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4419 | context->recover(); |
Alexis Hetu | a8b364b | 2015-06-10 11:48:40 -0400 | [diff] [blame] | 4420 | type->setArraySize(size); |
| 4421 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4422 | (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4423 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4424 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4425 | break; |
| 4426 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4427 | case 214: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4428 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4429 | { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } |
| 4430 | |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4431 | break; |
| 4432 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4433 | case 215: |
Alexis Hetu | 55a2cbc | 2015-04-16 10:49:45 -0400 | [diff] [blame] | 4434 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4435 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4436 | |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4437 | break; |
| 4438 | |
| 4439 | case 216: |
| 4440 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4441 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); } |
| 4442 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4443 | break; |
| 4444 | |
| 4445 | case 217: |
| 4446 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4447 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4448 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4449 | break; |
| 4450 | |
| 4451 | case 218: |
| 4452 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4453 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4454 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4455 | break; |
| 4456 | |
| 4457 | case 219: |
| 4458 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4459 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4460 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4461 | break; |
| 4462 | |
| 4463 | case 220: |
| 4464 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4465 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4466 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4467 | break; |
| 4468 | |
| 4469 | case 221: |
| 4470 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4471 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); } |
| 4472 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4473 | break; |
| 4474 | |
| 4475 | case 222: |
| 4476 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4477 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); } |
| 4478 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4479 | break; |
| 4480 | |
| 4481 | case 223: |
| 4482 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4483 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4484 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4485 | break; |
| 4486 | |
| 4487 | case 224: |
| 4488 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4489 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4490 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4491 | break; |
| 4492 | |
| 4493 | case 225: |
| 4494 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4495 | { (yyval.interm.intermAggregate) = 0; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4496 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4497 | break; |
| 4498 | |
| 4499 | case 226: |
| 4500 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4501 | { context->symbolTable.push(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4502 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4503 | break; |
| 4504 | |
| 4505 | case 227: |
| 4506 | |
| 4507 | { context->symbolTable.pop(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4508 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4509 | break; |
| 4510 | |
| 4511 | case 228: |
| 4512 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4513 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4514 | if ((yyvsp[-2].interm.intermAggregate) != 0) { |
| 4515 | (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence); |
| 4516 | (yyvsp[-2].interm.intermAggregate)->setEndLine((yylsp[0])); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4517 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4518 | (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate); |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4519 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4520 | |
Nicolas Capens | 7d62679 | 2015-02-17 17:58:31 -0500 | [diff] [blame] | 4521 | break; |
| 4522 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4523 | case 229: |
| 4524 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4525 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4526 | |
Alexis Hetu | a35d823 | 2015-06-11 17:11:06 -0400 | [diff] [blame] | 4527 | break; |
| 4528 | |
| 4529 | case 230: |
| 4530 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4531 | { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4532 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4533 | break; |
| 4534 | |
| 4535 | case 231: |
| 4536 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4537 | { context->symbolTable.push(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4538 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4539 | break; |
| 4540 | |
| 4541 | case 232: |
| 4542 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4543 | { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4544 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4545 | break; |
| 4546 | |
| 4547 | case 233: |
| 4548 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4549 | { context->symbolTable.push(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4550 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4551 | break; |
| 4552 | |
| 4553 | case 234: |
| 4554 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4555 | { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } |
| 4556 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4557 | break; |
| 4558 | |
| 4559 | case 235: |
| 4560 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4561 | { |
| 4562 | (yyval.interm.intermNode) = 0; |
| 4563 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4564 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4565 | break; |
| 4566 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4567 | case 236: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4568 | |
| 4569 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4570 | if ((yyvsp[-1].interm.intermAggregate)) { |
| 4571 | (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence); |
| 4572 | (yyvsp[-1].interm.intermAggregate)->setEndLine((yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4573 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4574 | (yyval.interm.intermNode) = (yyvsp[-1].interm.intermAggregate); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4575 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4576 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4577 | break; |
| 4578 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4579 | case 237: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4580 | |
| 4581 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4582 | (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4583 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4584 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4585 | break; |
| 4586 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4587 | case 238: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4588 | |
| 4589 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4590 | (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc)); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4591 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4592 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4593 | break; |
| 4594 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4595 | case 239: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4596 | |
| 4597 | { (yyval.interm.intermNode) = 0; } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4598 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4599 | break; |
| 4600 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4601 | case 240: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4602 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4603 | { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); } |
| 4604 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4605 | break; |
| 4606 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4607 | case 241: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4608 | |
| 4609 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4610 | if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4611 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4612 | (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4613 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4614 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4615 | break; |
| 4616 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4617 | case 242: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4618 | |
| 4619 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4620 | (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); |
| 4621 | (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4622 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4623 | |
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 243: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4627 | |
| 4628 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4629 | (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4630 | (yyval.interm.nodePair).node2 = 0; |
| 4631 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4632 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4633 | break; |
| 4634 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4635 | case 244: |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4636 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4637 | { context->incrSwitchNestingLevel(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4638 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4639 | break; |
| 4640 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4641 | case 245: |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4642 | |
| 4643 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4644 | (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5])); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4645 | context->decrSwitchNestingLevel(); |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4646 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4647 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4648 | break; |
| 4649 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4650 | case 246: |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4651 | |
| 4652 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4653 | (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4654 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4655 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4656 | break; |
| 4657 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4658 | case 247: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4659 | |
| 4660 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4661 | (yyval.interm.intermCase) = context->addDefault((yylsp[-1])); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4662 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4663 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4664 | break; |
| 4665 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4666 | case 248: |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4667 | |
| 4668 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4669 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
| 4670 | if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4671 | context->recover(); |
| 4672 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4673 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4674 | break; |
| 4675 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4676 | case 249: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4677 | |
| 4678 | { |
| 4679 | TIntermNode* intermNode; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4680 | if (context->structQualifierErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4681 | context->recover(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4682 | if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4683 | context->recover(); |
| 4684 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4685 | if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode)) |
| 4686 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4687 | else { |
| 4688 | context->recover(); |
| 4689 | (yyval.interm.intermTypedNode) = 0; |
| 4690 | } |
| 4691 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4692 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4693 | break; |
| 4694 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4695 | case 250: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4696 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4697 | { context->symbolTable.push(); context->incrLoopNestingLevel(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4698 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4699 | break; |
| 4700 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4701 | case 251: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4702 | |
| 4703 | { |
| 4704 | context->symbolTable.pop(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4705 | (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[0].interm.intermNode), (yylsp[-5])); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4706 | context->decrLoopNestingLevel(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4707 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4708 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4709 | break; |
| 4710 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4711 | case 252: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4712 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4713 | { context->incrLoopNestingLevel(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4714 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4715 | break; |
| 4716 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4717 | case 253: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4718 | |
| 4719 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4720 | if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode))) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4721 | context->recover(); |
| 4722 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4723 | (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[-5].interm.intermNode), (yylsp[-4])); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4724 | context->decrLoopNestingLevel(); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4725 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4726 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4727 | break; |
| 4728 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4729 | case 254: |
Alexis Hetu | b027aa9 | 2015-01-19 15:56:12 -0500 | [diff] [blame] | 4730 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4731 | { context->symbolTable.push(); context->incrLoopNestingLevel(); } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4732 | |
Nicolas Capens | 3c20f80 | 2015-02-17 17:17:20 -0500 | [diff] [blame] | 4733 | break; |
| 4734 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4735 | case 255: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4736 | |
| 4737 | { |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4738 | context->symbolTable.pop(); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4739 | (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6])); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4740 | context->decrLoopNestingLevel(); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4741 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4742 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4743 | break; |
| 4744 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4745 | case 256: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4746 | |
| 4747 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4748 | (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4749 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4750 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4751 | break; |
| 4752 | |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4753 | case 257: |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4754 | |
| 4755 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4756 | (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4757 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4758 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4759 | break; |
| 4760 | |
| 4761 | case 258: |
| 4762 | |
| 4763 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4764 | (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4765 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4766 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4767 | break; |
| 4768 | |
| 4769 | case 259: |
| 4770 | |
| 4771 | { |
| 4772 | (yyval.interm.intermTypedNode) = 0; |
| 4773 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4774 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4775 | break; |
| 4776 | |
| 4777 | case 260: |
| 4778 | |
| 4779 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4780 | (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4781 | (yyval.interm.nodePair).node2 = 0; |
| 4782 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4783 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4784 | break; |
| 4785 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4786 | case 261: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4787 | |
| 4788 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4789 | (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); |
| 4790 | (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4791 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4792 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4793 | break; |
| 4794 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4795 | case 262: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4796 | |
| 4797 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4798 | (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4799 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4800 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4801 | break; |
| 4802 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4803 | case 263: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4804 | |
| 4805 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4806 | (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4807 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4808 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4809 | break; |
| 4810 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4811 | case 264: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4812 | |
| 4813 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4814 | (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4815 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4816 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4817 | break; |
| 4818 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4819 | case 265: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4820 | |
| 4821 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4822 | (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4823 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4824 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4825 | break; |
| 4826 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4827 | case 266: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4828 | |
| 4829 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4830 | FRAG_ONLY("discard", (yylsp[-1])); |
| 4831 | (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1])); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4832 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4833 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4834 | break; |
| 4835 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4836 | case 267: |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4837 | |
| 4838 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4839 | (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4840 | context->setTreeRoot((yyval.interm.intermNode)); |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4841 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4842 | |
Alexis Hetu | 1780905 | 2015-05-13 11:28:22 -0400 | [diff] [blame] | 4843 | break; |
| 4844 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4845 | case 268: |
Alexis Hetu | ad6b875 | 2015-06-09 16:15:30 -0400 | [diff] [blame] | 4846 | |
| 4847 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4848 | (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc)); |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4849 | context->setTreeRoot((yyval.interm.intermNode)); |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4850 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4851 | |
Alexis Hetu | dd7ff7a | 2015-06-11 08:25:30 -0400 | [diff] [blame] | 4852 | break; |
| 4853 | |
Alexis Hetu | e524669 | 2015-06-18 12:34:52 -0400 | [diff] [blame] | 4854 | case 269: |
| 4855 | |
| 4856 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4857 | (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4858 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4859 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4860 | break; |
| 4861 | |
| 4862 | case 270: |
| 4863 | |
| 4864 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4865 | (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4866 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4867 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4868 | break; |
| 4869 | |
| 4870 | case 271: |
| 4871 | |
| 4872 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4873 | TFunction* function = (yyvsp[0].interm).function; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4874 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4875 | const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4876 | |
| 4877 | if (builtIn) |
| 4878 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4879 | context->error((yylsp[0]), "built-in functions cannot be redefined", function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4880 | context->recover(); |
| 4881 | } |
| 4882 | |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4883 | TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion())); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4884 | // |
| 4885 | // Note: 'prevDec' could be 'function' if this is the first time we've seen function |
| 4886 | // as it would have just been put in the symbol table. Otherwise, we're looking up |
| 4887 | // an earlier occurance. |
| 4888 | // |
| 4889 | if (prevDec->isDefined()) { |
| 4890 | // |
| 4891 | // Then this function already has a body. |
| 4892 | // |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4893 | context->error((yylsp[0]), "function already has a body", function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4894 | context->recover(); |
| 4895 | } |
| 4896 | prevDec->setDefined(); |
| 4897 | |
| 4898 | // |
| 4899 | // Raise error message if main function takes any parameters or return anything other than void |
| 4900 | // |
| 4901 | if (function->getName() == "main") { |
| 4902 | if (function->getParamCount() > 0) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4903 | context->error((yylsp[0]), "function cannot take any parameter(s)", function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4904 | context->recover(); |
| 4905 | } |
| 4906 | if (function->getReturnType().getBasicType() != EbtVoid) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4907 | context->error((yylsp[0]), "", function->getReturnType().getBasicString(), "main function cannot return a value"); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4908 | context->recover(); |
| 4909 | } |
| 4910 | } |
| 4911 | |
| 4912 | // |
| 4913 | // Remember the return type for later checking for RETURN statements. |
| 4914 | // |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4915 | context->setCurrentFunctionType(&(prevDec->getReturnType())); |
| 4916 | context->setFunctionReturnsValue(false); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4917 | |
| 4918 | // |
| 4919 | // Insert parameters into the symbol table. |
| 4920 | // If the parameter has no name, it's not an error, just don't insert it |
| 4921 | // (could be used for unused args). |
| 4922 | // |
| 4923 | // Also, accumulate the list of parameters into the HIL, so lower level code |
| 4924 | // knows where to find parameters. |
| 4925 | // |
| 4926 | TIntermAggregate* paramNodes = new TIntermAggregate; |
Alexis Hetu | 76a343a | 2015-06-04 17:21:22 -0400 | [diff] [blame] | 4927 | for (size_t i = 0; i < function->getParamCount(); i++) { |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4928 | const TParameter& param = function->getParam(i); |
| 4929 | if (param.name != 0) { |
| 4930 | TVariable *variable = new TVariable(param.name, *param.type); |
| 4931 | // |
| 4932 | // Insert the parameters with name in the symbol table. |
| 4933 | // |
Nicolas Capens | d603ecd | 2015-02-18 14:52:21 -0500 | [diff] [blame] | 4934 | if (! context->symbolTable.declare(*variable)) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4935 | context->error((yylsp[0]), "redefinition", variable->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4936 | context->recover(); |
| 4937 | delete variable; |
| 4938 | } |
| 4939 | |
| 4940 | // |
| 4941 | // Add the parameter to the HIL |
| 4942 | // |
| 4943 | paramNodes = context->intermediate.growAggregate( |
| 4944 | paramNodes, |
| 4945 | context->intermediate.addSymbol(variable->getUniqueId(), |
| 4946 | variable->getName(), |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4947 | variable->getType(), (yylsp[0])), |
| 4948 | (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4949 | } else { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4950 | paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[0])), (yylsp[0])); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4951 | } |
| 4952 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4953 | context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[0])); |
| 4954 | (yyvsp[0].interm).intermAggregate = paramNodes; |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4955 | context->setLoopNestingLevel(0); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4956 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4957 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4958 | break; |
| 4959 | |
Alexis Hetu | ad52775 | 2015-07-07 13:31:44 -0400 | [diff] [blame] | 4960 | case 272: |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4961 | |
| 4962 | { |
| 4963 | //?? Check that all paths return a value if return type != void ? |
| 4964 | // May be best done as post process phase on intermediate code |
Alexis Hetu | 0a65584 | 2015-06-22 16:52:11 -0400 | [diff] [blame] | 4965 | if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4966 | context->error((yylsp[-2]), "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4967 | context->recover(); |
| 4968 | } |
| 4969 | |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 4970 | (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermAggregate), (yyloc)); |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4971 | context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[-2])); |
| 4972 | (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str()); |
| 4973 | (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[-2].interm).function->getReturnType()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4974 | |
| 4975 | // store the pragma information for debug and optimize and other vendor specific |
| 4976 | // information. This information can be queried from the parse tree |
| 4977 | (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize); |
| 4978 | (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug); |
| 4979 | |
Veranika Liaukevich | 1aa4b61 | 2015-10-28 14:25:27 -0400 | [diff] [blame^] | 4980 | if ((yyvsp[0].interm.intermAggregate) && (yyvsp[0].interm.intermAggregate)->getAsAggregate()) |
| 4981 | (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[0].interm.intermAggregate)->getAsAggregate()->getEndLine()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4982 | |
| 4983 | context->symbolTable.pop(); |
| 4984 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4985 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 4986 | break; |
| 4987 | |
| 4988 | |
| 4989 | |
| 4990 | default: break; |
| 4991 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 4992 | /* User semantic actions sometimes alter yychar, and that requires |
| 4993 | that yytoken be updated with the new translation. We take the |
| 4994 | approach of translating immediately before every use of yytoken. |
| 4995 | One alternative is translating here after every semantic action, |
| 4996 | but that translation would be missed if the semantic action invokes |
| 4997 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
| 4998 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
| 4999 | incorrect destructor might then be invoked immediately. In the |
| 5000 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
| 5001 | to an incorrect destructor call or verbose syntax error message |
| 5002 | before the lookahead is translated. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5003 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 5004 | |
| 5005 | YYPOPSTACK (yylen); |
| 5006 | yylen = 0; |
| 5007 | YY_STACK_PRINT (yyss, yyssp); |
| 5008 | |
| 5009 | *++yyvsp = yyval; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5010 | *++yylsp = yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5011 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5012 | /* Now 'shift' the result of the reduction. Determine what state |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5013 | that goes to, based on the state we popped back to and the rule |
| 5014 | number reduced by. */ |
| 5015 | |
| 5016 | yyn = yyr1[yyn]; |
| 5017 | |
| 5018 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 5019 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 5020 | yystate = yytable[yystate]; |
| 5021 | else |
| 5022 | yystate = yydefgoto[yyn - YYNTOKENS]; |
| 5023 | |
| 5024 | goto yynewstate; |
| 5025 | |
| 5026 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5027 | /*--------------------------------------. |
| 5028 | | yyerrlab -- here on detecting error. | |
| 5029 | `--------------------------------------*/ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5030 | yyerrlab: |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5031 | /* Make sure we have latest lookahead translation. See comments at |
| 5032 | user semantic actions for why this is necessary. */ |
| 5033 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
| 5034 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5035 | /* If not already recovering from an error, report this error. */ |
| 5036 | if (!yyerrstatus) |
| 5037 | { |
| 5038 | ++yynerrs; |
| 5039 | #if ! YYERROR_VERBOSE |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5040 | yyerror (&yylloc, context, yyscanner, YY_("syntax error")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5041 | #else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5042 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
| 5043 | yyssp, yytoken) |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5044 | { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5045 | char const *yymsgp = YY_("syntax error"); |
| 5046 | int yysyntax_error_status; |
| 5047 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 5048 | if (yysyntax_error_status == 0) |
| 5049 | yymsgp = yymsg; |
| 5050 | else if (yysyntax_error_status == 1) |
| 5051 | { |
| 5052 | if (yymsg != yymsgbuf) |
| 5053 | YYSTACK_FREE (yymsg); |
| 5054 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
| 5055 | if (!yymsg) |
| 5056 | { |
| 5057 | yymsg = yymsgbuf; |
| 5058 | yymsg_alloc = sizeof yymsgbuf; |
| 5059 | yysyntax_error_status = 2; |
| 5060 | } |
| 5061 | else |
| 5062 | { |
| 5063 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 5064 | yymsgp = yymsg; |
| 5065 | } |
| 5066 | } |
| 5067 | yyerror (&yylloc, context, yyscanner, yymsgp); |
| 5068 | if (yysyntax_error_status == 2) |
| 5069 | goto yyexhaustedlab; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5070 | } |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5071 | # undef YYSYNTAX_ERROR |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5072 | #endif |
| 5073 | } |
| 5074 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5075 | yyerror_range[1] = yylloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5076 | |
| 5077 | if (yyerrstatus == 3) |
| 5078 | { |
| 5079 | /* If just tried and failed to reuse lookahead token after an |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5080 | error, discard it. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5081 | |
| 5082 | if (yychar <= YYEOF) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5083 | { |
| 5084 | /* Return failure if at end of input. */ |
| 5085 | if (yychar == YYEOF) |
| 5086 | YYABORT; |
| 5087 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5088 | else |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5089 | { |
| 5090 | yydestruct ("Error: discarding", |
| 5091 | yytoken, &yylval, &yylloc, context, yyscanner); |
| 5092 | yychar = YYEMPTY; |
| 5093 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5094 | } |
| 5095 | |
| 5096 | /* Else will try to reuse lookahead token after shifting the error |
| 5097 | token. */ |
| 5098 | goto yyerrlab1; |
| 5099 | |
| 5100 | |
| 5101 | /*---------------------------------------------------. |
| 5102 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 5103 | `---------------------------------------------------*/ |
| 5104 | yyerrorlab: |
| 5105 | |
| 5106 | /* Pacify compilers like GCC when the user code never invokes |
| 5107 | YYERROR and the label yyerrorlab therefore never appears in user |
| 5108 | code. */ |
| 5109 | if (/*CONSTCOND*/ 0) |
| 5110 | goto yyerrorlab; |
| 5111 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5112 | yyerror_range[1] = yylsp[1-yylen]; |
| 5113 | /* Do not reclaim the symbols of the rule whose action triggered |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5114 | this YYERROR. */ |
| 5115 | YYPOPSTACK (yylen); |
| 5116 | yylen = 0; |
| 5117 | YY_STACK_PRINT (yyss, yyssp); |
| 5118 | yystate = *yyssp; |
| 5119 | goto yyerrlab1; |
| 5120 | |
| 5121 | |
| 5122 | /*-------------------------------------------------------------. |
| 5123 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 5124 | `-------------------------------------------------------------*/ |
| 5125 | yyerrlab1: |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5126 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5127 | |
| 5128 | for (;;) |
| 5129 | { |
| 5130 | yyn = yypact[yystate]; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5131 | if (!yypact_value_is_default (yyn)) |
| 5132 | { |
| 5133 | yyn += YYTERROR; |
| 5134 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 5135 | { |
| 5136 | yyn = yytable[yyn]; |
| 5137 | if (0 < yyn) |
| 5138 | break; |
| 5139 | } |
| 5140 | } |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5141 | |
| 5142 | /* Pop the current state because it cannot handle the error token. */ |
| 5143 | if (yyssp == yyss) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5144 | YYABORT; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5145 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5146 | yyerror_range[1] = *yylsp; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5147 | yydestruct ("Error: popping", |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5148 | yystos[yystate], yyvsp, yylsp, context, yyscanner); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5149 | YYPOPSTACK (1); |
| 5150 | yystate = *yyssp; |
| 5151 | YY_STACK_PRINT (yyss, yyssp); |
| 5152 | } |
| 5153 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5154 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5155 | *++yyvsp = yylval; |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5156 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5157 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5158 | yyerror_range[2] = yylloc; |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5159 | /* Using YYLLOC is tempting, but would change the location of |
| 5160 | the lookahead. YYLOC is available though. */ |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5161 | YYLLOC_DEFAULT (yyloc, yyerror_range, 2); |
Alexis Hetu | 15ae36c | 2015-06-18 21:10:09 -0400 | [diff] [blame] | 5162 | *++yylsp = yyloc; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5163 | |
| 5164 | /* Shift the error token. */ |
| 5165 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 5166 | |
| 5167 | yystate = yyn; |
| 5168 | goto yynewstate; |
| 5169 | |
| 5170 | |
| 5171 | /*-------------------------------------. |
| 5172 | | yyacceptlab -- YYACCEPT comes here. | |
| 5173 | `-------------------------------------*/ |
| 5174 | yyacceptlab: |
| 5175 | yyresult = 0; |
| 5176 | goto yyreturn; |
| 5177 | |
| 5178 | /*-----------------------------------. |
| 5179 | | yyabortlab -- YYABORT comes here. | |
| 5180 | `-----------------------------------*/ |
| 5181 | yyabortlab: |
| 5182 | yyresult = 1; |
| 5183 | goto yyreturn; |
| 5184 | |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5185 | #if !defined yyoverflow || YYERROR_VERBOSE |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5186 | /*-------------------------------------------------. |
| 5187 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 5188 | `-------------------------------------------------*/ |
| 5189 | yyexhaustedlab: |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5190 | yyerror (&yylloc, context, yyscanner, YY_("memory exhausted")); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5191 | yyresult = 2; |
| 5192 | /* Fall through. */ |
| 5193 | #endif |
| 5194 | |
| 5195 | yyreturn: |
| 5196 | if (yychar != YYEMPTY) |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5197 | { |
| 5198 | /* Make sure we have latest lookahead translation. See comments at |
| 5199 | user semantic actions for why this is necessary. */ |
| 5200 | yytoken = YYTRANSLATE (yychar); |
| 5201 | yydestruct ("Cleanup: discarding lookahead", |
| 5202 | yytoken, &yylval, &yylloc, context, yyscanner); |
| 5203 | } |
| 5204 | /* Do not reclaim the symbols of the rule whose action triggered |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5205 | this YYABORT or YYACCEPT. */ |
| 5206 | YYPOPSTACK (yylen); |
| 5207 | YY_STACK_PRINT (yyss, yyssp); |
| 5208 | while (yyssp != yyss) |
| 5209 | { |
| 5210 | yydestruct ("Cleanup: popping", |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5211 | yystos[*yyssp], yyvsp, yylsp, context, yyscanner); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5212 | YYPOPSTACK (1); |
| 5213 | } |
| 5214 | #ifndef yyoverflow |
| 5215 | if (yyss != yyssa) |
| 5216 | YYSTACK_FREE (yyss); |
| 5217 | #endif |
| 5218 | #if YYERROR_VERBOSE |
| 5219 | if (yymsg != yymsgbuf) |
| 5220 | YYSTACK_FREE (yymsg); |
| 5221 | #endif |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5222 | return yyresult; |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5223 | } |
| 5224 | |
| 5225 | |
| 5226 | |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5227 | int glslang_parse(TParseContext* context) { |
Veranika Liaukevich | eced26a | 2015-10-22 11:29:04 -0400 | [diff] [blame] | 5228 | return yyparse(context, context->getScanner()); |
John Bauman | 66b8ab2 | 2014-05-06 15:57:45 -0400 | [diff] [blame] | 5229 | } |