blob: 5e8dc311da6c820e12668a4165521a2f6b9e39e5 [file] [log] [blame]
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001
2/* A Bison parser, made by GNU Bison 2.4.1. */
John Bauman66b8ab22014-05-06 15:57:45 -04003
4/* Skeleton implementation for Bison's Yacc-like parsers in C
5
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
John Bauman66b8ab22014-05-06 15:57:45 -04008
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22/* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
31
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
34
35/* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
37
38/* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
44
45/* Identify Bison output. */
46#define YYBISON 1
47
48/* Bison version. */
Nicolas Capense9c5e4f2014-05-28 22:46:43 -040049#define YYBISON_VERSION "2.4.1"
John Bauman66b8ab22014-05-06 15:57:45 -040050
51/* Skeleton name. */
52#define YYSKELETON_NAME "yacc.c"
53
54/* Pure parsers. */
55#define YYPURE 1
56
57/* Push parsers. */
58#define YYPUSH 0
59
60/* Pull parsers. */
61#define YYPULL 1
62
63/* Using locations. */
Alexis Hetu15ae36c2015-06-18 21:10:09 -040064#define YYLSP_NEEDED 1
John Bauman66b8ab22014-05-06 15:57:45 -040065
66
67
68/* Copy the first part of user declarations. */
69
70
71//
Alexis Hetub14178b2015-04-13 13:23:20 -040072// Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved.
John Bauman66b8ab22014-05-06 15:57:45 -040073// Use of this source code is governed by a BSD-style license that can be
74// found in the LICENSE file.
75//
76
77// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
78
79// Ignore errors in auto-generated code.
80#if defined(__GNUC__)
81#pragma GCC diagnostic ignored "-Wunused-function"
82#pragma GCC diagnostic ignored "-Wunused-variable"
83#pragma GCC diagnostic ignored "-Wswitch-enum"
84#elif defined(_MSC_VER)
85#pragma warning(disable: 4065)
86#pragma warning(disable: 4189)
87#pragma warning(disable: 4505)
88#pragma warning(disable: 4701)
89#endif
90
Nicolas Capenscc863da2015-01-21 15:50:55 -050091#include "SymbolTable.h"
92#include "ParseHelper.h"
John Bauman66b8ab22014-05-06 15:57:45 -040093
John Baumand4ae8632014-05-06 16:18:33 -040094#define YYENABLE_NLS 0
John Baumand4ae8632014-05-06 16:18:33 -040095
John Bauman66b8ab22014-05-06 15:57:45 -040096#define YYLEX_PARAM context->scanner
97
98
99
100/* Enabling traces. */
101#ifndef YYDEBUG
102# define YYDEBUG 0
103#endif
104
105/* Enabling verbose error messages. */
106#ifdef YYERROR_VERBOSE
107# undef YYERROR_VERBOSE
108# define YYERROR_VERBOSE 1
109#else
110# define YYERROR_VERBOSE 0
111#endif
112
113/* Enabling the token table. */
114#ifndef YYTOKEN_TABLE
115# define YYTOKEN_TABLE 0
116#endif
117
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400118/* "%code requires" blocks. */
119
120
121#define YYLTYPE TSourceLoc
122#define YYLTYPE_IS_DECLARED 1
123
124
125
John Bauman66b8ab22014-05-06 15:57:45 -0400126
127/* Tokens. */
128#ifndef YYTOKENTYPE
129# define YYTOKENTYPE
130 /* Put the tokens into the symbol table, so that GDB and other debuggers
131 know about them. */
132 enum yytokentype {
133 INVARIANT = 258,
134 HIGH_PRECISION = 259,
135 MEDIUM_PRECISION = 260,
136 LOW_PRECISION = 261,
137 PRECISION = 262,
138 ATTRIBUTE = 263,
139 CONST_QUAL = 264,
140 BOOL_TYPE = 265,
141 FLOAT_TYPE = 266,
142 INT_TYPE = 267,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500143 UINT_TYPE = 268,
144 BREAK = 269,
145 CONTINUE = 270,
146 DO = 271,
147 ELSE = 272,
148 FOR = 273,
149 IF = 274,
150 DISCARD = 275,
151 RETURN = 276,
152 SWITCH = 277,
153 CASE = 278,
154 DEFAULT = 279,
155 BVEC2 = 280,
156 BVEC3 = 281,
157 BVEC4 = 282,
158 IVEC2 = 283,
159 IVEC3 = 284,
160 IVEC4 = 285,
161 VEC2 = 286,
162 VEC3 = 287,
163 VEC4 = 288,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500164 UVEC2 = 289,
165 UVEC3 = 290,
166 UVEC4 = 291,
167 MATRIX2 = 292,
168 MATRIX3 = 293,
169 MATRIX4 = 294,
170 IN_QUAL = 295,
171 OUT_QUAL = 296,
172 INOUT_QUAL = 297,
173 UNIFORM = 298,
174 VARYING = 299,
Alexis Hetub14178b2015-04-13 13:23:20 -0400175 MATRIX2x3 = 300,
176 MATRIX3x2 = 301,
177 MATRIX2x4 = 302,
178 MATRIX4x2 = 303,
179 MATRIX3x4 = 304,
180 MATRIX4x3 = 305,
181 CENTROID = 306,
182 FLAT = 307,
183 SMOOTH = 308,
184 STRUCT = 309,
185 VOID_TYPE = 310,
186 WHILE = 311,
187 SAMPLER2D = 312,
188 SAMPLERCUBE = 313,
189 SAMPLER_EXTERNAL_OES = 314,
190 SAMPLER2DRECT = 315,
191 SAMPLER2DARRAY = 316,
192 ISAMPLER2D = 317,
193 ISAMPLER3D = 318,
194 ISAMPLERCUBE = 319,
195 ISAMPLER2DARRAY = 320,
196 USAMPLER2D = 321,
197 USAMPLER3D = 322,
198 USAMPLERCUBE = 323,
199 USAMPLER2DARRAY = 324,
200 SAMPLER3D = 325,
201 SAMPLER3DRECT = 326,
202 SAMPLER2DSHADOW = 327,
203 SAMPLERCUBESHADOW = 328,
204 SAMPLER2DARRAYSHADOW = 329,
205 LAYOUT = 330,
206 IDENTIFIER = 331,
207 TYPE_NAME = 332,
208 FLOATCONSTANT = 333,
209 INTCONSTANT = 334,
210 UINTCONSTANT = 335,
211 BOOLCONSTANT = 336,
212 FIELD_SELECTION = 337,
213 LEFT_OP = 338,
214 RIGHT_OP = 339,
215 INC_OP = 340,
216 DEC_OP = 341,
217 LE_OP = 342,
218 GE_OP = 343,
219 EQ_OP = 344,
220 NE_OP = 345,
221 AND_OP = 346,
222 OR_OP = 347,
223 XOR_OP = 348,
224 MUL_ASSIGN = 349,
225 DIV_ASSIGN = 350,
226 ADD_ASSIGN = 351,
227 MOD_ASSIGN = 352,
228 LEFT_ASSIGN = 353,
229 RIGHT_ASSIGN = 354,
230 AND_ASSIGN = 355,
231 XOR_ASSIGN = 356,
232 OR_ASSIGN = 357,
233 SUB_ASSIGN = 358,
234 LEFT_PAREN = 359,
235 RIGHT_PAREN = 360,
236 LEFT_BRACKET = 361,
237 RIGHT_BRACKET = 362,
238 LEFT_BRACE = 363,
239 RIGHT_BRACE = 364,
240 DOT = 365,
241 COMMA = 366,
242 COLON = 367,
243 EQUAL = 368,
244 SEMICOLON = 369,
245 BANG = 370,
246 DASH = 371,
247 TILDE = 372,
248 PLUS = 373,
249 STAR = 374,
250 SLASH = 375,
251 PERCENT = 376,
252 LEFT_ANGLE = 377,
253 RIGHT_ANGLE = 378,
254 VERTICAL_BAR = 379,
255 CARET = 380,
256 AMPERSAND = 381,
257 QUESTION = 382
John Bauman66b8ab22014-05-06 15:57:45 -0400258 };
259#endif
260
261
262
263#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
264typedef union YYSTYPE
265{
266
267
268 struct {
269 TSourceLoc line;
270 union {
271 TString *string;
272 float f;
273 int i;
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500274 unsigned int u;
John Bauman66b8ab22014-05-06 15:57:45 -0400275 bool b;
276 };
277 TSymbol* symbol;
278 } lex;
279 struct {
280 TSourceLoc line;
281 TOperator op;
282 union {
283 TIntermNode* intermNode;
284 TIntermNodePair nodePair;
285 TIntermTyped* intermTypedNode;
286 TIntermAggregate* intermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -0400287 TIntermSwitch* intermSwitch;
288 TIntermCase* intermCase;
John Bauman66b8ab22014-05-06 15:57:45 -0400289 };
290 union {
291 TPublicType type;
292 TPrecision precision;
Nicolas Capens7d626792015-02-17 17:58:31 -0500293 TLayoutQualifier layoutQualifier;
John Bauman66b8ab22014-05-06 15:57:45 -0400294 TQualifier qualifier;
295 TFunction* function;
296 TParameter param;
Alexis Hetua8b364b2015-06-10 11:48:40 -0400297 TField* field;
298 TFieldList* fieldList;
John Bauman66b8ab22014-05-06 15:57:45 -0400299 };
300 } interm;
301
302
303
304} YYSTYPE;
305# define YYSTYPE_IS_TRIVIAL 1
306# define yystype YYSTYPE /* obsolescent; will be withdrawn */
307# define YYSTYPE_IS_DECLARED 1
308#endif
309
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400310#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
311typedef struct YYLTYPE
312{
313 int first_line;
314 int first_column;
315 int last_line;
316 int last_column;
317} YYLTYPE;
318# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
319# define YYLTYPE_IS_DECLARED 1
320# define YYLTYPE_IS_TRIVIAL 1
321#endif
322
John Bauman66b8ab22014-05-06 15:57:45 -0400323
324/* Copy the second part of user declarations. */
325
326
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400327extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
328extern void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason);
329
330#define YYLLOC_DEFAULT(Current, Rhs, N) do { (Current) = YYRHSLOC(Rhs, N ? 1 : 0); } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400331
332#define FRAG_VERT_ONLY(S, L) { \
Nicolas Capens08ca3c62015-02-13 16:06:45 -0500333 if (context->shaderType != GL_FRAGMENT_SHADER && \
334 context->shaderType != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400335 context->error(L, " supported in vertex/fragment shaders only ", S); \
336 context->recover(); \
337 } \
338}
339
340#define VERTEX_ONLY(S, L) { \
Nicolas Capens08ca3c62015-02-13 16:06:45 -0500341 if (context->shaderType != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400342 context->error(L, " supported in vertex shaders only ", S); \
343 context->recover(); \
344 } \
345}
346
347#define FRAG_ONLY(S, L) { \
Nicolas Capens08ca3c62015-02-13 16:06:45 -0500348 if (context->shaderType != GL_FRAGMENT_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400349 context->error(L, " supported in fragment shaders only ", S); \
350 context->recover(); \
351 } \
352}
353
Nicolas Capensc6841852015-02-15 14:25:37 -0500354#define ES2_ONLY(S, L) { \
355 if (context->shaderVersion != 100) { \
356 context->error(L, " supported in GLSL ES 1.00 only ", S); \
357 context->recover(); \
358 } \
359}
360
361#define ES3_ONLY(S, L) { \
362 if (context->shaderVersion != 300) { \
363 context->error(L, " supported in GLSL ES 3.00 only ", S); \
364 context->recover(); \
365 } \
366}
367
John Bauman66b8ab22014-05-06 15:57:45 -0400368
369
370#ifdef short
371# undef short
372#endif
373
374#ifdef YYTYPE_UINT8
375typedef YYTYPE_UINT8 yytype_uint8;
376#else
377typedef unsigned char yytype_uint8;
378#endif
379
380#ifdef YYTYPE_INT8
381typedef YYTYPE_INT8 yytype_int8;
382#elif (defined __STDC__ || defined __C99__FUNC__ \
383 || defined __cplusplus || defined _MSC_VER)
384typedef signed char yytype_int8;
385#else
386typedef short int yytype_int8;
387#endif
388
389#ifdef YYTYPE_UINT16
390typedef YYTYPE_UINT16 yytype_uint16;
391#else
392typedef unsigned short int yytype_uint16;
393#endif
394
395#ifdef YYTYPE_INT16
396typedef YYTYPE_INT16 yytype_int16;
397#else
398typedef short int yytype_int16;
399#endif
400
401#ifndef YYSIZE_T
402# ifdef __SIZE_TYPE__
403# define YYSIZE_T __SIZE_TYPE__
404# elif defined size_t
405# define YYSIZE_T size_t
406# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
407 || defined __cplusplus || defined _MSC_VER)
408# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
409# define YYSIZE_T size_t
410# else
411# define YYSIZE_T unsigned int
412# endif
413#endif
414
415#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
416
417#ifndef YY_
Nicolas Capense9c5e4f2014-05-28 22:46:43 -0400418# if YYENABLE_NLS
John Bauman66b8ab22014-05-06 15:57:45 -0400419# if ENABLE_NLS
420# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
421# define YY_(msgid) dgettext ("bison-runtime", msgid)
422# endif
423# endif
424# ifndef YY_
425# define YY_(msgid) msgid
426# endif
427#endif
428
429/* Suppress unused-variable warnings by "using" E. */
430#if ! defined lint || defined __GNUC__
431# define YYUSE(e) ((void) (e))
432#else
433# define YYUSE(e) /* empty */
434#endif
435
436/* Identity function, used to suppress warnings about constant conditions. */
437#ifndef lint
438# define YYID(n) (n)
439#else
440#if (defined __STDC__ || defined __C99__FUNC__ \
441 || defined __cplusplus || defined _MSC_VER)
442static int
443YYID (int yyi)
444#else
445static int
446YYID (yyi)
447 int yyi;
448#endif
449{
450 return yyi;
451}
452#endif
453
454#if ! defined yyoverflow || YYERROR_VERBOSE
455
456/* The parser invokes alloca or malloc; define the necessary symbols. */
457
458# ifdef YYSTACK_USE_ALLOCA
459# if YYSTACK_USE_ALLOCA
460# ifdef __GNUC__
461# define YYSTACK_ALLOC __builtin_alloca
462# elif defined __BUILTIN_VA_ARG_INCR
463# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
464# elif defined _AIX
465# define YYSTACK_ALLOC __alloca
466# elif defined _MSC_VER
467# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
468# define alloca _alloca
469# else
470# define YYSTACK_ALLOC alloca
471# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
472 || defined __cplusplus || defined _MSC_VER)
473# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
474# ifndef _STDLIB_H
475# define _STDLIB_H 1
476# endif
477# endif
478# endif
479# endif
480# endif
481
482# ifdef YYSTACK_ALLOC
483 /* Pacify GCC's `empty if-body' warning. */
484# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
485# ifndef YYSTACK_ALLOC_MAXIMUM
486 /* The OS might guarantee only one guard page at the bottom of the stack,
487 and a page size can be as small as 4096 bytes. So we cannot safely
488 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
489 to allow for a few compiler-allocated temporary stack slots. */
490# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
491# endif
492# else
493# define YYSTACK_ALLOC YYMALLOC
494# define YYSTACK_FREE YYFREE
495# ifndef YYSTACK_ALLOC_MAXIMUM
496# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
497# endif
498# if (defined __cplusplus && ! defined _STDLIB_H \
499 && ! ((defined YYMALLOC || defined malloc) \
500 && (defined YYFREE || defined free)))
501# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
502# ifndef _STDLIB_H
503# define _STDLIB_H 1
504# endif
505# endif
506# ifndef YYMALLOC
507# define YYMALLOC malloc
508# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
509 || defined __cplusplus || defined _MSC_VER)
510void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
511# endif
512# endif
513# ifndef YYFREE
514# define YYFREE free
515# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
516 || defined __cplusplus || defined _MSC_VER)
517void free (void *); /* INFRINGES ON USER NAME SPACE */
518# endif
519# endif
520# endif
521#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
522
523
524#if (! defined yyoverflow \
525 && (! defined __cplusplus \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400526 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
527 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
John Bauman66b8ab22014-05-06 15:57:45 -0400528
529/* A type that is properly aligned for any stack member. */
530union yyalloc
531{
532 yytype_int16 yyss_alloc;
533 YYSTYPE yyvs_alloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400534 YYLTYPE yyls_alloc;
John Bauman66b8ab22014-05-06 15:57:45 -0400535};
536
537/* The size of the maximum gap between one aligned stack and the next. */
538# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
539
540/* The size of an array large to enough to hold all stacks, each with
541 N elements. */
542# define YYSTACK_BYTES(N) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400543 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
544 + 2 * YYSTACK_GAP_MAXIMUM)
John Bauman66b8ab22014-05-06 15:57:45 -0400545
546/* Copy COUNT objects from FROM to TO. The source and destination do
547 not overlap. */
548# ifndef YYCOPY
549# if defined __GNUC__ && 1 < __GNUC__
550# define YYCOPY(To, From, Count) \
551 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
552# else
553# define YYCOPY(To, From, Count) \
554 do \
555 { \
556 YYSIZE_T yyi; \
557 for (yyi = 0; yyi < (Count); yyi++) \
558 (To)[yyi] = (From)[yyi]; \
559 } \
560 while (YYID (0))
561# endif
562# endif
563
564/* Relocate STACK from its old location to the new one. The
565 local variables YYSIZE and YYSTACKSIZE give the old and new number of
566 elements in the stack, and YYPTR gives the new location of the
567 stack. Advance YYPTR to a properly aligned location for the next
568 stack. */
569# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
570 do \
571 { \
572 YYSIZE_T yynewbytes; \
573 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
574 Stack = &yyptr->Stack_alloc; \
575 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
576 yyptr += yynewbytes / sizeof (*yyptr); \
577 } \
578 while (YYID (0))
579
580#endif
581
582/* YYFINAL -- State number of the termination state. */
Alexis Hetua35d8232015-06-11 17:11:06 -0400583#define YYFINAL 110
John Bauman66b8ab22014-05-06 15:57:45 -0400584/* YYLAST -- Last index in YYTABLE. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400585#define YYLAST 2412
John Bauman66b8ab22014-05-06 15:57:45 -0400586
587/* YYNTOKENS -- Number of terminals. */
Alexis Hetub14178b2015-04-13 13:23:20 -0400588#define YYNTOKENS 128
John Bauman66b8ab22014-05-06 15:57:45 -0400589/* YYNNTS -- Number of nonterminals. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400590#define YYNNTS 93
John Bauman66b8ab22014-05-06 15:57:45 -0400591/* YYNRULES -- Number of rules. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400592#define YYNRULES 269
John Bauman66b8ab22014-05-06 15:57:45 -0400593/* YYNRULES -- Number of states. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400594#define YYNSTATES 409
John Bauman66b8ab22014-05-06 15:57:45 -0400595
596/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
597#define YYUNDEFTOK 2
Alexis Hetub14178b2015-04-13 13:23:20 -0400598#define YYMAXUTOK 382
John Bauman66b8ab22014-05-06 15:57:45 -0400599
600#define YYTRANSLATE(YYX) \
601 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
602
603/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
604static const yytype_uint8 yytranslate[] =
605{
606 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
632 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
633 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
634 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
635 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
636 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
637 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
638 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
639 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
Alexis Hetub027aa92015-01-19 15:56:12 -0500640 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500641 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Alexis Hetub14178b2015-04-13 13:23:20 -0400642 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
643 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
644 125, 126, 127
John Bauman66b8ab22014-05-06 15:57:45 -0400645};
646
647#if YYDEBUG
648/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
649 YYRHS. */
650static const yytype_uint16 yyprhs[] =
651{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500652 0, 0, 3, 5, 7, 9, 11, 13, 15, 19,
653 21, 26, 28, 32, 35, 38, 40, 42, 44, 48,
654 51, 54, 57, 59, 62, 66, 69, 71, 73, 75,
Alexis Hetu17809052015-05-13 11:28:22 -0400655 77, 80, 83, 86, 88, 90, 92, 94, 96, 100,
656 104, 108, 110, 114, 118, 120, 124, 128, 130, 134,
657 138, 142, 146, 148, 152, 156, 158, 162, 164, 168,
658 170, 174, 176, 180, 182, 186, 188, 192, 194, 200,
659 202, 206, 208, 210, 212, 214, 216, 218, 220, 222,
Alexis Hetua35d8232015-06-11 17:11:06 -0400660 224, 226, 228, 230, 234, 236, 239, 242, 245, 250,
661 256, 263, 273, 276, 279, 281, 283, 286, 290, 294,
662 297, 303, 307, 310, 314, 317, 318, 320, 322, 324,
663 326, 328, 332, 339, 347, 356, 362, 364, 367, 373,
664 380, 388, 393, 396, 398, 401, 403, 405, 407, 409,
665 411, 414, 416, 419, 421, 423, 426, 428, 430, 432,
666 435, 438, 440, 442, 445, 447, 449, 451, 456, 458,
667 462, 464, 468, 472, 474, 479, 481, 483, 485, 487,
668 489, 491, 493, 495, 497, 499, 501, 503, 505, 507,
669 509, 511, 513, 515, 517, 519, 521, 523, 525, 527,
670 529, 531, 533, 535, 537, 539, 541, 543, 545, 547,
671 549, 551, 553, 555, 557, 559, 561, 563, 565, 567,
672 568, 575, 576, 582, 584, 587, 591, 596, 598, 602,
673 604, 609, 611, 613, 615, 617, 619, 621, 623, 625,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400674 627, 629, 631, 634, 635, 636, 642, 644, 646, 647,
675 650, 651, 654, 657, 661, 663, 666, 668, 671, 677,
676 681, 683, 684, 691, 695, 698, 700, 705, 706, 713,
677 714, 723, 724, 732, 734, 736, 738, 739, 742, 746,
678 749, 752, 755, 759, 762, 764, 767, 769, 771, 772
John Bauman66b8ab22014-05-06 15:57:45 -0400679};
680
681/* YYRHS -- A `-1'-separated list of the rules' RHS. */
682static const yytype_int16 yyrhs[] =
683{
Alexis Hetu76a343a2015-06-04 17:21:22 -0400684 217, 0, -1, 76, -1, 129, -1, 79, -1, 80,
Alexis Hetub14178b2015-04-13 13:23:20 -0400685 -1, 78, -1, 81, -1, 104, 156, 105, -1, 130,
686 -1, 131, 106, 132, 107, -1, 133, -1, 131, 110,
687 82, -1, 131, 85, -1, 131, 86, -1, 156, -1,
688 134, -1, 135, -1, 131, 110, 135, -1, 137, 105,
689 -1, 136, 105, -1, 138, 55, -1, 138, -1, 138,
Alexis Hetua35d8232015-06-11 17:11:06 -0400690 154, -1, 137, 111, 154, -1, 139, 104, -1, 181,
Alexis Hetub14178b2015-04-13 13:23:20 -0400691 -1, 76, -1, 82, -1, 131, -1, 85, 140, -1,
692 86, 140, -1, 141, 140, -1, 118, -1, 116, -1,
Alexis Hetu17809052015-05-13 11:28:22 -0400693 115, -1, 117, -1, 140, -1, 142, 119, 140, -1,
694 142, 120, 140, -1, 142, 121, 140, -1, 142, -1,
695 143, 118, 142, -1, 143, 116, 142, -1, 143, -1,
696 144, 83, 143, -1, 144, 84, 143, -1, 144, -1,
697 145, 122, 144, -1, 145, 123, 144, -1, 145, 87,
698 144, -1, 145, 88, 144, -1, 145, -1, 146, 89,
699 145, -1, 146, 90, 145, -1, 146, -1, 147, 126,
700 146, -1, 147, -1, 148, 125, 147, -1, 148, -1,
701 149, 124, 148, -1, 149, -1, 150, 91, 149, -1,
702 150, -1, 151, 93, 150, -1, 151, -1, 152, 92,
703 151, -1, 152, -1, 152, 127, 156, 112, 154, -1,
704 153, -1, 140, 155, 154, -1, 113, -1, 94, -1,
705 95, -1, 97, -1, 96, -1, 103, -1, 98, -1,
706 99, -1, 100, -1, 101, -1, 102, -1, 154, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400707 156, 111, 154, -1, 153, -1, 76, 108, -1, 160,
708 114, -1, 168, 114, -1, 7, 176, 180, 114, -1,
709 173, 158, 185, 109, 114, -1, 173, 158, 185, 109,
710 76, 114, -1, 173, 158, 185, 109, 76, 106, 157,
711 107, 114, -1, 173, 114, -1, 161, 105, -1, 163,
712 -1, 162, -1, 163, 165, -1, 162, 111, 165, -1,
713 170, 76, 104, -1, 175, 76, -1, 175, 76, 106,
714 157, 107, -1, 172, 166, 164, -1, 166, 164, -1,
715 172, 166, 167, -1, 166, 167, -1, -1, 40, -1,
716 41, -1, 42, -1, 175, -1, 169, -1, 168, 111,
717 76, -1, 168, 111, 76, 106, 157, 107, -1, 168,
718 111, 76, 106, 107, 113, 189, -1, 168, 111, 76,
719 106, 157, 107, 113, 189, -1, 168, 111, 76, 113,
720 189, -1, 170, -1, 170, 76, -1, 170, 76, 106,
721 157, 107, -1, 170, 76, 106, 107, 113, 189, -1,
722 170, 76, 106, 157, 107, 113, 189, -1, 170, 76,
723 113, 189, -1, 3, 76, -1, 175, -1, 173, 175,
724 -1, 53, -1, 52, -1, 9, -1, 8, -1, 44,
725 -1, 3, 44, -1, 174, -1, 171, 174, -1, 171,
726 -1, 177, -1, 177, 174, -1, 9, -1, 40, -1,
727 41, -1, 51, 40, -1, 51, 41, -1, 43, -1,
728 180, -1, 176, 180, -1, 4, -1, 5, -1, 6,
729 -1, 75, 104, 178, 105, -1, 179, -1, 178, 111,
730 179, -1, 76, -1, 76, 113, 79, -1, 76, 113,
731 80, -1, 181, -1, 181, 106, 157, 107, -1, 55,
732 -1, 11, -1, 12, -1, 13, -1, 10, -1, 31,
733 -1, 32, -1, 33, -1, 25, -1, 26, -1, 27,
734 -1, 28, -1, 29, -1, 30, -1, 34, -1, 35,
735 -1, 36, -1, 37, -1, 38, -1, 39, -1, 45,
736 -1, 46, -1, 47, -1, 48, -1, 49, -1, 50,
737 -1, 57, -1, 58, -1, 59, -1, 70, -1, 61,
738 -1, 62, -1, 63, -1, 64, -1, 65, -1, 66,
739 -1, 67, -1, 68, -1, 69, -1, 72, -1, 73,
740 -1, 74, -1, 182, -1, 77, -1, -1, 54, 76,
741 108, 183, 185, 109, -1, -1, 54, 108, 184, 185,
742 109, -1, 186, -1, 185, 186, -1, 175, 187, 114,
743 -1, 173, 175, 187, 114, -1, 188, -1, 187, 111,
744 188, -1, 76, -1, 76, 106, 157, 107, -1, 154,
745 -1, 159, -1, 193, -1, 192, -1, 190, -1, 202,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400746 -1, 203, -1, 205, -1, 207, -1, 209, -1, 216,
747 -1, 108, 109, -1, -1, -1, 108, 194, 201, 195,
748 109, -1, 200, -1, 192, -1, -1, 198, 200, -1,
749 -1, 199, 192, -1, 108, 109, -1, 108, 201, 109,
750 -1, 191, -1, 201, 191, -1, 114, -1, 156, 114,
751 -1, 19, 104, 156, 105, 204, -1, 197, 17, 197,
752 -1, 197, -1, -1, 22, 104, 156, 105, 206, 193,
753 -1, 23, 157, 112, -1, 24, 112, -1, 156, -1,
754 170, 76, 113, 189, -1, -1, 56, 104, 210, 208,
755 105, 196, -1, -1, 16, 211, 197, 56, 104, 156,
756 105, 114, -1, -1, 18, 104, 212, 213, 215, 105,
757 196, -1, 202, -1, 190, -1, 208, -1, -1, 214,
758 114, -1, 214, 114, 156, -1, 15, 114, -1, 14,
759 114, -1, 21, 114, -1, 21, 156, 114, -1, 20,
760 114, -1, 218, -1, 217, 218, -1, 219, -1, 159,
761 -1, -1, 160, 220, 200, -1
John Bauman66b8ab22014-05-06 15:57:45 -0400762};
763
764/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
765static const yytype_uint16 yyrline[] =
766{
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400767 0, 202, 202, 237, 240, 245, 250, 255, 260, 266,
768 269, 272, 275, 278, 281, 287, 295, 395, 398, 406,
769 410, 417, 421, 428, 434, 443, 451, 528, 535, 545,
770 548, 558, 568, 590, 591, 592, 593, 601, 602, 611,
771 620, 633, 634, 642, 653, 654, 663, 675, 676, 686,
772 696, 706, 719, 720, 730, 743, 744, 758, 759, 773,
773 774, 788, 789, 802, 803, 816, 817, 830, 831, 848,
774 849, 862, 863, 864, 865, 867, 868, 869, 871, 873,
775 875, 877, 882, 885, 896, 904, 912, 939, 945, 952,
776 956, 960, 964, 971, 1009, 1012, 1019, 1027, 1048, 1069,
777 1080, 1109, 1114, 1124, 1129, 1139, 1142, 1145, 1148, 1154,
778 1161, 1164, 1168, 1172, 1177, 1182, 1189, 1193, 1197, 1201,
779 1206, 1211, 1215, 1291, 1301, 1307, 1310, 1316, 1322, 1329,
780 1338, 1347, 1350, 1353, 1360, 1364, 1371, 1375, 1380, 1385,
781 1395, 1405, 1414, 1424, 1431, 1434, 1437, 1443, 1450, 1453,
782 1459, 1462, 1465, 1471, 1474, 1489, 1493, 1497, 1501, 1505,
783 1509, 1514, 1519, 1524, 1529, 1534, 1539, 1544, 1549, 1554,
784 1559, 1564, 1569, 1575, 1581, 1587, 1593, 1599, 1605, 1611,
785 1617, 1623, 1628, 1633, 1642, 1647, 1652, 1657, 1662, 1667,
786 1672, 1677, 1682, 1687, 1692, 1697, 1702, 1707, 1712, 1725,
787 1725, 1728, 1728, 1734, 1737, 1753, 1756, 1765, 1769, 1775,
788 1782, 1797, 1801, 1805, 1806, 1812, 1813, 1814, 1815, 1816,
789 1817, 1818, 1822, 1823, 1823, 1823, 1833, 1834, 1838, 1838,
790 1839, 1839, 1844, 1847, 1857, 1860, 1866, 1867, 1871, 1879,
791 1883, 1890, 1890, 1897, 1900, 1909, 1914, 1931, 1931, 1936,
792 1936, 1943, 1943, 1951, 1954, 1960, 1963, 1969, 1973, 1980,
793 1983, 1986, 1989, 1992, 2001, 2005, 2012, 2015, 2021, 2021
John Bauman66b8ab22014-05-06 15:57:45 -0400794};
795#endif
796
797#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
798/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
799 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
800static const char *const yytname[] =
801{
802 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
803 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500804 "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
805 "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
806 "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500807 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
808 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400809 "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
810 "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
811 "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
812 "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
813 "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
814 "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
815 "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
816 "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
817 "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
818 "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
819 "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
820 "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
821 "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500822 "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
823 "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
824 "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
825 "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
826 "primary_expression", "postfix_expression", "integer_expression",
827 "function_call", "function_call_or_method", "function_call_generic",
John Bauman66b8ab22014-05-06 15:57:45 -0400828 "function_call_header_no_parameters",
829 "function_call_header_with_parameters", "function_call_header",
830 "function_identifier", "unary_expression", "unary_operator",
831 "multiplicative_expression", "additive_expression", "shift_expression",
832 "relational_expression", "equality_expression", "and_expression",
833 "exclusive_or_expression", "inclusive_or_expression",
834 "logical_and_expression", "logical_xor_expression",
835 "logical_or_expression", "conditional_expression",
836 "assignment_expression", "assignment_operator", "expression",
Alexis Hetua35d8232015-06-11 17:11:06 -0400837 "constant_expression", "enter_struct", "declaration",
838 "function_prototype", "function_declarator",
839 "function_header_with_parameters", "function_header",
840 "parameter_declarator", "parameter_declaration", "parameter_qualifier",
841 "parameter_type_specifier", "init_declarator_list", "single_declaration",
842 "fully_specified_type", "interpolation_qualifier",
843 "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
844 "type_specifier", "precision_qualifier", "layout_qualifier",
845 "layout_qualifier_id_list", "layout_qualifier_id",
Nicolas Capens7d626792015-02-17 17:58:31 -0500846 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
847 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400848 "struct_declarator_list", "struct_declarator", "initializer",
849 "declaration_statement", "statement", "simple_statement",
850 "compound_statement", "$@3", "$@4", "statement_no_new_scope",
851 "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
852 "statement_list", "expression_statement", "selection_statement",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400853 "selection_rest_statement", "switch_statement", "$@7", "case_label",
854 "condition", "iteration_statement", "$@8", "$@9", "$@10",
855 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400856 "jump_statement", "translation_unit", "external_declaration",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400857 "function_definition", "$@11", 0
John Bauman66b8ab22014-05-06 15:57:45 -0400858};
859#endif
860
861# ifdef YYPRINT
862/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
863 token YYLEX-NUM. */
864static const yytype_uint16 yytoknum[] =
865{
866 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
867 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
868 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
869 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
870 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
871 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
872 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
873 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
874 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
Nicolas Capensc6841852015-02-15 14:25:37 -0500875 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500876 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400877 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
878 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400879};
880# endif
881
882/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
883static const yytype_uint8 yyr1[] =
884{
Alexis Hetub14178b2015-04-13 13:23:20 -0400885 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
886 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
887 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
Alexis Hetu17809052015-05-13 11:28:22 -0400888 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
889 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
890 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
891 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
892 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
Alexis Hetua35d8232015-06-11 17:11:06 -0400893 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
894 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
895 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
896 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
897 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
898 173, 173, 173, 173, 173, 173, 174, 174, 174, 174,
899 174, 174, 175, 175, 176, 176, 176, 177, 178, 178,
900 179, 179, 179, 180, 180, 181, 181, 181, 181, 181,
901 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
902 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
903 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
904 181, 181, 181, 181, 181, 181, 181, 181, 181, 183,
905 182, 184, 182, 185, 185, 186, 186, 187, 187, 188,
906 188, 189, 190, 191, 191, 192, 192, 192, 192, 192,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400907 192, 192, 193, 194, 195, 193, 196, 196, 198, 197,
908 199, 197, 200, 200, 201, 201, 202, 202, 203, 204,
909 204, 206, 205, 207, 207, 208, 208, 210, 209, 211,
910 209, 212, 209, 213, 213, 214, 214, 215, 215, 216,
911 216, 216, 216, 216, 217, 217, 218, 218, 220, 219
John Bauman66b8ab22014-05-06 15:57:45 -0400912};
913
914/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
915static const yytype_uint8 yyr2[] =
916{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500917 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
918 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
919 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
Alexis Hetu17809052015-05-13 11:28:22 -0400920 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
921 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
922 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
923 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
924 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400925 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
926 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
927 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
928 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
929 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
930 2, 1, 2, 1, 1, 2, 1, 1, 1, 2,
931 2, 1, 1, 2, 1, 1, 1, 4, 1, 3,
932 1, 3, 3, 1, 4, 1, 1, 1, 1, 1,
John Bauman66b8ab22014-05-06 15:57:45 -0400933 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetub14178b2015-04-13 13:23:20 -0400934 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
935 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400936 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
937 6, 0, 5, 1, 2, 3, 4, 1, 3, 1,
938 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400939 1, 1, 2, 0, 0, 5, 1, 1, 0, 2,
940 0, 2, 2, 3, 1, 2, 1, 2, 5, 3,
941 1, 0, 6, 3, 2, 1, 4, 0, 6, 0,
942 8, 0, 7, 1, 1, 1, 0, 2, 3, 2,
943 2, 2, 3, 2, 1, 2, 1, 1, 0, 3
John Bauman66b8ab22014-05-06 15:57:45 -0400944};
945
946/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
947 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
948 means the default is an error. */
Alexis Hetuad6b8752015-06-09 16:15:30 -0400949static const yytype_uint16 yydefact[] =
John Bauman66b8ab22014-05-06 15:57:45 -0400950{
Alexis Hetua35d8232015-06-11 17:11:06 -0400951 0, 0, 144, 145, 146, 0, 128, 136, 159, 156,
952 157, 158, 163, 164, 165, 166, 167, 168, 160, 161,
953 162, 169, 170, 171, 172, 173, 174, 137, 138, 141,
954 129, 175, 176, 177, 178, 179, 180, 0, 126, 125,
955 0, 155, 181, 182, 183, 185, 186, 187, 188, 189,
956 190, 191, 192, 193, 184, 194, 195, 196, 0, 198,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400957 267, 268, 0, 95, 105, 0, 110, 116, 133, 0,
958 131, 123, 0, 134, 142, 153, 197, 0, 264, 266,
Alexis Hetua35d8232015-06-11 17:11:06 -0400959 130, 122, 0, 139, 140, 0, 201, 0, 86, 0,
960 93, 105, 127, 106, 107, 108, 96, 0, 105, 0,
961 87, 117, 132, 0, 92, 0, 124, 143, 135, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400962 1, 265, 0, 199, 0, 150, 0, 148, 0, 269,
Alexis Hetua35d8232015-06-11 17:11:06 -0400963 97, 102, 104, 109, 0, 111, 98, 0, 0, 85,
964 0, 0, 0, 0, 203, 2, 6, 4, 5, 7,
965 28, 0, 0, 0, 35, 34, 36, 33, 3, 9,
966 29, 11, 16, 17, 0, 0, 22, 0, 37, 0,
967 41, 44, 47, 52, 55, 57, 59, 61, 63, 65,
968 67, 84, 0, 26, 88, 0, 0, 0, 147, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400969 0, 0, 249, 0, 0, 0, 0, 0, 0, 0,
970 0, 223, 232, 236, 37, 69, 82, 0, 212, 0,
971 153, 215, 234, 214, 213, 0, 216, 217, 218, 219,
972 220, 221, 99, 101, 103, 0, 0, 0, 0, 211,
973 121, 0, 209, 0, 207, 0, 204, 30, 31, 0,
974 13, 14, 0, 0, 20, 19, 0, 21, 23, 25,
975 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400977 0, 154, 0, 202, 151, 152, 149, 260, 259, 230,
978 251, 0, 263, 261, 0, 0, 0, 244, 247, 222,
979 0, 72, 73, 75, 74, 77, 78, 79, 80, 81,
980 76, 71, 0, 0, 237, 233, 235, 0, 0, 0,
981 115, 0, 118, 0, 0, 0, 205, 0, 89, 8,
982 0, 15, 27, 12, 18, 24, 38, 39, 40, 43,
983 42, 45, 46, 50, 51, 48, 49, 53, 54, 56,
984 58, 60, 62, 64, 66, 0, 200, 0, 0, 0,
985 0, 0, 262, 0, 243, 0, 224, 70, 83, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -0400986 0, 112, 119, 0, 206, 0, 208, 0, 90, 10,
Alexis Hetu76a343a2015-06-04 17:21:22 -0400987 0, 0, 229, 231, 254, 253, 256, 230, 241, 245,
988 0, 0, 0, 0, 100, 113, 0, 120, 210, 0,
989 68, 0, 255, 0, 0, 240, 238, 0, 0, 0,
990 225, 114, 0, 0, 257, 0, 230, 242, 0, 227,
991 248, 226, 91, 0, 258, 252, 239, 246, 250
John Bauman66b8ab22014-05-06 15:57:45 -0400992};
993
994/* YYDEFGOTO[NTERM-NUM]. */
995static const yytype_int16 yydefgoto[] =
996{
Alexis Hetu76a343a2015-06-04 17:21:22 -0400997 -1, 148, 149, 150, 310, 151, 152, 153, 154, 155,
998 156, 157, 194, 159, 160, 161, 162, 163, 164, 165,
999 166, 167, 168, 169, 170, 195, 196, 292, 197, 172,
1000 105, 198, 199, 62, 63, 64, 121, 96, 97, 122,
Alexis Hetua35d8232015-06-11 17:11:06 -04001001 65, 66, 67, 68, 98, 69, 70, 71, 72, 73,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001002 116, 117, 74, 173, 76, 175, 114, 133, 134, 223,
1003 224, 220, 201, 202, 203, 204, 280, 373, 400, 337,
1004 338, 339, 401, 205, 206, 207, 386, 208, 387, 209,
1005 372, 210, 345, 269, 340, 366, 383, 384, 211, 77,
1006 78, 79, 89
John Bauman66b8ab22014-05-06 15:57:45 -04001007};
1008
1009/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1010 STATE-NUM. */
Alexis Hetu76a343a2015-06-04 17:21:22 -04001011#define YYPACT_NINF -333
John Bauman66b8ab22014-05-06 15:57:45 -04001012static const yytype_int16 yypact[] =
1013{
Alexis Hetu76a343a2015-06-04 17:21:22 -04001014 2050, -21, -333, -333, -333, 21, -333, -333, -333, -333,
1015 -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
1016 -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
1017 -333, -333, -333, -333, -333, -333, -333, 26, -333, -333,
1018 -46, -333, -333, -333, -333, -333, -333, -333, -333, -333,
1019 -333, -333, -333, -333, -333, -333, -333, -333, -25, -333,
1020 -333, -78, -16, -15, -1, -43, -333, 34, 7, 1167,
1021 -333, -333, 2335, 7, -333, 31, -333, 1975, -333, -333,
1022 -333, -333, 2335, -333, -333, 5, -333, 47, -333, 54,
1023 -333, 19, -333, -333, -333, -333, -333, 2199, 114, 49,
1024 -333, -23, -333, 58, -333, 2125, -333, -333, -333, 1528,
1025 -333, -333, 13, -333, 2125, 33, -12, -333, 395, -333,
1026 -333, -333, -333, 104, 2199, -26, -333, 1237, 1528, -333,
1027 139, 2199, 113, 1720, -333, 86, -333, -333, -333, -333,
1028 -333, 1528, 1528, 1528, -333, -333, -333, -333, -333, -333,
1029 30, -333, -333, -333, 88, -5, 1623, 91, -333, 1528,
1030 38, 45, 1, -69, 75, 70, 72, 74, 109, 108,
1031 -70, -333, 95, -333, -333, 2125, 1805, 92, -333, 47,
1032 93, 94, -333, 102, 105, 107, 1335, 118, 1528, 111,
1033 120, 122, -333, -333, 117, -333, -333, -13, -333, -78,
1034 39, -333, -333, -333, -333, 511, -333, -333, -333, -333,
1035 -333, -333, 121, -333, -333, 1430, 1528, 119, 126, -333,
1036 -333, 113, 128, 18, -333, -63, -333, -333, -333, -2,
1037 -333, -333, 1528, 2267, -333, -333, 1528, 131, -333, -333,
1038 -333, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528,
1039 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528,
1040 1528, -333, 1890, -333, -333, -333, -333, -333, -333, 129,
1041 -333, 1528, -333, -333, 27, 1528, 127, -333, -333, -333,
1042 627, -333, -333, -333, -333, -333, -333, -333, -333, -333,
1043 -333, -333, 1528, 1528, -333, -333, -333, 1528, 125, 134,
1044 -333, 1528, 132, 28, 1528, 113, -333, -62, -333, -333,
1045 135, 136, -333, 142, -333, -333, -333, -333, -333, 38,
1046 38, 45, 45, 1, 1, 1, 1, -69, -69, 75,
1047 70, 72, 74, 109, 108, 62, -333, 192, 54, 859,
1048 975, 6, -333, 15, -333, 1072, 627, -333, -333, 143,
1049 1528, 138, -333, 1528, -333, 149, -333, 1528, -333, -333,
1050 1528, 145, -333, -333, -333, -333, 1072, 129, -333, 136,
1051 181, 2199, 153, 150, -333, -333, 1528, -333, -333, 154,
1052 -333, 1528, -333, 146, 160, 249, -333, 159, 155, 743,
1053 -333, -333, 156, 17, 1528, 743, 129, -333, 1528, -333,
1054 -333, -333, -333, 157, 136, -333, -333, -333, -333
John Bauman66b8ab22014-05-06 15:57:45 -04001055};
1056
1057/* YYPGOTO[NTERM-NUM]. */
1058static const yytype_int16 yypgoto[] =
1059{
Alexis Hetu76a343a2015-06-04 17:21:22 -04001060 -333, -333, -333, -333, -333, -333, -333, 36, -333, -333,
1061 -333, -333, 40, -333, -66, -61, -98, -65, 22, 20,
1062 16, 43, 44, 14, -333, -94, -124, -333, -141, -113,
1063 -333, 9, 11, -333, -333, -333, 177, 186, 180, 182,
1064 -333, -333, -324, -333, -333, -102, -30, -68, 274, -333,
1065 -333, 130, -48, 0, -333, -333, -333, -97, -127, 83,
1066 2, -206, -35, -198, -319, -79, -333, -333, -85, -332,
1067 -333, -333, -84, 32, -29, -333, -333, -333, -333, -333,
1068 -53, -333, -333, -333, -333, -333, -333, -333, -333, -333,
1069 237, -333, -333
John Bauman66b8ab22014-05-06 15:57:45 -04001070};
1071
1072/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1073 positive, shift that token. If negative, reduce the rule which
1074 number is the opposite. If zero, do what YYDEFACT says.
1075 If YYTABLE_NINF, syntax error. */
Alexis Hetu76a343a2015-06-04 17:21:22 -04001076#define YYTABLE_NINF -229
John Bauman66b8ab22014-05-06 15:57:45 -04001077static const yytype_int16 yytable[] =
1078{
Alexis Hetu76a343a2015-06-04 17:21:22 -04001079 75, 106, 229, 131, 219, 119, 226, 296, 92, 60,
1080 300, 61, 131, 307, 218, 171, 7, 176, 248, 249,
1081 363, 370, 259, 80, 107, 2, 3, 4, 92, 123,
1082 85, 131, 238, 171, 112, 385, 88, 132, 102, 93,
1083 94, 95, 370, 108, 357, 274, 132, 27, 28, 226,
1084 29, 308, 358, 250, 251, 81, 123, 260, 37, 93,
1085 94, 95, 86, 221, 406, 132, 83, 84, 99, 75,
1086 399, 100, 75, 131, 131, 276, 399, 75, 262, 87,
1087 215, 126, 75, 127, 246, 247, 60, 216, 61, 90,
1088 128, 311, 219, 178, 171, 352, 91, 75, 293, 179,
1089 235, 294, 299, 309, -94, 75, 236, 132, 132, 293,
1090 101, 367, 315, 113, 75, 230, 231, 293, 200, 335,
1091 368, 171, 403, 115, 75, 125, 293, 174, 293, 305,
1092 341, 75, 306, 75, 343, 226, 232, 109, 293, 305,
1093 233, 342, 354, -26, 375, 109, 177, 377, 296, 158,
1094 323, 324, 325, 326, 93, 94, 95, 241, 242, 243,
1095 131, 244, 118, 245, 252, 253, 129, 158, 347, 348,
1096 391, 264, 265, 293, 360, 75, 75, 219, 319, 320,
1097 212, 227, 228, 80, 349, 321, 322, 327, 328, 222,
1098 -27, 355, 407, 234, 132, 239, 254, 255, 256, 240,
1099 257, 258, 261, 171, 369, 200, 270, 267, 268, 271,
1100 171, 281, 282, 283, 284, 285, 286, 287, 288, 289,
1101 290, 272, 275, 277, 278, 369, 219, 297, 158, 219,
1102 291, 279, 301, 302, 304, -155, 380, -228, 350, 344,
1103 393, 351, 359, 371, 379, 353, -28, 293, 361, 381,
1104 374, 376, 219, 404, 362, 158, 378, 388, 389, 390,
1105 394, 392, 75, 171, 371, 395, 396, 191, 398, 314,
1106 402, 408, 331, 334, 219, 330, 329, 120, 124, 82,
1107 200, 316, 317, 318, 158, 158, 158, 158, 158, 158,
Alexis Hetua35d8232015-06-11 17:11:06 -04001108 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001109 332, 213, 333, 106, 303, 364, 214, 356, 397, 266,
1110 405, 365, 346, 382, 111, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001112 0, 0, 0, 0, 0, 0, 0, 158, 0, 200,
1113 200, 0, 0, 0, 158, 200, 200, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001114 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001115 0, 0, 0, 0, 0, 0, 200, 0, 0, 0,
1116 0, 75, 0, 0, 0, 0, 0, 0, 0, 0,
1117 0, 0, 0, 0, 0, 0, 0, 0, 0, 200,
1118 0, 0, 0, 0, 0, 200, 0, 158, 1, 2,
1119 3, 4, 5, 6, 7, 8, 9, 10, 11, 180,
1120 181, 182, 0, 183, 184, 185, 186, 187, 188, 189,
1121 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1122 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1123 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1124 41, 190, 42, 43, 44, 0, 45, 46, 47, 48,
1125 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1126 58, 135, 59, 136, 137, 138, 139, 140, 0, 0,
1127 141, 142, 0, 0, 0, 0, 0, 0, 0, 0,
1128 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
1129 0, 0, 0, 191, 192, 0, 0, 0, 0, 193,
1130 144, 145, 146, 147, 1, 2, 3, 4, 5, 6,
1131 7, 8, 9, 10, 11, 180, 181, 182, 0, 183,
1132 184, 185, 186, 187, 188, 189, 12, 13, 14, 15,
1133 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1134 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1135 35, 36, 37, 38, 39, 40, 41, 190, 42, 43,
1136 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1137 53, 54, 0, 55, 56, 57, 58, 135, 59, 136,
1138 137, 138, 139, 140, 0, 0, 141, 142, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001140 0, 0, 0, 0, 0, 143, 0, 0, 0, 191,
1141 295, 0, 0, 0, 0, 193, 144, 145, 146, 147,
1142 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1143 11, 180, 181, 182, 0, 183, 184, 185, 186, 187,
1144 188, 189, 12, 13, 14, 15, 16, 17, 18, 19,
1145 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1146 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1147 39, 40, 41, 190, 42, 43, 44, 0, 45, 46,
1148 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1149 56, 57, 58, 135, 59, 136, 137, 138, 139, 140,
1150 0, 0, 141, 142, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001152 0, 143, 0, 0, 0, 191, 0, 0, 0, 0,
1153 0, 193, 144, 145, 146, 147, 1, 2, 3, 4,
1154 5, 6, 7, 8, 9, 10, 11, 180, 181, 182,
1155 0, 183, 184, 185, 186, 187, 188, 189, 12, 13,
1156 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1157 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1158 33, 34, 35, 36, 37, 38, 39, 40, 41, 190,
1159 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1160 51, 52, 53, 54, 0, 55, 56, 57, 58, 135,
1161 59, 136, 137, 138, 139, 140, 0, 0, 141, 142,
1162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1163 0, 0, 0, 0, 0, 0, 0, 143, 0, 0,
1164 0, 118, 0, 0, 0, 0, 0, 193, 144, 145,
1165 146, 147, 1, 2, 3, 4, 5, 6, 7, 8,
1166 9, 10, 11, 180, 181, 182, 0, 183, 184, 185,
1167 186, 187, 188, 189, 12, 13, 14, 15, 16, 17,
1168 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1169 28, 0, 29, 30, 31, 32, 33, 34, 35, 36,
1170 37, 38, 39, 40, 41, 190, 42, 43, 44, 0,
1171 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1172 0, 55, 56, 57, 58, 135, 59, 136, 137, 138,
1173 139, 140, 0, 0, 141, 142, 0, 0, 0, 0,
1174 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1175 0, 0, 0, 143, 0, 0, 0, 0, 0, 0,
1176 0, 0, 0, 193, 144, 145, 146, 147, 1, 2,
1177 3, 4, 5, 6, 7, 8, 9, 10, 11, 0,
1178 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1179 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1180 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1181 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1182 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1183 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1184 58, 135, 59, 136, 137, 138, 139, 140, 0, 0,
1185 141, 142, 0, 0, 0, 0, 0, 0, 0, 0,
1186 0, 0, 0, 0, 0, 130, 2, 3, 4, 143,
1187 6, 7, 8, 9, 10, 11, 0, 0, 0, 193,
1188 144, 145, 146, 147, 0, 0, 0, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001189 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001190 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001191 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001192 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetua35d8232015-06-11 17:11:06 -04001193 52, 53, 54, 0, 55, 56, 57, 58, 135, 59,
1194 136, 137, 138, 139, 140, 0, 0, 141, 142, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001196 0, 2, 3, 4, 0, 0, 143, 8, 9, 10,
1197 11, 0, 0, 0, 0, 0, 0, 144, 145, 146,
1198 147, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1199 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1200 0, 0, 31, 32, 33, 34, 35, 36, 0, 0,
1201 0, 40, 41, 0, 42, 43, 44, 0, 45, 46,
Alexis Hetua35d8232015-06-11 17:11:06 -04001202 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001203 56, 57, 0, 103, 59, 0, 0, 8, 9, 10,
1204 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1205 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1206 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1207 0, 104, 31, 32, 33, 34, 35, 36, 0, 0,
1208 0, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1209 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1210 56, 57, 0, 135, 59, 136, 137, 138, 139, 140,
Alexis Hetua35d8232015-06-11 17:11:06 -04001211 0, 0, 141, 142, 0, 0, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001213 0, 143, 0, 0, 217, 8, 9, 10, 11, 0,
1214 0, 0, 144, 145, 146, 147, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001215 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1216 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
1217 31, 32, 33, 34, 35, 36, 0, 0, 0, 40,
1218 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1219 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1220 0, 135, 59, 136, 137, 138, 139, 140, 0, 0,
1221 141, 142, 0, 0, 0, 0, 0, 0, 0, 0,
1222 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001223 8, 9, 10, 11, 0, 0, 0, 0, 0, 273,
1224 144, 145, 146, 147, 0, 12, 13, 14, 15, 16,
1225 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1226 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1227 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1228 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1229 54, 0, 55, 56, 57, 0, 135, 59, 136, 137,
1230 138, 139, 140, 0, 0, 141, 142, 0, 0, 0,
1231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1232 0, 0, 0, 0, 143, 0, 0, 298, 8, 9,
1233 10, 11, 0, 0, 0, 144, 145, 146, 147, 0,
1234 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1235 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1236 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1237 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1238 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1239 55, 56, 57, 0, 135, 59, 136, 137, 138, 139,
1240 140, 0, 0, 141, 142, 0, 0, 0, 0, 0,
1241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1242 0, 0, 143, 8, 9, 10, 11, 0, 0, 0,
1243 0, 0, 0, 144, 145, 146, 147, 0, 12, 13,
Alexis Hetua35d8232015-06-11 17:11:06 -04001244 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1245 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001246 33, 34, 35, 36, 0, 0, 0, 40, 237, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001247 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1248 51, 52, 53, 54, 0, 55, 56, 57, 0, 135,
1249 59, 136, 137, 138, 139, 140, 0, 0, 141, 142,
1250 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001251 0, 0, 0, 130, 2, 3, 4, 143, 6, 7,
1252 8, 9, 10, 11, 0, 0, 0, 0, 144, 145,
1253 146, 147, 0, 0, 0, 12, 13, 14, 15, 16,
1254 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1255 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1256 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1257 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1258 54, 0, 55, 56, 57, 58, 0, 59, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001259 0, 0, 0, 0, 0, 0, 0, 0, 130, 2,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001260 3, 4, 0, 6, 7, 8, 9, 10, 11, 0,
1261 0, 0, 0, 0, 0, 0, 0, 0, 0, 225,
Alexis Hetua35d8232015-06-11 17:11:06 -04001262 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1263 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1264 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1265 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1266 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1267 58, 0, 59, 0, 0, 0, 0, 0, 0, 0,
1268 0, 0, 0, 130, 2, 3, 4, 0, 6, 7,
1269 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001270 0, 0, 0, 0, 263, 12, 13, 14, 15, 16,
Alexis Hetua35d8232015-06-11 17:11:06 -04001271 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1272 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1273 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1274 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1275 54, 0, 55, 56, 57, 58, 0, 59, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001276 0, 0, 0, 0, 0, 110, 0, 0, 1, 2,
1277 3, 4, 5, 6, 7, 8, 9, 10, 11, 0,
1278 0, 0, 0, 0, 0, 0, 0, 0, 0, 336,
Alexis Hetua35d8232015-06-11 17:11:06 -04001279 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1280 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1281 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1282 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1283 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001284 58, 0, 59, 1, 2, 3, 4, 5, 6, 7,
Alexis Hetua35d8232015-06-11 17:11:06 -04001285 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001286 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
Alexis Hetua35d8232015-06-11 17:11:06 -04001287 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1288 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1289 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1290 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001291 54, 0, 55, 56, 57, 58, 0, 59, 130, 2,
1292 3, 4, 0, 6, 7, 8, 9, 10, 11, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001294 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1295 22, 23, 24, 25, 26, 27, 28, 0, 29, 30,
1296 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1297 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1298 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001299 58, 0, 59, 2, 3, 4, 0, 0, 0, 8,
1300 9, 10, 11, 0, 0, 0, 0, 0, 0, 0,
1301 0, 0, 0, 0, 12, 13, 14, 15, 16, 17,
1302 18, 19, 20, 21, 22, 23, 24, 25, 26, 0,
1303 0, 0, 0, 0, 31, 32, 33, 34, 35, 36,
1304 0, 0, 0, 40, 41, 0, 42, 43, 44, 0,
1305 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1306 0, 55, 56, 57, 0, 0, 59, 8, 9, 10,
1307 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1308 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1309 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1310 0, 0, 31, 32, 33, 34, 35, 36, 0, 0,
1311 0, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1312 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1313 56, 57, 0, 312, 59, 8, 9, 10, 11, 313,
1314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1315 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1316 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
1317 31, 32, 33, 34, 35, 36, 0, 0, 0, 40,
1318 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1319 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1320 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001321};
1322
1323static const yytype_int16 yycheck[] =
1324{
Alexis Hetu76a343a2015-06-04 17:21:22 -04001325 0, 69, 143, 105, 128, 89, 133, 205, 9, 0,
1326 216, 0, 114, 76, 127, 109, 9, 114, 87, 88,
1327 339, 345, 92, 44, 72, 4, 5, 6, 9, 97,
1328 76, 133, 156, 127, 82, 367, 114, 105, 68, 40,
1329 41, 42, 366, 73, 106, 186, 114, 40, 41, 176,
1330 43, 114, 114, 122, 123, 76, 124, 127, 51, 40,
1331 41, 42, 108, 131, 396, 133, 40, 41, 111, 69,
1332 389, 114, 72, 175, 176, 188, 395, 77, 175, 104,
1333 106, 104, 82, 106, 83, 84, 77, 113, 77, 105,
1334 113, 232, 216, 105, 188, 301, 111, 97, 111, 111,
1335 105, 114, 215, 105, 105, 105, 111, 175, 176, 111,
1336 76, 105, 236, 108, 114, 85, 86, 111, 118, 260,
1337 105, 215, 105, 76, 124, 76, 111, 114, 111, 111,
1338 271, 131, 114, 133, 275, 262, 106, 106, 111, 111,
1339 110, 114, 114, 104, 350, 106, 113, 353, 346, 109,
1340 248, 249, 250, 251, 40, 41, 42, 119, 120, 121,
1341 262, 116, 108, 118, 89, 90, 108, 127, 292, 293,
1342 376, 79, 80, 111, 112, 175, 176, 301, 244, 245,
1343 76, 141, 142, 44, 297, 246, 247, 252, 253, 76,
1344 104, 304, 398, 105, 262, 104, 126, 125, 124, 159,
1345 91, 93, 107, 297, 345, 205, 104, 114, 114, 104,
1346 304, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1347 103, 114, 104, 112, 104, 366, 350, 106, 188, 353,
1348 113, 109, 113, 107, 106, 104, 360, 108, 113, 112,
1349 381, 107, 107, 345, 357, 113, 104, 111, 56, 104,
1350 107, 113, 376, 394, 338, 215, 107, 76, 105, 109,
1351 114, 107, 262, 357, 366, 105, 17, 108, 113, 233,
1352 114, 114, 256, 259, 398, 255, 254, 91, 98, 5,
1353 280, 241, 242, 243, 244, 245, 246, 247, 248, 249,
1354 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
1355 257, 124, 258, 371, 221, 340, 124, 305, 387, 179,
1356 395, 340, 280, 366, 77, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001358 -1, -1, -1, -1, -1, -1, -1, 297, -1, 339,
1359 340, -1, -1, -1, 304, 345, 346, -1, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001361 -1, -1, -1, -1, -1, -1, 366, -1, -1, -1,
1362 -1, 371, -1, -1, -1, -1, -1, -1, -1, -1,
1363 -1, -1, -1, -1, -1, -1, -1, -1, -1, 389,
1364 -1, -1, -1, -1, -1, 395, -1, 357, 3, 4,
1365 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1366 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
1367 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1368 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1369 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1370 55, 56, 57, 58, 59, -1, 61, 62, 63, 64,
1371 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1372 75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1373 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1374 -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
1375 -1, -1, -1, 108, 109, -1, -1, -1, -1, 114,
1376 115, 116, 117, 118, 3, 4, 5, 6, 7, 8,
1377 9, 10, 11, 12, 13, 14, 15, 16, -1, 18,
1378 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1379 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1380 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1381 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
1382 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1383 69, 70, -1, 72, 73, 74, 75, 76, 77, 78,
1384 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001386 -1, -1, -1, -1, -1, 104, -1, -1, -1, 108,
1387 109, -1, -1, -1, -1, 114, 115, 116, 117, 118,
1388 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1389 13, 14, 15, 16, -1, 18, 19, 20, 21, 22,
1390 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1391 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1392 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1393 53, 54, 55, 56, 57, 58, 59, -1, 61, 62,
1394 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1395 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1396 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001398 -1, 104, -1, -1, -1, 108, -1, -1, -1, -1,
1399 -1, 114, 115, 116, 117, 118, 3, 4, 5, 6,
1400 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1401 -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1402 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1403 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1404 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
1405 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1406 67, 68, 69, 70, -1, 72, 73, 74, 75, 76,
1407 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
1408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1409 -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
1410 -1, 108, -1, -1, -1, -1, -1, 114, 115, 116,
1411 117, 118, 3, 4, 5, 6, 7, 8, 9, 10,
1412 11, 12, 13, 14, 15, 16, -1, 18, 19, 20,
1413 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1414 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1415 41, -1, 43, 44, 45, 46, 47, 48, 49, 50,
1416 51, 52, 53, 54, 55, 56, 57, 58, 59, -1,
1417 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1418 -1, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1419 81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
1420 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1421 -1, -1, -1, 104, -1, -1, -1, -1, -1, -1,
1422 -1, -1, -1, 114, 115, 116, 117, 118, 3, 4,
1423 5, 6, 7, 8, 9, 10, 11, 12, 13, -1,
1424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1425 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1426 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1427 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1428 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1429 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1430 75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1431 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1432 -1, -1, -1, -1, -1, 3, 4, 5, 6, 104,
1433 8, 9, 10, 11, 12, 13, -1, -1, -1, 114,
1434 115, 116, 117, 118, -1, -1, -1, 25, 26, 27,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001435 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001436 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001437 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001438 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001439 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001440 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001442 -1, 4, 5, 6, -1, -1, 104, 10, 11, 12,
1443 13, -1, -1, -1, -1, -1, -1, 115, 116, 117,
1444 118, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1445 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1446 -1, -1, 45, 46, 47, 48, 49, 50, -1, -1,
1447 -1, 54, 55, -1, 57, 58, 59, -1, 61, 62,
Alexis Hetua35d8232015-06-11 17:11:06 -04001448 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001449 73, 74, -1, 76, 77, -1, -1, 10, 11, 12,
1450 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1451 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1452 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1453 -1, 114, 45, 46, 47, 48, 49, 50, -1, -1,
1454 -1, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1455 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1456 73, 74, -1, 76, 77, 78, 79, 80, 81, 82,
Alexis Hetua35d8232015-06-11 17:11:06 -04001457 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001459 -1, 104, -1, -1, 107, 10, 11, 12, 13, -1,
1460 -1, -1, 115, 116, 117, 118, -1, -1, -1, -1,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001461 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1462 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
1463 45, 46, 47, 48, 49, 50, -1, -1, -1, 54,
1464 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1465 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1466 -1, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1467 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1468 -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001469 10, 11, 12, 13, -1, -1, -1, -1, -1, 114,
1470 115, 116, 117, 118, -1, 25, 26, 27, 28, 29,
1471 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1472 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1473 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1474 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1475 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1476 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1478 -1, -1, -1, -1, 104, -1, -1, 107, 10, 11,
1479 12, 13, -1, -1, -1, 115, 116, 117, 118, -1,
1480 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1481 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1482 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1483 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1484 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1485 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1486 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1488 -1, -1, 104, 10, 11, 12, 13, -1, -1, -1,
1489 -1, -1, -1, 115, 116, 117, 118, -1, 25, 26,
Alexis Hetub14178b2015-04-13 13:23:20 -04001490 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001491 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1492 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
Alexis Hetub14178b2015-04-13 13:23:20 -04001493 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001494 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
Alexis Hetub14178b2015-04-13 13:23:20 -04001495 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
1496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001497 -1, -1, -1, 3, 4, 5, 6, 104, 8, 9,
1498 10, 11, 12, 13, -1, -1, -1, -1, 115, 116,
1499 117, 118, -1, -1, -1, 25, 26, 27, 28, 29,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001500 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1501 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1502 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1503 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001504 70, -1, 72, 73, 74, 75, -1, 77, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001505 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
1506 5, 6, -1, 8, 9, 10, 11, 12, 13, -1,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001507 -1, -1, -1, -1, -1, -1, -1, -1, -1, 109,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001508 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1509 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1510 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1511 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1512 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
Alexis Hetua35d8232015-06-11 17:11:06 -04001513 75, -1, 77, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001514 -1, -1, -1, 3, 4, 5, 6, -1, 8, 9,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001515 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001516 -1, -1, -1, -1, 109, 25, 26, 27, 28, 29,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001517 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1518 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1519 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1520 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001521 70, -1, 72, 73, 74, 75, -1, 77, -1, -1,
1522 -1, -1, -1, -1, -1, 0, -1, -1, 3, 4,
Alexis Hetua35d8232015-06-11 17:11:06 -04001523 5, 6, 7, 8, 9, 10, 11, 12, 13, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001524 -1, -1, -1, -1, -1, -1, -1, -1, -1, 109,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001525 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1526 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1527 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1528 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1529 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001530 75, -1, 77, 3, 4, 5, 6, 7, 8, 9,
Alexis Hetua35d8232015-06-11 17:11:06 -04001531 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1532 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1533 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1534 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1535 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1536 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001537 70, -1, 72, 73, 74, 75, -1, 77, 3, 4,
1538 5, 6, -1, 8, 9, 10, 11, 12, 13, -1,
1539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1540 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1541 35, 36, 37, 38, 39, 40, 41, -1, 43, 44,
1542 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1543 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1544 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1545 75, -1, 77, 4, 5, 6, -1, -1, -1, 10,
1546 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
1547 -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
1548 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
1549 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
1550 -1, -1, -1, 54, 55, -1, 57, 58, 59, -1,
1551 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1552 -1, 72, 73, 74, -1, -1, 77, 10, 11, 12,
1553 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1554 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1555 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1556 -1, -1, 45, 46, 47, 48, 49, 50, -1, -1,
1557 -1, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1558 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1559 73, 74, -1, 76, 77, 10, 11, 12, 13, 82,
1560 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1561 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1562 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
1563 45, 46, 47, 48, 49, 50, -1, -1, -1, 54,
1564 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1565 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1566 -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001567};
1568
1569/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1570 symbol of state STATE-NUM. */
1571static const yytype_uint8 yystos[] =
1572{
1573 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001574 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001575 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001576 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1577 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1578 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001579 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001580 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
1581 44, 76, 176, 40, 41, 76, 108, 104, 114, 220,
Alexis Hetua35d8232015-06-11 17:11:06 -04001582 105, 111, 9, 40, 41, 42, 165, 166, 172, 111,
1583 114, 76, 174, 76, 114, 158, 175, 180, 174, 106,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001584 0, 218, 180, 108, 184, 76, 178, 179, 108, 200,
Alexis Hetua35d8232015-06-11 17:11:06 -04001585 165, 164, 167, 175, 166, 76, 104, 106, 113, 108,
1586 3, 173, 175, 185, 186, 76, 78, 79, 80, 81,
1587 82, 85, 86, 104, 115, 116, 117, 118, 129, 130,
1588 131, 133, 134, 135, 136, 137, 138, 139, 140, 141,
1589 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
1590 152, 153, 157, 181, 114, 183, 185, 113, 105, 111,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001591 14, 15, 16, 18, 19, 20, 21, 22, 23, 24,
1592 56, 108, 109, 114, 140, 153, 154, 156, 159, 160,
1593 181, 190, 191, 192, 193, 201, 202, 203, 205, 207,
1594 209, 216, 76, 164, 167, 106, 113, 107, 157, 154,
1595 189, 175, 76, 187, 188, 109, 186, 140, 140, 156,
1596 85, 86, 106, 110, 105, 105, 111, 55, 154, 104,
1597 140, 119, 120, 121, 116, 118, 83, 84, 87, 88,
1598 122, 123, 89, 90, 126, 125, 124, 91, 93, 92,
1599 127, 107, 185, 109, 79, 80, 179, 114, 114, 211,
1600 104, 104, 114, 114, 156, 104, 157, 112, 104, 109,
1601 194, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1602 103, 113, 155, 111, 114, 109, 191, 106, 107, 157,
1603 189, 113, 107, 187, 106, 111, 114, 76, 114, 105,
1604 132, 156, 76, 82, 135, 154, 140, 140, 140, 142,
1605 142, 143, 143, 144, 144, 144, 144, 145, 145, 146,
1606 147, 148, 149, 150, 151, 156, 109, 197, 198, 199,
1607 212, 156, 114, 156, 112, 210, 201, 154, 154, 157,
Alexis Hetua35d8232015-06-11 17:11:06 -04001608 113, 107, 189, 113, 114, 157, 188, 106, 114, 107,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001609 112, 56, 200, 192, 190, 202, 213, 105, 105, 156,
1610 170, 173, 208, 195, 107, 189, 113, 189, 107, 157,
1611 154, 104, 208, 214, 215, 197, 204, 206, 76, 105,
1612 109, 189, 107, 156, 114, 105, 17, 193, 113, 192,
1613 196, 200, 114, 105, 156, 196, 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001614};
1615
1616#define yyerrok (yyerrstatus = 0)
1617#define yyclearin (yychar = YYEMPTY)
1618#define YYEMPTY (-2)
1619#define YYEOF 0
1620
1621#define YYACCEPT goto yyacceptlab
1622#define YYABORT goto yyabortlab
1623#define YYERROR goto yyerrorlab
1624
1625
1626/* Like YYERROR except do call yyerror. This remains here temporarily
1627 to ease the transition to the new meaning of YYERROR, for GCC.
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001628 Once GCC version 2 has supplanted version 1, this can go. */
John Bauman66b8ab22014-05-06 15:57:45 -04001629
1630#define YYFAIL goto yyerrlab
John Bauman66b8ab22014-05-06 15:57:45 -04001631
1632#define YYRECOVERING() (!!yyerrstatus)
1633
1634#define YYBACKUP(Token, Value) \
1635do \
1636 if (yychar == YYEMPTY && yylen == 1) \
1637 { \
1638 yychar = (Token); \
1639 yylval = (Value); \
1640 yytoken = YYTRANSLATE (yychar); \
1641 YYPOPSTACK (1); \
1642 goto yybackup; \
1643 } \
1644 else \
1645 { \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001646 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
John Bauman66b8ab22014-05-06 15:57:45 -04001647 YYERROR; \
1648 } \
1649while (YYID (0))
1650
1651
1652#define YYTERROR 1
1653#define YYERRCODE 256
1654
1655
1656/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1657 If N is 0, then set CURRENT to the empty location which ends
1658 the previous symbol: RHS[0] (always defined). */
1659
1660#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1661#ifndef YYLLOC_DEFAULT
1662# define YYLLOC_DEFAULT(Current, Rhs, N) \
1663 do \
1664 if (YYID (N)) \
1665 { \
1666 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1667 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1668 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1669 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1670 } \
1671 else \
1672 { \
1673 (Current).first_line = (Current).last_line = \
1674 YYRHSLOC (Rhs, 0).last_line; \
1675 (Current).first_column = (Current).last_column = \
1676 YYRHSLOC (Rhs, 0).last_column; \
1677 } \
1678 while (YYID (0))
1679#endif
1680
1681
1682/* YY_LOCATION_PRINT -- Print the location on the stream.
1683 This macro was not mandated originally: define only if we know
1684 we won't break user code: when these are the locations we know. */
1685
1686#ifndef YY_LOCATION_PRINT
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001687# if YYLTYPE_IS_TRIVIAL
John Bauman66b8ab22014-05-06 15:57:45 -04001688# define YY_LOCATION_PRINT(File, Loc) \
1689 fprintf (File, "%d.%d-%d.%d", \
1690 (Loc).first_line, (Loc).first_column, \
1691 (Loc).last_line, (Loc).last_column)
1692# else
1693# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1694# endif
1695#endif
1696
1697
1698/* YYLEX -- calling `yylex' with the right arguments. */
1699
1700#ifdef YYLEX_PARAM
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001701# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
John Bauman66b8ab22014-05-06 15:57:45 -04001702#else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001703# define YYLEX yylex (&yylval, &yylloc)
John Bauman66b8ab22014-05-06 15:57:45 -04001704#endif
1705
1706/* Enable debugging if requested. */
1707#if YYDEBUG
1708
1709# ifndef YYFPRINTF
1710# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1711# define YYFPRINTF fprintf
1712# endif
1713
1714# define YYDPRINTF(Args) \
1715do { \
1716 if (yydebug) \
1717 YYFPRINTF Args; \
1718} while (YYID (0))
1719
1720# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1721do { \
1722 if (yydebug) \
1723 { \
1724 YYFPRINTF (stderr, "%s ", Title); \
1725 yy_symbol_print (stderr, \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001726 Type, Value, Location, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001727 YYFPRINTF (stderr, "\n"); \
1728 } \
1729} while (YYID (0))
1730
1731
1732/*--------------------------------.
1733| Print this symbol on YYOUTPUT. |
1734`--------------------------------*/
1735
1736/*ARGSUSED*/
1737#if (defined __STDC__ || defined __C99__FUNC__ \
1738 || defined __cplusplus || defined _MSC_VER)
1739static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001740yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001741#else
1742static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001743yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001744 FILE *yyoutput;
1745 int yytype;
1746 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001747 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001748 TParseContext* context;
1749#endif
1750{
1751 if (!yyvaluep)
1752 return;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001753 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001754 YYUSE (context);
1755# ifdef YYPRINT
1756 if (yytype < YYNTOKENS)
1757 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1758# else
1759 YYUSE (yyoutput);
1760# endif
1761 switch (yytype)
1762 {
1763 default:
1764 break;
1765 }
1766}
1767
1768
1769/*--------------------------------.
1770| Print this symbol on YYOUTPUT. |
1771`--------------------------------*/
1772
1773#if (defined __STDC__ || defined __C99__FUNC__ \
1774 || defined __cplusplus || defined _MSC_VER)
1775static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001776yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001777#else
1778static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001779yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001780 FILE *yyoutput;
1781 int yytype;
1782 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001783 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001784 TParseContext* context;
1785#endif
1786{
1787 if (yytype < YYNTOKENS)
1788 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1789 else
1790 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1791
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001792 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1793 YYFPRINTF (yyoutput, ": ");
1794 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04001795 YYFPRINTF (yyoutput, ")");
1796}
1797
1798/*------------------------------------------------------------------.
1799| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1800| TOP (included). |
1801`------------------------------------------------------------------*/
1802
1803#if (defined __STDC__ || defined __C99__FUNC__ \
1804 || defined __cplusplus || defined _MSC_VER)
1805static void
1806yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1807#else
1808static void
1809yy_stack_print (yybottom, yytop)
1810 yytype_int16 *yybottom;
1811 yytype_int16 *yytop;
1812#endif
1813{
1814 YYFPRINTF (stderr, "Stack now");
1815 for (; yybottom <= yytop; yybottom++)
1816 {
1817 int yybot = *yybottom;
1818 YYFPRINTF (stderr, " %d", yybot);
1819 }
1820 YYFPRINTF (stderr, "\n");
1821}
1822
1823# define YY_STACK_PRINT(Bottom, Top) \
1824do { \
1825 if (yydebug) \
1826 yy_stack_print ((Bottom), (Top)); \
1827} while (YYID (0))
1828
1829
1830/*------------------------------------------------.
1831| Report that the YYRULE is going to be reduced. |
1832`------------------------------------------------*/
1833
1834#if (defined __STDC__ || defined __C99__FUNC__ \
1835 || defined __cplusplus || defined _MSC_VER)
1836static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001837yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001838#else
1839static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001840yy_reduce_print (yyvsp, yylsp, yyrule, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001841 YYSTYPE *yyvsp;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001842 YYLTYPE *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04001843 int yyrule;
1844 TParseContext* context;
1845#endif
1846{
1847 int yynrhs = yyr2[yyrule];
1848 int yyi;
1849 unsigned long int yylno = yyrline[yyrule];
1850 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1851 yyrule - 1, yylno);
1852 /* The symbols being reduced. */
1853 for (yyi = 0; yyi < yynrhs; yyi++)
1854 {
1855 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1856 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1857 &(yyvsp[(yyi + 1) - (yynrhs)])
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001858 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
John Bauman66b8ab22014-05-06 15:57:45 -04001859 YYFPRINTF (stderr, "\n");
1860 }
1861}
1862
1863# define YY_REDUCE_PRINT(Rule) \
1864do { \
1865 if (yydebug) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001866 yy_reduce_print (yyvsp, yylsp, Rule, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001867} while (YYID (0))
1868
1869/* Nonzero means print parse trace. It is left uninitialized so that
1870 multiple parsers can coexist. */
1871int yydebug;
1872#else /* !YYDEBUG */
1873# define YYDPRINTF(Args)
1874# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1875# define YY_STACK_PRINT(Bottom, Top)
1876# define YY_REDUCE_PRINT(Rule)
1877#endif /* !YYDEBUG */
1878
1879
1880/* YYINITDEPTH -- initial size of the parser's stacks. */
1881#ifndef YYINITDEPTH
1882# define YYINITDEPTH 200
1883#endif
1884
1885/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1886 if the built-in stack extension method is used).
1887
1888 Do not make this value too large; the results are undefined if
1889 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1890 evaluated with infinite-precision integer arithmetic. */
1891
1892#ifndef YYMAXDEPTH
1893# define YYMAXDEPTH 10000
1894#endif
1895
1896
1897
1898#if YYERROR_VERBOSE
1899
1900# ifndef yystrlen
1901# if defined __GLIBC__ && defined _STRING_H
1902# define yystrlen strlen
1903# else
1904/* Return the length of YYSTR. */
1905#if (defined __STDC__ || defined __C99__FUNC__ \
1906 || defined __cplusplus || defined _MSC_VER)
1907static YYSIZE_T
1908yystrlen (const char *yystr)
1909#else
1910static YYSIZE_T
1911yystrlen (yystr)
1912 const char *yystr;
1913#endif
1914{
1915 YYSIZE_T yylen;
1916 for (yylen = 0; yystr[yylen]; yylen++)
1917 continue;
1918 return yylen;
1919}
1920# endif
1921# endif
1922
1923# ifndef yystpcpy
1924# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1925# define yystpcpy stpcpy
1926# else
1927/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1928 YYDEST. */
1929#if (defined __STDC__ || defined __C99__FUNC__ \
1930 || defined __cplusplus || defined _MSC_VER)
1931static char *
1932yystpcpy (char *yydest, const char *yysrc)
1933#else
1934static char *
1935yystpcpy (yydest, yysrc)
1936 char *yydest;
1937 const char *yysrc;
1938#endif
1939{
1940 char *yyd = yydest;
1941 const char *yys = yysrc;
1942
1943 while ((*yyd++ = *yys++) != '\0')
1944 continue;
1945
1946 return yyd - 1;
1947}
1948# endif
1949# endif
1950
1951# ifndef yytnamerr
1952/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1953 quotes and backslashes, so that it's suitable for yyerror. The
1954 heuristic is that double-quoting is unnecessary unless the string
1955 contains an apostrophe, a comma, or backslash (other than
1956 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1957 null, do not copy; instead, return the length of what the result
1958 would have been. */
1959static YYSIZE_T
1960yytnamerr (char *yyres, const char *yystr)
1961{
1962 if (*yystr == '"')
1963 {
1964 YYSIZE_T yyn = 0;
1965 char const *yyp = yystr;
1966
1967 for (;;)
1968 switch (*++yyp)
1969 {
1970 case '\'':
1971 case ',':
1972 goto do_not_strip_quotes;
1973
1974 case '\\':
1975 if (*++yyp != '\\')
1976 goto do_not_strip_quotes;
1977 /* Fall through. */
1978 default:
1979 if (yyres)
1980 yyres[yyn] = *yyp;
1981 yyn++;
1982 break;
1983
1984 case '"':
1985 if (yyres)
1986 yyres[yyn] = '\0';
1987 return yyn;
1988 }
1989 do_not_strip_quotes: ;
1990 }
1991
1992 if (! yyres)
1993 return yystrlen (yystr);
1994
1995 return yystpcpy (yyres, yystr) - yyres;
1996}
1997# endif
1998
1999/* Copy into YYRESULT an error message about the unexpected token
2000 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2001 including the terminating null byte. If YYRESULT is null, do not
2002 copy anything; just return the number of bytes that would be
2003 copied. As a special case, return 0 if an ordinary "syntax error"
2004 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2005 size calculation. */
2006static YYSIZE_T
2007yysyntax_error (char *yyresult, int yystate, int yychar)
2008{
2009 int yyn = yypact[yystate];
2010
2011 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2012 return 0;
2013 else
2014 {
2015 int yytype = YYTRANSLATE (yychar);
2016 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2017 YYSIZE_T yysize = yysize0;
2018 YYSIZE_T yysize1;
2019 int yysize_overflow = 0;
2020 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2021 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2022 int yyx;
2023
2024# if 0
2025 /* This is so xgettext sees the translatable formats that are
2026 constructed on the fly. */
2027 YY_("syntax error, unexpected %s");
2028 YY_("syntax error, unexpected %s, expecting %s");
2029 YY_("syntax error, unexpected %s, expecting %s or %s");
2030 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2031 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2032# endif
2033 char *yyfmt;
2034 char const *yyf;
2035 static char const yyunexpected[] = "syntax error, unexpected %s";
2036 static char const yyexpecting[] = ", expecting %s";
2037 static char const yyor[] = " or %s";
2038 char yyformat[sizeof yyunexpected
2039 + sizeof yyexpecting - 1
2040 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2041 * (sizeof yyor - 1))];
2042 char const *yyprefix = yyexpecting;
2043
2044 /* Start YYX at -YYN if negative to avoid negative indexes in
2045 YYCHECK. */
2046 int yyxbegin = yyn < 0 ? -yyn : 0;
2047
2048 /* Stay within bounds of both yycheck and yytname. */
2049 int yychecklim = YYLAST - yyn + 1;
2050 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2051 int yycount = 1;
2052
2053 yyarg[0] = yytname[yytype];
2054 yyfmt = yystpcpy (yyformat, yyunexpected);
2055
2056 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2057 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2058 {
2059 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2060 {
2061 yycount = 1;
2062 yysize = yysize0;
2063 yyformat[sizeof yyunexpected - 1] = '\0';
2064 break;
2065 }
2066 yyarg[yycount++] = yytname[yyx];
2067 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2068 yysize_overflow |= (yysize1 < yysize);
2069 yysize = yysize1;
2070 yyfmt = yystpcpy (yyfmt, yyprefix);
2071 yyprefix = yyor;
2072 }
2073
2074 yyf = YY_(yyformat);
2075 yysize1 = yysize + yystrlen (yyf);
2076 yysize_overflow |= (yysize1 < yysize);
2077 yysize = yysize1;
2078
2079 if (yysize_overflow)
2080 return YYSIZE_MAXIMUM;
2081
2082 if (yyresult)
2083 {
2084 /* Avoid sprintf, as that infringes on the user's name space.
2085 Don't have undefined behavior even if the translation
2086 produced a string with the wrong number of "%s"s. */
2087 char *yyp = yyresult;
2088 int yyi = 0;
2089 while ((*yyp = *yyf) != '\0')
2090 {
2091 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2092 {
2093 yyp += yytnamerr (yyp, yyarg[yyi++]);
2094 yyf += 2;
2095 }
2096 else
2097 {
2098 yyp++;
2099 yyf++;
2100 }
2101 }
2102 }
2103 return yysize;
2104 }
2105}
2106#endif /* YYERROR_VERBOSE */
2107
2108
2109/*-----------------------------------------------.
2110| Release the memory associated to this symbol. |
2111`-----------------------------------------------*/
2112
2113/*ARGSUSED*/
2114#if (defined __STDC__ || defined __C99__FUNC__ \
2115 || defined __cplusplus || defined _MSC_VER)
2116static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002117yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04002118#else
2119static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002120yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04002121 const char *yymsg;
2122 int yytype;
2123 YYSTYPE *yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002124 YYLTYPE *yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04002125 TParseContext* context;
2126#endif
2127{
2128 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002129 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002130 YYUSE (context);
2131
2132 if (!yymsg)
2133 yymsg = "Deleting";
2134 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2135
2136 switch (yytype)
2137 {
2138
2139 default:
2140 break;
2141 }
2142}
2143
2144/* Prevent warnings from -Wmissing-prototypes. */
2145#ifdef YYPARSE_PARAM
2146#if defined __STDC__ || defined __cplusplus
2147int yyparse (void *YYPARSE_PARAM);
2148#else
2149int yyparse ();
2150#endif
2151#else /* ! YYPARSE_PARAM */
2152#if defined __STDC__ || defined __cplusplus
2153int yyparse (TParseContext* context);
2154#else
2155int yyparse ();
2156#endif
2157#endif /* ! YYPARSE_PARAM */
2158
2159
2160
2161
2162
2163/*-------------------------.
2164| yyparse or yypush_parse. |
2165`-------------------------*/
2166
2167#ifdef YYPARSE_PARAM
2168#if (defined __STDC__ || defined __C99__FUNC__ \
2169 || defined __cplusplus || defined _MSC_VER)
2170int
2171yyparse (void *YYPARSE_PARAM)
2172#else
2173int
2174yyparse (YYPARSE_PARAM)
2175 void *YYPARSE_PARAM;
2176#endif
2177#else /* ! YYPARSE_PARAM */
2178#if (defined __STDC__ || defined __C99__FUNC__ \
2179 || defined __cplusplus || defined _MSC_VER)
2180int
2181yyparse (TParseContext* context)
2182#else
2183int
2184yyparse (context)
2185 TParseContext* context;
2186#endif
2187#endif
2188{
2189/* The lookahead symbol. */
2190int yychar;
2191
2192/* The semantic value of the lookahead symbol. */
2193YYSTYPE yylval;
2194
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002195/* Location data for the lookahead symbol. */
2196YYLTYPE yylloc;
2197
John Bauman66b8ab22014-05-06 15:57:45 -04002198 /* Number of syntax errors so far. */
2199 int yynerrs;
2200
2201 int yystate;
2202 /* Number of tokens to shift before error messages enabled. */
2203 int yyerrstatus;
2204
2205 /* The stacks and their tools:
2206 `yyss': related to states.
2207 `yyvs': related to semantic values.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002208 `yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002209
2210 Refer to the stacks thru separate pointers, to allow yyoverflow
2211 to reallocate them elsewhere. */
2212
2213 /* The state stack. */
2214 yytype_int16 yyssa[YYINITDEPTH];
2215 yytype_int16 *yyss;
2216 yytype_int16 *yyssp;
2217
2218 /* The semantic value stack. */
2219 YYSTYPE yyvsa[YYINITDEPTH];
2220 YYSTYPE *yyvs;
2221 YYSTYPE *yyvsp;
2222
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002223 /* The location stack. */
2224 YYLTYPE yylsa[YYINITDEPTH];
2225 YYLTYPE *yyls;
2226 YYLTYPE *yylsp;
2227
2228 /* The locations where the error started and ended. */
2229 YYLTYPE yyerror_range[2];
2230
John Bauman66b8ab22014-05-06 15:57:45 -04002231 YYSIZE_T yystacksize;
2232
2233 int yyn;
2234 int yyresult;
2235 /* Lookahead token as an internal (translated) token number. */
2236 int yytoken;
2237 /* The variables used to return semantic value and location from the
2238 action routines. */
2239 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002240 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002241
2242#if YYERROR_VERBOSE
2243 /* Buffer for error messages, and its allocated size. */
2244 char yymsgbuf[128];
2245 char *yymsg = yymsgbuf;
2246 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2247#endif
2248
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002249#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002250
2251 /* The number of symbols on the RHS of the reduced rule.
2252 Keep to zero when no symbol should be popped. */
2253 int yylen = 0;
2254
2255 yytoken = 0;
2256 yyss = yyssa;
2257 yyvs = yyvsa;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002258 yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002259 yystacksize = YYINITDEPTH;
2260
2261 YYDPRINTF ((stderr, "Starting parse\n"));
2262
2263 yystate = 0;
2264 yyerrstatus = 0;
2265 yynerrs = 0;
2266 yychar = YYEMPTY; /* Cause a token to be read. */
2267
2268 /* Initialize stack pointers.
2269 Waste one element of value and location stack
2270 so that they stay on the same level as the state stack.
2271 The wasted elements are never initialized. */
2272 yyssp = yyss;
2273 yyvsp = yyvs;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002274 yylsp = yyls;
2275
2276#if YYLTYPE_IS_TRIVIAL
2277 /* Initialize the default location before parsing starts. */
2278 yylloc.first_line = yylloc.last_line = 1;
2279 yylloc.first_column = yylloc.last_column = 1;
2280#endif
John Bauman66b8ab22014-05-06 15:57:45 -04002281
2282 goto yysetstate;
2283
2284/*------------------------------------------------------------.
2285| yynewstate -- Push a new state, which is found in yystate. |
2286`------------------------------------------------------------*/
2287 yynewstate:
2288 /* In all cases, when you get here, the value and location stacks
2289 have just been pushed. So pushing a state here evens the stacks. */
2290 yyssp++;
2291
2292 yysetstate:
2293 *yyssp = yystate;
2294
2295 if (yyss + yystacksize - 1 <= yyssp)
2296 {
2297 /* Get the current used size of the three stacks, in elements. */
2298 YYSIZE_T yysize = yyssp - yyss + 1;
2299
2300#ifdef yyoverflow
2301 {
2302 /* Give user a chance to reallocate the stack. Use copies of
2303 these so that the &'s don't force the real ones into
2304 memory. */
2305 YYSTYPE *yyvs1 = yyvs;
2306 yytype_int16 *yyss1 = yyss;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002307 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002308
2309 /* Each stack pointer address is followed by the size of the
2310 data in use in that stack, in bytes. This used to be a
2311 conditional around just the two extra args, but that might
2312 be undefined if yyoverflow is a macro. */
2313 yyoverflow (YY_("memory exhausted"),
2314 &yyss1, yysize * sizeof (*yyssp),
2315 &yyvs1, yysize * sizeof (*yyvsp),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002316 &yyls1, yysize * sizeof (*yylsp),
John Bauman66b8ab22014-05-06 15:57:45 -04002317 &yystacksize);
2318
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002319 yyls = yyls1;
John Bauman66b8ab22014-05-06 15:57:45 -04002320 yyss = yyss1;
2321 yyvs = yyvs1;
2322 }
2323#else /* no yyoverflow */
2324# ifndef YYSTACK_RELOCATE
2325 goto yyexhaustedlab;
2326# else
2327 /* Extend the stack our own way. */
2328 if (YYMAXDEPTH <= yystacksize)
2329 goto yyexhaustedlab;
2330 yystacksize *= 2;
2331 if (YYMAXDEPTH < yystacksize)
2332 yystacksize = YYMAXDEPTH;
2333
2334 {
2335 yytype_int16 *yyss1 = yyss;
2336 union yyalloc *yyptr =
2337 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2338 if (! yyptr)
2339 goto yyexhaustedlab;
2340 YYSTACK_RELOCATE (yyss_alloc, yyss);
2341 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002342 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002343# undef YYSTACK_RELOCATE
2344 if (yyss1 != yyssa)
2345 YYSTACK_FREE (yyss1);
2346 }
2347# endif
2348#endif /* no yyoverflow */
2349
2350 yyssp = yyss + yysize - 1;
2351 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002352 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002353
2354 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2355 (unsigned long int) yystacksize));
2356
2357 if (yyss + yystacksize - 1 <= yyssp)
2358 YYABORT;
2359 }
2360
2361 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2362
2363 if (yystate == YYFINAL)
2364 YYACCEPT;
2365
2366 goto yybackup;
2367
2368/*-----------.
2369| yybackup. |
2370`-----------*/
2371yybackup:
2372
2373 /* Do appropriate processing given the current state. Read a
2374 lookahead token if we need one and don't already have one. */
2375
2376 /* First try to decide what to do without reference to lookahead token. */
2377 yyn = yypact[yystate];
2378 if (yyn == YYPACT_NINF)
2379 goto yydefault;
2380
2381 /* Not known => get a lookahead token if don't already have one. */
2382
2383 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2384 if (yychar == YYEMPTY)
2385 {
2386 YYDPRINTF ((stderr, "Reading a token: "));
2387 yychar = YYLEX;
2388 }
2389
2390 if (yychar <= YYEOF)
2391 {
2392 yychar = yytoken = YYEOF;
2393 YYDPRINTF ((stderr, "Now at end of input.\n"));
2394 }
2395 else
2396 {
2397 yytoken = YYTRANSLATE (yychar);
2398 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2399 }
2400
2401 /* If the proper action on seeing token YYTOKEN is to reduce or to
2402 detect an error, take that action. */
2403 yyn += yytoken;
2404 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2405 goto yydefault;
2406 yyn = yytable[yyn];
2407 if (yyn <= 0)
2408 {
2409 if (yyn == 0 || yyn == YYTABLE_NINF)
2410 goto yyerrlab;
2411 yyn = -yyn;
2412 goto yyreduce;
2413 }
2414
2415 /* Count tokens shifted since error; after three, turn off error
2416 status. */
2417 if (yyerrstatus)
2418 yyerrstatus--;
2419
2420 /* Shift the lookahead token. */
2421 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2422
2423 /* Discard the shifted token. */
2424 yychar = YYEMPTY;
2425
2426 yystate = yyn;
2427 *++yyvsp = yylval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002428 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002429 goto yynewstate;
2430
2431
2432/*-----------------------------------------------------------.
2433| yydefault -- do the default action for the current state. |
2434`-----------------------------------------------------------*/
2435yydefault:
2436 yyn = yydefact[yystate];
2437 if (yyn == 0)
2438 goto yyerrlab;
2439 goto yyreduce;
2440
2441
2442/*-----------------------------.
2443| yyreduce -- Do a reduction. |
2444`-----------------------------*/
2445yyreduce:
2446 /* yyn is the number of a rule to reduce with. */
2447 yylen = yyr2[yyn];
2448
2449 /* If YYLEN is nonzero, implement the default value of the action:
2450 `$$ = $1'.
2451
2452 Otherwise, the following line sets YYVAL to garbage.
2453 This behavior is undocumented and Bison
2454 users should not rely upon it. Assigning to YYVAL
2455 unconditionally makes the parser a bit smaller, and it avoids a
2456 GCC warning that YYVAL may be used uninitialized. */
2457 yyval = yyvsp[1-yylen];
2458
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002459 /* Default location. */
2460 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002461 YY_REDUCE_PRINT (yyn);
2462 switch (yyn)
2463 {
2464 case 2:
2465
2466 {
2467 // The symbol table search was done in the lexical phase
2468 const TSymbol* symbol = (yyvsp[(1) - (1)].lex).symbol;
2469 const TVariable* variable;
2470 if (symbol == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002471 context->error((yylsp[(1) - (1)]), "undeclared identifier", (yyvsp[(1) - (1)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04002472 context->recover();
2473 TType type(EbtFloat, EbpUndefined);
2474 TVariable* fakeVariable = new TVariable((yyvsp[(1) - (1)].lex).string, type);
Nicolas Capensd603ecd2015-02-18 14:52:21 -05002475 context->symbolTable.declare(*fakeVariable);
John Bauman66b8ab22014-05-06 15:57:45 -04002476 variable = fakeVariable;
2477 } else {
2478 // This identifier can only be a variable type symbol
2479 if (! symbol->isVariable()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002480 context->error((yylsp[(1) - (1)]), "variable expected", (yyvsp[(1) - (1)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04002481 context->recover();
2482 }
2483 variable = static_cast<const TVariable*>(symbol);
2484 }
2485
2486 // don't delete $1.string, it's used by error recovery, and the pool
2487 // pop will reclaim the memory
2488
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002489 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002490 ConstantUnion* constArray = variable->getConstPointer();
2491 TType t(variable->getType());
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002492 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002493 } else
2494 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2495 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002496 variable->getType(), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002497 }
2498 break;
2499
2500 case 3:
2501
2502 {
2503 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2504 }
2505 break;
2506
2507 case 4:
2508
2509 {
John Bauman66b8ab22014-05-06 15:57:45 -04002510 ConstantUnion *unionArray = new ConstantUnion[1];
2511 unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002512 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002513 }
2514 break;
2515
2516 case 5:
2517
2518 {
2519 ConstantUnion *unionArray = new ConstantUnion[1];
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002520 unionArray->setUConst((yyvsp[(1) - (1)].lex).u);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002521 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002522 }
2523 break;
2524
2525 case 6:
2526
2527 {
2528 ConstantUnion *unionArray = new ConstantUnion[1];
John Bauman66b8ab22014-05-06 15:57:45 -04002529 unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002530 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002531 }
2532 break;
2533
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002534 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002535
2536 {
2537 ConstantUnion *unionArray = new ConstantUnion[1];
2538 unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002539 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002540 }
2541 break;
2542
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002543 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002544
2545 {
2546 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2547 }
2548 break;
2549
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002550 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002551
2552 {
2553 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2554 }
2555 break;
2556
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002557 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002558
2559 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002560 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[(1) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04002561 }
2562 break;
2563
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002564 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002565
2566 {
2567 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2568 }
2569 break;
2570
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002571 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002572
2573 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002574 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002575 }
2576 break;
2577
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002578 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002579
2580 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002581 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002582 }
2583 break;
2584
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002585 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002586
2587 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002588 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002589 }
2590 break;
2591
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002592 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002593
2594 {
2595 if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
2596 context->recover();
2597 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2598 }
2599 break;
2600
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002601 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002602
2603 {
2604 TFunction* fnCall = (yyvsp[(1) - (1)].interm).function;
2605 TOperator op = fnCall->getBuiltInOp();
2606
2607 if (op != EOpNull)
2608 {
2609 //
2610 // Then this should be a constructor.
2611 // Don't go through the symbol table for constructors.
2612 // Their parameters will be verified algorithmically.
2613 //
2614 TType type(EbtVoid, EbpUndefined); // use this to get the type back
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002615 if (context->constructorErrorCheck((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].interm).intermNode, *fnCall, op, &type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04002616 (yyval.interm.intermTypedNode) = 0;
2617 } else {
2618 //
2619 // It's a constructor, of type 'type'.
2620 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002621 (yyval.interm.intermTypedNode) = context->addConstructor((yyvsp[(1) - (1)].interm).intermNode, &type, op, fnCall, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002622 }
2623
2624 if ((yyval.interm.intermTypedNode) == 0) {
2625 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002626 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator(0, op, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002627 }
2628 (yyval.interm.intermTypedNode)->setType(type);
2629 } else {
2630 //
2631 // Not a constructor. Find it in the symbol table.
2632 //
2633 const TFunction* fnCandidate;
2634 bool builtIn;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002635 fnCandidate = context->findFunction((yylsp[(1) - (1)]), fnCall, &builtIn);
John Bauman66b8ab22014-05-06 15:57:45 -04002636 if (fnCandidate) {
2637 //
2638 // A declared function.
2639 //
2640 if (builtIn && !fnCandidate->getExtension().empty() &&
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002641 context->extensionErrorCheck((yylsp[(1) - (1)]), fnCandidate->getExtension())) {
John Bauman66b8ab22014-05-06 15:57:45 -04002642 context->recover();
2643 }
2644 op = fnCandidate->getBuiltInOp();
2645 if (builtIn && op != EOpNull) {
2646 //
2647 // A function call mapped to a built-in operation.
2648 //
2649 if (fnCandidate->getParamCount() == 1) {
2650 //
2651 // Treat it like a built-in unary operator.
2652 //
John Baumand4ae8632014-05-06 16:18:33 -04002653 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(op, (yyvsp[(1) - (1)].interm).intermNode, 0);
John Bauman66b8ab22014-05-06 15:57:45 -04002654 if ((yyval.interm.intermTypedNode) == 0) {
2655 std::stringstream extraInfoStream;
2656 extraInfoStream << "built in unary operator function. Type: " << static_cast<TIntermTyped*>((yyvsp[(1) - (1)].interm).intermNode)->getCompleteString();
2657 std::string extraInfo = extraInfoStream.str();
2658 context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), " wrong operand type", "Internal Error", extraInfo.c_str());
2659 YYERROR;
2660 }
2661 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002662 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, op, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002663 }
2664 } else {
2665 // This is a real function call
2666
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002667 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, EOpFunctionCall, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002668 (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType());
2669
2670 // this is how we know whether the given function is a builtIn function or a user defined function
2671 // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also
2672 // if builtIn == true, it's definitely a builtIn function with EOpNull
2673 if (!builtIn)
2674 (yyval.interm.intermTypedNode)->getAsAggregate()->setUserDefined();
2675 (yyval.interm.intermTypedNode)->getAsAggregate()->setName(fnCandidate->getMangledName());
2676
2677 TQualifier qual;
Alexis Hetu76a343a2015-06-04 17:21:22 -04002678 for (size_t i = 0; i < fnCandidate->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04002679 qual = fnCandidate->getParam(i).type->getQualifier();
2680 if (qual == EvqOut || qual == EvqInOut) {
2681 if (context->lValueErrorCheck((yyval.interm.intermTypedNode)->getLine(), "assign", (yyval.interm.intermTypedNode)->getAsAggregate()->getSequence()[i]->getAsTyped())) {
2682 context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error");
2683 context->recover();
2684 }
2685 }
2686 }
2687 }
2688 (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType());
2689 } else {
2690 // error message was put out by PaFindFunction()
2691 // Put on a dummy node for error recovery
2692 ConstantUnion *unionArray = new ConstantUnion[1];
2693 unionArray->setFConst(0.0f);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002694 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002695 context->recover();
2696 }
2697 }
2698 delete fnCall;
2699 }
2700 break;
2701
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002702 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002703
2704 {
2705 (yyval.interm) = (yyvsp[(1) - (1)].interm);
2706 }
2707 break;
2708
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002709 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002710
2711 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002712 context->error((yylsp[(3) - (3)]), "methods are not supported", "");
John Bauman66b8ab22014-05-06 15:57:45 -04002713 context->recover();
2714 (yyval.interm) = (yyvsp[(3) - (3)].interm);
2715 }
2716 break;
2717
John Bauman66b8ab22014-05-06 15:57:45 -04002718 case 19:
2719
2720 {
2721 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002722 (yyval.interm).line = (yylsp[(2) - (2)]);
John Bauman66b8ab22014-05-06 15:57:45 -04002723 }
2724 break;
2725
2726 case 20:
2727
2728 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002729 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002730 (yyval.interm).line = (yylsp[(2) - (2)]);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002731 }
2732 break;
2733
2734 case 21:
2735
2736 {
John Bauman66b8ab22014-05-06 15:57:45 -04002737 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2738 (yyval.interm).intermNode = 0;
2739 }
2740 break;
2741
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002742 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002743
2744 {
2745 (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
2746 (yyval.interm).intermNode = 0;
2747 }
2748 break;
2749
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002750 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002751
2752 {
2753 TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2754 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2755 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2756 (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
2757 }
2758 break;
2759
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002760 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002761
2762 {
2763 TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2764 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2765 (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002766 (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002767 }
2768 break;
2769
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002770 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002771
2772 {
2773 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2774 }
2775 break;
2776
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002777 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002778
2779 {
2780 //
2781 // Constructor
2782 //
2783 TOperator op = EOpNull;
2784 if ((yyvsp[(1) - (1)].interm.type).userDef) {
2785 op = EOpConstructStruct;
2786 } else {
2787 switch ((yyvsp[(1) - (1)].interm.type).type) {
2788 case EbtFloat:
Alexis Hetub14178b2015-04-13 13:23:20 -04002789 switch((yyvsp[(1) - (1)].interm.type).primarySize) {
2790 case 1:
2791 op = EOpConstructFloat; break;
2792 case 2:
2793 switch((yyvsp[(1) - (1)].interm.type).secondarySize) {
2794 case 1: op = EOpConstructVec2; break;
2795 case 2: op = EOpConstructMat2; break;
2796 case 3: op = EOpConstructMat2x3; break;
2797 case 4: op = EOpConstructMat2x4; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002798 }
Alexis Hetub14178b2015-04-13 13:23:20 -04002799 break;
2800 case 3:
2801 switch((yyvsp[(1) - (1)].interm.type).secondarySize) {
2802 case 1: op = EOpConstructVec3; break;
2803 case 2: op = EOpConstructMat3x2; break;
2804 case 3: op = EOpConstructMat3; break;
2805 case 4: op = EOpConstructMat3x4; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002806 }
Alexis Hetub14178b2015-04-13 13:23:20 -04002807 break;
2808 case 4:
2809 switch((yyvsp[(1) - (1)].interm.type).secondarySize) {
2810 case 1: op = EOpConstructVec4; break;
2811 case 2: op = EOpConstructMat4x2; break;
2812 case 3: op = EOpConstructMat4x3; break;
2813 case 4: op = EOpConstructMat4; break;
2814 }
2815 break;
John Bauman66b8ab22014-05-06 15:57:45 -04002816 }
2817 break;
2818 case EbtInt:
Alexis Hetub14178b2015-04-13 13:23:20 -04002819 switch((yyvsp[(1) - (1)].interm.type).primarySize) {
John Bauman66b8ab22014-05-06 15:57:45 -04002820 case 1: op = EOpConstructInt; break;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002821 case 2: FRAG_VERT_ONLY("ivec2", (yylsp[(1) - (1)])); op = EOpConstructIVec2; break;
2822 case 3: FRAG_VERT_ONLY("ivec3", (yylsp[(1) - (1)])); op = EOpConstructIVec3; break;
2823 case 4: FRAG_VERT_ONLY("ivec4", (yylsp[(1) - (1)])); op = EOpConstructIVec4; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002824 }
2825 break;
Alexis Hetub7c46af2015-05-12 15:58:09 -04002826 case EbtUInt:
2827 switch((yyvsp[(1) - (1)].interm.type).primarySize) {
2828 case 1: op = EOpConstructUInt; break;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002829 case 2: FRAG_VERT_ONLY("uvec2", (yylsp[(1) - (1)])); op = EOpConstructUVec2; break;
2830 case 3: FRAG_VERT_ONLY("uvec3", (yylsp[(1) - (1)])); op = EOpConstructUVec3; break;
2831 case 4: FRAG_VERT_ONLY("uvec4", (yylsp[(1) - (1)])); op = EOpConstructUVec4; break;
Alexis Hetub7c46af2015-05-12 15:58:09 -04002832 }
2833 break;
John Bauman66b8ab22014-05-06 15:57:45 -04002834 case EbtBool:
Alexis Hetub14178b2015-04-13 13:23:20 -04002835 switch((yyvsp[(1) - (1)].interm.type).primarySize) {
John Bauman66b8ab22014-05-06 15:57:45 -04002836 case 1: op = EOpConstructBool; break;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002837 case 2: FRAG_VERT_ONLY("bvec2", (yylsp[(1) - (1)])); op = EOpConstructBVec2; break;
2838 case 3: FRAG_VERT_ONLY("bvec3", (yylsp[(1) - (1)])); op = EOpConstructBVec3; break;
2839 case 4: FRAG_VERT_ONLY("bvec4", (yylsp[(1) - (1)])); op = EOpConstructBVec4; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002840 }
2841 break;
2842 default: break;
2843 }
2844 if (op == EOpNull) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002845 context->error((yylsp[(1) - (1)]), "cannot construct this type", getBasicString((yyvsp[(1) - (1)].interm.type).type));
John Bauman66b8ab22014-05-06 15:57:45 -04002846 context->recover();
2847 (yyvsp[(1) - (1)].interm.type).type = EbtFloat;
2848 op = EOpConstructFloat;
2849 }
2850 }
2851 TString tempString;
2852 TType type((yyvsp[(1) - (1)].interm.type));
2853 TFunction *function = new TFunction(&tempString, type, op);
2854 (yyval.interm.function) = function;
2855 }
2856 break;
2857
John Bauman66b8ab22014-05-06 15:57:45 -04002858 case 27:
2859
2860 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002861 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002862 context->recover();
2863 TType type(EbtVoid, EbpUndefined);
2864 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2865 (yyval.interm.function) = function;
2866 }
2867 break;
2868
2869 case 28:
2870
2871 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002872 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002873 context->recover();
2874 TType type(EbtVoid, EbpUndefined);
2875 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2876 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002877 }
2878 break;
2879
2880 case 29:
2881
2882 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002883 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2884 }
2885 break;
2886
2887 case 30:
2888
2889 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002890 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002891 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002892 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002893 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002894 context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002895 context->recover();
2896 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2897 }
2898 }
2899 break;
2900
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002901 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002902
2903 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002904 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002905 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002906 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002907 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002908 context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002909 context->recover();
2910 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2911 }
2912 }
2913 break;
2914
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002915 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002916
2917 {
2918 if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002919 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002920 if ((yyval.interm.intermTypedNode) == 0) {
2921 const char* errorOp = "";
2922 switch((yyvsp[(1) - (2)].interm).op) {
2923 case EOpNegative: errorOp = "-"; break;
2924 case EOpLogicalNot: errorOp = "!"; break;
Alexis Hetud061e422015-05-13 16:37:50 -04002925 case EOpBitwiseNot: errorOp = "~"; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002926 default: break;
2927 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002928 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002929 context->recover();
2930 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2931 }
2932 } else
2933 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2934 }
2935 break;
2936
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002937 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002938
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002939 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNull; }
John Bauman66b8ab22014-05-06 15:57:45 -04002940 break;
2941
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002942 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002943
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002944 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNegative; }
John Bauman66b8ab22014-05-06 15:57:45 -04002945 break;
2946
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002947 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002948
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002949 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpLogicalNot; }
John Bauman66b8ab22014-05-06 15:57:45 -04002950 break;
2951
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002952 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002953
Alexis Hetu17809052015-05-13 11:28:22 -04002954 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002955 ES3_ONLY("~", (yylsp[(1) - (1)]));
2956 (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002957 }
John Bauman66b8ab22014-05-06 15:57:45 -04002958 break;
2959
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002960 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002961
Alexis Hetu17809052015-05-13 11:28:22 -04002962 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2963 break;
2964
2965 case 38:
2966
John Bauman66b8ab22014-05-06 15:57:45 -04002967 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002968 FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
2969 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002970 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002971 context->binaryOpError((yylsp[(2) - (3)]), "*", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002972 context->recover();
2973 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2974 }
2975 }
2976 break;
2977
Alexis Hetu17809052015-05-13 11:28:22 -04002978 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002979
2980 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002981 FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
2982 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002983 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002984 context->binaryOpError((yylsp[(2) - (3)]), "/", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002985 context->recover();
2986 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2987 }
2988 }
2989 break;
2990
Alexis Hetu17809052015-05-13 11:28:22 -04002991 case 40:
2992
2993 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002994 FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
2995 ES3_ONLY("%", (yylsp[(2) - (3)]));
2996 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpIMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002997 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002998 context->binaryOpError((yylsp[(2) - (3)]), "%", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
Alexis Hetu17809052015-05-13 11:28:22 -04002999 context->recover();
3000 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3001 }
3002 }
3003 break;
3004
3005 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04003006
3007 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3008 break;
3009
Alexis Hetu17809052015-05-13 11:28:22 -04003010 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04003011
3012 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003013 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003014 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003015 context->binaryOpError((yylsp[(2) - (3)]), "+", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003016 context->recover();
3017 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3018 }
3019 }
3020 break;
3021
Alexis Hetu17809052015-05-13 11:28:22 -04003022 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04003023
3024 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003025 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003026 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003027 context->binaryOpError((yylsp[(2) - (3)]), "-", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003028 context->recover();
3029 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3030 }
3031 }
3032 break;
3033
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003034 case 44:
3035
Alexis Hetu17809052015-05-13 11:28:22 -04003036 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3037 break;
3038
3039 case 45:
3040
3041 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003042 ES3_ONLY("<<", (yylsp[(2) - (3)]));
3043 context->intermediate.addBinaryMath(EOpBitShiftLeft, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003044 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003045 context->binaryOpError((yylsp[(2) - (3)]), "<<", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
Alexis Hetu17809052015-05-13 11:28:22 -04003046 context->recover();
3047 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3048 }
3049 }
3050 break;
3051
3052 case 46:
3053
3054 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003055 ES3_ONLY(">>", (yylsp[(2) - (3)]));
3056 context->intermediate.addBinaryMath(EOpBitShiftRight, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003057 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003058 context->binaryOpError((yylsp[(2) - (3)]), ">>", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
Alexis Hetu17809052015-05-13 11:28:22 -04003059 context->recover();
3060 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3061 }
3062 }
3063 break;
3064
3065 case 47:
3066
3067 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3068 break;
3069
3070 case 48:
3071
John Bauman66b8ab22014-05-06 15:57:45 -04003072 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003073 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003074 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003075 context->binaryOpError((yylsp[(2) - (3)]), "<", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003076 context->recover();
3077 ConstantUnion *unionArray = new ConstantUnion[1];
3078 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003079 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003080 }
3081 }
3082 break;
3083
Alexis Hetu17809052015-05-13 11:28:22 -04003084 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04003085
3086 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003087 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003088 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003089 context->binaryOpError((yylsp[(2) - (3)]), ">", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003090 context->recover();
3091 ConstantUnion *unionArray = new ConstantUnion[1];
3092 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003093 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003094 }
3095 }
3096 break;
3097
Alexis Hetu17809052015-05-13 11:28:22 -04003098 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04003099
3100 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003101 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003102 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003103 context->binaryOpError((yylsp[(2) - (3)]), "<=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003104 context->recover();
3105 ConstantUnion *unionArray = new ConstantUnion[1];
3106 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003107 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003108 }
3109 }
3110 break;
3111
Alexis Hetu17809052015-05-13 11:28:22 -04003112 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04003113
3114 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003115 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003116 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003117 context->binaryOpError((yylsp[(2) - (3)]), ">=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003118 context->recover();
3119 ConstantUnion *unionArray = new ConstantUnion[1];
3120 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003121 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003122 }
3123 }
3124 break;
3125
Alexis Hetu17809052015-05-13 11:28:22 -04003126 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04003127
3128 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3129 break;
3130
Alexis Hetu17809052015-05-13 11:28:22 -04003131 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04003132
3133 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003134 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003135 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003136 context->binaryOpError((yylsp[(2) - (3)]), "==", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003137 context->recover();
3138 ConstantUnion *unionArray = new ConstantUnion[1];
3139 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003140 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003141 }
3142 }
3143 break;
3144
Alexis Hetu17809052015-05-13 11:28:22 -04003145 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04003146
3147 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003148 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003149 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003150 context->binaryOpError((yylsp[(2) - (3)]), "!=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003151 context->recover();
3152 ConstantUnion *unionArray = new ConstantUnion[1];
3153 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003154 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003155 }
3156 }
3157 break;
3158
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003159 case 55:
3160
Alexis Hetu17809052015-05-13 11:28:22 -04003161 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3162 break;
3163
3164 case 56:
3165
3166 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003167 ES3_ONLY("&", (yylsp[(2) - (3)]));
3168 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpBitwiseAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003169 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003170 context->binaryOpError((yylsp[(2) - (3)]), "&", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
Alexis Hetu17809052015-05-13 11:28:22 -04003171 context->recover();
3172 ConstantUnion *unionArray = new ConstantUnion[1];
3173 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003174 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003175 }
3176 }
3177 break;
3178
3179 case 57:
3180
3181 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3182 break;
3183
3184 case 58:
3185
3186 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003187 ES3_ONLY("^", (yylsp[(2) - (3)]));
3188 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpBitwiseXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003189 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003190 context->binaryOpError((yylsp[(2) - (3)]), "^", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
Alexis Hetu17809052015-05-13 11:28:22 -04003191 context->recover();
3192 ConstantUnion *unionArray = new ConstantUnion[1];
3193 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003194 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003195 }
3196 }
3197 break;
3198
3199 case 59:
3200
3201 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3202 break;
3203
3204 case 60:
3205
3206 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003207 ES3_ONLY("|", (yylsp[(2) - (3)]));
3208 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpBitwiseOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003209 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003210 context->binaryOpError((yylsp[(2) - (3)]), "|", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
Alexis Hetu17809052015-05-13 11:28:22 -04003211 context->recover();
3212 ConstantUnion *unionArray = new ConstantUnion[1];
3213 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003214 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003215 }
3216 }
3217 break;
3218
3219 case 61:
3220
3221 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3222 break;
3223
3224 case 62:
3225
John Bauman66b8ab22014-05-06 15:57:45 -04003226 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003227 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003228 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003229 context->binaryOpError((yylsp[(2) - (3)]), "&&", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003230 context->recover();
3231 ConstantUnion *unionArray = new ConstantUnion[1];
3232 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003233 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003234 }
3235 }
3236 break;
3237
Alexis Hetu17809052015-05-13 11:28:22 -04003238 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04003239
3240 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3241 break;
3242
Alexis Hetu17809052015-05-13 11:28:22 -04003243 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04003244
3245 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003246 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003247 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003248 context->binaryOpError((yylsp[(2) - (3)]), "^^", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003249 context->recover();
3250 ConstantUnion *unionArray = new ConstantUnion[1];
3251 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003252 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003253 }
3254 }
3255 break;
3256
Alexis Hetu17809052015-05-13 11:28:22 -04003257 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04003258
3259 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3260 break;
3261
Alexis Hetu17809052015-05-13 11:28:22 -04003262 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04003263
3264 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003265 (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003266 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003267 context->binaryOpError((yylsp[(2) - (3)]), "||", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003268 context->recover();
3269 ConstantUnion *unionArray = new ConstantUnion[1];
3270 unionArray->setBConst(false);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003271 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003272 }
3273 }
3274 break;
3275
Alexis Hetu17809052015-05-13 11:28:22 -04003276 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04003277
3278 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3279 break;
3280
Alexis Hetu17809052015-05-13 11:28:22 -04003281 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04003282
3283 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003284 if (context->boolErrorCheck((yylsp[(2) - (5)]), (yyvsp[(1) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003285 context->recover();
3286
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003287 (yyval.interm.intermTypedNode) = context->intermediate.addSelection((yyvsp[(1) - (5)].interm.intermTypedNode), (yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.intermTypedNode), (yylsp[(2) - (5)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003288 if ((yyvsp[(3) - (5)].interm.intermTypedNode)->getType() != (yyvsp[(5) - (5)].interm.intermTypedNode)->getType())
3289 (yyval.interm.intermTypedNode) = 0;
3290
3291 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003292 context->binaryOpError((yylsp[(2) - (5)]), ":", (yyvsp[(3) - (5)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(5) - (5)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003293 context->recover();
3294 (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode);
3295 }
3296 }
3297 break;
3298
Alexis Hetu17809052015-05-13 11:28:22 -04003299 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04003300
3301 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3302 break;
3303
Alexis Hetu17809052015-05-13 11:28:22 -04003304 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04003305
3306 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003307 if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003308 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003309 (yyval.interm.intermTypedNode) = context->intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003310 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003311 context->assignError((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003312 context->recover();
3313 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3314 }
3315 }
3316 break;
3317
Alexis Hetu17809052015-05-13 11:28:22 -04003318 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04003319
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003320 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003321 break;
3322
Alexis Hetu17809052015-05-13 11:28:22 -04003323 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04003324
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003325 { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpMulAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003326 break;
3327
Alexis Hetu17809052015-05-13 11:28:22 -04003328 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04003329
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003330 { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpDivAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003331 break;
3332
Alexis Hetu17809052015-05-13 11:28:22 -04003333 case 74:
3334
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003335 { ES3_ONLY("%=", (yylsp[(1) - (1)]));
3336 FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpIModAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003337 break;
3338
3339 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04003340
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003341 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAddAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003342 break;
3343
Alexis Hetu17809052015-05-13 11:28:22 -04003344 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04003345
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003346 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpSubAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003347 break;
3348
Alexis Hetu17809052015-05-13 11:28:22 -04003349 case 77:
3350
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003351 { ES3_ONLY("<<=", (yylsp[(1) - (1)]));
3352 FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftLeftAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003353 break;
3354
3355 case 78:
3356
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003357 { ES3_ONLY(">>=", (yylsp[(1) - (1)]));
3358 FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftRightAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003359 break;
3360
3361 case 79:
3362
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003363 { ES3_ONLY("&=", (yylsp[(1) - (1)]));
3364 FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseAndAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003365 break;
3366
3367 case 80:
3368
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003369 { ES3_ONLY("^=", (yylsp[(1) - (1)]));
3370 FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseXorAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003371 break;
3372
3373 case 81:
3374
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003375 { ES3_ONLY("|=", (yylsp[(1) - (1)]));
3376 FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseOrAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003377 break;
3378
3379 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003380
3381 {
3382 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3383 }
3384 break;
3385
Alexis Hetu17809052015-05-13 11:28:22 -04003386 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003387
3388 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003389 (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003390 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003391 context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003392 context->recover();
3393 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3394 }
3395 }
3396 break;
3397
Alexis Hetu17809052015-05-13 11:28:22 -04003398 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003399
3400 {
3401 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3402 context->recover();
3403 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3404 }
3405 break;
3406
Alexis Hetu17809052015-05-13 11:28:22 -04003407 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003408
3409 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003410 if (context->enterStructDeclaration((yyvsp[(1) - (2)].lex).line, *(yyvsp[(1) - (2)].lex).string))
3411 context->recover();
3412 (yyval.lex) = (yyvsp[(1) - (2)].lex);
3413 }
3414 break;
3415
3416 case 86:
3417
3418 {
John Bauman66b8ab22014-05-06 15:57:45 -04003419 TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3420
3421 TIntermAggregate *prototype = new TIntermAggregate;
3422 prototype->setType(function.getReturnType());
3423 prototype->setName(function.getName());
3424
Alexis Hetu76a343a2015-06-04 17:21:22 -04003425 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003426 {
3427 const TParameter &param = function.getParam(i);
3428 if (param.name != 0)
3429 {
John Baumand4ae8632014-05-06 16:18:33 -04003430 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003431
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003432 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003433 }
3434 else
3435 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003436 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003437 }
3438 }
3439
3440 prototype->setOp(EOpPrototype);
3441 (yyval.interm.intermNode) = prototype;
3442
3443 context->symbolTable.pop();
3444 }
3445 break;
3446
Alexis Hetua35d8232015-06-11 17:11:06 -04003447 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003448
3449 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003450 TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3451 if (aggNode && aggNode->getOp() == EOpNull)
3452 aggNode->setOp(EOpDeclaration);
3453 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003454 }
3455 break;
3456
Alexis Hetua35d8232015-06-11 17:11:06 -04003457 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003458
3459 {
John Baumand4ae8632014-05-06 16:18:33 -04003460 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003461 context->error((yylsp[(1) - (4)]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[(3) - (4)].interm.type).type));
John Baumand4ae8632014-05-06 16:18:33 -04003462 context->recover();
3463 }
John Bauman66b8ab22014-05-06 15:57:45 -04003464 (yyval.interm.intermNode) = 0;
3465 }
3466 break;
3467
Alexis Hetua35d8232015-06-11 17:11:06 -04003468 case 89:
3469
3470 {
3471 ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yyvsp[(1) - (5)].interm.type).line);
3472 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.fieldList), NULL, (yyvsp[(1) - (5)].interm.type).line, NULL, (yyvsp[(1) - (5)].interm.type).line);
3473 }
3474 break;
3475
3476 case 90:
3477
3478 {
3479 ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yyvsp[(1) - (6)].interm.type).line);
3480 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (6)].interm.type), (yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string, (yyvsp[(3) - (6)].interm.fieldList), (yyvsp[(5) - (6)].lex).string, (yyvsp[(5) - (6)].lex).line, NULL, (yyvsp[(1) - (6)].interm.type).line);
3481 }
3482 break;
3483
3484 case 91:
3485
3486 {
3487 ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yyvsp[(1) - (9)].interm.type).line);
3488 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (9)].interm.type), (yyvsp[(2) - (9)].lex).line, *(yyvsp[(2) - (9)].lex).string, (yyvsp[(3) - (9)].interm.fieldList), (yyvsp[(5) - (9)].lex).string, (yyvsp[(5) - (9)].lex).line, (yyvsp[(7) - (9)].interm.intermTypedNode), (yyvsp[(6) - (9)].lex).line);
3489 }
3490 break;
3491
3492 case 92:
3493
3494 {
3495 context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3496 (yyval.interm.intermNode) = 0;
3497 }
3498 break;
3499
3500 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003501
3502 {
3503 //
3504 // Multiple declarations of the same function are allowed.
3505 //
3506 // If this is a definition, the definition production code will check for redefinitions
3507 // (we don't know at this point if it's a definition or not).
3508 //
3509 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3510 //
Nicolas Capens0a7f0c22015-02-18 14:47:31 -05003511 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->shaderVersion));
John Bauman66b8ab22014-05-06 15:57:45 -04003512 if (prevDec) {
3513 if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003514 context->error((yylsp[(2) - (2)]), "overloaded functions must have the same return type", (yyvsp[(1) - (2)].interm.function)->getReturnType().getBasicString());
John Bauman66b8ab22014-05-06 15:57:45 -04003515 context->recover();
3516 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003517 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04003518 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003519 context->error((yylsp[(2) - (2)]), "overloaded functions must have the same parameter qualifiers", (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifierString());
John Bauman66b8ab22014-05-06 15:57:45 -04003520 context->recover();
3521 }
3522 }
3523 }
3524
3525 //
3526 // If this is a redeclaration, it could also be a definition,
3527 // in which case, we want to use the variable names from this one, and not the one that's
3528 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3529 //
3530 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003531 (yyval.interm).line = (yylsp[(2) - (2)]);
John Bauman66b8ab22014-05-06 15:57:45 -04003532
3533 // We're at the inner scope level of the function's arguments and body statement.
3534 // Add the function prototype to the surrounding scope instead.
3535 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3536 }
3537 break;
3538
Alexis Hetua35d8232015-06-11 17:11:06 -04003539 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003540
3541 {
3542 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3543 }
3544 break;
3545
Alexis Hetua35d8232015-06-11 17:11:06 -04003546 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003547
3548 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003549 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3550 }
3551 break;
3552
Alexis Hetua35d8232015-06-11 17:11:06 -04003553 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003554
3555 {
John Bauman66b8ab22014-05-06 15:57:45 -04003556 // Add the parameter
3557 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3558 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3559 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3560 else
3561 delete (yyvsp[(2) - (2)].interm).param.type;
3562 }
3563 break;
3564
Alexis Hetua35d8232015-06-11 17:11:06 -04003565 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003566
3567 {
3568 //
3569 // Only first parameter of one-parameter functions can be void
3570 // The check for named parameters not being void is done in parameter_declarator
3571 //
3572 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3573 //
3574 // This parameter > first is void
3575 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003576 context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003577 context->recover();
3578 delete (yyvsp[(3) - (3)].interm).param.type;
3579 } else {
3580 // Add the parameter
3581 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3582 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3583 }
3584 }
3585 break;
3586
Alexis Hetua35d8232015-06-11 17:11:06 -04003587 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003588
3589 {
3590 if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003591 context->error((yylsp[(2) - (3)]), "no qualifiers allowed for function return", getQualifierString((yyvsp[(1) - (3)].interm.type).qualifier));
John Bauman66b8ab22014-05-06 15:57:45 -04003592 context->recover();
3593 }
3594 // make sure a sampler is not involved as well...
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003595 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003596 context->recover();
3597
3598 // Add the function as a prototype after parsing it (we do not support recursion)
3599 TFunction *function;
3600 TType type((yyvsp[(1) - (3)].interm.type));
3601 function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3602 (yyval.interm.function) = function;
3603
3604 context->symbolTable.push();
3605 }
3606 break;
3607
Alexis Hetua35d8232015-06-11 17:11:06 -04003608 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003609
3610 {
3611 if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003612 context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003613 context->recover();
3614 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003615 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003616 context->recover();
3617 TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003618 (yyval.interm).line = (yylsp[(2) - (2)]);
John Bauman66b8ab22014-05-06 15:57:45 -04003619 (yyval.interm).param = param;
3620 }
3621 break;
3622
Alexis Hetua35d8232015-06-11 17:11:06 -04003623 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003624
3625 {
3626 // Check that we can make an array out of this type
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003627 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003628 context->recover();
3629
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003630 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003631 context->recover();
3632
3633 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003634 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003635 context->recover();
3636 (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3637
3638 TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3639 TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003640 (yyval.interm).line = (yylsp[(2) - (5)]);
John Bauman66b8ab22014-05-06 15:57:45 -04003641 (yyval.interm).param = param;
3642 }
3643 break;
3644
Alexis Hetu17809052015-05-13 11:28:22 -04003645 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003646
3647 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003648 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003649 if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003650 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003651 }
3652 break;
3653
Alexis Hetu17809052015-05-13 11:28:22 -04003654 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003655
3656 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003657 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003658 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003659 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003660 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003661 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003662 }
3663 break;
3664
Alexis Hetu17809052015-05-13 11:28:22 -04003665 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003666
3667 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003668 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003669 if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003670 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003671 }
3672 break;
3673
Alexis Hetu17809052015-05-13 11:28:22 -04003674 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003675
3676 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003677 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003678 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003679 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003680 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003681 context->recover();
3682 }
3683 break;
3684
3685 case 105:
3686
3687 {
3688 (yyval.interm.qualifier) = EvqIn;
3689 }
3690 break;
3691
3692 case 106:
3693
3694 {
3695 (yyval.interm.qualifier) = EvqIn;
3696 }
3697 break;
3698
3699 case 107:
3700
3701 {
3702 (yyval.interm.qualifier) = EvqOut;
3703 }
3704 break;
3705
3706 case 108:
3707
3708 {
3709 (yyval.interm.qualifier) = EvqInOut;
3710 }
3711 break;
3712
3713 case 109:
3714
3715 {
John Bauman66b8ab22014-05-06 15:57:45 -04003716 TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3717 (yyval.interm).param = param;
3718 }
3719 break;
3720
Alexis Hetua35d8232015-06-11 17:11:06 -04003721 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003722
3723 {
3724 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3725 }
3726 break;
3727
Alexis Hetua35d8232015-06-11 17:11:06 -04003728 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003729
3730 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003731 (yyval.interm) = (yyvsp[(1) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003732 (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[(1) - (3)].interm).intermAggregate, (yylsp[(3) - (3)]), *(yyvsp[(3) - (3)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003733 }
3734 break;
3735
Alexis Hetua35d8232015-06-11 17:11:06 -04003736 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003737
3738 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003739 (yyval.interm) = (yyvsp[(1) - (6)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003740 (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[(1) - (6)].interm).intermAggregate, (yylsp[(3) - (6)]), *(yyvsp[(3) - (6)].lex).string, (yylsp[(4) - (6)]), (yyvsp[(5) - (6)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003741 }
3742 break;
3743
Alexis Hetua35d8232015-06-11 17:11:06 -04003744 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003745
3746 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003747 ES3_ONLY("[]", (yylsp[(3) - (7)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003748 (yyval.interm) = (yyvsp[(1) - (7)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003749 (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (7)].interm).intermAggregate, (yylsp[(3) - (7)]), *(yyvsp[(3) - (7)].lex).string, (yylsp[(4) - (7)]), nullptr, (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003750 }
3751 break;
3752
Alexis Hetua35d8232015-06-11 17:11:06 -04003753 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003754
3755 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003756 ES3_ONLY("=", (yylsp[(7) - (8)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003757 (yyval.interm) = (yyvsp[(1) - (8)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003758 (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[(1) - (8)].interm).intermAggregate, (yylsp[(3) - (8)]), *(yyvsp[(3) - (8)].lex).string, (yylsp[(4) - (8)]), (yyvsp[(5) - (8)].interm.intermTypedNode), (yylsp[(7) - (8)]), (yyvsp[(8) - (8)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003759 }
3760 break;
3761
Alexis Hetua35d8232015-06-11 17:11:06 -04003762 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003763
3764 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003765 (yyval.interm) = (yyvsp[(1) - (5)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003766 (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[(1) - (5)].interm).intermAggregate, (yylsp[(3) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yylsp[(4) - (5)]), (yyvsp[(5) - (5)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003767 }
3768 break;
3769
Alexis Hetua35d8232015-06-11 17:11:06 -04003770 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003771
3772 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003773 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003774 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003775 }
3776 break;
3777
Alexis Hetua35d8232015-06-11 17:11:06 -04003778 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003779
3780 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003781 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003782 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003783 }
3784 break;
3785
Alexis Hetua35d8232015-06-11 17:11:06 -04003786 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003787
3788 {
John Bauman66b8ab22014-05-06 15:57:45 -04003789 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003790 (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003791 }
3792 break;
3793
Alexis Hetua35d8232015-06-11 17:11:06 -04003794 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003795
3796 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003797 ES3_ONLY("[]", (yylsp[(3) - (6)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003798 (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003799 (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yylsp[(3) - (6)]), nullptr, (yylsp[(5) - (6)]), (yyvsp[(6) - (6)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003800 }
3801 break;
3802
Alexis Hetua35d8232015-06-11 17:11:06 -04003803 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003804
3805 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003806 ES3_ONLY("=", (yylsp[(6) - (7)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003807 (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003808 (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[(2) - (7)]), *(yyvsp[(2) - (7)].lex).string, (yylsp[(3) - (7)]), (yyvsp[(4) - (7)].interm.intermTypedNode), (yylsp[(6) - (7)]), (yyvsp[(7) - (7)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04003809 }
3810 break;
3811
Alexis Hetua35d8232015-06-11 17:11:06 -04003812 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003813
3814 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003815 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003816 (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yylsp[(3) - (4)]), (yyvsp[(4) - (4)].interm.intermTypedNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003817 }
3818 break;
3819
Alexis Hetua35d8232015-06-11 17:11:06 -04003820 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003821
3822 {
3823 // $$.type is not used in invariant declarations.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003824 (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[(1) - (2)]), (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].lex).string, (yyvsp[(2) - (2)].lex).symbol);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003825 }
3826 break;
3827
Alexis Hetua35d8232015-06-11 17:11:06 -04003828 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003829
3830 {
John Bauman66b8ab22014-05-06 15:57:45 -04003831 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3832
3833 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003834 ES3_ONLY("[]", (yylsp[(1) - (1)]));
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003835 if (context->getShaderVersion() != 300) {
3836 (yyvsp[(1) - (1)].interm.type).clearArrayness();
3837 }
John Bauman66b8ab22014-05-06 15:57:45 -04003838 }
3839 }
3840 break;
3841
Alexis Hetua35d8232015-06-11 17:11:06 -04003842 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003843
3844 {
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003845 (yyval.interm.type) = context->addFullySpecifiedType((yyvsp[(1) - (2)].interm.type).qualifier, (yyvsp[(1) - (2)].interm.type).invariant, (yyvsp[(1) - (2)].interm.type).layoutQualifier, (yyvsp[(2) - (2)].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04003846 }
3847 break;
3848
Alexis Hetua35d8232015-06-11 17:11:06 -04003849 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003850
3851 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003852 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003853 }
3854 break;
3855
Alexis Hetua35d8232015-06-11 17:11:06 -04003856 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003857
3858 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003859 (yyval.interm.type).qualifier = EvqFlat;
3860 }
3861 break;
3862
Alexis Hetua35d8232015-06-11 17:11:06 -04003863 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003864
3865 {
3866 (yyval.interm.qualifier) = EvqConstReadOnly;
3867 }
3868 break;
3869
Alexis Hetua35d8232015-06-11 17:11:06 -04003870 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003871
3872 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003873 VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3874 ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3875 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003876 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003877 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003878 }
3879 break;
3880
Alexis Hetua35d8232015-06-11 17:11:06 -04003881 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003882
3883 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003884 ES2_ONLY("varying", (yylsp[(1) - (1)]));
3885 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003886 context->recover();
Nicolas Capens08ca3c62015-02-13 16:06:45 -05003887 if (context->shaderType == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003888 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003889 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003890 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003891 }
3892 break;
3893
Alexis Hetua35d8232015-06-11 17:11:06 -04003894 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003895
3896 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003897 ES2_ONLY("varying", (yylsp[(1) - (2)]));
3898 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003899 context->recover();
Nicolas Capens08ca3c62015-02-13 16:06:45 -05003900 if (context->shaderType == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003901 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003902 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003903 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003904 }
3905 break;
3906
Alexis Hetua35d8232015-06-11 17:11:06 -04003907 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003908
3909 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003910 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003911 }
3912 break;
3913
Alexis Hetua35d8232015-06-11 17:11:06 -04003914 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003915
3916 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003917 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(1) - (2)]), (yyvsp[(1) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].interm.type).qualifier);
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003918 }
3919 break;
3920
Alexis Hetua35d8232015-06-11 17:11:06 -04003921 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003922
3923 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003924 context->error((yylsp[(1) - (1)]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getQualifierString((yyvsp[(1) - (1)].interm.type).qualifier));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003925 context->recover();
3926
3927 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003928 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003929 }
3930 break;
3931
Alexis Hetua35d8232015-06-11 17:11:06 -04003932 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003933
3934 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003935 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3936 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3937 }
3938 break;
3939
Alexis Hetua35d8232015-06-11 17:11:06 -04003940 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003941
3942 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003943 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003944 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3945 }
3946 break;
3947
Alexis Hetua35d8232015-06-11 17:11:06 -04003948 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003949
3950 {
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05003951 (yyval.interm.type).qualifier = EvqConstExpr;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003952 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003953 }
3954 break;
3955
Alexis Hetua35d8232015-06-11 17:11:06 -04003956 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003957
3958 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003959 ES3_ONLY("in", (yylsp[(1) - (1)]));
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003960 (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003961 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003962 }
3963 break;
3964
Alexis Hetua35d8232015-06-11 17:11:06 -04003965 case 138:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003966
3967 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003968 ES3_ONLY("out", (yylsp[(1) - (1)]));
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003969 (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003970 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003971 }
3972 break;
3973
Alexis Hetua35d8232015-06-11 17:11:06 -04003974 case 139:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003975
3976 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003977 ES3_ONLY("centroid in", (yylsp[(1) - (2)]));
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003978 if (context->shaderType == GL_VERTEX_SHADER)
3979 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003980 context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003981 context->recover();
3982 }
3983 (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003984 (yyval.interm.type).line = (yylsp[(2) - (2)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003985 }
3986 break;
3987
Alexis Hetua35d8232015-06-11 17:11:06 -04003988 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003989
3990 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003991 ES3_ONLY("centroid out", (yylsp[(1) - (2)]));
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003992 if (context->shaderType == GL_FRAGMENT_SHADER)
3993 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003994 context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003995 context->recover();
3996 }
3997 (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003998 (yyval.interm.type).line = (yylsp[(2) - (2)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003999 }
4000 break;
4001
Alexis Hetua35d8232015-06-11 17:11:06 -04004002 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05004003
4004 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004005 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05004006 context->recover();
4007 (yyval.interm.type).qualifier = EvqUniform;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004008 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05004009 }
4010 break;
4011
Alexis Hetua35d8232015-06-11 17:11:06 -04004012 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05004013
4014 {
John Bauman66b8ab22014-05-06 15:57:45 -04004015 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4016
4017 if ((yyval.interm.type).precision == EbpUndefined) {
4018 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004019 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04004020 context->recover();
4021 }
4022 }
4023 }
4024 break;
4025
Alexis Hetua35d8232015-06-11 17:11:06 -04004026 case 143:
John Bauman66b8ab22014-05-06 15:57:45 -04004027
4028 {
4029 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
4030 (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
4031 }
4032 break;
4033
Alexis Hetua35d8232015-06-11 17:11:06 -04004034 case 144:
John Bauman66b8ab22014-05-06 15:57:45 -04004035
4036 {
4037 (yyval.interm.precision) = EbpHigh;
4038 }
4039 break;
4040
Alexis Hetua35d8232015-06-11 17:11:06 -04004041 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04004042
4043 {
4044 (yyval.interm.precision) = EbpMedium;
4045 }
4046 break;
4047
Alexis Hetua35d8232015-06-11 17:11:06 -04004048 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04004049
4050 {
4051 (yyval.interm.precision) = EbpLow;
4052 }
4053 break;
4054
Alexis Hetua35d8232015-06-11 17:11:06 -04004055 case 147:
Nicolas Capens7d626792015-02-17 17:58:31 -05004056
4057 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004058 ES3_ONLY("layout", (yylsp[(1) - (4)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004059 (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
4060 }
4061 break;
4062
Alexis Hetua35d8232015-06-11 17:11:06 -04004063 case 148:
Nicolas Capens7d626792015-02-17 17:58:31 -05004064
4065 {
4066 (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
4067 }
4068 break;
4069
Alexis Hetua35d8232015-06-11 17:11:06 -04004070 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05004071
4072 {
4073 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
4074 }
4075 break;
4076
Alexis Hetua35d8232015-06-11 17:11:06 -04004077 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05004078
4079 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004080 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004081 }
4082 break;
4083
Alexis Hetua35d8232015-06-11 17:11:06 -04004084 case 151:
John Bauman66b8ab22014-05-06 15:57:45 -04004085
4086 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004087 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004088 }
4089 break;
4090
Alexis Hetua35d8232015-06-11 17:11:06 -04004091 case 152:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004092
4093 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004094 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004095 }
4096 break;
4097
Alexis Hetua35d8232015-06-11 17:11:06 -04004098 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004099
4100 {
John Bauman66b8ab22014-05-06 15:57:45 -04004101 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4102 }
4103 break;
4104
Alexis Hetua35d8232015-06-11 17:11:06 -04004105 case 154:
John Bauman66b8ab22014-05-06 15:57:45 -04004106
4107 {
4108 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
4109
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004110 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004111 context->recover();
4112 else {
4113 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004114 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004115 context->recover();
4116 (yyval.interm.type).setArray(true, size);
4117 }
4118 }
4119 break;
4120
Alexis Hetu17809052015-05-13 11:28:22 -04004121 case 155:
4122
4123 {
4124 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004125 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004126 }
4127 break;
4128
4129 case 156:
4130
4131 {
4132 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004133 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004134 }
4135 break;
4136
4137 case 157:
4138
4139 {
4140 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004141 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004142 }
4143 break;
4144
4145 case 158:
4146
4147 {
4148 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004149 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004150 }
4151 break;
4152
4153 case 159:
4154
4155 {
4156 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004157 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004158 }
4159 break;
4160
4161 case 160:
4162
4163 {
4164 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004165 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004166 (yyval.interm.type).setAggregate(2);
4167 }
4168 break;
4169
4170 case 161:
4171
4172 {
4173 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004174 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004175 (yyval.interm.type).setAggregate(3);
4176 }
4177 break;
4178
4179 case 162:
4180
4181 {
4182 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004183 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004184 (yyval.interm.type).setAggregate(4);
4185 }
4186 break;
4187
4188 case 163:
4189
4190 {
4191 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004192 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004193 (yyval.interm.type).setAggregate(2);
4194 }
4195 break;
4196
4197 case 164:
4198
4199 {
4200 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004201 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004202 (yyval.interm.type).setAggregate(3);
4203 }
4204 break;
4205
4206 case 165:
4207
4208 {
4209 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004210 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004211 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04004212 }
4213 break;
4214
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004215 case 166:
4216
4217 {
4218 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004219 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004220 (yyval.interm.type).setAggregate(2);
4221 }
4222 break;
4223
4224 case 167:
4225
4226 {
4227 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004228 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004229 (yyval.interm.type).setAggregate(3);
4230 }
4231 break;
4232
4233 case 168:
4234
4235 {
4236 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004237 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004238 (yyval.interm.type).setAggregate(4);
4239 }
4240 break;
4241
4242 case 169:
4243
4244 {
4245 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004246 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004247 (yyval.interm.type).setAggregate(2);
4248 }
4249 break;
4250
4251 case 170:
4252
4253 {
4254 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004255 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04004256 (yyval.interm.type).setAggregate(3);
4257 }
4258 break;
4259
4260 case 171:
4261
4262 {
4263 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004264 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004265 (yyval.interm.type).setAggregate(4);
4266 }
4267 break;
4268
Alexis Hetua35d8232015-06-11 17:11:06 -04004269 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004270
4271 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004272 FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004273 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004274 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004275 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004276 }
4277 break;
4278
Alexis Hetua35d8232015-06-11 17:11:06 -04004279 case 173:
John Bauman66b8ab22014-05-06 15:57:45 -04004280
4281 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004282 FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004283 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004284 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004285 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004286 }
4287 break;
4288
Alexis Hetua35d8232015-06-11 17:11:06 -04004289 case 174:
John Bauman66b8ab22014-05-06 15:57:45 -04004290
4291 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004292 FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004293 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004294 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004295 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004296 }
4297 break;
4298
Alexis Hetua35d8232015-06-11 17:11:06 -04004299 case 175:
John Bauman66b8ab22014-05-06 15:57:45 -04004300
4301 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004302 FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004303 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004304 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004305 (yyval.interm.type).setMatrix(2, 3);
4306 }
4307 break;
4308
Alexis Hetua35d8232015-06-11 17:11:06 -04004309 case 176:
Alexis Hetub14178b2015-04-13 13:23:20 -04004310
4311 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004312 FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004313 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004314 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004315 (yyval.interm.type).setMatrix(3, 2);
4316 }
4317 break;
4318
Alexis Hetua35d8232015-06-11 17:11:06 -04004319 case 177:
Alexis Hetub14178b2015-04-13 13:23:20 -04004320
4321 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004322 FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004323 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004324 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004325 (yyval.interm.type).setMatrix(2, 4);
4326 }
4327 break;
4328
Alexis Hetua35d8232015-06-11 17:11:06 -04004329 case 178:
Alexis Hetub14178b2015-04-13 13:23:20 -04004330
4331 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004332 FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004333 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004334 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004335 (yyval.interm.type).setMatrix(4, 2);
4336 }
4337 break;
4338
Alexis Hetua35d8232015-06-11 17:11:06 -04004339 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004340
4341 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004342 FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004343 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004344 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004345 (yyval.interm.type).setMatrix(3, 4);
4346 }
4347 break;
4348
Alexis Hetua35d8232015-06-11 17:11:06 -04004349 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004350
4351 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004352 FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004353 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004354 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004355 (yyval.interm.type).setMatrix(4, 3);
4356 }
4357 break;
4358
Alexis Hetua35d8232015-06-11 17:11:06 -04004359 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004360
4361 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004362 FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004363 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004364 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004365 }
4366 break;
4367
Alexis Hetua35d8232015-06-11 17:11:06 -04004368 case 182:
John Bauman66b8ab22014-05-06 15:57:45 -04004369
4370 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004371 FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004372 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004373 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004374 }
4375 break;
4376
Alexis Hetua35d8232015-06-11 17:11:06 -04004377 case 183:
John Bauman66b8ab22014-05-06 15:57:45 -04004378
4379 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004380 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004381 context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004382 context->recover();
4383 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004384 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004385 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004386 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004387 }
4388 break;
4389
Alexis Hetua35d8232015-06-11 17:11:06 -04004390 case 184:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004391
4392 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004393 FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004394 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004395 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004396 }
4397 break;
4398
Alexis Hetua35d8232015-06-11 17:11:06 -04004399 case 185:
Alexis Hetub14178b2015-04-13 13:23:20 -04004400
4401 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004402 FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004403 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004404 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004405 }
4406 break;
4407
Alexis Hetua35d8232015-06-11 17:11:06 -04004408 case 186:
Alexis Hetub14178b2015-04-13 13:23:20 -04004409
4410 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004411 FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004412 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004413 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004414 }
4415 break;
4416
Alexis Hetua35d8232015-06-11 17:11:06 -04004417 case 187:
Alexis Hetub14178b2015-04-13 13:23:20 -04004418
4419 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004420 FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004421 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004422 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004423 }
4424 break;
4425
Alexis Hetua35d8232015-06-11 17:11:06 -04004426 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004427
4428 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004429 FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004430 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004431 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004432 }
4433 break;
4434
Alexis Hetua35d8232015-06-11 17:11:06 -04004435 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004436
4437 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004438 FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004439 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004440 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004441 }
4442 break;
4443
Alexis Hetua35d8232015-06-11 17:11:06 -04004444 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004445
4446 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004447 FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004448 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004449 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004450 }
4451 break;
4452
Alexis Hetua35d8232015-06-11 17:11:06 -04004453 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004454
4455 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004456 FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004457 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004458 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004459 }
4460 break;
4461
Alexis Hetua35d8232015-06-11 17:11:06 -04004462 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004463
4464 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004465 FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004466 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004467 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004468 }
4469 break;
4470
Alexis Hetua35d8232015-06-11 17:11:06 -04004471 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004472
4473 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004474 FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004475 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004476 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004477 }
4478 break;
4479
Alexis Hetua35d8232015-06-11 17:11:06 -04004480 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004481
4482 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004483 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004484 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004485 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004486 }
4487 break;
4488
Alexis Hetua35d8232015-06-11 17:11:06 -04004489 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004490
4491 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004492 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004493 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004494 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004495 }
4496 break;
4497
Alexis Hetua35d8232015-06-11 17:11:06 -04004498 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004499
4500 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004501 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004502 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004503 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004504 }
4505 break;
4506
Alexis Hetua35d8232015-06-11 17:11:06 -04004507 case 197:
Alexis Hetub027aa92015-01-19 15:56:12 -05004508
4509 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004510 FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004511 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4512 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4513 }
4514 break;
4515
Alexis Hetua35d8232015-06-11 17:11:06 -04004516 case 198:
John Bauman66b8ab22014-05-06 15:57:45 -04004517
4518 {
4519 //
4520 // This is for user defined type names. The lexical phase looked up the
4521 // type.
4522 //
4523 TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4524 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004525 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004526 (yyval.interm.type).userDef = &structure;
4527 }
4528 break;
4529
Alexis Hetua35d8232015-06-11 17:11:06 -04004530 case 199:
John Bauman66b8ab22014-05-06 15:57:45 -04004531
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004532 { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004533 break;
4534
Alexis Hetua35d8232015-06-11 17:11:06 -04004535 case 200:
John Bauman66b8ab22014-05-06 15:57:45 -04004536
4537 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004538 (yyval.interm.type) = context->addStructure((yylsp[(1) - (6)]), (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].lex).string, (yyvsp[(5) - (6)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004539 }
4540 break;
4541
Alexis Hetua35d8232015-06-11 17:11:06 -04004542 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004543
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004544 { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004545 break;
4546
Alexis Hetua35d8232015-06-11 17:11:06 -04004547 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004548
4549 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004550 (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004551 }
4552 break;
4553
Alexis Hetua35d8232015-06-11 17:11:06 -04004554 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004555
4556 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004557 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004558 }
4559 break;
4560
Alexis Hetua35d8232015-06-11 17:11:06 -04004561 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004562
4563 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004564 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4565 for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4566 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4567 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4568 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4569 context->error((*(yyvsp[(2) - (2)].interm.fieldList))[i]->line(), "duplicate field name in structure:", "struct", field->name().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004570 context->recover();
4571 }
4572 }
Alexis Hetua8b364b2015-06-10 11:48:40 -04004573 (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004574 }
4575 }
4576 break;
4577
Alexis Hetua35d8232015-06-11 17:11:06 -04004578 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004579
4580 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004581 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004582 }
4583 break;
4584
Alexis Hetua35d8232015-06-11 17:11:06 -04004585 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004586
4587 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004588 // ES3 Only, but errors should be handled elsewhere
4589 (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4590 (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4591 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4592 }
4593 break;
4594
Alexis Hetua35d8232015-06-11 17:11:06 -04004595 case 207:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004596
4597 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004598 (yyval.interm.fieldList) = NewPoolTFieldList();
4599 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004600 }
4601 break;
4602
Alexis Hetua35d8232015-06-11 17:11:06 -04004603 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004604
4605 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004606 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004607 }
4608 break;
4609
Alexis Hetua35d8232015-06-11 17:11:06 -04004610 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004611
4612 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004613 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004614 context->recover();
4615
Alexis Hetua8b364b2015-06-10 11:48:40 -04004616 TType* type = new TType(EbtVoid, EbpUndefined);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004617 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004618 }
4619 break;
4620
Alexis Hetua35d8232015-06-11 17:11:06 -04004621 case 210:
John Bauman66b8ab22014-05-06 15:57:45 -04004622
4623 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004624 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004625 context->recover();
4626
Alexis Hetua8b364b2015-06-10 11:48:40 -04004627 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004628 int size;
Alexis Hetua8b364b2015-06-10 11:48:40 -04004629 if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004630 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004631 type->setArraySize(size);
4632
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004633 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004634 }
4635 break;
4636
Alexis Hetu17809052015-05-13 11:28:22 -04004637 case 211:
Nicolas Capens7d626792015-02-17 17:58:31 -05004638
Alexis Hetua35d8232015-06-11 17:11:06 -04004639 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004640 break;
4641
Alexis Hetu17809052015-05-13 11:28:22 -04004642 case 212:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004643
Alexis Hetuad6b8752015-06-09 16:15:30 -04004644 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004645 break;
4646
Alexis Hetu17809052015-05-13 11:28:22 -04004647 case 213:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004648
Alexis Hetua35d8232015-06-11 17:11:06 -04004649 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004650 break;
4651
Alexis Hetu17809052015-05-13 11:28:22 -04004652 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004653
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004654 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004655 break;
4656
Alexis Hetu17809052015-05-13 11:28:22 -04004657 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004658
Alexis Hetua35d8232015-06-11 17:11:06 -04004659 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetuad6b8752015-06-09 16:15:30 -04004660 break;
4661
4662 case 216:
4663
Alexis Hetua35d8232015-06-11 17:11:06 -04004664 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004665 break;
4666
4667 case 217:
4668
Alexis Hetua35d8232015-06-11 17:11:06 -04004669 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004670 break;
4671
4672 case 218:
4673
Alexis Hetu76a343a2015-06-04 17:21:22 -04004674 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004675 break;
4676
4677 case 219:
4678
Alexis Hetu76a343a2015-06-04 17:21:22 -04004679 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004680 break;
4681
4682 case 220:
4683
Alexis Hetu76a343a2015-06-04 17:21:22 -04004684 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004685 break;
4686
4687 case 221:
4688
Alexis Hetu76a343a2015-06-04 17:21:22 -04004689 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004690 break;
4691
4692 case 222:
4693
Alexis Hetu76a343a2015-06-04 17:21:22 -04004694 { (yyval.interm.intermAggregate) = 0; }
Alexis Hetua35d8232015-06-11 17:11:06 -04004695 break;
4696
4697 case 223:
4698
Alexis Hetu76a343a2015-06-04 17:21:22 -04004699 { context->symbolTable.push(); }
4700 break;
4701
4702 case 224:
4703
4704 { context->symbolTable.pop(); }
4705 break;
4706
4707 case 225:
4708
Nicolas Capens7d626792015-02-17 17:58:31 -05004709 {
4710 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4711 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004712 (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004713 }
4714 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4715 }
4716 break;
4717
Alexis Hetua35d8232015-06-11 17:11:06 -04004718 case 226:
4719
Alexis Hetu76a343a2015-06-04 17:21:22 -04004720 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004721 break;
4722
4723 case 227:
4724
Alexis Hetu76a343a2015-06-04 17:21:22 -04004725 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004726 break;
4727
4728 case 228:
4729
4730 { context->symbolTable.push(); }
4731 break;
4732
4733 case 229:
4734
4735 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4736 break;
4737
4738 case 230:
4739
Alexis Hetu76a343a2015-06-04 17:21:22 -04004740 { context->symbolTable.push(); }
4741 break;
4742
4743 case 231:
4744
4745 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4746 break;
4747
4748 case 232:
4749
John Bauman66b8ab22014-05-06 15:57:45 -04004750 {
4751 (yyval.interm.intermNode) = 0;
4752 }
4753 break;
4754
Alexis Hetu76a343a2015-06-04 17:21:22 -04004755 case 233:
John Bauman66b8ab22014-05-06 15:57:45 -04004756
4757 {
4758 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4759 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004760 (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004761 }
4762 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4763 }
4764 break;
4765
Alexis Hetu76a343a2015-06-04 17:21:22 -04004766 case 234:
John Bauman66b8ab22014-05-06 15:57:45 -04004767
4768 {
4769 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
4770 }
4771 break;
4772
Alexis Hetu76a343a2015-06-04 17:21:22 -04004773 case 235:
John Bauman66b8ab22014-05-06 15:57:45 -04004774
4775 {
4776 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
4777 }
4778 break;
4779
Alexis Hetu76a343a2015-06-04 17:21:22 -04004780 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004781
4782 { (yyval.interm.intermNode) = 0; }
4783 break;
4784
Alexis Hetu76a343a2015-06-04 17:21:22 -04004785 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004786
4787 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4788 break;
4789
Alexis Hetu76a343a2015-06-04 17:21:22 -04004790 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004791
4792 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004793 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004794 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004795 (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yylsp[(1) - (5)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004796 }
4797 break;
4798
Alexis Hetu76a343a2015-06-04 17:21:22 -04004799 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004800
4801 {
4802 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4803 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4804 }
4805 break;
4806
Alexis Hetu76a343a2015-06-04 17:21:22 -04004807 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004808
4809 {
4810 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4811 (yyval.interm.nodePair).node2 = 0;
4812 }
4813 break;
4814
Alexis Hetu76a343a2015-06-04 17:21:22 -04004815 case 241:
4816
4817 { context->incrSwitchNestingLevel(); }
4818 break;
4819
4820 case 242:
4821
4822 {
4823 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yyvsp[(1) - (6)].lex).line);
4824 context->decrSwitchNestingLevel();
4825 }
4826 break;
4827
4828 case 243:
4829
4830 {
4831 (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).line);
4832 }
4833 break;
4834
4835 case 244:
4836
4837 {
4838 (yyval.interm.intermCase) = context->addDefault((yyvsp[(1) - (2)].lex).line);
4839 }
4840 break;
4841
4842 case 245:
John Bauman66b8ab22014-05-06 15:57:45 -04004843
4844 {
4845 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4846 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4847 context->recover();
4848 }
4849 break;
4850
Alexis Hetu76a343a2015-06-04 17:21:22 -04004851 case 246:
John Bauman66b8ab22014-05-06 15:57:45 -04004852
4853 {
4854 TIntermNode* intermNode;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004855 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004856 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004857 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004858 context->recover();
4859
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004860 if (!context->executeInitializer((yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), intermNode))
John Bauman66b8ab22014-05-06 15:57:45 -04004861 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4862 else {
4863 context->recover();
4864 (yyval.interm.intermTypedNode) = 0;
4865 }
4866 }
4867 break;
4868
Alexis Hetu76a343a2015-06-04 17:21:22 -04004869 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004870
4871 { context->symbolTable.push(); ++context->loopNestingLevel; }
4872 break;
4873
Alexis Hetu76a343a2015-06-04 17:21:22 -04004874 case 248:
John Bauman66b8ab22014-05-06 15:57:45 -04004875
4876 {
4877 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004878 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yylsp[(1) - (6)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004879 --context->loopNestingLevel;
4880 }
4881 break;
4882
Alexis Hetu76a343a2015-06-04 17:21:22 -04004883 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004884
4885 { ++context->loopNestingLevel; }
4886 break;
4887
Alexis Hetu76a343a2015-06-04 17:21:22 -04004888 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004889
4890 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004891 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004892 context->recover();
4893
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004894 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yylsp[(4) - (8)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004895 --context->loopNestingLevel;
4896 }
4897 break;
4898
Alexis Hetu76a343a2015-06-04 17:21:22 -04004899 case 251:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004900
Alexis Hetuad6b8752015-06-09 16:15:30 -04004901 { context->symbolTable.push(); ++context->loopNestingLevel; }
Alexis Hetub027aa92015-01-19 15:56:12 -05004902 break;
4903
Alexis Hetu76a343a2015-06-04 17:21:22 -04004904 case 252:
Alexis Hetub027aa92015-01-19 15:56:12 -05004905
4906 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004907 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004908 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[(4) - (7)].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[(5) - (7)].interm.nodePair).node2), (yyvsp[(7) - (7)].interm.intermNode), (yylsp[(1) - (7)]));
Alexis Hetuad6b8752015-06-09 16:15:30 -04004909 --context->loopNestingLevel;
Nicolas Capens3c20f802015-02-17 17:17:20 -05004910 }
4911 break;
4912
Alexis Hetu76a343a2015-06-04 17:21:22 -04004913 case 253:
Alexis Hetu17809052015-05-13 11:28:22 -04004914
4915 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004916 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004917 }
4918 break;
4919
Alexis Hetu76a343a2015-06-04 17:21:22 -04004920 case 254:
Alexis Hetu17809052015-05-13 11:28:22 -04004921
4922 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004923 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetuad6b8752015-06-09 16:15:30 -04004924 }
4925 break;
4926
Alexis Hetu76a343a2015-06-04 17:21:22 -04004927 case 255:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004928
4929 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004930 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4931 }
4932 break;
4933
Alexis Hetu76a343a2015-06-04 17:21:22 -04004934 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004935
4936 {
4937 (yyval.interm.intermTypedNode) = 0;
4938 }
4939 break;
4940
Alexis Hetu76a343a2015-06-04 17:21:22 -04004941 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004942
4943 {
Alexis Hetu17809052015-05-13 11:28:22 -04004944 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4945 (yyval.interm.nodePair).node2 = 0;
4946 }
4947 break;
4948
Alexis Hetu76a343a2015-06-04 17:21:22 -04004949 case 258:
Alexis Hetu17809052015-05-13 11:28:22 -04004950
4951 {
4952 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4953 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4954 }
4955 break;
4956
Alexis Hetu76a343a2015-06-04 17:21:22 -04004957 case 259:
Alexis Hetu17809052015-05-13 11:28:22 -04004958
4959 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004960 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004961 }
4962 break;
4963
Alexis Hetu76a343a2015-06-04 17:21:22 -04004964 case 260:
Alexis Hetu17809052015-05-13 11:28:22 -04004965
4966 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004967 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004968 }
4969 break;
4970
Alexis Hetu76a343a2015-06-04 17:21:22 -04004971 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004972
4973 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004974 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004975 }
4976 break;
4977
Alexis Hetu76a343a2015-06-04 17:21:22 -04004978 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004979
4980 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004981 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004982 }
4983 break;
4984
Alexis Hetu76a343a2015-06-04 17:21:22 -04004985 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004986
4987 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004988 FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4989 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004990 }
4991 break;
4992
Alexis Hetu76a343a2015-06-04 17:21:22 -04004993 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004994
4995 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004996 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu17809052015-05-13 11:28:22 -04004997 context->treeRoot = (yyval.interm.intermNode);
4998 }
4999 break;
5000
Alexis Hetu76a343a2015-06-04 17:21:22 -04005001 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04005002
5003 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04005004 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
5005 context->treeRoot = (yyval.interm.intermNode);
Alexis Hetu17809052015-05-13 11:28:22 -04005006 }
5007 break;
5008
Alexis Hetu76a343a2015-06-04 17:21:22 -04005009 case 266:
Alexis Hetuad6b8752015-06-09 16:15:30 -04005010
5011 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04005012 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
5013 }
5014 break;
5015
Alexis Hetu76a343a2015-06-04 17:21:22 -04005016 case 267:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04005017
5018 {
5019 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
5020 }
5021 break;
5022
Alexis Hetu76a343a2015-06-04 17:21:22 -04005023 case 268:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04005024
5025 {
John Bauman66b8ab22014-05-06 15:57:45 -04005026 TFunction* function = (yyvsp[(1) - (1)].interm).function;
5027
Nicolas Capens0a7f0c22015-02-18 14:47:31 -05005028 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->shaderVersion);
John Bauman66b8ab22014-05-06 15:57:45 -04005029
5030 if (builtIn)
5031 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005032 context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04005033 context->recover();
5034 }
5035
Nicolas Capens0a7f0c22015-02-18 14:47:31 -05005036 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->shaderVersion));
John Bauman66b8ab22014-05-06 15:57:45 -04005037 //
5038 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
5039 // as it would have just been put in the symbol table. Otherwise, we're looking up
5040 // an earlier occurance.
5041 //
5042 if (prevDec->isDefined()) {
5043 //
5044 // Then this function already has a body.
5045 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005046 context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04005047 context->recover();
5048 }
5049 prevDec->setDefined();
5050
5051 //
5052 // Raise error message if main function takes any parameters or return anything other than void
5053 //
5054 if (function->getName() == "main") {
5055 if (function->getParamCount() > 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005056 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04005057 context->recover();
5058 }
5059 if (function->getReturnType().getBasicType() != EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005060 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04005061 context->recover();
5062 }
5063 }
5064
5065 //
5066 // Remember the return type for later checking for RETURN statements.
5067 //
5068 context->currentFunctionType = &(prevDec->getReturnType());
5069 context->functionReturnsValue = false;
5070
5071 //
5072 // Insert parameters into the symbol table.
5073 // If the parameter has no name, it's not an error, just don't insert it
5074 // (could be used for unused args).
5075 //
5076 // Also, accumulate the list of parameters into the HIL, so lower level code
5077 // knows where to find parameters.
5078 //
5079 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04005080 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04005081 const TParameter& param = function->getParam(i);
5082 if (param.name != 0) {
5083 TVariable *variable = new TVariable(param.name, *param.type);
5084 //
5085 // Insert the parameters with name in the symbol table.
5086 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05005087 if (! context->symbolTable.declare(*variable)) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005088 context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04005089 context->recover();
5090 delete variable;
5091 }
5092
5093 //
5094 // Add the parameter to the HIL
5095 //
5096 paramNodes = context->intermediate.growAggregate(
5097 paramNodes,
5098 context->intermediate.addSymbol(variable->getUniqueId(),
5099 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005100 variable->getType(), (yylsp[(1) - (1)])),
5101 (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04005102 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005103 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04005104 }
5105 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005106 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04005107 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
5108 context->loopNestingLevel = 0;
5109 }
5110 break;
5111
Alexis Hetu76a343a2015-06-04 17:21:22 -04005112 case 269:
John Bauman66b8ab22014-05-06 15:57:45 -04005113
5114 {
5115 //?? Check that all paths return a value if return type != void ?
5116 // May be best done as post process phase on intermediate code
5117 if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->functionReturnsValue) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005118 context->error((yylsp[(1) - (3)]), "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04005119 context->recover();
5120 }
5121
5122 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), 0);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005123 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04005124 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
5125 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
5126
5127 // store the pragma information for debug and optimize and other vendor specific
5128 // information. This information can be queried from the parse tree
5129 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
5130 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
5131
5132 if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
5133 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
5134
5135 context->symbolTable.pop();
5136 }
5137 break;
5138
5139
5140
5141 default: break;
5142 }
5143 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5144
5145 YYPOPSTACK (yylen);
5146 yylen = 0;
5147 YY_STACK_PRINT (yyss, yyssp);
5148
5149 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005150 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005151
5152 /* Now `shift' the result of the reduction. Determine what state
5153 that goes to, based on the state we popped back to and the rule
5154 number reduced by. */
5155
5156 yyn = yyr1[yyn];
5157
5158 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5159 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5160 yystate = yytable[yystate];
5161 else
5162 yystate = yydefgoto[yyn - YYNTOKENS];
5163
5164 goto yynewstate;
5165
5166
5167/*------------------------------------.
5168| yyerrlab -- here on detecting error |
5169`------------------------------------*/
5170yyerrlab:
5171 /* If not already recovering from an error, report this error. */
5172 if (!yyerrstatus)
5173 {
5174 ++yynerrs;
5175#if ! YYERROR_VERBOSE
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005176 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04005177#else
5178 {
5179 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5180 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5181 {
5182 YYSIZE_T yyalloc = 2 * yysize;
5183 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5184 yyalloc = YYSTACK_ALLOC_MAXIMUM;
5185 if (yymsg != yymsgbuf)
5186 YYSTACK_FREE (yymsg);
5187 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5188 if (yymsg)
5189 yymsg_alloc = yyalloc;
5190 else
5191 {
5192 yymsg = yymsgbuf;
5193 yymsg_alloc = sizeof yymsgbuf;
5194 }
5195 }
5196
5197 if (0 < yysize && yysize <= yymsg_alloc)
5198 {
5199 (void) yysyntax_error (yymsg, yystate, yychar);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005200 yyerror (&yylloc, context, yymsg);
John Bauman66b8ab22014-05-06 15:57:45 -04005201 }
5202 else
5203 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005204 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04005205 if (yysize != 0)
5206 goto yyexhaustedlab;
5207 }
5208 }
5209#endif
5210 }
5211
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005212 yyerror_range[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005213
5214 if (yyerrstatus == 3)
5215 {
5216 /* If just tried and failed to reuse lookahead token after an
5217 error, discard it. */
5218
5219 if (yychar <= YYEOF)
5220 {
5221 /* Return failure if at end of input. */
5222 if (yychar == YYEOF)
5223 YYABORT;
5224 }
5225 else
5226 {
5227 yydestruct ("Error: discarding",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005228 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005229 yychar = YYEMPTY;
5230 }
5231 }
5232
5233 /* Else will try to reuse lookahead token after shifting the error
5234 token. */
5235 goto yyerrlab1;
5236
5237
5238/*---------------------------------------------------.
5239| yyerrorlab -- error raised explicitly by YYERROR. |
5240`---------------------------------------------------*/
5241yyerrorlab:
5242
5243 /* Pacify compilers like GCC when the user code never invokes
5244 YYERROR and the label yyerrorlab therefore never appears in user
5245 code. */
5246 if (/*CONSTCOND*/ 0)
5247 goto yyerrorlab;
5248
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005249 yyerror_range[0] = yylsp[1-yylen];
John Bauman66b8ab22014-05-06 15:57:45 -04005250 /* Do not reclaim the symbols of the rule which action triggered
5251 this YYERROR. */
5252 YYPOPSTACK (yylen);
5253 yylen = 0;
5254 YY_STACK_PRINT (yyss, yyssp);
5255 yystate = *yyssp;
5256 goto yyerrlab1;
5257
5258
5259/*-------------------------------------------------------------.
5260| yyerrlab1 -- common code for both syntax error and YYERROR. |
5261`-------------------------------------------------------------*/
5262yyerrlab1:
5263 yyerrstatus = 3; /* Each real token shifted decrements this. */
5264
5265 for (;;)
5266 {
5267 yyn = yypact[yystate];
5268 if (yyn != YYPACT_NINF)
5269 {
5270 yyn += YYTERROR;
5271 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5272 {
5273 yyn = yytable[yyn];
5274 if (0 < yyn)
5275 break;
5276 }
5277 }
5278
5279 /* Pop the current state because it cannot handle the error token. */
5280 if (yyssp == yyss)
5281 YYABORT;
5282
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005283 yyerror_range[0] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005284 yydestruct ("Error: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005285 yystos[yystate], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005286 YYPOPSTACK (1);
5287 yystate = *yyssp;
5288 YY_STACK_PRINT (yyss, yyssp);
5289 }
5290
5291 *++yyvsp = yylval;
5292
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005293 yyerror_range[1] = yylloc;
5294 /* Using YYLLOC is tempting, but would change the location of
5295 the lookahead. YYLOC is available though. */
5296 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
5297 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005298
5299 /* Shift the error token. */
5300 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5301
5302 yystate = yyn;
5303 goto yynewstate;
5304
5305
5306/*-------------------------------------.
5307| yyacceptlab -- YYACCEPT comes here. |
5308`-------------------------------------*/
5309yyacceptlab:
5310 yyresult = 0;
5311 goto yyreturn;
5312
5313/*-----------------------------------.
5314| yyabortlab -- YYABORT comes here. |
5315`-----------------------------------*/
5316yyabortlab:
5317 yyresult = 1;
5318 goto yyreturn;
5319
5320#if !defined(yyoverflow) || YYERROR_VERBOSE
5321/*-------------------------------------------------.
5322| yyexhaustedlab -- memory exhaustion comes here. |
5323`-------------------------------------------------*/
5324yyexhaustedlab:
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005325 yyerror (&yylloc, context, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005326 yyresult = 2;
5327 /* Fall through. */
5328#endif
5329
5330yyreturn:
5331 if (yychar != YYEMPTY)
5332 yydestruct ("Cleanup: discarding lookahead",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005333 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005334 /* Do not reclaim the symbols of the rule which action triggered
5335 this YYABORT or YYACCEPT. */
5336 YYPOPSTACK (yylen);
5337 YY_STACK_PRINT (yyss, yyssp);
5338 while (yyssp != yyss)
5339 {
5340 yydestruct ("Cleanup: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005341 yystos[*yyssp], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005342 YYPOPSTACK (1);
5343 }
5344#ifndef yyoverflow
5345 if (yyss != yyssa)
5346 YYSTACK_FREE (yyss);
5347#endif
5348#if YYERROR_VERBOSE
5349 if (yymsg != yymsgbuf)
5350 YYSTACK_FREE (yymsg);
5351#endif
5352 /* Make sure YYID is used. */
5353 return YYID (yyresult);
5354}
5355
5356
5357
5358
5359
5360int glslang_parse(TParseContext* context) {
5361 return yyparse(context);
5362}
5363