blob: ca610b9349679d6064f1992b553c0e5aa2dd3bed [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,
782 265, 268, 271, 274, 277, 283, 291, 302, 305, 313,
783 316, 322, 326, 333, 339, 348, 356, 362, 369, 379,
784 382, 392, 402, 424, 425, 426, 427, 435, 436, 440,
785 444, 452, 453, 456, 462, 463, 467, 474, 475, 478,
786 481, 484, 490, 491, 494, 500, 501, 508, 509, 516,
787 517, 524, 525, 531, 532, 538, 539, 545, 546, 552,
788 553, 561, 562, 563, 564, 566, 567, 568, 571, 574,
789 577, 580, 586, 589, 600, 608, 616, 643, 649, 656,
790 660, 664, 668, 675, 712, 715, 722, 730, 751, 772,
791 782, 810, 815, 825, 830, 840, 843, 846, 849, 855,
792 862, 865, 869, 873, 878, 883, 890, 894, 898, 902,
793 907, 912, 916, 923, 933, 939, 942, 948, 954, 961,
Alexis Hetuad527752015-07-07 13:31:44 -0400794 970, 979, 982, 985, 992, 996, 1000, 1005, 1013, 1016,
795 1020, 1024, 1033, 1042, 1050, 1060, 1067, 1070, 1073, 1079,
796 1086, 1089, 1095, 1098, 1101, 1107, 1110, 1115, 1130, 1134,
797 1138, 1142, 1146, 1150, 1155, 1160, 1165, 1170, 1175, 1180,
798 1185, 1190, 1195, 1200, 1205, 1210, 1216, 1222, 1228, 1234,
799 1240, 1246, 1252, 1258, 1264, 1269, 1274, 1283, 1288, 1293,
Alexis Hetu253fdd12015-07-07 15:12:46 -0400800 1298, 1303, 1308, 1313, 1318, 1323, 1328, 1333, 1338, 1343,
Alexis Hetuad527752015-07-07 13:31:44 -0400801 1348, 1353, 1366, 1366, 1369, 1369, 1375, 1378, 1394, 1397,
802 1406, 1410, 1416, 1423, 1438, 1442, 1446, 1447, 1453, 1454,
803 1455, 1456, 1457, 1458, 1459, 1463, 1464, 1464, 1464, 1474,
804 1475, 1479, 1479, 1480, 1480, 1485, 1488, 1498, 1501, 1507,
805 1508, 1512, 1520, 1524, 1531, 1531, 1538, 1541, 1550, 1555,
806 1572, 1572, 1577, 1577, 1584, 1584, 1592, 1595, 1601, 1604,
807 1610, 1614, 1621, 1624, 1627, 1630, 1633, 1642, 1646, 1653,
808 1656, 1662, 1662
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;
2631 (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode, nullptr, (yylsp[(1) - (1)]), &fatalError);
2632 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);
2643 }
2644 break;
2645
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002646 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002647
2648 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002649 context->error((yylsp[(3) - (3)]), "methods are not supported", "");
John Bauman66b8ab22014-05-06 15:57:45 -04002650 context->recover();
2651 (yyval.interm) = (yyvsp[(3) - (3)].interm);
2652 }
2653 break;
2654
John Bauman66b8ab22014-05-06 15:57:45 -04002655 case 19:
2656
2657 {
2658 (yyval.interm) = (yyvsp[(1) - (2)].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002659 }
2660 break;
2661
2662 case 20:
2663
2664 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002665 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002666 }
2667 break;
2668
2669 case 21:
2670
2671 {
John Bauman66b8ab22014-05-06 15:57:45 -04002672 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2673 (yyval.interm).intermNode = 0;
2674 }
2675 break;
2676
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002677 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002678
2679 {
2680 (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
2681 (yyval.interm).intermNode = 0;
2682 }
2683 break;
2684
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002685 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002686
2687 {
2688 TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2689 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2690 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2691 (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
2692 }
2693 break;
2694
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002695 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002696
2697 {
2698 TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2699 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2700 (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002701 (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002702 }
2703 break;
2704
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002705 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002706
2707 {
2708 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2709 }
2710 break;
2711
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002712 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002713
2714 {
Alexis Hetue5246692015-06-18 12:34:52 -04002715 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002716 ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002717 }
Alexis Hetue5246692015-06-18 12:34:52 -04002718 (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002719 }
2720 break;
2721
John Bauman66b8ab22014-05-06 15:57:45 -04002722 case 27:
2723
2724 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002725 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002726 context->recover();
2727 TType type(EbtVoid, EbpUndefined);
2728 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2729 (yyval.interm.function) = function;
2730 }
2731 break;
2732
2733 case 28:
2734
2735 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002736 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002737 context->recover();
2738 TType type(EbtVoid, EbpUndefined);
2739 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2740 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002741 }
2742 break;
2743
2744 case 29:
2745
2746 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002747 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2748 }
2749 break;
2750
2751 case 30:
2752
2753 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002754 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002755 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002756 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002757 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002758 context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002759 context->recover();
2760 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2761 }
2762 }
2763 break;
2764
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002765 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002766
2767 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002768 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002769 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002770 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002771 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002772 context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002773 context->recover();
2774 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2775 }
2776 }
2777 break;
2778
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002779 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002780
2781 {
2782 if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002783 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002784 if ((yyval.interm.intermTypedNode) == 0) {
2785 const char* errorOp = "";
2786 switch((yyvsp[(1) - (2)].interm).op) {
2787 case EOpNegative: errorOp = "-"; break;
2788 case EOpLogicalNot: errorOp = "!"; break;
Alexis Hetud061e422015-05-13 16:37:50 -04002789 case EOpBitwiseNot: errorOp = "~"; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002790 default: break;
2791 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002792 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002793 context->recover();
2794 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2795 }
2796 } else
2797 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2798 }
2799 break;
2800
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002801 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002802
Alexis Hetu253fdd12015-07-07 15:12:46 -04002803 { (yyval.interm).op = EOpNull; }
John Bauman66b8ab22014-05-06 15:57:45 -04002804 break;
2805
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002806 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002807
Alexis Hetu253fdd12015-07-07 15:12:46 -04002808 { (yyval.interm).op = EOpNegative; }
John Bauman66b8ab22014-05-06 15:57:45 -04002809 break;
2810
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002811 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002812
Alexis Hetu253fdd12015-07-07 15:12:46 -04002813 { (yyval.interm).op = EOpLogicalNot; }
John Bauman66b8ab22014-05-06 15:57:45 -04002814 break;
2815
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002816 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002817
Alexis Hetu17809052015-05-13 11:28:22 -04002818 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002819 ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002820 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002821 }
John Bauman66b8ab22014-05-06 15:57:45 -04002822 break;
2823
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002824 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002825
Alexis Hetu17809052015-05-13 11:28:22 -04002826 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2827 break;
2828
2829 case 38:
2830
John Bauman66b8ab22014-05-06 15:57:45 -04002831 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002832 FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002833 (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 -04002834 }
2835 break;
2836
Alexis Hetu17809052015-05-13 11:28:22 -04002837 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002838
2839 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002840 FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002841 (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 -04002842 }
2843 break;
2844
Alexis Hetu17809052015-05-13 11:28:22 -04002845 case 40:
2846
2847 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002848 FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002849 ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002850 (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 -04002851 }
2852 break;
2853
2854 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002855
2856 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2857 break;
2858
Alexis Hetu17809052015-05-13 11:28:22 -04002859 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002860
2861 {
Alexis Hetub4769582015-06-16 12:19:50 -04002862 (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 -04002863 }
2864 break;
2865
Alexis Hetu17809052015-05-13 11:28:22 -04002866 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002867
2868 {
Alexis Hetub4769582015-06-16 12:19:50 -04002869 (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 -04002870 }
2871 break;
2872
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002873 case 44:
2874
Alexis Hetu17809052015-05-13 11:28:22 -04002875 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2876 break;
2877
2878 case 45:
2879
2880 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002881 ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002882 (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 -04002883 }
2884 break;
2885
2886 case 46:
2887
2888 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002889 ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002890 (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 -04002891 }
2892 break;
2893
2894 case 47:
2895
2896 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2897 break;
2898
2899 case 48:
2900
John Bauman66b8ab22014-05-06 15:57:45 -04002901 {
Alexis Hetub4769582015-06-16 12:19:50 -04002902 (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 -04002903 }
2904 break;
2905
Alexis Hetu17809052015-05-13 11:28:22 -04002906 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002907
2908 {
Alexis Hetub4769582015-06-16 12:19:50 -04002909 (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 -04002910 }
2911 break;
2912
Alexis Hetu17809052015-05-13 11:28:22 -04002913 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002914
2915 {
Alexis Hetub4769582015-06-16 12:19:50 -04002916 (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 -04002917 }
2918 break;
2919
Alexis Hetu17809052015-05-13 11:28:22 -04002920 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002921
2922 {
Alexis Hetub4769582015-06-16 12:19:50 -04002923 (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 -04002924 }
2925 break;
2926
Alexis Hetu17809052015-05-13 11:28:22 -04002927 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002928
2929 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2930 break;
2931
Alexis Hetu17809052015-05-13 11:28:22 -04002932 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002933
2934 {
Alexis Hetub4769582015-06-16 12:19:50 -04002935 (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 -04002936 }
2937 break;
2938
Alexis Hetu17809052015-05-13 11:28:22 -04002939 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002940
2941 {
Alexis Hetub4769582015-06-16 12:19:50 -04002942 (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 -04002943 }
2944 break;
2945
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002946 case 55:
2947
Alexis Hetu17809052015-05-13 11:28:22 -04002948 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2949 break;
2950
2951 case 56:
2952
2953 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002954 ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002955 (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 -04002956 }
2957 break;
2958
2959 case 57:
2960
2961 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2962 break;
2963
2964 case 58:
2965
2966 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002967 ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002968 (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 -04002969 }
2970 break;
2971
2972 case 59:
2973
2974 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2975 break;
2976
2977 case 60:
2978
2979 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002980 ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002981 (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 -04002982 }
2983 break;
2984
2985 case 61:
2986
2987 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2988 break;
2989
2990 case 62:
2991
John Bauman66b8ab22014-05-06 15:57:45 -04002992 {
Alexis Hetub4769582015-06-16 12:19:50 -04002993 (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 -04002994 }
2995 break;
2996
Alexis Hetu17809052015-05-13 11:28:22 -04002997 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002998
2999 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3000 break;
3001
Alexis Hetu17809052015-05-13 11:28:22 -04003002 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04003003
3004 {
Alexis Hetub4769582015-06-16 12:19:50 -04003005 (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 -04003006 }
3007 break;
3008
Alexis Hetu17809052015-05-13 11:28:22 -04003009 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04003010
3011 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3012 break;
3013
Alexis Hetu17809052015-05-13 11:28:22 -04003014 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04003015
3016 {
Alexis Hetub4769582015-06-16 12:19:50 -04003017 (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 -04003018 }
3019 break;
3020
Alexis Hetu17809052015-05-13 11:28:22 -04003021 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04003022
3023 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3024 break;
3025
Alexis Hetu17809052015-05-13 11:28:22 -04003026 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04003027
3028 {
Alexis Hetueee212e2015-07-07 17:13:30 -04003029 (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 -04003030 }
3031 break;
3032
Alexis Hetu17809052015-05-13 11:28:22 -04003033 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04003034
3035 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3036 break;
3037
Alexis Hetu17809052015-05-13 11:28:22 -04003038 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04003039
3040 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003041 if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003042 context->recover();
Alexis Hetue5246692015-06-18 12:34:52 -04003043 (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 -04003044 }
3045 break;
3046
Alexis Hetu17809052015-05-13 11:28:22 -04003047 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04003048
Alexis Hetu253fdd12015-07-07 15:12:46 -04003049 { (yyval.interm).op = EOpAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003050 break;
3051
Alexis Hetu17809052015-05-13 11:28:22 -04003052 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04003053
Alexis Hetu253fdd12015-07-07 15:12:46 -04003054 { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpMulAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003055 break;
3056
Alexis Hetu17809052015-05-13 11:28:22 -04003057 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04003058
Alexis Hetu253fdd12015-07-07 15:12:46 -04003059 { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpDivAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003060 break;
3061
Alexis Hetu17809052015-05-13 11:28:22 -04003062 case 74:
3063
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003064 { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003065 FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpIModAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003066 break;
3067
3068 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04003069
Alexis Hetu253fdd12015-07-07 15:12:46 -04003070 { (yyval.interm).op = EOpAddAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003071 break;
3072
Alexis Hetu17809052015-05-13 11:28:22 -04003073 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04003074
Alexis Hetu253fdd12015-07-07 15:12:46 -04003075 { (yyval.interm).op = EOpSubAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003076 break;
3077
Alexis Hetu17809052015-05-13 11:28:22 -04003078 case 77:
3079
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003080 { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003081 FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)]));
3082 (yyval.interm).op = EOpBitShiftLeftAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003083 break;
3084
3085 case 78:
3086
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003087 { ES3_ONLY(">>=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003088 FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)]));
3089 (yyval.interm).op = EOpBitShiftRightAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003090 break;
3091
3092 case 79:
3093
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003094 { ES3_ONLY("&=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003095 FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)]));
3096 (yyval.interm).op = EOpBitwiseAndAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003097 break;
3098
3099 case 80:
3100
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003101 { ES3_ONLY("^=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003102 FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)]));
3103 (yyval.interm).op = EOpBitwiseXorAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003104 break;
3105
3106 case 81:
3107
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003108 { ES3_ONLY("|=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003109 FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)]));
3110 (yyval.interm).op = EOpBitwiseOrAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003111 break;
3112
3113 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003114
3115 {
3116 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3117 }
3118 break;
3119
Alexis Hetu17809052015-05-13 11:28:22 -04003120 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003121
3122 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003123 (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 -04003124 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003125 context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003126 context->recover();
3127 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3128 }
3129 }
3130 break;
3131
Alexis Hetu17809052015-05-13 11:28:22 -04003132 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003133
3134 {
3135 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3136 context->recover();
3137 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3138 }
3139 break;
3140
Alexis Hetu17809052015-05-13 11:28:22 -04003141 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003142
3143 {
Alexis Hetue5246692015-06-18 12:34:52 -04003144 if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003145 context->recover();
3146 (yyval.lex) = (yyvsp[(1) - (2)].lex);
3147 }
3148 break;
3149
3150 case 86:
3151
3152 {
John Bauman66b8ab22014-05-06 15:57:45 -04003153 TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3154
3155 TIntermAggregate *prototype = new TIntermAggregate;
3156 prototype->setType(function.getReturnType());
3157 prototype->setName(function.getName());
3158
Alexis Hetu76a343a2015-06-04 17:21:22 -04003159 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003160 {
3161 const TParameter &param = function.getParam(i);
3162 if (param.name != 0)
3163 {
John Baumand4ae8632014-05-06 16:18:33 -04003164 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003165
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003166 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 -04003167 }
3168 else
3169 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003170 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003171 }
3172 }
3173
3174 prototype->setOp(EOpPrototype);
3175 (yyval.interm.intermNode) = prototype;
3176
3177 context->symbolTable.pop();
3178 }
3179 break;
3180
Alexis Hetua35d8232015-06-11 17:11:06 -04003181 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003182
3183 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003184 TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3185 if (aggNode && aggNode->getOp() == EOpNull)
3186 aggNode->setOp(EOpDeclaration);
3187 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003188 }
3189 break;
3190
Alexis Hetua35d8232015-06-11 17:11:06 -04003191 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003192
3193 {
John Baumand4ae8632014-05-06 16:18:33 -04003194 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003195 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 -04003196 context->recover();
3197 }
John Bauman66b8ab22014-05-06 15:57:45 -04003198 (yyval.interm.intermNode) = 0;
3199 }
3200 break;
3201
Alexis Hetua35d8232015-06-11 17:11:06 -04003202 case 89:
3203
3204 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003205 ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003206 (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 -04003207 }
3208 break;
3209
3210 case 90:
3211
3212 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003213 ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003214 (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 -04003215 }
3216 break;
3217
3218 case 91:
3219
3220 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003221 ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003222 (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 -04003223 }
3224 break;
3225
3226 case 92:
3227
3228 {
3229 context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3230 (yyval.interm.intermNode) = 0;
3231 }
3232 break;
3233
3234 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003235
3236 {
3237 //
3238 // Multiple declarations of the same function are allowed.
3239 //
3240 // If this is a definition, the definition production code will check for redefinitions
3241 // (we don't know at this point if it's a definition or not).
3242 //
3243 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3244 //
Alexis Hetu0a655842015-06-22 16:52:11 -04003245 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003246 if (prevDec) {
3247 if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003248 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 -04003249 context->recover();
3250 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003251 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04003252 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003253 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 -04003254 context->recover();
3255 }
3256 }
3257 }
3258
3259 //
3260 // If this is a redeclaration, it could also be a definition,
3261 // in which case, we want to use the variable names from this one, and not the one that's
3262 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3263 //
3264 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003265
3266 // We're at the inner scope level of the function's arguments and body statement.
3267 // Add the function prototype to the surrounding scope instead.
3268 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3269 }
3270 break;
3271
Alexis Hetua35d8232015-06-11 17:11:06 -04003272 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003273
3274 {
3275 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3276 }
3277 break;
3278
Alexis Hetua35d8232015-06-11 17:11:06 -04003279 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003280
3281 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003282 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3283 }
3284 break;
3285
Alexis Hetua35d8232015-06-11 17:11:06 -04003286 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003287
3288 {
John Bauman66b8ab22014-05-06 15:57:45 -04003289 // Add the parameter
3290 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3291 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3292 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3293 else
3294 delete (yyvsp[(2) - (2)].interm).param.type;
3295 }
3296 break;
3297
Alexis Hetua35d8232015-06-11 17:11:06 -04003298 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003299
3300 {
3301 //
3302 // Only first parameter of one-parameter functions can be void
3303 // The check for named parameters not being void is done in parameter_declarator
3304 //
3305 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3306 //
3307 // This parameter > first is void
3308 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003309 context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003310 context->recover();
3311 delete (yyvsp[(3) - (3)].interm).param.type;
3312 } else {
3313 // Add the parameter
3314 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3315 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3316 }
3317 }
3318 break;
3319
Alexis Hetua35d8232015-06-11 17:11:06 -04003320 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003321
3322 {
3323 if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003324 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 -04003325 context->recover();
3326 }
3327 // make sure a sampler is not involved as well...
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003328 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003329 context->recover();
3330
3331 // Add the function as a prototype after parsing it (we do not support recursion)
3332 TFunction *function;
3333 TType type((yyvsp[(1) - (3)].interm.type));
3334 function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3335 (yyval.interm.function) = function;
3336
3337 context->symbolTable.push();
3338 }
3339 break;
3340
Alexis Hetua35d8232015-06-11 17:11:06 -04003341 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003342
3343 {
3344 if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003345 context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003346 context->recover();
3347 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003348 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003349 context->recover();
3350 TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003351 (yyval.interm).param = param;
3352 }
3353 break;
3354
Alexis Hetua35d8232015-06-11 17:11:06 -04003355 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003356
3357 {
3358 // Check that we can make an array out of this type
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003359 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003360 context->recover();
3361
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003362 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003363 context->recover();
3364
3365 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003366 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003367 context->recover();
3368 (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3369
3370 TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3371 TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003372 (yyval.interm).param = param;
3373 }
3374 break;
3375
Alexis Hetu17809052015-05-13 11:28:22 -04003376 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003377
3378 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003379 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003380 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 -04003381 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003382 }
3383 break;
3384
Alexis Hetu17809052015-05-13 11:28:22 -04003385 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003386
3387 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003388 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003389 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003390 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003391 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003392 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003393 }
3394 break;
3395
Alexis Hetu17809052015-05-13 11:28:22 -04003396 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003397
3398 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003399 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003400 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 -04003401 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003402 }
3403 break;
3404
Alexis Hetu17809052015-05-13 11:28:22 -04003405 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003406
3407 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003408 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003409 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003410 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003411 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003412 context->recover();
3413 }
3414 break;
3415
3416 case 105:
3417
3418 {
3419 (yyval.interm.qualifier) = EvqIn;
3420 }
3421 break;
3422
3423 case 106:
3424
3425 {
3426 (yyval.interm.qualifier) = EvqIn;
3427 }
3428 break;
3429
3430 case 107:
3431
3432 {
3433 (yyval.interm.qualifier) = EvqOut;
3434 }
3435 break;
3436
3437 case 108:
3438
3439 {
3440 (yyval.interm.qualifier) = EvqInOut;
3441 }
3442 break;
3443
3444 case 109:
3445
3446 {
John Bauman66b8ab22014-05-06 15:57:45 -04003447 TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3448 (yyval.interm).param = param;
3449 }
3450 break;
3451
Alexis Hetua35d8232015-06-11 17:11:06 -04003452 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003453
3454 {
3455 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3456 }
3457 break;
3458
Alexis Hetua35d8232015-06-11 17:11:06 -04003459 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003460
3461 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003462 (yyval.interm) = (yyvsp[(1) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003463 (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 -04003464 }
3465 break;
3466
Alexis Hetua35d8232015-06-11 17:11:06 -04003467 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003468
3469 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003470 (yyval.interm) = (yyvsp[(1) - (6)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003471 (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 -04003472 }
3473 break;
3474
Alexis Hetua35d8232015-06-11 17:11:06 -04003475 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003476
3477 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003478 ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003479 (yyval.interm) = (yyvsp[(1) - (7)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003480 (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 -04003481 }
3482 break;
3483
Alexis Hetua35d8232015-06-11 17:11:06 -04003484 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003485
3486 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003487 ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003488 (yyval.interm) = (yyvsp[(1) - (8)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003489 (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 -04003490 }
3491 break;
3492
Alexis Hetua35d8232015-06-11 17:11:06 -04003493 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003494
3495 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003496 (yyval.interm) = (yyvsp[(1) - (5)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003497 (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 -04003498 }
3499 break;
3500
Alexis Hetua35d8232015-06-11 17:11:06 -04003501 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003502
3503 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003504 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003505 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003506 }
3507 break;
3508
Alexis Hetua35d8232015-06-11 17:11:06 -04003509 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003510
3511 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003512 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003513 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003514 }
3515 break;
3516
Alexis Hetua35d8232015-06-11 17:11:06 -04003517 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003518
3519 {
John Bauman66b8ab22014-05-06 15:57:45 -04003520 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003521 (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 -04003522 }
3523 break;
3524
Alexis Hetua35d8232015-06-11 17:11:06 -04003525 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003526
3527 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003528 ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003529 (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003530 (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 -04003531 }
3532 break;
3533
Alexis Hetua35d8232015-06-11 17:11:06 -04003534 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003535
3536 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003537 ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003538 (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003539 (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 -04003540 }
3541 break;
3542
Alexis Hetua35d8232015-06-11 17:11:06 -04003543 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003544
3545 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003546 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003547 (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 -04003548 }
3549 break;
3550
Alexis Hetua35d8232015-06-11 17:11:06 -04003551 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003552
3553 {
3554 // $$.type is not used in invariant declarations.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003555 (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 -04003556 }
3557 break;
3558
Alexis Hetua35d8232015-06-11 17:11:06 -04003559 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003560
3561 {
John Bauman66b8ab22014-05-06 15:57:45 -04003562 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3563
3564 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003565 ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003566 if (context->getShaderVersion() != 300) {
3567 (yyvsp[(1) - (1)].interm.type).clearArrayness();
3568 }
John Bauman66b8ab22014-05-06 15:57:45 -04003569 }
3570 }
3571 break;
3572
Alexis Hetua35d8232015-06-11 17:11:06 -04003573 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003574
3575 {
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003576 (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 -04003577 }
3578 break;
3579
Alexis Hetua35d8232015-06-11 17:11:06 -04003580 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003581
3582 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003583 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003584 }
3585 break;
3586
Alexis Hetua35d8232015-06-11 17:11:06 -04003587 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003588
3589 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003590 (yyval.interm.type).qualifier = EvqFlat;
3591 }
3592 break;
3593
Alexis Hetua35d8232015-06-11 17:11:06 -04003594 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003595
3596 {
3597 (yyval.interm.qualifier) = EvqConstReadOnly;
3598 }
3599 break;
3600
Alexis Hetua35d8232015-06-11 17:11:06 -04003601 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003602
3603 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003604 VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3605 ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3606 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003607 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003608 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003609 }
3610 break;
3611
Alexis Hetua35d8232015-06-11 17:11:06 -04003612 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003613
3614 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003615 ES2_ONLY("varying", (yylsp[(1) - (1)]));
3616 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003617 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003618 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003619 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003620 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003621 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003622 }
3623 break;
3624
Alexis Hetua35d8232015-06-11 17:11:06 -04003625 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003626
3627 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003628 ES2_ONLY("varying", (yylsp[(1) - (2)]));
3629 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003630 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003631 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003632 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003633 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003634 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003635 }
3636 break;
3637
Alexis Hetua35d8232015-06-11 17:11:06 -04003638 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003639
3640 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003641 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003642 }
3643 break;
3644
Alexis Hetua35d8232015-06-11 17:11:06 -04003645 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003646
3647 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003648 (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 -04003649 }
3650 break;
3651
Alexis Hetua35d8232015-06-11 17:11:06 -04003652 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003653
3654 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003655 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 -04003656 context->recover();
3657
3658 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003659 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003660 }
3661 break;
3662
Alexis Hetua35d8232015-06-11 17:11:06 -04003663 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003664
3665 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003666 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3667 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3668 }
3669 break;
3670
Alexis Hetua35d8232015-06-11 17:11:06 -04003671 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003672
3673 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003674 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003675 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3676 }
3677 break;
3678
Alexis Hetua35d8232015-06-11 17:11:06 -04003679 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003680
3681 {
Alexis Hetuad527752015-07-07 13:31:44 -04003682 context->es3InvariantErrorCheck((yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(1) - (2)]));
3683 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
3684 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003685 }
3686 break;
3687
Alexis Hetua35d8232015-06-11 17:11:06 -04003688 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003689
3690 {
Alexis Hetuad527752015-07-07 13:31:44 -04003691 context->es3InvariantErrorCheck((yyvsp[(3) - (3)].interm.type).qualifier, (yylsp[(1) - (3)]));
3692 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(2) - (3)]), (yyvsp[(2) - (3)].interm.type).qualifier, (yylsp[(3) - (3)]), (yyvsp[(3) - (3)].interm.type).qualifier);
3693 (yyval.interm.type).invariant = true;
3694 }
3695 break;
3696
3697 case 138:
3698
3699 {
3700 (yyval.interm.type).qualifier = EvqConstExpr;
3701 }
3702 break;
3703
3704 case 139:
3705
3706 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003707 ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003708 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003709 }
3710 break;
3711
Alexis Hetuad527752015-07-07 13:31:44 -04003712 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003713
3714 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003715 ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003716 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003717 }
3718 break;
3719
Alexis Hetuad527752015-07-07 13:31:44 -04003720 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003721
3722 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003723 ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003724 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003725 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003726 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 -04003727 context->recover();
3728 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003729 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003730 }
3731 break;
3732
Alexis Hetuad527752015-07-07 13:31:44 -04003733 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003734
3735 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003736 ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003737 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003738 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003739 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 -04003740 context->recover();
3741 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003742 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003743 }
3744 break;
3745
Alexis Hetuad527752015-07-07 13:31:44 -04003746 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003747
3748 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003749 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003750 context->recover();
3751 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003752 }
3753 break;
3754
Alexis Hetuad527752015-07-07 13:31:44 -04003755 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003756
3757 {
John Bauman66b8ab22014-05-06 15:57:45 -04003758 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3759
3760 if ((yyval.interm.type).precision == EbpUndefined) {
3761 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003762 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003763 context->recover();
3764 }
3765 }
3766 }
3767 break;
3768
Alexis Hetuad527752015-07-07 13:31:44 -04003769 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003770
3771 {
3772 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3773 (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
3774 }
3775 break;
3776
Alexis Hetuad527752015-07-07 13:31:44 -04003777 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003778
3779 {
3780 (yyval.interm.precision) = EbpHigh;
3781 }
3782 break;
3783
Alexis Hetuad527752015-07-07 13:31:44 -04003784 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003785
3786 {
3787 (yyval.interm.precision) = EbpMedium;
3788 }
3789 break;
3790
Alexis Hetuad527752015-07-07 13:31:44 -04003791 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003792
3793 {
3794 (yyval.interm.precision) = EbpLow;
3795 }
3796 break;
3797
Alexis Hetuad527752015-07-07 13:31:44 -04003798 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003799
3800 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003801 ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
Nicolas Capens7d626792015-02-17 17:58:31 -05003802 (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
3803 }
3804 break;
3805
Alexis Hetuad527752015-07-07 13:31:44 -04003806 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003807
3808 {
3809 (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
3810 }
3811 break;
3812
Alexis Hetuad527752015-07-07 13:31:44 -04003813 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003814
3815 {
3816 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
3817 }
3818 break;
3819
Alexis Hetuad527752015-07-07 13:31:44 -04003820 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003821
3822 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003823 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003824 }
3825 break;
3826
Alexis Hetua35d8232015-06-11 17:11:06 -04003827 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003828
3829 {
Alexis Hetuad527752015-07-07 13:31:44 -04003830 (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)]));
3831 }
3832 break;
3833
3834 case 154:
3835
3836 {
3837 (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)]));
3838 }
3839 break;
3840
3841 case 155:
3842
3843 {
John Bauman66b8ab22014-05-06 15:57:45 -04003844 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3845 }
3846 break;
3847
Alexis Hetuad527752015-07-07 13:31:44 -04003848 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003849
3850 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003851 ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array");
Alexis Hetue5246692015-06-18 12:34:52 -04003852 (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type);
3853 (yyval.interm.type).setArray(true, 0);
3854 }
3855 break;
3856
Alexis Hetuad527752015-07-07 13:31:44 -04003857 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003858
3859 {
John Bauman66b8ab22014-05-06 15:57:45 -04003860 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3861
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003862 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003863 context->recover();
3864 else {
3865 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003866 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003867 context->recover();
3868 (yyval.interm.type).setArray(true, size);
3869 }
3870 }
3871 break;
3872
Alexis Hetuad527752015-07-07 13:31:44 -04003873 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003874
3875 {
3876 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003877 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003878 }
3879 break;
3880
Alexis Hetu17809052015-05-13 11:28:22 -04003881 case 159:
3882
3883 {
3884 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003885 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003886 }
3887 break;
3888
3889 case 160:
3890
3891 {
3892 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003893 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003894 }
3895 break;
3896
3897 case 161:
3898
3899 {
3900 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003901 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003902 }
3903 break;
3904
3905 case 162:
3906
3907 {
3908 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003909 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003910 }
3911 break;
3912
3913 case 163:
3914
3915 {
3916 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003917 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003918 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003919 }
3920 break;
3921
3922 case 164:
3923
3924 {
3925 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003926 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3927 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003928 }
3929 break;
3930
3931 case 165:
3932
3933 {
3934 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003935 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3936 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003937 }
3938 break;
3939
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003940 case 166:
3941
3942 {
3943 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003944 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003945 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003946 }
3947 break;
3948
3949 case 167:
3950
3951 {
3952 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003953 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3954 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003955 }
3956 break;
3957
3958 case 168:
3959
3960 {
3961 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003962 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3963 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003964 }
3965 break;
3966
3967 case 169:
3968
3969 {
3970 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003971 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003972 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003973 }
3974 break;
3975
3976 case 170:
3977
3978 {
3979 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003980 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3981 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003982 }
3983 break;
3984
3985 case 171:
3986
3987 {
3988 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003989 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3990 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003991 }
3992 break;
3993
Alexis Hetua35d8232015-06-11 17:11:06 -04003994 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003995
3996 {
Alexis Hetue5246692015-06-18 12:34:52 -04003997 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3998 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003999 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04004000 }
4001 break;
4002
4003 case 173:
4004
4005 {
Alexis Hetuad527752015-07-07 13:31:44 -04004006 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4007 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4008 (yyval.interm.type).setAggregate(3);
4009 }
4010 break;
4011
4012 case 174:
4013
4014 {
4015 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4016 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4017 (yyval.interm.type).setAggregate(4);
4018 }
4019 break;
4020
4021 case 175:
4022
4023 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004024 FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004025 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004026 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004027 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004028 }
4029 break;
4030
Alexis Hetuad527752015-07-07 13:31:44 -04004031 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004032
4033 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004034 FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004035 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004036 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004037 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004038 }
4039 break;
4040
Alexis Hetuad527752015-07-07 13:31:44 -04004041 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004042
4043 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004044 FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004045 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004046 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004047 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004048 }
4049 break;
4050
Alexis Hetuad527752015-07-07 13:31:44 -04004051 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004052
4053 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004054 FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004055 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004056 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004057 (yyval.interm.type).setMatrix(2, 3);
4058 }
4059 break;
4060
Alexis Hetuad527752015-07-07 13:31:44 -04004061 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004062
4063 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004064 FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004065 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004066 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004067 (yyval.interm.type).setMatrix(3, 2);
4068 }
4069 break;
4070
Alexis Hetuad527752015-07-07 13:31:44 -04004071 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004072
4073 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004074 FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004075 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004076 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004077 (yyval.interm.type).setMatrix(2, 4);
4078 }
4079 break;
4080
Alexis Hetuad527752015-07-07 13:31:44 -04004081 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004082
4083 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004084 FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004085 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004086 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004087 (yyval.interm.type).setMatrix(4, 2);
4088 }
4089 break;
4090
Alexis Hetuad527752015-07-07 13:31:44 -04004091 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004092
4093 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004094 FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004095 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004096 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004097 (yyval.interm.type).setMatrix(3, 4);
4098 }
4099 break;
4100
Alexis Hetuad527752015-07-07 13:31:44 -04004101 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004102
4103 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004104 FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004105 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004106 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004107 (yyval.interm.type).setMatrix(4, 3);
4108 }
4109 break;
4110
Alexis Hetuad527752015-07-07 13:31:44 -04004111 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004112
4113 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004114 FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004115 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004116 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004117 }
4118 break;
4119
Alexis Hetuad527752015-07-07 13:31:44 -04004120 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004121
4122 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004123 FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004124 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004125 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004126 }
4127 break;
4128
Alexis Hetuad527752015-07-07 13:31:44 -04004129 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004130
4131 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004132 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004133 context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004134 context->recover();
4135 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004136 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004137 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004138 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004139 }
4140 break;
4141
Alexis Hetuad527752015-07-07 13:31:44 -04004142 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004143
4144 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004145 FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004146 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004147 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004148 }
4149 break;
4150
Alexis Hetuad527752015-07-07 13:31:44 -04004151 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004152
4153 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004154 FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004155 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004156 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004157 }
4158 break;
4159
Alexis Hetuad527752015-07-07 13:31:44 -04004160 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004161
4162 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004163 FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004164 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004165 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004166 }
4167 break;
4168
Alexis Hetuad527752015-07-07 13:31:44 -04004169 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004170
4171 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004172 FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004173 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004174 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004175 }
4176 break;
4177
Alexis Hetuad527752015-07-07 13:31:44 -04004178 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004179
4180 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004181 FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004182 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004183 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004184 }
4185 break;
4186
Alexis Hetuad527752015-07-07 13:31:44 -04004187 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004188
4189 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004190 FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004191 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004192 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004193 }
4194 break;
4195
Alexis Hetuad527752015-07-07 13:31:44 -04004196 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004197
4198 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004199 FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004200 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004201 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004202 }
4203 break;
4204
Alexis Hetuad527752015-07-07 13:31:44 -04004205 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004206
4207 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004208 FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004209 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004210 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004211 }
4212 break;
4213
Alexis Hetuad527752015-07-07 13:31:44 -04004214 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004215
4216 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004217 FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004218 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004219 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004220 }
4221 break;
4222
Alexis Hetuad527752015-07-07 13:31:44 -04004223 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004224
4225 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004226 FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004227 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004228 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004229 }
4230 break;
4231
Alexis Hetuad527752015-07-07 13:31:44 -04004232 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004233
4234 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004235 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004236 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004237 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004238 }
4239 break;
4240
Alexis Hetuad527752015-07-07 13:31:44 -04004241 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004242
4243 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004244 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004245 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004246 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004247 }
4248 break;
4249
Alexis Hetuad527752015-07-07 13:31:44 -04004250 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004251
4252 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004253 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004254 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004255 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004256 }
4257 break;
4258
Alexis Hetuad527752015-07-07 13:31:44 -04004259 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004260
4261 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004262 FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004263 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4264 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4265 }
4266 break;
4267
Alexis Hetuad527752015-07-07 13:31:44 -04004268 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004269
4270 {
4271 //
4272 // This is for user defined type names. The lexical phase looked up the
4273 // type.
4274 //
4275 TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4276 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004277 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004278 (yyval.interm.type).userDef = &structure;
4279 }
4280 break;
4281
Alexis Hetuad527752015-07-07 13:31:44 -04004282 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004283
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004284 { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004285 break;
4286
Alexis Hetuad527752015-07-07 13:31:44 -04004287 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004288
4289 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004290 (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 -04004291 }
4292 break;
4293
Alexis Hetuad527752015-07-07 13:31:44 -04004294 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004295
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004296 { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004297 break;
4298
Alexis Hetuad527752015-07-07 13:31:44 -04004299 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004300
4301 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004302 (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004303 }
4304 break;
4305
Alexis Hetuad527752015-07-07 13:31:44 -04004306 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004307
4308 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004309 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004310 }
4311 break;
4312
Alexis Hetuad527752015-07-07 13:31:44 -04004313 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004314
4315 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004316 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4317 for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4318 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4319 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4320 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4321 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 -04004322 context->recover();
4323 }
4324 }
Alexis Hetua8b364b2015-06-10 11:48:40 -04004325 (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004326 }
4327 }
4328 break;
4329
Alexis Hetuad527752015-07-07 13:31:44 -04004330 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004331
4332 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004333 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004334 }
4335 break;
4336
Alexis Hetuad527752015-07-07 13:31:44 -04004337 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004338
4339 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004340 // ES3 Only, but errors should be handled elsewhere
4341 (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4342 (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4343 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4344 }
4345 break;
4346
Alexis Hetuad527752015-07-07 13:31:44 -04004347 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004348
4349 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004350 (yyval.interm.fieldList) = NewPoolTFieldList();
4351 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004352 }
4353 break;
4354
Alexis Hetuad527752015-07-07 13:31:44 -04004355 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004356
4357 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004358 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004359 }
4360 break;
4361
Alexis Hetuad527752015-07-07 13:31:44 -04004362 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004363
4364 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004365 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004366 context->recover();
4367
Alexis Hetua8b364b2015-06-10 11:48:40 -04004368 TType* type = new TType(EbtVoid, EbpUndefined);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004369 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004370 }
4371 break;
4372
Alexis Hetuad527752015-07-07 13:31:44 -04004373 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004374
4375 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004376 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004377 context->recover();
4378
Alexis Hetua8b364b2015-06-10 11:48:40 -04004379 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004380 int size;
Alexis Hetua8b364b2015-06-10 11:48:40 -04004381 if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004382 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004383 type->setArraySize(size);
4384
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004385 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004386 }
4387 break;
4388
Alexis Hetu17809052015-05-13 11:28:22 -04004389 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004390
Alexis Hetuad527752015-07-07 13:31:44 -04004391 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004392 break;
4393
Alexis Hetu17809052015-05-13 11:28:22 -04004394 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004395
Alexis Hetua35d8232015-06-11 17:11:06 -04004396 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetuad6b8752015-06-09 16:15:30 -04004397 break;
4398
4399 case 216:
4400
Alexis Hetuad527752015-07-07 13:31:44 -04004401 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004402 break;
4403
4404 case 217:
4405
Alexis Hetua35d8232015-06-11 17:11:06 -04004406 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004407 break;
4408
4409 case 218:
4410
Alexis Hetue5246692015-06-18 12:34:52 -04004411 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004412 break;
4413
4414 case 219:
4415
Alexis Hetuad527752015-07-07 13:31:44 -04004416 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004417 break;
4418
4419 case 220:
4420
Alexis Hetuad527752015-07-07 13:31:44 -04004421 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004422 break;
4423
4424 case 221:
4425
Alexis Hetuad527752015-07-07 13:31:44 -04004426 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004427 break;
4428
4429 case 222:
4430
Alexis Hetuad527752015-07-07 13:31:44 -04004431 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004432 break;
4433
4434 case 223:
4435
Alexis Hetuad527752015-07-07 13:31:44 -04004436 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004437 break;
4438
4439 case 224:
4440
Alexis Hetuad527752015-07-07 13:31:44 -04004441 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004442 break;
4443
4444 case 225:
4445
Alexis Hetuad527752015-07-07 13:31:44 -04004446 { (yyval.interm.intermAggregate) = 0; }
Alexis Hetue5246692015-06-18 12:34:52 -04004447 break;
4448
4449 case 226:
4450
Alexis Hetuad527752015-07-07 13:31:44 -04004451 { context->symbolTable.push(); }
4452 break;
4453
4454 case 227:
4455
4456 { context->symbolTable.pop(); }
4457 break;
4458
4459 case 228:
4460
Nicolas Capens7d626792015-02-17 17:58:31 -05004461 {
4462 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4463 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004464 (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004465 }
4466 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4467 }
4468 break;
4469
Alexis Hetua35d8232015-06-11 17:11:06 -04004470 case 229:
4471
Alexis Hetuad527752015-07-07 13:31:44 -04004472 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004473 break;
4474
4475 case 230:
4476
Alexis Hetuad527752015-07-07 13:31:44 -04004477 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004478 break;
4479
4480 case 231:
4481
Alexis Hetue5246692015-06-18 12:34:52 -04004482 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004483 break;
4484
4485 case 232:
4486
Alexis Hetue5246692015-06-18 12:34:52 -04004487 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4488 break;
4489
4490 case 233:
4491
Alexis Hetuad527752015-07-07 13:31:44 -04004492 { context->symbolTable.push(); }
4493 break;
4494
4495 case 234:
4496
4497 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4498 break;
4499
4500 case 235:
4501
John Bauman66b8ab22014-05-06 15:57:45 -04004502 {
4503 (yyval.interm.intermNode) = 0;
4504 }
4505 break;
4506
Alexis Hetuad527752015-07-07 13:31:44 -04004507 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004508
4509 {
4510 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4511 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004512 (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004513 }
4514 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4515 }
4516 break;
4517
Alexis Hetuad527752015-07-07 13:31:44 -04004518 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004519
4520 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004521 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004522 }
4523 break;
4524
Alexis Hetuad527752015-07-07 13:31:44 -04004525 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004526
4527 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004528 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004529 }
4530 break;
4531
Alexis Hetuad527752015-07-07 13:31:44 -04004532 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004533
4534 { (yyval.interm.intermNode) = 0; }
4535 break;
4536
Alexis Hetuad527752015-07-07 13:31:44 -04004537 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004538
4539 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4540 break;
4541
Alexis Hetuad527752015-07-07 13:31:44 -04004542 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004543
4544 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004545 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004546 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004547 (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 -04004548 }
4549 break;
4550
Alexis Hetuad527752015-07-07 13:31:44 -04004551 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004552
4553 {
4554 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4555 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4556 }
4557 break;
4558
Alexis Hetuad527752015-07-07 13:31:44 -04004559 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004560
4561 {
4562 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4563 (yyval.interm.nodePair).node2 = 0;
4564 }
4565 break;
4566
Alexis Hetuad527752015-07-07 13:31:44 -04004567 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004568
Alexis Hetue5246692015-06-18 12:34:52 -04004569 { context->incrSwitchNestingLevel(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004570 break;
4571
Alexis Hetuad527752015-07-07 13:31:44 -04004572 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004573
4574 {
Alexis Hetue5246692015-06-18 12:34:52 -04004575 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)]));
4576 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004577 }
4578 break;
4579
Alexis Hetuad527752015-07-07 13:31:44 -04004580 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004581
4582 {
Alexis Hetue5246692015-06-18 12:34:52 -04004583 (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004584 }
4585 break;
4586
Alexis Hetuad527752015-07-07 13:31:44 -04004587 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004588
4589 {
Alexis Hetue5246692015-06-18 12:34:52 -04004590 (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)]));
4591 }
4592 break;
4593
Alexis Hetuad527752015-07-07 13:31:44 -04004594 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004595
4596 {
John Bauman66b8ab22014-05-06 15:57:45 -04004597 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4598 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4599 context->recover();
4600 }
4601 break;
4602
Alexis Hetuad527752015-07-07 13:31:44 -04004603 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004604
4605 {
4606 TIntermNode* intermNode;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004607 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004608 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004609 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004610 context->recover();
4611
Alexis Hetue5246692015-06-18 12:34:52 -04004612 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 -04004613 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4614 else {
4615 context->recover();
4616 (yyval.interm.intermTypedNode) = 0;
4617 }
4618 }
4619 break;
4620
Alexis Hetuad527752015-07-07 13:31:44 -04004621 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004622
Alexis Hetu0a655842015-06-22 16:52:11 -04004623 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004624 break;
4625
Alexis Hetuad527752015-07-07 13:31:44 -04004626 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004627
4628 {
4629 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004630 (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 -04004631 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004632 }
4633 break;
4634
Alexis Hetuad527752015-07-07 13:31:44 -04004635 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004636
Alexis Hetu0a655842015-06-22 16:52:11 -04004637 { context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004638 break;
4639
Alexis Hetuad527752015-07-07 13:31:44 -04004640 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004641
4642 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004643 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004644 context->recover();
4645
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004646 (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 -04004647 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004648 }
4649 break;
4650
Alexis Hetuad527752015-07-07 13:31:44 -04004651 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004652
Alexis Hetu0a655842015-06-22 16:52:11 -04004653 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Nicolas Capens3c20f802015-02-17 17:17:20 -05004654 break;
4655
Alexis Hetuad527752015-07-07 13:31:44 -04004656 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004657
4658 {
Alexis Hetue5246692015-06-18 12:34:52 -04004659 context->symbolTable.pop();
4660 (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 -04004661 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004662 }
4663 break;
4664
Alexis Hetu76a343a2015-06-04 17:21:22 -04004665 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004666
4667 {
Alexis Hetuad527752015-07-07 13:31:44 -04004668 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004669 }
4670 break;
4671
Alexis Hetu76a343a2015-06-04 17:21:22 -04004672 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004673
4674 {
Alexis Hetuad527752015-07-07 13:31:44 -04004675 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004676 }
4677 break;
4678
4679 case 258:
4680
4681 {
Alexis Hetuad527752015-07-07 13:31:44 -04004682 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4683 }
4684 break;
4685
4686 case 259:
4687
4688 {
4689 (yyval.interm.intermTypedNode) = 0;
4690 }
4691 break;
4692
4693 case 260:
4694
4695 {
Alexis Hetu17809052015-05-13 11:28:22 -04004696 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4697 (yyval.interm.nodePair).node2 = 0;
4698 }
4699 break;
4700
Alexis Hetuad527752015-07-07 13:31:44 -04004701 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004702
4703 {
4704 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4705 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4706 }
4707 break;
4708
Alexis Hetuad527752015-07-07 13:31:44 -04004709 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004710
4711 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004712 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004713 }
4714 break;
4715
Alexis Hetuad527752015-07-07 13:31:44 -04004716 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004717
4718 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004719 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004720 }
4721 break;
4722
Alexis Hetuad527752015-07-07 13:31:44 -04004723 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004724
4725 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004726 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004727 }
4728 break;
4729
Alexis Hetuad527752015-07-07 13:31:44 -04004730 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004731
4732 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004733 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004734 }
4735 break;
4736
Alexis Hetuad527752015-07-07 13:31:44 -04004737 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004738
4739 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004740 FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4741 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004742 }
4743 break;
4744
Alexis Hetuad527752015-07-07 13:31:44 -04004745 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004746
4747 {
Alexis Hetue5246692015-06-18 12:34:52 -04004748 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004749 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004750 }
4751 break;
4752
Alexis Hetuad527752015-07-07 13:31:44 -04004753 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004754
4755 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004756 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004757 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004758 }
4759 break;
4760
Alexis Hetue5246692015-06-18 12:34:52 -04004761 case 269:
4762
4763 {
Alexis Hetuad527752015-07-07 13:31:44 -04004764 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4765 }
4766 break;
4767
4768 case 270:
4769
4770 {
4771 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4772 }
4773 break;
4774
4775 case 271:
4776
4777 {
John Bauman66b8ab22014-05-06 15:57:45 -04004778 TFunction* function = (yyvsp[(1) - (1)].interm).function;
4779
Alexis Hetu0a655842015-06-22 16:52:11 -04004780 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004781
4782 if (builtIn)
4783 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004784 context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004785 context->recover();
4786 }
4787
Alexis Hetu0a655842015-06-22 16:52:11 -04004788 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004789 //
4790 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4791 // as it would have just been put in the symbol table. Otherwise, we're looking up
4792 // an earlier occurance.
4793 //
4794 if (prevDec->isDefined()) {
4795 //
4796 // Then this function already has a body.
4797 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004798 context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004799 context->recover();
4800 }
4801 prevDec->setDefined();
4802
4803 //
4804 // Raise error message if main function takes any parameters or return anything other than void
4805 //
4806 if (function->getName() == "main") {
4807 if (function->getParamCount() > 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004808 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004809 context->recover();
4810 }
4811 if (function->getReturnType().getBasicType() != EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004812 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004813 context->recover();
4814 }
4815 }
4816
4817 //
4818 // Remember the return type for later checking for RETURN statements.
4819 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004820 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4821 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004822
4823 //
4824 // Insert parameters into the symbol table.
4825 // If the parameter has no name, it's not an error, just don't insert it
4826 // (could be used for unused args).
4827 //
4828 // Also, accumulate the list of parameters into the HIL, so lower level code
4829 // knows where to find parameters.
4830 //
4831 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004832 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004833 const TParameter& param = function->getParam(i);
4834 if (param.name != 0) {
4835 TVariable *variable = new TVariable(param.name, *param.type);
4836 //
4837 // Insert the parameters with name in the symbol table.
4838 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004839 if (! context->symbolTable.declare(*variable)) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004840 context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004841 context->recover();
4842 delete variable;
4843 }
4844
4845 //
4846 // Add the parameter to the HIL
4847 //
4848 paramNodes = context->intermediate.growAggregate(
4849 paramNodes,
4850 context->intermediate.addSymbol(variable->getUniqueId(),
4851 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004852 variable->getType(), (yylsp[(1) - (1)])),
4853 (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004854 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004855 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004856 }
4857 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004858 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004859 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004860 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004861 }
4862 break;
4863
Alexis Hetuad527752015-07-07 13:31:44 -04004864 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004865
4866 {
4867 //?? Check that all paths return a value if return type != void ?
4868 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004869 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004870 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 -04004871 context->recover();
4872 }
4873
Alexis Hetu253fdd12015-07-07 15:12:46 -04004874 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), (yyloc));
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004875 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004876 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4877 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4878
4879 // store the pragma information for debug and optimize and other vendor specific
4880 // information. This information can be queried from the parse tree
4881 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4882 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4883
4884 if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
4885 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
4886
4887 context->symbolTable.pop();
4888 }
4889 break;
4890
4891
4892
4893 default: break;
4894 }
4895 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4896
4897 YYPOPSTACK (yylen);
4898 yylen = 0;
4899 YY_STACK_PRINT (yyss, yyssp);
4900
4901 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004902 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004903
4904 /* Now `shift' the result of the reduction. Determine what state
4905 that goes to, based on the state we popped back to and the rule
4906 number reduced by. */
4907
4908 yyn = yyr1[yyn];
4909
4910 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4911 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4912 yystate = yytable[yystate];
4913 else
4914 yystate = yydefgoto[yyn - YYNTOKENS];
4915
4916 goto yynewstate;
4917
4918
4919/*------------------------------------.
4920| yyerrlab -- here on detecting error |
4921`------------------------------------*/
4922yyerrlab:
4923 /* If not already recovering from an error, report this error. */
4924 if (!yyerrstatus)
4925 {
4926 ++yynerrs;
4927#if ! YYERROR_VERBOSE
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004928 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004929#else
4930 {
4931 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4932 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4933 {
4934 YYSIZE_T yyalloc = 2 * yysize;
4935 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4936 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4937 if (yymsg != yymsgbuf)
4938 YYSTACK_FREE (yymsg);
4939 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4940 if (yymsg)
4941 yymsg_alloc = yyalloc;
4942 else
4943 {
4944 yymsg = yymsgbuf;
4945 yymsg_alloc = sizeof yymsgbuf;
4946 }
4947 }
4948
4949 if (0 < yysize && yysize <= yymsg_alloc)
4950 {
4951 (void) yysyntax_error (yymsg, yystate, yychar);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004952 yyerror (&yylloc, context, yymsg);
John Bauman66b8ab22014-05-06 15:57:45 -04004953 }
4954 else
4955 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004956 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004957 if (yysize != 0)
4958 goto yyexhaustedlab;
4959 }
4960 }
4961#endif
4962 }
4963
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004964 yyerror_range[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004965
4966 if (yyerrstatus == 3)
4967 {
4968 /* If just tried and failed to reuse lookahead token after an
4969 error, discard it. */
4970
4971 if (yychar <= YYEOF)
4972 {
4973 /* Return failure if at end of input. */
4974 if (yychar == YYEOF)
4975 YYABORT;
4976 }
4977 else
4978 {
4979 yydestruct ("Error: discarding",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004980 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04004981 yychar = YYEMPTY;
4982 }
4983 }
4984
4985 /* Else will try to reuse lookahead token after shifting the error
4986 token. */
4987 goto yyerrlab1;
4988
4989
4990/*---------------------------------------------------.
4991| yyerrorlab -- error raised explicitly by YYERROR. |
4992`---------------------------------------------------*/
4993yyerrorlab:
4994
4995 /* Pacify compilers like GCC when the user code never invokes
4996 YYERROR and the label yyerrorlab therefore never appears in user
4997 code. */
4998 if (/*CONSTCOND*/ 0)
4999 goto yyerrorlab;
5000
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005001 yyerror_range[0] = yylsp[1-yylen];
John Bauman66b8ab22014-05-06 15:57:45 -04005002 /* Do not reclaim the symbols of the rule which action triggered
5003 this YYERROR. */
5004 YYPOPSTACK (yylen);
5005 yylen = 0;
5006 YY_STACK_PRINT (yyss, yyssp);
5007 yystate = *yyssp;
5008 goto yyerrlab1;
5009
5010
5011/*-------------------------------------------------------------.
5012| yyerrlab1 -- common code for both syntax error and YYERROR. |
5013`-------------------------------------------------------------*/
5014yyerrlab1:
5015 yyerrstatus = 3; /* Each real token shifted decrements this. */
5016
5017 for (;;)
5018 {
5019 yyn = yypact[yystate];
5020 if (yyn != YYPACT_NINF)
5021 {
5022 yyn += YYTERROR;
5023 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5024 {
5025 yyn = yytable[yyn];
5026 if (0 < yyn)
5027 break;
5028 }
5029 }
5030
5031 /* Pop the current state because it cannot handle the error token. */
5032 if (yyssp == yyss)
5033 YYABORT;
5034
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005035 yyerror_range[0] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005036 yydestruct ("Error: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005037 yystos[yystate], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005038 YYPOPSTACK (1);
5039 yystate = *yyssp;
5040 YY_STACK_PRINT (yyss, yyssp);
5041 }
5042
5043 *++yyvsp = yylval;
5044
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005045 yyerror_range[1] = yylloc;
5046 /* Using YYLLOC is tempting, but would change the location of
5047 the lookahead. YYLOC is available though. */
5048 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
5049 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005050
5051 /* Shift the error token. */
5052 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5053
5054 yystate = yyn;
5055 goto yynewstate;
5056
5057
5058/*-------------------------------------.
5059| yyacceptlab -- YYACCEPT comes here. |
5060`-------------------------------------*/
5061yyacceptlab:
5062 yyresult = 0;
5063 goto yyreturn;
5064
5065/*-----------------------------------.
5066| yyabortlab -- YYABORT comes here. |
5067`-----------------------------------*/
5068yyabortlab:
5069 yyresult = 1;
5070 goto yyreturn;
5071
5072#if !defined(yyoverflow) || YYERROR_VERBOSE
5073/*-------------------------------------------------.
5074| yyexhaustedlab -- memory exhaustion comes here. |
5075`-------------------------------------------------*/
5076yyexhaustedlab:
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005077 yyerror (&yylloc, context, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005078 yyresult = 2;
5079 /* Fall through. */
5080#endif
5081
5082yyreturn:
5083 if (yychar != YYEMPTY)
5084 yydestruct ("Cleanup: discarding lookahead",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005085 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005086 /* Do not reclaim the symbols of the rule which action triggered
5087 this YYABORT or YYACCEPT. */
5088 YYPOPSTACK (yylen);
5089 YY_STACK_PRINT (yyss, yyssp);
5090 while (yyssp != yyss)
5091 {
5092 yydestruct ("Cleanup: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005093 yystos[*yyssp], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005094 YYPOPSTACK (1);
5095 }
5096#ifndef yyoverflow
5097 if (yyss != yyssa)
5098 YYSTACK_FREE (yyss);
5099#endif
5100#if YYERROR_VERBOSE
5101 if (yymsg != yymsgbuf)
5102 YYSTACK_FREE (yymsg);
5103#endif
5104 /* Make sure YYID is used. */
5105 return YYID (yyresult);
5106}
5107
5108
5109
5110
5111
5112int glslang_parse(TParseContext* context) {
5113 return yyparse(context);
5114}
5115