blob: 753c8440cb8c567b5daff6d6dec30bea12cdf49a [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. */
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400631#define YYLAST 2513
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
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400815#define YYPACT_NINF -355
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400816
817#define yypact_value_is_default(Yystate) \
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400818 (!!((Yystate) == (-355)))
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400819
820#define YYTABLE_NINF -232
821
822#define yytable_value_is_error(Yytable_value) \
823 0
824
825 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
826 STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -0400827static const yytype_int16 yypact[] =
828{
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400829 2151, 207, -355, -355, -355, 168, -355, -355, -355, -355,
830 -355, -355, -355, -355, -355, -355, -355, -355, -355, -355,
831 -355, -355, -355, -355, -355, -355, -355, -355, -355, -355,
832 -355, -355, -355, -355, -355, -355, -355, -3, -355, -355,
833 -56, -355, -355, -355, -355, -355, -355, -355, -355, -355,
834 -355, -355, -355, -355, -355, -355, -355, -355, -61, -355,
835 -355, -39, -18, -5, 4, -57, -355, 37, 10, 1170,
836 -355, -355, 2436, 10, -355, 22, -355, 2076, -355, -355,
837 -355, -355, 10, -355, 2436, -355, -355, 27, -355, 69,
838 -355, 41, -355, 61, -355, -355, -355, -355, -355, 2300,
839 136, 76, -355, -78, -355, 47, -355, 2226, -355, -355,
840 -355, 1240, -355, -355, -355, 1, -355, 2226, 44, -63,
841 -355, 50, -355, -355, -355, -355, 137, 2300, -79, -355,
842 1338, 1629, -355, 226, 2300, 138, 1821, -355, 113, -355,
843 -355, -355, -355, -355, 1629, 1629, 1629, -355, -355, -355,
844 -355, -355, -355, -355, 38, -355, -355, -355, 115, -23,
845 1724, 114, -355, 1629, 68, -45, 13, -58, 36, 96,
846 98, 101, 135, 139, -71, -355, 121, -355, -355, 2226,
847 1906, 83, -355, 69, -355, 630, 123, -355, -355, 1436,
848 1629, 117, 124, 190, -355, -355, -355, 138, 130, 7,
849 -355, -54, -355, -355, -355, -355, -13, -355, -355, 1629,
850 2368, -355, -355, 1629, 133, -355, -355, -355, 1629, 1629,
851 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629,
852 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1629, -355, 1991,
853 -355, -355, -355, -355, 126, 127, -355, 140, 141, 142,
854 1534, 145, 1629, 143, 148, -355, 29, -355, -39, 149,
855 -355, -355, -355, -355, 630, -355, -355, -355, -355, -355,
856 -355, 1629, 150, 147, -355, 1629, 155, -355, -355, -355,
857 -355, -355, -355, -355, -355, -355, -355, -355, 1629, 39,
858 1629, 138, -355, -73, -355, -355, 1629, 164, 151, -355,
859 169, -355, -355, -355, -355, -355, 68, 68, -45, -45,
860 13, 13, 13, 13, -58, -58, 36, 96, 98, 101,
861 135, 139, 55, -355, -355, -355, 166, -355, 1629, -355,
862 -355, 40, 1629, 160, -355, -355, -355, -355, 171, 174,
863 1629, 181, -355, 1629, -355, -355, 175, -355, 1629, -355,
864 -355, -355, 1629, 239, 188, 862, 978, -11, -355, -1,
865 -355, 1075, -355, -355, -355, 1629, -355, -355, 191, -355,
866 193, 398, -355, -355, -355, -355, 1075, 166, -355, 151,
867 223, 2300, 195, -355, 187, 1629, -355, 514, -355, 192,
868 197, 288, -355, 41, 194, 746, -355, 11, -355, 1629,
869 746, 166, -355, 1629, -355, -355, -355, 196, 151, -355,
870 -355, -355, -355
John 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,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400890 150, 226, 272, 97, 102, 104, 109, 0, 111, 98,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400891 0, 0, 85, 0, 0, 0, 0, 206, 2, 6,
892 4, 5, 7, 28, 0, 0, 0, 156, 35, 34,
893 36, 33, 3, 9, 29, 11, 16, 17, 0, 0,
894 22, 0, 37, 0, 41, 44, 47, 52, 55, 57,
895 59, 61, 63, 65, 67, 84, 0, 26, 88, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400896 0, 0, 149, 0, 225, 0, 99, 101, 103, 0,
897 0, 0, 0, 37, 69, 214, 121, 0, 212, 0,
898 210, 0, 207, 30, 31, 82, 0, 13, 14, 0,
899 0, 20, 19, 0, 158, 23, 25, 32, 0, 0,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400900 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400901 0, 0, 0, 0, 0, 0, 0, 0, 157, 0,
902 205, 153, 154, 151, 0, 0, 252, 0, 0, 0,
903 0, 0, 0, 0, 0, 239, 0, 215, 0, 144,
904 218, 237, 217, 216, 227, 219, 220, 221, 222, 223,
905 224, 0, 0, 0, 115, 0, 118, 72, 73, 75,
906 74, 77, 78, 79, 80, 81, 76, 71, 0, 0,
907 0, 0, 208, 0, 89, 8, 0, 0, 15, 27,
908 12, 18, 24, 38, 39, 40, 43, 42, 45, 46,
909 50, 51, 48, 49, 53, 54, 56, 58, 60, 62,
910 64, 66, 0, 203, 263, 262, 233, 254, 0, 266,
911 264, 0, 0, 0, 247, 250, 240, 238, 0, 0,
912 0, 112, 119, 0, 70, 209, 0, 211, 0, 90,
913 83, 10, 0, 0, 0, 0, 0, 0, 265, 0,
914 246, 0, 228, 100, 113, 0, 120, 213, 0, 68,
915 0, 0, 232, 234, 257, 256, 259, 233, 244, 248,
916 0, 0, 0, 114, 0, 0, 235, 0, 258, 0,
917 0, 243, 241, 0, 0, 0, 91, 0, 236, 260,
918 0, 233, 245, 0, 230, 251, 229, 0, 261, 255,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400919 242, 249, 253
920};
921
922 /* YYPGOTO[NTERM-NUM]. */
John Bauman66b8ab22014-05-06 15:57:45 -0400923static const yytype_int16 yypgoto[] =
924{
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400925 -355, -355, -355, -355, -355, -355, -355, 99, -355, -355,
926 -355, -355, -25, -355, -52, -42, -95, -38, 77, 79,
927 81, 78, 80, 82, -355, -106, -128, -355, -142, -115,
928 -355, 12, 14, -355, -355, -355, 189, 224, 219, 198,
929 -355, -355, -336, 9, -355, -100, 8, -68, 315, -355,
930 -355, 144, 0, -355, -355, -355, -355, -101, -125, 125,
931 30, -182, -32, -258, -337, -89, -355, -355, -74, -354,
932 -355, -355, -26, -41, -27, -355, -355, -355, -355, -355,
933 -44, -355, -355, -355, -355, -355, -355, -355, -355, -355,
934 254, -355, -355
John 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{
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400940 -1, 152, 153, 154, 297, 155, 156, 157, 158, 159,
941 160, 161, 193, 163, 164, 165, 166, 167, 168, 169,
942 170, 171, 172, 173, 174, 194, 205, 288, 256, 176,
943 107, 257, 258, 62, 63, 64, 124, 98, 99, 125,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400944 65, 66, 67, 68, 100, 69, 70, 71, 72, 73,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400945 119, 120, 177, 75, 76, 179, 117, 136, 137, 199,
946 200, 196, 260, 261, 262, 263, 185, 338, 405, 353,
947 354, 355, 406, 264, 265, 266, 392, 267, 393, 268,
948 382, 269, 361, 326, 356, 376, 389, 390, 270, 77,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400949 78, 79, 91
950};
951
952 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
953 positive, shift that token. If negative, reduce the rule whose
954 number is the opposite. If YYTABLE_NINF, syntax error. */
John Bauman66b8ab22014-05-06 15:57:45 -0400955static const yytype_int16 yytable[] =
956{
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400957 74, 108, 122, 195, 206, 175, 337, 134, 274, 83,
958 82, 202, 60, 94, 61, 192, 180, 134, 373, 7,
959 87, 236, 293, 391, 175, 380, 129, 189, 130, 225,
960 226, 126, 215, 348, 190, 131, 134, 85, 86, 135,
961 380, 349, 182, 89, 95, 96, 97, 410, 183, 135,
962 27, 28, 88, 29, 101, 202, 237, 102, 404, 126,
963 294, 37, 195, 404, 227, 228, 197, 298, 135, 74,
964 94, 221, 109, 222, 273, 90, 104, 74, 239, 134,
965 134, 110, 212, 175, 115, 302, 162, 92, 213, 60,
966 114, 61, 295, 342, 377, 322, 223, 224, 296, 74,
967 296, 95, 96, 97, 378, 162, 93, 74, 331, -94,
968 296, 135, 135, 103, 202, 178, 407, 74, 291, 203,
969 204, 292, 296, 207, 208, 229, 230, 74, 111, 337,
970 310, 311, 312, 313, 74, 116, 74, 333, 217, 134,
971 296, 83, 82, 336, 209, 118, 175, 195, 210, 121,
972 291, 296, 128, 345, 358, 132, 339, 181, 364, 184,
973 344, 366, 241, 242, 162, 175, 296, 352, 350, 306,
974 307, 135, 2, 3, 4, 346, 95, 96, 97, 74,
975 74, 308, 309, 383, 175, 259, 357, 218, 219, 220,
976 359, 314, 315, 303, 304, 305, 162, 162, 162, 162,
Alexis Hetuad527752015-07-07 13:31:44 -0400977 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400978 162, 162, 195, 186, 198, 195, 7, -27, 216, 379,
979 211, 411, 231, 232, 369, 233, 234, 162, 238, 271,
980 275, 276, 235, 368, 379, 7, 290, 195, -21, 74,
981 324, 325, 175, 397, 327, 328, 162, 27, 28, 332,
982 29, 80, 335, -26, 341, 334, 329, 408, 37, 38,
983 39, 381, 296, 340, 259, 162, 27, 28, 343, 29,
984 80, 351, 360, -28, -231, 195, 381, 37, 38, 39,
985 362, 363, 367, 81, 277, 278, 279, 280, 281, 282,
986 283, 284, 285, 286, 365, 370, 371, 385, 384, 394,
987 395, 396, 400, 287, 402, 401, 399, 403, 316, 301,
988 412, 317, 319, 108, 318, 320, 187, 123, 321, 127,
989 84, 347, 289, 162, 374, 188, 409, 243, 372, 375,
990 387, 113, 388, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -0400992 0, 0, 0, 0, 0, 259, 259, 0, 0, 0,
993 0, 259, 0, 0, 0, 0, 0, 0, 0, 0,
994 0, 259, 0, 0, 0, 0, 259, 0, 0, 0,
995 0, 74, 0, 0, 0, 0, 0, 259, 0, 0,
996 0, 0, 0, 0, 0, 259, 0, 0, 0, 0,
997 259, 1, 2, 3, 4, 5, 6, 7, 8, 9,
998 10, 11, 244, 245, 246, 0, 247, 248, 249, 250,
999 251, 252, 253, 12, 13, 14, 15, 16, 17, 18,
1000 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1001 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1002 38, 39, 40, 41, 254, 42, 43, 44, 0, 45,
1003 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1004 55, 56, 57, 58, 138, 59, 139, 140, 141, 142,
1005 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001006 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001007 0, 0, 146, 0, 0, 0, 121, 386, 0, 0,
1008 0, 0, 255, 148, 149, 150, 151, 1, 2, 3,
1009 4, 5, 6, 7, 8, 9, 10, 11, 244, 245,
1010 246, 0, 247, 248, 249, 250, 251, 252, 253, 12,
1011 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1012 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1013 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1014 254, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1015 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1016 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1017 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1018 0, 0, 0, 0, 0, 0, 0, 0, 146, 0,
1019 0, 0, 121, 398, 0, 0, 0, 0, 255, 148,
1020 149, 150, 151, 1, 2, 3, 4, 5, 6, 7,
1021 8, 9, 10, 11, 244, 245, 246, 0, 247, 248,
1022 249, 250, 251, 252, 253, 12, 13, 14, 15, 16,
Alexis Hetue5246692015-06-18 12:34:52 -04001023 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1024 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001025 36, 37, 38, 39, 40, 41, 254, 42, 43, 44,
Alexis Hetue5246692015-06-18 12:34:52 -04001026 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001027 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1028 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001030 0, 0, 0, 0, 146, 0, 0, 0, 121, 0,
1031 0, 0, 0, 0, 255, 148, 149, 150, 151, 1,
Alexis Hetue5246692015-06-18 12:34:52 -04001032 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001033 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
1034 253, 12, 13, 14, 15, 16, 17, 18, 19, 20,
Alexis Hetue5246692015-06-18 12:34:52 -04001035 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1036 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001037 40, 41, 254, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001038 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001039 57, 58, 138, 59, 139, 140, 141, 142, 143, 0,
1040 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001042 146, 0, 0, 0, 371, 0, 0, 0, 0, 0,
1043 255, 148, 149, 150, 151, 1, 2, 3, 4, 5,
1044 6, 7, 8, 9, 10, 11, 244, 245, 246, 0,
1045 247, 248, 249, 250, 251, 252, 253, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001046 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001047 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001048 34, 35, 36, 37, 38, 39, 40, 41, 254, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001049 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001050 52, 53, 54, 0, 55, 56, 57, 58, 138, 59,
1051 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001053 0, 0, 0, 0, 0, 0, 146, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001054 0, 0, 0, 0, 0, 0, 255, 148, 149, 150,
Alexis Hetuad527752015-07-07 13:31:44 -04001055 151, 1, 2, 3, 4, 5, 6, 7, 8, 9,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001056 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1057 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetue5246692015-06-18 12:34:52 -04001058 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1059 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001060 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
Alexis Hetue5246692015-06-18 12:34:52 -04001061 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001062 55, 56, 57, 58, 138, 59, 139, 140, 141, 142,
1063 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001064 0, 0, 0, 0, 0, 0, 0, 0, 133, 2,
1065 3, 4, 146, 6, 7, 8, 9, 10, 11, 0,
1066 0, 0, 255, 148, 149, 150, 151, 0, 0, 0,
1067 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1068 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1069 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1070 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1071 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1072 58, 138, 59, 139, 140, 141, 142, 143, 0, 0,
1073 144, 145, 0, 0, 0, 0, 0, 0, 0, 0,
1074 0, 0, 0, 0, 2, 3, 4, 0, 0, 146,
1075 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1076 148, 149, 150, 151, 0, 12, 13, 14, 15, 16,
1077 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1078 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1079 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1080 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1081 54, 0, 55, 56, 57, 0, 105, 59, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001082 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1083 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1084 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001085 0, 0, 0, 0, 106, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001086 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001087 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001088 54, 0, 55, 56, 57, 0, 138, 59, 139, 140,
1089 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001091 0, 0, 0, 0, 146, 0, 0, 147, 8, 9,
Alexis Hetuad527752015-07-07 13:31:44 -04001092 10, 11, 0, 0, 0, 148, 149, 150, 151, 0,
1093 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1094 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1095 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1096 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1097 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1098 55, 56, 57, 0, 138, 59, 139, 140, 141, 142,
1099 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001101 0, 0, 146, 0, 0, 191, 8, 9, 10, 11,
1102 0, 0, 0, 148, 149, 150, 151, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001103 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1104 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1105 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001106 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001107 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001108 57, 0, 138, 59, 139, 140, 141, 142, 143, 0,
1109 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1111 146, 0, 0, 272, 8, 9, 10, 11, 0, 0,
1112 0, 148, 149, 150, 151, 0, 0, 0, 0, 12,
1113 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1114 23, 24, 25, 26, 0, 0, 0, 0, 0, 31,
1115 32, 33, 34, 35, 36, 0, 0, 0, 40, 41,
1116 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1117 50, 51, 52, 53, 54, 0, 55, 56, 57, 0,
1118 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1119 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1120 0, 0, 0, 0, 0, 0, 0, 0, 146, 8,
1121 9, 10, 11, 0, 0, 0, 0, 0, 330, 148,
1122 149, 150, 151, 0, 12, 13, 14, 15, 16, 17,
1123 18, 19, 20, 21, 22, 23, 24, 25, 26, 0,
1124 0, 0, 0, 0, 31, 32, 33, 34, 35, 36,
1125 0, 0, 0, 40, 41, 0, 42, 43, 44, 0,
1126 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1127 0, 55, 56, 57, 0, 138, 59, 139, 140, 141,
1128 142, 143, 0, 0, 144, 145, 0, 0, 0, 0,
1129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1130 0, 0, 0, 146, 8, 9, 10, 11, 0, 0,
1131 0, 0, 0, 0, 148, 149, 150, 151, 0, 12,
1132 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1133 23, 24, 25, 26, 0, 0, 0, 0, 0, 31,
1134 32, 33, 34, 35, 36, 0, 0, 0, 40, 214,
1135 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1136 50, 51, 52, 53, 54, 0, 55, 56, 57, 0,
1137 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1138 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1139 0, 0, 0, 0, 133, 2, 3, 4, 146, 6,
1140 7, 8, 9, 10, 11, 0, 0, 0, 0, 148,
1141 149, 150, 151, 0, 0, 0, 12, 13, 14, 15,
1142 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1143 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1144 35, 36, 37, 38, 39, 40, 41, 0, 42, 43,
1145 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1146 53, 54, 0, 55, 56, 57, 58, 0, 59, 0,
1147 0, 0, 0, 0, 0, 0, 0, 0, 0, 133,
1148 2, 3, 4, 0, 6, 7, 8, 9, 10, 11,
1149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1150 201, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1151 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1152 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1153 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1154 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1155 57, 58, 0, 59, 0, 0, 0, 0, 0, 0,
1156 0, 0, 0, 0, 133, 2, 3, 4, 0, 6,
1157 7, 8, 9, 10, 11, 0, 0, 0, 0, 0,
1158 0, 0, 0, 0, 0, 240, 12, 13, 14, 15,
1159 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1160 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1161 35, 36, 37, 38, 39, 40, 41, 0, 42, 43,
1162 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1163 53, 54, 0, 55, 56, 57, 58, 0, 59, 0,
1164 0, 0, 0, 0, 0, 0, 112, 0, 0, 1,
1165 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1167 323, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1168 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1169 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1170 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1171 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1172 57, 58, 0, 59, 1, 2, 3, 4, 5, 6,
1173 7, 8, 9, 10, 11, 0, 0, 0, 0, 0,
1174 0, 0, 0, 0, 0, 0, 12, 13, 14, 15,
1175 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1176 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1177 35, 36, 37, 38, 39, 40, 41, 0, 42, 43,
1178 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1179 53, 54, 0, 55, 56, 57, 58, 0, 59, 133,
1180 2, 3, 4, 0, 6, 7, 8, 9, 10, 11,
1181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1182 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1183 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1184 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1185 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1186 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1187 57, 58, 0, 59, 2, 3, 4, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001188 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1189 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1190 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1191 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1192 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1193 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001194 54, 0, 55, 56, 57, 0, 0, 59, 8, 9,
1195 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001196 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1197 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1198 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1199 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1200 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001201 55, 56, 57, 0, 299, 59, 8, 9, 10, 11,
1202 300, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1203 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1204 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1205 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1206 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1207 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1208 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001209};
1210
1211static const yytype_int16 yycheck[] =
1212{
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001213 0, 69, 91, 131, 146, 111, 264, 107, 190, 1,
1214 1, 136, 0, 9, 0, 130, 117, 117, 355, 9,
1215 76, 92, 76, 377, 130, 361, 104, 106, 106, 87,
1216 88, 99, 160, 106, 113, 113, 136, 40, 41, 107,
1217 376, 114, 105, 104, 40, 41, 42, 401, 111, 117,
1218 40, 41, 108, 43, 111, 180, 127, 114, 395, 127,
1219 114, 51, 190, 400, 122, 123, 134, 209, 136, 69,
1220 9, 116, 72, 118, 189, 114, 68, 77, 179, 179,
1221 180, 73, 105, 189, 84, 213, 111, 105, 111, 77,
1222 82, 77, 105, 275, 105, 237, 83, 84, 111, 99,
1223 111, 40, 41, 42, 105, 130, 111, 107, 250, 105,
1224 111, 179, 180, 76, 239, 114, 105, 117, 111, 144,
1225 145, 114, 111, 85, 86, 89, 90, 127, 106, 387,
1226 225, 226, 227, 228, 134, 108, 136, 252, 163, 239,
1227 111, 133, 133, 114, 106, 76, 252, 275, 110, 108,
1228 111, 111, 76, 114, 114, 108, 271, 113, 340, 109,
1229 288, 343, 79, 80, 189, 271, 111, 112, 296, 221,
1230 222, 239, 4, 5, 6, 290, 40, 41, 42, 179,
1231 180, 223, 224, 365, 290, 185, 328, 119, 120, 121,
1232 332, 229, 230, 218, 219, 220, 221, 222, 223, 224,
1233 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
1234 235, 236, 340, 76, 76, 343, 9, 104, 104, 361,
1235 105, 403, 126, 125, 352, 124, 91, 252, 107, 106,
1236 113, 107, 93, 348, 376, 9, 106, 365, 105, 239,
1237 114, 114, 348, 385, 104, 104, 271, 40, 41, 104,
1238 43, 44, 104, 104, 107, 112, 114, 399, 51, 52,
1239 53, 361, 111, 113, 264, 290, 40, 41, 113, 43,
1240 44, 107, 112, 104, 108, 403, 376, 51, 52, 53,
1241 109, 107, 107, 76, 94, 95, 96, 97, 98, 99,
1242 100, 101, 102, 103, 113, 56, 108, 104, 107, 76,
1243 105, 114, 105, 113, 393, 17, 114, 113, 231, 210,
1244 114, 232, 234, 381, 233, 235, 127, 93, 236, 100,
1245 5, 291, 197, 348, 356, 127, 400, 183, 354, 356,
1246 371, 77, 376, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001247 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001248 -1, -1, -1, -1, -1, 355, 356, -1, -1, -1,
1249 -1, 361, -1, -1, -1, -1, -1, -1, -1, -1,
1250 -1, 371, -1, -1, -1, -1, 376, -1, -1, -1,
1251 -1, 381, -1, -1, -1, -1, -1, 387, -1, -1,
1252 -1, -1, -1, -1, -1, 395, -1, -1, -1, -1,
1253 400, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetue5246692015-06-18 12:34:52 -04001254 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1255 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1256 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1257 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1258 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
1259 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1260 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1261 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001263 -1, -1, 104, -1, -1, -1, 108, 109, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001264 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
Alexis Hetuad527752015-07-07 13:31:44 -04001265 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1266 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
Alexis Hetue5246692015-06-18 12:34:52 -04001267 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1268 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1269 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
Alexis Hetuad527752015-07-07 13:31:44 -04001270 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
Alexis Hetue5246692015-06-18 12:34:52 -04001271 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1272 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1273 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001274 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001275 -1, -1, 108, 109, -1, -1, -1, -1, 114, 115,
Alexis Hetuad527752015-07-07 13:31:44 -04001276 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001277 10, 11, 12, 13, 14, 15, 16, -1, 18, 19,
1278 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
Alexis Hetuad527752015-07-07 13:31:44 -04001279 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1280 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001281 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
Alexis Hetuad527752015-07-07 13:31:44 -04001282 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1283 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1284 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1285 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001286 -1, -1, -1, -1, 104, -1, -1, -1, 108, -1,
1287 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1288 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1289 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1290 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1291 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1292 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1293 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1294 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1295 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1296 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1298 104, -1, -1, -1, 108, -1, -1, -1, -1, -1,
1299 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1300 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1301 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetue5246692015-06-18 12:34:52 -04001302 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001303 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1304 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetue5246692015-06-18 12:34:52 -04001305 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001306 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetue5246692015-06-18 12:34:52 -04001307 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001309 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
1310 -1, -1, -1, -1, -1, -1, 114, 115, 116, 117,
1311 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1312 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1313 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1314 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1315 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1316 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1317 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1318 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1319 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1320 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
1321 5, 6, 104, 8, 9, 10, 11, 12, 13, -1,
1322 -1, -1, 114, 115, 116, 117, 118, -1, -1, -1,
1323 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1324 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1325 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1326 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1327 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1328 75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1329 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1330 -1, -1, -1, -1, 4, 5, 6, -1, -1, 104,
1331 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1332 115, 116, 117, 118, -1, 25, 26, 27, 28, 29,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001333 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1334 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1335 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1336 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001337 70, -1, 72, 73, 74, -1, 76, 77, -1, -1,
1338 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1339 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1340 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1341 -1, -1, -1, -1, 114, 45, 46, 47, 48, 49,
1342 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1343 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001344 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1345 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001347 -1, -1, -1, -1, 104, -1, -1, 107, 10, 11,
1348 12, 13, -1, -1, -1, 115, 116, 117, 118, -1,
1349 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1350 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1351 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1352 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1353 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1354 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1355 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001357 -1, -1, 104, -1, -1, 107, 10, 11, 12, 13,
1358 -1, -1, -1, 115, 116, 117, 118, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001359 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1360 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1361 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1362 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1363 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
Alexis Hetuad527752015-07-07 13:31:44 -04001364 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1365 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1367 104, -1, -1, 107, 10, 11, 12, 13, -1, -1,
1368 -1, 115, 116, 117, 118, -1, -1, -1, -1, 25,
1369 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1370 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
1371 46, 47, 48, 49, 50, -1, -1, -1, 54, 55,
1372 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1373 66, 67, 68, 69, 70, -1, 72, 73, 74, -1,
1374 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1375 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1376 -1, -1, -1, -1, -1, -1, -1, -1, 104, 10,
1377 11, 12, 13, -1, -1, -1, -1, -1, 114, 115,
1378 116, 117, 118, -1, 25, 26, 27, 28, 29, 30,
1379 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
1380 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
1381 -1, -1, -1, 54, 55, -1, 57, 58, 59, -1,
1382 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1383 -1, 72, 73, 74, -1, 76, 77, 78, 79, 80,
1384 81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
1385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1386 -1, -1, -1, 104, 10, 11, 12, 13, -1, -1,
1387 -1, -1, -1, -1, 115, 116, 117, 118, -1, 25,
1388 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1389 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
1390 46, 47, 48, 49, 50, -1, -1, -1, 54, 55,
1391 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1392 66, 67, 68, 69, 70, -1, 72, 73, 74, -1,
1393 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1394 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1395 -1, -1, -1, -1, 3, 4, 5, 6, 104, 8,
1396 9, 10, 11, 12, 13, -1, -1, -1, -1, 115,
1397 116, 117, 118, -1, -1, -1, 25, 26, 27, 28,
1398 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1399 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1400 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
1401 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1402 69, 70, -1, 72, 73, 74, 75, -1, 77, -1,
1403 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
1404 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
1405 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1406 109, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1407 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1408 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1409 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1410 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1411 74, 75, -1, 77, -1, -1, -1, -1, -1, -1,
1412 -1, -1, -1, -1, 3, 4, 5, 6, -1, 8,
1413 9, 10, 11, 12, 13, -1, -1, -1, -1, -1,
1414 -1, -1, -1, -1, -1, 109, 25, 26, 27, 28,
1415 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1416 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1417 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
1418 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1419 69, 70, -1, 72, 73, 74, 75, -1, 77, -1,
1420 -1, -1, -1, -1, -1, -1, 0, -1, -1, 3,
1421 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1422 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1423 109, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1424 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1425 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1426 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1427 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1428 74, 75, -1, 77, 3, 4, 5, 6, 7, 8,
1429 9, 10, 11, 12, 13, -1, -1, -1, -1, -1,
1430 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
1431 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1432 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1433 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
1434 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1435 69, 70, -1, 72, 73, 74, 75, -1, 77, 3,
1436 4, 5, 6, -1, 8, 9, 10, 11, 12, 13,
1437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1438 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1439 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1440 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1441 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1442 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1443 74, 75, -1, 77, 4, 5, 6, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001444 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1445 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1446 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1447 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1448 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1449 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001450 70, -1, 72, 73, 74, -1, -1, 77, 10, 11,
1451 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001452 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1453 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1454 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1455 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1456 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001457 72, 73, 74, -1, 76, 77, 10, 11, 12, 13,
1458 82, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1459 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1460 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1461 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1462 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1463 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1464 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001465};
1466
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001467 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1468 symbol of state STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -04001469static const yytype_uint8 yystos[] =
1470{
1471 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001472 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001473 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001474 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1475 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1476 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001477 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001478 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
Alexis Hetuad527752015-07-07 13:31:44 -04001479 44, 76, 171, 174, 176, 40, 41, 76, 108, 104,
1480 114, 220, 105, 111, 9, 40, 41, 42, 165, 166,
1481 172, 111, 114, 76, 174, 76, 114, 158, 175, 180,
1482 174, 106, 0, 218, 174, 180, 108, 184, 76, 178,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001483 179, 108, 193, 165, 164, 167, 175, 166, 76, 104,
Alexis Hetuad527752015-07-07 13:31:44 -04001484 106, 113, 108, 3, 173, 175, 185, 186, 76, 78,
1485 79, 80, 81, 82, 85, 86, 104, 107, 115, 116,
1486 117, 118, 129, 130, 131, 133, 134, 135, 136, 137,
1487 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1488 148, 149, 150, 151, 152, 153, 157, 180, 114, 183,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001489 185, 113, 105, 111, 109, 194, 76, 164, 167, 106,
1490 113, 107, 157, 140, 153, 154, 189, 175, 76, 187,
1491 188, 109, 186, 140, 140, 154, 156, 85, 86, 106,
1492 110, 105, 105, 111, 55, 154, 104, 140, 119, 120,
1493 121, 116, 118, 83, 84, 87, 88, 122, 123, 89,
1494 90, 126, 125, 124, 91, 93, 92, 127, 107, 185,
1495 109, 79, 80, 179, 14, 15, 16, 18, 19, 20,
1496 21, 22, 23, 24, 56, 114, 156, 159, 160, 180,
1497 190, 191, 192, 193, 201, 202, 203, 205, 207, 209,
1498 216, 106, 107, 157, 189, 113, 107, 94, 95, 96,
1499 97, 98, 99, 100, 101, 102, 103, 113, 155, 187,
1500 106, 111, 114, 76, 114, 105, 111, 132, 156, 76,
1501 82, 135, 154, 140, 140, 140, 142, 142, 143, 143,
1502 144, 144, 144, 144, 145, 145, 146, 147, 148, 149,
1503 150, 151, 156, 109, 114, 114, 211, 104, 104, 114,
1504 114, 156, 104, 157, 112, 104, 114, 191, 195, 157,
1505 113, 107, 189, 113, 154, 114, 157, 188, 106, 114,
1506 154, 107, 112, 197, 198, 199, 212, 156, 114, 156,
1507 112, 210, 109, 107, 189, 113, 189, 107, 157, 154,
1508 56, 108, 200, 192, 190, 202, 213, 105, 105, 156,
1509 170, 173, 208, 189, 107, 104, 109, 201, 208, 214,
1510 215, 197, 204, 206, 76, 105, 114, 156, 109, 114,
1511 105, 17, 193, 113, 192, 196, 200, 105, 156, 196,
Alexis Hetuad527752015-07-07 13:31:44 -04001512 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001513};
1514
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001515 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1516static const yytype_uint8 yyr1[] =
1517{
1518 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
1519 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
1520 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
1521 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
1522 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
1523 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
1524 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
1525 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1526 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
1527 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
1528 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
1529 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
1530 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
1531 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
1532 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
1533 178, 178, 179, 179, 179, 180, 180, 180, 181, 181,
1534 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1535 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1536 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1537 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1538 181, 181, 183, 182, 184, 182, 185, 185, 186, 186,
1539 187, 187, 188, 188, 189, 190, 191, 191, 192, 192,
1540 192, 192, 192, 192, 192, 193, 194, 195, 193, 196,
1541 196, 198, 197, 199, 197, 200, 200, 201, 201, 202,
1542 202, 203, 204, 204, 206, 205, 207, 207, 208, 208,
1543 210, 209, 211, 209, 212, 209, 213, 213, 214, 214,
1544 215, 215, 216, 216, 216, 216, 216, 217, 217, 218,
1545 218, 220, 219
1546};
John Bauman66b8ab22014-05-06 15:57:45 -04001547
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001548 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1549static const yytype_uint8 yyr2[] =
1550{
1551 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
1552 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
1553 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
1554 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
1555 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
1556 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
1557 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
1558 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1559 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
1560 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
1561 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
1562 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
1563 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
1564 2, 1, 2, 1, 1, 2, 2, 3, 1, 1,
1565 1, 2, 2, 1, 1, 2, 1, 1, 1, 4,
1566 1, 3, 1, 3, 3, 1, 3, 4, 1, 1,
1567 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1568 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1569 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1570 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1571 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
1572 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
1573 1, 1, 1, 1, 1, 2, 0, 0, 5, 1,
1574 1, 0, 2, 0, 2, 2, 3, 1, 2, 1,
1575 2, 5, 3, 1, 0, 6, 3, 2, 1, 4,
1576 0, 6, 0, 8, 0, 7, 1, 1, 1, 0,
1577 2, 3, 2, 2, 2, 3, 2, 1, 2, 1,
1578 1, 0, 3
1579};
John Bauman66b8ab22014-05-06 15:57:45 -04001580
1581
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001582#define yyerrok (yyerrstatus = 0)
1583#define yyclearin (yychar = YYEMPTY)
1584#define YYEMPTY (-2)
1585#define YYEOF 0
John Bauman66b8ab22014-05-06 15:57:45 -04001586
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001587#define YYACCEPT goto yyacceptlab
1588#define YYABORT goto yyabortlab
1589#define YYERROR goto yyerrorlab
1590
John Bauman66b8ab22014-05-06 15:57:45 -04001591
1592#define YYRECOVERING() (!!yyerrstatus)
1593
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001594#define YYBACKUP(Token, Value) \
1595do \
1596 if (yychar == YYEMPTY) \
1597 { \
1598 yychar = (Token); \
1599 yylval = (Value); \
1600 YYPOPSTACK (yylen); \
1601 yystate = *yyssp; \
1602 goto yybackup; \
1603 } \
1604 else \
1605 { \
1606 yyerror (&yylloc, context, yyscanner, YY_("syntax error: cannot back up")); \
1607 YYERROR; \
1608 } \
1609while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001610
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001611/* Error token number */
1612#define YYTERROR 1
1613#define YYERRCODE 256
John Bauman66b8ab22014-05-06 15:57:45 -04001614
1615
1616/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1617 If N is 0, then set CURRENT to the empty location which ends
1618 the previous symbol: RHS[0] (always defined). */
1619
John Bauman66b8ab22014-05-06 15:57:45 -04001620#ifndef YYLLOC_DEFAULT
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001621# define YYLLOC_DEFAULT(Current, Rhs, N) \
1622 do \
1623 if (N) \
1624 { \
1625 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1626 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1627 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1628 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1629 } \
1630 else \
1631 { \
1632 (Current).first_line = (Current).last_line = \
1633 YYRHSLOC (Rhs, 0).last_line; \
1634 (Current).first_column = (Current).last_column = \
1635 YYRHSLOC (Rhs, 0).last_column; \
1636 } \
1637 while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001638#endif
1639
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001640#define YYRHSLOC(Rhs, K) ((Rhs)[K])
John Bauman66b8ab22014-05-06 15:57:45 -04001641
John Bauman66b8ab22014-05-06 15:57:45 -04001642
1643/* Enable debugging if requested. */
1644#if YYDEBUG
1645
1646# ifndef YYFPRINTF
1647# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1648# define YYFPRINTF fprintf
1649# endif
1650
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001651# define YYDPRINTF(Args) \
1652do { \
1653 if (yydebug) \
1654 YYFPRINTF Args; \
1655} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001656
1657
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001658/* YY_LOCATION_PRINT -- Print the location on the stream.
1659 This macro was not mandated originally: define only if we know
1660 we won't break user code: when these are the locations we know. */
John Bauman66b8ab22014-05-06 15:57:45 -04001661
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001662#ifndef YY_LOCATION_PRINT
1663# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1664
1665/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1666
1667YY_ATTRIBUTE_UNUSED
1668static unsigned
1669yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
John Bauman66b8ab22014-05-06 15:57:45 -04001670{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001671 unsigned res = 0;
1672 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1673 if (0 <= yylocp->first_line)
1674 {
1675 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1676 if (0 <= yylocp->first_column)
1677 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1678 }
1679 if (0 <= yylocp->last_line)
1680 {
1681 if (yylocp->first_line < yylocp->last_line)
1682 {
1683 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1684 if (0 <= end_col)
1685 res += YYFPRINTF (yyo, ".%d", end_col);
1686 }
1687 else if (0 <= end_col && yylocp->first_column < end_col)
1688 res += YYFPRINTF (yyo, "-%d", end_col);
1689 }
1690 return res;
1691 }
1692
1693# define YY_LOCATION_PRINT(File, Loc) \
1694 yy_location_print_ (File, &(Loc))
1695
1696# else
1697# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1698# endif
1699#endif
1700
1701
1702# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1703do { \
1704 if (yydebug) \
1705 { \
1706 YYFPRINTF (stderr, "%s ", Title); \
1707 yy_symbol_print (stderr, \
1708 Type, Value, Location, context, yyscanner); \
1709 YYFPRINTF (stderr, "\n"); \
1710 } \
1711} while (0)
1712
1713
1714/*----------------------------------------.
1715| Print this symbol's value on YYOUTPUT. |
1716`----------------------------------------*/
1717
1718static void
1719yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner)
1720{
1721 FILE *yyo = yyoutput;
1722 YYUSE (yyo);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001723 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001724 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001725 YYUSE (yyscanner);
1726 if (!yyvaluep)
1727 return;
John Bauman66b8ab22014-05-06 15:57:45 -04001728# ifdef YYPRINT
1729 if (yytype < YYNTOKENS)
1730 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
John Bauman66b8ab22014-05-06 15:57:45 -04001731# endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001732 YYUSE (yytype);
John Bauman66b8ab22014-05-06 15:57:45 -04001733}
1734
1735
1736/*--------------------------------.
1737| Print this symbol on YYOUTPUT. |
1738`--------------------------------*/
1739
John Bauman66b8ab22014-05-06 15:57:45 -04001740static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001741yy_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 -04001742{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001743 YYFPRINTF (yyoutput, "%s %s (",
1744 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
John Bauman66b8ab22014-05-06 15:57:45 -04001745
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001746 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1747 YYFPRINTF (yyoutput, ": ");
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001748 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001749 YYFPRINTF (yyoutput, ")");
1750}
1751
1752/*------------------------------------------------------------------.
1753| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1754| TOP (included). |
1755`------------------------------------------------------------------*/
1756
John Bauman66b8ab22014-05-06 15:57:45 -04001757static void
1758yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
John Bauman66b8ab22014-05-06 15:57:45 -04001759{
1760 YYFPRINTF (stderr, "Stack now");
1761 for (; yybottom <= yytop; yybottom++)
1762 {
1763 int yybot = *yybottom;
1764 YYFPRINTF (stderr, " %d", yybot);
1765 }
1766 YYFPRINTF (stderr, "\n");
1767}
1768
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001769# define YY_STACK_PRINT(Bottom, Top) \
1770do { \
1771 if (yydebug) \
1772 yy_stack_print ((Bottom), (Top)); \
1773} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001774
1775
1776/*------------------------------------------------.
1777| Report that the YYRULE is going to be reduced. |
1778`------------------------------------------------*/
1779
John Bauman66b8ab22014-05-06 15:57:45 -04001780static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001781yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04001782{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001783 unsigned long int yylno = yyrline[yyrule];
John Bauman66b8ab22014-05-06 15:57:45 -04001784 int yynrhs = yyr2[yyrule];
1785 int yyi;
John Bauman66b8ab22014-05-06 15:57:45 -04001786 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001787 yyrule - 1, yylno);
John Bauman66b8ab22014-05-06 15:57:45 -04001788 /* The symbols being reduced. */
1789 for (yyi = 0; yyi < yynrhs; yyi++)
1790 {
1791 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001792 yy_symbol_print (stderr,
1793 yystos[yyssp[yyi + 1 - yynrhs]],
1794 &(yyvsp[(yyi + 1) - (yynrhs)])
1795 , &(yylsp[(yyi + 1) - (yynrhs)]) , context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001796 YYFPRINTF (stderr, "\n");
1797 }
1798}
1799
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001800# define YY_REDUCE_PRINT(Rule) \
1801do { \
1802 if (yydebug) \
1803 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, yyscanner); \
1804} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001805
1806/* Nonzero means print parse trace. It is left uninitialized so that
1807 multiple parsers can coexist. */
1808int yydebug;
1809#else /* !YYDEBUG */
1810# define YYDPRINTF(Args)
1811# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1812# define YY_STACK_PRINT(Bottom, Top)
1813# define YY_REDUCE_PRINT(Rule)
1814#endif /* !YYDEBUG */
1815
1816
1817/* YYINITDEPTH -- initial size of the parser's stacks. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001818#ifndef YYINITDEPTH
John Bauman66b8ab22014-05-06 15:57:45 -04001819# define YYINITDEPTH 200
1820#endif
1821
1822/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1823 if the built-in stack extension method is used).
1824
1825 Do not make this value too large; the results are undefined if
1826 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1827 evaluated with infinite-precision integer arithmetic. */
1828
1829#ifndef YYMAXDEPTH
1830# define YYMAXDEPTH 10000
1831#endif
1832
John Bauman66b8ab22014-05-06 15:57:45 -04001833
1834#if YYERROR_VERBOSE
1835
1836# ifndef yystrlen
1837# if defined __GLIBC__ && defined _STRING_H
1838# define yystrlen strlen
1839# else
1840/* Return the length of YYSTR. */
John Bauman66b8ab22014-05-06 15:57:45 -04001841static YYSIZE_T
1842yystrlen (const char *yystr)
John Bauman66b8ab22014-05-06 15:57:45 -04001843{
1844 YYSIZE_T yylen;
1845 for (yylen = 0; yystr[yylen]; yylen++)
1846 continue;
1847 return yylen;
1848}
1849# endif
1850# endif
1851
1852# ifndef yystpcpy
1853# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1854# define yystpcpy stpcpy
1855# else
1856/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1857 YYDEST. */
John Bauman66b8ab22014-05-06 15:57:45 -04001858static char *
1859yystpcpy (char *yydest, const char *yysrc)
John Bauman66b8ab22014-05-06 15:57:45 -04001860{
1861 char *yyd = yydest;
1862 const char *yys = yysrc;
1863
1864 while ((*yyd++ = *yys++) != '\0')
1865 continue;
1866
1867 return yyd - 1;
1868}
1869# endif
1870# endif
1871
1872# ifndef yytnamerr
1873/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1874 quotes and backslashes, so that it's suitable for yyerror. The
1875 heuristic is that double-quoting is unnecessary unless the string
1876 contains an apostrophe, a comma, or backslash (other than
1877 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1878 null, do not copy; instead, return the length of what the result
1879 would have been. */
1880static YYSIZE_T
1881yytnamerr (char *yyres, const char *yystr)
1882{
1883 if (*yystr == '"')
1884 {
1885 YYSIZE_T yyn = 0;
1886 char const *yyp = yystr;
1887
1888 for (;;)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001889 switch (*++yyp)
1890 {
1891 case '\'':
1892 case ',':
1893 goto do_not_strip_quotes;
John Bauman66b8ab22014-05-06 15:57:45 -04001894
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001895 case '\\':
1896 if (*++yyp != '\\')
1897 goto do_not_strip_quotes;
1898 /* Fall through. */
1899 default:
1900 if (yyres)
1901 yyres[yyn] = *yyp;
1902 yyn++;
1903 break;
John Bauman66b8ab22014-05-06 15:57:45 -04001904
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001905 case '"':
1906 if (yyres)
1907 yyres[yyn] = '\0';
1908 return yyn;
1909 }
John Bauman66b8ab22014-05-06 15:57:45 -04001910 do_not_strip_quotes: ;
1911 }
1912
1913 if (! yyres)
1914 return yystrlen (yystr);
1915
1916 return yystpcpy (yyres, yystr) - yyres;
1917}
1918# endif
1919
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001920/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1921 about the unexpected token YYTOKEN for the state stack whose top is
1922 YYSSP.
1923
1924 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1925 not large enough to hold the message. In that case, also set
1926 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1927 required number of bytes is too large to store. */
1928static int
1929yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1930 yytype_int16 *yyssp, int yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04001931{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001932 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1933 YYSIZE_T yysize = yysize0;
1934 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1935 /* Internationalized format string. */
1936 const char *yyformat = YY_NULLPTR;
1937 /* Arguments of yyformat. */
1938 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1939 /* Number of reported tokens (one for the "unexpected", one per
1940 "expected"). */
1941 int yycount = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04001942
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001943 /* There are many possibilities here to consider:
1944 - If this state is a consistent state with a default action, then
1945 the only way this function was invoked is if the default action
1946 is an error action. In that case, don't check for expected
1947 tokens because there are none.
1948 - The only way there can be no lookahead present (in yychar) is if
1949 this state is a consistent state with a default action. Thus,
1950 detecting the absence of a lookahead is sufficient to determine
1951 that there is no unexpected or expected token to report. In that
1952 case, just report a simple "syntax error".
1953 - Don't assume there isn't a lookahead just because this state is a
1954 consistent state with a default action. There might have been a
1955 previous inconsistent state, consistent state with a non-default
1956 action, or user semantic action that manipulated yychar.
1957 - Of course, the expected token list depends on states to have
1958 correct lookahead information, and it depends on the parser not
1959 to perform extra reductions after fetching a lookahead from the
1960 scanner and before detecting a syntax error. Thus, state merging
1961 (from LALR or IELR) and default reductions corrupt the expected
1962 token list. However, the list is correct for canonical LR with
1963 one exception: it will still contain any token that will not be
1964 accepted due to an error action in a later state.
1965 */
1966 if (yytoken != YYEMPTY)
John Bauman66b8ab22014-05-06 15:57:45 -04001967 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001968 int yyn = yypact[*yyssp];
1969 yyarg[yycount++] = yytname[yytoken];
1970 if (!yypact_value_is_default (yyn))
1971 {
1972 /* Start YYX at -YYN if negative to avoid negative indexes in
1973 YYCHECK. In other words, skip the first -YYN actions for
1974 this state because they are default actions. */
1975 int yyxbegin = yyn < 0 ? -yyn : 0;
1976 /* Stay within bounds of both yycheck and yytname. */
1977 int yychecklim = YYLAST - yyn + 1;
1978 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1979 int yyx;
John Bauman66b8ab22014-05-06 15:57:45 -04001980
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001981 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1982 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1983 && !yytable_value_is_error (yytable[yyx + yyn]))
1984 {
1985 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1986 {
1987 yycount = 1;
1988 yysize = yysize0;
1989 break;
1990 }
1991 yyarg[yycount++] = yytname[yyx];
1992 {
1993 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1994 if (! (yysize <= yysize1
1995 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1996 return 2;
1997 yysize = yysize1;
1998 }
1999 }
2000 }
John Bauman66b8ab22014-05-06 15:57:45 -04002001 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002002
2003 switch (yycount)
2004 {
2005# define YYCASE_(N, S) \
2006 case N: \
2007 yyformat = S; \
2008 break
2009 YYCASE_(0, YY_("syntax error"));
2010 YYCASE_(1, YY_("syntax error, unexpected %s"));
2011 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2012 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2013 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2014 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2015# undef YYCASE_
2016 }
2017
2018 {
2019 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2020 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2021 return 2;
2022 yysize = yysize1;
2023 }
2024
2025 if (*yymsg_alloc < yysize)
2026 {
2027 *yymsg_alloc = 2 * yysize;
2028 if (! (yysize <= *yymsg_alloc
2029 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2030 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2031 return 1;
2032 }
2033
2034 /* Avoid sprintf, as that infringes on the user's name space.
2035 Don't have undefined behavior even if the translation
2036 produced a string with the wrong number of "%s"s. */
2037 {
2038 char *yyp = *yymsg;
2039 int yyi = 0;
2040 while ((*yyp = *yyformat) != '\0')
2041 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2042 {
2043 yyp += yytnamerr (yyp, yyarg[yyi++]);
2044 yyformat += 2;
2045 }
2046 else
2047 {
2048 yyp++;
2049 yyformat++;
2050 }
2051 }
2052 return 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002053}
2054#endif /* YYERROR_VERBOSE */
John Bauman66b8ab22014-05-06 15:57:45 -04002055
2056/*-----------------------------------------------.
2057| Release the memory associated to this symbol. |
2058`-----------------------------------------------*/
2059
John Bauman66b8ab22014-05-06 15:57:45 -04002060static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002061yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002062{
2063 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002064 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002065 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002066 YYUSE (yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002067 if (!yymsg)
2068 yymsg = "Deleting";
2069 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2070
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002071 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2072 YYUSE (yytype);
2073 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04002074}
2075
John Bauman66b8ab22014-05-06 15:57:45 -04002076
2077
2078
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002079/*----------.
2080| yyparse. |
2081`----------*/
John Bauman66b8ab22014-05-06 15:57:45 -04002082
John Bauman66b8ab22014-05-06 15:57:45 -04002083int
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002084yyparse (TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002085{
2086/* The lookahead symbol. */
2087int yychar;
2088
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002089
John Bauman66b8ab22014-05-06 15:57:45 -04002090/* The semantic value of the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002091/* Default value used for initialization, for pacifying older GCCs
2092 or non-GCC compilers. */
2093YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
2094YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
John Bauman66b8ab22014-05-06 15:57:45 -04002095
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002096/* Location data for the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002097static YYLTYPE yyloc_default
2098# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2099 = { 1, 1, 1, 1 }
2100# endif
2101;
2102YYLTYPE yylloc = yyloc_default;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002103
John Bauman66b8ab22014-05-06 15:57:45 -04002104 /* Number of syntax errors so far. */
2105 int yynerrs;
2106
2107 int yystate;
2108 /* Number of tokens to shift before error messages enabled. */
2109 int yyerrstatus;
2110
2111 /* The stacks and their tools:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002112 'yyss': related to states.
2113 'yyvs': related to semantic values.
2114 'yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002115
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002116 Refer to the stacks through separate pointers, to allow yyoverflow
John Bauman66b8ab22014-05-06 15:57:45 -04002117 to reallocate them elsewhere. */
2118
2119 /* The state stack. */
2120 yytype_int16 yyssa[YYINITDEPTH];
2121 yytype_int16 *yyss;
2122 yytype_int16 *yyssp;
2123
2124 /* The semantic value stack. */
2125 YYSTYPE yyvsa[YYINITDEPTH];
2126 YYSTYPE *yyvs;
2127 YYSTYPE *yyvsp;
2128
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002129 /* The location stack. */
2130 YYLTYPE yylsa[YYINITDEPTH];
2131 YYLTYPE *yyls;
2132 YYLTYPE *yylsp;
2133
2134 /* The locations where the error started and ended. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002135 YYLTYPE yyerror_range[3];
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002136
John Bauman66b8ab22014-05-06 15:57:45 -04002137 YYSIZE_T yystacksize;
2138
2139 int yyn;
2140 int yyresult;
2141 /* Lookahead token as an internal (translated) token number. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002142 int yytoken = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002143 /* The variables used to return semantic value and location from the
2144 action routines. */
2145 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002146 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002147
2148#if YYERROR_VERBOSE
2149 /* Buffer for error messages, and its allocated size. */
2150 char yymsgbuf[128];
2151 char *yymsg = yymsgbuf;
2152 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2153#endif
2154
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002155#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002156
2157 /* The number of symbols on the RHS of the reduced rule.
2158 Keep to zero when no symbol should be popped. */
2159 int yylen = 0;
2160
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002161 yyssp = yyss = yyssa;
2162 yyvsp = yyvs = yyvsa;
2163 yylsp = yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002164 yystacksize = YYINITDEPTH;
2165
2166 YYDPRINTF ((stderr, "Starting parse\n"));
2167
2168 yystate = 0;
2169 yyerrstatus = 0;
2170 yynerrs = 0;
2171 yychar = YYEMPTY; /* Cause a token to be read. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002172 yylsp[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002173 goto yysetstate;
2174
2175/*------------------------------------------------------------.
2176| yynewstate -- Push a new state, which is found in yystate. |
2177`------------------------------------------------------------*/
2178 yynewstate:
2179 /* In all cases, when you get here, the value and location stacks
2180 have just been pushed. So pushing a state here evens the stacks. */
2181 yyssp++;
2182
2183 yysetstate:
2184 *yyssp = yystate;
2185
2186 if (yyss + yystacksize - 1 <= yyssp)
2187 {
2188 /* Get the current used size of the three stacks, in elements. */
2189 YYSIZE_T yysize = yyssp - yyss + 1;
2190
2191#ifdef yyoverflow
2192 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002193 /* Give user a chance to reallocate the stack. Use copies of
2194 these so that the &'s don't force the real ones into
2195 memory. */
2196 YYSTYPE *yyvs1 = yyvs;
2197 yytype_int16 *yyss1 = yyss;
2198 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002199
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002200 /* Each stack pointer address is followed by the size of the
2201 data in use in that stack, in bytes. This used to be a
2202 conditional around just the two extra args, but that might
2203 be undefined if yyoverflow is a macro. */
2204 yyoverflow (YY_("memory exhausted"),
2205 &yyss1, yysize * sizeof (*yyssp),
2206 &yyvs1, yysize * sizeof (*yyvsp),
2207 &yyls1, yysize * sizeof (*yylsp),
2208 &yystacksize);
John Bauman66b8ab22014-05-06 15:57:45 -04002209
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002210 yyls = yyls1;
2211 yyss = yyss1;
2212 yyvs = yyvs1;
John Bauman66b8ab22014-05-06 15:57:45 -04002213 }
2214#else /* no yyoverflow */
2215# ifndef YYSTACK_RELOCATE
2216 goto yyexhaustedlab;
2217# else
2218 /* Extend the stack our own way. */
2219 if (YYMAXDEPTH <= yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002220 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002221 yystacksize *= 2;
2222 if (YYMAXDEPTH < yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002223 yystacksize = YYMAXDEPTH;
John Bauman66b8ab22014-05-06 15:57:45 -04002224
2225 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002226 yytype_int16 *yyss1 = yyss;
2227 union yyalloc *yyptr =
2228 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2229 if (! yyptr)
2230 goto yyexhaustedlab;
2231 YYSTACK_RELOCATE (yyss_alloc, yyss);
2232 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2233 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002234# undef YYSTACK_RELOCATE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002235 if (yyss1 != yyssa)
2236 YYSTACK_FREE (yyss1);
John Bauman66b8ab22014-05-06 15:57:45 -04002237 }
2238# endif
2239#endif /* no yyoverflow */
2240
2241 yyssp = yyss + yysize - 1;
2242 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002243 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002244
2245 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002246 (unsigned long int) yystacksize));
John Bauman66b8ab22014-05-06 15:57:45 -04002247
2248 if (yyss + yystacksize - 1 <= yyssp)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002249 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04002250 }
2251
2252 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2253
2254 if (yystate == YYFINAL)
2255 YYACCEPT;
2256
2257 goto yybackup;
2258
2259/*-----------.
2260| yybackup. |
2261`-----------*/
2262yybackup:
2263
2264 /* Do appropriate processing given the current state. Read a
2265 lookahead token if we need one and don't already have one. */
2266
2267 /* First try to decide what to do without reference to lookahead token. */
2268 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002269 if (yypact_value_is_default (yyn))
John Bauman66b8ab22014-05-06 15:57:45 -04002270 goto yydefault;
2271
2272 /* Not known => get a lookahead token if don't already have one. */
2273
2274 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2275 if (yychar == YYEMPTY)
2276 {
2277 YYDPRINTF ((stderr, "Reading a token: "));
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002278 yychar = yylex (&yylval, &yylloc, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002279 }
2280
2281 if (yychar <= YYEOF)
2282 {
2283 yychar = yytoken = YYEOF;
2284 YYDPRINTF ((stderr, "Now at end of input.\n"));
2285 }
2286 else
2287 {
2288 yytoken = YYTRANSLATE (yychar);
2289 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2290 }
2291
2292 /* If the proper action on seeing token YYTOKEN is to reduce or to
2293 detect an error, take that action. */
2294 yyn += yytoken;
2295 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2296 goto yydefault;
2297 yyn = yytable[yyn];
2298 if (yyn <= 0)
2299 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002300 if (yytable_value_is_error (yyn))
2301 goto yyerrlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002302 yyn = -yyn;
2303 goto yyreduce;
2304 }
2305
2306 /* Count tokens shifted since error; after three, turn off error
2307 status. */
2308 if (yyerrstatus)
2309 yyerrstatus--;
2310
2311 /* Shift the lookahead token. */
2312 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2313
2314 /* Discard the shifted token. */
2315 yychar = YYEMPTY;
2316
2317 yystate = yyn;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002318 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04002319 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002320 YY_IGNORE_MAYBE_UNINITIALIZED_END
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002321 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002322 goto yynewstate;
2323
2324
2325/*-----------------------------------------------------------.
2326| yydefault -- do the default action for the current state. |
2327`-----------------------------------------------------------*/
2328yydefault:
2329 yyn = yydefact[yystate];
2330 if (yyn == 0)
2331 goto yyerrlab;
2332 goto yyreduce;
2333
2334
2335/*-----------------------------.
2336| yyreduce -- Do a reduction. |
2337`-----------------------------*/
2338yyreduce:
2339 /* yyn is the number of a rule to reduce with. */
2340 yylen = yyr2[yyn];
2341
2342 /* If YYLEN is nonzero, implement the default value of the action:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002343 '$$ = $1'.
John Bauman66b8ab22014-05-06 15:57:45 -04002344
2345 Otherwise, the following line sets YYVAL to garbage.
2346 This behavior is undocumented and Bison
2347 users should not rely upon it. Assigning to YYVAL
2348 unconditionally makes the parser a bit smaller, and it avoids a
2349 GCC warning that YYVAL may be used uninitialized. */
2350 yyval = yyvsp[1-yylen];
2351
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002352 /* Default location. */
2353 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002354 YY_REDUCE_PRINT (yyn);
2355 switch (yyn)
2356 {
2357 case 2:
2358
2359 {
2360 // The symbol table search was done in the lexical phase
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002361 const TVariable *variable = context->getNamedVariable((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
John Bauman66b8ab22014-05-06 15:57:45 -04002362
2363 // don't delete $1.string, it's used by error recovery, and the pool
2364 // pop will reclaim the memory
2365
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002366 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002367 ConstantUnion* constArray = variable->getConstPointer();
2368 TType t(variable->getType());
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002369 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002370 } else
2371 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2372 variable->getName(),
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002373 variable->getType(), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002374 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002375
John Bauman66b8ab22014-05-06 15:57:45 -04002376 break;
2377
2378 case 3:
2379
2380 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002381 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002382 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002383
John Bauman66b8ab22014-05-06 15:57:45 -04002384 break;
2385
2386 case 4:
2387
2388 {
John Bauman66b8ab22014-05-06 15:57:45 -04002389 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002390 unionArray->setIConst((yyvsp[0].lex).i);
2391 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002392 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002393
John Bauman66b8ab22014-05-06 15:57:45 -04002394 break;
2395
2396 case 5:
2397
2398 {
2399 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002400 unionArray->setUConst((yyvsp[0].lex).u);
2401 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002402 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002403
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002404 break;
2405
2406 case 6:
2407
2408 {
2409 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002410 unionArray->setFConst((yyvsp[0].lex).f);
2411 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002412 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002413
John Bauman66b8ab22014-05-06 15:57:45 -04002414 break;
2415
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002416 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002417
2418 {
2419 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002420 unionArray->setBConst((yyvsp[0].lex).b);
2421 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002422 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002423
John Bauman66b8ab22014-05-06 15:57:45 -04002424 break;
2425
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002426 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002427
2428 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002429 (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002430 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002431
John Bauman66b8ab22014-05-06 15:57:45 -04002432 break;
2433
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002434 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002435
2436 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002437 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002438 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002439
John Bauman66b8ab22014-05-06 15:57:45 -04002440 break;
2441
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002442 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002443
2444 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002445 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04002446 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002447
John Bauman66b8ab22014-05-06 15:57:45 -04002448 break;
2449
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002450 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002451
2452 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002453 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002454 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002455
John Bauman66b8ab22014-05-06 15:57:45 -04002456 break;
2457
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002458 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002459
2460 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002461 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002462 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002463
John Bauman66b8ab22014-05-06 15:57:45 -04002464 break;
2465
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002466 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002467
2468 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002469 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002470 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002471
John Bauman66b8ab22014-05-06 15:57:45 -04002472 break;
2473
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002474 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002475
2476 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002477 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002478 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002479
John Bauman66b8ab22014-05-06 15:57:45 -04002480 break;
2481
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002482 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002483
2484 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002485 if (context->integerErrorCheck((yyvsp[0].interm.intermTypedNode), "[]"))
John Bauman66b8ab22014-05-06 15:57:45 -04002486 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002487 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002488 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002489
John Bauman66b8ab22014-05-06 15:57:45 -04002490 break;
2491
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002492 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002493
2494 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002495 bool fatalError = false;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002496 (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 -04002497 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002498 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002499 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002500 }
John Bauman66b8ab22014-05-06 15:57:45 -04002501 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002502
John Bauman66b8ab22014-05-06 15:57:45 -04002503 break;
2504
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002505 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002506
2507 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002508 (yyval.interm) = (yyvsp[0].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002509 (yyval.interm).nodePair.node2 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002510 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002511
John Bauman66b8ab22014-05-06 15:57:45 -04002512 break;
2513
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002514 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002515
2516 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002517 ES3_ONLY("", (yylsp[0]), "methods");
2518 (yyval.interm) = (yyvsp[0].interm);
2519 (yyval.interm).nodePair.node2 = (yyvsp[-2].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002520 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002521
John Bauman66b8ab22014-05-06 15:57:45 -04002522 break;
2523
John Bauman66b8ab22014-05-06 15:57:45 -04002524 case 19:
2525
2526 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002527 (yyval.interm) = (yyvsp[-1].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002528 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002529
John Bauman66b8ab22014-05-06 15:57:45 -04002530 break;
2531
2532 case 20:
2533
2534 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002535 (yyval.interm) = (yyvsp[-1].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002536 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002537
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002538 break;
2539
2540 case 21:
2541
2542 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002543 (yyval.interm).function = (yyvsp[-1].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002544 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002545 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002546
John Bauman66b8ab22014-05-06 15:57:45 -04002547 break;
2548
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002549 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002550
2551 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002552 (yyval.interm).function = (yyvsp[0].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002553 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002554 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002555
John Bauman66b8ab22014-05-06 15:57:45 -04002556 break;
2557
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002558 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002559
2560 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002561 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2562 (yyvsp[-1].interm.function)->addParameter(param);
2563 (yyval.interm).function = (yyvsp[-1].interm.function);
2564 (yyval.interm).nodePair.node1 = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002565 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002566
John Bauman66b8ab22014-05-06 15:57:45 -04002567 break;
2568
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002569 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002570
2571 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002572 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2573 (yyvsp[-2].interm).function->addParameter(param);
2574 (yyval.interm).function = (yyvsp[-2].interm).function;
2575 (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002576 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002577
John Bauman66b8ab22014-05-06 15:57:45 -04002578 break;
2579
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002580 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002581
2582 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002583 (yyval.interm.function) = (yyvsp[-1].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04002584 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002585
John Bauman66b8ab22014-05-06 15:57:45 -04002586 break;
2587
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002588 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002589
2590 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002591 if ((yyvsp[0].interm.type).array) {
2592 ES3_ONLY("[]", (yylsp[0]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002593 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002594 (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002595 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002596
John Bauman66b8ab22014-05-06 15:57:45 -04002597 break;
2598
John Bauman66b8ab22014-05-06 15:57:45 -04002599 case 27:
2600
2601 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002602 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002603 context->recover();
2604 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002605 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04002606 (yyval.interm.function) = function;
2607 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002608
John Bauman66b8ab22014-05-06 15:57:45 -04002609 break;
2610
2611 case 28:
2612
2613 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002614 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002615 context->recover();
2616 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002617 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002618 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002619 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002620
John Bauman66b8ab22014-05-06 15:57:45 -04002621 break;
2622
2623 case 29:
2624
2625 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002626 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002627 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002628
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002629 break;
2630
2631 case 30:
2632
2633 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002634 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002635 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002636
John Bauman66b8ab22014-05-06 15:57:45 -04002637 break;
2638
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002639 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002640
2641 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002642 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002643 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002644
John Bauman66b8ab22014-05-06 15:57:45 -04002645 break;
2646
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002647 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002648
2649 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002650 if ((yyvsp[-1].interm).op != EOpNull) {
2651 (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002652 } else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002653 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002654 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002655
John Bauman66b8ab22014-05-06 15:57:45 -04002656 break;
2657
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002658 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002659
Alexis Hetu253fdd12015-07-07 15:12:46 -04002660 { (yyval.interm).op = EOpNull; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002661
John Bauman66b8ab22014-05-06 15:57:45 -04002662 break;
2663
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002664 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002665
Alexis Hetu253fdd12015-07-07 15:12:46 -04002666 { (yyval.interm).op = EOpNegative; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002667
John Bauman66b8ab22014-05-06 15:57:45 -04002668 break;
2669
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002670 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002671
Alexis Hetu253fdd12015-07-07 15:12:46 -04002672 { (yyval.interm).op = EOpLogicalNot; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002673
John Bauman66b8ab22014-05-06 15:57:45 -04002674 break;
2675
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002676 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002677
Alexis Hetu17809052015-05-13 11:28:22 -04002678 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002679 ES3_ONLY("~", (yylsp[0]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002680 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002681 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002682
John Bauman66b8ab22014-05-06 15:57:45 -04002683 break;
2684
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002685 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002686
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002687 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2688
Alexis Hetu17809052015-05-13 11:28:22 -04002689 break;
2690
2691 case 38:
2692
John Bauman66b8ab22014-05-06 15:57:45 -04002693 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002694 FRAG_VERT_ONLY("*", (yylsp[-1]));
2695 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002696 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002697
John Bauman66b8ab22014-05-06 15:57:45 -04002698 break;
2699
Alexis Hetu17809052015-05-13 11:28:22 -04002700 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002701
2702 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002703 FRAG_VERT_ONLY("/", (yylsp[-1]));
2704 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002705 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002706
John Bauman66b8ab22014-05-06 15:57:45 -04002707 break;
2708
Alexis Hetu17809052015-05-13 11:28:22 -04002709 case 40:
2710
2711 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002712 FRAG_VERT_ONLY("%", (yylsp[-1]));
2713 ES3_ONLY("%", (yylsp[-1]), "integer modulus operator");
2714 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002715 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002716
Alexis Hetu17809052015-05-13 11:28:22 -04002717 break;
2718
2719 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002720
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002721 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2722
John Bauman66b8ab22014-05-06 15:57:45 -04002723 break;
2724
Alexis Hetu17809052015-05-13 11:28:22 -04002725 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002726
2727 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002728 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002729 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002730
John Bauman66b8ab22014-05-06 15:57:45 -04002731 break;
2732
Alexis Hetu17809052015-05-13 11:28:22 -04002733 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002734
2735 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002736 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002737 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002738
John Bauman66b8ab22014-05-06 15:57:45 -04002739 break;
2740
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002741 case 44:
2742
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002743 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2744
Alexis Hetu17809052015-05-13 11:28:22 -04002745 break;
2746
2747 case 45:
2748
2749 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002750 ES3_ONLY("<<", (yylsp[-1]), "bit-wise operator");
2751 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002752 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002753
Alexis Hetu17809052015-05-13 11:28:22 -04002754 break;
2755
2756 case 46:
2757
2758 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002759 ES3_ONLY(">>", (yylsp[-1]), "bit-wise operator");
2760 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002761 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002762
Alexis Hetu17809052015-05-13 11:28:22 -04002763 break;
2764
2765 case 47:
2766
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002767 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2768
Alexis Hetu17809052015-05-13 11:28:22 -04002769 break;
2770
2771 case 48:
2772
John Bauman66b8ab22014-05-06 15:57:45 -04002773 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002774 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002775 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002776
John Bauman66b8ab22014-05-06 15:57:45 -04002777 break;
2778
Alexis Hetu17809052015-05-13 11:28:22 -04002779 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002780
2781 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002782 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002783 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002784
John Bauman66b8ab22014-05-06 15:57:45 -04002785 break;
2786
Alexis Hetu17809052015-05-13 11:28:22 -04002787 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002788
2789 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002790 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002791 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002792
John Bauman66b8ab22014-05-06 15:57:45 -04002793 break;
2794
Alexis Hetu17809052015-05-13 11:28:22 -04002795 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002796
2797 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002798 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002799 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002800
John Bauman66b8ab22014-05-06 15:57:45 -04002801 break;
2802
Alexis Hetu17809052015-05-13 11:28:22 -04002803 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002804
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002805 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2806
John Bauman66b8ab22014-05-06 15:57:45 -04002807 break;
2808
Alexis Hetu17809052015-05-13 11:28:22 -04002809 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002810
2811 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002812 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002813 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002814
John Bauman66b8ab22014-05-06 15:57:45 -04002815 break;
2816
Alexis Hetu17809052015-05-13 11:28:22 -04002817 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002818
2819 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002820 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002821 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002822
John Bauman66b8ab22014-05-06 15:57:45 -04002823 break;
2824
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002825 case 55:
2826
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002827 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2828
Alexis Hetu17809052015-05-13 11:28:22 -04002829 break;
2830
2831 case 56:
2832
2833 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002834 ES3_ONLY("&", (yylsp[-1]), "bit-wise operator");
2835 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002836 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002837
Alexis Hetu17809052015-05-13 11:28:22 -04002838 break;
2839
2840 case 57:
2841
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002842 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2843
Alexis Hetu17809052015-05-13 11:28:22 -04002844 break;
2845
2846 case 58:
2847
2848 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002849 ES3_ONLY("^", (yylsp[-1]), "bit-wise operator");
2850 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002851 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002852
Alexis Hetu17809052015-05-13 11:28:22 -04002853 break;
2854
2855 case 59:
2856
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002857 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2858
Alexis Hetu17809052015-05-13 11:28:22 -04002859 break;
2860
2861 case 60:
2862
2863 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002864 ES3_ONLY("|", (yylsp[-1]), "bit-wise operator");
2865 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002866 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002867
Alexis Hetu17809052015-05-13 11:28:22 -04002868 break;
2869
2870 case 61:
2871
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002872 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2873
Alexis Hetu17809052015-05-13 11:28:22 -04002874 break;
2875
2876 case 62:
2877
John Bauman66b8ab22014-05-06 15:57:45 -04002878 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002879 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002880 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002881
John Bauman66b8ab22014-05-06 15:57:45 -04002882 break;
2883
Alexis Hetu17809052015-05-13 11:28:22 -04002884 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002885
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002886 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2887
John Bauman66b8ab22014-05-06 15:57:45 -04002888 break;
2889
Alexis Hetu17809052015-05-13 11:28:22 -04002890 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002891
2892 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002893 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002894 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002895
John Bauman66b8ab22014-05-06 15:57:45 -04002896 break;
2897
Alexis Hetu17809052015-05-13 11:28:22 -04002898 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04002899
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002900 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2901
John Bauman66b8ab22014-05-06 15:57:45 -04002902 break;
2903
Alexis Hetu17809052015-05-13 11:28:22 -04002904 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04002905
2906 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002907 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002908 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002909
John Bauman66b8ab22014-05-06 15:57:45 -04002910 break;
2911
Alexis Hetu17809052015-05-13 11:28:22 -04002912 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04002913
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002914 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2915
John Bauman66b8ab22014-05-06 15:57:45 -04002916 break;
2917
Alexis Hetu17809052015-05-13 11:28:22 -04002918 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04002919
2920 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002921 (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 -04002922 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002923
John Bauman66b8ab22014-05-06 15:57:45 -04002924 break;
2925
Alexis Hetu17809052015-05-13 11:28:22 -04002926 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04002927
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002928 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2929
John Bauman66b8ab22014-05-06 15:57:45 -04002930 break;
2931
Alexis Hetu17809052015-05-13 11:28:22 -04002932 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04002933
2934 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002935 if (context->lValueErrorCheck((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002936 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002937 (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 -04002938 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002939
John Bauman66b8ab22014-05-06 15:57:45 -04002940 break;
2941
Alexis Hetu17809052015-05-13 11:28:22 -04002942 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04002943
Alexis Hetu253fdd12015-07-07 15:12:46 -04002944 { (yyval.interm).op = EOpAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002945
John Bauman66b8ab22014-05-06 15:57:45 -04002946 break;
2947
Alexis Hetu17809052015-05-13 11:28:22 -04002948 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04002949
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002950 { FRAG_VERT_ONLY("*=", (yylsp[0])); (yyval.interm).op = EOpMulAssign; }
2951
John Bauman66b8ab22014-05-06 15:57:45 -04002952 break;
2953
Alexis Hetu17809052015-05-13 11:28:22 -04002954 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04002955
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002956 { FRAG_VERT_ONLY("/=", (yylsp[0])); (yyval.interm).op = EOpDivAssign; }
2957
John Bauman66b8ab22014-05-06 15:57:45 -04002958 break;
2959
Alexis Hetu17809052015-05-13 11:28:22 -04002960 case 74:
2961
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002962 { ES3_ONLY("%=", (yylsp[0]), "integer modulus operator");
2963 FRAG_VERT_ONLY("%=", (yylsp[0])); (yyval.interm).op = EOpIModAssign; }
2964
Alexis Hetu17809052015-05-13 11:28:22 -04002965 break;
2966
2967 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04002968
Alexis Hetu253fdd12015-07-07 15:12:46 -04002969 { (yyval.interm).op = EOpAddAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002970
John Bauman66b8ab22014-05-06 15:57:45 -04002971 break;
2972
Alexis Hetu17809052015-05-13 11:28:22 -04002973 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04002974
Alexis Hetu253fdd12015-07-07 15:12:46 -04002975 { (yyval.interm).op = EOpSubAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002976
John Bauman66b8ab22014-05-06 15:57:45 -04002977 break;
2978
Alexis Hetu17809052015-05-13 11:28:22 -04002979 case 77:
2980
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002981 { ES3_ONLY("<<=", (yylsp[0]), "bit-wise operator");
2982 FRAG_VERT_ONLY("<<=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002983 (yyval.interm).op = EOpBitShiftLeftAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002984
Alexis Hetu17809052015-05-13 11:28:22 -04002985 break;
2986
2987 case 78:
2988
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002989 { ES3_ONLY(">>=", (yylsp[0]), "bit-wise operator");
2990 FRAG_VERT_ONLY(">>=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002991 (yyval.interm).op = EOpBitShiftRightAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002992
Alexis Hetu17809052015-05-13 11:28:22 -04002993 break;
2994
2995 case 79:
2996
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002997 { ES3_ONLY("&=", (yylsp[0]), "bit-wise operator");
2998 FRAG_VERT_ONLY("&=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002999 (yyval.interm).op = EOpBitwiseAndAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003000
Alexis Hetu17809052015-05-13 11:28:22 -04003001 break;
3002
3003 case 80:
3004
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003005 { ES3_ONLY("^=", (yylsp[0]), "bit-wise operator");
3006 FRAG_VERT_ONLY("^=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003007 (yyval.interm).op = EOpBitwiseXorAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003008
Alexis Hetu17809052015-05-13 11:28:22 -04003009 break;
3010
3011 case 81:
3012
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003013 { ES3_ONLY("|=", (yylsp[0]), "bit-wise operator");
3014 FRAG_VERT_ONLY("|=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003015 (yyval.interm).op = EOpBitwiseOrAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003016
Alexis Hetu17809052015-05-13 11:28:22 -04003017 break;
3018
3019 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003020
3021 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003022 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003023 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003024
John Bauman66b8ab22014-05-06 15:57:45 -04003025 break;
3026
Alexis Hetu17809052015-05-13 11:28:22 -04003027 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003028
3029 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003030 (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003031 if ((yyval.interm.intermTypedNode) == 0) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003032 context->binaryOpError((yylsp[-1]), ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003033 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003034 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003035 }
3036 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003037
John Bauman66b8ab22014-05-06 15:57:45 -04003038 break;
3039
Alexis Hetu17809052015-05-13 11:28:22 -04003040 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003041
3042 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003043 if (context->constErrorCheck((yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003044 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003045 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003046 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003047
John Bauman66b8ab22014-05-06 15:57:45 -04003048 break;
3049
Alexis Hetu17809052015-05-13 11:28:22 -04003050 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003051
3052 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003053 if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003054 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003055 (yyval.lex) = (yyvsp[-1].lex);
Alexis Hetua35d8232015-06-11 17:11:06 -04003056 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003057
Alexis Hetua35d8232015-06-11 17:11:06 -04003058 break;
3059
3060 case 86:
3061
3062 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003063 TFunction &function = *((yyvsp[-1].interm).function);
John Bauman66b8ab22014-05-06 15:57:45 -04003064
3065 TIntermAggregate *prototype = new TIntermAggregate;
3066 prototype->setType(function.getReturnType());
3067 prototype->setName(function.getName());
3068
Alexis Hetu76a343a2015-06-04 17:21:22 -04003069 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003070 {
3071 const TParameter &param = function.getParam(i);
3072 if (param.name != 0)
3073 {
John Baumand4ae8632014-05-06 16:18:33 -04003074 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003075
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003076 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 -04003077 }
3078 else
3079 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003080 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[-1])), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003081 }
3082 }
3083
3084 prototype->setOp(EOpPrototype);
3085 (yyval.interm.intermNode) = prototype;
3086
3087 context->symbolTable.pop();
3088 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003089
John Bauman66b8ab22014-05-06 15:57:45 -04003090 break;
3091
Alexis Hetua35d8232015-06-11 17:11:06 -04003092 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003093
3094 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003095 TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate;
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003096 if (aggNode && aggNode->getOp() == EOpNull)
3097 aggNode->setOp(EOpDeclaration);
3098 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003099 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003100
John Bauman66b8ab22014-05-06 15:57:45 -04003101 break;
3102
Alexis Hetua35d8232015-06-11 17:11:06 -04003103 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003104
3105 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003106 if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) {
3107 context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type));
John Baumand4ae8632014-05-06 16:18:33 -04003108 context->recover();
3109 }
John Bauman66b8ab22014-05-06 15:57:45 -04003110 (yyval.interm.intermNode) = 0;
3111 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003112
John Bauman66b8ab22014-05-06 15:57:45 -04003113 break;
3114
Alexis Hetua35d8232015-06-11 17:11:06 -04003115 case 89:
3116
3117 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003118 ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks");
3119 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-4].interm.type), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yylsp[-4]), NULL, (yylsp[-4]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003120 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003121
Alexis Hetua35d8232015-06-11 17:11:06 -04003122 break;
3123
3124 case 90:
3125
3126 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003127 ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks");
3128 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-5].interm.type), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yylsp[-5]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003129 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003130
Alexis Hetua35d8232015-06-11 17:11:06 -04003131 break;
3132
3133 case 91:
3134
3135 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003136 ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks");
3137 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-8].interm.type), (yylsp[-7]), *(yyvsp[-7].lex).string, (yyvsp[-6].interm.fieldList), (yyvsp[-4].lex).string, (yylsp[-4]), (yyvsp[-2].interm.intermTypedNode), (yylsp[-3]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003138 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003139
Alexis Hetua35d8232015-06-11 17:11:06 -04003140 break;
3141
3142 case 92:
3143
3144 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003145 context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type));
Alexis Hetua35d8232015-06-11 17:11:06 -04003146 (yyval.interm.intermNode) = 0;
3147 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003148
Alexis Hetua35d8232015-06-11 17:11:06 -04003149 break;
3150
3151 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003152
3153 {
3154 //
3155 // Multiple declarations of the same function are allowed.
3156 //
3157 // If this is a definition, the definition production code will check for redefinitions
3158 // (we don't know at this point if it's a definition or not).
3159 //
3160 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3161 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003162 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[-1].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003163 if (prevDec) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003164 if (prevDec->getReturnType() != (yyvsp[-1].interm.function)->getReturnType()) {
3165 context->error((yylsp[0]), "overloaded functions must have the same return type", (yyvsp[-1].interm.function)->getReturnType().getBasicString());
John Bauman66b8ab22014-05-06 15:57:45 -04003166 context->recover();
3167 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003168 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003169 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[-1].interm.function)->getParam(i).type->getQualifier()) {
3170 context->error((yylsp[0]), "overloaded functions must have the same parameter qualifiers", (yyvsp[-1].interm.function)->getParam(i).type->getQualifierString());
John Bauman66b8ab22014-05-06 15:57:45 -04003171 context->recover();
3172 }
3173 }
3174 }
3175
3176 //
3177 // If this is a redeclaration, it could also be a definition,
3178 // in which case, we want to use the variable names from this one, and not the one that's
3179 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3180 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003181 (yyval.interm).function = (yyvsp[-1].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003182
3183 // We're at the inner scope level of the function's arguments and body statement.
3184 // Add the function prototype to the surrounding scope instead.
3185 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3186 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003187
John Bauman66b8ab22014-05-06 15:57:45 -04003188 break;
3189
Alexis Hetua35d8232015-06-11 17:11:06 -04003190 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003191
3192 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003193 (yyval.interm.function) = (yyvsp[0].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003194 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003195
John Bauman66b8ab22014-05-06 15:57:45 -04003196 break;
3197
Alexis Hetua35d8232015-06-11 17:11:06 -04003198 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003199
3200 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003201 (yyval.interm.function) = (yyvsp[0].interm.function);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003202 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003203
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003204 break;
3205
Alexis Hetua35d8232015-06-11 17:11:06 -04003206 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003207
3208 {
John Bauman66b8ab22014-05-06 15:57:45 -04003209 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003210 (yyval.interm.function) = (yyvsp[-1].interm.function);
3211 if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
3212 (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003213 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003214 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003215 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003216
John Bauman66b8ab22014-05-06 15:57:45 -04003217 break;
3218
Alexis Hetua35d8232015-06-11 17:11:06 -04003219 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003220
3221 {
3222 //
3223 // Only first parameter of one-parameter functions can be void
3224 // The check for named parameters not being void is done in parameter_declarator
3225 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003226 if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
John Bauman66b8ab22014-05-06 15:57:45 -04003227 //
3228 // This parameter > first is void
3229 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003230 context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003231 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003232 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003233 } else {
3234 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003235 (yyval.interm.function) = (yyvsp[-2].interm.function);
3236 (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003237 }
3238 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003239
John Bauman66b8ab22014-05-06 15:57:45 -04003240 break;
3241
Alexis Hetua35d8232015-06-11 17:11:06 -04003242 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003243
3244 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003245 if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) {
3246 context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier));
John Bauman66b8ab22014-05-06 15:57:45 -04003247 context->recover();
3248 }
3249 // make sure a sampler is not involved as well...
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003250 if (context->structQualifierErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003251 context->recover();
3252
3253 // Add the function as a prototype after parsing it (we do not support recursion)
3254 TFunction *function;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003255 TType type((yyvsp[-2].interm.type));
3256 function = new TFunction((yyvsp[-1].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04003257 (yyval.interm.function) = function;
3258
3259 context->symbolTable.push();
3260 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003261
John Bauman66b8ab22014-05-06 15:57:45 -04003262 break;
3263
Alexis Hetua35d8232015-06-11 17:11:06 -04003264 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003265
3266 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003267 if ((yyvsp[-1].interm.type).type == EbtVoid) {
3268 context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003269 context->recover();
3270 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003271 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003272 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003273 TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003274 (yyval.interm).param = param;
3275 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003276
John Bauman66b8ab22014-05-06 15:57:45 -04003277 break;
3278
Alexis Hetua35d8232015-06-11 17:11:06 -04003279 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003280
3281 {
3282 // Check that we can make an array out of this type
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003283 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003284 context->recover();
3285
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003286 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003287 context->recover();
3288
3289 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003290 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003291 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003292 (yyvsp[-4].interm.type).setArray(true, size);
John Bauman66b8ab22014-05-06 15:57:45 -04003293
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003294 TType* type = new TType((yyvsp[-4].interm.type));
3295 TParameter param = { (yyvsp[-3].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003296 (yyval.interm).param = param;
3297 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003298
John Bauman66b8ab22014-05-06 15:57:45 -04003299 break;
3300
Alexis Hetu17809052015-05-13 11:28:22 -04003301 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003302
3303 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003304 (yyval.interm) = (yyvsp[0].interm);
3305 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003306 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003307 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003308
John Bauman66b8ab22014-05-06 15:57:45 -04003309 break;
3310
Alexis Hetu17809052015-05-13 11:28:22 -04003311 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003312
3313 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003314 (yyval.interm) = (yyvsp[0].interm);
3315 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003316 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003317 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003318 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003319 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003320
John Bauman66b8ab22014-05-06 15:57:45 -04003321 break;
3322
Alexis Hetu17809052015-05-13 11:28:22 -04003323 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003324
3325 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003326 (yyval.interm) = (yyvsp[0].interm);
3327 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003328 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003329 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003330
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003331 break;
3332
Alexis Hetu17809052015-05-13 11:28:22 -04003333 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003334
3335 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003336 (yyval.interm) = (yyvsp[0].interm);
3337 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003338 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003339 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003340 context->recover();
3341 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003342
Alexis Hetua35d8232015-06-11 17:11:06 -04003343 break;
3344
3345 case 105:
3346
3347 {
3348 (yyval.interm.qualifier) = EvqIn;
3349 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003350
Alexis Hetua35d8232015-06-11 17:11:06 -04003351 break;
3352
3353 case 106:
3354
3355 {
3356 (yyval.interm.qualifier) = EvqIn;
3357 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003358
Alexis Hetua35d8232015-06-11 17:11:06 -04003359 break;
3360
3361 case 107:
3362
3363 {
3364 (yyval.interm.qualifier) = EvqOut;
3365 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003366
Alexis Hetua35d8232015-06-11 17:11:06 -04003367 break;
3368
3369 case 108:
3370
3371 {
3372 (yyval.interm.qualifier) = EvqInOut;
3373 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003374
Alexis Hetua35d8232015-06-11 17:11:06 -04003375 break;
3376
3377 case 109:
3378
3379 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003380 TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
John Bauman66b8ab22014-05-06 15:57:45 -04003381 (yyval.interm).param = param;
3382 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003383
John Bauman66b8ab22014-05-06 15:57:45 -04003384 break;
3385
Alexis Hetua35d8232015-06-11 17:11:06 -04003386 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003387
3388 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003389 (yyval.interm) = (yyvsp[0].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04003390 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003391
John Bauman66b8ab22014-05-06 15:57:45 -04003392 break;
3393
Alexis Hetua35d8232015-06-11 17:11:06 -04003394 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003395
3396 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003397 (yyval.interm) = (yyvsp[-2].interm);
3398 (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yylsp[0]), *(yyvsp[0].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003399 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003400
John Bauman66b8ab22014-05-06 15:57:45 -04003401 break;
3402
Alexis Hetua35d8232015-06-11 17:11:06 -04003403 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003404
3405 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003406 (yyval.interm) = (yyvsp[-5].interm);
3407 (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[-5].interm).intermAggregate, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003408 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003409
John Bauman66b8ab22014-05-06 15:57:45 -04003410 break;
3411
Alexis Hetua35d8232015-06-11 17:11:06 -04003412 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003413
3414 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003415 ES3_ONLY("[]", (yylsp[-4]), "implicitly sized array");
3416 (yyval.interm) = (yyvsp[-6].interm);
3417 (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[-6].interm).intermAggregate, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003418 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003419
John Bauman66b8ab22014-05-06 15:57:45 -04003420 break;
3421
Alexis Hetua35d8232015-06-11 17:11:06 -04003422 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003423
3424 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003425 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3426 (yyval.interm) = (yyvsp[-7].interm);
3427 (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[-7].interm).intermAggregate, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003428 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003429
John Bauman66b8ab22014-05-06 15:57:45 -04003430 break;
3431
Alexis Hetua35d8232015-06-11 17:11:06 -04003432 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003433
3434 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003435 (yyval.interm) = (yyvsp[-4].interm);
3436 (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[-4].interm).intermAggregate, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003437 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003438
John Bauman66b8ab22014-05-06 15:57:45 -04003439 break;
3440
Alexis Hetua35d8232015-06-11 17:11:06 -04003441 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003442
3443 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003444 (yyval.interm).type = (yyvsp[0].interm.type);
3445 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003446 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003447
John Bauman66b8ab22014-05-06 15:57:45 -04003448 break;
3449
Alexis Hetua35d8232015-06-11 17:11:06 -04003450 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003451
3452 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003453 (yyval.interm).type = (yyvsp[-1].interm.type);
3454 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003455 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003456
John Bauman66b8ab22014-05-06 15:57:45 -04003457 break;
3458
Alexis Hetua35d8232015-06-11 17:11:06 -04003459 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003460
3461 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003462 (yyval.interm).type = (yyvsp[-4].interm.type);
3463 (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003464 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003465
John Bauman66b8ab22014-05-06 15:57:45 -04003466 break;
3467
Alexis Hetua35d8232015-06-11 17:11:06 -04003468 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003469
3470 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003471 ES3_ONLY("[]", (yylsp[-3]), "implicitly sized array");
3472 (yyval.interm).type = (yyvsp[-5].interm.type);
3473 (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003474 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003475
John Bauman66b8ab22014-05-06 15:57:45 -04003476 break;
3477
Alexis Hetua35d8232015-06-11 17:11:06 -04003478 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003479
3480 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003481 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3482 (yyval.interm).type = (yyvsp[-6].interm.type);
3483 (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003484 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003485
John Bauman66b8ab22014-05-06 15:57:45 -04003486 break;
3487
Alexis Hetua35d8232015-06-11 17:11:06 -04003488 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003489
3490 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003491 (yyval.interm).type = (yyvsp[-3].interm.type);
3492 (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003493 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003494
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003495 break;
3496
Alexis Hetua35d8232015-06-11 17:11:06 -04003497 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003498
3499 {
3500 // $$.type is not used in invariant declarations.
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003501 (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003502 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003503
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003504 break;
3505
Alexis Hetua35d8232015-06-11 17:11:06 -04003506 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003507
3508 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003509 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003510
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003511 if ((yyvsp[0].interm.type).array) {
3512 ES3_ONLY("[]", (yylsp[0]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003513 if (context->getShaderVersion() != 300) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003514 (yyvsp[0].interm.type).clearArrayness();
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003515 }
John Bauman66b8ab22014-05-06 15:57:45 -04003516 }
3517 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003518
John Bauman66b8ab22014-05-06 15:57:45 -04003519 break;
3520
Alexis Hetua35d8232015-06-11 17:11:06 -04003521 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003522
3523 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003524 (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 -04003525 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003526
John Bauman66b8ab22014-05-06 15:57:45 -04003527 break;
3528
Alexis Hetua35d8232015-06-11 17:11:06 -04003529 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003530
3531 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003532 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003533 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003534
John Bauman66b8ab22014-05-06 15:57:45 -04003535 break;
3536
Alexis Hetua35d8232015-06-11 17:11:06 -04003537 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003538
3539 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003540 (yyval.interm.type).qualifier = EvqFlat;
3541 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003542
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003543 break;
3544
Alexis Hetua35d8232015-06-11 17:11:06 -04003545 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003546
3547 {
3548 (yyval.interm.qualifier) = EvqConstReadOnly;
3549 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003550
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003551 break;
3552
Alexis Hetua35d8232015-06-11 17:11:06 -04003553 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003554
3555 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003556 VERTEX_ONLY("attribute", (yylsp[0]));
3557 ES2_ONLY("attribute", (yylsp[0]));
3558 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003559 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003560 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003561 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003562
John Bauman66b8ab22014-05-06 15:57:45 -04003563 break;
3564
Alexis Hetua35d8232015-06-11 17:11:06 -04003565 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003566
3567 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003568 ES2_ONLY("varying", (yylsp[0]));
3569 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003570 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003571 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003572 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003573 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003574 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003575 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003576
John Bauman66b8ab22014-05-06 15:57:45 -04003577 break;
3578
Alexis Hetua35d8232015-06-11 17:11:06 -04003579 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003580
3581 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003582 ES2_ONLY("varying", (yylsp[-1]));
3583 if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003584 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003585 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003586 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003587 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003588 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003589 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003590
John Bauman66b8ab22014-05-06 15:57:45 -04003591 break;
3592
Alexis Hetua35d8232015-06-11 17:11:06 -04003593 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003594
3595 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003596 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003597 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003598
John Bauman66b8ab22014-05-06 15:57:45 -04003599 break;
3600
Alexis Hetua35d8232015-06-11 17:11:06 -04003601 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003602
3603 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003604 (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 -04003605 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003606
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003607 break;
3608
Alexis Hetua35d8232015-06-11 17:11:06 -04003609 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003610
3611 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003612 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 -04003613 context->recover();
3614
3615 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003616 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003617 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003618
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003619 break;
3620
Alexis Hetua35d8232015-06-11 17:11:06 -04003621 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003622
3623 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003624 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003625 (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003626 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003627
Nicolas Capens7d626792015-02-17 17:58:31 -05003628 break;
3629
Alexis Hetua35d8232015-06-11 17:11:06 -04003630 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003631
3632 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003633 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
3634 (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003635 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003636
Nicolas Capens7d626792015-02-17 17:58:31 -05003637 break;
3638
Alexis Hetua35d8232015-06-11 17:11:06 -04003639 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003640
3641 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003642 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-1]));
3643 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003644 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003645 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003646
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003647 break;
3648
Alexis Hetua35d8232015-06-11 17:11:06 -04003649 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003650
3651 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003652 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-2]));
3653 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier);
Alexis Hetuad527752015-07-07 13:31:44 -04003654 (yyval.interm.type).invariant = true;
3655 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003656
Alexis Hetuad527752015-07-07 13:31:44 -04003657 break;
3658
3659 case 138:
3660
3661 {
3662 (yyval.interm.type).qualifier = EvqConstExpr;
3663 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003664
Alexis Hetuad527752015-07-07 13:31:44 -04003665 break;
3666
3667 case 139:
3668
3669 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003670 ES3_ONLY("in", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003671 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003672 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003673
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003674 break;
3675
Alexis Hetuad527752015-07-07 13:31:44 -04003676 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003677
3678 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003679 ES3_ONLY("out", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003680 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003681 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003682
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003683 break;
3684
Alexis Hetuad527752015-07-07 13:31:44 -04003685 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003686
3687 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003688 ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003689 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003690 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003691 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 -04003692 context->recover();
3693 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003694 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003695 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003696
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003697 break;
3698
Alexis Hetuad527752015-07-07 13:31:44 -04003699 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003700
3701 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003702 ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003703 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003704 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003705 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 -04003706 context->recover();
3707 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003708 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003709 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003710
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003711 break;
3712
Alexis Hetuad527752015-07-07 13:31:44 -04003713 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003714
3715 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003716 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003717 context->recover();
3718 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003719 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003720
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003721 break;
3722
Alexis Hetuad527752015-07-07 13:31:44 -04003723 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003724
3725 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003726 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003727
3728 if ((yyval.interm.type).precision == EbpUndefined) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003729 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type);
3730 if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003731 context->recover();
3732 }
3733 }
3734 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003735
John Bauman66b8ab22014-05-06 15:57:45 -04003736 break;
3737
Alexis Hetuad527752015-07-07 13:31:44 -04003738 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003739
3740 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003741 (yyval.interm.type) = (yyvsp[0].interm.type);
3742 (yyval.interm.type).precision = (yyvsp[-1].interm.precision);
John Bauman66b8ab22014-05-06 15:57:45 -04003743 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003744
John Bauman66b8ab22014-05-06 15:57:45 -04003745 break;
3746
Alexis Hetuad527752015-07-07 13:31:44 -04003747 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003748
3749 {
3750 (yyval.interm.precision) = EbpHigh;
3751 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003752
John Bauman66b8ab22014-05-06 15:57:45 -04003753 break;
3754
Alexis Hetuad527752015-07-07 13:31:44 -04003755 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003756
3757 {
3758 (yyval.interm.precision) = EbpMedium;
3759 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003760
John Bauman66b8ab22014-05-06 15:57:45 -04003761 break;
3762
Alexis Hetuad527752015-07-07 13:31:44 -04003763 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003764
3765 {
3766 (yyval.interm.precision) = EbpLow;
3767 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003768
John Bauman66b8ab22014-05-06 15:57:45 -04003769 break;
3770
Alexis Hetuad527752015-07-07 13:31:44 -04003771 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003772
3773 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003774 ES3_ONLY("layout", (yylsp[-3]), "qualifier");
3775 (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003776 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003777
Nicolas Capens7d626792015-02-17 17:58:31 -05003778 break;
3779
Alexis Hetuad527752015-07-07 13:31:44 -04003780 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003781
3782 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003783 (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003784 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003785
Nicolas Capens7d626792015-02-17 17:58:31 -05003786 break;
3787
Alexis Hetuad527752015-07-07 13:31:44 -04003788 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003789
3790 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003791 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier));
Nicolas Capens7d626792015-02-17 17:58:31 -05003792 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003793
Nicolas Capens7d626792015-02-17 17:58:31 -05003794 break;
3795
Alexis Hetuad527752015-07-07 13:31:44 -04003796 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003797
3798 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003799 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003800 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003801
Nicolas Capens7d626792015-02-17 17:58:31 -05003802 break;
3803
Alexis Hetua35d8232015-06-11 17:11:06 -04003804 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003805
3806 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003807 (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 -04003808 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003809
Alexis Hetuad527752015-07-07 13:31:44 -04003810 break;
3811
3812 case 154:
3813
3814 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003815 (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 -04003816 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003817
Alexis Hetuad527752015-07-07 13:31:44 -04003818 break;
3819
3820 case 155:
3821
3822 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003823 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003824 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003825
John Bauman66b8ab22014-05-06 15:57:45 -04003826 break;
3827
Alexis Hetuad527752015-07-07 13:31:44 -04003828 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003829
3830 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003831 ES3_ONLY("[]", (yylsp[-1]), "implicitly sized array");
3832 (yyval.interm.type) = (yyvsp[-2].interm.type);
Alexis Hetue5246692015-06-18 12:34:52 -04003833 (yyval.interm.type).setArray(true, 0);
3834 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003835
Alexis Hetue5246692015-06-18 12:34:52 -04003836 break;
3837
Alexis Hetuad527752015-07-07 13:31:44 -04003838 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003839
3840 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003841 (yyval.interm.type) = (yyvsp[-3].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003842
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003843 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003844 context->recover();
3845 else {
3846 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003847 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003848 context->recover();
3849 (yyval.interm.type).setArray(true, size);
3850 }
3851 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003852
John Bauman66b8ab22014-05-06 15:57:45 -04003853 break;
3854
Alexis Hetuad527752015-07-07 13:31:44 -04003855 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003856
3857 {
3858 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003859 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003860 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003861
Alexis Hetu17809052015-05-13 11:28:22 -04003862 break;
3863
Alexis Hetu17809052015-05-13 11:28:22 -04003864 case 159:
3865
3866 {
3867 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003868 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003869 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003870
Alexis Hetu17809052015-05-13 11:28:22 -04003871 break;
3872
3873 case 160:
3874
3875 {
3876 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003877 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003878 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003879
Alexis Hetua35d8232015-06-11 17:11:06 -04003880 break;
3881
3882 case 161:
3883
3884 {
3885 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003886 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003887 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003888
Alexis Hetua35d8232015-06-11 17:11:06 -04003889 break;
3890
3891 case 162:
3892
3893 {
3894 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003895 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003896 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003897
Alexis Hetua35d8232015-06-11 17:11:06 -04003898 break;
3899
3900 case 163:
3901
3902 {
3903 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003904 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003905 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003906 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003907
Alexis Hetua35d8232015-06-11 17:11:06 -04003908 break;
3909
3910 case 164:
3911
3912 {
3913 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003914 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003915 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003916 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003917
Alexis Hetua35d8232015-06-11 17:11:06 -04003918 break;
3919
3920 case 165:
3921
3922 {
3923 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003924 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003925 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003926 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003927
Alexis Hetu17809052015-05-13 11:28:22 -04003928 break;
3929
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003930 case 166:
3931
3932 {
3933 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003934 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003935 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003936 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003937
Alexis Hetua35d8232015-06-11 17:11:06 -04003938 break;
3939
3940 case 167:
3941
3942 {
3943 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003944 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003945 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003946 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003947
Alexis Hetua35d8232015-06-11 17:11:06 -04003948 break;
3949
3950 case 168:
3951
3952 {
3953 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003954 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003955 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003956 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003957
Alexis Hetua35d8232015-06-11 17:11:06 -04003958 break;
3959
3960 case 169:
3961
3962 {
3963 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003964 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003965 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003966 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003967
Alexis Hetua35d8232015-06-11 17:11:06 -04003968 break;
3969
3970 case 170:
3971
3972 {
3973 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003974 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003975 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003976 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003977
Alexis Hetua35d8232015-06-11 17:11:06 -04003978 break;
3979
3980 case 171:
3981
3982 {
3983 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003984 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003985 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003986 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003987
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003988 break;
3989
Alexis Hetua35d8232015-06-11 17:11:06 -04003990 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003991
3992 {
Alexis Hetue5246692015-06-18 12:34:52 -04003993 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003994 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003995 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04003996 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003997
Alexis Hetue5246692015-06-18 12:34:52 -04003998 break;
3999
4000 case 173:
4001
4002 {
Alexis Hetuad527752015-07-07 13:31:44 -04004003 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004004 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04004005 (yyval.interm.type).setAggregate(3);
4006 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004007
Alexis Hetuad527752015-07-07 13:31:44 -04004008 break;
4009
4010 case 174:
4011
4012 {
4013 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004014 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04004015 (yyval.interm.type).setAggregate(4);
4016 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004017
Alexis Hetuad527752015-07-07 13:31:44 -04004018 break;
4019
4020 case 175:
4021
4022 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004023 FRAG_VERT_ONLY("mat2", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004024 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004025 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004026 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004027 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004028
John Bauman66b8ab22014-05-06 15:57:45 -04004029 break;
4030
Alexis Hetuad527752015-07-07 13:31:44 -04004031 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004032
4033 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004034 FRAG_VERT_ONLY("mat3", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004035 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004036 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004037 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004038 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004039
John Bauman66b8ab22014-05-06 15:57:45 -04004040 break;
4041
Alexis Hetuad527752015-07-07 13:31:44 -04004042 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004043
4044 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004045 FRAG_VERT_ONLY("mat4", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004046 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004047 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004048 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004049 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004050
John Bauman66b8ab22014-05-06 15:57:45 -04004051 break;
4052
Alexis Hetuad527752015-07-07 13:31:44 -04004053 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004054
4055 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004056 FRAG_VERT_ONLY("mat2x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004057 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004058 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004059 (yyval.interm.type).setMatrix(2, 3);
4060 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004061
Alexis Hetub14178b2015-04-13 13:23:20 -04004062 break;
4063
Alexis Hetuad527752015-07-07 13:31:44 -04004064 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004065
4066 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004067 FRAG_VERT_ONLY("mat3x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004068 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004069 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004070 (yyval.interm.type).setMatrix(3, 2);
4071 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004072
Alexis Hetub14178b2015-04-13 13:23:20 -04004073 break;
4074
Alexis Hetuad527752015-07-07 13:31:44 -04004075 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004076
4077 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004078 FRAG_VERT_ONLY("mat2x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004079 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004080 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004081 (yyval.interm.type).setMatrix(2, 4);
4082 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004083
Alexis Hetub14178b2015-04-13 13:23:20 -04004084 break;
4085
Alexis Hetuad527752015-07-07 13:31:44 -04004086 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004087
4088 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004089 FRAG_VERT_ONLY("mat4x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004090 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004091 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004092 (yyval.interm.type).setMatrix(4, 2);
4093 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004094
Alexis Hetub14178b2015-04-13 13:23:20 -04004095 break;
4096
Alexis Hetuad527752015-07-07 13:31:44 -04004097 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004098
4099 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004100 FRAG_VERT_ONLY("mat3x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004101 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004102 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004103 (yyval.interm.type).setMatrix(3, 4);
4104 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004105
Alexis Hetub14178b2015-04-13 13:23:20 -04004106 break;
4107
Alexis Hetuad527752015-07-07 13:31:44 -04004108 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004109
4110 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004111 FRAG_VERT_ONLY("mat4x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004112 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004113 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004114 (yyval.interm.type).setMatrix(4, 3);
4115 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004116
Alexis Hetub14178b2015-04-13 13:23:20 -04004117 break;
4118
Alexis Hetuad527752015-07-07 13:31:44 -04004119 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004120
4121 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004122 FRAG_VERT_ONLY("sampler2D", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004123 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004124 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004125 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004126
John Bauman66b8ab22014-05-06 15:57:45 -04004127 break;
4128
Alexis Hetuad527752015-07-07 13:31:44 -04004129 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004130
4131 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004132 FRAG_VERT_ONLY("samplerCube", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004133 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004134 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004135 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004136
John Bauman66b8ab22014-05-06 15:57:45 -04004137 break;
4138
Alexis Hetuad527752015-07-07 13:31:44 -04004139 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004140
4141 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004142 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004143 context->error((yylsp[0]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004144 context->recover();
4145 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004146 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004147 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004148 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004149 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004150
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004151 break;
4152
Alexis Hetuad527752015-07-07 13:31:44 -04004153 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004154
4155 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004156 FRAG_VERT_ONLY("sampler3D", (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004157 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004158 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004159 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004160
Alexis Hetub027aa92015-01-19 15:56:12 -05004161 break;
4162
Alexis Hetuad527752015-07-07 13:31:44 -04004163 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004164
4165 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004166 FRAG_VERT_ONLY("sampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004167 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004168 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004169 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004170
Alexis Hetub14178b2015-04-13 13:23:20 -04004171 break;
4172
Alexis Hetuad527752015-07-07 13:31:44 -04004173 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004174
4175 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004176 FRAG_VERT_ONLY("isampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004177 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004178 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004179 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004180
Alexis Hetub14178b2015-04-13 13:23:20 -04004181 break;
4182
Alexis Hetuad527752015-07-07 13:31:44 -04004183 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004184
4185 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004186 FRAG_VERT_ONLY("isampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004187 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004188 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004189 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004190
Alexis Hetub14178b2015-04-13 13:23:20 -04004191 break;
4192
Alexis Hetuad527752015-07-07 13:31:44 -04004193 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004194
4195 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004196 FRAG_VERT_ONLY("isamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004197 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004198 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004199 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004200
Alexis Hetub14178b2015-04-13 13:23:20 -04004201 break;
4202
Alexis Hetuad527752015-07-07 13:31:44 -04004203 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004204
4205 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004206 FRAG_VERT_ONLY("isampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004207 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004208 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004209 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004210
Alexis Hetub14178b2015-04-13 13:23:20 -04004211 break;
4212
Alexis Hetuad527752015-07-07 13:31:44 -04004213 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004214
4215 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004216 FRAG_VERT_ONLY("usampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004217 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004218 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004219 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004220
Alexis Hetub14178b2015-04-13 13:23:20 -04004221 break;
4222
Alexis Hetuad527752015-07-07 13:31:44 -04004223 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004224
4225 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004226 FRAG_VERT_ONLY("usampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004227 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004228 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004229 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004230
Alexis Hetub14178b2015-04-13 13:23:20 -04004231 break;
4232
Alexis Hetuad527752015-07-07 13:31:44 -04004233 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004234
4235 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004236 FRAG_VERT_ONLY("usamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004237 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004238 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004239 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004240
Alexis Hetub14178b2015-04-13 13:23:20 -04004241 break;
4242
Alexis Hetuad527752015-07-07 13:31:44 -04004243 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004244
4245 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004246 FRAG_VERT_ONLY("usampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004247 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004248 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004249 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004250
Alexis Hetub14178b2015-04-13 13:23:20 -04004251 break;
4252
Alexis Hetuad527752015-07-07 13:31:44 -04004253 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004254
4255 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004256 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004257 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004258 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004259 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004260
Alexis Hetub14178b2015-04-13 13:23:20 -04004261 break;
4262
Alexis Hetuad527752015-07-07 13:31:44 -04004263 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004264
4265 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004266 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004267 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004268 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004269 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004270
Alexis Hetub14178b2015-04-13 13:23:20 -04004271 break;
4272
Alexis Hetuad527752015-07-07 13:31:44 -04004273 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004274
4275 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004276 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004277 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004278 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004279 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004280
Alexis Hetub14178b2015-04-13 13:23:20 -04004281 break;
4282
Alexis Hetuad527752015-07-07 13:31:44 -04004283 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004284
4285 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004286 FRAG_VERT_ONLY("struct", (yylsp[0]));
4287 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04004288 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4289 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004290
John Bauman66b8ab22014-05-06 15:57:45 -04004291 break;
4292
Alexis Hetuad527752015-07-07 13:31:44 -04004293 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004294
4295 {
4296 //
4297 // This is for user defined type names. The lexical phase looked up the
4298 // type.
4299 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004300 TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType();
John Bauman66b8ab22014-05-06 15:57:45 -04004301 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004302 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004303 (yyval.interm.type).userDef = &structure;
4304 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004305
John Bauman66b8ab22014-05-06 15:57:45 -04004306 break;
4307
Alexis Hetuad527752015-07-07 13:31:44 -04004308 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004309
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004310 { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); }
4311
John Bauman66b8ab22014-05-06 15:57:45 -04004312 break;
4313
Alexis Hetuad527752015-07-07 13:31:44 -04004314 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004315
4316 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004317 (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004318 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004319
John Bauman66b8ab22014-05-06 15:57:45 -04004320 break;
4321
Alexis Hetuad527752015-07-07 13:31:44 -04004322 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004323
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004324 { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); }
4325
John Bauman66b8ab22014-05-06 15:57:45 -04004326 break;
4327
Alexis Hetuad527752015-07-07 13:31:44 -04004328 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004329
4330 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004331 (yyval.interm.type) = context->addStructure((yylsp[-4]), (yylsp[-4]), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004332 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004333
John Bauman66b8ab22014-05-06 15:57:45 -04004334 break;
4335
Alexis Hetuad527752015-07-07 13:31:44 -04004336 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004337
4338 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004339 (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004340 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004341
John Bauman66b8ab22014-05-06 15:57:45 -04004342 break;
4343
Alexis Hetuad527752015-07-07 13:31:44 -04004344 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004345
4346 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004347 (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList);
4348 for (unsigned int i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) {
4349 TField* field = (*(yyvsp[0].interm.fieldList))[i];
Alexis Hetua8b364b2015-06-10 11:48:40 -04004350 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4351 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004352 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 -04004353 context->recover();
4354 }
4355 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004356 (yyval.interm.fieldList)->push_back((*(yyvsp[0].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004357 }
4358 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004359
John Bauman66b8ab22014-05-06 15:57:45 -04004360 break;
4361
Alexis Hetuad527752015-07-07 13:31:44 -04004362 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004363
4364 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004365 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004366 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004367
John Bauman66b8ab22014-05-06 15:57:45 -04004368 break;
4369
Alexis Hetuad527752015-07-07 13:31:44 -04004370 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004371
4372 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004373 // ES3 Only, but errors should be handled elsewhere
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004374 (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier;
4375 (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier;
4376 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
Alexis Hetuad6b8752015-06-09 16:15:30 -04004377 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004378
Alexis Hetuad6b8752015-06-09 16:15:30 -04004379 break;
4380
Alexis Hetuad527752015-07-07 13:31:44 -04004381 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004382
4383 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004384 (yyval.interm.fieldList) = NewPoolTFieldList();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004385 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004386 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004387
John Bauman66b8ab22014-05-06 15:57:45 -04004388 break;
4389
Alexis Hetuad527752015-07-07 13:31:44 -04004390 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004391
4392 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004393 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004394 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004395
John Bauman66b8ab22014-05-06 15:57:45 -04004396 break;
4397
Alexis Hetuad527752015-07-07 13:31:44 -04004398 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004399
4400 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004401 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004402 context->recover();
4403
Alexis Hetua8b364b2015-06-10 11:48:40 -04004404 TType* type = new TType(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004405 (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004406 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004407
John Bauman66b8ab22014-05-06 15:57:45 -04004408 break;
4409
Alexis Hetuad527752015-07-07 13:31:44 -04004410 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004411
4412 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004413 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004414 context->recover();
4415
Alexis Hetua8b364b2015-06-10 11:48:40 -04004416 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004417 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004418 if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004419 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004420 type->setArraySize(size);
4421
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004422 (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3]));
John Bauman66b8ab22014-05-06 15:57:45 -04004423 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004424
John Bauman66b8ab22014-05-06 15:57:45 -04004425 break;
4426
Alexis Hetu17809052015-05-13 11:28:22 -04004427 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004428
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004429 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
4430
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004431 break;
4432
Alexis Hetu17809052015-05-13 11:28:22 -04004433 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004434
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004435 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4436
Alexis Hetuad6b8752015-06-09 16:15:30 -04004437 break;
4438
4439 case 216:
4440
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004441 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
4442
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004443 break;
4444
4445 case 217:
4446
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004447 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4448
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004449 break;
4450
4451 case 218:
4452
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004453 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4454
Alexis Hetua35d8232015-06-11 17:11:06 -04004455 break;
4456
4457 case 219:
4458
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004459 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4460
Alexis Hetua35d8232015-06-11 17:11:06 -04004461 break;
4462
4463 case 220:
4464
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004465 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4466
Alexis Hetua35d8232015-06-11 17:11:06 -04004467 break;
4468
4469 case 221:
4470
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004471 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
4472
Alexis Hetua35d8232015-06-11 17:11:06 -04004473 break;
4474
4475 case 222:
4476
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004477 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
4478
Alexis Hetua35d8232015-06-11 17:11:06 -04004479 break;
4480
4481 case 223:
4482
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004483 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4484
Alexis Hetu76a343a2015-06-04 17:21:22 -04004485 break;
4486
4487 case 224:
4488
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004489 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4490
Alexis Hetu76a343a2015-06-04 17:21:22 -04004491 break;
4492
4493 case 225:
4494
Alexis Hetuad527752015-07-07 13:31:44 -04004495 { (yyval.interm.intermAggregate) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004496
Alexis Hetue5246692015-06-18 12:34:52 -04004497 break;
4498
4499 case 226:
4500
Alexis Hetuad527752015-07-07 13:31:44 -04004501 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004502
Alexis Hetuad527752015-07-07 13:31:44 -04004503 break;
4504
4505 case 227:
4506
4507 { context->symbolTable.pop(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004508
Alexis Hetuad527752015-07-07 13:31:44 -04004509 break;
4510
4511 case 228:
4512
Nicolas Capens7d626792015-02-17 17:58:31 -05004513 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004514 if ((yyvsp[-2].interm.intermAggregate) != 0) {
4515 (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence);
4516 (yyvsp[-2].interm.intermAggregate)->setEndLine((yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004517 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004518 (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate);
Nicolas Capens7d626792015-02-17 17:58:31 -05004519 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004520
Nicolas Capens7d626792015-02-17 17:58:31 -05004521 break;
4522
Alexis Hetua35d8232015-06-11 17:11:06 -04004523 case 229:
4524
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004525 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4526
Alexis Hetua35d8232015-06-11 17:11:06 -04004527 break;
4528
4529 case 230:
4530
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004531 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4532
Alexis Hetu76a343a2015-06-04 17:21:22 -04004533 break;
4534
4535 case 231:
4536
Alexis Hetue5246692015-06-18 12:34:52 -04004537 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004538
Alexis Hetu76a343a2015-06-04 17:21:22 -04004539 break;
4540
4541 case 232:
4542
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004543 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4544
Alexis Hetue5246692015-06-18 12:34:52 -04004545 break;
4546
4547 case 233:
4548
Alexis Hetuad527752015-07-07 13:31:44 -04004549 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004550
Alexis Hetuad527752015-07-07 13:31:44 -04004551 break;
4552
4553 case 234:
4554
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004555 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4556
Alexis Hetuad527752015-07-07 13:31:44 -04004557 break;
4558
4559 case 235:
4560
John Bauman66b8ab22014-05-06 15:57:45 -04004561 {
4562 (yyval.interm.intermNode) = 0;
4563 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004564
John Bauman66b8ab22014-05-06 15:57:45 -04004565 break;
4566
Alexis Hetuad527752015-07-07 13:31:44 -04004567 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004568
4569 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004570 if ((yyvsp[-1].interm.intermAggregate)) {
4571 (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence);
4572 (yyvsp[-1].interm.intermAggregate)->setEndLine((yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004573 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004574 (yyval.interm.intermNode) = (yyvsp[-1].interm.intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004575 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004576
John Bauman66b8ab22014-05-06 15:57:45 -04004577 break;
4578
Alexis Hetuad527752015-07-07 13:31:44 -04004579 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004580
4581 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004582 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004583 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004584
John Bauman66b8ab22014-05-06 15:57:45 -04004585 break;
4586
Alexis Hetuad527752015-07-07 13:31:44 -04004587 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004588
4589 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004590 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004591 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004592
John Bauman66b8ab22014-05-06 15:57:45 -04004593 break;
4594
Alexis Hetuad527752015-07-07 13:31:44 -04004595 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004596
4597 { (yyval.interm.intermNode) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004598
John Bauman66b8ab22014-05-06 15:57:45 -04004599 break;
4600
Alexis Hetuad527752015-07-07 13:31:44 -04004601 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004602
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004603 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
4604
John Bauman66b8ab22014-05-06 15:57:45 -04004605 break;
4606
Alexis Hetuad527752015-07-07 13:31:44 -04004607 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004608
4609 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004610 if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004611 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004612 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
John Bauman66b8ab22014-05-06 15:57:45 -04004613 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004614
John Bauman66b8ab22014-05-06 15:57:45 -04004615 break;
4616
Alexis Hetuad527752015-07-07 13:31:44 -04004617 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004618
4619 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004620 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
4621 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004622 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004623
John Bauman66b8ab22014-05-06 15:57:45 -04004624 break;
4625
Alexis Hetuad527752015-07-07 13:31:44 -04004626 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004627
4628 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004629 (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004630 (yyval.interm.nodePair).node2 = 0;
4631 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004632
John Bauman66b8ab22014-05-06 15:57:45 -04004633 break;
4634
Alexis Hetuad527752015-07-07 13:31:44 -04004635 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004636
Alexis Hetue5246692015-06-18 12:34:52 -04004637 { context->incrSwitchNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004638
Alexis Hetu76a343a2015-06-04 17:21:22 -04004639 break;
4640
Alexis Hetuad527752015-07-07 13:31:44 -04004641 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004642
4643 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004644 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5]));
Alexis Hetue5246692015-06-18 12:34:52 -04004645 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004646 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004647
Alexis Hetu76a343a2015-06-04 17:21:22 -04004648 break;
4649
Alexis Hetuad527752015-07-07 13:31:44 -04004650 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004651
4652 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004653 (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004654 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004655
Alexis Hetu76a343a2015-06-04 17:21:22 -04004656 break;
4657
Alexis Hetuad527752015-07-07 13:31:44 -04004658 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004659
4660 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004661 (yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
Alexis Hetue5246692015-06-18 12:34:52 -04004662 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004663
Alexis Hetue5246692015-06-18 12:34:52 -04004664 break;
4665
Alexis Hetuad527752015-07-07 13:31:44 -04004666 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004667
4668 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004669 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
4670 if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004671 context->recover();
4672 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004673
John Bauman66b8ab22014-05-06 15:57:45 -04004674 break;
4675
Alexis Hetuad527752015-07-07 13:31:44 -04004676 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004677
4678 {
4679 TIntermNode* intermNode;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004680 if (context->structQualifierErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004681 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004682 if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004683 context->recover();
4684
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004685 if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode))
4686 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004687 else {
4688 context->recover();
4689 (yyval.interm.intermTypedNode) = 0;
4690 }
4691 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004692
John Bauman66b8ab22014-05-06 15:57:45 -04004693 break;
4694
Alexis Hetuad527752015-07-07 13:31:44 -04004695 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004696
Alexis Hetu0a655842015-06-22 16:52:11 -04004697 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004698
John Bauman66b8ab22014-05-06 15:57:45 -04004699 break;
4700
Alexis Hetuad527752015-07-07 13:31:44 -04004701 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004702
4703 {
4704 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004705 (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 -04004706 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004707 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004708
John Bauman66b8ab22014-05-06 15:57:45 -04004709 break;
4710
Alexis Hetuad527752015-07-07 13:31:44 -04004711 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004712
Alexis Hetu0a655842015-06-22 16:52:11 -04004713 { context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004714
John Bauman66b8ab22014-05-06 15:57:45 -04004715 break;
4716
Alexis Hetuad527752015-07-07 13:31:44 -04004717 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004718
4719 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004720 if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004721 context->recover();
4722
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004723 (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 -04004724 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004725 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004726
John Bauman66b8ab22014-05-06 15:57:45 -04004727 break;
4728
Alexis Hetuad527752015-07-07 13:31:44 -04004729 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004730
Alexis Hetu0a655842015-06-22 16:52:11 -04004731 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004732
Nicolas Capens3c20f802015-02-17 17:17:20 -05004733 break;
4734
Alexis Hetuad527752015-07-07 13:31:44 -04004735 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004736
4737 {
Alexis Hetue5246692015-06-18 12:34:52 -04004738 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004739 (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 -04004740 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004741 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004742
Alexis Hetu17809052015-05-13 11:28:22 -04004743 break;
4744
Alexis Hetu76a343a2015-06-04 17:21:22 -04004745 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004746
4747 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004748 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004749 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004750
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004751 break;
4752
Alexis Hetu76a343a2015-06-04 17:21:22 -04004753 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004754
4755 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004756 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004757 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004758
Alexis Hetue5246692015-06-18 12:34:52 -04004759 break;
4760
4761 case 258:
4762
4763 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004764 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004765 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004766
Alexis Hetuad527752015-07-07 13:31:44 -04004767 break;
4768
4769 case 259:
4770
4771 {
4772 (yyval.interm.intermTypedNode) = 0;
4773 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004774
Alexis Hetuad527752015-07-07 13:31:44 -04004775 break;
4776
4777 case 260:
4778
4779 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004780 (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004781 (yyval.interm.nodePair).node2 = 0;
4782 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004783
Alexis Hetu17809052015-05-13 11:28:22 -04004784 break;
4785
Alexis Hetuad527752015-07-07 13:31:44 -04004786 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004787
4788 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004789 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
4790 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004791 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004792
Alexis Hetu17809052015-05-13 11:28:22 -04004793 break;
4794
Alexis Hetuad527752015-07-07 13:31:44 -04004795 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004796
4797 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004798 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004799 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004800
Alexis Hetu17809052015-05-13 11:28:22 -04004801 break;
4802
Alexis Hetuad527752015-07-07 13:31:44 -04004803 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004804
4805 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004806 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004807 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004808
Alexis Hetu17809052015-05-13 11:28:22 -04004809 break;
4810
Alexis Hetuad527752015-07-07 13:31:44 -04004811 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004812
4813 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004814 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004815 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004816
Alexis Hetu17809052015-05-13 11:28:22 -04004817 break;
4818
Alexis Hetuad527752015-07-07 13:31:44 -04004819 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004820
4821 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004822 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu17809052015-05-13 11:28:22 -04004823 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004824
Alexis Hetu17809052015-05-13 11:28:22 -04004825 break;
4826
Alexis Hetuad527752015-07-07 13:31:44 -04004827 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004828
4829 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004830 FRAG_ONLY("discard", (yylsp[-1]));
4831 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004832 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004833
Alexis Hetu17809052015-05-13 11:28:22 -04004834 break;
4835
Alexis Hetuad527752015-07-07 13:31:44 -04004836 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004837
4838 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004839 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004840 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004841 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004842
Alexis Hetu17809052015-05-13 11:28:22 -04004843 break;
4844
Alexis Hetuad527752015-07-07 13:31:44 -04004845 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004846
4847 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004848 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004849 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004850 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004851
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004852 break;
4853
Alexis Hetue5246692015-06-18 12:34:52 -04004854 case 269:
4855
4856 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004857 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004858 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004859
Alexis Hetuad527752015-07-07 13:31:44 -04004860 break;
4861
4862 case 270:
4863
4864 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004865 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004866 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004867
Alexis Hetuad527752015-07-07 13:31:44 -04004868 break;
4869
4870 case 271:
4871
4872 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004873 TFunction* function = (yyvsp[0].interm).function;
John Bauman66b8ab22014-05-06 15:57:45 -04004874
Alexis Hetu0a655842015-06-22 16:52:11 -04004875 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004876
4877 if (builtIn)
4878 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004879 context->error((yylsp[0]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004880 context->recover();
4881 }
4882
Alexis Hetu0a655842015-06-22 16:52:11 -04004883 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004884 //
4885 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4886 // as it would have just been put in the symbol table. Otherwise, we're looking up
4887 // an earlier occurance.
4888 //
4889 if (prevDec->isDefined()) {
4890 //
4891 // Then this function already has a body.
4892 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004893 context->error((yylsp[0]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004894 context->recover();
4895 }
4896 prevDec->setDefined();
4897
4898 //
4899 // Raise error message if main function takes any parameters or return anything other than void
4900 //
4901 if (function->getName() == "main") {
4902 if (function->getParamCount() > 0) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004903 context->error((yylsp[0]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004904 context->recover();
4905 }
4906 if (function->getReturnType().getBasicType() != EbtVoid) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004907 context->error((yylsp[0]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004908 context->recover();
4909 }
4910 }
4911
4912 //
4913 // Remember the return type for later checking for RETURN statements.
4914 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004915 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4916 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004917
4918 //
4919 // Insert parameters into the symbol table.
4920 // If the parameter has no name, it's not an error, just don't insert it
4921 // (could be used for unused args).
4922 //
4923 // Also, accumulate the list of parameters into the HIL, so lower level code
4924 // knows where to find parameters.
4925 //
4926 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004927 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004928 const TParameter& param = function->getParam(i);
4929 if (param.name != 0) {
4930 TVariable *variable = new TVariable(param.name, *param.type);
4931 //
4932 // Insert the parameters with name in the symbol table.
4933 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004934 if (! context->symbolTable.declare(*variable)) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004935 context->error((yylsp[0]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004936 context->recover();
4937 delete variable;
4938 }
4939
4940 //
4941 // Add the parameter to the HIL
4942 //
4943 paramNodes = context->intermediate.growAggregate(
4944 paramNodes,
4945 context->intermediate.addSymbol(variable->getUniqueId(),
4946 variable->getName(),
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004947 variable->getType(), (yylsp[0])),
4948 (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004949 } else {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004950 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[0])), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004951 }
4952 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004953 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[0]));
4954 (yyvsp[0].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004955 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004956 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004957
John Bauman66b8ab22014-05-06 15:57:45 -04004958 break;
4959
Alexis Hetuad527752015-07-07 13:31:44 -04004960 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004961
4962 {
4963 //?? Check that all paths return a value if return type != void ?
4964 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004965 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004966 context->error((yylsp[-2]), "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004967 context->recover();
4968 }
4969
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04004970 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermAggregate), (yyloc));
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004971 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[-2]));
4972 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str());
4973 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[-2].interm).function->getReturnType());
John Bauman66b8ab22014-05-06 15:57:45 -04004974
4975 // store the pragma information for debug and optimize and other vendor specific
4976 // information. This information can be queried from the parse tree
4977 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4978 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4979
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04004980 if ((yyvsp[0].interm.intermAggregate) && (yyvsp[0].interm.intermAggregate)->getAsAggregate())
4981 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[0].interm.intermAggregate)->getAsAggregate()->getEndLine());
John Bauman66b8ab22014-05-06 15:57:45 -04004982
4983 context->symbolTable.pop();
4984 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004985
John Bauman66b8ab22014-05-06 15:57:45 -04004986 break;
4987
4988
4989
4990 default: break;
4991 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004992 /* User semantic actions sometimes alter yychar, and that requires
4993 that yytoken be updated with the new translation. We take the
4994 approach of translating immediately before every use of yytoken.
4995 One alternative is translating here after every semantic action,
4996 but that translation would be missed if the semantic action invokes
4997 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4998 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4999 incorrect destructor might then be invoked immediately. In the
5000 case of YYERROR or YYBACKUP, subsequent parser actions might lead
5001 to an incorrect destructor call or verbose syntax error message
5002 before the lookahead is translated. */
John Bauman66b8ab22014-05-06 15:57:45 -04005003 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5004
5005 YYPOPSTACK (yylen);
5006 yylen = 0;
5007 YY_STACK_PRINT (yyss, yyssp);
5008
5009 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005010 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005011
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005012 /* Now 'shift' the result of the reduction. Determine what state
John Bauman66b8ab22014-05-06 15:57:45 -04005013 that goes to, based on the state we popped back to and the rule
5014 number reduced by. */
5015
5016 yyn = yyr1[yyn];
5017
5018 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5019 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5020 yystate = yytable[yystate];
5021 else
5022 yystate = yydefgoto[yyn - YYNTOKENS];
5023
5024 goto yynewstate;
5025
5026
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005027/*--------------------------------------.
5028| yyerrlab -- here on detecting error. |
5029`--------------------------------------*/
John Bauman66b8ab22014-05-06 15:57:45 -04005030yyerrlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005031 /* Make sure we have latest lookahead translation. See comments at
5032 user semantic actions for why this is necessary. */
5033 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5034
John Bauman66b8ab22014-05-06 15:57:45 -04005035 /* If not already recovering from an error, report this error. */
5036 if (!yyerrstatus)
5037 {
5038 ++yynerrs;
5039#if ! YYERROR_VERBOSE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005040 yyerror (&yylloc, context, yyscanner, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04005041#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005042# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5043 yyssp, yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04005044 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005045 char const *yymsgp = YY_("syntax error");
5046 int yysyntax_error_status;
5047 yysyntax_error_status = YYSYNTAX_ERROR;
5048 if (yysyntax_error_status == 0)
5049 yymsgp = yymsg;
5050 else if (yysyntax_error_status == 1)
5051 {
5052 if (yymsg != yymsgbuf)
5053 YYSTACK_FREE (yymsg);
5054 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5055 if (!yymsg)
5056 {
5057 yymsg = yymsgbuf;
5058 yymsg_alloc = sizeof yymsgbuf;
5059 yysyntax_error_status = 2;
5060 }
5061 else
5062 {
5063 yysyntax_error_status = YYSYNTAX_ERROR;
5064 yymsgp = yymsg;
5065 }
5066 }
5067 yyerror (&yylloc, context, yyscanner, yymsgp);
5068 if (yysyntax_error_status == 2)
5069 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04005070 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005071# undef YYSYNTAX_ERROR
John Bauman66b8ab22014-05-06 15:57:45 -04005072#endif
5073 }
5074
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005075 yyerror_range[1] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005076
5077 if (yyerrstatus == 3)
5078 {
5079 /* If just tried and failed to reuse lookahead token after an
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005080 error, discard it. */
John Bauman66b8ab22014-05-06 15:57:45 -04005081
5082 if (yychar <= YYEOF)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005083 {
5084 /* Return failure if at end of input. */
5085 if (yychar == YYEOF)
5086 YYABORT;
5087 }
John Bauman66b8ab22014-05-06 15:57:45 -04005088 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005089 {
5090 yydestruct ("Error: discarding",
5091 yytoken, &yylval, &yylloc, context, yyscanner);
5092 yychar = YYEMPTY;
5093 }
John Bauman66b8ab22014-05-06 15:57:45 -04005094 }
5095
5096 /* Else will try to reuse lookahead token after shifting the error
5097 token. */
5098 goto yyerrlab1;
5099
5100
5101/*---------------------------------------------------.
5102| yyerrorlab -- error raised explicitly by YYERROR. |
5103`---------------------------------------------------*/
5104yyerrorlab:
5105
5106 /* Pacify compilers like GCC when the user code never invokes
5107 YYERROR and the label yyerrorlab therefore never appears in user
5108 code. */
5109 if (/*CONSTCOND*/ 0)
5110 goto yyerrorlab;
5111
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005112 yyerror_range[1] = yylsp[1-yylen];
5113 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005114 this YYERROR. */
5115 YYPOPSTACK (yylen);
5116 yylen = 0;
5117 YY_STACK_PRINT (yyss, yyssp);
5118 yystate = *yyssp;
5119 goto yyerrlab1;
5120
5121
5122/*-------------------------------------------------------------.
5123| yyerrlab1 -- common code for both syntax error and YYERROR. |
5124`-------------------------------------------------------------*/
5125yyerrlab1:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005126 yyerrstatus = 3; /* Each real token shifted decrements this. */
John Bauman66b8ab22014-05-06 15:57:45 -04005127
5128 for (;;)
5129 {
5130 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005131 if (!yypact_value_is_default (yyn))
5132 {
5133 yyn += YYTERROR;
5134 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5135 {
5136 yyn = yytable[yyn];
5137 if (0 < yyn)
5138 break;
5139 }
5140 }
John Bauman66b8ab22014-05-06 15:57:45 -04005141
5142 /* Pop the current state because it cannot handle the error token. */
5143 if (yyssp == yyss)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005144 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04005145
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005146 yyerror_range[1] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005147 yydestruct ("Error: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005148 yystos[yystate], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005149 YYPOPSTACK (1);
5150 yystate = *yyssp;
5151 YY_STACK_PRINT (yyss, yyssp);
5152 }
5153
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005154 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04005155 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005156 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04005157
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005158 yyerror_range[2] = yylloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005159 /* Using YYLLOC is tempting, but would change the location of
5160 the lookahead. YYLOC is available though. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005161 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005162 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005163
5164 /* Shift the error token. */
5165 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5166
5167 yystate = yyn;
5168 goto yynewstate;
5169
5170
5171/*-------------------------------------.
5172| yyacceptlab -- YYACCEPT comes here. |
5173`-------------------------------------*/
5174yyacceptlab:
5175 yyresult = 0;
5176 goto yyreturn;
5177
5178/*-----------------------------------.
5179| yyabortlab -- YYABORT comes here. |
5180`-----------------------------------*/
5181yyabortlab:
5182 yyresult = 1;
5183 goto yyreturn;
5184
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005185#if !defined yyoverflow || YYERROR_VERBOSE
John Bauman66b8ab22014-05-06 15:57:45 -04005186/*-------------------------------------------------.
5187| yyexhaustedlab -- memory exhaustion comes here. |
5188`-------------------------------------------------*/
5189yyexhaustedlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005190 yyerror (&yylloc, context, yyscanner, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005191 yyresult = 2;
5192 /* Fall through. */
5193#endif
5194
5195yyreturn:
5196 if (yychar != YYEMPTY)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005197 {
5198 /* Make sure we have latest lookahead translation. See comments at
5199 user semantic actions for why this is necessary. */
5200 yytoken = YYTRANSLATE (yychar);
5201 yydestruct ("Cleanup: discarding lookahead",
5202 yytoken, &yylval, &yylloc, context, yyscanner);
5203 }
5204 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005205 this YYABORT or YYACCEPT. */
5206 YYPOPSTACK (yylen);
5207 YY_STACK_PRINT (yyss, yyssp);
5208 while (yyssp != yyss)
5209 {
5210 yydestruct ("Cleanup: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005211 yystos[*yyssp], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005212 YYPOPSTACK (1);
5213 }
5214#ifndef yyoverflow
5215 if (yyss != yyssa)
5216 YYSTACK_FREE (yyss);
5217#endif
5218#if YYERROR_VERBOSE
5219 if (yymsg != yymsgbuf)
5220 YYSTACK_FREE (yymsg);
5221#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005222 return yyresult;
John Bauman66b8ab22014-05-06 15:57:45 -04005223}
5224
5225
5226
John Bauman66b8ab22014-05-06 15:57:45 -04005227int glslang_parse(TParseContext* context) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005228 return yyparse(context, context->getScanner());
John Bauman66b8ab22014-05-06 15:57:45 -04005229}