blob: f5a0fae744f3a9447ce2a6d87b8bbdea72f515cd [file] [log] [blame]
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001/* A Bison parser, made by GNU Bison 3.0.4. */
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04002
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003/* Bison implementation for Yacc-like parsers in C
John Bauman66b8ab22014-05-06 15:57:45 -04004
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6
John Bauman66b8ab22014-05-06 15:57:45 -04007 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 Liaukevicheced26a2015-10-22 11:29:04 -040011
John Bauman66b8ab22014-05-06 15:57:45 -040012 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 Liaukevicheced26a2015-10-22 11:29:04 -040016
John Bauman66b8ab22014-05-06 15:57:45 -040017 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 Liaukevicheced26a2015-10-22 11:29:04 -040029
John Bauman66b8ab22014-05-06 15:57:45 -040030 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 Liaukevicheced26a2015-10-22 11:29:04 -040047#define YYBISON_VERSION "3.0.4"
John Bauman66b8ab22014-05-06 15:57:45 -040048
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 Bauman66b8ab22014-05-06 15:57:45 -040061
62
63
64/* Copy the first part of user declarations. */
65
66
67//
Alexis Hetub14178b2015-04-13 13:23:20 -040068// Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved.
John Bauman66b8ab22014-05-06 15:57:45 -040069// 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 Capenscc863da2015-01-21 15:50:55 -050087#include "SymbolTable.h"
88#include "ParseHelper.h"
John Bauman66b8ab22014-05-06 15:57:45 -040089
John Baumand4ae8632014-05-06 16:18:33 -040090#define YYENABLE_NLS 0
John Baumand4ae8632014-05-06 16:18:33 -040091
John Bauman66b8ab22014-05-06 15:57:45 -040092
93
Veranika Liaukevicheced26a2015-10-22 11:29:04 -040094# 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 Bauman66b8ab22014-05-06 15:57:45 -0400101
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 Liaukevicheced26a2015-10-22 11:29:04 -0400110/* 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 Bauman66b8ab22014-05-06 15:57:45 -0400117#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400118#if YYDEBUG
119extern int yydebug;
120#endif
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400121/* "%code requires" blocks. */
122
123
124#define YYLTYPE TSourceLoc
125#define YYLTYPE_IS_DECLARED 1
126
127
128
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400129/* Token type. */
John Bauman66b8ab22014-05-06 15:57:45 -0400130#ifndef YYTOKENTYPE
131# define YYTOKENTYPE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400132 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 Bauman66b8ab22014-05-06 15:57:45 -0400260#endif
261
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400262/* Value type. */
John Bauman66b8ab22014-05-06 15:57:45 -0400263#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400264
265union YYSTYPE
John Bauman66b8ab22014-05-06 15:57:45 -0400266{
267
268
269 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400270 union {
271 TString *string;
272 float f;
273 int i;
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500274 unsigned int u;
John Bauman66b8ab22014-05-06 15:57:45 -0400275 bool b;
276 };
277 TSymbol* symbol;
278 } lex;
279 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400280 TOperator op;
281 union {
282 TIntermNode* intermNode;
283 TIntermNodePair nodePair;
284 TIntermTyped* intermTypedNode;
285 TIntermAggregate* intermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -0400286 TIntermSwitch* intermSwitch;
287 TIntermCase* intermCase;
John Bauman66b8ab22014-05-06 15:57:45 -0400288 };
289 union {
290 TPublicType type;
291 TPrecision precision;
Nicolas Capens7d626792015-02-17 17:58:31 -0500292 TLayoutQualifier layoutQualifier;
John Bauman66b8ab22014-05-06 15:57:45 -0400293 TQualifier qualifier;
294 TFunction* function;
295 TParameter param;
Alexis Hetua8b364b2015-06-10 11:48:40 -0400296 TField* field;
297 TFieldList* fieldList;
John Bauman66b8ab22014-05-06 15:57:45 -0400298 };
299 } interm;
300
301
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400302};
John Bauman66b8ab22014-05-06 15:57:45 -0400303
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400304typedef union YYSTYPE YYSTYPE;
John Bauman66b8ab22014-05-06 15:57:45 -0400305# define YYSTYPE_IS_TRIVIAL 1
John Bauman66b8ab22014-05-06 15:57:45 -0400306# define YYSTYPE_IS_DECLARED 1
307#endif
308
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400309/* Location type. */
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400310#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400311typedef struct YYLTYPE YYLTYPE;
312struct YYLTYPE
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400313{
314 int first_line;
315 int first_column;
316 int last_line;
317 int last_column;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400318};
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400319# define YYLTYPE_IS_DECLARED 1
320# define YYLTYPE_IS_TRIVIAL 1
321#endif
322
John Bauman66b8ab22014-05-06 15:57:45 -0400323
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400324
325int yyparse (TParseContext* context, void* yyscanner);
326
327#endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */
328
John Bauman66b8ab22014-05-06 15:57:45 -0400329/* Copy the second part of user declarations. */
330
331
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400332extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400333extern void yyerror(YYLTYPE* lloc, TParseContext* context, void* scanner, const char* reason);
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400334
Alexis Hetu253fdd12015-07-07 15:12:46 -0400335#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 Bauman66b8ab22014-05-06 15:57:45 -0400350
351#define FRAG_VERT_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400352 if (context->getShaderType() != GL_FRAGMENT_SHADER && \
353 context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400354 context->error(L, " supported in vertex/fragment shaders only ", S); \
355 context->recover(); \
356 } \
357}
358
359#define VERTEX_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400360 if (context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400361 context->error(L, " supported in vertex shaders only ", S); \
362 context->recover(); \
363 } \
364}
365
366#define FRAG_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400367 if (context->getShaderType() != GL_FRAGMENT_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400368 context->error(L, " supported in fragment shaders only ", S); \
369 context->recover(); \
370 } \
371}
372
Nicolas Capensc6841852015-02-15 14:25:37 -0500373#define ES2_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400374 if (context->getShaderVersion() != 100) { \
Nicolas Capensc6841852015-02-15 14:25:37 -0500375 context->error(L, " supported in GLSL ES 1.00 only ", S); \
376 context->recover(); \
377 } \
378}
379
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400380#define ES3_ONLY(TOKEN, LINE, REASON) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400381 if (context->getShaderVersion() != 300) { \
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400382 context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
Nicolas Capensc6841852015-02-15 14:25:37 -0500383 context->recover(); \
384 } \
385}
386
John Bauman66b8ab22014-05-06 15:57:45 -0400387
388
389#ifdef short
390# undef short
391#endif
392
393#ifdef YYTYPE_UINT8
394typedef YYTYPE_UINT8 yytype_uint8;
395#else
396typedef unsigned char yytype_uint8;
397#endif
398
399#ifdef YYTYPE_INT8
400typedef YYTYPE_INT8 yytype_int8;
John Bauman66b8ab22014-05-06 15:57:45 -0400401#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400402typedef signed char yytype_int8;
John Bauman66b8ab22014-05-06 15:57:45 -0400403#endif
404
405#ifdef YYTYPE_UINT16
406typedef YYTYPE_UINT16 yytype_uint16;
407#else
408typedef unsigned short int yytype_uint16;
409#endif
410
411#ifdef YYTYPE_INT16
412typedef YYTYPE_INT16 yytype_int16;
413#else
414typedef 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 Liaukevicheced26a2015-10-22 11:29:04 -0400422# elif ! defined YYSIZE_T
John Bauman66b8ab22014-05-06 15:57:45 -0400423# 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 Liaukevicheced26a2015-10-22 11:29:04 -0400433# if defined YYENABLE_NLS && YYENABLE_NLS
John Bauman66b8ab22014-05-06 15:57:45 -0400434# if ENABLE_NLS
435# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400436# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
John Bauman66b8ab22014-05-06 15:57:45 -0400437# endif
438# endif
439# ifndef YY_
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400440# 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 Bauman66b8ab22014-05-06 15:57:45 -0400468# endif
469#endif
470
471/* Suppress unused-variable warnings by "using" E. */
472#if ! defined lint || defined __GNUC__
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400473# define YYUSE(E) ((void) (E))
John Bauman66b8ab22014-05-06 15:57:45 -0400474#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400475# define YYUSE(E) /* empty */
John Bauman66b8ab22014-05-06 15:57:45 -0400476#endif
477
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400478#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 Bauman66b8ab22014-05-06 15:57:45 -0400486#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400487# define YY_INITIAL_VALUE(Value) Value
John Bauman66b8ab22014-05-06 15:57:45 -0400488#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400489#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
490# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
491# define YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -0400492#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400493#ifndef YY_INITIAL_VALUE
494# define YY_INITIAL_VALUE(Value) /* Nothing. */
495#endif
496
John Bauman66b8ab22014-05-06 15:57:45 -0400497
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 Liaukevicheced26a2015-10-22 11:29:04 -0400515# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
John Bauman66b8ab22014-05-06 15:57:45 -0400516# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400517 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
518# ifndef EXIT_SUCCESS
519# define EXIT_SUCCESS 0
John Bauman66b8ab22014-05-06 15:57:45 -0400520# endif
521# endif
522# endif
523# endif
524# endif
525
526# ifdef YYSTACK_ALLOC
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400527 /* Pacify GCC's 'empty if-body' warning. */
528# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400529# 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 Liaukevicheced26a2015-10-22 11:29:04 -0400542# if (defined __cplusplus && ! defined EXIT_SUCCESS \
John Bauman66b8ab22014-05-06 15:57:45 -0400543 && ! ((defined YYMALLOC || defined malloc) \
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400544 && (defined YYFREE || defined free)))
John Bauman66b8ab22014-05-06 15:57:45 -0400545# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400546# ifndef EXIT_SUCCESS
547# define EXIT_SUCCESS 0
John Bauman66b8ab22014-05-06 15:57:45 -0400548# endif
549# endif
550# ifndef YYMALLOC
551# define YYMALLOC malloc
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400552# if ! defined malloc && ! defined EXIT_SUCCESS
John Bauman66b8ab22014-05-06 15:57:45 -0400553void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
554# endif
555# endif
556# ifndef YYFREE
557# define YYFREE free
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400558# if ! defined free && ! defined EXIT_SUCCESS
John Bauman66b8ab22014-05-06 15:57:45 -0400559void 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 Liaukevicheced26a2015-10-22 11:29:04 -0400568 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
569 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
John Bauman66b8ab22014-05-06 15:57:45 -0400570
571/* A type that is properly aligned for any stack member. */
572union yyalloc
573{
574 yytype_int16 yyss_alloc;
575 YYSTYPE yyvs_alloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400576 YYLTYPE yyls_alloc;
John Bauman66b8ab22014-05-06 15:57:45 -0400577};
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 Hetu15ae36c2015-06-18 21:10:09 -0400585 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
586 + 2 * YYSTACK_GAP_MAXIMUM)
John Bauman66b8ab22014-05-06 15:57:45 -0400587
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400588# define YYCOPY_NEEDED 1
John Bauman66b8ab22014-05-06 15:57:45 -0400589
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 Liaukevicheced26a2015-10-22 11:29:04 -0400595# 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 Bauman66b8ab22014-05-06 15:57:45 -0400605
606#endif
607
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400608#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 Bauman66b8ab22014-05-06 15:57:45 -0400628/* YYFINAL -- State number of the termination state. */
Alexis Hetuad527752015-07-07 13:31:44 -0400629#define YYFINAL 112
John Bauman66b8ab22014-05-06 15:57:45 -0400630/* YYLAST -- Last index in YYTABLE. */
Alexis Hetu407813b2016-02-24 16:46:13 -0500631#define YYLAST 2525
John Bauman66b8ab22014-05-06 15:57:45 -0400632
633/* YYNTOKENS -- Number of terminals. */
Alexis Hetub14178b2015-04-13 13:23:20 -0400634#define YYNTOKENS 128
John Bauman66b8ab22014-05-06 15:57:45 -0400635/* YYNNTS -- Number of nonterminals. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400636#define YYNNTS 93
John Bauman66b8ab22014-05-06 15:57:45 -0400637/* YYNRULES -- Number of rules. */
Alexis Hetuad527752015-07-07 13:31:44 -0400638#define YYNRULES 272
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400639/* YYNSTATES -- Number of states. */
Alexis Hetuad527752015-07-07 13:31:44 -0400640#define YYNSTATES 413
John Bauman66b8ab22014-05-06 15:57:45 -0400641
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400642/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
643 by yylex, with out-of-bounds checking. */
John Bauman66b8ab22014-05-06 15:57:45 -0400644#define YYUNDEFTOK 2
Alexis Hetub14178b2015-04-13 13:23:20 -0400645#define YYMAXUTOK 382
John Bauman66b8ab22014-05-06 15:57:45 -0400646
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400647#define YYTRANSLATE(YYX) \
John Bauman66b8ab22014-05-06 15:57:45 -0400648 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
649
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400650/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
651 as returned by yylex, without out-of-bounds checking. */
John Bauman66b8ab22014-05-06 15:57:45 -0400652static 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 Hetub027aa92015-01-19 15:56:12 -0500688 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500689 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Alexis Hetub14178b2015-04-13 13:23:20 -0400690 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 Bauman66b8ab22014-05-06 15:57:45 -0400693};
694
695#if YYDEBUG
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400696 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
John Bauman66b8ab22014-05-06 15:57:45 -0400697static const yytype_uint16 yyrline[] =
698{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400699 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,
Alexis Hetu407813b2016-02-24 16:46:13 -0500707 551, 554, 560, 563, 574, 582, 590, 593, 599, 606,
708 610, 614, 618, 625, 631, 634, 641, 649, 670, 696,
709 706, 734, 739, 749, 754, 764, 767, 770, 773, 779,
710 786, 789, 793, 797, 802, 807, 814, 818, 822, 826,
711 831, 836, 840, 847, 857, 863, 866, 872, 878, 885,
712 894, 903, 911, 914, 921, 925, 929, 934, 942, 945,
713 949, 953, 962, 971, 979, 989, 1001, 1004, 1007, 1013,
714 1020, 1023, 1029, 1032, 1035, 1041, 1044, 1049, 1064, 1068,
715 1072, 1076, 1080, 1084, 1089, 1094, 1099, 1104, 1109, 1114,
716 1119, 1124, 1129, 1134, 1139, 1144, 1150, 1156, 1162, 1168,
717 1174, 1180, 1186, 1192, 1198, 1203, 1208, 1217, 1222, 1227,
718 1232, 1237, 1242, 1247, 1252, 1257, 1262, 1267, 1272, 1277,
719 1282, 1287, 1300, 1300, 1303, 1303, 1309, 1312, 1328, 1331,
720 1340, 1344, 1350, 1357, 1372, 1376, 1380, 1381, 1387, 1388,
721 1389, 1390, 1391, 1392, 1393, 1397, 1398, 1398, 1398, 1408,
722 1409, 1413, 1413, 1414, 1414, 1419, 1422, 1432, 1435, 1441,
723 1442, 1446, 1454, 1458, 1465, 1465, 1472, 1475, 1482, 1487,
724 1502, 1502, 1507, 1507, 1514, 1514, 1522, 1525, 1531, 1534,
725 1540, 1544, 1551, 1554, 1557, 1560, 1563, 1572, 1576, 1583,
726 1586, 1592, 1592
John Bauman66b8ab22014-05-06 15:57:45 -0400727};
728#endif
729
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400730#if YYDEBUG || YYERROR_VERBOSE || 0
John Bauman66b8ab22014-05-06 15:57:45 -0400731/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
732 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
733static const char *const yytname[] =
734{
735 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
736 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500737 "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 Capense4b1b1d2015-02-17 17:26:01 -0500740 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
741 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400742 "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 Capens2c1239f2015-02-17 17:30:04 -0500755 "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 Bauman66b8ab22014-05-06 15:57:45 -0400761 "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 Hetua35d8232015-06-11 17:11:06 -0400770 "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 Capens7d626792015-02-17 17:58:31 -0500779 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
780 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400781 "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 Hetu76a343a2015-06-04 17:21:22 -0400786 "selection_rest_statement", "switch_statement", "$@7", "case_label",
787 "condition", "iteration_statement", "$@8", "$@9", "$@10",
788 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400789 "jump_statement", "translation_unit", "external_declaration",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400790 "function_definition", "$@11", YY_NULLPTR
John Bauman66b8ab22014-05-06 15:57:45 -0400791};
792#endif
793
794# ifdef YYPRINT
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400795/* YYTOKNUM[NUM] -- (External) token number corresponding to the
796 (internal) symbol number NUM (which must be that of a token). */
John Bauman66b8ab22014-05-06 15:57:45 -0400797static 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 Capensc6841852015-02-15 14:25:37 -0500808 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500809 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400810 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
811 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400812};
813# endif
814
Alexis Hetu407813b2016-02-24 16:46:13 -0500815#define YYPACT_NINF -334
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400816
817#define yypact_value_is_default(Yystate) \
Alexis Hetu407813b2016-02-24 16:46:13 -0500818 (!!((Yystate) == (-334)))
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400819
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 Bauman66b8ab22014-05-06 15:57:45 -0400827static const yytype_int16 yypact[] =
828{
Alexis Hetu407813b2016-02-24 16:46:13 -0500829 2163, 10, -334, -334, -334, 169, -334, -334, -334, -334,
830 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
831 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
832 -334, -334, -334, -334, -334, -334, -334, 69, -334, -334,
833 -48, -334, -334, -334, -334, -334, -334, -334, -334, -334,
834 -334, -334, -334, -334, -334, -334, -334, -334, -82, -334,
835 -334, -78, -73, -71, 1, -59, -334, -32, 113, 1182,
836 -334, -334, 2448, 113, -334, -23, -334, 2088, -334, -334,
837 -334, -334, 113, -334, 2448, -334, -334, 11, -334, 9,
838 -334, 20, -334, 121, -334, -334, -334, -334, -334, 2312,
839 150, 22, -334, -79, -334, 37, -334, 2238, -334, -334,
840 -334, 1252, -334, -334, -334, 62, -334, 2238, 44, -41,
841 -334, 410, -334, -334, -334, -334, 105, 2312, -76, -334,
842 1350, 1641, -334, 107, 2312, 117, 1833, -334, 91, -334,
843 -334, -334, -334, -334, 1641, 1641, 1641, -334, -334, -334,
844 -334, -334, -334, -334, 19, -334, -334, -334, 103, -24,
845 1736, 120, -334, 1641, 80, -42, -36, 15, 43, 99,
846 108, 104, 141, 142, -69, -334, 127, -334, -334, 2238,
847 1918, 87, -334, 9, 122, 124, -334, 135, 136, 129,
848 1448, 140, 1641, 133, 143, 137, -334, -334, 118, -334,
849 -334, 12, -334, -78, 145, -334, -334, -334, -334, 526,
850 -334, -334, -334, -334, -334, -334, 144, -334, -334, 1543,
851 1641, 138, 148, -334, -334, 117, 146, 28, -334, -58,
852 -334, -334, -334, -15, -334, -334, 1641, 2380, -334, -334,
853 1641, 154, -334, -334, -334, 1641, 1641, 1641, 1641, 1641,
854 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641,
855 1641, 1641, 1641, 1641, 1641, -334, 2003, -334, -334, -334,
856 -334, -334, -334, 152, -334, 1641, -334, -334, 41, 1641,
857 149, -334, -334, -334, 642, -334, -334, -334, -334, -334,
858 -334, -334, -334, -334, -334, -334, 1641, 1641, -334, -334,
859 -334, 1641, 151, 155, -334, 1641, 157, 57, 1641, 117,
860 -334, -85, -334, -334, 156, 160, -334, 161, -334, -334,
861 -334, -334, -334, 80, 80, -42, -42, -36, -36, -36,
862 -36, 15, 15, 43, 99, 108, 104, 141, 142, 72,
863 -334, 211, 20, 874, 990, -10, -334, 3, -334, 1087,
864 642, -334, -334, 165, 1641, 163, -334, 1641, -334, 166,
865 -334, 1641, -334, -334, 1641, 164, -334, -334, -334, -334,
866 1087, 152, -334, 160, 198, 2312, 172, 170, -334, -334,
867 1641, -334, -334, 171, -334, 1641, -334, 167, 175, 265,
868 -334, 178, 174, 758, -334, -334, 176, 13, 1641, 758,
869 152, -334, 1641, -334, -334, -334, -334, 177, 160, -334,
870 -334, -334, -334
John Bauman66b8ab22014-05-06 15:57:45 -0400871};
872
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400873 /* 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. */
876static 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,
Alexis Hetu407813b2016-02-24 16:46:13 -0500890 150, 0, 272, 97, 102, 104, 109, 0, 111, 98,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400891 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,
Alexis Hetu407813b2016-02-24 16:46:13 -0500896 0, 0, 149, 0, 0, 0, 252, 0, 0, 0,
897 0, 0, 0, 0, 0, 226, 235, 239, 37, 69,
898 82, 0, 215, 0, 144, 218, 237, 217, 216, 0,
899 219, 220, 221, 222, 223, 224, 99, 101, 103, 0,
900 0, 0, 0, 214, 121, 0, 212, 0, 210, 0,
901 207, 30, 31, 0, 13, 14, 0, 0, 20, 19,
902 0, 158, 23, 25, 32, 0, 0, 0, 0, 0,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -0500904 0, 0, 0, 0, 0, 157, 0, 205, 153, 154,
905 151, 263, 262, 233, 254, 0, 266, 264, 0, 0,
906 0, 247, 250, 225, 0, 72, 73, 75, 74, 77,
907 78, 79, 80, 81, 76, 71, 0, 0, 240, 236,
908 238, 0, 0, 0, 115, 0, 118, 0, 0, 0,
909 208, 0, 89, 8, 0, 15, 27, 12, 18, 24,
910 38, 39, 40, 43, 42, 45, 46, 50, 51, 48,
911 49, 53, 54, 56, 58, 60, 62, 64, 66, 0,
912 203, 0, 0, 0, 0, 0, 265, 0, 246, 0,
913 227, 70, 83, 0, 0, 112, 119, 0, 209, 0,
914 211, 0, 90, 10, 0, 0, 232, 234, 257, 256,
915 259, 233, 244, 248, 0, 0, 0, 0, 100, 113,
916 0, 120, 213, 0, 68, 0, 258, 0, 0, 243,
917 241, 0, 0, 0, 228, 114, 0, 0, 260, 0,
918 233, 245, 0, 230, 251, 229, 91, 0, 261, 255,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400919 242, 249, 253
920};
921
922 /* YYPGOTO[NTERM-NUM]. */
John Bauman66b8ab22014-05-06 15:57:45 -0400923static const yytype_int16 yypgoto[] =
924{
Alexis Hetu407813b2016-02-24 16:46:13 -0500925 -334, -334, -334, -334, -334, -334, -334, 46, -334, -334,
926 -334, -334, 66, -334, -46, -44, -67, -34, 30, 33,
927 29, 32, 34, 31, -334, -104, -127, -334, -144, -119,
928 -334, 14, 17, -334, -334, -334, 168, 204, 199, 173,
929 -334, -334, -325, 8, -334, -101, 7, -68, 293, -334,
930 -334, 119, 0, -334, -334, -334, -334, -97, -123, 76,
931 -6, -208, -40, -206, -328, -83, -334, -334, -94, -333,
932 -334, -334, -86, 25, -38, -334, -334, -334, -334, -334,
933 -60, -334, -334, -334, -334, -334, -334, -334, -334, -334,
934 253, -334, -334
John Bauman66b8ab22014-05-06 15:57:45 -0400935};
936
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400937 /* YYDEFGOTO[NTERM-NUM]. */
938static const yytype_int16 yydefgoto[] =
939{
Alexis Hetu407813b2016-02-24 16:46:13 -0500940 -1, 152, 153, 154, 314, 155, 156, 157, 158, 159,
941 160, 161, 198, 163, 164, 165, 166, 167, 168, 169,
942 170, 171, 172, 173, 174, 199, 200, 296, 201, 176,
943 107, 202, 203, 62, 63, 64, 124, 98, 99, 125,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400944 65, 66, 67, 68, 100, 69, 70, 71, 72, 73,
Alexis Hetu407813b2016-02-24 16:46:13 -0500945 119, 120, 177, 75, 76, 179, 117, 136, 137, 227,
946 228, 224, 205, 206, 207, 208, 284, 377, 404, 341,
947 342, 343, 405, 209, 210, 211, 390, 212, 391, 213,
948 376, 214, 349, 273, 344, 370, 387, 388, 215, 77,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400949 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 Bauman66b8ab22014-05-06 15:57:45 -0400955static const yytype_int16 yytable[] =
956{
Alexis Hetu407813b2016-02-24 16:46:13 -0500957 74, 108, 233, 300, 223, 122, 134, 175, 83, 82,
958 94, 222, 304, 230, 60, 367, 134, 61, 311, 7,
959 180, 361, 89, 263, 374, 129, 175, 130, 87, 362,
960 219, 126, 92, 242, 131, 134, 90, 220, 389, 135,
961 93, 95, 96, 97, 103, 374, 278, 250, 251, 135,
962 27, 28, 101, 29, 80, 102, 312, 230, 264, 126,
963 88, 37, 38, 39, 182, 403, 225, 410, 135, 74,
964 183, 403, 109, 280, 248, 104, 249, 74, 134, 134,
965 110, 239, 266, 111, 115, 118, 81, 240, 175, 114,
966 313, 60, 315, 223, 61, 371, 297, 356, 128, 74,
967 303, 297, 252, 253, 234, 235, -94, 74, 372, 85,
968 86, 135, 135, 319, 297, 175, 7, 74, 407, 116,
969 339, 204, 7, 297, 297, 236, 298, 74, 121, 237,
970 94, 345, 256, 257, 74, 347, 74, 254, 255, 309,
971 83, 82, 310, 230, 300, 132, 379, 27, 28, 381,
972 29, 80, 297, 27, 28, 346, 29, 181, 37, 38,
973 39, 95, 96, 97, 37, 134, 268, 269, 309, 351,
974 352, 358, 395, 2, 3, 4, 178, 162, 223, 74,
975 74, 216, 353, 297, 364, 327, 328, 329, 330, 359,
976 95, 96, 97, 226, 411, -27, 162, 175, 135, 245,
977 246, 247, 323, 324, 175, 373, 325, 326, 238, 204,
978 231, 232, 285, 286, 287, 288, 289, 290, 291, 292,
979 293, 294, 331, 332, 243, 258, 373, 223, 260, 244,
980 223, 295, 261, 259, 265, 262, 271, 384, 272, 274,
981 275, 397, 383, 276, 279, 281, 283, 282, 375, -26,
982 301, 305, 308, 223, 408, 306, 366, 175, 162, -21,
983 -231, 348, 355, 363, 354, -28, 74, 365, 385, 375,
984 357, 297, 378, 382, 392, 223, 380, 393, 396, 394,
985 399, 398, 400, 318, 204, 162, 195, 402, 333, 335,
986 406, 412, 334, 336, 338, 217, 337, 123, 84, 127,
987 218, 307, 270, 360, 368, 409, 369, 108, 401, 350,
988 386, 320, 321, 322, 162, 162, 162, 162, 162, 162,
Alexis Hetuad527752015-07-07 13:31:44 -0400989 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
Alexis Hetu407813b2016-02-24 16:46:13 -0500990 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
991 0, 0, 0, 204, 204, 0, 0, 0, 0, 204,
992 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
993 0, 0, 0, 0, 0, 0, 0, 162, 0, 0,
994 204, 0, 0, 0, 162, 74, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -0500996 0, 0, 0, 204, 0, 0, 0, 0, 0, 204,
Alexis Hetua35d8232015-06-11 17:11:06 -0400997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -0500998 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
999 8, 9, 10, 11, 184, 185, 186, 162, 187, 188,
1000 189, 190, 191, 192, 193, 12, 13, 14, 15, 16,
Alexis Hetue5246692015-06-18 12:34:52 -04001001 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1002 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
Alexis Hetu407813b2016-02-24 16:46:13 -05001003 36, 37, 38, 39, 40, 41, 194, 42, 43, 44,
Alexis Hetue5246692015-06-18 12:34:52 -04001004 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001005 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1006 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001007 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001008 0, 0, 0, 0, 146, 0, 0, 0, 195, 196,
1009 0, 0, 0, 0, 197, 148, 149, 150, 151, 1,
Alexis Hetue5246692015-06-18 12:34:52 -04001010 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetu407813b2016-02-24 16:46:13 -05001011 184, 185, 186, 0, 187, 188, 189, 190, 191, 192,
1012 193, 12, 13, 14, 15, 16, 17, 18, 19, 20,
Alexis Hetue5246692015-06-18 12:34:52 -04001013 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1014 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Alexis Hetu407813b2016-02-24 16:46:13 -05001015 40, 41, 194, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001016 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001017 57, 58, 138, 59, 139, 140, 141, 142, 143, 0,
1018 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001020 146, 0, 0, 0, 195, 299, 0, 0, 0, 0,
1021 197, 148, 149, 150, 151, 1, 2, 3, 4, 5,
1022 6, 7, 8, 9, 10, 11, 184, 185, 186, 0,
1023 187, 188, 189, 190, 191, 192, 193, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001024 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001025 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetu407813b2016-02-24 16:46:13 -05001026 34, 35, 36, 37, 38, 39, 40, 41, 194, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001027 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001028 52, 53, 54, 0, 55, 56, 57, 58, 138, 59,
1029 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001031 0, 0, 0, 0, 0, 0, 146, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001032 195, 0, 0, 0, 0, 0, 197, 148, 149, 150,
Alexis Hetuad527752015-07-07 13:31:44 -04001033 151, 1, 2, 3, 4, 5, 6, 7, 8, 9,
Alexis Hetu407813b2016-02-24 16:46:13 -05001034 10, 11, 184, 185, 186, 0, 187, 188, 189, 190,
1035 191, 192, 193, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetue5246692015-06-18 12:34:52 -04001036 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1037 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetu407813b2016-02-24 16:46:13 -05001038 38, 39, 40, 41, 194, 42, 43, 44, 0, 45,
Alexis Hetue5246692015-06-18 12:34:52 -04001039 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001040 55, 56, 57, 58, 138, 59, 139, 140, 141, 142,
1041 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1043 0, 0, 146, 0, 0, 0, 121, 0, 0, 0,
1044 0, 0, 197, 148, 149, 150, 151, 1, 2, 3,
1045 4, 5, 6, 7, 8, 9, 10, 11, 184, 185,
1046 186, 0, 187, 188, 189, 190, 191, 192, 193, 12,
1047 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1048 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1049 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1050 194, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1051 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1052 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1053 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1054 0, 0, 0, 0, 0, 0, 0, 0, 146, 0,
1055 0, 0, 0, 0, 0, 0, 0, 0, 197, 148,
1056 149, 150, 151, 1, 2, 3, 4, 5, 6, 7,
Alexis Hetuad527752015-07-07 13:31:44 -04001057 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1058 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1059 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
Alexis Hetu407813b2016-02-24 16:46:13 -05001060 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1061 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1062 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1063 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1064 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
1065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1066 133, 2, 3, 4, 146, 6, 7, 8, 9, 10,
1067 11, 0, 0, 0, 197, 148, 149, 150, 151, 0,
1068 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1069 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1070 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1071 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1072 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1073 56, 57, 58, 138, 59, 139, 140, 141, 142, 143,
1074 0, 0, 144, 145, 0, 0, 0, 0, 0, 0,
1075 0, 0, 0, 0, 0, 0, 2, 3, 4, 0,
1076 0, 146, 8, 9, 10, 11, 0, 0, 0, 0,
1077 0, 0, 148, 149, 150, 151, 0, 12, 13, 14,
1078 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1079 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1080 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1081 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1082 52, 53, 54, 0, 55, 56, 57, 0, 105, 59,
1083 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
1084 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1085 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1086 25, 26, 0, 0, 0, 0, 106, 31, 32, 33,
1087 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1088 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1089 52, 53, 54, 0, 55, 56, 57, 0, 138, 59,
1090 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
1091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1092 0, 0, 0, 0, 0, 0, 146, 0, 0, 147,
1093 8, 9, 10, 11, 0, 0, 0, 148, 149, 150,
1094 151, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1095 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1096 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001097 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001098 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001099 54, 0, 55, 56, 57, 0, 138, 59, 139, 140,
1100 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001102 0, 0, 0, 0, 146, 0, 0, 221, 8, 9,
Alexis Hetuad527752015-07-07 13:31:44 -04001103 10, 11, 0, 0, 0, 148, 149, 150, 151, 0,
1104 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1105 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1106 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1107 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1108 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1109 55, 56, 57, 0, 138, 59, 139, 140, 141, 142,
1110 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001112 0, 0, 146, 8, 9, 10, 11, 0, 0, 0,
1113 0, 0, 277, 148, 149, 150, 151, 0, 12, 13,
1114 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1115 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
1116 33, 34, 35, 36, 0, 0, 0, 40, 41, 0,
1117 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1118 51, 52, 53, 54, 0, 55, 56, 57, 0, 138,
1119 59, 139, 140, 141, 142, 143, 0, 0, 144, 145,
1120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1121 0, 0, 0, 0, 0, 0, 0, 146, 0, 0,
1122 302, 8, 9, 10, 11, 0, 0, 0, 148, 149,
1123 150, 151, 0, 0, 0, 0, 12, 13, 14, 15,
1124 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1125 26, 0, 0, 0, 0, 0, 31, 32, 33, 34,
1126 35, 36, 0, 0, 0, 40, 41, 0, 42, 43,
1127 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1128 53, 54, 0, 55, 56, 57, 0, 138, 59, 139,
1129 140, 141, 142, 143, 0, 0, 144, 145, 0, 0,
1130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1131 0, 0, 0, 0, 0, 146, 8, 9, 10, 11,
1132 0, 0, 0, 0, 0, 0, 148, 149, 150, 151,
Alexis Hetue5246692015-06-18 12:34:52 -04001133 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1134 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1135 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001136 40, 241, 0, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001137 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001138 57, 0, 138, 59, 139, 140, 141, 142, 143, 0,
1139 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001140 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1141 146, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1142 0, 148, 149, 150, 151, 0, 0, 0, 12, 13,
1143 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1144 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1145 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1146 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1147 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1148 59, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1149 0, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1150 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1151 0, 0, 229, 12, 13, 14, 15, 16, 17, 18,
1152 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1153 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1154 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1155 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1156 55, 56, 57, 58, 0, 59, 0, 0, 0, 0,
1157 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1158 0, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1159 0, 0, 0, 0, 0, 0, 0, 267, 12, 13,
1160 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1161 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1162 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1163 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1164 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1165 59, 0, 0, 0, 0, 0, 0, 0, 112, 0,
1166 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1167 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1168 0, 0, 340, 12, 13, 14, 15, 16, 17, 18,
1169 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1170 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1171 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1172 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1173 55, 56, 57, 58, 0, 59, 1, 2, 3, 4,
1174 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1175 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
1176 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1177 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1178 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1179 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1180 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1181 59, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1182 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1183 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1184 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1185 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1186 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1187 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1188 55, 56, 57, 58, 0, 59, 2, 3, 4, 0,
1189 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
1190 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1191 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1192 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1193 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1194 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1195 52, 53, 54, 0, 55, 56, 57, 0, 0, 59,
Alexis Hetuad527752015-07-07 13:31:44 -04001196 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1197 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1198 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1199 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1200 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1201 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetu407813b2016-02-24 16:46:13 -05001202 54, 0, 55, 56, 57, 0, 316, 59, 8, 9,
1203 10, 11, 317, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001204 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1205 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1206 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1207 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1208 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001209 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001210};
1211
1212static const yytype_int16 yycheck[] =
1213{
Alexis Hetu407813b2016-02-24 16:46:13 -05001214 0, 69, 146, 209, 131, 91, 107, 111, 1, 1,
1215 9, 130, 220, 136, 0, 343, 117, 0, 76, 9,
1216 117, 106, 104, 92, 349, 104, 130, 106, 76, 114,
1217 106, 99, 105, 160, 113, 136, 114, 113, 371, 107,
1218 111, 40, 41, 42, 76, 370, 190, 83, 84, 117,
1219 40, 41, 111, 43, 44, 114, 114, 180, 127, 127,
1220 108, 51, 52, 53, 105, 393, 134, 400, 136, 69,
1221 111, 399, 72, 192, 116, 68, 118, 77, 179, 180,
1222 73, 105, 179, 106, 84, 76, 76, 111, 192, 82,
1223 105, 77, 236, 220, 77, 105, 111, 305, 76, 99,
1224 219, 111, 87, 88, 85, 86, 105, 107, 105, 40,
1225 41, 179, 180, 240, 111, 219, 9, 117, 105, 108,
1226 264, 121, 9, 111, 111, 106, 114, 127, 108, 110,
1227 9, 275, 89, 90, 134, 279, 136, 122, 123, 111,
1228 133, 133, 114, 266, 350, 108, 354, 40, 41, 357,
1229 43, 44, 111, 40, 41, 114, 43, 113, 51, 52,
1230 53, 40, 41, 42, 51, 266, 79, 80, 111, 296,
1231 297, 114, 380, 4, 5, 6, 114, 111, 305, 179,
1232 180, 76, 301, 111, 112, 252, 253, 254, 255, 308,
1233 40, 41, 42, 76, 402, 104, 130, 301, 266, 119,
1234 120, 121, 248, 249, 308, 349, 250, 251, 105, 209,
1235 144, 145, 94, 95, 96, 97, 98, 99, 100, 101,
1236 102, 103, 256, 257, 104, 126, 370, 354, 124, 163,
1237 357, 113, 91, 125, 107, 93, 114, 364, 114, 104,
1238 104, 385, 361, 114, 104, 112, 109, 104, 349, 104,
1239 106, 113, 106, 380, 398, 107, 342, 361, 192, 105,
1240 108, 112, 107, 107, 113, 104, 266, 56, 104, 370,
1241 113, 111, 107, 107, 76, 402, 113, 105, 107, 109,
1242 105, 114, 17, 237, 284, 219, 108, 113, 258, 260,
1243 114, 114, 259, 261, 263, 127, 262, 93, 5, 100,
1244 127, 225, 183, 309, 344, 399, 344, 375, 391, 284,
1245 370, 245, 246, 247, 248, 249, 250, 251, 252, 253,
1246 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
1247 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1248 -1, -1, -1, 343, 344, -1, -1, -1, -1, 349,
1249 350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1250 -1, -1, -1, -1, -1, -1, -1, 301, -1, -1,
1251 370, -1, -1, -1, 308, 375, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001253 -1, -1, -1, 393, -1, -1, -1, -1, -1, 399,
Alexis Hetue5246692015-06-18 12:34:52 -04001254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001255 -1, -1, -1, 3, 4, 5, 6, 7, 8, 9,
1256 10, 11, 12, 13, 14, 15, 16, 361, 18, 19,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001257 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
Alexis Hetuad527752015-07-07 13:31:44 -04001258 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1259 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001260 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
Alexis Hetuad527752015-07-07 13:31:44 -04001261 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1262 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1263 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001265 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001266 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1267 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1268 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1269 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1270 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1271 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1272 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1273 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1274 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1275 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001277 104, -1, -1, -1, 108, 109, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001278 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1279 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1280 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetue5246692015-06-18 12:34:52 -04001281 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001282 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1283 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetue5246692015-06-18 12:34:52 -04001284 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001285 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetue5246692015-06-18 12:34:52 -04001286 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001288 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001289 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001290 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetu407813b2016-02-24 16:46:13 -05001291 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1292 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001293 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1294 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetu407813b2016-02-24 16:46:13 -05001295 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001296 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1297 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1298 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001299 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1300 -1, -1, 104, -1, -1, -1, 108, -1, -1, -1,
1301 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
1302 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1303 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
1304 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1305 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1306 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1307 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1308 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1309 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1310 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1311 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
1312 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
1313 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001314 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1315 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1316 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Alexis Hetu407813b2016-02-24 16:46:13 -05001317 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1318 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1319 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1320 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1321 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1322 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1323 3, 4, 5, 6, 104, 8, 9, 10, 11, 12,
1324 13, -1, -1, -1, 114, 115, 116, 117, 118, -1,
1325 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1326 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1327 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1328 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1329 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1330 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1331 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
1332 -1, -1, -1, -1, -1, -1, 4, 5, 6, -1,
1333 -1, 104, 10, 11, 12, 13, -1, -1, -1, -1,
1334 -1, -1, 115, 116, 117, 118, -1, 25, 26, 27,
1335 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1336 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1337 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1338 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1339 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
1340 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
1341 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1342 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1343 38, 39, -1, -1, -1, -1, 114, 45, 46, 47,
1344 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1345 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1346 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
1347 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1349 -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
1350 10, 11, 12, 13, -1, -1, -1, 115, 116, 117,
1351 118, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1352 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1353 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001354 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1355 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001356 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1357 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1358 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001359 -1, -1, -1, -1, 104, -1, -1, 107, 10, 11,
1360 12, 13, -1, -1, -1, 115, 116, 117, 118, -1,
1361 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1362 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1363 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1364 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1365 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1366 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1367 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001369 -1, -1, 104, 10, 11, 12, 13, -1, -1, -1,
1370 -1, -1, 114, 115, 116, 117, 118, -1, 25, 26,
1371 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1372 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1373 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
1374 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1375 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
1376 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
1377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1378 -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
1379 107, 10, 11, 12, 13, -1, -1, -1, 115, 116,
1380 117, 118, -1, -1, -1, -1, 25, 26, 27, 28,
1381 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1382 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
1383 49, 50, -1, -1, -1, 54, 55, -1, 57, 58,
1384 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1385 69, 70, -1, 72, 73, 74, -1, 76, 77, 78,
1386 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1388 -1, -1, -1, -1, -1, 104, 10, 11, 12, 13,
1389 -1, -1, -1, -1, -1, -1, 115, 116, 117, 118,
Alexis Hetue5246692015-06-18 12:34:52 -04001390 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1391 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1392 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1393 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1394 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
Alexis Hetuad527752015-07-07 13:31:44 -04001395 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1396 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001397 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1398 104, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1399 -1, 115, 116, 117, 118, -1, -1, -1, 25, 26,
1400 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1401 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1402 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1403 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1404 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1405 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1406 -1, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1407 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1408 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1409 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1410 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1411 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1412 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1413 72, 73, 74, 75, -1, 77, -1, -1, -1, -1,
1414 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1415 -1, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1416 -1, -1, -1, -1, -1, -1, -1, 109, 25, 26,
1417 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1418 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1419 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1420 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1421 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1422 77, -1, -1, -1, -1, -1, -1, -1, 0, -1,
1423 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1424 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1425 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1426 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1427 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1428 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1429 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1430 72, 73, 74, 75, -1, 77, 3, 4, 5, 6,
1431 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1432 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
1433 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1434 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1435 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1436 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1437 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1438 77, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1439 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1440 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1441 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1442 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1443 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1444 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1445 72, 73, 74, 75, -1, 77, 4, 5, 6, -1,
1446 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
1447 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1448 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1449 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1450 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1451 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1452 68, 69, 70, -1, 72, 73, 74, -1, -1, 77,
Alexis Hetuad527752015-07-07 13:31:44 -04001453 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1454 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1455 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1456 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1457 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1458 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu407813b2016-02-24 16:46:13 -05001459 70, -1, 72, 73, 74, -1, 76, 77, 10, 11,
1460 12, 13, 82, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001461 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1462 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1463 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1464 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1465 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001466 72, 73, 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001467};
1468
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001469 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1470 symbol of state STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -04001471static const yytype_uint8 yystos[] =
1472{
1473 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001474 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001475 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001476 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1477 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1478 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001479 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001480 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
Alexis Hetuad527752015-07-07 13:31:44 -04001481 44, 76, 171, 174, 176, 40, 41, 76, 108, 104,
1482 114, 220, 105, 111, 9, 40, 41, 42, 165, 166,
1483 172, 111, 114, 76, 174, 76, 114, 158, 175, 180,
1484 174, 106, 0, 218, 174, 180, 108, 184, 76, 178,
Alexis Hetu407813b2016-02-24 16:46:13 -05001485 179, 108, 200, 165, 164, 167, 175, 166, 76, 104,
Alexis Hetuad527752015-07-07 13:31:44 -04001486 106, 113, 108, 3, 173, 175, 185, 186, 76, 78,
1487 79, 80, 81, 82, 85, 86, 104, 107, 115, 116,
1488 117, 118, 129, 130, 131, 133, 134, 135, 136, 137,
1489 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1490 148, 149, 150, 151, 152, 153, 157, 180, 114, 183,
Alexis Hetu407813b2016-02-24 16:46:13 -05001491 185, 113, 105, 111, 14, 15, 16, 18, 19, 20,
1492 21, 22, 23, 24, 56, 108, 109, 114, 140, 153,
1493 154, 156, 159, 160, 180, 190, 191, 192, 193, 201,
1494 202, 203, 205, 207, 209, 216, 76, 164, 167, 106,
1495 113, 107, 157, 154, 189, 175, 76, 187, 188, 109,
1496 186, 140, 140, 156, 85, 86, 106, 110, 105, 105,
1497 111, 55, 154, 104, 140, 119, 120, 121, 116, 118,
1498 83, 84, 87, 88, 122, 123, 89, 90, 126, 125,
1499 124, 91, 93, 92, 127, 107, 185, 109, 79, 80,
1500 179, 114, 114, 211, 104, 104, 114, 114, 156, 104,
1501 157, 112, 104, 109, 194, 94, 95, 96, 97, 98,
1502 99, 100, 101, 102, 103, 113, 155, 111, 114, 109,
1503 191, 106, 107, 157, 189, 113, 107, 187, 106, 111,
1504 114, 76, 114, 105, 132, 156, 76, 82, 135, 154,
1505 140, 140, 140, 142, 142, 143, 143, 144, 144, 144,
1506 144, 145, 145, 146, 147, 148, 149, 150, 151, 156,
1507 109, 197, 198, 199, 212, 156, 114, 156, 112, 210,
1508 201, 154, 154, 157, 113, 107, 189, 113, 114, 157,
1509 188, 106, 114, 107, 112, 56, 200, 192, 190, 202,
1510 213, 105, 105, 156, 170, 173, 208, 195, 107, 189,
1511 113, 189, 107, 157, 154, 104, 208, 214, 215, 197,
1512 204, 206, 76, 105, 109, 189, 107, 156, 114, 105,
1513 17, 193, 113, 192, 196, 200, 114, 105, 156, 196,
Alexis Hetuad527752015-07-07 13:31:44 -04001514 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001515};
1516
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001517 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1518static const yytype_uint8 yyr1[] =
1519{
1520 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
1521 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
1522 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
1523 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
1524 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
1525 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
1526 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
1527 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1528 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
1529 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
1530 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
1531 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
1532 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
1533 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
1534 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
1535 178, 178, 179, 179, 179, 180, 180, 180, 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, 181, 181, 181, 181, 181, 181, 181, 181,
1539 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1540 181, 181, 183, 182, 184, 182, 185, 185, 186, 186,
1541 187, 187, 188, 188, 189, 190, 191, 191, 192, 192,
1542 192, 192, 192, 192, 192, 193, 194, 195, 193, 196,
1543 196, 198, 197, 199, 197, 200, 200, 201, 201, 202,
1544 202, 203, 204, 204, 206, 205, 207, 207, 208, 208,
1545 210, 209, 211, 209, 212, 209, 213, 213, 214, 214,
1546 215, 215, 216, 216, 216, 216, 216, 217, 217, 218,
1547 218, 220, 219
1548};
John Bauman66b8ab22014-05-06 15:57:45 -04001549
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001550 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1551static const yytype_uint8 yyr2[] =
1552{
1553 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
1554 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
1555 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
1556 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
1557 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
1558 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
1559 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
1560 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1561 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
1562 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
1563 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
1564 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
1565 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
1566 2, 1, 2, 1, 1, 2, 2, 3, 1, 1,
1567 1, 2, 2, 1, 1, 2, 1, 1, 1, 4,
1568 1, 3, 1, 3, 3, 1, 3, 4, 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, 1, 1, 1, 1, 1, 1, 1, 1,
1572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1573 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
1574 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
1575 1, 1, 1, 1, 1, 2, 0, 0, 5, 1,
1576 1, 0, 2, 0, 2, 2, 3, 1, 2, 1,
1577 2, 5, 3, 1, 0, 6, 3, 2, 1, 4,
1578 0, 6, 0, 8, 0, 7, 1, 1, 1, 0,
1579 2, 3, 2, 2, 2, 3, 2, 1, 2, 1,
1580 1, 0, 3
1581};
John Bauman66b8ab22014-05-06 15:57:45 -04001582
1583
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001584#define yyerrok (yyerrstatus = 0)
1585#define yyclearin (yychar = YYEMPTY)
1586#define YYEMPTY (-2)
1587#define YYEOF 0
John Bauman66b8ab22014-05-06 15:57:45 -04001588
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001589#define YYACCEPT goto yyacceptlab
1590#define YYABORT goto yyabortlab
1591#define YYERROR goto yyerrorlab
1592
John Bauman66b8ab22014-05-06 15:57:45 -04001593
1594#define YYRECOVERING() (!!yyerrstatus)
1595
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001596#define YYBACKUP(Token, Value) \
1597do \
1598 if (yychar == YYEMPTY) \
1599 { \
1600 yychar = (Token); \
1601 yylval = (Value); \
1602 YYPOPSTACK (yylen); \
1603 yystate = *yyssp; \
1604 goto yybackup; \
1605 } \
1606 else \
1607 { \
1608 yyerror (&yylloc, context, yyscanner, YY_("syntax error: cannot back up")); \
1609 YYERROR; \
1610 } \
1611while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001612
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001613/* Error token number */
1614#define YYTERROR 1
1615#define YYERRCODE 256
John Bauman66b8ab22014-05-06 15:57:45 -04001616
1617
1618/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1619 If N is 0, then set CURRENT to the empty location which ends
1620 the previous symbol: RHS[0] (always defined). */
1621
John Bauman66b8ab22014-05-06 15:57:45 -04001622#ifndef YYLLOC_DEFAULT
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001623# define YYLLOC_DEFAULT(Current, Rhs, N) \
1624 do \
1625 if (N) \
1626 { \
1627 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1628 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1629 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1630 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1631 } \
1632 else \
1633 { \
1634 (Current).first_line = (Current).last_line = \
1635 YYRHSLOC (Rhs, 0).last_line; \
1636 (Current).first_column = (Current).last_column = \
1637 YYRHSLOC (Rhs, 0).last_column; \
1638 } \
1639 while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001640#endif
1641
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001642#define YYRHSLOC(Rhs, K) ((Rhs)[K])
John Bauman66b8ab22014-05-06 15:57:45 -04001643
John Bauman66b8ab22014-05-06 15:57:45 -04001644
1645/* Enable debugging if requested. */
1646#if YYDEBUG
1647
1648# ifndef YYFPRINTF
1649# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1650# define YYFPRINTF fprintf
1651# endif
1652
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001653# define YYDPRINTF(Args) \
1654do { \
1655 if (yydebug) \
1656 YYFPRINTF Args; \
1657} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001658
1659
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001660/* YY_LOCATION_PRINT -- Print the location on the stream.
1661 This macro was not mandated originally: define only if we know
1662 we won't break user code: when these are the locations we know. */
John Bauman66b8ab22014-05-06 15:57:45 -04001663
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001664#ifndef YY_LOCATION_PRINT
1665# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1666
1667/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1668
1669YY_ATTRIBUTE_UNUSED
1670static unsigned
1671yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
John Bauman66b8ab22014-05-06 15:57:45 -04001672{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001673 unsigned res = 0;
1674 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1675 if (0 <= yylocp->first_line)
1676 {
1677 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1678 if (0 <= yylocp->first_column)
1679 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1680 }
1681 if (0 <= yylocp->last_line)
1682 {
1683 if (yylocp->first_line < yylocp->last_line)
1684 {
1685 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1686 if (0 <= end_col)
1687 res += YYFPRINTF (yyo, ".%d", end_col);
1688 }
1689 else if (0 <= end_col && yylocp->first_column < end_col)
1690 res += YYFPRINTF (yyo, "-%d", end_col);
1691 }
1692 return res;
1693 }
1694
1695# define YY_LOCATION_PRINT(File, Loc) \
1696 yy_location_print_ (File, &(Loc))
1697
1698# else
1699# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1700# endif
1701#endif
1702
1703
1704# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1705do { \
1706 if (yydebug) \
1707 { \
1708 YYFPRINTF (stderr, "%s ", Title); \
1709 yy_symbol_print (stderr, \
1710 Type, Value, Location, context, yyscanner); \
1711 YYFPRINTF (stderr, "\n"); \
1712 } \
1713} while (0)
1714
1715
1716/*----------------------------------------.
1717| Print this symbol's value on YYOUTPUT. |
1718`----------------------------------------*/
1719
1720static void
1721yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner)
1722{
1723 FILE *yyo = yyoutput;
1724 YYUSE (yyo);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001725 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001726 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001727 YYUSE (yyscanner);
1728 if (!yyvaluep)
1729 return;
John Bauman66b8ab22014-05-06 15:57:45 -04001730# ifdef YYPRINT
1731 if (yytype < YYNTOKENS)
1732 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
John Bauman66b8ab22014-05-06 15:57:45 -04001733# endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001734 YYUSE (yytype);
John Bauman66b8ab22014-05-06 15:57:45 -04001735}
1736
1737
1738/*--------------------------------.
1739| Print this symbol on YYOUTPUT. |
1740`--------------------------------*/
1741
John Bauman66b8ab22014-05-06 15:57:45 -04001742static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001743yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04001744{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001745 YYFPRINTF (yyoutput, "%s %s (",
1746 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
John Bauman66b8ab22014-05-06 15:57:45 -04001747
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001748 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1749 YYFPRINTF (yyoutput, ": ");
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001750 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001751 YYFPRINTF (yyoutput, ")");
1752}
1753
1754/*------------------------------------------------------------------.
1755| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1756| TOP (included). |
1757`------------------------------------------------------------------*/
1758
John Bauman66b8ab22014-05-06 15:57:45 -04001759static void
1760yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
John Bauman66b8ab22014-05-06 15:57:45 -04001761{
1762 YYFPRINTF (stderr, "Stack now");
1763 for (; yybottom <= yytop; yybottom++)
1764 {
1765 int yybot = *yybottom;
1766 YYFPRINTF (stderr, " %d", yybot);
1767 }
1768 YYFPRINTF (stderr, "\n");
1769}
1770
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001771# define YY_STACK_PRINT(Bottom, Top) \
1772do { \
1773 if (yydebug) \
1774 yy_stack_print ((Bottom), (Top)); \
1775} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001776
1777
1778/*------------------------------------------------.
1779| Report that the YYRULE is going to be reduced. |
1780`------------------------------------------------*/
1781
John Bauman66b8ab22014-05-06 15:57:45 -04001782static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001783yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04001784{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001785 unsigned long int yylno = yyrline[yyrule];
John Bauman66b8ab22014-05-06 15:57:45 -04001786 int yynrhs = yyr2[yyrule];
1787 int yyi;
John Bauman66b8ab22014-05-06 15:57:45 -04001788 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001789 yyrule - 1, yylno);
John Bauman66b8ab22014-05-06 15:57:45 -04001790 /* The symbols being reduced. */
1791 for (yyi = 0; yyi < yynrhs; yyi++)
1792 {
1793 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001794 yy_symbol_print (stderr,
1795 yystos[yyssp[yyi + 1 - yynrhs]],
1796 &(yyvsp[(yyi + 1) - (yynrhs)])
1797 , &(yylsp[(yyi + 1) - (yynrhs)]) , context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001798 YYFPRINTF (stderr, "\n");
1799 }
1800}
1801
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001802# define YY_REDUCE_PRINT(Rule) \
1803do { \
1804 if (yydebug) \
1805 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, yyscanner); \
1806} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001807
1808/* Nonzero means print parse trace. It is left uninitialized so that
1809 multiple parsers can coexist. */
1810int yydebug;
1811#else /* !YYDEBUG */
1812# define YYDPRINTF(Args)
1813# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1814# define YY_STACK_PRINT(Bottom, Top)
1815# define YY_REDUCE_PRINT(Rule)
1816#endif /* !YYDEBUG */
1817
1818
1819/* YYINITDEPTH -- initial size of the parser's stacks. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001820#ifndef YYINITDEPTH
John Bauman66b8ab22014-05-06 15:57:45 -04001821# define YYINITDEPTH 200
1822#endif
1823
1824/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1825 if the built-in stack extension method is used).
1826
1827 Do not make this value too large; the results are undefined if
1828 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1829 evaluated with infinite-precision integer arithmetic. */
1830
1831#ifndef YYMAXDEPTH
1832# define YYMAXDEPTH 10000
1833#endif
1834
John Bauman66b8ab22014-05-06 15:57:45 -04001835
1836#if YYERROR_VERBOSE
1837
1838# ifndef yystrlen
1839# if defined __GLIBC__ && defined _STRING_H
1840# define yystrlen strlen
1841# else
1842/* Return the length of YYSTR. */
John Bauman66b8ab22014-05-06 15:57:45 -04001843static YYSIZE_T
1844yystrlen (const char *yystr)
John Bauman66b8ab22014-05-06 15:57:45 -04001845{
1846 YYSIZE_T yylen;
1847 for (yylen = 0; yystr[yylen]; yylen++)
1848 continue;
1849 return yylen;
1850}
1851# endif
1852# endif
1853
1854# ifndef yystpcpy
1855# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1856# define yystpcpy stpcpy
1857# else
1858/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1859 YYDEST. */
John Bauman66b8ab22014-05-06 15:57:45 -04001860static char *
1861yystpcpy (char *yydest, const char *yysrc)
John Bauman66b8ab22014-05-06 15:57:45 -04001862{
1863 char *yyd = yydest;
1864 const char *yys = yysrc;
1865
1866 while ((*yyd++ = *yys++) != '\0')
1867 continue;
1868
1869 return yyd - 1;
1870}
1871# endif
1872# endif
1873
1874# ifndef yytnamerr
1875/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1876 quotes and backslashes, so that it's suitable for yyerror. The
1877 heuristic is that double-quoting is unnecessary unless the string
1878 contains an apostrophe, a comma, or backslash (other than
1879 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1880 null, do not copy; instead, return the length of what the result
1881 would have been. */
1882static YYSIZE_T
1883yytnamerr (char *yyres, const char *yystr)
1884{
1885 if (*yystr == '"')
1886 {
1887 YYSIZE_T yyn = 0;
1888 char const *yyp = yystr;
1889
1890 for (;;)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001891 switch (*++yyp)
1892 {
1893 case '\'':
1894 case ',':
1895 goto do_not_strip_quotes;
John Bauman66b8ab22014-05-06 15:57:45 -04001896
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001897 case '\\':
1898 if (*++yyp != '\\')
1899 goto do_not_strip_quotes;
1900 /* Fall through. */
1901 default:
1902 if (yyres)
1903 yyres[yyn] = *yyp;
1904 yyn++;
1905 break;
John Bauman66b8ab22014-05-06 15:57:45 -04001906
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001907 case '"':
1908 if (yyres)
1909 yyres[yyn] = '\0';
1910 return yyn;
1911 }
John Bauman66b8ab22014-05-06 15:57:45 -04001912 do_not_strip_quotes: ;
1913 }
1914
1915 if (! yyres)
1916 return yystrlen (yystr);
1917
1918 return yystpcpy (yyres, yystr) - yyres;
1919}
1920# endif
1921
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001922/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1923 about the unexpected token YYTOKEN for the state stack whose top is
1924 YYSSP.
1925
1926 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1927 not large enough to hold the message. In that case, also set
1928 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1929 required number of bytes is too large to store. */
1930static int
1931yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1932 yytype_int16 *yyssp, int yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04001933{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001934 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1935 YYSIZE_T yysize = yysize0;
1936 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1937 /* Internationalized format string. */
1938 const char *yyformat = YY_NULLPTR;
1939 /* Arguments of yyformat. */
1940 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1941 /* Number of reported tokens (one for the "unexpected", one per
1942 "expected"). */
1943 int yycount = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04001944
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001945 /* There are many possibilities here to consider:
1946 - If this state is a consistent state with a default action, then
1947 the only way this function was invoked is if the default action
1948 is an error action. In that case, don't check for expected
1949 tokens because there are none.
1950 - The only way there can be no lookahead present (in yychar) is if
1951 this state is a consistent state with a default action. Thus,
1952 detecting the absence of a lookahead is sufficient to determine
1953 that there is no unexpected or expected token to report. In that
1954 case, just report a simple "syntax error".
1955 - Don't assume there isn't a lookahead just because this state is a
1956 consistent state with a default action. There might have been a
1957 previous inconsistent state, consistent state with a non-default
1958 action, or user semantic action that manipulated yychar.
1959 - Of course, the expected token list depends on states to have
1960 correct lookahead information, and it depends on the parser not
1961 to perform extra reductions after fetching a lookahead from the
1962 scanner and before detecting a syntax error. Thus, state merging
1963 (from LALR or IELR) and default reductions corrupt the expected
1964 token list. However, the list is correct for canonical LR with
1965 one exception: it will still contain any token that will not be
1966 accepted due to an error action in a later state.
1967 */
1968 if (yytoken != YYEMPTY)
John Bauman66b8ab22014-05-06 15:57:45 -04001969 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001970 int yyn = yypact[*yyssp];
1971 yyarg[yycount++] = yytname[yytoken];
1972 if (!yypact_value_is_default (yyn))
1973 {
1974 /* Start YYX at -YYN if negative to avoid negative indexes in
1975 YYCHECK. In other words, skip the first -YYN actions for
1976 this state because they are default actions. */
1977 int yyxbegin = yyn < 0 ? -yyn : 0;
1978 /* Stay within bounds of both yycheck and yytname. */
1979 int yychecklim = YYLAST - yyn + 1;
1980 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1981 int yyx;
John Bauman66b8ab22014-05-06 15:57:45 -04001982
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001983 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1984 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1985 && !yytable_value_is_error (yytable[yyx + yyn]))
1986 {
1987 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1988 {
1989 yycount = 1;
1990 yysize = yysize0;
1991 break;
1992 }
1993 yyarg[yycount++] = yytname[yyx];
1994 {
1995 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1996 if (! (yysize <= yysize1
1997 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1998 return 2;
1999 yysize = yysize1;
2000 }
2001 }
2002 }
John Bauman66b8ab22014-05-06 15:57:45 -04002003 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002004
2005 switch (yycount)
2006 {
2007# define YYCASE_(N, S) \
2008 case N: \
2009 yyformat = S; \
2010 break
2011 YYCASE_(0, YY_("syntax error"));
2012 YYCASE_(1, YY_("syntax error, unexpected %s"));
2013 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2014 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2015 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2016 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2017# undef YYCASE_
2018 }
2019
2020 {
2021 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2022 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2023 return 2;
2024 yysize = yysize1;
2025 }
2026
2027 if (*yymsg_alloc < yysize)
2028 {
2029 *yymsg_alloc = 2 * yysize;
2030 if (! (yysize <= *yymsg_alloc
2031 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2032 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2033 return 1;
2034 }
2035
2036 /* Avoid sprintf, as that infringes on the user's name space.
2037 Don't have undefined behavior even if the translation
2038 produced a string with the wrong number of "%s"s. */
2039 {
2040 char *yyp = *yymsg;
2041 int yyi = 0;
2042 while ((*yyp = *yyformat) != '\0')
2043 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2044 {
2045 yyp += yytnamerr (yyp, yyarg[yyi++]);
2046 yyformat += 2;
2047 }
2048 else
2049 {
2050 yyp++;
2051 yyformat++;
2052 }
2053 }
2054 return 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002055}
2056#endif /* YYERROR_VERBOSE */
John Bauman66b8ab22014-05-06 15:57:45 -04002057
2058/*-----------------------------------------------.
2059| Release the memory associated to this symbol. |
2060`-----------------------------------------------*/
2061
John Bauman66b8ab22014-05-06 15:57:45 -04002062static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002063yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002064{
2065 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002066 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002067 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002068 YYUSE (yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002069 if (!yymsg)
2070 yymsg = "Deleting";
2071 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2072
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002073 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2074 YYUSE (yytype);
2075 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04002076}
2077
John Bauman66b8ab22014-05-06 15:57:45 -04002078
2079
2080
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002081/*----------.
2082| yyparse. |
2083`----------*/
John Bauman66b8ab22014-05-06 15:57:45 -04002084
John Bauman66b8ab22014-05-06 15:57:45 -04002085int
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002086yyparse (TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002087{
2088/* The lookahead symbol. */
2089int yychar;
2090
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002091
John Bauman66b8ab22014-05-06 15:57:45 -04002092/* The semantic value of the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002093/* Default value used for initialization, for pacifying older GCCs
2094 or non-GCC compilers. */
2095YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
2096YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
John Bauman66b8ab22014-05-06 15:57:45 -04002097
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002098/* Location data for the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002099static YYLTYPE yyloc_default
2100# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2101 = { 1, 1, 1, 1 }
2102# endif
2103;
2104YYLTYPE yylloc = yyloc_default;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002105
John Bauman66b8ab22014-05-06 15:57:45 -04002106 /* Number of syntax errors so far. */
2107 int yynerrs;
2108
2109 int yystate;
2110 /* Number of tokens to shift before error messages enabled. */
2111 int yyerrstatus;
2112
2113 /* The stacks and their tools:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002114 'yyss': related to states.
2115 'yyvs': related to semantic values.
2116 'yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002117
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002118 Refer to the stacks through separate pointers, to allow yyoverflow
John Bauman66b8ab22014-05-06 15:57:45 -04002119 to reallocate them elsewhere. */
2120
2121 /* The state stack. */
2122 yytype_int16 yyssa[YYINITDEPTH];
2123 yytype_int16 *yyss;
2124 yytype_int16 *yyssp;
2125
2126 /* The semantic value stack. */
2127 YYSTYPE yyvsa[YYINITDEPTH];
2128 YYSTYPE *yyvs;
2129 YYSTYPE *yyvsp;
2130
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002131 /* The location stack. */
2132 YYLTYPE yylsa[YYINITDEPTH];
2133 YYLTYPE *yyls;
2134 YYLTYPE *yylsp;
2135
2136 /* The locations where the error started and ended. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002137 YYLTYPE yyerror_range[3];
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002138
John Bauman66b8ab22014-05-06 15:57:45 -04002139 YYSIZE_T yystacksize;
2140
2141 int yyn;
2142 int yyresult;
2143 /* Lookahead token as an internal (translated) token number. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002144 int yytoken = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002145 /* The variables used to return semantic value and location from the
2146 action routines. */
2147 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002148 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002149
2150#if YYERROR_VERBOSE
2151 /* Buffer for error messages, and its allocated size. */
2152 char yymsgbuf[128];
2153 char *yymsg = yymsgbuf;
2154 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2155#endif
2156
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002157#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002158
2159 /* The number of symbols on the RHS of the reduced rule.
2160 Keep to zero when no symbol should be popped. */
2161 int yylen = 0;
2162
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002163 yyssp = yyss = yyssa;
2164 yyvsp = yyvs = yyvsa;
2165 yylsp = yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002166 yystacksize = YYINITDEPTH;
2167
2168 YYDPRINTF ((stderr, "Starting parse\n"));
2169
2170 yystate = 0;
2171 yyerrstatus = 0;
2172 yynerrs = 0;
2173 yychar = YYEMPTY; /* Cause a token to be read. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002174 yylsp[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002175 goto yysetstate;
2176
2177/*------------------------------------------------------------.
2178| yynewstate -- Push a new state, which is found in yystate. |
2179`------------------------------------------------------------*/
2180 yynewstate:
2181 /* In all cases, when you get here, the value and location stacks
2182 have just been pushed. So pushing a state here evens the stacks. */
2183 yyssp++;
2184
2185 yysetstate:
2186 *yyssp = yystate;
2187
2188 if (yyss + yystacksize - 1 <= yyssp)
2189 {
2190 /* Get the current used size of the three stacks, in elements. */
2191 YYSIZE_T yysize = yyssp - yyss + 1;
2192
2193#ifdef yyoverflow
2194 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002195 /* Give user a chance to reallocate the stack. Use copies of
2196 these so that the &'s don't force the real ones into
2197 memory. */
2198 YYSTYPE *yyvs1 = yyvs;
2199 yytype_int16 *yyss1 = yyss;
2200 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002201
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002202 /* Each stack pointer address is followed by the size of the
2203 data in use in that stack, in bytes. This used to be a
2204 conditional around just the two extra args, but that might
2205 be undefined if yyoverflow is a macro. */
2206 yyoverflow (YY_("memory exhausted"),
2207 &yyss1, yysize * sizeof (*yyssp),
2208 &yyvs1, yysize * sizeof (*yyvsp),
2209 &yyls1, yysize * sizeof (*yylsp),
2210 &yystacksize);
John Bauman66b8ab22014-05-06 15:57:45 -04002211
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002212 yyls = yyls1;
2213 yyss = yyss1;
2214 yyvs = yyvs1;
John Bauman66b8ab22014-05-06 15:57:45 -04002215 }
2216#else /* no yyoverflow */
2217# ifndef YYSTACK_RELOCATE
2218 goto yyexhaustedlab;
2219# else
2220 /* Extend the stack our own way. */
2221 if (YYMAXDEPTH <= yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002222 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002223 yystacksize *= 2;
2224 if (YYMAXDEPTH < yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002225 yystacksize = YYMAXDEPTH;
John Bauman66b8ab22014-05-06 15:57:45 -04002226
2227 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002228 yytype_int16 *yyss1 = yyss;
2229 union yyalloc *yyptr =
2230 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2231 if (! yyptr)
2232 goto yyexhaustedlab;
2233 YYSTACK_RELOCATE (yyss_alloc, yyss);
2234 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2235 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002236# undef YYSTACK_RELOCATE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002237 if (yyss1 != yyssa)
2238 YYSTACK_FREE (yyss1);
John Bauman66b8ab22014-05-06 15:57:45 -04002239 }
2240# endif
2241#endif /* no yyoverflow */
2242
2243 yyssp = yyss + yysize - 1;
2244 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002245 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002246
2247 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002248 (unsigned long int) yystacksize));
John Bauman66b8ab22014-05-06 15:57:45 -04002249
2250 if (yyss + yystacksize - 1 <= yyssp)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002251 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04002252 }
2253
2254 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2255
2256 if (yystate == YYFINAL)
2257 YYACCEPT;
2258
2259 goto yybackup;
2260
2261/*-----------.
2262| yybackup. |
2263`-----------*/
2264yybackup:
2265
2266 /* Do appropriate processing given the current state. Read a
2267 lookahead token if we need one and don't already have one. */
2268
2269 /* First try to decide what to do without reference to lookahead token. */
2270 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002271 if (yypact_value_is_default (yyn))
John Bauman66b8ab22014-05-06 15:57:45 -04002272 goto yydefault;
2273
2274 /* Not known => get a lookahead token if don't already have one. */
2275
2276 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2277 if (yychar == YYEMPTY)
2278 {
2279 YYDPRINTF ((stderr, "Reading a token: "));
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002280 yychar = yylex (&yylval, &yylloc, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002281 }
2282
2283 if (yychar <= YYEOF)
2284 {
2285 yychar = yytoken = YYEOF;
2286 YYDPRINTF ((stderr, "Now at end of input.\n"));
2287 }
2288 else
2289 {
2290 yytoken = YYTRANSLATE (yychar);
2291 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2292 }
2293
2294 /* If the proper action on seeing token YYTOKEN is to reduce or to
2295 detect an error, take that action. */
2296 yyn += yytoken;
2297 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2298 goto yydefault;
2299 yyn = yytable[yyn];
2300 if (yyn <= 0)
2301 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002302 if (yytable_value_is_error (yyn))
2303 goto yyerrlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002304 yyn = -yyn;
2305 goto yyreduce;
2306 }
2307
2308 /* Count tokens shifted since error; after three, turn off error
2309 status. */
2310 if (yyerrstatus)
2311 yyerrstatus--;
2312
2313 /* Shift the lookahead token. */
2314 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2315
2316 /* Discard the shifted token. */
2317 yychar = YYEMPTY;
2318
2319 yystate = yyn;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002320 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04002321 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002322 YY_IGNORE_MAYBE_UNINITIALIZED_END
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002323 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002324 goto yynewstate;
2325
2326
2327/*-----------------------------------------------------------.
2328| yydefault -- do the default action for the current state. |
2329`-----------------------------------------------------------*/
2330yydefault:
2331 yyn = yydefact[yystate];
2332 if (yyn == 0)
2333 goto yyerrlab;
2334 goto yyreduce;
2335
2336
2337/*-----------------------------.
2338| yyreduce -- Do a reduction. |
2339`-----------------------------*/
2340yyreduce:
2341 /* yyn is the number of a rule to reduce with. */
2342 yylen = yyr2[yyn];
2343
2344 /* If YYLEN is nonzero, implement the default value of the action:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002345 '$$ = $1'.
John Bauman66b8ab22014-05-06 15:57:45 -04002346
2347 Otherwise, the following line sets YYVAL to garbage.
2348 This behavior is undocumented and Bison
2349 users should not rely upon it. Assigning to YYVAL
2350 unconditionally makes the parser a bit smaller, and it avoids a
2351 GCC warning that YYVAL may be used uninitialized. */
2352 yyval = yyvsp[1-yylen];
2353
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002354 /* Default location. */
2355 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002356 YY_REDUCE_PRINT (yyn);
2357 switch (yyn)
2358 {
2359 case 2:
2360
2361 {
2362 // The symbol table search was done in the lexical phase
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002363 const TVariable *variable = context->getNamedVariable((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
John Bauman66b8ab22014-05-06 15:57:45 -04002364
2365 // don't delete $1.string, it's used by error recovery, and the pool
2366 // pop will reclaim the memory
2367
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002368 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002369 ConstantUnion* constArray = variable->getConstPointer();
2370 TType t(variable->getType());
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002371 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002372 } else
2373 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2374 variable->getName(),
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002375 variable->getType(), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002376 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002377
John Bauman66b8ab22014-05-06 15:57:45 -04002378 break;
2379
2380 case 3:
2381
2382 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002383 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002384 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002385
John Bauman66b8ab22014-05-06 15:57:45 -04002386 break;
2387
2388 case 4:
2389
2390 {
John Bauman66b8ab22014-05-06 15:57:45 -04002391 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002392 unionArray->setIConst((yyvsp[0].lex).i);
2393 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002394 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002395
John Bauman66b8ab22014-05-06 15:57:45 -04002396 break;
2397
2398 case 5:
2399
2400 {
2401 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002402 unionArray->setUConst((yyvsp[0].lex).u);
2403 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002404 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002405
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002406 break;
2407
2408 case 6:
2409
2410 {
2411 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002412 unionArray->setFConst((yyvsp[0].lex).f);
2413 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002414 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002415
John Bauman66b8ab22014-05-06 15:57:45 -04002416 break;
2417
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002418 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002419
2420 {
2421 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002422 unionArray->setBConst((yyvsp[0].lex).b);
2423 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002424 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002425
John Bauman66b8ab22014-05-06 15:57:45 -04002426 break;
2427
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002428 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002429
2430 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002431 (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002432 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002433
John Bauman66b8ab22014-05-06 15:57:45 -04002434 break;
2435
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002436 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002437
2438 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002439 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002440 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002441
John Bauman66b8ab22014-05-06 15:57:45 -04002442 break;
2443
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002444 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002445
2446 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002447 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04002448 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002449
John Bauman66b8ab22014-05-06 15:57:45 -04002450 break;
2451
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002452 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002453
2454 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002455 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002456 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002457
John Bauman66b8ab22014-05-06 15:57:45 -04002458 break;
2459
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002460 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002461
2462 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002463 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002464 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002465
John Bauman66b8ab22014-05-06 15:57:45 -04002466 break;
2467
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002468 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002469
2470 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002471 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002472 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002473
John Bauman66b8ab22014-05-06 15:57:45 -04002474 break;
2475
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002476 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002477
2478 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002479 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002480 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002481
John Bauman66b8ab22014-05-06 15:57:45 -04002482 break;
2483
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002484 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002485
2486 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002487 if (context->integerErrorCheck((yyvsp[0].interm.intermTypedNode), "[]"))
John Bauman66b8ab22014-05-06 15:57:45 -04002488 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002489 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002490 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002491
John Bauman66b8ab22014-05-06 15:57:45 -04002492 break;
2493
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002494 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002495
2496 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002497 bool fatalError = false;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002498 (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[0].interm).function, (yyvsp[0].interm).nodePair.node1, (yyvsp[0].interm).nodePair.node2, (yylsp[0]), &fatalError);
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002499 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002500 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002501 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002502 }
John Bauman66b8ab22014-05-06 15:57:45 -04002503 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002504
John Bauman66b8ab22014-05-06 15:57:45 -04002505 break;
2506
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002507 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002508
2509 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002510 (yyval.interm) = (yyvsp[0].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002511 (yyval.interm).nodePair.node2 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002512 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002513
John Bauman66b8ab22014-05-06 15:57:45 -04002514 break;
2515
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002516 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002517
2518 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002519 ES3_ONLY("", (yylsp[0]), "methods");
2520 (yyval.interm) = (yyvsp[0].interm);
2521 (yyval.interm).nodePair.node2 = (yyvsp[-2].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002522 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002523
John Bauman66b8ab22014-05-06 15:57:45 -04002524 break;
2525
John Bauman66b8ab22014-05-06 15:57:45 -04002526 case 19:
2527
2528 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002529 (yyval.interm) = (yyvsp[-1].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002530 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002531
John Bauman66b8ab22014-05-06 15:57:45 -04002532 break;
2533
2534 case 20:
2535
2536 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002537 (yyval.interm) = (yyvsp[-1].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002538 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002539
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002540 break;
2541
2542 case 21:
2543
2544 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002545 (yyval.interm).function = (yyvsp[-1].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002546 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002547 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002548
John Bauman66b8ab22014-05-06 15:57:45 -04002549 break;
2550
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002551 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002552
2553 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002554 (yyval.interm).function = (yyvsp[0].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002555 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002556 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002557
John Bauman66b8ab22014-05-06 15:57:45 -04002558 break;
2559
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002560 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002561
2562 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002563 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2564 (yyvsp[-1].interm.function)->addParameter(param);
2565 (yyval.interm).function = (yyvsp[-1].interm.function);
2566 (yyval.interm).nodePair.node1 = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002567 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002568
John Bauman66b8ab22014-05-06 15:57:45 -04002569 break;
2570
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002571 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002572
2573 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002574 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2575 (yyvsp[-2].interm).function->addParameter(param);
2576 (yyval.interm).function = (yyvsp[-2].interm).function;
2577 (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002578 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002579
John Bauman66b8ab22014-05-06 15:57:45 -04002580 break;
2581
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002582 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002583
2584 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002585 (yyval.interm.function) = (yyvsp[-1].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04002586 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002587
John Bauman66b8ab22014-05-06 15:57:45 -04002588 break;
2589
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002590 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002591
2592 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002593 if ((yyvsp[0].interm.type).array) {
2594 ES3_ONLY("[]", (yylsp[0]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002595 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002596 (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002597 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002598
John Bauman66b8ab22014-05-06 15:57:45 -04002599 break;
2600
John Bauman66b8ab22014-05-06 15:57:45 -04002601 case 27:
2602
2603 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002604 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002605 context->recover();
2606 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002607 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04002608 (yyval.interm.function) = function;
2609 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002610
John Bauman66b8ab22014-05-06 15:57:45 -04002611 break;
2612
2613 case 28:
2614
2615 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002616 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002617 context->recover();
2618 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002619 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002620 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002621 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002622
John Bauman66b8ab22014-05-06 15:57:45 -04002623 break;
2624
2625 case 29:
2626
2627 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002628 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002629 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002630
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002631 break;
2632
2633 case 30:
2634
2635 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002636 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002637 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002638
John Bauman66b8ab22014-05-06 15:57:45 -04002639 break;
2640
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002641 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002642
2643 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002644 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002645 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002646
John Bauman66b8ab22014-05-06 15:57:45 -04002647 break;
2648
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002649 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002650
2651 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002652 if ((yyvsp[-1].interm).op != EOpNull) {
2653 (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002654 } else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002655 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002656 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002657
John Bauman66b8ab22014-05-06 15:57:45 -04002658 break;
2659
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002660 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002661
Alexis Hetu253fdd12015-07-07 15:12:46 -04002662 { (yyval.interm).op = EOpNull; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002663
John Bauman66b8ab22014-05-06 15:57:45 -04002664 break;
2665
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002666 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002667
Alexis Hetu253fdd12015-07-07 15:12:46 -04002668 { (yyval.interm).op = EOpNegative; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002669
John Bauman66b8ab22014-05-06 15:57:45 -04002670 break;
2671
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002672 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002673
Alexis Hetu253fdd12015-07-07 15:12:46 -04002674 { (yyval.interm).op = EOpLogicalNot; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002675
John Bauman66b8ab22014-05-06 15:57:45 -04002676 break;
2677
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002678 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002679
Alexis Hetu17809052015-05-13 11:28:22 -04002680 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002681 ES3_ONLY("~", (yylsp[0]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002682 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002683 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002684
John Bauman66b8ab22014-05-06 15:57:45 -04002685 break;
2686
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002687 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002688
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002689 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2690
Alexis Hetu17809052015-05-13 11:28:22 -04002691 break;
2692
2693 case 38:
2694
John Bauman66b8ab22014-05-06 15:57:45 -04002695 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002696 FRAG_VERT_ONLY("*", (yylsp[-1]));
2697 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002698 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002699
John Bauman66b8ab22014-05-06 15:57:45 -04002700 break;
2701
Alexis Hetu17809052015-05-13 11:28:22 -04002702 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002703
2704 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002705 FRAG_VERT_ONLY("/", (yylsp[-1]));
2706 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002707 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002708
John Bauman66b8ab22014-05-06 15:57:45 -04002709 break;
2710
Alexis Hetu17809052015-05-13 11:28:22 -04002711 case 40:
2712
2713 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002714 FRAG_VERT_ONLY("%", (yylsp[-1]));
2715 ES3_ONLY("%", (yylsp[-1]), "integer modulus operator");
2716 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002717 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002718
Alexis Hetu17809052015-05-13 11:28:22 -04002719 break;
2720
2721 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002722
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002723 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2724
John Bauman66b8ab22014-05-06 15:57:45 -04002725 break;
2726
Alexis Hetu17809052015-05-13 11:28:22 -04002727 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002728
2729 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002730 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002731 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002732
John Bauman66b8ab22014-05-06 15:57:45 -04002733 break;
2734
Alexis Hetu17809052015-05-13 11:28:22 -04002735 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002736
2737 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002738 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002739 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002740
John Bauman66b8ab22014-05-06 15:57:45 -04002741 break;
2742
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002743 case 44:
2744
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002745 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2746
Alexis Hetu17809052015-05-13 11:28:22 -04002747 break;
2748
2749 case 45:
2750
2751 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002752 ES3_ONLY("<<", (yylsp[-1]), "bit-wise operator");
2753 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002754 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002755
Alexis Hetu17809052015-05-13 11:28:22 -04002756 break;
2757
2758 case 46:
2759
2760 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002761 ES3_ONLY(">>", (yylsp[-1]), "bit-wise operator");
2762 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002763 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002764
Alexis Hetu17809052015-05-13 11:28:22 -04002765 break;
2766
2767 case 47:
2768
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002769 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2770
Alexis Hetu17809052015-05-13 11:28:22 -04002771 break;
2772
2773 case 48:
2774
John Bauman66b8ab22014-05-06 15:57:45 -04002775 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002776 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002777 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002778
John Bauman66b8ab22014-05-06 15:57:45 -04002779 break;
2780
Alexis Hetu17809052015-05-13 11:28:22 -04002781 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002782
2783 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002784 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002785 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002786
John Bauman66b8ab22014-05-06 15:57:45 -04002787 break;
2788
Alexis Hetu17809052015-05-13 11:28:22 -04002789 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002790
2791 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002792 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002793 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002794
John Bauman66b8ab22014-05-06 15:57:45 -04002795 break;
2796
Alexis Hetu17809052015-05-13 11:28:22 -04002797 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002798
2799 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002800 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002801 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002802
John Bauman66b8ab22014-05-06 15:57:45 -04002803 break;
2804
Alexis Hetu17809052015-05-13 11:28:22 -04002805 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002806
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002807 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2808
John Bauman66b8ab22014-05-06 15:57:45 -04002809 break;
2810
Alexis Hetu17809052015-05-13 11:28:22 -04002811 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002812
2813 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002814 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002815 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002816
John Bauman66b8ab22014-05-06 15:57:45 -04002817 break;
2818
Alexis Hetu17809052015-05-13 11:28:22 -04002819 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002820
2821 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002822 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002823 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002824
John Bauman66b8ab22014-05-06 15:57:45 -04002825 break;
2826
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002827 case 55:
2828
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002829 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2830
Alexis Hetu17809052015-05-13 11:28:22 -04002831 break;
2832
2833 case 56:
2834
2835 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002836 ES3_ONLY("&", (yylsp[-1]), "bit-wise operator");
2837 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002838 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002839
Alexis Hetu17809052015-05-13 11:28:22 -04002840 break;
2841
2842 case 57:
2843
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002844 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2845
Alexis Hetu17809052015-05-13 11:28:22 -04002846 break;
2847
2848 case 58:
2849
2850 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002851 ES3_ONLY("^", (yylsp[-1]), "bit-wise operator");
2852 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002853 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002854
Alexis Hetu17809052015-05-13 11:28:22 -04002855 break;
2856
2857 case 59:
2858
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002859 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2860
Alexis Hetu17809052015-05-13 11:28:22 -04002861 break;
2862
2863 case 60:
2864
2865 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002866 ES3_ONLY("|", (yylsp[-1]), "bit-wise operator");
2867 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002868 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002869
Alexis Hetu17809052015-05-13 11:28:22 -04002870 break;
2871
2872 case 61:
2873
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002874 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2875
Alexis Hetu17809052015-05-13 11:28:22 -04002876 break;
2877
2878 case 62:
2879
John Bauman66b8ab22014-05-06 15:57:45 -04002880 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002881 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002882 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002883
John Bauman66b8ab22014-05-06 15:57:45 -04002884 break;
2885
Alexis Hetu17809052015-05-13 11:28:22 -04002886 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002887
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002888 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2889
John Bauman66b8ab22014-05-06 15:57:45 -04002890 break;
2891
Alexis Hetu17809052015-05-13 11:28:22 -04002892 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002893
2894 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002895 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002896 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002897
John Bauman66b8ab22014-05-06 15:57:45 -04002898 break;
2899
Alexis Hetu17809052015-05-13 11:28:22 -04002900 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04002901
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002902 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2903
John Bauman66b8ab22014-05-06 15:57:45 -04002904 break;
2905
Alexis Hetu17809052015-05-13 11:28:22 -04002906 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04002907
2908 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002909 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002910 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002911
John Bauman66b8ab22014-05-06 15:57:45 -04002912 break;
2913
Alexis Hetu17809052015-05-13 11:28:22 -04002914 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04002915
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002916 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2917
John Bauman66b8ab22014-05-06 15:57:45 -04002918 break;
2919
Alexis Hetu17809052015-05-13 11:28:22 -04002920 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04002921
2922 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002923 (yyval.interm.intermTypedNode) = context->addTernarySelection((yyvsp[-4].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-3]));
John Bauman66b8ab22014-05-06 15:57:45 -04002924 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002925
John Bauman66b8ab22014-05-06 15:57:45 -04002926 break;
2927
Alexis Hetu17809052015-05-13 11:28:22 -04002928 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04002929
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002930 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2931
John Bauman66b8ab22014-05-06 15:57:45 -04002932 break;
2933
Alexis Hetu17809052015-05-13 11:28:22 -04002934 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04002935
2936 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002937 if (context->lValueErrorCheck((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002938 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002939 (yyval.interm.intermTypedNode) = context->addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002940 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002941
John Bauman66b8ab22014-05-06 15:57:45 -04002942 break;
2943
Alexis Hetu17809052015-05-13 11:28:22 -04002944 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04002945
Alexis Hetu253fdd12015-07-07 15:12:46 -04002946 { (yyval.interm).op = EOpAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002947
John Bauman66b8ab22014-05-06 15:57:45 -04002948 break;
2949
Alexis Hetu17809052015-05-13 11:28:22 -04002950 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04002951
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002952 { FRAG_VERT_ONLY("*=", (yylsp[0])); (yyval.interm).op = EOpMulAssign; }
2953
John Bauman66b8ab22014-05-06 15:57:45 -04002954 break;
2955
Alexis Hetu17809052015-05-13 11:28:22 -04002956 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04002957
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002958 { FRAG_VERT_ONLY("/=", (yylsp[0])); (yyval.interm).op = EOpDivAssign; }
2959
John Bauman66b8ab22014-05-06 15:57:45 -04002960 break;
2961
Alexis Hetu17809052015-05-13 11:28:22 -04002962 case 74:
2963
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002964 { ES3_ONLY("%=", (yylsp[0]), "integer modulus operator");
2965 FRAG_VERT_ONLY("%=", (yylsp[0])); (yyval.interm).op = EOpIModAssign; }
2966
Alexis Hetu17809052015-05-13 11:28:22 -04002967 break;
2968
2969 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04002970
Alexis Hetu253fdd12015-07-07 15:12:46 -04002971 { (yyval.interm).op = EOpAddAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002972
John Bauman66b8ab22014-05-06 15:57:45 -04002973 break;
2974
Alexis Hetu17809052015-05-13 11:28:22 -04002975 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04002976
Alexis Hetu253fdd12015-07-07 15:12:46 -04002977 { (yyval.interm).op = EOpSubAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002978
John Bauman66b8ab22014-05-06 15:57:45 -04002979 break;
2980
Alexis Hetu17809052015-05-13 11:28:22 -04002981 case 77:
2982
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002983 { ES3_ONLY("<<=", (yylsp[0]), "bit-wise operator");
2984 FRAG_VERT_ONLY("<<=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002985 (yyval.interm).op = EOpBitShiftLeftAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002986
Alexis Hetu17809052015-05-13 11:28:22 -04002987 break;
2988
2989 case 78:
2990
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002991 { ES3_ONLY(">>=", (yylsp[0]), "bit-wise operator");
2992 FRAG_VERT_ONLY(">>=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002993 (yyval.interm).op = EOpBitShiftRightAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002994
Alexis Hetu17809052015-05-13 11:28:22 -04002995 break;
2996
2997 case 79:
2998
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002999 { ES3_ONLY("&=", (yylsp[0]), "bit-wise operator");
3000 FRAG_VERT_ONLY("&=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003001 (yyval.interm).op = EOpBitwiseAndAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003002
Alexis Hetu17809052015-05-13 11:28:22 -04003003 break;
3004
3005 case 80:
3006
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003007 { ES3_ONLY("^=", (yylsp[0]), "bit-wise operator");
3008 FRAG_VERT_ONLY("^=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003009 (yyval.interm).op = EOpBitwiseXorAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003010
Alexis Hetu17809052015-05-13 11:28:22 -04003011 break;
3012
3013 case 81:
3014
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003015 { ES3_ONLY("|=", (yylsp[0]), "bit-wise operator");
3016 FRAG_VERT_ONLY("|=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003017 (yyval.interm).op = EOpBitwiseOrAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003018
Alexis Hetu17809052015-05-13 11:28:22 -04003019 break;
3020
3021 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003022
3023 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003024 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003025 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003026
John Bauman66b8ab22014-05-06 15:57:45 -04003027 break;
3028
Alexis Hetu17809052015-05-13 11:28:22 -04003029 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003030
3031 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003032 (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003033 if ((yyval.interm.intermTypedNode) == 0) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003034 context->binaryOpError((yylsp[-1]), ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003035 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003036 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003037 }
3038 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003039
John Bauman66b8ab22014-05-06 15:57:45 -04003040 break;
3041
Alexis Hetu17809052015-05-13 11:28:22 -04003042 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003043
3044 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003045 if (context->constErrorCheck((yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003046 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003047 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003048 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003049
John Bauman66b8ab22014-05-06 15:57:45 -04003050 break;
3051
Alexis Hetu17809052015-05-13 11:28:22 -04003052 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003053
3054 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003055 if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003056 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003057 (yyval.lex) = (yyvsp[-1].lex);
Alexis Hetua35d8232015-06-11 17:11:06 -04003058 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003059
Alexis Hetua35d8232015-06-11 17:11:06 -04003060 break;
3061
3062 case 86:
3063
3064 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003065 (yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration(*((yyvsp[-1].interm).function), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003066 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003067
John Bauman66b8ab22014-05-06 15:57:45 -04003068 break;
3069
Alexis Hetua35d8232015-06-11 17:11:06 -04003070 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003071
3072 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003073 TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate;
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003074 if (aggNode && aggNode->getOp() == EOpNull)
3075 aggNode->setOp(EOpDeclaration);
3076 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003077 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003078
John Bauman66b8ab22014-05-06 15:57:45 -04003079 break;
3080
Alexis Hetua35d8232015-06-11 17:11:06 -04003081 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003082
3083 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003084 if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) {
3085 context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type));
John Baumand4ae8632014-05-06 16:18:33 -04003086 context->recover();
3087 }
John Bauman66b8ab22014-05-06 15:57:45 -04003088 (yyval.interm.intermNode) = 0;
3089 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003090
John Bauman66b8ab22014-05-06 15:57:45 -04003091 break;
3092
Alexis Hetua35d8232015-06-11 17:11:06 -04003093 case 89:
3094
3095 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003096 ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks");
3097 (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 Hetua35d8232015-06-11 17:11:06 -04003098 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003099
Alexis Hetua35d8232015-06-11 17:11:06 -04003100 break;
3101
3102 case 90:
3103
3104 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003105 ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks");
3106 (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 Hetua35d8232015-06-11 17:11:06 -04003107 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003108
Alexis Hetua35d8232015-06-11 17:11:06 -04003109 break;
3110
3111 case 91:
3112
3113 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003114 ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks");
3115 (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 Hetua35d8232015-06-11 17:11:06 -04003116 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003117
Alexis Hetua35d8232015-06-11 17:11:06 -04003118 break;
3119
3120 case 92:
3121
3122 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003123 context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type));
Alexis Hetua35d8232015-06-11 17:11:06 -04003124 (yyval.interm.intermNode) = 0;
3125 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003126
Alexis Hetua35d8232015-06-11 17:11:06 -04003127 break;
3128
3129 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003130
3131 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003132 (yyval.interm).function = context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function));
John Bauman66b8ab22014-05-06 15:57:45 -04003133 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003134
John Bauman66b8ab22014-05-06 15:57:45 -04003135 break;
3136
Alexis Hetua35d8232015-06-11 17:11:06 -04003137 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003138
3139 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003140 (yyval.interm.function) = (yyvsp[0].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003141 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003142
John Bauman66b8ab22014-05-06 15:57:45 -04003143 break;
3144
Alexis Hetua35d8232015-06-11 17:11:06 -04003145 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003146
3147 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003148 (yyval.interm.function) = (yyvsp[0].interm.function);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003149 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003150
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003151 break;
3152
Alexis Hetua35d8232015-06-11 17:11:06 -04003153 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003154
3155 {
John Bauman66b8ab22014-05-06 15:57:45 -04003156 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003157 (yyval.interm.function) = (yyvsp[-1].interm.function);
3158 if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
3159 (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003160 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003161 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003162 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003163
John Bauman66b8ab22014-05-06 15:57:45 -04003164 break;
3165
Alexis Hetua35d8232015-06-11 17:11:06 -04003166 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003167
3168 {
3169 //
3170 // Only first parameter of one-parameter functions can be void
3171 // The check for named parameters not being void is done in parameter_declarator
3172 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003173 if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
John Bauman66b8ab22014-05-06 15:57:45 -04003174 //
3175 // This parameter > first is void
3176 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003177 context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003178 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003179 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003180 } else {
3181 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003182 (yyval.interm.function) = (yyvsp[-2].interm.function);
3183 (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003184 }
3185 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003186
John Bauman66b8ab22014-05-06 15:57:45 -04003187 break;
3188
Alexis Hetua35d8232015-06-11 17:11:06 -04003189 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003190
3191 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003192 if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) {
3193 context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier));
John Bauman66b8ab22014-05-06 15:57:45 -04003194 context->recover();
3195 }
Alexis Hetu407813b2016-02-24 16:46:13 -05003196 if (!(yyvsp[-2].interm.type).layoutQualifier.isEmpty())
3197 {
3198 context->error((yylsp[-1]), "no qualifiers allowed for function return", "layout");
3199 context->recover();
3200 }
John Bauman66b8ab22014-05-06 15:57:45 -04003201 // make sure a sampler is not involved as well...
Alexis Hetu407813b2016-02-24 16:46:13 -05003202 if (context->samplerErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type), "samplers can't be function return values"))
John Bauman66b8ab22014-05-06 15:57:45 -04003203 context->recover();
3204
3205 // Add the function as a prototype after parsing it (we do not support recursion)
3206 TFunction *function;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003207 TType type((yyvsp[-2].interm.type));
3208 function = new TFunction((yyvsp[-1].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04003209 (yyval.interm.function) = function;
3210
3211 context->symbolTable.push();
3212 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003213
John Bauman66b8ab22014-05-06 15:57:45 -04003214 break;
3215
Alexis Hetua35d8232015-06-11 17:11:06 -04003216 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003217
3218 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003219 if ((yyvsp[-1].interm.type).type == EbtVoid) {
3220 context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003221 context->recover();
3222 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003223 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003224 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003225 TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003226 (yyval.interm).param = param;
3227 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003228
John Bauman66b8ab22014-05-06 15:57:45 -04003229 break;
3230
Alexis Hetua35d8232015-06-11 17:11:06 -04003231 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003232
3233 {
3234 // Check that we can make an array out of this type
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003235 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003236 context->recover();
3237
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003238 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003239 context->recover();
3240
3241 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003242 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003243 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003244 (yyvsp[-4].interm.type).setArray(true, size);
John Bauman66b8ab22014-05-06 15:57:45 -04003245
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003246 TType* type = new TType((yyvsp[-4].interm.type));
3247 TParameter param = { (yyvsp[-3].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003248 (yyval.interm).param = param;
3249 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003250
John Bauman66b8ab22014-05-06 15:57:45 -04003251 break;
3252
Alexis Hetu17809052015-05-13 11:28:22 -04003253 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003254
3255 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003256 (yyval.interm) = (yyvsp[0].interm);
3257 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003258 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003259 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003260
John Bauman66b8ab22014-05-06 15:57:45 -04003261 break;
3262
Alexis Hetu17809052015-05-13 11:28:22 -04003263 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003264
3265 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003266 (yyval.interm) = (yyvsp[0].interm);
3267 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003268 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003269 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003270 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003271 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003272
John Bauman66b8ab22014-05-06 15:57:45 -04003273 break;
3274
Alexis Hetu17809052015-05-13 11:28:22 -04003275 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003276
3277 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003278 (yyval.interm) = (yyvsp[0].interm);
3279 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003280 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003281 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003282
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003283 break;
3284
Alexis Hetu17809052015-05-13 11:28:22 -04003285 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003286
3287 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003288 (yyval.interm) = (yyvsp[0].interm);
3289 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003290 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003291 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003292 context->recover();
3293 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003294
Alexis Hetua35d8232015-06-11 17:11:06 -04003295 break;
3296
3297 case 105:
3298
3299 {
3300 (yyval.interm.qualifier) = EvqIn;
3301 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003302
Alexis Hetua35d8232015-06-11 17:11:06 -04003303 break;
3304
3305 case 106:
3306
3307 {
3308 (yyval.interm.qualifier) = EvqIn;
3309 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003310
Alexis Hetua35d8232015-06-11 17:11:06 -04003311 break;
3312
3313 case 107:
3314
3315 {
3316 (yyval.interm.qualifier) = EvqOut;
3317 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003318
Alexis Hetua35d8232015-06-11 17:11:06 -04003319 break;
3320
3321 case 108:
3322
3323 {
3324 (yyval.interm.qualifier) = EvqInOut;
3325 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003326
Alexis Hetua35d8232015-06-11 17:11:06 -04003327 break;
3328
3329 case 109:
3330
3331 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003332 TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
John Bauman66b8ab22014-05-06 15:57:45 -04003333 (yyval.interm).param = param;
3334 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003335
John Bauman66b8ab22014-05-06 15:57:45 -04003336 break;
3337
Alexis Hetua35d8232015-06-11 17:11:06 -04003338 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003339
3340 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003341 (yyval.interm) = (yyvsp[0].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04003342 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003343
John Bauman66b8ab22014-05-06 15:57:45 -04003344 break;
3345
Alexis Hetua35d8232015-06-11 17:11:06 -04003346 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003347
3348 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003349 (yyval.interm) = (yyvsp[-2].interm);
3350 (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yylsp[0]), *(yyvsp[0].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003351 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003352
John Bauman66b8ab22014-05-06 15:57:45 -04003353 break;
3354
Alexis Hetua35d8232015-06-11 17:11:06 -04003355 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003356
3357 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003358 (yyval.interm) = (yyvsp[-5].interm);
3359 (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 Bauman66b8ab22014-05-06 15:57:45 -04003360 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003361
John Bauman66b8ab22014-05-06 15:57:45 -04003362 break;
3363
Alexis Hetua35d8232015-06-11 17:11:06 -04003364 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003365
3366 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003367 ES3_ONLY("[]", (yylsp[-4]), "implicitly sized array");
3368 (yyval.interm) = (yyvsp[-6].interm);
3369 (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 Bauman66b8ab22014-05-06 15:57:45 -04003370 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003371
John Bauman66b8ab22014-05-06 15:57:45 -04003372 break;
3373
Alexis Hetua35d8232015-06-11 17:11:06 -04003374 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003375
3376 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003377 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3378 (yyval.interm) = (yyvsp[-7].interm);
3379 (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 Bauman66b8ab22014-05-06 15:57:45 -04003380 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003381
John Bauman66b8ab22014-05-06 15:57:45 -04003382 break;
3383
Alexis Hetua35d8232015-06-11 17:11:06 -04003384 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003385
3386 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003387 (yyval.interm) = (yyvsp[-4].interm);
3388 (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 Bauman66b8ab22014-05-06 15:57:45 -04003389 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003390
John Bauman66b8ab22014-05-06 15:57:45 -04003391 break;
3392
Alexis Hetua35d8232015-06-11 17:11:06 -04003393 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003394
3395 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003396 (yyval.interm).type = (yyvsp[0].interm.type);
3397 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003398 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003399
John Bauman66b8ab22014-05-06 15:57:45 -04003400 break;
3401
Alexis Hetua35d8232015-06-11 17:11:06 -04003402 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003403
3404 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003405 (yyval.interm).type = (yyvsp[-1].interm.type);
3406 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003407 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003408
John Bauman66b8ab22014-05-06 15:57:45 -04003409 break;
3410
Alexis Hetua35d8232015-06-11 17:11:06 -04003411 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003412
3413 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003414 (yyval.interm).type = (yyvsp[-4].interm.type);
3415 (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003416 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003417
John Bauman66b8ab22014-05-06 15:57:45 -04003418 break;
3419
Alexis Hetua35d8232015-06-11 17:11:06 -04003420 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003421
3422 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003423 ES3_ONLY("[]", (yylsp[-3]), "implicitly sized array");
3424 (yyval.interm).type = (yyvsp[-5].interm.type);
3425 (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003426 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003427
John Bauman66b8ab22014-05-06 15:57:45 -04003428 break;
3429
Alexis Hetua35d8232015-06-11 17:11:06 -04003430 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003431
3432 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003433 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3434 (yyval.interm).type = (yyvsp[-6].interm.type);
3435 (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 Bauman66b8ab22014-05-06 15:57:45 -04003436 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003437
John Bauman66b8ab22014-05-06 15:57:45 -04003438 break;
3439
Alexis Hetua35d8232015-06-11 17:11:06 -04003440 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003441
3442 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003443 (yyval.interm).type = (yyvsp[-3].interm.type);
3444 (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003445 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003446
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003447 break;
3448
Alexis Hetua35d8232015-06-11 17:11:06 -04003449 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003450
3451 {
3452 // $$.type is not used in invariant declarations.
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003453 (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003454 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003455
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003456 break;
3457
Alexis Hetua35d8232015-06-11 17:11:06 -04003458 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003459
3460 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003461 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003462
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003463 if ((yyvsp[0].interm.type).array) {
3464 ES3_ONLY("[]", (yylsp[0]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003465 if (context->getShaderVersion() != 300) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003466 (yyvsp[0].interm.type).clearArrayness();
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003467 }
John Bauman66b8ab22014-05-06 15:57:45 -04003468 }
3469 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003470
John Bauman66b8ab22014-05-06 15:57:45 -04003471 break;
3472
Alexis Hetua35d8232015-06-11 17:11:06 -04003473 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003474
3475 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003476 (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 Bauman66b8ab22014-05-06 15:57:45 -04003477 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003478
John Bauman66b8ab22014-05-06 15:57:45 -04003479 break;
3480
Alexis Hetua35d8232015-06-11 17:11:06 -04003481 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003482
3483 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003484 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003485 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003486
John Bauman66b8ab22014-05-06 15:57:45 -04003487 break;
3488
Alexis Hetua35d8232015-06-11 17:11:06 -04003489 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003490
3491 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003492 (yyval.interm.type).qualifier = EvqFlat;
3493 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003494
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003495 break;
3496
Alexis Hetua35d8232015-06-11 17:11:06 -04003497 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003498
3499 {
3500 (yyval.interm.qualifier) = EvqConstReadOnly;
3501 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003502
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003503 break;
3504
Alexis Hetua35d8232015-06-11 17:11:06 -04003505 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003506
3507 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003508 VERTEX_ONLY("attribute", (yylsp[0]));
3509 ES2_ONLY("attribute", (yylsp[0]));
3510 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003511 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003512 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003513 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003514
John Bauman66b8ab22014-05-06 15:57:45 -04003515 break;
3516
Alexis Hetua35d8232015-06-11 17:11:06 -04003517 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003518
3519 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003520 ES2_ONLY("varying", (yylsp[0]));
3521 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003522 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003523 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003524 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003525 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003526 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003527 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003528
John Bauman66b8ab22014-05-06 15:57:45 -04003529 break;
3530
Alexis Hetua35d8232015-06-11 17:11:06 -04003531 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003532
3533 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003534 ES2_ONLY("varying", (yylsp[-1]));
3535 if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003536 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003537 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003538 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003539 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003540 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003541 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003542
John Bauman66b8ab22014-05-06 15:57:45 -04003543 break;
3544
Alexis Hetua35d8232015-06-11 17:11:06 -04003545 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003546
3547 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003548 if ((yyvsp[0].interm.type).qualifier != EvqConstExpr && !context->symbolTable.atGlobalLevel())
3549 {
3550 context->error((yylsp[0]), "Local variables can only use the const storage qualifier.", getQualifierString((yyvsp[0].interm.type).qualifier));
3551 context->recover();
3552 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003553 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003554 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003555
John Bauman66b8ab22014-05-06 15:57:45 -04003556 break;
3557
Alexis Hetua35d8232015-06-11 17:11:06 -04003558 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003559
3560 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003561 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier);
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003562 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003563
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003564 break;
3565
Alexis Hetua35d8232015-06-11 17:11:06 -04003566 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003567
3568 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003569 context->error((yylsp[0]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getQualifierString((yyvsp[0].interm.type).qualifier));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003570 context->recover();
3571
3572 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003573 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003574 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003575
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003576 break;
3577
Alexis Hetua35d8232015-06-11 17:11:06 -04003578 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003579
3580 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003581 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003582 (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003583 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003584
Nicolas Capens7d626792015-02-17 17:58:31 -05003585 break;
3586
Alexis Hetua35d8232015-06-11 17:11:06 -04003587 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003588
3589 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003590 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
3591 (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003592 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003593
Nicolas Capens7d626792015-02-17 17:58:31 -05003594 break;
3595
Alexis Hetua35d8232015-06-11 17:11:06 -04003596 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003597
3598 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003599 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-1]));
3600 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003601 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003602 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003603
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003604 break;
3605
Alexis Hetua35d8232015-06-11 17:11:06 -04003606 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003607
3608 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003609 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-2]));
3610 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier);
Alexis Hetuad527752015-07-07 13:31:44 -04003611 (yyval.interm.type).invariant = true;
3612 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003613
Alexis Hetuad527752015-07-07 13:31:44 -04003614 break;
3615
3616 case 138:
3617
3618 {
3619 (yyval.interm.type).qualifier = EvqConstExpr;
3620 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003621
Alexis Hetuad527752015-07-07 13:31:44 -04003622 break;
3623
3624 case 139:
3625
3626 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003627 ES3_ONLY("in", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003628 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003629 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003630
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003631 break;
3632
Alexis Hetuad527752015-07-07 13:31:44 -04003633 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003634
3635 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003636 ES3_ONLY("out", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003637 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003638 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003639
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003640 break;
3641
Alexis Hetuad527752015-07-07 13:31:44 -04003642 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003643
3644 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003645 ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003646 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003647 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003648 context->error((yylsp[-1]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003649 context->recover();
3650 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003651 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003652 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003653
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003654 break;
3655
Alexis Hetuad527752015-07-07 13:31:44 -04003656 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003657
3658 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003659 ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003660 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003661 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003662 context->error((yylsp[-1]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003663 context->recover();
3664 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003665 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003666 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003667
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003668 break;
3669
Alexis Hetuad527752015-07-07 13:31:44 -04003670 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003671
3672 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003673 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003674 context->recover();
3675 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003676 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003677
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003678 break;
3679
Alexis Hetuad527752015-07-07 13:31:44 -04003680 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003681
3682 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003683 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003684
3685 if ((yyval.interm.type).precision == EbpUndefined) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003686 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type);
3687 if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003688 context->recover();
3689 }
3690 }
3691 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003692
John Bauman66b8ab22014-05-06 15:57:45 -04003693 break;
3694
Alexis Hetuad527752015-07-07 13:31:44 -04003695 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003696
3697 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003698 (yyval.interm.type) = (yyvsp[0].interm.type);
3699 (yyval.interm.type).precision = (yyvsp[-1].interm.precision);
Alexis Hetu407813b2016-02-24 16:46:13 -05003700
3701 if (!SupportsPrecision((yyvsp[0].interm.type).type)) {
3702 context->error((yylsp[-1]), "illegal type for precision qualifier", getBasicString((yyvsp[0].interm.type).type));
3703 context->recover();
3704 }
John Bauman66b8ab22014-05-06 15:57:45 -04003705 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003706
John Bauman66b8ab22014-05-06 15:57:45 -04003707 break;
3708
Alexis Hetuad527752015-07-07 13:31:44 -04003709 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003710
3711 {
3712 (yyval.interm.precision) = EbpHigh;
3713 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003714
John Bauman66b8ab22014-05-06 15:57:45 -04003715 break;
3716
Alexis Hetuad527752015-07-07 13:31:44 -04003717 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003718
3719 {
3720 (yyval.interm.precision) = EbpMedium;
3721 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003722
John Bauman66b8ab22014-05-06 15:57:45 -04003723 break;
3724
Alexis Hetuad527752015-07-07 13:31:44 -04003725 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003726
3727 {
3728 (yyval.interm.precision) = EbpLow;
3729 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003730
John Bauman66b8ab22014-05-06 15:57:45 -04003731 break;
3732
Alexis Hetuad527752015-07-07 13:31:44 -04003733 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003734
3735 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003736 ES3_ONLY("layout", (yylsp[-3]), "qualifier");
3737 (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003738 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003739
Nicolas Capens7d626792015-02-17 17:58:31 -05003740 break;
3741
Alexis Hetuad527752015-07-07 13:31:44 -04003742 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003743
3744 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003745 (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003746 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003747
Nicolas Capens7d626792015-02-17 17:58:31 -05003748 break;
3749
Alexis Hetuad527752015-07-07 13:31:44 -04003750 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003751
3752 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003753 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier));
Nicolas Capens7d626792015-02-17 17:58:31 -05003754 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003755
Nicolas Capens7d626792015-02-17 17:58:31 -05003756 break;
3757
Alexis Hetuad527752015-07-07 13:31:44 -04003758 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003759
3760 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003761 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003762 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003763
Nicolas Capens7d626792015-02-17 17:58:31 -05003764 break;
3765
Alexis Hetua35d8232015-06-11 17:11:06 -04003766 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003767
3768 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003769 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003770 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003771
Alexis Hetuad527752015-07-07 13:31:44 -04003772 break;
3773
3774 case 154:
3775
3776 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003777 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003778 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003779
Alexis Hetuad527752015-07-07 13:31:44 -04003780 break;
3781
3782 case 155:
3783
3784 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003785 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003786 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003787
John Bauman66b8ab22014-05-06 15:57:45 -04003788 break;
3789
Alexis Hetuad527752015-07-07 13:31:44 -04003790 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003791
3792 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003793 ES3_ONLY("[]", (yylsp[-1]), "implicitly sized array");
3794 (yyval.interm.type) = (yyvsp[-2].interm.type);
Alexis Hetue5246692015-06-18 12:34:52 -04003795 (yyval.interm.type).setArray(true, 0);
3796 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003797
Alexis Hetue5246692015-06-18 12:34:52 -04003798 break;
3799
Alexis Hetuad527752015-07-07 13:31:44 -04003800 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003801
3802 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003803 (yyval.interm.type) = (yyvsp[-3].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003804
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003805 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003806 context->recover();
3807 else {
3808 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003809 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003810 context->recover();
3811 (yyval.interm.type).setArray(true, size);
3812 }
3813 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003814
John Bauman66b8ab22014-05-06 15:57:45 -04003815 break;
3816
Alexis Hetuad527752015-07-07 13:31:44 -04003817 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003818
3819 {
3820 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003821 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003822 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003823
Alexis Hetu17809052015-05-13 11:28:22 -04003824 break;
3825
Alexis Hetu17809052015-05-13 11:28:22 -04003826 case 159:
3827
3828 {
3829 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003830 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003831 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003832
Alexis Hetu17809052015-05-13 11:28:22 -04003833 break;
3834
3835 case 160:
3836
3837 {
3838 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003839 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003840 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003841
Alexis Hetua35d8232015-06-11 17:11:06 -04003842 break;
3843
3844 case 161:
3845
3846 {
3847 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003848 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003849 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003850
Alexis Hetua35d8232015-06-11 17:11:06 -04003851 break;
3852
3853 case 162:
3854
3855 {
3856 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003857 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003858 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003859
Alexis Hetua35d8232015-06-11 17:11:06 -04003860 break;
3861
3862 case 163:
3863
3864 {
3865 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003866 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003867 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003868 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003869
Alexis Hetua35d8232015-06-11 17:11:06 -04003870 break;
3871
3872 case 164:
3873
3874 {
3875 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003876 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003877 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003878 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003879
Alexis Hetua35d8232015-06-11 17:11:06 -04003880 break;
3881
3882 case 165:
3883
3884 {
3885 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003886 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003887 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003888 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003889
Alexis Hetu17809052015-05-13 11:28:22 -04003890 break;
3891
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003892 case 166:
3893
3894 {
3895 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003896 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003897 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003898 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003899
Alexis Hetua35d8232015-06-11 17:11:06 -04003900 break;
3901
3902 case 167:
3903
3904 {
3905 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003906 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003907 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003908 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003909
Alexis Hetua35d8232015-06-11 17:11:06 -04003910 break;
3911
3912 case 168:
3913
3914 {
3915 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003916 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003917 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003918 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003919
Alexis Hetua35d8232015-06-11 17:11:06 -04003920 break;
3921
3922 case 169:
3923
3924 {
3925 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003926 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003927 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003928 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003929
Alexis Hetua35d8232015-06-11 17:11:06 -04003930 break;
3931
3932 case 170:
3933
3934 {
3935 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003936 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003937 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003938 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003939
Alexis Hetua35d8232015-06-11 17:11:06 -04003940 break;
3941
3942 case 171:
3943
3944 {
3945 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003946 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003947 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003948 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003949
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003950 break;
3951
Alexis Hetua35d8232015-06-11 17:11:06 -04003952 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003953
3954 {
Alexis Hetue5246692015-06-18 12:34:52 -04003955 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003956 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003957 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04003958 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003959
Alexis Hetue5246692015-06-18 12:34:52 -04003960 break;
3961
3962 case 173:
3963
3964 {
Alexis Hetuad527752015-07-07 13:31:44 -04003965 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003966 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003967 (yyval.interm.type).setAggregate(3);
3968 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003969
Alexis Hetuad527752015-07-07 13:31:44 -04003970 break;
3971
3972 case 174:
3973
3974 {
3975 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003976 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003977 (yyval.interm.type).setAggregate(4);
3978 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003979
Alexis Hetuad527752015-07-07 13:31:44 -04003980 break;
3981
3982 case 175:
3983
3984 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003985 FRAG_VERT_ONLY("mat2", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003986 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003987 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04003988 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04003989 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003990
John Bauman66b8ab22014-05-06 15:57:45 -04003991 break;
3992
Alexis Hetuad527752015-07-07 13:31:44 -04003993 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04003994
3995 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003996 FRAG_VERT_ONLY("mat3", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003997 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003998 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04003999 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004000 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004001
John Bauman66b8ab22014-05-06 15:57:45 -04004002 break;
4003
Alexis Hetuad527752015-07-07 13:31:44 -04004004 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004005
4006 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004007 FRAG_VERT_ONLY("mat4", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004008 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004009 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004010 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004011 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004012
John Bauman66b8ab22014-05-06 15:57:45 -04004013 break;
4014
Alexis Hetuad527752015-07-07 13:31:44 -04004015 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004016
4017 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004018 FRAG_VERT_ONLY("mat2x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004019 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004020 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004021 (yyval.interm.type).setMatrix(2, 3);
4022 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004023
Alexis Hetub14178b2015-04-13 13:23:20 -04004024 break;
4025
Alexis Hetuad527752015-07-07 13:31:44 -04004026 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004027
4028 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004029 FRAG_VERT_ONLY("mat3x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004030 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004031 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004032 (yyval.interm.type).setMatrix(3, 2);
4033 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004034
Alexis Hetub14178b2015-04-13 13:23:20 -04004035 break;
4036
Alexis Hetuad527752015-07-07 13:31:44 -04004037 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004038
4039 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004040 FRAG_VERT_ONLY("mat2x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004041 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004042 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004043 (yyval.interm.type).setMatrix(2, 4);
4044 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004045
Alexis Hetub14178b2015-04-13 13:23:20 -04004046 break;
4047
Alexis Hetuad527752015-07-07 13:31:44 -04004048 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004049
4050 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004051 FRAG_VERT_ONLY("mat4x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004052 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004053 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004054 (yyval.interm.type).setMatrix(4, 2);
4055 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004056
Alexis Hetub14178b2015-04-13 13:23:20 -04004057 break;
4058
Alexis Hetuad527752015-07-07 13:31:44 -04004059 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004060
4061 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004062 FRAG_VERT_ONLY("mat3x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004063 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004064 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004065 (yyval.interm.type).setMatrix(3, 4);
4066 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004067
Alexis Hetub14178b2015-04-13 13:23:20 -04004068 break;
4069
Alexis Hetuad527752015-07-07 13:31:44 -04004070 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004071
4072 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004073 FRAG_VERT_ONLY("mat4x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004074 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004075 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004076 (yyval.interm.type).setMatrix(4, 3);
4077 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004078
Alexis Hetub14178b2015-04-13 13:23:20 -04004079 break;
4080
Alexis Hetuad527752015-07-07 13:31:44 -04004081 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004082
4083 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004084 FRAG_VERT_ONLY("sampler2D", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004085 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004086 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004087 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004088
John Bauman66b8ab22014-05-06 15:57:45 -04004089 break;
4090
Alexis Hetuad527752015-07-07 13:31:44 -04004091 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004092
4093 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004094 FRAG_VERT_ONLY("samplerCube", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004095 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004096 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004097 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004098
John Bauman66b8ab22014-05-06 15:57:45 -04004099 break;
4100
Alexis Hetuad527752015-07-07 13:31:44 -04004101 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004102
4103 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004104 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004105 context->error((yylsp[0]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004106 context->recover();
4107 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004108 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004109 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004110 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004111 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004112
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004113 break;
4114
Alexis Hetuad527752015-07-07 13:31:44 -04004115 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004116
4117 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004118 FRAG_VERT_ONLY("sampler3D", (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004119 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004120 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004121 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004122
Alexis Hetub027aa92015-01-19 15:56:12 -05004123 break;
4124
Alexis Hetuad527752015-07-07 13:31:44 -04004125 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004126
4127 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004128 FRAG_VERT_ONLY("sampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004129 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004130 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004131 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004132
Alexis Hetub14178b2015-04-13 13:23:20 -04004133 break;
4134
Alexis Hetuad527752015-07-07 13:31:44 -04004135 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004136
4137 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004138 FRAG_VERT_ONLY("isampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004139 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004140 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004141 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004142
Alexis Hetub14178b2015-04-13 13:23:20 -04004143 break;
4144
Alexis Hetuad527752015-07-07 13:31:44 -04004145 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004146
4147 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004148 FRAG_VERT_ONLY("isampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004149 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004150 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004151 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004152
Alexis Hetub14178b2015-04-13 13:23:20 -04004153 break;
4154
Alexis Hetuad527752015-07-07 13:31:44 -04004155 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004156
4157 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004158 FRAG_VERT_ONLY("isamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004159 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004160 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004161 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004162
Alexis Hetub14178b2015-04-13 13:23:20 -04004163 break;
4164
Alexis Hetuad527752015-07-07 13:31:44 -04004165 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004166
4167 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004168 FRAG_VERT_ONLY("isampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004169 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004170 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004171 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004172
Alexis Hetub14178b2015-04-13 13:23:20 -04004173 break;
4174
Alexis Hetuad527752015-07-07 13:31:44 -04004175 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004176
4177 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004178 FRAG_VERT_ONLY("usampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004179 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004180 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004181 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004182
Alexis Hetub14178b2015-04-13 13:23:20 -04004183 break;
4184
Alexis Hetuad527752015-07-07 13:31:44 -04004185 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004186
4187 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004188 FRAG_VERT_ONLY("usampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004189 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004190 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004191 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004192
Alexis Hetub14178b2015-04-13 13:23:20 -04004193 break;
4194
Alexis Hetuad527752015-07-07 13:31:44 -04004195 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004196
4197 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004198 FRAG_VERT_ONLY("usamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004199 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004200 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004201 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004202
Alexis Hetub14178b2015-04-13 13:23:20 -04004203 break;
4204
Alexis Hetuad527752015-07-07 13:31:44 -04004205 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004206
4207 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004208 FRAG_VERT_ONLY("usampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004209 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004210 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004211 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004212
Alexis Hetub14178b2015-04-13 13:23:20 -04004213 break;
4214
Alexis Hetuad527752015-07-07 13:31:44 -04004215 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004216
4217 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004218 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004219 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004220 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004221 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004222
Alexis Hetub14178b2015-04-13 13:23:20 -04004223 break;
4224
Alexis Hetuad527752015-07-07 13:31:44 -04004225 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004226
4227 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004228 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004229 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004230 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004231 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004232
Alexis Hetub14178b2015-04-13 13:23:20 -04004233 break;
4234
Alexis Hetuad527752015-07-07 13:31:44 -04004235 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004236
4237 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004238 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004239 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004240 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004241 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004242
Alexis Hetub14178b2015-04-13 13:23:20 -04004243 break;
4244
Alexis Hetuad527752015-07-07 13:31:44 -04004245 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004246
4247 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004248 FRAG_VERT_ONLY("struct", (yylsp[0]));
4249 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04004250 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4251 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004252
John Bauman66b8ab22014-05-06 15:57:45 -04004253 break;
4254
Alexis Hetuad527752015-07-07 13:31:44 -04004255 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004256
4257 {
4258 //
4259 // This is for user defined type names. The lexical phase looked up the
4260 // type.
4261 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004262 TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType();
John Bauman66b8ab22014-05-06 15:57:45 -04004263 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004264 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004265 (yyval.interm.type).userDef = &structure;
4266 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004267
John Bauman66b8ab22014-05-06 15:57:45 -04004268 break;
4269
Alexis Hetuad527752015-07-07 13:31:44 -04004270 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004271
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004272 { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); }
4273
John Bauman66b8ab22014-05-06 15:57:45 -04004274 break;
4275
Alexis Hetuad527752015-07-07 13:31:44 -04004276 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004277
4278 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004279 (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004280 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004281
John Bauman66b8ab22014-05-06 15:57:45 -04004282 break;
4283
Alexis Hetuad527752015-07-07 13:31:44 -04004284 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004285
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004286 { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); }
4287
John Bauman66b8ab22014-05-06 15:57:45 -04004288 break;
4289
Alexis Hetuad527752015-07-07 13:31:44 -04004290 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004291
4292 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004293 (yyval.interm.type) = context->addStructure((yylsp[-4]), (yylsp[-4]), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004294 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004295
John Bauman66b8ab22014-05-06 15:57:45 -04004296 break;
4297
Alexis Hetuad527752015-07-07 13:31:44 -04004298 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004299
4300 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004301 (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004302 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004303
John Bauman66b8ab22014-05-06 15:57:45 -04004304 break;
4305
Alexis Hetuad527752015-07-07 13:31:44 -04004306 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004307
4308 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004309 (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList);
4310 for (unsigned int i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) {
4311 TField* field = (*(yyvsp[0].interm.fieldList))[i];
Alexis Hetua8b364b2015-06-10 11:48:40 -04004312 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4313 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004314 context->error((*(yyvsp[0].interm.fieldList))[i]->line(), "duplicate field name in structure:", "struct", field->name().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004315 context->recover();
4316 }
4317 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004318 (yyval.interm.fieldList)->push_back((*(yyvsp[0].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004319 }
4320 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004321
John Bauman66b8ab22014-05-06 15:57:45 -04004322 break;
4323
Alexis Hetuad527752015-07-07 13:31:44 -04004324 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004325
4326 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004327 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004328 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004329
John Bauman66b8ab22014-05-06 15:57:45 -04004330 break;
4331
Alexis Hetuad527752015-07-07 13:31:44 -04004332 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004333
4334 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004335 // ES3 Only, but errors should be handled elsewhere
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004336 (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier;
4337 (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier;
4338 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
Alexis Hetuad6b8752015-06-09 16:15:30 -04004339 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004340
Alexis Hetuad6b8752015-06-09 16:15:30 -04004341 break;
4342
Alexis Hetuad527752015-07-07 13:31:44 -04004343 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004344
4345 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004346 (yyval.interm.fieldList) = NewPoolTFieldList();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004347 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004348 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004349
John Bauman66b8ab22014-05-06 15:57:45 -04004350 break;
4351
Alexis Hetuad527752015-07-07 13:31:44 -04004352 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004353
4354 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004355 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004356 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004357
John Bauman66b8ab22014-05-06 15:57:45 -04004358 break;
4359
Alexis Hetuad527752015-07-07 13:31:44 -04004360 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004361
4362 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004363 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004364 context->recover();
4365
Alexis Hetua8b364b2015-06-10 11:48:40 -04004366 TType* type = new TType(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004367 (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004368 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004369
John Bauman66b8ab22014-05-06 15:57:45 -04004370 break;
4371
Alexis Hetuad527752015-07-07 13:31:44 -04004372 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004373
4374 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004375 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004376 context->recover();
4377
Alexis Hetua8b364b2015-06-10 11:48:40 -04004378 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004379 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004380 if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004381 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004382 type->setArraySize(size);
4383
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004384 (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3]));
John Bauman66b8ab22014-05-06 15:57:45 -04004385 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004386
John Bauman66b8ab22014-05-06 15:57:45 -04004387 break;
4388
Alexis Hetu17809052015-05-13 11:28:22 -04004389 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004390
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004391 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
4392
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004393 break;
4394
Alexis Hetu17809052015-05-13 11:28:22 -04004395 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004396
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004397 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4398
Alexis Hetuad6b8752015-06-09 16:15:30 -04004399 break;
4400
4401 case 216:
4402
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004403 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
4404
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004405 break;
4406
4407 case 217:
4408
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004409 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4410
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004411 break;
4412
4413 case 218:
4414
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004415 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4416
Alexis Hetua35d8232015-06-11 17:11:06 -04004417 break;
4418
4419 case 219:
4420
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004421 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4422
Alexis Hetua35d8232015-06-11 17:11:06 -04004423 break;
4424
4425 case 220:
4426
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004427 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4428
Alexis Hetua35d8232015-06-11 17:11:06 -04004429 break;
4430
4431 case 221:
4432
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004433 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
4434
Alexis Hetua35d8232015-06-11 17:11:06 -04004435 break;
4436
4437 case 222:
4438
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004439 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
4440
Alexis Hetua35d8232015-06-11 17:11:06 -04004441 break;
4442
4443 case 223:
4444
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004445 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4446
Alexis Hetu76a343a2015-06-04 17:21:22 -04004447 break;
4448
4449 case 224:
4450
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004451 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4452
Alexis Hetu76a343a2015-06-04 17:21:22 -04004453 break;
4454
4455 case 225:
4456
Alexis Hetuad527752015-07-07 13:31:44 -04004457 { (yyval.interm.intermAggregate) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004458
Alexis Hetue5246692015-06-18 12:34:52 -04004459 break;
4460
4461 case 226:
4462
Alexis Hetuad527752015-07-07 13:31:44 -04004463 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004464
Alexis Hetuad527752015-07-07 13:31:44 -04004465 break;
4466
4467 case 227:
4468
4469 { context->symbolTable.pop(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004470
Alexis Hetuad527752015-07-07 13:31:44 -04004471 break;
4472
4473 case 228:
4474
Nicolas Capens7d626792015-02-17 17:58:31 -05004475 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004476 if ((yyvsp[-2].interm.intermAggregate) != 0) {
4477 (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence);
4478 (yyvsp[-2].interm.intermAggregate)->setEndLine((yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004479 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004480 (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate);
Nicolas Capens7d626792015-02-17 17:58:31 -05004481 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004482
Nicolas Capens7d626792015-02-17 17:58:31 -05004483 break;
4484
Alexis Hetua35d8232015-06-11 17:11:06 -04004485 case 229:
4486
Alexis Hetu407813b2016-02-24 16:46:13 -05004487 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004488
Alexis Hetua35d8232015-06-11 17:11:06 -04004489 break;
4490
4491 case 230:
4492
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004493 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4494
Alexis Hetu76a343a2015-06-04 17:21:22 -04004495 break;
4496
4497 case 231:
4498
Alexis Hetue5246692015-06-18 12:34:52 -04004499 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004500
Alexis Hetu76a343a2015-06-04 17:21:22 -04004501 break;
4502
4503 case 232:
4504
Alexis Hetu407813b2016-02-24 16:46:13 -05004505 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004506
Alexis Hetue5246692015-06-18 12:34:52 -04004507 break;
4508
4509 case 233:
4510
Alexis Hetuad527752015-07-07 13:31:44 -04004511 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004512
Alexis Hetuad527752015-07-07 13:31:44 -04004513 break;
4514
4515 case 234:
4516
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004517 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4518
Alexis Hetuad527752015-07-07 13:31:44 -04004519 break;
4520
4521 case 235:
4522
John Bauman66b8ab22014-05-06 15:57:45 -04004523 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004524 (yyval.interm.intermAggregate) = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04004525 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004526
John Bauman66b8ab22014-05-06 15:57:45 -04004527 break;
4528
Alexis Hetuad527752015-07-07 13:31:44 -04004529 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004530
4531 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004532 if ((yyvsp[-1].interm.intermAggregate)) {
4533 (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence);
4534 (yyvsp[-1].interm.intermAggregate)->setEndLine((yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004535 }
Alexis Hetu407813b2016-02-24 16:46:13 -05004536 (yyval.interm.intermAggregate) = (yyvsp[-1].interm.intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004537 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004538
John Bauman66b8ab22014-05-06 15:57:45 -04004539 break;
4540
Alexis Hetuad527752015-07-07 13:31:44 -04004541 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004542
4543 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004544 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004545 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004546
John Bauman66b8ab22014-05-06 15:57:45 -04004547 break;
4548
Alexis Hetuad527752015-07-07 13:31:44 -04004549 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004550
4551 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004552 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004553 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004554
John Bauman66b8ab22014-05-06 15:57:45 -04004555 break;
4556
Alexis Hetuad527752015-07-07 13:31:44 -04004557 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004558
4559 { (yyval.interm.intermNode) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004560
John Bauman66b8ab22014-05-06 15:57:45 -04004561 break;
4562
Alexis Hetuad527752015-07-07 13:31:44 -04004563 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004564
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004565 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
4566
John Bauman66b8ab22014-05-06 15:57:45 -04004567 break;
4568
Alexis Hetuad527752015-07-07 13:31:44 -04004569 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004570
4571 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004572 if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004573 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004574 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
John Bauman66b8ab22014-05-06 15:57:45 -04004575 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004576
John Bauman66b8ab22014-05-06 15:57:45 -04004577 break;
4578
Alexis Hetuad527752015-07-07 13:31:44 -04004579 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004580
4581 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004582 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
4583 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004584 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004585
John Bauman66b8ab22014-05-06 15:57:45 -04004586 break;
4587
Alexis Hetuad527752015-07-07 13:31:44 -04004588 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004589
4590 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004591 (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004592 (yyval.interm.nodePair).node2 = 0;
4593 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004594
John Bauman66b8ab22014-05-06 15:57:45 -04004595 break;
4596
Alexis Hetuad527752015-07-07 13:31:44 -04004597 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004598
Alexis Hetue5246692015-06-18 12:34:52 -04004599 { context->incrSwitchNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004600
Alexis Hetu76a343a2015-06-04 17:21:22 -04004601 break;
4602
Alexis Hetuad527752015-07-07 13:31:44 -04004603 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004604
4605 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004606 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5]));
Alexis Hetue5246692015-06-18 12:34:52 -04004607 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004608 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004609
Alexis Hetu76a343a2015-06-04 17:21:22 -04004610 break;
4611
Alexis Hetuad527752015-07-07 13:31:44 -04004612 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004613
4614 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004615 (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004616 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004617
Alexis Hetu76a343a2015-06-04 17:21:22 -04004618 break;
4619
Alexis Hetuad527752015-07-07 13:31:44 -04004620 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004621
4622 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004623 (yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
Alexis Hetue5246692015-06-18 12:34:52 -04004624 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004625
Alexis Hetue5246692015-06-18 12:34:52 -04004626 break;
4627
Alexis Hetuad527752015-07-07 13:31:44 -04004628 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004629
4630 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004631 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
4632 if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004633 context->recover();
4634 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004635
John Bauman66b8ab22014-05-06 15:57:45 -04004636 break;
4637
Alexis Hetuad527752015-07-07 13:31:44 -04004638 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004639
4640 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004641 TIntermNode *intermNode;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004642 if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004643 context->recover();
4644
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004645 if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode))
4646 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004647 else {
4648 context->recover();
4649 (yyval.interm.intermTypedNode) = 0;
4650 }
4651 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004652
John Bauman66b8ab22014-05-06 15:57:45 -04004653 break;
4654
Alexis Hetuad527752015-07-07 13:31:44 -04004655 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004656
Alexis Hetu0a655842015-06-22 16:52:11 -04004657 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004658
John Bauman66b8ab22014-05-06 15:57:45 -04004659 break;
4660
Alexis Hetuad527752015-07-07 13:31:44 -04004661 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004662
4663 {
4664 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004665 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[0].interm.intermNode), (yylsp[-5]));
Alexis Hetu0a655842015-06-22 16:52:11 -04004666 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004667 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004668
John Bauman66b8ab22014-05-06 15:57:45 -04004669 break;
4670
Alexis Hetuad527752015-07-07 13:31:44 -04004671 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004672
Alexis Hetu0a655842015-06-22 16:52:11 -04004673 { context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004674
John Bauman66b8ab22014-05-06 15:57:45 -04004675 break;
4676
Alexis Hetuad527752015-07-07 13:31:44 -04004677 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004678
4679 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004680 if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004681 context->recover();
4682
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004683 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[-5].interm.intermNode), (yylsp[-4]));
Alexis Hetu0a655842015-06-22 16:52:11 -04004684 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004685 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004686
John Bauman66b8ab22014-05-06 15:57:45 -04004687 break;
4688
Alexis Hetuad527752015-07-07 13:31:44 -04004689 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004690
Alexis Hetu0a655842015-06-22 16:52:11 -04004691 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004692
Nicolas Capens3c20f802015-02-17 17:17:20 -05004693 break;
4694
Alexis Hetuad527752015-07-07 13:31:44 -04004695 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004696
4697 {
Alexis Hetue5246692015-06-18 12:34:52 -04004698 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004699 (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 Hetu0a655842015-06-22 16:52:11 -04004700 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004701 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004702
Alexis Hetu17809052015-05-13 11:28:22 -04004703 break;
4704
Alexis Hetu76a343a2015-06-04 17:21:22 -04004705 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004706
4707 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004708 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004709 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004710
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004711 break;
4712
Alexis Hetu76a343a2015-06-04 17:21:22 -04004713 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004714
4715 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004716 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004717 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004718
Alexis Hetue5246692015-06-18 12:34:52 -04004719 break;
4720
4721 case 258:
4722
4723 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004724 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004725 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004726
Alexis Hetuad527752015-07-07 13:31:44 -04004727 break;
4728
4729 case 259:
4730
4731 {
4732 (yyval.interm.intermTypedNode) = 0;
4733 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004734
Alexis Hetuad527752015-07-07 13:31:44 -04004735 break;
4736
4737 case 260:
4738
4739 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004740 (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004741 (yyval.interm.nodePair).node2 = 0;
4742 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004743
Alexis Hetu17809052015-05-13 11:28:22 -04004744 break;
4745
Alexis Hetuad527752015-07-07 13:31:44 -04004746 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004747
4748 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004749 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
4750 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004751 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004752
Alexis Hetu17809052015-05-13 11:28:22 -04004753 break;
4754
Alexis Hetuad527752015-07-07 13:31:44 -04004755 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004756
4757 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004758 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004759 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004760
Alexis Hetu17809052015-05-13 11:28:22 -04004761 break;
4762
Alexis Hetuad527752015-07-07 13:31:44 -04004763 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004764
4765 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004766 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004767 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004768
Alexis Hetu17809052015-05-13 11:28:22 -04004769 break;
4770
Alexis Hetuad527752015-07-07 13:31:44 -04004771 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004772
4773 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004774 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004775 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004776
Alexis Hetu17809052015-05-13 11:28:22 -04004777 break;
4778
Alexis Hetuad527752015-07-07 13:31:44 -04004779 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004780
4781 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004782 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu17809052015-05-13 11:28:22 -04004783 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004784
Alexis Hetu17809052015-05-13 11:28:22 -04004785 break;
4786
Alexis Hetuad527752015-07-07 13:31:44 -04004787 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004788
4789 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004790 FRAG_ONLY("discard", (yylsp[-1]));
4791 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004792 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004793
Alexis Hetu17809052015-05-13 11:28:22 -04004794 break;
4795
Alexis Hetuad527752015-07-07 13:31:44 -04004796 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004797
4798 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004799 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004800 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004801 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004802
Alexis Hetu17809052015-05-13 11:28:22 -04004803 break;
4804
Alexis Hetuad527752015-07-07 13:31:44 -04004805 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004806
4807 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004808 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004809 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004810 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004811
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004812 break;
4813
Alexis Hetue5246692015-06-18 12:34:52 -04004814 case 269:
4815
4816 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004817 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004818 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004819
Alexis Hetuad527752015-07-07 13:31:44 -04004820 break;
4821
4822 case 270:
4823
4824 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004825 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004826 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004827
Alexis Hetuad527752015-07-07 13:31:44 -04004828 break;
4829
4830 case 271:
4831
4832 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004833 context->parseFunctionPrototype((yylsp[0]), (yyvsp[0].interm).function, &(yyvsp[0].interm).intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004834 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004835
John Bauman66b8ab22014-05-06 15:57:45 -04004836 break;
4837
Alexis Hetuad527752015-07-07 13:31:44 -04004838 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004839
4840 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004841 (yyval.interm.intermNode) = context->addFunctionDefinition(*((yyvsp[-2].interm).function), (yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermAggregate), (yylsp[-2]));
John Bauman66b8ab22014-05-06 15:57:45 -04004842 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004843
John Bauman66b8ab22014-05-06 15:57:45 -04004844 break;
4845
4846
4847
4848 default: break;
4849 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004850 /* User semantic actions sometimes alter yychar, and that requires
4851 that yytoken be updated with the new translation. We take the
4852 approach of translating immediately before every use of yytoken.
4853 One alternative is translating here after every semantic action,
4854 but that translation would be missed if the semantic action invokes
4855 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4856 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4857 incorrect destructor might then be invoked immediately. In the
4858 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4859 to an incorrect destructor call or verbose syntax error message
4860 before the lookahead is translated. */
John Bauman66b8ab22014-05-06 15:57:45 -04004861 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4862
4863 YYPOPSTACK (yylen);
4864 yylen = 0;
4865 YY_STACK_PRINT (yyss, yyssp);
4866
4867 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004868 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004869
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004870 /* Now 'shift' the result of the reduction. Determine what state
John Bauman66b8ab22014-05-06 15:57:45 -04004871 that goes to, based on the state we popped back to and the rule
4872 number reduced by. */
4873
4874 yyn = yyr1[yyn];
4875
4876 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4877 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4878 yystate = yytable[yystate];
4879 else
4880 yystate = yydefgoto[yyn - YYNTOKENS];
4881
4882 goto yynewstate;
4883
4884
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004885/*--------------------------------------.
4886| yyerrlab -- here on detecting error. |
4887`--------------------------------------*/
John Bauman66b8ab22014-05-06 15:57:45 -04004888yyerrlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004889 /* Make sure we have latest lookahead translation. See comments at
4890 user semantic actions for why this is necessary. */
4891 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4892
John Bauman66b8ab22014-05-06 15:57:45 -04004893 /* If not already recovering from an error, report this error. */
4894 if (!yyerrstatus)
4895 {
4896 ++yynerrs;
4897#if ! YYERROR_VERBOSE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004898 yyerror (&yylloc, context, yyscanner, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004899#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004900# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4901 yyssp, yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04004902 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004903 char const *yymsgp = YY_("syntax error");
4904 int yysyntax_error_status;
4905 yysyntax_error_status = YYSYNTAX_ERROR;
4906 if (yysyntax_error_status == 0)
4907 yymsgp = yymsg;
4908 else if (yysyntax_error_status == 1)
4909 {
4910 if (yymsg != yymsgbuf)
4911 YYSTACK_FREE (yymsg);
4912 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4913 if (!yymsg)
4914 {
4915 yymsg = yymsgbuf;
4916 yymsg_alloc = sizeof yymsgbuf;
4917 yysyntax_error_status = 2;
4918 }
4919 else
4920 {
4921 yysyntax_error_status = YYSYNTAX_ERROR;
4922 yymsgp = yymsg;
4923 }
4924 }
4925 yyerror (&yylloc, context, yyscanner, yymsgp);
4926 if (yysyntax_error_status == 2)
4927 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04004928 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004929# undef YYSYNTAX_ERROR
John Bauman66b8ab22014-05-06 15:57:45 -04004930#endif
4931 }
4932
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004933 yyerror_range[1] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004934
4935 if (yyerrstatus == 3)
4936 {
4937 /* If just tried and failed to reuse lookahead token after an
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004938 error, discard it. */
John Bauman66b8ab22014-05-06 15:57:45 -04004939
4940 if (yychar <= YYEOF)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004941 {
4942 /* Return failure if at end of input. */
4943 if (yychar == YYEOF)
4944 YYABORT;
4945 }
John Bauman66b8ab22014-05-06 15:57:45 -04004946 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004947 {
4948 yydestruct ("Error: discarding",
4949 yytoken, &yylval, &yylloc, context, yyscanner);
4950 yychar = YYEMPTY;
4951 }
John Bauman66b8ab22014-05-06 15:57:45 -04004952 }
4953
4954 /* Else will try to reuse lookahead token after shifting the error
4955 token. */
4956 goto yyerrlab1;
4957
4958
4959/*---------------------------------------------------.
4960| yyerrorlab -- error raised explicitly by YYERROR. |
4961`---------------------------------------------------*/
4962yyerrorlab:
4963
4964 /* Pacify compilers like GCC when the user code never invokes
4965 YYERROR and the label yyerrorlab therefore never appears in user
4966 code. */
4967 if (/*CONSTCOND*/ 0)
4968 goto yyerrorlab;
4969
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004970 yyerror_range[1] = yylsp[1-yylen];
4971 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04004972 this YYERROR. */
4973 YYPOPSTACK (yylen);
4974 yylen = 0;
4975 YY_STACK_PRINT (yyss, yyssp);
4976 yystate = *yyssp;
4977 goto yyerrlab1;
4978
4979
4980/*-------------------------------------------------------------.
4981| yyerrlab1 -- common code for both syntax error and YYERROR. |
4982`-------------------------------------------------------------*/
4983yyerrlab1:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004984 yyerrstatus = 3; /* Each real token shifted decrements this. */
John Bauman66b8ab22014-05-06 15:57:45 -04004985
4986 for (;;)
4987 {
4988 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004989 if (!yypact_value_is_default (yyn))
4990 {
4991 yyn += YYTERROR;
4992 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4993 {
4994 yyn = yytable[yyn];
4995 if (0 < yyn)
4996 break;
4997 }
4998 }
John Bauman66b8ab22014-05-06 15:57:45 -04004999
5000 /* Pop the current state because it cannot handle the error token. */
5001 if (yyssp == yyss)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005002 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04005003
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005004 yyerror_range[1] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005005 yydestruct ("Error: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005006 yystos[yystate], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005007 YYPOPSTACK (1);
5008 yystate = *yyssp;
5009 YY_STACK_PRINT (yyss, yyssp);
5010 }
5011
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005012 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04005013 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005014 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04005015
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005016 yyerror_range[2] = yylloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005017 /* Using YYLLOC is tempting, but would change the location of
5018 the lookahead. YYLOC is available though. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005019 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005020 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005021
5022 /* Shift the error token. */
5023 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5024
5025 yystate = yyn;
5026 goto yynewstate;
5027
5028
5029/*-------------------------------------.
5030| yyacceptlab -- YYACCEPT comes here. |
5031`-------------------------------------*/
5032yyacceptlab:
5033 yyresult = 0;
5034 goto yyreturn;
5035
5036/*-----------------------------------.
5037| yyabortlab -- YYABORT comes here. |
5038`-----------------------------------*/
5039yyabortlab:
5040 yyresult = 1;
5041 goto yyreturn;
5042
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005043#if !defined yyoverflow || YYERROR_VERBOSE
John Bauman66b8ab22014-05-06 15:57:45 -04005044/*-------------------------------------------------.
5045| yyexhaustedlab -- memory exhaustion comes here. |
5046`-------------------------------------------------*/
5047yyexhaustedlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005048 yyerror (&yylloc, context, yyscanner, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005049 yyresult = 2;
5050 /* Fall through. */
5051#endif
5052
5053yyreturn:
5054 if (yychar != YYEMPTY)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005055 {
5056 /* Make sure we have latest lookahead translation. See comments at
5057 user semantic actions for why this is necessary. */
5058 yytoken = YYTRANSLATE (yychar);
5059 yydestruct ("Cleanup: discarding lookahead",
5060 yytoken, &yylval, &yylloc, context, yyscanner);
5061 }
5062 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005063 this YYABORT or YYACCEPT. */
5064 YYPOPSTACK (yylen);
5065 YY_STACK_PRINT (yyss, yyssp);
5066 while (yyssp != yyss)
5067 {
5068 yydestruct ("Cleanup: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005069 yystos[*yyssp], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005070 YYPOPSTACK (1);
5071 }
5072#ifndef yyoverflow
5073 if (yyss != yyssa)
5074 YYSTACK_FREE (yyss);
5075#endif
5076#if YYERROR_VERBOSE
5077 if (yymsg != yymsgbuf)
5078 YYSTACK_FREE (yymsg);
5079#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005080 return yyresult;
John Bauman66b8ab22014-05-06 15:57:45 -04005081}
5082
5083
5084
John Bauman66b8ab22014-05-06 15:57:45 -04005085int glslang_parse(TParseContext* context) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005086 return yyparse(context, context->getScanner());
John Bauman66b8ab22014-05-06 15:57:45 -04005087}