blob: f18ef9f0afa9e632ae2dc215ab1a93ab87316871 [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
Nicolas Capens0bac2852016-05-07 06:09:58 -040067// Copyright 2016 The SwiftShader Authors. All Rights Reserved.
John Bauman66b8ab22014-05-06 15:57:45 -040068//
Nicolas Capens0bac2852016-05-07 06:09:58 -040069// Licensed under the Apache License, Version 2.0 (the "License");
70// you may not use this file except in compliance with the License.
71// You may obtain a copy of the License at
John Bauman66b8ab22014-05-06 15:57:45 -040072//
Nicolas Capens0bac2852016-05-07 06:09:58 -040073// http://www.apache.org/licenses/LICENSE-2.0
74//
75// Unless required by applicable law or agreed to in writing, software
76// distributed under the License is distributed on an "AS IS" BASIS,
77// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
78// See the License for the specific language governing permissions and
79// limitations under the License.
John Bauman66b8ab22014-05-06 15:57:45 -040080
81// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
82
83// Ignore errors in auto-generated code.
84#if defined(__GNUC__)
85#pragma GCC diagnostic ignored "-Wunused-function"
86#pragma GCC diagnostic ignored "-Wunused-variable"
87#pragma GCC diagnostic ignored "-Wswitch-enum"
88#elif defined(_MSC_VER)
89#pragma warning(disable: 4065)
90#pragma warning(disable: 4189)
91#pragma warning(disable: 4505)
92#pragma warning(disable: 4701)
93#endif
94
Nicolas Capenscc863da2015-01-21 15:50:55 -050095#include "SymbolTable.h"
96#include "ParseHelper.h"
John Bauman66b8ab22014-05-06 15:57:45 -040097
John Baumand4ae8632014-05-06 16:18:33 -040098#define YYENABLE_NLS 0
John Baumand4ae8632014-05-06 16:18:33 -040099
John Bauman66b8ab22014-05-06 15:57:45 -0400100
101
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400102# ifndef YY_NULLPTR
103# if defined __cplusplus && 201103L <= __cplusplus
104# define YY_NULLPTR nullptr
105# else
106# define YY_NULLPTR 0
107# endif
108# endif
John Bauman66b8ab22014-05-06 15:57:45 -0400109
110/* Enabling verbose error messages. */
111#ifdef YYERROR_VERBOSE
112# undef YYERROR_VERBOSE
113# define YYERROR_VERBOSE 1
114#else
115# define YYERROR_VERBOSE 0
116#endif
117
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400118/* In a future release of Bison, this section will be replaced
119 by #include "glslang_tab.h". */
120#ifndef YY_YY_GLSLANG_TAB_H_INCLUDED
121# define YY_YY_GLSLANG_TAB_H_INCLUDED
122/* Debug traces. */
123#ifndef YYDEBUG
124# define YYDEBUG 0
John Bauman66b8ab22014-05-06 15:57:45 -0400125#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400126#if YYDEBUG
127extern int yydebug;
128#endif
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400129/* "%code requires" blocks. */
130
131
132#define YYLTYPE TSourceLoc
133#define YYLTYPE_IS_DECLARED 1
134
135
136
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400137/* Token type. */
John Bauman66b8ab22014-05-06 15:57:45 -0400138#ifndef YYTOKENTYPE
139# define YYTOKENTYPE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400140 enum yytokentype
141 {
142 INVARIANT = 258,
143 HIGH_PRECISION = 259,
144 MEDIUM_PRECISION = 260,
145 LOW_PRECISION = 261,
146 PRECISION = 262,
147 ATTRIBUTE = 263,
148 CONST_QUAL = 264,
149 BOOL_TYPE = 265,
150 FLOAT_TYPE = 266,
151 INT_TYPE = 267,
152 UINT_TYPE = 268,
153 BREAK = 269,
154 CONTINUE = 270,
155 DO = 271,
156 ELSE = 272,
157 FOR = 273,
158 IF = 274,
159 DISCARD = 275,
160 RETURN = 276,
161 SWITCH = 277,
162 CASE = 278,
163 DEFAULT = 279,
164 BVEC2 = 280,
165 BVEC3 = 281,
166 BVEC4 = 282,
167 IVEC2 = 283,
168 IVEC3 = 284,
169 IVEC4 = 285,
170 VEC2 = 286,
171 VEC3 = 287,
172 VEC4 = 288,
173 UVEC2 = 289,
174 UVEC3 = 290,
175 UVEC4 = 291,
176 MATRIX2 = 292,
177 MATRIX3 = 293,
178 MATRIX4 = 294,
179 IN_QUAL = 295,
180 OUT_QUAL = 296,
181 INOUT_QUAL = 297,
182 UNIFORM = 298,
183 VARYING = 299,
184 MATRIX2x3 = 300,
185 MATRIX3x2 = 301,
186 MATRIX2x4 = 302,
187 MATRIX4x2 = 303,
188 MATRIX3x4 = 304,
189 MATRIX4x3 = 305,
190 CENTROID = 306,
191 FLAT = 307,
192 SMOOTH = 308,
193 STRUCT = 309,
194 VOID_TYPE = 310,
195 WHILE = 311,
196 SAMPLER2D = 312,
197 SAMPLERCUBE = 313,
198 SAMPLER_EXTERNAL_OES = 314,
199 SAMPLER2DRECT = 315,
200 SAMPLER2DARRAY = 316,
201 ISAMPLER2D = 317,
202 ISAMPLER3D = 318,
203 ISAMPLERCUBE = 319,
204 ISAMPLER2DARRAY = 320,
205 USAMPLER2D = 321,
206 USAMPLER3D = 322,
207 USAMPLERCUBE = 323,
208 USAMPLER2DARRAY = 324,
209 SAMPLER3D = 325,
210 SAMPLER3DRECT = 326,
211 SAMPLER2DSHADOW = 327,
212 SAMPLERCUBESHADOW = 328,
213 SAMPLER2DARRAYSHADOW = 329,
214 LAYOUT = 330,
215 IDENTIFIER = 331,
216 TYPE_NAME = 332,
217 FLOATCONSTANT = 333,
218 INTCONSTANT = 334,
219 UINTCONSTANT = 335,
220 BOOLCONSTANT = 336,
221 FIELD_SELECTION = 337,
222 LEFT_OP = 338,
223 RIGHT_OP = 339,
224 INC_OP = 340,
225 DEC_OP = 341,
226 LE_OP = 342,
227 GE_OP = 343,
228 EQ_OP = 344,
229 NE_OP = 345,
230 AND_OP = 346,
231 OR_OP = 347,
232 XOR_OP = 348,
233 MUL_ASSIGN = 349,
234 DIV_ASSIGN = 350,
235 ADD_ASSIGN = 351,
236 MOD_ASSIGN = 352,
237 LEFT_ASSIGN = 353,
238 RIGHT_ASSIGN = 354,
239 AND_ASSIGN = 355,
240 XOR_ASSIGN = 356,
241 OR_ASSIGN = 357,
242 SUB_ASSIGN = 358,
243 LEFT_PAREN = 359,
244 RIGHT_PAREN = 360,
245 LEFT_BRACKET = 361,
246 RIGHT_BRACKET = 362,
247 LEFT_BRACE = 363,
248 RIGHT_BRACE = 364,
249 DOT = 365,
250 COMMA = 366,
251 COLON = 367,
252 EQUAL = 368,
253 SEMICOLON = 369,
254 BANG = 370,
255 DASH = 371,
256 TILDE = 372,
257 PLUS = 373,
258 STAR = 374,
259 SLASH = 375,
260 PERCENT = 376,
261 LEFT_ANGLE = 377,
262 RIGHT_ANGLE = 378,
263 VERTICAL_BAR = 379,
264 CARET = 380,
265 AMPERSAND = 381,
266 QUESTION = 382
267 };
John Bauman66b8ab22014-05-06 15:57:45 -0400268#endif
269
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400270/* Value type. */
John Bauman66b8ab22014-05-06 15:57:45 -0400271#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400272
273union YYSTYPE
John Bauman66b8ab22014-05-06 15:57:45 -0400274{
275
276
277 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400278 union {
279 TString *string;
280 float f;
281 int i;
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500282 unsigned int u;
John Bauman66b8ab22014-05-06 15:57:45 -0400283 bool b;
284 };
285 TSymbol* symbol;
286 } lex;
287 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400288 TOperator op;
289 union {
290 TIntermNode* intermNode;
291 TIntermNodePair nodePair;
292 TIntermTyped* intermTypedNode;
293 TIntermAggregate* intermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -0400294 TIntermSwitch* intermSwitch;
295 TIntermCase* intermCase;
John Bauman66b8ab22014-05-06 15:57:45 -0400296 };
297 union {
298 TPublicType type;
299 TPrecision precision;
Nicolas Capens7d626792015-02-17 17:58:31 -0500300 TLayoutQualifier layoutQualifier;
John Bauman66b8ab22014-05-06 15:57:45 -0400301 TQualifier qualifier;
302 TFunction* function;
303 TParameter param;
Alexis Hetua8b364b2015-06-10 11:48:40 -0400304 TField* field;
305 TFieldList* fieldList;
John Bauman66b8ab22014-05-06 15:57:45 -0400306 };
307 } interm;
308
309
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400310};
John Bauman66b8ab22014-05-06 15:57:45 -0400311
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400312typedef union YYSTYPE YYSTYPE;
John Bauman66b8ab22014-05-06 15:57:45 -0400313# define YYSTYPE_IS_TRIVIAL 1
John Bauman66b8ab22014-05-06 15:57:45 -0400314# define YYSTYPE_IS_DECLARED 1
315#endif
316
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400317/* Location type. */
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400318#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400319typedef struct YYLTYPE YYLTYPE;
320struct YYLTYPE
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400321{
322 int first_line;
323 int first_column;
324 int last_line;
325 int last_column;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400326};
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400327# define YYLTYPE_IS_DECLARED 1
328# define YYLTYPE_IS_TRIVIAL 1
329#endif
330
John Bauman66b8ab22014-05-06 15:57:45 -0400331
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400332
333int yyparse (TParseContext* context, void* yyscanner);
334
335#endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED */
336
John Bauman66b8ab22014-05-06 15:57:45 -0400337/* Copy the second part of user declarations. */
338
339
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400340extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400341extern void yyerror(YYLTYPE* lloc, TParseContext* context, void* scanner, const char* reason);
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400342
Alexis Hetu253fdd12015-07-07 15:12:46 -0400343#define YYLLOC_DEFAULT(Current, Rhs, N) \
344 do { \
345 if (N) { \
346 (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \
347 (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
348 (Current).last_file = YYRHSLOC(Rhs, N).last_file; \
349 (Current).last_line = YYRHSLOC(Rhs, N).last_line; \
350 } \
351 else { \
352 (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \
353 (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \
354 (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \
355 (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
356 } \
357 } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400358
359#define FRAG_VERT_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400360 if (context->getShaderType() != GL_FRAGMENT_SHADER && \
361 context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400362 context->error(L, " supported in vertex/fragment shaders only ", S); \
363 context->recover(); \
364 } \
365}
366
367#define VERTEX_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400368 if (context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400369 context->error(L, " supported in vertex shaders only ", S); \
370 context->recover(); \
371 } \
372}
373
374#define FRAG_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400375 if (context->getShaderType() != GL_FRAGMENT_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400376 context->error(L, " supported in fragment shaders only ", S); \
377 context->recover(); \
378 } \
379}
380
Nicolas Capensc6841852015-02-15 14:25:37 -0500381#define ES2_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400382 if (context->getShaderVersion() != 100) { \
Nicolas Capensc6841852015-02-15 14:25:37 -0500383 context->error(L, " supported in GLSL ES 1.00 only ", S); \
384 context->recover(); \
385 } \
386}
387
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400388#define ES3_ONLY(TOKEN, LINE, REASON) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400389 if (context->getShaderVersion() != 300) { \
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400390 context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
Nicolas Capensc6841852015-02-15 14:25:37 -0500391 context->recover(); \
392 } \
393}
394
John Bauman66b8ab22014-05-06 15:57:45 -0400395
396
397#ifdef short
398# undef short
399#endif
400
401#ifdef YYTYPE_UINT8
402typedef YYTYPE_UINT8 yytype_uint8;
403#else
404typedef unsigned char yytype_uint8;
405#endif
406
407#ifdef YYTYPE_INT8
408typedef YYTYPE_INT8 yytype_int8;
John Bauman66b8ab22014-05-06 15:57:45 -0400409#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400410typedef signed char yytype_int8;
John Bauman66b8ab22014-05-06 15:57:45 -0400411#endif
412
413#ifdef YYTYPE_UINT16
414typedef YYTYPE_UINT16 yytype_uint16;
415#else
416typedef unsigned short int yytype_uint16;
417#endif
418
419#ifdef YYTYPE_INT16
420typedef YYTYPE_INT16 yytype_int16;
421#else
422typedef short int yytype_int16;
423#endif
424
425#ifndef YYSIZE_T
426# ifdef __SIZE_TYPE__
427# define YYSIZE_T __SIZE_TYPE__
428# elif defined size_t
429# define YYSIZE_T size_t
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400430# elif ! defined YYSIZE_T
John Bauman66b8ab22014-05-06 15:57:45 -0400431# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
432# define YYSIZE_T size_t
433# else
434# define YYSIZE_T unsigned int
435# endif
436#endif
437
438#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
439
440#ifndef YY_
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400441# if defined YYENABLE_NLS && YYENABLE_NLS
John Bauman66b8ab22014-05-06 15:57:45 -0400442# if ENABLE_NLS
443# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400444# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
John Bauman66b8ab22014-05-06 15:57:45 -0400445# endif
446# endif
447# ifndef YY_
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400448# define YY_(Msgid) Msgid
449# endif
450#endif
451
452#ifndef YY_ATTRIBUTE
453# if (defined __GNUC__ \
454 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
455 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
456# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
457# else
458# define YY_ATTRIBUTE(Spec) /* empty */
459# endif
460#endif
461
462#ifndef YY_ATTRIBUTE_PURE
463# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
464#endif
465
466#ifndef YY_ATTRIBUTE_UNUSED
467# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
468#endif
469
470#if !defined _Noreturn \
471 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
472# if defined _MSC_VER && 1200 <= _MSC_VER
473# define _Noreturn __declspec (noreturn)
474# else
475# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
John Bauman66b8ab22014-05-06 15:57:45 -0400476# endif
477#endif
478
479/* Suppress unused-variable warnings by "using" E. */
480#if ! defined lint || defined __GNUC__
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400481# define YYUSE(E) ((void) (E))
John Bauman66b8ab22014-05-06 15:57:45 -0400482#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400483# define YYUSE(E) /* empty */
John Bauman66b8ab22014-05-06 15:57:45 -0400484#endif
485
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400486#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
487/* Suppress an incorrect diagnostic about yylval being uninitialized. */
488# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
489 _Pragma ("GCC diagnostic push") \
490 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
491 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
492# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
493 _Pragma ("GCC diagnostic pop")
John Bauman66b8ab22014-05-06 15:57:45 -0400494#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400495# define YY_INITIAL_VALUE(Value) Value
John Bauman66b8ab22014-05-06 15:57:45 -0400496#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400497#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
498# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
499# define YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -0400500#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400501#ifndef YY_INITIAL_VALUE
502# define YY_INITIAL_VALUE(Value) /* Nothing. */
503#endif
504
John Bauman66b8ab22014-05-06 15:57:45 -0400505
506#if ! defined yyoverflow || YYERROR_VERBOSE
507
508/* The parser invokes alloca or malloc; define the necessary symbols. */
509
510# ifdef YYSTACK_USE_ALLOCA
511# if YYSTACK_USE_ALLOCA
512# ifdef __GNUC__
513# define YYSTACK_ALLOC __builtin_alloca
514# elif defined __BUILTIN_VA_ARG_INCR
515# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
516# elif defined _AIX
517# define YYSTACK_ALLOC __alloca
518# elif defined _MSC_VER
519# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
520# define alloca _alloca
521# else
522# define YYSTACK_ALLOC alloca
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400523# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
John Bauman66b8ab22014-05-06 15:57:45 -0400524# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400525 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
526# ifndef EXIT_SUCCESS
527# define EXIT_SUCCESS 0
John Bauman66b8ab22014-05-06 15:57:45 -0400528# endif
529# endif
530# endif
531# endif
532# endif
533
534# ifdef YYSTACK_ALLOC
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400535 /* Pacify GCC's 'empty if-body' warning. */
536# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400537# ifndef YYSTACK_ALLOC_MAXIMUM
538 /* The OS might guarantee only one guard page at the bottom of the stack,
539 and a page size can be as small as 4096 bytes. So we cannot safely
540 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
541 to allow for a few compiler-allocated temporary stack slots. */
542# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
543# endif
544# else
545# define YYSTACK_ALLOC YYMALLOC
546# define YYSTACK_FREE YYFREE
547# ifndef YYSTACK_ALLOC_MAXIMUM
548# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
549# endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400550# if (defined __cplusplus && ! defined EXIT_SUCCESS \
John Bauman66b8ab22014-05-06 15:57:45 -0400551 && ! ((defined YYMALLOC || defined malloc) \
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400552 && (defined YYFREE || defined free)))
John Bauman66b8ab22014-05-06 15:57:45 -0400553# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400554# ifndef EXIT_SUCCESS
555# define EXIT_SUCCESS 0
John Bauman66b8ab22014-05-06 15:57:45 -0400556# endif
557# endif
558# ifndef YYMALLOC
559# define YYMALLOC malloc
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400560# if ! defined malloc && ! defined EXIT_SUCCESS
John Bauman66b8ab22014-05-06 15:57:45 -0400561void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
562# endif
563# endif
564# ifndef YYFREE
565# define YYFREE free
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400566# if ! defined free && ! defined EXIT_SUCCESS
John Bauman66b8ab22014-05-06 15:57:45 -0400567void free (void *); /* INFRINGES ON USER NAME SPACE */
568# endif
569# endif
570# endif
571#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
572
573
574#if (! defined yyoverflow \
575 && (! defined __cplusplus \
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400576 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
577 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
John Bauman66b8ab22014-05-06 15:57:45 -0400578
579/* A type that is properly aligned for any stack member. */
580union yyalloc
581{
582 yytype_int16 yyss_alloc;
583 YYSTYPE yyvs_alloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400584 YYLTYPE yyls_alloc;
John Bauman66b8ab22014-05-06 15:57:45 -0400585};
586
587/* The size of the maximum gap between one aligned stack and the next. */
588# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
589
590/* The size of an array large to enough to hold all stacks, each with
591 N elements. */
592# define YYSTACK_BYTES(N) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400593 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
594 + 2 * YYSTACK_GAP_MAXIMUM)
John Bauman66b8ab22014-05-06 15:57:45 -0400595
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400596# define YYCOPY_NEEDED 1
John Bauman66b8ab22014-05-06 15:57:45 -0400597
598/* Relocate STACK from its old location to the new one. The
599 local variables YYSIZE and YYSTACKSIZE give the old and new number of
600 elements in the stack, and YYPTR gives the new location of the
601 stack. Advance YYPTR to a properly aligned location for the next
602 stack. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400603# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
604 do \
605 { \
606 YYSIZE_T yynewbytes; \
607 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
608 Stack = &yyptr->Stack_alloc; \
609 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
610 yyptr += yynewbytes / sizeof (*yyptr); \
611 } \
612 while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400613
614#endif
615
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400616#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
617/* Copy COUNT objects from SRC to DST. The source and destination do
618 not overlap. */
619# ifndef YYCOPY
620# if defined __GNUC__ && 1 < __GNUC__
621# define YYCOPY(Dst, Src, Count) \
622 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
623# else
624# define YYCOPY(Dst, Src, Count) \
625 do \
626 { \
627 YYSIZE_T yyi; \
628 for (yyi = 0; yyi < (Count); yyi++) \
629 (Dst)[yyi] = (Src)[yyi]; \
630 } \
631 while (0)
632# endif
633# endif
634#endif /* !YYCOPY_NEEDED */
635
John Bauman66b8ab22014-05-06 15:57:45 -0400636/* YYFINAL -- State number of the termination state. */
Alexis Hetu46768622018-01-16 22:09:28 -0500637#define YYFINAL 113
John Bauman66b8ab22014-05-06 15:57:45 -0400638/* YYLAST -- Last index in YYTABLE. */
Alexis Hetu46768622018-01-16 22:09:28 -0500639#define YYLAST 2530
John Bauman66b8ab22014-05-06 15:57:45 -0400640
641/* YYNTOKENS -- Number of terminals. */
Alexis Hetub14178b2015-04-13 13:23:20 -0400642#define YYNTOKENS 128
John Bauman66b8ab22014-05-06 15:57:45 -0400643/* YYNNTS -- Number of nonterminals. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400644#define YYNNTS 93
John Bauman66b8ab22014-05-06 15:57:45 -0400645/* YYNRULES -- Number of rules. */
Alexis Hetu46768622018-01-16 22:09:28 -0500646#define YYNRULES 273
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400647/* YYNSTATES -- Number of states. */
Alexis Hetu46768622018-01-16 22:09:28 -0500648#define YYNSTATES 414
John Bauman66b8ab22014-05-06 15:57:45 -0400649
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400650/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
651 by yylex, with out-of-bounds checking. */
John Bauman66b8ab22014-05-06 15:57:45 -0400652#define YYUNDEFTOK 2
Alexis Hetub14178b2015-04-13 13:23:20 -0400653#define YYMAXUTOK 382
John Bauman66b8ab22014-05-06 15:57:45 -0400654
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400655#define YYTRANSLATE(YYX) \
John Bauman66b8ab22014-05-06 15:57:45 -0400656 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
657
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400658/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
659 as returned by yylex, without out-of-bounds checking. */
John Bauman66b8ab22014-05-06 15:57:45 -0400660static const yytype_uint8 yytranslate[] =
661{
662 0, 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, 2, 2, 2, 2,
680 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
681 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
682 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
683 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
684 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
685 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
686 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
687 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
688 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
689 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
690 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
691 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
692 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
693 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
694 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
695 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
Alexis Hetub027aa92015-01-19 15:56:12 -0500696 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500697 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Alexis Hetub14178b2015-04-13 13:23:20 -0400698 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
699 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
700 125, 126, 127
John Bauman66b8ab22014-05-06 15:57:45 -0400701};
702
703#if YYDEBUG
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400704 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
John Bauman66b8ab22014-05-06 15:57:45 -0400705static const yytype_uint16 yyrline[] =
706{
Alexis Hetu3bb01952018-01-26 10:16:21 -0500707 0, 229, 229, 249, 252, 257, 262, 267, 272, 278,
708 281, 284, 287, 290, 293, 299, 307, 318, 322, 330,
709 333, 339, 343, 350, 356, 365, 373, 379, 386, 396,
710 399, 402, 405, 415, 416, 417, 418, 426, 427, 431,
711 435, 443, 444, 447, 453, 454, 458, 465, 466, 469,
712 472, 475, 481, 482, 485, 491, 492, 499, 500, 507,
713 508, 515, 516, 522, 523, 529, 530, 536, 537, 543,
714 544, 552, 553, 554, 555, 557, 558, 559, 562, 565,
715 568, 571, 577, 580, 591, 599, 607, 610, 616, 623,
716 627, 631, 635, 642, 648, 651, 658, 666, 687, 713,
717 723, 751, 756, 766, 771, 781, 784, 787, 790, 796,
718 803, 806, 810, 814, 819, 824, 831, 835, 839, 843,
719 848, 853, 857, 864, 874, 880, 883, 889, 895, 902,
720 911, 920, 928, 931, 938, 942, 946, 951, 959, 962,
721 966, 970, 979, 988, 996, 1006, 1018, 1021, 1024, 1030,
722 1037, 1040, 1046, 1049, 1052, 1058, 1061, 1066, 1081, 1085,
723 1089, 1093, 1097, 1101, 1106, 1111, 1116, 1121, 1126, 1131,
724 1136, 1141, 1146, 1151, 1156, 1161, 1167, 1173, 1179, 1185,
Alexis Hetu46768622018-01-16 22:09:28 -0500725 1191, 1197, 1203, 1209, 1215, 1220, 1225, 1234, 1243, 1248,
726 1253, 1258, 1263, 1268, 1273, 1278, 1283, 1288, 1293, 1298,
727 1303, 1308, 1313, 1326, 1326, 1329, 1329, 1335, 1338, 1354,
728 1357, 1366, 1370, 1376, 1383, 1398, 1402, 1406, 1407, 1413,
729 1414, 1415, 1416, 1417, 1418, 1419, 1423, 1424, 1424, 1424,
730 1434, 1435, 1439, 1439, 1440, 1440, 1445, 1448, 1458, 1461,
731 1467, 1468, 1472, 1480, 1484, 1491, 1491, 1498, 1501, 1508,
732 1513, 1528, 1528, 1533, 1533, 1540, 1540, 1548, 1551, 1557,
733 1560, 1566, 1570, 1577, 1580, 1583, 1586, 1589, 1598, 1602,
734 1609, 1612, 1618, 1618
John Bauman66b8ab22014-05-06 15:57:45 -0400735};
736#endif
737
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400738#if YYDEBUG || YYERROR_VERBOSE || 0
John Bauman66b8ab22014-05-06 15:57:45 -0400739/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
740 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
741static const char *const yytname[] =
742{
743 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
744 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500745 "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
746 "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
747 "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500748 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
749 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400750 "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
751 "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
752 "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
753 "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
754 "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
755 "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
756 "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
757 "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
758 "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
759 "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
760 "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
761 "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
762 "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500763 "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
764 "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
765 "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
766 "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
767 "primary_expression", "postfix_expression", "integer_expression",
768 "function_call", "function_call_or_method", "function_call_generic",
John Bauman66b8ab22014-05-06 15:57:45 -0400769 "function_call_header_no_parameters",
770 "function_call_header_with_parameters", "function_call_header",
771 "function_identifier", "unary_expression", "unary_operator",
772 "multiplicative_expression", "additive_expression", "shift_expression",
773 "relational_expression", "equality_expression", "and_expression",
774 "exclusive_or_expression", "inclusive_or_expression",
775 "logical_and_expression", "logical_xor_expression",
776 "logical_or_expression", "conditional_expression",
777 "assignment_expression", "assignment_operator", "expression",
Alexis Hetua35d8232015-06-11 17:11:06 -0400778 "constant_expression", "enter_struct", "declaration",
779 "function_prototype", "function_declarator",
780 "function_header_with_parameters", "function_header",
781 "parameter_declarator", "parameter_declaration", "parameter_qualifier",
782 "parameter_type_specifier", "init_declarator_list", "single_declaration",
783 "fully_specified_type", "interpolation_qualifier",
784 "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
785 "type_specifier", "precision_qualifier", "layout_qualifier",
786 "layout_qualifier_id_list", "layout_qualifier_id",
Nicolas Capens7d626792015-02-17 17:58:31 -0500787 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
788 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400789 "struct_declarator_list", "struct_declarator", "initializer",
790 "declaration_statement", "statement", "simple_statement",
791 "compound_statement", "$@3", "$@4", "statement_no_new_scope",
792 "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
793 "statement_list", "expression_statement", "selection_statement",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400794 "selection_rest_statement", "switch_statement", "$@7", "case_label",
795 "condition", "iteration_statement", "$@8", "$@9", "$@10",
796 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400797 "jump_statement", "translation_unit", "external_declaration",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400798 "function_definition", "$@11", YY_NULLPTR
John Bauman66b8ab22014-05-06 15:57:45 -0400799};
800#endif
801
802# ifdef YYPRINT
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400803/* YYTOKNUM[NUM] -- (External) token number corresponding to the
804 (internal) symbol number NUM (which must be that of a token). */
John Bauman66b8ab22014-05-06 15:57:45 -0400805static const yytype_uint16 yytoknum[] =
806{
807 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
808 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
809 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
810 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
811 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
812 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
813 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
814 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
815 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
Nicolas Capensc6841852015-02-15 14:25:37 -0500816 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500817 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400818 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
819 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400820};
821# endif
822
Alexis Hetu46768622018-01-16 22:09:28 -0500823#define YYPACT_NINF -344
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400824
825#define yypact_value_is_default(Yystate) \
Alexis Hetu46768622018-01-16 22:09:28 -0500826 (!!((Yystate) == (-344)))
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400827
Alexis Hetu46768622018-01-16 22:09:28 -0500828#define YYTABLE_NINF -233
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400829
830#define yytable_value_is_error(Yytable_value) \
831 0
832
833 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
834 STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -0400835static const yytype_int16 yypact[] =
836{
Alexis Hetu46768622018-01-16 22:09:28 -0500837 2168, 120, -344, -344, -344, 146, -344, -344, -344, -344,
838 -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
839 -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
840 -344, -344, -344, -344, -344, -344, -344, 127, -344, -344,
841 -41, -344, -344, -344, -344, -344, -344, -344, -344, -344,
842 -344, -344, -344, -344, -344, -344, -344, -344, -344, -84,
843 -344, -344, -68, -57, -39, 1, -89, -344, 41, 14,
844 1187, -344, -344, 2453, 14, -344, 15, -344, 2093, -344,
845 -344, -344, -344, 14, -344, 2453, -344, -344, 18, -344,
846 47, -344, 26, -344, 10, -344, -344, -344, -344, -344,
847 2317, 113, 60, -344, -66, -344, 31, -344, 2243, -344,
848 -344, -344, 1257, -344, -344, -344, -45, -344, 2243, 46,
849 -21, -344, 415, -344, -344, -344, -344, 68, 2317, -42,
850 -344, 1355, 1646, -344, 188, 2317, 89, 1838, -344, 85,
851 -344, -344, -344, -344, -344, 1646, 1646, 1646, -344, -344,
852 -344, -344, -344, -344, -344, 39, -344, -344, -344, 74,
853 -17, 1741, 96, -344, 1646, 37, -37, 91, -61, 87,
854 65, 81, 71, 116, 115, -64, -344, 102, -344, -344,
855 2243, 1923, 105, -344, 47, 97, 99, -344, 110, 131,
856 124, 1453, 138, 1646, 132, 142, 140, -344, -344, 123,
857 -344, -344, -77, -344, -68, 143, -344, -344, -344, -344,
858 531, -344, -344, -344, -344, -344, -344, 144, -344, -344,
859 1548, 1646, 141, 148, -344, -344, 89, 145, -9, -344,
860 -58, -344, -344, -344, -13, -344, -344, 1646, 2385, -344,
861 -344, 1646, 152, -344, -344, -344, 1646, 1646, 1646, 1646,
862 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646,
863 1646, 1646, 1646, 1646, 1646, 1646, -344, 2008, -344, -344,
864 -344, -344, -344, -344, 150, -344, 1646, -344, -344, -7,
865 1646, 147, -344, -344, -344, 647, -344, -344, -344, -344,
866 -344, -344, -344, -344, -344, -344, -344, 1646, 1646, -344,
867 -344, -344, 1646, 149, 153, -344, 1646, 151, 5, 1646,
868 89, -344, -70, -344, -344, 158, 157, -344, 165, -344,
869 -344, -344, -344, -344, 37, 37, -37, -37, 91, 91,
870 91, 91, -61, -61, 87, 65, 81, 71, 116, 115,
871 75, -344, 214, 26, 879, 995, -8, -344, 4, -344,
872 1092, 647, -344, -344, 164, 1646, 159, -344, 1646, -344,
873 166, -344, 1646, -344, -344, 1646, 170, -344, -344, -344,
874 -344, 1092, 150, -344, 157, 200, 2317, 172, 169, -344,
875 -344, 1646, -344, -344, 173, -344, 1646, -344, 167, 174,
876 265, -344, 175, 171, 763, -344, -344, 177, 9, 1646,
877 763, 150, -344, 1646, -344, -344, -344, -344, 178, 157,
878 -344, -344, -344, -344
John Bauman66b8ab22014-05-06 15:57:45 -0400879};
880
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400881 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
882 Performed when YYTABLE does not specify something else to do. Zero
883 means the default is an error. */
884static const yytype_uint16 yydefact[] =
885{
886 0, 0, 146, 147, 148, 0, 128, 138, 162, 159,
887 160, 161, 166, 167, 168, 169, 170, 171, 163, 164,
888 165, 172, 173, 174, 175, 176, 177, 139, 140, 143,
889 129, 178, 179, 180, 181, 182, 183, 0, 126, 125,
Alexis Hetu46768622018-01-16 22:09:28 -0500890 0, 158, 184, 185, 186, 187, 189, 190, 191, 192,
891 193, 194, 195, 196, 197, 188, 198, 199, 200, 0,
892 202, 271, 272, 0, 95, 105, 0, 110, 116, 133,
893 0, 131, 123, 0, 134, 144, 155, 201, 0, 268,
894 270, 130, 122, 0, 136, 0, 141, 142, 0, 205,
895 0, 86, 0, 93, 105, 127, 106, 107, 108, 96,
896 0, 105, 0, 87, 117, 132, 0, 92, 0, 124,
897 145, 135, 0, 1, 269, 137, 0, 203, 0, 152,
898 0, 150, 0, 273, 97, 102, 104, 109, 0, 111,
899 98, 0, 0, 85, 0, 0, 0, 0, 207, 2,
900 6, 4, 5, 7, 28, 0, 0, 0, 156, 35,
901 34, 36, 33, 3, 9, 29, 11, 16, 17, 0,
902 0, 22, 0, 37, 0, 41, 44, 47, 52, 55,
903 57, 59, 61, 63, 65, 67, 84, 0, 26, 88,
904 0, 0, 0, 149, 0, 0, 0, 253, 0, 0,
905 0, 0, 0, 0, 0, 0, 227, 236, 240, 37,
906 69, 82, 0, 216, 0, 144, 219, 238, 218, 217,
907 0, 220, 221, 222, 223, 224, 225, 99, 101, 103,
908 0, 0, 0, 0, 215, 121, 0, 213, 0, 211,
909 0, 208, 30, 31, 0, 13, 14, 0, 0, 20,
910 19, 0, 158, 23, 25, 32, 0, 0, 0, 0,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -0500912 0, 0, 0, 0, 0, 0, 157, 0, 206, 153,
913 154, 151, 264, 263, 234, 255, 0, 267, 265, 0,
914 0, 0, 248, 251, 226, 0, 72, 73, 75, 74,
915 77, 78, 79, 80, 81, 76, 71, 0, 0, 241,
916 237, 239, 0, 0, 0, 115, 0, 118, 0, 0,
917 0, 209, 0, 89, 8, 0, 15, 27, 12, 18,
918 24, 38, 39, 40, 43, 42, 45, 46, 50, 51,
919 48, 49, 53, 54, 56, 58, 60, 62, 64, 66,
920 0, 204, 0, 0, 0, 0, 0, 266, 0, 247,
921 0, 228, 70, 83, 0, 0, 112, 119, 0, 210,
922 0, 212, 0, 90, 10, 0, 0, 233, 235, 258,
923 257, 260, 234, 245, 249, 0, 0, 0, 0, 100,
924 113, 0, 120, 214, 0, 68, 0, 259, 0, 0,
925 244, 242, 0, 0, 0, 229, 114, 0, 0, 261,
926 0, 234, 246, 0, 231, 252, 230, 91, 0, 262,
927 256, 243, 250, 254
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400928};
929
930 /* YYPGOTO[NTERM-NUM]. */
John Bauman66b8ab22014-05-06 15:57:45 -0400931static const yytype_int16 yypgoto[] =
932{
Alexis Hetu46768622018-01-16 22:09:28 -0500933 -344, -344, -344, -344, -344, -344, -344, 48, -344, -344,
934 -344, -344, 70, -344, -56, -49, -123, -53, 28, 29,
935 27, 32, 30, 33, -344, -110, -128, -344, -138, -119,
936 -344, 11, 17, -344, -344, -344, 168, 201, 197, 176,
937 -344, -344, -326, 7, -344, -105, 13, -69, 294, -344,
938 -344, 117, 0, -344, -344, -344, -344, -103, -121, 76,
939 -10, -215, -40, -203, -314, -86, -344, -344, -97, -343,
940 -344, -344, -87, 23, -36, -344, -344, -344, -344, -344,
941 -60, -344, -344, -344, -344, -344, -344, -344, -344, -344,
942 232, -344, -344
John Bauman66b8ab22014-05-06 15:57:45 -0400943};
944
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400945 /* YYDEFGOTO[NTERM-NUM]. */
946static const yytype_int16 yydefgoto[] =
947{
Alexis Hetu46768622018-01-16 22:09:28 -0500948 -1, 153, 154, 155, 315, 156, 157, 158, 159, 160,
949 161, 162, 199, 164, 165, 166, 167, 168, 169, 170,
950 171, 172, 173, 174, 175, 200, 201, 297, 202, 177,
951 108, 203, 204, 63, 64, 65, 125, 99, 100, 126,
952 66, 67, 68, 69, 101, 70, 71, 72, 73, 74,
953 120, 121, 178, 76, 77, 180, 118, 137, 138, 228,
954 229, 225, 206, 207, 208, 209, 285, 378, 405, 342,
955 343, 344, 406, 210, 211, 212, 391, 213, 392, 214,
956 377, 215, 350, 274, 345, 371, 388, 389, 216, 78,
957 79, 80, 92
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400958};
959
960 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
961 positive, shift that token. If negative, reduce the rule whose
962 number is the opposite. If YYTABLE_NINF, syntax error. */
John Bauman66b8ab22014-05-06 15:57:45 -0400963static const yytype_int16 yytable[] =
964{
Alexis Hetu46768622018-01-16 22:09:28 -0500965 75, 109, 176, 135, 224, 123, 305, 301, 83, 234,
966 95, 61, 223, 135, 84, 181, 231, 62, 312, 95,
967 90, 176, 102, 7, 375, 103, 253, 254, 264, 390,
968 368, 127, 135, 243, 298, 88, 362, 299, 130, 136,
969 131, 96, 97, 98, 363, 375, 91, 132, 93, 136,
970 96, 97, 98, 279, 27, 28, 313, 29, 411, 127,
971 231, 255, 256, 265, 220, 37, 226, 89, 136, 179,
972 75, 221, 94, 110, 281, 135, 135, 267, 75, 249,
973 404, 250, 105, 176, 183, 116, 404, 111, 240, 61,
974 184, 357, 314, 224, 241, 62, 115, 372, 298, 316,
975 75, 304, 310, 298, 298, 311, -94, 347, 75, 373,
976 176, 136, 136, 320, 408, 298, 310, 104, 75, 359,
977 298, 112, 205, 119, 235, 236, 117, 340, 75, 7,
978 328, 329, 330, 331, 122, 75, 129, 75, 346, 133,
979 380, 83, 348, 382, 217, 237, 231, 84, 301, 238,
980 2, 3, 4, 96, 97, 98, 246, 247, 248, 182,
981 27, 28, 135, 29, 81, 227, 396, 86, 87, 352,
982 353, 37, 38, 39, 251, 252, 257, 258, 224, 239,
983 75, 75, 163, 354, 269, 270, 298, 365, 412, -27,
984 360, 259, 176, 324, 325, 261, 82, 7, 136, 176,
985 244, 163, 326, 327, 332, 333, 260, 262, 263, 266,
986 205, 272, 374, 273, 275, 232, 233, 286, 287, 288,
987 289, 290, 291, 292, 293, 294, 295, 224, 27, 28,
988 224, 29, 81, 374, 245, 276, 296, 385, 277, 37,
989 38, 39, 280, 384, 282, 376, 283, -26, 398, 284,
990 302, 309, 176, 224, 306, 307, 367, -21, -232, 349,
991 356, 409, 355, 163, 358, 364, 376, 75, 298, -28,
992 366, 379, 381, 383, 386, 224, 393, 394, 395, 400,
993 397, 399, 401, 196, 403, 205, 319, 334, 336, 335,
994 163, 407, 413, 338, 337, 124, 218, 339, 128, 85,
995 361, 271, 308, 410, 219, 369, 402, 109, 351, 370,
996 114, 387, 0, 0, 0, 0, 321, 322, 323, 163,
997 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
998 163, 163, 163, 163, 163, 0, 0, 0, 0, 0,
999 0, 0, 0, 0, 205, 205, 0, 0, 0, 0,
1000 205, 205, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001001 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001002 0, 205, 163, 0, 0, 0, 75, 0, 0, 163,
Alexis Hetua35d8232015-06-11 17:11:06 -04001003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001004 0, 0, 0, 0, 205, 0, 0, 0, 0, 0,
1005 205, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1006 0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
1007 3, 4, 5, 6, 7, 8, 9, 10, 11, 185,
1008 186, 187, 163, 188, 189, 190, 191, 192, 193, 194,
1009 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1010 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1011 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1012 41, 195, 42, 43, 44, 45, 46, 47, 48, 49,
1013 50, 51, 52, 53, 54, 55, 0, 56, 57, 58,
1014 59, 139, 60, 140, 141, 142, 143, 144, 0, 0,
1015 145, 146, 0, 0, 0, 0, 0, 0, 0, 0,
1016 0, 0, 0, 0, 0, 0, 0, 0, 0, 147,
1017 0, 0, 0, 196, 197, 0, 0, 0, 0, 198,
1018 149, 150, 151, 152, 1, 2, 3, 4, 5, 6,
1019 7, 8, 9, 10, 11, 185, 186, 187, 0, 188,
1020 189, 190, 191, 192, 193, 194, 12, 13, 14, 15,
1021 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1022 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1023 35, 36, 37, 38, 39, 40, 41, 195, 42, 43,
1024 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1025 54, 55, 0, 56, 57, 58, 59, 139, 60, 140,
1026 141, 142, 143, 144, 0, 0, 145, 146, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001028 0, 0, 0, 0, 0, 147, 0, 0, 0, 196,
1029 300, 0, 0, 0, 0, 198, 149, 150, 151, 152,
1030 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1031 11, 185, 186, 187, 0, 188, 189, 190, 191, 192,
1032 193, 194, 12, 13, 14, 15, 16, 17, 18, 19,
Alexis Hetu407813b2016-02-24 16:46:13 -05001033 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1034 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
Alexis Hetu46768622018-01-16 22:09:28 -05001035 39, 40, 41, 195, 42, 43, 44, 45, 46, 47,
1036 48, 49, 50, 51, 52, 53, 54, 55, 0, 56,
1037 57, 58, 59, 139, 60, 140, 141, 142, 143, 144,
1038 0, 0, 145, 146, 0, 0, 0, 0, 0, 0,
1039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1040 0, 147, 0, 0, 0, 196, 0, 0, 0, 0,
1041 0, 198, 149, 150, 151, 152, 1, 2, 3, 4,
1042 5, 6, 7, 8, 9, 10, 11, 185, 186, 187,
1043 0, 188, 189, 190, 191, 192, 193, 194, 12, 13,
1044 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1045 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1046 33, 34, 35, 36, 37, 38, 39, 40, 41, 195,
1047 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1048 52, 53, 54, 55, 0, 56, 57, 58, 59, 139,
1049 60, 140, 141, 142, 143, 144, 0, 0, 145, 146,
1050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1051 0, 0, 0, 0, 0, 0, 0, 147, 0, 0,
1052 0, 122, 0, 0, 0, 0, 0, 198, 149, 150,
1053 151, 152, 1, 2, 3, 4, 5, 6, 7, 8,
1054 9, 10, 11, 185, 186, 187, 0, 188, 189, 190,
1055 191, 192, 193, 194, 12, 13, 14, 15, 16, 17,
1056 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1057 28, 0, 29, 30, 31, 32, 33, 34, 35, 36,
1058 37, 38, 39, 40, 41, 195, 42, 43, 44, 45,
1059 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1060 0, 56, 57, 58, 59, 139, 60, 140, 141, 142,
1061 143, 144, 0, 0, 145, 146, 0, 0, 0, 0,
1062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1063 0, 0, 0, 147, 0, 0, 0, 0, 0, 0,
1064 0, 0, 0, 198, 149, 150, 151, 152, 1, 2,
1065 3, 4, 5, 6, 7, 8, 9, 10, 11, 0,
1066 0, 0, 0, 0, 0, 0, 0, 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, 45, 46, 47, 48, 49,
1071 50, 51, 52, 53, 54, 55, 0, 56, 57, 58,
1072 59, 139, 60, 140, 141, 142, 143, 144, 0, 0,
1073 145, 146, 0, 0, 0, 0, 0, 0, 0, 0,
1074 0, 0, 0, 0, 0, 134, 2, 3, 4, 147,
1075 6, 7, 8, 9, 10, 11, 0, 0, 0, 198,
1076 149, 150, 151, 152, 0, 0, 0, 12, 13, 14,
Alexis Hetu407813b2016-02-24 16:46:13 -05001077 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetu46768622018-01-16 22:09:28 -05001078 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1079 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1080 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1081 53, 54, 55, 0, 56, 57, 58, 59, 139, 60,
1082 140, 141, 142, 143, 144, 0, 0, 145, 146, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001083 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001084 0, 2, 3, 4, 0, 0, 147, 8, 9, 10,
1085 11, 0, 0, 0, 0, 0, 0, 149, 150, 151,
1086 152, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1087 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1088 0, 0, 31, 32, 33, 34, 35, 36, 0, 0,
1089 0, 40, 41, 0, 42, 43, 44, 45, 46, 47,
1090 48, 49, 50, 51, 52, 53, 54, 55, 0, 56,
1091 57, 58, 0, 106, 60, 0, 0, 8, 9, 10,
1092 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1093 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1094 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1095 0, 107, 31, 32, 33, 34, 35, 36, 0, 0,
1096 0, 40, 41, 0, 42, 43, 44, 45, 46, 47,
1097 48, 49, 50, 51, 52, 53, 54, 55, 0, 56,
1098 57, 58, 0, 139, 60, 140, 141, 142, 143, 144,
1099 0, 0, 145, 146, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001101 0, 147, 0, 0, 148, 8, 9, 10, 11, 0,
1102 0, 0, 149, 150, 151, 152, 0, 0, 0, 0,
1103 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1104 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
1105 31, 32, 33, 34, 35, 36, 0, 0, 0, 40,
1106 41, 0, 42, 43, 44, 45, 46, 47, 48, 49,
1107 50, 51, 52, 53, 54, 55, 0, 56, 57, 58,
1108 0, 139, 60, 140, 141, 142, 143, 144, 0, 0,
1109 145, 146, 0, 0, 0, 0, 0, 0, 0, 0,
1110 0, 0, 0, 0, 0, 0, 0, 0, 0, 147,
1111 0, 0, 222, 8, 9, 10, 11, 0, 0, 0,
1112 149, 150, 151, 152, 0, 0, 0, 0, 12, 13,
Alexis Hetu407813b2016-02-24 16:46:13 -05001113 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1114 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
1115 33, 34, 35, 36, 0, 0, 0, 40, 41, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001116 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1117 52, 53, 54, 55, 0, 56, 57, 58, 0, 139,
1118 60, 140, 141, 142, 143, 144, 0, 0, 145, 146,
Alexis Hetu407813b2016-02-24 16:46:13 -05001119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001120 0, 0, 0, 0, 0, 0, 0, 147, 8, 9,
1121 10, 11, 0, 0, 0, 0, 0, 278, 149, 150,
1122 151, 152, 0, 12, 13, 14, 15, 16, 17, 18,
1123 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1124 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1125 0, 0, 40, 41, 0, 42, 43, 44, 45, 46,
1126 47, 48, 49, 50, 51, 52, 53, 54, 55, 0,
1127 56, 57, 58, 0, 139, 60, 140, 141, 142, 143,
1128 144, 0, 0, 145, 146, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001130 0, 0, 147, 0, 0, 303, 8, 9, 10, 11,
1131 0, 0, 0, 149, 150, 151, 152, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001132 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1133 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1134 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001135 40, 41, 0, 42, 43, 44, 45, 46, 47, 48,
1136 49, 50, 51, 52, 53, 54, 55, 0, 56, 57,
1137 58, 0, 139, 60, 140, 141, 142, 143, 144, 0,
1138 0, 145, 146, 0, 0, 0, 0, 0, 0, 0,
1139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1140 147, 8, 9, 10, 11, 0, 0, 0, 0, 0,
1141 0, 149, 150, 151, 152, 0, 12, 13, 14, 15,
1142 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1143 26, 0, 0, 0, 0, 0, 31, 32, 33, 34,
1144 35, 36, 0, 0, 0, 40, 242, 0, 42, 43,
1145 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1146 54, 55, 0, 56, 57, 58, 0, 139, 60, 140,
1147 141, 142, 143, 144, 0, 0, 145, 146, 0, 0,
1148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1149 0, 134, 2, 3, 4, 147, 6, 7, 8, 9,
1150 10, 11, 0, 0, 0, 0, 149, 150, 151, 152,
1151 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetu407813b2016-02-24 16:46:13 -05001152 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1153 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetu46768622018-01-16 22:09:28 -05001154 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
1155 47, 48, 49, 50, 51, 52, 53, 54, 55, 0,
1156 56, 57, 58, 59, 0, 60, 0, 0, 0, 0,
1157 0, 0, 0, 0, 0, 0, 134, 2, 3, 4,
Alexis Hetu407813b2016-02-24 16:46:13 -05001158 0, 6, 7, 8, 9, 10, 11, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001159 0, 0, 0, 0, 0, 0, 0, 230, 12, 13,
Alexis Hetu407813b2016-02-24 16:46:13 -05001160 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1161 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1162 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001163 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1164 52, 53, 54, 55, 0, 56, 57, 58, 59, 0,
1165 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1166 0, 134, 2, 3, 4, 0, 6, 7, 8, 9,
Alexis Hetu407813b2016-02-24 16:46:13 -05001167 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001168 0, 0, 268, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetu407813b2016-02-24 16:46:13 -05001169 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1170 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetu46768622018-01-16 22:09:28 -05001171 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
1172 47, 48, 49, 50, 51, 52, 53, 54, 55, 0,
1173 56, 57, 58, 59, 0, 60, 0, 0, 0, 0,
1174 0, 0, 0, 113, 0, 0, 1, 2, 3, 4,
Alexis Hetu407813b2016-02-24 16:46:13 -05001175 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001176 0, 0, 0, 0, 0, 0, 0, 341, 12, 13,
1177 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1178 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1179 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1180 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1181 52, 53, 54, 55, 0, 56, 57, 58, 59, 0,
1182 60, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1183 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1184 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1185 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1186 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1187 38, 39, 40, 41, 0, 42, 43, 44, 45, 46,
1188 47, 48, 49, 50, 51, 52, 53, 54, 55, 0,
1189 56, 57, 58, 59, 0, 60, 134, 2, 3, 4,
1190 0, 6, 7, 8, 9, 10, 11, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001191 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
1192 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1193 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1194 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
Alexis Hetu46768622018-01-16 22:09:28 -05001195 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1196 52, 53, 54, 55, 0, 56, 57, 58, 59, 0,
1197 60, 2, 3, 4, 0, 0, 0, 8, 9, 10,
1198 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1199 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1200 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1201 0, 0, 31, 32, 33, 34, 35, 36, 0, 0,
1202 0, 40, 41, 0, 42, 43, 44, 45, 46, 47,
1203 48, 49, 50, 51, 52, 53, 54, 55, 0, 56,
1204 57, 58, 0, 0, 60, 8, 9, 10, 11, 0,
1205 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1206 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1207 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
1208 31, 32, 33, 34, 35, 36, 0, 0, 0, 40,
1209 41, 0, 42, 43, 44, 45, 46, 47, 48, 49,
1210 50, 51, 52, 53, 54, 55, 0, 56, 57, 58,
1211 0, 317, 60, 8, 9, 10, 11, 318, 0, 0,
1212 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
1213 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1214 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
1215 33, 34, 35, 36, 0, 0, 0, 40, 41, 0,
1216 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1217 52, 53, 54, 55, 0, 56, 57, 58, 0, 0,
1218 60
John Bauman66b8ab22014-05-06 15:57:45 -04001219};
1220
1221static const yytype_int16 yycheck[] =
1222{
Alexis Hetu46768622018-01-16 22:09:28 -05001223 0, 70, 112, 108, 132, 92, 221, 210, 1, 147,
1224 9, 0, 131, 118, 1, 118, 137, 0, 76, 9,
1225 104, 131, 111, 9, 350, 114, 87, 88, 92, 372,
1226 344, 100, 137, 161, 111, 76, 106, 114, 104, 108,
1227 106, 40, 41, 42, 114, 371, 114, 113, 105, 118,
1228 40, 41, 42, 191, 40, 41, 114, 43, 401, 128,
1229 181, 122, 123, 127, 106, 51, 135, 108, 137, 114,
1230 70, 113, 111, 73, 193, 180, 181, 180, 78, 116,
1231 394, 118, 69, 193, 105, 85, 400, 74, 105, 78,
1232 111, 306, 105, 221, 111, 78, 83, 105, 111, 237,
1233 100, 220, 111, 111, 111, 114, 105, 114, 108, 105,
1234 220, 180, 181, 241, 105, 111, 111, 76, 118, 114,
1235 111, 106, 122, 76, 85, 86, 108, 265, 128, 9,
1236 253, 254, 255, 256, 108, 135, 76, 137, 276, 108,
1237 355, 134, 280, 358, 76, 106, 267, 134, 351, 110,
1238 4, 5, 6, 40, 41, 42, 119, 120, 121, 113,
1239 40, 41, 267, 43, 44, 76, 381, 40, 41, 297,
1240 298, 51, 52, 53, 83, 84, 89, 90, 306, 105,
1241 180, 181, 112, 302, 79, 80, 111, 112, 403, 104,
1242 309, 126, 302, 249, 250, 124, 76, 9, 267, 309,
1243 104, 131, 251, 252, 257, 258, 125, 91, 93, 107,
1244 210, 114, 350, 114, 104, 145, 146, 94, 95, 96,
1245 97, 98, 99, 100, 101, 102, 103, 355, 40, 41,
1246 358, 43, 44, 371, 164, 104, 113, 365, 114, 51,
1247 52, 53, 104, 362, 112, 350, 104, 104, 386, 109,
1248 106, 106, 362, 381, 113, 107, 343, 105, 108, 112,
1249 107, 399, 113, 193, 113, 107, 371, 267, 111, 104,
1250 56, 107, 113, 107, 104, 403, 76, 105, 109, 105,
1251 107, 114, 17, 108, 113, 285, 238, 259, 261, 260,
1252 220, 114, 114, 263, 262, 94, 128, 264, 101, 5,
1253 310, 184, 226, 400, 128, 345, 392, 376, 285, 345,
1254 78, 371, -1, -1, -1, -1, 246, 247, 248, 249,
1255 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
1256 260, 261, 262, 263, 264, -1, -1, -1, -1, -1,
1257 -1, -1, -1, -1, 344, 345, -1, -1, -1, -1,
1258 350, 351, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001260 -1, 371, 302, -1, -1, -1, 376, -1, -1, 309,
Alexis Hetue5246692015-06-18 12:34:52 -04001261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001262 -1, -1, -1, -1, 394, -1, -1, -1, -1, -1,
1263 400, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1264 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
1265 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1266 15, 16, 362, 18, 19, 20, 21, 22, 23, 24,
1267 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1268 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1269 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1270 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1271 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1272 75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1273 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1274 -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
1275 -1, -1, -1, 108, 109, -1, -1, -1, -1, 114,
1276 115, 116, 117, 118, 3, 4, 5, 6, 7, 8,
1277 9, 10, 11, 12, 13, 14, 15, 16, -1, 18,
1278 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1279 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1280 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1281 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
1282 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
1283 69, 70, -1, 72, 73, 74, 75, 76, 77, 78,
1284 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001285 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001286 -1, -1, -1, -1, -1, 104, -1, -1, -1, 108,
1287 109, -1, -1, -1, -1, 114, 115, 116, 117, 118,
1288 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1289 13, 14, 15, 16, -1, 18, 19, 20, 21, 22,
1290 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
Alexis Hetu407813b2016-02-24 16:46:13 -05001291 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1292 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
Alexis Hetu46768622018-01-16 22:09:28 -05001293 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
Alexis Hetu407813b2016-02-24 16:46:13 -05001294 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1295 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1296 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001297 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1298 -1, 104, -1, -1, -1, 108, -1, -1, -1, -1,
1299 -1, 114, 115, 116, 117, 118, 3, 4, 5, 6,
1300 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1301 -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1302 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1303 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1304 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
1305 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1306 67, 68, 69, 70, -1, 72, 73, 74, 75, 76,
1307 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
1308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1309 -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
1310 -1, 108, -1, -1, -1, -1, -1, 114, 115, 116,
1311 117, 118, 3, 4, 5, 6, 7, 8, 9, 10,
1312 11, 12, 13, 14, 15, 16, -1, 18, 19, 20,
1313 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1314 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1315 41, -1, 43, 44, 45, 46, 47, 48, 49, 50,
1316 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1317 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1318 -1, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1319 81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
1320 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1321 -1, -1, -1, 104, -1, -1, -1, -1, -1, -1,
1322 -1, -1, -1, 114, 115, 116, 117, 118, 3, 4,
1323 5, 6, 7, 8, 9, 10, 11, 12, 13, -1,
1324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1325 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1326 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1327 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1328 55, -1, 57, 58, 59, 60, 61, 62, 63, 64,
1329 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1330 75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1331 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1332 -1, -1, -1, -1, -1, 3, 4, 5, 6, 104,
1333 8, 9, 10, 11, 12, 13, -1, -1, -1, 114,
1334 115, 116, 117, 118, -1, -1, -1, 25, 26, 27,
Alexis Hetu407813b2016-02-24 16:46:13 -05001335 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetu46768622018-01-16 22:09:28 -05001336 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1337 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1338 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1339 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetu407813b2016-02-24 16:46:13 -05001340 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001342 -1, 4, 5, 6, -1, -1, 104, 10, 11, 12,
1343 13, -1, -1, -1, -1, -1, -1, 115, 116, 117,
1344 118, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1345 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1346 -1, -1, 45, 46, 47, 48, 49, 50, -1, -1,
1347 -1, 54, 55, -1, 57, 58, 59, 60, 61, 62,
1348 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1349 73, 74, -1, 76, 77, -1, -1, 10, 11, 12,
1350 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1351 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1352 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1353 -1, 114, 45, 46, 47, 48, 49, 50, -1, -1,
1354 -1, 54, 55, -1, 57, 58, 59, 60, 61, 62,
1355 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1356 73, 74, -1, 76, 77, 78, 79, 80, 81, 82,
1357 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001358 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001359 -1, 104, -1, -1, 107, 10, 11, 12, 13, -1,
1360 -1, -1, 115, 116, 117, 118, -1, -1, -1, -1,
1361 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1362 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
1363 45, 46, 47, 48, 49, 50, -1, -1, -1, 54,
1364 55, -1, 57, 58, 59, 60, 61, 62, 63, 64,
1365 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1366 -1, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1367 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1368 -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
1369 -1, -1, 107, 10, 11, 12, 13, -1, -1, -1,
1370 115, 116, 117, 118, -1, -1, -1, -1, 25, 26,
1371 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1372 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1373 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
1374 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1375 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
1376 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
1377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1378 -1, -1, -1, -1, -1, -1, -1, 104, 10, 11,
1379 12, 13, -1, -1, -1, -1, -1, 114, 115, 116,
1380 117, 118, -1, 25, 26, 27, 28, 29, 30, 31,
Alexis Hetuad527752015-07-07 13:31:44 -04001381 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1382 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001383 -1, -1, 54, 55, -1, 57, 58, 59, 60, 61,
Alexis Hetuad527752015-07-07 13:31:44 -04001384 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1385 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1386 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001388 -1, -1, 104, -1, -1, 107, 10, 11, 12, 13,
1389 -1, -1, -1, 115, 116, 117, 118, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001390 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1391 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1392 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001393 54, 55, -1, 57, 58, 59, 60, 61, 62, 63,
Alexis Hetue5246692015-06-18 12:34:52 -04001394 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
Alexis Hetuad527752015-07-07 13:31:44 -04001395 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1396 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1398 104, 10, 11, 12, 13, -1, -1, -1, -1, -1,
1399 -1, 115, 116, 117, 118, -1, 25, 26, 27, 28,
1400 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1401 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
1402 49, 50, -1, -1, -1, 54, 55, -1, 57, 58,
1403 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
1404 69, 70, -1, 72, 73, 74, -1, 76, 77, 78,
1405 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1406 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1407 -1, 3, 4, 5, 6, 104, 8, 9, 10, 11,
1408 12, 13, -1, -1, -1, -1, 115, 116, 117, 118,
1409 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
Alexis Hetu407813b2016-02-24 16:46:13 -05001410 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1411 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetu46768622018-01-16 22:09:28 -05001412 52, 53, 54, 55, -1, 57, 58, 59, 60, 61,
Alexis Hetu407813b2016-02-24 16:46:13 -05001413 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1414 72, 73, 74, 75, -1, 77, -1, -1, -1, -1,
1415 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1416 -1, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1417 -1, -1, -1, -1, -1, -1, -1, 109, 25, 26,
1418 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1419 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1420 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001421 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
Alexis Hetu407813b2016-02-24 16:46:13 -05001422 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001423 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1424 -1, 3, 4, 5, 6, -1, 8, 9, 10, 11,
Alexis Hetu407813b2016-02-24 16:46:13 -05001425 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1426 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1427 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1428 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetu46768622018-01-16 22:09:28 -05001429 52, 53, 54, 55, -1, 57, 58, 59, 60, 61,
Alexis Hetu407813b2016-02-24 16:46:13 -05001430 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001431 72, 73, 74, 75, -1, 77, -1, -1, -1, -1,
1432 -1, -1, -1, 0, -1, -1, 3, 4, 5, 6,
Alexis Hetu407813b2016-02-24 16:46:13 -05001433 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001434 -1, -1, -1, -1, -1, -1, -1, 109, 25, 26,
Alexis Hetu407813b2016-02-24 16:46:13 -05001435 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1436 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1437 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001438 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
Alexis Hetu407813b2016-02-24 16:46:13 -05001439 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001440 77, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetu407813b2016-02-24 16:46:13 -05001441 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1442 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1443 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1444 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetu46768622018-01-16 22:09:28 -05001445 52, 53, 54, 55, -1, 57, 58, 59, 60, 61,
Alexis Hetu407813b2016-02-24 16:46:13 -05001446 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
Alexis Hetu46768622018-01-16 22:09:28 -05001447 72, 73, 74, 75, -1, 77, 3, 4, 5, 6,
1448 -1, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1449 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
1450 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1451 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1452 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1453 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1454 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1455 77, 4, 5, 6, -1, -1, -1, 10, 11, 12,
1456 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1457 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1458 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1459 -1, -1, 45, 46, 47, 48, 49, 50, -1, -1,
1460 -1, 54, 55, -1, 57, 58, 59, 60, 61, 62,
1461 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1462 73, 74, -1, -1, 77, 10, 11, 12, 13, -1,
1463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1464 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1465 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
1466 45, 46, 47, 48, 49, 50, -1, -1, -1, 54,
1467 55, -1, 57, 58, 59, 60, 61, 62, 63, 64,
1468 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1469 -1, 76, 77, 10, 11, 12, 13, 82, -1, -1,
1470 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
1471 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1472 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1473 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
1474 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1475 67, 68, 69, 70, -1, 72, 73, 74, -1, -1,
1476 77
John Bauman66b8ab22014-05-06 15:57:45 -04001477};
1478
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001479 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1480 symbol of state STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -04001481static const yytype_uint8 yystos[] =
1482{
1483 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001484 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001485 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001486 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetu46768622018-01-16 22:09:28 -05001487 54, 55, 57, 58, 59, 60, 61, 62, 63, 64,
1488 65, 66, 67, 68, 69, 70, 72, 73, 74, 75,
1489 77, 159, 160, 161, 162, 163, 168, 169, 170, 171,
1490 173, 174, 175, 176, 177, 180, 181, 182, 217, 218,
1491 219, 44, 76, 171, 174, 176, 40, 41, 76, 108,
1492 104, 114, 220, 105, 111, 9, 40, 41, 42, 165,
1493 166, 172, 111, 114, 76, 174, 76, 114, 158, 175,
1494 180, 174, 106, 0, 218, 174, 180, 108, 184, 76,
1495 178, 179, 108, 200, 165, 164, 167, 175, 166, 76,
1496 104, 106, 113, 108, 3, 173, 175, 185, 186, 76,
1497 78, 79, 80, 81, 82, 85, 86, 104, 107, 115,
1498 116, 117, 118, 129, 130, 131, 133, 134, 135, 136,
1499 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1500 147, 148, 149, 150, 151, 152, 153, 157, 180, 114,
1501 183, 185, 113, 105, 111, 14, 15, 16, 18, 19,
1502 20, 21, 22, 23, 24, 56, 108, 109, 114, 140,
1503 153, 154, 156, 159, 160, 180, 190, 191, 192, 193,
1504 201, 202, 203, 205, 207, 209, 216, 76, 164, 167,
1505 106, 113, 107, 157, 154, 189, 175, 76, 187, 188,
1506 109, 186, 140, 140, 156, 85, 86, 106, 110, 105,
1507 105, 111, 55, 154, 104, 140, 119, 120, 121, 116,
1508 118, 83, 84, 87, 88, 122, 123, 89, 90, 126,
1509 125, 124, 91, 93, 92, 127, 107, 185, 109, 79,
1510 80, 179, 114, 114, 211, 104, 104, 114, 114, 156,
1511 104, 157, 112, 104, 109, 194, 94, 95, 96, 97,
1512 98, 99, 100, 101, 102, 103, 113, 155, 111, 114,
1513 109, 191, 106, 107, 157, 189, 113, 107, 187, 106,
1514 111, 114, 76, 114, 105, 132, 156, 76, 82, 135,
1515 154, 140, 140, 140, 142, 142, 143, 143, 144, 144,
1516 144, 144, 145, 145, 146, 147, 148, 149, 150, 151,
1517 156, 109, 197, 198, 199, 212, 156, 114, 156, 112,
1518 210, 201, 154, 154, 157, 113, 107, 189, 113, 114,
1519 157, 188, 106, 114, 107, 112, 56, 200, 192, 190,
1520 202, 213, 105, 105, 156, 170, 173, 208, 195, 107,
1521 189, 113, 189, 107, 157, 154, 104, 208, 214, 215,
1522 197, 204, 206, 76, 105, 109, 189, 107, 156, 114,
1523 105, 17, 193, 113, 192, 196, 200, 114, 105, 156,
1524 196, 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001525};
1526
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001527 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1528static const yytype_uint8 yyr1[] =
1529{
1530 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
1531 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
1532 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
1533 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
1534 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
1535 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
1536 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
1537 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1538 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
1539 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
1540 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
1541 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
1542 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
1543 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
1544 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
1545 178, 178, 179, 179, 179, 180, 180, 180, 181, 181,
1546 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1547 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1548 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1549 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetu46768622018-01-16 22:09:28 -05001550 181, 181, 181, 183, 182, 184, 182, 185, 185, 186,
1551 186, 187, 187, 188, 188, 189, 190, 191, 191, 192,
1552 192, 192, 192, 192, 192, 192, 193, 194, 195, 193,
1553 196, 196, 198, 197, 199, 197, 200, 200, 201, 201,
1554 202, 202, 203, 204, 204, 206, 205, 207, 207, 208,
1555 208, 210, 209, 211, 209, 212, 209, 213, 213, 214,
1556 214, 215, 215, 216, 216, 216, 216, 216, 217, 217,
1557 218, 218, 220, 219
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001558};
John Bauman66b8ab22014-05-06 15:57:45 -04001559
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001560 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1561static const yytype_uint8 yyr2[] =
1562{
1563 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
1564 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
1565 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
1566 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
1567 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
1568 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
1569 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
1570 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1571 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
1572 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
1573 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
1574 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
1575 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
1576 2, 1, 2, 1, 1, 2, 2, 3, 1, 1,
1577 1, 2, 2, 1, 1, 2, 1, 1, 1, 4,
1578 1, 3, 1, 3, 3, 1, 3, 4, 1, 1,
1579 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1580 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1581 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1582 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetu46768622018-01-16 22:09:28 -05001583 1, 1, 1, 0, 6, 0, 5, 1, 2, 3,
1584 4, 1, 3, 1, 4, 1, 1, 1, 1, 1,
1585 1, 1, 1, 1, 1, 1, 2, 0, 0, 5,
1586 1, 1, 0, 2, 0, 2, 2, 3, 1, 2,
1587 1, 2, 5, 3, 1, 0, 6, 3, 2, 1,
1588 4, 0, 6, 0, 8, 0, 7, 1, 1, 1,
1589 0, 2, 3, 2, 2, 2, 3, 2, 1, 2,
1590 1, 1, 0, 3
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001591};
John Bauman66b8ab22014-05-06 15:57:45 -04001592
1593
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001594#define yyerrok (yyerrstatus = 0)
1595#define yyclearin (yychar = YYEMPTY)
1596#define YYEMPTY (-2)
1597#define YYEOF 0
John Bauman66b8ab22014-05-06 15:57:45 -04001598
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001599#define YYACCEPT goto yyacceptlab
1600#define YYABORT goto yyabortlab
1601#define YYERROR goto yyerrorlab
1602
John Bauman66b8ab22014-05-06 15:57:45 -04001603
1604#define YYRECOVERING() (!!yyerrstatus)
1605
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001606#define YYBACKUP(Token, Value) \
1607do \
1608 if (yychar == YYEMPTY) \
1609 { \
1610 yychar = (Token); \
1611 yylval = (Value); \
1612 YYPOPSTACK (yylen); \
1613 yystate = *yyssp; \
1614 goto yybackup; \
1615 } \
1616 else \
1617 { \
1618 yyerror (&yylloc, context, yyscanner, YY_("syntax error: cannot back up")); \
1619 YYERROR; \
1620 } \
1621while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001622
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001623/* Error token number */
1624#define YYTERROR 1
1625#define YYERRCODE 256
John Bauman66b8ab22014-05-06 15:57:45 -04001626
1627
1628/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1629 If N is 0, then set CURRENT to the empty location which ends
1630 the previous symbol: RHS[0] (always defined). */
1631
John Bauman66b8ab22014-05-06 15:57:45 -04001632#ifndef YYLLOC_DEFAULT
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001633# define YYLLOC_DEFAULT(Current, Rhs, N) \
1634 do \
1635 if (N) \
1636 { \
1637 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1638 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1639 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1640 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1641 } \
1642 else \
1643 { \
1644 (Current).first_line = (Current).last_line = \
1645 YYRHSLOC (Rhs, 0).last_line; \
1646 (Current).first_column = (Current).last_column = \
1647 YYRHSLOC (Rhs, 0).last_column; \
1648 } \
1649 while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001650#endif
1651
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001652#define YYRHSLOC(Rhs, K) ((Rhs)[K])
John Bauman66b8ab22014-05-06 15:57:45 -04001653
John Bauman66b8ab22014-05-06 15:57:45 -04001654
1655/* Enable debugging if requested. */
1656#if YYDEBUG
1657
1658# ifndef YYFPRINTF
1659# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1660# define YYFPRINTF fprintf
1661# endif
1662
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001663# define YYDPRINTF(Args) \
1664do { \
1665 if (yydebug) \
1666 YYFPRINTF Args; \
1667} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001668
1669
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001670/* YY_LOCATION_PRINT -- Print the location on the stream.
1671 This macro was not mandated originally: define only if we know
1672 we won't break user code: when these are the locations we know. */
John Bauman66b8ab22014-05-06 15:57:45 -04001673
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001674#ifndef YY_LOCATION_PRINT
1675# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1676
1677/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1678
1679YY_ATTRIBUTE_UNUSED
1680static unsigned
1681yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
John Bauman66b8ab22014-05-06 15:57:45 -04001682{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001683 unsigned res = 0;
1684 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1685 if (0 <= yylocp->first_line)
1686 {
1687 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1688 if (0 <= yylocp->first_column)
1689 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1690 }
1691 if (0 <= yylocp->last_line)
1692 {
1693 if (yylocp->first_line < yylocp->last_line)
1694 {
1695 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1696 if (0 <= end_col)
1697 res += YYFPRINTF (yyo, ".%d", end_col);
1698 }
1699 else if (0 <= end_col && yylocp->first_column < end_col)
1700 res += YYFPRINTF (yyo, "-%d", end_col);
1701 }
1702 return res;
1703 }
1704
1705# define YY_LOCATION_PRINT(File, Loc) \
1706 yy_location_print_ (File, &(Loc))
1707
1708# else
1709# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1710# endif
1711#endif
1712
1713
1714# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1715do { \
1716 if (yydebug) \
1717 { \
1718 YYFPRINTF (stderr, "%s ", Title); \
1719 yy_symbol_print (stderr, \
1720 Type, Value, Location, context, yyscanner); \
1721 YYFPRINTF (stderr, "\n"); \
1722 } \
1723} while (0)
1724
1725
1726/*----------------------------------------.
1727| Print this symbol's value on YYOUTPUT. |
1728`----------------------------------------*/
1729
1730static void
1731yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner)
1732{
1733 FILE *yyo = yyoutput;
1734 YYUSE (yyo);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001735 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001736 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001737 YYUSE (yyscanner);
1738 if (!yyvaluep)
1739 return;
John Bauman66b8ab22014-05-06 15:57:45 -04001740# ifdef YYPRINT
1741 if (yytype < YYNTOKENS)
1742 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
John Bauman66b8ab22014-05-06 15:57:45 -04001743# endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001744 YYUSE (yytype);
John Bauman66b8ab22014-05-06 15:57:45 -04001745}
1746
1747
1748/*--------------------------------.
1749| Print this symbol on YYOUTPUT. |
1750`--------------------------------*/
1751
John Bauman66b8ab22014-05-06 15:57:45 -04001752static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001753yy_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 -04001754{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001755 YYFPRINTF (yyoutput, "%s %s (",
1756 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
John Bauman66b8ab22014-05-06 15:57:45 -04001757
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001758 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1759 YYFPRINTF (yyoutput, ": ");
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001760 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001761 YYFPRINTF (yyoutput, ")");
1762}
1763
1764/*------------------------------------------------------------------.
1765| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1766| TOP (included). |
1767`------------------------------------------------------------------*/
1768
John Bauman66b8ab22014-05-06 15:57:45 -04001769static void
1770yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
John Bauman66b8ab22014-05-06 15:57:45 -04001771{
1772 YYFPRINTF (stderr, "Stack now");
1773 for (; yybottom <= yytop; yybottom++)
1774 {
1775 int yybot = *yybottom;
1776 YYFPRINTF (stderr, " %d", yybot);
1777 }
1778 YYFPRINTF (stderr, "\n");
1779}
1780
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001781# define YY_STACK_PRINT(Bottom, Top) \
1782do { \
1783 if (yydebug) \
1784 yy_stack_print ((Bottom), (Top)); \
1785} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001786
1787
1788/*------------------------------------------------.
1789| Report that the YYRULE is going to be reduced. |
1790`------------------------------------------------*/
1791
John Bauman66b8ab22014-05-06 15:57:45 -04001792static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001793yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04001794{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001795 unsigned long int yylno = yyrline[yyrule];
John Bauman66b8ab22014-05-06 15:57:45 -04001796 int yynrhs = yyr2[yyrule];
1797 int yyi;
John Bauman66b8ab22014-05-06 15:57:45 -04001798 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001799 yyrule - 1, yylno);
John Bauman66b8ab22014-05-06 15:57:45 -04001800 /* The symbols being reduced. */
1801 for (yyi = 0; yyi < yynrhs; yyi++)
1802 {
1803 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001804 yy_symbol_print (stderr,
1805 yystos[yyssp[yyi + 1 - yynrhs]],
1806 &(yyvsp[(yyi + 1) - (yynrhs)])
1807 , &(yylsp[(yyi + 1) - (yynrhs)]) , context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001808 YYFPRINTF (stderr, "\n");
1809 }
1810}
1811
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001812# define YY_REDUCE_PRINT(Rule) \
1813do { \
1814 if (yydebug) \
1815 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, yyscanner); \
1816} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001817
1818/* Nonzero means print parse trace. It is left uninitialized so that
1819 multiple parsers can coexist. */
1820int yydebug;
1821#else /* !YYDEBUG */
1822# define YYDPRINTF(Args)
1823# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1824# define YY_STACK_PRINT(Bottom, Top)
1825# define YY_REDUCE_PRINT(Rule)
1826#endif /* !YYDEBUG */
1827
1828
1829/* YYINITDEPTH -- initial size of the parser's stacks. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001830#ifndef YYINITDEPTH
John Bauman66b8ab22014-05-06 15:57:45 -04001831# define YYINITDEPTH 200
1832#endif
1833
1834/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1835 if the built-in stack extension method is used).
1836
1837 Do not make this value too large; the results are undefined if
1838 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1839 evaluated with infinite-precision integer arithmetic. */
1840
1841#ifndef YYMAXDEPTH
1842# define YYMAXDEPTH 10000
1843#endif
1844
John Bauman66b8ab22014-05-06 15:57:45 -04001845
1846#if YYERROR_VERBOSE
1847
1848# ifndef yystrlen
1849# if defined __GLIBC__ && defined _STRING_H
1850# define yystrlen strlen
1851# else
1852/* Return the length of YYSTR. */
John Bauman66b8ab22014-05-06 15:57:45 -04001853static YYSIZE_T
1854yystrlen (const char *yystr)
John Bauman66b8ab22014-05-06 15:57:45 -04001855{
1856 YYSIZE_T yylen;
1857 for (yylen = 0; yystr[yylen]; yylen++)
1858 continue;
1859 return yylen;
1860}
1861# endif
1862# endif
1863
1864# ifndef yystpcpy
1865# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1866# define yystpcpy stpcpy
1867# else
1868/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1869 YYDEST. */
John Bauman66b8ab22014-05-06 15:57:45 -04001870static char *
1871yystpcpy (char *yydest, const char *yysrc)
John Bauman66b8ab22014-05-06 15:57:45 -04001872{
1873 char *yyd = yydest;
1874 const char *yys = yysrc;
1875
1876 while ((*yyd++ = *yys++) != '\0')
1877 continue;
1878
1879 return yyd - 1;
1880}
1881# endif
1882# endif
1883
1884# ifndef yytnamerr
1885/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1886 quotes and backslashes, so that it's suitable for yyerror. The
1887 heuristic is that double-quoting is unnecessary unless the string
1888 contains an apostrophe, a comma, or backslash (other than
1889 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1890 null, do not copy; instead, return the length of what the result
1891 would have been. */
1892static YYSIZE_T
1893yytnamerr (char *yyres, const char *yystr)
1894{
1895 if (*yystr == '"')
1896 {
1897 YYSIZE_T yyn = 0;
1898 char const *yyp = yystr;
1899
1900 for (;;)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001901 switch (*++yyp)
1902 {
1903 case '\'':
1904 case ',':
1905 goto do_not_strip_quotes;
John Bauman66b8ab22014-05-06 15:57:45 -04001906
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001907 case '\\':
1908 if (*++yyp != '\\')
1909 goto do_not_strip_quotes;
1910 /* Fall through. */
1911 default:
1912 if (yyres)
1913 yyres[yyn] = *yyp;
1914 yyn++;
1915 break;
John Bauman66b8ab22014-05-06 15:57:45 -04001916
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001917 case '"':
1918 if (yyres)
1919 yyres[yyn] = '\0';
1920 return yyn;
1921 }
John Bauman66b8ab22014-05-06 15:57:45 -04001922 do_not_strip_quotes: ;
1923 }
1924
1925 if (! yyres)
1926 return yystrlen (yystr);
1927
1928 return yystpcpy (yyres, yystr) - yyres;
1929}
1930# endif
1931
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001932/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1933 about the unexpected token YYTOKEN for the state stack whose top is
1934 YYSSP.
1935
1936 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1937 not large enough to hold the message. In that case, also set
1938 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1939 required number of bytes is too large to store. */
1940static int
1941yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1942 yytype_int16 *yyssp, int yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04001943{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001944 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1945 YYSIZE_T yysize = yysize0;
1946 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1947 /* Internationalized format string. */
1948 const char *yyformat = YY_NULLPTR;
1949 /* Arguments of yyformat. */
1950 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1951 /* Number of reported tokens (one for the "unexpected", one per
1952 "expected"). */
1953 int yycount = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04001954
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001955 /* There are many possibilities here to consider:
1956 - If this state is a consistent state with a default action, then
1957 the only way this function was invoked is if the default action
1958 is an error action. In that case, don't check for expected
1959 tokens because there are none.
1960 - The only way there can be no lookahead present (in yychar) is if
1961 this state is a consistent state with a default action. Thus,
1962 detecting the absence of a lookahead is sufficient to determine
1963 that there is no unexpected or expected token to report. In that
1964 case, just report a simple "syntax error".
1965 - Don't assume there isn't a lookahead just because this state is a
1966 consistent state with a default action. There might have been a
1967 previous inconsistent state, consistent state with a non-default
1968 action, or user semantic action that manipulated yychar.
1969 - Of course, the expected token list depends on states to have
1970 correct lookahead information, and it depends on the parser not
1971 to perform extra reductions after fetching a lookahead from the
1972 scanner and before detecting a syntax error. Thus, state merging
1973 (from LALR or IELR) and default reductions corrupt the expected
1974 token list. However, the list is correct for canonical LR with
1975 one exception: it will still contain any token that will not be
1976 accepted due to an error action in a later state.
1977 */
1978 if (yytoken != YYEMPTY)
John Bauman66b8ab22014-05-06 15:57:45 -04001979 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001980 int yyn = yypact[*yyssp];
1981 yyarg[yycount++] = yytname[yytoken];
1982 if (!yypact_value_is_default (yyn))
1983 {
1984 /* Start YYX at -YYN if negative to avoid negative indexes in
1985 YYCHECK. In other words, skip the first -YYN actions for
1986 this state because they are default actions. */
1987 int yyxbegin = yyn < 0 ? -yyn : 0;
1988 /* Stay within bounds of both yycheck and yytname. */
1989 int yychecklim = YYLAST - yyn + 1;
1990 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1991 int yyx;
John Bauman66b8ab22014-05-06 15:57:45 -04001992
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001993 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1994 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1995 && !yytable_value_is_error (yytable[yyx + yyn]))
1996 {
1997 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1998 {
1999 yycount = 1;
2000 yysize = yysize0;
2001 break;
2002 }
2003 yyarg[yycount++] = yytname[yyx];
2004 {
2005 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
2006 if (! (yysize <= yysize1
2007 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2008 return 2;
2009 yysize = yysize1;
2010 }
2011 }
2012 }
John Bauman66b8ab22014-05-06 15:57:45 -04002013 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002014
2015 switch (yycount)
2016 {
2017# define YYCASE_(N, S) \
2018 case N: \
2019 yyformat = S; \
2020 break
2021 YYCASE_(0, YY_("syntax error"));
2022 YYCASE_(1, YY_("syntax error, unexpected %s"));
2023 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2024 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2025 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2026 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2027# undef YYCASE_
2028 }
2029
2030 {
2031 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2032 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2033 return 2;
2034 yysize = yysize1;
2035 }
2036
2037 if (*yymsg_alloc < yysize)
2038 {
2039 *yymsg_alloc = 2 * yysize;
2040 if (! (yysize <= *yymsg_alloc
2041 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2042 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2043 return 1;
2044 }
2045
2046 /* Avoid sprintf, as that infringes on the user's name space.
2047 Don't have undefined behavior even if the translation
2048 produced a string with the wrong number of "%s"s. */
2049 {
2050 char *yyp = *yymsg;
2051 int yyi = 0;
2052 while ((*yyp = *yyformat) != '\0')
2053 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2054 {
2055 yyp += yytnamerr (yyp, yyarg[yyi++]);
2056 yyformat += 2;
2057 }
2058 else
2059 {
2060 yyp++;
2061 yyformat++;
2062 }
2063 }
2064 return 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002065}
2066#endif /* YYERROR_VERBOSE */
John Bauman66b8ab22014-05-06 15:57:45 -04002067
2068/*-----------------------------------------------.
2069| Release the memory associated to this symbol. |
2070`-----------------------------------------------*/
2071
John Bauman66b8ab22014-05-06 15:57:45 -04002072static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002073yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002074{
2075 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002076 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002077 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002078 YYUSE (yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002079 if (!yymsg)
2080 yymsg = "Deleting";
2081 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2082
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002083 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2084 YYUSE (yytype);
2085 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04002086}
2087
John Bauman66b8ab22014-05-06 15:57:45 -04002088
2089
2090
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002091/*----------.
2092| yyparse. |
2093`----------*/
John Bauman66b8ab22014-05-06 15:57:45 -04002094
John Bauman66b8ab22014-05-06 15:57:45 -04002095int
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002096yyparse (TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002097{
2098/* The lookahead symbol. */
2099int yychar;
2100
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002101
John Bauman66b8ab22014-05-06 15:57:45 -04002102/* The semantic value of the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002103/* Default value used for initialization, for pacifying older GCCs
2104 or non-GCC compilers. */
2105YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
2106YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
John Bauman66b8ab22014-05-06 15:57:45 -04002107
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002108/* Location data for the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002109static YYLTYPE yyloc_default
2110# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2111 = { 1, 1, 1, 1 }
2112# endif
2113;
2114YYLTYPE yylloc = yyloc_default;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002115
John Bauman66b8ab22014-05-06 15:57:45 -04002116 /* Number of syntax errors so far. */
2117 int yynerrs;
2118
2119 int yystate;
2120 /* Number of tokens to shift before error messages enabled. */
2121 int yyerrstatus;
2122
2123 /* The stacks and their tools:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002124 'yyss': related to states.
2125 'yyvs': related to semantic values.
2126 'yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002127
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002128 Refer to the stacks through separate pointers, to allow yyoverflow
John Bauman66b8ab22014-05-06 15:57:45 -04002129 to reallocate them elsewhere. */
2130
2131 /* The state stack. */
2132 yytype_int16 yyssa[YYINITDEPTH];
2133 yytype_int16 *yyss;
2134 yytype_int16 *yyssp;
2135
2136 /* The semantic value stack. */
2137 YYSTYPE yyvsa[YYINITDEPTH];
2138 YYSTYPE *yyvs;
2139 YYSTYPE *yyvsp;
2140
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002141 /* The location stack. */
2142 YYLTYPE yylsa[YYINITDEPTH];
2143 YYLTYPE *yyls;
2144 YYLTYPE *yylsp;
2145
2146 /* The locations where the error started and ended. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002147 YYLTYPE yyerror_range[3];
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002148
John Bauman66b8ab22014-05-06 15:57:45 -04002149 YYSIZE_T yystacksize;
2150
2151 int yyn;
2152 int yyresult;
2153 /* Lookahead token as an internal (translated) token number. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002154 int yytoken = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002155 /* The variables used to return semantic value and location from the
2156 action routines. */
2157 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002158 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002159
2160#if YYERROR_VERBOSE
2161 /* Buffer for error messages, and its allocated size. */
2162 char yymsgbuf[128];
2163 char *yymsg = yymsgbuf;
2164 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2165#endif
2166
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002167#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002168
2169 /* The number of symbols on the RHS of the reduced rule.
2170 Keep to zero when no symbol should be popped. */
2171 int yylen = 0;
2172
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002173 yyssp = yyss = yyssa;
2174 yyvsp = yyvs = yyvsa;
2175 yylsp = yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002176 yystacksize = YYINITDEPTH;
2177
2178 YYDPRINTF ((stderr, "Starting parse\n"));
2179
2180 yystate = 0;
2181 yyerrstatus = 0;
2182 yynerrs = 0;
2183 yychar = YYEMPTY; /* Cause a token to be read. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002184 yylsp[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002185 goto yysetstate;
2186
2187/*------------------------------------------------------------.
2188| yynewstate -- Push a new state, which is found in yystate. |
2189`------------------------------------------------------------*/
2190 yynewstate:
2191 /* In all cases, when you get here, the value and location stacks
2192 have just been pushed. So pushing a state here evens the stacks. */
2193 yyssp++;
2194
2195 yysetstate:
2196 *yyssp = yystate;
2197
2198 if (yyss + yystacksize - 1 <= yyssp)
2199 {
2200 /* Get the current used size of the three stacks, in elements. */
2201 YYSIZE_T yysize = yyssp - yyss + 1;
2202
2203#ifdef yyoverflow
2204 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002205 /* Give user a chance to reallocate the stack. Use copies of
2206 these so that the &'s don't force the real ones into
2207 memory. */
2208 YYSTYPE *yyvs1 = yyvs;
2209 yytype_int16 *yyss1 = yyss;
2210 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002211
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002212 /* Each stack pointer address is followed by the size of the
2213 data in use in that stack, in bytes. This used to be a
2214 conditional around just the two extra args, but that might
2215 be undefined if yyoverflow is a macro. */
2216 yyoverflow (YY_("memory exhausted"),
2217 &yyss1, yysize * sizeof (*yyssp),
2218 &yyvs1, yysize * sizeof (*yyvsp),
2219 &yyls1, yysize * sizeof (*yylsp),
2220 &yystacksize);
John Bauman66b8ab22014-05-06 15:57:45 -04002221
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002222 yyls = yyls1;
2223 yyss = yyss1;
2224 yyvs = yyvs1;
John Bauman66b8ab22014-05-06 15:57:45 -04002225 }
2226#else /* no yyoverflow */
2227# ifndef YYSTACK_RELOCATE
2228 goto yyexhaustedlab;
2229# else
2230 /* Extend the stack our own way. */
2231 if (YYMAXDEPTH <= yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002232 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002233 yystacksize *= 2;
2234 if (YYMAXDEPTH < yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002235 yystacksize = YYMAXDEPTH;
John Bauman66b8ab22014-05-06 15:57:45 -04002236
2237 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002238 yytype_int16 *yyss1 = yyss;
2239 union yyalloc *yyptr =
2240 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2241 if (! yyptr)
2242 goto yyexhaustedlab;
2243 YYSTACK_RELOCATE (yyss_alloc, yyss);
2244 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2245 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002246# undef YYSTACK_RELOCATE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002247 if (yyss1 != yyssa)
2248 YYSTACK_FREE (yyss1);
John Bauman66b8ab22014-05-06 15:57:45 -04002249 }
2250# endif
2251#endif /* no yyoverflow */
2252
2253 yyssp = yyss + yysize - 1;
2254 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002255 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002256
2257 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002258 (unsigned long int) yystacksize));
John Bauman66b8ab22014-05-06 15:57:45 -04002259
2260 if (yyss + yystacksize - 1 <= yyssp)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002261 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04002262 }
2263
2264 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2265
2266 if (yystate == YYFINAL)
2267 YYACCEPT;
2268
2269 goto yybackup;
2270
2271/*-----------.
2272| yybackup. |
2273`-----------*/
2274yybackup:
2275
2276 /* Do appropriate processing given the current state. Read a
2277 lookahead token if we need one and don't already have one. */
2278
2279 /* First try to decide what to do without reference to lookahead token. */
2280 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002281 if (yypact_value_is_default (yyn))
John Bauman66b8ab22014-05-06 15:57:45 -04002282 goto yydefault;
2283
2284 /* Not known => get a lookahead token if don't already have one. */
2285
2286 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2287 if (yychar == YYEMPTY)
2288 {
2289 YYDPRINTF ((stderr, "Reading a token: "));
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002290 yychar = yylex (&yylval, &yylloc, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002291 }
2292
2293 if (yychar <= YYEOF)
2294 {
2295 yychar = yytoken = YYEOF;
2296 YYDPRINTF ((stderr, "Now at end of input.\n"));
2297 }
2298 else
2299 {
2300 yytoken = YYTRANSLATE (yychar);
2301 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2302 }
2303
2304 /* If the proper action on seeing token YYTOKEN is to reduce or to
2305 detect an error, take that action. */
2306 yyn += yytoken;
2307 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2308 goto yydefault;
2309 yyn = yytable[yyn];
2310 if (yyn <= 0)
2311 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002312 if (yytable_value_is_error (yyn))
2313 goto yyerrlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002314 yyn = -yyn;
2315 goto yyreduce;
2316 }
2317
2318 /* Count tokens shifted since error; after three, turn off error
2319 status. */
2320 if (yyerrstatus)
2321 yyerrstatus--;
2322
2323 /* Shift the lookahead token. */
2324 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2325
2326 /* Discard the shifted token. */
2327 yychar = YYEMPTY;
2328
2329 yystate = yyn;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002330 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04002331 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002332 YY_IGNORE_MAYBE_UNINITIALIZED_END
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002333 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002334 goto yynewstate;
2335
2336
2337/*-----------------------------------------------------------.
2338| yydefault -- do the default action for the current state. |
2339`-----------------------------------------------------------*/
2340yydefault:
2341 yyn = yydefact[yystate];
2342 if (yyn == 0)
2343 goto yyerrlab;
2344 goto yyreduce;
2345
2346
2347/*-----------------------------.
2348| yyreduce -- Do a reduction. |
2349`-----------------------------*/
2350yyreduce:
2351 /* yyn is the number of a rule to reduce with. */
2352 yylen = yyr2[yyn];
2353
2354 /* If YYLEN is nonzero, implement the default value of the action:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002355 '$$ = $1'.
John Bauman66b8ab22014-05-06 15:57:45 -04002356
2357 Otherwise, the following line sets YYVAL to garbage.
2358 This behavior is undocumented and Bison
2359 users should not rely upon it. Assigning to YYVAL
2360 unconditionally makes the parser a bit smaller, and it avoids a
2361 GCC warning that YYVAL may be used uninitialized. */
2362 yyval = yyvsp[1-yylen];
2363
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002364 /* Default location. */
2365 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002366 YY_REDUCE_PRINT (yyn);
2367 switch (yyn)
2368 {
2369 case 2:
2370
2371 {
2372 // The symbol table search was done in the lexical phase
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002373 const TVariable *variable = context->getNamedVariable((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
John Bauman66b8ab22014-05-06 15:57:45 -04002374
2375 // don't delete $1.string, it's used by error recovery, and the pool
2376 // pop will reclaim the memory
2377
Nicolas Capens7cbb1de2017-12-22 08:54:18 -05002378 // Constants which aren't indexable arrays can be propagated by value.
Nicolas Capens0863f0d2016-04-10 00:30:02 -04002379 ConstantUnion *constArray = variable->getConstPointer();
Nicolas Capens7cbb1de2017-12-22 08:54:18 -05002380 if (constArray && variable->getType().getArraySize() <= 1) {
John Bauman66b8ab22014-05-06 15:57:45 -04002381 TType t(variable->getType());
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002382 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002383 } else
2384 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2385 variable->getName(),
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002386 variable->getType(), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002387 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002388
John Bauman66b8ab22014-05-06 15:57:45 -04002389 break;
2390
2391 case 3:
2392
2393 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002394 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002395 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002396
John Bauman66b8ab22014-05-06 15:57:45 -04002397 break;
2398
2399 case 4:
2400
2401 {
John Bauman66b8ab22014-05-06 15:57:45 -04002402 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002403 unionArray->setIConst((yyvsp[0].lex).i);
2404 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002405 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002406
John Bauman66b8ab22014-05-06 15:57:45 -04002407 break;
2408
2409 case 5:
2410
2411 {
2412 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002413 unionArray->setUConst((yyvsp[0].lex).u);
2414 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002415 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002416
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002417 break;
2418
2419 case 6:
2420
2421 {
2422 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002423 unionArray->setFConst((yyvsp[0].lex).f);
2424 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002425 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002426
John Bauman66b8ab22014-05-06 15:57:45 -04002427 break;
2428
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002429 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002430
2431 {
2432 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002433 unionArray->setBConst((yyvsp[0].lex).b);
2434 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002435 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002436
John Bauman66b8ab22014-05-06 15:57:45 -04002437 break;
2438
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002439 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002440
2441 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002442 (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002443 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002444
John Bauman66b8ab22014-05-06 15:57:45 -04002445 break;
2446
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002447 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002448
2449 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002450 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002451 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002452
John Bauman66b8ab22014-05-06 15:57:45 -04002453 break;
2454
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002455 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002456
2457 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002458 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04002459 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002460
John Bauman66b8ab22014-05-06 15:57:45 -04002461 break;
2462
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002463 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002464
2465 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002466 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002467 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002468
John Bauman66b8ab22014-05-06 15:57:45 -04002469 break;
2470
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002471 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002472
2473 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002474 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002475 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002476
John Bauman66b8ab22014-05-06 15:57:45 -04002477 break;
2478
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002479 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002480
2481 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002482 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002483 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002484
John Bauman66b8ab22014-05-06 15:57:45 -04002485 break;
2486
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002487 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002488
2489 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002490 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002491 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002492
John Bauman66b8ab22014-05-06 15:57:45 -04002493 break;
2494
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002495 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002496
2497 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002498 if (context->integerErrorCheck((yyvsp[0].interm.intermTypedNode), "[]"))
John Bauman66b8ab22014-05-06 15:57:45 -04002499 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002500 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
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 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002506
2507 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002508 bool fatalError = false;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002509 (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 -04002510 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002511 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002512 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002513 }
John Bauman66b8ab22014-05-06 15:57:45 -04002514 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002515
John Bauman66b8ab22014-05-06 15:57:45 -04002516 break;
2517
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002518 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002519
2520 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002521 (yyval.interm) = (yyvsp[0].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002522 (yyval.interm).nodePair.node2 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002523 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002524
John Bauman66b8ab22014-05-06 15:57:45 -04002525 break;
2526
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002527 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002528
2529 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002530 ES3_ONLY("", (yylsp[0]), "methods");
2531 (yyval.interm) = (yyvsp[0].interm);
2532 (yyval.interm).nodePair.node2 = (yyvsp[-2].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002533 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002534
John Bauman66b8ab22014-05-06 15:57:45 -04002535 break;
2536
John Bauman66b8ab22014-05-06 15:57:45 -04002537 case 19:
2538
2539 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002540 (yyval.interm) = (yyvsp[-1].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002541 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002542
John Bauman66b8ab22014-05-06 15:57:45 -04002543 break;
2544
2545 case 20:
2546
2547 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002548 (yyval.interm) = (yyvsp[-1].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002549 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002550
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002551 break;
2552
2553 case 21:
2554
2555 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002556 (yyval.interm).function = (yyvsp[-1].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002557 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002558 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002559
John Bauman66b8ab22014-05-06 15:57:45 -04002560 break;
2561
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002562 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002563
2564 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002565 (yyval.interm).function = (yyvsp[0].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002566 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002567 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002568
John Bauman66b8ab22014-05-06 15:57:45 -04002569 break;
2570
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002571 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002572
2573 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002574 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2575 (yyvsp[-1].interm.function)->addParameter(param);
2576 (yyval.interm).function = (yyvsp[-1].interm.function);
Nicolas Capens41320522018-06-06 13:47:19 -04002577 (yyval.interm).nodePair.node1 = context->intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002578 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002579
John Bauman66b8ab22014-05-06 15:57:45 -04002580 break;
2581
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002582 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002583
2584 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002585 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2586 (yyvsp[-2].interm).function->addParameter(param);
2587 (yyval.interm).function = (yyvsp[-2].interm).function;
2588 (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002589 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002590
John Bauman66b8ab22014-05-06 15:57:45 -04002591 break;
2592
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002593 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002594
2595 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002596 (yyval.interm.function) = (yyvsp[-1].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04002597 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002598
John Bauman66b8ab22014-05-06 15:57:45 -04002599 break;
2600
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002601 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002602
2603 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002604 if ((yyvsp[0].interm.type).array) {
2605 ES3_ONLY("[]", (yylsp[0]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002606 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002607 (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002608 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002609
John Bauman66b8ab22014-05-06 15:57:45 -04002610 break;
2611
John Bauman66b8ab22014-05-06 15:57:45 -04002612 case 27:
2613
2614 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002615 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002616 context->recover();
2617 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002618 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04002619 (yyval.interm.function) = function;
2620 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002621
John Bauman66b8ab22014-05-06 15:57:45 -04002622 break;
2623
2624 case 28:
2625
2626 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002627 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002628 context->recover();
2629 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002630 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002631 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002632 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002633
John Bauman66b8ab22014-05-06 15:57:45 -04002634 break;
2635
2636 case 29:
2637
2638 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002639 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002640 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002641
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002642 break;
2643
2644 case 30:
2645
2646 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002647 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002648 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002649
John Bauman66b8ab22014-05-06 15:57:45 -04002650 break;
2651
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002652 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002653
2654 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002655 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002656 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002657
John Bauman66b8ab22014-05-06 15:57:45 -04002658 break;
2659
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002660 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002661
2662 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002663 if ((yyvsp[-1].interm).op != EOpNull) {
2664 (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002665 } else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002666 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002667 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002668
John Bauman66b8ab22014-05-06 15:57:45 -04002669 break;
2670
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002671 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002672
Alexis Hetu253fdd12015-07-07 15:12:46 -04002673 { (yyval.interm).op = EOpNull; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002674
John Bauman66b8ab22014-05-06 15:57:45 -04002675 break;
2676
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002677 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002678
Alexis Hetu253fdd12015-07-07 15:12:46 -04002679 { (yyval.interm).op = EOpNegative; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002680
John Bauman66b8ab22014-05-06 15:57:45 -04002681 break;
2682
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002683 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002684
Alexis Hetu253fdd12015-07-07 15:12:46 -04002685 { (yyval.interm).op = EOpLogicalNot; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002686
John Bauman66b8ab22014-05-06 15:57:45 -04002687 break;
2688
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002689 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002690
Alexis Hetu17809052015-05-13 11:28:22 -04002691 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002692 ES3_ONLY("~", (yylsp[0]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002693 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002694 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002695
John Bauman66b8ab22014-05-06 15:57:45 -04002696 break;
2697
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002698 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002699
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002700 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2701
Alexis Hetu17809052015-05-13 11:28:22 -04002702 break;
2703
2704 case 38:
2705
John Bauman66b8ab22014-05-06 15:57:45 -04002706 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002707 FRAG_VERT_ONLY("*", (yylsp[-1]));
2708 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002709 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002710
John Bauman66b8ab22014-05-06 15:57:45 -04002711 break;
2712
Alexis Hetu17809052015-05-13 11:28:22 -04002713 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002714
2715 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002716 FRAG_VERT_ONLY("/", (yylsp[-1]));
2717 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002718 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002719
John Bauman66b8ab22014-05-06 15:57:45 -04002720 break;
2721
Alexis Hetu17809052015-05-13 11:28:22 -04002722 case 40:
2723
2724 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002725 FRAG_VERT_ONLY("%", (yylsp[-1]));
2726 ES3_ONLY("%", (yylsp[-1]), "integer modulus operator");
2727 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002728 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002729
Alexis Hetu17809052015-05-13 11:28:22 -04002730 break;
2731
2732 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002733
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002734 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2735
John Bauman66b8ab22014-05-06 15:57:45 -04002736 break;
2737
Alexis Hetu17809052015-05-13 11:28:22 -04002738 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002739
2740 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002741 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002742 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002743
John Bauman66b8ab22014-05-06 15:57:45 -04002744 break;
2745
Alexis Hetu17809052015-05-13 11:28:22 -04002746 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002747
2748 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002749 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002750 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002751
John Bauman66b8ab22014-05-06 15:57:45 -04002752 break;
2753
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002754 case 44:
2755
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002756 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2757
Alexis Hetu17809052015-05-13 11:28:22 -04002758 break;
2759
2760 case 45:
2761
2762 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002763 ES3_ONLY("<<", (yylsp[-1]), "bit-wise operator");
2764 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002765 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002766
Alexis Hetu17809052015-05-13 11:28:22 -04002767 break;
2768
2769 case 46:
2770
2771 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002772 ES3_ONLY(">>", (yylsp[-1]), "bit-wise operator");
2773 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002774 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002775
Alexis Hetu17809052015-05-13 11:28:22 -04002776 break;
2777
2778 case 47:
2779
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002780 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2781
Alexis Hetu17809052015-05-13 11:28:22 -04002782 break;
2783
2784 case 48:
2785
John Bauman66b8ab22014-05-06 15:57:45 -04002786 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002787 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002788 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002789
John Bauman66b8ab22014-05-06 15:57:45 -04002790 break;
2791
Alexis Hetu17809052015-05-13 11:28:22 -04002792 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002793
2794 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002795 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002796 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002797
John Bauman66b8ab22014-05-06 15:57:45 -04002798 break;
2799
Alexis Hetu17809052015-05-13 11:28:22 -04002800 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002801
2802 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002803 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002804 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002805
John Bauman66b8ab22014-05-06 15:57:45 -04002806 break;
2807
Alexis Hetu17809052015-05-13 11:28:22 -04002808 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002809
2810 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002811 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002812 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002813
John Bauman66b8ab22014-05-06 15:57:45 -04002814 break;
2815
Alexis Hetu17809052015-05-13 11:28:22 -04002816 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002817
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002818 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2819
John Bauman66b8ab22014-05-06 15:57:45 -04002820 break;
2821
Alexis Hetu17809052015-05-13 11:28:22 -04002822 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002823
2824 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002825 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002826 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002827
John Bauman66b8ab22014-05-06 15:57:45 -04002828 break;
2829
Alexis Hetu17809052015-05-13 11:28:22 -04002830 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002831
2832 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002833 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002834 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002835
John Bauman66b8ab22014-05-06 15:57:45 -04002836 break;
2837
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002838 case 55:
2839
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002840 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2841
Alexis Hetu17809052015-05-13 11:28:22 -04002842 break;
2843
2844 case 56:
2845
2846 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002847 ES3_ONLY("&", (yylsp[-1]), "bit-wise operator");
2848 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002849 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002850
Alexis Hetu17809052015-05-13 11:28:22 -04002851 break;
2852
2853 case 57:
2854
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002855 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2856
Alexis Hetu17809052015-05-13 11:28:22 -04002857 break;
2858
2859 case 58:
2860
2861 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002862 ES3_ONLY("^", (yylsp[-1]), "bit-wise operator");
2863 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002864 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002865
Alexis Hetu17809052015-05-13 11:28:22 -04002866 break;
2867
2868 case 59:
2869
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002870 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2871
Alexis Hetu17809052015-05-13 11:28:22 -04002872 break;
2873
2874 case 60:
2875
2876 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002877 ES3_ONLY("|", (yylsp[-1]), "bit-wise operator");
2878 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002879 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002880
Alexis Hetu17809052015-05-13 11:28:22 -04002881 break;
2882
2883 case 61:
2884
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002885 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2886
Alexis Hetu17809052015-05-13 11:28:22 -04002887 break;
2888
2889 case 62:
2890
John Bauman66b8ab22014-05-06 15:57:45 -04002891 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002892 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002893 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002894
John Bauman66b8ab22014-05-06 15:57:45 -04002895 break;
2896
Alexis Hetu17809052015-05-13 11:28:22 -04002897 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002898
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002899 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2900
John Bauman66b8ab22014-05-06 15:57:45 -04002901 break;
2902
Alexis Hetu17809052015-05-13 11:28:22 -04002903 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002904
2905 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002906 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002907 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002908
John Bauman66b8ab22014-05-06 15:57:45 -04002909 break;
2910
Alexis Hetu17809052015-05-13 11:28:22 -04002911 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04002912
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002913 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2914
John Bauman66b8ab22014-05-06 15:57:45 -04002915 break;
2916
Alexis Hetu17809052015-05-13 11:28:22 -04002917 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04002918
2919 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002920 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002921 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002922
John Bauman66b8ab22014-05-06 15:57:45 -04002923 break;
2924
Alexis Hetu17809052015-05-13 11:28:22 -04002925 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04002926
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002927 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2928
John Bauman66b8ab22014-05-06 15:57:45 -04002929 break;
2930
Alexis Hetu17809052015-05-13 11:28:22 -04002931 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04002932
2933 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002934 (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 -04002935 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002936
John Bauman66b8ab22014-05-06 15:57:45 -04002937 break;
2938
Alexis Hetu17809052015-05-13 11:28:22 -04002939 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04002940
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002941 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2942
John Bauman66b8ab22014-05-06 15:57:45 -04002943 break;
2944
Alexis Hetu17809052015-05-13 11:28:22 -04002945 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04002946
2947 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002948 if (context->lValueErrorCheck((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002949 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002950 (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 -04002951 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002952
John Bauman66b8ab22014-05-06 15:57:45 -04002953 break;
2954
Alexis Hetu17809052015-05-13 11:28:22 -04002955 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04002956
Alexis Hetu253fdd12015-07-07 15:12:46 -04002957 { (yyval.interm).op = EOpAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002958
John Bauman66b8ab22014-05-06 15:57:45 -04002959 break;
2960
Alexis Hetu17809052015-05-13 11:28:22 -04002961 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04002962
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002963 { FRAG_VERT_ONLY("*=", (yylsp[0])); (yyval.interm).op = EOpMulAssign; }
2964
John Bauman66b8ab22014-05-06 15:57:45 -04002965 break;
2966
Alexis Hetu17809052015-05-13 11:28:22 -04002967 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04002968
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002969 { FRAG_VERT_ONLY("/=", (yylsp[0])); (yyval.interm).op = EOpDivAssign; }
2970
John Bauman66b8ab22014-05-06 15:57:45 -04002971 break;
2972
Alexis Hetu17809052015-05-13 11:28:22 -04002973 case 74:
2974
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002975 { ES3_ONLY("%=", (yylsp[0]), "integer modulus operator");
2976 FRAG_VERT_ONLY("%=", (yylsp[0])); (yyval.interm).op = EOpIModAssign; }
2977
Alexis Hetu17809052015-05-13 11:28:22 -04002978 break;
2979
2980 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04002981
Alexis Hetu253fdd12015-07-07 15:12:46 -04002982 { (yyval.interm).op = EOpAddAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002983
John Bauman66b8ab22014-05-06 15:57:45 -04002984 break;
2985
Alexis Hetu17809052015-05-13 11:28:22 -04002986 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04002987
Alexis Hetu253fdd12015-07-07 15:12:46 -04002988 { (yyval.interm).op = EOpSubAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002989
John Bauman66b8ab22014-05-06 15:57:45 -04002990 break;
2991
Alexis Hetu17809052015-05-13 11:28:22 -04002992 case 77:
2993
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002994 { ES3_ONLY("<<=", (yylsp[0]), "bit-wise operator");
2995 FRAG_VERT_ONLY("<<=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002996 (yyval.interm).op = EOpBitShiftLeftAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002997
Alexis Hetu17809052015-05-13 11:28:22 -04002998 break;
2999
3000 case 78:
3001
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003002 { ES3_ONLY(">>=", (yylsp[0]), "bit-wise operator");
3003 FRAG_VERT_ONLY(">>=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003004 (yyval.interm).op = EOpBitShiftRightAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003005
Alexis Hetu17809052015-05-13 11:28:22 -04003006 break;
3007
3008 case 79:
3009
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003010 { ES3_ONLY("&=", (yylsp[0]), "bit-wise operator");
3011 FRAG_VERT_ONLY("&=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003012 (yyval.interm).op = EOpBitwiseAndAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003013
Alexis Hetu17809052015-05-13 11:28:22 -04003014 break;
3015
3016 case 80:
3017
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003018 { ES3_ONLY("^=", (yylsp[0]), "bit-wise operator");
3019 FRAG_VERT_ONLY("^=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003020 (yyval.interm).op = EOpBitwiseXorAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003021
Alexis Hetu17809052015-05-13 11:28:22 -04003022 break;
3023
3024 case 81:
3025
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003026 { ES3_ONLY("|=", (yylsp[0]), "bit-wise operator");
3027 FRAG_VERT_ONLY("|=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003028 (yyval.interm).op = EOpBitwiseOrAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003029
Alexis Hetu17809052015-05-13 11:28:22 -04003030 break;
3031
3032 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003033
3034 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003035 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003036 }
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 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003041
3042 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003043 (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003044 if ((yyval.interm.intermTypedNode) == 0) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003045 context->binaryOpError((yylsp[-1]), ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003046 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003047 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003048 }
3049 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003050
John Bauman66b8ab22014-05-06 15:57:45 -04003051 break;
3052
Alexis Hetu17809052015-05-13 11:28:22 -04003053 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003054
3055 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003056 if (context->constErrorCheck((yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003057 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003058 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003059 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003060
John Bauman66b8ab22014-05-06 15:57:45 -04003061 break;
3062
Alexis Hetu17809052015-05-13 11:28:22 -04003063 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003064
3065 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003066 if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003067 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003068 (yyval.lex) = (yyvsp[-1].lex);
Alexis Hetua35d8232015-06-11 17:11:06 -04003069 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003070
Alexis Hetua35d8232015-06-11 17:11:06 -04003071 break;
3072
3073 case 86:
3074
3075 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003076 (yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration(*((yyvsp[-1].interm).function), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003077 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003078
John Bauman66b8ab22014-05-06 15:57:45 -04003079 break;
3080
Alexis Hetua35d8232015-06-11 17:11:06 -04003081 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003082
3083 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003084 TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate;
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003085 if (aggNode && aggNode->getOp() == EOpNull)
3086 aggNode->setOp(EOpDeclaration);
3087 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003088 }
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 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003093
3094 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003095 if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) {
3096 context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type));
John Baumand4ae8632014-05-06 16:18:33 -04003097 context->recover();
3098 }
John Bauman66b8ab22014-05-06 15:57:45 -04003099 (yyval.interm.intermNode) = 0;
3100 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003101
John Bauman66b8ab22014-05-06 15:57:45 -04003102 break;
3103
Alexis Hetua35d8232015-06-11 17:11:06 -04003104 case 89:
3105
3106 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003107 ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks");
3108 (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 -04003109 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003110
Alexis Hetua35d8232015-06-11 17:11:06 -04003111 break;
3112
3113 case 90:
3114
3115 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003116 ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks");
3117 (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 -04003118 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003119
Alexis Hetua35d8232015-06-11 17:11:06 -04003120 break;
3121
3122 case 91:
3123
3124 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003125 ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks");
3126 (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 -04003127 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003128
Alexis Hetua35d8232015-06-11 17:11:06 -04003129 break;
3130
3131 case 92:
3132
3133 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003134 context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type));
Alexis Hetua35d8232015-06-11 17:11:06 -04003135 (yyval.interm.intermNode) = 0;
3136 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003137
Alexis Hetua35d8232015-06-11 17:11:06 -04003138 break;
3139
3140 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003141
3142 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003143 (yyval.interm).function = context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function));
John Bauman66b8ab22014-05-06 15:57:45 -04003144 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003145
John Bauman66b8ab22014-05-06 15:57:45 -04003146 break;
3147
Alexis Hetua35d8232015-06-11 17:11:06 -04003148 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003149
3150 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003151 (yyval.interm.function) = (yyvsp[0].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003152 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003153
John Bauman66b8ab22014-05-06 15:57:45 -04003154 break;
3155
Alexis Hetua35d8232015-06-11 17:11:06 -04003156 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003157
3158 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003159 (yyval.interm.function) = (yyvsp[0].interm.function);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003160 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003161
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003162 break;
3163
Alexis Hetua35d8232015-06-11 17:11:06 -04003164 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003165
3166 {
John Bauman66b8ab22014-05-06 15:57:45 -04003167 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003168 (yyval.interm.function) = (yyvsp[-1].interm.function);
3169 if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
3170 (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003171 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003172 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003173 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003174
John Bauman66b8ab22014-05-06 15:57:45 -04003175 break;
3176
Alexis Hetua35d8232015-06-11 17:11:06 -04003177 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003178
3179 {
3180 //
3181 // Only first parameter of one-parameter functions can be void
3182 // The check for named parameters not being void is done in parameter_declarator
3183 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003184 if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
John Bauman66b8ab22014-05-06 15:57:45 -04003185 //
3186 // This parameter > first is void
3187 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003188 context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003189 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003190 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003191 } else {
3192 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003193 (yyval.interm.function) = (yyvsp[-2].interm.function);
3194 (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003195 }
3196 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003197
John Bauman66b8ab22014-05-06 15:57:45 -04003198 break;
3199
Alexis Hetua35d8232015-06-11 17:11:06 -04003200 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003201
3202 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003203 if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) {
3204 context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier));
John Bauman66b8ab22014-05-06 15:57:45 -04003205 context->recover();
3206 }
Alexis Hetu407813b2016-02-24 16:46:13 -05003207 if (!(yyvsp[-2].interm.type).layoutQualifier.isEmpty())
3208 {
3209 context->error((yylsp[-1]), "no qualifiers allowed for function return", "layout");
3210 context->recover();
3211 }
John Bauman66b8ab22014-05-06 15:57:45 -04003212 // make sure a sampler is not involved as well...
Alexis Hetu407813b2016-02-24 16:46:13 -05003213 if (context->samplerErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type), "samplers can't be function return values"))
John Bauman66b8ab22014-05-06 15:57:45 -04003214 context->recover();
3215
3216 // Add the function as a prototype after parsing it (we do not support recursion)
3217 TFunction *function;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003218 TType type((yyvsp[-2].interm.type));
3219 function = new TFunction((yyvsp[-1].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04003220 (yyval.interm.function) = function;
Alexis Hetue97a31e2016-11-14 14:10:47 -05003221
John Bauman66b8ab22014-05-06 15:57:45 -04003222 context->symbolTable.push();
3223 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003224
John Bauman66b8ab22014-05-06 15:57:45 -04003225 break;
3226
Alexis Hetua35d8232015-06-11 17:11:06 -04003227 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003228
3229 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003230 if ((yyvsp[-1].interm.type).type == EbtVoid) {
3231 context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003232 context->recover();
3233 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003234 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003235 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003236 TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003237 (yyval.interm).param = param;
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 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003243
3244 {
3245 // Check that we can make an array out of this type
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003246 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003247 context->recover();
3248
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003249 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003250 context->recover();
3251
Nicolas Capens858c0392018-04-09 11:53:41 -04003252 int size = 0;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003253 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003254 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003255 (yyvsp[-4].interm.type).setArray(true, size);
John Bauman66b8ab22014-05-06 15:57:45 -04003256
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003257 TType* type = new TType((yyvsp[-4].interm.type));
3258 TParameter param = { (yyvsp[-3].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003259 (yyval.interm).param = param;
3260 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003261
John Bauman66b8ab22014-05-06 15:57:45 -04003262 break;
3263
Alexis Hetu17809052015-05-13 11:28:22 -04003264 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003265
3266 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003267 (yyval.interm) = (yyvsp[0].interm);
3268 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003269 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003270 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003271
John Bauman66b8ab22014-05-06 15:57:45 -04003272 break;
3273
Alexis Hetu17809052015-05-13 11:28:22 -04003274 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003275
3276 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003277 (yyval.interm) = (yyvsp[0].interm);
3278 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003279 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003280 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003281 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003282 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003283
John Bauman66b8ab22014-05-06 15:57:45 -04003284 break;
3285
Alexis Hetu17809052015-05-13 11:28:22 -04003286 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003287
3288 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003289 (yyval.interm) = (yyvsp[0].interm);
3290 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003291 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003292 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003293
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003294 break;
3295
Alexis Hetu17809052015-05-13 11:28:22 -04003296 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003297
3298 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003299 (yyval.interm) = (yyvsp[0].interm);
3300 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003301 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003302 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003303 context->recover();
3304 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003305
Alexis Hetua35d8232015-06-11 17:11:06 -04003306 break;
3307
3308 case 105:
3309
3310 {
3311 (yyval.interm.qualifier) = EvqIn;
3312 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003313
Alexis Hetua35d8232015-06-11 17:11:06 -04003314 break;
3315
3316 case 106:
3317
3318 {
3319 (yyval.interm.qualifier) = EvqIn;
3320 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003321
Alexis Hetua35d8232015-06-11 17:11:06 -04003322 break;
3323
3324 case 107:
3325
3326 {
3327 (yyval.interm.qualifier) = EvqOut;
3328 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003329
Alexis Hetua35d8232015-06-11 17:11:06 -04003330 break;
3331
3332 case 108:
3333
3334 {
3335 (yyval.interm.qualifier) = EvqInOut;
3336 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003337
Alexis Hetua35d8232015-06-11 17:11:06 -04003338 break;
3339
3340 case 109:
3341
3342 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003343 TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
John Bauman66b8ab22014-05-06 15:57:45 -04003344 (yyval.interm).param = param;
3345 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003346
John Bauman66b8ab22014-05-06 15:57:45 -04003347 break;
3348
Alexis Hetua35d8232015-06-11 17:11:06 -04003349 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003350
3351 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003352 (yyval.interm) = (yyvsp[0].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04003353 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003354
John Bauman66b8ab22014-05-06 15:57:45 -04003355 break;
3356
Alexis Hetua35d8232015-06-11 17:11:06 -04003357 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003358
3359 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003360 (yyval.interm) = (yyvsp[-2].interm);
3361 (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 -04003362 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003363
John Bauman66b8ab22014-05-06 15:57:45 -04003364 break;
3365
Alexis Hetua35d8232015-06-11 17:11:06 -04003366 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003367
3368 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003369 (yyval.interm) = (yyvsp[-5].interm);
3370 (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 -04003371 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003372
John Bauman66b8ab22014-05-06 15:57:45 -04003373 break;
3374
Alexis Hetua35d8232015-06-11 17:11:06 -04003375 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003376
3377 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003378 ES3_ONLY("[]", (yylsp[-4]), "implicitly sized array");
3379 (yyval.interm) = (yyvsp[-6].interm);
3380 (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 -04003381 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003382
John Bauman66b8ab22014-05-06 15:57:45 -04003383 break;
3384
Alexis Hetua35d8232015-06-11 17:11:06 -04003385 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003386
3387 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003388 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3389 (yyval.interm) = (yyvsp[-7].interm);
3390 (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 -04003391 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003392
John Bauman66b8ab22014-05-06 15:57:45 -04003393 break;
3394
Alexis Hetua35d8232015-06-11 17:11:06 -04003395 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003396
3397 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003398 (yyval.interm) = (yyvsp[-4].interm);
3399 (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 -04003400 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003401
John Bauman66b8ab22014-05-06 15:57:45 -04003402 break;
3403
Alexis Hetua35d8232015-06-11 17:11:06 -04003404 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003405
3406 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003407 (yyval.interm).type = (yyvsp[0].interm.type);
3408 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003409 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003410
John Bauman66b8ab22014-05-06 15:57:45 -04003411 break;
3412
Alexis Hetua35d8232015-06-11 17:11:06 -04003413 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003414
3415 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003416 (yyval.interm).type = (yyvsp[-1].interm.type);
3417 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string);
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 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003423
3424 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003425 (yyval.interm).type = (yyvsp[-4].interm.type);
3426 (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 -04003427 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003428
John Bauman66b8ab22014-05-06 15:57:45 -04003429 break;
3430
Alexis Hetua35d8232015-06-11 17:11:06 -04003431 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003432
3433 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003434 ES3_ONLY("[]", (yylsp[-3]), "implicitly sized array");
3435 (yyval.interm).type = (yyvsp[-5].interm.type);
3436 (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 -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 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003442
3443 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003444 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3445 (yyval.interm).type = (yyvsp[-6].interm.type);
3446 (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 -04003447 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003448
John Bauman66b8ab22014-05-06 15:57:45 -04003449 break;
3450
Alexis Hetua35d8232015-06-11 17:11:06 -04003451 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003452
3453 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003454 (yyval.interm).type = (yyvsp[-3].interm.type);
3455 (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 -04003456 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003457
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003458 break;
3459
Alexis Hetua35d8232015-06-11 17:11:06 -04003460 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003461
3462 {
3463 // $$.type is not used in invariant declarations.
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003464 (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003465 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003466
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003467 break;
3468
Alexis Hetua35d8232015-06-11 17:11:06 -04003469 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003470
3471 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003472 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003473
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003474 if ((yyvsp[0].interm.type).array) {
3475 ES3_ONLY("[]", (yylsp[0]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003476 if (context->getShaderVersion() != 300) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003477 (yyvsp[0].interm.type).clearArrayness();
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003478 }
John Bauman66b8ab22014-05-06 15:57:45 -04003479 }
3480 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003481
John Bauman66b8ab22014-05-06 15:57:45 -04003482 break;
3483
Alexis Hetua35d8232015-06-11 17:11:06 -04003484 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003485
3486 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003487 (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 -04003488 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003489
John Bauman66b8ab22014-05-06 15:57:45 -04003490 break;
3491
Alexis Hetua35d8232015-06-11 17:11:06 -04003492 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003493
3494 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003495 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003496 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003497
John Bauman66b8ab22014-05-06 15:57:45 -04003498 break;
3499
Alexis Hetua35d8232015-06-11 17:11:06 -04003500 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003501
3502 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003503 (yyval.interm.type).qualifier = EvqFlat;
3504 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003505
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003506 break;
3507
Alexis Hetua35d8232015-06-11 17:11:06 -04003508 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003509
3510 {
3511 (yyval.interm.qualifier) = EvqConstReadOnly;
3512 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003513
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003514 break;
3515
Alexis Hetua35d8232015-06-11 17:11:06 -04003516 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003517
3518 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003519 VERTEX_ONLY("attribute", (yylsp[0]));
3520 ES2_ONLY("attribute", (yylsp[0]));
3521 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003522 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003523 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003524 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003525
John Bauman66b8ab22014-05-06 15:57:45 -04003526 break;
3527
Alexis Hetua35d8232015-06-11 17:11:06 -04003528 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003529
3530 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003531 ES2_ONLY("varying", (yylsp[0]));
3532 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003533 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003534 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003535 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003536 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003537 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003538 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003539
John Bauman66b8ab22014-05-06 15:57:45 -04003540 break;
3541
Alexis Hetua35d8232015-06-11 17:11:06 -04003542 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003543
3544 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003545 ES2_ONLY("varying", (yylsp[-1]));
3546 if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003547 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003548 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003549 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003550 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003551 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003552 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003553
John Bauman66b8ab22014-05-06 15:57:45 -04003554 break;
3555
Alexis Hetua35d8232015-06-11 17:11:06 -04003556 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003557
3558 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003559 if ((yyvsp[0].interm.type).qualifier != EvqConstExpr && !context->symbolTable.atGlobalLevel())
3560 {
3561 context->error((yylsp[0]), "Local variables can only use the const storage qualifier.", getQualifierString((yyvsp[0].interm.type).qualifier));
3562 context->recover();
3563 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003564 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003565 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003566
John Bauman66b8ab22014-05-06 15:57:45 -04003567 break;
3568
Alexis Hetua35d8232015-06-11 17:11:06 -04003569 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003570
3571 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003572 (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 -04003573 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003574
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003575 break;
3576
Alexis Hetua35d8232015-06-11 17:11:06 -04003577 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003578
3579 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003580 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 -04003581 context->recover();
Alexis Hetue97a31e2016-11-14 14:10:47 -05003582
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003583 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003584 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003585 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003586
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003587 break;
3588
Alexis Hetua35d8232015-06-11 17:11:06 -04003589 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003590
3591 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003592 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003593 (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003594 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003595
Nicolas Capens7d626792015-02-17 17:58:31 -05003596 break;
3597
Alexis Hetua35d8232015-06-11 17:11:06 -04003598 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003599
3600 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003601 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
3602 (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003603 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003604
Nicolas Capens7d626792015-02-17 17:58:31 -05003605 break;
3606
Alexis Hetua35d8232015-06-11 17:11:06 -04003607 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003608
3609 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003610 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-1]));
3611 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003612 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003613 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003614
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003615 break;
3616
Alexis Hetua35d8232015-06-11 17:11:06 -04003617 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003618
3619 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003620 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-2]));
3621 (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 -04003622 (yyval.interm.type).invariant = true;
3623 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003624
Alexis Hetuad527752015-07-07 13:31:44 -04003625 break;
3626
3627 case 138:
3628
3629 {
3630 (yyval.interm.type).qualifier = EvqConstExpr;
3631 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003632
Alexis Hetuad527752015-07-07 13:31:44 -04003633 break;
3634
3635 case 139:
3636
3637 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003638 ES3_ONLY("in", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003639 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003640 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003641
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003642 break;
3643
Alexis Hetuad527752015-07-07 13:31:44 -04003644 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003645
3646 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003647 ES3_ONLY("out", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003648 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003649 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003650
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003651 break;
3652
Alexis Hetuad527752015-07-07 13:31:44 -04003653 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003654
3655 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003656 ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003657 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003658 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003659 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 -04003660 context->recover();
3661 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003662 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003663 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003664
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003665 break;
3666
Alexis Hetuad527752015-07-07 13:31:44 -04003667 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003668
3669 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003670 ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003671 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003672 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003673 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 -04003674 context->recover();
3675 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003676 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003677 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003678
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003679 break;
3680
Alexis Hetuad527752015-07-07 13:31:44 -04003681 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003682
3683 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003684 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003685 context->recover();
3686 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003687 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003688
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003689 break;
3690
Alexis Hetuad527752015-07-07 13:31:44 -04003691 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003692
3693 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003694 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003695
3696 if ((yyval.interm.type).precision == EbpUndefined) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003697 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type);
3698 if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003699 context->recover();
3700 }
3701 }
3702 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003703
John Bauman66b8ab22014-05-06 15:57:45 -04003704 break;
3705
Alexis Hetuad527752015-07-07 13:31:44 -04003706 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003707
3708 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003709 (yyval.interm.type) = (yyvsp[0].interm.type);
3710 (yyval.interm.type).precision = (yyvsp[-1].interm.precision);
Alexis Hetu407813b2016-02-24 16:46:13 -05003711
3712 if (!SupportsPrecision((yyvsp[0].interm.type).type)) {
3713 context->error((yylsp[-1]), "illegal type for precision qualifier", getBasicString((yyvsp[0].interm.type).type));
3714 context->recover();
3715 }
John Bauman66b8ab22014-05-06 15:57:45 -04003716 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003717
John Bauman66b8ab22014-05-06 15:57:45 -04003718 break;
3719
Alexis Hetuad527752015-07-07 13:31:44 -04003720 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003721
3722 {
3723 (yyval.interm.precision) = EbpHigh;
3724 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003725
John Bauman66b8ab22014-05-06 15:57:45 -04003726 break;
3727
Alexis Hetuad527752015-07-07 13:31:44 -04003728 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003729
3730 {
3731 (yyval.interm.precision) = EbpMedium;
3732 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003733
John Bauman66b8ab22014-05-06 15:57:45 -04003734 break;
3735
Alexis Hetuad527752015-07-07 13:31:44 -04003736 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003737
3738 {
3739 (yyval.interm.precision) = EbpLow;
3740 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003741
John Bauman66b8ab22014-05-06 15:57:45 -04003742 break;
3743
Alexis Hetuad527752015-07-07 13:31:44 -04003744 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003745
3746 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003747 ES3_ONLY("layout", (yylsp[-3]), "qualifier");
3748 (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003749 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003750
Nicolas Capens7d626792015-02-17 17:58:31 -05003751 break;
3752
Alexis Hetuad527752015-07-07 13:31:44 -04003753 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003754
3755 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003756 (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003757 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003758
Nicolas Capens7d626792015-02-17 17:58:31 -05003759 break;
3760
Alexis Hetuad527752015-07-07 13:31:44 -04003761 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003762
3763 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003764 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier));
Nicolas Capens7d626792015-02-17 17:58:31 -05003765 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003766
Nicolas Capens7d626792015-02-17 17:58:31 -05003767 break;
3768
Alexis Hetuad527752015-07-07 13:31:44 -04003769 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003770
3771 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003772 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003773 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003774
Nicolas Capens7d626792015-02-17 17:58:31 -05003775 break;
3776
Alexis Hetua35d8232015-06-11 17:11:06 -04003777 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003778
3779 {
Nicolas Capensd2b1d2f2019-03-07 15:07:08 -05003780 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003781 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003782
Alexis Hetuad527752015-07-07 13:31:44 -04003783 break;
3784
3785 case 154:
3786
3787 {
Nicolas Capensd2b1d2f2019-03-07 15:07:08 -05003788 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003789 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003790
Alexis Hetuad527752015-07-07 13:31:44 -04003791 break;
3792
3793 case 155:
3794
3795 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003796 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003797 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003798
John Bauman66b8ab22014-05-06 15:57:45 -04003799 break;
3800
Alexis Hetuad527752015-07-07 13:31:44 -04003801 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003802
3803 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003804 ES3_ONLY("[]", (yylsp[-1]), "implicitly sized array");
3805 (yyval.interm.type) = (yyvsp[-2].interm.type);
Alexis Hetue5246692015-06-18 12:34:52 -04003806 (yyval.interm.type).setArray(true, 0);
3807 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003808
Alexis Hetue5246692015-06-18 12:34:52 -04003809 break;
3810
Alexis Hetuad527752015-07-07 13:31:44 -04003811 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003812
3813 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003814 (yyval.interm.type) = (yyvsp[-3].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003815
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003816 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003817 context->recover();
3818 else {
Nicolas Capens858c0392018-04-09 11:53:41 -04003819 int size = 0;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003820 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003821 context->recover();
3822 (yyval.interm.type).setArray(true, size);
3823 }
3824 }
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 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003829
3830 {
3831 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003832 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003833 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003834
Alexis Hetu17809052015-05-13 11:28:22 -04003835 break;
3836
Alexis Hetu17809052015-05-13 11:28:22 -04003837 case 159:
3838
3839 {
3840 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003841 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003842 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003843
Alexis Hetu17809052015-05-13 11:28:22 -04003844 break;
3845
3846 case 160:
3847
3848 {
3849 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003850 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003851 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003852
Alexis Hetua35d8232015-06-11 17:11:06 -04003853 break;
3854
3855 case 161:
3856
3857 {
3858 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003859 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003860 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003861
Alexis Hetua35d8232015-06-11 17:11:06 -04003862 break;
3863
3864 case 162:
3865
3866 {
3867 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003868 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003869 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003870
Alexis Hetua35d8232015-06-11 17:11:06 -04003871 break;
3872
3873 case 163:
3874
3875 {
3876 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003877 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003878 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003879 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003880
Alexis Hetua35d8232015-06-11 17:11:06 -04003881 break;
3882
3883 case 164:
3884
3885 {
3886 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003887 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003888 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003889 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003890
Alexis Hetua35d8232015-06-11 17:11:06 -04003891 break;
3892
3893 case 165:
3894
3895 {
3896 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003897 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003898 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003899 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003900
Alexis Hetu17809052015-05-13 11:28:22 -04003901 break;
3902
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003903 case 166:
3904
3905 {
3906 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003907 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003908 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003909 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003910
Alexis Hetua35d8232015-06-11 17:11:06 -04003911 break;
3912
3913 case 167:
3914
3915 {
3916 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003917 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003918 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003919 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003920
Alexis Hetua35d8232015-06-11 17:11:06 -04003921 break;
3922
3923 case 168:
3924
3925 {
3926 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003927 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003928 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003929 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003930
Alexis Hetua35d8232015-06-11 17:11:06 -04003931 break;
3932
3933 case 169:
3934
3935 {
3936 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003937 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003938 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003939 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003940
Alexis Hetua35d8232015-06-11 17:11:06 -04003941 break;
3942
3943 case 170:
3944
3945 {
3946 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003947 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003948 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003949 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003950
Alexis Hetua35d8232015-06-11 17:11:06 -04003951 break;
3952
3953 case 171:
3954
3955 {
3956 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003957 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003958 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003959 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003960
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003961 break;
3962
Alexis Hetua35d8232015-06-11 17:11:06 -04003963 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003964
3965 {
Alexis Hetue5246692015-06-18 12:34:52 -04003966 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003967 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003968 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04003969 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003970
Alexis Hetue5246692015-06-18 12:34:52 -04003971 break;
3972
3973 case 173:
3974
3975 {
Alexis Hetuad527752015-07-07 13:31:44 -04003976 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003977 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003978 (yyval.interm.type).setAggregate(3);
3979 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003980
Alexis Hetuad527752015-07-07 13:31:44 -04003981 break;
3982
3983 case 174:
3984
3985 {
3986 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003987 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003988 (yyval.interm.type).setAggregate(4);
3989 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003990
Alexis Hetuad527752015-07-07 13:31:44 -04003991 break;
3992
3993 case 175:
3994
3995 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003996 FRAG_VERT_ONLY("mat2", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003997 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003998 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04003999 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004000 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004001
John Bauman66b8ab22014-05-06 15:57:45 -04004002 break;
4003
Alexis Hetuad527752015-07-07 13:31:44 -04004004 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004005
4006 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004007 FRAG_VERT_ONLY("mat3", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004008 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004009 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004010 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004011 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004012
John Bauman66b8ab22014-05-06 15:57:45 -04004013 break;
4014
Alexis Hetuad527752015-07-07 13:31:44 -04004015 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004016
4017 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004018 FRAG_VERT_ONLY("mat4", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004019 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004020 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004021 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004022 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004023
John Bauman66b8ab22014-05-06 15:57:45 -04004024 break;
4025
Alexis Hetuad527752015-07-07 13:31:44 -04004026 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004027
4028 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004029 FRAG_VERT_ONLY("mat2x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004030 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004031 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004032 (yyval.interm.type).setMatrix(2, 3);
4033 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004034
Alexis Hetub14178b2015-04-13 13:23:20 -04004035 break;
4036
Alexis Hetuad527752015-07-07 13:31:44 -04004037 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004038
4039 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004040 FRAG_VERT_ONLY("mat3x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004041 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004042 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004043 (yyval.interm.type).setMatrix(3, 2);
4044 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004045
Alexis Hetub14178b2015-04-13 13:23:20 -04004046 break;
4047
Alexis Hetuad527752015-07-07 13:31:44 -04004048 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004049
4050 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004051 FRAG_VERT_ONLY("mat2x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004052 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004053 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004054 (yyval.interm.type).setMatrix(2, 4);
4055 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004056
Alexis Hetub14178b2015-04-13 13:23:20 -04004057 break;
4058
Alexis Hetuad527752015-07-07 13:31:44 -04004059 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004060
4061 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004062 FRAG_VERT_ONLY("mat4x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004063 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004064 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004065 (yyval.interm.type).setMatrix(4, 2);
4066 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004067
Alexis Hetub14178b2015-04-13 13:23:20 -04004068 break;
4069
Alexis Hetuad527752015-07-07 13:31:44 -04004070 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004071
4072 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004073 FRAG_VERT_ONLY("mat3x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004074 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004075 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004076 (yyval.interm.type).setMatrix(3, 4);
4077 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004078
Alexis Hetub14178b2015-04-13 13:23:20 -04004079 break;
4080
Alexis Hetuad527752015-07-07 13:31:44 -04004081 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004082
4083 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004084 FRAG_VERT_ONLY("mat4x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004085 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004086 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004087 (yyval.interm.type).setMatrix(4, 3);
4088 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004089
Alexis Hetub14178b2015-04-13 13:23:20 -04004090 break;
4091
Alexis Hetuad527752015-07-07 13:31:44 -04004092 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004093
4094 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004095 FRAG_VERT_ONLY("sampler2D", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004096 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004097 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004098 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004099
John Bauman66b8ab22014-05-06 15:57:45 -04004100 break;
4101
Alexis Hetuad527752015-07-07 13:31:44 -04004102 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004103
4104 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004105 FRAG_VERT_ONLY("samplerCube", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004106 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004107 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004108 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004109
John Bauman66b8ab22014-05-06 15:57:45 -04004110 break;
4111
Alexis Hetuad527752015-07-07 13:31:44 -04004112 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004113
4114 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004115 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004116 context->error((yylsp[0]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004117 context->recover();
4118 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004119 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004120 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004121 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004122 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004123
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004124 break;
4125
Alexis Hetuad527752015-07-07 13:31:44 -04004126 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004127
4128 {
Alexis Hetu46768622018-01-16 22:09:28 -05004129 if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
4130 context->error((yylsp[0]), "unsupported type", "sampler2DRect", "");
4131 context->recover();
4132 }
4133 FRAG_VERT_ONLY("sampler2DRect", (yylsp[0]));
4134 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4135 (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yylsp[0]));
4136 }
4137
4138 break;
4139
4140 case 188:
4141
4142 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004143 FRAG_VERT_ONLY("sampler3D", (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004144 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004145 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004146 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004147
Alexis Hetub027aa92015-01-19 15:56:12 -05004148 break;
4149
Alexis Hetu46768622018-01-16 22:09:28 -05004150 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004151
4152 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004153 FRAG_VERT_ONLY("sampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004154 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004155 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004156 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004157
Alexis Hetub14178b2015-04-13 13:23:20 -04004158 break;
4159
Alexis Hetu46768622018-01-16 22:09:28 -05004160 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004161
4162 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004163 FRAG_VERT_ONLY("isampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004164 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004165 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004166 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004167
Alexis Hetub14178b2015-04-13 13:23:20 -04004168 break;
4169
Alexis Hetu46768622018-01-16 22:09:28 -05004170 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004171
4172 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004173 FRAG_VERT_ONLY("isampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004174 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004175 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004176 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004177
Alexis Hetub14178b2015-04-13 13:23:20 -04004178 break;
4179
Alexis Hetu46768622018-01-16 22:09:28 -05004180 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004181
4182 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004183 FRAG_VERT_ONLY("isamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004184 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004185 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004186 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004187
Alexis Hetub14178b2015-04-13 13:23:20 -04004188 break;
4189
Alexis Hetu46768622018-01-16 22:09:28 -05004190 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004191
4192 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004193 FRAG_VERT_ONLY("isampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004194 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004195 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004196 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004197
Alexis Hetub14178b2015-04-13 13:23:20 -04004198 break;
4199
Alexis Hetu46768622018-01-16 22:09:28 -05004200 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004201
4202 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004203 FRAG_VERT_ONLY("usampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004204 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004205 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004206 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004207
Alexis Hetub14178b2015-04-13 13:23:20 -04004208 break;
4209
Alexis Hetu46768622018-01-16 22:09:28 -05004210 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004211
4212 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004213 FRAG_VERT_ONLY("usampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004214 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004215 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004216 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004217
Alexis Hetub14178b2015-04-13 13:23:20 -04004218 break;
4219
Alexis Hetu46768622018-01-16 22:09:28 -05004220 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004221
4222 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004223 FRAG_VERT_ONLY("usamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004224 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004225 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004226 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004227
Alexis Hetub14178b2015-04-13 13:23:20 -04004228 break;
4229
Alexis Hetu46768622018-01-16 22:09:28 -05004230 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004231
4232 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004233 FRAG_VERT_ONLY("usampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004234 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004235 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004236 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004237
Alexis Hetub14178b2015-04-13 13:23:20 -04004238 break;
4239
Alexis Hetu46768622018-01-16 22:09:28 -05004240 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004241
4242 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004243 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004244 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004245 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004246 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004247
Alexis Hetub14178b2015-04-13 13:23:20 -04004248 break;
4249
Alexis Hetu46768622018-01-16 22:09:28 -05004250 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004251
4252 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004253 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004254 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004255 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004256 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004257
Alexis Hetub14178b2015-04-13 13:23:20 -04004258 break;
4259
Alexis Hetu46768622018-01-16 22:09:28 -05004260 case 200:
Alexis Hetub14178b2015-04-13 13:23:20 -04004261
4262 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004263 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004264 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004265 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004266 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004267
Alexis Hetub14178b2015-04-13 13:23:20 -04004268 break;
4269
Alexis Hetu46768622018-01-16 22:09:28 -05004270 case 201:
Alexis Hetub027aa92015-01-19 15:56:12 -05004271
4272 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004273 FRAG_VERT_ONLY("struct", (yylsp[0]));
4274 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04004275 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4276 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004277
John Bauman66b8ab22014-05-06 15:57:45 -04004278 break;
4279
Alexis Hetu46768622018-01-16 22:09:28 -05004280 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004281
4282 {
4283 //
4284 // This is for user defined type names. The lexical phase looked up the
4285 // type.
4286 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004287 TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType();
John Bauman66b8ab22014-05-06 15:57:45 -04004288 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004289 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004290 (yyval.interm.type).userDef = &structure;
4291 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004292
John Bauman66b8ab22014-05-06 15:57:45 -04004293 break;
4294
Alexis Hetu46768622018-01-16 22:09:28 -05004295 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004296
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004297 { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); }
4298
John Bauman66b8ab22014-05-06 15:57:45 -04004299 break;
4300
Alexis Hetu46768622018-01-16 22:09:28 -05004301 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004302
4303 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004304 (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004305 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004306
John Bauman66b8ab22014-05-06 15:57:45 -04004307 break;
4308
Alexis Hetu46768622018-01-16 22:09:28 -05004309 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004310
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004311 { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); }
4312
John Bauman66b8ab22014-05-06 15:57:45 -04004313 break;
4314
Alexis Hetu46768622018-01-16 22:09:28 -05004315 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004316
4317 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004318 (yyval.interm.type) = context->addStructure((yylsp[-4]), (yylsp[-4]), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004319 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004320
John Bauman66b8ab22014-05-06 15:57:45 -04004321 break;
4322
Alexis Hetu46768622018-01-16 22:09:28 -05004323 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004324
4325 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004326 (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004327 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004328
John Bauman66b8ab22014-05-06 15:57:45 -04004329 break;
4330
Alexis Hetu46768622018-01-16 22:09:28 -05004331 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004332
4333 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004334 (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList);
4335 for (unsigned int i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) {
4336 TField* field = (*(yyvsp[0].interm.fieldList))[i];
Alexis Hetua8b364b2015-06-10 11:48:40 -04004337 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4338 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004339 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 -04004340 context->recover();
4341 }
4342 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004343 (yyval.interm.fieldList)->push_back((*(yyvsp[0].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004344 }
4345 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004346
John Bauman66b8ab22014-05-06 15:57:45 -04004347 break;
4348
Alexis Hetu46768622018-01-16 22:09:28 -05004349 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004350
4351 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004352 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004353 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004354
John Bauman66b8ab22014-05-06 15:57:45 -04004355 break;
4356
Alexis Hetu46768622018-01-16 22:09:28 -05004357 case 210:
John Bauman66b8ab22014-05-06 15:57:45 -04004358
4359 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004360 // ES3 Only, but errors should be handled elsewhere
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004361 (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier;
4362 (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier;
4363 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
Alexis Hetuad6b8752015-06-09 16:15:30 -04004364 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004365
Alexis Hetuad6b8752015-06-09 16:15:30 -04004366 break;
4367
Alexis Hetu46768622018-01-16 22:09:28 -05004368 case 211:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004369
4370 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004371 (yyval.interm.fieldList) = NewPoolTFieldList();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004372 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004373 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004374
John Bauman66b8ab22014-05-06 15:57:45 -04004375 break;
4376
Alexis Hetu46768622018-01-16 22:09:28 -05004377 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004378
4379 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004380 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004381 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004382
John Bauman66b8ab22014-05-06 15:57:45 -04004383 break;
4384
Alexis Hetu46768622018-01-16 22:09:28 -05004385 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004386
4387 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004388 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004389 context->recover();
4390
Alexis Hetua8b364b2015-06-10 11:48:40 -04004391 TType* type = new TType(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004392 (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004393 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004394
John Bauman66b8ab22014-05-06 15:57:45 -04004395 break;
4396
Alexis Hetu46768622018-01-16 22:09:28 -05004397 case 214:
John Bauman66b8ab22014-05-06 15:57:45 -04004398
4399 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004400 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004401 context->recover();
4402
Alexis Hetua8b364b2015-06-10 11:48:40 -04004403 TType* type = new TType(EbtVoid, EbpUndefined);
Nicolas Capens858c0392018-04-09 11:53:41 -04004404 int size = 0;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004405 if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004406 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004407 type->setArraySize(size);
4408
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004409 (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3]));
John Bauman66b8ab22014-05-06 15:57:45 -04004410 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004411
John Bauman66b8ab22014-05-06 15:57:45 -04004412 break;
4413
Alexis Hetu46768622018-01-16 22:09:28 -05004414 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004415
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004416 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
4417
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004418 break;
4419
Alexis Hetuad6b8752015-06-09 16:15:30 -04004420 case 216:
4421
Alexis Hetu46768622018-01-16 22:09:28 -05004422 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004423
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004424 break;
4425
4426 case 217:
4427
Alexis Hetu46768622018-01-16 22:09:28 -05004428 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004429
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004430 break;
4431
4432 case 218:
4433
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004434 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4435
Alexis Hetua35d8232015-06-11 17:11:06 -04004436 break;
4437
4438 case 219:
4439
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004440 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4441
Alexis Hetua35d8232015-06-11 17:11:06 -04004442 break;
4443
4444 case 220:
4445
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004446 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4447
Alexis Hetua35d8232015-06-11 17:11:06 -04004448 break;
4449
4450 case 221:
4451
Alexis Hetu46768622018-01-16 22:09:28 -05004452 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004453
Alexis Hetua35d8232015-06-11 17:11:06 -04004454 break;
4455
4456 case 222:
4457
Alexis Hetu46768622018-01-16 22:09:28 -05004458 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004459
Alexis Hetua35d8232015-06-11 17:11:06 -04004460 break;
4461
4462 case 223:
4463
Alexis Hetu46768622018-01-16 22:09:28 -05004464 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004465
Alexis Hetu76a343a2015-06-04 17:21:22 -04004466 break;
4467
4468 case 224:
4469
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004470 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4471
Alexis Hetu76a343a2015-06-04 17:21:22 -04004472 break;
4473
4474 case 225:
4475
Alexis Hetu46768622018-01-16 22:09:28 -05004476 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004477
Alexis Hetue5246692015-06-18 12:34:52 -04004478 break;
4479
4480 case 226:
4481
Alexis Hetu46768622018-01-16 22:09:28 -05004482 { (yyval.interm.intermAggregate) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004483
Alexis Hetuad527752015-07-07 13:31:44 -04004484 break;
4485
4486 case 227:
4487
Alexis Hetu46768622018-01-16 22:09:28 -05004488 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004489
Alexis Hetuad527752015-07-07 13:31:44 -04004490 break;
4491
4492 case 228:
4493
Alexis Hetu46768622018-01-16 22:09:28 -05004494 { context->symbolTable.pop(); }
4495
4496 break;
4497
4498 case 229:
4499
Nicolas Capens7d626792015-02-17 17:58:31 -05004500 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004501 if ((yyvsp[-2].interm.intermAggregate) != 0) {
4502 (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence);
4503 (yyvsp[-2].interm.intermAggregate)->setEndLine((yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004504 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004505 (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate);
Nicolas Capens7d626792015-02-17 17:58:31 -05004506 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004507
Nicolas Capens7d626792015-02-17 17:58:31 -05004508 break;
4509
Alexis Hetu46768622018-01-16 22:09:28 -05004510 case 230:
Alexis Hetua35d8232015-06-11 17:11:06 -04004511
Alexis Hetu407813b2016-02-24 16:46:13 -05004512 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004513
Alexis Hetua35d8232015-06-11 17:11:06 -04004514 break;
4515
Alexis Hetu46768622018-01-16 22:09:28 -05004516 case 231:
Alexis Hetua35d8232015-06-11 17:11:06 -04004517
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004518 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4519
Alexis Hetu76a343a2015-06-04 17:21:22 -04004520 break;
4521
Alexis Hetu76a343a2015-06-04 17:21:22 -04004522 case 232:
4523
Alexis Hetu46768622018-01-16 22:09:28 -05004524 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004525
Alexis Hetue5246692015-06-18 12:34:52 -04004526 break;
4527
4528 case 233:
4529
Alexis Hetu46768622018-01-16 22:09:28 -05004530 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004531
Alexis Hetuad527752015-07-07 13:31:44 -04004532 break;
4533
4534 case 234:
4535
Alexis Hetu46768622018-01-16 22:09:28 -05004536 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004537
Alexis Hetuad527752015-07-07 13:31:44 -04004538 break;
4539
4540 case 235:
4541
Alexis Hetu46768622018-01-16 22:09:28 -05004542 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4543
4544 break;
4545
4546 case 236:
4547
John Bauman66b8ab22014-05-06 15:57:45 -04004548 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004549 (yyval.interm.intermAggregate) = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04004550 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004551
John Bauman66b8ab22014-05-06 15:57:45 -04004552 break;
4553
Alexis Hetu46768622018-01-16 22:09:28 -05004554 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004555
4556 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004557 if ((yyvsp[-1].interm.intermAggregate)) {
4558 (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence);
4559 (yyvsp[-1].interm.intermAggregate)->setEndLine((yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004560 }
Alexis Hetu407813b2016-02-24 16:46:13 -05004561 (yyval.interm.intermAggregate) = (yyvsp[-1].interm.intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004562 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004563
John Bauman66b8ab22014-05-06 15:57:45 -04004564 break;
4565
Alexis Hetu46768622018-01-16 22:09:28 -05004566 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004567
4568 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004569 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004570 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004571
John Bauman66b8ab22014-05-06 15:57:45 -04004572 break;
4573
Alexis Hetu46768622018-01-16 22:09:28 -05004574 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004575
4576 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004577 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004578 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004579
John Bauman66b8ab22014-05-06 15:57:45 -04004580 break;
4581
Alexis Hetu46768622018-01-16 22:09:28 -05004582 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004583
4584 { (yyval.interm.intermNode) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004585
John Bauman66b8ab22014-05-06 15:57:45 -04004586 break;
4587
Alexis Hetu46768622018-01-16 22:09:28 -05004588 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004589
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004590 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
4591
John Bauman66b8ab22014-05-06 15:57:45 -04004592 break;
4593
Alexis Hetu46768622018-01-16 22:09:28 -05004594 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004595
4596 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004597 if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004598 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004599 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
John Bauman66b8ab22014-05-06 15:57:45 -04004600 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004601
John Bauman66b8ab22014-05-06 15:57:45 -04004602 break;
4603
Alexis Hetu46768622018-01-16 22:09:28 -05004604 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004605
4606 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004607 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
4608 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004609 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004610
John Bauman66b8ab22014-05-06 15:57:45 -04004611 break;
4612
Alexis Hetu46768622018-01-16 22:09:28 -05004613 case 244:
John Bauman66b8ab22014-05-06 15:57:45 -04004614
4615 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004616 (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004617 (yyval.interm.nodePair).node2 = 0;
4618 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004619
John Bauman66b8ab22014-05-06 15:57:45 -04004620 break;
4621
Alexis Hetu46768622018-01-16 22:09:28 -05004622 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004623
Alexis Hetue5246692015-06-18 12:34:52 -04004624 { context->incrSwitchNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004625
Alexis Hetu76a343a2015-06-04 17:21:22 -04004626 break;
4627
Alexis Hetu46768622018-01-16 22:09:28 -05004628 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004629
4630 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004631 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5]));
Alexis Hetue5246692015-06-18 12:34:52 -04004632 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004633 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004634
Alexis Hetu76a343a2015-06-04 17:21:22 -04004635 break;
4636
Alexis Hetu46768622018-01-16 22:09:28 -05004637 case 247:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004638
4639 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004640 (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004641 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004642
Alexis Hetu76a343a2015-06-04 17:21:22 -04004643 break;
4644
Alexis Hetu46768622018-01-16 22:09:28 -05004645 case 248:
John Bauman66b8ab22014-05-06 15:57:45 -04004646
4647 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004648 (yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
Alexis Hetue5246692015-06-18 12:34:52 -04004649 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004650
Alexis Hetue5246692015-06-18 12:34:52 -04004651 break;
4652
Alexis Hetu46768622018-01-16 22:09:28 -05004653 case 249:
Alexis Hetue5246692015-06-18 12:34:52 -04004654
4655 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004656 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
4657 if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004658 context->recover();
4659 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004660
John Bauman66b8ab22014-05-06 15:57:45 -04004661 break;
4662
Alexis Hetu46768622018-01-16 22:09:28 -05004663 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004664
4665 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004666 TIntermNode *intermNode;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004667 if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004668 context->recover();
4669
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004670 if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode))
4671 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004672 else {
4673 context->recover();
4674 (yyval.interm.intermTypedNode) = 0;
4675 }
4676 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004677
John Bauman66b8ab22014-05-06 15:57:45 -04004678 break;
4679
Alexis Hetu46768622018-01-16 22:09:28 -05004680 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004681
Alexis Hetu0a655842015-06-22 16:52:11 -04004682 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004683
John Bauman66b8ab22014-05-06 15:57:45 -04004684 break;
4685
Alexis Hetu46768622018-01-16 22:09:28 -05004686 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004687
4688 {
4689 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004690 (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 -04004691 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004692 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004693
John Bauman66b8ab22014-05-06 15:57:45 -04004694 break;
4695
Alexis Hetu46768622018-01-16 22:09:28 -05004696 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004697
Alexis Hetu0a655842015-06-22 16:52:11 -04004698 { context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004699
John Bauman66b8ab22014-05-06 15:57:45 -04004700 break;
4701
Alexis Hetu46768622018-01-16 22:09:28 -05004702 case 254:
John Bauman66b8ab22014-05-06 15:57:45 -04004703
4704 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004705 if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004706 context->recover();
4707
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004708 (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 -04004709 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004710 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004711
John Bauman66b8ab22014-05-06 15:57:45 -04004712 break;
4713
Alexis Hetuad527752015-07-07 13:31:44 -04004714 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004715
Alexis Hetu46768622018-01-16 22:09:28 -05004716 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004717
Alexis Hetu17809052015-05-13 11:28:22 -04004718 break;
4719
Alexis Hetu76a343a2015-06-04 17:21:22 -04004720 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004721
4722 {
Alexis Hetu46768622018-01-16 22:09:28 -05004723 context->symbolTable.pop();
4724 (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]));
4725 context->decrLoopNestingLevel();
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004726 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004727
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004728 break;
4729
Alexis Hetu76a343a2015-06-04 17:21:22 -04004730 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004731
4732 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004733 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004734 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004735
Alexis Hetue5246692015-06-18 12:34:52 -04004736 break;
4737
4738 case 258:
4739
4740 {
Alexis Hetu46768622018-01-16 22:09:28 -05004741 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004742 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004743
Alexis Hetuad527752015-07-07 13:31:44 -04004744 break;
4745
4746 case 259:
4747
4748 {
Alexis Hetu46768622018-01-16 22:09:28 -05004749 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004750 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004751
Alexis Hetuad527752015-07-07 13:31:44 -04004752 break;
4753
4754 case 260:
4755
4756 {
Alexis Hetu46768622018-01-16 22:09:28 -05004757 (yyval.interm.intermTypedNode) = 0;
4758 }
4759
4760 break;
4761
4762 case 261:
4763
4764 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004765 (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004766 (yyval.interm.nodePair).node2 = 0;
4767 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004768
Alexis Hetu17809052015-05-13 11:28:22 -04004769 break;
4770
Alexis Hetu46768622018-01-16 22:09:28 -05004771 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004772
4773 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004774 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
4775 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004776 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004777
Alexis Hetu17809052015-05-13 11:28:22 -04004778 break;
4779
Alexis Hetu46768622018-01-16 22:09:28 -05004780 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004781
4782 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004783 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004784 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004785
Alexis Hetu17809052015-05-13 11:28:22 -04004786 break;
4787
Alexis Hetu46768622018-01-16 22:09:28 -05004788 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004789
4790 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004791 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004792 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004793
Alexis Hetu17809052015-05-13 11:28:22 -04004794 break;
4795
Alexis Hetu46768622018-01-16 22:09:28 -05004796 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004797
4798 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004799 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004800 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004801
Alexis Hetu17809052015-05-13 11:28:22 -04004802 break;
4803
Alexis Hetu46768622018-01-16 22:09:28 -05004804 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004805
4806 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004807 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu17809052015-05-13 11:28:22 -04004808 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004809
Alexis Hetu17809052015-05-13 11:28:22 -04004810 break;
4811
Alexis Hetu46768622018-01-16 22:09:28 -05004812 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004813
4814 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004815 FRAG_ONLY("discard", (yylsp[-1]));
4816 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004817 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004818
Alexis Hetu17809052015-05-13 11:28:22 -04004819 break;
4820
Alexis Hetuad527752015-07-07 13:31:44 -04004821 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004822
4823 {
Alexis Hetu46768622018-01-16 22:09:28 -05004824 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004825 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004826 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004827
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004828 break;
4829
Alexis Hetue5246692015-06-18 12:34:52 -04004830 case 269:
4831
4832 {
Alexis Hetu46768622018-01-16 22:09:28 -05004833 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc));
4834 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetuad527752015-07-07 13:31:44 -04004835 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004836
Alexis Hetuad527752015-07-07 13:31:44 -04004837 break;
4838
4839 case 270:
4840
4841 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004842 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004843 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004844
Alexis Hetuad527752015-07-07 13:31:44 -04004845 break;
4846
4847 case 271:
4848
4849 {
Alexis Hetu46768622018-01-16 22:09:28 -05004850 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004851 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004852
John Bauman66b8ab22014-05-06 15:57:45 -04004853 break;
4854
Alexis Hetuad527752015-07-07 13:31:44 -04004855 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004856
4857 {
Alexis Hetu46768622018-01-16 22:09:28 -05004858 context->parseFunctionPrototype((yylsp[0]), (yyvsp[0].interm).function, &(yyvsp[0].interm).intermAggregate);
4859 }
4860
4861 break;
4862
4863 case 273:
4864
4865 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004866 (yyval.interm.intermNode) = context->addFunctionDefinition(*((yyvsp[-2].interm).function), (yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermAggregate), (yylsp[-2]));
John Bauman66b8ab22014-05-06 15:57:45 -04004867 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004868
John Bauman66b8ab22014-05-06 15:57:45 -04004869 break;
4870
4871
4872
4873 default: break;
4874 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004875 /* User semantic actions sometimes alter yychar, and that requires
4876 that yytoken be updated with the new translation. We take the
4877 approach of translating immediately before every use of yytoken.
4878 One alternative is translating here after every semantic action,
4879 but that translation would be missed if the semantic action invokes
4880 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4881 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4882 incorrect destructor might then be invoked immediately. In the
4883 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4884 to an incorrect destructor call or verbose syntax error message
4885 before the lookahead is translated. */
John Bauman66b8ab22014-05-06 15:57:45 -04004886 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4887
4888 YYPOPSTACK (yylen);
4889 yylen = 0;
4890 YY_STACK_PRINT (yyss, yyssp);
4891
4892 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004893 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004894
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004895 /* Now 'shift' the result of the reduction. Determine what state
John Bauman66b8ab22014-05-06 15:57:45 -04004896 that goes to, based on the state we popped back to and the rule
4897 number reduced by. */
4898
4899 yyn = yyr1[yyn];
4900
4901 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4902 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4903 yystate = yytable[yystate];
4904 else
4905 yystate = yydefgoto[yyn - YYNTOKENS];
4906
4907 goto yynewstate;
4908
4909
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004910/*--------------------------------------.
4911| yyerrlab -- here on detecting error. |
4912`--------------------------------------*/
John Bauman66b8ab22014-05-06 15:57:45 -04004913yyerrlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004914 /* Make sure we have latest lookahead translation. See comments at
4915 user semantic actions for why this is necessary. */
4916 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4917
John Bauman66b8ab22014-05-06 15:57:45 -04004918 /* If not already recovering from an error, report this error. */
4919 if (!yyerrstatus)
4920 {
4921 ++yynerrs;
4922#if ! YYERROR_VERBOSE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004923 yyerror (&yylloc, context, yyscanner, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004924#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004925# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4926 yyssp, yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04004927 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004928 char const *yymsgp = YY_("syntax error");
4929 int yysyntax_error_status;
4930 yysyntax_error_status = YYSYNTAX_ERROR;
4931 if (yysyntax_error_status == 0)
4932 yymsgp = yymsg;
4933 else if (yysyntax_error_status == 1)
4934 {
4935 if (yymsg != yymsgbuf)
4936 YYSTACK_FREE (yymsg);
4937 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4938 if (!yymsg)
4939 {
4940 yymsg = yymsgbuf;
4941 yymsg_alloc = sizeof yymsgbuf;
4942 yysyntax_error_status = 2;
4943 }
4944 else
4945 {
4946 yysyntax_error_status = YYSYNTAX_ERROR;
4947 yymsgp = yymsg;
4948 }
4949 }
4950 yyerror (&yylloc, context, yyscanner, yymsgp);
4951 if (yysyntax_error_status == 2)
4952 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04004953 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004954# undef YYSYNTAX_ERROR
John Bauman66b8ab22014-05-06 15:57:45 -04004955#endif
4956 }
4957
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004958 yyerror_range[1] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004959
4960 if (yyerrstatus == 3)
4961 {
4962 /* If just tried and failed to reuse lookahead token after an
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004963 error, discard it. */
John Bauman66b8ab22014-05-06 15:57:45 -04004964
4965 if (yychar <= YYEOF)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004966 {
4967 /* Return failure if at end of input. */
4968 if (yychar == YYEOF)
4969 YYABORT;
4970 }
John Bauman66b8ab22014-05-06 15:57:45 -04004971 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004972 {
4973 yydestruct ("Error: discarding",
4974 yytoken, &yylval, &yylloc, context, yyscanner);
4975 yychar = YYEMPTY;
4976 }
John Bauman66b8ab22014-05-06 15:57:45 -04004977 }
4978
4979 /* Else will try to reuse lookahead token after shifting the error
4980 token. */
4981 goto yyerrlab1;
4982
4983
4984/*---------------------------------------------------.
4985| yyerrorlab -- error raised explicitly by YYERROR. |
4986`---------------------------------------------------*/
4987yyerrorlab:
4988
4989 /* Pacify compilers like GCC when the user code never invokes
4990 YYERROR and the label yyerrorlab therefore never appears in user
4991 code. */
4992 if (/*CONSTCOND*/ 0)
4993 goto yyerrorlab;
4994
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004995 yyerror_range[1] = yylsp[1-yylen];
4996 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04004997 this YYERROR. */
4998 YYPOPSTACK (yylen);
4999 yylen = 0;
5000 YY_STACK_PRINT (yyss, yyssp);
5001 yystate = *yyssp;
5002 goto yyerrlab1;
5003
5004
5005/*-------------------------------------------------------------.
5006| yyerrlab1 -- common code for both syntax error and YYERROR. |
5007`-------------------------------------------------------------*/
5008yyerrlab1:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005009 yyerrstatus = 3; /* Each real token shifted decrements this. */
John Bauman66b8ab22014-05-06 15:57:45 -04005010
5011 for (;;)
5012 {
5013 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005014 if (!yypact_value_is_default (yyn))
5015 {
5016 yyn += YYTERROR;
5017 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5018 {
5019 yyn = yytable[yyn];
5020 if (0 < yyn)
5021 break;
5022 }
5023 }
John Bauman66b8ab22014-05-06 15:57:45 -04005024
5025 /* Pop the current state because it cannot handle the error token. */
5026 if (yyssp == yyss)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005027 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04005028
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005029 yyerror_range[1] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005030 yydestruct ("Error: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005031 yystos[yystate], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005032 YYPOPSTACK (1);
5033 yystate = *yyssp;
5034 YY_STACK_PRINT (yyss, yyssp);
5035 }
5036
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005037 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04005038 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005039 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04005040
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005041 yyerror_range[2] = yylloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005042 /* Using YYLLOC is tempting, but would change the location of
5043 the lookahead. YYLOC is available though. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005044 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005045 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005046
5047 /* Shift the error token. */
5048 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5049
5050 yystate = yyn;
5051 goto yynewstate;
5052
5053
5054/*-------------------------------------.
5055| yyacceptlab -- YYACCEPT comes here. |
5056`-------------------------------------*/
5057yyacceptlab:
5058 yyresult = 0;
5059 goto yyreturn;
5060
5061/*-----------------------------------.
5062| yyabortlab -- YYABORT comes here. |
5063`-----------------------------------*/
5064yyabortlab:
5065 yyresult = 1;
5066 goto yyreturn;
5067
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005068#if !defined yyoverflow || YYERROR_VERBOSE
John Bauman66b8ab22014-05-06 15:57:45 -04005069/*-------------------------------------------------.
5070| yyexhaustedlab -- memory exhaustion comes here. |
5071`-------------------------------------------------*/
5072yyexhaustedlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005073 yyerror (&yylloc, context, yyscanner, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005074 yyresult = 2;
5075 /* Fall through. */
5076#endif
5077
5078yyreturn:
5079 if (yychar != YYEMPTY)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005080 {
5081 /* Make sure we have latest lookahead translation. See comments at
5082 user semantic actions for why this is necessary. */
5083 yytoken = YYTRANSLATE (yychar);
5084 yydestruct ("Cleanup: discarding lookahead",
5085 yytoken, &yylval, &yylloc, context, yyscanner);
5086 }
5087 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005088 this YYABORT or YYACCEPT. */
5089 YYPOPSTACK (yylen);
5090 YY_STACK_PRINT (yyss, yyssp);
5091 while (yyssp != yyss)
5092 {
5093 yydestruct ("Cleanup: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005094 yystos[*yyssp], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005095 YYPOPSTACK (1);
5096 }
5097#ifndef yyoverflow
5098 if (yyss != yyssa)
5099 YYSTACK_FREE (yyss);
5100#endif
5101#if YYERROR_VERBOSE
5102 if (yymsg != yymsgbuf)
5103 YYSTACK_FREE (yymsg);
5104#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005105 return yyresult;
John Bauman66b8ab22014-05-06 15:57:45 -04005106}
5107
5108
5109
John Bauman66b8ab22014-05-06 15:57:45 -04005110int glslang_parse(TParseContext* context) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005111 return yyparse(context, context->getScanner());
John Bauman66b8ab22014-05-06 15:57:45 -04005112}