blob: 8f2d9857ae1287795b65df2014914cd93d181b6b [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 Hetuad527752015-07-07 13:31:44 -0400631#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,
707 551, 554, 560, 563, 574, 582, 590, 617, 623, 630,
708 634, 638, 642, 649, 686, 689, 696, 704, 725, 746,
709 756, 784, 789, 799, 804, 814, 817, 820, 823, 829,
710 836, 839, 843, 847, 852, 857, 864, 868, 872, 876,
711 881, 886, 890, 897, 907, 913, 916, 922, 928, 935,
712 944, 953, 956, 959, 966, 970, 974, 979, 987, 990,
713 994, 998, 1007, 1016, 1024, 1034, 1041, 1044, 1047, 1053,
714 1060, 1063, 1069, 1072, 1075, 1081, 1084, 1089, 1104, 1108,
715 1112, 1116, 1120, 1124, 1129, 1134, 1139, 1144, 1149, 1154,
716 1159, 1164, 1169, 1174, 1179, 1184, 1190, 1196, 1202, 1208,
717 1214, 1220, 1226, 1232, 1238, 1243, 1248, 1257, 1262, 1267,
718 1272, 1277, 1282, 1287, 1292, 1297, 1302, 1307, 1312, 1317,
719 1322, 1327, 1340, 1340, 1343, 1343, 1349, 1352, 1368, 1371,
720 1380, 1384, 1390, 1397, 1412, 1416, 1420, 1421, 1427, 1428,
721 1429, 1430, 1431, 1432, 1433, 1437, 1438, 1438, 1438, 1448,
722 1449, 1453, 1453, 1454, 1454, 1459, 1462, 1472, 1475, 1481,
723 1482, 1486, 1494, 1498, 1505, 1505, 1512, 1515, 1524, 1529,
724 1546, 1546, 1551, 1551, 1558, 1558, 1566, 1569, 1575, 1578,
725 1584, 1588, 1595, 1598, 1601, 1604, 1607, 1616, 1620, 1627,
726 1630, 1636, 1636
John 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 Hetuad527752015-07-07 13:31:44 -0400815#define YYPACT_NINF -334
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400816
817#define yypact_value_is_default(Yystate) \
818 (!!((Yystate) == (-334)))
819
820#define YYTABLE_NINF -232
821
822#define yytable_value_is_error(Yytable_value) \
823 0
824
825 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
826 STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -0400827static const yytype_int16 yypact[] =
828{
Alexis Hetuad527752015-07-07 13:31:44 -0400829 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,
890 150, 0, 272, 97, 102, 104, 109, 0, 111, 98,
891 0, 0, 85, 0, 0, 0, 0, 206, 2, 6,
892 4, 5, 7, 28, 0, 0, 0, 156, 35, 34,
893 36, 33, 3, 9, 29, 11, 16, 17, 0, 0,
894 22, 0, 37, 0, 41, 44, 47, 52, 55, 57,
895 59, 61, 63, 65, 67, 84, 0, 26, 88, 0,
896 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,
903 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
904 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,
919 242, 249, 253
920};
921
922 /* YYPGOTO[NTERM-NUM]. */
John Bauman66b8ab22014-05-06 15:57:45 -0400923static const yytype_int16 yypgoto[] =
924{
Alexis Hetuad527752015-07-07 13:31:44 -0400925 -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{
940 -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,
944 65, 66, 67, 68, 100, 69, 70, 71, 72, 73,
945 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,
949 78, 79, 91
950};
951
952 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
953 positive, shift that token. If negative, reduce the rule whose
954 number is the opposite. If YYTABLE_NINF, syntax error. */
John Bauman66b8ab22014-05-06 15:57:45 -0400955static const yytype_int16 yytable[] =
956{
Alexis Hetuad527752015-07-07 13:31:44 -0400957 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,
989 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
990 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 Hetuad527752015-07-07 13:31:44 -0400996 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 Hetuad527752015-07-07 13:31:44 -0400998 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 Hetuad527752015-07-07 13:31:44 -04001003 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 Hetuad527752015-07-07 13:31:44 -04001008 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 Hetuad527752015-07-07 13:31:44 -04001011 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 Hetuad527752015-07-07 13:31:44 -04001015 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 Hetuad527752015-07-07 13:31:44 -04001020 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 Hetuad527752015-07-07 13:31:44 -04001026 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,
1032 195, 0, 0, 0, 0, 0, 197, 148, 149, 150,
1033 151, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1034 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 Hetuad527752015-07-07 13:31:44 -04001038 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 Hetue5246692015-06-18 12:34:52 -04001042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001043 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001047 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,
Alexis Hetuad527752015-07-07 13:31:44 -04001050 194, 42, 43, 44, 0, 45, 46, 47, 48, 49,
Alexis Hetue5246692015-06-18 12:34:52 -04001051 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
Alexis Hetuad527752015-07-07 13:31:44 -04001052 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,
1057 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,
1060 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001066 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001078 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,
Alexis Hetuad527752015-07-07 13:31:44 -04001082 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001092 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,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001095 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 Hetuad527752015-07-07 13:31:44 -04001102 0, 0, 0, 0, 146, 0, 0, 221, 8, 9,
1103 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 Hetuad527752015-07-07 13:31:44 -04001112 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,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001121 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 Hetuad527752015-07-07 13:31:44 -04001136 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,
1140 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001190 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,
Alexis Hetuad527752015-07-07 13:31:44 -04001195 52, 53, 54, 0, 55, 56, 57, 0, 0, 59,
1196 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,
1202 54, 0, 55, 56, 57, 0, 316, 59, 8, 9,
1203 10, 11, 317, 0, 0, 0, 0, 0, 0, 0,
1204 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,
1209 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001210};
1211
1212static const yytype_int16 yycheck[] =
1213{
Alexis Hetuad527752015-07-07 13:31:44 -04001214 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 Hetuad527752015-07-07 13:31:44 -04001253 -1, -1, -1, 393, -1, -1, -1, -1, -1, 399,
Alexis Hetua35d8232015-06-11 17:11:06 -04001254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001255 -1, -1, -1, 3, 4, 5, 6, 7, 8, 9,
1256 10, 11, 12, 13, 14, 15, 16, 361, 18, 19,
Alexis Hetue5246692015-06-18 12:34:52 -04001257 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1258 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1259 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1260 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1261 -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,
Alexis Hetu17809052015-05-13 11:28:22 -04001264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001265 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
1266 -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,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001277 104, -1, -1, -1, 108, 109, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -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 Hetuad6b8752015-06-09 16:15:30 -04001281 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001282 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001283 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001284 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001285 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001286 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001288 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
1289 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
1290 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1291 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1292 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1293 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1294 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1295 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
1296 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,
1299 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001300 -1, -1, 104, -1, -1, -1, 108, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001301 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
Alexis Hetuad527752015-07-07 13:31:44 -04001302 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1303 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
Alexis Hetue5246692015-06-18 12:34:52 -04001304 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,
Alexis Hetuad527752015-07-07 13:31:44 -04001307 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
Alexis Hetue5246692015-06-18 12:34:52 -04001308 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001311 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001312 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
1313 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
1314 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,
1317 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,
Alexis Hetue5246692015-06-18 12:34:52 -04001335 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,
Alexis Hetuad527752015-07-07 13:31:44 -04001340 -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,
Alexis Hetue5246692015-06-18 12:34:52 -04001347 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001349 -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,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001352 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1353 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1354 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1355 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1356 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 Hetuad527752015-07-07 13:31:44 -04001369 -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,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001378 -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,
1397 -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,
Alexis Hetue5246692015-06-18 12:34:52 -04001447 -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,
Alexis Hetuad527752015-07-07 13:31:44 -04001452 68, 69, 70, -1, 72, 73, 74, -1, -1, 77,
1453 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,
1459 70, -1, 72, 73, 74, -1, 76, 77, 10, 11,
1460 12, 13, 82, -1, -1, -1, -1, -1, -1, -1,
1461 -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,
1466 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,
1485 179, 108, 200, 165, 164, 167, 175, 166, 76, 104,
1486 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,
1491 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,
1514 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 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003065 TFunction &function = *((yyvsp[-1].interm).function);
John Bauman66b8ab22014-05-06 15:57:45 -04003066
3067 TIntermAggregate *prototype = new TIntermAggregate;
3068 prototype->setType(function.getReturnType());
3069 prototype->setName(function.getName());
3070
Alexis Hetu76a343a2015-06-04 17:21:22 -04003071 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003072 {
3073 const TParameter &param = function.getParam(i);
3074 if (param.name != 0)
3075 {
John Baumand4ae8632014-05-06 16:18:33 -04003076 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003077
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003078 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[-1])), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003079 }
3080 else
3081 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003082 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[-1])), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003083 }
3084 }
3085
3086 prototype->setOp(EOpPrototype);
3087 (yyval.interm.intermNode) = prototype;
3088
3089 context->symbolTable.pop();
3090 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003091
John Bauman66b8ab22014-05-06 15:57:45 -04003092 break;
3093
Alexis Hetua35d8232015-06-11 17:11:06 -04003094 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003095
3096 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003097 TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate;
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003098 if (aggNode && aggNode->getOp() == EOpNull)
3099 aggNode->setOp(EOpDeclaration);
3100 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003101 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003102
John Bauman66b8ab22014-05-06 15:57:45 -04003103 break;
3104
Alexis Hetua35d8232015-06-11 17:11:06 -04003105 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003106
3107 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003108 if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) {
3109 context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type));
John Baumand4ae8632014-05-06 16:18:33 -04003110 context->recover();
3111 }
John Bauman66b8ab22014-05-06 15:57:45 -04003112 (yyval.interm.intermNode) = 0;
3113 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003114
John Bauman66b8ab22014-05-06 15:57:45 -04003115 break;
3116
Alexis Hetua35d8232015-06-11 17:11:06 -04003117 case 89:
3118
3119 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003120 ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks");
3121 (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 -04003122 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003123
Alexis Hetua35d8232015-06-11 17:11:06 -04003124 break;
3125
3126 case 90:
3127
3128 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003129 ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks");
3130 (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 -04003131 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003132
Alexis Hetua35d8232015-06-11 17:11:06 -04003133 break;
3134
3135 case 91:
3136
3137 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003138 ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks");
3139 (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 -04003140 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003141
Alexis Hetua35d8232015-06-11 17:11:06 -04003142 break;
3143
3144 case 92:
3145
3146 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003147 context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type));
Alexis Hetua35d8232015-06-11 17:11:06 -04003148 (yyval.interm.intermNode) = 0;
3149 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003150
Alexis Hetua35d8232015-06-11 17:11:06 -04003151 break;
3152
3153 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003154
3155 {
3156 //
3157 // Multiple declarations of the same function are allowed.
3158 //
3159 // If this is a definition, the definition production code will check for redefinitions
3160 // (we don't know at this point if it's a definition or not).
3161 //
3162 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3163 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003164 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[-1].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003165 if (prevDec) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003166 if (prevDec->getReturnType() != (yyvsp[-1].interm.function)->getReturnType()) {
3167 context->error((yylsp[0]), "overloaded functions must have the same return type", (yyvsp[-1].interm.function)->getReturnType().getBasicString());
John Bauman66b8ab22014-05-06 15:57:45 -04003168 context->recover();
3169 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003170 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003171 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[-1].interm.function)->getParam(i).type->getQualifier()) {
3172 context->error((yylsp[0]), "overloaded functions must have the same parameter qualifiers", (yyvsp[-1].interm.function)->getParam(i).type->getQualifierString());
John Bauman66b8ab22014-05-06 15:57:45 -04003173 context->recover();
3174 }
3175 }
3176 }
3177
3178 //
3179 // If this is a redeclaration, it could also be a definition,
3180 // in which case, we want to use the variable names from this one, and not the one that's
3181 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3182 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003183 (yyval.interm).function = (yyvsp[-1].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003184
3185 // We're at the inner scope level of the function's arguments and body statement.
3186 // Add the function prototype to the surrounding scope instead.
3187 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3188 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003189
John Bauman66b8ab22014-05-06 15:57:45 -04003190 break;
3191
Alexis Hetua35d8232015-06-11 17:11:06 -04003192 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003193
3194 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003195 (yyval.interm.function) = (yyvsp[0].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003196 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003197
John Bauman66b8ab22014-05-06 15:57:45 -04003198 break;
3199
Alexis Hetua35d8232015-06-11 17:11:06 -04003200 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003201
3202 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003203 (yyval.interm.function) = (yyvsp[0].interm.function);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003204 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003205
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003206 break;
3207
Alexis Hetua35d8232015-06-11 17:11:06 -04003208 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003209
3210 {
John Bauman66b8ab22014-05-06 15:57:45 -04003211 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003212 (yyval.interm.function) = (yyvsp[-1].interm.function);
3213 if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
3214 (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003215 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003216 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003217 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003218
John Bauman66b8ab22014-05-06 15:57:45 -04003219 break;
3220
Alexis Hetua35d8232015-06-11 17:11:06 -04003221 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003222
3223 {
3224 //
3225 // Only first parameter of one-parameter functions can be void
3226 // The check for named parameters not being void is done in parameter_declarator
3227 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003228 if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
John Bauman66b8ab22014-05-06 15:57:45 -04003229 //
3230 // This parameter > first is void
3231 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003232 context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003233 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003234 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003235 } else {
3236 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003237 (yyval.interm.function) = (yyvsp[-2].interm.function);
3238 (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003239 }
3240 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003241
John Bauman66b8ab22014-05-06 15:57:45 -04003242 break;
3243
Alexis Hetua35d8232015-06-11 17:11:06 -04003244 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003245
3246 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003247 if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) {
3248 context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier));
John Bauman66b8ab22014-05-06 15:57:45 -04003249 context->recover();
3250 }
3251 // make sure a sampler is not involved as well...
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003252 if (context->structQualifierErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003253 context->recover();
3254
3255 // Add the function as a prototype after parsing it (we do not support recursion)
3256 TFunction *function;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003257 TType type((yyvsp[-2].interm.type));
3258 function = new TFunction((yyvsp[-1].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04003259 (yyval.interm.function) = function;
3260
3261 context->symbolTable.push();
3262 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003263
John Bauman66b8ab22014-05-06 15:57:45 -04003264 break;
3265
Alexis Hetua35d8232015-06-11 17:11:06 -04003266 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003267
3268 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003269 if ((yyvsp[-1].interm.type).type == EbtVoid) {
3270 context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003271 context->recover();
3272 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003273 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003274 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003275 TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003276 (yyval.interm).param = param;
3277 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003278
John Bauman66b8ab22014-05-06 15:57:45 -04003279 break;
3280
Alexis Hetua35d8232015-06-11 17:11:06 -04003281 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003282
3283 {
3284 // Check that we can make an array out of this type
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003285 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003286 context->recover();
3287
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003288 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003289 context->recover();
3290
3291 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003292 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003293 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003294 (yyvsp[-4].interm.type).setArray(true, size);
John Bauman66b8ab22014-05-06 15:57:45 -04003295
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003296 TType* type = new TType((yyvsp[-4].interm.type));
3297 TParameter param = { (yyvsp[-3].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003298 (yyval.interm).param = param;
3299 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003300
John Bauman66b8ab22014-05-06 15:57:45 -04003301 break;
3302
Alexis Hetu17809052015-05-13 11:28:22 -04003303 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003304
3305 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003306 (yyval.interm) = (yyvsp[0].interm);
3307 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003308 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003309 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003310
John Bauman66b8ab22014-05-06 15:57:45 -04003311 break;
3312
Alexis Hetu17809052015-05-13 11:28:22 -04003313 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003314
3315 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003316 (yyval.interm) = (yyvsp[0].interm);
3317 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003318 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003319 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003320 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003321 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003322
John Bauman66b8ab22014-05-06 15:57:45 -04003323 break;
3324
Alexis Hetu17809052015-05-13 11:28:22 -04003325 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003326
3327 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003328 (yyval.interm) = (yyvsp[0].interm);
3329 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003330 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003331 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003332
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003333 break;
3334
Alexis Hetu17809052015-05-13 11:28:22 -04003335 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003336
3337 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003338 (yyval.interm) = (yyvsp[0].interm);
3339 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003340 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003341 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003342 context->recover();
3343 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003344
Alexis Hetua35d8232015-06-11 17:11:06 -04003345 break;
3346
3347 case 105:
3348
3349 {
3350 (yyval.interm.qualifier) = EvqIn;
3351 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003352
Alexis Hetua35d8232015-06-11 17:11:06 -04003353 break;
3354
3355 case 106:
3356
3357 {
3358 (yyval.interm.qualifier) = EvqIn;
3359 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003360
Alexis Hetua35d8232015-06-11 17:11:06 -04003361 break;
3362
3363 case 107:
3364
3365 {
3366 (yyval.interm.qualifier) = EvqOut;
3367 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003368
Alexis Hetua35d8232015-06-11 17:11:06 -04003369 break;
3370
3371 case 108:
3372
3373 {
3374 (yyval.interm.qualifier) = EvqInOut;
3375 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003376
Alexis Hetua35d8232015-06-11 17:11:06 -04003377 break;
3378
3379 case 109:
3380
3381 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003382 TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
John Bauman66b8ab22014-05-06 15:57:45 -04003383 (yyval.interm).param = param;
3384 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003385
John Bauman66b8ab22014-05-06 15:57:45 -04003386 break;
3387
Alexis Hetua35d8232015-06-11 17:11:06 -04003388 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003389
3390 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003391 (yyval.interm) = (yyvsp[0].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04003392 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003393
John Bauman66b8ab22014-05-06 15:57:45 -04003394 break;
3395
Alexis Hetua35d8232015-06-11 17:11:06 -04003396 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003397
3398 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003399 (yyval.interm) = (yyvsp[-2].interm);
3400 (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 -04003401 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003402
John Bauman66b8ab22014-05-06 15:57:45 -04003403 break;
3404
Alexis Hetua35d8232015-06-11 17:11:06 -04003405 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003406
3407 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003408 (yyval.interm) = (yyvsp[-5].interm);
3409 (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 -04003410 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003411
John Bauman66b8ab22014-05-06 15:57:45 -04003412 break;
3413
Alexis Hetua35d8232015-06-11 17:11:06 -04003414 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003415
3416 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003417 ES3_ONLY("[]", (yylsp[-4]), "implicitly sized array");
3418 (yyval.interm) = (yyvsp[-6].interm);
3419 (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 -04003420 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003421
John Bauman66b8ab22014-05-06 15:57:45 -04003422 break;
3423
Alexis Hetua35d8232015-06-11 17:11:06 -04003424 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003425
3426 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003427 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3428 (yyval.interm) = (yyvsp[-7].interm);
3429 (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 -04003430 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003431
John Bauman66b8ab22014-05-06 15:57:45 -04003432 break;
3433
Alexis Hetua35d8232015-06-11 17:11:06 -04003434 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003435
3436 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003437 (yyval.interm) = (yyvsp[-4].interm);
3438 (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 -04003439 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003440
John Bauman66b8ab22014-05-06 15:57:45 -04003441 break;
3442
Alexis Hetua35d8232015-06-11 17:11:06 -04003443 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003444
3445 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003446 (yyval.interm).type = (yyvsp[0].interm.type);
3447 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003448 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003449
John Bauman66b8ab22014-05-06 15:57:45 -04003450 break;
3451
Alexis Hetua35d8232015-06-11 17:11:06 -04003452 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003453
3454 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003455 (yyval.interm).type = (yyvsp[-1].interm.type);
3456 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003457 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003458
John Bauman66b8ab22014-05-06 15:57:45 -04003459 break;
3460
Alexis Hetua35d8232015-06-11 17:11:06 -04003461 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003462
3463 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003464 (yyval.interm).type = (yyvsp[-4].interm.type);
3465 (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 -04003466 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003467
John Bauman66b8ab22014-05-06 15:57:45 -04003468 break;
3469
Alexis Hetua35d8232015-06-11 17:11:06 -04003470 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003471
3472 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003473 ES3_ONLY("[]", (yylsp[-3]), "implicitly sized array");
3474 (yyval.interm).type = (yyvsp[-5].interm.type);
3475 (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 -04003476 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003477
John Bauman66b8ab22014-05-06 15:57:45 -04003478 break;
3479
Alexis Hetua35d8232015-06-11 17:11:06 -04003480 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003481
3482 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003483 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3484 (yyval.interm).type = (yyvsp[-6].interm.type);
3485 (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 -04003486 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003487
John Bauman66b8ab22014-05-06 15:57:45 -04003488 break;
3489
Alexis Hetua35d8232015-06-11 17:11:06 -04003490 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003491
3492 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003493 (yyval.interm).type = (yyvsp[-3].interm.type);
3494 (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 -04003495 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003496
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003497 break;
3498
Alexis Hetua35d8232015-06-11 17:11:06 -04003499 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003500
3501 {
3502 // $$.type is not used in invariant declarations.
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003503 (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003504 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003505
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003506 break;
3507
Alexis Hetua35d8232015-06-11 17:11:06 -04003508 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003509
3510 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003511 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003512
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003513 if ((yyvsp[0].interm.type).array) {
3514 ES3_ONLY("[]", (yylsp[0]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003515 if (context->getShaderVersion() != 300) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003516 (yyvsp[0].interm.type).clearArrayness();
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003517 }
John Bauman66b8ab22014-05-06 15:57:45 -04003518 }
3519 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003520
John Bauman66b8ab22014-05-06 15:57:45 -04003521 break;
3522
Alexis Hetua35d8232015-06-11 17:11:06 -04003523 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003524
3525 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003526 (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 -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 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003532
3533 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003534 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003535 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003536
John Bauman66b8ab22014-05-06 15:57:45 -04003537 break;
3538
Alexis Hetua35d8232015-06-11 17:11:06 -04003539 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003540
3541 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003542 (yyval.interm.type).qualifier = EvqFlat;
3543 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003544
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003545 break;
3546
Alexis Hetua35d8232015-06-11 17:11:06 -04003547 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003548
3549 {
3550 (yyval.interm.qualifier) = EvqConstReadOnly;
3551 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003552
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003553 break;
3554
Alexis Hetua35d8232015-06-11 17:11:06 -04003555 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003556
3557 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003558 VERTEX_ONLY("attribute", (yylsp[0]));
3559 ES2_ONLY("attribute", (yylsp[0]));
3560 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003561 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003562 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003563 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003564
John Bauman66b8ab22014-05-06 15:57:45 -04003565 break;
3566
Alexis Hetua35d8232015-06-11 17:11:06 -04003567 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003568
3569 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003570 ES2_ONLY("varying", (yylsp[0]));
3571 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003572 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003573 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003574 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003575 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003576 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003577 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003578
John Bauman66b8ab22014-05-06 15:57:45 -04003579 break;
3580
Alexis Hetua35d8232015-06-11 17:11:06 -04003581 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003582
3583 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003584 ES2_ONLY("varying", (yylsp[-1]));
3585 if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003586 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003587 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003588 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003589 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003590 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003591 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003592
John Bauman66b8ab22014-05-06 15:57:45 -04003593 break;
3594
Alexis Hetua35d8232015-06-11 17:11:06 -04003595 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003596
3597 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003598 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003599 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003600
John Bauman66b8ab22014-05-06 15:57:45 -04003601 break;
3602
Alexis Hetua35d8232015-06-11 17:11:06 -04003603 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003604
3605 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003606 (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 -04003607 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003608
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003609 break;
3610
Alexis Hetua35d8232015-06-11 17:11:06 -04003611 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003612
3613 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003614 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 -04003615 context->recover();
3616
3617 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003618 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003619 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003620
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003621 break;
3622
Alexis Hetua35d8232015-06-11 17:11:06 -04003623 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003624
3625 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003626 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003627 (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003628 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003629
Nicolas Capens7d626792015-02-17 17:58:31 -05003630 break;
3631
Alexis Hetua35d8232015-06-11 17:11:06 -04003632 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003633
3634 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003635 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
3636 (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003637 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003638
Nicolas Capens7d626792015-02-17 17:58:31 -05003639 break;
3640
Alexis Hetua35d8232015-06-11 17:11:06 -04003641 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003642
3643 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003644 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-1]));
3645 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003646 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003647 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003648
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003649 break;
3650
Alexis Hetua35d8232015-06-11 17:11:06 -04003651 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003652
3653 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003654 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-2]));
3655 (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 -04003656 (yyval.interm.type).invariant = true;
3657 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003658
Alexis Hetuad527752015-07-07 13:31:44 -04003659 break;
3660
3661 case 138:
3662
3663 {
3664 (yyval.interm.type).qualifier = EvqConstExpr;
3665 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003666
Alexis Hetuad527752015-07-07 13:31:44 -04003667 break;
3668
3669 case 139:
3670
3671 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003672 ES3_ONLY("in", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003673 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003674 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003675
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003676 break;
3677
Alexis Hetuad527752015-07-07 13:31:44 -04003678 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003679
3680 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003681 ES3_ONLY("out", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003682 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003683 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003684
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003685 break;
3686
Alexis Hetuad527752015-07-07 13:31:44 -04003687 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003688
3689 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003690 ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003691 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003692 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003693 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 -04003694 context->recover();
3695 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003696 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003697 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003698
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003699 break;
3700
Alexis Hetuad527752015-07-07 13:31:44 -04003701 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003702
3703 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003704 ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003705 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003706 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003707 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 -04003708 context->recover();
3709 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003710 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003711 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003712
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003713 break;
3714
Alexis Hetuad527752015-07-07 13:31:44 -04003715 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003716
3717 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003718 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003719 context->recover();
3720 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003721 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003722
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003723 break;
3724
Alexis Hetuad527752015-07-07 13:31:44 -04003725 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003726
3727 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003728 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003729
3730 if ((yyval.interm.type).precision == EbpUndefined) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003731 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type);
3732 if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003733 context->recover();
3734 }
3735 }
3736 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003737
John Bauman66b8ab22014-05-06 15:57:45 -04003738 break;
3739
Alexis Hetuad527752015-07-07 13:31:44 -04003740 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003741
3742 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003743 (yyval.interm.type) = (yyvsp[0].interm.type);
3744 (yyval.interm.type).precision = (yyvsp[-1].interm.precision);
John Bauman66b8ab22014-05-06 15:57:45 -04003745 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003746
John Bauman66b8ab22014-05-06 15:57:45 -04003747 break;
3748
Alexis Hetuad527752015-07-07 13:31:44 -04003749 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003750
3751 {
3752 (yyval.interm.precision) = EbpHigh;
3753 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003754
John Bauman66b8ab22014-05-06 15:57:45 -04003755 break;
3756
Alexis Hetuad527752015-07-07 13:31:44 -04003757 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003758
3759 {
3760 (yyval.interm.precision) = EbpMedium;
3761 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003762
John Bauman66b8ab22014-05-06 15:57:45 -04003763 break;
3764
Alexis Hetuad527752015-07-07 13:31:44 -04003765 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003766
3767 {
3768 (yyval.interm.precision) = EbpLow;
3769 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003770
John Bauman66b8ab22014-05-06 15:57:45 -04003771 break;
3772
Alexis Hetuad527752015-07-07 13:31:44 -04003773 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003774
3775 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003776 ES3_ONLY("layout", (yylsp[-3]), "qualifier");
3777 (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003778 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003779
Nicolas Capens7d626792015-02-17 17:58:31 -05003780 break;
3781
Alexis Hetuad527752015-07-07 13:31:44 -04003782 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003783
3784 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003785 (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003786 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003787
Nicolas Capens7d626792015-02-17 17:58:31 -05003788 break;
3789
Alexis Hetuad527752015-07-07 13:31:44 -04003790 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003791
3792 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003793 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier));
Nicolas Capens7d626792015-02-17 17:58:31 -05003794 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003795
Nicolas Capens7d626792015-02-17 17:58:31 -05003796 break;
3797
Alexis Hetuad527752015-07-07 13:31:44 -04003798 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003799
3800 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003801 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003802 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003803
Nicolas Capens7d626792015-02-17 17:58:31 -05003804 break;
3805
Alexis Hetua35d8232015-06-11 17:11:06 -04003806 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003807
3808 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003809 (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 -04003810 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003811
Alexis Hetuad527752015-07-07 13:31:44 -04003812 break;
3813
3814 case 154:
3815
3816 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003817 (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 -04003818 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003819
Alexis Hetuad527752015-07-07 13:31:44 -04003820 break;
3821
3822 case 155:
3823
3824 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003825 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003826 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003827
John Bauman66b8ab22014-05-06 15:57:45 -04003828 break;
3829
Alexis Hetuad527752015-07-07 13:31:44 -04003830 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003831
3832 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003833 ES3_ONLY("[]", (yylsp[-1]), "implicitly sized array");
3834 (yyval.interm.type) = (yyvsp[-2].interm.type);
Alexis Hetue5246692015-06-18 12:34:52 -04003835 (yyval.interm.type).setArray(true, 0);
3836 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003837
Alexis Hetue5246692015-06-18 12:34:52 -04003838 break;
3839
Alexis Hetuad527752015-07-07 13:31:44 -04003840 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003841
3842 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003843 (yyval.interm.type) = (yyvsp[-3].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003844
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003845 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003846 context->recover();
3847 else {
3848 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003849 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003850 context->recover();
3851 (yyval.interm.type).setArray(true, size);
3852 }
3853 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003854
John Bauman66b8ab22014-05-06 15:57:45 -04003855 break;
3856
Alexis Hetuad527752015-07-07 13:31:44 -04003857 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003858
3859 {
3860 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003861 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003862 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003863
Alexis Hetu17809052015-05-13 11:28:22 -04003864 break;
3865
Alexis Hetu17809052015-05-13 11:28:22 -04003866 case 159:
3867
3868 {
3869 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003870 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003871 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003872
Alexis Hetu17809052015-05-13 11:28:22 -04003873 break;
3874
3875 case 160:
3876
3877 {
3878 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003879 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003880 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003881
Alexis Hetua35d8232015-06-11 17:11:06 -04003882 break;
3883
3884 case 161:
3885
3886 {
3887 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003888 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003889 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003890
Alexis Hetua35d8232015-06-11 17:11:06 -04003891 break;
3892
3893 case 162:
3894
3895 {
3896 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003897 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
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 163:
3903
3904 {
3905 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003906 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003907 (yyval.interm.type).setAggregate(2);
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 164:
3913
3914 {
3915 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003916 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003917 (yyval.interm.type).setAggregate(3);
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 165:
3923
3924 {
3925 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003926 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003927 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003928 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003929
Alexis Hetu17809052015-05-13 11:28:22 -04003930 break;
3931
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003932 case 166:
3933
3934 {
3935 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003936 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003937 (yyval.interm.type).setAggregate(2);
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 167:
3943
3944 {
3945 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003946 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003947 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003948 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003949
Alexis Hetua35d8232015-06-11 17:11:06 -04003950 break;
3951
3952 case 168:
3953
3954 {
3955 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003956 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003957 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003958 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003959
Alexis Hetua35d8232015-06-11 17:11:06 -04003960 break;
3961
3962 case 169:
3963
3964 {
3965 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003966 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003967 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003968 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003969
Alexis Hetua35d8232015-06-11 17:11:06 -04003970 break;
3971
3972 case 170:
3973
3974 {
3975 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003976 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003977 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003978 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003979
Alexis Hetua35d8232015-06-11 17:11:06 -04003980 break;
3981
3982 case 171:
3983
3984 {
3985 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003986 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003987 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003988 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003989
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003990 break;
3991
Alexis Hetua35d8232015-06-11 17:11:06 -04003992 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003993
3994 {
Alexis Hetue5246692015-06-18 12:34:52 -04003995 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003996 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003997 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04003998 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003999
Alexis Hetue5246692015-06-18 12:34:52 -04004000 break;
4001
4002 case 173:
4003
4004 {
Alexis Hetuad527752015-07-07 13:31:44 -04004005 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004006 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04004007 (yyval.interm.type).setAggregate(3);
4008 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004009
Alexis Hetuad527752015-07-07 13:31:44 -04004010 break;
4011
4012 case 174:
4013
4014 {
4015 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004016 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04004017 (yyval.interm.type).setAggregate(4);
4018 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004019
Alexis Hetuad527752015-07-07 13:31:44 -04004020 break;
4021
4022 case 175:
4023
4024 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004025 FRAG_VERT_ONLY("mat2", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004026 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004027 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004028 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004029 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004030
John Bauman66b8ab22014-05-06 15:57:45 -04004031 break;
4032
Alexis Hetuad527752015-07-07 13:31:44 -04004033 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004034
4035 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004036 FRAG_VERT_ONLY("mat3", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004037 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004038 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004039 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004040 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004041
John Bauman66b8ab22014-05-06 15:57:45 -04004042 break;
4043
Alexis Hetuad527752015-07-07 13:31:44 -04004044 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004045
4046 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004047 FRAG_VERT_ONLY("mat4", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004048 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004049 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004050 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004051 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004052
John Bauman66b8ab22014-05-06 15:57:45 -04004053 break;
4054
Alexis Hetuad527752015-07-07 13:31:44 -04004055 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004056
4057 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004058 FRAG_VERT_ONLY("mat2x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004059 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004060 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004061 (yyval.interm.type).setMatrix(2, 3);
4062 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004063
Alexis Hetub14178b2015-04-13 13:23:20 -04004064 break;
4065
Alexis Hetuad527752015-07-07 13:31:44 -04004066 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004067
4068 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004069 FRAG_VERT_ONLY("mat3x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004070 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004071 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004072 (yyval.interm.type).setMatrix(3, 2);
4073 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004074
Alexis Hetub14178b2015-04-13 13:23:20 -04004075 break;
4076
Alexis Hetuad527752015-07-07 13:31:44 -04004077 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004078
4079 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004080 FRAG_VERT_ONLY("mat2x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004081 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004082 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004083 (yyval.interm.type).setMatrix(2, 4);
4084 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004085
Alexis Hetub14178b2015-04-13 13:23:20 -04004086 break;
4087
Alexis Hetuad527752015-07-07 13:31:44 -04004088 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004089
4090 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004091 FRAG_VERT_ONLY("mat4x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004092 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004093 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004094 (yyval.interm.type).setMatrix(4, 2);
4095 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004096
Alexis Hetub14178b2015-04-13 13:23:20 -04004097 break;
4098
Alexis Hetuad527752015-07-07 13:31:44 -04004099 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004100
4101 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004102 FRAG_VERT_ONLY("mat3x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004103 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004104 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004105 (yyval.interm.type).setMatrix(3, 4);
4106 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004107
Alexis Hetub14178b2015-04-13 13:23:20 -04004108 break;
4109
Alexis Hetuad527752015-07-07 13:31:44 -04004110 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004111
4112 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004113 FRAG_VERT_ONLY("mat4x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004114 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004115 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004116 (yyval.interm.type).setMatrix(4, 3);
4117 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004118
Alexis Hetub14178b2015-04-13 13:23:20 -04004119 break;
4120
Alexis Hetuad527752015-07-07 13:31:44 -04004121 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004122
4123 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004124 FRAG_VERT_ONLY("sampler2D", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004125 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004126 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004127 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004128
John Bauman66b8ab22014-05-06 15:57:45 -04004129 break;
4130
Alexis Hetuad527752015-07-07 13:31:44 -04004131 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004132
4133 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004134 FRAG_VERT_ONLY("samplerCube", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004135 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004136 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004137 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004138
John Bauman66b8ab22014-05-06 15:57:45 -04004139 break;
4140
Alexis Hetuad527752015-07-07 13:31:44 -04004141 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004142
4143 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004144 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004145 context->error((yylsp[0]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004146 context->recover();
4147 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004148 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004149 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004150 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004151 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004152
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004153 break;
4154
Alexis Hetuad527752015-07-07 13:31:44 -04004155 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004156
4157 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004158 FRAG_VERT_ONLY("sampler3D", (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004159 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004160 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004161 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004162
Alexis Hetub027aa92015-01-19 15:56:12 -05004163 break;
4164
Alexis Hetuad527752015-07-07 13:31:44 -04004165 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004166
4167 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004168 FRAG_VERT_ONLY("sampler2DArray", (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(EbtSampler2DArray, 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 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004176
4177 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004178 FRAG_VERT_ONLY("isampler2D", (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(EbtISampler2D, 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 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004186
4187 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004188 FRAG_VERT_ONLY("isampler3D", (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(EbtISampler3D, 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 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004196
4197 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004198 FRAG_VERT_ONLY("isamplerCube", (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(EbtISamplerCube, 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 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004206
4207 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004208 FRAG_VERT_ONLY("isampler2DArray", (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(EbtISampler2DArray, 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 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004216
4217 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004218 FRAG_VERT_ONLY("usampler2D", (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(EbtUSampler2D, 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 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004226
4227 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004228 FRAG_VERT_ONLY("usampler3D", (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(EbtUSampler3D, 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 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004236
4237 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004238 FRAG_VERT_ONLY("usamplerCube", (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(EbtUSamplerCube, 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 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004246
4247 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004248 FRAG_VERT_ONLY("usampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004249 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004250 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004251 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004252
Alexis Hetub14178b2015-04-13 13:23:20 -04004253 break;
4254
Alexis Hetuad527752015-07-07 13:31:44 -04004255 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004256
4257 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004258 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004259 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004260 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004261 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004262
Alexis Hetub14178b2015-04-13 13:23:20 -04004263 break;
4264
Alexis Hetuad527752015-07-07 13:31:44 -04004265 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004266
4267 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004268 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004269 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004270 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004271 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004272
Alexis Hetub14178b2015-04-13 13:23:20 -04004273 break;
4274
Alexis Hetuad527752015-07-07 13:31:44 -04004275 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004276
4277 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004278 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004279 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004280 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004281 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004282
Alexis Hetub14178b2015-04-13 13:23:20 -04004283 break;
4284
Alexis Hetuad527752015-07-07 13:31:44 -04004285 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004286
4287 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004288 FRAG_VERT_ONLY("struct", (yylsp[0]));
4289 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04004290 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4291 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004292
John Bauman66b8ab22014-05-06 15:57:45 -04004293 break;
4294
Alexis Hetuad527752015-07-07 13:31:44 -04004295 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004296
4297 {
4298 //
4299 // This is for user defined type names. The lexical phase looked up the
4300 // type.
4301 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004302 TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType();
John Bauman66b8ab22014-05-06 15:57:45 -04004303 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004304 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004305 (yyval.interm.type).userDef = &structure;
4306 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004307
John Bauman66b8ab22014-05-06 15:57:45 -04004308 break;
4309
Alexis Hetuad527752015-07-07 13:31:44 -04004310 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004311
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004312 { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); }
4313
John Bauman66b8ab22014-05-06 15:57:45 -04004314 break;
4315
Alexis Hetuad527752015-07-07 13:31:44 -04004316 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004317
4318 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004319 (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004320 }
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 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004325
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004326 { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); }
4327
John Bauman66b8ab22014-05-06 15:57:45 -04004328 break;
4329
Alexis Hetuad527752015-07-07 13:31:44 -04004330 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004331
4332 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004333 (yyval.interm.type) = context->addStructure((yylsp[-4]), (yylsp[-4]), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004334 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004335
John Bauman66b8ab22014-05-06 15:57:45 -04004336 break;
4337
Alexis Hetuad527752015-07-07 13:31:44 -04004338 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004339
4340 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004341 (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004342 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004343
John Bauman66b8ab22014-05-06 15:57:45 -04004344 break;
4345
Alexis Hetuad527752015-07-07 13:31:44 -04004346 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004347
4348 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004349 (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList);
4350 for (unsigned int i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) {
4351 TField* field = (*(yyvsp[0].interm.fieldList))[i];
Alexis Hetua8b364b2015-06-10 11:48:40 -04004352 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4353 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004354 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 -04004355 context->recover();
4356 }
4357 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004358 (yyval.interm.fieldList)->push_back((*(yyvsp[0].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004359 }
4360 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004361
John Bauman66b8ab22014-05-06 15:57:45 -04004362 break;
4363
Alexis Hetuad527752015-07-07 13:31:44 -04004364 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004365
4366 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004367 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
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 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004373
4374 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004375 // ES3 Only, but errors should be handled elsewhere
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004376 (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier;
4377 (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier;
4378 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
Alexis Hetuad6b8752015-06-09 16:15:30 -04004379 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004380
Alexis Hetuad6b8752015-06-09 16:15:30 -04004381 break;
4382
Alexis Hetuad527752015-07-07 13:31:44 -04004383 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004384
4385 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004386 (yyval.interm.fieldList) = NewPoolTFieldList();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004387 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004388 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004389
John Bauman66b8ab22014-05-06 15:57:45 -04004390 break;
4391
Alexis Hetuad527752015-07-07 13:31:44 -04004392 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004393
4394 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004395 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004396 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004397
John Bauman66b8ab22014-05-06 15:57:45 -04004398 break;
4399
Alexis Hetuad527752015-07-07 13:31:44 -04004400 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004401
4402 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004403 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004404 context->recover();
4405
Alexis Hetua8b364b2015-06-10 11:48:40 -04004406 TType* type = new TType(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004407 (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004408 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004409
John Bauman66b8ab22014-05-06 15:57:45 -04004410 break;
4411
Alexis Hetuad527752015-07-07 13:31:44 -04004412 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004413
4414 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004415 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004416 context->recover();
4417
Alexis Hetua8b364b2015-06-10 11:48:40 -04004418 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004419 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004420 if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004421 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004422 type->setArraySize(size);
4423
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004424 (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3]));
John Bauman66b8ab22014-05-06 15:57:45 -04004425 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004426
John Bauman66b8ab22014-05-06 15:57:45 -04004427 break;
4428
Alexis Hetu17809052015-05-13 11:28:22 -04004429 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004430
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004431 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
4432
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004433 break;
4434
Alexis Hetu17809052015-05-13 11:28:22 -04004435 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004436
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004437 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4438
Alexis Hetuad6b8752015-06-09 16:15:30 -04004439 break;
4440
4441 case 216:
4442
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004443 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
4444
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004445 break;
4446
4447 case 217:
4448
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004449 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4450
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004451 break;
4452
4453 case 218:
4454
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004455 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4456
Alexis Hetua35d8232015-06-11 17:11:06 -04004457 break;
4458
4459 case 219:
4460
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004461 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4462
Alexis Hetua35d8232015-06-11 17:11:06 -04004463 break;
4464
4465 case 220:
4466
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004467 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4468
Alexis Hetua35d8232015-06-11 17:11:06 -04004469 break;
4470
4471 case 221:
4472
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004473 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
4474
Alexis Hetua35d8232015-06-11 17:11:06 -04004475 break;
4476
4477 case 222:
4478
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004479 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
4480
Alexis Hetua35d8232015-06-11 17:11:06 -04004481 break;
4482
4483 case 223:
4484
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004485 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4486
Alexis Hetu76a343a2015-06-04 17:21:22 -04004487 break;
4488
4489 case 224:
4490
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004491 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4492
Alexis Hetu76a343a2015-06-04 17:21:22 -04004493 break;
4494
4495 case 225:
4496
Alexis Hetuad527752015-07-07 13:31:44 -04004497 { (yyval.interm.intermAggregate) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004498
Alexis Hetue5246692015-06-18 12:34:52 -04004499 break;
4500
4501 case 226:
4502
Alexis Hetuad527752015-07-07 13:31:44 -04004503 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004504
Alexis Hetuad527752015-07-07 13:31:44 -04004505 break;
4506
4507 case 227:
4508
4509 { context->symbolTable.pop(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004510
Alexis Hetuad527752015-07-07 13:31:44 -04004511 break;
4512
4513 case 228:
4514
Nicolas Capens7d626792015-02-17 17:58:31 -05004515 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004516 if ((yyvsp[-2].interm.intermAggregate) != 0) {
4517 (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence);
4518 (yyvsp[-2].interm.intermAggregate)->setEndLine((yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004519 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004520 (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate);
Nicolas Capens7d626792015-02-17 17:58:31 -05004521 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004522
Nicolas Capens7d626792015-02-17 17:58:31 -05004523 break;
4524
Alexis Hetua35d8232015-06-11 17:11:06 -04004525 case 229:
4526
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004527 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4528
Alexis Hetua35d8232015-06-11 17:11:06 -04004529 break;
4530
4531 case 230:
4532
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004533 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4534
Alexis Hetu76a343a2015-06-04 17:21:22 -04004535 break;
4536
4537 case 231:
4538
Alexis Hetue5246692015-06-18 12:34:52 -04004539 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004540
Alexis Hetu76a343a2015-06-04 17:21:22 -04004541 break;
4542
4543 case 232:
4544
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004545 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4546
Alexis Hetue5246692015-06-18 12:34:52 -04004547 break;
4548
4549 case 233:
4550
Alexis Hetuad527752015-07-07 13:31:44 -04004551 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004552
Alexis Hetuad527752015-07-07 13:31:44 -04004553 break;
4554
4555 case 234:
4556
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004557 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4558
Alexis Hetuad527752015-07-07 13:31:44 -04004559 break;
4560
4561 case 235:
4562
John Bauman66b8ab22014-05-06 15:57:45 -04004563 {
4564 (yyval.interm.intermNode) = 0;
4565 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004566
John Bauman66b8ab22014-05-06 15:57:45 -04004567 break;
4568
Alexis Hetuad527752015-07-07 13:31:44 -04004569 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004570
4571 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004572 if ((yyvsp[-1].interm.intermAggregate)) {
4573 (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence);
4574 (yyvsp[-1].interm.intermAggregate)->setEndLine((yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004575 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004576 (yyval.interm.intermNode) = (yyvsp[-1].interm.intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004577 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004578
John Bauman66b8ab22014-05-06 15:57:45 -04004579 break;
4580
Alexis Hetuad527752015-07-07 13:31:44 -04004581 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004582
4583 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004584 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004585 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004586
John Bauman66b8ab22014-05-06 15:57:45 -04004587 break;
4588
Alexis Hetuad527752015-07-07 13:31:44 -04004589 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004590
4591 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004592 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004593 }
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 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004598
4599 { (yyval.interm.intermNode) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004600
John Bauman66b8ab22014-05-06 15:57:45 -04004601 break;
4602
Alexis Hetuad527752015-07-07 13:31:44 -04004603 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004604
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004605 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
4606
John Bauman66b8ab22014-05-06 15:57:45 -04004607 break;
4608
Alexis Hetuad527752015-07-07 13:31:44 -04004609 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004610
4611 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004612 if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004613 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004614 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
John Bauman66b8ab22014-05-06 15:57:45 -04004615 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004616
John Bauman66b8ab22014-05-06 15:57:45 -04004617 break;
4618
Alexis Hetuad527752015-07-07 13:31:44 -04004619 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004620
4621 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004622 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
4623 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004624 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004625
John Bauman66b8ab22014-05-06 15:57:45 -04004626 break;
4627
Alexis Hetuad527752015-07-07 13:31:44 -04004628 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004629
4630 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004631 (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004632 (yyval.interm.nodePair).node2 = 0;
4633 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004634
John Bauman66b8ab22014-05-06 15:57:45 -04004635 break;
4636
Alexis Hetuad527752015-07-07 13:31:44 -04004637 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004638
Alexis Hetue5246692015-06-18 12:34:52 -04004639 { context->incrSwitchNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004640
Alexis Hetu76a343a2015-06-04 17:21:22 -04004641 break;
4642
Alexis Hetuad527752015-07-07 13:31:44 -04004643 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004644
4645 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004646 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5]));
Alexis Hetue5246692015-06-18 12:34:52 -04004647 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004648 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004649
Alexis Hetu76a343a2015-06-04 17:21:22 -04004650 break;
4651
Alexis Hetuad527752015-07-07 13:31:44 -04004652 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004653
4654 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004655 (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004656 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004657
Alexis Hetu76a343a2015-06-04 17:21:22 -04004658 break;
4659
Alexis Hetuad527752015-07-07 13:31:44 -04004660 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004661
4662 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004663 (yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
Alexis Hetue5246692015-06-18 12:34:52 -04004664 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004665
Alexis Hetue5246692015-06-18 12:34:52 -04004666 break;
4667
Alexis Hetuad527752015-07-07 13:31:44 -04004668 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004669
4670 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004671 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
4672 if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004673 context->recover();
4674 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004675
John Bauman66b8ab22014-05-06 15:57:45 -04004676 break;
4677
Alexis Hetuad527752015-07-07 13:31:44 -04004678 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004679
4680 {
4681 TIntermNode* intermNode;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004682 if (context->structQualifierErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004683 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004684 if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004685 context->recover();
4686
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004687 if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode))
4688 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004689 else {
4690 context->recover();
4691 (yyval.interm.intermTypedNode) = 0;
4692 }
4693 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004694
John Bauman66b8ab22014-05-06 15:57:45 -04004695 break;
4696
Alexis Hetuad527752015-07-07 13:31:44 -04004697 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004698
Alexis Hetu0a655842015-06-22 16:52:11 -04004699 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004700
John Bauman66b8ab22014-05-06 15:57:45 -04004701 break;
4702
Alexis Hetuad527752015-07-07 13:31:44 -04004703 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004704
4705 {
4706 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004707 (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 -04004708 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004709 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004710
John Bauman66b8ab22014-05-06 15:57:45 -04004711 break;
4712
Alexis Hetuad527752015-07-07 13:31:44 -04004713 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004714
Alexis Hetu0a655842015-06-22 16:52:11 -04004715 { context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004716
John Bauman66b8ab22014-05-06 15:57:45 -04004717 break;
4718
Alexis Hetuad527752015-07-07 13:31:44 -04004719 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004720
4721 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004722 if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004723 context->recover();
4724
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004725 (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 -04004726 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004727 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004728
John Bauman66b8ab22014-05-06 15:57:45 -04004729 break;
4730
Alexis Hetuad527752015-07-07 13:31:44 -04004731 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004732
Alexis Hetu0a655842015-06-22 16:52:11 -04004733 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004734
Nicolas Capens3c20f802015-02-17 17:17:20 -05004735 break;
4736
Alexis Hetuad527752015-07-07 13:31:44 -04004737 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004738
4739 {
Alexis Hetue5246692015-06-18 12:34:52 -04004740 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004741 (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 -04004742 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004743 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004744
Alexis Hetu17809052015-05-13 11:28:22 -04004745 break;
4746
Alexis Hetu76a343a2015-06-04 17:21:22 -04004747 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004748
4749 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004750 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004751 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004752
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004753 break;
4754
Alexis Hetu76a343a2015-06-04 17:21:22 -04004755 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004756
4757 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004758 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004759 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004760
Alexis Hetue5246692015-06-18 12:34:52 -04004761 break;
4762
4763 case 258:
4764
4765 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004766 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004767 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004768
Alexis Hetuad527752015-07-07 13:31:44 -04004769 break;
4770
4771 case 259:
4772
4773 {
4774 (yyval.interm.intermTypedNode) = 0;
4775 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004776
Alexis Hetuad527752015-07-07 13:31:44 -04004777 break;
4778
4779 case 260:
4780
4781 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004782 (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004783 (yyval.interm.nodePair).node2 = 0;
4784 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004785
Alexis Hetu17809052015-05-13 11:28:22 -04004786 break;
4787
Alexis Hetuad527752015-07-07 13:31:44 -04004788 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004789
4790 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004791 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
4792 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004793 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004794
Alexis Hetu17809052015-05-13 11:28:22 -04004795 break;
4796
Alexis Hetuad527752015-07-07 13:31:44 -04004797 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004798
4799 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004800 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
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 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004806
4807 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004808 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004809 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004810
Alexis Hetu17809052015-05-13 11:28:22 -04004811 break;
4812
Alexis Hetuad527752015-07-07 13:31:44 -04004813 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004814
4815 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004816 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004817 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004818
Alexis Hetu17809052015-05-13 11:28:22 -04004819 break;
4820
Alexis Hetuad527752015-07-07 13:31:44 -04004821 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004822
4823 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004824 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu17809052015-05-13 11:28:22 -04004825 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004826
Alexis Hetu17809052015-05-13 11:28:22 -04004827 break;
4828
Alexis Hetuad527752015-07-07 13:31:44 -04004829 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004830
4831 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004832 FRAG_ONLY("discard", (yylsp[-1]));
4833 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004834 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004835
Alexis Hetu17809052015-05-13 11:28:22 -04004836 break;
4837
Alexis Hetuad527752015-07-07 13:31:44 -04004838 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004839
4840 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004841 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004842 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004843 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004844
Alexis Hetu17809052015-05-13 11:28:22 -04004845 break;
4846
Alexis Hetuad527752015-07-07 13:31:44 -04004847 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004848
4849 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004850 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004851 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004852 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004853
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004854 break;
4855
Alexis Hetue5246692015-06-18 12:34:52 -04004856 case 269:
4857
4858 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004859 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004860 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004861
Alexis Hetuad527752015-07-07 13:31:44 -04004862 break;
4863
4864 case 270:
4865
4866 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004867 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004868 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004869
Alexis Hetuad527752015-07-07 13:31:44 -04004870 break;
4871
4872 case 271:
4873
4874 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004875 TFunction* function = (yyvsp[0].interm).function;
John Bauman66b8ab22014-05-06 15:57:45 -04004876
Alexis Hetu0a655842015-06-22 16:52:11 -04004877 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004878
4879 if (builtIn)
4880 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004881 context->error((yylsp[0]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004882 context->recover();
4883 }
4884
Alexis Hetu0a655842015-06-22 16:52:11 -04004885 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004886 //
4887 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4888 // as it would have just been put in the symbol table. Otherwise, we're looking up
4889 // an earlier occurance.
4890 //
4891 if (prevDec->isDefined()) {
4892 //
4893 // Then this function already has a body.
4894 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004895 context->error((yylsp[0]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004896 context->recover();
4897 }
4898 prevDec->setDefined();
4899
4900 //
4901 // Raise error message if main function takes any parameters or return anything other than void
4902 //
4903 if (function->getName() == "main") {
4904 if (function->getParamCount() > 0) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004905 context->error((yylsp[0]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004906 context->recover();
4907 }
4908 if (function->getReturnType().getBasicType() != EbtVoid) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004909 context->error((yylsp[0]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004910 context->recover();
4911 }
4912 }
4913
4914 //
4915 // Remember the return type for later checking for RETURN statements.
4916 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004917 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4918 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004919
4920 //
4921 // Insert parameters into the symbol table.
4922 // If the parameter has no name, it's not an error, just don't insert it
4923 // (could be used for unused args).
4924 //
4925 // Also, accumulate the list of parameters into the HIL, so lower level code
4926 // knows where to find parameters.
4927 //
4928 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004929 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004930 const TParameter& param = function->getParam(i);
4931 if (param.name != 0) {
4932 TVariable *variable = new TVariable(param.name, *param.type);
4933 //
4934 // Insert the parameters with name in the symbol table.
4935 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004936 if (! context->symbolTable.declare(*variable)) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004937 context->error((yylsp[0]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004938 context->recover();
4939 delete variable;
4940 }
4941
4942 //
4943 // Add the parameter to the HIL
4944 //
4945 paramNodes = context->intermediate.growAggregate(
4946 paramNodes,
4947 context->intermediate.addSymbol(variable->getUniqueId(),
4948 variable->getName(),
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004949 variable->getType(), (yylsp[0])),
4950 (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004951 } else {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004952 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[0])), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004953 }
4954 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004955 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[0]));
4956 (yyvsp[0].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004957 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004958 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004959
John Bauman66b8ab22014-05-06 15:57:45 -04004960 break;
4961
Alexis Hetuad527752015-07-07 13:31:44 -04004962 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004963
4964 {
4965 //?? Check that all paths return a value if return type != void ?
4966 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004967 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004968 context->error((yylsp[-2]), "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004969 context->recover();
4970 }
4971
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004972 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermNode), (yyloc));
4973 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[-2]));
4974 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str());
4975 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[-2].interm).function->getReturnType());
John Bauman66b8ab22014-05-06 15:57:45 -04004976
4977 // store the pragma information for debug and optimize and other vendor specific
4978 // information. This information can be queried from the parse tree
4979 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4980 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4981
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004982 if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsAggregate())
4983 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[0].interm.intermNode)->getAsAggregate()->getEndLine());
John Bauman66b8ab22014-05-06 15:57:45 -04004984
4985 context->symbolTable.pop();
4986 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004987
John Bauman66b8ab22014-05-06 15:57:45 -04004988 break;
4989
4990
4991
4992 default: break;
4993 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004994 /* User semantic actions sometimes alter yychar, and that requires
4995 that yytoken be updated with the new translation. We take the
4996 approach of translating immediately before every use of yytoken.
4997 One alternative is translating here after every semantic action,
4998 but that translation would be missed if the semantic action invokes
4999 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5000 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5001 incorrect destructor might then be invoked immediately. In the
5002 case of YYERROR or YYBACKUP, subsequent parser actions might lead
5003 to an incorrect destructor call or verbose syntax error message
5004 before the lookahead is translated. */
John Bauman66b8ab22014-05-06 15:57:45 -04005005 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5006
5007 YYPOPSTACK (yylen);
5008 yylen = 0;
5009 YY_STACK_PRINT (yyss, yyssp);
5010
5011 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005012 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005013
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005014 /* Now 'shift' the result of the reduction. Determine what state
John Bauman66b8ab22014-05-06 15:57:45 -04005015 that goes to, based on the state we popped back to and the rule
5016 number reduced by. */
5017
5018 yyn = yyr1[yyn];
5019
5020 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5021 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5022 yystate = yytable[yystate];
5023 else
5024 yystate = yydefgoto[yyn - YYNTOKENS];
5025
5026 goto yynewstate;
5027
5028
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005029/*--------------------------------------.
5030| yyerrlab -- here on detecting error. |
5031`--------------------------------------*/
John Bauman66b8ab22014-05-06 15:57:45 -04005032yyerrlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005033 /* Make sure we have latest lookahead translation. See comments at
5034 user semantic actions for why this is necessary. */
5035 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5036
John Bauman66b8ab22014-05-06 15:57:45 -04005037 /* If not already recovering from an error, report this error. */
5038 if (!yyerrstatus)
5039 {
5040 ++yynerrs;
5041#if ! YYERROR_VERBOSE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005042 yyerror (&yylloc, context, yyscanner, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04005043#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005044# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5045 yyssp, yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04005046 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005047 char const *yymsgp = YY_("syntax error");
5048 int yysyntax_error_status;
5049 yysyntax_error_status = YYSYNTAX_ERROR;
5050 if (yysyntax_error_status == 0)
5051 yymsgp = yymsg;
5052 else if (yysyntax_error_status == 1)
5053 {
5054 if (yymsg != yymsgbuf)
5055 YYSTACK_FREE (yymsg);
5056 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5057 if (!yymsg)
5058 {
5059 yymsg = yymsgbuf;
5060 yymsg_alloc = sizeof yymsgbuf;
5061 yysyntax_error_status = 2;
5062 }
5063 else
5064 {
5065 yysyntax_error_status = YYSYNTAX_ERROR;
5066 yymsgp = yymsg;
5067 }
5068 }
5069 yyerror (&yylloc, context, yyscanner, yymsgp);
5070 if (yysyntax_error_status == 2)
5071 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04005072 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005073# undef YYSYNTAX_ERROR
John Bauman66b8ab22014-05-06 15:57:45 -04005074#endif
5075 }
5076
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005077 yyerror_range[1] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005078
5079 if (yyerrstatus == 3)
5080 {
5081 /* If just tried and failed to reuse lookahead token after an
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005082 error, discard it. */
John Bauman66b8ab22014-05-06 15:57:45 -04005083
5084 if (yychar <= YYEOF)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005085 {
5086 /* Return failure if at end of input. */
5087 if (yychar == YYEOF)
5088 YYABORT;
5089 }
John Bauman66b8ab22014-05-06 15:57:45 -04005090 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005091 {
5092 yydestruct ("Error: discarding",
5093 yytoken, &yylval, &yylloc, context, yyscanner);
5094 yychar = YYEMPTY;
5095 }
John Bauman66b8ab22014-05-06 15:57:45 -04005096 }
5097
5098 /* Else will try to reuse lookahead token after shifting the error
5099 token. */
5100 goto yyerrlab1;
5101
5102
5103/*---------------------------------------------------.
5104| yyerrorlab -- error raised explicitly by YYERROR. |
5105`---------------------------------------------------*/
5106yyerrorlab:
5107
5108 /* Pacify compilers like GCC when the user code never invokes
5109 YYERROR and the label yyerrorlab therefore never appears in user
5110 code. */
5111 if (/*CONSTCOND*/ 0)
5112 goto yyerrorlab;
5113
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005114 yyerror_range[1] = yylsp[1-yylen];
5115 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005116 this YYERROR. */
5117 YYPOPSTACK (yylen);
5118 yylen = 0;
5119 YY_STACK_PRINT (yyss, yyssp);
5120 yystate = *yyssp;
5121 goto yyerrlab1;
5122
5123
5124/*-------------------------------------------------------------.
5125| yyerrlab1 -- common code for both syntax error and YYERROR. |
5126`-------------------------------------------------------------*/
5127yyerrlab1:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005128 yyerrstatus = 3; /* Each real token shifted decrements this. */
John Bauman66b8ab22014-05-06 15:57:45 -04005129
5130 for (;;)
5131 {
5132 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005133 if (!yypact_value_is_default (yyn))
5134 {
5135 yyn += YYTERROR;
5136 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5137 {
5138 yyn = yytable[yyn];
5139 if (0 < yyn)
5140 break;
5141 }
5142 }
John Bauman66b8ab22014-05-06 15:57:45 -04005143
5144 /* Pop the current state because it cannot handle the error token. */
5145 if (yyssp == yyss)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005146 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04005147
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005148 yyerror_range[1] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005149 yydestruct ("Error: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005150 yystos[yystate], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005151 YYPOPSTACK (1);
5152 yystate = *yyssp;
5153 YY_STACK_PRINT (yyss, yyssp);
5154 }
5155
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005156 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04005157 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005158 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04005159
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005160 yyerror_range[2] = yylloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005161 /* Using YYLLOC is tempting, but would change the location of
5162 the lookahead. YYLOC is available though. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005163 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005164 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005165
5166 /* Shift the error token. */
5167 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5168
5169 yystate = yyn;
5170 goto yynewstate;
5171
5172
5173/*-------------------------------------.
5174| yyacceptlab -- YYACCEPT comes here. |
5175`-------------------------------------*/
5176yyacceptlab:
5177 yyresult = 0;
5178 goto yyreturn;
5179
5180/*-----------------------------------.
5181| yyabortlab -- YYABORT comes here. |
5182`-----------------------------------*/
5183yyabortlab:
5184 yyresult = 1;
5185 goto yyreturn;
5186
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005187#if !defined yyoverflow || YYERROR_VERBOSE
John Bauman66b8ab22014-05-06 15:57:45 -04005188/*-------------------------------------------------.
5189| yyexhaustedlab -- memory exhaustion comes here. |
5190`-------------------------------------------------*/
5191yyexhaustedlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005192 yyerror (&yylloc, context, yyscanner, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005193 yyresult = 2;
5194 /* Fall through. */
5195#endif
5196
5197yyreturn:
5198 if (yychar != YYEMPTY)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005199 {
5200 /* Make sure we have latest lookahead translation. See comments at
5201 user semantic actions for why this is necessary. */
5202 yytoken = YYTRANSLATE (yychar);
5203 yydestruct ("Cleanup: discarding lookahead",
5204 yytoken, &yylval, &yylloc, context, yyscanner);
5205 }
5206 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005207 this YYABORT or YYACCEPT. */
5208 YYPOPSTACK (yylen);
5209 YY_STACK_PRINT (yyss, yyssp);
5210 while (yyssp != yyss)
5211 {
5212 yydestruct ("Cleanup: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005213 yystos[*yyssp], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005214 YYPOPSTACK (1);
5215 }
5216#ifndef yyoverflow
5217 if (yyss != yyssa)
5218 YYSTACK_FREE (yyss);
5219#endif
5220#if YYERROR_VERBOSE
5221 if (yymsg != yymsgbuf)
5222 YYSTACK_FREE (yymsg);
5223#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005224 return yyresult;
John Bauman66b8ab22014-05-06 15:57:45 -04005225}
5226
5227
5228
John Bauman66b8ab22014-05-06 15:57:45 -04005229int glslang_parse(TParseContext* context) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005230 return yyparse(context, context->getScanner());
John Bauman66b8ab22014-05-06 15:57:45 -04005231}