blob: 17f40e8e436b97e6d7f3650ffcc9f1189805e640 [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 Hetuad527752015-07-07 13:31:44 -0400637#define YYFINAL 112
John Bauman66b8ab22014-05-06 15:57:45 -0400638/* YYLAST -- Last index in YYTABLE. */
Alexis Hetu407813b2016-02-24 16:46:13 -0500639#define YYLAST 2525
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 Hetuad527752015-07-07 13:31:44 -0400646#define YYNRULES 272
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400647/* YYNSTATES -- Number of states. */
Alexis Hetuad527752015-07-07 13:31:44 -0400648#define YYNSTATES 413
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,
725 1191, 1197, 1203, 1209, 1215, 1220, 1225, 1234, 1239, 1244,
726 1249, 1254, 1259, 1264, 1269, 1274, 1279, 1284, 1289, 1294,
727 1299, 1304, 1317, 1317, 1320, 1320, 1326, 1329, 1345, 1348,
728 1357, 1361, 1367, 1374, 1389, 1393, 1397, 1398, 1404, 1405,
729 1406, 1407, 1408, 1409, 1410, 1414, 1415, 1415, 1415, 1425,
730 1426, 1430, 1430, 1431, 1431, 1436, 1439, 1449, 1452, 1458,
731 1459, 1463, 1471, 1475, 1482, 1482, 1489, 1492, 1499, 1504,
732 1519, 1519, 1524, 1524, 1531, 1531, 1539, 1542, 1548, 1551,
733 1557, 1561, 1568, 1571, 1574, 1577, 1580, 1589, 1593, 1600,
734 1603, 1609, 1609
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 Hetu407813b2016-02-24 16:46:13 -0500823#define YYPACT_NINF -334
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400824
825#define yypact_value_is_default(Yystate) \
Alexis Hetu407813b2016-02-24 16:46:13 -0500826 (!!((Yystate) == (-334)))
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400827
828#define YYTABLE_NINF -232
829
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 Hetu407813b2016-02-24 16:46:13 -0500837 2163, 10, -334, -334, -334, 169, -334, -334, -334, -334,
838 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
839 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
840 -334, -334, -334, -334, -334, -334, -334, 69, -334, -334,
841 -48, -334, -334, -334, -334, -334, -334, -334, -334, -334,
842 -334, -334, -334, -334, -334, -334, -334, -334, -82, -334,
843 -334, -78, -73, -71, 1, -59, -334, -32, 113, 1182,
844 -334, -334, 2448, 113, -334, -23, -334, 2088, -334, -334,
845 -334, -334, 113, -334, 2448, -334, -334, 11, -334, 9,
846 -334, 20, -334, 121, -334, -334, -334, -334, -334, 2312,
847 150, 22, -334, -79, -334, 37, -334, 2238, -334, -334,
848 -334, 1252, -334, -334, -334, 62, -334, 2238, 44, -41,
849 -334, 410, -334, -334, -334, -334, 105, 2312, -76, -334,
850 1350, 1641, -334, 107, 2312, 117, 1833, -334, 91, -334,
851 -334, -334, -334, -334, 1641, 1641, 1641, -334, -334, -334,
852 -334, -334, -334, -334, 19, -334, -334, -334, 103, -24,
853 1736, 120, -334, 1641, 80, -42, -36, 15, 43, 99,
854 108, 104, 141, 142, -69, -334, 127, -334, -334, 2238,
855 1918, 87, -334, 9, 122, 124, -334, 135, 136, 129,
856 1448, 140, 1641, 133, 143, 137, -334, -334, 118, -334,
857 -334, 12, -334, -78, 145, -334, -334, -334, -334, 526,
858 -334, -334, -334, -334, -334, -334, 144, -334, -334, 1543,
859 1641, 138, 148, -334, -334, 117, 146, 28, -334, -58,
860 -334, -334, -334, -15, -334, -334, 1641, 2380, -334, -334,
861 1641, 154, -334, -334, -334, 1641, 1641, 1641, 1641, 1641,
862 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641,
863 1641, 1641, 1641, 1641, 1641, -334, 2003, -334, -334, -334,
864 -334, -334, -334, 152, -334, 1641, -334, -334, 41, 1641,
865 149, -334, -334, -334, 642, -334, -334, -334, -334, -334,
866 -334, -334, -334, -334, -334, -334, 1641, 1641, -334, -334,
867 -334, 1641, 151, 155, -334, 1641, 157, 57, 1641, 117,
868 -334, -85, -334, -334, 156, 160, -334, 161, -334, -334,
869 -334, -334, -334, 80, 80, -42, -42, -36, -36, -36,
870 -36, 15, 15, 43, 99, 108, 104, 141, 142, 72,
871 -334, 211, 20, 874, 990, -10, -334, 3, -334, 1087,
872 642, -334, -334, 165, 1641, 163, -334, 1641, -334, 166,
873 -334, 1641, -334, -334, 1641, 164, -334, -334, -334, -334,
874 1087, 152, -334, 160, 198, 2312, 172, 170, -334, -334,
875 1641, -334, -334, 171, -334, 1641, -334, 167, 175, 265,
876 -334, 178, 174, 758, -334, -334, 176, 13, 1641, 758,
877 152, -334, 1641, -334, -334, -334, -334, 177, 160, -334,
878 -334, -334, -334
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,
890 0, 158, 184, 185, 186, 188, 189, 190, 191, 192,
891 193, 194, 195, 196, 187, 197, 198, 199, 0, 201,
892 270, 271, 0, 95, 105, 0, 110, 116, 133, 0,
893 131, 123, 0, 134, 144, 155, 200, 0, 267, 269,
894 130, 122, 0, 136, 0, 141, 142, 0, 204, 0,
895 86, 0, 93, 105, 127, 106, 107, 108, 96, 0,
896 105, 0, 87, 117, 132, 0, 92, 0, 124, 145,
897 135, 0, 1, 268, 137, 0, 202, 0, 152, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -0500898 150, 0, 272, 97, 102, 104, 109, 0, 111, 98,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400899 0, 0, 85, 0, 0, 0, 0, 206, 2, 6,
900 4, 5, 7, 28, 0, 0, 0, 156, 35, 34,
901 36, 33, 3, 9, 29, 11, 16, 17, 0, 0,
902 22, 0, 37, 0, 41, 44, 47, 52, 55, 57,
903 59, 61, 63, 65, 67, 84, 0, 26, 88, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -0500904 0, 0, 149, 0, 0, 0, 252, 0, 0, 0,
905 0, 0, 0, 0, 0, 226, 235, 239, 37, 69,
906 82, 0, 215, 0, 144, 218, 237, 217, 216, 0,
907 219, 220, 221, 222, 223, 224, 99, 101, 103, 0,
908 0, 0, 0, 214, 121, 0, 212, 0, 210, 0,
909 207, 30, 31, 0, 13, 14, 0, 0, 20, 19,
910 0, 158, 23, 25, 32, 0, 0, 0, 0, 0,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -0500912 0, 0, 0, 0, 0, 157, 0, 205, 153, 154,
913 151, 263, 262, 233, 254, 0, 266, 264, 0, 0,
914 0, 247, 250, 225, 0, 72, 73, 75, 74, 77,
915 78, 79, 80, 81, 76, 71, 0, 0, 240, 236,
916 238, 0, 0, 0, 115, 0, 118, 0, 0, 0,
917 208, 0, 89, 8, 0, 15, 27, 12, 18, 24,
918 38, 39, 40, 43, 42, 45, 46, 50, 51, 48,
919 49, 53, 54, 56, 58, 60, 62, 64, 66, 0,
920 203, 0, 0, 0, 0, 0, 265, 0, 246, 0,
921 227, 70, 83, 0, 0, 112, 119, 0, 209, 0,
922 211, 0, 90, 10, 0, 0, 232, 234, 257, 256,
923 259, 233, 244, 248, 0, 0, 0, 0, 100, 113,
924 0, 120, 213, 0, 68, 0, 258, 0, 0, 243,
925 241, 0, 0, 0, 228, 114, 0, 0, 260, 0,
926 233, 245, 0, 230, 251, 229, 91, 0, 261, 255,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400927 242, 249, 253
928};
929
930 /* YYPGOTO[NTERM-NUM]. */
John Bauman66b8ab22014-05-06 15:57:45 -0400931static const yytype_int16 yypgoto[] =
932{
Alexis Hetu407813b2016-02-24 16:46:13 -0500933 -334, -334, -334, -334, -334, -334, -334, 46, -334, -334,
934 -334, -334, 66, -334, -46, -44, -67, -34, 30, 33,
935 29, 32, 34, 31, -334, -104, -127, -334, -144, -119,
936 -334, 14, 17, -334, -334, -334, 168, 204, 199, 173,
937 -334, -334, -325, 8, -334, -101, 7, -68, 293, -334,
938 -334, 119, 0, -334, -334, -334, -334, -97, -123, 76,
939 -6, -208, -40, -206, -328, -83, -334, -334, -94, -333,
940 -334, -334, -86, 25, -38, -334, -334, -334, -334, -334,
941 -60, -334, -334, -334, -334, -334, -334, -334, -334, -334,
942 253, -334, -334
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 Hetu407813b2016-02-24 16:46:13 -0500948 -1, 152, 153, 154, 314, 155, 156, 157, 158, 159,
949 160, 161, 198, 163, 164, 165, 166, 167, 168, 169,
950 170, 171, 172, 173, 174, 199, 200, 296, 201, 176,
951 107, 202, 203, 62, 63, 64, 124, 98, 99, 125,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400952 65, 66, 67, 68, 100, 69, 70, 71, 72, 73,
Alexis Hetu407813b2016-02-24 16:46:13 -0500953 119, 120, 177, 75, 76, 179, 117, 136, 137, 227,
954 228, 224, 205, 206, 207, 208, 284, 377, 404, 341,
955 342, 343, 405, 209, 210, 211, 390, 212, 391, 213,
956 376, 214, 349, 273, 344, 370, 387, 388, 215, 77,
Veranika Liaukevicheced26a2015-10-22 11:29:04 -0400957 78, 79, 91
958};
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 Hetu407813b2016-02-24 16:46:13 -0500965 74, 108, 233, 300, 223, 122, 134, 175, 83, 82,
966 94, 222, 304, 230, 60, 367, 134, 61, 311, 7,
967 180, 361, 89, 263, 374, 129, 175, 130, 87, 362,
968 219, 126, 92, 242, 131, 134, 90, 220, 389, 135,
969 93, 95, 96, 97, 103, 374, 278, 250, 251, 135,
970 27, 28, 101, 29, 80, 102, 312, 230, 264, 126,
971 88, 37, 38, 39, 182, 403, 225, 410, 135, 74,
972 183, 403, 109, 280, 248, 104, 249, 74, 134, 134,
973 110, 239, 266, 111, 115, 118, 81, 240, 175, 114,
974 313, 60, 315, 223, 61, 371, 297, 356, 128, 74,
975 303, 297, 252, 253, 234, 235, -94, 74, 372, 85,
976 86, 135, 135, 319, 297, 175, 7, 74, 407, 116,
977 339, 204, 7, 297, 297, 236, 298, 74, 121, 237,
978 94, 345, 256, 257, 74, 347, 74, 254, 255, 309,
979 83, 82, 310, 230, 300, 132, 379, 27, 28, 381,
980 29, 80, 297, 27, 28, 346, 29, 181, 37, 38,
981 39, 95, 96, 97, 37, 134, 268, 269, 309, 351,
982 352, 358, 395, 2, 3, 4, 178, 162, 223, 74,
983 74, 216, 353, 297, 364, 327, 328, 329, 330, 359,
984 95, 96, 97, 226, 411, -27, 162, 175, 135, 245,
985 246, 247, 323, 324, 175, 373, 325, 326, 238, 204,
986 231, 232, 285, 286, 287, 288, 289, 290, 291, 292,
987 293, 294, 331, 332, 243, 258, 373, 223, 260, 244,
988 223, 295, 261, 259, 265, 262, 271, 384, 272, 274,
989 275, 397, 383, 276, 279, 281, 283, 282, 375, -26,
990 301, 305, 308, 223, 408, 306, 366, 175, 162, -21,
991 -231, 348, 355, 363, 354, -28, 74, 365, 385, 375,
992 357, 297, 378, 382, 392, 223, 380, 393, 396, 394,
993 399, 398, 400, 318, 204, 162, 195, 402, 333, 335,
994 406, 412, 334, 336, 338, 217, 337, 123, 84, 127,
995 218, 307, 270, 360, 368, 409, 369, 108, 401, 350,
996 386, 320, 321, 322, 162, 162, 162, 162, 162, 162,
Alexis Hetuad527752015-07-07 13:31:44 -0400997 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
Alexis Hetu407813b2016-02-24 16:46:13 -0500998 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
999 0, 0, 0, 204, 204, 0, 0, 0, 0, 204,
1000 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1001 0, 0, 0, 0, 0, 0, 0, 162, 0, 0,
1002 204, 0, 0, 0, 162, 74, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001004 0, 0, 0, 204, 0, 0, 0, 0, 0, 204,
Alexis Hetua35d8232015-06-11 17:11:06 -04001005 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001006 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
1007 8, 9, 10, 11, 184, 185, 186, 162, 187, 188,
1008 189, 190, 191, 192, 193, 12, 13, 14, 15, 16,
Alexis Hetue5246692015-06-18 12:34:52 -04001009 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1010 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
Alexis Hetu407813b2016-02-24 16:46:13 -05001011 36, 37, 38, 39, 40, 41, 194, 42, 43, 44,
Alexis Hetue5246692015-06-18 12:34:52 -04001012 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001013 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1014 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001016 0, 0, 0, 0, 146, 0, 0, 0, 195, 196,
1017 0, 0, 0, 0, 197, 148, 149, 150, 151, 1,
Alexis Hetue5246692015-06-18 12:34:52 -04001018 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetu407813b2016-02-24 16:46:13 -05001019 184, 185, 186, 0, 187, 188, 189, 190, 191, 192,
1020 193, 12, 13, 14, 15, 16, 17, 18, 19, 20,
Alexis Hetue5246692015-06-18 12:34:52 -04001021 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1022 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Alexis Hetu407813b2016-02-24 16:46:13 -05001023 40, 41, 194, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001024 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001025 57, 58, 138, 59, 139, 140, 141, 142, 143, 0,
1026 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001028 146, 0, 0, 0, 195, 299, 0, 0, 0, 0,
1029 197, 148, 149, 150, 151, 1, 2, 3, 4, 5,
1030 6, 7, 8, 9, 10, 11, 184, 185, 186, 0,
1031 187, 188, 189, 190, 191, 192, 193, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001032 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001033 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetu407813b2016-02-24 16:46:13 -05001034 34, 35, 36, 37, 38, 39, 40, 41, 194, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001035 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001036 52, 53, 54, 0, 55, 56, 57, 58, 138, 59,
1037 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001039 0, 0, 0, 0, 0, 0, 146, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001040 195, 0, 0, 0, 0, 0, 197, 148, 149, 150,
Alexis Hetuad527752015-07-07 13:31:44 -04001041 151, 1, 2, 3, 4, 5, 6, 7, 8, 9,
Alexis Hetu407813b2016-02-24 16:46:13 -05001042 10, 11, 184, 185, 186, 0, 187, 188, 189, 190,
1043 191, 192, 193, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetue5246692015-06-18 12:34:52 -04001044 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1045 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetu407813b2016-02-24 16:46:13 -05001046 38, 39, 40, 41, 194, 42, 43, 44, 0, 45,
Alexis Hetue5246692015-06-18 12:34:52 -04001047 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001048 55, 56, 57, 58, 138, 59, 139, 140, 141, 142,
1049 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1051 0, 0, 146, 0, 0, 0, 121, 0, 0, 0,
1052 0, 0, 197, 148, 149, 150, 151, 1, 2, 3,
1053 4, 5, 6, 7, 8, 9, 10, 11, 184, 185,
1054 186, 0, 187, 188, 189, 190, 191, 192, 193, 12,
1055 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1056 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1057 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1058 194, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1059 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1060 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1061 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1062 0, 0, 0, 0, 0, 0, 0, 0, 146, 0,
1063 0, 0, 0, 0, 0, 0, 0, 0, 197, 148,
1064 149, 150, 151, 1, 2, 3, 4, 5, 6, 7,
Alexis Hetuad527752015-07-07 13:31:44 -04001065 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1066 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1067 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
Alexis Hetu407813b2016-02-24 16:46:13 -05001068 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1069 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1070 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1071 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1072 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
1073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1074 133, 2, 3, 4, 146, 6, 7, 8, 9, 10,
1075 11, 0, 0, 0, 197, 148, 149, 150, 151, 0,
1076 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1077 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1078 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1079 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1080 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1081 56, 57, 58, 138, 59, 139, 140, 141, 142, 143,
1082 0, 0, 144, 145, 0, 0, 0, 0, 0, 0,
1083 0, 0, 0, 0, 0, 0, 2, 3, 4, 0,
1084 0, 146, 8, 9, 10, 11, 0, 0, 0, 0,
1085 0, 0, 148, 149, 150, 151, 0, 12, 13, 14,
1086 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1087 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1088 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1089 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1090 52, 53, 54, 0, 55, 56, 57, 0, 105, 59,
1091 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
1092 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1093 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1094 25, 26, 0, 0, 0, 0, 106, 31, 32, 33,
1095 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1096 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1097 52, 53, 54, 0, 55, 56, 57, 0, 138, 59,
1098 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
1099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1100 0, 0, 0, 0, 0, 0, 146, 0, 0, 147,
1101 8, 9, 10, 11, 0, 0, 0, 148, 149, 150,
1102 151, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1103 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1104 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001105 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001106 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001107 54, 0, 55, 56, 57, 0, 138, 59, 139, 140,
1108 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001110 0, 0, 0, 0, 146, 0, 0, 221, 8, 9,
Alexis Hetuad527752015-07-07 13:31:44 -04001111 10, 11, 0, 0, 0, 148, 149, 150, 151, 0,
1112 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1113 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1114 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1115 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1116 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1117 55, 56, 57, 0, 138, 59, 139, 140, 141, 142,
1118 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001120 0, 0, 146, 8, 9, 10, 11, 0, 0, 0,
1121 0, 0, 277, 148, 149, 150, 151, 0, 12, 13,
1122 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1123 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
1124 33, 34, 35, 36, 0, 0, 0, 40, 41, 0,
1125 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1126 51, 52, 53, 54, 0, 55, 56, 57, 0, 138,
1127 59, 139, 140, 141, 142, 143, 0, 0, 144, 145,
1128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1129 0, 0, 0, 0, 0, 0, 0, 146, 0, 0,
1130 302, 8, 9, 10, 11, 0, 0, 0, 148, 149,
1131 150, 151, 0, 0, 0, 0, 12, 13, 14, 15,
1132 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1133 26, 0, 0, 0, 0, 0, 31, 32, 33, 34,
1134 35, 36, 0, 0, 0, 40, 41, 0, 42, 43,
1135 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1136 53, 54, 0, 55, 56, 57, 0, 138, 59, 139,
1137 140, 141, 142, 143, 0, 0, 144, 145, 0, 0,
1138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1139 0, 0, 0, 0, 0, 146, 8, 9, 10, 11,
1140 0, 0, 0, 0, 0, 0, 148, 149, 150, 151,
Alexis Hetue5246692015-06-18 12:34:52 -04001141 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1142 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1143 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001144 40, 241, 0, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001145 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001146 57, 0, 138, 59, 139, 140, 141, 142, 143, 0,
1147 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001148 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1149 146, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1150 0, 148, 149, 150, 151, 0, 0, 0, 12, 13,
1151 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1152 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1153 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1154 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1155 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1156 59, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1157 0, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1158 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1159 0, 0, 229, 12, 13, 14, 15, 16, 17, 18,
1160 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1161 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1162 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1163 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1164 55, 56, 57, 58, 0, 59, 0, 0, 0, 0,
1165 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1166 0, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1167 0, 0, 0, 0, 0, 0, 0, 267, 12, 13,
1168 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1169 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1170 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1171 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1172 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1173 59, 0, 0, 0, 0, 0, 0, 0, 112, 0,
1174 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1175 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1176 0, 0, 340, 12, 13, 14, 15, 16, 17, 18,
1177 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1178 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1179 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1180 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1181 55, 56, 57, 58, 0, 59, 1, 2, 3, 4,
1182 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1183 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
1184 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1185 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1186 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1187 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1188 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1189 59, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1190 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1191 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1192 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1193 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1194 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1195 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1196 55, 56, 57, 58, 0, 59, 2, 3, 4, 0,
1197 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
1198 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1199 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1200 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1201 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1202 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1203 52, 53, 54, 0, 55, 56, 57, 0, 0, 59,
Alexis Hetuad527752015-07-07 13:31:44 -04001204 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1205 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1206 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1207 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1208 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1209 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetu407813b2016-02-24 16:46:13 -05001210 54, 0, 55, 56, 57, 0, 316, 59, 8, 9,
1211 10, 11, 317, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001212 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1213 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1214 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1215 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1216 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetu407813b2016-02-24 16:46:13 -05001217 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001218};
1219
1220static const yytype_int16 yycheck[] =
1221{
Alexis Hetu407813b2016-02-24 16:46:13 -05001222 0, 69, 146, 209, 131, 91, 107, 111, 1, 1,
1223 9, 130, 220, 136, 0, 343, 117, 0, 76, 9,
1224 117, 106, 104, 92, 349, 104, 130, 106, 76, 114,
1225 106, 99, 105, 160, 113, 136, 114, 113, 371, 107,
1226 111, 40, 41, 42, 76, 370, 190, 83, 84, 117,
1227 40, 41, 111, 43, 44, 114, 114, 180, 127, 127,
1228 108, 51, 52, 53, 105, 393, 134, 400, 136, 69,
1229 111, 399, 72, 192, 116, 68, 118, 77, 179, 180,
1230 73, 105, 179, 106, 84, 76, 76, 111, 192, 82,
1231 105, 77, 236, 220, 77, 105, 111, 305, 76, 99,
1232 219, 111, 87, 88, 85, 86, 105, 107, 105, 40,
1233 41, 179, 180, 240, 111, 219, 9, 117, 105, 108,
1234 264, 121, 9, 111, 111, 106, 114, 127, 108, 110,
1235 9, 275, 89, 90, 134, 279, 136, 122, 123, 111,
1236 133, 133, 114, 266, 350, 108, 354, 40, 41, 357,
1237 43, 44, 111, 40, 41, 114, 43, 113, 51, 52,
1238 53, 40, 41, 42, 51, 266, 79, 80, 111, 296,
1239 297, 114, 380, 4, 5, 6, 114, 111, 305, 179,
1240 180, 76, 301, 111, 112, 252, 253, 254, 255, 308,
1241 40, 41, 42, 76, 402, 104, 130, 301, 266, 119,
1242 120, 121, 248, 249, 308, 349, 250, 251, 105, 209,
1243 144, 145, 94, 95, 96, 97, 98, 99, 100, 101,
1244 102, 103, 256, 257, 104, 126, 370, 354, 124, 163,
1245 357, 113, 91, 125, 107, 93, 114, 364, 114, 104,
1246 104, 385, 361, 114, 104, 112, 109, 104, 349, 104,
1247 106, 113, 106, 380, 398, 107, 342, 361, 192, 105,
1248 108, 112, 107, 107, 113, 104, 266, 56, 104, 370,
1249 113, 111, 107, 107, 76, 402, 113, 105, 107, 109,
1250 105, 114, 17, 237, 284, 219, 108, 113, 258, 260,
1251 114, 114, 259, 261, 263, 127, 262, 93, 5, 100,
1252 127, 225, 183, 309, 344, 399, 344, 375, 391, 284,
1253 370, 245, 246, 247, 248, 249, 250, 251, 252, 253,
1254 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
1255 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1256 -1, -1, -1, 343, 344, -1, -1, -1, -1, 349,
1257 350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1258 -1, -1, -1, -1, -1, -1, -1, 301, -1, -1,
1259 370, -1, -1, -1, 308, 375, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001260 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001261 -1, -1, -1, 393, -1, -1, -1, -1, -1, 399,
Alexis Hetue5246692015-06-18 12:34:52 -04001262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001263 -1, -1, -1, 3, 4, 5, 6, 7, 8, 9,
1264 10, 11, 12, 13, 14, 15, 16, 361, 18, 19,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001265 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
Alexis Hetuad527752015-07-07 13:31:44 -04001266 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1267 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001268 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
Alexis Hetuad527752015-07-07 13:31:44 -04001269 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1270 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1271 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001273 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001274 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1275 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1276 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1277 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1278 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1279 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1280 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1281 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1282 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1283 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001285 104, -1, -1, -1, 108, 109, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001286 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1287 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1288 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetue5246692015-06-18 12:34:52 -04001289 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001290 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1291 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetue5246692015-06-18 12:34:52 -04001292 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001293 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetue5246692015-06-18 12:34:52 -04001294 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1295 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001296 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001297 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001298 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetu407813b2016-02-24 16:46:13 -05001299 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1300 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001301 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1302 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetu407813b2016-02-24 16:46:13 -05001303 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001304 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1305 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1306 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1308 -1, -1, 104, -1, -1, -1, 108, -1, -1, -1,
1309 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
1310 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1311 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
1312 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1313 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1314 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1315 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1316 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1317 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1318 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1319 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
1320 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
1321 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001322 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1323 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1324 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Alexis Hetu407813b2016-02-24 16:46:13 -05001325 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1326 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1327 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1328 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1329 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1330 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1331 3, 4, 5, 6, 104, 8, 9, 10, 11, 12,
1332 13, -1, -1, -1, 114, 115, 116, 117, 118, -1,
1333 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1334 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1335 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1336 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1337 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1338 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1339 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
1340 -1, -1, -1, -1, -1, -1, 4, 5, 6, -1,
1341 -1, 104, 10, 11, 12, 13, -1, -1, -1, -1,
1342 -1, -1, 115, 116, 117, 118, -1, 25, 26, 27,
1343 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1344 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1345 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1346 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1347 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
1348 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
1349 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1350 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1351 38, 39, -1, -1, -1, -1, 114, 45, 46, 47,
1352 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1353 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1354 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
1355 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1357 -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
1358 10, 11, 12, 13, -1, -1, -1, 115, 116, 117,
1359 118, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1360 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1361 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
Veranika Liaukevich1aa4b612015-10-28 14:25:27 -04001362 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1363 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001364 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1365 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001367 -1, -1, -1, -1, 104, -1, -1, 107, 10, 11,
1368 12, 13, -1, -1, -1, 115, 116, 117, 118, -1,
1369 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1370 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1371 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1372 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1373 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1374 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1375 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001377 -1, -1, 104, 10, 11, 12, 13, -1, -1, -1,
1378 -1, -1, 114, 115, 116, 117, 118, -1, 25, 26,
1379 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1380 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1381 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
1382 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1383 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
1384 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
1385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1386 -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
1387 107, 10, 11, 12, 13, -1, -1, -1, 115, 116,
1388 117, 118, -1, -1, -1, -1, 25, 26, 27, 28,
1389 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1390 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
1391 49, 50, -1, -1, -1, 54, 55, -1, 57, 58,
1392 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1393 69, 70, -1, 72, 73, 74, -1, 76, 77, 78,
1394 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1396 -1, -1, -1, -1, -1, 104, 10, 11, 12, 13,
1397 -1, -1, -1, -1, -1, -1, 115, 116, 117, 118,
Alexis Hetue5246692015-06-18 12:34:52 -04001398 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1399 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1400 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1401 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1402 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
Alexis Hetuad527752015-07-07 13:31:44 -04001403 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1404 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001405 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1406 104, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1407 -1, 115, 116, 117, 118, -1, -1, -1, 25, 26,
1408 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1409 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1410 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1411 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1412 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1413 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1414 -1, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1415 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1416 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1417 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1418 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1419 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1420 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1421 72, 73, 74, 75, -1, 77, -1, -1, -1, -1,
1422 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1423 -1, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1424 -1, -1, -1, -1, -1, -1, -1, 109, 25, 26,
1425 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1426 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1427 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1428 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1429 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1430 77, -1, -1, -1, -1, -1, -1, -1, 0, -1,
1431 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1432 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1433 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1434 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1435 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1436 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1437 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1438 72, 73, 74, 75, -1, 77, 3, 4, 5, 6,
1439 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1440 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
1441 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1442 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1443 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1444 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1445 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1446 77, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1447 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1448 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1449 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1450 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1451 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1452 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1453 72, 73, 74, 75, -1, 77, 4, 5, 6, -1,
1454 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
1455 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1456 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1457 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1458 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1459 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1460 68, 69, 70, -1, 72, 73, 74, -1, -1, 77,
Alexis Hetuad527752015-07-07 13:31:44 -04001461 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1462 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1463 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1464 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1465 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1466 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu407813b2016-02-24 16:46:13 -05001467 70, -1, 72, 73, 74, -1, 76, 77, 10, 11,
1468 12, 13, 82, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001469 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1470 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1471 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1472 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1473 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
Alexis Hetu407813b2016-02-24 16:46:13 -05001474 72, 73, 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001475};
1476
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001477 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1478 symbol of state STATE-NUM. */
John Bauman66b8ab22014-05-06 15:57:45 -04001479static const yytype_uint8 yystos[] =
1480{
1481 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001482 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001483 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001484 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1485 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1486 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001487 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001488 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
Alexis Hetuad527752015-07-07 13:31:44 -04001489 44, 76, 171, 174, 176, 40, 41, 76, 108, 104,
1490 114, 220, 105, 111, 9, 40, 41, 42, 165, 166,
1491 172, 111, 114, 76, 174, 76, 114, 158, 175, 180,
1492 174, 106, 0, 218, 174, 180, 108, 184, 76, 178,
Alexis Hetu407813b2016-02-24 16:46:13 -05001493 179, 108, 200, 165, 164, 167, 175, 166, 76, 104,
Alexis Hetuad527752015-07-07 13:31:44 -04001494 106, 113, 108, 3, 173, 175, 185, 186, 76, 78,
1495 79, 80, 81, 82, 85, 86, 104, 107, 115, 116,
1496 117, 118, 129, 130, 131, 133, 134, 135, 136, 137,
1497 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1498 148, 149, 150, 151, 152, 153, 157, 180, 114, 183,
Alexis Hetu407813b2016-02-24 16:46:13 -05001499 185, 113, 105, 111, 14, 15, 16, 18, 19, 20,
1500 21, 22, 23, 24, 56, 108, 109, 114, 140, 153,
1501 154, 156, 159, 160, 180, 190, 191, 192, 193, 201,
1502 202, 203, 205, 207, 209, 216, 76, 164, 167, 106,
1503 113, 107, 157, 154, 189, 175, 76, 187, 188, 109,
1504 186, 140, 140, 156, 85, 86, 106, 110, 105, 105,
1505 111, 55, 154, 104, 140, 119, 120, 121, 116, 118,
1506 83, 84, 87, 88, 122, 123, 89, 90, 126, 125,
1507 124, 91, 93, 92, 127, 107, 185, 109, 79, 80,
1508 179, 114, 114, 211, 104, 104, 114, 114, 156, 104,
1509 157, 112, 104, 109, 194, 94, 95, 96, 97, 98,
1510 99, 100, 101, 102, 103, 113, 155, 111, 114, 109,
1511 191, 106, 107, 157, 189, 113, 107, 187, 106, 111,
1512 114, 76, 114, 105, 132, 156, 76, 82, 135, 154,
1513 140, 140, 140, 142, 142, 143, 143, 144, 144, 144,
1514 144, 145, 145, 146, 147, 148, 149, 150, 151, 156,
1515 109, 197, 198, 199, 212, 156, 114, 156, 112, 210,
1516 201, 154, 154, 157, 113, 107, 189, 113, 114, 157,
1517 188, 106, 114, 107, 112, 56, 200, 192, 190, 202,
1518 213, 105, 105, 156, 170, 173, 208, 195, 107, 189,
1519 113, 189, 107, 157, 154, 104, 208, 214, 215, 197,
1520 204, 206, 76, 105, 109, 189, 107, 156, 114, 105,
1521 17, 193, 113, 192, 196, 200, 114, 105, 156, 196,
Alexis Hetuad527752015-07-07 13:31:44 -04001522 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001523};
1524
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001525 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1526static const yytype_uint8 yyr1[] =
1527{
1528 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
1529 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
1530 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
1531 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
1532 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
1533 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
1534 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
1535 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
1536 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
1537 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
1538 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
1539 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
1540 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
1541 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
1542 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
1543 178, 178, 179, 179, 179, 180, 180, 180, 181, 181,
1544 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
1545 181, 181, 181, 181, 181, 181, 181, 181, 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, 183, 182, 184, 182, 185, 185, 186, 186,
1549 187, 187, 188, 188, 189, 190, 191, 191, 192, 192,
1550 192, 192, 192, 192, 192, 193, 194, 195, 193, 196,
1551 196, 198, 197, 199, 197, 200, 200, 201, 201, 202,
1552 202, 203, 204, 204, 206, 205, 207, 207, 208, 208,
1553 210, 209, 211, 209, 212, 209, 213, 213, 214, 214,
1554 215, 215, 216, 216, 216, 216, 216, 217, 217, 218,
1555 218, 220, 219
1556};
John Bauman66b8ab22014-05-06 15:57:45 -04001557
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001558 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1559static const yytype_uint8 yyr2[] =
1560{
1561 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
1562 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
1563 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
1564 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
1565 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
1566 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
1567 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
1568 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1569 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
1570 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
1571 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
1572 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
1573 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
1574 2, 1, 2, 1, 1, 2, 2, 3, 1, 1,
1575 1, 2, 2, 1, 1, 2, 1, 1, 1, 4,
1576 1, 3, 1, 3, 3, 1, 3, 4, 1, 1,
1577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1578 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 6, 0, 5, 1, 2, 3, 4,
1582 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
1583 1, 1, 1, 1, 1, 2, 0, 0, 5, 1,
1584 1, 0, 2, 0, 2, 2, 3, 1, 2, 1,
1585 2, 5, 3, 1, 0, 6, 3, 2, 1, 4,
1586 0, 6, 0, 8, 0, 7, 1, 1, 1, 0,
1587 2, 3, 2, 2, 2, 3, 2, 1, 2, 1,
1588 1, 0, 3
1589};
John Bauman66b8ab22014-05-06 15:57:45 -04001590
1591
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001592#define yyerrok (yyerrstatus = 0)
1593#define yyclearin (yychar = YYEMPTY)
1594#define YYEMPTY (-2)
1595#define YYEOF 0
John Bauman66b8ab22014-05-06 15:57:45 -04001596
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001597#define YYACCEPT goto yyacceptlab
1598#define YYABORT goto yyabortlab
1599#define YYERROR goto yyerrorlab
1600
John Bauman66b8ab22014-05-06 15:57:45 -04001601
1602#define YYRECOVERING() (!!yyerrstatus)
1603
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001604#define YYBACKUP(Token, Value) \
1605do \
1606 if (yychar == YYEMPTY) \
1607 { \
1608 yychar = (Token); \
1609 yylval = (Value); \
1610 YYPOPSTACK (yylen); \
1611 yystate = *yyssp; \
1612 goto yybackup; \
1613 } \
1614 else \
1615 { \
1616 yyerror (&yylloc, context, yyscanner, YY_("syntax error: cannot back up")); \
1617 YYERROR; \
1618 } \
1619while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001620
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001621/* Error token number */
1622#define YYTERROR 1
1623#define YYERRCODE 256
John Bauman66b8ab22014-05-06 15:57:45 -04001624
1625
1626/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1627 If N is 0, then set CURRENT to the empty location which ends
1628 the previous symbol: RHS[0] (always defined). */
1629
John Bauman66b8ab22014-05-06 15:57:45 -04001630#ifndef YYLLOC_DEFAULT
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001631# define YYLLOC_DEFAULT(Current, Rhs, N) \
1632 do \
1633 if (N) \
1634 { \
1635 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1636 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1637 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1638 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1639 } \
1640 else \
1641 { \
1642 (Current).first_line = (Current).last_line = \
1643 YYRHSLOC (Rhs, 0).last_line; \
1644 (Current).first_column = (Current).last_column = \
1645 YYRHSLOC (Rhs, 0).last_column; \
1646 } \
1647 while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001648#endif
1649
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001650#define YYRHSLOC(Rhs, K) ((Rhs)[K])
John Bauman66b8ab22014-05-06 15:57:45 -04001651
John Bauman66b8ab22014-05-06 15:57:45 -04001652
1653/* Enable debugging if requested. */
1654#if YYDEBUG
1655
1656# ifndef YYFPRINTF
1657# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1658# define YYFPRINTF fprintf
1659# endif
1660
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001661# define YYDPRINTF(Args) \
1662do { \
1663 if (yydebug) \
1664 YYFPRINTF Args; \
1665} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001666
1667
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001668/* YY_LOCATION_PRINT -- Print the location on the stream.
1669 This macro was not mandated originally: define only if we know
1670 we won't break user code: when these are the locations we know. */
John Bauman66b8ab22014-05-06 15:57:45 -04001671
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001672#ifndef YY_LOCATION_PRINT
1673# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1674
1675/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1676
1677YY_ATTRIBUTE_UNUSED
1678static unsigned
1679yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
John Bauman66b8ab22014-05-06 15:57:45 -04001680{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001681 unsigned res = 0;
1682 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1683 if (0 <= yylocp->first_line)
1684 {
1685 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1686 if (0 <= yylocp->first_column)
1687 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1688 }
1689 if (0 <= yylocp->last_line)
1690 {
1691 if (yylocp->first_line < yylocp->last_line)
1692 {
1693 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1694 if (0 <= end_col)
1695 res += YYFPRINTF (yyo, ".%d", end_col);
1696 }
1697 else if (0 <= end_col && yylocp->first_column < end_col)
1698 res += YYFPRINTF (yyo, "-%d", end_col);
1699 }
1700 return res;
1701 }
1702
1703# define YY_LOCATION_PRINT(File, Loc) \
1704 yy_location_print_ (File, &(Loc))
1705
1706# else
1707# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1708# endif
1709#endif
1710
1711
1712# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1713do { \
1714 if (yydebug) \
1715 { \
1716 YYFPRINTF (stderr, "%s ", Title); \
1717 yy_symbol_print (stderr, \
1718 Type, Value, Location, context, yyscanner); \
1719 YYFPRINTF (stderr, "\n"); \
1720 } \
1721} while (0)
1722
1723
1724/*----------------------------------------.
1725| Print this symbol's value on YYOUTPUT. |
1726`----------------------------------------*/
1727
1728static void
1729yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void* yyscanner)
1730{
1731 FILE *yyo = yyoutput;
1732 YYUSE (yyo);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001733 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001734 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001735 YYUSE (yyscanner);
1736 if (!yyvaluep)
1737 return;
John Bauman66b8ab22014-05-06 15:57:45 -04001738# ifdef YYPRINT
1739 if (yytype < YYNTOKENS)
1740 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
John Bauman66b8ab22014-05-06 15:57:45 -04001741# endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001742 YYUSE (yytype);
John Bauman66b8ab22014-05-06 15:57:45 -04001743}
1744
1745
1746/*--------------------------------.
1747| Print this symbol on YYOUTPUT. |
1748`--------------------------------*/
1749
John Bauman66b8ab22014-05-06 15:57:45 -04001750static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001751yy_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 -04001752{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001753 YYFPRINTF (yyoutput, "%s %s (",
1754 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
John Bauman66b8ab22014-05-06 15:57:45 -04001755
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001756 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1757 YYFPRINTF (yyoutput, ": ");
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001758 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001759 YYFPRINTF (yyoutput, ")");
1760}
1761
1762/*------------------------------------------------------------------.
1763| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1764| TOP (included). |
1765`------------------------------------------------------------------*/
1766
John Bauman66b8ab22014-05-06 15:57:45 -04001767static void
1768yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
John Bauman66b8ab22014-05-06 15:57:45 -04001769{
1770 YYFPRINTF (stderr, "Stack now");
1771 for (; yybottom <= yytop; yybottom++)
1772 {
1773 int yybot = *yybottom;
1774 YYFPRINTF (stderr, " %d", yybot);
1775 }
1776 YYFPRINTF (stderr, "\n");
1777}
1778
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001779# define YY_STACK_PRINT(Bottom, Top) \
1780do { \
1781 if (yydebug) \
1782 yy_stack_print ((Bottom), (Top)); \
1783} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001784
1785
1786/*------------------------------------------------.
1787| Report that the YYRULE is going to be reduced. |
1788`------------------------------------------------*/
1789
John Bauman66b8ab22014-05-06 15:57:45 -04001790static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001791yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04001792{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001793 unsigned long int yylno = yyrline[yyrule];
John Bauman66b8ab22014-05-06 15:57:45 -04001794 int yynrhs = yyr2[yyrule];
1795 int yyi;
John Bauman66b8ab22014-05-06 15:57:45 -04001796 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001797 yyrule - 1, yylno);
John Bauman66b8ab22014-05-06 15:57:45 -04001798 /* The symbols being reduced. */
1799 for (yyi = 0; yyi < yynrhs; yyi++)
1800 {
1801 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001802 yy_symbol_print (stderr,
1803 yystos[yyssp[yyi + 1 - yynrhs]],
1804 &(yyvsp[(yyi + 1) - (yynrhs)])
1805 , &(yylsp[(yyi + 1) - (yynrhs)]) , context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04001806 YYFPRINTF (stderr, "\n");
1807 }
1808}
1809
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001810# define YY_REDUCE_PRINT(Rule) \
1811do { \
1812 if (yydebug) \
1813 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, yyscanner); \
1814} while (0)
John Bauman66b8ab22014-05-06 15:57:45 -04001815
1816/* Nonzero means print parse trace. It is left uninitialized so that
1817 multiple parsers can coexist. */
1818int yydebug;
1819#else /* !YYDEBUG */
1820# define YYDPRINTF(Args)
1821# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1822# define YY_STACK_PRINT(Bottom, Top)
1823# define YY_REDUCE_PRINT(Rule)
1824#endif /* !YYDEBUG */
1825
1826
1827/* YYINITDEPTH -- initial size of the parser's stacks. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001828#ifndef YYINITDEPTH
John Bauman66b8ab22014-05-06 15:57:45 -04001829# define YYINITDEPTH 200
1830#endif
1831
1832/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1833 if the built-in stack extension method is used).
1834
1835 Do not make this value too large; the results are undefined if
1836 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1837 evaluated with infinite-precision integer arithmetic. */
1838
1839#ifndef YYMAXDEPTH
1840# define YYMAXDEPTH 10000
1841#endif
1842
John Bauman66b8ab22014-05-06 15:57:45 -04001843
1844#if YYERROR_VERBOSE
1845
1846# ifndef yystrlen
1847# if defined __GLIBC__ && defined _STRING_H
1848# define yystrlen strlen
1849# else
1850/* Return the length of YYSTR. */
John Bauman66b8ab22014-05-06 15:57:45 -04001851static YYSIZE_T
1852yystrlen (const char *yystr)
John Bauman66b8ab22014-05-06 15:57:45 -04001853{
1854 YYSIZE_T yylen;
1855 for (yylen = 0; yystr[yylen]; yylen++)
1856 continue;
1857 return yylen;
1858}
1859# endif
1860# endif
1861
1862# ifndef yystpcpy
1863# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1864# define yystpcpy stpcpy
1865# else
1866/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1867 YYDEST. */
John Bauman66b8ab22014-05-06 15:57:45 -04001868static char *
1869yystpcpy (char *yydest, const char *yysrc)
John Bauman66b8ab22014-05-06 15:57:45 -04001870{
1871 char *yyd = yydest;
1872 const char *yys = yysrc;
1873
1874 while ((*yyd++ = *yys++) != '\0')
1875 continue;
1876
1877 return yyd - 1;
1878}
1879# endif
1880# endif
1881
1882# ifndef yytnamerr
1883/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1884 quotes and backslashes, so that it's suitable for yyerror. The
1885 heuristic is that double-quoting is unnecessary unless the string
1886 contains an apostrophe, a comma, or backslash (other than
1887 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1888 null, do not copy; instead, return the length of what the result
1889 would have been. */
1890static YYSIZE_T
1891yytnamerr (char *yyres, const char *yystr)
1892{
1893 if (*yystr == '"')
1894 {
1895 YYSIZE_T yyn = 0;
1896 char const *yyp = yystr;
1897
1898 for (;;)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001899 switch (*++yyp)
1900 {
1901 case '\'':
1902 case ',':
1903 goto do_not_strip_quotes;
John Bauman66b8ab22014-05-06 15:57:45 -04001904
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001905 case '\\':
1906 if (*++yyp != '\\')
1907 goto do_not_strip_quotes;
1908 /* Fall through. */
1909 default:
1910 if (yyres)
1911 yyres[yyn] = *yyp;
1912 yyn++;
1913 break;
John Bauman66b8ab22014-05-06 15:57:45 -04001914
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001915 case '"':
1916 if (yyres)
1917 yyres[yyn] = '\0';
1918 return yyn;
1919 }
John Bauman66b8ab22014-05-06 15:57:45 -04001920 do_not_strip_quotes: ;
1921 }
1922
1923 if (! yyres)
1924 return yystrlen (yystr);
1925
1926 return yystpcpy (yyres, yystr) - yyres;
1927}
1928# endif
1929
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001930/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1931 about the unexpected token YYTOKEN for the state stack whose top is
1932 YYSSP.
1933
1934 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1935 not large enough to hold the message. In that case, also set
1936 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1937 required number of bytes is too large to store. */
1938static int
1939yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1940 yytype_int16 *yyssp, int yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04001941{
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001942 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1943 YYSIZE_T yysize = yysize0;
1944 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1945 /* Internationalized format string. */
1946 const char *yyformat = YY_NULLPTR;
1947 /* Arguments of yyformat. */
1948 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1949 /* Number of reported tokens (one for the "unexpected", one per
1950 "expected"). */
1951 int yycount = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04001952
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001953 /* There are many possibilities here to consider:
1954 - If this state is a consistent state with a default action, then
1955 the only way this function was invoked is if the default action
1956 is an error action. In that case, don't check for expected
1957 tokens because there are none.
1958 - The only way there can be no lookahead present (in yychar) is if
1959 this state is a consistent state with a default action. Thus,
1960 detecting the absence of a lookahead is sufficient to determine
1961 that there is no unexpected or expected token to report. In that
1962 case, just report a simple "syntax error".
1963 - Don't assume there isn't a lookahead just because this state is a
1964 consistent state with a default action. There might have been a
1965 previous inconsistent state, consistent state with a non-default
1966 action, or user semantic action that manipulated yychar.
1967 - Of course, the expected token list depends on states to have
1968 correct lookahead information, and it depends on the parser not
1969 to perform extra reductions after fetching a lookahead from the
1970 scanner and before detecting a syntax error. Thus, state merging
1971 (from LALR or IELR) and default reductions corrupt the expected
1972 token list. However, the list is correct for canonical LR with
1973 one exception: it will still contain any token that will not be
1974 accepted due to an error action in a later state.
1975 */
1976 if (yytoken != YYEMPTY)
John Bauman66b8ab22014-05-06 15:57:45 -04001977 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001978 int yyn = yypact[*yyssp];
1979 yyarg[yycount++] = yytname[yytoken];
1980 if (!yypact_value_is_default (yyn))
1981 {
1982 /* Start YYX at -YYN if negative to avoid negative indexes in
1983 YYCHECK. In other words, skip the first -YYN actions for
1984 this state because they are default actions. */
1985 int yyxbegin = yyn < 0 ? -yyn : 0;
1986 /* Stay within bounds of both yycheck and yytname. */
1987 int yychecklim = YYLAST - yyn + 1;
1988 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1989 int yyx;
John Bauman66b8ab22014-05-06 15:57:45 -04001990
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04001991 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1992 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1993 && !yytable_value_is_error (yytable[yyx + yyn]))
1994 {
1995 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1996 {
1997 yycount = 1;
1998 yysize = yysize0;
1999 break;
2000 }
2001 yyarg[yycount++] = yytname[yyx];
2002 {
2003 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
2004 if (! (yysize <= yysize1
2005 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2006 return 2;
2007 yysize = yysize1;
2008 }
2009 }
2010 }
John Bauman66b8ab22014-05-06 15:57:45 -04002011 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002012
2013 switch (yycount)
2014 {
2015# define YYCASE_(N, S) \
2016 case N: \
2017 yyformat = S; \
2018 break
2019 YYCASE_(0, YY_("syntax error"));
2020 YYCASE_(1, YY_("syntax error, unexpected %s"));
2021 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2022 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2023 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2024 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2025# undef YYCASE_
2026 }
2027
2028 {
2029 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2030 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2031 return 2;
2032 yysize = yysize1;
2033 }
2034
2035 if (*yymsg_alloc < yysize)
2036 {
2037 *yymsg_alloc = 2 * yysize;
2038 if (! (yysize <= *yymsg_alloc
2039 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2040 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2041 return 1;
2042 }
2043
2044 /* Avoid sprintf, as that infringes on the user's name space.
2045 Don't have undefined behavior even if the translation
2046 produced a string with the wrong number of "%s"s. */
2047 {
2048 char *yyp = *yymsg;
2049 int yyi = 0;
2050 while ((*yyp = *yyformat) != '\0')
2051 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2052 {
2053 yyp += yytnamerr (yyp, yyarg[yyi++]);
2054 yyformat += 2;
2055 }
2056 else
2057 {
2058 yyp++;
2059 yyformat++;
2060 }
2061 }
2062 return 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002063}
2064#endif /* YYERROR_VERBOSE */
John Bauman66b8ab22014-05-06 15:57:45 -04002065
2066/*-----------------------------------------------.
2067| Release the memory associated to this symbol. |
2068`-----------------------------------------------*/
2069
John Bauman66b8ab22014-05-06 15:57:45 -04002070static void
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002071yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002072{
2073 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002074 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002075 YYUSE (context);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002076 YYUSE (yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002077 if (!yymsg)
2078 yymsg = "Deleting";
2079 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2080
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002081 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2082 YYUSE (yytype);
2083 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04002084}
2085
John Bauman66b8ab22014-05-06 15:57:45 -04002086
2087
2088
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002089/*----------.
2090| yyparse. |
2091`----------*/
John Bauman66b8ab22014-05-06 15:57:45 -04002092
John Bauman66b8ab22014-05-06 15:57:45 -04002093int
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002094yyparse (TParseContext* context, void* yyscanner)
John Bauman66b8ab22014-05-06 15:57:45 -04002095{
2096/* The lookahead symbol. */
2097int yychar;
2098
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002099
John Bauman66b8ab22014-05-06 15:57:45 -04002100/* The semantic value of the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002101/* Default value used for initialization, for pacifying older GCCs
2102 or non-GCC compilers. */
2103YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
2104YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
John Bauman66b8ab22014-05-06 15:57:45 -04002105
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002106/* Location data for the lookahead symbol. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002107static YYLTYPE yyloc_default
2108# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2109 = { 1, 1, 1, 1 }
2110# endif
2111;
2112YYLTYPE yylloc = yyloc_default;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002113
John Bauman66b8ab22014-05-06 15:57:45 -04002114 /* Number of syntax errors so far. */
2115 int yynerrs;
2116
2117 int yystate;
2118 /* Number of tokens to shift before error messages enabled. */
2119 int yyerrstatus;
2120
2121 /* The stacks and their tools:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002122 'yyss': related to states.
2123 'yyvs': related to semantic values.
2124 'yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002125
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002126 Refer to the stacks through separate pointers, to allow yyoverflow
John Bauman66b8ab22014-05-06 15:57:45 -04002127 to reallocate them elsewhere. */
2128
2129 /* The state stack. */
2130 yytype_int16 yyssa[YYINITDEPTH];
2131 yytype_int16 *yyss;
2132 yytype_int16 *yyssp;
2133
2134 /* The semantic value stack. */
2135 YYSTYPE yyvsa[YYINITDEPTH];
2136 YYSTYPE *yyvs;
2137 YYSTYPE *yyvsp;
2138
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002139 /* The location stack. */
2140 YYLTYPE yylsa[YYINITDEPTH];
2141 YYLTYPE *yyls;
2142 YYLTYPE *yylsp;
2143
2144 /* The locations where the error started and ended. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002145 YYLTYPE yyerror_range[3];
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002146
John Bauman66b8ab22014-05-06 15:57:45 -04002147 YYSIZE_T yystacksize;
2148
2149 int yyn;
2150 int yyresult;
2151 /* Lookahead token as an internal (translated) token number. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002152 int yytoken = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04002153 /* The variables used to return semantic value and location from the
2154 action routines. */
2155 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002156 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002157
2158#if YYERROR_VERBOSE
2159 /* Buffer for error messages, and its allocated size. */
2160 char yymsgbuf[128];
2161 char *yymsg = yymsgbuf;
2162 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2163#endif
2164
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002165#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002166
2167 /* The number of symbols on the RHS of the reduced rule.
2168 Keep to zero when no symbol should be popped. */
2169 int yylen = 0;
2170
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002171 yyssp = yyss = yyssa;
2172 yyvsp = yyvs = yyvsa;
2173 yylsp = yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002174 yystacksize = YYINITDEPTH;
2175
2176 YYDPRINTF ((stderr, "Starting parse\n"));
2177
2178 yystate = 0;
2179 yyerrstatus = 0;
2180 yynerrs = 0;
2181 yychar = YYEMPTY; /* Cause a token to be read. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002182 yylsp[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002183 goto yysetstate;
2184
2185/*------------------------------------------------------------.
2186| yynewstate -- Push a new state, which is found in yystate. |
2187`------------------------------------------------------------*/
2188 yynewstate:
2189 /* In all cases, when you get here, the value and location stacks
2190 have just been pushed. So pushing a state here evens the stacks. */
2191 yyssp++;
2192
2193 yysetstate:
2194 *yyssp = yystate;
2195
2196 if (yyss + yystacksize - 1 <= yyssp)
2197 {
2198 /* Get the current used size of the three stacks, in elements. */
2199 YYSIZE_T yysize = yyssp - yyss + 1;
2200
2201#ifdef yyoverflow
2202 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002203 /* Give user a chance to reallocate the stack. Use copies of
2204 these so that the &'s don't force the real ones into
2205 memory. */
2206 YYSTYPE *yyvs1 = yyvs;
2207 yytype_int16 *yyss1 = yyss;
2208 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002209
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002210 /* Each stack pointer address is followed by the size of the
2211 data in use in that stack, in bytes. This used to be a
2212 conditional around just the two extra args, but that might
2213 be undefined if yyoverflow is a macro. */
2214 yyoverflow (YY_("memory exhausted"),
2215 &yyss1, yysize * sizeof (*yyssp),
2216 &yyvs1, yysize * sizeof (*yyvsp),
2217 &yyls1, yysize * sizeof (*yylsp),
2218 &yystacksize);
John Bauman66b8ab22014-05-06 15:57:45 -04002219
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002220 yyls = yyls1;
2221 yyss = yyss1;
2222 yyvs = yyvs1;
John Bauman66b8ab22014-05-06 15:57:45 -04002223 }
2224#else /* no yyoverflow */
2225# ifndef YYSTACK_RELOCATE
2226 goto yyexhaustedlab;
2227# else
2228 /* Extend the stack our own way. */
2229 if (YYMAXDEPTH <= yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002230 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002231 yystacksize *= 2;
2232 if (YYMAXDEPTH < yystacksize)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002233 yystacksize = YYMAXDEPTH;
John Bauman66b8ab22014-05-06 15:57:45 -04002234
2235 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002236 yytype_int16 *yyss1 = yyss;
2237 union yyalloc *yyptr =
2238 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2239 if (! yyptr)
2240 goto yyexhaustedlab;
2241 YYSTACK_RELOCATE (yyss_alloc, yyss);
2242 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2243 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002244# undef YYSTACK_RELOCATE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002245 if (yyss1 != yyssa)
2246 YYSTACK_FREE (yyss1);
John Bauman66b8ab22014-05-06 15:57:45 -04002247 }
2248# endif
2249#endif /* no yyoverflow */
2250
2251 yyssp = yyss + yysize - 1;
2252 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002253 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002254
2255 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002256 (unsigned long int) yystacksize));
John Bauman66b8ab22014-05-06 15:57:45 -04002257
2258 if (yyss + yystacksize - 1 <= yyssp)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002259 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04002260 }
2261
2262 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2263
2264 if (yystate == YYFINAL)
2265 YYACCEPT;
2266
2267 goto yybackup;
2268
2269/*-----------.
2270| yybackup. |
2271`-----------*/
2272yybackup:
2273
2274 /* Do appropriate processing given the current state. Read a
2275 lookahead token if we need one and don't already have one. */
2276
2277 /* First try to decide what to do without reference to lookahead token. */
2278 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002279 if (yypact_value_is_default (yyn))
John Bauman66b8ab22014-05-06 15:57:45 -04002280 goto yydefault;
2281
2282 /* Not known => get a lookahead token if don't already have one. */
2283
2284 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2285 if (yychar == YYEMPTY)
2286 {
2287 YYDPRINTF ((stderr, "Reading a token: "));
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002288 yychar = yylex (&yylval, &yylloc, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04002289 }
2290
2291 if (yychar <= YYEOF)
2292 {
2293 yychar = yytoken = YYEOF;
2294 YYDPRINTF ((stderr, "Now at end of input.\n"));
2295 }
2296 else
2297 {
2298 yytoken = YYTRANSLATE (yychar);
2299 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2300 }
2301
2302 /* If the proper action on seeing token YYTOKEN is to reduce or to
2303 detect an error, take that action. */
2304 yyn += yytoken;
2305 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2306 goto yydefault;
2307 yyn = yytable[yyn];
2308 if (yyn <= 0)
2309 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002310 if (yytable_value_is_error (yyn))
2311 goto yyerrlab;
John Bauman66b8ab22014-05-06 15:57:45 -04002312 yyn = -yyn;
2313 goto yyreduce;
2314 }
2315
2316 /* Count tokens shifted since error; after three, turn off error
2317 status. */
2318 if (yyerrstatus)
2319 yyerrstatus--;
2320
2321 /* Shift the lookahead token. */
2322 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2323
2324 /* Discard the shifted token. */
2325 yychar = YYEMPTY;
2326
2327 yystate = yyn;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002328 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04002329 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002330 YY_IGNORE_MAYBE_UNINITIALIZED_END
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002331 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002332 goto yynewstate;
2333
2334
2335/*-----------------------------------------------------------.
2336| yydefault -- do the default action for the current state. |
2337`-----------------------------------------------------------*/
2338yydefault:
2339 yyn = yydefact[yystate];
2340 if (yyn == 0)
2341 goto yyerrlab;
2342 goto yyreduce;
2343
2344
2345/*-----------------------------.
2346| yyreduce -- Do a reduction. |
2347`-----------------------------*/
2348yyreduce:
2349 /* yyn is the number of a rule to reduce with. */
2350 yylen = yyr2[yyn];
2351
2352 /* If YYLEN is nonzero, implement the default value of the action:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002353 '$$ = $1'.
John Bauman66b8ab22014-05-06 15:57:45 -04002354
2355 Otherwise, the following line sets YYVAL to garbage.
2356 This behavior is undocumented and Bison
2357 users should not rely upon it. Assigning to YYVAL
2358 unconditionally makes the parser a bit smaller, and it avoids a
2359 GCC warning that YYVAL may be used uninitialized. */
2360 yyval = yyvsp[1-yylen];
2361
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002362 /* Default location. */
2363 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002364 YY_REDUCE_PRINT (yyn);
2365 switch (yyn)
2366 {
2367 case 2:
2368
2369 {
2370 // The symbol table search was done in the lexical phase
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002371 const TVariable *variable = context->getNamedVariable((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
John Bauman66b8ab22014-05-06 15:57:45 -04002372
2373 // don't delete $1.string, it's used by error recovery, and the pool
2374 // pop will reclaim the memory
2375
Nicolas Capens7cbb1de2017-12-22 08:54:18 -05002376 // Constants which aren't indexable arrays can be propagated by value.
Nicolas Capens0863f0d2016-04-10 00:30:02 -04002377 ConstantUnion *constArray = variable->getConstPointer();
Nicolas Capens7cbb1de2017-12-22 08:54:18 -05002378 if (constArray && variable->getType().getArraySize() <= 1) {
John Bauman66b8ab22014-05-06 15:57:45 -04002379 TType t(variable->getType());
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002380 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002381 } else
2382 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2383 variable->getName(),
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002384 variable->getType(), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002385 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002386
John Bauman66b8ab22014-05-06 15:57:45 -04002387 break;
2388
2389 case 3:
2390
2391 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002392 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002393 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002394
John Bauman66b8ab22014-05-06 15:57:45 -04002395 break;
2396
2397 case 4:
2398
2399 {
John Bauman66b8ab22014-05-06 15:57:45 -04002400 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002401 unionArray->setIConst((yyvsp[0].lex).i);
2402 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002403 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002404
John Bauman66b8ab22014-05-06 15:57:45 -04002405 break;
2406
2407 case 5:
2408
2409 {
2410 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002411 unionArray->setUConst((yyvsp[0].lex).u);
2412 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[0]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002413 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002414
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002415 break;
2416
2417 case 6:
2418
2419 {
2420 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002421 unionArray->setFConst((yyvsp[0].lex).f);
2422 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002423 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002424
John Bauman66b8ab22014-05-06 15:57:45 -04002425 break;
2426
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002427 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002428
2429 {
2430 ConstantUnion *unionArray = new ConstantUnion[1];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002431 unionArray->setBConst((yyvsp[0].lex).b);
2432 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002433 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002434
John Bauman66b8ab22014-05-06 15:57:45 -04002435 break;
2436
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002437 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002438
2439 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002440 (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002441 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002442
John Bauman66b8ab22014-05-06 15:57:45 -04002443 break;
2444
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002445 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002446
2447 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002448 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002449 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002450
John Bauman66b8ab22014-05-06 15:57:45 -04002451 break;
2452
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002453 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002454
2455 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002456 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04002457 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002458
John Bauman66b8ab22014-05-06 15:57:45 -04002459 break;
2460
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002461 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002462
2463 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002464 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002465 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002466
John Bauman66b8ab22014-05-06 15:57:45 -04002467 break;
2468
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002469 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002470
2471 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002472 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002473 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002474
John Bauman66b8ab22014-05-06 15:57:45 -04002475 break;
2476
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002477 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002478
2479 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002480 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002481 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002482
John Bauman66b8ab22014-05-06 15:57:45 -04002483 break;
2484
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002485 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002486
2487 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002488 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04002489 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002490
John Bauman66b8ab22014-05-06 15:57:45 -04002491 break;
2492
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002493 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002494
2495 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002496 if (context->integerErrorCheck((yyvsp[0].interm.intermTypedNode), "[]"))
John Bauman66b8ab22014-05-06 15:57:45 -04002497 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002498 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002499 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002500
John Bauman66b8ab22014-05-06 15:57:45 -04002501 break;
2502
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002503 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002504
2505 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002506 bool fatalError = false;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002507 (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 -04002508 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002509 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002510 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002511 }
John Bauman66b8ab22014-05-06 15:57:45 -04002512 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002513
John Bauman66b8ab22014-05-06 15:57:45 -04002514 break;
2515
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002516 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002517
2518 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002519 (yyval.interm) = (yyvsp[0].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002520 (yyval.interm).nodePair.node2 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002521 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002522
John Bauman66b8ab22014-05-06 15:57:45 -04002523 break;
2524
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002525 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002526
2527 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002528 ES3_ONLY("", (yylsp[0]), "methods");
2529 (yyval.interm) = (yyvsp[0].interm);
2530 (yyval.interm).nodePair.node2 = (yyvsp[-2].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002531 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002532
John Bauman66b8ab22014-05-06 15:57:45 -04002533 break;
2534
John Bauman66b8ab22014-05-06 15:57:45 -04002535 case 19:
2536
2537 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002538 (yyval.interm) = (yyvsp[-1].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002539 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002540
John Bauman66b8ab22014-05-06 15:57:45 -04002541 break;
2542
2543 case 20:
2544
2545 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002546 (yyval.interm) = (yyvsp[-1].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002547 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002548
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002549 break;
2550
2551 case 21:
2552
2553 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002554 (yyval.interm).function = (yyvsp[-1].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002555 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002556 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002557
John Bauman66b8ab22014-05-06 15:57:45 -04002558 break;
2559
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002560 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002561
2562 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002563 (yyval.interm).function = (yyvsp[0].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002564 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002565 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002566
John Bauman66b8ab22014-05-06 15:57:45 -04002567 break;
2568
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002569 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002570
2571 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002572 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2573 (yyvsp[-1].interm.function)->addParameter(param);
2574 (yyval.interm).function = (yyvsp[-1].interm.function);
2575 (yyval.interm).nodePair.node1 = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002576 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002577
John Bauman66b8ab22014-05-06 15:57:45 -04002578 break;
2579
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002580 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002581
2582 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002583 TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
2584 (yyvsp[-2].interm).function->addParameter(param);
2585 (yyval.interm).function = (yyvsp[-2].interm).function;
2586 (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002587 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002588
John Bauman66b8ab22014-05-06 15:57:45 -04002589 break;
2590
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002591 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002592
2593 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002594 (yyval.interm.function) = (yyvsp[-1].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04002595 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002596
John Bauman66b8ab22014-05-06 15:57:45 -04002597 break;
2598
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002599 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002600
2601 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002602 if ((yyvsp[0].interm.type).array) {
2603 ES3_ONLY("[]", (yylsp[0]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002604 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002605 (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002606 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002607
John Bauman66b8ab22014-05-06 15:57:45 -04002608 break;
2609
John Bauman66b8ab22014-05-06 15:57:45 -04002610 case 27:
2611
2612 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002613 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002614 context->recover();
2615 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002616 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04002617 (yyval.interm.function) = function;
2618 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002619
John Bauman66b8ab22014-05-06 15:57:45 -04002620 break;
2621
2622 case 28:
2623
2624 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002625 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002626 context->recover();
2627 TType type(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002628 TFunction *function = new TFunction((yyvsp[0].lex).string, type);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002629 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002630 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002631
John Bauman66b8ab22014-05-06 15:57:45 -04002632 break;
2633
2634 case 29:
2635
2636 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002637 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002638 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002639
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002640 break;
2641
2642 case 30:
2643
2644 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002645 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002646 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002647
John Bauman66b8ab22014-05-06 15:57:45 -04002648 break;
2649
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002650 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002651
2652 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002653 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002654 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002655
John Bauman66b8ab22014-05-06 15:57:45 -04002656 break;
2657
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002658 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002659
2660 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002661 if ((yyvsp[-1].interm).op != EOpNull) {
2662 (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002663 } else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002664 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002665 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002666
John Bauman66b8ab22014-05-06 15:57:45 -04002667 break;
2668
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002669 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002670
Alexis Hetu253fdd12015-07-07 15:12:46 -04002671 { (yyval.interm).op = EOpNull; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002672
John Bauman66b8ab22014-05-06 15:57:45 -04002673 break;
2674
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002675 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002676
Alexis Hetu253fdd12015-07-07 15:12:46 -04002677 { (yyval.interm).op = EOpNegative; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002678
John Bauman66b8ab22014-05-06 15:57:45 -04002679 break;
2680
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002681 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002682
Alexis Hetu253fdd12015-07-07 15:12:46 -04002683 { (yyval.interm).op = EOpLogicalNot; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002684
John Bauman66b8ab22014-05-06 15:57:45 -04002685 break;
2686
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002687 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002688
Alexis Hetu17809052015-05-13 11:28:22 -04002689 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002690 ES3_ONLY("~", (yylsp[0]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002691 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002692 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002693
John Bauman66b8ab22014-05-06 15:57:45 -04002694 break;
2695
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002696 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002697
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002698 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2699
Alexis Hetu17809052015-05-13 11:28:22 -04002700 break;
2701
2702 case 38:
2703
John Bauman66b8ab22014-05-06 15:57:45 -04002704 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002705 FRAG_VERT_ONLY("*", (yylsp[-1]));
2706 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002707 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002708
John Bauman66b8ab22014-05-06 15:57:45 -04002709 break;
2710
Alexis Hetu17809052015-05-13 11:28:22 -04002711 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002712
2713 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002714 FRAG_VERT_ONLY("/", (yylsp[-1]));
2715 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002716 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002717
John Bauman66b8ab22014-05-06 15:57:45 -04002718 break;
2719
Alexis Hetu17809052015-05-13 11:28:22 -04002720 case 40:
2721
2722 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002723 FRAG_VERT_ONLY("%", (yylsp[-1]));
2724 ES3_ONLY("%", (yylsp[-1]), "integer modulus operator");
2725 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002726 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002727
Alexis Hetu17809052015-05-13 11:28:22 -04002728 break;
2729
2730 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002731
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002732 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2733
John Bauman66b8ab22014-05-06 15:57:45 -04002734 break;
2735
Alexis Hetu17809052015-05-13 11:28:22 -04002736 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002737
2738 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002739 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002740 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002741
John Bauman66b8ab22014-05-06 15:57:45 -04002742 break;
2743
Alexis Hetu17809052015-05-13 11:28:22 -04002744 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002745
2746 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002747 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002748 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002749
John Bauman66b8ab22014-05-06 15:57:45 -04002750 break;
2751
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002752 case 44:
2753
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002754 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2755
Alexis Hetu17809052015-05-13 11:28:22 -04002756 break;
2757
2758 case 45:
2759
2760 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002761 ES3_ONLY("<<", (yylsp[-1]), "bit-wise operator");
2762 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002763 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002764
Alexis Hetu17809052015-05-13 11:28:22 -04002765 break;
2766
2767 case 46:
2768
2769 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002770 ES3_ONLY(">>", (yylsp[-1]), "bit-wise operator");
2771 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002772 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002773
Alexis Hetu17809052015-05-13 11:28:22 -04002774 break;
2775
2776 case 47:
2777
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002778 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2779
Alexis Hetu17809052015-05-13 11:28:22 -04002780 break;
2781
2782 case 48:
2783
John Bauman66b8ab22014-05-06 15:57:45 -04002784 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002785 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002786 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002787
John Bauman66b8ab22014-05-06 15:57:45 -04002788 break;
2789
Alexis Hetu17809052015-05-13 11:28:22 -04002790 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002791
2792 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002793 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002794 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002795
John Bauman66b8ab22014-05-06 15:57:45 -04002796 break;
2797
Alexis Hetu17809052015-05-13 11:28:22 -04002798 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002799
2800 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002801 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002802 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002803
John Bauman66b8ab22014-05-06 15:57:45 -04002804 break;
2805
Alexis Hetu17809052015-05-13 11:28:22 -04002806 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002807
2808 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002809 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002810 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002811
John Bauman66b8ab22014-05-06 15:57:45 -04002812 break;
2813
Alexis Hetu17809052015-05-13 11:28:22 -04002814 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002815
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002816 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2817
John Bauman66b8ab22014-05-06 15:57:45 -04002818 break;
2819
Alexis Hetu17809052015-05-13 11:28:22 -04002820 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002821
2822 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002823 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002824 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002825
John Bauman66b8ab22014-05-06 15:57:45 -04002826 break;
2827
Alexis Hetu17809052015-05-13 11:28:22 -04002828 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002829
2830 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002831 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002832 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002833
John Bauman66b8ab22014-05-06 15:57:45 -04002834 break;
2835
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002836 case 55:
2837
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002838 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2839
Alexis Hetu17809052015-05-13 11:28:22 -04002840 break;
2841
2842 case 56:
2843
2844 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002845 ES3_ONLY("&", (yylsp[-1]), "bit-wise operator");
2846 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002847 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002848
Alexis Hetu17809052015-05-13 11:28:22 -04002849 break;
2850
2851 case 57:
2852
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002853 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2854
Alexis Hetu17809052015-05-13 11:28:22 -04002855 break;
2856
2857 case 58:
2858
2859 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002860 ES3_ONLY("^", (yylsp[-1]), "bit-wise operator");
2861 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002862 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002863
Alexis Hetu17809052015-05-13 11:28:22 -04002864 break;
2865
2866 case 59:
2867
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002868 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2869
Alexis Hetu17809052015-05-13 11:28:22 -04002870 break;
2871
2872 case 60:
2873
2874 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002875 ES3_ONLY("|", (yylsp[-1]), "bit-wise operator");
2876 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04002877 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002878
Alexis Hetu17809052015-05-13 11:28:22 -04002879 break;
2880
2881 case 61:
2882
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002883 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2884
Alexis Hetu17809052015-05-13 11:28:22 -04002885 break;
2886
2887 case 62:
2888
John Bauman66b8ab22014-05-06 15:57:45 -04002889 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002890 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002891 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002892
John Bauman66b8ab22014-05-06 15:57:45 -04002893 break;
2894
Alexis Hetu17809052015-05-13 11:28:22 -04002895 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002896
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002897 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2898
John Bauman66b8ab22014-05-06 15:57:45 -04002899 break;
2900
Alexis Hetu17809052015-05-13 11:28:22 -04002901 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002902
2903 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002904 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002905 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002906
John Bauman66b8ab22014-05-06 15:57:45 -04002907 break;
2908
Alexis Hetu17809052015-05-13 11:28:22 -04002909 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04002910
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002911 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2912
John Bauman66b8ab22014-05-06 15:57:45 -04002913 break;
2914
Alexis Hetu17809052015-05-13 11:28:22 -04002915 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04002916
2917 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002918 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04002919 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002920
John Bauman66b8ab22014-05-06 15:57:45 -04002921 break;
2922
Alexis Hetu17809052015-05-13 11:28:22 -04002923 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04002924
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002925 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2926
John Bauman66b8ab22014-05-06 15:57:45 -04002927 break;
2928
Alexis Hetu17809052015-05-13 11:28:22 -04002929 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04002930
2931 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002932 (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 -04002933 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002934
John Bauman66b8ab22014-05-06 15:57:45 -04002935 break;
2936
Alexis Hetu17809052015-05-13 11:28:22 -04002937 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04002938
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002939 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
2940
John Bauman66b8ab22014-05-06 15:57:45 -04002941 break;
2942
Alexis Hetu17809052015-05-13 11:28:22 -04002943 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04002944
2945 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002946 if (context->lValueErrorCheck((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002947 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002948 (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 -04002949 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002950
John Bauman66b8ab22014-05-06 15:57:45 -04002951 break;
2952
Alexis Hetu17809052015-05-13 11:28:22 -04002953 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04002954
Alexis Hetu253fdd12015-07-07 15:12:46 -04002955 { (yyval.interm).op = EOpAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002956
John Bauman66b8ab22014-05-06 15:57:45 -04002957 break;
2958
Alexis Hetu17809052015-05-13 11:28:22 -04002959 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04002960
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002961 { FRAG_VERT_ONLY("*=", (yylsp[0])); (yyval.interm).op = EOpMulAssign; }
2962
John Bauman66b8ab22014-05-06 15:57:45 -04002963 break;
2964
Alexis Hetu17809052015-05-13 11:28:22 -04002965 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04002966
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002967 { FRAG_VERT_ONLY("/=", (yylsp[0])); (yyval.interm).op = EOpDivAssign; }
2968
John Bauman66b8ab22014-05-06 15:57:45 -04002969 break;
2970
Alexis Hetu17809052015-05-13 11:28:22 -04002971 case 74:
2972
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002973 { ES3_ONLY("%=", (yylsp[0]), "integer modulus operator");
2974 FRAG_VERT_ONLY("%=", (yylsp[0])); (yyval.interm).op = EOpIModAssign; }
2975
Alexis Hetu17809052015-05-13 11:28:22 -04002976 break;
2977
2978 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04002979
Alexis Hetu253fdd12015-07-07 15:12:46 -04002980 { (yyval.interm).op = EOpAddAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002981
John Bauman66b8ab22014-05-06 15:57:45 -04002982 break;
2983
Alexis Hetu17809052015-05-13 11:28:22 -04002984 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04002985
Alexis Hetu253fdd12015-07-07 15:12:46 -04002986 { (yyval.interm).op = EOpSubAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002987
John Bauman66b8ab22014-05-06 15:57:45 -04002988 break;
2989
Alexis Hetu17809052015-05-13 11:28:22 -04002990 case 77:
2991
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002992 { ES3_ONLY("<<=", (yylsp[0]), "bit-wise operator");
2993 FRAG_VERT_ONLY("<<=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04002994 (yyval.interm).op = EOpBitShiftLeftAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04002995
Alexis Hetu17809052015-05-13 11:28:22 -04002996 break;
2997
2998 case 78:
2999
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003000 { ES3_ONLY(">>=", (yylsp[0]), "bit-wise operator");
3001 FRAG_VERT_ONLY(">>=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003002 (yyval.interm).op = EOpBitShiftRightAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003003
Alexis Hetu17809052015-05-13 11:28:22 -04003004 break;
3005
3006 case 79:
3007
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003008 { ES3_ONLY("&=", (yylsp[0]), "bit-wise operator");
3009 FRAG_VERT_ONLY("&=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003010 (yyval.interm).op = EOpBitwiseAndAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003011
Alexis Hetu17809052015-05-13 11:28:22 -04003012 break;
3013
3014 case 80:
3015
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003016 { ES3_ONLY("^=", (yylsp[0]), "bit-wise operator");
3017 FRAG_VERT_ONLY("^=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003018 (yyval.interm).op = EOpBitwiseXorAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003019
Alexis Hetu17809052015-05-13 11:28:22 -04003020 break;
3021
3022 case 81:
3023
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003024 { ES3_ONLY("|=", (yylsp[0]), "bit-wise operator");
3025 FRAG_VERT_ONLY("|=", (yylsp[0]));
Alexis Hetu253fdd12015-07-07 15:12:46 -04003026 (yyval.interm).op = EOpBitwiseOrAssign; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003027
Alexis Hetu17809052015-05-13 11:28:22 -04003028 break;
3029
3030 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003031
3032 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003033 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003034 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003035
John Bauman66b8ab22014-05-06 15:57:45 -04003036 break;
3037
Alexis Hetu17809052015-05-13 11:28:22 -04003038 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003039
3040 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003041 (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003042 if ((yyval.interm.intermTypedNode) == 0) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003043 context->binaryOpError((yylsp[-1]), ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003044 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003045 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003046 }
3047 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003048
John Bauman66b8ab22014-05-06 15:57:45 -04003049 break;
3050
Alexis Hetu17809052015-05-13 11:28:22 -04003051 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003052
3053 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003054 if (context->constErrorCheck((yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003055 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003056 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04003057 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003058
John Bauman66b8ab22014-05-06 15:57:45 -04003059 break;
3060
Alexis Hetu17809052015-05-13 11:28:22 -04003061 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003062
3063 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003064 if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003065 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003066 (yyval.lex) = (yyvsp[-1].lex);
Alexis Hetua35d8232015-06-11 17:11:06 -04003067 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003068
Alexis Hetua35d8232015-06-11 17:11:06 -04003069 break;
3070
3071 case 86:
3072
3073 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003074 (yyval.interm.intermNode) = context->addFunctionPrototypeDeclaration(*((yyvsp[-1].interm).function), (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003075 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003076
John Bauman66b8ab22014-05-06 15:57:45 -04003077 break;
3078
Alexis Hetua35d8232015-06-11 17:11:06 -04003079 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003080
3081 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003082 TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate;
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003083 if (aggNode && aggNode->getOp() == EOpNull)
3084 aggNode->setOp(EOpDeclaration);
3085 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003086 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003087
John Bauman66b8ab22014-05-06 15:57:45 -04003088 break;
3089
Alexis Hetua35d8232015-06-11 17:11:06 -04003090 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003091
3092 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003093 if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) {
3094 context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type));
John Baumand4ae8632014-05-06 16:18:33 -04003095 context->recover();
3096 }
John Bauman66b8ab22014-05-06 15:57:45 -04003097 (yyval.interm.intermNode) = 0;
3098 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003099
John Bauman66b8ab22014-05-06 15:57:45 -04003100 break;
3101
Alexis Hetua35d8232015-06-11 17:11:06 -04003102 case 89:
3103
3104 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003105 ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks");
3106 (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 -04003107 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003108
Alexis Hetua35d8232015-06-11 17:11:06 -04003109 break;
3110
3111 case 90:
3112
3113 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003114 ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks");
3115 (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 -04003116 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003117
Alexis Hetua35d8232015-06-11 17:11:06 -04003118 break;
3119
3120 case 91:
3121
3122 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003123 ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks");
3124 (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 -04003125 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003126
Alexis Hetua35d8232015-06-11 17:11:06 -04003127 break;
3128
3129 case 92:
3130
3131 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003132 context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type));
Alexis Hetua35d8232015-06-11 17:11:06 -04003133 (yyval.interm.intermNode) = 0;
3134 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003135
Alexis Hetua35d8232015-06-11 17:11:06 -04003136 break;
3137
3138 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003139
3140 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003141 (yyval.interm).function = context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function));
John Bauman66b8ab22014-05-06 15:57:45 -04003142 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003143
John Bauman66b8ab22014-05-06 15:57:45 -04003144 break;
3145
Alexis Hetua35d8232015-06-11 17:11:06 -04003146 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003147
3148 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003149 (yyval.interm.function) = (yyvsp[0].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003150 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003151
John Bauman66b8ab22014-05-06 15:57:45 -04003152 break;
3153
Alexis Hetua35d8232015-06-11 17:11:06 -04003154 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003155
3156 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003157 (yyval.interm.function) = (yyvsp[0].interm.function);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003158 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003159
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003160 break;
3161
Alexis Hetua35d8232015-06-11 17:11:06 -04003162 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003163
3164 {
John Bauman66b8ab22014-05-06 15:57:45 -04003165 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003166 (yyval.interm.function) = (yyvsp[-1].interm.function);
3167 if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
3168 (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003169 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003170 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003171 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003172
John Bauman66b8ab22014-05-06 15:57:45 -04003173 break;
3174
Alexis Hetua35d8232015-06-11 17:11:06 -04003175 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003176
3177 {
3178 //
3179 // Only first parameter of one-parameter functions can be void
3180 // The check for named parameters not being void is done in parameter_declarator
3181 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003182 if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
John Bauman66b8ab22014-05-06 15:57:45 -04003183 //
3184 // This parameter > first is void
3185 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003186 context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003187 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003188 delete (yyvsp[0].interm).param.type;
John Bauman66b8ab22014-05-06 15:57:45 -04003189 } else {
3190 // Add the parameter
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003191 (yyval.interm.function) = (yyvsp[-2].interm.function);
3192 (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
John Bauman66b8ab22014-05-06 15:57:45 -04003193 }
3194 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003195
John Bauman66b8ab22014-05-06 15:57:45 -04003196 break;
3197
Alexis Hetua35d8232015-06-11 17:11:06 -04003198 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003199
3200 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003201 if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) {
3202 context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier));
John Bauman66b8ab22014-05-06 15:57:45 -04003203 context->recover();
3204 }
Alexis Hetu407813b2016-02-24 16:46:13 -05003205 if (!(yyvsp[-2].interm.type).layoutQualifier.isEmpty())
3206 {
3207 context->error((yylsp[-1]), "no qualifiers allowed for function return", "layout");
3208 context->recover();
3209 }
John Bauman66b8ab22014-05-06 15:57:45 -04003210 // make sure a sampler is not involved as well...
Alexis Hetu407813b2016-02-24 16:46:13 -05003211 if (context->samplerErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type), "samplers can't be function return values"))
John Bauman66b8ab22014-05-06 15:57:45 -04003212 context->recover();
3213
3214 // Add the function as a prototype after parsing it (we do not support recursion)
3215 TFunction *function;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003216 TType type((yyvsp[-2].interm.type));
3217 function = new TFunction((yyvsp[-1].lex).string, type);
John Bauman66b8ab22014-05-06 15:57:45 -04003218 (yyval.interm.function) = function;
Alexis Hetue97a31e2016-11-14 14:10:47 -05003219
John Bauman66b8ab22014-05-06 15:57:45 -04003220 context->symbolTable.push();
3221 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003222
John Bauman66b8ab22014-05-06 15:57:45 -04003223 break;
3224
Alexis Hetua35d8232015-06-11 17:11:06 -04003225 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003226
3227 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003228 if ((yyvsp[-1].interm.type).type == EbtVoid) {
3229 context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003230 context->recover();
3231 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003232 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003233 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003234 TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003235 (yyval.interm).param = param;
3236 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003237
John Bauman66b8ab22014-05-06 15:57:45 -04003238 break;
3239
Alexis Hetua35d8232015-06-11 17:11:06 -04003240 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003241
3242 {
3243 // Check that we can make an array out of this type
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003244 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003245 context->recover();
3246
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003247 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003248 context->recover();
3249
3250 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003251 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003252 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003253 (yyvsp[-4].interm.type).setArray(true, size);
John Bauman66b8ab22014-05-06 15:57:45 -04003254
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003255 TType* type = new TType((yyvsp[-4].interm.type));
3256 TParameter param = { (yyvsp[-3].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003257 (yyval.interm).param = param;
3258 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003259
John Bauman66b8ab22014-05-06 15:57:45 -04003260 break;
3261
Alexis Hetu17809052015-05-13 11:28:22 -04003262 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003263
3264 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003265 (yyval.interm) = (yyvsp[0].interm);
3266 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003267 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003268 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003269
John Bauman66b8ab22014-05-06 15:57:45 -04003270 break;
3271
Alexis Hetu17809052015-05-13 11:28:22 -04003272 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003273
3274 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003275 (yyval.interm) = (yyvsp[0].interm);
3276 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003277 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003278 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003279 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003280 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003281
John Bauman66b8ab22014-05-06 15:57:45 -04003282 break;
3283
Alexis Hetu17809052015-05-13 11:28:22 -04003284 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003285
3286 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003287 (yyval.interm) = (yyvsp[0].interm);
3288 if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003289 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003290 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003291
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003292 break;
3293
Alexis Hetu17809052015-05-13 11:28:22 -04003294 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003295
3296 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003297 (yyval.interm) = (yyvsp[0].interm);
3298 if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003299 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003300 if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003301 context->recover();
3302 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003303
Alexis Hetua35d8232015-06-11 17:11:06 -04003304 break;
3305
3306 case 105:
3307
3308 {
3309 (yyval.interm.qualifier) = EvqIn;
3310 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003311
Alexis Hetua35d8232015-06-11 17:11:06 -04003312 break;
3313
3314 case 106:
3315
3316 {
3317 (yyval.interm.qualifier) = EvqIn;
3318 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003319
Alexis Hetua35d8232015-06-11 17:11:06 -04003320 break;
3321
3322 case 107:
3323
3324 {
3325 (yyval.interm.qualifier) = EvqOut;
3326 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003327
Alexis Hetua35d8232015-06-11 17:11:06 -04003328 break;
3329
3330 case 108:
3331
3332 {
3333 (yyval.interm.qualifier) = EvqInOut;
3334 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003335
Alexis Hetua35d8232015-06-11 17:11:06 -04003336 break;
3337
3338 case 109:
3339
3340 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003341 TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
John Bauman66b8ab22014-05-06 15:57:45 -04003342 (yyval.interm).param = param;
3343 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003344
John Bauman66b8ab22014-05-06 15:57:45 -04003345 break;
3346
Alexis Hetua35d8232015-06-11 17:11:06 -04003347 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003348
3349 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003350 (yyval.interm) = (yyvsp[0].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04003351 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003352
John Bauman66b8ab22014-05-06 15:57:45 -04003353 break;
3354
Alexis Hetua35d8232015-06-11 17:11:06 -04003355 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003356
3357 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003358 (yyval.interm) = (yyvsp[-2].interm);
3359 (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 -04003360 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003361
John Bauman66b8ab22014-05-06 15:57:45 -04003362 break;
3363
Alexis Hetua35d8232015-06-11 17:11:06 -04003364 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003365
3366 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003367 (yyval.interm) = (yyvsp[-5].interm);
3368 (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 -04003369 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003370
John Bauman66b8ab22014-05-06 15:57:45 -04003371 break;
3372
Alexis Hetua35d8232015-06-11 17:11:06 -04003373 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003374
3375 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003376 ES3_ONLY("[]", (yylsp[-4]), "implicitly sized array");
3377 (yyval.interm) = (yyvsp[-6].interm);
3378 (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 -04003379 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003380
John Bauman66b8ab22014-05-06 15:57:45 -04003381 break;
3382
Alexis Hetua35d8232015-06-11 17:11:06 -04003383 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003384
3385 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003386 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3387 (yyval.interm) = (yyvsp[-7].interm);
3388 (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 -04003389 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003390
John Bauman66b8ab22014-05-06 15:57:45 -04003391 break;
3392
Alexis Hetua35d8232015-06-11 17:11:06 -04003393 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003394
3395 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003396 (yyval.interm) = (yyvsp[-4].interm);
3397 (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 -04003398 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003399
John Bauman66b8ab22014-05-06 15:57:45 -04003400 break;
3401
Alexis Hetua35d8232015-06-11 17:11:06 -04003402 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003403
3404 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003405 (yyval.interm).type = (yyvsp[0].interm.type);
3406 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003407 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003408
John Bauman66b8ab22014-05-06 15:57:45 -04003409 break;
3410
Alexis Hetua35d8232015-06-11 17:11:06 -04003411 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003412
3413 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003414 (yyval.interm).type = (yyvsp[-1].interm.type);
3415 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003416 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003417
John Bauman66b8ab22014-05-06 15:57:45 -04003418 break;
3419
Alexis Hetua35d8232015-06-11 17:11:06 -04003420 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003421
3422 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003423 (yyval.interm).type = (yyvsp[-4].interm.type);
3424 (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 -04003425 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003426
John Bauman66b8ab22014-05-06 15:57:45 -04003427 break;
3428
Alexis Hetua35d8232015-06-11 17:11:06 -04003429 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003430
3431 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003432 ES3_ONLY("[]", (yylsp[-3]), "implicitly sized array");
3433 (yyval.interm).type = (yyvsp[-5].interm.type);
3434 (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 -04003435 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003436
John Bauman66b8ab22014-05-06 15:57:45 -04003437 break;
3438
Alexis Hetua35d8232015-06-11 17:11:06 -04003439 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003440
3441 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003442 ES3_ONLY("=", (yylsp[-1]), "first-class arrays (array initializer)");
3443 (yyval.interm).type = (yyvsp[-6].interm.type);
3444 (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 -04003445 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003446
John Bauman66b8ab22014-05-06 15:57:45 -04003447 break;
3448
Alexis Hetua35d8232015-06-11 17:11:06 -04003449 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003450
3451 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003452 (yyval.interm).type = (yyvsp[-3].interm.type);
3453 (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 -04003454 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003455
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003456 break;
3457
Alexis Hetua35d8232015-06-11 17:11:06 -04003458 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003459
3460 {
3461 // $$.type is not used in invariant declarations.
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003462 (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003463 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003464
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003465 break;
3466
Alexis Hetua35d8232015-06-11 17:11:06 -04003467 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003468
3469 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003470 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003471
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003472 if ((yyvsp[0].interm.type).array) {
3473 ES3_ONLY("[]", (yylsp[0]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003474 if (context->getShaderVersion() != 300) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003475 (yyvsp[0].interm.type).clearArrayness();
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003476 }
John Bauman66b8ab22014-05-06 15:57:45 -04003477 }
3478 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003479
John Bauman66b8ab22014-05-06 15:57:45 -04003480 break;
3481
Alexis Hetua35d8232015-06-11 17:11:06 -04003482 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003483
3484 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003485 (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 -04003486 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003487
John Bauman66b8ab22014-05-06 15:57:45 -04003488 break;
3489
Alexis Hetua35d8232015-06-11 17:11:06 -04003490 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003491
3492 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003493 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003494 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003495
John Bauman66b8ab22014-05-06 15:57:45 -04003496 break;
3497
Alexis Hetua35d8232015-06-11 17:11:06 -04003498 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003499
3500 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003501 (yyval.interm.type).qualifier = EvqFlat;
3502 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003503
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003504 break;
3505
Alexis Hetua35d8232015-06-11 17:11:06 -04003506 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003507
3508 {
3509 (yyval.interm.qualifier) = EvqConstReadOnly;
3510 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003511
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003512 break;
3513
Alexis Hetua35d8232015-06-11 17:11:06 -04003514 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003515
3516 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003517 VERTEX_ONLY("attribute", (yylsp[0]));
3518 ES2_ONLY("attribute", (yylsp[0]));
3519 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003520 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003521 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003522 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003523
John Bauman66b8ab22014-05-06 15:57:45 -04003524 break;
3525
Alexis Hetua35d8232015-06-11 17:11:06 -04003526 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003527
3528 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003529 ES2_ONLY("varying", (yylsp[0]));
3530 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003531 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003532 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003533 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003534 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003535 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003536 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003537
John Bauman66b8ab22014-05-06 15:57:45 -04003538 break;
3539
Alexis Hetua35d8232015-06-11 17:11:06 -04003540 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003541
3542 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003543 ES2_ONLY("varying", (yylsp[-1]));
3544 if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003545 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003546 if (context->getShaderType() == GL_VERTEX_SHADER)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003547 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003548 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003549 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1]));
John Bauman66b8ab22014-05-06 15:57:45 -04003550 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003551
John Bauman66b8ab22014-05-06 15:57:45 -04003552 break;
3553
Alexis Hetua35d8232015-06-11 17:11:06 -04003554 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003555
3556 {
Alexis Hetu407813b2016-02-24 16:46:13 -05003557 if ((yyvsp[0].interm.type).qualifier != EvqConstExpr && !context->symbolTable.atGlobalLevel())
3558 {
3559 context->error((yylsp[0]), "Local variables can only use the const storage qualifier.", getQualifierString((yyvsp[0].interm.type).qualifier));
3560 context->recover();
3561 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003562 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003563 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003564
John Bauman66b8ab22014-05-06 15:57:45 -04003565 break;
3566
Alexis Hetua35d8232015-06-11 17:11:06 -04003567 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003568
3569 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003570 (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 -04003571 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003572
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003573 break;
3574
Alexis Hetua35d8232015-06-11 17:11:06 -04003575 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003576
3577 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003578 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 -04003579 context->recover();
Alexis Hetue97a31e2016-11-14 14:10:47 -05003580
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003581 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003582 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003583 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003584
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003585 break;
3586
Alexis Hetua35d8232015-06-11 17:11:06 -04003587 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003588
3589 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003590 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003591 (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003592 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003593
Nicolas Capens7d626792015-02-17 17:58:31 -05003594 break;
3595
Alexis Hetua35d8232015-06-11 17:11:06 -04003596 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003597
3598 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003599 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
3600 (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003601 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003602
Nicolas Capens7d626792015-02-17 17:58:31 -05003603 break;
3604
Alexis Hetua35d8232015-06-11 17:11:06 -04003605 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003606
3607 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003608 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-1]));
3609 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003610 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003611 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003612
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003613 break;
3614
Alexis Hetua35d8232015-06-11 17:11:06 -04003615 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003616
3617 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003618 context->es3InvariantErrorCheck((yyvsp[0].interm.type).qualifier, (yylsp[-2]));
3619 (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 -04003620 (yyval.interm.type).invariant = true;
3621 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003622
Alexis Hetuad527752015-07-07 13:31:44 -04003623 break;
3624
3625 case 138:
3626
3627 {
3628 (yyval.interm.type).qualifier = EvqConstExpr;
3629 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003630
Alexis Hetuad527752015-07-07 13:31:44 -04003631 break;
3632
3633 case 139:
3634
3635 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003636 ES3_ONLY("in", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003637 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003638 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003639
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003640 break;
3641
Alexis Hetuad527752015-07-07 13:31:44 -04003642 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003643
3644 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003645 ES3_ONLY("out", (yylsp[0]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003646 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003647 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003648
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003649 break;
3650
Alexis Hetuad527752015-07-07 13:31:44 -04003651 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003652
3653 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003654 ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003655 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003656 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003657 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 -04003658 context->recover();
3659 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003660 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003661 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003662
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003663 break;
3664
Alexis Hetuad527752015-07-07 13:31:44 -04003665 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003666
3667 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003668 ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003669 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003670 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003671 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 -04003672 context->recover();
3673 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003674 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003675 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003676
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003677 break;
3678
Alexis Hetuad527752015-07-07 13:31:44 -04003679 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003680
3681 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003682 if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003683 context->recover();
3684 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003685 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003686
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003687 break;
3688
Alexis Hetuad527752015-07-07 13:31:44 -04003689 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003690
3691 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003692 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003693
3694 if ((yyval.interm.type).precision == EbpUndefined) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003695 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type);
3696 if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003697 context->recover();
3698 }
3699 }
3700 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003701
John Bauman66b8ab22014-05-06 15:57:45 -04003702 break;
3703
Alexis Hetuad527752015-07-07 13:31:44 -04003704 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003705
3706 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003707 (yyval.interm.type) = (yyvsp[0].interm.type);
3708 (yyval.interm.type).precision = (yyvsp[-1].interm.precision);
Alexis Hetu407813b2016-02-24 16:46:13 -05003709
3710 if (!SupportsPrecision((yyvsp[0].interm.type).type)) {
3711 context->error((yylsp[-1]), "illegal type for precision qualifier", getBasicString((yyvsp[0].interm.type).type));
3712 context->recover();
3713 }
John Bauman66b8ab22014-05-06 15:57:45 -04003714 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003715
John Bauman66b8ab22014-05-06 15:57:45 -04003716 break;
3717
Alexis Hetuad527752015-07-07 13:31:44 -04003718 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003719
3720 {
3721 (yyval.interm.precision) = EbpHigh;
3722 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003723
John Bauman66b8ab22014-05-06 15:57:45 -04003724 break;
3725
Alexis Hetuad527752015-07-07 13:31:44 -04003726 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003727
3728 {
3729 (yyval.interm.precision) = EbpMedium;
3730 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003731
John Bauman66b8ab22014-05-06 15:57:45 -04003732 break;
3733
Alexis Hetuad527752015-07-07 13:31:44 -04003734 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003735
3736 {
3737 (yyval.interm.precision) = EbpLow;
3738 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003739
John Bauman66b8ab22014-05-06 15:57:45 -04003740 break;
3741
Alexis Hetuad527752015-07-07 13:31:44 -04003742 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003743
3744 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003745 ES3_ONLY("layout", (yylsp[-3]), "qualifier");
3746 (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003747 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003748
Nicolas Capens7d626792015-02-17 17:58:31 -05003749 break;
3750
Alexis Hetuad527752015-07-07 13:31:44 -04003751 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003752
3753 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003754 (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
Nicolas Capens7d626792015-02-17 17:58:31 -05003755 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003756
Nicolas Capens7d626792015-02-17 17:58:31 -05003757 break;
3758
Alexis Hetuad527752015-07-07 13:31:44 -04003759 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003760
3761 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003762 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier));
Nicolas Capens7d626792015-02-17 17:58:31 -05003763 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003764
Nicolas Capens7d626792015-02-17 17:58:31 -05003765 break;
3766
Alexis Hetuad527752015-07-07 13:31:44 -04003767 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003768
3769 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003770 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003771 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003772
Nicolas Capens7d626792015-02-17 17:58:31 -05003773 break;
3774
Alexis Hetua35d8232015-06-11 17:11:06 -04003775 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003776
3777 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003778 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003779 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003780
Alexis Hetuad527752015-07-07 13:31:44 -04003781 break;
3782
3783 case 154:
3784
3785 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003786 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003787 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003788
Alexis Hetuad527752015-07-07 13:31:44 -04003789 break;
3790
3791 case 155:
3792
3793 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003794 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003795 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003796
John Bauman66b8ab22014-05-06 15:57:45 -04003797 break;
3798
Alexis Hetuad527752015-07-07 13:31:44 -04003799 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003800
3801 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003802 ES3_ONLY("[]", (yylsp[-1]), "implicitly sized array");
3803 (yyval.interm.type) = (yyvsp[-2].interm.type);
Alexis Hetue5246692015-06-18 12:34:52 -04003804 (yyval.interm.type).setArray(true, 0);
3805 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003806
Alexis Hetue5246692015-06-18 12:34:52 -04003807 break;
3808
Alexis Hetuad527752015-07-07 13:31:44 -04003809 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003810
3811 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003812 (yyval.interm.type) = (yyvsp[-3].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003813
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003814 if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003815 context->recover();
3816 else {
3817 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003818 if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003819 context->recover();
3820 (yyval.interm.type).setArray(true, size);
3821 }
3822 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003823
John Bauman66b8ab22014-05-06 15:57:45 -04003824 break;
3825
Alexis Hetuad527752015-07-07 13:31:44 -04003826 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003827
3828 {
3829 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003830 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003831 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003832
Alexis Hetu17809052015-05-13 11:28:22 -04003833 break;
3834
Alexis Hetu17809052015-05-13 11:28:22 -04003835 case 159:
3836
3837 {
3838 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003839 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetu17809052015-05-13 11:28:22 -04003840 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003841
Alexis Hetu17809052015-05-13 11:28:22 -04003842 break;
3843
3844 case 160:
3845
3846 {
3847 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003848 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003849 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003850
Alexis Hetua35d8232015-06-11 17:11:06 -04003851 break;
3852
3853 case 161:
3854
3855 {
3856 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003857 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003858 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003859
Alexis Hetua35d8232015-06-11 17:11:06 -04003860 break;
3861
3862 case 162:
3863
3864 {
3865 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003866 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003867 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003868
Alexis Hetua35d8232015-06-11 17:11:06 -04003869 break;
3870
3871 case 163:
3872
3873 {
3874 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003875 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003876 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003877 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003878
Alexis Hetua35d8232015-06-11 17:11:06 -04003879 break;
3880
3881 case 164:
3882
3883 {
3884 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003885 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003886 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003887 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003888
Alexis Hetua35d8232015-06-11 17:11:06 -04003889 break;
3890
3891 case 165:
3892
3893 {
3894 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003895 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003896 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003897 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003898
Alexis Hetu17809052015-05-13 11:28:22 -04003899 break;
3900
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003901 case 166:
3902
3903 {
3904 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003905 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003906 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003907 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003908
Alexis Hetua35d8232015-06-11 17:11:06 -04003909 break;
3910
3911 case 167:
3912
3913 {
3914 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003915 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003916 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003917 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003918
Alexis Hetua35d8232015-06-11 17:11:06 -04003919 break;
3920
3921 case 168:
3922
3923 {
3924 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003925 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003926 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003927 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003928
Alexis Hetua35d8232015-06-11 17:11:06 -04003929 break;
3930
3931 case 169:
3932
3933 {
3934 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003935 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003936 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003937 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003938
Alexis Hetua35d8232015-06-11 17:11:06 -04003939 break;
3940
3941 case 170:
3942
3943 {
3944 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003945 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003946 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003947 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003948
Alexis Hetua35d8232015-06-11 17:11:06 -04003949 break;
3950
3951 case 171:
3952
3953 {
3954 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003955 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003956 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003957 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003958
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003959 break;
3960
Alexis Hetua35d8232015-06-11 17:11:06 -04003961 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003962
3963 {
Alexis Hetue5246692015-06-18 12:34:52 -04003964 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003965 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003966 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04003967 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003968
Alexis Hetue5246692015-06-18 12:34:52 -04003969 break;
3970
3971 case 173:
3972
3973 {
Alexis Hetuad527752015-07-07 13:31:44 -04003974 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003975 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003976 (yyval.interm.type).setAggregate(3);
3977 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003978
Alexis Hetuad527752015-07-07 13:31:44 -04003979 break;
3980
3981 case 174:
3982
3983 {
3984 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003985 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
Alexis Hetuad527752015-07-07 13:31:44 -04003986 (yyval.interm.type).setAggregate(4);
3987 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003988
Alexis Hetuad527752015-07-07 13:31:44 -04003989 break;
3990
3991 case 175:
3992
3993 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003994 FRAG_VERT_ONLY("mat2", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04003995 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003996 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04003997 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04003998 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04003999
John Bauman66b8ab22014-05-06 15:57:45 -04004000 break;
4001
Alexis Hetuad527752015-07-07 13:31:44 -04004002 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004003
4004 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004005 FRAG_VERT_ONLY("mat3", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004006 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004007 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004008 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004009 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004010
John Bauman66b8ab22014-05-06 15:57:45 -04004011 break;
4012
Alexis Hetuad527752015-07-07 13:31:44 -04004013 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004014
4015 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004016 FRAG_VERT_ONLY("mat4", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004017 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004018 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004019 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004020 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004021
John Bauman66b8ab22014-05-06 15:57:45 -04004022 break;
4023
Alexis Hetuad527752015-07-07 13:31:44 -04004024 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004025
4026 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004027 FRAG_VERT_ONLY("mat2x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004028 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004029 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004030 (yyval.interm.type).setMatrix(2, 3);
4031 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004032
Alexis Hetub14178b2015-04-13 13:23:20 -04004033 break;
4034
Alexis Hetuad527752015-07-07 13:31:44 -04004035 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004036
4037 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004038 FRAG_VERT_ONLY("mat3x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004039 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004040 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004041 (yyval.interm.type).setMatrix(3, 2);
4042 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004043
Alexis Hetub14178b2015-04-13 13:23:20 -04004044 break;
4045
Alexis Hetuad527752015-07-07 13:31:44 -04004046 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004047
4048 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004049 FRAG_VERT_ONLY("mat2x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004050 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004051 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004052 (yyval.interm.type).setMatrix(2, 4);
4053 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004054
Alexis Hetub14178b2015-04-13 13:23:20 -04004055 break;
4056
Alexis Hetuad527752015-07-07 13:31:44 -04004057 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004058
4059 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004060 FRAG_VERT_ONLY("mat4x2", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004061 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004062 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004063 (yyval.interm.type).setMatrix(4, 2);
4064 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004065
Alexis Hetub14178b2015-04-13 13:23:20 -04004066 break;
4067
Alexis Hetuad527752015-07-07 13:31:44 -04004068 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004069
4070 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004071 FRAG_VERT_ONLY("mat3x4", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004072 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004073 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004074 (yyval.interm.type).setMatrix(3, 4);
4075 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004076
Alexis Hetub14178b2015-04-13 13:23:20 -04004077 break;
4078
Alexis Hetuad527752015-07-07 13:31:44 -04004079 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004080
4081 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004082 FRAG_VERT_ONLY("mat4x3", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004083 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004084 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004085 (yyval.interm.type).setMatrix(4, 3);
4086 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004087
Alexis Hetub14178b2015-04-13 13:23:20 -04004088 break;
4089
Alexis Hetuad527752015-07-07 13:31:44 -04004090 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004091
4092 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004093 FRAG_VERT_ONLY("sampler2D", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004094 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004095 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004096 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004097
John Bauman66b8ab22014-05-06 15:57:45 -04004098 break;
4099
Alexis Hetuad527752015-07-07 13:31:44 -04004100 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004101
4102 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004103 FRAG_VERT_ONLY("samplerCube", (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004104 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004105 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004106 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004107
John Bauman66b8ab22014-05-06 15:57:45 -04004108 break;
4109
Alexis Hetuad527752015-07-07 13:31:44 -04004110 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004111
4112 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004113 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004114 context->error((yylsp[0]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004115 context->recover();
4116 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004117 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004118 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004119 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004120 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004121
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004122 break;
4123
Alexis Hetuad527752015-07-07 13:31:44 -04004124 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004125
4126 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004127 FRAG_VERT_ONLY("sampler3D", (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004128 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004129 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004130 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004131
Alexis Hetub027aa92015-01-19 15:56:12 -05004132 break;
4133
Alexis Hetuad527752015-07-07 13:31:44 -04004134 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004135
4136 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004137 FRAG_VERT_ONLY("sampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004138 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004139 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004140 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004141
Alexis Hetub14178b2015-04-13 13:23:20 -04004142 break;
4143
Alexis Hetuad527752015-07-07 13:31:44 -04004144 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004145
4146 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004147 FRAG_VERT_ONLY("isampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004148 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004149 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004150 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004151
Alexis Hetub14178b2015-04-13 13:23:20 -04004152 break;
4153
Alexis Hetuad527752015-07-07 13:31:44 -04004154 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004155
4156 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004157 FRAG_VERT_ONLY("isampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004158 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004159 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004160 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004161
Alexis Hetub14178b2015-04-13 13:23:20 -04004162 break;
4163
Alexis Hetuad527752015-07-07 13:31:44 -04004164 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004165
4166 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004167 FRAG_VERT_ONLY("isamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004168 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004169 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004170 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004171
Alexis Hetub14178b2015-04-13 13:23:20 -04004172 break;
4173
Alexis Hetuad527752015-07-07 13:31:44 -04004174 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004175
4176 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004177 FRAG_VERT_ONLY("isampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004178 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004179 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004180 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004181
Alexis Hetub14178b2015-04-13 13:23:20 -04004182 break;
4183
Alexis Hetuad527752015-07-07 13:31:44 -04004184 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004185
4186 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004187 FRAG_VERT_ONLY("usampler2D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004188 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004189 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004190 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004191
Alexis Hetub14178b2015-04-13 13:23:20 -04004192 break;
4193
Alexis Hetuad527752015-07-07 13:31:44 -04004194 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004195
4196 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004197 FRAG_VERT_ONLY("usampler3D", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004198 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004199 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004200 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004201
Alexis Hetub14178b2015-04-13 13:23:20 -04004202 break;
4203
Alexis Hetuad527752015-07-07 13:31:44 -04004204 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004205
4206 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004207 FRAG_VERT_ONLY("usamplerCube", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004208 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004209 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004210 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004211
Alexis Hetub14178b2015-04-13 13:23:20 -04004212 break;
4213
Alexis Hetuad527752015-07-07 13:31:44 -04004214 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004215
4216 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004217 FRAG_VERT_ONLY("usampler2DArray", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004218 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004219 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004220 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004221
Alexis Hetub14178b2015-04-13 13:23:20 -04004222 break;
4223
Alexis Hetuad527752015-07-07 13:31:44 -04004224 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004225
4226 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004227 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004228 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004229 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004230 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004231
Alexis Hetub14178b2015-04-13 13:23:20 -04004232 break;
4233
Alexis Hetuad527752015-07-07 13:31:44 -04004234 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004235
4236 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004237 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004238 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004239 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004240 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004241
Alexis Hetub14178b2015-04-13 13:23:20 -04004242 break;
4243
Alexis Hetuad527752015-07-07 13:31:44 -04004244 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004245
4246 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004247 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004248 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004249 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004250 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004251
Alexis Hetub14178b2015-04-13 13:23:20 -04004252 break;
4253
Alexis Hetuad527752015-07-07 13:31:44 -04004254 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004255
4256 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004257 FRAG_VERT_ONLY("struct", (yylsp[0]));
4258 (yyval.interm.type) = (yyvsp[0].interm.type);
John Bauman66b8ab22014-05-06 15:57:45 -04004259 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4260 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004261
John Bauman66b8ab22014-05-06 15:57:45 -04004262 break;
4263
Alexis Hetuad527752015-07-07 13:31:44 -04004264 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004265
4266 {
4267 //
4268 // This is for user defined type names. The lexical phase looked up the
4269 // type.
4270 //
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004271 TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType();
John Bauman66b8ab22014-05-06 15:57:45 -04004272 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004273 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004274 (yyval.interm.type).userDef = &structure;
4275 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004276
John Bauman66b8ab22014-05-06 15:57:45 -04004277 break;
4278
Alexis Hetuad527752015-07-07 13:31:44 -04004279 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004280
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004281 { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); }
4282
John Bauman66b8ab22014-05-06 15:57:45 -04004283 break;
4284
Alexis Hetuad527752015-07-07 13:31:44 -04004285 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004286
4287 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004288 (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004289 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004290
John Bauman66b8ab22014-05-06 15:57:45 -04004291 break;
4292
Alexis Hetuad527752015-07-07 13:31:44 -04004293 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004294
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004295 { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); }
4296
John Bauman66b8ab22014-05-06 15:57:45 -04004297 break;
4298
Alexis Hetuad527752015-07-07 13:31:44 -04004299 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004300
4301 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004302 (yyval.interm.type) = context->addStructure((yylsp[-4]), (yylsp[-4]), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004303 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004304
John Bauman66b8ab22014-05-06 15:57:45 -04004305 break;
4306
Alexis Hetuad527752015-07-07 13:31:44 -04004307 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004308
4309 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004310 (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004311 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004312
John Bauman66b8ab22014-05-06 15:57:45 -04004313 break;
4314
Alexis Hetuad527752015-07-07 13:31:44 -04004315 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004316
4317 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004318 (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList);
4319 for (unsigned int i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) {
4320 TField* field = (*(yyvsp[0].interm.fieldList))[i];
Alexis Hetua8b364b2015-06-10 11:48:40 -04004321 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4322 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004323 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 -04004324 context->recover();
4325 }
4326 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004327 (yyval.interm.fieldList)->push_back((*(yyvsp[0].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004328 }
4329 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004330
John Bauman66b8ab22014-05-06 15:57:45 -04004331 break;
4332
Alexis Hetuad527752015-07-07 13:31:44 -04004333 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004334
4335 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004336 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004337 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004338
John Bauman66b8ab22014-05-06 15:57:45 -04004339 break;
4340
Alexis Hetuad527752015-07-07 13:31:44 -04004341 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004342
4343 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004344 // ES3 Only, but errors should be handled elsewhere
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004345 (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier;
4346 (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier;
4347 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
Alexis Hetuad6b8752015-06-09 16:15:30 -04004348 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004349
Alexis Hetuad6b8752015-06-09 16:15:30 -04004350 break;
4351
Alexis Hetuad527752015-07-07 13:31:44 -04004352 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004353
4354 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004355 (yyval.interm.fieldList) = NewPoolTFieldList();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004356 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004357 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004358
John Bauman66b8ab22014-05-06 15:57:45 -04004359 break;
4360
Alexis Hetuad527752015-07-07 13:31:44 -04004361 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004362
4363 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004364 (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004365 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004366
John Bauman66b8ab22014-05-06 15:57:45 -04004367 break;
4368
Alexis Hetuad527752015-07-07 13:31:44 -04004369 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004370
4371 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004372 if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004373 context->recover();
4374
Alexis Hetua8b364b2015-06-10 11:48:40 -04004375 TType* type = new TType(EbtVoid, EbpUndefined);
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004376 (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004377 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004378
John Bauman66b8ab22014-05-06 15:57:45 -04004379 break;
4380
Alexis Hetuad527752015-07-07 13:31:44 -04004381 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004382
4383 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004384 if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004385 context->recover();
4386
Alexis Hetua8b364b2015-06-10 11:48:40 -04004387 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004388 int size;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004389 if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004390 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004391 type->setArraySize(size);
4392
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004393 (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3]));
John Bauman66b8ab22014-05-06 15:57:45 -04004394 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004395
John Bauman66b8ab22014-05-06 15:57:45 -04004396 break;
4397
Alexis Hetu17809052015-05-13 11:28:22 -04004398 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004399
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004400 { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
4401
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004402 break;
4403
Alexis Hetu17809052015-05-13 11:28:22 -04004404 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004405
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004406 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4407
Alexis Hetuad6b8752015-06-09 16:15:30 -04004408 break;
4409
4410 case 216:
4411
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004412 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
4413
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004414 break;
4415
4416 case 217:
4417
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004418 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4419
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004420 break;
4421
4422 case 218:
4423
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004424 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4425
Alexis Hetua35d8232015-06-11 17:11:06 -04004426 break;
4427
4428 case 219:
4429
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004430 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4431
Alexis Hetua35d8232015-06-11 17:11:06 -04004432 break;
4433
4434 case 220:
4435
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004436 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4437
Alexis Hetua35d8232015-06-11 17:11:06 -04004438 break;
4439
4440 case 221:
4441
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004442 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }
4443
Alexis Hetua35d8232015-06-11 17:11:06 -04004444 break;
4445
4446 case 222:
4447
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004448 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }
4449
Alexis Hetua35d8232015-06-11 17:11:06 -04004450 break;
4451
4452 case 223:
4453
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004454 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4455
Alexis Hetu76a343a2015-06-04 17:21:22 -04004456 break;
4457
4458 case 224:
4459
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004460 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4461
Alexis Hetu76a343a2015-06-04 17:21:22 -04004462 break;
4463
4464 case 225:
4465
Alexis Hetuad527752015-07-07 13:31:44 -04004466 { (yyval.interm.intermAggregate) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004467
Alexis Hetue5246692015-06-18 12:34:52 -04004468 break;
4469
4470 case 226:
4471
Alexis Hetuad527752015-07-07 13:31:44 -04004472 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004473
Alexis Hetuad527752015-07-07 13:31:44 -04004474 break;
4475
4476 case 227:
4477
4478 { context->symbolTable.pop(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004479
Alexis Hetuad527752015-07-07 13:31:44 -04004480 break;
4481
4482 case 228:
4483
Nicolas Capens7d626792015-02-17 17:58:31 -05004484 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004485 if ((yyvsp[-2].interm.intermAggregate) != 0) {
4486 (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence);
4487 (yyvsp[-2].interm.intermAggregate)->setEndLine((yylsp[0]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004488 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004489 (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate);
Nicolas Capens7d626792015-02-17 17:58:31 -05004490 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004491
Nicolas Capens7d626792015-02-17 17:58:31 -05004492 break;
4493
Alexis Hetua35d8232015-06-11 17:11:06 -04004494 case 229:
4495
Alexis Hetu407813b2016-02-24 16:46:13 -05004496 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004497
Alexis Hetua35d8232015-06-11 17:11:06 -04004498 break;
4499
4500 case 230:
4501
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004502 { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4503
Alexis Hetu76a343a2015-06-04 17:21:22 -04004504 break;
4505
4506 case 231:
4507
Alexis Hetue5246692015-06-18 12:34:52 -04004508 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004509
Alexis Hetu76a343a2015-06-04 17:21:22 -04004510 break;
4511
4512 case 232:
4513
Alexis Hetu407813b2016-02-24 16:46:13 -05004514 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004515
Alexis Hetue5246692015-06-18 12:34:52 -04004516 break;
4517
4518 case 233:
4519
Alexis Hetuad527752015-07-07 13:31:44 -04004520 { context->symbolTable.push(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004521
Alexis Hetuad527752015-07-07 13:31:44 -04004522 break;
4523
4524 case 234:
4525
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004526 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
4527
Alexis Hetuad527752015-07-07 13:31:44 -04004528 break;
4529
4530 case 235:
4531
John Bauman66b8ab22014-05-06 15:57:45 -04004532 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004533 (yyval.interm.intermAggregate) = 0;
John Bauman66b8ab22014-05-06 15:57:45 -04004534 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004535
John Bauman66b8ab22014-05-06 15:57:45 -04004536 break;
4537
Alexis Hetuad527752015-07-07 13:31:44 -04004538 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004539
4540 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004541 if ((yyvsp[-1].interm.intermAggregate)) {
4542 (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence);
4543 (yyvsp[-1].interm.intermAggregate)->setEndLine((yylsp[0]));
John Bauman66b8ab22014-05-06 15:57:45 -04004544 }
Alexis Hetu407813b2016-02-24 16:46:13 -05004545 (yyval.interm.intermAggregate) = (yyvsp[-1].interm.intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004546 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004547
John Bauman66b8ab22014-05-06 15:57:45 -04004548 break;
4549
Alexis Hetuad527752015-07-07 13:31:44 -04004550 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004551
4552 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004553 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004554 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004555
John Bauman66b8ab22014-05-06 15:57:45 -04004556 break;
4557
Alexis Hetuad527752015-07-07 13:31:44 -04004558 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004559
4560 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004561 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc));
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 Hetuad527752015-07-07 13:31:44 -04004566 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004567
4568 { (yyval.interm.intermNode) = 0; }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004569
John Bauman66b8ab22014-05-06 15:57:45 -04004570 break;
4571
Alexis Hetuad527752015-07-07 13:31:44 -04004572 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004573
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004574 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
4575
John Bauman66b8ab22014-05-06 15:57:45 -04004576 break;
4577
Alexis Hetuad527752015-07-07 13:31:44 -04004578 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004579
4580 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004581 if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004582 context->recover();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004583 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
John Bauman66b8ab22014-05-06 15:57:45 -04004584 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004585
John Bauman66b8ab22014-05-06 15:57:45 -04004586 break;
4587
Alexis Hetuad527752015-07-07 13:31:44 -04004588 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004589
4590 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004591 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
4592 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004593 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004594
John Bauman66b8ab22014-05-06 15:57:45 -04004595 break;
4596
Alexis Hetuad527752015-07-07 13:31:44 -04004597 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004598
4599 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004600 (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004601 (yyval.interm.nodePair).node2 = 0;
4602 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004603
John Bauman66b8ab22014-05-06 15:57:45 -04004604 break;
4605
Alexis Hetuad527752015-07-07 13:31:44 -04004606 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004607
Alexis Hetue5246692015-06-18 12:34:52 -04004608 { context->incrSwitchNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004609
Alexis Hetu76a343a2015-06-04 17:21:22 -04004610 break;
4611
Alexis Hetuad527752015-07-07 13:31:44 -04004612 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004613
4614 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004615 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5]));
Alexis Hetue5246692015-06-18 12:34:52 -04004616 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004617 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004618
Alexis Hetu76a343a2015-06-04 17:21:22 -04004619 break;
4620
Alexis Hetuad527752015-07-07 13:31:44 -04004621 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004622
4623 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004624 (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004625 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004626
Alexis Hetu76a343a2015-06-04 17:21:22 -04004627 break;
4628
Alexis Hetuad527752015-07-07 13:31:44 -04004629 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004630
4631 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004632 (yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
Alexis Hetue5246692015-06-18 12:34:52 -04004633 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004634
Alexis Hetue5246692015-06-18 12:34:52 -04004635 break;
4636
Alexis Hetuad527752015-07-07 13:31:44 -04004637 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004638
4639 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004640 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
4641 if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004642 context->recover();
4643 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004644
John Bauman66b8ab22014-05-06 15:57:45 -04004645 break;
4646
Alexis Hetuad527752015-07-07 13:31:44 -04004647 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004648
4649 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004650 TIntermNode *intermNode;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004651 if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004652 context->recover();
4653
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004654 if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode))
4655 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04004656 else {
4657 context->recover();
4658 (yyval.interm.intermTypedNode) = 0;
4659 }
4660 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004661
John Bauman66b8ab22014-05-06 15:57:45 -04004662 break;
4663
Alexis Hetuad527752015-07-07 13:31:44 -04004664 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004665
Alexis Hetu0a655842015-06-22 16:52:11 -04004666 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004667
John Bauman66b8ab22014-05-06 15:57:45 -04004668 break;
4669
Alexis Hetuad527752015-07-07 13:31:44 -04004670 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004671
4672 {
4673 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004674 (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 -04004675 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004676 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004677
John Bauman66b8ab22014-05-06 15:57:45 -04004678 break;
4679
Alexis Hetuad527752015-07-07 13:31:44 -04004680 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004681
Alexis Hetu0a655842015-06-22 16:52:11 -04004682 { context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004683
John Bauman66b8ab22014-05-06 15:57:45 -04004684 break;
4685
Alexis Hetuad527752015-07-07 13:31:44 -04004686 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004687
4688 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004689 if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004690 context->recover();
4691
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004692 (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 -04004693 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004694 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004695
John Bauman66b8ab22014-05-06 15:57:45 -04004696 break;
4697
Alexis Hetuad527752015-07-07 13:31:44 -04004698 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004699
Alexis Hetu0a655842015-06-22 16:52:11 -04004700 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004701
Nicolas Capens3c20f802015-02-17 17:17:20 -05004702 break;
4703
Alexis Hetuad527752015-07-07 13:31:44 -04004704 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004705
4706 {
Alexis Hetue5246692015-06-18 12:34:52 -04004707 context->symbolTable.pop();
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004708 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6]));
Alexis Hetu0a655842015-06-22 16:52:11 -04004709 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004710 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004711
Alexis Hetu17809052015-05-13 11:28:22 -04004712 break;
4713
Alexis Hetu76a343a2015-06-04 17:21:22 -04004714 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004715
4716 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004717 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004718 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004719
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004720 break;
4721
Alexis Hetu76a343a2015-06-04 17:21:22 -04004722 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004723
4724 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004725 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004726 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004727
Alexis Hetue5246692015-06-18 12:34:52 -04004728 break;
4729
4730 case 258:
4731
4732 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004733 (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004734 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004735
Alexis Hetuad527752015-07-07 13:31:44 -04004736 break;
4737
4738 case 259:
4739
4740 {
4741 (yyval.interm.intermTypedNode) = 0;
4742 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004743
Alexis Hetuad527752015-07-07 13:31:44 -04004744 break;
4745
4746 case 260:
4747
4748 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004749 (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004750 (yyval.interm.nodePair).node2 = 0;
4751 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004752
Alexis Hetu17809052015-05-13 11:28:22 -04004753 break;
4754
Alexis Hetuad527752015-07-07 13:31:44 -04004755 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004756
4757 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004758 (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
4759 (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004760 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004761
Alexis Hetu17809052015-05-13 11:28:22 -04004762 break;
4763
Alexis Hetuad527752015-07-07 13:31:44 -04004764 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004765
4766 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004767 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004768 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004769
Alexis Hetu17809052015-05-13 11:28:22 -04004770 break;
4771
Alexis Hetuad527752015-07-07 13:31:44 -04004772 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004773
4774 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004775 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
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 Hetuad527752015-07-07 13:31:44 -04004780 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004781
4782 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004783 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (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 Hetuad527752015-07-07 13:31:44 -04004788 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004789
4790 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004791 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
Alexis Hetu17809052015-05-13 11:28:22 -04004792 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004793
Alexis Hetu17809052015-05-13 11:28:22 -04004794 break;
4795
Alexis Hetuad527752015-07-07 13:31:44 -04004796 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004797
4798 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004799 FRAG_ONLY("discard", (yylsp[-1]));
4800 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
Alexis Hetu17809052015-05-13 11:28:22 -04004801 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004802
Alexis Hetu17809052015-05-13 11:28:22 -04004803 break;
4804
Alexis Hetuad527752015-07-07 13:31:44 -04004805 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004806
4807 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004808 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004809 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004810 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004811
Alexis Hetu17809052015-05-13 11:28:22 -04004812 break;
4813
Alexis Hetuad527752015-07-07 13:31:44 -04004814 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004815
4816 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004817 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004818 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004819 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004820
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004821 break;
4822
Alexis Hetue5246692015-06-18 12:34:52 -04004823 case 269:
4824
4825 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004826 (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
Alexis Hetuad527752015-07-07 13:31:44 -04004827 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004828
Alexis Hetuad527752015-07-07 13:31:44 -04004829 break;
4830
4831 case 270:
4832
4833 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004834 (yyval.interm.intermNode) = (yyvsp[0].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 271:
4840
4841 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004842 context->parseFunctionPrototype((yylsp[0]), (yyvsp[0].interm).function, &(yyvsp[0].interm).intermAggregate);
John Bauman66b8ab22014-05-06 15:57:45 -04004843 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004844
John Bauman66b8ab22014-05-06 15:57:45 -04004845 break;
4846
Alexis Hetuad527752015-07-07 13:31:44 -04004847 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004848
4849 {
Alexis Hetu407813b2016-02-24 16:46:13 -05004850 (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 -04004851 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004852
John Bauman66b8ab22014-05-06 15:57:45 -04004853 break;
4854
4855
4856
4857 default: break;
4858 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004859 /* User semantic actions sometimes alter yychar, and that requires
4860 that yytoken be updated with the new translation. We take the
4861 approach of translating immediately before every use of yytoken.
4862 One alternative is translating here after every semantic action,
4863 but that translation would be missed if the semantic action invokes
4864 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4865 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4866 incorrect destructor might then be invoked immediately. In the
4867 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4868 to an incorrect destructor call or verbose syntax error message
4869 before the lookahead is translated. */
John Bauman66b8ab22014-05-06 15:57:45 -04004870 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4871
4872 YYPOPSTACK (yylen);
4873 yylen = 0;
4874 YY_STACK_PRINT (yyss, yyssp);
4875
4876 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004877 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004878
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004879 /* Now 'shift' the result of the reduction. Determine what state
John Bauman66b8ab22014-05-06 15:57:45 -04004880 that goes to, based on the state we popped back to and the rule
4881 number reduced by. */
4882
4883 yyn = yyr1[yyn];
4884
4885 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4886 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4887 yystate = yytable[yystate];
4888 else
4889 yystate = yydefgoto[yyn - YYNTOKENS];
4890
4891 goto yynewstate;
4892
4893
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004894/*--------------------------------------.
4895| yyerrlab -- here on detecting error. |
4896`--------------------------------------*/
John Bauman66b8ab22014-05-06 15:57:45 -04004897yyerrlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004898 /* Make sure we have latest lookahead translation. See comments at
4899 user semantic actions for why this is necessary. */
4900 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4901
John Bauman66b8ab22014-05-06 15:57:45 -04004902 /* If not already recovering from an error, report this error. */
4903 if (!yyerrstatus)
4904 {
4905 ++yynerrs;
4906#if ! YYERROR_VERBOSE
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004907 yyerror (&yylloc, context, yyscanner, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004908#else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004909# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4910 yyssp, yytoken)
John Bauman66b8ab22014-05-06 15:57:45 -04004911 {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004912 char const *yymsgp = YY_("syntax error");
4913 int yysyntax_error_status;
4914 yysyntax_error_status = YYSYNTAX_ERROR;
4915 if (yysyntax_error_status == 0)
4916 yymsgp = yymsg;
4917 else if (yysyntax_error_status == 1)
4918 {
4919 if (yymsg != yymsgbuf)
4920 YYSTACK_FREE (yymsg);
4921 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4922 if (!yymsg)
4923 {
4924 yymsg = yymsgbuf;
4925 yymsg_alloc = sizeof yymsgbuf;
4926 yysyntax_error_status = 2;
4927 }
4928 else
4929 {
4930 yysyntax_error_status = YYSYNTAX_ERROR;
4931 yymsgp = yymsg;
4932 }
4933 }
4934 yyerror (&yylloc, context, yyscanner, yymsgp);
4935 if (yysyntax_error_status == 2)
4936 goto yyexhaustedlab;
John Bauman66b8ab22014-05-06 15:57:45 -04004937 }
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004938# undef YYSYNTAX_ERROR
John Bauman66b8ab22014-05-06 15:57:45 -04004939#endif
4940 }
4941
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004942 yyerror_range[1] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004943
4944 if (yyerrstatus == 3)
4945 {
4946 /* If just tried and failed to reuse lookahead token after an
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004947 error, discard it. */
John Bauman66b8ab22014-05-06 15:57:45 -04004948
4949 if (yychar <= YYEOF)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004950 {
4951 /* Return failure if at end of input. */
4952 if (yychar == YYEOF)
4953 YYABORT;
4954 }
John Bauman66b8ab22014-05-06 15:57:45 -04004955 else
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004956 {
4957 yydestruct ("Error: discarding",
4958 yytoken, &yylval, &yylloc, context, yyscanner);
4959 yychar = YYEMPTY;
4960 }
John Bauman66b8ab22014-05-06 15:57:45 -04004961 }
4962
4963 /* Else will try to reuse lookahead token after shifting the error
4964 token. */
4965 goto yyerrlab1;
4966
4967
4968/*---------------------------------------------------.
4969| yyerrorlab -- error raised explicitly by YYERROR. |
4970`---------------------------------------------------*/
4971yyerrorlab:
4972
4973 /* Pacify compilers like GCC when the user code never invokes
4974 YYERROR and the label yyerrorlab therefore never appears in user
4975 code. */
4976 if (/*CONSTCOND*/ 0)
4977 goto yyerrorlab;
4978
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004979 yyerror_range[1] = yylsp[1-yylen];
4980 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04004981 this YYERROR. */
4982 YYPOPSTACK (yylen);
4983 yylen = 0;
4984 YY_STACK_PRINT (yyss, yyssp);
4985 yystate = *yyssp;
4986 goto yyerrlab1;
4987
4988
4989/*-------------------------------------------------------------.
4990| yyerrlab1 -- common code for both syntax error and YYERROR. |
4991`-------------------------------------------------------------*/
4992yyerrlab1:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004993 yyerrstatus = 3; /* Each real token shifted decrements this. */
John Bauman66b8ab22014-05-06 15:57:45 -04004994
4995 for (;;)
4996 {
4997 yyn = yypact[yystate];
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04004998 if (!yypact_value_is_default (yyn))
4999 {
5000 yyn += YYTERROR;
5001 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5002 {
5003 yyn = yytable[yyn];
5004 if (0 < yyn)
5005 break;
5006 }
5007 }
John Bauman66b8ab22014-05-06 15:57:45 -04005008
5009 /* Pop the current state because it cannot handle the error token. */
5010 if (yyssp == yyss)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005011 YYABORT;
John Bauman66b8ab22014-05-06 15:57:45 -04005012
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005013 yyerror_range[1] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005014 yydestruct ("Error: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005015 yystos[yystate], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005016 YYPOPSTACK (1);
5017 yystate = *yyssp;
5018 YY_STACK_PRINT (yyss, yyssp);
5019 }
5020
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005021 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
John Bauman66b8ab22014-05-06 15:57:45 -04005022 *++yyvsp = yylval;
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005023 YY_IGNORE_MAYBE_UNINITIALIZED_END
John Bauman66b8ab22014-05-06 15:57:45 -04005024
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005025 yyerror_range[2] = yylloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005026 /* Using YYLLOC is tempting, but would change the location of
5027 the lookahead. YYLOC is available though. */
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005028 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005029 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005030
5031 /* Shift the error token. */
5032 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5033
5034 yystate = yyn;
5035 goto yynewstate;
5036
5037
5038/*-------------------------------------.
5039| yyacceptlab -- YYACCEPT comes here. |
5040`-------------------------------------*/
5041yyacceptlab:
5042 yyresult = 0;
5043 goto yyreturn;
5044
5045/*-----------------------------------.
5046| yyabortlab -- YYABORT comes here. |
5047`-----------------------------------*/
5048yyabortlab:
5049 yyresult = 1;
5050 goto yyreturn;
5051
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005052#if !defined yyoverflow || YYERROR_VERBOSE
John Bauman66b8ab22014-05-06 15:57:45 -04005053/*-------------------------------------------------.
5054| yyexhaustedlab -- memory exhaustion comes here. |
5055`-------------------------------------------------*/
5056yyexhaustedlab:
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005057 yyerror (&yylloc, context, yyscanner, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005058 yyresult = 2;
5059 /* Fall through. */
5060#endif
5061
5062yyreturn:
5063 if (yychar != YYEMPTY)
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005064 {
5065 /* Make sure we have latest lookahead translation. See comments at
5066 user semantic actions for why this is necessary. */
5067 yytoken = YYTRANSLATE (yychar);
5068 yydestruct ("Cleanup: discarding lookahead",
5069 yytoken, &yylval, &yylloc, context, yyscanner);
5070 }
5071 /* Do not reclaim the symbols of the rule whose action triggered
John Bauman66b8ab22014-05-06 15:57:45 -04005072 this YYABORT or YYACCEPT. */
5073 YYPOPSTACK (yylen);
5074 YY_STACK_PRINT (yyss, yyssp);
5075 while (yyssp != yyss)
5076 {
5077 yydestruct ("Cleanup: popping",
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005078 yystos[*yyssp], yyvsp, yylsp, context, yyscanner);
John Bauman66b8ab22014-05-06 15:57:45 -04005079 YYPOPSTACK (1);
5080 }
5081#ifndef yyoverflow
5082 if (yyss != yyssa)
5083 YYSTACK_FREE (yyss);
5084#endif
5085#if YYERROR_VERBOSE
5086 if (yymsg != yymsgbuf)
5087 YYSTACK_FREE (yymsg);
5088#endif
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005089 return yyresult;
John Bauman66b8ab22014-05-06 15:57:45 -04005090}
5091
5092
5093
John Bauman66b8ab22014-05-06 15:57:45 -04005094int glslang_parse(TParseContext* context) {
Veranika Liaukevicheced26a2015-10-22 11:29:04 -04005095 return yyparse(context, context->getScanner());
John Bauman66b8ab22014-05-06 15:57:45 -04005096}