blob: c5c98bb301b8c8c79833a155e5cb5cd0a2179e2c [file] [log] [blame]
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001
2/* A Bison parser, made by GNU Bison 2.4.1. */
John Bauman66b8ab22014-05-06 15:57:45 -04003
4/* Skeleton implementation for Bison's Yacc-like parsers in C
5
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
John Bauman66b8ab22014-05-06 15:57:45 -04008
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22/* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
31
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
34
35/* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
37
38/* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
44
45/* Identify Bison output. */
46#define YYBISON 1
47
48/* Bison version. */
Nicolas Capense9c5e4f2014-05-28 22:46:43 -040049#define YYBISON_VERSION "2.4.1"
John Bauman66b8ab22014-05-06 15:57:45 -040050
51/* Skeleton name. */
52#define YYSKELETON_NAME "yacc.c"
53
54/* Pure parsers. */
55#define YYPURE 1
56
57/* Push parsers. */
58#define YYPUSH 0
59
60/* Pull parsers. */
61#define YYPULL 1
62
63/* Using locations. */
Alexis Hetu15ae36c2015-06-18 21:10:09 -040064#define YYLSP_NEEDED 1
John Bauman66b8ab22014-05-06 15:57:45 -040065
66
67
68/* Copy the first part of user declarations. */
69
70
71//
Alexis Hetub14178b2015-04-13 13:23:20 -040072// Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved.
John Bauman66b8ab22014-05-06 15:57:45 -040073// Use of this source code is governed by a BSD-style license that can be
74// found in the LICENSE file.
75//
76
77// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
78
79// Ignore errors in auto-generated code.
80#if defined(__GNUC__)
81#pragma GCC diagnostic ignored "-Wunused-function"
82#pragma GCC diagnostic ignored "-Wunused-variable"
83#pragma GCC diagnostic ignored "-Wswitch-enum"
84#elif defined(_MSC_VER)
85#pragma warning(disable: 4065)
86#pragma warning(disable: 4189)
87#pragma warning(disable: 4505)
88#pragma warning(disable: 4701)
89#endif
90
Nicolas Capenscc863da2015-01-21 15:50:55 -050091#include "SymbolTable.h"
92#include "ParseHelper.h"
John Bauman66b8ab22014-05-06 15:57:45 -040093
John Baumand4ae8632014-05-06 16:18:33 -040094#define YYENABLE_NLS 0
John Baumand4ae8632014-05-06 16:18:33 -040095
Alexis Hetu0a655842015-06-22 16:52:11 -040096#define YYLEX_PARAM context->getScanner()
John Bauman66b8ab22014-05-06 15:57:45 -040097
98
99
100/* Enabling traces. */
101#ifndef YYDEBUG
102# define YYDEBUG 0
103#endif
104
105/* Enabling verbose error messages. */
106#ifdef YYERROR_VERBOSE
107# undef YYERROR_VERBOSE
108# define YYERROR_VERBOSE 1
109#else
110# define YYERROR_VERBOSE 0
111#endif
112
113/* Enabling the token table. */
114#ifndef YYTOKEN_TABLE
115# define YYTOKEN_TABLE 0
116#endif
117
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400118/* "%code requires" blocks. */
119
120
121#define YYLTYPE TSourceLoc
122#define YYLTYPE_IS_DECLARED 1
123
124
125
John Bauman66b8ab22014-05-06 15:57:45 -0400126
127/* Tokens. */
128#ifndef YYTOKENTYPE
129# define YYTOKENTYPE
130 /* Put the tokens into the symbol table, so that GDB and other debuggers
131 know about them. */
132 enum yytokentype {
133 INVARIANT = 258,
134 HIGH_PRECISION = 259,
135 MEDIUM_PRECISION = 260,
136 LOW_PRECISION = 261,
137 PRECISION = 262,
138 ATTRIBUTE = 263,
139 CONST_QUAL = 264,
140 BOOL_TYPE = 265,
141 FLOAT_TYPE = 266,
142 INT_TYPE = 267,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500143 UINT_TYPE = 268,
144 BREAK = 269,
145 CONTINUE = 270,
146 DO = 271,
147 ELSE = 272,
148 FOR = 273,
149 IF = 274,
150 DISCARD = 275,
151 RETURN = 276,
152 SWITCH = 277,
153 CASE = 278,
154 DEFAULT = 279,
155 BVEC2 = 280,
156 BVEC3 = 281,
157 BVEC4 = 282,
158 IVEC2 = 283,
159 IVEC3 = 284,
160 IVEC4 = 285,
161 VEC2 = 286,
162 VEC3 = 287,
163 VEC4 = 288,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500164 UVEC2 = 289,
165 UVEC3 = 290,
166 UVEC4 = 291,
167 MATRIX2 = 292,
168 MATRIX3 = 293,
169 MATRIX4 = 294,
170 IN_QUAL = 295,
171 OUT_QUAL = 296,
172 INOUT_QUAL = 297,
173 UNIFORM = 298,
174 VARYING = 299,
Alexis Hetub14178b2015-04-13 13:23:20 -0400175 MATRIX2x3 = 300,
176 MATRIX3x2 = 301,
177 MATRIX2x4 = 302,
178 MATRIX4x2 = 303,
179 MATRIX3x4 = 304,
180 MATRIX4x3 = 305,
181 CENTROID = 306,
182 FLAT = 307,
183 SMOOTH = 308,
184 STRUCT = 309,
185 VOID_TYPE = 310,
186 WHILE = 311,
187 SAMPLER2D = 312,
188 SAMPLERCUBE = 313,
189 SAMPLER_EXTERNAL_OES = 314,
190 SAMPLER2DRECT = 315,
191 SAMPLER2DARRAY = 316,
192 ISAMPLER2D = 317,
193 ISAMPLER3D = 318,
194 ISAMPLERCUBE = 319,
195 ISAMPLER2DARRAY = 320,
196 USAMPLER2D = 321,
197 USAMPLER3D = 322,
198 USAMPLERCUBE = 323,
199 USAMPLER2DARRAY = 324,
200 SAMPLER3D = 325,
201 SAMPLER3DRECT = 326,
202 SAMPLER2DSHADOW = 327,
203 SAMPLERCUBESHADOW = 328,
204 SAMPLER2DARRAYSHADOW = 329,
205 LAYOUT = 330,
206 IDENTIFIER = 331,
207 TYPE_NAME = 332,
208 FLOATCONSTANT = 333,
209 INTCONSTANT = 334,
210 UINTCONSTANT = 335,
211 BOOLCONSTANT = 336,
212 FIELD_SELECTION = 337,
213 LEFT_OP = 338,
214 RIGHT_OP = 339,
215 INC_OP = 340,
216 DEC_OP = 341,
217 LE_OP = 342,
218 GE_OP = 343,
219 EQ_OP = 344,
220 NE_OP = 345,
221 AND_OP = 346,
222 OR_OP = 347,
223 XOR_OP = 348,
224 MUL_ASSIGN = 349,
225 DIV_ASSIGN = 350,
226 ADD_ASSIGN = 351,
227 MOD_ASSIGN = 352,
228 LEFT_ASSIGN = 353,
229 RIGHT_ASSIGN = 354,
230 AND_ASSIGN = 355,
231 XOR_ASSIGN = 356,
232 OR_ASSIGN = 357,
233 SUB_ASSIGN = 358,
234 LEFT_PAREN = 359,
235 RIGHT_PAREN = 360,
236 LEFT_BRACKET = 361,
237 RIGHT_BRACKET = 362,
238 LEFT_BRACE = 363,
239 RIGHT_BRACE = 364,
240 DOT = 365,
241 COMMA = 366,
242 COLON = 367,
243 EQUAL = 368,
244 SEMICOLON = 369,
245 BANG = 370,
246 DASH = 371,
247 TILDE = 372,
248 PLUS = 373,
249 STAR = 374,
250 SLASH = 375,
251 PERCENT = 376,
252 LEFT_ANGLE = 377,
253 RIGHT_ANGLE = 378,
254 VERTICAL_BAR = 379,
255 CARET = 380,
256 AMPERSAND = 381,
257 QUESTION = 382
John Bauman66b8ab22014-05-06 15:57:45 -0400258 };
259#endif
260
261
262
263#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
264typedef union YYSTYPE
265{
266
267
268 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400269 union {
270 TString *string;
271 float f;
272 int i;
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500273 unsigned int u;
John Bauman66b8ab22014-05-06 15:57:45 -0400274 bool b;
275 };
276 TSymbol* symbol;
277 } lex;
278 struct {
John Bauman66b8ab22014-05-06 15:57:45 -0400279 TOperator op;
280 union {
281 TIntermNode* intermNode;
282 TIntermNodePair nodePair;
283 TIntermTyped* intermTypedNode;
284 TIntermAggregate* intermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -0400285 TIntermSwitch* intermSwitch;
286 TIntermCase* intermCase;
John Bauman66b8ab22014-05-06 15:57:45 -0400287 };
288 union {
289 TPublicType type;
290 TPrecision precision;
Nicolas Capens7d626792015-02-17 17:58:31 -0500291 TLayoutQualifier layoutQualifier;
John Bauman66b8ab22014-05-06 15:57:45 -0400292 TQualifier qualifier;
293 TFunction* function;
294 TParameter param;
Alexis Hetua8b364b2015-06-10 11:48:40 -0400295 TField* field;
296 TFieldList* fieldList;
John Bauman66b8ab22014-05-06 15:57:45 -0400297 };
298 } interm;
299
300
301
302} YYSTYPE;
303# define YYSTYPE_IS_TRIVIAL 1
304# define yystype YYSTYPE /* obsolescent; will be withdrawn */
305# define YYSTYPE_IS_DECLARED 1
306#endif
307
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400308#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
309typedef struct YYLTYPE
310{
311 int first_line;
312 int first_column;
313 int last_line;
314 int last_column;
315} YYLTYPE;
316# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
317# define YYLTYPE_IS_DECLARED 1
318# define YYLTYPE_IS_TRIVIAL 1
319#endif
320
John Bauman66b8ab22014-05-06 15:57:45 -0400321
322/* Copy the second part of user declarations. */
323
324
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400325extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
326extern void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason);
327
Alexis Hetu253fdd12015-07-07 15:12:46 -0400328#define YYLLOC_DEFAULT(Current, Rhs, N) \
329 do { \
330 if (N) { \
331 (Current).first_file = YYRHSLOC(Rhs, 1).first_file; \
332 (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
333 (Current).last_file = YYRHSLOC(Rhs, N).last_file; \
334 (Current).last_line = YYRHSLOC(Rhs, N).last_line; \
335 } \
336 else { \
337 (Current).first_file = YYRHSLOC(Rhs, 0).last_file; \
338 (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \
339 (Current).last_file = YYRHSLOC(Rhs, 0).last_file; \
340 (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
341 } \
342 } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400343
344#define FRAG_VERT_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400345 if (context->getShaderType() != GL_FRAGMENT_SHADER && \
346 context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400347 context->error(L, " supported in vertex/fragment shaders only ", S); \
348 context->recover(); \
349 } \
350}
351
352#define VERTEX_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400353 if (context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400354 context->error(L, " supported in vertex shaders only ", S); \
355 context->recover(); \
356 } \
357}
358
359#define FRAG_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400360 if (context->getShaderType() != GL_FRAGMENT_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400361 context->error(L, " supported in fragment shaders only ", S); \
362 context->recover(); \
363 } \
364}
365
Nicolas Capensc6841852015-02-15 14:25:37 -0500366#define ES2_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400367 if (context->getShaderVersion() != 100) { \
Nicolas Capensc6841852015-02-15 14:25:37 -0500368 context->error(L, " supported in GLSL ES 1.00 only ", S); \
369 context->recover(); \
370 } \
371}
372
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400373#define ES3_ONLY(TOKEN, LINE, REASON) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400374 if (context->getShaderVersion() != 300) { \
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400375 context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
Nicolas Capensc6841852015-02-15 14:25:37 -0500376 context->recover(); \
377 } \
378}
379
John Bauman66b8ab22014-05-06 15:57:45 -0400380
381
382#ifdef short
383# undef short
384#endif
385
386#ifdef YYTYPE_UINT8
387typedef YYTYPE_UINT8 yytype_uint8;
388#else
389typedef unsigned char yytype_uint8;
390#endif
391
392#ifdef YYTYPE_INT8
393typedef YYTYPE_INT8 yytype_int8;
394#elif (defined __STDC__ || defined __C99__FUNC__ \
395 || defined __cplusplus || defined _MSC_VER)
396typedef signed char yytype_int8;
397#else
398typedef short int yytype_int8;
399#endif
400
401#ifdef YYTYPE_UINT16
402typedef YYTYPE_UINT16 yytype_uint16;
403#else
404typedef unsigned short int yytype_uint16;
405#endif
406
407#ifdef YYTYPE_INT16
408typedef YYTYPE_INT16 yytype_int16;
409#else
410typedef short int yytype_int16;
411#endif
412
413#ifndef YYSIZE_T
414# ifdef __SIZE_TYPE__
415# define YYSIZE_T __SIZE_TYPE__
416# elif defined size_t
417# define YYSIZE_T size_t
418# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
419 || defined __cplusplus || defined _MSC_VER)
420# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
421# define YYSIZE_T size_t
422# else
423# define YYSIZE_T unsigned int
424# endif
425#endif
426
427#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
428
429#ifndef YY_
Nicolas Capense9c5e4f2014-05-28 22:46:43 -0400430# if YYENABLE_NLS
John Bauman66b8ab22014-05-06 15:57:45 -0400431# if ENABLE_NLS
432# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
433# define YY_(msgid) dgettext ("bison-runtime", msgid)
434# endif
435# endif
436# ifndef YY_
437# define YY_(msgid) msgid
438# endif
439#endif
440
441/* Suppress unused-variable warnings by "using" E. */
442#if ! defined lint || defined __GNUC__
443# define YYUSE(e) ((void) (e))
444#else
445# define YYUSE(e) /* empty */
446#endif
447
448/* Identity function, used to suppress warnings about constant conditions. */
449#ifndef lint
450# define YYID(n) (n)
451#else
452#if (defined __STDC__ || defined __C99__FUNC__ \
453 || defined __cplusplus || defined _MSC_VER)
454static int
455YYID (int yyi)
456#else
457static int
458YYID (yyi)
459 int yyi;
460#endif
461{
462 return yyi;
463}
464#endif
465
466#if ! defined yyoverflow || YYERROR_VERBOSE
467
468/* The parser invokes alloca or malloc; define the necessary symbols. */
469
470# ifdef YYSTACK_USE_ALLOCA
471# if YYSTACK_USE_ALLOCA
472# ifdef __GNUC__
473# define YYSTACK_ALLOC __builtin_alloca
474# elif defined __BUILTIN_VA_ARG_INCR
475# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
476# elif defined _AIX
477# define YYSTACK_ALLOC __alloca
478# elif defined _MSC_VER
479# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
480# define alloca _alloca
481# else
482# define YYSTACK_ALLOC alloca
483# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
484 || defined __cplusplus || defined _MSC_VER)
485# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
486# ifndef _STDLIB_H
487# define _STDLIB_H 1
488# endif
489# endif
490# endif
491# endif
492# endif
493
494# ifdef YYSTACK_ALLOC
495 /* Pacify GCC's `empty if-body' warning. */
496# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
497# ifndef YYSTACK_ALLOC_MAXIMUM
498 /* The OS might guarantee only one guard page at the bottom of the stack,
499 and a page size can be as small as 4096 bytes. So we cannot safely
500 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
501 to allow for a few compiler-allocated temporary stack slots. */
502# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
503# endif
504# else
505# define YYSTACK_ALLOC YYMALLOC
506# define YYSTACK_FREE YYFREE
507# ifndef YYSTACK_ALLOC_MAXIMUM
508# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
509# endif
510# if (defined __cplusplus && ! defined _STDLIB_H \
511 && ! ((defined YYMALLOC || defined malloc) \
512 && (defined YYFREE || defined free)))
513# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
514# ifndef _STDLIB_H
515# define _STDLIB_H 1
516# endif
517# endif
518# ifndef YYMALLOC
519# define YYMALLOC malloc
520# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
521 || defined __cplusplus || defined _MSC_VER)
522void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
523# endif
524# endif
525# ifndef YYFREE
526# define YYFREE free
527# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
528 || defined __cplusplus || defined _MSC_VER)
529void free (void *); /* INFRINGES ON USER NAME SPACE */
530# endif
531# endif
532# endif
533#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
534
535
536#if (! defined yyoverflow \
537 && (! defined __cplusplus \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400538 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
539 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
John Bauman66b8ab22014-05-06 15:57:45 -0400540
541/* A type that is properly aligned for any stack member. */
542union yyalloc
543{
544 yytype_int16 yyss_alloc;
545 YYSTYPE yyvs_alloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400546 YYLTYPE yyls_alloc;
John Bauman66b8ab22014-05-06 15:57:45 -0400547};
548
549/* The size of the maximum gap between one aligned stack and the next. */
550# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
551
552/* The size of an array large to enough to hold all stacks, each with
553 N elements. */
554# define YYSTACK_BYTES(N) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400555 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
556 + 2 * YYSTACK_GAP_MAXIMUM)
John Bauman66b8ab22014-05-06 15:57:45 -0400557
558/* Copy COUNT objects from FROM to TO. The source and destination do
559 not overlap. */
560# ifndef YYCOPY
561# if defined __GNUC__ && 1 < __GNUC__
562# define YYCOPY(To, From, Count) \
563 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
564# else
565# define YYCOPY(To, From, Count) \
566 do \
567 { \
568 YYSIZE_T yyi; \
569 for (yyi = 0; yyi < (Count); yyi++) \
570 (To)[yyi] = (From)[yyi]; \
571 } \
572 while (YYID (0))
573# endif
574# endif
575
576/* Relocate STACK from its old location to the new one. The
577 local variables YYSIZE and YYSTACKSIZE give the old and new number of
578 elements in the stack, and YYPTR gives the new location of the
579 stack. Advance YYPTR to a properly aligned location for the next
580 stack. */
581# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
582 do \
583 { \
584 YYSIZE_T yynewbytes; \
585 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
586 Stack = &yyptr->Stack_alloc; \
587 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
588 yyptr += yynewbytes / sizeof (*yyptr); \
589 } \
590 while (YYID (0))
591
592#endif
593
594/* YYFINAL -- State number of the termination state. */
Alexis Hetuad527752015-07-07 13:31:44 -0400595#define YYFINAL 112
John Bauman66b8ab22014-05-06 15:57:45 -0400596/* YYLAST -- Last index in YYTABLE. */
Alexis Hetuad527752015-07-07 13:31:44 -0400597#define YYLAST 2525
John Bauman66b8ab22014-05-06 15:57:45 -0400598
599/* YYNTOKENS -- Number of terminals. */
Alexis Hetub14178b2015-04-13 13:23:20 -0400600#define YYNTOKENS 128
John Bauman66b8ab22014-05-06 15:57:45 -0400601/* YYNNTS -- Number of nonterminals. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400602#define YYNNTS 93
John Bauman66b8ab22014-05-06 15:57:45 -0400603/* YYNRULES -- Number of rules. */
Alexis Hetuad527752015-07-07 13:31:44 -0400604#define YYNRULES 272
John Bauman66b8ab22014-05-06 15:57:45 -0400605/* YYNRULES -- Number of states. */
Alexis Hetuad527752015-07-07 13:31:44 -0400606#define YYNSTATES 413
John Bauman66b8ab22014-05-06 15:57:45 -0400607
608/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
609#define YYUNDEFTOK 2
Alexis Hetub14178b2015-04-13 13:23:20 -0400610#define YYMAXUTOK 382
John Bauman66b8ab22014-05-06 15:57:45 -0400611
612#define YYTRANSLATE(YYX) \
613 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
614
615/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
616static const yytype_uint8 yytranslate[] =
617{
618 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
644 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
645 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
646 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
647 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
648 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
649 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
650 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
651 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
Alexis Hetub027aa92015-01-19 15:56:12 -0500652 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500653 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Alexis Hetub14178b2015-04-13 13:23:20 -0400654 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
655 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
656 125, 126, 127
John Bauman66b8ab22014-05-06 15:57:45 -0400657};
658
659#if YYDEBUG
660/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
661 YYRHS. */
662static const yytype_uint16 yyprhs[] =
663{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500664 0, 0, 3, 5, 7, 9, 11, 13, 15, 19,
665 21, 26, 28, 32, 35, 38, 40, 42, 44, 48,
666 51, 54, 57, 59, 62, 66, 69, 71, 73, 75,
Alexis Hetu17809052015-05-13 11:28:22 -0400667 77, 80, 83, 86, 88, 90, 92, 94, 96, 100,
668 104, 108, 110, 114, 118, 120, 124, 128, 130, 134,
669 138, 142, 146, 148, 152, 156, 158, 162, 164, 168,
670 170, 174, 176, 180, 182, 186, 188, 192, 194, 200,
671 202, 206, 208, 210, 212, 214, 216, 218, 220, 222,
Alexis Hetua35d8232015-06-11 17:11:06 -0400672 224, 226, 228, 230, 234, 236, 239, 242, 245, 250,
673 256, 263, 273, 276, 279, 281, 283, 286, 290, 294,
674 297, 303, 307, 310, 314, 317, 318, 320, 322, 324,
675 326, 328, 332, 339, 347, 356, 362, 364, 367, 373,
676 380, 388, 393, 396, 398, 401, 403, 405, 407, 409,
Alexis Hetuad527752015-07-07 13:31:44 -0400677 411, 414, 416, 419, 421, 423, 426, 429, 433, 435,
678 437, 439, 442, 445, 447, 449, 452, 454, 456, 458,
679 463, 465, 469, 471, 475, 479, 481, 485, 490, 492,
680 494, 496, 498, 500, 502, 504, 506, 508, 510, 512,
681 514, 516, 518, 520, 522, 524, 526, 528, 530, 532,
682 534, 536, 538, 540, 542, 544, 546, 548, 550, 552,
683 554, 556, 558, 560, 562, 564, 566, 568, 570, 572,
684 574, 576, 578, 579, 586, 587, 593, 595, 598, 602,
685 607, 609, 613, 615, 620, 622, 624, 626, 628, 630,
686 632, 634, 636, 638, 640, 642, 645, 646, 647, 653,
687 655, 657, 658, 661, 662, 665, 668, 672, 674, 677,
688 679, 682, 688, 692, 694, 695, 702, 706, 709, 711,
689 716, 717, 724, 725, 734, 735, 743, 745, 747, 749,
690 750, 753, 757, 760, 763, 766, 770, 773, 775, 778,
691 780, 782, 783
John Bauman66b8ab22014-05-06 15:57:45 -0400692};
693
694/* YYRHS -- A `-1'-separated list of the rules' RHS. */
695static const yytype_int16 yyrhs[] =
696{
Alexis Hetu76a343a2015-06-04 17:21:22 -0400697 217, 0, -1, 76, -1, 129, -1, 79, -1, 80,
Alexis Hetub14178b2015-04-13 13:23:20 -0400698 -1, 78, -1, 81, -1, 104, 156, 105, -1, 130,
699 -1, 131, 106, 132, 107, -1, 133, -1, 131, 110,
700 82, -1, 131, 85, -1, 131, 86, -1, 156, -1,
701 134, -1, 135, -1, 131, 110, 135, -1, 137, 105,
702 -1, 136, 105, -1, 138, 55, -1, 138, -1, 138,
Alexis Hetue5246692015-06-18 12:34:52 -0400703 154, -1, 137, 111, 154, -1, 139, 104, -1, 180,
Alexis Hetub14178b2015-04-13 13:23:20 -0400704 -1, 76, -1, 82, -1, 131, -1, 85, 140, -1,
705 86, 140, -1, 141, 140, -1, 118, -1, 116, -1,
Alexis Hetu17809052015-05-13 11:28:22 -0400706 115, -1, 117, -1, 140, -1, 142, 119, 140, -1,
707 142, 120, 140, -1, 142, 121, 140, -1, 142, -1,
708 143, 118, 142, -1, 143, 116, 142, -1, 143, -1,
709 144, 83, 143, -1, 144, 84, 143, -1, 144, -1,
710 145, 122, 144, -1, 145, 123, 144, -1, 145, 87,
711 144, -1, 145, 88, 144, -1, 145, -1, 146, 89,
712 145, -1, 146, 90, 145, -1, 146, -1, 147, 126,
713 146, -1, 147, -1, 148, 125, 147, -1, 148, -1,
714 149, 124, 148, -1, 149, -1, 150, 91, 149, -1,
715 150, -1, 151, 93, 150, -1, 151, -1, 152, 92,
716 151, -1, 152, -1, 152, 127, 156, 112, 154, -1,
717 153, -1, 140, 155, 154, -1, 113, -1, 94, -1,
718 95, -1, 97, -1, 96, -1, 103, -1, 98, -1,
719 99, -1, 100, -1, 101, -1, 102, -1, 154, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400720 156, 111, 154, -1, 153, -1, 76, 108, -1, 160,
721 114, -1, 168, 114, -1, 7, 176, 180, 114, -1,
722 173, 158, 185, 109, 114, -1, 173, 158, 185, 109,
723 76, 114, -1, 173, 158, 185, 109, 76, 106, 157,
724 107, 114, -1, 173, 114, -1, 161, 105, -1, 163,
725 -1, 162, -1, 163, 165, -1, 162, 111, 165, -1,
726 170, 76, 104, -1, 175, 76, -1, 175, 76, 106,
727 157, 107, -1, 172, 166, 164, -1, 166, 164, -1,
728 172, 166, 167, -1, 166, 167, -1, -1, 40, -1,
729 41, -1, 42, -1, 175, -1, 169, -1, 168, 111,
730 76, -1, 168, 111, 76, 106, 157, 107, -1, 168,
731 111, 76, 106, 107, 113, 189, -1, 168, 111, 76,
732 106, 157, 107, 113, 189, -1, 168, 111, 76, 113,
733 189, -1, 170, -1, 170, 76, -1, 170, 76, 106,
734 157, 107, -1, 170, 76, 106, 107, 113, 189, -1,
735 170, 76, 106, 157, 107, 113, 189, -1, 170, 76,
736 113, 189, -1, 3, 76, -1, 175, -1, 173, 175,
737 -1, 53, -1, 52, -1, 9, -1, 8, -1, 44,
738 -1, 3, 44, -1, 174, -1, 171, 174, -1, 171,
Alexis Hetuad527752015-07-07 13:31:44 -0400739 -1, 177, -1, 177, 174, -1, 3, 174, -1, 3,
740 171, 174, -1, 9, -1, 40, -1, 41, -1, 51,
741 40, -1, 51, 41, -1, 43, -1, 180, -1, 176,
742 180, -1, 4, -1, 5, -1, 6, -1, 75, 104,
743 178, 105, -1, 179, -1, 178, 111, 179, -1, 76,
744 -1, 76, 113, 79, -1, 76, 113, 80, -1, 181,
745 -1, 181, 106, 107, -1, 181, 106, 157, 107, -1,
746 55, -1, 11, -1, 12, -1, 13, -1, 10, -1,
747 31, -1, 32, -1, 33, -1, 25, -1, 26, -1,
748 27, -1, 28, -1, 29, -1, 30, -1, 34, -1,
749 35, -1, 36, -1, 37, -1, 38, -1, 39, -1,
750 45, -1, 46, -1, 47, -1, 48, -1, 49, -1,
751 50, -1, 57, -1, 58, -1, 59, -1, 70, -1,
752 61, -1, 62, -1, 63, -1, 64, -1, 65, -1,
753 66, -1, 67, -1, 68, -1, 69, -1, 72, -1,
754 73, -1, 74, -1, 182, -1, 77, -1, -1, 54,
755 76, 108, 183, 185, 109, -1, -1, 54, 108, 184,
756 185, 109, -1, 186, -1, 185, 186, -1, 175, 187,
757 114, -1, 173, 175, 187, 114, -1, 188, -1, 187,
758 111, 188, -1, 76, -1, 76, 106, 157, 107, -1,
759 154, -1, 159, -1, 193, -1, 192, -1, 190, -1,
760 202, -1, 203, -1, 205, -1, 207, -1, 209, -1,
761 216, -1, 108, 109, -1, -1, -1, 108, 194, 201,
762 195, 109, -1, 200, -1, 192, -1, -1, 198, 200,
763 -1, -1, 199, 192, -1, 108, 109, -1, 108, 201,
764 109, -1, 191, -1, 201, 191, -1, 114, -1, 156,
765 114, -1, 19, 104, 156, 105, 204, -1, 197, 17,
766 197, -1, 197, -1, -1, 22, 104, 156, 105, 206,
767 193, -1, 23, 157, 112, -1, 24, 112, -1, 156,
768 -1, 170, 76, 113, 189, -1, -1, 56, 104, 210,
769 208, 105, 196, -1, -1, 16, 211, 197, 56, 104,
770 156, 105, 114, -1, -1, 18, 104, 212, 213, 215,
771 105, 196, -1, 202, -1, 190, -1, 208, -1, -1,
772 214, 114, -1, 214, 114, 156, -1, 15, 114, -1,
773 14, 114, -1, 21, 114, -1, 21, 156, 114, -1,
774 20, 114, -1, 218, -1, 217, 218, -1, 219, -1,
775 159, -1, -1, 160, 220, 200, -1
John Bauman66b8ab22014-05-06 15:57:45 -0400776};
777
778/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
779static const yytype_uint16 yyrline[] =
780{
Alexis Hetu253fdd12015-07-07 15:12:46 -0400781 0, 214, 214, 233, 236, 241, 246, 251, 256, 262,
Alexis Hetu950cb442015-07-06 11:38:53 -0400782 265, 268, 271, 274, 277, 283, 291, 302, 306, 314,
783 317, 323, 327, 334, 340, 349, 357, 363, 370, 380,
784 383, 393, 403, 425, 426, 427, 428, 436, 437, 441,
785 445, 453, 454, 457, 463, 464, 468, 475, 476, 479,
786 482, 485, 491, 492, 495, 501, 502, 509, 510, 517,
787 518, 525, 526, 532, 533, 539, 540, 546, 547, 553,
788 554, 562, 563, 564, 565, 567, 568, 569, 572, 575,
789 578, 581, 587, 590, 601, 609, 617, 644, 650, 657,
790 661, 665, 669, 676, 713, 716, 723, 731, 752, 773,
791 783, 811, 816, 826, 831, 841, 844, 847, 850, 856,
792 863, 866, 870, 874, 879, 884, 891, 895, 899, 903,
793 908, 913, 917, 924, 934, 940, 943, 949, 955, 962,
794 971, 980, 983, 986, 993, 997, 1001, 1006, 1014, 1017,
795 1021, 1025, 1034, 1043, 1051, 1061, 1068, 1071, 1074, 1080,
796 1087, 1090, 1096, 1099, 1102, 1108, 1111, 1116, 1131, 1135,
797 1139, 1143, 1147, 1151, 1156, 1161, 1166, 1171, 1176, 1181,
798 1186, 1191, 1196, 1201, 1206, 1211, 1217, 1223, 1229, 1235,
799 1241, 1247, 1253, 1259, 1265, 1270, 1275, 1284, 1289, 1294,
800 1299, 1304, 1309, 1314, 1319, 1324, 1329, 1334, 1339, 1344,
801 1349, 1354, 1367, 1367, 1370, 1370, 1376, 1379, 1395, 1398,
802 1407, 1411, 1417, 1424, 1439, 1443, 1447, 1448, 1454, 1455,
803 1456, 1457, 1458, 1459, 1460, 1464, 1465, 1465, 1465, 1475,
804 1476, 1480, 1480, 1481, 1481, 1486, 1489, 1499, 1502, 1508,
805 1509, 1513, 1521, 1525, 1532, 1532, 1539, 1542, 1551, 1556,
806 1573, 1573, 1578, 1578, 1585, 1585, 1593, 1596, 1602, 1605,
807 1611, 1615, 1622, 1625, 1628, 1631, 1634, 1643, 1647, 1654,
808 1657, 1663, 1663
John Bauman66b8ab22014-05-06 15:57:45 -0400809};
810#endif
811
812#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
813/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
814 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
815static const char *const yytname[] =
816{
817 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
818 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500819 "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
820 "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
821 "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500822 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
823 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400824 "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
825 "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
826 "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
827 "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
828 "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
829 "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
830 "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
831 "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
832 "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
833 "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
834 "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
835 "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
836 "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500837 "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
838 "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
839 "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
840 "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
841 "primary_expression", "postfix_expression", "integer_expression",
842 "function_call", "function_call_or_method", "function_call_generic",
John Bauman66b8ab22014-05-06 15:57:45 -0400843 "function_call_header_no_parameters",
844 "function_call_header_with_parameters", "function_call_header",
845 "function_identifier", "unary_expression", "unary_operator",
846 "multiplicative_expression", "additive_expression", "shift_expression",
847 "relational_expression", "equality_expression", "and_expression",
848 "exclusive_or_expression", "inclusive_or_expression",
849 "logical_and_expression", "logical_xor_expression",
850 "logical_or_expression", "conditional_expression",
851 "assignment_expression", "assignment_operator", "expression",
Alexis Hetua35d8232015-06-11 17:11:06 -0400852 "constant_expression", "enter_struct", "declaration",
853 "function_prototype", "function_declarator",
854 "function_header_with_parameters", "function_header",
855 "parameter_declarator", "parameter_declaration", "parameter_qualifier",
856 "parameter_type_specifier", "init_declarator_list", "single_declaration",
857 "fully_specified_type", "interpolation_qualifier",
858 "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
859 "type_specifier", "precision_qualifier", "layout_qualifier",
860 "layout_qualifier_id_list", "layout_qualifier_id",
Nicolas Capens7d626792015-02-17 17:58:31 -0500861 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
862 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400863 "struct_declarator_list", "struct_declarator", "initializer",
864 "declaration_statement", "statement", "simple_statement",
865 "compound_statement", "$@3", "$@4", "statement_no_new_scope",
866 "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
867 "statement_list", "expression_statement", "selection_statement",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400868 "selection_rest_statement", "switch_statement", "$@7", "case_label",
869 "condition", "iteration_statement", "$@8", "$@9", "$@10",
870 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400871 "jump_statement", "translation_unit", "external_declaration",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400872 "function_definition", "$@11", 0
John Bauman66b8ab22014-05-06 15:57:45 -0400873};
874#endif
875
876# ifdef YYPRINT
877/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
878 token YYLEX-NUM. */
879static const yytype_uint16 yytoknum[] =
880{
881 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
882 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
883 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
884 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
885 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
886 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
887 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
888 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
889 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
Nicolas Capensc6841852015-02-15 14:25:37 -0500890 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500891 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400892 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
893 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400894};
895# endif
896
897/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
898static const yytype_uint8 yyr1[] =
899{
Alexis Hetub14178b2015-04-13 13:23:20 -0400900 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
901 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
902 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
Alexis Hetu17809052015-05-13 11:28:22 -0400903 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
904 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
905 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
906 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
907 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
Alexis Hetua35d8232015-06-11 17:11:06 -0400908 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
909 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
910 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
911 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
912 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
Alexis Hetuad527752015-07-07 13:31:44 -0400913 173, 173, 173, 173, 173, 173, 173, 173, 174, 174,
914 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
915 178, 178, 179, 179, 179, 180, 180, 180, 181, 181,
Alexis Hetua35d8232015-06-11 17:11:06 -0400916 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
917 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
918 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetue5246692015-06-18 12:34:52 -0400919 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetuad527752015-07-07 13:31:44 -0400920 181, 181, 183, 182, 184, 182, 185, 185, 186, 186,
921 187, 187, 188, 188, 189, 190, 191, 191, 192, 192,
922 192, 192, 192, 192, 192, 193, 194, 195, 193, 196,
923 196, 198, 197, 199, 197, 200, 200, 201, 201, 202,
924 202, 203, 204, 204, 206, 205, 207, 207, 208, 208,
925 210, 209, 211, 209, 212, 209, 213, 213, 214, 214,
926 215, 215, 216, 216, 216, 216, 216, 217, 217, 218,
927 218, 220, 219
John Bauman66b8ab22014-05-06 15:57:45 -0400928};
929
930/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
931static const yytype_uint8 yyr2[] =
932{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500933 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
934 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
935 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
Alexis Hetu17809052015-05-13 11:28:22 -0400936 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
937 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
938 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
939 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
940 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400941 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
942 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
943 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
944 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
945 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
Alexis Hetuad527752015-07-07 13:31:44 -0400946 2, 1, 2, 1, 1, 2, 2, 3, 1, 1,
947 1, 2, 2, 1, 1, 2, 1, 1, 1, 4,
948 1, 3, 1, 3, 3, 1, 3, 4, 1, 1,
John Bauman66b8ab22014-05-06 15:57:45 -0400949 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetub14178b2015-04-13 13:23:20 -0400950 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
951 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetue5246692015-06-18 12:34:52 -0400952 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetuad527752015-07-07 13:31:44 -0400953 1, 1, 0, 6, 0, 5, 1, 2, 3, 4,
954 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
955 1, 1, 1, 1, 1, 2, 0, 0, 5, 1,
956 1, 0, 2, 0, 2, 2, 3, 1, 2, 1,
957 2, 5, 3, 1, 0, 6, 3, 2, 1, 4,
958 0, 6, 0, 8, 0, 7, 1, 1, 1, 0,
959 2, 3, 2, 2, 2, 3, 2, 1, 2, 1,
960 1, 0, 3
John Bauman66b8ab22014-05-06 15:57:45 -0400961};
962
963/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
964 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
965 means the default is an error. */
Alexis Hetuad6b8752015-06-09 16:15:30 -0400966static const yytype_uint16 yydefact[] =
John Bauman66b8ab22014-05-06 15:57:45 -0400967{
Alexis Hetuad527752015-07-07 13:31:44 -0400968 0, 0, 146, 147, 148, 0, 128, 138, 162, 159,
969 160, 161, 166, 167, 168, 169, 170, 171, 163, 164,
970 165, 172, 173, 174, 175, 176, 177, 139, 140, 143,
971 129, 178, 179, 180, 181, 182, 183, 0, 126, 125,
972 0, 158, 184, 185, 186, 188, 189, 190, 191, 192,
973 193, 194, 195, 196, 187, 197, 198, 199, 0, 201,
974 270, 271, 0, 95, 105, 0, 110, 116, 133, 0,
975 131, 123, 0, 134, 144, 155, 200, 0, 267, 269,
976 130, 122, 0, 136, 0, 141, 142, 0, 204, 0,
977 86, 0, 93, 105, 127, 106, 107, 108, 96, 0,
978 105, 0, 87, 117, 132, 0, 92, 0, 124, 145,
979 135, 0, 1, 268, 137, 0, 202, 0, 152, 0,
980 150, 0, 272, 97, 102, 104, 109, 0, 111, 98,
981 0, 0, 85, 0, 0, 0, 0, 206, 2, 6,
982 4, 5, 7, 28, 0, 0, 0, 156, 35, 34,
983 36, 33, 3, 9, 29, 11, 16, 17, 0, 0,
984 22, 0, 37, 0, 41, 44, 47, 52, 55, 57,
985 59, 61, 63, 65, 67, 84, 0, 26, 88, 0,
986 0, 0, 149, 0, 0, 0, 252, 0, 0, 0,
987 0, 0, 0, 0, 0, 226, 235, 239, 37, 69,
988 82, 0, 215, 0, 144, 218, 237, 217, 216, 0,
989 219, 220, 221, 222, 223, 224, 99, 101, 103, 0,
990 0, 0, 0, 214, 121, 0, 212, 0, 210, 0,
991 207, 30, 31, 0, 13, 14, 0, 0, 20, 19,
992 0, 158, 23, 25, 32, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -0400994 0, 0, 0, 0, 0, 157, 0, 205, 153, 154,
995 151, 263, 262, 233, 254, 0, 266, 264, 0, 0,
996 0, 247, 250, 225, 0, 72, 73, 75, 74, 77,
997 78, 79, 80, 81, 76, 71, 0, 0, 240, 236,
998 238, 0, 0, 0, 115, 0, 118, 0, 0, 0,
999 208, 0, 89, 8, 0, 15, 27, 12, 18, 24,
1000 38, 39, 40, 43, 42, 45, 46, 50, 51, 48,
1001 49, 53, 54, 56, 58, 60, 62, 64, 66, 0,
1002 203, 0, 0, 0, 0, 0, 265, 0, 246, 0,
1003 227, 70, 83, 0, 0, 112, 119, 0, 209, 0,
1004 211, 0, 90, 10, 0, 0, 232, 234, 257, 256,
1005 259, 233, 244, 248, 0, 0, 0, 0, 100, 113,
1006 0, 120, 213, 0, 68, 0, 258, 0, 0, 243,
1007 241, 0, 0, 0, 228, 114, 0, 0, 260, 0,
1008 233, 245, 0, 230, 251, 229, 91, 0, 261, 255,
1009 242, 249, 253
John Bauman66b8ab22014-05-06 15:57:45 -04001010};
1011
1012/* YYDEFGOTO[NTERM-NUM]. */
1013static const yytype_int16 yydefgoto[] =
1014{
Alexis Hetuad527752015-07-07 13:31:44 -04001015 -1, 152, 153, 154, 314, 155, 156, 157, 158, 159,
1016 160, 161, 198, 163, 164, 165, 166, 167, 168, 169,
1017 170, 171, 172, 173, 174, 199, 200, 296, 201, 176,
1018 107, 202, 203, 62, 63, 64, 124, 98, 99, 125,
1019 65, 66, 67, 68, 100, 69, 70, 71, 72, 73,
1020 119, 120, 177, 75, 76, 179, 117, 136, 137, 227,
1021 228, 224, 205, 206, 207, 208, 284, 377, 404, 341,
1022 342, 343, 405, 209, 210, 211, 390, 212, 391, 213,
1023 376, 214, 349, 273, 344, 370, 387, 388, 215, 77,
1024 78, 79, 91
John Bauman66b8ab22014-05-06 15:57:45 -04001025};
1026
1027/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1028 STATE-NUM. */
Alexis Hetuad527752015-07-07 13:31:44 -04001029#define YYPACT_NINF -334
John Bauman66b8ab22014-05-06 15:57:45 -04001030static const yytype_int16 yypact[] =
1031{
Alexis Hetuad527752015-07-07 13:31:44 -04001032 2163, 10, -334, -334, -334, 169, -334, -334, -334, -334,
1033 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1034 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1035 -334, -334, -334, -334, -334, -334, -334, 69, -334, -334,
1036 -48, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1037 -334, -334, -334, -334, -334, -334, -334, -334, -82, -334,
1038 -334, -78, -73, -71, 1, -59, -334, -32, 113, 1182,
1039 -334, -334, 2448, 113, -334, -23, -334, 2088, -334, -334,
1040 -334, -334, 113, -334, 2448, -334, -334, 11, -334, 9,
1041 -334, 20, -334, 121, -334, -334, -334, -334, -334, 2312,
1042 150, 22, -334, -79, -334, 37, -334, 2238, -334, -334,
1043 -334, 1252, -334, -334, -334, 62, -334, 2238, 44, -41,
1044 -334, 410, -334, -334, -334, -334, 105, 2312, -76, -334,
1045 1350, 1641, -334, 107, 2312, 117, 1833, -334, 91, -334,
1046 -334, -334, -334, -334, 1641, 1641, 1641, -334, -334, -334,
1047 -334, -334, -334, -334, 19, -334, -334, -334, 103, -24,
1048 1736, 120, -334, 1641, 80, -42, -36, 15, 43, 99,
1049 108, 104, 141, 142, -69, -334, 127, -334, -334, 2238,
1050 1918, 87, -334, 9, 122, 124, -334, 135, 136, 129,
1051 1448, 140, 1641, 133, 143, 137, -334, -334, 118, -334,
1052 -334, 12, -334, -78, 145, -334, -334, -334, -334, 526,
1053 -334, -334, -334, -334, -334, -334, 144, -334, -334, 1543,
1054 1641, 138, 148, -334, -334, 117, 146, 28, -334, -58,
1055 -334, -334, -334, -15, -334, -334, 1641, 2380, -334, -334,
1056 1641, 154, -334, -334, -334, 1641, 1641, 1641, 1641, 1641,
1057 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641,
1058 1641, 1641, 1641, 1641, 1641, -334, 2003, -334, -334, -334,
1059 -334, -334, -334, 152, -334, 1641, -334, -334, 41, 1641,
1060 149, -334, -334, -334, 642, -334, -334, -334, -334, -334,
1061 -334, -334, -334, -334, -334, -334, 1641, 1641, -334, -334,
1062 -334, 1641, 151, 155, -334, 1641, 157, 57, 1641, 117,
1063 -334, -85, -334, -334, 156, 160, -334, 161, -334, -334,
1064 -334, -334, -334, 80, 80, -42, -42, -36, -36, -36,
1065 -36, 15, 15, 43, 99, 108, 104, 141, 142, 72,
1066 -334, 211, 20, 874, 990, -10, -334, 3, -334, 1087,
1067 642, -334, -334, 165, 1641, 163, -334, 1641, -334, 166,
1068 -334, 1641, -334, -334, 1641, 164, -334, -334, -334, -334,
1069 1087, 152, -334, 160, 198, 2312, 172, 170, -334, -334,
1070 1641, -334, -334, 171, -334, 1641, -334, 167, 175, 265,
1071 -334, 178, 174, 758, -334, -334, 176, 13, 1641, 758,
1072 152, -334, 1641, -334, -334, -334, -334, 177, 160, -334,
1073 -334, -334, -334
John Bauman66b8ab22014-05-06 15:57:45 -04001074};
1075
1076/* YYPGOTO[NTERM-NUM]. */
1077static const yytype_int16 yypgoto[] =
1078{
Alexis Hetuad527752015-07-07 13:31:44 -04001079 -334, -334, -334, -334, -334, -334, -334, 46, -334, -334,
1080 -334, -334, 66, -334, -46, -44, -67, -34, 30, 33,
1081 29, 32, 34, 31, -334, -104, -127, -334, -144, -119,
1082 -334, 14, 17, -334, -334, -334, 168, 204, 199, 173,
1083 -334, -334, -325, 8, -334, -101, 7, -68, 293, -334,
1084 -334, 119, 0, -334, -334, -334, -334, -97, -123, 76,
1085 -6, -208, -40, -206, -328, -83, -334, -334, -94, -333,
1086 -334, -334, -86, 25, -38, -334, -334, -334, -334, -334,
1087 -60, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1088 253, -334, -334
John Bauman66b8ab22014-05-06 15:57:45 -04001089};
1090
1091/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1092 positive, shift that token. If negative, reduce the rule which
1093 number is the opposite. If zero, do what YYDEFACT says.
1094 If YYTABLE_NINF, syntax error. */
Alexis Hetuad527752015-07-07 13:31:44 -04001095#define YYTABLE_NINF -232
John Bauman66b8ab22014-05-06 15:57:45 -04001096static const yytype_int16 yytable[] =
1097{
Alexis Hetuad527752015-07-07 13:31:44 -04001098 74, 108, 233, 300, 223, 122, 134, 175, 83, 82,
1099 94, 222, 304, 230, 60, 367, 134, 61, 311, 7,
1100 180, 361, 89, 263, 374, 129, 175, 130, 87, 362,
1101 219, 126, 92, 242, 131, 134, 90, 220, 389, 135,
1102 93, 95, 96, 97, 103, 374, 278, 250, 251, 135,
1103 27, 28, 101, 29, 80, 102, 312, 230, 264, 126,
1104 88, 37, 38, 39, 182, 403, 225, 410, 135, 74,
1105 183, 403, 109, 280, 248, 104, 249, 74, 134, 134,
1106 110, 239, 266, 111, 115, 118, 81, 240, 175, 114,
1107 313, 60, 315, 223, 61, 371, 297, 356, 128, 74,
1108 303, 297, 252, 253, 234, 235, -94, 74, 372, 85,
1109 86, 135, 135, 319, 297, 175, 7, 74, 407, 116,
1110 339, 204, 7, 297, 297, 236, 298, 74, 121, 237,
1111 94, 345, 256, 257, 74, 347, 74, 254, 255, 309,
1112 83, 82, 310, 230, 300, 132, 379, 27, 28, 381,
1113 29, 80, 297, 27, 28, 346, 29, 181, 37, 38,
1114 39, 95, 96, 97, 37, 134, 268, 269, 309, 351,
1115 352, 358, 395, 2, 3, 4, 178, 162, 223, 74,
1116 74, 216, 353, 297, 364, 327, 328, 329, 330, 359,
1117 95, 96, 97, 226, 411, -27, 162, 175, 135, 245,
1118 246, 247, 323, 324, 175, 373, 325, 326, 238, 204,
1119 231, 232, 285, 286, 287, 288, 289, 290, 291, 292,
1120 293, 294, 331, 332, 243, 258, 373, 223, 260, 244,
1121 223, 295, 261, 259, 265, 262, 271, 384, 272, 274,
1122 275, 397, 383, 276, 279, 281, 283, 282, 375, -26,
1123 301, 305, 308, 223, 408, 306, 366, 175, 162, -21,
1124 -231, 348, 355, 363, 354, -28, 74, 365, 385, 375,
1125 357, 297, 378, 382, 392, 223, 380, 393, 396, 394,
1126 399, 398, 400, 318, 204, 162, 195, 402, 333, 335,
1127 406, 412, 334, 336, 338, 217, 337, 123, 84, 127,
1128 218, 307, 270, 360, 368, 409, 369, 108, 401, 350,
1129 386, 320, 321, 322, 162, 162, 162, 162, 162, 162,
1130 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
1131 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1132 0, 0, 0, 204, 204, 0, 0, 0, 0, 204,
1133 204, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1134 0, 0, 0, 0, 0, 0, 0, 162, 0, 0,
1135 204, 0, 0, 0, 162, 74, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001137 0, 0, 0, 204, 0, 0, 0, 0, 0, 204,
Alexis Hetua35d8232015-06-11 17:11:06 -04001138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001139 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
1140 8, 9, 10, 11, 184, 185, 186, 162, 187, 188,
1141 189, 190, 191, 192, 193, 12, 13, 14, 15, 16,
Alexis Hetue5246692015-06-18 12:34:52 -04001142 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1143 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001144 36, 37, 38, 39, 40, 41, 194, 42, 43, 44,
Alexis Hetue5246692015-06-18 12:34:52 -04001145 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001146 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1147 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001149 0, 0, 0, 0, 146, 0, 0, 0, 195, 196,
1150 0, 0, 0, 0, 197, 148, 149, 150, 151, 1,
Alexis Hetue5246692015-06-18 12:34:52 -04001151 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Alexis Hetuad527752015-07-07 13:31:44 -04001152 184, 185, 186, 0, 187, 188, 189, 190, 191, 192,
1153 193, 12, 13, 14, 15, 16, 17, 18, 19, 20,
Alexis Hetue5246692015-06-18 12:34:52 -04001154 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1155 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
Alexis Hetuad527752015-07-07 13:31:44 -04001156 40, 41, 194, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001157 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001158 57, 58, 138, 59, 139, 140, 141, 142, 143, 0,
1159 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001161 146, 0, 0, 0, 195, 299, 0, 0, 0, 0,
1162 197, 148, 149, 150, 151, 1, 2, 3, 4, 5,
1163 6, 7, 8, 9, 10, 11, 184, 185, 186, 0,
1164 187, 188, 189, 190, 191, 192, 193, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001165 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001166 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetuad527752015-07-07 13:31:44 -04001167 34, 35, 36, 37, 38, 39, 40, 41, 194, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001168 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001169 52, 53, 54, 0, 55, 56, 57, 58, 138, 59,
1170 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001172 0, 0, 0, 0, 0, 0, 146, 0, 0, 0,
1173 195, 0, 0, 0, 0, 0, 197, 148, 149, 150,
1174 151, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1175 10, 11, 184, 185, 186, 0, 187, 188, 189, 190,
1176 191, 192, 193, 12, 13, 14, 15, 16, 17, 18,
Alexis Hetue5246692015-06-18 12:34:52 -04001177 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1178 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetuad527752015-07-07 13:31:44 -04001179 38, 39, 40, 41, 194, 42, 43, 44, 0, 45,
Alexis Hetue5246692015-06-18 12:34:52 -04001180 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001181 55, 56, 57, 58, 138, 59, 139, 140, 141, 142,
1182 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001184 0, 0, 146, 0, 0, 0, 121, 0, 0, 0,
1185 0, 0, 197, 148, 149, 150, 151, 1, 2, 3,
1186 4, 5, 6, 7, 8, 9, 10, 11, 184, 185,
1187 186, 0, 187, 188, 189, 190, 191, 192, 193, 12,
Alexis Hetue5246692015-06-18 12:34:52 -04001188 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1189 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1190 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
Alexis Hetuad527752015-07-07 13:31:44 -04001191 194, 42, 43, 44, 0, 45, 46, 47, 48, 49,
Alexis Hetue5246692015-06-18 12:34:52 -04001192 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
Alexis Hetuad527752015-07-07 13:31:44 -04001193 138, 59, 139, 140, 141, 142, 143, 0, 0, 144,
1194 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1195 0, 0, 0, 0, 0, 0, 0, 0, 146, 0,
1196 0, 0, 0, 0, 0, 0, 0, 0, 197, 148,
1197 149, 150, 151, 1, 2, 3, 4, 5, 6, 7,
1198 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1199 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1200 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1201 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1202 36, 37, 38, 39, 40, 41, 0, 42, 43, 44,
1203 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1204 54, 0, 55, 56, 57, 58, 138, 59, 139, 140,
1205 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001207 133, 2, 3, 4, 146, 6, 7, 8, 9, 10,
1208 11, 0, 0, 0, 197, 148, 149, 150, 151, 0,
1209 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1210 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1211 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1212 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1213 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1214 56, 57, 58, 138, 59, 139, 140, 141, 142, 143,
1215 0, 0, 144, 145, 0, 0, 0, 0, 0, 0,
1216 0, 0, 0, 0, 0, 0, 2, 3, 4, 0,
1217 0, 146, 8, 9, 10, 11, 0, 0, 0, 0,
1218 0, 0, 148, 149, 150, 151, 0, 12, 13, 14,
Alexis Hetue5246692015-06-18 12:34:52 -04001219 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1220 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1221 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1222 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001223 52, 53, 54, 0, 55, 56, 57, 0, 105, 59,
1224 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
1225 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1226 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1227 25, 26, 0, 0, 0, 0, 106, 31, 32, 33,
1228 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1229 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1230 52, 53, 54, 0, 55, 56, 57, 0, 138, 59,
1231 139, 140, 141, 142, 143, 0, 0, 144, 145, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001233 0, 0, 0, 0, 0, 0, 146, 0, 0, 147,
1234 8, 9, 10, 11, 0, 0, 0, 148, 149, 150,
1235 151, 0, 0, 0, 0, 12, 13, 14, 15, 16,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001236 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1237 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
Alexis Hetuad527752015-07-07 13:31:44 -04001238 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001239 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
Alexis Hetuad527752015-07-07 13:31:44 -04001240 54, 0, 55, 56, 57, 0, 138, 59, 139, 140,
1241 141, 142, 143, 0, 0, 144, 145, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001243 0, 0, 0, 0, 146, 0, 0, 221, 8, 9,
1244 10, 11, 0, 0, 0, 148, 149, 150, 151, 0,
1245 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1246 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1247 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1248 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1249 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1250 55, 56, 57, 0, 138, 59, 139, 140, 141, 142,
1251 143, 0, 0, 144, 145, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001253 0, 0, 146, 8, 9, 10, 11, 0, 0, 0,
1254 0, 0, 277, 148, 149, 150, 151, 0, 12, 13,
1255 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1256 24, 25, 26, 0, 0, 0, 0, 0, 31, 32,
1257 33, 34, 35, 36, 0, 0, 0, 40, 41, 0,
1258 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1259 51, 52, 53, 54, 0, 55, 56, 57, 0, 138,
1260 59, 139, 140, 141, 142, 143, 0, 0, 144, 145,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001261 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001262 0, 0, 0, 0, 0, 0, 0, 146, 0, 0,
1263 302, 8, 9, 10, 11, 0, 0, 0, 148, 149,
1264 150, 151, 0, 0, 0, 0, 12, 13, 14, 15,
1265 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1266 26, 0, 0, 0, 0, 0, 31, 32, 33, 34,
1267 35, 36, 0, 0, 0, 40, 41, 0, 42, 43,
1268 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1269 53, 54, 0, 55, 56, 57, 0, 138, 59, 139,
1270 140, 141, 142, 143, 0, 0, 144, 145, 0, 0,
1271 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1272 0, 0, 0, 0, 0, 146, 8, 9, 10, 11,
1273 0, 0, 0, 0, 0, 0, 148, 149, 150, 151,
Alexis Hetue5246692015-06-18 12:34:52 -04001274 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1275 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1276 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
Alexis Hetuad527752015-07-07 13:31:44 -04001277 40, 241, 0, 42, 43, 44, 0, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001278 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
Alexis Hetuad527752015-07-07 13:31:44 -04001279 57, 0, 138, 59, 139, 140, 141, 142, 143, 0,
1280 0, 144, 145, 0, 0, 0, 0, 0, 0, 0,
1281 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1282 146, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1283 0, 148, 149, 150, 151, 0, 0, 0, 12, 13,
1284 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1285 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1286 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1287 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1288 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1289 59, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1290 0, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1291 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1292 0, 0, 229, 12, 13, 14, 15, 16, 17, 18,
1293 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1294 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1295 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1296 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1297 55, 56, 57, 58, 0, 59, 0, 0, 0, 0,
1298 0, 0, 0, 0, 0, 0, 133, 2, 3, 4,
1299 0, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1300 0, 0, 0, 0, 0, 0, 0, 267, 12, 13,
1301 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1302 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1303 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1304 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1305 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1306 59, 0, 0, 0, 0, 0, 0, 0, 112, 0,
1307 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1308 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1309 0, 0, 340, 12, 13, 14, 15, 16, 17, 18,
1310 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1311 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1312 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1313 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1314 55, 56, 57, 58, 0, 59, 1, 2, 3, 4,
1315 5, 6, 7, 8, 9, 10, 11, 0, 0, 0,
1316 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
1317 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1318 24, 25, 26, 27, 28, 0, 29, 30, 31, 32,
1319 33, 34, 35, 36, 37, 38, 39, 40, 41, 0,
1320 42, 43, 44, 0, 45, 46, 47, 48, 49, 50,
1321 51, 52, 53, 54, 0, 55, 56, 57, 58, 0,
1322 59, 133, 2, 3, 4, 0, 6, 7, 8, 9,
1323 10, 11, 0, 0, 0, 0, 0, 0, 0, 0,
1324 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1325 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1326 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1327 38, 39, 40, 41, 0, 42, 43, 44, 0, 45,
1328 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1329 55, 56, 57, 58, 0, 59, 2, 3, 4, 0,
1330 0, 0, 8, 9, 10, 11, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001331 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1332 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1333 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1334 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1335 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetuad527752015-07-07 13:31:44 -04001336 52, 53, 54, 0, 55, 56, 57, 0, 0, 59,
1337 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1338 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
1339 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1340 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
1341 36, 0, 0, 0, 40, 41, 0, 42, 43, 44,
1342 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1343 54, 0, 55, 56, 57, 0, 316, 59, 8, 9,
1344 10, 11, 317, 0, 0, 0, 0, 0, 0, 0,
1345 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
1346 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
1347 0, 0, 0, 31, 32, 33, 34, 35, 36, 0,
1348 0, 0, 40, 41, 0, 42, 43, 44, 0, 45,
1349 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1350 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001351};
1352
1353static const yytype_int16 yycheck[] =
1354{
Alexis Hetuad527752015-07-07 13:31:44 -04001355 0, 69, 146, 209, 131, 91, 107, 111, 1, 1,
1356 9, 130, 220, 136, 0, 343, 117, 0, 76, 9,
1357 117, 106, 104, 92, 349, 104, 130, 106, 76, 114,
1358 106, 99, 105, 160, 113, 136, 114, 113, 371, 107,
1359 111, 40, 41, 42, 76, 370, 190, 83, 84, 117,
1360 40, 41, 111, 43, 44, 114, 114, 180, 127, 127,
1361 108, 51, 52, 53, 105, 393, 134, 400, 136, 69,
1362 111, 399, 72, 192, 116, 68, 118, 77, 179, 180,
1363 73, 105, 179, 106, 84, 76, 76, 111, 192, 82,
1364 105, 77, 236, 220, 77, 105, 111, 305, 76, 99,
1365 219, 111, 87, 88, 85, 86, 105, 107, 105, 40,
1366 41, 179, 180, 240, 111, 219, 9, 117, 105, 108,
1367 264, 121, 9, 111, 111, 106, 114, 127, 108, 110,
1368 9, 275, 89, 90, 134, 279, 136, 122, 123, 111,
1369 133, 133, 114, 266, 350, 108, 354, 40, 41, 357,
1370 43, 44, 111, 40, 41, 114, 43, 113, 51, 52,
1371 53, 40, 41, 42, 51, 266, 79, 80, 111, 296,
1372 297, 114, 380, 4, 5, 6, 114, 111, 305, 179,
1373 180, 76, 301, 111, 112, 252, 253, 254, 255, 308,
1374 40, 41, 42, 76, 402, 104, 130, 301, 266, 119,
1375 120, 121, 248, 249, 308, 349, 250, 251, 105, 209,
1376 144, 145, 94, 95, 96, 97, 98, 99, 100, 101,
1377 102, 103, 256, 257, 104, 126, 370, 354, 124, 163,
1378 357, 113, 91, 125, 107, 93, 114, 364, 114, 104,
1379 104, 385, 361, 114, 104, 112, 109, 104, 349, 104,
1380 106, 113, 106, 380, 398, 107, 342, 361, 192, 105,
1381 108, 112, 107, 107, 113, 104, 266, 56, 104, 370,
1382 113, 111, 107, 107, 76, 402, 113, 105, 107, 109,
1383 105, 114, 17, 237, 284, 219, 108, 113, 258, 260,
1384 114, 114, 259, 261, 263, 127, 262, 93, 5, 100,
1385 127, 225, 183, 309, 344, 399, 344, 375, 391, 284,
1386 370, 245, 246, 247, 248, 249, 250, 251, 252, 253,
1387 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
1388 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1389 -1, -1, -1, 343, 344, -1, -1, -1, -1, 349,
1390 350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1391 -1, -1, -1, -1, -1, -1, -1, 301, -1, -1,
1392 370, -1, -1, -1, 308, 375, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001394 -1, -1, -1, 393, -1, -1, -1, -1, -1, 399,
Alexis Hetua35d8232015-06-11 17:11:06 -04001395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001396 -1, -1, -1, 3, 4, 5, 6, 7, 8, 9,
1397 10, 11, 12, 13, 14, 15, 16, 361, 18, 19,
Alexis Hetue5246692015-06-18 12:34:52 -04001398 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1399 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1400 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1401 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1402 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1403 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1404 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001405 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001406 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
1407 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1408 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1409 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1410 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1411 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1412 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1413 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1414 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1415 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1416 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001418 104, -1, -1, -1, 108, 109, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001419 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1420 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1421 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001422 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001423 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001424 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001425 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001426 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001427 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1428 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001429 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
1430 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
1431 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1432 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1433 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1434 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1435 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1436 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
1437 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1438 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1439 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001441 -1, -1, 104, -1, -1, -1, 108, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001442 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
Alexis Hetuad527752015-07-07 13:31:44 -04001443 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1444 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
Alexis Hetue5246692015-06-18 12:34:52 -04001445 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1446 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1447 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
Alexis Hetuad527752015-07-07 13:31:44 -04001448 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
Alexis Hetue5246692015-06-18 12:34:52 -04001449 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1450 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1451 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001452 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001453 -1, -1, -1, -1, -1, -1, -1, -1, 114, 115,
1454 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
1455 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1456 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1457 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1458 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1459 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
1460 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1461 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1462 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1464 3, 4, 5, 6, 104, 8, 9, 10, 11, 12,
1465 13, -1, -1, -1, 114, 115, 116, 117, 118, -1,
1466 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1467 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1468 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1469 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1470 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1471 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1472 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
1473 -1, -1, -1, -1, -1, -1, 4, 5, 6, -1,
1474 -1, 104, 10, 11, 12, 13, -1, -1, -1, -1,
1475 -1, -1, 115, 116, 117, 118, -1, 25, 26, 27,
Alexis Hetue5246692015-06-18 12:34:52 -04001476 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1477 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1478 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1479 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1480 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
Alexis Hetuad527752015-07-07 13:31:44 -04001481 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
1482 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1483 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1484 38, 39, -1, -1, -1, -1, 114, 45, 46, 47,
1485 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1486 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1487 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
Alexis Hetue5246692015-06-18 12:34:52 -04001488 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001490 -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
1491 10, 11, 12, 13, -1, -1, -1, 115, 116, 117,
1492 118, -1, -1, -1, -1, 25, 26, 27, 28, 29,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001493 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1494 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1495 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1496 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1497 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1498 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001500 -1, -1, -1, -1, 104, -1, -1, 107, 10, 11,
1501 12, 13, -1, -1, -1, 115, 116, 117, 118, -1,
1502 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1503 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1504 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1505 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1506 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1507 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
1508 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001510 -1, -1, 104, 10, 11, 12, 13, -1, -1, -1,
1511 -1, -1, 114, 115, 116, 117, 118, -1, 25, 26,
1512 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1513 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
1514 47, 48, 49, 50, -1, -1, -1, 54, 55, -1,
1515 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1516 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
1517 77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetuad527752015-07-07 13:31:44 -04001519 -1, -1, -1, -1, -1, -1, -1, 104, -1, -1,
1520 107, 10, 11, 12, 13, -1, -1, -1, 115, 116,
1521 117, 118, -1, -1, -1, -1, 25, 26, 27, 28,
1522 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1523 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
1524 49, 50, -1, -1, -1, 54, 55, -1, 57, 58,
1525 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1526 69, 70, -1, 72, 73, 74, -1, 76, 77, 78,
1527 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1529 -1, -1, -1, -1, -1, 104, 10, 11, 12, 13,
1530 -1, -1, -1, -1, -1, -1, 115, 116, 117, 118,
Alexis Hetue5246692015-06-18 12:34:52 -04001531 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1532 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1533 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1534 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1535 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
Alexis Hetuad527752015-07-07 13:31:44 -04001536 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1537 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1538 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1539 104, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1540 -1, 115, 116, 117, 118, -1, -1, -1, 25, 26,
1541 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1542 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1543 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1544 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1545 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1546 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1547 -1, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1548 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1549 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1550 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1551 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1552 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1553 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1554 72, 73, 74, 75, -1, 77, -1, -1, -1, -1,
1555 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1556 -1, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1557 -1, -1, -1, -1, -1, -1, -1, 109, 25, 26,
1558 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1559 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1560 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1561 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1562 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1563 77, -1, -1, -1, -1, -1, -1, -1, 0, -1,
1564 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1565 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1566 -1, -1, 109, 25, 26, 27, 28, 29, 30, 31,
1567 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1568 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1569 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1570 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1571 72, 73, 74, 75, -1, 77, 3, 4, 5, 6,
1572 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
1573 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
1574 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1575 37, 38, 39, 40, 41, -1, 43, 44, 45, 46,
1576 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
1577 57, 58, 59, -1, 61, 62, 63, 64, 65, 66,
1578 67, 68, 69, 70, -1, 72, 73, 74, 75, -1,
1579 77, 3, 4, 5, 6, -1, 8, 9, 10, 11,
1580 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
1581 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1582 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1583 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1584 52, 53, 54, 55, -1, 57, 58, 59, -1, 61,
1585 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1586 72, 73, 74, 75, -1, 77, 4, 5, 6, -1,
1587 -1, -1, 10, 11, 12, 13, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001588 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1589 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1590 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1591 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1592 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetuad527752015-07-07 13:31:44 -04001593 68, 69, 70, -1, 72, 73, 74, -1, -1, 77,
1594 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
1595 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
1596 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1597 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1598 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1599 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1600 70, -1, 72, 73, 74, -1, 76, 77, 10, 11,
1601 12, 13, 82, -1, -1, -1, -1, -1, -1, -1,
1602 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
1603 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
1604 -1, -1, -1, 45, 46, 47, 48, 49, 50, -1,
1605 -1, -1, 54, 55, -1, 57, 58, 59, -1, 61,
1606 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1607 72, 73, 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001608};
1609
1610/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1611 symbol of state STATE-NUM. */
1612static const yytype_uint8 yystos[] =
1613{
1614 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001615 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001616 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001617 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1618 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1619 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001620 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001621 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
Alexis Hetuad527752015-07-07 13:31:44 -04001622 44, 76, 171, 174, 176, 40, 41, 76, 108, 104,
1623 114, 220, 105, 111, 9, 40, 41, 42, 165, 166,
1624 172, 111, 114, 76, 174, 76, 114, 158, 175, 180,
1625 174, 106, 0, 218, 174, 180, 108, 184, 76, 178,
1626 179, 108, 200, 165, 164, 167, 175, 166, 76, 104,
1627 106, 113, 108, 3, 173, 175, 185, 186, 76, 78,
1628 79, 80, 81, 82, 85, 86, 104, 107, 115, 116,
1629 117, 118, 129, 130, 131, 133, 134, 135, 136, 137,
1630 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1631 148, 149, 150, 151, 152, 153, 157, 180, 114, 183,
1632 185, 113, 105, 111, 14, 15, 16, 18, 19, 20,
1633 21, 22, 23, 24, 56, 108, 109, 114, 140, 153,
1634 154, 156, 159, 160, 180, 190, 191, 192, 193, 201,
1635 202, 203, 205, 207, 209, 216, 76, 164, 167, 106,
1636 113, 107, 157, 154, 189, 175, 76, 187, 188, 109,
1637 186, 140, 140, 156, 85, 86, 106, 110, 105, 105,
1638 111, 55, 154, 104, 140, 119, 120, 121, 116, 118,
1639 83, 84, 87, 88, 122, 123, 89, 90, 126, 125,
1640 124, 91, 93, 92, 127, 107, 185, 109, 79, 80,
1641 179, 114, 114, 211, 104, 104, 114, 114, 156, 104,
1642 157, 112, 104, 109, 194, 94, 95, 96, 97, 98,
1643 99, 100, 101, 102, 103, 113, 155, 111, 114, 109,
1644 191, 106, 107, 157, 189, 113, 107, 187, 106, 111,
1645 114, 76, 114, 105, 132, 156, 76, 82, 135, 154,
1646 140, 140, 140, 142, 142, 143, 143, 144, 144, 144,
1647 144, 145, 145, 146, 147, 148, 149, 150, 151, 156,
1648 109, 197, 198, 199, 212, 156, 114, 156, 112, 210,
1649 201, 154, 154, 157, 113, 107, 189, 113, 114, 157,
1650 188, 106, 114, 107, 112, 56, 200, 192, 190, 202,
1651 213, 105, 105, 156, 170, 173, 208, 195, 107, 189,
1652 113, 189, 107, 157, 154, 104, 208, 214, 215, 197,
1653 204, 206, 76, 105, 109, 189, 107, 156, 114, 105,
1654 17, 193, 113, 192, 196, 200, 114, 105, 156, 196,
1655 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001656};
1657
1658#define yyerrok (yyerrstatus = 0)
1659#define yyclearin (yychar = YYEMPTY)
1660#define YYEMPTY (-2)
1661#define YYEOF 0
1662
1663#define YYACCEPT goto yyacceptlab
1664#define YYABORT goto yyabortlab
1665#define YYERROR goto yyerrorlab
1666
1667
1668/* Like YYERROR except do call yyerror. This remains here temporarily
1669 to ease the transition to the new meaning of YYERROR, for GCC.
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001670 Once GCC version 2 has supplanted version 1, this can go. */
John Bauman66b8ab22014-05-06 15:57:45 -04001671
1672#define YYFAIL goto yyerrlab
John Bauman66b8ab22014-05-06 15:57:45 -04001673
1674#define YYRECOVERING() (!!yyerrstatus)
1675
1676#define YYBACKUP(Token, Value) \
1677do \
1678 if (yychar == YYEMPTY && yylen == 1) \
1679 { \
1680 yychar = (Token); \
1681 yylval = (Value); \
1682 yytoken = YYTRANSLATE (yychar); \
1683 YYPOPSTACK (1); \
1684 goto yybackup; \
1685 } \
1686 else \
1687 { \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001688 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
John Bauman66b8ab22014-05-06 15:57:45 -04001689 YYERROR; \
1690 } \
1691while (YYID (0))
1692
1693
1694#define YYTERROR 1
1695#define YYERRCODE 256
1696
1697
1698/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1699 If N is 0, then set CURRENT to the empty location which ends
1700 the previous symbol: RHS[0] (always defined). */
1701
1702#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1703#ifndef YYLLOC_DEFAULT
1704# define YYLLOC_DEFAULT(Current, Rhs, N) \
1705 do \
1706 if (YYID (N)) \
1707 { \
1708 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1709 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1710 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1711 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1712 } \
1713 else \
1714 { \
1715 (Current).first_line = (Current).last_line = \
1716 YYRHSLOC (Rhs, 0).last_line; \
1717 (Current).first_column = (Current).last_column = \
1718 YYRHSLOC (Rhs, 0).last_column; \
1719 } \
1720 while (YYID (0))
1721#endif
1722
1723
1724/* YY_LOCATION_PRINT -- Print the location on the stream.
1725 This macro was not mandated originally: define only if we know
1726 we won't break user code: when these are the locations we know. */
1727
1728#ifndef YY_LOCATION_PRINT
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001729# if YYLTYPE_IS_TRIVIAL
John Bauman66b8ab22014-05-06 15:57:45 -04001730# define YY_LOCATION_PRINT(File, Loc) \
1731 fprintf (File, "%d.%d-%d.%d", \
1732 (Loc).first_line, (Loc).first_column, \
1733 (Loc).last_line, (Loc).last_column)
1734# else
1735# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1736# endif
1737#endif
1738
1739
1740/* YYLEX -- calling `yylex' with the right arguments. */
1741
1742#ifdef YYLEX_PARAM
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001743# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
John Bauman66b8ab22014-05-06 15:57:45 -04001744#else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001745# define YYLEX yylex (&yylval, &yylloc)
John Bauman66b8ab22014-05-06 15:57:45 -04001746#endif
1747
1748/* Enable debugging if requested. */
1749#if YYDEBUG
1750
1751# ifndef YYFPRINTF
1752# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1753# define YYFPRINTF fprintf
1754# endif
1755
1756# define YYDPRINTF(Args) \
1757do { \
1758 if (yydebug) \
1759 YYFPRINTF Args; \
1760} while (YYID (0))
1761
1762# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1763do { \
1764 if (yydebug) \
1765 { \
1766 YYFPRINTF (stderr, "%s ", Title); \
1767 yy_symbol_print (stderr, \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001768 Type, Value, Location, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001769 YYFPRINTF (stderr, "\n"); \
1770 } \
1771} while (YYID (0))
1772
1773
1774/*--------------------------------.
1775| Print this symbol on YYOUTPUT. |
1776`--------------------------------*/
1777
1778/*ARGSUSED*/
1779#if (defined __STDC__ || defined __C99__FUNC__ \
1780 || defined __cplusplus || defined _MSC_VER)
1781static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001782yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001783#else
1784static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001785yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001786 FILE *yyoutput;
1787 int yytype;
1788 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001789 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001790 TParseContext* context;
1791#endif
1792{
1793 if (!yyvaluep)
1794 return;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001795 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001796 YYUSE (context);
1797# ifdef YYPRINT
1798 if (yytype < YYNTOKENS)
1799 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1800# else
1801 YYUSE (yyoutput);
1802# endif
1803 switch (yytype)
1804 {
1805 default:
1806 break;
1807 }
1808}
1809
1810
1811/*--------------------------------.
1812| Print this symbol on YYOUTPUT. |
1813`--------------------------------*/
1814
1815#if (defined __STDC__ || defined __C99__FUNC__ \
1816 || defined __cplusplus || defined _MSC_VER)
1817static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001818yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001819#else
1820static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001821yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001822 FILE *yyoutput;
1823 int yytype;
1824 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001825 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001826 TParseContext* context;
1827#endif
1828{
1829 if (yytype < YYNTOKENS)
1830 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1831 else
1832 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1833
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001834 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1835 YYFPRINTF (yyoutput, ": ");
1836 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04001837 YYFPRINTF (yyoutput, ")");
1838}
1839
1840/*------------------------------------------------------------------.
1841| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1842| TOP (included). |
1843`------------------------------------------------------------------*/
1844
1845#if (defined __STDC__ || defined __C99__FUNC__ \
1846 || defined __cplusplus || defined _MSC_VER)
1847static void
1848yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1849#else
1850static void
1851yy_stack_print (yybottom, yytop)
1852 yytype_int16 *yybottom;
1853 yytype_int16 *yytop;
1854#endif
1855{
1856 YYFPRINTF (stderr, "Stack now");
1857 for (; yybottom <= yytop; yybottom++)
1858 {
1859 int yybot = *yybottom;
1860 YYFPRINTF (stderr, " %d", yybot);
1861 }
1862 YYFPRINTF (stderr, "\n");
1863}
1864
1865# define YY_STACK_PRINT(Bottom, Top) \
1866do { \
1867 if (yydebug) \
1868 yy_stack_print ((Bottom), (Top)); \
1869} while (YYID (0))
1870
1871
1872/*------------------------------------------------.
1873| Report that the YYRULE is going to be reduced. |
1874`------------------------------------------------*/
1875
1876#if (defined __STDC__ || defined __C99__FUNC__ \
1877 || defined __cplusplus || defined _MSC_VER)
1878static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001879yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001880#else
1881static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001882yy_reduce_print (yyvsp, yylsp, yyrule, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001883 YYSTYPE *yyvsp;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001884 YYLTYPE *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04001885 int yyrule;
1886 TParseContext* context;
1887#endif
1888{
1889 int yynrhs = yyr2[yyrule];
1890 int yyi;
1891 unsigned long int yylno = yyrline[yyrule];
1892 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1893 yyrule - 1, yylno);
1894 /* The symbols being reduced. */
1895 for (yyi = 0; yyi < yynrhs; yyi++)
1896 {
1897 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1898 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1899 &(yyvsp[(yyi + 1) - (yynrhs)])
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001900 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
John Bauman66b8ab22014-05-06 15:57:45 -04001901 YYFPRINTF (stderr, "\n");
1902 }
1903}
1904
1905# define YY_REDUCE_PRINT(Rule) \
1906do { \
1907 if (yydebug) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001908 yy_reduce_print (yyvsp, yylsp, Rule, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001909} while (YYID (0))
1910
1911/* Nonzero means print parse trace. It is left uninitialized so that
1912 multiple parsers can coexist. */
1913int yydebug;
1914#else /* !YYDEBUG */
1915# define YYDPRINTF(Args)
1916# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1917# define YY_STACK_PRINT(Bottom, Top)
1918# define YY_REDUCE_PRINT(Rule)
1919#endif /* !YYDEBUG */
1920
1921
1922/* YYINITDEPTH -- initial size of the parser's stacks. */
1923#ifndef YYINITDEPTH
1924# define YYINITDEPTH 200
1925#endif
1926
1927/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1928 if the built-in stack extension method is used).
1929
1930 Do not make this value too large; the results are undefined if
1931 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1932 evaluated with infinite-precision integer arithmetic. */
1933
1934#ifndef YYMAXDEPTH
1935# define YYMAXDEPTH 10000
1936#endif
1937
1938
1939
1940#if YYERROR_VERBOSE
1941
1942# ifndef yystrlen
1943# if defined __GLIBC__ && defined _STRING_H
1944# define yystrlen strlen
1945# else
1946/* Return the length of YYSTR. */
1947#if (defined __STDC__ || defined __C99__FUNC__ \
1948 || defined __cplusplus || defined _MSC_VER)
1949static YYSIZE_T
1950yystrlen (const char *yystr)
1951#else
1952static YYSIZE_T
1953yystrlen (yystr)
1954 const char *yystr;
1955#endif
1956{
1957 YYSIZE_T yylen;
1958 for (yylen = 0; yystr[yylen]; yylen++)
1959 continue;
1960 return yylen;
1961}
1962# endif
1963# endif
1964
1965# ifndef yystpcpy
1966# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1967# define yystpcpy stpcpy
1968# else
1969/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1970 YYDEST. */
1971#if (defined __STDC__ || defined __C99__FUNC__ \
1972 || defined __cplusplus || defined _MSC_VER)
1973static char *
1974yystpcpy (char *yydest, const char *yysrc)
1975#else
1976static char *
1977yystpcpy (yydest, yysrc)
1978 char *yydest;
1979 const char *yysrc;
1980#endif
1981{
1982 char *yyd = yydest;
1983 const char *yys = yysrc;
1984
1985 while ((*yyd++ = *yys++) != '\0')
1986 continue;
1987
1988 return yyd - 1;
1989}
1990# endif
1991# endif
1992
1993# ifndef yytnamerr
1994/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1995 quotes and backslashes, so that it's suitable for yyerror. The
1996 heuristic is that double-quoting is unnecessary unless the string
1997 contains an apostrophe, a comma, or backslash (other than
1998 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1999 null, do not copy; instead, return the length of what the result
2000 would have been. */
2001static YYSIZE_T
2002yytnamerr (char *yyres, const char *yystr)
2003{
2004 if (*yystr == '"')
2005 {
2006 YYSIZE_T yyn = 0;
2007 char const *yyp = yystr;
2008
2009 for (;;)
2010 switch (*++yyp)
2011 {
2012 case '\'':
2013 case ',':
2014 goto do_not_strip_quotes;
2015
2016 case '\\':
2017 if (*++yyp != '\\')
2018 goto do_not_strip_quotes;
2019 /* Fall through. */
2020 default:
2021 if (yyres)
2022 yyres[yyn] = *yyp;
2023 yyn++;
2024 break;
2025
2026 case '"':
2027 if (yyres)
2028 yyres[yyn] = '\0';
2029 return yyn;
2030 }
2031 do_not_strip_quotes: ;
2032 }
2033
2034 if (! yyres)
2035 return yystrlen (yystr);
2036
2037 return yystpcpy (yyres, yystr) - yyres;
2038}
2039# endif
2040
2041/* Copy into YYRESULT an error message about the unexpected token
2042 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2043 including the terminating null byte. If YYRESULT is null, do not
2044 copy anything; just return the number of bytes that would be
2045 copied. As a special case, return 0 if an ordinary "syntax error"
2046 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2047 size calculation. */
2048static YYSIZE_T
2049yysyntax_error (char *yyresult, int yystate, int yychar)
2050{
2051 int yyn = yypact[yystate];
2052
2053 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2054 return 0;
2055 else
2056 {
2057 int yytype = YYTRANSLATE (yychar);
2058 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2059 YYSIZE_T yysize = yysize0;
2060 YYSIZE_T yysize1;
2061 int yysize_overflow = 0;
2062 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2063 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2064 int yyx;
2065
2066# if 0
2067 /* This is so xgettext sees the translatable formats that are
2068 constructed on the fly. */
2069 YY_("syntax error, unexpected %s");
2070 YY_("syntax error, unexpected %s, expecting %s");
2071 YY_("syntax error, unexpected %s, expecting %s or %s");
2072 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2073 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2074# endif
2075 char *yyfmt;
2076 char const *yyf;
2077 static char const yyunexpected[] = "syntax error, unexpected %s";
2078 static char const yyexpecting[] = ", expecting %s";
2079 static char const yyor[] = " or %s";
2080 char yyformat[sizeof yyunexpected
2081 + sizeof yyexpecting - 1
2082 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2083 * (sizeof yyor - 1))];
2084 char const *yyprefix = yyexpecting;
2085
2086 /* Start YYX at -YYN if negative to avoid negative indexes in
2087 YYCHECK. */
2088 int yyxbegin = yyn < 0 ? -yyn : 0;
2089
2090 /* Stay within bounds of both yycheck and yytname. */
2091 int yychecklim = YYLAST - yyn + 1;
2092 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2093 int yycount = 1;
2094
2095 yyarg[0] = yytname[yytype];
2096 yyfmt = yystpcpy (yyformat, yyunexpected);
2097
2098 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2099 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2100 {
2101 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2102 {
2103 yycount = 1;
2104 yysize = yysize0;
2105 yyformat[sizeof yyunexpected - 1] = '\0';
2106 break;
2107 }
2108 yyarg[yycount++] = yytname[yyx];
2109 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2110 yysize_overflow |= (yysize1 < yysize);
2111 yysize = yysize1;
2112 yyfmt = yystpcpy (yyfmt, yyprefix);
2113 yyprefix = yyor;
2114 }
2115
2116 yyf = YY_(yyformat);
2117 yysize1 = yysize + yystrlen (yyf);
2118 yysize_overflow |= (yysize1 < yysize);
2119 yysize = yysize1;
2120
2121 if (yysize_overflow)
2122 return YYSIZE_MAXIMUM;
2123
2124 if (yyresult)
2125 {
2126 /* Avoid sprintf, as that infringes on the user's name space.
2127 Don't have undefined behavior even if the translation
2128 produced a string with the wrong number of "%s"s. */
2129 char *yyp = yyresult;
2130 int yyi = 0;
2131 while ((*yyp = *yyf) != '\0')
2132 {
2133 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2134 {
2135 yyp += yytnamerr (yyp, yyarg[yyi++]);
2136 yyf += 2;
2137 }
2138 else
2139 {
2140 yyp++;
2141 yyf++;
2142 }
2143 }
2144 }
2145 return yysize;
2146 }
2147}
2148#endif /* YYERROR_VERBOSE */
2149
2150
2151/*-----------------------------------------------.
2152| Release the memory associated to this symbol. |
2153`-----------------------------------------------*/
2154
2155/*ARGSUSED*/
2156#if (defined __STDC__ || defined __C99__FUNC__ \
2157 || defined __cplusplus || defined _MSC_VER)
2158static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002159yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04002160#else
2161static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002162yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04002163 const char *yymsg;
2164 int yytype;
2165 YYSTYPE *yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002166 YYLTYPE *yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04002167 TParseContext* context;
2168#endif
2169{
2170 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002171 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002172 YYUSE (context);
2173
2174 if (!yymsg)
2175 yymsg = "Deleting";
2176 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2177
2178 switch (yytype)
2179 {
2180
2181 default:
2182 break;
2183 }
2184}
2185
2186/* Prevent warnings from -Wmissing-prototypes. */
2187#ifdef YYPARSE_PARAM
2188#if defined __STDC__ || defined __cplusplus
2189int yyparse (void *YYPARSE_PARAM);
2190#else
2191int yyparse ();
2192#endif
2193#else /* ! YYPARSE_PARAM */
2194#if defined __STDC__ || defined __cplusplus
2195int yyparse (TParseContext* context);
2196#else
2197int yyparse ();
2198#endif
2199#endif /* ! YYPARSE_PARAM */
2200
2201
2202
2203
2204
2205/*-------------------------.
2206| yyparse or yypush_parse. |
2207`-------------------------*/
2208
2209#ifdef YYPARSE_PARAM
2210#if (defined __STDC__ || defined __C99__FUNC__ \
2211 || defined __cplusplus || defined _MSC_VER)
2212int
2213yyparse (void *YYPARSE_PARAM)
2214#else
2215int
2216yyparse (YYPARSE_PARAM)
2217 void *YYPARSE_PARAM;
2218#endif
2219#else /* ! YYPARSE_PARAM */
2220#if (defined __STDC__ || defined __C99__FUNC__ \
2221 || defined __cplusplus || defined _MSC_VER)
2222int
2223yyparse (TParseContext* context)
2224#else
2225int
2226yyparse (context)
2227 TParseContext* context;
2228#endif
2229#endif
2230{
2231/* The lookahead symbol. */
2232int yychar;
2233
2234/* The semantic value of the lookahead symbol. */
2235YYSTYPE yylval;
2236
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002237/* Location data for the lookahead symbol. */
2238YYLTYPE yylloc;
2239
John Bauman66b8ab22014-05-06 15:57:45 -04002240 /* Number of syntax errors so far. */
2241 int yynerrs;
2242
2243 int yystate;
2244 /* Number of tokens to shift before error messages enabled. */
2245 int yyerrstatus;
2246
2247 /* The stacks and their tools:
2248 `yyss': related to states.
2249 `yyvs': related to semantic values.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002250 `yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002251
2252 Refer to the stacks thru separate pointers, to allow yyoverflow
2253 to reallocate them elsewhere. */
2254
2255 /* The state stack. */
2256 yytype_int16 yyssa[YYINITDEPTH];
2257 yytype_int16 *yyss;
2258 yytype_int16 *yyssp;
2259
2260 /* The semantic value stack. */
2261 YYSTYPE yyvsa[YYINITDEPTH];
2262 YYSTYPE *yyvs;
2263 YYSTYPE *yyvsp;
2264
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002265 /* The location stack. */
2266 YYLTYPE yylsa[YYINITDEPTH];
2267 YYLTYPE *yyls;
2268 YYLTYPE *yylsp;
2269
2270 /* The locations where the error started and ended. */
2271 YYLTYPE yyerror_range[2];
2272
John Bauman66b8ab22014-05-06 15:57:45 -04002273 YYSIZE_T yystacksize;
2274
2275 int yyn;
2276 int yyresult;
2277 /* Lookahead token as an internal (translated) token number. */
2278 int yytoken;
2279 /* The variables used to return semantic value and location from the
2280 action routines. */
2281 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002282 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002283
2284#if YYERROR_VERBOSE
2285 /* Buffer for error messages, and its allocated size. */
2286 char yymsgbuf[128];
2287 char *yymsg = yymsgbuf;
2288 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2289#endif
2290
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002291#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002292
2293 /* The number of symbols on the RHS of the reduced rule.
2294 Keep to zero when no symbol should be popped. */
2295 int yylen = 0;
2296
2297 yytoken = 0;
2298 yyss = yyssa;
2299 yyvs = yyvsa;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002300 yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002301 yystacksize = YYINITDEPTH;
2302
2303 YYDPRINTF ((stderr, "Starting parse\n"));
2304
2305 yystate = 0;
2306 yyerrstatus = 0;
2307 yynerrs = 0;
2308 yychar = YYEMPTY; /* Cause a token to be read. */
2309
2310 /* Initialize stack pointers.
2311 Waste one element of value and location stack
2312 so that they stay on the same level as the state stack.
2313 The wasted elements are never initialized. */
2314 yyssp = yyss;
2315 yyvsp = yyvs;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002316 yylsp = yyls;
2317
2318#if YYLTYPE_IS_TRIVIAL
2319 /* Initialize the default location before parsing starts. */
2320 yylloc.first_line = yylloc.last_line = 1;
2321 yylloc.first_column = yylloc.last_column = 1;
2322#endif
John Bauman66b8ab22014-05-06 15:57:45 -04002323
2324 goto yysetstate;
2325
2326/*------------------------------------------------------------.
2327| yynewstate -- Push a new state, which is found in yystate. |
2328`------------------------------------------------------------*/
2329 yynewstate:
2330 /* In all cases, when you get here, the value and location stacks
2331 have just been pushed. So pushing a state here evens the stacks. */
2332 yyssp++;
2333
2334 yysetstate:
2335 *yyssp = yystate;
2336
2337 if (yyss + yystacksize - 1 <= yyssp)
2338 {
2339 /* Get the current used size of the three stacks, in elements. */
2340 YYSIZE_T yysize = yyssp - yyss + 1;
2341
2342#ifdef yyoverflow
2343 {
2344 /* Give user a chance to reallocate the stack. Use copies of
2345 these so that the &'s don't force the real ones into
2346 memory. */
2347 YYSTYPE *yyvs1 = yyvs;
2348 yytype_int16 *yyss1 = yyss;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002349 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002350
2351 /* Each stack pointer address is followed by the size of the
2352 data in use in that stack, in bytes. This used to be a
2353 conditional around just the two extra args, but that might
2354 be undefined if yyoverflow is a macro. */
2355 yyoverflow (YY_("memory exhausted"),
2356 &yyss1, yysize * sizeof (*yyssp),
2357 &yyvs1, yysize * sizeof (*yyvsp),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002358 &yyls1, yysize * sizeof (*yylsp),
John Bauman66b8ab22014-05-06 15:57:45 -04002359 &yystacksize);
2360
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002361 yyls = yyls1;
John Bauman66b8ab22014-05-06 15:57:45 -04002362 yyss = yyss1;
2363 yyvs = yyvs1;
2364 }
2365#else /* no yyoverflow */
2366# ifndef YYSTACK_RELOCATE
2367 goto yyexhaustedlab;
2368# else
2369 /* Extend the stack our own way. */
2370 if (YYMAXDEPTH <= yystacksize)
2371 goto yyexhaustedlab;
2372 yystacksize *= 2;
2373 if (YYMAXDEPTH < yystacksize)
2374 yystacksize = YYMAXDEPTH;
2375
2376 {
2377 yytype_int16 *yyss1 = yyss;
2378 union yyalloc *yyptr =
2379 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2380 if (! yyptr)
2381 goto yyexhaustedlab;
2382 YYSTACK_RELOCATE (yyss_alloc, yyss);
2383 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002384 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002385# undef YYSTACK_RELOCATE
2386 if (yyss1 != yyssa)
2387 YYSTACK_FREE (yyss1);
2388 }
2389# endif
2390#endif /* no yyoverflow */
2391
2392 yyssp = yyss + yysize - 1;
2393 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002394 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002395
2396 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2397 (unsigned long int) yystacksize));
2398
2399 if (yyss + yystacksize - 1 <= yyssp)
2400 YYABORT;
2401 }
2402
2403 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2404
2405 if (yystate == YYFINAL)
2406 YYACCEPT;
2407
2408 goto yybackup;
2409
2410/*-----------.
2411| yybackup. |
2412`-----------*/
2413yybackup:
2414
2415 /* Do appropriate processing given the current state. Read a
2416 lookahead token if we need one and don't already have one. */
2417
2418 /* First try to decide what to do without reference to lookahead token. */
2419 yyn = yypact[yystate];
2420 if (yyn == YYPACT_NINF)
2421 goto yydefault;
2422
2423 /* Not known => get a lookahead token if don't already have one. */
2424
2425 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2426 if (yychar == YYEMPTY)
2427 {
2428 YYDPRINTF ((stderr, "Reading a token: "));
2429 yychar = YYLEX;
2430 }
2431
2432 if (yychar <= YYEOF)
2433 {
2434 yychar = yytoken = YYEOF;
2435 YYDPRINTF ((stderr, "Now at end of input.\n"));
2436 }
2437 else
2438 {
2439 yytoken = YYTRANSLATE (yychar);
2440 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2441 }
2442
2443 /* If the proper action on seeing token YYTOKEN is to reduce or to
2444 detect an error, take that action. */
2445 yyn += yytoken;
2446 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2447 goto yydefault;
2448 yyn = yytable[yyn];
2449 if (yyn <= 0)
2450 {
2451 if (yyn == 0 || yyn == YYTABLE_NINF)
2452 goto yyerrlab;
2453 yyn = -yyn;
2454 goto yyreduce;
2455 }
2456
2457 /* Count tokens shifted since error; after three, turn off error
2458 status. */
2459 if (yyerrstatus)
2460 yyerrstatus--;
2461
2462 /* Shift the lookahead token. */
2463 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2464
2465 /* Discard the shifted token. */
2466 yychar = YYEMPTY;
2467
2468 yystate = yyn;
2469 *++yyvsp = yylval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002470 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002471 goto yynewstate;
2472
2473
2474/*-----------------------------------------------------------.
2475| yydefault -- do the default action for the current state. |
2476`-----------------------------------------------------------*/
2477yydefault:
2478 yyn = yydefact[yystate];
2479 if (yyn == 0)
2480 goto yyerrlab;
2481 goto yyreduce;
2482
2483
2484/*-----------------------------.
2485| yyreduce -- Do a reduction. |
2486`-----------------------------*/
2487yyreduce:
2488 /* yyn is the number of a rule to reduce with. */
2489 yylen = yyr2[yyn];
2490
2491 /* If YYLEN is nonzero, implement the default value of the action:
2492 `$$ = $1'.
2493
2494 Otherwise, the following line sets YYVAL to garbage.
2495 This behavior is undocumented and Bison
2496 users should not rely upon it. Assigning to YYVAL
2497 unconditionally makes the parser a bit smaller, and it avoids a
2498 GCC warning that YYVAL may be used uninitialized. */
2499 yyval = yyvsp[1-yylen];
2500
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002501 /* Default location. */
2502 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002503 YY_REDUCE_PRINT (yyn);
2504 switch (yyn)
2505 {
2506 case 2:
2507
2508 {
2509 // The symbol table search was done in the lexical phase
Alexis Hetu76079bc2015-07-08 08:29:36 -04002510 const TVariable *variable = context->getNamedVariable((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].lex).string, (yyvsp[(1) - (1)].lex).symbol);
John Bauman66b8ab22014-05-06 15:57:45 -04002511
2512 // don't delete $1.string, it's used by error recovery, and the pool
2513 // pop will reclaim the memory
2514
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002515 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002516 ConstantUnion* constArray = variable->getConstPointer();
2517 TType t(variable->getType());
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002518 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002519 } else
2520 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2521 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002522 variable->getType(), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002523 }
2524 break;
2525
2526 case 3:
2527
2528 {
2529 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2530 }
2531 break;
2532
2533 case 4:
2534
2535 {
John Bauman66b8ab22014-05-06 15:57:45 -04002536 ConstantUnion *unionArray = new ConstantUnion[1];
2537 unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002538 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002539 }
2540 break;
2541
2542 case 5:
2543
2544 {
2545 ConstantUnion *unionArray = new ConstantUnion[1];
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002546 unionArray->setUConst((yyvsp[(1) - (1)].lex).u);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002547 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002548 }
2549 break;
2550
2551 case 6:
2552
2553 {
2554 ConstantUnion *unionArray = new ConstantUnion[1];
John Bauman66b8ab22014-05-06 15:57:45 -04002555 unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002556 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002557 }
2558 break;
2559
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002560 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002561
2562 {
2563 ConstantUnion *unionArray = new ConstantUnion[1];
2564 unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002565 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002566 }
2567 break;
2568
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002569 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002570
2571 {
2572 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2573 }
2574 break;
2575
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002576 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002577
2578 {
2579 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2580 }
2581 break;
2582
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002583 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002584
2585 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002586 (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[(1) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode));
John Bauman66b8ab22014-05-06 15:57:45 -04002587 }
2588 break;
2589
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002590 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002591
2592 {
2593 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2594 }
2595 break;
2596
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002597 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002598
2599 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002600 (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002601 }
2602 break;
2603
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002604 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002605
2606 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002607 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002608 }
2609 break;
2610
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002611 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002612
2613 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002614 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002615 }
2616 break;
2617
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002618 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002619
2620 {
2621 if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
2622 context->recover();
2623 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2624 }
2625 break;
2626
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002627 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002628
2629 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002630 bool fatalError = false;
Alexis Hetu950cb442015-07-06 11:38:53 -04002631 (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).nodePair.node1, (yyvsp[(1) - (1)].interm).nodePair.node2, (yylsp[(1) - (1)]), &fatalError);
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002632 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002633 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002634 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002635 }
John Bauman66b8ab22014-05-06 15:57:45 -04002636 }
2637 break;
2638
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002639 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002640
2641 {
2642 (yyval.interm) = (yyvsp[(1) - (1)].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002643 (yyval.interm).nodePair.node2 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002644 }
2645 break;
2646
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002647 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002648
2649 {
Alexis Hetu950cb442015-07-06 11:38:53 -04002650 ES3_ONLY("", (yylsp[(3) - (3)]), "methods");
John Bauman66b8ab22014-05-06 15:57:45 -04002651 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu950cb442015-07-06 11:38:53 -04002652 (yyval.interm).nodePair.node2 = (yyvsp[(1) - (3)].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002653 }
2654 break;
2655
John Bauman66b8ab22014-05-06 15:57:45 -04002656 case 19:
2657
2658 {
2659 (yyval.interm) = (yyvsp[(1) - (2)].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002660 }
2661 break;
2662
2663 case 20:
2664
2665 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002666 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002667 }
2668 break;
2669
2670 case 21:
2671
2672 {
John Bauman66b8ab22014-05-06 15:57:45 -04002673 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002674 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002675 }
2676 break;
2677
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002678 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002679
2680 {
2681 (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002682 (yyval.interm).nodePair.node1 = nullptr;
John Bauman66b8ab22014-05-06 15:57:45 -04002683 }
2684 break;
2685
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002686 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002687
2688 {
2689 TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2690 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2691 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
Alexis Hetu950cb442015-07-06 11:38:53 -04002692 (yyval.interm).nodePair.node1 = (yyvsp[(2) - (2)].interm.intermTypedNode);
John Bauman66b8ab22014-05-06 15:57:45 -04002693 }
2694 break;
2695
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002696 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002697
2698 {
2699 TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2700 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2701 (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
Alexis Hetu950cb442015-07-06 11:38:53 -04002702 (yyval.interm).nodePair.node1 = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002703 }
2704 break;
2705
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002706 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002707
2708 {
2709 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2710 }
2711 break;
2712
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002713 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002714
2715 {
Alexis Hetue5246692015-06-18 12:34:52 -04002716 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002717 ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002718 }
Alexis Hetue5246692015-06-18 12:34:52 -04002719 (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002720 }
2721 break;
2722
John Bauman66b8ab22014-05-06 15:57:45 -04002723 case 27:
2724
2725 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002726 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002727 context->recover();
2728 TType type(EbtVoid, EbpUndefined);
2729 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2730 (yyval.interm.function) = function;
2731 }
2732 break;
2733
2734 case 28:
2735
2736 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002737 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002738 context->recover();
2739 TType type(EbtVoid, EbpUndefined);
2740 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2741 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002742 }
2743 break;
2744
2745 case 29:
2746
2747 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002748 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2749 }
2750 break;
2751
2752 case 30:
2753
2754 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002755 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002756 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002757 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002758 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002759 context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002760 context->recover();
2761 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2762 }
2763 }
2764 break;
2765
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002766 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002767
2768 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002769 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002770 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002771 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002772 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002773 context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002774 context->recover();
2775 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2776 }
2777 }
2778 break;
2779
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002780 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002781
2782 {
2783 if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002784 (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 -04002785 if ((yyval.interm.intermTypedNode) == 0) {
2786 const char* errorOp = "";
2787 switch((yyvsp[(1) - (2)].interm).op) {
2788 case EOpNegative: errorOp = "-"; break;
2789 case EOpLogicalNot: errorOp = "!"; break;
Alexis Hetud061e422015-05-13 16:37:50 -04002790 case EOpBitwiseNot: errorOp = "~"; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002791 default: break;
2792 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002793 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002794 context->recover();
2795 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2796 }
2797 } else
2798 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2799 }
2800 break;
2801
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002802 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002803
Alexis Hetu253fdd12015-07-07 15:12:46 -04002804 { (yyval.interm).op = EOpNull; }
John Bauman66b8ab22014-05-06 15:57:45 -04002805 break;
2806
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002807 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002808
Alexis Hetu253fdd12015-07-07 15:12:46 -04002809 { (yyval.interm).op = EOpNegative; }
John Bauman66b8ab22014-05-06 15:57:45 -04002810 break;
2811
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002812 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002813
Alexis Hetu253fdd12015-07-07 15:12:46 -04002814 { (yyval.interm).op = EOpLogicalNot; }
John Bauman66b8ab22014-05-06 15:57:45 -04002815 break;
2816
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002817 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002818
Alexis Hetu17809052015-05-13 11:28:22 -04002819 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002820 ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002821 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002822 }
John Bauman66b8ab22014-05-06 15:57:45 -04002823 break;
2824
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002825 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002826
Alexis Hetu17809052015-05-13 11:28:22 -04002827 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2828 break;
2829
2830 case 38:
2831
John Bauman66b8ab22014-05-06 15:57:45 -04002832 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002833 FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002834 (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 -04002835 }
2836 break;
2837
Alexis Hetu17809052015-05-13 11:28:22 -04002838 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002839
2840 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002841 FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002842 (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 -04002843 }
2844 break;
2845
Alexis Hetu17809052015-05-13 11:28:22 -04002846 case 40:
2847
2848 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002849 FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002850 ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002851 (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 -04002852 }
2853 break;
2854
2855 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002856
2857 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2858 break;
2859
Alexis Hetu17809052015-05-13 11:28:22 -04002860 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002861
2862 {
Alexis Hetub4769582015-06-16 12:19:50 -04002863 (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 -04002864 }
2865 break;
2866
Alexis Hetu17809052015-05-13 11:28:22 -04002867 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002868
2869 {
Alexis Hetub4769582015-06-16 12:19:50 -04002870 (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 -04002871 }
2872 break;
2873
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002874 case 44:
2875
Alexis Hetu17809052015-05-13 11:28:22 -04002876 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2877 break;
2878
2879 case 45:
2880
2881 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002882 ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002883 (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 -04002884 }
2885 break;
2886
2887 case 46:
2888
2889 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002890 ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002891 (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 -04002892 }
2893 break;
2894
2895 case 47:
2896
2897 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2898 break;
2899
2900 case 48:
2901
John Bauman66b8ab22014-05-06 15:57:45 -04002902 {
Alexis Hetub4769582015-06-16 12:19:50 -04002903 (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 -04002904 }
2905 break;
2906
Alexis Hetu17809052015-05-13 11:28:22 -04002907 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002908
2909 {
Alexis Hetub4769582015-06-16 12:19:50 -04002910 (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 -04002911 }
2912 break;
2913
Alexis Hetu17809052015-05-13 11:28:22 -04002914 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002915
2916 {
Alexis Hetub4769582015-06-16 12:19:50 -04002917 (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 -04002918 }
2919 break;
2920
Alexis Hetu17809052015-05-13 11:28:22 -04002921 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002922
2923 {
Alexis Hetub4769582015-06-16 12:19:50 -04002924 (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 -04002925 }
2926 break;
2927
Alexis Hetu17809052015-05-13 11:28:22 -04002928 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002929
2930 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2931 break;
2932
Alexis Hetu17809052015-05-13 11:28:22 -04002933 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002934
2935 {
Alexis Hetub4769582015-06-16 12:19:50 -04002936 (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 -04002937 }
2938 break;
2939
Alexis Hetu17809052015-05-13 11:28:22 -04002940 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002941
2942 {
Alexis Hetub4769582015-06-16 12:19:50 -04002943 (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 -04002944 }
2945 break;
2946
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002947 case 55:
2948
Alexis Hetu17809052015-05-13 11:28:22 -04002949 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2950 break;
2951
2952 case 56:
2953
2954 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002955 ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002956 (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04002957 }
2958 break;
2959
2960 case 57:
2961
2962 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2963 break;
2964
2965 case 58:
2966
2967 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002968 ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002969 (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 -04002970 }
2971 break;
2972
2973 case 59:
2974
2975 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2976 break;
2977
2978 case 60:
2979
2980 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002981 ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002982 (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 -04002983 }
2984 break;
2985
2986 case 61:
2987
2988 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2989 break;
2990
2991 case 62:
2992
John Bauman66b8ab22014-05-06 15:57:45 -04002993 {
Alexis Hetub4769582015-06-16 12:19:50 -04002994 (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 -04002995 }
2996 break;
2997
Alexis Hetu17809052015-05-13 11:28:22 -04002998 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002999
3000 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3001 break;
3002
Alexis Hetu17809052015-05-13 11:28:22 -04003003 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04003004
3005 {
Alexis Hetub4769582015-06-16 12:19:50 -04003006 (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 -04003007 }
3008 break;
3009
Alexis Hetu17809052015-05-13 11:28:22 -04003010 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04003011
3012 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3013 break;
3014
Alexis Hetu17809052015-05-13 11:28:22 -04003015 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04003016
3017 {
Alexis Hetub4769582015-06-16 12:19:50 -04003018 (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 -04003019 }
3020 break;
3021
Alexis Hetu17809052015-05-13 11:28:22 -04003022 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04003023
3024 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3025 break;
3026
Alexis Hetu17809052015-05-13 11:28:22 -04003027 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04003028
3029 {
Alexis Hetueee212e2015-07-07 17:13:30 -04003030 (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 -04003031 }
3032 break;
3033
Alexis Hetu17809052015-05-13 11:28:22 -04003034 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04003035
3036 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3037 break;
3038
Alexis Hetu17809052015-05-13 11:28:22 -04003039 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04003040
3041 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003042 if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003043 context->recover();
Alexis Hetue5246692015-06-18 12:34:52 -04003044 (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 -04003045 }
3046 break;
3047
Alexis Hetu17809052015-05-13 11:28:22 -04003048 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04003049
Alexis Hetu253fdd12015-07-07 15:12:46 -04003050 { (yyval.interm).op = EOpAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003051 break;
3052
Alexis Hetu17809052015-05-13 11:28:22 -04003053 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04003054
Alexis Hetu253fdd12015-07-07 15:12:46 -04003055 { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpMulAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003056 break;
3057
Alexis Hetu17809052015-05-13 11:28:22 -04003058 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04003059
Alexis Hetu253fdd12015-07-07 15:12:46 -04003060 { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpDivAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003061 break;
3062
Alexis Hetu17809052015-05-13 11:28:22 -04003063 case 74:
3064
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003065 { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003066 FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpIModAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003067 break;
3068
3069 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04003070
Alexis Hetu253fdd12015-07-07 15:12:46 -04003071 { (yyval.interm).op = EOpAddAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003072 break;
3073
Alexis Hetu17809052015-05-13 11:28:22 -04003074 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04003075
Alexis Hetu253fdd12015-07-07 15:12:46 -04003076 { (yyval.interm).op = EOpSubAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003077 break;
3078
Alexis Hetu17809052015-05-13 11:28:22 -04003079 case 77:
3080
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003081 { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003082 FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)]));
3083 (yyval.interm).op = EOpBitShiftLeftAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003084 break;
3085
3086 case 78:
3087
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003088 { ES3_ONLY(">>=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003089 FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)]));
3090 (yyval.interm).op = EOpBitShiftRightAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003091 break;
3092
3093 case 79:
3094
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003095 { ES3_ONLY("&=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003096 FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)]));
3097 (yyval.interm).op = EOpBitwiseAndAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003098 break;
3099
3100 case 80:
3101
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003102 { ES3_ONLY("^=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003103 FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)]));
3104 (yyval.interm).op = EOpBitwiseXorAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003105 break;
3106
3107 case 81:
3108
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003109 { ES3_ONLY("|=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003110 FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)]));
3111 (yyval.interm).op = EOpBitwiseOrAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003112 break;
3113
3114 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003115
3116 {
3117 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3118 }
3119 break;
3120
Alexis Hetu17809052015-05-13 11:28:22 -04003121 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003122
3123 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003124 (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 -04003125 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003126 context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003127 context->recover();
3128 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3129 }
3130 }
3131 break;
3132
Alexis Hetu17809052015-05-13 11:28:22 -04003133 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003134
3135 {
3136 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3137 context->recover();
3138 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3139 }
3140 break;
3141
Alexis Hetu17809052015-05-13 11:28:22 -04003142 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003143
3144 {
Alexis Hetue5246692015-06-18 12:34:52 -04003145 if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003146 context->recover();
3147 (yyval.lex) = (yyvsp[(1) - (2)].lex);
3148 }
3149 break;
3150
3151 case 86:
3152
3153 {
John Bauman66b8ab22014-05-06 15:57:45 -04003154 TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3155
3156 TIntermAggregate *prototype = new TIntermAggregate;
3157 prototype->setType(function.getReturnType());
3158 prototype->setName(function.getName());
3159
Alexis Hetu76a343a2015-06-04 17:21:22 -04003160 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003161 {
3162 const TParameter &param = function.getParam(i);
3163 if (param.name != 0)
3164 {
John Baumand4ae8632014-05-06 16:18:33 -04003165 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003166
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003167 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 -04003168 }
3169 else
3170 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003171 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003172 }
3173 }
3174
3175 prototype->setOp(EOpPrototype);
3176 (yyval.interm.intermNode) = prototype;
3177
3178 context->symbolTable.pop();
3179 }
3180 break;
3181
Alexis Hetua35d8232015-06-11 17:11:06 -04003182 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003183
3184 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003185 TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3186 if (aggNode && aggNode->getOp() == EOpNull)
3187 aggNode->setOp(EOpDeclaration);
3188 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003189 }
3190 break;
3191
Alexis Hetua35d8232015-06-11 17:11:06 -04003192 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003193
3194 {
John Baumand4ae8632014-05-06 16:18:33 -04003195 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003196 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 -04003197 context->recover();
3198 }
John Bauman66b8ab22014-05-06 15:57:45 -04003199 (yyval.interm.intermNode) = 0;
3200 }
3201 break;
3202
Alexis Hetua35d8232015-06-11 17:11:06 -04003203 case 89:
3204
3205 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003206 ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003207 (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 -04003208 }
3209 break;
3210
3211 case 90:
3212
3213 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003214 ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003215 (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 -04003216 }
3217 break;
3218
3219 case 91:
3220
3221 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003222 ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003223 (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 -04003224 }
3225 break;
3226
3227 case 92:
3228
3229 {
3230 context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3231 (yyval.interm.intermNode) = 0;
3232 }
3233 break;
3234
3235 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003236
3237 {
3238 //
3239 // Multiple declarations of the same function are allowed.
3240 //
3241 // If this is a definition, the definition production code will check for redefinitions
3242 // (we don't know at this point if it's a definition or not).
3243 //
3244 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3245 //
Alexis Hetu0a655842015-06-22 16:52:11 -04003246 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003247 if (prevDec) {
3248 if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003249 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 -04003250 context->recover();
3251 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003252 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04003253 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003254 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 -04003255 context->recover();
3256 }
3257 }
3258 }
3259
3260 //
3261 // If this is a redeclaration, it could also be a definition,
3262 // in which case, we want to use the variable names from this one, and not the one that's
3263 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3264 //
3265 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003266
3267 // We're at the inner scope level of the function's arguments and body statement.
3268 // Add the function prototype to the surrounding scope instead.
3269 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3270 }
3271 break;
3272
Alexis Hetua35d8232015-06-11 17:11:06 -04003273 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003274
3275 {
3276 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3277 }
3278 break;
3279
Alexis Hetua35d8232015-06-11 17:11:06 -04003280 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003281
3282 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003283 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3284 }
3285 break;
3286
Alexis Hetua35d8232015-06-11 17:11:06 -04003287 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003288
3289 {
John Bauman66b8ab22014-05-06 15:57:45 -04003290 // Add the parameter
3291 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3292 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3293 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3294 else
3295 delete (yyvsp[(2) - (2)].interm).param.type;
3296 }
3297 break;
3298
Alexis Hetua35d8232015-06-11 17:11:06 -04003299 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003300
3301 {
3302 //
3303 // Only first parameter of one-parameter functions can be void
3304 // The check for named parameters not being void is done in parameter_declarator
3305 //
3306 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3307 //
3308 // This parameter > first is void
3309 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003310 context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003311 context->recover();
3312 delete (yyvsp[(3) - (3)].interm).param.type;
3313 } else {
3314 // Add the parameter
3315 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3316 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3317 }
3318 }
3319 break;
3320
Alexis Hetua35d8232015-06-11 17:11:06 -04003321 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003322
3323 {
3324 if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003325 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 -04003326 context->recover();
3327 }
3328 // make sure a sampler is not involved as well...
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003329 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003330 context->recover();
3331
3332 // Add the function as a prototype after parsing it (we do not support recursion)
3333 TFunction *function;
3334 TType type((yyvsp[(1) - (3)].interm.type));
3335 function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3336 (yyval.interm.function) = function;
3337
3338 context->symbolTable.push();
3339 }
3340 break;
3341
Alexis Hetua35d8232015-06-11 17:11:06 -04003342 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003343
3344 {
3345 if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003346 context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003347 context->recover();
3348 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003349 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003350 context->recover();
3351 TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003352 (yyval.interm).param = param;
3353 }
3354 break;
3355
Alexis Hetua35d8232015-06-11 17:11:06 -04003356 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003357
3358 {
3359 // Check that we can make an array out of this type
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003360 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003361 context->recover();
3362
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003363 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003364 context->recover();
3365
3366 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003367 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003368 context->recover();
3369 (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3370
3371 TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3372 TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003373 (yyval.interm).param = param;
3374 }
3375 break;
3376
Alexis Hetu17809052015-05-13 11:28:22 -04003377 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003378
3379 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003380 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003381 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 -04003382 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003383 }
3384 break;
3385
Alexis Hetu17809052015-05-13 11:28:22 -04003386 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003387
3388 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003389 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003390 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003391 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003392 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003393 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003394 }
3395 break;
3396
Alexis Hetu17809052015-05-13 11:28:22 -04003397 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003398
3399 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003400 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003401 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 -04003402 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003403 }
3404 break;
3405
Alexis Hetu17809052015-05-13 11:28:22 -04003406 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003407
3408 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003409 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003410 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003411 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003412 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003413 context->recover();
3414 }
3415 break;
3416
3417 case 105:
3418
3419 {
3420 (yyval.interm.qualifier) = EvqIn;
3421 }
3422 break;
3423
3424 case 106:
3425
3426 {
3427 (yyval.interm.qualifier) = EvqIn;
3428 }
3429 break;
3430
3431 case 107:
3432
3433 {
3434 (yyval.interm.qualifier) = EvqOut;
3435 }
3436 break;
3437
3438 case 108:
3439
3440 {
3441 (yyval.interm.qualifier) = EvqInOut;
3442 }
3443 break;
3444
3445 case 109:
3446
3447 {
John Bauman66b8ab22014-05-06 15:57:45 -04003448 TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3449 (yyval.interm).param = param;
3450 }
3451 break;
3452
Alexis Hetua35d8232015-06-11 17:11:06 -04003453 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003454
3455 {
3456 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3457 }
3458 break;
3459
Alexis Hetua35d8232015-06-11 17:11:06 -04003460 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003461
3462 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003463 (yyval.interm) = (yyvsp[(1) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003464 (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 -04003465 }
3466 break;
3467
Alexis Hetua35d8232015-06-11 17:11:06 -04003468 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003469
3470 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003471 (yyval.interm) = (yyvsp[(1) - (6)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003472 (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 -04003473 }
3474 break;
3475
Alexis Hetua35d8232015-06-11 17:11:06 -04003476 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003477
3478 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003479 ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003480 (yyval.interm) = (yyvsp[(1) - (7)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003481 (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 -04003482 }
3483 break;
3484
Alexis Hetua35d8232015-06-11 17:11:06 -04003485 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003486
3487 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003488 ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003489 (yyval.interm) = (yyvsp[(1) - (8)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003490 (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 -04003491 }
3492 break;
3493
Alexis Hetua35d8232015-06-11 17:11:06 -04003494 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003495
3496 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003497 (yyval.interm) = (yyvsp[(1) - (5)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003498 (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 -04003499 }
3500 break;
3501
Alexis Hetua35d8232015-06-11 17:11:06 -04003502 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003503
3504 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003505 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003506 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003507 }
3508 break;
3509
Alexis Hetua35d8232015-06-11 17:11:06 -04003510 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003511
3512 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003513 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003514 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003515 }
3516 break;
3517
Alexis Hetua35d8232015-06-11 17:11:06 -04003518 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003519
3520 {
John Bauman66b8ab22014-05-06 15:57:45 -04003521 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003522 (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 -04003523 }
3524 break;
3525
Alexis Hetua35d8232015-06-11 17:11:06 -04003526 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003527
3528 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003529 ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003530 (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003531 (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 -04003532 }
3533 break;
3534
Alexis Hetua35d8232015-06-11 17:11:06 -04003535 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003536
3537 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003538 ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003539 (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003540 (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 -04003541 }
3542 break;
3543
Alexis Hetua35d8232015-06-11 17:11:06 -04003544 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003545
3546 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003547 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003548 (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 -04003549 }
3550 break;
3551
Alexis Hetua35d8232015-06-11 17:11:06 -04003552 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003553
3554 {
3555 // $$.type is not used in invariant declarations.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003556 (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 -04003557 }
3558 break;
3559
Alexis Hetua35d8232015-06-11 17:11:06 -04003560 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003561
3562 {
John Bauman66b8ab22014-05-06 15:57:45 -04003563 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3564
3565 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003566 ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003567 if (context->getShaderVersion() != 300) {
3568 (yyvsp[(1) - (1)].interm.type).clearArrayness();
3569 }
John Bauman66b8ab22014-05-06 15:57:45 -04003570 }
3571 }
3572 break;
3573
Alexis Hetua35d8232015-06-11 17:11:06 -04003574 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003575
3576 {
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003577 (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 -04003578 }
3579 break;
3580
Alexis Hetua35d8232015-06-11 17:11:06 -04003581 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003582
3583 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003584 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003585 }
3586 break;
3587
Alexis Hetua35d8232015-06-11 17:11:06 -04003588 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003589
3590 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003591 (yyval.interm.type).qualifier = EvqFlat;
3592 }
3593 break;
3594
Alexis Hetua35d8232015-06-11 17:11:06 -04003595 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003596
3597 {
3598 (yyval.interm.qualifier) = EvqConstReadOnly;
3599 }
3600 break;
3601
Alexis Hetua35d8232015-06-11 17:11:06 -04003602 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003603
3604 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003605 VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3606 ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3607 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003608 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003609 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003610 }
3611 break;
3612
Alexis Hetua35d8232015-06-11 17:11:06 -04003613 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003614
3615 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003616 ES2_ONLY("varying", (yylsp[(1) - (1)]));
3617 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003618 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003619 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003620 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003621 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003622 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003623 }
3624 break;
3625
Alexis Hetua35d8232015-06-11 17:11:06 -04003626 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003627
3628 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003629 ES2_ONLY("varying", (yylsp[(1) - (2)]));
3630 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003631 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003632 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003633 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003634 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003635 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003636 }
3637 break;
3638
Alexis Hetua35d8232015-06-11 17:11:06 -04003639 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003640
3641 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003642 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003643 }
3644 break;
3645
Alexis Hetua35d8232015-06-11 17:11:06 -04003646 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003647
3648 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003649 (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 -04003650 }
3651 break;
3652
Alexis Hetua35d8232015-06-11 17:11:06 -04003653 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003654
3655 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003656 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 -04003657 context->recover();
3658
3659 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003660 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003661 }
3662 break;
3663
Alexis Hetua35d8232015-06-11 17:11:06 -04003664 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003665
3666 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003667 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3668 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3669 }
3670 break;
3671
Alexis Hetua35d8232015-06-11 17:11:06 -04003672 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003673
3674 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003675 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003676 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3677 }
3678 break;
3679
Alexis Hetua35d8232015-06-11 17:11:06 -04003680 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003681
3682 {
Alexis Hetuad527752015-07-07 13:31:44 -04003683 context->es3InvariantErrorCheck((yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(1) - (2)]));
3684 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
3685 (yyval.interm.type).invariant = true;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003686 }
3687 break;
3688
Alexis Hetua35d8232015-06-11 17:11:06 -04003689 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003690
3691 {
Alexis Hetuad527752015-07-07 13:31:44 -04003692 context->es3InvariantErrorCheck((yyvsp[(3) - (3)].interm.type).qualifier, (yylsp[(1) - (3)]));
3693 (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(2) - (3)]), (yyvsp[(2) - (3)].interm.type).qualifier, (yylsp[(3) - (3)]), (yyvsp[(3) - (3)].interm.type).qualifier);
3694 (yyval.interm.type).invariant = true;
3695 }
3696 break;
3697
3698 case 138:
3699
3700 {
3701 (yyval.interm.type).qualifier = EvqConstExpr;
3702 }
3703 break;
3704
3705 case 139:
3706
3707 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003708 ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003709 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003710 }
3711 break;
3712
Alexis Hetuad527752015-07-07 13:31:44 -04003713 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003714
3715 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003716 ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003717 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003718 }
3719 break;
3720
Alexis Hetuad527752015-07-07 13:31:44 -04003721 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003722
3723 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003724 ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003725 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003726 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003727 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 -04003728 context->recover();
3729 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003730 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003731 }
3732 break;
3733
Alexis Hetuad527752015-07-07 13:31:44 -04003734 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003735
3736 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003737 ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003738 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003739 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003740 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 -04003741 context->recover();
3742 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003743 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003744 }
3745 break;
3746
Alexis Hetuad527752015-07-07 13:31:44 -04003747 case 143:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003748
3749 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003750 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003751 context->recover();
3752 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003753 }
3754 break;
3755
Alexis Hetuad527752015-07-07 13:31:44 -04003756 case 144:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003757
3758 {
John Bauman66b8ab22014-05-06 15:57:45 -04003759 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3760
3761 if ((yyval.interm.type).precision == EbpUndefined) {
3762 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003763 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003764 context->recover();
3765 }
3766 }
3767 }
3768 break;
3769
Alexis Hetuad527752015-07-07 13:31:44 -04003770 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003771
3772 {
3773 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3774 (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
3775 }
3776 break;
3777
Alexis Hetuad527752015-07-07 13:31:44 -04003778 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003779
3780 {
3781 (yyval.interm.precision) = EbpHigh;
3782 }
3783 break;
3784
Alexis Hetuad527752015-07-07 13:31:44 -04003785 case 147:
John Bauman66b8ab22014-05-06 15:57:45 -04003786
3787 {
3788 (yyval.interm.precision) = EbpMedium;
3789 }
3790 break;
3791
Alexis Hetuad527752015-07-07 13:31:44 -04003792 case 148:
John Bauman66b8ab22014-05-06 15:57:45 -04003793
3794 {
3795 (yyval.interm.precision) = EbpLow;
3796 }
3797 break;
3798
Alexis Hetuad527752015-07-07 13:31:44 -04003799 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003800
3801 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003802 ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
Nicolas Capens7d626792015-02-17 17:58:31 -05003803 (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
3804 }
3805 break;
3806
Alexis Hetuad527752015-07-07 13:31:44 -04003807 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003808
3809 {
3810 (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
3811 }
3812 break;
3813
Alexis Hetuad527752015-07-07 13:31:44 -04003814 case 151:
Nicolas Capens7d626792015-02-17 17:58:31 -05003815
3816 {
3817 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
3818 }
3819 break;
3820
Alexis Hetuad527752015-07-07 13:31:44 -04003821 case 152:
Nicolas Capens7d626792015-02-17 17:58:31 -05003822
3823 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003824 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003825 }
3826 break;
3827
Alexis Hetua35d8232015-06-11 17:11:06 -04003828 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003829
3830 {
Alexis Hetuad527752015-07-07 13:31:44 -04003831 (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)]));
3832 }
3833 break;
3834
3835 case 154:
3836
3837 {
3838 (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)]));
3839 }
3840 break;
3841
3842 case 155:
3843
3844 {
John Bauman66b8ab22014-05-06 15:57:45 -04003845 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3846 }
3847 break;
3848
Alexis Hetuad527752015-07-07 13:31:44 -04003849 case 156:
John Bauman66b8ab22014-05-06 15:57:45 -04003850
3851 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003852 ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array");
Alexis Hetue5246692015-06-18 12:34:52 -04003853 (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type);
3854 (yyval.interm.type).setArray(true, 0);
3855 }
3856 break;
3857
Alexis Hetuad527752015-07-07 13:31:44 -04003858 case 157:
Alexis Hetue5246692015-06-18 12:34:52 -04003859
3860 {
John Bauman66b8ab22014-05-06 15:57:45 -04003861 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3862
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003863 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003864 context->recover();
3865 else {
3866 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003867 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003868 context->recover();
3869 (yyval.interm.type).setArray(true, size);
3870 }
3871 }
3872 break;
3873
Alexis Hetuad527752015-07-07 13:31:44 -04003874 case 158:
Alexis Hetu17809052015-05-13 11:28:22 -04003875
3876 {
3877 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003878 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003879 }
3880 break;
3881
Alexis Hetu17809052015-05-13 11:28:22 -04003882 case 159:
3883
3884 {
3885 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003886 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003887 }
3888 break;
3889
3890 case 160:
3891
3892 {
3893 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003894 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003895 }
3896 break;
3897
3898 case 161:
3899
3900 {
3901 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003902 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003903 }
3904 break;
3905
3906 case 162:
3907
3908 {
3909 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003910 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003911 }
3912 break;
3913
3914 case 163:
3915
3916 {
3917 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003918 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003919 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003920 }
3921 break;
3922
3923 case 164:
3924
3925 {
3926 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003927 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3928 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003929 }
3930 break;
3931
3932 case 165:
3933
3934 {
3935 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003936 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3937 (yyval.interm.type).setAggregate(4);
Alexis Hetu17809052015-05-13 11:28:22 -04003938 }
3939 break;
3940
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003941 case 166:
3942
3943 {
3944 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003945 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003946 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003947 }
3948 break;
3949
3950 case 167:
3951
3952 {
3953 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003954 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3955 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003956 }
3957 break;
3958
3959 case 168:
3960
3961 {
3962 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003963 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3964 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003965 }
3966 break;
3967
3968 case 169:
3969
3970 {
3971 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003972 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04003973 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003974 }
3975 break;
3976
3977 case 170:
3978
3979 {
3980 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003981 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3982 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003983 }
3984 break;
3985
3986 case 171:
3987
3988 {
3989 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetuad527752015-07-07 13:31:44 -04003990 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3991 (yyval.interm.type).setAggregate(4);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003992 }
3993 break;
3994
Alexis Hetua35d8232015-06-11 17:11:06 -04003995 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003996
3997 {
Alexis Hetue5246692015-06-18 12:34:52 -04003998 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3999 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetuad527752015-07-07 13:31:44 -04004000 (yyval.interm.type).setAggregate(2);
Alexis Hetue5246692015-06-18 12:34:52 -04004001 }
4002 break;
4003
4004 case 173:
4005
4006 {
Alexis Hetuad527752015-07-07 13:31:44 -04004007 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4008 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4009 (yyval.interm.type).setAggregate(3);
4010 }
4011 break;
4012
4013 case 174:
4014
4015 {
4016 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4017 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4018 (yyval.interm.type).setAggregate(4);
4019 }
4020 break;
4021
4022 case 175:
4023
4024 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004025 FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004026 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004027 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004028 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004029 }
4030 break;
4031
Alexis Hetuad527752015-07-07 13:31:44 -04004032 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004033
4034 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004035 FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004036 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004037 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004038 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004039 }
4040 break;
4041
Alexis Hetuad527752015-07-07 13:31:44 -04004042 case 177:
John Bauman66b8ab22014-05-06 15:57:45 -04004043
4044 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004045 FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004046 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004047 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004048 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004049 }
4050 break;
4051
Alexis Hetuad527752015-07-07 13:31:44 -04004052 case 178:
John Bauman66b8ab22014-05-06 15:57:45 -04004053
4054 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004055 FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004056 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004057 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004058 (yyval.interm.type).setMatrix(2, 3);
4059 }
4060 break;
4061
Alexis Hetuad527752015-07-07 13:31:44 -04004062 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004063
4064 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004065 FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004066 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004067 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004068 (yyval.interm.type).setMatrix(3, 2);
4069 }
4070 break;
4071
Alexis Hetuad527752015-07-07 13:31:44 -04004072 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004073
4074 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004075 FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004076 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004077 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004078 (yyval.interm.type).setMatrix(2, 4);
4079 }
4080 break;
4081
Alexis Hetuad527752015-07-07 13:31:44 -04004082 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004083
4084 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004085 FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004086 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004087 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004088 (yyval.interm.type).setMatrix(4, 2);
4089 }
4090 break;
4091
Alexis Hetuad527752015-07-07 13:31:44 -04004092 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004093
4094 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004095 FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004096 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004097 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004098 (yyval.interm.type).setMatrix(3, 4);
4099 }
4100 break;
4101
Alexis Hetuad527752015-07-07 13:31:44 -04004102 case 183:
Alexis Hetub14178b2015-04-13 13:23:20 -04004103
4104 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004105 FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004106 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004107 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004108 (yyval.interm.type).setMatrix(4, 3);
4109 }
4110 break;
4111
Alexis Hetuad527752015-07-07 13:31:44 -04004112 case 184:
Alexis Hetub14178b2015-04-13 13:23:20 -04004113
4114 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004115 FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004116 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004117 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004118 }
4119 break;
4120
Alexis Hetuad527752015-07-07 13:31:44 -04004121 case 185:
John Bauman66b8ab22014-05-06 15:57:45 -04004122
4123 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004124 FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004125 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004126 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004127 }
4128 break;
4129
Alexis Hetuad527752015-07-07 13:31:44 -04004130 case 186:
John Bauman66b8ab22014-05-06 15:57:45 -04004131
4132 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004133 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004134 context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004135 context->recover();
4136 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004137 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004138 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004139 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004140 }
4141 break;
4142
Alexis Hetuad527752015-07-07 13:31:44 -04004143 case 187:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004144
4145 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004146 FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004147 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004148 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004149 }
4150 break;
4151
Alexis Hetuad527752015-07-07 13:31:44 -04004152 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004153
4154 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004155 FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004156 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004157 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004158 }
4159 break;
4160
Alexis Hetuad527752015-07-07 13:31:44 -04004161 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004162
4163 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004164 FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004165 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004166 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004167 }
4168 break;
4169
Alexis Hetuad527752015-07-07 13:31:44 -04004170 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004171
4172 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004173 FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004174 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004175 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004176 }
4177 break;
4178
Alexis Hetuad527752015-07-07 13:31:44 -04004179 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004180
4181 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004182 FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004183 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004184 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004185 }
4186 break;
4187
Alexis Hetuad527752015-07-07 13:31:44 -04004188 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004189
4190 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004191 FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004192 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004193 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004194 }
4195 break;
4196
Alexis Hetuad527752015-07-07 13:31:44 -04004197 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004198
4199 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004200 FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004201 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004202 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004203 }
4204 break;
4205
Alexis Hetuad527752015-07-07 13:31:44 -04004206 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004207
4208 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004209 FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004210 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004211 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004212 }
4213 break;
4214
Alexis Hetuad527752015-07-07 13:31:44 -04004215 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004216
4217 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004218 FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004219 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004220 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004221 }
4222 break;
4223
Alexis Hetuad527752015-07-07 13:31:44 -04004224 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004225
4226 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004227 FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004228 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004229 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004230 }
4231 break;
4232
Alexis Hetuad527752015-07-07 13:31:44 -04004233 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004234
4235 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004236 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004237 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004238 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004239 }
4240 break;
4241
Alexis Hetuad527752015-07-07 13:31:44 -04004242 case 198:
Alexis Hetub14178b2015-04-13 13:23:20 -04004243
4244 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004245 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004246 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004247 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004248 }
4249 break;
4250
Alexis Hetuad527752015-07-07 13:31:44 -04004251 case 199:
Alexis Hetub14178b2015-04-13 13:23:20 -04004252
4253 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004254 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004255 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004256 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004257 }
4258 break;
4259
Alexis Hetuad527752015-07-07 13:31:44 -04004260 case 200:
Alexis Hetub027aa92015-01-19 15:56:12 -05004261
4262 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004263 FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004264 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4265 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4266 }
4267 break;
4268
Alexis Hetuad527752015-07-07 13:31:44 -04004269 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004270
4271 {
4272 //
4273 // This is for user defined type names. The lexical phase looked up the
4274 // type.
4275 //
4276 TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4277 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004278 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004279 (yyval.interm.type).userDef = &structure;
4280 }
4281 break;
4282
Alexis Hetuad527752015-07-07 13:31:44 -04004283 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004284
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004285 { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004286 break;
4287
Alexis Hetuad527752015-07-07 13:31:44 -04004288 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004289
4290 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004291 (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 -04004292 }
4293 break;
4294
Alexis Hetuad527752015-07-07 13:31:44 -04004295 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004296
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004297 { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004298 break;
4299
Alexis Hetuad527752015-07-07 13:31:44 -04004300 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004301
4302 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004303 (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004304 }
4305 break;
4306
Alexis Hetuad527752015-07-07 13:31:44 -04004307 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004308
4309 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004310 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004311 }
4312 break;
4313
Alexis Hetuad527752015-07-07 13:31:44 -04004314 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004315
4316 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004317 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4318 for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4319 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4320 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4321 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4322 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 -04004323 context->recover();
4324 }
4325 }
Alexis Hetua8b364b2015-06-10 11:48:40 -04004326 (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004327 }
4328 }
4329 break;
4330
Alexis Hetuad527752015-07-07 13:31:44 -04004331 case 208:
John Bauman66b8ab22014-05-06 15:57:45 -04004332
4333 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004334 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004335 }
4336 break;
4337
Alexis Hetuad527752015-07-07 13:31:44 -04004338 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004339
4340 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004341 // ES3 Only, but errors should be handled elsewhere
4342 (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4343 (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4344 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4345 }
4346 break;
4347
Alexis Hetuad527752015-07-07 13:31:44 -04004348 case 210:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004349
4350 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004351 (yyval.interm.fieldList) = NewPoolTFieldList();
4352 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004353 }
4354 break;
4355
Alexis Hetuad527752015-07-07 13:31:44 -04004356 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004357
4358 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004359 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004360 }
4361 break;
4362
Alexis Hetuad527752015-07-07 13:31:44 -04004363 case 212:
John Bauman66b8ab22014-05-06 15:57:45 -04004364
4365 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004366 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004367 context->recover();
4368
Alexis Hetua8b364b2015-06-10 11:48:40 -04004369 TType* type = new TType(EbtVoid, EbpUndefined);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004370 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004371 }
4372 break;
4373
Alexis Hetuad527752015-07-07 13:31:44 -04004374 case 213:
John Bauman66b8ab22014-05-06 15:57:45 -04004375
4376 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004377 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004378 context->recover();
4379
Alexis Hetua8b364b2015-06-10 11:48:40 -04004380 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004381 int size;
Alexis Hetua8b364b2015-06-10 11:48:40 -04004382 if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004383 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004384 type->setArraySize(size);
4385
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004386 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004387 }
4388 break;
4389
Alexis Hetu17809052015-05-13 11:28:22 -04004390 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004391
Alexis Hetuad527752015-07-07 13:31:44 -04004392 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004393 break;
4394
Alexis Hetu17809052015-05-13 11:28:22 -04004395 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004396
Alexis Hetua35d8232015-06-11 17:11:06 -04004397 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetuad6b8752015-06-09 16:15:30 -04004398 break;
4399
4400 case 216:
4401
Alexis Hetuad527752015-07-07 13:31:44 -04004402 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004403 break;
4404
4405 case 217:
4406
Alexis Hetua35d8232015-06-11 17:11:06 -04004407 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004408 break;
4409
4410 case 218:
4411
Alexis Hetue5246692015-06-18 12:34:52 -04004412 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004413 break;
4414
4415 case 219:
4416
Alexis Hetuad527752015-07-07 13:31:44 -04004417 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004418 break;
4419
4420 case 220:
4421
Alexis Hetuad527752015-07-07 13:31:44 -04004422 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004423 break;
4424
4425 case 221:
4426
Alexis Hetuad527752015-07-07 13:31:44 -04004427 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004428 break;
4429
4430 case 222:
4431
Alexis Hetuad527752015-07-07 13:31:44 -04004432 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004433 break;
4434
4435 case 223:
4436
Alexis Hetuad527752015-07-07 13:31:44 -04004437 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004438 break;
4439
4440 case 224:
4441
Alexis Hetuad527752015-07-07 13:31:44 -04004442 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004443 break;
4444
4445 case 225:
4446
Alexis Hetuad527752015-07-07 13:31:44 -04004447 { (yyval.interm.intermAggregate) = 0; }
Alexis Hetue5246692015-06-18 12:34:52 -04004448 break;
4449
4450 case 226:
4451
Alexis Hetuad527752015-07-07 13:31:44 -04004452 { context->symbolTable.push(); }
4453 break;
4454
4455 case 227:
4456
4457 { context->symbolTable.pop(); }
4458 break;
4459
4460 case 228:
4461
Nicolas Capens7d626792015-02-17 17:58:31 -05004462 {
4463 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4464 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004465 (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004466 }
4467 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4468 }
4469 break;
4470
Alexis Hetua35d8232015-06-11 17:11:06 -04004471 case 229:
4472
Alexis Hetuad527752015-07-07 13:31:44 -04004473 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004474 break;
4475
4476 case 230:
4477
Alexis Hetuad527752015-07-07 13:31:44 -04004478 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004479 break;
4480
4481 case 231:
4482
Alexis Hetue5246692015-06-18 12:34:52 -04004483 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004484 break;
4485
4486 case 232:
4487
Alexis Hetue5246692015-06-18 12:34:52 -04004488 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4489 break;
4490
4491 case 233:
4492
Alexis Hetuad527752015-07-07 13:31:44 -04004493 { context->symbolTable.push(); }
4494 break;
4495
4496 case 234:
4497
4498 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4499 break;
4500
4501 case 235:
4502
John Bauman66b8ab22014-05-06 15:57:45 -04004503 {
4504 (yyval.interm.intermNode) = 0;
4505 }
4506 break;
4507
Alexis Hetuad527752015-07-07 13:31:44 -04004508 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004509
4510 {
4511 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4512 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004513 (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004514 }
4515 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4516 }
4517 break;
4518
Alexis Hetuad527752015-07-07 13:31:44 -04004519 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004520
4521 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004522 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004523 }
4524 break;
4525
Alexis Hetuad527752015-07-07 13:31:44 -04004526 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004527
4528 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004529 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004530 }
4531 break;
4532
Alexis Hetuad527752015-07-07 13:31:44 -04004533 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004534
4535 { (yyval.interm.intermNode) = 0; }
4536 break;
4537
Alexis Hetuad527752015-07-07 13:31:44 -04004538 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004539
4540 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4541 break;
4542
Alexis Hetuad527752015-07-07 13:31:44 -04004543 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004544
4545 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004546 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004547 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004548 (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 -04004549 }
4550 break;
4551
Alexis Hetuad527752015-07-07 13:31:44 -04004552 case 242:
John Bauman66b8ab22014-05-06 15:57:45 -04004553
4554 {
4555 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4556 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4557 }
4558 break;
4559
Alexis Hetuad527752015-07-07 13:31:44 -04004560 case 243:
John Bauman66b8ab22014-05-06 15:57:45 -04004561
4562 {
4563 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4564 (yyval.interm.nodePair).node2 = 0;
4565 }
4566 break;
4567
Alexis Hetuad527752015-07-07 13:31:44 -04004568 case 244:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004569
Alexis Hetue5246692015-06-18 12:34:52 -04004570 { context->incrSwitchNestingLevel(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004571 break;
4572
Alexis Hetuad527752015-07-07 13:31:44 -04004573 case 245:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004574
4575 {
Alexis Hetue5246692015-06-18 12:34:52 -04004576 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)]));
4577 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004578 }
4579 break;
4580
Alexis Hetuad527752015-07-07 13:31:44 -04004581 case 246:
Alexis Hetu76a343a2015-06-04 17:21:22 -04004582
4583 {
Alexis Hetue5246692015-06-18 12:34:52 -04004584 (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004585 }
4586 break;
4587
Alexis Hetuad527752015-07-07 13:31:44 -04004588 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004589
4590 {
Alexis Hetue5246692015-06-18 12:34:52 -04004591 (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)]));
4592 }
4593 break;
4594
Alexis Hetuad527752015-07-07 13:31:44 -04004595 case 248:
Alexis Hetue5246692015-06-18 12:34:52 -04004596
4597 {
John Bauman66b8ab22014-05-06 15:57:45 -04004598 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4599 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4600 context->recover();
4601 }
4602 break;
4603
Alexis Hetuad527752015-07-07 13:31:44 -04004604 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004605
4606 {
4607 TIntermNode* intermNode;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004608 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004609 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004610 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004611 context->recover();
4612
Alexis Hetue5246692015-06-18 12:34:52 -04004613 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 -04004614 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4615 else {
4616 context->recover();
4617 (yyval.interm.intermTypedNode) = 0;
4618 }
4619 }
4620 break;
4621
Alexis Hetuad527752015-07-07 13:31:44 -04004622 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004623
Alexis Hetu0a655842015-06-22 16:52:11 -04004624 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004625 break;
4626
Alexis Hetuad527752015-07-07 13:31:44 -04004627 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004628
4629 {
4630 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004631 (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 -04004632 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004633 }
4634 break;
4635
Alexis Hetuad527752015-07-07 13:31:44 -04004636 case 252:
John Bauman66b8ab22014-05-06 15:57:45 -04004637
Alexis Hetu0a655842015-06-22 16:52:11 -04004638 { context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004639 break;
4640
Alexis Hetuad527752015-07-07 13:31:44 -04004641 case 253:
John Bauman66b8ab22014-05-06 15:57:45 -04004642
4643 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004644 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004645 context->recover();
4646
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004647 (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 -04004648 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004649 }
4650 break;
4651
Alexis Hetuad527752015-07-07 13:31:44 -04004652 case 254:
Alexis Hetub027aa92015-01-19 15:56:12 -05004653
Alexis Hetu0a655842015-06-22 16:52:11 -04004654 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Nicolas Capens3c20f802015-02-17 17:17:20 -05004655 break;
4656
Alexis Hetuad527752015-07-07 13:31:44 -04004657 case 255:
Alexis Hetu17809052015-05-13 11:28:22 -04004658
4659 {
Alexis Hetue5246692015-06-18 12:34:52 -04004660 context->symbolTable.pop();
4661 (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 -04004662 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004663 }
4664 break;
4665
Alexis Hetu76a343a2015-06-04 17:21:22 -04004666 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004667
4668 {
Alexis Hetuad527752015-07-07 13:31:44 -04004669 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004670 }
4671 break;
4672
Alexis Hetu76a343a2015-06-04 17:21:22 -04004673 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004674
4675 {
Alexis Hetuad527752015-07-07 13:31:44 -04004676 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetue5246692015-06-18 12:34:52 -04004677 }
4678 break;
4679
4680 case 258:
4681
4682 {
Alexis Hetuad527752015-07-07 13:31:44 -04004683 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4684 }
4685 break;
4686
4687 case 259:
4688
4689 {
4690 (yyval.interm.intermTypedNode) = 0;
4691 }
4692 break;
4693
4694 case 260:
4695
4696 {
Alexis Hetu17809052015-05-13 11:28:22 -04004697 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4698 (yyval.interm.nodePair).node2 = 0;
4699 }
4700 break;
4701
Alexis Hetuad527752015-07-07 13:31:44 -04004702 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004703
4704 {
4705 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4706 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4707 }
4708 break;
4709
Alexis Hetuad527752015-07-07 13:31:44 -04004710 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004711
4712 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004713 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004714 }
4715 break;
4716
Alexis Hetuad527752015-07-07 13:31:44 -04004717 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004718
4719 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004720 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004721 }
4722 break;
4723
Alexis Hetuad527752015-07-07 13:31:44 -04004724 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004725
4726 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004727 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004728 }
4729 break;
4730
Alexis Hetuad527752015-07-07 13:31:44 -04004731 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004732
4733 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004734 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004735 }
4736 break;
4737
Alexis Hetuad527752015-07-07 13:31:44 -04004738 case 266:
Alexis Hetu17809052015-05-13 11:28:22 -04004739
4740 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004741 FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4742 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004743 }
4744 break;
4745
Alexis Hetuad527752015-07-07 13:31:44 -04004746 case 267:
Alexis Hetu17809052015-05-13 11:28:22 -04004747
4748 {
Alexis Hetue5246692015-06-18 12:34:52 -04004749 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004750 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004751 }
4752 break;
4753
Alexis Hetuad527752015-07-07 13:31:44 -04004754 case 268:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004755
4756 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004757 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004758 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004759 }
4760 break;
4761
Alexis Hetue5246692015-06-18 12:34:52 -04004762 case 269:
4763
4764 {
Alexis Hetuad527752015-07-07 13:31:44 -04004765 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4766 }
4767 break;
4768
4769 case 270:
4770
4771 {
4772 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4773 }
4774 break;
4775
4776 case 271:
4777
4778 {
John Bauman66b8ab22014-05-06 15:57:45 -04004779 TFunction* function = (yyvsp[(1) - (1)].interm).function;
4780
Alexis Hetu0a655842015-06-22 16:52:11 -04004781 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004782
4783 if (builtIn)
4784 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004785 context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004786 context->recover();
4787 }
4788
Alexis Hetu0a655842015-06-22 16:52:11 -04004789 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004790 //
4791 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4792 // as it would have just been put in the symbol table. Otherwise, we're looking up
4793 // an earlier occurance.
4794 //
4795 if (prevDec->isDefined()) {
4796 //
4797 // Then this function already has a body.
4798 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004799 context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004800 context->recover();
4801 }
4802 prevDec->setDefined();
4803
4804 //
4805 // Raise error message if main function takes any parameters or return anything other than void
4806 //
4807 if (function->getName() == "main") {
4808 if (function->getParamCount() > 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004809 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004810 context->recover();
4811 }
4812 if (function->getReturnType().getBasicType() != EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004813 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004814 context->recover();
4815 }
4816 }
4817
4818 //
4819 // Remember the return type for later checking for RETURN statements.
4820 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004821 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4822 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004823
4824 //
4825 // Insert parameters into the symbol table.
4826 // If the parameter has no name, it's not an error, just don't insert it
4827 // (could be used for unused args).
4828 //
4829 // Also, accumulate the list of parameters into the HIL, so lower level code
4830 // knows where to find parameters.
4831 //
4832 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004833 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004834 const TParameter& param = function->getParam(i);
4835 if (param.name != 0) {
4836 TVariable *variable = new TVariable(param.name, *param.type);
4837 //
4838 // Insert the parameters with name in the symbol table.
4839 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004840 if (! context->symbolTable.declare(*variable)) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004841 context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004842 context->recover();
4843 delete variable;
4844 }
4845
4846 //
4847 // Add the parameter to the HIL
4848 //
4849 paramNodes = context->intermediate.growAggregate(
4850 paramNodes,
4851 context->intermediate.addSymbol(variable->getUniqueId(),
4852 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004853 variable->getType(), (yylsp[(1) - (1)])),
4854 (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004855 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004856 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004857 }
4858 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004859 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004860 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004861 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004862 }
4863 break;
4864
Alexis Hetuad527752015-07-07 13:31:44 -04004865 case 272:
John Bauman66b8ab22014-05-06 15:57:45 -04004866
4867 {
4868 //?? Check that all paths return a value if return type != void ?
4869 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004870 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004871 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 -04004872 context->recover();
4873 }
4874
Alexis Hetu253fdd12015-07-07 15:12:46 -04004875 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), (yyloc));
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004876 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004877 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4878 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4879
4880 // store the pragma information for debug and optimize and other vendor specific
4881 // information. This information can be queried from the parse tree
4882 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4883 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4884
4885 if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
4886 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
4887
4888 context->symbolTable.pop();
4889 }
4890 break;
4891
4892
4893
4894 default: break;
4895 }
4896 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4897
4898 YYPOPSTACK (yylen);
4899 yylen = 0;
4900 YY_STACK_PRINT (yyss, yyssp);
4901
4902 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004903 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004904
4905 /* Now `shift' the result of the reduction. Determine what state
4906 that goes to, based on the state we popped back to and the rule
4907 number reduced by. */
4908
4909 yyn = yyr1[yyn];
4910
4911 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4912 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4913 yystate = yytable[yystate];
4914 else
4915 yystate = yydefgoto[yyn - YYNTOKENS];
4916
4917 goto yynewstate;
4918
4919
4920/*------------------------------------.
4921| yyerrlab -- here on detecting error |
4922`------------------------------------*/
4923yyerrlab:
4924 /* If not already recovering from an error, report this error. */
4925 if (!yyerrstatus)
4926 {
4927 ++yynerrs;
4928#if ! YYERROR_VERBOSE
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004929 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004930#else
4931 {
4932 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4933 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4934 {
4935 YYSIZE_T yyalloc = 2 * yysize;
4936 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4937 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4938 if (yymsg != yymsgbuf)
4939 YYSTACK_FREE (yymsg);
4940 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4941 if (yymsg)
4942 yymsg_alloc = yyalloc;
4943 else
4944 {
4945 yymsg = yymsgbuf;
4946 yymsg_alloc = sizeof yymsgbuf;
4947 }
4948 }
4949
4950 if (0 < yysize && yysize <= yymsg_alloc)
4951 {
4952 (void) yysyntax_error (yymsg, yystate, yychar);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004953 yyerror (&yylloc, context, yymsg);
John Bauman66b8ab22014-05-06 15:57:45 -04004954 }
4955 else
4956 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004957 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004958 if (yysize != 0)
4959 goto yyexhaustedlab;
4960 }
4961 }
4962#endif
4963 }
4964
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004965 yyerror_range[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004966
4967 if (yyerrstatus == 3)
4968 {
4969 /* If just tried and failed to reuse lookahead token after an
4970 error, discard it. */
4971
4972 if (yychar <= YYEOF)
4973 {
4974 /* Return failure if at end of input. */
4975 if (yychar == YYEOF)
4976 YYABORT;
4977 }
4978 else
4979 {
4980 yydestruct ("Error: discarding",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004981 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04004982 yychar = YYEMPTY;
4983 }
4984 }
4985
4986 /* Else will try to reuse lookahead token after shifting the error
4987 token. */
4988 goto yyerrlab1;
4989
4990
4991/*---------------------------------------------------.
4992| yyerrorlab -- error raised explicitly by YYERROR. |
4993`---------------------------------------------------*/
4994yyerrorlab:
4995
4996 /* Pacify compilers like GCC when the user code never invokes
4997 YYERROR and the label yyerrorlab therefore never appears in user
4998 code. */
4999 if (/*CONSTCOND*/ 0)
5000 goto yyerrorlab;
5001
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005002 yyerror_range[0] = yylsp[1-yylen];
John Bauman66b8ab22014-05-06 15:57:45 -04005003 /* Do not reclaim the symbols of the rule which action triggered
5004 this YYERROR. */
5005 YYPOPSTACK (yylen);
5006 yylen = 0;
5007 YY_STACK_PRINT (yyss, yyssp);
5008 yystate = *yyssp;
5009 goto yyerrlab1;
5010
5011
5012/*-------------------------------------------------------------.
5013| yyerrlab1 -- common code for both syntax error and YYERROR. |
5014`-------------------------------------------------------------*/
5015yyerrlab1:
5016 yyerrstatus = 3; /* Each real token shifted decrements this. */
5017
5018 for (;;)
5019 {
5020 yyn = yypact[yystate];
5021 if (yyn != YYPACT_NINF)
5022 {
5023 yyn += YYTERROR;
5024 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5025 {
5026 yyn = yytable[yyn];
5027 if (0 < yyn)
5028 break;
5029 }
5030 }
5031
5032 /* Pop the current state because it cannot handle the error token. */
5033 if (yyssp == yyss)
5034 YYABORT;
5035
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005036 yyerror_range[0] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005037 yydestruct ("Error: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005038 yystos[yystate], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005039 YYPOPSTACK (1);
5040 yystate = *yyssp;
5041 YY_STACK_PRINT (yyss, yyssp);
5042 }
5043
5044 *++yyvsp = yylval;
5045
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005046 yyerror_range[1] = yylloc;
5047 /* Using YYLLOC is tempting, but would change the location of
5048 the lookahead. YYLOC is available though. */
5049 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
5050 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005051
5052 /* Shift the error token. */
5053 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5054
5055 yystate = yyn;
5056 goto yynewstate;
5057
5058
5059/*-------------------------------------.
5060| yyacceptlab -- YYACCEPT comes here. |
5061`-------------------------------------*/
5062yyacceptlab:
5063 yyresult = 0;
5064 goto yyreturn;
5065
5066/*-----------------------------------.
5067| yyabortlab -- YYABORT comes here. |
5068`-----------------------------------*/
5069yyabortlab:
5070 yyresult = 1;
5071 goto yyreturn;
5072
5073#if !defined(yyoverflow) || YYERROR_VERBOSE
5074/*-------------------------------------------------.
5075| yyexhaustedlab -- memory exhaustion comes here. |
5076`-------------------------------------------------*/
5077yyexhaustedlab:
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005078 yyerror (&yylloc, context, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005079 yyresult = 2;
5080 /* Fall through. */
5081#endif
5082
5083yyreturn:
5084 if (yychar != YYEMPTY)
5085 yydestruct ("Cleanup: discarding lookahead",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005086 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005087 /* Do not reclaim the symbols of the rule which action triggered
5088 this YYABORT or YYACCEPT. */
5089 YYPOPSTACK (yylen);
5090 YY_STACK_PRINT (yyss, yyssp);
5091 while (yyssp != yyss)
5092 {
5093 yydestruct ("Cleanup: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005094 yystos[*yyssp], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005095 YYPOPSTACK (1);
5096 }
5097#ifndef yyoverflow
5098 if (yyss != yyssa)
5099 YYSTACK_FREE (yyss);
5100#endif
5101#if YYERROR_VERBOSE
5102 if (yymsg != yymsgbuf)
5103 YYSTACK_FREE (yymsg);
5104#endif
5105 /* Make sure YYID is used. */
5106 return YYID (yyresult);
5107}
5108
5109
5110
5111
5112
5113int glslang_parse(TParseContext* context) {
5114 return yyparse(context);
5115}
5116