blob: 23c11a24a53674717e06e89914c6b3f4ead96ac9 [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
Alexis Hetu0a655842015-06-22 16:52:11 -040096#define YYLEX_PARAM context->getScanner()
John Bauman66b8ab22014-05-06 15:57:45 -040097
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 {
John Bauman66b8ab22014-05-06 15:57:45 -0400269 union {
270 TString *string;
271 float f;
272 int i;
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500273 unsigned int u;
John Bauman66b8ab22014-05-06 15:57:45 -0400274 bool b;
275 };
276 TSymbol* symbol;
277 } lex;
278 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400279 TOperator op;
280 union {
281 TIntermNode* intermNode;
282 TIntermNodePair nodePair;
283 TIntermTyped* intermTypedNode;
284 TIntermAggregate* intermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -0400285 TIntermSwitch* intermSwitch;
286 TIntermCase* intermCase;
John Bauman66b8ab22014-05-06 15:57:45 -0400287 };
288 union {
289 TPublicType type;
290 TPrecision precision;
Nicolas Capens7d626792015-02-17 17:58:31 -0500291 TLayoutQualifier layoutQualifier;
John Bauman66b8ab22014-05-06 15:57:45 -0400292 TQualifier qualifier;
293 TFunction* function;
294 TParameter param;
Alexis Hetua8b364b2015-06-10 11:48:40 -0400295 TField* field;
296 TFieldList* fieldList;
John Bauman66b8ab22014-05-06 15:57:45 -0400297 };
298 } interm;
299
300
301
302} YYSTYPE;
303# define YYSTYPE_IS_TRIVIAL 1
304# define yystype YYSTYPE /* obsolescent; will be withdrawn */
305# define YYSTYPE_IS_DECLARED 1
306#endif
307
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400308#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
309typedef struct YYLTYPE
310{
311 int first_line;
312 int first_column;
313 int last_line;
314 int last_column;
315} YYLTYPE;
316# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
317# define YYLTYPE_IS_DECLARED 1
318# define YYLTYPE_IS_TRIVIAL 1
319#endif
320
John Bauman66b8ab22014-05-06 15:57:45 -0400321
322/* Copy the second part of user declarations. */
323
324
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400325extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
326extern void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason);
327
Alexis Hetu253fdd12015-07-07 15:12:46 -0400328#define YYLLOC_DEFAULT(Current, Rhs, N) \
329 do { \
330 if (N) { \
331 (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \
332 (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
333 (Current).last_file = YYRHSLOC(Rhs, N).last_file; \
334 (Current).last_line = YYRHSLOC(Rhs, N).last_line; \
335 } \
336 else { \
337 (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \
338 (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \
339 (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \
340 (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
341 } \
342 } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400343
344#define FRAG_VERT_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400345 if (context->getShaderType() != GL_FRAGMENT_SHADER && \
346 context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400347 context->error(L, " supported in vertex/fragment shaders only ", S); \
348 context->recover(); \
349 } \
350}
351
352#define VERTEX_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400353 if (context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400354 context->error(L, " supported in vertex shaders only ", S); \
355 context->recover(); \
356 } \
357}
358
359#define FRAG_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400360 if (context->getShaderType() != GL_FRAGMENT_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400361 context->error(L, " supported in fragment shaders only ", S); \
362 context->recover(); \
363 } \
364}
365
Nicolas Capensc6841852015-02-15 14:25:37 -0500366#define ES2_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400367 if (context->getShaderVersion() != 100) { \
Nicolas Capensc6841852015-02-15 14:25:37 -0500368 context->error(L, " supported in GLSL ES 1.00 only ", S); \
369 context->recover(); \
370 } \
371}
372
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400373#define ES3_ONLY(TOKEN, LINE, REASON) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400374 if (context->getShaderVersion() != 300) { \
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400375 context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
Nicolas Capensc6841852015-02-15 14:25:37 -0500376 context->recover(); \
377 } \
378}
379
John Bauman66b8ab22014-05-06 15:57:45 -0400380
381
382#ifdef short
383# undef short
384#endif
385
386#ifdef YYTYPE_UINT8
387typedef YYTYPE_UINT8 yytype_uint8;
388#else
389typedef unsigned char yytype_uint8;
390#endif
391
392#ifdef YYTYPE_INT8
393typedef YYTYPE_INT8 yytype_int8;
394#elif (defined __STDC__ || defined __C99__FUNC__ \
395 || defined __cplusplus || defined _MSC_VER)
396typedef signed char yytype_int8;
397#else
398typedef short int yytype_int8;
399#endif
400
401#ifdef YYTYPE_UINT16
402typedef YYTYPE_UINT16 yytype_uint16;
403#else
404typedef unsigned short int yytype_uint16;
405#endif
406
407#ifdef YYTYPE_INT16
408typedef YYTYPE_INT16 yytype_int16;
409#else
410typedef short int yytype_int16;
411#endif
412
413#ifndef YYSIZE_T
414# ifdef __SIZE_TYPE__
415# define YYSIZE_T __SIZE_TYPE__
416# elif defined size_t
417# define YYSIZE_T size_t
418# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
419 || defined __cplusplus || defined _MSC_VER)
420# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
421# define YYSIZE_T size_t
422# else
423# define YYSIZE_T unsigned int
424# endif
425#endif
426
427#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
428
429#ifndef YY_
Nicolas Capense9c5e4f2014-05-28 22:46:43 -0400430# if YYENABLE_NLS
John Bauman66b8ab22014-05-06 15:57:45 -0400431# if ENABLE_NLS
432# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
433# define YY_(msgid) dgettext ("bison-runtime", msgid)
434# endif
435# endif
436# ifndef YY_
437# define YY_(msgid) msgid
438# endif
439#endif
440
441/* Suppress unused-variable warnings by "using" E. */
442#if ! defined lint || defined __GNUC__
443# define YYUSE(e) ((void) (e))
444#else
445# define YYUSE(e) /* empty */
446#endif
447
448/* Identity function, used to suppress warnings about constant conditions. */
449#ifndef lint
450# define YYID(n) (n)
451#else
452#if (defined __STDC__ || defined __C99__FUNC__ \
453 || defined __cplusplus || defined _MSC_VER)
454static int
455YYID (int yyi)
456#else
457static int
458YYID (yyi)
459 int yyi;
460#endif
461{
462 return yyi;
463}
464#endif
465
466#if ! defined yyoverflow || YYERROR_VERBOSE
467
468/* The parser invokes alloca or malloc; define the necessary symbols. */
469
470# ifdef YYSTACK_USE_ALLOCA
471# if YYSTACK_USE_ALLOCA
472# ifdef __GNUC__
473# define YYSTACK_ALLOC __builtin_alloca
474# elif defined __BUILTIN_VA_ARG_INCR
475# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
476# elif defined _AIX
477# define YYSTACK_ALLOC __alloca
478# elif defined _MSC_VER
479# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
480# define alloca _alloca
481# else
482# define YYSTACK_ALLOC alloca
483# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
484 || defined __cplusplus || defined _MSC_VER)
485# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
486# ifndef _STDLIB_H
487# define _STDLIB_H 1
488# endif
489# endif
490# endif
491# endif
492# endif
493
494# ifdef YYSTACK_ALLOC
495 /* Pacify GCC's `empty if-body' warning. */
496# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
497# ifndef YYSTACK_ALLOC_MAXIMUM
498 /* The OS might guarantee only one guard page at the bottom of the stack,
499 and a page size can be as small as 4096 bytes. So we cannot safely
500 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
501 to allow for a few compiler-allocated temporary stack slots. */
502# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
503# endif
504# else
505# define YYSTACK_ALLOC YYMALLOC
506# define YYSTACK_FREE YYFREE
507# ifndef YYSTACK_ALLOC_MAXIMUM
508# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
509# endif
510# if (defined __cplusplus && ! defined _STDLIB_H \
511 && ! ((defined YYMALLOC || defined malloc) \
512 && (defined YYFREE || defined free)))
513# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
514# ifndef _STDLIB_H
515# define _STDLIB_H 1
516# endif
517# endif
518# ifndef YYMALLOC
519# define YYMALLOC malloc
520# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
521 || defined __cplusplus || defined _MSC_VER)
522void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
523# endif
524# endif
525# ifndef YYFREE
526# define YYFREE free
527# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
528 || defined __cplusplus || defined _MSC_VER)
529void free (void *); /* INFRINGES ON USER NAME SPACE */
530# endif
531# endif
532# endif
533#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
534
535
536#if (! defined yyoverflow \
537 && (! defined __cplusplus \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400538 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
539 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
John Bauman66b8ab22014-05-06 15:57:45 -0400540
541/* A type that is properly aligned for any stack member. */
542union yyalloc
543{
544 yytype_int16 yyss_alloc;
545 YYSTYPE yyvs_alloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400546 YYLTYPE yyls_alloc;
John Bauman66b8ab22014-05-06 15:57:45 -0400547};
548
549/* The size of the maximum gap between one aligned stack and the next. */
550# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
551
552/* The size of an array large to enough to hold all stacks, each with
553 N elements. */
554# define YYSTACK_BYTES(N) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400555 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
556 + 2 * YYSTACK_GAP_MAXIMUM)
John Bauman66b8ab22014-05-06 15:57:45 -0400557
558/* Copy COUNT objects from FROM to TO. The source and destination do
559 not overlap. */
560# ifndef YYCOPY
561# if defined __GNUC__ && 1 < __GNUC__
562# define YYCOPY(To, From, Count) \
563 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
564# else
565# define YYCOPY(To, From, Count) \
566 do \
567 { \
568 YYSIZE_T yyi; \
569 for (yyi = 0; yyi < (Count); yyi++) \
570 (To)[yyi] = (From)[yyi]; \
571 } \
572 while (YYID (0))
573# endif
574# endif
575
576/* Relocate STACK from its old location to the new one. The
577 local variables YYSIZE and YYSTACKSIZE give the old and new number of
578 elements in the stack, and YYPTR gives the new location of the
579 stack. Advance YYPTR to a properly aligned location for the next
580 stack. */
581# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
582 do \
583 { \
584 YYSIZE_T yynewbytes; \
585 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
586 Stack = &yyptr->Stack_alloc; \
587 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
588 yyptr += yynewbytes / sizeof (*yyptr); \
589 } \
590 while (YYID (0))
591
592#endif
593
594/* YYFINAL -- State number of the termination state. */
Alexis Hetuad527752015-07-07 13:31:44 -0400595#define YYFINAL 112
John Bauman66b8ab22014-05-06 15:57:45 -0400596/* YYLAST -- Last index in YYTABLE. */
Alexis Hetuad527752015-07-07 13:31:44 -0400597#define YYLAST 2525
John Bauman66b8ab22014-05-06 15:57:45 -0400598
599/* YYNTOKENS -- Number of terminals. */
Alexis Hetub14178b2015-04-13 13:23:20 -0400600#define YYNTOKENS 128
John Bauman66b8ab22014-05-06 15:57:45 -0400601/* YYNNTS -- Number of nonterminals. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400602#define YYNNTS 93
John Bauman66b8ab22014-05-06 15:57:45 -0400603/* YYNRULES -- Number of rules. */
Alexis Hetuad527752015-07-07 13:31:44 -0400604#define YYNRULES 272
John Bauman66b8ab22014-05-06 15:57:45 -0400605/* YYNRULES -- Number of states. */
Alexis Hetuad527752015-07-07 13:31:44 -0400606#define YYNSTATES 413
John Bauman66b8ab22014-05-06 15:57:45 -0400607
608/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
609#define YYUNDEFTOK 2
Alexis Hetub14178b2015-04-13 13:23:20 -0400610#define YYMAXUTOK 382
John Bauman66b8ab22014-05-06 15:57:45 -0400611
612#define YYTRANSLATE(YYX) \
613 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
614
615/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
616static const yytype_uint8 yytranslate[] =
617{
618 0, 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, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
644 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
645 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
646 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
647 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
648 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
649 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
650 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
651 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
Alexis Hetub027aa92015-01-19 15:56:12 -0500652 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500653 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Alexis Hetub14178b2015-04-13 13:23:20 -0400654 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
655 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
656 125, 126, 127
John Bauman66b8ab22014-05-06 15:57:45 -0400657};
658
659#if YYDEBUG
660/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
661 YYRHS. */
662static const yytype_uint16 yyprhs[] =
663{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500664 0, 0, 3, 5, 7, 9, 11, 13, 15, 19,
665 21, 26, 28, 32, 35, 38, 40, 42, 44, 48,
666 51, 54, 57, 59, 62, 66, 69, 71, 73, 75,
Alexis Hetu17809052015-05-13 11:28:22 -0400667 77, 80, 83, 86, 88, 90, 92, 94, 96, 100,
668 104, 108, 110, 114, 118, 120, 124, 128, 130, 134,
669 138, 142, 146, 148, 152, 156, 158, 162, 164, 168,
670 170, 174, 176, 180, 182, 186, 188, 192, 194, 200,
671 202, 206, 208, 210, 212, 214, 216, 218, 220, 222,
Alexis Hetua35d8232015-06-11 17:11:06 -0400672 224, 226, 228, 230, 234, 236, 239, 242, 245, 250,
673 256, 263, 273, 276, 279, 281, 283, 286, 290, 294,
674 297, 303, 307, 310, 314, 317, 318, 320, 322, 324,
675 326, 328, 332, 339, 347, 356, 362, 364, 367, 373,
676 380, 388, 393, 396, 398, 401, 403, 405, 407, 409,
Alexis Hetuad527752015-07-07 13:31:44 -0400677 411, 414, 416, 419, 421, 423, 426, 429, 433, 435,
678 437, 439, 442, 445, 447, 449, 452, 454, 456, 458,
679 463, 465, 469, 471, 475, 479, 481, 485, 490, 492,
680 494, 496, 498, 500, 502, 504, 506, 508, 510, 512,
681 514, 516, 518, 520, 522, 524, 526, 528, 530, 532,
682 534, 536, 538, 540, 542, 544, 546, 548, 550, 552,
683 554, 556, 558, 560, 562, 564, 566, 568, 570, 572,
684 574, 576, 578, 579, 586, 587, 593, 595, 598, 602,
685 607, 609, 613, 615, 620, 622, 624, 626, 628, 630,
686 632, 634, 636, 638, 640, 642, 645, 646, 647, 653,
687 655, 657, 658, 661, 662, 665, 668, 672, 674, 677,
688 679, 682, 688, 692, 694, 695, 702, 706, 709, 711,
689 716, 717, 724, 725, 734, 735, 743, 745, 747, 749,
690 750, 753, 757, 760, 763, 766, 770, 773, 775, 778,
691 780, 782, 783
John Bauman66b8ab22014-05-06 15:57:45 -0400692};
693
694/* YYRHS -- A `-1'-separated list of the rules' RHS. */
695static const yytype_int16 yyrhs[] =
696{
Alexis Hetu76a343a2015-06-04 17:21:22 -0400697 217, 0, -1, 76, -1, 129, -1, 79, -1, 80,
Alexis Hetub14178b2015-04-13 13:23:20 -0400698 -1, 78, -1, 81, -1, 104, 156, 105, -1, 130,
699 -1, 131, 106, 132, 107, -1, 133, -1, 131, 110,
700 82, -1, 131, 85, -1, 131, 86, -1, 156, -1,
701 134, -1, 135, -1, 131, 110, 135, -1, 137, 105,
702 -1, 136, 105, -1, 138, 55, -1, 138, -1, 138,
Alexis Hetue5246692015-06-18 12:34:52 -0400703 154, -1, 137, 111, 154, -1, 139, 104, -1, 180,
Alexis Hetub14178b2015-04-13 13:23:20 -0400704 -1, 76, -1, 82, -1, 131, -1, 85, 140, -1,
705 86, 140, -1, 141, 140, -1, 118, -1, 116, -1,
Alexis Hetu17809052015-05-13 11:28:22 -0400706 115, -1, 117, -1, 140, -1, 142, 119, 140, -1,
707 142, 120, 140, -1, 142, 121, 140, -1, 142, -1,
708 143, 118, 142, -1, 143, 116, 142, -1, 143, -1,
709 144, 83, 143, -1, 144, 84, 143, -1, 144, -1,
710 145, 122, 144, -1, 145, 123, 144, -1, 145, 87,
711 144, -1, 145, 88, 144, -1, 145, -1, 146, 89,
712 145, -1, 146, 90, 145, -1, 146, -1, 147, 126,
713 146, -1, 147, -1, 148, 125, 147, -1, 148, -1,
714 149, 124, 148, -1, 149, -1, 150, 91, 149, -1,
715 150, -1, 151, 93, 150, -1, 151, -1, 152, 92,
716 151, -1, 152, -1, 152, 127, 156, 112, 154, -1,
717 153, -1, 140, 155, 154, -1, 113, -1, 94, -1,
718 95, -1, 97, -1, 96, -1, 103, -1, 98, -1,
719 99, -1, 100, -1, 101, -1, 102, -1, 154, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400720 156, 111, 154, -1, 153, -1, 76, 108, -1, 160,
721 114, -1, 168, 114, -1, 7, 176, 180, 114, -1,
722 173, 158, 185, 109, 114, -1, 173, 158, 185, 109,
723 76, 114, -1, 173, 158, 185, 109, 76, 106, 157,
724 107, 114, -1, 173, 114, -1, 161, 105, -1, 163,
725 -1, 162, -1, 163, 165, -1, 162, 111, 165, -1,
726 170, 76, 104, -1, 175, 76, -1, 175, 76, 106,
727 157, 107, -1, 172, 166, 164, -1, 166, 164, -1,
728 172, 166, 167, -1, 166, 167, -1, -1, 40, -1,
729 41, -1, 42, -1, 175, -1, 169, -1, 168, 111,
730 76, -1, 168, 111, 76, 106, 157, 107, -1, 168,
731 111, 76, 106, 107, 113, 189, -1, 168, 111, 76,
732 106, 157, 107, 113, 189, -1, 168, 111, 76, 113,
733 189, -1, 170, -1, 170, 76, -1, 170, 76, 106,
734 157, 107, -1, 170, 76, 106, 107, 113, 189, -1,
735 170, 76, 106, 157, 107, 113, 189, -1, 170, 76,
736 113, 189, -1, 3, 76, -1, 175, -1, 173, 175,
737 -1, 53, -1, 52, -1, 9, -1, 8, -1, 44,
738 -1, 3, 44, -1, 174, -1, 171, 174, -1, 171,
Alexis Hetuad527752015-07-07 13:31:44 -0400739 -1, 177, -1, 177, 174, -1, 3, 174, -1, 3,
740 171, 174, -1, 9, -1, 40, -1, 41, -1, 51,
741 40, -1, 51, 41, -1, 43, -1, 180, -1, 176,
742 180, -1, 4, -1, 5, -1, 6, -1, 75, 104,
743 178, 105, -1, 179, -1, 178, 111, 179, -1, 76,
744 -1, 76, 113, 79, -1, 76, 113, 80, -1, 181,
745 -1, 181, 106, 107, -1, 181, 106, 157, 107, -1,
746 55, -1, 11, -1, 12, -1, 13, -1, 10, -1,
747 31, -1, 32, -1, 33, -1, 25, -1, 26, -1,
748 27, -1, 28, -1, 29, -1, 30, -1, 34, -1,
749 35, -1, 36, -1, 37, -1, 38, -1, 39, -1,
750 45, -1, 46, -1, 47, -1, 48, -1, 49, -1,
751 50, -1, 57, -1, 58, -1, 59, -1, 70, -1,
752 61, -1, 62, -1, 63, -1, 64, -1, 65, -1,
753 66, -1, 67, -1, 68, -1, 69, -1, 72, -1,
754 73, -1, 74, -1, 182, -1, 77, -1, -1, 54,
755 76, 108, 183, 185, 109, -1, -1, 54, 108, 184,
756 185, 109, -1, 186, -1, 185, 186, -1, 175, 187,
757 114, -1, 173, 175, 187, 114, -1, 188, -1, 187,
758 111, 188, -1, 76, -1, 76, 106, 157, 107, -1,
759 154, -1, 159, -1, 193, -1, 192, -1, 190, -1,
760 202, -1, 203, -1, 205, -1, 207, -1, 209, -1,
761 216, -1, 108, 109, -1, -1, -1, 108, 194, 201,
762 195, 109, -1, 200, -1, 192, -1, -1, 198, 200,
763 -1, -1, 199, 192, -1, 108, 109, -1, 108, 201,
764 109, -1, 191, -1, 201, 191, -1, 114, -1, 156,
765 114, -1, 19, 104, 156, 105, 204, -1, 197, 17,
766 197, -1, 197, -1, -1, 22, 104, 156, 105, 206,
767 193, -1, 23, 157, 112, -1, 24, 112, -1, 156,
768 -1, 170, 76, 113, 189, -1, -1, 56, 104, 210,
769 208, 105, 196, -1, -1, 16, 211, 197, 56, 104,
770 156, 105, 114, -1, -1, 18, 104, 212, 213, 215,
771 105, 196, -1, 202, -1, 190, -1, 208, -1, -1,
772 214, 114, -1, 214, 114, 156, -1, 15, 114, -1,
773 14, 114, -1, 21, 114, -1, 21, 156, 114, -1,
774 20, 114, -1, 218, -1, 217, 218, -1, 219, -1,
775 159, -1, -1, 160, 220, 200, -1
John Bauman66b8ab22014-05-06 15:57:45 -0400776};
777
778/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
779static const yytype_uint16 yyrline[] =
780{
Alexis Hetu253fdd12015-07-07 15:12:46 -0400781 0, 214, 214, 233, 236, 241, 246, 251, 256, 262,
Alexis Hetu950cb442015-07-06 11:38:53 -0400782 265, 268, 271, 274, 277, 283, 291, 302, 306, 314,
783 317, 323, 327, 334, 340, 349, 357, 363, 370, 380,
Alexis Hetu7df892d2015-07-07 16:54:07 -0400784 383, 386, 389, 399, 400, 401, 402, 410, 411, 415,
785 419, 427, 428, 431, 437, 438, 442, 449, 450, 453,
786 456, 459, 465, 466, 469, 475, 476, 483, 484, 491,
787 492, 499, 500, 506, 507, 513, 514, 520, 521, 527,
788 528, 536, 537, 538, 539, 541, 542, 543, 546, 549,
789 552, 555, 561, 564, 575, 583, 591, 618, 624, 631,
790 635, 639, 643, 650, 687, 690, 697, 705, 726, 747,
791 757, 785, 790, 800, 805, 815, 818, 821, 824, 830,
792 837, 840, 844, 848, 853, 858, 865, 869, 873, 877,
793 882, 887, 891, 898, 908, 914, 917, 923, 929, 936,
794 945, 954, 957, 960, 967, 971, 975, 980, 988, 991,
795 995, 999, 1008, 1017, 1025, 1035, 1042, 1045, 1048, 1054,
796 1061, 1064, 1070, 1073, 1076, 1082, 1085, 1090, 1105, 1109,
797 1113, 1117, 1121, 1125, 1130, 1135, 1140, 1145, 1150, 1155,
798 1160, 1165, 1170, 1175, 1180, 1185, 1191, 1197, 1203, 1209,
799 1215, 1221, 1227, 1233, 1239, 1244, 1249, 1258, 1263, 1268,
800 1273, 1278, 1283, 1288, 1293, 1298, 1303, 1308, 1313, 1318,
801 1323, 1328, 1341, 1341, 1344, 1344, 1350, 1353, 1369, 1372,
802 1381, 1385, 1391, 1398, 1413, 1417, 1421, 1422, 1428, 1429,
803 1430, 1431, 1432, 1433, 1434, 1438, 1439, 1439, 1439, 1449,
804 1450, 1454, 1454, 1455, 1455, 1460, 1463, 1473, 1476, 1482,
805 1483, 1487, 1495, 1499, 1506, 1506, 1513, 1516, 1525, 1530,
806 1547, 1547, 1552, 1552, 1559, 1559, 1567, 1570, 1576, 1579,
807 1585, 1589, 1596, 1599, 1602, 1605, 1608, 1617, 1621, 1628,
808 1631, 1637, 1637
John Bauman66b8ab22014-05-06 15:57:45 -0400809};
810#endif
811
812#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
813/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
814 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
815static const char *const yytname[] =
816{
817 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
818 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500819 "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
820 "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
821 "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500822 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
823 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400824 "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
825 "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
826 "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
827 "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
828 "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
829 "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
830 "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
831 "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
832 "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
833 "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
834 "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
835 "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
836 "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500837 "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
838 "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
839 "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
840 "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
841 "primary_expression", "postfix_expression", "integer_expression",
842 "function_call", "function_call_or_method", "function_call_generic",
John Bauman66b8ab22014-05-06 15:57:45 -0400843 "function_call_header_no_parameters",
844 "function_call_header_with_parameters", "function_call_header",
845 "function_identifier", "unary_expression", "unary_operator",
846 "multiplicative_expression", "additive_expression", "shift_expression",
847 "relational_expression", "equality_expression", "and_expression",
848 "exclusive_or_expression", "inclusive_or_expression",
849 "logical_and_expression", "logical_xor_expression",
850 "logical_or_expression", "conditional_expression",
851 "assignment_expression", "assignment_operator", "expression",
Alexis Hetua35d8232015-06-11 17:11:06 -0400852 "constant_expression", "enter_struct", "declaration",
853 "function_prototype", "function_declarator",
854 "function_header_with_parameters", "function_header",
855 "parameter_declarator", "parameter_declaration", "parameter_qualifier",
856 "parameter_type_specifier", "init_declarator_list", "single_declaration",
857 "fully_specified_type", "interpolation_qualifier",
858 "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
859 "type_specifier", "precision_qualifier", "layout_qualifier",
860 "layout_qualifier_id_list", "layout_qualifier_id",
Nicolas Capens7d626792015-02-17 17:58:31 -0500861 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
862 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400863 "struct_declarator_list", "struct_declarator", "initializer",
864 "declaration_statement", "statement", "simple_statement",
865 "compound_statement", "$@3", "$@4", "statement_no_new_scope",
866 "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
867 "statement_list", "expression_statement", "selection_statement",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400868 "selection_rest_statement", "switch_statement", "$@7", "case_label",
869 "condition", "iteration_statement", "$@8", "$@9", "$@10",
870 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400871 "jump_statement", "translation_unit", "external_declaration",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400872 "function_definition", "$@11", 0
John Bauman66b8ab22014-05-06 15:57:45 -0400873};
874#endif
875
876# ifdef YYPRINT
877/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
878 token YYLEX-NUM. */
879static const yytype_uint16 yytoknum[] =
880{
881 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
882 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
883 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
884 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
885 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
886 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
887 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
888 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
889 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
Nicolas Capensc6841852015-02-15 14:25:37 -0500890 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500891 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400892 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
893 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400894};
895# endif
896
897/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
898static const yytype_uint8 yyr1[] =
899{
Alexis Hetub14178b2015-04-13 13:23:20 -0400900 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
901 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
902 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
Alexis Hetu17809052015-05-13 11:28:22 -0400903 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
904 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
905 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
906 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
907 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
Alexis Hetua35d8232015-06-11 17:11:06 -0400908 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
909 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
910 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
911 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
912 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
Alexis Hetuad527752015-07-07 13:31:44 -0400913 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
914 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
915 178, 178, 179, 179, 179, 180, 180, 180, 181, 181,
Alexis Hetua35d8232015-06-11 17:11:06 -0400916 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
917 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
918 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetue5246692015-06-18 12:34:52 -0400919 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetuad527752015-07-07 13:31:44 -0400920 181, 181, 183, 182, 184, 182, 185, 185, 186, 186,
921 187, 187, 188, 188, 189, 190, 191, 191, 192, 192,
922 192, 192, 192, 192, 192, 193, 194, 195, 193, 196,
923 196, 198, 197, 199, 197, 200, 200, 201, 201, 202,
924 202, 203, 204, 204, 206, 205, 207, 207, 208, 208,
925 210, 209, 211, 209, 212, 209, 213, 213, 214, 214,
926 215, 215, 216, 216, 216, 216, 216, 217, 217, 218,
927 218, 220, 219
John Bauman66b8ab22014-05-06 15:57:45 -0400928};
929
930/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
931static const yytype_uint8 yyr2[] =
932{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500933 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
934 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
935 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
Alexis Hetu17809052015-05-13 11:28:22 -0400936 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
937 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
938 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
939 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
940 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400941 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
942 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
943 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
944 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
945 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
Alexis Hetuad527752015-07-07 13:31:44 -0400946 2, 1, 2, 1, 1, 2, 2, 3, 1, 1,
947 1, 2, 2, 1, 1, 2, 1, 1, 1, 4,
948 1, 3, 1, 3, 3, 1, 3, 4, 1, 1,
John Bauman66b8ab22014-05-06 15:57:45 -0400949 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetub14178b2015-04-13 13:23:20 -0400950 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
951 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetue5246692015-06-18 12:34:52 -0400952 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetuad527752015-07-07 13:31:44 -0400953 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
954 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
955 1, 1, 1, 1, 1, 2, 0, 0, 5, 1,
956 1, 0, 2, 0, 2, 2, 3, 1, 2, 1,
957 2, 5, 3, 1, 0, 6, 3, 2, 1, 4,
958 0, 6, 0, 8, 0, 7, 1, 1, 1, 0,
959 2, 3, 2, 2, 2, 3, 2, 1, 2, 1,
960 1, 0, 3
John Bauman66b8ab22014-05-06 15:57:45 -0400961};
962
963/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
964 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
965 means the default is an error. */
Alexis Hetuad6b8752015-06-09 16:15:30 -0400966static const yytype_uint16 yydefact[] =
John Bauman66b8ab22014-05-06 15:57:45 -0400967{
Alexis Hetuad527752015-07-07 13:31:44 -0400968 0, 0, 146, 147, 148, 0, 128, 138, 162, 159,
969 160, 161, 166, 167, 168, 169, 170, 171, 163, 164,
970 165, 172, 173, 174, 175, 176, 177, 139, 140, 143,
971 129, 178, 179, 180, 181, 182, 183, 0, 126, 125,
972 0, 158, 184, 185, 186, 188, 189, 190, 191, 192,
973 193, 194, 195, 196, 187, 197, 198, 199, 0, 201,
974 270, 271, 0, 95, 105, 0, 110, 116, 133, 0,
975 131, 123, 0, 134, 144, 155, 200, 0, 267, 269,
976 130, 122, 0, 136, 0, 141, 142, 0, 204, 0,
977 86, 0, 93, 105, 127, 106, 107, 108, 96, 0,
978 105, 0, 87, 117, 132, 0, 92, 0, 124, 145,
979 135, 0, 1, 268, 137, 0, 202, 0, 152, 0,
980 150, 0, 272, 97, 102, 104, 109, 0, 111, 98,
981 0, 0, 85, 0, 0, 0, 0, 206, 2, 6,
982 4, 5, 7, 28, 0, 0, 0, 156, 35, 34,
983 36, 33, 3, 9, 29, 11, 16, 17, 0, 0,
984 22, 0, 37, 0, 41, 44, 47, 52, 55, 57,
985 59, 61, 63, 65, 67, 84, 0, 26, 88, 0,
986 0, 0, 149, 0, 0, 0, 252, 0, 0, 0,
987 0, 0, 0, 0, 0, 226, 235, 239, 37, 69,
988 82, 0, 215, 0, 144, 218, 237, 217, 216, 0,
989 219, 220, 221, 222, 223, 224, 99, 101, 103, 0,
990 0, 0, 0, 214, 121, 0, 212, 0, 210, 0,
991 207, 30, 31, 0, 13, 14, 0, 0, 20, 19,
992 0, 158, 23, 25, 32, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -0400994 0, 0, 0, 0, 0, 157, 0, 205, 153, 154,
995 151, 263, 262, 233, 254, 0, 266, 264, 0, 0,
996 0, 247, 250, 225, 0, 72, 73, 75, 74, 77,
997 78, 79, 80, 81, 76, 71, 0, 0, 240, 236,
998 238, 0, 0, 0, 115, 0, 118, 0, 0, 0,
999 208, 0, 89, 8, 0, 15, 27, 12, 18, 24,
1000 38, 39, 40, 43, 42, 45, 46, 50, 51, 48,
1001 49, 53, 54, 56, 58, 60, 62, 64, 66, 0,
1002 203, 0, 0, 0, 0, 0, 265, 0, 246, 0,
1003 227, 70, 83, 0, 0, 112, 119, 0, 209, 0,
1004 211, 0, 90, 10, 0, 0, 232, 234, 257, 256,
1005 259, 233, 244, 248, 0, 0, 0, 0, 100, 113,
1006 0, 120, 213, 0, 68, 0, 258, 0, 0, 243,
1007 241, 0, 0, 0, 228, 114, 0, 0, 260, 0,
1008 233, 245, 0, 230, 251, 229, 91, 0, 261, 255,
1009 242, 249, 253
John Bauman66b8ab22014-05-06 15:57:45 -04001010};
1011
1012/* YYDEFGOTO[NTERM-NUM]. */
1013static const yytype_int16 yydefgoto[] =
1014{
Alexis Hetuad527752015-07-07 13:31:44 -04001015 -1, 152, 153, 154, 314, 155, 156, 157, 158, 159,
1016 160, 161, 198, 163, 164, 165, 166, 167, 168, 169,
1017 170, 171, 172, 173, 174, 199, 200, 296, 201, 176,
1018 107, 202, 203, 62, 63, 64, 124, 98, 99, 125,
1019 65, 66, 67, 68, 100, 69, 70, 71, 72, 73,
1020 119, 120, 177, 75, 76, 179, 117, 136, 137, 227,
1021 228, 224, 205, 206, 207, 208, 284, 377, 404, 341,
1022 342, 343, 405, 209, 210, 211, 390, 212, 391, 213,
1023 376, 214, 349, 273, 344, 370, 387, 388, 215, 77,
1024 78, 79, 91
John Bauman66b8ab22014-05-06 15:57:45 -04001025};
1026
1027/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1028 STATE-NUM. */
Alexis Hetuad527752015-07-07 13:31:44 -04001029#define YYPACT_NINF -334
John Bauman66b8ab22014-05-06 15:57:45 -04001030static const yytype_int16 yypact[] =
1031{
Alexis Hetuad527752015-07-07 13:31:44 -04001032 2163, 10, -334, -334, -334, 169, -334, -334, -334, -334,
1033 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1034 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1035 -334, -334, -334, -334, -334, -334, -334, 69, -334, -334,
1036 -48, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1037 -334, -334, -334, -334, -334, -334, -334, -334, -82, -334,
1038 -334, -78, -73, -71, 1, -59, -334, -32, 113, 1182,
1039 -334, -334, 2448, 113, -334, -23, -334, 2088, -334, -334,
1040 -334, -334, 113, -334, 2448, -334, -334, 11, -334, 9,
1041 -334, 20, -334, 121, -334, -334, -334, -334, -334, 2312,
1042 150, 22, -334, -79, -334, 37, -334, 2238, -334, -334,
1043 -334, 1252, -334, -334, -334, 62, -334, 2238, 44, -41,
1044 -334, 410, -334, -334, -334, -334, 105, 2312, -76, -334,
1045 1350, 1641, -334, 107, 2312, 117, 1833, -334, 91, -334,
1046 -334, -334, -334, -334, 1641, 1641, 1641, -334, -334, -334,
1047 -334, -334, -334, -334, 19, -334, -334, -334, 103, -24,
1048 1736, 120, -334, 1641, 80, -42, -36, 15, 43, 99,
1049 108, 104, 141, 142, -69, -334, 127, -334, -334, 2238,
1050 1918, 87, -334, 9, 122, 124, -334, 135, 136, 129,
1051 1448, 140, 1641, 133, 143, 137, -334, -334, 118, -334,
1052 -334, 12, -334, -78, 145, -334, -334, -334, -334, 526,
1053 -334, -334, -334, -334, -334, -334, 144, -334, -334, 1543,
1054 1641, 138, 148, -334, -334, 117, 146, 28, -334, -58,
1055 -334, -334, -334, -15, -334, -334, 1641, 2380, -334, -334,
1056 1641, 154, -334, -334, -334, 1641, 1641, 1641, 1641, 1641,
1057 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641,
1058 1641, 1641, 1641, 1641, 1641, -334, 2003, -334, -334, -334,
1059 -334, -334, -334, 152, -334, 1641, -334, -334, 41, 1641,
1060 149, -334, -334, -334, 642, -334, -334, -334, -334, -334,
1061 -334, -334, -334, -334, -334, -334, 1641, 1641, -334, -334,
1062 -334, 1641, 151, 155, -334, 1641, 157, 57, 1641, 117,
1063 -334, -85, -334, -334, 156, 160, -334, 161, -334, -334,
1064 -334, -334, -334, 80, 80, -42, -42, -36, -36, -36,
1065 -36, 15, 15, 43, 99, 108, 104, 141, 142, 72,
1066 -334, 211, 20, 874, 990, -10, -334, 3, -334, 1087,
1067 642, -334, -334, 165, 1641, 163, -334, 1641, -334, 166,
1068 -334, 1641, -334, -334, 1641, 164, -334, -334, -334, -334,
1069 1087, 152, -334, 160, 198, 2312, 172, 170, -334, -334,
1070 1641, -334, -334, 171, -334, 1641, -334, 167, 175, 265,
1071 -334, 178, 174, 758, -334, -334, 176, 13, 1641, 758,
1072 152, -334, 1641, -334, -334, -334, -334, 177, 160, -334,
1073 -334, -334, -334
John Bauman66b8ab22014-05-06 15:57:45 -04001074};
1075
1076/* YYPGOTO[NTERM-NUM]. */
1077static const yytype_int16 yypgoto[] =
1078{
Alexis Hetuad527752015-07-07 13:31:44 -04001079 -334, -334, -334, -334, -334, -334, -334, 46, -334, -334,
1080 -334, -334, 66, -334, -46, -44, -67, -34, 30, 33,
1081 29, 32, 34, 31, -334, -104, -127, -334, -144, -119,
1082 -334, 14, 17, -334, -334, -334, 168, 204, 199, 173,
1083 -334, -334, -325, 8, -334, -101, 7, -68, 293, -334,
1084 -334, 119, 0, -334, -334, -334, -334, -97, -123, 76,
1085 -6, -208, -40, -206, -328, -83, -334, -334, -94, -333,
1086 -334, -334, -86, 25, -38, -334, -334, -334, -334, -334,
1087 -60, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1088 253, -334, -334
John Bauman66b8ab22014-05-06 15:57:45 -04001089};
1090
1091/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1092 positive, shift that token. If negative, reduce the rule which
1093 number is the opposite. If zero, do what YYDEFACT says.
1094 If YYTABLE_NINF, syntax error. */
Alexis Hetuad527752015-07-07 13:31:44 -04001095#define YYTABLE_NINF -232
John Bauman66b8ab22014-05-06 15:57:45 -04001096static const yytype_int16 yytable[] =
1097{
Alexis Hetuad527752015-07-07 13:31:44 -04001098 74, 108, 233, 300, 223, 122, 134, 175, 83, 82,
1099 94, 222, 304, 230, 60, 367, 134, 61, 311, 7,
1100 180, 361, 89, 263, 374, 129, 175, 130, 87, 362,
1101 219, 126, 92, 242, 131, 134, 90, 220, 389, 135,
1102 93, 95, 96, 97, 103, 374, 278, 250, 251, 135,
1103 27, 28, 101, 29, 80, 102, 312, 230, 264, 126,
1104 88, 37, 38, 39, 182, 403, 225, 410, 135, 74,
1105 183, 403, 109, 280, 248, 104, 249, 74, 134, 134,
1106 110, 239, 266, 111, 115, 118, 81, 240, 175, 114,
1107 313, 60, 315, 223, 61, 371, 297, 356, 128, 74,
1108 303, 297, 252, 253, 234, 235, -94, 74, 372, 85,
1109 86, 135, 135, 319, 297, 175, 7, 74, 407, 116,
1110 339, 204, 7, 297, 297, 236, 298, 74, 121, 237,
1111 94, 345, 256, 257, 74, 347, 74, 254, 255, 309,
1112 83, 82, 310, 230, 300, 132, 379, 27, 28, 381,
1113 29, 80, 297, 27, 28, 346, 29, 181, 37, 38,
1114 39, 95, 96, 97, 37, 134, 268, 269, 309, 351,
1115 352, 358, 395, 2, 3, 4, 178, 162, 223, 74,
1116 74, 216, 353, 297, 364, 327, 328, 329, 330, 359,
1117 95, 96, 97, 226, 411, -27, 162, 175, 135, 245,
1118 246, 247, 323, 324, 175, 373, 325, 326, 238, 204,
1119 231, 232, 285, 286, 287, 288, 289, 290, 291, 292,
1120 293, 294, 331, 332, 243, 258, 373, 223, 260, 244,
1121 223, 295, 261, 259, 265, 262, 271, 384, 272, 274,
1122 275, 397, 383, 276, 279, 281, 283, 282, 375, -26,
1123 301, 305, 308, 223, 408, 306, 366, 175, 162, -21,
1124 -231, 348, 355, 363, 354, -28, 74, 365, 385, 375,
1125 357, 297, 378, 382, 392, 223, 380, 393, 396, 394,
1126 399, 398, 400, 318, 204, 162, 195, 402, 333, 335,
1127 406, 412, 334, 336, 338, 217, 337, 123, 84, 127,
1128 218, 307, 270, 360, 368, 409, 369, 108, 401, 350,
1129 386, 320, 321, 322, 162, 162, 162, 162, 162, 162,
1130 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
1131 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1132 0, 0, 0, 204, 204, 0, 0, 0, 0, 204,
1133 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1134 0, 0, 0, 0, 0, 0, 0, 162, 0, 0,
1135 204, 0, 0, 0, 162, 74, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001137 0, 0, 0, 204, 0, 0, 0, 0, 0, 204,
Alexis Hetua35d8232015-06-11 17:11:06 -04001138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001139 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
1140 8, 9, 10, 11, 184, 185, 186, 162, 187, 188,
1141 189, 190, 191, 192, 193, 12, 13, 14, 15, 16,
Alexis Hetue5246692015-06-18 12:34:52 -04001142 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1143 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001144 36, 37, 38, 39, 40, 41, 194, 42, 43, 44,
Alexis Hetue5246692015-06-18 12:34:52 -04001145 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001146 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1147 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001149 0, 0, 0, 0, 146, 0, 0, 0, 195, 196,
1150 0, 0, 0, 0, 197, 148, 149, 150, 151, 1,
Alexis Hetue5246692015-06-18 12:34:52 -04001151 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetuad527752015-07-07 13:31:44 -04001152 184, 185, 186, 0, 187, 188, 189, 190, 191, 192,
1153 193, 12, 13, 14, 15, 16, 17, 18, 19, 20,
Alexis Hetue5246692015-06-18 12:34:52 -04001154 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1155 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Alexis Hetuad527752015-07-07 13:31:44 -04001156 40, 41, 194, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001157 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001158 57, 58, 138, 59, 139, 140, 141, 142, 143, 0,
1159 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001161 146, 0, 0, 0, 195, 299, 0, 0, 0, 0,
1162 197, 148, 149, 150, 151, 1, 2, 3, 4, 5,
1163 6, 7, 8, 9, 10, 11, 184, 185, 186, 0,
1164 187, 188, 189, 190, 191, 192, 193, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001165 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001166 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetuad527752015-07-07 13:31:44 -04001167 34, 35, 36, 37, 38, 39, 40, 41, 194, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001168 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001169 52, 53, 54, 0, 55, 56, 57, 58, 138, 59,
1170 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001172 0, 0, 0, 0, 0, 0, 146, 0, 0, 0,
1173 195, 0, 0, 0, 0, 0, 197, 148, 149, 150,
1174 151, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1175 10, 11, 184, 185, 186, 0, 187, 188, 189, 190,
1176 191, 192, 193, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetue5246692015-06-18 12:34:52 -04001177 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1178 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetuad527752015-07-07 13:31:44 -04001179 38, 39, 40, 41, 194, 42, 43, 44, 0, 45,
Alexis Hetue5246692015-06-18 12:34:52 -04001180 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001181 55, 56, 57, 58, 138, 59, 139, 140, 141, 142,
1182 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001184 0, 0, 146, 0, 0, 0, 121, 0, 0, 0,
1185 0, 0, 197, 148, 149, 150, 151, 1, 2, 3,
1186 4, 5, 6, 7, 8, 9, 10, 11, 184, 185,
1187 186, 0, 187, 188, 189, 190, 191, 192, 193, 12,
Alexis Hetue5246692015-06-18 12:34:52 -04001188 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1189 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1190 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
Alexis Hetuad527752015-07-07 13:31:44 -04001191 194, 42, 43, 44, 0, 45, 46, 47, 48, 49,
Alexis Hetue5246692015-06-18 12:34:52 -04001192 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
Alexis Hetuad527752015-07-07 13:31:44 -04001193 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1194 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1195 0, 0, 0, 0, 0, 0, 0, 0, 146, 0,
1196 0, 0, 0, 0, 0, 0, 0, 0, 197, 148,
1197 149, 150, 151, 1, 2, 3, 4, 5, 6, 7,
1198 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1199 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1200 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1201 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1202 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1203 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1204 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1205 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001207 133, 2, 3, 4, 146, 6, 7, 8, 9, 10,
1208 11, 0, 0, 0, 197, 148, 149, 150, 151, 0,
1209 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1210 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1211 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1212 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1213 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1214 56, 57, 58, 138, 59, 139, 140, 141, 142, 143,
1215 0, 0, 144, 145, 0, 0, 0, 0, 0, 0,
1216 0, 0, 0, 0, 0, 0, 2, 3, 4, 0,
1217 0, 146, 8, 9, 10, 11, 0, 0, 0, 0,
1218 0, 0, 148, 149, 150, 151, 0, 12, 13, 14,
Alexis Hetue5246692015-06-18 12:34:52 -04001219 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1220 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1221 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1222 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001223 52, 53, 54, 0, 55, 56, 57, 0, 105, 59,
1224 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
1225 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1226 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1227 25, 26, 0, 0, 0, 0, 106, 31, 32, 33,
1228 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1229 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1230 52, 53, 54, 0, 55, 56, 57, 0, 138, 59,
1231 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001233 0, 0, 0, 0, 0, 0, 146, 0, 0, 147,
1234 8, 9, 10, 11, 0, 0, 0, 148, 149, 150,
1235 151, 0, 0, 0, 0, 12, 13, 14, 15, 16,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001236 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1237 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001238 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001239 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001240 54, 0, 55, 56, 57, 0, 138, 59, 139, 140,
1241 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001243 0, 0, 0, 0, 146, 0, 0, 221, 8, 9,
1244 10, 11, 0, 0, 0, 148, 149, 150, 151, 0,
1245 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1246 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1247 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1248 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1249 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1250 55, 56, 57, 0, 138, 59, 139, 140, 141, 142,
1251 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001253 0, 0, 146, 8, 9, 10, 11, 0, 0, 0,
1254 0, 0, 277, 148, 149, 150, 151, 0, 12, 13,
1255 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1256 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
1257 33, 34, 35, 36, 0, 0, 0, 40, 41, 0,
1258 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1259 51, 52, 53, 54, 0, 55, 56, 57, 0, 138,
1260 59, 139, 140, 141, 142, 143, 0, 0, 144, 145,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001261 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001262 0, 0, 0, 0, 0, 0, 0, 146, 0, 0,
1263 302, 8, 9, 10, 11, 0, 0, 0, 148, 149,
1264 150, 151, 0, 0, 0, 0, 12, 13, 14, 15,
1265 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1266 26, 0, 0, 0, 0, 0, 31, 32, 33, 34,
1267 35, 36, 0, 0, 0, 40, 41, 0, 42, 43,
1268 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1269 53, 54, 0, 55, 56, 57, 0, 138, 59, 139,
1270 140, 141, 142, 143, 0, 0, 144, 145, 0, 0,
1271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1272 0, 0, 0, 0, 0, 146, 8, 9, 10, 11,
1273 0, 0, 0, 0, 0, 0, 148, 149, 150, 151,
Alexis Hetue5246692015-06-18 12:34:52 -04001274 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1275 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1276 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001277 40, 241, 0, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001278 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001279 57, 0, 138, 59, 139, 140, 141, 142, 143, 0,
1280 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
1281 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1282 146, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1283 0, 148, 149, 150, 151, 0, 0, 0, 12, 13,
1284 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1285 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1286 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1287 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1288 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1289 59, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1290 0, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1291 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1292 0, 0, 229, 12, 13, 14, 15, 16, 17, 18,
1293 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1294 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1295 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1296 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1297 55, 56, 57, 58, 0, 59, 0, 0, 0, 0,
1298 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1299 0, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1300 0, 0, 0, 0, 0, 0, 0, 267, 12, 13,
1301 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1302 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1303 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1304 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1305 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1306 59, 0, 0, 0, 0, 0, 0, 0, 112, 0,
1307 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1308 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1309 0, 0, 340, 12, 13, 14, 15, 16, 17, 18,
1310 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1311 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1312 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1313 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1314 55, 56, 57, 58, 0, 59, 1, 2, 3, 4,
1315 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1316 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
1317 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1318 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1319 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1320 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1321 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1322 59, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1323 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1324 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1325 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1326 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1327 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1328 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1329 55, 56, 57, 58, 0, 59, 2, 3, 4, 0,
1330 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001331 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1332 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1333 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1334 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1335 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001336 52, 53, 54, 0, 55, 56, 57, 0, 0, 59,
1337 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1338 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1339 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1340 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1341 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1342 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1343 54, 0, 55, 56, 57, 0, 316, 59, 8, 9,
1344 10, 11, 317, 0, 0, 0, 0, 0, 0, 0,
1345 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1346 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1347 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1348 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1349 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1350 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001351};
1352
1353static const yytype_int16 yycheck[] =
1354{
Alexis Hetuad527752015-07-07 13:31:44 -04001355 0, 69, 146, 209, 131, 91, 107, 111, 1, 1,
1356 9, 130, 220, 136, 0, 343, 117, 0, 76, 9,
1357 117, 106, 104, 92, 349, 104, 130, 106, 76, 114,
1358 106, 99, 105, 160, 113, 136, 114, 113, 371, 107,
1359 111, 40, 41, 42, 76, 370, 190, 83, 84, 117,
1360 40, 41, 111, 43, 44, 114, 114, 180, 127, 127,
1361 108, 51, 52, 53, 105, 393, 134, 400, 136, 69,
1362 111, 399, 72, 192, 116, 68, 118, 77, 179, 180,
1363 73, 105, 179, 106, 84, 76, 76, 111, 192, 82,
1364 105, 77, 236, 220, 77, 105, 111, 305, 76, 99,
1365 219, 111, 87, 88, 85, 86, 105, 107, 105, 40,
1366 41, 179, 180, 240, 111, 219, 9, 117, 105, 108,
1367 264, 121, 9, 111, 111, 106, 114, 127, 108, 110,
1368 9, 275, 89, 90, 134, 279, 136, 122, 123, 111,
1369 133, 133, 114, 266, 350, 108, 354, 40, 41, 357,
1370 43, 44, 111, 40, 41, 114, 43, 113, 51, 52,
1371 53, 40, 41, 42, 51, 266, 79, 80, 111, 296,
1372 297, 114, 380, 4, 5, 6, 114, 111, 305, 179,
1373 180, 76, 301, 111, 112, 252, 253, 254, 255, 308,
1374 40, 41, 42, 76, 402, 104, 130, 301, 266, 119,
1375 120, 121, 248, 249, 308, 349, 250, 251, 105, 209,
1376 144, 145, 94, 95, 96, 97, 98, 99, 100, 101,
1377 102, 103, 256, 257, 104, 126, 370, 354, 124, 163,
1378 357, 113, 91, 125, 107, 93, 114, 364, 114, 104,
1379 104, 385, 361, 114, 104, 112, 109, 104, 349, 104,
1380 106, 113, 106, 380, 398, 107, 342, 361, 192, 105,
1381 108, 112, 107, 107, 113, 104, 266, 56, 104, 370,
1382 113, 111, 107, 107, 76, 402, 113, 105, 107, 109,
1383 105, 114, 17, 237, 284, 219, 108, 113, 258, 260,
1384 114, 114, 259, 261, 263, 127, 262, 93, 5, 100,
1385 127, 225, 183, 309, 344, 399, 344, 375, 391, 284,
1386 370, 245, 246, 247, 248, 249, 250, 251, 252, 253,
1387 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
1388 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1389 -1, -1, -1, 343, 344, -1, -1, -1, -1, 349,
1390 350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1391 -1, -1, -1, -1, -1, -1, -1, 301, -1, -1,
1392 370, -1, -1, -1, 308, 375, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001394 -1, -1, -1, 393, -1, -1, -1, -1, -1, 399,
Alexis Hetua35d8232015-06-11 17:11:06 -04001395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001396 -1, -1, -1, 3, 4, 5, 6, 7, 8, 9,
1397 10, 11, 12, 13, 14, 15, 16, 361, 18, 19,
Alexis Hetue5246692015-06-18 12:34:52 -04001398 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1399 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1400 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1401 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1402 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1403 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1404 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001405 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001406 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
1407 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1408 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1409 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1410 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1411 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1412 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1413 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1414 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1415 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1416 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001418 104, -1, -1, -1, 108, 109, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001419 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1420 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1421 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001422 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001423 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001424 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001425 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001426 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001427 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1428 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001429 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
1430 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
1431 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1432 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1433 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1434 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1435 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1436 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
1437 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1438 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1439 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001441 -1, -1, 104, -1, -1, -1, 108, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001442 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
Alexis Hetuad527752015-07-07 13:31:44 -04001443 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1444 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
Alexis Hetue5246692015-06-18 12:34:52 -04001445 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1446 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1447 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
Alexis Hetuad527752015-07-07 13:31:44 -04001448 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
Alexis Hetue5246692015-06-18 12:34:52 -04001449 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1450 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1451 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001452 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001453 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
1454 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
1455 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1456 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1457 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1458 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1459 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1460 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1461 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1462 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1464 3, 4, 5, 6, 104, 8, 9, 10, 11, 12,
1465 13, -1, -1, -1, 114, 115, 116, 117, 118, -1,
1466 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1467 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1468 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1469 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1470 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1471 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1472 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
1473 -1, -1, -1, -1, -1, -1, 4, 5, 6, -1,
1474 -1, 104, 10, 11, 12, 13, -1, -1, -1, -1,
1475 -1, -1, 115, 116, 117, 118, -1, 25, 26, 27,
Alexis Hetue5246692015-06-18 12:34:52 -04001476 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1477 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1478 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1479 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1480 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
Alexis Hetuad527752015-07-07 13:31:44 -04001481 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
1482 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1483 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1484 38, 39, -1, -1, -1, -1, 114, 45, 46, 47,
1485 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1486 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1487 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
Alexis Hetue5246692015-06-18 12:34:52 -04001488 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001490 -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
1491 10, 11, 12, 13, -1, -1, -1, 115, 116, 117,
1492 118, -1, -1, -1, -1, 25, 26, 27, 28, 29,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001493 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1494 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1495 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1496 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1497 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1498 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001500 -1, -1, -1, -1, 104, -1, -1, 107, 10, 11,
1501 12, 13, -1, -1, -1, 115, 116, 117, 118, -1,
1502 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1503 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1504 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1505 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1506 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1507 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1508 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001510 -1, -1, 104, 10, 11, 12, 13, -1, -1, -1,
1511 -1, -1, 114, 115, 116, 117, 118, -1, 25, 26,
1512 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1513 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1514 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
1515 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1516 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
1517 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001519 -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
1520 107, 10, 11, 12, 13, -1, -1, -1, 115, 116,
1521 117, 118, -1, -1, -1, -1, 25, 26, 27, 28,
1522 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1523 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
1524 49, 50, -1, -1, -1, 54, 55, -1, 57, 58,
1525 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1526 69, 70, -1, 72, 73, 74, -1, 76, 77, 78,
1527 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1529 -1, -1, -1, -1, -1, 104, 10, 11, 12, 13,
1530 -1, -1, -1, -1, -1, -1, 115, 116, 117, 118,
Alexis Hetue5246692015-06-18 12:34:52 -04001531 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1532 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1533 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1534 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1535 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
Alexis Hetuad527752015-07-07 13:31:44 -04001536 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1537 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1538 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1539 104, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1540 -1, 115, 116, 117, 118, -1, -1, -1, 25, 26,
1541 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1542 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1543 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1544 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1545 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1546 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1547 -1, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1548 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1549 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1550 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1551 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1552 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1553 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1554 72, 73, 74, 75, -1, 77, -1, -1, -1, -1,
1555 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1556 -1, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1557 -1, -1, -1, -1, -1, -1, -1, 109, 25, 26,
1558 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1559 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1560 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1561 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1562 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1563 77, -1, -1, -1, -1, -1, -1, -1, 0, -1,
1564 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1565 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1566 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1567 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1568 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1569 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1570 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1571 72, 73, 74, 75, -1, 77, 3, 4, 5, 6,
1572 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1573 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
1574 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1575 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1576 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1577 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1578 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1579 77, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1580 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1581 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1582 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1583 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1584 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1585 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1586 72, 73, 74, 75, -1, 77, 4, 5, 6, -1,
1587 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001588 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1589 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1590 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1591 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1592 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetuad527752015-07-07 13:31:44 -04001593 68, 69, 70, -1, 72, 73, 74, -1, -1, 77,
1594 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1595 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1596 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1597 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1598 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1599 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1600 70, -1, 72, 73, 74, -1, 76, 77, 10, 11,
1601 12, 13, 82, -1, -1, -1, -1, -1, -1, -1,
1602 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1603 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1604 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1605 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1606 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1607 72, 73, 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001608};
1609
1610/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1611 symbol of state STATE-NUM. */
1612static const yytype_uint8 yystos[] =
1613{
1614 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001615 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001616 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001617 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1618 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1619 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001620 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001621 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
Alexis Hetuad527752015-07-07 13:31:44 -04001622 44, 76, 171, 174, 176, 40, 41, 76, 108, 104,
1623 114, 220, 105, 111, 9, 40, 41, 42, 165, 166,
1624 172, 111, 114, 76, 174, 76, 114, 158, 175, 180,
1625 174, 106, 0, 218, 174, 180, 108, 184, 76, 178,
1626 179, 108, 200, 165, 164, 167, 175, 166, 76, 104,
1627 106, 113, 108, 3, 173, 175, 185, 186, 76, 78,
1628 79, 80, 81, 82, 85, 86, 104, 107, 115, 116,
1629 117, 118, 129, 130, 131, 133, 134, 135, 136, 137,
1630 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1631 148, 149, 150, 151, 152, 153, 157, 180, 114, 183,
1632 185, 113, 105, 111, 14, 15, 16, 18, 19, 20,
1633 21, 22, 23, 24, 56, 108, 109, 114, 140, 153,
1634 154, 156, 159, 160, 180, 190, 191, 192, 193, 201,
1635 202, 203, 205, 207, 209, 216, 76, 164, 167, 106,
1636 113, 107, 157, 154, 189, 175, 76, 187, 188, 109,
1637 186, 140, 140, 156, 85, 86, 106, 110, 105, 105,
1638 111, 55, 154, 104, 140, 119, 120, 121, 116, 118,
1639 83, 84, 87, 88, 122, 123, 89, 90, 126, 125,
1640 124, 91, 93, 92, 127, 107, 185, 109, 79, 80,
1641 179, 114, 114, 211, 104, 104, 114, 114, 156, 104,
1642 157, 112, 104, 109, 194, 94, 95, 96, 97, 98,
1643 99, 100, 101, 102, 103, 113, 155, 111, 114, 109,
1644 191, 106, 107, 157, 189, 113, 107, 187, 106, 111,
1645 114, 76, 114, 105, 132, 156, 76, 82, 135, 154,
1646 140, 140, 140, 142, 142, 143, 143, 144, 144, 144,
1647 144, 145, 145, 146, 147, 148, 149, 150, 151, 156,
1648 109, 197, 198, 199, 212, 156, 114, 156, 112, 210,
1649 201, 154, 154, 157, 113, 107, 189, 113, 114, 157,
1650 188, 106, 114, 107, 112, 56, 200, 192, 190, 202,
1651 213, 105, 105, 156, 170, 173, 208, 195, 107, 189,
1652 113, 189, 107, 157, 154, 104, 208, 214, 215, 197,
1653 204, 206, 76, 105, 109, 189, 107, 156, 114, 105,
1654 17, 193, 113, 192, 196, 200, 114, 105, 156, 196,
1655 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001656};
1657
1658#define yyerrok (yyerrstatus = 0)
1659#define yyclearin (yychar = YYEMPTY)
1660#define YYEMPTY (-2)
1661#define YYEOF 0
1662
1663#define YYACCEPT goto yyacceptlab
1664#define YYABORT goto yyabortlab
1665#define YYERROR goto yyerrorlab
1666
1667
1668/* Like YYERROR except do call yyerror. This remains here temporarily
1669 to ease the transition to the new meaning of YYERROR, for GCC.
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001670 Once GCC version 2 has supplanted version 1, this can go. */
John Bauman66b8ab22014-05-06 15:57:45 -04001671
1672#define YYFAIL goto yyerrlab
John Bauman66b8ab22014-05-06 15:57:45 -04001673
1674#define YYRECOVERING() (!!yyerrstatus)
1675
1676#define YYBACKUP(Token, Value) \
1677do \
1678 if (yychar == YYEMPTY && yylen == 1) \
1679 { \
1680 yychar = (Token); \
1681 yylval = (Value); \
1682 yytoken = YYTRANSLATE (yychar); \
1683 YYPOPSTACK (1); \
1684 goto yybackup; \
1685 } \
1686 else \
1687 { \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001688 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
John Bauman66b8ab22014-05-06 15:57:45 -04001689 YYERROR; \
1690 } \
1691while (YYID (0))
1692
1693
1694#define YYTERROR 1
1695#define YYERRCODE 256
1696
1697
1698/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1699 If N is 0, then set CURRENT to the empty location which ends
1700 the previous symbol: RHS[0] (always defined). */
1701
1702#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1703#ifndef YYLLOC_DEFAULT
1704# define YYLLOC_DEFAULT(Current, Rhs, N) \
1705 do \
1706 if (YYID (N)) \
1707 { \
1708 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1709 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1710 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1711 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1712 } \
1713 else \
1714 { \
1715 (Current).first_line = (Current).last_line = \
1716 YYRHSLOC (Rhs, 0).last_line; \
1717 (Current).first_column = (Current).last_column = \
1718 YYRHSLOC (Rhs, 0).last_column; \
1719 } \
1720 while (YYID (0))
1721#endif
1722
1723
1724/* YY_LOCATION_PRINT -- Print the location on the stream.
1725 This macro was not mandated originally: define only if we know
1726 we won't break user code: when these are the locations we know. */
1727
1728#ifndef YY_LOCATION_PRINT
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001729# if YYLTYPE_IS_TRIVIAL
John Bauman66b8ab22014-05-06 15:57:45 -04001730# define YY_LOCATION_PRINT(File, Loc) \
1731 fprintf (File, "%d.%d-%d.%d", \
1732 (Loc).first_line, (Loc).first_column, \
1733 (Loc).last_line, (Loc).last_column)
1734# else
1735# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1736# endif
1737#endif
1738
1739
1740/* YYLEX -- calling `yylex' with the right arguments. */
1741
1742#ifdef YYLEX_PARAM
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001743# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
John Bauman66b8ab22014-05-06 15:57:45 -04001744#else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001745# define YYLEX yylex (&yylval, &yylloc)
John Bauman66b8ab22014-05-06 15:57:45 -04001746#endif
1747
1748/* Enable debugging if requested. */
1749#if YYDEBUG
1750
1751# ifndef YYFPRINTF
1752# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1753# define YYFPRINTF fprintf
1754# endif
1755
1756# define YYDPRINTF(Args) \
1757do { \
1758 if (yydebug) \
1759 YYFPRINTF Args; \
1760} while (YYID (0))
1761
1762# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1763do { \
1764 if (yydebug) \
1765 { \
1766 YYFPRINTF (stderr, "%s ", Title); \
1767 yy_symbol_print (stderr, \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001768 Type, Value, Location, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001769 YYFPRINTF (stderr, "\n"); \
1770 } \
1771} while (YYID (0))
1772
1773
1774/*--------------------------------.
1775| Print this symbol on YYOUTPUT. |
1776`--------------------------------*/
1777
1778/*ARGSUSED*/
1779#if (defined __STDC__ || defined __C99__FUNC__ \
1780 || defined __cplusplus || defined _MSC_VER)
1781static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001782yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001783#else
1784static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001785yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001786 FILE *yyoutput;
1787 int yytype;
1788 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001789 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001790 TParseContext* context;
1791#endif
1792{
1793 if (!yyvaluep)
1794 return;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001795 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001796 YYUSE (context);
1797# ifdef YYPRINT
1798 if (yytype < YYNTOKENS)
1799 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1800# else
1801 YYUSE (yyoutput);
1802# endif
1803 switch (yytype)
1804 {
1805 default:
1806 break;
1807 }
1808}
1809
1810
1811/*--------------------------------.
1812| Print this symbol on YYOUTPUT. |
1813`--------------------------------*/
1814
1815#if (defined __STDC__ || defined __C99__FUNC__ \
1816 || defined __cplusplus || defined _MSC_VER)
1817static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001818yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001819#else
1820static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001821yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001822 FILE *yyoutput;
1823 int yytype;
1824 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001825 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001826 TParseContext* context;
1827#endif
1828{
1829 if (yytype < YYNTOKENS)
1830 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1831 else
1832 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1833
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001834 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1835 YYFPRINTF (yyoutput, ": ");
1836 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04001837 YYFPRINTF (yyoutput, ")");
1838}
1839
1840/*------------------------------------------------------------------.
1841| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1842| TOP (included). |
1843`------------------------------------------------------------------*/
1844
1845#if (defined __STDC__ || defined __C99__FUNC__ \
1846 || defined __cplusplus || defined _MSC_VER)
1847static void
1848yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1849#else
1850static void
1851yy_stack_print (yybottom, yytop)
1852 yytype_int16 *yybottom;
1853 yytype_int16 *yytop;
1854#endif
1855{
1856 YYFPRINTF (stderr, "Stack now");
1857 for (; yybottom <= yytop; yybottom++)
1858 {
1859 int yybot = *yybottom;
1860 YYFPRINTF (stderr, " %d", yybot);
1861 }
1862 YYFPRINTF (stderr, "\n");
1863}
1864
1865# define YY_STACK_PRINT(Bottom, Top) \
1866do { \
1867 if (yydebug) \
1868 yy_stack_print ((Bottom), (Top)); \
1869} while (YYID (0))
1870
1871
1872/*------------------------------------------------.
1873| Report that the YYRULE is going to be reduced. |
1874`------------------------------------------------*/
1875
1876#if (defined __STDC__ || defined __C99__FUNC__ \
1877 || defined __cplusplus || defined _MSC_VER)
1878static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001879yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001880#else
1881static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001882yy_reduce_print (yyvsp, yylsp, yyrule, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001883 YYSTYPE *yyvsp;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001884 YYLTYPE *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04001885 int yyrule;
1886 TParseContext* context;
1887#endif
1888{
1889 int yynrhs = yyr2[yyrule];
1890 int yyi;
1891 unsigned long int yylno = yyrline[yyrule];
1892 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1893 yyrule - 1, yylno);
1894 /* The symbols being reduced. */
1895 for (yyi = 0; yyi < yynrhs; yyi++)
1896 {
1897 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1898 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1899 &(yyvsp[(yyi + 1) - (yynrhs)])
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001900 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
John Bauman66b8ab22014-05-06 15:57:45 -04001901 YYFPRINTF (stderr, "\n");
1902 }
1903}
1904
1905# define YY_REDUCE_PRINT(Rule) \
1906do { \
1907 if (yydebug) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001908 yy_reduce_print (yyvsp, yylsp, Rule, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001909} while (YYID (0))
1910
1911/* Nonzero means print parse trace. It is left uninitialized so that
1912 multiple parsers can coexist. */
1913int yydebug;
1914#else /* !YYDEBUG */
1915# define YYDPRINTF(Args)
1916# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1917# define YY_STACK_PRINT(Bottom, Top)
1918# define YY_REDUCE_PRINT(Rule)
1919#endif /* !YYDEBUG */
1920
1921
1922/* YYINITDEPTH -- initial size of the parser's stacks. */
1923#ifndef YYINITDEPTH
1924# define YYINITDEPTH 200
1925#endif
1926
1927/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1928 if the built-in stack extension method is used).
1929
1930 Do not make this value too large; the results are undefined if
1931 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1932 evaluated with infinite-precision integer arithmetic. */
1933
1934#ifndef YYMAXDEPTH
1935# define YYMAXDEPTH 10000
1936#endif
1937
1938
1939
1940#if YYERROR_VERBOSE
1941
1942# ifndef yystrlen
1943# if defined __GLIBC__ && defined _STRING_H
1944# define yystrlen strlen
1945# else
1946/* Return the length of YYSTR. */
1947#if (defined __STDC__ || defined __C99__FUNC__ \
1948 || defined __cplusplus || defined _MSC_VER)
1949static YYSIZE_T
1950yystrlen (const char *yystr)
1951#else
1952static YYSIZE_T
1953yystrlen (yystr)
1954 const char *yystr;
1955#endif
1956{
1957 YYSIZE_T yylen;
1958 for (yylen = 0; yystr[yylen]; yylen++)
1959 continue;
1960 return yylen;
1961}
1962# endif
1963# endif
1964
1965# ifndef yystpcpy
1966# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1967# define yystpcpy stpcpy
1968# else
1969/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1970 YYDEST. */
1971#if (defined __STDC__ || defined __C99__FUNC__ \
1972 || defined __cplusplus || defined _MSC_VER)
1973static char *
1974yystpcpy (char *yydest, const char *yysrc)
1975#else
1976static char *
1977yystpcpy (yydest, yysrc)
1978 char *yydest;
1979 const char *yysrc;
1980#endif
1981{
1982 char *yyd = yydest;
1983 const char *yys = yysrc;
1984
1985 while ((*yyd++ = *yys++) != '\0')
1986 continue;
1987
1988 return yyd - 1;
1989}
1990# endif
1991# endif
1992
1993# ifndef yytnamerr
1994/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1995 quotes and backslashes, so that it's suitable for yyerror. The
1996 heuristic is that double-quoting is unnecessary unless the string
1997 contains an apostrophe, a comma, or backslash (other than
1998 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1999 null, do not copy; instead, return the length of what the result
2000 would have been. */
2001static YYSIZE_T
2002yytnamerr (char *yyres, const char *yystr)
2003{
2004 if (*yystr == '"')
2005 {
2006 YYSIZE_T yyn = 0;
2007 char const *yyp = yystr;
2008
2009 for (;;)
2010 switch (*++yyp)
2011 {
2012 case '\'':
2013 case ',':
2014 goto do_not_strip_quotes;
2015
2016 case '\\':
2017 if (*++yyp != '\\')
2018 goto do_not_strip_quotes;
2019 /* Fall through. */
2020 default:
2021 if (yyres)
2022 yyres[yyn] = *yyp;
2023 yyn++;
2024 break;
2025
2026 case '"':
2027 if (yyres)
2028 yyres[yyn] = '\0';
2029 return yyn;
2030 }
2031 do_not_strip_quotes: ;
2032 }
2033
2034 if (! yyres)
2035 return yystrlen (yystr);
2036
2037 return yystpcpy (yyres, yystr) - yyres;
2038}
2039# endif
2040
2041/* Copy into YYRESULT an error message about the unexpected token
2042 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2043 including the terminating null byte. If YYRESULT is null, do not
2044 copy anything; just return the number of bytes that would be
2045 copied. As a special case, return 0 if an ordinary "syntax error"
2046 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2047 size calculation. */
2048static YYSIZE_T
2049yysyntax_error (char *yyresult, int yystate, int yychar)
2050{
2051 int yyn = yypact[yystate];
2052
2053 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2054 return 0;
2055 else
2056 {
2057 int yytype = YYTRANSLATE (yychar);
2058 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2059 YYSIZE_T yysize = yysize0;
2060 YYSIZE_T yysize1;
2061 int yysize_overflow = 0;
2062 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2063 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2064 int yyx;
2065
2066# if 0
2067 /* This is so xgettext sees the translatable formats that are
2068 constructed on the fly. */
2069 YY_("syntax error, unexpected %s");
2070 YY_("syntax error, unexpected %s, expecting %s");
2071 YY_("syntax error, unexpected %s, expecting %s or %s");
2072 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2073 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2074# endif
2075 char *yyfmt;
2076 char const *yyf;
2077 static char const yyunexpected[] = "syntax error, unexpected %s";
2078 static char const yyexpecting[] = ", expecting %s";
2079 static char const yyor[] = " or %s";
2080 char yyformat[sizeof yyunexpected
2081 + sizeof yyexpecting - 1
2082 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2083 * (sizeof yyor - 1))];
2084 char const *yyprefix = yyexpecting;
2085
2086 /* Start YYX at -YYN if negative to avoid negative indexes in
2087 YYCHECK. */
2088 int yyxbegin = yyn < 0 ? -yyn : 0;
2089
2090 /* Stay within bounds of both yycheck and yytname. */
2091 int yychecklim = YYLAST - yyn + 1;
2092 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2093 int yycount = 1;
2094
2095 yyarg[0] = yytname[yytype];
2096 yyfmt = yystpcpy (yyformat, yyunexpected);
2097
2098 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2099 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2100 {
2101 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2102 {
2103 yycount = 1;
2104 yysize = yysize0;
2105 yyformat[sizeof yyunexpected - 1] = '\0';
2106 break;
2107 }
2108 yyarg[yycount++] = yytname[yyx];
2109 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2110 yysize_overflow |= (yysize1 < yysize);
2111 yysize = yysize1;
2112 yyfmt = yystpcpy (yyfmt, yyprefix);
2113 yyprefix = yyor;
2114 }
2115
2116 yyf = YY_(yyformat);
2117 yysize1 = yysize + yystrlen (yyf);
2118 yysize_overflow |= (yysize1 < yysize);
2119 yysize = yysize1;
2120
2121 if (yysize_overflow)
2122 return YYSIZE_MAXIMUM;
2123
2124 if (yyresult)
2125 {
2126 /* Avoid sprintf, as that infringes on the user's name space.
2127 Don't have undefined behavior even if the translation
2128 produced a string with the wrong number of "%s"s. */
2129 char *yyp = yyresult;
2130 int yyi = 0;
2131 while ((*yyp = *yyf) != '\0')
2132 {
2133 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2134 {
2135 yyp += yytnamerr (yyp, yyarg[yyi++]);
2136 yyf += 2;
2137 }
2138 else
2139 {
2140 yyp++;
2141 yyf++;
2142 }
2143 }
2144 }
2145 return yysize;
2146 }
2147}
2148#endif /* YYERROR_VERBOSE */
2149
2150
2151/*-----------------------------------------------.
2152| Release the memory associated to this symbol. |
2153`-----------------------------------------------*/
2154
2155/*ARGSUSED*/
2156#if (defined __STDC__ || defined __C99__FUNC__ \
2157 || defined __cplusplus || defined _MSC_VER)
2158static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002159yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04002160#else
2161static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002162yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04002163 const char *yymsg;
2164 int yytype;
2165 YYSTYPE *yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002166 YYLTYPE *yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04002167 TParseContext* context;
2168#endif
2169{
2170 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002171 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002172 YYUSE (context);
2173
2174 if (!yymsg)
2175 yymsg = "Deleting";
2176 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2177
2178 switch (yytype)
2179 {
2180
2181 default:
2182 break;
2183 }
2184}
2185
2186/* Prevent warnings from -Wmissing-prototypes. */
2187#ifdef YYPARSE_PARAM
2188#if defined __STDC__ || defined __cplusplus
2189int yyparse (void *YYPARSE_PARAM);
2190#else
2191int yyparse ();
2192#endif
2193#else /* ! YYPARSE_PARAM */
2194#if defined __STDC__ || defined __cplusplus
2195int yyparse (TParseContext* context);
2196#else
2197int yyparse ();
2198#endif
2199#endif /* ! YYPARSE_PARAM */
2200
2201
2202
2203
2204
2205/*-------------------------.
2206| yyparse or yypush_parse. |
2207`-------------------------*/
2208
2209#ifdef YYPARSE_PARAM
2210#if (defined __STDC__ || defined __C99__FUNC__ \
2211 || defined __cplusplus || defined _MSC_VER)
2212int
2213yyparse (void *YYPARSE_PARAM)
2214#else
2215int
2216yyparse (YYPARSE_PARAM)
2217 void *YYPARSE_PARAM;
2218#endif
2219#else /* ! YYPARSE_PARAM */
2220#if (defined __STDC__ || defined __C99__FUNC__ \
2221 || defined __cplusplus || defined _MSC_VER)
2222int
2223yyparse (TParseContext* context)
2224#else
2225int
2226yyparse (context)
2227 TParseContext* context;
2228#endif
2229#endif
2230{
2231/* The lookahead symbol. */
2232int yychar;
2233
2234/* The semantic value of the lookahead symbol. */
2235YYSTYPE yylval;
2236
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002237/* Location data for the lookahead symbol. */
2238YYLTYPE yylloc;
2239
John Bauman66b8ab22014-05-06 15:57:45 -04002240 /* Number of syntax errors so far. */
2241 int yynerrs;
2242
2243 int yystate;
2244 /* Number of tokens to shift before error messages enabled. */
2245 int yyerrstatus;
2246
2247 /* The stacks and their tools:
2248 `yyss': related to states.
2249 `yyvs': related to semantic values.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002250 `yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002251
2252 Refer to the stacks thru separate pointers, to allow yyoverflow
2253 to reallocate them elsewhere. */
2254
2255 /* The state stack. */
2256 yytype_int16 yyssa[YYINITDEPTH];
2257 yytype_int16 *yyss;
2258 yytype_int16 *yyssp;
2259
2260 /* The semantic value stack. */
2261 YYSTYPE yyvsa[YYINITDEPTH];
2262 YYSTYPE *yyvs;
2263 YYSTYPE *yyvsp;
2264
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002265 /* The location stack. */
2266 YYLTYPE yylsa[YYINITDEPTH];
2267 YYLTYPE *yyls;
2268 YYLTYPE *yylsp;
2269
2270 /* The locations where the error started and ended. */
2271 YYLTYPE yyerror_range[2];
2272
John Bauman66b8ab22014-05-06 15:57:45 -04002273 YYSIZE_T yystacksize;
2274
2275 int yyn;
2276 int yyresult;
2277 /* Lookahead token as an internal (translated) token number. */
2278 int yytoken;
2279 /* The variables used to return semantic value and location from the
2280 action routines. */
2281 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002282 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002283
2284#if YYERROR_VERBOSE
2285 /* Buffer for error messages, and its allocated size. */
2286 char yymsgbuf[128];
2287 char *yymsg = yymsgbuf;
2288 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2289#endif
2290
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002291#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002292
2293 /* The number of symbols on the RHS of the reduced rule.
2294 Keep to zero when no symbol should be popped. */
2295 int yylen = 0;
2296
2297 yytoken = 0;
2298 yyss = yyssa;
2299 yyvs = yyvsa;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002300 yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002301 yystacksize = YYINITDEPTH;
2302
2303 YYDPRINTF ((stderr, "Starting parse\n"));
2304
2305 yystate = 0;
2306 yyerrstatus = 0;
2307 yynerrs = 0;
2308 yychar = YYEMPTY; /* Cause a token to be read. */
2309
2310 /* Initialize stack pointers.
2311 Waste one element of value and location stack
2312 so that they stay on the same level as the state stack.
2313 The wasted elements are never initialized. */
2314 yyssp = yyss;
2315 yyvsp = yyvs;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002316 yylsp = yyls;
2317
2318#if YYLTYPE_IS_TRIVIAL
2319 /* Initialize the default location before parsing starts. */
2320 yylloc.first_line = yylloc.last_line = 1;
2321 yylloc.first_column = yylloc.last_column = 1;
2322#endif
John Bauman66b8ab22014-05-06 15:57:45 -04002323
2324 goto yysetstate;
2325
2326/*------------------------------------------------------------.
2327| yynewstate -- Push a new state, which is found in yystate. |
2328`------------------------------------------------------------*/
2329 yynewstate:
2330 /* In all cases, when you get here, the value and location stacks
2331 have just been pushed. So pushing a state here evens the stacks. */
2332 yyssp++;
2333
2334 yysetstate:
2335 *yyssp = yystate;
2336
2337 if (yyss + yystacksize - 1 <= yyssp)
2338 {
2339 /* Get the current used size of the three stacks, in elements. */
2340 YYSIZE_T yysize = yyssp - yyss + 1;
2341
2342#ifdef yyoverflow
2343 {
2344 /* Give user a chance to reallocate the stack. Use copies of
2345 these so that the &'s don't force the real ones into
2346 memory. */
2347 YYSTYPE *yyvs1 = yyvs;
2348 yytype_int16 *yyss1 = yyss;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002349 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002350
2351 /* Each stack pointer address is followed by the size of the
2352 data in use in that stack, in bytes. This used to be a
2353 conditional around just the two extra args, but that might
2354 be undefined if yyoverflow is a macro. */
2355 yyoverflow (YY_("memory exhausted"),
2356 &yyss1, yysize * sizeof (*yyssp),
2357 &yyvs1, yysize * sizeof (*yyvsp),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002358 &yyls1, yysize * sizeof (*yylsp),
John Bauman66b8ab22014-05-06 15:57:45 -04002359 &yystacksize);
2360
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002361 yyls = yyls1;
John Bauman66b8ab22014-05-06 15:57:45 -04002362 yyss = yyss1;
2363 yyvs = yyvs1;
2364 }
2365#else /* no yyoverflow */
2366# ifndef YYSTACK_RELOCATE
2367 goto yyexhaustedlab;
2368# else
2369 /* Extend the stack our own way. */
2370 if (YYMAXDEPTH <= yystacksize)
2371 goto yyexhaustedlab;
2372 yystacksize *= 2;
2373 if (YYMAXDEPTH < yystacksize)
2374 yystacksize = YYMAXDEPTH;
2375
2376 {
2377 yytype_int16 *yyss1 = yyss;
2378 union yyalloc *yyptr =
2379 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2380 if (! yyptr)
2381 goto yyexhaustedlab;
2382 YYSTACK_RELOCATE (yyss_alloc, yyss);
2383 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002384 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002385# undef YYSTACK_RELOCATE
2386 if (yyss1 != yyssa)
2387 YYSTACK_FREE (yyss1);
2388 }
2389# endif
2390#endif /* no yyoverflow */
2391
2392 yyssp = yyss + yysize - 1;
2393 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002394 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002395
2396 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2397 (unsigned long int) yystacksize));
2398
2399 if (yyss + yystacksize - 1 <= yyssp)
2400 YYABORT;
2401 }
2402
2403 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2404
2405 if (yystate == YYFINAL)
2406 YYACCEPT;
2407
2408 goto yybackup;
2409
2410/*-----------.
2411| yybackup. |
2412`-----------*/
2413yybackup:
2414
2415 /* Do appropriate processing given the current state. Read a
2416 lookahead token if we need one and don't already have one. */
2417
2418 /* First try to decide what to do without reference to lookahead token. */
2419 yyn = yypact[yystate];
2420 if (yyn == YYPACT_NINF)
2421 goto yydefault;
2422
2423 /* Not known => get a lookahead token if don't already have one. */
2424
2425 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2426 if (yychar == YYEMPTY)
2427 {
2428 YYDPRINTF ((stderr, "Reading a token: "));
2429 yychar = YYLEX;
2430 }
2431
2432 if (yychar <= YYEOF)
2433 {
2434 yychar = yytoken = YYEOF;
2435 YYDPRINTF ((stderr, "Now at end of input.\n"));
2436 }
2437 else
2438 {
2439 yytoken = YYTRANSLATE (yychar);
2440 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2441 }
2442
2443 /* If the proper action on seeing token YYTOKEN is to reduce or to
2444 detect an error, take that action. */
2445 yyn += yytoken;
2446 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2447 goto yydefault;
2448 yyn = yytable[yyn];
2449 if (yyn <= 0)
2450 {
2451 if (yyn == 0 || yyn == YYTABLE_NINF)
2452 goto yyerrlab;
2453 yyn = -yyn;
2454 goto yyreduce;
2455 }
2456
2457 /* Count tokens shifted since error; after three, turn off error
2458 status. */
2459 if (yyerrstatus)
2460 yyerrstatus--;
2461
2462 /* Shift the lookahead token. */
2463 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2464
2465 /* Discard the shifted token. */
2466 yychar = YYEMPTY;
2467
2468 yystate = yyn;
2469 *++yyvsp = yylval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002470 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002471 goto yynewstate;
2472
2473
2474/*-----------------------------------------------------------.
2475| yydefault -- do the default action for the current state. |
2476`-----------------------------------------------------------*/
2477yydefault:
2478 yyn = yydefact[yystate];
2479 if (yyn == 0)
2480 goto yyerrlab;
2481 goto yyreduce;
2482
2483
2484/*-----------------------------.
2485| yyreduce -- Do a reduction. |
2486`-----------------------------*/
2487yyreduce:
2488 /* yyn is the number of a rule to reduce with. */
2489 yylen = yyr2[yyn];
2490
2491 /* If YYLEN is nonzero, implement the default value of the action:
2492 `$$ = $1'.
2493
2494 Otherwise, the following line sets YYVAL to garbage.
2495 This behavior is undocumented and Bison
2496 users should not rely upon it. Assigning to YYVAL
2497 unconditionally makes the parser a bit smaller, and it avoids a
2498 GCC warning that YYVAL may be used uninitialized. */
2499 yyval = yyvsp[1-yylen];
2500
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002501 /* Default location. */
2502 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002503 YY_REDUCE_PRINT (yyn);
2504 switch (yyn)
2505 {
2506 case 2:
2507
2508 {
2509 // The symbol table search was done in the lexical phase
Alexis Hetu76079bc2015-07-08 08:29:36 -04002510 const TVariable *variable = context->getNamedVariable((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].lex).string, (yyvsp[(1) - (1)].lex).symbol);
John Bauman66b8ab22014-05-06 15:57:45 -04002511
2512 // don't delete $1.string, it's used by error recovery, and the pool
2513 // pop will reclaim the memory
2514
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002515 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002516 ConstantUnion* constArray = variable->getConstPointer();
2517 TType t(variable->getType());
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002518 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002519 } else
2520 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2521 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002522 variable->getType(), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002523 }
2524 break;
2525
2526 case 3:
2527
2528 {
2529 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2530 }
2531 break;
2532
2533 case 4:
2534
2535 {
John Bauman66b8ab22014-05-06 15:57:45 -04002536 ConstantUnion *unionArray = new ConstantUnion[1];
2537 unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002538 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002539 }
2540 break;
2541
2542 case 5:
2543
2544 {
2545 ConstantUnion *unionArray = new ConstantUnion[1];
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002546 unionArray->setUConst((yyvsp[(1) - (1)].lex).u);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002547 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002548 }
2549 break;
2550
2551 case 6:
2552
2553 {
2554 ConstantUnion *unionArray = new ConstantUnion[1];
John Bauman66b8ab22014-05-06 15:57:45 -04002555 unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002556 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002557 }
2558 break;
2559
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002560 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002561
2562 {
2563 ConstantUnion *unionArray = new ConstantUnion[1];
2564 unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002565 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002566 }
2567 break;
2568
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002569 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002570
2571 {
2572 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2573 }
2574 break;
2575
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002576 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002577
2578 {
2579 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2580 }
2581 break;
2582
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002583 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002584
2585 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002586 (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 -04002587 }
2588 break;
2589
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002590 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002591
2592 {
2593 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2594 }
2595 break;
2596
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002597 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002598
2599 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002600 (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 -04002601 }
2602 break;
2603
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002604 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002605
2606 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002607 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002608 }
2609 break;
2610
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002611 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002612
2613 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002614 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002615 }
2616 break;
2617
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002618 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002619
2620 {
2621 if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
2622 context->recover();
2623 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2624 }
2625 break;
2626
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002627 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002628
2629 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002630 bool fatalError = false;
Alexis Hetu950cb442015-07-06 11:38:53 -04002631 (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).nodePair.node1, (yyvsp[(1) - (1)].interm).nodePair.node2, (yylsp[(1) - (1)]), &fatalError);
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002632 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002633 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002634 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002635 }
John Bauman66b8ab22014-05-06 15:57:45 -04002636 }
2637 break;
2638
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002639 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002640
2641 {
2642 (yyval.interm) = (yyvsp[(1) - (1)].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002643 (yyval.interm).nodePair.node2 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002644 }
2645 break;
2646
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002647 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002648
2649 {
Alexis Hetu950cb442015-07-06 11:38:53 -04002650 ES3_ONLY("", (yylsp[(3) - (3)]), "methods");
John Bauman66b8ab22014-05-06 15:57:45 -04002651 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002652 (yyval.interm).nodePair.node2 = (yyvsp[(1) - (3)].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002653 }
2654 break;
2655
John Bauman66b8ab22014-05-06 15:57:45 -04002656 case 19:
2657
2658 {
2659 (yyval.interm) = (yyvsp[(1) - (2)].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002660 }
2661 break;
2662
2663 case 20:
2664
2665 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002666 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002667 }
2668 break;
2669
2670 case 21:
2671
2672 {
John Bauman66b8ab22014-05-06 15:57:45 -04002673 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002674 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002675 }
2676 break;
2677
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002678 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002679
2680 {
2681 (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002682 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002683 }
2684 break;
2685
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002686 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002687
2688 {
2689 TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2690 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2691 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002692 (yyval.interm).nodePair.node1 = (yyvsp[(2) - (2)].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002693 }
2694 break;
2695
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002696 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002697
2698 {
2699 TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2700 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2701 (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
Alexis Hetu950cb442015-07-06 11:38:53 -04002702 (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002703 }
2704 break;
2705
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002706 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002707
2708 {
2709 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2710 }
2711 break;
2712
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002713 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002714
2715 {
Alexis Hetue5246692015-06-18 12:34:52 -04002716 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002717 ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002718 }
Alexis Hetue5246692015-06-18 12:34:52 -04002719 (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002720 }
2721 break;
2722
John Bauman66b8ab22014-05-06 15:57:45 -04002723 case 27:
2724
2725 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002726 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002727 context->recover();
2728 TType type(EbtVoid, EbpUndefined);
2729 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2730 (yyval.interm.function) = function;
2731 }
2732 break;
2733
2734 case 28:
2735
2736 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002737 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002738 context->recover();
2739 TType type(EbtVoid, EbpUndefined);
2740 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2741 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002742 }
2743 break;
2744
2745 case 29:
2746
2747 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002748 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2749 }
2750 break;
2751
2752 case 30:
2753
2754 {
Alexis Hetu7df892d2015-07-07 16:54:07 -04002755 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002756 }
2757 break;
2758
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002759 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002760
2761 {
Alexis Hetu7df892d2015-07-07 16:54:07 -04002762 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002763 }
2764 break;
2765
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002766 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002767
2768 {
2769 if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
Alexis Hetu7df892d2015-07-07 16:54:07 -04002770 (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002771 } else
2772 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2773 }
2774 break;
2775
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002776 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002777
Alexis Hetu253fdd12015-07-07 15:12:46 -04002778 { (yyval.interm).op = EOpNull; }
John Bauman66b8ab22014-05-06 15:57:45 -04002779 break;
2780
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002781 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002782
Alexis Hetu253fdd12015-07-07 15:12:46 -04002783 { (yyval.interm).op = EOpNegative; }
John Bauman66b8ab22014-05-06 15:57:45 -04002784 break;
2785
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002786 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002787
Alexis Hetu253fdd12015-07-07 15:12:46 -04002788 { (yyval.interm).op = EOpLogicalNot; }
John Bauman66b8ab22014-05-06 15:57:45 -04002789 break;
2790
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002791 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002792
Alexis Hetu17809052015-05-13 11:28:22 -04002793 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002794 ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002795 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002796 }
John Bauman66b8ab22014-05-06 15:57:45 -04002797 break;
2798
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002799 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002800
Alexis Hetu17809052015-05-13 11:28:22 -04002801 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2802 break;
2803
2804 case 38:
2805
John Bauman66b8ab22014-05-06 15:57:45 -04002806 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002807 FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002808 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002809 }
2810 break;
2811
Alexis Hetu17809052015-05-13 11:28:22 -04002812 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002813
2814 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002815 FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002816 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002817 }
2818 break;
2819
Alexis Hetu17809052015-05-13 11:28:22 -04002820 case 40:
2821
2822 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002823 FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002824 ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002825 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002826 }
2827 break;
2828
2829 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002830
2831 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2832 break;
2833
Alexis Hetu17809052015-05-13 11:28:22 -04002834 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002835
2836 {
Alexis Hetub4769582015-06-16 12:19:50 -04002837 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002838 }
2839 break;
2840
Alexis Hetu17809052015-05-13 11:28:22 -04002841 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002842
2843 {
Alexis Hetub4769582015-06-16 12:19:50 -04002844 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002845 }
2846 break;
2847
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002848 case 44:
2849
Alexis Hetu17809052015-05-13 11:28:22 -04002850 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2851 break;
2852
2853 case 45:
2854
2855 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002856 ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002857 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002858 }
2859 break;
2860
2861 case 46:
2862
2863 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002864 ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002865 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002866 }
2867 break;
2868
2869 case 47:
2870
2871 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2872 break;
2873
2874 case 48:
2875
John Bauman66b8ab22014-05-06 15:57:45 -04002876 {
Alexis Hetub4769582015-06-16 12:19:50 -04002877 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002878 }
2879 break;
2880
Alexis Hetu17809052015-05-13 11:28:22 -04002881 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002882
2883 {
Alexis Hetub4769582015-06-16 12:19:50 -04002884 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002885 }
2886 break;
2887
Alexis Hetu17809052015-05-13 11:28:22 -04002888 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002889
2890 {
Alexis Hetub4769582015-06-16 12:19:50 -04002891 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002892 }
2893 break;
2894
Alexis Hetu17809052015-05-13 11:28:22 -04002895 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002896
2897 {
Alexis Hetub4769582015-06-16 12:19:50 -04002898 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002899 }
2900 break;
2901
Alexis Hetu17809052015-05-13 11:28:22 -04002902 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002903
2904 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2905 break;
2906
Alexis Hetu17809052015-05-13 11:28:22 -04002907 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002908
2909 {
Alexis Hetub4769582015-06-16 12:19:50 -04002910 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002911 }
2912 break;
2913
Alexis Hetu17809052015-05-13 11:28:22 -04002914 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002915
2916 {
Alexis Hetub4769582015-06-16 12:19:50 -04002917 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002918 }
2919 break;
2920
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002921 case 55:
2922
Alexis Hetu17809052015-05-13 11:28:22 -04002923 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2924 break;
2925
2926 case 56:
2927
2928 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002929 ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002930 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002931 }
2932 break;
2933
2934 case 57:
2935
2936 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2937 break;
2938
2939 case 58:
2940
2941 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002942 ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002943 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002944 }
2945 break;
2946
2947 case 59:
2948
2949 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2950 break;
2951
2952 case 60:
2953
2954 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002955 ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002956 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002957 }
2958 break;
2959
2960 case 61:
2961
2962 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2963 break;
2964
2965 case 62:
2966
John Bauman66b8ab22014-05-06 15:57:45 -04002967 {
Alexis Hetub4769582015-06-16 12:19:50 -04002968 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002969 }
2970 break;
2971
Alexis Hetu17809052015-05-13 11:28:22 -04002972 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002973
2974 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2975 break;
2976
Alexis Hetu17809052015-05-13 11:28:22 -04002977 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002978
2979 {
Alexis Hetub4769582015-06-16 12:19:50 -04002980 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002981 }
2982 break;
2983
Alexis Hetu17809052015-05-13 11:28:22 -04002984 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04002985
2986 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2987 break;
2988
Alexis Hetu17809052015-05-13 11:28:22 -04002989 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04002990
2991 {
Alexis Hetub4769582015-06-16 12:19:50 -04002992 (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002993 }
2994 break;
2995
Alexis Hetu17809052015-05-13 11:28:22 -04002996 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04002997
2998 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2999 break;
3000
Alexis Hetu17809052015-05-13 11:28:22 -04003001 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04003002
3003 {
Alexis Hetueee212e2015-07-07 17:13:30 -04003004 (yyval.interm.intermTypedNode) = context->addTernarySelection((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 -04003005 }
3006 break;
3007
Alexis Hetu17809052015-05-13 11:28:22 -04003008 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04003009
3010 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3011 break;
3012
Alexis Hetu17809052015-05-13 11:28:22 -04003013 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04003014
3015 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003016 if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003017 context->recover();
Alexis Hetue5246692015-06-18 12:34:52 -04003018 (yyval.interm.intermTypedNode) = context->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 -04003019 }
3020 break;
3021
Alexis Hetu17809052015-05-13 11:28:22 -04003022 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04003023
Alexis Hetu253fdd12015-07-07 15:12:46 -04003024 { (yyval.interm).op = EOpAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003025 break;
3026
Alexis Hetu17809052015-05-13 11:28:22 -04003027 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04003028
Alexis Hetu253fdd12015-07-07 15:12:46 -04003029 { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpMulAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003030 break;
3031
Alexis Hetu17809052015-05-13 11:28:22 -04003032 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04003033
Alexis Hetu253fdd12015-07-07 15:12:46 -04003034 { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpDivAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003035 break;
3036
Alexis Hetu17809052015-05-13 11:28:22 -04003037 case 74:
3038
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003039 { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003040 FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpIModAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003041 break;
3042
3043 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04003044
Alexis Hetu253fdd12015-07-07 15:12:46 -04003045 { (yyval.interm).op = EOpAddAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003046 break;
3047
Alexis Hetu17809052015-05-13 11:28:22 -04003048 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04003049
Alexis Hetu253fdd12015-07-07 15:12:46 -04003050 { (yyval.interm).op = EOpSubAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003051 break;
3052
Alexis Hetu17809052015-05-13 11:28:22 -04003053 case 77:
3054
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003055 { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003056 FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)]));
3057 (yyval.interm).op = EOpBitShiftLeftAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003058 break;
3059
3060 case 78:
3061
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003062 { ES3_ONLY(">>=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003063 FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)]));
3064 (yyval.interm).op = EOpBitShiftRightAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003065 break;
3066
3067 case 79:
3068
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003069 { ES3_ONLY("&=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003070 FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)]));
3071 (yyval.interm).op = EOpBitwiseAndAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003072 break;
3073
3074 case 80:
3075
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003076 { ES3_ONLY("^=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003077 FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)]));
3078 (yyval.interm).op = EOpBitwiseXorAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003079 break;
3080
3081 case 81:
3082
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003083 { ES3_ONLY("|=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003084 FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)]));
3085 (yyval.interm).op = EOpBitwiseOrAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003086 break;
3087
3088 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003089
3090 {
3091 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3092 }
3093 break;
3094
Alexis Hetu17809052015-05-13 11:28:22 -04003095 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003096
3097 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003098 (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 -04003099 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003100 context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003101 context->recover();
3102 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3103 }
3104 }
3105 break;
3106
Alexis Hetu17809052015-05-13 11:28:22 -04003107 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003108
3109 {
3110 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3111 context->recover();
3112 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3113 }
3114 break;
3115
Alexis Hetu17809052015-05-13 11:28:22 -04003116 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003117
3118 {
Alexis Hetue5246692015-06-18 12:34:52 -04003119 if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003120 context->recover();
3121 (yyval.lex) = (yyvsp[(1) - (2)].lex);
3122 }
3123 break;
3124
3125 case 86:
3126
3127 {
John Bauman66b8ab22014-05-06 15:57:45 -04003128 TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3129
3130 TIntermAggregate *prototype = new TIntermAggregate;
3131 prototype->setType(function.getReturnType());
3132 prototype->setName(function.getName());
3133
Alexis Hetu76a343a2015-06-04 17:21:22 -04003134 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003135 {
3136 const TParameter &param = function.getParam(i);
3137 if (param.name != 0)
3138 {
John Baumand4ae8632014-05-06 16:18:33 -04003139 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003140
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003141 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 -04003142 }
3143 else
3144 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003145 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003146 }
3147 }
3148
3149 prototype->setOp(EOpPrototype);
3150 (yyval.interm.intermNode) = prototype;
3151
3152 context->symbolTable.pop();
3153 }
3154 break;
3155
Alexis Hetua35d8232015-06-11 17:11:06 -04003156 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003157
3158 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003159 TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3160 if (aggNode && aggNode->getOp() == EOpNull)
3161 aggNode->setOp(EOpDeclaration);
3162 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003163 }
3164 break;
3165
Alexis Hetua35d8232015-06-11 17:11:06 -04003166 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003167
3168 {
John Baumand4ae8632014-05-06 16:18:33 -04003169 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003170 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 -04003171 context->recover();
3172 }
John Bauman66b8ab22014-05-06 15:57:45 -04003173 (yyval.interm.intermNode) = 0;
3174 }
3175 break;
3176
Alexis Hetua35d8232015-06-11 17:11:06 -04003177 case 89:
3178
3179 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003180 ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003181 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.fieldList), NULL, (yylsp[(1) - (5)]), NULL, (yylsp[(1) - (5)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003182 }
3183 break;
3184
3185 case 90:
3186
3187 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003188 ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003189 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (6)].interm.type), (yylsp[(2) - (6)]), *(yyvsp[(2) - (6)].lex).string, (yyvsp[(3) - (6)].interm.fieldList), (yyvsp[(5) - (6)].lex).string, (yylsp[(5) - (6)]), NULL, (yylsp[(1) - (6)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003190 }
3191 break;
3192
3193 case 91:
3194
3195 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003196 ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003197 (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (9)].interm.type), (yylsp[(2) - (9)]), *(yyvsp[(2) - (9)].lex).string, (yyvsp[(3) - (9)].interm.fieldList), (yyvsp[(5) - (9)].lex).string, (yylsp[(5) - (9)]), (yyvsp[(7) - (9)].interm.intermTypedNode), (yylsp[(6) - (9)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003198 }
3199 break;
3200
3201 case 92:
3202
3203 {
3204 context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3205 (yyval.interm.intermNode) = 0;
3206 }
3207 break;
3208
3209 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003210
3211 {
3212 //
3213 // Multiple declarations of the same function are allowed.
3214 //
3215 // If this is a definition, the definition production code will check for redefinitions
3216 // (we don't know at this point if it's a definition or not).
3217 //
3218 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3219 //
Alexis Hetu0a655842015-06-22 16:52:11 -04003220 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003221 if (prevDec) {
3222 if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003223 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 -04003224 context->recover();
3225 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003226 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04003227 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003228 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 -04003229 context->recover();
3230 }
3231 }
3232 }
3233
3234 //
3235 // If this is a redeclaration, it could also be a definition,
3236 // in which case, we want to use the variable names from this one, and not the one that's
3237 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3238 //
3239 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003240
3241 // We're at the inner scope level of the function's arguments and body statement.
3242 // Add the function prototype to the surrounding scope instead.
3243 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3244 }
3245 break;
3246
Alexis Hetua35d8232015-06-11 17:11:06 -04003247 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003248
3249 {
3250 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3251 }
3252 break;
3253
Alexis Hetua35d8232015-06-11 17:11:06 -04003254 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003255
3256 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003257 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3258 }
3259 break;
3260
Alexis Hetua35d8232015-06-11 17:11:06 -04003261 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003262
3263 {
John Bauman66b8ab22014-05-06 15:57:45 -04003264 // Add the parameter
3265 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3266 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3267 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3268 else
3269 delete (yyvsp[(2) - (2)].interm).param.type;
3270 }
3271 break;
3272
Alexis Hetua35d8232015-06-11 17:11:06 -04003273 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003274
3275 {
3276 //
3277 // Only first parameter of one-parameter functions can be void
3278 // The check for named parameters not being void is done in parameter_declarator
3279 //
3280 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3281 //
3282 // This parameter > first is void
3283 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003284 context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003285 context->recover();
3286 delete (yyvsp[(3) - (3)].interm).param.type;
3287 } else {
3288 // Add the parameter
3289 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3290 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3291 }
3292 }
3293 break;
3294
Alexis Hetua35d8232015-06-11 17:11:06 -04003295 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003296
3297 {
3298 if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003299 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 -04003300 context->recover();
3301 }
3302 // make sure a sampler is not involved as well...
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003303 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003304 context->recover();
3305
3306 // Add the function as a prototype after parsing it (we do not support recursion)
3307 TFunction *function;
3308 TType type((yyvsp[(1) - (3)].interm.type));
3309 function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3310 (yyval.interm.function) = function;
3311
3312 context->symbolTable.push();
3313 }
3314 break;
3315
Alexis Hetua35d8232015-06-11 17:11:06 -04003316 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003317
3318 {
3319 if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003320 context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003321 context->recover();
3322 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003323 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003324 context->recover();
3325 TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003326 (yyval.interm).param = param;
3327 }
3328 break;
3329
Alexis Hetua35d8232015-06-11 17:11:06 -04003330 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003331
3332 {
3333 // Check that we can make an array out of this type
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003334 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003335 context->recover();
3336
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003337 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003338 context->recover();
3339
3340 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003341 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003342 context->recover();
3343 (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3344
3345 TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3346 TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003347 (yyval.interm).param = param;
3348 }
3349 break;
3350
Alexis Hetu17809052015-05-13 11:28:22 -04003351 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003352
3353 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003354 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003355 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 -04003356 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003357 }
3358 break;
3359
Alexis Hetu17809052015-05-13 11:28:22 -04003360 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003361
3362 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003363 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003364 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003365 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003366 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003367 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003368 }
3369 break;
3370
Alexis Hetu17809052015-05-13 11:28:22 -04003371 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003372
3373 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003374 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003375 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 -04003376 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003377 }
3378 break;
3379
Alexis Hetu17809052015-05-13 11:28:22 -04003380 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003381
3382 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003383 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003384 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003385 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003386 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003387 context->recover();
3388 }
3389 break;
3390
3391 case 105:
3392
3393 {
3394 (yyval.interm.qualifier) = EvqIn;
3395 }
3396 break;
3397
3398 case 106:
3399
3400 {
3401 (yyval.interm.qualifier) = EvqIn;
3402 }
3403 break;
3404
3405 case 107:
3406
3407 {
3408 (yyval.interm.qualifier) = EvqOut;
3409 }
3410 break;
3411
3412 case 108:
3413
3414 {
3415 (yyval.interm.qualifier) = EvqInOut;
3416 }
3417 break;
3418
3419 case 109:
3420
3421 {
John Bauman66b8ab22014-05-06 15:57:45 -04003422 TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3423 (yyval.interm).param = param;
3424 }
3425 break;
3426
Alexis Hetua35d8232015-06-11 17:11:06 -04003427 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003428
3429 {
3430 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3431 }
3432 break;
3433
Alexis Hetua35d8232015-06-11 17:11:06 -04003434 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003435
3436 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003437 (yyval.interm) = (yyvsp[(1) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003438 (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 -04003439 }
3440 break;
3441
Alexis Hetua35d8232015-06-11 17:11:06 -04003442 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003443
3444 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003445 (yyval.interm) = (yyvsp[(1) - (6)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003446 (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 -04003447 }
3448 break;
3449
Alexis Hetua35d8232015-06-11 17:11:06 -04003450 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003451
3452 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003453 ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003454 (yyval.interm) = (yyvsp[(1) - (7)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003455 (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 -04003456 }
3457 break;
3458
Alexis Hetua35d8232015-06-11 17:11:06 -04003459 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003460
3461 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003462 ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003463 (yyval.interm) = (yyvsp[(1) - (8)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003464 (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 -04003465 }
3466 break;
3467
Alexis Hetua35d8232015-06-11 17:11:06 -04003468 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003469
3470 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003471 (yyval.interm) = (yyvsp[(1) - (5)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003472 (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 -04003473 }
3474 break;
3475
Alexis Hetua35d8232015-06-11 17:11:06 -04003476 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003477
3478 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003479 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003480 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003481 }
3482 break;
3483
Alexis Hetua35d8232015-06-11 17:11:06 -04003484 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003485
3486 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003487 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003488 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003489 }
3490 break;
3491
Alexis Hetua35d8232015-06-11 17:11:06 -04003492 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003493
3494 {
John Bauman66b8ab22014-05-06 15:57:45 -04003495 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003496 (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 -04003497 }
3498 break;
3499
Alexis Hetua35d8232015-06-11 17:11:06 -04003500 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003501
3502 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003503 ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003504 (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003505 (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 -04003506 }
3507 break;
3508
Alexis Hetua35d8232015-06-11 17:11:06 -04003509 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003510
3511 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003512 ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003513 (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003514 (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 -04003515 }
3516 break;
3517
Alexis Hetua35d8232015-06-11 17:11:06 -04003518 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003519
3520 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003521 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003522 (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 -04003523 }
3524 break;
3525
Alexis Hetua35d8232015-06-11 17:11:06 -04003526 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003527
3528 {
3529 // $$.type is not used in invariant declarations.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003530 (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 -04003531 }
3532 break;
3533
Alexis Hetua35d8232015-06-11 17:11:06 -04003534 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003535
3536 {
John Bauman66b8ab22014-05-06 15:57:45 -04003537 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3538
3539 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003540 ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003541 if (context->getShaderVersion() != 300) {
3542 (yyvsp[(1) - (1)].interm.type).clearArrayness();
3543 }
John Bauman66b8ab22014-05-06 15:57:45 -04003544 }
3545 }
3546 break;
3547
Alexis Hetua35d8232015-06-11 17:11:06 -04003548 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003549
3550 {
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003551 (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 -04003552 }
3553 break;
3554
Alexis Hetua35d8232015-06-11 17:11:06 -04003555 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003556
3557 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003558 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003559 }
3560 break;
3561
Alexis Hetua35d8232015-06-11 17:11:06 -04003562 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003563
3564 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003565 (yyval.interm.type).qualifier = EvqFlat;
3566 }
3567 break;
3568
Alexis Hetua35d8232015-06-11 17:11:06 -04003569 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003570
3571 {
3572 (yyval.interm.qualifier) = EvqConstReadOnly;
3573 }
3574 break;
3575
Alexis Hetua35d8232015-06-11 17:11:06 -04003576 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003577
3578 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003579 VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3580 ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3581 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003582 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003583 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003584 }
3585 break;
3586
Alexis Hetua35d8232015-06-11 17:11:06 -04003587 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003588
3589 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003590 ES2_ONLY("varying", (yylsp[(1) - (1)]));
3591 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003592 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003593 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003594 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003595 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003596 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003597 }
3598 break;
3599
Alexis Hetua35d8232015-06-11 17:11:06 -04003600 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003601
3602 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003603 ES2_ONLY("varying", (yylsp[(1) - (2)]));
3604 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003605 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003606 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003607 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003608 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003609 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003610 }
3611 break;
3612
Alexis Hetua35d8232015-06-11 17:11:06 -04003613 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003614
3615 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003616 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003617 }
3618 break;
3619
Alexis Hetua35d8232015-06-11 17:11:06 -04003620 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003621
3622 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003623 (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 -04003624 }
3625 break;
3626
Alexis Hetua35d8232015-06-11 17:11:06 -04003627 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003628
3629 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003630 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 -04003631 context->recover();
3632
3633 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003634 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003635 }
3636 break;
3637
Alexis Hetua35d8232015-06-11 17:11:06 -04003638 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003639
3640 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003641 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3642 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3643 }
3644 break;
3645
Alexis Hetua35d8232015-06-11 17:11:06 -04003646 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003647
3648 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003649 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003650 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3651 }
3652 break;
3653
Alexis Hetua35d8232015-06-11 17:11:06 -04003654 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003655
3656 {
Alexis Hetuad527752015-07-07 13:31:44 -04003657 context->es3InvariantErrorCheck((yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(1) - (2)]));
3658 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
3659 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003660 }
3661 break;
3662
Alexis Hetua35d8232015-06-11 17:11:06 -04003663 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003664
3665 {
Alexis Hetuad527752015-07-07 13:31:44 -04003666 context->es3InvariantErrorCheck((yyvsp[(3) - (3)].interm.type).qualifier, (yylsp[(1) - (3)]));
3667 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(2) - (3)]), (yyvsp[(2) - (3)].interm.type).qualifier, (yylsp[(3) - (3)]), (yyvsp[(3) - (3)].interm.type).qualifier);
3668 (yyval.interm.type).invariant = true;
3669 }
3670 break;
3671
3672 case 138:
3673
3674 {
3675 (yyval.interm.type).qualifier = EvqConstExpr;
3676 }
3677 break;
3678
3679 case 139:
3680
3681 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003682 ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003683 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003684 }
3685 break;
3686
Alexis Hetuad527752015-07-07 13:31:44 -04003687 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003688
3689 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003690 ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003691 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003692 }
3693 break;
3694
Alexis Hetuad527752015-07-07 13:31:44 -04003695 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003696
3697 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003698 ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003699 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003700 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003701 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 -04003702 context->recover();
3703 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003704 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003705 }
3706 break;
3707
Alexis Hetuad527752015-07-07 13:31:44 -04003708 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003709
3710 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003711 ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003712 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003713 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003714 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 -04003715 context->recover();
3716 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003717 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003718 }
3719 break;
3720
Alexis Hetuad527752015-07-07 13:31:44 -04003721 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003722
3723 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003724 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003725 context->recover();
3726 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003727 }
3728 break;
3729
Alexis Hetuad527752015-07-07 13:31:44 -04003730 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003731
3732 {
John Bauman66b8ab22014-05-06 15:57:45 -04003733 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3734
3735 if ((yyval.interm.type).precision == EbpUndefined) {
3736 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003737 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003738 context->recover();
3739 }
3740 }
3741 }
3742 break;
3743
Alexis Hetuad527752015-07-07 13:31:44 -04003744 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003745
3746 {
3747 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3748 (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
3749 }
3750 break;
3751
Alexis Hetuad527752015-07-07 13:31:44 -04003752 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003753
3754 {
3755 (yyval.interm.precision) = EbpHigh;
3756 }
3757 break;
3758
Alexis Hetuad527752015-07-07 13:31:44 -04003759 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003760
3761 {
3762 (yyval.interm.precision) = EbpMedium;
3763 }
3764 break;
3765
Alexis Hetuad527752015-07-07 13:31:44 -04003766 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003767
3768 {
3769 (yyval.interm.precision) = EbpLow;
3770 }
3771 break;
3772
Alexis Hetuad527752015-07-07 13:31:44 -04003773 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003774
3775 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003776 ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
Nicolas Capens7d626792015-02-17 17:58:31 -05003777 (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
3778 }
3779 break;
3780
Alexis Hetuad527752015-07-07 13:31:44 -04003781 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003782
3783 {
3784 (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
3785 }
3786 break;
3787
Alexis Hetuad527752015-07-07 13:31:44 -04003788 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003789
3790 {
3791 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
3792 }
3793 break;
3794
Alexis Hetuad527752015-07-07 13:31:44 -04003795 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003796
3797 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003798 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003799 }
3800 break;
3801
Alexis Hetua35d8232015-06-11 17:11:06 -04003802 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003803
3804 {
Alexis Hetuad527752015-07-07 13:31:44 -04003805 (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)]));
3806 }
3807 break;
3808
3809 case 154:
3810
3811 {
3812 (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)]));
3813 }
3814 break;
3815
3816 case 155:
3817
3818 {
John Bauman66b8ab22014-05-06 15:57:45 -04003819 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3820 }
3821 break;
3822
Alexis Hetuad527752015-07-07 13:31:44 -04003823 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003824
3825 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003826 ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array");
Alexis Hetue5246692015-06-18 12:34:52 -04003827 (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type);
3828 (yyval.interm.type).setArray(true, 0);
3829 }
3830 break;
3831
Alexis Hetuad527752015-07-07 13:31:44 -04003832 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003833
3834 {
John Bauman66b8ab22014-05-06 15:57:45 -04003835 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3836
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003837 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003838 context->recover();
3839 else {
3840 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003841 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003842 context->recover();
3843 (yyval.interm.type).setArray(true, size);
3844 }
3845 }
3846 break;
3847
Alexis Hetuad527752015-07-07 13:31:44 -04003848 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003849
3850 {
3851 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003852 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003853 }
3854 break;
3855
Alexis Hetu17809052015-05-13 11:28:22 -04003856 case 159:
3857
3858 {
3859 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003860 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003861 }
3862 break;
3863
3864 case 160:
3865
3866 {
3867 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003868 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003869 }
3870 break;
3871
3872 case 161:
3873
3874 {
3875 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003876 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003877 }
3878 break;
3879
3880 case 162:
3881
3882 {
3883 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003884 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003885 }
3886 break;
3887
3888 case 163:
3889
3890 {
3891 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003892 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003893 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003894 }
3895 break;
3896
3897 case 164:
3898
3899 {
3900 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003901 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3902 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003903 }
3904 break;
3905
3906 case 165:
3907
3908 {
3909 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003910 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3911 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003912 }
3913 break;
3914
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003915 case 166:
3916
3917 {
3918 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003919 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003920 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003921 }
3922 break;
3923
3924 case 167:
3925
3926 {
3927 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003928 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3929 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003930 }
3931 break;
3932
3933 case 168:
3934
3935 {
3936 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003937 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3938 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003939 }
3940 break;
3941
3942 case 169:
3943
3944 {
3945 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003946 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003947 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003948 }
3949 break;
3950
3951 case 170:
3952
3953 {
3954 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003955 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3956 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003957 }
3958 break;
3959
3960 case 171:
3961
3962 {
3963 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003964 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3965 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003966 }
3967 break;
3968
Alexis Hetua35d8232015-06-11 17:11:06 -04003969 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003970
3971 {
Alexis Hetue5246692015-06-18 12:34:52 -04003972 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3973 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003974 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04003975 }
3976 break;
3977
3978 case 173:
3979
3980 {
Alexis Hetuad527752015-07-07 13:31:44 -04003981 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3982 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
3983 (yyval.interm.type).setAggregate(3);
3984 }
3985 break;
3986
3987 case 174:
3988
3989 {
3990 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3991 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
3992 (yyval.interm.type).setAggregate(4);
3993 }
3994 break;
3995
3996 case 175:
3997
3998 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003999 FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004000 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004001 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004002 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004003 }
4004 break;
4005
Alexis Hetuad527752015-07-07 13:31:44 -04004006 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004007
4008 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004009 FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004010 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004011 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004012 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004013 }
4014 break;
4015
Alexis Hetuad527752015-07-07 13:31:44 -04004016 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004017
4018 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004019 FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004020 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004021 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004022 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004023 }
4024 break;
4025
Alexis Hetuad527752015-07-07 13:31:44 -04004026 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004027
4028 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004029 FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004030 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004031 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004032 (yyval.interm.type).setMatrix(2, 3);
4033 }
4034 break;
4035
Alexis Hetuad527752015-07-07 13:31:44 -04004036 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004037
4038 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004039 FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004040 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004041 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004042 (yyval.interm.type).setMatrix(3, 2);
4043 }
4044 break;
4045
Alexis Hetuad527752015-07-07 13:31:44 -04004046 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004047
4048 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004049 FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004050 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004051 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004052 (yyval.interm.type).setMatrix(2, 4);
4053 }
4054 break;
4055
Alexis Hetuad527752015-07-07 13:31:44 -04004056 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004057
4058 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004059 FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004060 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004061 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004062 (yyval.interm.type).setMatrix(4, 2);
4063 }
4064 break;
4065
Alexis Hetuad527752015-07-07 13:31:44 -04004066 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004067
4068 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004069 FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004070 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004071 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004072 (yyval.interm.type).setMatrix(3, 4);
4073 }
4074 break;
4075
Alexis Hetuad527752015-07-07 13:31:44 -04004076 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004077
4078 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004079 FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004080 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004081 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004082 (yyval.interm.type).setMatrix(4, 3);
4083 }
4084 break;
4085
Alexis Hetuad527752015-07-07 13:31:44 -04004086 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004087
4088 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004089 FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004090 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004091 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004092 }
4093 break;
4094
Alexis Hetuad527752015-07-07 13:31:44 -04004095 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004096
4097 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004098 FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004099 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004100 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004101 }
4102 break;
4103
Alexis Hetuad527752015-07-07 13:31:44 -04004104 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004105
4106 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004107 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004108 context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004109 context->recover();
4110 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004111 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004112 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004113 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004114 }
4115 break;
4116
Alexis Hetuad527752015-07-07 13:31:44 -04004117 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004118
4119 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004120 FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004121 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004122 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004123 }
4124 break;
4125
Alexis Hetuad527752015-07-07 13:31:44 -04004126 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004127
4128 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004129 FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004130 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004131 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004132 }
4133 break;
4134
Alexis Hetuad527752015-07-07 13:31:44 -04004135 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004136
4137 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004138 FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004139 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004140 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004141 }
4142 break;
4143
Alexis Hetuad527752015-07-07 13:31:44 -04004144 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004145
4146 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004147 FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004148 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004149 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004150 }
4151 break;
4152
Alexis Hetuad527752015-07-07 13:31:44 -04004153 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004154
4155 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004156 FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004157 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004158 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004159 }
4160 break;
4161
Alexis Hetuad527752015-07-07 13:31:44 -04004162 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004163
4164 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004165 FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004166 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004167 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004168 }
4169 break;
4170
Alexis Hetuad527752015-07-07 13:31:44 -04004171 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004172
4173 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004174 FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004175 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004176 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004177 }
4178 break;
4179
Alexis Hetuad527752015-07-07 13:31:44 -04004180 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004181
4182 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004183 FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004184 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004185 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004186 }
4187 break;
4188
Alexis Hetuad527752015-07-07 13:31:44 -04004189 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004190
4191 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004192 FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004193 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004194 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004195 }
4196 break;
4197
Alexis Hetuad527752015-07-07 13:31:44 -04004198 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004199
4200 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004201 FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004202 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004203 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004204 }
4205 break;
4206
Alexis Hetuad527752015-07-07 13:31:44 -04004207 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004208
4209 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004210 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004211 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004212 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004213 }
4214 break;
4215
Alexis Hetuad527752015-07-07 13:31:44 -04004216 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004217
4218 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004219 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004220 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004221 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004222 }
4223 break;
4224
Alexis Hetuad527752015-07-07 13:31:44 -04004225 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004226
4227 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004228 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004229 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004230 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004231 }
4232 break;
4233
Alexis Hetuad527752015-07-07 13:31:44 -04004234 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004235
4236 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004237 FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004238 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4239 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4240 }
4241 break;
4242
Alexis Hetuad527752015-07-07 13:31:44 -04004243 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004244
4245 {
4246 //
4247 // This is for user defined type names. The lexical phase looked up the
4248 // type.
4249 //
4250 TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4251 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004252 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004253 (yyval.interm.type).userDef = &structure;
4254 }
4255 break;
4256
Alexis Hetuad527752015-07-07 13:31:44 -04004257 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004258
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004259 { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004260 break;
4261
Alexis Hetuad527752015-07-07 13:31:44 -04004262 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004263
4264 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004265 (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 -04004266 }
4267 break;
4268
Alexis Hetuad527752015-07-07 13:31:44 -04004269 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004270
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004271 { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004272 break;
4273
Alexis Hetuad527752015-07-07 13:31:44 -04004274 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004275
4276 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004277 (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004278 }
4279 break;
4280
Alexis Hetuad527752015-07-07 13:31:44 -04004281 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004282
4283 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004284 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004285 }
4286 break;
4287
Alexis Hetuad527752015-07-07 13:31:44 -04004288 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004289
4290 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004291 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4292 for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4293 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4294 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4295 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4296 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 -04004297 context->recover();
4298 }
4299 }
Alexis Hetua8b364b2015-06-10 11:48:40 -04004300 (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004301 }
4302 }
4303 break;
4304
Alexis Hetuad527752015-07-07 13:31:44 -04004305 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004306
4307 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004308 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004309 }
4310 break;
4311
Alexis Hetuad527752015-07-07 13:31:44 -04004312 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004313
4314 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004315 // ES3 Only, but errors should be handled elsewhere
4316 (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4317 (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4318 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4319 }
4320 break;
4321
Alexis Hetuad527752015-07-07 13:31:44 -04004322 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004323
4324 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004325 (yyval.interm.fieldList) = NewPoolTFieldList();
4326 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004327 }
4328 break;
4329
Alexis Hetuad527752015-07-07 13:31:44 -04004330 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004331
4332 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004333 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004334 }
4335 break;
4336
Alexis Hetuad527752015-07-07 13:31:44 -04004337 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004338
4339 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004340 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004341 context->recover();
4342
Alexis Hetua8b364b2015-06-10 11:48:40 -04004343 TType* type = new TType(EbtVoid, EbpUndefined);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004344 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004345 }
4346 break;
4347
Alexis Hetuad527752015-07-07 13:31:44 -04004348 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004349
4350 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004351 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004352 context->recover();
4353
Alexis Hetua8b364b2015-06-10 11:48:40 -04004354 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004355 int size;
Alexis Hetua8b364b2015-06-10 11:48:40 -04004356 if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004357 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004358 type->setArraySize(size);
4359
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004360 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004361 }
4362 break;
4363
Alexis Hetu17809052015-05-13 11:28:22 -04004364 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004365
Alexis Hetuad527752015-07-07 13:31:44 -04004366 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004367 break;
4368
Alexis Hetu17809052015-05-13 11:28:22 -04004369 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004370
Alexis Hetua35d8232015-06-11 17:11:06 -04004371 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetuad6b8752015-06-09 16:15:30 -04004372 break;
4373
4374 case 216:
4375
Alexis Hetuad527752015-07-07 13:31:44 -04004376 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004377 break;
4378
4379 case 217:
4380
Alexis Hetua35d8232015-06-11 17:11:06 -04004381 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004382 break;
4383
4384 case 218:
4385
Alexis Hetue5246692015-06-18 12:34:52 -04004386 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004387 break;
4388
4389 case 219:
4390
Alexis Hetuad527752015-07-07 13:31:44 -04004391 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004392 break;
4393
4394 case 220:
4395
Alexis Hetuad527752015-07-07 13:31:44 -04004396 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004397 break;
4398
4399 case 221:
4400
Alexis Hetuad527752015-07-07 13:31:44 -04004401 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004402 break;
4403
4404 case 222:
4405
Alexis Hetuad527752015-07-07 13:31:44 -04004406 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004407 break;
4408
4409 case 223:
4410
Alexis Hetuad527752015-07-07 13:31:44 -04004411 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004412 break;
4413
4414 case 224:
4415
Alexis Hetuad527752015-07-07 13:31:44 -04004416 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004417 break;
4418
4419 case 225:
4420
Alexis Hetuad527752015-07-07 13:31:44 -04004421 { (yyval.interm.intermAggregate) = 0; }
Alexis Hetue5246692015-06-18 12:34:52 -04004422 break;
4423
4424 case 226:
4425
Alexis Hetuad527752015-07-07 13:31:44 -04004426 { context->symbolTable.push(); }
4427 break;
4428
4429 case 227:
4430
4431 { context->symbolTable.pop(); }
4432 break;
4433
4434 case 228:
4435
Nicolas Capens7d626792015-02-17 17:58:31 -05004436 {
4437 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4438 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004439 (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004440 }
4441 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4442 }
4443 break;
4444
Alexis Hetua35d8232015-06-11 17:11:06 -04004445 case 229:
4446
Alexis Hetuad527752015-07-07 13:31:44 -04004447 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004448 break;
4449
4450 case 230:
4451
Alexis Hetuad527752015-07-07 13:31:44 -04004452 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004453 break;
4454
4455 case 231:
4456
Alexis Hetue5246692015-06-18 12:34:52 -04004457 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004458 break;
4459
4460 case 232:
4461
Alexis Hetue5246692015-06-18 12:34:52 -04004462 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4463 break;
4464
4465 case 233:
4466
Alexis Hetuad527752015-07-07 13:31:44 -04004467 { context->symbolTable.push(); }
4468 break;
4469
4470 case 234:
4471
4472 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4473 break;
4474
4475 case 235:
4476
John Bauman66b8ab22014-05-06 15:57:45 -04004477 {
4478 (yyval.interm.intermNode) = 0;
4479 }
4480 break;
4481
Alexis Hetuad527752015-07-07 13:31:44 -04004482 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004483
4484 {
4485 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4486 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004487 (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004488 }
4489 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4490 }
4491 break;
4492
Alexis Hetuad527752015-07-07 13:31:44 -04004493 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004494
4495 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004496 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004497 }
4498 break;
4499
Alexis Hetuad527752015-07-07 13:31:44 -04004500 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004501
4502 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004503 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004504 }
4505 break;
4506
Alexis Hetuad527752015-07-07 13:31:44 -04004507 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004508
4509 { (yyval.interm.intermNode) = 0; }
4510 break;
4511
Alexis Hetuad527752015-07-07 13:31:44 -04004512 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004513
4514 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4515 break;
4516
Alexis Hetuad527752015-07-07 13:31:44 -04004517 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004518
4519 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004520 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004521 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004522 (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 -04004523 }
4524 break;
4525
Alexis Hetuad527752015-07-07 13:31:44 -04004526 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004527
4528 {
4529 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4530 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4531 }
4532 break;
4533
Alexis Hetuad527752015-07-07 13:31:44 -04004534 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004535
4536 {
4537 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4538 (yyval.interm.nodePair).node2 = 0;
4539 }
4540 break;
4541
Alexis Hetuad527752015-07-07 13:31:44 -04004542 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004543
Alexis Hetue5246692015-06-18 12:34:52 -04004544 { context->incrSwitchNestingLevel(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004545 break;
4546
Alexis Hetuad527752015-07-07 13:31:44 -04004547 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004548
4549 {
Alexis Hetue5246692015-06-18 12:34:52 -04004550 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)]));
4551 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004552 }
4553 break;
4554
Alexis Hetuad527752015-07-07 13:31:44 -04004555 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004556
4557 {
Alexis Hetue5246692015-06-18 12:34:52 -04004558 (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004559 }
4560 break;
4561
Alexis Hetuad527752015-07-07 13:31:44 -04004562 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004563
4564 {
Alexis Hetue5246692015-06-18 12:34:52 -04004565 (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)]));
4566 }
4567 break;
4568
Alexis Hetuad527752015-07-07 13:31:44 -04004569 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004570
4571 {
John Bauman66b8ab22014-05-06 15:57:45 -04004572 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4573 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4574 context->recover();
4575 }
4576 break;
4577
Alexis Hetuad527752015-07-07 13:31:44 -04004578 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004579
4580 {
4581 TIntermNode* intermNode;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004582 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004583 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004584 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004585 context->recover();
4586
Alexis Hetue5246692015-06-18 12:34:52 -04004587 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 -04004588 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4589 else {
4590 context->recover();
4591 (yyval.interm.intermTypedNode) = 0;
4592 }
4593 }
4594 break;
4595
Alexis Hetuad527752015-07-07 13:31:44 -04004596 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004597
Alexis Hetu0a655842015-06-22 16:52:11 -04004598 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004599 break;
4600
Alexis Hetuad527752015-07-07 13:31:44 -04004601 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004602
4603 {
4604 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004605 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yylsp[(1) - (6)]));
Alexis Hetu0a655842015-06-22 16:52:11 -04004606 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004607 }
4608 break;
4609
Alexis Hetuad527752015-07-07 13:31:44 -04004610 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004611
Alexis Hetu0a655842015-06-22 16:52:11 -04004612 { context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004613 break;
4614
Alexis Hetuad527752015-07-07 13:31:44 -04004615 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004616
4617 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004618 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004619 context->recover();
4620
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004621 (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yylsp[(4) - (8)]));
Alexis Hetu0a655842015-06-22 16:52:11 -04004622 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004623 }
4624 break;
4625
Alexis Hetuad527752015-07-07 13:31:44 -04004626 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004627
Alexis Hetu0a655842015-06-22 16:52:11 -04004628 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Nicolas Capens3c20f802015-02-17 17:17:20 -05004629 break;
4630
Alexis Hetuad527752015-07-07 13:31:44 -04004631 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004632
4633 {
Alexis Hetue5246692015-06-18 12:34:52 -04004634 context->symbolTable.pop();
4635 (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 Hetu0a655842015-06-22 16:52:11 -04004636 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004637 }
4638 break;
4639
Alexis Hetu76a343a2015-06-04 17:21:22 -04004640 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004641
4642 {
Alexis Hetuad527752015-07-07 13:31:44 -04004643 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004644 }
4645 break;
4646
Alexis Hetu76a343a2015-06-04 17:21:22 -04004647 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004648
4649 {
Alexis Hetuad527752015-07-07 13:31:44 -04004650 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004651 }
4652 break;
4653
4654 case 258:
4655
4656 {
Alexis Hetuad527752015-07-07 13:31:44 -04004657 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4658 }
4659 break;
4660
4661 case 259:
4662
4663 {
4664 (yyval.interm.intermTypedNode) = 0;
4665 }
4666 break;
4667
4668 case 260:
4669
4670 {
Alexis Hetu17809052015-05-13 11:28:22 -04004671 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4672 (yyval.interm.nodePair).node2 = 0;
4673 }
4674 break;
4675
Alexis Hetuad527752015-07-07 13:31:44 -04004676 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004677
4678 {
4679 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4680 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4681 }
4682 break;
4683
Alexis Hetuad527752015-07-07 13:31:44 -04004684 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004685
4686 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004687 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004688 }
4689 break;
4690
Alexis Hetuad527752015-07-07 13:31:44 -04004691 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004692
4693 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004694 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004695 }
4696 break;
4697
Alexis Hetuad527752015-07-07 13:31:44 -04004698 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004699
4700 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004701 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004702 }
4703 break;
4704
Alexis Hetuad527752015-07-07 13:31:44 -04004705 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004706
4707 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004708 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004709 }
4710 break;
4711
Alexis Hetuad527752015-07-07 13:31:44 -04004712 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004713
4714 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004715 FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4716 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004717 }
4718 break;
4719
Alexis Hetuad527752015-07-07 13:31:44 -04004720 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004721
4722 {
Alexis Hetue5246692015-06-18 12:34:52 -04004723 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004724 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004725 }
4726 break;
4727
Alexis Hetuad527752015-07-07 13:31:44 -04004728 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004729
4730 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004731 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004732 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004733 }
4734 break;
4735
Alexis Hetue5246692015-06-18 12:34:52 -04004736 case 269:
4737
4738 {
Alexis Hetuad527752015-07-07 13:31:44 -04004739 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4740 }
4741 break;
4742
4743 case 270:
4744
4745 {
4746 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4747 }
4748 break;
4749
4750 case 271:
4751
4752 {
John Bauman66b8ab22014-05-06 15:57:45 -04004753 TFunction* function = (yyvsp[(1) - (1)].interm).function;
4754
Alexis Hetu0a655842015-06-22 16:52:11 -04004755 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004756
4757 if (builtIn)
4758 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004759 context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004760 context->recover();
4761 }
4762
Alexis Hetu0a655842015-06-22 16:52:11 -04004763 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004764 //
4765 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4766 // as it would have just been put in the symbol table. Otherwise, we're looking up
4767 // an earlier occurance.
4768 //
4769 if (prevDec->isDefined()) {
4770 //
4771 // Then this function already has a body.
4772 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004773 context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004774 context->recover();
4775 }
4776 prevDec->setDefined();
4777
4778 //
4779 // Raise error message if main function takes any parameters or return anything other than void
4780 //
4781 if (function->getName() == "main") {
4782 if (function->getParamCount() > 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004783 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004784 context->recover();
4785 }
4786 if (function->getReturnType().getBasicType() != EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004787 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004788 context->recover();
4789 }
4790 }
4791
4792 //
4793 // Remember the return type for later checking for RETURN statements.
4794 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004795 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4796 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004797
4798 //
4799 // Insert parameters into the symbol table.
4800 // If the parameter has no name, it's not an error, just don't insert it
4801 // (could be used for unused args).
4802 //
4803 // Also, accumulate the list of parameters into the HIL, so lower level code
4804 // knows where to find parameters.
4805 //
4806 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004807 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004808 const TParameter& param = function->getParam(i);
4809 if (param.name != 0) {
4810 TVariable *variable = new TVariable(param.name, *param.type);
4811 //
4812 // Insert the parameters with name in the symbol table.
4813 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004814 if (! context->symbolTable.declare(*variable)) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004815 context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004816 context->recover();
4817 delete variable;
4818 }
4819
4820 //
4821 // Add the parameter to the HIL
4822 //
4823 paramNodes = context->intermediate.growAggregate(
4824 paramNodes,
4825 context->intermediate.addSymbol(variable->getUniqueId(),
4826 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004827 variable->getType(), (yylsp[(1) - (1)])),
4828 (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004829 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004830 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004831 }
4832 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004833 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004834 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004835 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004836 }
4837 break;
4838
Alexis Hetuad527752015-07-07 13:31:44 -04004839 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004840
4841 {
4842 //?? Check that all paths return a value if return type != void ?
4843 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004844 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004845 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 -04004846 context->recover();
4847 }
4848
Alexis Hetu253fdd12015-07-07 15:12:46 -04004849 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), (yyloc));
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004850 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004851 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4852 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4853
4854 // store the pragma information for debug and optimize and other vendor specific
4855 // information. This information can be queried from the parse tree
4856 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4857 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4858
4859 if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
4860 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
4861
4862 context->symbolTable.pop();
4863 }
4864 break;
4865
4866
4867
4868 default: break;
4869 }
4870 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4871
4872 YYPOPSTACK (yylen);
4873 yylen = 0;
4874 YY_STACK_PRINT (yyss, yyssp);
4875
4876 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004877 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004878
4879 /* Now `shift' the result of the reduction. Determine what state
4880 that goes to, based on the state we popped back to and the rule
4881 number reduced by. */
4882
4883 yyn = yyr1[yyn];
4884
4885 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4886 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4887 yystate = yytable[yystate];
4888 else
4889 yystate = yydefgoto[yyn - YYNTOKENS];
4890
4891 goto yynewstate;
4892
4893
4894/*------------------------------------.
4895| yyerrlab -- here on detecting error |
4896`------------------------------------*/
4897yyerrlab:
4898 /* If not already recovering from an error, report this error. */
4899 if (!yyerrstatus)
4900 {
4901 ++yynerrs;
4902#if ! YYERROR_VERBOSE
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004903 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004904#else
4905 {
4906 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4907 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4908 {
4909 YYSIZE_T yyalloc = 2 * yysize;
4910 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4911 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4912 if (yymsg != yymsgbuf)
4913 YYSTACK_FREE (yymsg);
4914 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4915 if (yymsg)
4916 yymsg_alloc = yyalloc;
4917 else
4918 {
4919 yymsg = yymsgbuf;
4920 yymsg_alloc = sizeof yymsgbuf;
4921 }
4922 }
4923
4924 if (0 < yysize && yysize <= yymsg_alloc)
4925 {
4926 (void) yysyntax_error (yymsg, yystate, yychar);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004927 yyerror (&yylloc, context, yymsg);
John Bauman66b8ab22014-05-06 15:57:45 -04004928 }
4929 else
4930 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004931 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004932 if (yysize != 0)
4933 goto yyexhaustedlab;
4934 }
4935 }
4936#endif
4937 }
4938
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004939 yyerror_range[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004940
4941 if (yyerrstatus == 3)
4942 {
4943 /* If just tried and failed to reuse lookahead token after an
4944 error, discard it. */
4945
4946 if (yychar <= YYEOF)
4947 {
4948 /* Return failure if at end of input. */
4949 if (yychar == YYEOF)
4950 YYABORT;
4951 }
4952 else
4953 {
4954 yydestruct ("Error: discarding",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004955 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04004956 yychar = YYEMPTY;
4957 }
4958 }
4959
4960 /* Else will try to reuse lookahead token after shifting the error
4961 token. */
4962 goto yyerrlab1;
4963
4964
4965/*---------------------------------------------------.
4966| yyerrorlab -- error raised explicitly by YYERROR. |
4967`---------------------------------------------------*/
4968yyerrorlab:
4969
4970 /* Pacify compilers like GCC when the user code never invokes
4971 YYERROR and the label yyerrorlab therefore never appears in user
4972 code. */
4973 if (/*CONSTCOND*/ 0)
4974 goto yyerrorlab;
4975
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004976 yyerror_range[0] = yylsp[1-yylen];
John Bauman66b8ab22014-05-06 15:57:45 -04004977 /* Do not reclaim the symbols of the rule which action triggered
4978 this YYERROR. */
4979 YYPOPSTACK (yylen);
4980 yylen = 0;
4981 YY_STACK_PRINT (yyss, yyssp);
4982 yystate = *yyssp;
4983 goto yyerrlab1;
4984
4985
4986/*-------------------------------------------------------------.
4987| yyerrlab1 -- common code for both syntax error and YYERROR. |
4988`-------------------------------------------------------------*/
4989yyerrlab1:
4990 yyerrstatus = 3; /* Each real token shifted decrements this. */
4991
4992 for (;;)
4993 {
4994 yyn = yypact[yystate];
4995 if (yyn != YYPACT_NINF)
4996 {
4997 yyn += YYTERROR;
4998 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4999 {
5000 yyn = yytable[yyn];
5001 if (0 < yyn)
5002 break;
5003 }
5004 }
5005
5006 /* Pop the current state because it cannot handle the error token. */
5007 if (yyssp == yyss)
5008 YYABORT;
5009
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005010 yyerror_range[0] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005011 yydestruct ("Error: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005012 yystos[yystate], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005013 YYPOPSTACK (1);
5014 yystate = *yyssp;
5015 YY_STACK_PRINT (yyss, yyssp);
5016 }
5017
5018 *++yyvsp = yylval;
5019
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005020 yyerror_range[1] = yylloc;
5021 /* Using YYLLOC is tempting, but would change the location of
5022 the lookahead. YYLOC is available though. */
5023 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
5024 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005025
5026 /* Shift the error token. */
5027 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5028
5029 yystate = yyn;
5030 goto yynewstate;
5031
5032
5033/*-------------------------------------.
5034| yyacceptlab -- YYACCEPT comes here. |
5035`-------------------------------------*/
5036yyacceptlab:
5037 yyresult = 0;
5038 goto yyreturn;
5039
5040/*-----------------------------------.
5041| yyabortlab -- YYABORT comes here. |
5042`-----------------------------------*/
5043yyabortlab:
5044 yyresult = 1;
5045 goto yyreturn;
5046
5047#if !defined(yyoverflow) || YYERROR_VERBOSE
5048/*-------------------------------------------------.
5049| yyexhaustedlab -- memory exhaustion comes here. |
5050`-------------------------------------------------*/
5051yyexhaustedlab:
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005052 yyerror (&yylloc, context, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005053 yyresult = 2;
5054 /* Fall through. */
5055#endif
5056
5057yyreturn:
5058 if (yychar != YYEMPTY)
5059 yydestruct ("Cleanup: discarding lookahead",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005060 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005061 /* Do not reclaim the symbols of the rule which action triggered
5062 this YYABORT or YYACCEPT. */
5063 YYPOPSTACK (yylen);
5064 YY_STACK_PRINT (yyss, yyssp);
5065 while (yyssp != yyss)
5066 {
5067 yydestruct ("Cleanup: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005068 yystos[*yyssp], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005069 YYPOPSTACK (1);
5070 }
5071#ifndef yyoverflow
5072 if (yyss != yyssa)
5073 YYSTACK_FREE (yyss);
5074#endif
5075#if YYERROR_VERBOSE
5076 if (yymsg != yymsgbuf)
5077 YYSTACK_FREE (yymsg);
5078#endif
5079 /* Make sure YYID is used. */
5080 return YYID (yyresult);
5081}
5082
5083
5084
5085
5086
5087int glslang_parse(TParseContext* context) {
5088 return yyparse(context);
5089}
5090