blob: 1853808a24d23575fcb062378395418077a4b8d7 [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 Hetua35d8232015-06-11 17:11:06 -0400595#define YYFINAL 110
John Bauman66b8ab22014-05-06 15:57:45 -0400596/* YYLAST -- Last index in YYTABLE. */
Alexis Hetue5246692015-06-18 12:34:52 -0400597#define YYLAST 2519
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 Hetue5246692015-06-18 12:34:52 -0400604#define YYNRULES 270
John Bauman66b8ab22014-05-06 15:57:45 -0400605/* YYNRULES -- Number of states. */
Alexis Hetue5246692015-06-18 12:34:52 -0400606#define YYNSTATES 410
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,
677 411, 414, 416, 419, 421, 423, 426, 428, 430, 432,
678 435, 438, 440, 442, 445, 447, 449, 451, 456, 458,
Alexis Hetue5246692015-06-18 12:34:52 -0400679 462, 464, 468, 472, 474, 478, 483, 485, 487, 489,
680 491, 493, 495, 497, 499, 501, 503, 505, 507, 509,
681 511, 513, 515, 517, 519, 521, 523, 525, 527, 529,
682 531, 533, 535, 537, 539, 541, 543, 545, 547, 549,
683 551, 553, 555, 557, 559, 561, 563, 565, 567, 569,
684 571, 572, 579, 580, 586, 588, 591, 595, 600, 602,
685 606, 608, 613, 615, 617, 619, 621, 623, 625, 627,
686 629, 631, 633, 635, 638, 639, 640, 646, 648, 650,
687 651, 654, 655, 658, 661, 665, 667, 670, 672, 675,
688 681, 685, 687, 688, 695, 699, 702, 704, 709, 710,
689 717, 718, 727, 728, 736, 738, 740, 742, 743, 746,
690 750, 753, 756, 759, 763, 766, 768, 771, 773, 775,
691 776
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,
739 -1, 177, -1, 177, 174, -1, 9, -1, 40, -1,
740 41, -1, 51, 40, -1, 51, 41, -1, 43, -1,
741 180, -1, 176, 180, -1, 4, -1, 5, -1, 6,
742 -1, 75, 104, 178, 105, -1, 179, -1, 178, 111,
743 179, -1, 76, -1, 76, 113, 79, -1, 76, 113,
Alexis Hetue5246692015-06-18 12:34:52 -0400744 80, -1, 181, -1, 181, 106, 107, -1, 181, 106,
745 157, 107, -1, 55, -1, 11, -1, 12, -1, 13,
746 -1, 10, -1, 31, -1, 32, -1, 33, -1, 25,
747 -1, 26, -1, 27, -1, 28, -1, 29, -1, 30,
748 -1, 34, -1, 35, -1, 36, -1, 37, -1, 38,
749 -1, 39, -1, 45, -1, 46, -1, 47, -1, 48,
750 -1, 49, -1, 50, -1, 57, -1, 58, -1, 59,
751 -1, 70, -1, 61, -1, 62, -1, 63, -1, 64,
752 -1, 65, -1, 66, -1, 67, -1, 68, -1, 69,
753 -1, 72, -1, 73, -1, 74, -1, 182, -1, 77,
754 -1, -1, 54, 76, 108, 183, 185, 109, -1, -1,
755 54, 108, 184, 185, 109, -1, 186, -1, 185, 186,
756 -1, 175, 187, 114, -1, 173, 175, 187, 114, -1,
757 188, -1, 187, 111, 188, -1, 76, -1, 76, 106,
758 157, 107, -1, 154, -1, 159, -1, 193, -1, 192,
759 -1, 190, -1, 202, -1, 203, -1, 205, -1, 207,
760 -1, 209, -1, 216, -1, 108, 109, -1, -1, -1,
761 108, 194, 201, 195, 109, -1, 200, -1, 192, -1,
762 -1, 198, 200, -1, -1, 199, 192, -1, 108, 109,
763 -1, 108, 201, 109, -1, 191, -1, 201, 191, -1,
764 114, -1, 156, 114, -1, 19, 104, 156, 105, 204,
765 -1, 197, 17, 197, -1, 197, -1, -1, 22, 104,
766 156, 105, 206, 193, -1, 23, 157, 112, -1, 24,
767 112, -1, 156, -1, 170, 76, 113, 189, -1, -1,
768 56, 104, 210, 208, 105, 196, -1, -1, 16, 211,
769 197, 56, 104, 156, 105, 114, -1, -1, 18, 104,
770 212, 213, 215, 105, 196, -1, 202, -1, 190, -1,
771 208, -1, -1, 214, 114, -1, 214, 114, 156, -1,
772 15, 114, -1, 14, 114, -1, 21, 114, -1, 21,
773 156, 114, -1, 20, 114, -1, 218, -1, 217, 218,
774 -1, 219, -1, 159, -1, -1, 160, 220, 200, -1
John Bauman66b8ab22014-05-06 15:57:45 -0400775};
776
777/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
778static const yytype_uint16 yyrline[] =
779{
Alexis Hetu253fdd12015-07-07 15:12:46 -0400780 0, 214, 214, 233, 236, 241, 246, 251, 256, 262,
781 265, 268, 271, 274, 277, 283, 291, 302, 305, 313,
782 316, 322, 326, 333, 339, 348, 356, 362, 369, 379,
783 382, 392, 402, 424, 425, 426, 427, 435, 436, 440,
784 444, 452, 453, 456, 462, 463, 467, 474, 475, 478,
785 481, 484, 490, 491, 494, 500, 501, 508, 509, 516,
786 517, 524, 525, 531, 532, 538, 539, 545, 546, 552,
787 553, 561, 562, 563, 564, 566, 567, 568, 571, 574,
788 577, 580, 586, 589, 600, 608, 616, 643, 649, 656,
789 660, 664, 668, 675, 712, 715, 722, 730, 751, 772,
790 782, 810, 815, 825, 830, 840, 843, 846, 849, 855,
791 862, 865, 869, 873, 878, 883, 890, 894, 898, 902,
792 907, 912, 916, 923, 933, 939, 942, 948, 954, 961,
793 970, 979, 982, 985, 992, 996, 1003, 1006, 1010, 1014,
794 1023, 1032, 1040, 1050, 1057, 1060, 1063, 1069, 1076, 1079,
795 1085, 1088, 1091, 1097, 1100, 1105, 1120, 1124, 1128, 1132,
796 1136, 1140, 1145, 1150, 1155, 1160, 1165, 1170, 1175, 1180,
797 1185, 1190, 1195, 1200, 1206, 1212, 1218, 1224, 1230, 1236,
798 1242, 1248, 1254, 1259, 1264, 1273, 1278, 1283, 1288, 1293,
799 1298, 1303, 1308, 1313, 1318, 1323, 1328, 1333, 1338, 1343,
800 1356, 1356, 1359, 1359, 1365, 1368, 1384, 1387, 1396, 1400,
801 1406, 1413, 1428, 1432, 1436, 1437, 1443, 1444, 1445, 1446,
802 1447, 1448, 1449, 1453, 1454, 1454, 1454, 1464, 1465, 1469,
803 1469, 1470, 1470, 1475, 1478, 1488, 1491, 1497, 1498, 1502,
804 1510, 1514, 1521, 1521, 1528, 1531, 1540, 1545, 1562, 1562,
805 1567, 1567, 1574, 1574, 1582, 1585, 1591, 1594, 1600, 1604,
806 1611, 1614, 1617, 1620, 1623, 1632, 1636, 1643, 1646, 1652,
807 1652
John Bauman66b8ab22014-05-06 15:57:45 -0400808};
809#endif
810
811#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
812/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
813 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
814static const char *const yytname[] =
815{
816 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
817 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500818 "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
819 "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
820 "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500821 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
822 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400823 "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
824 "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
825 "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
826 "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
827 "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
828 "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
829 "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
830 "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
831 "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
832 "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
833 "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
834 "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
835 "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500836 "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
837 "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
838 "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
839 "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
840 "primary_expression", "postfix_expression", "integer_expression",
841 "function_call", "function_call_or_method", "function_call_generic",
John Bauman66b8ab22014-05-06 15:57:45 -0400842 "function_call_header_no_parameters",
843 "function_call_header_with_parameters", "function_call_header",
844 "function_identifier", "unary_expression", "unary_operator",
845 "multiplicative_expression", "additive_expression", "shift_expression",
846 "relational_expression", "equality_expression", "and_expression",
847 "exclusive_or_expression", "inclusive_or_expression",
848 "logical_and_expression", "logical_xor_expression",
849 "logical_or_expression", "conditional_expression",
850 "assignment_expression", "assignment_operator", "expression",
Alexis Hetua35d8232015-06-11 17:11:06 -0400851 "constant_expression", "enter_struct", "declaration",
852 "function_prototype", "function_declarator",
853 "function_header_with_parameters", "function_header",
854 "parameter_declarator", "parameter_declaration", "parameter_qualifier",
855 "parameter_type_specifier", "init_declarator_list", "single_declaration",
856 "fully_specified_type", "interpolation_qualifier",
857 "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
858 "type_specifier", "precision_qualifier", "layout_qualifier",
859 "layout_qualifier_id_list", "layout_qualifier_id",
Nicolas Capens7d626792015-02-17 17:58:31 -0500860 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
861 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400862 "struct_declarator_list", "struct_declarator", "initializer",
863 "declaration_statement", "statement", "simple_statement",
864 "compound_statement", "$@3", "$@4", "statement_no_new_scope",
865 "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
866 "statement_list", "expression_statement", "selection_statement",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400867 "selection_rest_statement", "switch_statement", "$@7", "case_label",
868 "condition", "iteration_statement", "$@8", "$@9", "$@10",
869 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400870 "jump_statement", "translation_unit", "external_declaration",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400871 "function_definition", "$@11", 0
John Bauman66b8ab22014-05-06 15:57:45 -0400872};
873#endif
874
875# ifdef YYPRINT
876/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
877 token YYLEX-NUM. */
878static const yytype_uint16 yytoknum[] =
879{
880 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
881 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
882 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
883 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
884 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
885 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
886 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
887 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
888 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
Nicolas Capensc6841852015-02-15 14:25:37 -0500889 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500890 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400891 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
892 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400893};
894# endif
895
896/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
897static const yytype_uint8 yyr1[] =
898{
Alexis Hetub14178b2015-04-13 13:23:20 -0400899 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
900 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
901 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
Alexis Hetu17809052015-05-13 11:28:22 -0400902 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
903 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
904 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
905 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
906 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
Alexis Hetua35d8232015-06-11 17:11:06 -0400907 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
908 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
909 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
910 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
911 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
912 173, 173, 173, 173, 173, 173, 174, 174, 174, 174,
913 174, 174, 175, 175, 176, 176, 176, 177, 178, 178,
Alexis Hetue5246692015-06-18 12:34:52 -0400914 179, 179, 179, 180, 180, 180, 181, 181, 181, 181,
Alexis Hetua35d8232015-06-11 17:11:06 -0400915 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
916 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
917 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetue5246692015-06-18 12:34:52 -0400918 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
919 183, 182, 184, 182, 185, 185, 186, 186, 187, 187,
920 188, 188, 189, 190, 191, 191, 192, 192, 192, 192,
921 192, 192, 192, 193, 194, 195, 193, 196, 196, 198,
922 197, 199, 197, 200, 200, 201, 201, 202, 202, 203,
923 204, 204, 206, 205, 207, 207, 208, 208, 210, 209,
924 211, 209, 212, 209, 213, 213, 214, 214, 215, 215,
925 216, 216, 216, 216, 216, 217, 217, 218, 218, 220,
926 219
John Bauman66b8ab22014-05-06 15:57:45 -0400927};
928
929/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
930static const yytype_uint8 yyr2[] =
931{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500932 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
933 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
934 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
Alexis Hetu17809052015-05-13 11:28:22 -0400935 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
936 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
937 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
938 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
939 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400940 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
941 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
942 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
943 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
944 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
945 2, 1, 2, 1, 1, 2, 1, 1, 1, 2,
946 2, 1, 1, 2, 1, 1, 1, 4, 1, 3,
Alexis Hetue5246692015-06-18 12:34:52 -0400947 1, 3, 3, 1, 3, 4, 1, 1, 1, 1,
John Bauman66b8ab22014-05-06 15:57:45 -0400948 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetub14178b2015-04-13 13:23:20 -0400949 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
950 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetue5246692015-06-18 12:34:52 -0400951 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
952 0, 6, 0, 5, 1, 2, 3, 4, 1, 3,
953 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
954 1, 1, 1, 2, 0, 0, 5, 1, 1, 0,
955 2, 0, 2, 2, 3, 1, 2, 1, 2, 5,
956 3, 1, 0, 6, 3, 2, 1, 4, 0, 6,
957 0, 8, 0, 7, 1, 1, 1, 0, 2, 3,
958 2, 2, 2, 3, 2, 1, 2, 1, 1, 0,
959 3
John Bauman66b8ab22014-05-06 15:57:45 -0400960};
961
962/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
963 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
964 means the default is an error. */
Alexis Hetuad6b8752015-06-09 16:15:30 -0400965static const yytype_uint16 yydefact[] =
John Bauman66b8ab22014-05-06 15:57:45 -0400966{
Alexis Hetue5246692015-06-18 12:34:52 -0400967 0, 0, 144, 145, 146, 0, 128, 136, 160, 157,
968 158, 159, 164, 165, 166, 167, 168, 169, 161, 162,
969 163, 170, 171, 172, 173, 174, 175, 137, 138, 141,
970 129, 176, 177, 178, 179, 180, 181, 0, 126, 125,
971 0, 156, 182, 183, 184, 186, 187, 188, 189, 190,
972 191, 192, 193, 194, 185, 195, 196, 197, 0, 199,
973 268, 269, 0, 95, 105, 0, 110, 116, 133, 0,
974 131, 123, 0, 134, 142, 153, 198, 0, 265, 267,
975 130, 122, 0, 139, 140, 0, 202, 0, 86, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -0400976 93, 105, 127, 106, 107, 108, 96, 0, 105, 0,
977 87, 117, 132, 0, 92, 0, 124, 143, 135, 0,
Alexis Hetue5246692015-06-18 12:34:52 -0400978 1, 266, 0, 200, 0, 150, 0, 148, 0, 270,
Alexis Hetua35d8232015-06-11 17:11:06 -0400979 97, 102, 104, 109, 0, 111, 98, 0, 0, 85,
Alexis Hetue5246692015-06-18 12:34:52 -0400980 0, 0, 0, 0, 204, 2, 6, 4, 5, 7,
981 28, 0, 0, 0, 154, 35, 34, 36, 33, 3,
982 9, 29, 11, 16, 17, 0, 0, 22, 0, 37,
983 0, 41, 44, 47, 52, 55, 57, 59, 61, 63,
984 65, 67, 84, 0, 26, 88, 0, 0, 0, 147,
985 0, 0, 0, 250, 0, 0, 0, 0, 0, 0,
986 0, 0, 224, 233, 237, 37, 69, 82, 0, 213,
987 0, 142, 216, 235, 215, 214, 0, 217, 218, 219,
988 220, 221, 222, 99, 101, 103, 0, 0, 0, 0,
989 212, 121, 0, 210, 0, 208, 0, 205, 30, 31,
990 0, 13, 14, 0, 0, 20, 19, 0, 156, 23,
991 25, 32, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -0400993 0, 0, 155, 0, 203, 151, 152, 149, 261, 260,
994 231, 252, 0, 264, 262, 0, 0, 0, 245, 248,
995 223, 0, 72, 73, 75, 74, 77, 78, 79, 80,
996 81, 76, 71, 0, 0, 238, 234, 236, 0, 0,
997 0, 115, 0, 118, 0, 0, 0, 206, 0, 89,
998 8, 0, 15, 27, 12, 18, 24, 38, 39, 40,
999 43, 42, 45, 46, 50, 51, 48, 49, 53, 54,
1000 56, 58, 60, 62, 64, 66, 0, 201, 0, 0,
1001 0, 0, 0, 263, 0, 244, 0, 225, 70, 83,
1002 0, 0, 112, 119, 0, 207, 0, 209, 0, 90,
1003 10, 0, 0, 230, 232, 255, 254, 257, 231, 242,
1004 246, 0, 0, 0, 0, 100, 113, 0, 120, 211,
1005 0, 68, 0, 256, 0, 0, 241, 239, 0, 0,
1006 0, 226, 114, 0, 0, 258, 0, 231, 243, 0,
1007 228, 249, 227, 91, 0, 259, 253, 240, 247, 251
John Bauman66b8ab22014-05-06 15:57:45 -04001008};
1009
1010/* YYDEFGOTO[NTERM-NUM]. */
1011static const yytype_int16 yydefgoto[] =
1012{
Alexis Hetue5246692015-06-18 12:34:52 -04001013 -1, 149, 150, 151, 311, 152, 153, 154, 155, 156,
1014 157, 158, 195, 160, 161, 162, 163, 164, 165, 166,
1015 167, 168, 169, 170, 171, 196, 197, 293, 198, 173,
1016 105, 199, 200, 62, 63, 64, 121, 96, 97, 122,
Alexis Hetua35d8232015-06-11 17:11:06 -04001017 65, 66, 67, 68, 98, 69, 70, 71, 72, 73,
Alexis Hetue5246692015-06-18 12:34:52 -04001018 116, 117, 174, 75, 76, 176, 114, 133, 134, 224,
1019 225, 221, 202, 203, 204, 205, 281, 374, 401, 338,
1020 339, 340, 402, 206, 207, 208, 387, 209, 388, 210,
1021 373, 211, 346, 270, 341, 367, 384, 385, 212, 77,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001022 78, 79, 89
John Bauman66b8ab22014-05-06 15:57:45 -04001023};
1024
1025/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1026 STATE-NUM. */
Alexis Hetue5246692015-06-18 12:34:52 -04001027#define YYPACT_NINF -331
John Bauman66b8ab22014-05-06 15:57:45 -04001028static const yytype_int16 yypact[] =
1029{
Alexis Hetue5246692015-06-18 12:34:52 -04001030 2157, -28, -331, -331, -331, 141, -331, -331, -331, -331,
1031 -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1032 -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1033 -331, -331, -331, -331, -331, -331, -331, 4, -331, -331,
1034 -44, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1035 -331, -331, -331, -331, -331, -331, -331, -331, -78, -331,
1036 -331, -31, -35, -24, 10, -71, -331, 45, 38, 1176,
1037 -331, -331, 2442, 38, -331, 1, -331, 2082, -331, -331,
1038 -331, -331, 2442, -331, -331, 49, -331, 72, -331, 51,
1039 -331, 19, -331, -331, -331, -331, -331, 2306, 110, 92,
1040 -331, -79, -331, 67, -331, 2232, -331, -331, -331, 1246,
1041 -331, -331, 25, -331, 2232, 58, -70, -331, 404, -331,
1042 -331, -331, -331, 103, 2306, -89, -331, 1344, 1635, -331,
1043 136, 2306, 105, 1827, -331, 78, -331, -331, -331, -331,
1044 -331, 1635, 1635, 1635, -331, -331, -331, -331, -331, -331,
1045 -331, 16, -331, -331, -331, 79, -21, 1730, 83, -331,
1046 1635, 34, 40, 28, -65, 47, 57, 61, 64, 100,
1047 101, -72, -331, 86, -331, -331, 2232, 1912, 82, -331,
1048 72, 84, 85, -331, 93, 96, 87, 1442, 98, 1635,
1049 91, 106, 102, -331, -331, 188, -331, -331, -15, -331,
1050 -31, 108, -331, -331, -331, -331, 520, -331, -331, -331,
1051 -331, -331, -331, 90, -331, -331, 1537, 1635, 104, 109,
1052 -331, -331, 105, 107, 5, -331, -61, -331, -331, -331,
1053 -20, -331, -331, 1635, 2374, -331, -331, 1635, 113, -331,
1054 -331, -331, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
1055 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
1056 1635, 1635, -331, 1997, -331, -331, -331, -331, -331, -331,
1057 111, -331, 1635, -331, -331, 6, 1635, 97, -331, -331,
1058 -331, 636, -331, -331, -331, -331, -331, -331, -331, -331,
1059 -331, -331, -331, 1635, 1635, -331, -331, -331, 1635, 112,
1060 114, -331, 1635, 115, 21, 1635, 105, -331, -75, -331,
1061 -331, 117, 120, -331, 116, -331, -331, -331, -331, -331,
1062 34, 34, 40, 40, 28, 28, 28, 28, -65, -65,
1063 47, 57, 61, 64, 100, 101, 31, -331, 159, 51,
1064 868, 984, -17, -331, -5, -331, 1081, 636, -331, -331,
1065 119, 1635, 121, -331, 1635, -331, 125, -331, 1635, -331,
1066 -331, 1635, 118, -331, -331, -331, -331, 1081, 111, -331,
1067 120, 157, 2306, 130, 127, -331, -331, 1635, -331, -331,
1068 131, -331, 1635, -331, 126, 134, 224, -331, 138, 129,
1069 752, -331, -331, 133, -1, 1635, 752, 111, -331, 1635,
1070 -331, -331, -331, -331, 135, 120, -331, -331, -331, -331
John Bauman66b8ab22014-05-06 15:57:45 -04001071};
1072
1073/* YYPGOTO[NTERM-NUM]. */
1074static const yytype_int16 yypgoto[] =
1075{
Alexis Hetue5246692015-06-18 12:34:52 -04001076 -331, -331, -331, -331, -331, -331, -331, 14, -331, -331,
1077 -331, -331, 63, -331, -82, -74, -122, -88, -4, -6,
1078 -3, 2, 7, 8, -331, -91, -124, -331, -138, -113,
1079 -331, 3, 9, -331, -331, -331, 137, 164, 160, 145,
1080 -331, -331, -325, -331, -331, -103, -2, -68, 254, -331,
1081 -331, 94, 0, -331, -331, -331, -331, -101, -123, 43,
1082 -36, -210, -69, -198, -328, -126, -331, -331, -125, -330,
1083 -331, -331, -83, -8, -64, -331, -331, -331, -331, -331,
1084 -87, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1085 199, -331, -331
John Bauman66b8ab22014-05-06 15:57:45 -04001086};
1087
1088/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1089 positive, shift that token. If negative, reduce the rule which
1090 number is the opposite. If zero, do what YYDEFACT says.
1091 If YYTABLE_NINF, syntax error. */
Alexis Hetue5246692015-06-18 12:34:52 -04001092#define YYTABLE_NINF -230
John Bauman66b8ab22014-05-06 15:57:45 -04001093static const yytype_int16 yytable[] =
1094{
Alexis Hetue5246692015-06-18 12:34:52 -04001095 74, 106, 131, 60, 220, 230, 119, 301, 297, 61,
1096 227, 131, 364, 177, 219, 308, 80, 216, 172, 92,
1097 260, 371, 249, 250, 217, 126, 87, 127, 92, 123,
1098 131, 358, 85, 239, 128, 179, 172, 132, 386, 359,
1099 99, 180, 371, 100, 83, 84, 132, 7, 81, 275,
1100 93, 94, 95, 309, 227, 261, 123, 251, 252, 93,
1101 94, 95, 400, 222, 86, 132, 102, 407, 400, 74,
1102 90, 108, 107, 131, 131, 263, 277, 74, 27, 28,
1103 60, 29, 112, 88, 236, 310, 61, 91, 368, 37,
1104 237, 294, 353, 220, 294, 312, 294, 74, 172, 295,
1105 369, 231, 232, 300, 404, 74, 294, 109, 132, 132,
1106 294, 247, 248, 316, 74, -94, 306, 294, 201, 307,
1107 343, 101, 233, 336, 74, 172, 234, 324, 325, 326,
1108 327, 74, 306, 74, 342, 355, 253, 254, 344, 175,
1109 227, 376, 294, 361, 378, 2, 3, 4, 115, 297,
1110 93, 94, 95, 242, 243, 244, 245, 113, 246, 118,
1111 131, 265, 266, 320, 321, 328, 329, 392, 125, 348,
1112 349, 178, 159, 322, 323, 129, 74, 74, 220, 213,
1113 80, 223, -27, 255, 235, 350, 256, 240, 257, 408,
1114 159, 258, 356, 262, 259, 132, 298, 271, 268, 269,
1115 272, 273, 276, 278, 228, 229, 201, 172, 370, 345,
1116 279, 280, -26, 305, 172, 362, 303, 302, -21, -229,
1117 -28, 352, 382, 241, 360, 351, 375, 220, 354, 370,
1118 220, 294, 379, 389, 377, 390, 391, 381, 393, 396,
1119 395, 397, 399, 372, 394, 380, 192, 403, 315, 409,
1120 331, 330, 159, 220, 332, 120, 363, 405, 124, 82,
1121 333, 214, 398, 74, 372, 304, 334, 172, 335, 215,
1122 357, 406, 365, 347, 267, 220, 111, 366, 0, 159,
1123 383, 201, 282, 283, 284, 285, 286, 287, 288, 289,
1124 290, 291, 0, 0, 0, 0, 0, 0, 0, 0,
1125 0, 292, 0, 0, 106, 317, 318, 319, 159, 159,
1126 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
1127 159, 159, 159, 159, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001129 201, 201, 0, 0, 0, 0, 201, 201, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001131 0, 159, 0, 0, 0, 0, 0, 201, 159, 0,
1132 0, 0, 74, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001134 201, 0, 0, 0, 0, 0, 201, 0, 0, 0,
1135 0, 0, 0, 0, 0, 0, 0, 1, 2, 3,
1136 4, 5, 6, 7, 8, 9, 10, 11, 181, 182,
1137 183, 159, 184, 185, 186, 187, 188, 189, 190, 12,
1138 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1139 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1140 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1141 191, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1142 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1143 135, 59, 136, 137, 138, 139, 140, 0, 0, 141,
1144 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1145 0, 0, 0, 0, 0, 0, 0, 0, 143, 0,
1146 0, 0, 192, 193, 0, 0, 0, 0, 194, 145,
1147 146, 147, 148, 1, 2, 3, 4, 5, 6, 7,
1148 8, 9, 10, 11, 181, 182, 183, 0, 184, 185,
1149 186, 187, 188, 189, 190, 12, 13, 14, 15, 16,
1150 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1151 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1152 36, 37, 38, 39, 40, 41, 191, 42, 43, 44,
1153 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1154 54, 0, 55, 56, 57, 58, 135, 59, 136, 137,
1155 138, 139, 140, 0, 0, 141, 142, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001156 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001157 0, 0, 0, 0, 143, 0, 0, 0, 192, 296,
1158 0, 0, 0, 0, 194, 145, 146, 147, 148, 1,
1159 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1160 181, 182, 183, 0, 184, 185, 186, 187, 188, 189,
1161 190, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1162 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1163 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1164 40, 41, 191, 42, 43, 44, 0, 45, 46, 47,
1165 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1166 57, 58, 135, 59, 136, 137, 138, 139, 140, 0,
1167 0, 141, 142, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001169 143, 0, 0, 0, 192, 0, 0, 0, 0, 0,
1170 194, 145, 146, 147, 148, 1, 2, 3, 4, 5,
1171 6, 7, 8, 9, 10, 11, 181, 182, 183, 0,
1172 184, 185, 186, 187, 188, 189, 190, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001173 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001174 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetue5246692015-06-18 12:34:52 -04001175 34, 35, 36, 37, 38, 39, 40, 41, 191, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001176 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetua35d8232015-06-11 17:11:06 -04001177 52, 53, 54, 0, 55, 56, 57, 58, 135, 59,
1178 136, 137, 138, 139, 140, 0, 0, 141, 142, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001180 0, 0, 0, 0, 0, 0, 143, 0, 0, 0,
1181 118, 0, 0, 0, 0, 0, 194, 145, 146, 147,
1182 148, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1183 10, 11, 181, 182, 183, 0, 184, 185, 186, 187,
1184 188, 189, 190, 12, 13, 14, 15, 16, 17, 18,
1185 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1186 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1187 38, 39, 40, 41, 191, 42, 43, 44, 0, 45,
1188 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1189 55, 56, 57, 58, 135, 59, 136, 137, 138, 139,
1190 140, 0, 0, 141, 142, 0, 0, 0, 0, 0,
1191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1192 0, 0, 143, 0, 0, 0, 0, 0, 0, 0,
1193 0, 0, 194, 145, 146, 147, 148, 1, 2, 3,
1194 4, 5, 6, 7, 8, 9, 10, 11, 0, 0,
1195 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
1196 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1197 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1198 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1199 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1200 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1201 135, 59, 136, 137, 138, 139, 140, 0, 0, 141,
1202 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1203 0, 0, 0, 0, 130, 2, 3, 4, 143, 6,
1204 7, 8, 9, 10, 11, 0, 0, 0, 194, 145,
1205 146, 147, 148, 0, 0, 0, 12, 13, 14, 15,
1206 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1207 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1208 35, 36, 37, 38, 39, 40, 41, 0, 42, 43,
1209 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1210 53, 54, 0, 55, 56, 57, 58, 135, 59, 136,
1211 137, 138, 139, 140, 0, 0, 141, 142, 0, 0,
1212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1213 2, 3, 4, 0, 0, 143, 8, 9, 10, 11,
1214 0, 0, 0, 0, 0, 0, 145, 146, 147, 148,
1215 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1216 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1217 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1218 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1219 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1220 57, 0, 103, 59, 0, 0, 8, 9, 10, 11,
1221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1222 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1223 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1224 104, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1225 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1226 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1227 57, 0, 135, 59, 136, 137, 138, 139, 140, 0,
1228 0, 141, 142, 0, 0, 0, 0, 0, 0, 0,
1229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1230 143, 0, 0, 144, 8, 9, 10, 11, 0, 0,
1231 0, 145, 146, 147, 148, 0, 0, 0, 0, 12,
1232 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1233 23, 24, 25, 26, 0, 0, 0, 0, 0, 31,
1234 32, 33, 34, 35, 36, 0, 0, 0, 40, 41,
1235 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1236 50, 51, 52, 53, 54, 0, 55, 56, 57, 0,
1237 135, 59, 136, 137, 138, 139, 140, 0, 0, 141,
1238 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1239 0, 0, 0, 0, 0, 0, 0, 0, 143, 0,
1240 0, 218, 8, 9, 10, 11, 0, 0, 0, 145,
1241 146, 147, 148, 0, 0, 0, 0, 12, 13, 14,
1242 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1243 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1244 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1245 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1246 52, 53, 54, 0, 55, 56, 57, 0, 135, 59,
1247 136, 137, 138, 139, 140, 0, 0, 141, 142, 0,
1248 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1249 0, 0, 0, 0, 0, 0, 143, 8, 9, 10,
1250 11, 0, 0, 0, 0, 0, 274, 145, 146, 147,
1251 148, 0, 12, 13, 14, 15, 16, 17, 18, 19,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001252 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1253 0, 0, 31, 32, 33, 34, 35, 36, 0, 0,
1254 0, 40, 41, 0, 42, 43, 44, 0, 45, 46,
Alexis Hetua35d8232015-06-11 17:11:06 -04001255 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001256 56, 57, 0, 135, 59, 136, 137, 138, 139, 140,
Alexis Hetua35d8232015-06-11 17:11:06 -04001257 0, 0, 141, 142, 0, 0, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001259 0, 143, 0, 0, 299, 8, 9, 10, 11, 0,
1260 0, 0, 145, 146, 147, 148, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001261 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1262 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
1263 31, 32, 33, 34, 35, 36, 0, 0, 0, 40,
1264 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1265 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1266 0, 135, 59, 136, 137, 138, 139, 140, 0, 0,
1267 141, 142, 0, 0, 0, 0, 0, 0, 0, 0,
1268 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
Alexis Hetue5246692015-06-18 12:34:52 -04001269 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1270 145, 146, 147, 148, 0, 12, 13, 14, 15, 16,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001271 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1272 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
Alexis Hetue5246692015-06-18 12:34:52 -04001273 36, 0, 0, 0, 40, 238, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001274 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1275 54, 0, 55, 56, 57, 0, 135, 59, 136, 137,
1276 138, 139, 140, 0, 0, 141, 142, 0, 0, 0,
1277 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001278 130, 2, 3, 4, 143, 6, 7, 8, 9, 10,
1279 11, 0, 0, 0, 0, 145, 146, 147, 148, 0,
1280 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1281 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1282 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1283 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1284 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1285 56, 57, 58, 0, 59, 0, 0, 0, 0, 0,
1286 0, 0, 0, 0, 0, 130, 2, 3, 4, 0,
1287 6, 7, 8, 9, 10, 11, 0, 0, 0, 0,
1288 0, 0, 0, 0, 0, 0, 226, 12, 13, 14,
1289 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1290 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1291 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1292 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1293 52, 53, 54, 0, 55, 56, 57, 58, 0, 59,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001295 130, 2, 3, 4, 0, 6, 7, 8, 9, 10,
1296 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1297 0, 264, 12, 13, 14, 15, 16, 17, 18, 19,
1298 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1299 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1300 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1301 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1302 56, 57, 58, 0, 59, 0, 0, 0, 0, 0,
1303 0, 0, 110, 0, 0, 1, 2, 3, 4, 5,
1304 6, 7, 8, 9, 10, 11, 0, 0, 0, 0,
1305 0, 0, 0, 0, 0, 0, 337, 12, 13, 14,
1306 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1307 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1308 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1309 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1310 52, 53, 54, 0, 55, 56, 57, 58, 0, 59,
1311 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001312 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1313 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
Alexis Hetue5246692015-06-18 12:34:52 -04001314 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1315 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1316 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001317 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
Alexis Hetue5246692015-06-18 12:34:52 -04001318 56, 57, 58, 0, 59, 130, 2, 3, 4, 0,
1319 6, 7, 8, 9, 10, 11, 0, 0, 0, 0,
1320 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1321 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1322 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1323 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1324 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1325 52, 53, 54, 0, 55, 56, 57, 58, 0, 59,
1326 2, 3, 4, 0, 0, 0, 8, 9, 10, 11,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001327 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001328 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1329 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1330 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1331 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1332 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1333 57, 0, 0, 59, 8, 9, 10, 11, 0, 0,
1334 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
1335 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1336 23, 24, 25, 26, 0, 0, 0, 0, 0, 31,
1337 32, 33, 34, 35, 36, 0, 0, 0, 40, 41,
1338 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1339 50, 51, 52, 53, 54, 0, 55, 56, 57, 0,
1340 313, 59, 8, 9, 10, 11, 314, 0, 0, 0,
1341 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1342 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1343 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1344 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1345 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1346 52, 53, 54, 0, 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001347};
1348
1349static const yytype_int16 yycheck[] =
1350{
Alexis Hetue5246692015-06-18 12:34:52 -04001351 0, 69, 105, 0, 128, 143, 89, 217, 206, 0,
1352 133, 114, 340, 114, 127, 76, 44, 106, 109, 9,
1353 92, 346, 87, 88, 113, 104, 104, 106, 9, 97,
1354 133, 106, 76, 157, 113, 105, 127, 105, 368, 114,
1355 111, 111, 367, 114, 40, 41, 114, 9, 76, 187,
1356 40, 41, 42, 114, 177, 127, 124, 122, 123, 40,
1357 41, 42, 390, 131, 108, 133, 68, 397, 396, 69,
1358 105, 73, 72, 176, 177, 176, 189, 77, 40, 41,
1359 77, 43, 82, 114, 105, 105, 77, 111, 105, 51,
1360 111, 111, 302, 217, 111, 233, 111, 97, 189, 114,
1361 105, 85, 86, 216, 105, 105, 111, 106, 176, 177,
1362 111, 83, 84, 237, 114, 105, 111, 111, 118, 114,
1363 114, 76, 106, 261, 124, 216, 110, 249, 250, 251,
1364 252, 131, 111, 133, 272, 114, 89, 90, 276, 114,
1365 263, 351, 111, 112, 354, 4, 5, 6, 76, 347,
1366 40, 41, 42, 119, 120, 121, 116, 108, 118, 108,
1367 263, 79, 80, 245, 246, 253, 254, 377, 76, 293,
1368 294, 113, 109, 247, 248, 108, 176, 177, 302, 76,
1369 44, 76, 104, 126, 105, 298, 125, 104, 124, 399,
1370 127, 91, 305, 107, 93, 263, 106, 104, 114, 114,
1371 104, 114, 104, 112, 141, 142, 206, 298, 346, 112,
1372 104, 109, 104, 106, 305, 56, 107, 113, 105, 108,
1373 104, 107, 104, 160, 107, 113, 107, 351, 113, 367,
1374 354, 111, 107, 76, 113, 105, 109, 361, 107, 105,
1375 114, 17, 113, 346, 382, 358, 108, 114, 234, 114,
1376 256, 255, 189, 377, 257, 91, 339, 395, 98, 5,
1377 258, 124, 388, 263, 367, 222, 259, 358, 260, 124,
1378 306, 396, 341, 281, 180, 399, 77, 341, -1, 216,
1379 367, 281, 94, 95, 96, 97, 98, 99, 100, 101,
1380 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
1381 -1, 113, -1, -1, 372, 242, 243, 244, 245, 246,
1382 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
1383 257, 258, 259, 260, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001384 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001385 340, 341, -1, -1, -1, -1, 346, 347, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001387 -1, 298, -1, -1, -1, -1, -1, 367, 305, -1,
1388 -1, -1, 372, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001389 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001390 390, -1, -1, -1, -1, -1, 396, -1, -1, -1,
1391 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
1392 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1393 16, 358, 18, 19, 20, 21, 22, 23, 24, 25,
1394 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1395 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1396 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1397 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1398 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1399 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1400 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1401 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
1402 -1, -1, 108, 109, -1, -1, -1, -1, 114, 115,
1403 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
1404 10, 11, 12, 13, 14, 15, 16, -1, 18, 19,
1405 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1406 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1407 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1408 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1409 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1410 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1411 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001413 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
1414 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1415 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1416 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1417 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1418 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1419 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1420 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1421 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1422 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1423 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001424 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001425 104, -1, -1, -1, 108, -1, -1, -1, -1, -1,
1426 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1427 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1428 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001429 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001430 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001431 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001432 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001433 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001434 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001436 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
1437 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
1438 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1439 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1440 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1441 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1442 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1443 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
1444 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1445 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1446 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1448 -1, -1, 104, -1, -1, -1, -1, -1, -1, -1,
1449 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
1450 6, 7, 8, 9, 10, 11, 12, 13, -1, -1,
1451 -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
1452 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1453 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1454 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1455 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1456 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1457 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1458 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1459 -1, -1, -1, -1, 3, 4, 5, 6, 104, 8,
1460 9, 10, 11, 12, 13, -1, -1, -1, 114, 115,
1461 116, 117, 118, -1, -1, -1, 25, 26, 27, 28,
1462 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1463 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1464 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
1465 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1466 69, 70, -1, 72, 73, 74, 75, 76, 77, 78,
1467 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1469 4, 5, 6, -1, -1, 104, 10, 11, 12, 13,
1470 -1, -1, -1, -1, -1, -1, 115, 116, 117, 118,
1471 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1472 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1473 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1474 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1475 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1476 74, -1, 76, 77, -1, -1, 10, 11, 12, 13,
1477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1478 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1479 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1480 114, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1481 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1482 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1483 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1484 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1486 104, -1, -1, 107, 10, 11, 12, 13, -1, -1,
1487 -1, 115, 116, 117, 118, -1, -1, -1, -1, 25,
1488 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1489 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
1490 46, 47, 48, 49, 50, -1, -1, -1, 54, 55,
1491 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1492 66, 67, 68, 69, 70, -1, 72, 73, 74, -1,
1493 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1494 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1495 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
1496 -1, 107, 10, 11, 12, 13, -1, -1, -1, 115,
1497 116, 117, 118, -1, -1, -1, -1, 25, 26, 27,
1498 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1499 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1500 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1501 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1502 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
1503 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1504 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1505 -1, -1, -1, -1, -1, -1, 104, 10, 11, 12,
1506 13, -1, -1, -1, -1, -1, 114, 115, 116, 117,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001507 118, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1508 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1509 -1, -1, 45, 46, 47, 48, 49, 50, -1, -1,
1510 -1, 54, 55, -1, 57, 58, 59, -1, 61, 62,
Alexis Hetua35d8232015-06-11 17:11:06 -04001511 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001512 73, 74, -1, 76, 77, 78, 79, 80, 81, 82,
Alexis Hetua35d8232015-06-11 17:11:06 -04001513 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001515 -1, 104, -1, -1, 107, 10, 11, 12, 13, -1,
1516 -1, -1, 115, 116, 117, 118, -1, -1, -1, -1,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001517 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1518 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
1519 45, 46, 47, 48, 49, 50, -1, -1, -1, 54,
1520 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1521 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1522 -1, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1523 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1524 -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
Alexis Hetue5246692015-06-18 12:34:52 -04001525 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001526 115, 116, 117, 118, -1, 25, 26, 27, 28, 29,
1527 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1528 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1529 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1530 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1531 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1532 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1533 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001534 3, 4, 5, 6, 104, 8, 9, 10, 11, 12,
1535 13, -1, -1, -1, -1, 115, 116, 117, 118, -1,
1536 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1537 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1538 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1539 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1540 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1541 73, 74, 75, -1, 77, -1, -1, -1, -1, -1,
1542 -1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
1543 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
1544 -1, -1, -1, -1, -1, -1, 109, 25, 26, 27,
1545 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1546 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1547 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1548 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1549 68, 69, 70, -1, 72, 73, 74, 75, -1, 77,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001551 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
1552 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1553 -1, 109, 25, 26, 27, 28, 29, 30, 31, 32,
1554 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1555 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1556 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1557 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1558 73, 74, 75, -1, 77, -1, -1, -1, -1, -1,
1559 -1, -1, 0, -1, -1, 3, 4, 5, 6, 7,
1560 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
1561 -1, -1, -1, -1, -1, -1, 109, 25, 26, 27,
1562 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1563 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1564 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1565 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1566 68, 69, 70, -1, 72, 73, 74, 75, -1, 77,
1567 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001568 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1569 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
Alexis Hetue5246692015-06-18 12:34:52 -04001570 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1571 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1572 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001573 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
Alexis Hetue5246692015-06-18 12:34:52 -04001574 73, 74, 75, -1, 77, 3, 4, 5, 6, -1,
1575 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
1576 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1577 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1578 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1579 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1580 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1581 68, 69, 70, -1, 72, 73, 74, 75, -1, 77,
1582 4, 5, 6, -1, -1, -1, 10, 11, 12, 13,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001583 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001584 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1585 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1586 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1587 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1588 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1589 74, -1, -1, 77, 10, 11, 12, 13, -1, -1,
1590 -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
1591 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1592 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
1593 46, 47, 48, 49, 50, -1, -1, -1, 54, 55,
1594 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1595 66, 67, 68, 69, 70, -1, 72, 73, 74, -1,
1596 76, 77, 10, 11, 12, 13, 82, -1, -1, -1,
1597 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1598 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1599 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1600 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1601 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1602 68, 69, 70, -1, 72, 73, 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001603};
1604
1605/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1606 symbol of state STATE-NUM. */
1607static const yytype_uint8 yystos[] =
1608{
1609 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001610 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001611 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001612 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1613 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1614 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001615 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001616 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
1617 44, 76, 176, 40, 41, 76, 108, 104, 114, 220,
Alexis Hetua35d8232015-06-11 17:11:06 -04001618 105, 111, 9, 40, 41, 42, 165, 166, 172, 111,
1619 114, 76, 174, 76, 114, 158, 175, 180, 174, 106,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001620 0, 218, 180, 108, 184, 76, 178, 179, 108, 200,
Alexis Hetua35d8232015-06-11 17:11:06 -04001621 165, 164, 167, 175, 166, 76, 104, 106, 113, 108,
1622 3, 173, 175, 185, 186, 76, 78, 79, 80, 81,
Alexis Hetue5246692015-06-18 12:34:52 -04001623 82, 85, 86, 104, 107, 115, 116, 117, 118, 129,
1624 130, 131, 133, 134, 135, 136, 137, 138, 139, 140,
1625 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
1626 151, 152, 153, 157, 180, 114, 183, 185, 113, 105,
1627 111, 14, 15, 16, 18, 19, 20, 21, 22, 23,
1628 24, 56, 108, 109, 114, 140, 153, 154, 156, 159,
1629 160, 180, 190, 191, 192, 193, 201, 202, 203, 205,
1630 207, 209, 216, 76, 164, 167, 106, 113, 107, 157,
1631 154, 189, 175, 76, 187, 188, 109, 186, 140, 140,
1632 156, 85, 86, 106, 110, 105, 105, 111, 55, 154,
1633 104, 140, 119, 120, 121, 116, 118, 83, 84, 87,
1634 88, 122, 123, 89, 90, 126, 125, 124, 91, 93,
1635 92, 127, 107, 185, 109, 79, 80, 179, 114, 114,
1636 211, 104, 104, 114, 114, 156, 104, 157, 112, 104,
1637 109, 194, 94, 95, 96, 97, 98, 99, 100, 101,
1638 102, 103, 113, 155, 111, 114, 109, 191, 106, 107,
1639 157, 189, 113, 107, 187, 106, 111, 114, 76, 114,
1640 105, 132, 156, 76, 82, 135, 154, 140, 140, 140,
1641 142, 142, 143, 143, 144, 144, 144, 144, 145, 145,
1642 146, 147, 148, 149, 150, 151, 156, 109, 197, 198,
1643 199, 212, 156, 114, 156, 112, 210, 201, 154, 154,
1644 157, 113, 107, 189, 113, 114, 157, 188, 106, 114,
1645 107, 112, 56, 200, 192, 190, 202, 213, 105, 105,
1646 156, 170, 173, 208, 195, 107, 189, 113, 189, 107,
1647 157, 154, 104, 208, 214, 215, 197, 204, 206, 76,
1648 105, 109, 189, 107, 156, 114, 105, 17, 193, 113,
1649 192, 196, 200, 114, 105, 156, 196, 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001650};
1651
1652#define yyerrok (yyerrstatus = 0)
1653#define yyclearin (yychar = YYEMPTY)
1654#define YYEMPTY (-2)
1655#define YYEOF 0
1656
1657#define YYACCEPT goto yyacceptlab
1658#define YYABORT goto yyabortlab
1659#define YYERROR goto yyerrorlab
1660
1661
1662/* Like YYERROR except do call yyerror. This remains here temporarily
1663 to ease the transition to the new meaning of YYERROR, for GCC.
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001664 Once GCC version 2 has supplanted version 1, this can go. */
John Bauman66b8ab22014-05-06 15:57:45 -04001665
1666#define YYFAIL goto yyerrlab
John Bauman66b8ab22014-05-06 15:57:45 -04001667
1668#define YYRECOVERING() (!!yyerrstatus)
1669
1670#define YYBACKUP(Token, Value) \
1671do \
1672 if (yychar == YYEMPTY && yylen == 1) \
1673 { \
1674 yychar = (Token); \
1675 yylval = (Value); \
1676 yytoken = YYTRANSLATE (yychar); \
1677 YYPOPSTACK (1); \
1678 goto yybackup; \
1679 } \
1680 else \
1681 { \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001682 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
John Bauman66b8ab22014-05-06 15:57:45 -04001683 YYERROR; \
1684 } \
1685while (YYID (0))
1686
1687
1688#define YYTERROR 1
1689#define YYERRCODE 256
1690
1691
1692/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1693 If N is 0, then set CURRENT to the empty location which ends
1694 the previous symbol: RHS[0] (always defined). */
1695
1696#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1697#ifndef YYLLOC_DEFAULT
1698# define YYLLOC_DEFAULT(Current, Rhs, N) \
1699 do \
1700 if (YYID (N)) \
1701 { \
1702 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1703 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1704 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1705 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1706 } \
1707 else \
1708 { \
1709 (Current).first_line = (Current).last_line = \
1710 YYRHSLOC (Rhs, 0).last_line; \
1711 (Current).first_column = (Current).last_column = \
1712 YYRHSLOC (Rhs, 0).last_column; \
1713 } \
1714 while (YYID (0))
1715#endif
1716
1717
1718/* YY_LOCATION_PRINT -- Print the location on the stream.
1719 This macro was not mandated originally: define only if we know
1720 we won't break user code: when these are the locations we know. */
1721
1722#ifndef YY_LOCATION_PRINT
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001723# if YYLTYPE_IS_TRIVIAL
John Bauman66b8ab22014-05-06 15:57:45 -04001724# define YY_LOCATION_PRINT(File, Loc) \
1725 fprintf (File, "%d.%d-%d.%d", \
1726 (Loc).first_line, (Loc).first_column, \
1727 (Loc).last_line, (Loc).last_column)
1728# else
1729# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1730# endif
1731#endif
1732
1733
1734/* YYLEX -- calling `yylex' with the right arguments. */
1735
1736#ifdef YYLEX_PARAM
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001737# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
John Bauman66b8ab22014-05-06 15:57:45 -04001738#else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001739# define YYLEX yylex (&yylval, &yylloc)
John Bauman66b8ab22014-05-06 15:57:45 -04001740#endif
1741
1742/* Enable debugging if requested. */
1743#if YYDEBUG
1744
1745# ifndef YYFPRINTF
1746# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1747# define YYFPRINTF fprintf
1748# endif
1749
1750# define YYDPRINTF(Args) \
1751do { \
1752 if (yydebug) \
1753 YYFPRINTF Args; \
1754} while (YYID (0))
1755
1756# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1757do { \
1758 if (yydebug) \
1759 { \
1760 YYFPRINTF (stderr, "%s ", Title); \
1761 yy_symbol_print (stderr, \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001762 Type, Value, Location, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001763 YYFPRINTF (stderr, "\n"); \
1764 } \
1765} while (YYID (0))
1766
1767
1768/*--------------------------------.
1769| Print this symbol on YYOUTPUT. |
1770`--------------------------------*/
1771
1772/*ARGSUSED*/
1773#if (defined __STDC__ || defined __C99__FUNC__ \
1774 || defined __cplusplus || defined _MSC_VER)
1775static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001776yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001777#else
1778static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001779yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001780 FILE *yyoutput;
1781 int yytype;
1782 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001783 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001784 TParseContext* context;
1785#endif
1786{
1787 if (!yyvaluep)
1788 return;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001789 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001790 YYUSE (context);
1791# ifdef YYPRINT
1792 if (yytype < YYNTOKENS)
1793 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1794# else
1795 YYUSE (yyoutput);
1796# endif
1797 switch (yytype)
1798 {
1799 default:
1800 break;
1801 }
1802}
1803
1804
1805/*--------------------------------.
1806| Print this symbol on YYOUTPUT. |
1807`--------------------------------*/
1808
1809#if (defined __STDC__ || defined __C99__FUNC__ \
1810 || defined __cplusplus || defined _MSC_VER)
1811static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001812yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001813#else
1814static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001815yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001816 FILE *yyoutput;
1817 int yytype;
1818 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001819 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001820 TParseContext* context;
1821#endif
1822{
1823 if (yytype < YYNTOKENS)
1824 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1825 else
1826 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1827
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001828 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1829 YYFPRINTF (yyoutput, ": ");
1830 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04001831 YYFPRINTF (yyoutput, ")");
1832}
1833
1834/*------------------------------------------------------------------.
1835| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1836| TOP (included). |
1837`------------------------------------------------------------------*/
1838
1839#if (defined __STDC__ || defined __C99__FUNC__ \
1840 || defined __cplusplus || defined _MSC_VER)
1841static void
1842yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1843#else
1844static void
1845yy_stack_print (yybottom, yytop)
1846 yytype_int16 *yybottom;
1847 yytype_int16 *yytop;
1848#endif
1849{
1850 YYFPRINTF (stderr, "Stack now");
1851 for (; yybottom <= yytop; yybottom++)
1852 {
1853 int yybot = *yybottom;
1854 YYFPRINTF (stderr, " %d", yybot);
1855 }
1856 YYFPRINTF (stderr, "\n");
1857}
1858
1859# define YY_STACK_PRINT(Bottom, Top) \
1860do { \
1861 if (yydebug) \
1862 yy_stack_print ((Bottom), (Top)); \
1863} while (YYID (0))
1864
1865
1866/*------------------------------------------------.
1867| Report that the YYRULE is going to be reduced. |
1868`------------------------------------------------*/
1869
1870#if (defined __STDC__ || defined __C99__FUNC__ \
1871 || defined __cplusplus || defined _MSC_VER)
1872static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001873yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001874#else
1875static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001876yy_reduce_print (yyvsp, yylsp, yyrule, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001877 YYSTYPE *yyvsp;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001878 YYLTYPE *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04001879 int yyrule;
1880 TParseContext* context;
1881#endif
1882{
1883 int yynrhs = yyr2[yyrule];
1884 int yyi;
1885 unsigned long int yylno = yyrline[yyrule];
1886 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1887 yyrule - 1, yylno);
1888 /* The symbols being reduced. */
1889 for (yyi = 0; yyi < yynrhs; yyi++)
1890 {
1891 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1892 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1893 &(yyvsp[(yyi + 1) - (yynrhs)])
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001894 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
John Bauman66b8ab22014-05-06 15:57:45 -04001895 YYFPRINTF (stderr, "\n");
1896 }
1897}
1898
1899# define YY_REDUCE_PRINT(Rule) \
1900do { \
1901 if (yydebug) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001902 yy_reduce_print (yyvsp, yylsp, Rule, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001903} while (YYID (0))
1904
1905/* Nonzero means print parse trace. It is left uninitialized so that
1906 multiple parsers can coexist. */
1907int yydebug;
1908#else /* !YYDEBUG */
1909# define YYDPRINTF(Args)
1910# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1911# define YY_STACK_PRINT(Bottom, Top)
1912# define YY_REDUCE_PRINT(Rule)
1913#endif /* !YYDEBUG */
1914
1915
1916/* YYINITDEPTH -- initial size of the parser's stacks. */
1917#ifndef YYINITDEPTH
1918# define YYINITDEPTH 200
1919#endif
1920
1921/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1922 if the built-in stack extension method is used).
1923
1924 Do not make this value too large; the results are undefined if
1925 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1926 evaluated with infinite-precision integer arithmetic. */
1927
1928#ifndef YYMAXDEPTH
1929# define YYMAXDEPTH 10000
1930#endif
1931
1932
1933
1934#if YYERROR_VERBOSE
1935
1936# ifndef yystrlen
1937# if defined __GLIBC__ && defined _STRING_H
1938# define yystrlen strlen
1939# else
1940/* Return the length of YYSTR. */
1941#if (defined __STDC__ || defined __C99__FUNC__ \
1942 || defined __cplusplus || defined _MSC_VER)
1943static YYSIZE_T
1944yystrlen (const char *yystr)
1945#else
1946static YYSIZE_T
1947yystrlen (yystr)
1948 const char *yystr;
1949#endif
1950{
1951 YYSIZE_T yylen;
1952 for (yylen = 0; yystr[yylen]; yylen++)
1953 continue;
1954 return yylen;
1955}
1956# endif
1957# endif
1958
1959# ifndef yystpcpy
1960# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1961# define yystpcpy stpcpy
1962# else
1963/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1964 YYDEST. */
1965#if (defined __STDC__ || defined __C99__FUNC__ \
1966 || defined __cplusplus || defined _MSC_VER)
1967static char *
1968yystpcpy (char *yydest, const char *yysrc)
1969#else
1970static char *
1971yystpcpy (yydest, yysrc)
1972 char *yydest;
1973 const char *yysrc;
1974#endif
1975{
1976 char *yyd = yydest;
1977 const char *yys = yysrc;
1978
1979 while ((*yyd++ = *yys++) != '\0')
1980 continue;
1981
1982 return yyd - 1;
1983}
1984# endif
1985# endif
1986
1987# ifndef yytnamerr
1988/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1989 quotes and backslashes, so that it's suitable for yyerror. The
1990 heuristic is that double-quoting is unnecessary unless the string
1991 contains an apostrophe, a comma, or backslash (other than
1992 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1993 null, do not copy; instead, return the length of what the result
1994 would have been. */
1995static YYSIZE_T
1996yytnamerr (char *yyres, const char *yystr)
1997{
1998 if (*yystr == '"')
1999 {
2000 YYSIZE_T yyn = 0;
2001 char const *yyp = yystr;
2002
2003 for (;;)
2004 switch (*++yyp)
2005 {
2006 case '\'':
2007 case ',':
2008 goto do_not_strip_quotes;
2009
2010 case '\\':
2011 if (*++yyp != '\\')
2012 goto do_not_strip_quotes;
2013 /* Fall through. */
2014 default:
2015 if (yyres)
2016 yyres[yyn] = *yyp;
2017 yyn++;
2018 break;
2019
2020 case '"':
2021 if (yyres)
2022 yyres[yyn] = '\0';
2023 return yyn;
2024 }
2025 do_not_strip_quotes: ;
2026 }
2027
2028 if (! yyres)
2029 return yystrlen (yystr);
2030
2031 return yystpcpy (yyres, yystr) - yyres;
2032}
2033# endif
2034
2035/* Copy into YYRESULT an error message about the unexpected token
2036 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2037 including the terminating null byte. If YYRESULT is null, do not
2038 copy anything; just return the number of bytes that would be
2039 copied. As a special case, return 0 if an ordinary "syntax error"
2040 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2041 size calculation. */
2042static YYSIZE_T
2043yysyntax_error (char *yyresult, int yystate, int yychar)
2044{
2045 int yyn = yypact[yystate];
2046
2047 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2048 return 0;
2049 else
2050 {
2051 int yytype = YYTRANSLATE (yychar);
2052 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2053 YYSIZE_T yysize = yysize0;
2054 YYSIZE_T yysize1;
2055 int yysize_overflow = 0;
2056 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2057 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2058 int yyx;
2059
2060# if 0
2061 /* This is so xgettext sees the translatable formats that are
2062 constructed on the fly. */
2063 YY_("syntax error, unexpected %s");
2064 YY_("syntax error, unexpected %s, expecting %s");
2065 YY_("syntax error, unexpected %s, expecting %s or %s");
2066 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2067 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2068# endif
2069 char *yyfmt;
2070 char const *yyf;
2071 static char const yyunexpected[] = "syntax error, unexpected %s";
2072 static char const yyexpecting[] = ", expecting %s";
2073 static char const yyor[] = " or %s";
2074 char yyformat[sizeof yyunexpected
2075 + sizeof yyexpecting - 1
2076 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2077 * (sizeof yyor - 1))];
2078 char const *yyprefix = yyexpecting;
2079
2080 /* Start YYX at -YYN if negative to avoid negative indexes in
2081 YYCHECK. */
2082 int yyxbegin = yyn < 0 ? -yyn : 0;
2083
2084 /* Stay within bounds of both yycheck and yytname. */
2085 int yychecklim = YYLAST - yyn + 1;
2086 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2087 int yycount = 1;
2088
2089 yyarg[0] = yytname[yytype];
2090 yyfmt = yystpcpy (yyformat, yyunexpected);
2091
2092 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2093 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2094 {
2095 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2096 {
2097 yycount = 1;
2098 yysize = yysize0;
2099 yyformat[sizeof yyunexpected - 1] = '\0';
2100 break;
2101 }
2102 yyarg[yycount++] = yytname[yyx];
2103 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2104 yysize_overflow |= (yysize1 < yysize);
2105 yysize = yysize1;
2106 yyfmt = yystpcpy (yyfmt, yyprefix);
2107 yyprefix = yyor;
2108 }
2109
2110 yyf = YY_(yyformat);
2111 yysize1 = yysize + yystrlen (yyf);
2112 yysize_overflow |= (yysize1 < yysize);
2113 yysize = yysize1;
2114
2115 if (yysize_overflow)
2116 return YYSIZE_MAXIMUM;
2117
2118 if (yyresult)
2119 {
2120 /* Avoid sprintf, as that infringes on the user's name space.
2121 Don't have undefined behavior even if the translation
2122 produced a string with the wrong number of "%s"s. */
2123 char *yyp = yyresult;
2124 int yyi = 0;
2125 while ((*yyp = *yyf) != '\0')
2126 {
2127 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2128 {
2129 yyp += yytnamerr (yyp, yyarg[yyi++]);
2130 yyf += 2;
2131 }
2132 else
2133 {
2134 yyp++;
2135 yyf++;
2136 }
2137 }
2138 }
2139 return yysize;
2140 }
2141}
2142#endif /* YYERROR_VERBOSE */
2143
2144
2145/*-----------------------------------------------.
2146| Release the memory associated to this symbol. |
2147`-----------------------------------------------*/
2148
2149/*ARGSUSED*/
2150#if (defined __STDC__ || defined __C99__FUNC__ \
2151 || defined __cplusplus || defined _MSC_VER)
2152static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002153yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04002154#else
2155static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002156yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04002157 const char *yymsg;
2158 int yytype;
2159 YYSTYPE *yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002160 YYLTYPE *yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04002161 TParseContext* context;
2162#endif
2163{
2164 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002165 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002166 YYUSE (context);
2167
2168 if (!yymsg)
2169 yymsg = "Deleting";
2170 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2171
2172 switch (yytype)
2173 {
2174
2175 default:
2176 break;
2177 }
2178}
2179
2180/* Prevent warnings from -Wmissing-prototypes. */
2181#ifdef YYPARSE_PARAM
2182#if defined __STDC__ || defined __cplusplus
2183int yyparse (void *YYPARSE_PARAM);
2184#else
2185int yyparse ();
2186#endif
2187#else /* ! YYPARSE_PARAM */
2188#if defined __STDC__ || defined __cplusplus
2189int yyparse (TParseContext* context);
2190#else
2191int yyparse ();
2192#endif
2193#endif /* ! YYPARSE_PARAM */
2194
2195
2196
2197
2198
2199/*-------------------------.
2200| yyparse or yypush_parse. |
2201`-------------------------*/
2202
2203#ifdef YYPARSE_PARAM
2204#if (defined __STDC__ || defined __C99__FUNC__ \
2205 || defined __cplusplus || defined _MSC_VER)
2206int
2207yyparse (void *YYPARSE_PARAM)
2208#else
2209int
2210yyparse (YYPARSE_PARAM)
2211 void *YYPARSE_PARAM;
2212#endif
2213#else /* ! YYPARSE_PARAM */
2214#if (defined __STDC__ || defined __C99__FUNC__ \
2215 || defined __cplusplus || defined _MSC_VER)
2216int
2217yyparse (TParseContext* context)
2218#else
2219int
2220yyparse (context)
2221 TParseContext* context;
2222#endif
2223#endif
2224{
2225/* The lookahead symbol. */
2226int yychar;
2227
2228/* The semantic value of the lookahead symbol. */
2229YYSTYPE yylval;
2230
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002231/* Location data for the lookahead symbol. */
2232YYLTYPE yylloc;
2233
John Bauman66b8ab22014-05-06 15:57:45 -04002234 /* Number of syntax errors so far. */
2235 int yynerrs;
2236
2237 int yystate;
2238 /* Number of tokens to shift before error messages enabled. */
2239 int yyerrstatus;
2240
2241 /* The stacks and their tools:
2242 `yyss': related to states.
2243 `yyvs': related to semantic values.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002244 `yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002245
2246 Refer to the stacks thru separate pointers, to allow yyoverflow
2247 to reallocate them elsewhere. */
2248
2249 /* The state stack. */
2250 yytype_int16 yyssa[YYINITDEPTH];
2251 yytype_int16 *yyss;
2252 yytype_int16 *yyssp;
2253
2254 /* The semantic value stack. */
2255 YYSTYPE yyvsa[YYINITDEPTH];
2256 YYSTYPE *yyvs;
2257 YYSTYPE *yyvsp;
2258
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002259 /* The location stack. */
2260 YYLTYPE yylsa[YYINITDEPTH];
2261 YYLTYPE *yyls;
2262 YYLTYPE *yylsp;
2263
2264 /* The locations where the error started and ended. */
2265 YYLTYPE yyerror_range[2];
2266
John Bauman66b8ab22014-05-06 15:57:45 -04002267 YYSIZE_T yystacksize;
2268
2269 int yyn;
2270 int yyresult;
2271 /* Lookahead token as an internal (translated) token number. */
2272 int yytoken;
2273 /* The variables used to return semantic value and location from the
2274 action routines. */
2275 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002276 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002277
2278#if YYERROR_VERBOSE
2279 /* Buffer for error messages, and its allocated size. */
2280 char yymsgbuf[128];
2281 char *yymsg = yymsgbuf;
2282 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2283#endif
2284
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002285#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002286
2287 /* The number of symbols on the RHS of the reduced rule.
2288 Keep to zero when no symbol should be popped. */
2289 int yylen = 0;
2290
2291 yytoken = 0;
2292 yyss = yyssa;
2293 yyvs = yyvsa;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002294 yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002295 yystacksize = YYINITDEPTH;
2296
2297 YYDPRINTF ((stderr, "Starting parse\n"));
2298
2299 yystate = 0;
2300 yyerrstatus = 0;
2301 yynerrs = 0;
2302 yychar = YYEMPTY; /* Cause a token to be read. */
2303
2304 /* Initialize stack pointers.
2305 Waste one element of value and location stack
2306 so that they stay on the same level as the state stack.
2307 The wasted elements are never initialized. */
2308 yyssp = yyss;
2309 yyvsp = yyvs;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002310 yylsp = yyls;
2311
2312#if YYLTYPE_IS_TRIVIAL
2313 /* Initialize the default location before parsing starts. */
2314 yylloc.first_line = yylloc.last_line = 1;
2315 yylloc.first_column = yylloc.last_column = 1;
2316#endif
John Bauman66b8ab22014-05-06 15:57:45 -04002317
2318 goto yysetstate;
2319
2320/*------------------------------------------------------------.
2321| yynewstate -- Push a new state, which is found in yystate. |
2322`------------------------------------------------------------*/
2323 yynewstate:
2324 /* In all cases, when you get here, the value and location stacks
2325 have just been pushed. So pushing a state here evens the stacks. */
2326 yyssp++;
2327
2328 yysetstate:
2329 *yyssp = yystate;
2330
2331 if (yyss + yystacksize - 1 <= yyssp)
2332 {
2333 /* Get the current used size of the three stacks, in elements. */
2334 YYSIZE_T yysize = yyssp - yyss + 1;
2335
2336#ifdef yyoverflow
2337 {
2338 /* Give user a chance to reallocate the stack. Use copies of
2339 these so that the &'s don't force the real ones into
2340 memory. */
2341 YYSTYPE *yyvs1 = yyvs;
2342 yytype_int16 *yyss1 = yyss;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002343 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002344
2345 /* Each stack pointer address is followed by the size of the
2346 data in use in that stack, in bytes. This used to be a
2347 conditional around just the two extra args, but that might
2348 be undefined if yyoverflow is a macro. */
2349 yyoverflow (YY_("memory exhausted"),
2350 &yyss1, yysize * sizeof (*yyssp),
2351 &yyvs1, yysize * sizeof (*yyvsp),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002352 &yyls1, yysize * sizeof (*yylsp),
John Bauman66b8ab22014-05-06 15:57:45 -04002353 &yystacksize);
2354
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002355 yyls = yyls1;
John Bauman66b8ab22014-05-06 15:57:45 -04002356 yyss = yyss1;
2357 yyvs = yyvs1;
2358 }
2359#else /* no yyoverflow */
2360# ifndef YYSTACK_RELOCATE
2361 goto yyexhaustedlab;
2362# else
2363 /* Extend the stack our own way. */
2364 if (YYMAXDEPTH <= yystacksize)
2365 goto yyexhaustedlab;
2366 yystacksize *= 2;
2367 if (YYMAXDEPTH < yystacksize)
2368 yystacksize = YYMAXDEPTH;
2369
2370 {
2371 yytype_int16 *yyss1 = yyss;
2372 union yyalloc *yyptr =
2373 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2374 if (! yyptr)
2375 goto yyexhaustedlab;
2376 YYSTACK_RELOCATE (yyss_alloc, yyss);
2377 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002378 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002379# undef YYSTACK_RELOCATE
2380 if (yyss1 != yyssa)
2381 YYSTACK_FREE (yyss1);
2382 }
2383# endif
2384#endif /* no yyoverflow */
2385
2386 yyssp = yyss + yysize - 1;
2387 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002388 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002389
2390 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2391 (unsigned long int) yystacksize));
2392
2393 if (yyss + yystacksize - 1 <= yyssp)
2394 YYABORT;
2395 }
2396
2397 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2398
2399 if (yystate == YYFINAL)
2400 YYACCEPT;
2401
2402 goto yybackup;
2403
2404/*-----------.
2405| yybackup. |
2406`-----------*/
2407yybackup:
2408
2409 /* Do appropriate processing given the current state. Read a
2410 lookahead token if we need one and don't already have one. */
2411
2412 /* First try to decide what to do without reference to lookahead token. */
2413 yyn = yypact[yystate];
2414 if (yyn == YYPACT_NINF)
2415 goto yydefault;
2416
2417 /* Not known => get a lookahead token if don't already have one. */
2418
2419 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2420 if (yychar == YYEMPTY)
2421 {
2422 YYDPRINTF ((stderr, "Reading a token: "));
2423 yychar = YYLEX;
2424 }
2425
2426 if (yychar <= YYEOF)
2427 {
2428 yychar = yytoken = YYEOF;
2429 YYDPRINTF ((stderr, "Now at end of input.\n"));
2430 }
2431 else
2432 {
2433 yytoken = YYTRANSLATE (yychar);
2434 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2435 }
2436
2437 /* If the proper action on seeing token YYTOKEN is to reduce or to
2438 detect an error, take that action. */
2439 yyn += yytoken;
2440 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2441 goto yydefault;
2442 yyn = yytable[yyn];
2443 if (yyn <= 0)
2444 {
2445 if (yyn == 0 || yyn == YYTABLE_NINF)
2446 goto yyerrlab;
2447 yyn = -yyn;
2448 goto yyreduce;
2449 }
2450
2451 /* Count tokens shifted since error; after three, turn off error
2452 status. */
2453 if (yyerrstatus)
2454 yyerrstatus--;
2455
2456 /* Shift the lookahead token. */
2457 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2458
2459 /* Discard the shifted token. */
2460 yychar = YYEMPTY;
2461
2462 yystate = yyn;
2463 *++yyvsp = yylval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002464 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002465 goto yynewstate;
2466
2467
2468/*-----------------------------------------------------------.
2469| yydefault -- do the default action for the current state. |
2470`-----------------------------------------------------------*/
2471yydefault:
2472 yyn = yydefact[yystate];
2473 if (yyn == 0)
2474 goto yyerrlab;
2475 goto yyreduce;
2476
2477
2478/*-----------------------------.
2479| yyreduce -- Do a reduction. |
2480`-----------------------------*/
2481yyreduce:
2482 /* yyn is the number of a rule to reduce with. */
2483 yylen = yyr2[yyn];
2484
2485 /* If YYLEN is nonzero, implement the default value of the action:
2486 `$$ = $1'.
2487
2488 Otherwise, the following line sets YYVAL to garbage.
2489 This behavior is undocumented and Bison
2490 users should not rely upon it. Assigning to YYVAL
2491 unconditionally makes the parser a bit smaller, and it avoids a
2492 GCC warning that YYVAL may be used uninitialized. */
2493 yyval = yyvsp[1-yylen];
2494
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002495 /* Default location. */
2496 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002497 YY_REDUCE_PRINT (yyn);
2498 switch (yyn)
2499 {
2500 case 2:
2501
2502 {
2503 // The symbol table search was done in the lexical phase
Alexis Hetu76079bc2015-07-08 08:29:36 -04002504 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 -04002505
2506 // don't delete $1.string, it's used by error recovery, and the pool
2507 // pop will reclaim the memory
2508
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002509 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002510 ConstantUnion* constArray = variable->getConstPointer();
2511 TType t(variable->getType());
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002512 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002513 } else
2514 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2515 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002516 variable->getType(), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002517 }
2518 break;
2519
2520 case 3:
2521
2522 {
2523 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2524 }
2525 break;
2526
2527 case 4:
2528
2529 {
John Bauman66b8ab22014-05-06 15:57:45 -04002530 ConstantUnion *unionArray = new ConstantUnion[1];
2531 unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002532 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002533 }
2534 break;
2535
2536 case 5:
2537
2538 {
2539 ConstantUnion *unionArray = new ConstantUnion[1];
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002540 unionArray->setUConst((yyvsp[(1) - (1)].lex).u);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002541 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002542 }
2543 break;
2544
2545 case 6:
2546
2547 {
2548 ConstantUnion *unionArray = new ConstantUnion[1];
John Bauman66b8ab22014-05-06 15:57:45 -04002549 unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002550 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002551 }
2552 break;
2553
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002554 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002555
2556 {
2557 ConstantUnion *unionArray = new ConstantUnion[1];
2558 unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002559 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002560 }
2561 break;
2562
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002563 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002564
2565 {
2566 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2567 }
2568 break;
2569
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002570 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002571
2572 {
2573 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2574 }
2575 break;
2576
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002577 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002578
2579 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002580 (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 -04002581 }
2582 break;
2583
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002584 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002585
2586 {
2587 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2588 }
2589 break;
2590
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002591 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002592
2593 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002594 (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 -04002595 }
2596 break;
2597
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002598 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002599
2600 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002601 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002602 }
2603 break;
2604
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002605 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002606
2607 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002608 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002609 }
2610 break;
2611
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002612 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002613
2614 {
2615 if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
2616 context->recover();
2617 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2618 }
2619 break;
2620
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002621 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002622
2623 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002624 bool fatalError = false;
2625 (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode, nullptr, (yylsp[(1) - (1)]), &fatalError);
2626 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002627 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002628 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002629 }
John Bauman66b8ab22014-05-06 15:57:45 -04002630 }
2631 break;
2632
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002633 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002634
2635 {
2636 (yyval.interm) = (yyvsp[(1) - (1)].interm);
2637 }
2638 break;
2639
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002640 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002641
2642 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002643 context->error((yylsp[(3) - (3)]), "methods are not supported", "");
John Bauman66b8ab22014-05-06 15:57:45 -04002644 context->recover();
2645 (yyval.interm) = (yyvsp[(3) - (3)].interm);
2646 }
2647 break;
2648
John Bauman66b8ab22014-05-06 15:57:45 -04002649 case 19:
2650
2651 {
2652 (yyval.interm) = (yyvsp[(1) - (2)].interm);
John Bauman66b8ab22014-05-06 15:57:45 -04002653 }
2654 break;
2655
2656 case 20:
2657
2658 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002659 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002660 }
2661 break;
2662
2663 case 21:
2664
2665 {
John Bauman66b8ab22014-05-06 15:57:45 -04002666 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2667 (yyval.interm).intermNode = 0;
2668 }
2669 break;
2670
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002671 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002672
2673 {
2674 (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
2675 (yyval.interm).intermNode = 0;
2676 }
2677 break;
2678
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002679 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002680
2681 {
2682 TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2683 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2684 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2685 (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
2686 }
2687 break;
2688
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002689 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002690
2691 {
2692 TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2693 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2694 (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002695 (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002696 }
2697 break;
2698
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002699 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002700
2701 {
2702 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2703 }
2704 break;
2705
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002706 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002707
2708 {
Alexis Hetue5246692015-06-18 12:34:52 -04002709 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002710 ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002711 }
Alexis Hetue5246692015-06-18 12:34:52 -04002712 (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002713 }
2714 break;
2715
John Bauman66b8ab22014-05-06 15:57:45 -04002716 case 27:
2717
2718 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002719 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002720 context->recover();
2721 TType type(EbtVoid, EbpUndefined);
2722 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2723 (yyval.interm.function) = function;
2724 }
2725 break;
2726
2727 case 28:
2728
2729 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002730 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002731 context->recover();
2732 TType type(EbtVoid, EbpUndefined);
2733 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2734 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002735 }
2736 break;
2737
2738 case 29:
2739
2740 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002741 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2742 }
2743 break;
2744
2745 case 30:
2746
2747 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002748 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002749 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002750 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002751 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002752 context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002753 context->recover();
2754 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2755 }
2756 }
2757 break;
2758
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002759 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002760
2761 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002762 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002763 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002764 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002765 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002766 context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002767 context->recover();
2768 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2769 }
2770 }
2771 break;
2772
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002773 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002774
2775 {
2776 if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002777 (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 -04002778 if ((yyval.interm.intermTypedNode) == 0) {
2779 const char* errorOp = "";
2780 switch((yyvsp[(1) - (2)].interm).op) {
2781 case EOpNegative: errorOp = "-"; break;
2782 case EOpLogicalNot: errorOp = "!"; break;
Alexis Hetud061e422015-05-13 16:37:50 -04002783 case EOpBitwiseNot: errorOp = "~"; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002784 default: break;
2785 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002786 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002787 context->recover();
2788 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2789 }
2790 } else
2791 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2792 }
2793 break;
2794
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002795 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002796
Alexis Hetu253fdd12015-07-07 15:12:46 -04002797 { (yyval.interm).op = EOpNull; }
John Bauman66b8ab22014-05-06 15:57:45 -04002798 break;
2799
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002800 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002801
Alexis Hetu253fdd12015-07-07 15:12:46 -04002802 { (yyval.interm).op = EOpNegative; }
John Bauman66b8ab22014-05-06 15:57:45 -04002803 break;
2804
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002805 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002806
Alexis Hetu253fdd12015-07-07 15:12:46 -04002807 { (yyval.interm).op = EOpLogicalNot; }
John Bauman66b8ab22014-05-06 15:57:45 -04002808 break;
2809
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002810 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002811
Alexis Hetu17809052015-05-13 11:28:22 -04002812 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002813 ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04002814 (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002815 }
John Bauman66b8ab22014-05-06 15:57:45 -04002816 break;
2817
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002818 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002819
Alexis Hetu17809052015-05-13 11:28:22 -04002820 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2821 break;
2822
2823 case 38:
2824
John Bauman66b8ab22014-05-06 15:57:45 -04002825 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002826 FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002827 (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 -04002828 }
2829 break;
2830
Alexis Hetu17809052015-05-13 11:28:22 -04002831 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002832
2833 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002834 FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002835 (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 -04002836 }
2837 break;
2838
Alexis Hetu17809052015-05-13 11:28:22 -04002839 case 40:
2840
2841 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002842 FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002843 ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002844 (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 -04002845 }
2846 break;
2847
2848 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002849
2850 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2851 break;
2852
Alexis Hetu17809052015-05-13 11:28:22 -04002853 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002854
2855 {
Alexis Hetub4769582015-06-16 12:19:50 -04002856 (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 -04002857 }
2858 break;
2859
Alexis Hetu17809052015-05-13 11:28:22 -04002860 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002861
2862 {
Alexis Hetub4769582015-06-16 12:19:50 -04002863 (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 -04002864 }
2865 break;
2866
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002867 case 44:
2868
Alexis Hetu17809052015-05-13 11:28:22 -04002869 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2870 break;
2871
2872 case 45:
2873
2874 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002875 ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002876 (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 -04002877 }
2878 break;
2879
2880 case 46:
2881
2882 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002883 ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002884 (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 -04002885 }
2886 break;
2887
2888 case 47:
2889
2890 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2891 break;
2892
2893 case 48:
2894
John Bauman66b8ab22014-05-06 15:57:45 -04002895 {
Alexis Hetub4769582015-06-16 12:19:50 -04002896 (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 -04002897 }
2898 break;
2899
Alexis Hetu17809052015-05-13 11:28:22 -04002900 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002901
2902 {
Alexis Hetub4769582015-06-16 12:19:50 -04002903 (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 -04002904 }
2905 break;
2906
Alexis Hetu17809052015-05-13 11:28:22 -04002907 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002908
2909 {
Alexis Hetub4769582015-06-16 12:19:50 -04002910 (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 -04002911 }
2912 break;
2913
Alexis Hetu17809052015-05-13 11:28:22 -04002914 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002915
2916 {
Alexis Hetub4769582015-06-16 12:19:50 -04002917 (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 -04002918 }
2919 break;
2920
Alexis Hetu17809052015-05-13 11:28:22 -04002921 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002922
2923 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2924 break;
2925
Alexis Hetu17809052015-05-13 11:28:22 -04002926 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002927
2928 {
Alexis Hetub4769582015-06-16 12:19:50 -04002929 (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 -04002930 }
2931 break;
2932
Alexis Hetu17809052015-05-13 11:28:22 -04002933 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002934
2935 {
Alexis Hetub4769582015-06-16 12:19:50 -04002936 (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 -04002937 }
2938 break;
2939
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002940 case 55:
2941
Alexis Hetu17809052015-05-13 11:28:22 -04002942 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2943 break;
2944
2945 case 56:
2946
2947 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002948 ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002949 (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 -04002950 }
2951 break;
2952
2953 case 57:
2954
2955 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2956 break;
2957
2958 case 58:
2959
2960 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002961 ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002962 (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 -04002963 }
2964 break;
2965
2966 case 59:
2967
2968 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2969 break;
2970
2971 case 60:
2972
2973 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002974 ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002975 (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 -04002976 }
2977 break;
2978
2979 case 61:
2980
2981 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2982 break;
2983
2984 case 62:
2985
John Bauman66b8ab22014-05-06 15:57:45 -04002986 {
Alexis Hetub4769582015-06-16 12:19:50 -04002987 (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 -04002988 }
2989 break;
2990
Alexis Hetu17809052015-05-13 11:28:22 -04002991 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002992
2993 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2994 break;
2995
Alexis Hetu17809052015-05-13 11:28:22 -04002996 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002997
2998 {
Alexis Hetub4769582015-06-16 12:19:50 -04002999 (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 -04003000 }
3001 break;
3002
Alexis Hetu17809052015-05-13 11:28:22 -04003003 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04003004
3005 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3006 break;
3007
Alexis Hetu17809052015-05-13 11:28:22 -04003008 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04003009
3010 {
Alexis Hetub4769582015-06-16 12:19:50 -04003011 (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 -04003012 }
3013 break;
3014
Alexis Hetu17809052015-05-13 11:28:22 -04003015 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04003016
3017 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3018 break;
3019
Alexis Hetu17809052015-05-13 11:28:22 -04003020 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04003021
3022 {
Alexis Hetueee212e2015-07-07 17:13:30 -04003023 (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 -04003024 }
3025 break;
3026
Alexis Hetu17809052015-05-13 11:28:22 -04003027 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04003028
3029 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3030 break;
3031
Alexis Hetu17809052015-05-13 11:28:22 -04003032 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04003033
3034 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003035 if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003036 context->recover();
Alexis Hetue5246692015-06-18 12:34:52 -04003037 (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 -04003038 }
3039 break;
3040
Alexis Hetu17809052015-05-13 11:28:22 -04003041 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04003042
Alexis Hetu253fdd12015-07-07 15:12:46 -04003043 { (yyval.interm).op = EOpAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003044 break;
3045
Alexis Hetu17809052015-05-13 11:28:22 -04003046 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04003047
Alexis Hetu253fdd12015-07-07 15:12:46 -04003048 { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpMulAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003049 break;
3050
Alexis Hetu17809052015-05-13 11:28:22 -04003051 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04003052
Alexis Hetu253fdd12015-07-07 15:12:46 -04003053 { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpDivAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003054 break;
3055
Alexis Hetu17809052015-05-13 11:28:22 -04003056 case 74:
3057
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003058 { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003059 FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).op = EOpIModAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003060 break;
3061
3062 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04003063
Alexis Hetu253fdd12015-07-07 15:12:46 -04003064 { (yyval.interm).op = EOpAddAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003065 break;
3066
Alexis Hetu17809052015-05-13 11:28:22 -04003067 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04003068
Alexis Hetu253fdd12015-07-07 15:12:46 -04003069 { (yyval.interm).op = EOpSubAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003070 break;
3071
Alexis Hetu17809052015-05-13 11:28:22 -04003072 case 77:
3073
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003074 { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu253fdd12015-07-07 15:12:46 -04003075 FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)]));
3076 (yyval.interm).op = EOpBitShiftLeftAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003077 break;
3078
3079 case 78:
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 = EOpBitShiftRightAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003084 break;
3085
3086 case 79:
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 = EOpBitwiseAndAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003091 break;
3092
3093 case 80:
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 = EOpBitwiseXorAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003098 break;
3099
3100 case 81:
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 = EOpBitwiseOrAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003105 break;
3106
3107 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003108
3109 {
3110 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3111 }
3112 break;
3113
Alexis Hetu17809052015-05-13 11:28:22 -04003114 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003115
3116 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003117 (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 -04003118 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003119 context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003120 context->recover();
3121 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3122 }
3123 }
3124 break;
3125
Alexis Hetu17809052015-05-13 11:28:22 -04003126 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003127
3128 {
3129 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3130 context->recover();
3131 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3132 }
3133 break;
3134
Alexis Hetu17809052015-05-13 11:28:22 -04003135 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003136
3137 {
Alexis Hetue5246692015-06-18 12:34:52 -04003138 if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003139 context->recover();
3140 (yyval.lex) = (yyvsp[(1) - (2)].lex);
3141 }
3142 break;
3143
3144 case 86:
3145
3146 {
John Bauman66b8ab22014-05-06 15:57:45 -04003147 TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3148
3149 TIntermAggregate *prototype = new TIntermAggregate;
3150 prototype->setType(function.getReturnType());
3151 prototype->setName(function.getName());
3152
Alexis Hetu76a343a2015-06-04 17:21:22 -04003153 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003154 {
3155 const TParameter &param = function.getParam(i);
3156 if (param.name != 0)
3157 {
John Baumand4ae8632014-05-06 16:18:33 -04003158 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003159
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003160 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 -04003161 }
3162 else
3163 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003164 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003165 }
3166 }
3167
3168 prototype->setOp(EOpPrototype);
3169 (yyval.interm.intermNode) = prototype;
3170
3171 context->symbolTable.pop();
3172 }
3173 break;
3174
Alexis Hetua35d8232015-06-11 17:11:06 -04003175 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003176
3177 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003178 TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3179 if (aggNode && aggNode->getOp() == EOpNull)
3180 aggNode->setOp(EOpDeclaration);
3181 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003182 }
3183 break;
3184
Alexis Hetua35d8232015-06-11 17:11:06 -04003185 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003186
3187 {
John Baumand4ae8632014-05-06 16:18:33 -04003188 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003189 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 -04003190 context->recover();
3191 }
John Bauman66b8ab22014-05-06 15:57:45 -04003192 (yyval.interm.intermNode) = 0;
3193 }
3194 break;
3195
Alexis Hetua35d8232015-06-11 17:11:06 -04003196 case 89:
3197
3198 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003199 ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003200 (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 -04003201 }
3202 break;
3203
3204 case 90:
3205
3206 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003207 ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003208 (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 -04003209 }
3210 break;
3211
3212 case 91:
3213
3214 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003215 ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003216 (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 -04003217 }
3218 break;
3219
3220 case 92:
3221
3222 {
3223 context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3224 (yyval.interm.intermNode) = 0;
3225 }
3226 break;
3227
3228 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003229
3230 {
3231 //
3232 // Multiple declarations of the same function are allowed.
3233 //
3234 // If this is a definition, the definition production code will check for redefinitions
3235 // (we don't know at this point if it's a definition or not).
3236 //
3237 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3238 //
Alexis Hetu0a655842015-06-22 16:52:11 -04003239 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003240 if (prevDec) {
3241 if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003242 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 -04003243 context->recover();
3244 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003245 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04003246 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003247 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 -04003248 context->recover();
3249 }
3250 }
3251 }
3252
3253 //
3254 // If this is a redeclaration, it could also be a definition,
3255 // in which case, we want to use the variable names from this one, and not the one that's
3256 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3257 //
3258 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
John Bauman66b8ab22014-05-06 15:57:45 -04003259
3260 // We're at the inner scope level of the function's arguments and body statement.
3261 // Add the function prototype to the surrounding scope instead.
3262 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3263 }
3264 break;
3265
Alexis Hetua35d8232015-06-11 17:11:06 -04003266 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003267
3268 {
3269 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3270 }
3271 break;
3272
Alexis Hetua35d8232015-06-11 17:11:06 -04003273 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003274
3275 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003276 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3277 }
3278 break;
3279
Alexis Hetua35d8232015-06-11 17:11:06 -04003280 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003281
3282 {
John Bauman66b8ab22014-05-06 15:57:45 -04003283 // Add the parameter
3284 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3285 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3286 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3287 else
3288 delete (yyvsp[(2) - (2)].interm).param.type;
3289 }
3290 break;
3291
Alexis Hetua35d8232015-06-11 17:11:06 -04003292 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003293
3294 {
3295 //
3296 // Only first parameter of one-parameter functions can be void
3297 // The check for named parameters not being void is done in parameter_declarator
3298 //
3299 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3300 //
3301 // This parameter > first is void
3302 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003303 context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003304 context->recover();
3305 delete (yyvsp[(3) - (3)].interm).param.type;
3306 } else {
3307 // Add the parameter
3308 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3309 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3310 }
3311 }
3312 break;
3313
Alexis Hetua35d8232015-06-11 17:11:06 -04003314 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003315
3316 {
3317 if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003318 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 -04003319 context->recover();
3320 }
3321 // make sure a sampler is not involved as well...
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003322 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003323 context->recover();
3324
3325 // Add the function as a prototype after parsing it (we do not support recursion)
3326 TFunction *function;
3327 TType type((yyvsp[(1) - (3)].interm.type));
3328 function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3329 (yyval.interm.function) = function;
3330
3331 context->symbolTable.push();
3332 }
3333 break;
3334
Alexis Hetua35d8232015-06-11 17:11:06 -04003335 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003336
3337 {
3338 if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003339 context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003340 context->recover();
3341 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003342 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003343 context->recover();
3344 TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
John Bauman66b8ab22014-05-06 15:57:45 -04003345 (yyval.interm).param = param;
3346 }
3347 break;
3348
Alexis Hetua35d8232015-06-11 17:11:06 -04003349 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003350
3351 {
3352 // Check that we can make an array out of this type
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003353 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003354 context->recover();
3355
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003356 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003357 context->recover();
3358
3359 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003360 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003361 context->recover();
3362 (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3363
3364 TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3365 TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
John Bauman66b8ab22014-05-06 15:57:45 -04003366 (yyval.interm).param = param;
3367 }
3368 break;
3369
Alexis Hetu17809052015-05-13 11:28:22 -04003370 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003371
3372 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003373 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003374 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 -04003375 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003376 }
3377 break;
3378
Alexis Hetu17809052015-05-13 11:28:22 -04003379 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003380
3381 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003382 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003383 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003384 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003385 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003386 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003387 }
3388 break;
3389
Alexis Hetu17809052015-05-13 11:28:22 -04003390 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003391
3392 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003393 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003394 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 -04003395 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003396 }
3397 break;
3398
Alexis Hetu17809052015-05-13 11:28:22 -04003399 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003400
3401 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003402 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003403 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003404 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003405 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003406 context->recover();
3407 }
3408 break;
3409
3410 case 105:
3411
3412 {
3413 (yyval.interm.qualifier) = EvqIn;
3414 }
3415 break;
3416
3417 case 106:
3418
3419 {
3420 (yyval.interm.qualifier) = EvqIn;
3421 }
3422 break;
3423
3424 case 107:
3425
3426 {
3427 (yyval.interm.qualifier) = EvqOut;
3428 }
3429 break;
3430
3431 case 108:
3432
3433 {
3434 (yyval.interm.qualifier) = EvqInOut;
3435 }
3436 break;
3437
3438 case 109:
3439
3440 {
John Bauman66b8ab22014-05-06 15:57:45 -04003441 TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3442 (yyval.interm).param = param;
3443 }
3444 break;
3445
Alexis Hetua35d8232015-06-11 17:11:06 -04003446 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003447
3448 {
3449 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3450 }
3451 break;
3452
Alexis Hetua35d8232015-06-11 17:11:06 -04003453 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003454
3455 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003456 (yyval.interm) = (yyvsp[(1) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003457 (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 -04003458 }
3459 break;
3460
Alexis Hetua35d8232015-06-11 17:11:06 -04003461 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003462
3463 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003464 (yyval.interm) = (yyvsp[(1) - (6)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003465 (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 -04003466 }
3467 break;
3468
Alexis Hetua35d8232015-06-11 17:11:06 -04003469 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003470
3471 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003472 ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003473 (yyval.interm) = (yyvsp[(1) - (7)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003474 (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 -04003475 }
3476 break;
3477
Alexis Hetua35d8232015-06-11 17:11:06 -04003478 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003479
3480 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003481 ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003482 (yyval.interm) = (yyvsp[(1) - (8)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003483 (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 -04003484 }
3485 break;
3486
Alexis Hetua35d8232015-06-11 17:11:06 -04003487 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003488
3489 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003490 (yyval.interm) = (yyvsp[(1) - (5)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003491 (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 -04003492 }
3493 break;
3494
Alexis Hetua35d8232015-06-11 17:11:06 -04003495 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003496
3497 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003498 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003499 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003500 }
3501 break;
3502
Alexis Hetua35d8232015-06-11 17:11:06 -04003503 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003504
3505 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003506 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003507 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003508 }
3509 break;
3510
Alexis Hetua35d8232015-06-11 17:11:06 -04003511 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003512
3513 {
John Bauman66b8ab22014-05-06 15:57:45 -04003514 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003515 (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 -04003516 }
3517 break;
3518
Alexis Hetua35d8232015-06-11 17:11:06 -04003519 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003520
3521 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003522 ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003523 (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003524 (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 -04003525 }
3526 break;
3527
Alexis Hetua35d8232015-06-11 17:11:06 -04003528 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003529
3530 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003531 ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003532 (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003533 (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 -04003534 }
3535 break;
3536
Alexis Hetua35d8232015-06-11 17:11:06 -04003537 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003538
3539 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003540 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003541 (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 -04003542 }
3543 break;
3544
Alexis Hetua35d8232015-06-11 17:11:06 -04003545 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003546
3547 {
3548 // $$.type is not used in invariant declarations.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003549 (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 -04003550 }
3551 break;
3552
Alexis Hetua35d8232015-06-11 17:11:06 -04003553 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003554
3555 {
John Bauman66b8ab22014-05-06 15:57:45 -04003556 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3557
3558 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003559 ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003560 if (context->getShaderVersion() != 300) {
3561 (yyvsp[(1) - (1)].interm.type).clearArrayness();
3562 }
John Bauman66b8ab22014-05-06 15:57:45 -04003563 }
3564 }
3565 break;
3566
Alexis Hetua35d8232015-06-11 17:11:06 -04003567 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003568
3569 {
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003570 (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 -04003571 }
3572 break;
3573
Alexis Hetua35d8232015-06-11 17:11:06 -04003574 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003575
3576 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003577 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003578 }
3579 break;
3580
Alexis Hetua35d8232015-06-11 17:11:06 -04003581 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003582
3583 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003584 (yyval.interm.type).qualifier = EvqFlat;
3585 }
3586 break;
3587
Alexis Hetua35d8232015-06-11 17:11:06 -04003588 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003589
3590 {
3591 (yyval.interm.qualifier) = EvqConstReadOnly;
3592 }
3593 break;
3594
Alexis Hetua35d8232015-06-11 17:11:06 -04003595 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003596
3597 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003598 VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3599 ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3600 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003601 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003602 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003603 }
3604 break;
3605
Alexis Hetua35d8232015-06-11 17:11:06 -04003606 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003607
3608 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003609 ES2_ONLY("varying", (yylsp[(1) - (1)]));
3610 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003611 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003612 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003613 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003614 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003615 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003616 }
3617 break;
3618
Alexis Hetua35d8232015-06-11 17:11:06 -04003619 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003620
3621 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003622 ES2_ONLY("varying", (yylsp[(1) - (2)]));
3623 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003624 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003625 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003626 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003627 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003628 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003629 }
3630 break;
3631
Alexis Hetua35d8232015-06-11 17:11:06 -04003632 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003633
3634 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003635 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003636 }
3637 break;
3638
Alexis Hetua35d8232015-06-11 17:11:06 -04003639 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003640
3641 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003642 (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 -04003643 }
3644 break;
3645
Alexis Hetua35d8232015-06-11 17:11:06 -04003646 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003647
3648 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003649 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 -04003650 context->recover();
3651
3652 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003653 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003654 }
3655 break;
3656
Alexis Hetua35d8232015-06-11 17:11:06 -04003657 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003658
3659 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003660 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3661 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3662 }
3663 break;
3664
Alexis Hetua35d8232015-06-11 17:11:06 -04003665 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003666
3667 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003668 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003669 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3670 }
3671 break;
3672
Alexis Hetua35d8232015-06-11 17:11:06 -04003673 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003674
3675 {
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05003676 (yyval.interm.type).qualifier = EvqConstExpr;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003677 }
3678 break;
3679
Alexis Hetua35d8232015-06-11 17:11:06 -04003680 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003681
3682 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003683 ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003684 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003685 }
3686 break;
3687
Alexis Hetua35d8232015-06-11 17:11:06 -04003688 case 138:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003689
3690 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003691 ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003692 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003693 }
3694 break;
3695
Alexis Hetua35d8232015-06-11 17:11:06 -04003696 case 139:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003697
3698 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003699 ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003700 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003701 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003702 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 -04003703 context->recover();
3704 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003705 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003706 }
3707 break;
3708
Alexis Hetua35d8232015-06-11 17:11:06 -04003709 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003710
3711 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003712 ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003713 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003714 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003715 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 -04003716 context->recover();
3717 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003718 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003719 }
3720 break;
3721
Alexis Hetua35d8232015-06-11 17:11:06 -04003722 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003723
3724 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003725 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003726 context->recover();
3727 (yyval.interm.type).qualifier = EvqUniform;
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003728 }
3729 break;
3730
Alexis Hetua35d8232015-06-11 17:11:06 -04003731 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003732
3733 {
John Bauman66b8ab22014-05-06 15:57:45 -04003734 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3735
3736 if ((yyval.interm.type).precision == EbpUndefined) {
3737 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003738 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003739 context->recover();
3740 }
3741 }
3742 }
3743 break;
3744
Alexis Hetua35d8232015-06-11 17:11:06 -04003745 case 143:
John Bauman66b8ab22014-05-06 15:57:45 -04003746
3747 {
3748 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3749 (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
3750 }
3751 break;
3752
Alexis Hetua35d8232015-06-11 17:11:06 -04003753 case 144:
John Bauman66b8ab22014-05-06 15:57:45 -04003754
3755 {
3756 (yyval.interm.precision) = EbpHigh;
3757 }
3758 break;
3759
Alexis Hetua35d8232015-06-11 17:11:06 -04003760 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003761
3762 {
3763 (yyval.interm.precision) = EbpMedium;
3764 }
3765 break;
3766
Alexis Hetua35d8232015-06-11 17:11:06 -04003767 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003768
3769 {
3770 (yyval.interm.precision) = EbpLow;
3771 }
3772 break;
3773
Alexis Hetua35d8232015-06-11 17:11:06 -04003774 case 147:
Nicolas Capens7d626792015-02-17 17:58:31 -05003775
3776 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003777 ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
Nicolas Capens7d626792015-02-17 17:58:31 -05003778 (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
3779 }
3780 break;
3781
Alexis Hetua35d8232015-06-11 17:11:06 -04003782 case 148:
Nicolas Capens7d626792015-02-17 17:58:31 -05003783
3784 {
3785 (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
3786 }
3787 break;
3788
Alexis Hetua35d8232015-06-11 17:11:06 -04003789 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003790
3791 {
3792 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
3793 }
3794 break;
3795
Alexis Hetua35d8232015-06-11 17:11:06 -04003796 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003797
3798 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003799 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003800 }
3801 break;
3802
Alexis Hetua35d8232015-06-11 17:11:06 -04003803 case 151:
John Bauman66b8ab22014-05-06 15:57:45 -04003804
3805 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003806 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003807 }
3808 break;
3809
Alexis Hetua35d8232015-06-11 17:11:06 -04003810 case 152:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003811
3812 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003813 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (3)].lex).string, (yylsp[(1) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yyvsp[(3) - (3)].lex).i, (yylsp[(3) - (3)]));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003814 }
3815 break;
3816
Alexis Hetua35d8232015-06-11 17:11:06 -04003817 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003818
3819 {
John Bauman66b8ab22014-05-06 15:57:45 -04003820 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3821 }
3822 break;
3823
Alexis Hetua35d8232015-06-11 17:11:06 -04003824 case 154:
John Bauman66b8ab22014-05-06 15:57:45 -04003825
3826 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003827 ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array");
Alexis Hetue5246692015-06-18 12:34:52 -04003828 (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type);
3829 (yyval.interm.type).setArray(true, 0);
3830 }
3831 break;
3832
3833 case 155:
3834
3835 {
John Bauman66b8ab22014-05-06 15:57:45 -04003836 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3837
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003838 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003839 context->recover();
3840 else {
3841 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003842 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003843 context->recover();
3844 (yyval.interm.type).setArray(true, size);
3845 }
3846 }
3847 break;
3848
Alexis Hetue5246692015-06-18 12:34:52 -04003849 case 156:
Alexis Hetu17809052015-05-13 11:28:22 -04003850
3851 {
3852 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003853 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003854 }
3855 break;
3856
Alexis Hetu17809052015-05-13 11:28:22 -04003857 case 157:
3858
3859 {
3860 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003861 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003862 }
3863 break;
3864
3865 case 158:
3866
3867 {
3868 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003869 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003870 }
3871 break;
3872
3873 case 159:
3874
3875 {
3876 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003877 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003878 }
3879 break;
3880
3881 case 160:
3882
3883 {
3884 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003885 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003886 }
3887 break;
3888
3889 case 161:
3890
3891 {
3892 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003893 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003894 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003895 }
3896 break;
3897
3898 case 162:
3899
3900 {
3901 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003902 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003903 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003904 }
3905 break;
3906
3907 case 163:
3908
3909 {
3910 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003911 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3912 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003913 }
3914 break;
3915
3916 case 164:
3917
3918 {
3919 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003920 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003921 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003922 }
3923 break;
3924
3925 case 165:
3926
3927 {
3928 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003929 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003930 (yyval.interm.type).setAggregate(3);
Alexis Hetu17809052015-05-13 11:28:22 -04003931 }
3932 break;
3933
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003934 case 166:
3935
3936 {
3937 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003938 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3939 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003940 }
3941 break;
3942
3943 case 167:
3944
3945 {
3946 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003947 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003948 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003949 }
3950 break;
3951
3952 case 168:
3953
3954 {
3955 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003956 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003957 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003958 }
3959 break;
3960
3961 case 169:
3962
3963 {
3964 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003965 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3966 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003967 }
3968 break;
3969
3970 case 170:
3971
3972 {
3973 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003974 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003975 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003976 }
3977 break;
3978
3979 case 171:
3980
3981 {
3982 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003983 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003984 (yyval.interm.type).setAggregate(3);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003985 }
3986 break;
3987
Alexis Hetua35d8232015-06-11 17:11:06 -04003988 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003989
3990 {
Alexis Hetue5246692015-06-18 12:34:52 -04003991 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3992 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
3993 (yyval.interm.type).setAggregate(4);
3994 }
3995 break;
3996
3997 case 173:
3998
3999 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004000 FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004001 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004002 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004003 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04004004 }
4005 break;
4006
Alexis Hetue5246692015-06-18 12:34:52 -04004007 case 174:
John Bauman66b8ab22014-05-06 15:57:45 -04004008
4009 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004010 FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004011 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004012 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004013 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004014 }
4015 break;
4016
Alexis Hetue5246692015-06-18 12:34:52 -04004017 case 175:
John Bauman66b8ab22014-05-06 15:57:45 -04004018
4019 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004020 FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004021 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004022 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004023 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004024 }
4025 break;
4026
Alexis Hetue5246692015-06-18 12:34:52 -04004027 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004028
4029 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004030 FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004031 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004032 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004033 (yyval.interm.type).setMatrix(2, 3);
4034 }
4035 break;
4036
Alexis Hetue5246692015-06-18 12:34:52 -04004037 case 177:
Alexis Hetub14178b2015-04-13 13:23:20 -04004038
4039 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004040 FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004041 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004042 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004043 (yyval.interm.type).setMatrix(3, 2);
4044 }
4045 break;
4046
Alexis Hetue5246692015-06-18 12:34:52 -04004047 case 178:
Alexis Hetub14178b2015-04-13 13:23:20 -04004048
4049 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004050 FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004051 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004052 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004053 (yyval.interm.type).setMatrix(2, 4);
4054 }
4055 break;
4056
Alexis Hetue5246692015-06-18 12:34:52 -04004057 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004058
4059 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004060 FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004061 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004062 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004063 (yyval.interm.type).setMatrix(4, 2);
4064 }
4065 break;
4066
Alexis Hetue5246692015-06-18 12:34:52 -04004067 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004068
4069 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004070 FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004071 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004072 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004073 (yyval.interm.type).setMatrix(3, 4);
4074 }
4075 break;
4076
Alexis Hetue5246692015-06-18 12:34:52 -04004077 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004078
4079 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004080 FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004081 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004082 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004083 (yyval.interm.type).setMatrix(4, 3);
4084 }
4085 break;
4086
Alexis Hetue5246692015-06-18 12:34:52 -04004087 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004088
4089 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004090 FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004091 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004092 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004093 }
4094 break;
4095
Alexis Hetue5246692015-06-18 12:34:52 -04004096 case 183:
John Bauman66b8ab22014-05-06 15:57:45 -04004097
4098 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004099 FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004100 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004101 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004102 }
4103 break;
4104
Alexis Hetue5246692015-06-18 12:34:52 -04004105 case 184:
John Bauman66b8ab22014-05-06 15:57:45 -04004106
4107 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004108 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004109 context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004110 context->recover();
4111 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004112 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004113 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004114 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004115 }
4116 break;
4117
Alexis Hetue5246692015-06-18 12:34:52 -04004118 case 185:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004119
4120 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004121 FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004122 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004123 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004124 }
4125 break;
4126
Alexis Hetue5246692015-06-18 12:34:52 -04004127 case 186:
Alexis Hetub14178b2015-04-13 13:23:20 -04004128
4129 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004130 FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004131 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004132 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004133 }
4134 break;
4135
Alexis Hetue5246692015-06-18 12:34:52 -04004136 case 187:
Alexis Hetub14178b2015-04-13 13:23:20 -04004137
4138 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004139 FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004140 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004141 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004142 }
4143 break;
4144
Alexis Hetue5246692015-06-18 12:34:52 -04004145 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004146
4147 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004148 FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004149 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004150 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004151 }
4152 break;
4153
Alexis Hetue5246692015-06-18 12:34:52 -04004154 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004155
4156 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004157 FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004158 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004159 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004160 }
4161 break;
4162
Alexis Hetue5246692015-06-18 12:34:52 -04004163 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004164
4165 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004166 FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004167 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004168 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004169 }
4170 break;
4171
Alexis Hetue5246692015-06-18 12:34:52 -04004172 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004173
4174 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004175 FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004176 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004177 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004178 }
4179 break;
4180
Alexis Hetue5246692015-06-18 12:34:52 -04004181 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004182
4183 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004184 FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004185 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004186 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004187 }
4188 break;
4189
Alexis Hetue5246692015-06-18 12:34:52 -04004190 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004191
4192 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004193 FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004194 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004195 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004196 }
4197 break;
4198
Alexis Hetue5246692015-06-18 12:34:52 -04004199 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004200
4201 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004202 FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004203 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004204 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004205 }
4206 break;
4207
Alexis Hetue5246692015-06-18 12:34:52 -04004208 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004209
4210 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004211 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004212 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004213 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004214 }
4215 break;
4216
Alexis Hetue5246692015-06-18 12:34:52 -04004217 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004218
4219 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004220 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004221 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004222 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004223 }
4224 break;
4225
Alexis Hetue5246692015-06-18 12:34:52 -04004226 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004227
4228 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004229 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004230 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004231 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004232 }
4233 break;
4234
Alexis Hetue5246692015-06-18 12:34:52 -04004235 case 198:
Alexis Hetub027aa92015-01-19 15:56:12 -05004236
4237 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004238 FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004239 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4240 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4241 }
4242 break;
4243
Alexis Hetue5246692015-06-18 12:34:52 -04004244 case 199:
John Bauman66b8ab22014-05-06 15:57:45 -04004245
4246 {
4247 //
4248 // This is for user defined type names. The lexical phase looked up the
4249 // type.
4250 //
4251 TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4252 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004253 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004254 (yyval.interm.type).userDef = &structure;
4255 }
4256 break;
4257
Alexis Hetue5246692015-06-18 12:34:52 -04004258 case 200:
John Bauman66b8ab22014-05-06 15:57:45 -04004259
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004260 { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004261 break;
4262
Alexis Hetue5246692015-06-18 12:34:52 -04004263 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004264
4265 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004266 (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 -04004267 }
4268 break;
4269
Alexis Hetue5246692015-06-18 12:34:52 -04004270 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004271
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004272 { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004273 break;
4274
Alexis Hetue5246692015-06-18 12:34:52 -04004275 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004276
4277 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004278 (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004279 }
4280 break;
4281
Alexis Hetue5246692015-06-18 12:34:52 -04004282 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004283
4284 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004285 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004286 }
4287 break;
4288
Alexis Hetue5246692015-06-18 12:34:52 -04004289 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004290
4291 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004292 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4293 for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4294 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4295 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4296 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4297 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 -04004298 context->recover();
4299 }
4300 }
Alexis Hetua8b364b2015-06-10 11:48:40 -04004301 (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004302 }
4303 }
4304 break;
4305
Alexis Hetue5246692015-06-18 12:34:52 -04004306 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004307
4308 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004309 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004310 }
4311 break;
4312
Alexis Hetue5246692015-06-18 12:34:52 -04004313 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004314
4315 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004316 // ES3 Only, but errors should be handled elsewhere
4317 (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4318 (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4319 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4320 }
4321 break;
4322
Alexis Hetue5246692015-06-18 12:34:52 -04004323 case 208:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004324
4325 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004326 (yyval.interm.fieldList) = NewPoolTFieldList();
4327 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004328 }
4329 break;
4330
Alexis Hetue5246692015-06-18 12:34:52 -04004331 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004332
4333 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004334 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004335 }
4336 break;
4337
Alexis Hetue5246692015-06-18 12:34:52 -04004338 case 210:
John Bauman66b8ab22014-05-06 15:57:45 -04004339
4340 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004341 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004342 context->recover();
4343
Alexis Hetua8b364b2015-06-10 11:48:40 -04004344 TType* type = new TType(EbtVoid, EbpUndefined);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004345 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004346 }
4347 break;
4348
Alexis Hetue5246692015-06-18 12:34:52 -04004349 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004350
4351 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004352 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004353 context->recover();
4354
Alexis Hetua8b364b2015-06-10 11:48:40 -04004355 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004356 int size;
Alexis Hetua8b364b2015-06-10 11:48:40 -04004357 if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004358 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004359 type->setArraySize(size);
4360
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004361 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004362 }
4363 break;
4364
Alexis Hetue5246692015-06-18 12:34:52 -04004365 case 212:
Nicolas Capens7d626792015-02-17 17:58:31 -05004366
Alexis Hetua35d8232015-06-11 17:11:06 -04004367 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004368 break;
4369
Alexis Hetu17809052015-05-13 11:28:22 -04004370 case 213:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004371
Alexis Hetue5246692015-06-18 12:34:52 -04004372 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004373 break;
4374
Alexis Hetu17809052015-05-13 11:28:22 -04004375 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004376
Alexis Hetue5246692015-06-18 12:34:52 -04004377 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004378 break;
4379
Alexis Hetu17809052015-05-13 11:28:22 -04004380 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004381
Alexis Hetua35d8232015-06-11 17:11:06 -04004382 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetuad6b8752015-06-09 16:15:30 -04004383 break;
4384
4385 case 216:
4386
Alexis Hetua35d8232015-06-11 17:11:06 -04004387 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004388 break;
4389
4390 case 217:
4391
Alexis Hetua35d8232015-06-11 17:11:06 -04004392 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004393 break;
4394
4395 case 218:
4396
Alexis Hetue5246692015-06-18 12:34:52 -04004397 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004398 break;
4399
4400 case 219:
4401
Alexis Hetue5246692015-06-18 12:34:52 -04004402 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004403 break;
4404
4405 case 220:
4406
Alexis Hetue5246692015-06-18 12:34:52 -04004407 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004408 break;
4409
4410 case 221:
4411
Alexis Hetu76a343a2015-06-04 17:21:22 -04004412 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004413 break;
4414
4415 case 222:
4416
Alexis Hetue5246692015-06-18 12:34:52 -04004417 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004418 break;
4419
4420 case 223:
4421
Alexis Hetue5246692015-06-18 12:34:52 -04004422 { (yyval.interm.intermAggregate) = 0; }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004423 break;
4424
4425 case 224:
4426
Alexis Hetue5246692015-06-18 12:34:52 -04004427 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004428 break;
4429
4430 case 225:
4431
Alexis Hetue5246692015-06-18 12:34:52 -04004432 { context->symbolTable.pop(); }
4433 break;
4434
4435 case 226:
4436
Nicolas Capens7d626792015-02-17 17:58:31 -05004437 {
4438 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4439 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004440 (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004441 }
4442 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4443 }
4444 break;
4445
Alexis Hetua35d8232015-06-11 17:11:06 -04004446 case 227:
4447
Alexis Hetu76a343a2015-06-04 17:21:22 -04004448 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004449 break;
4450
4451 case 228:
4452
Alexis Hetue5246692015-06-18 12:34:52 -04004453 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004454 break;
4455
4456 case 229:
4457
Alexis Hetue5246692015-06-18 12:34:52 -04004458 { context->symbolTable.push(); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004459 break;
4460
4461 case 230:
4462
Alexis Hetue5246692015-06-18 12:34:52 -04004463 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004464 break;
4465
4466 case 231:
4467
Alexis Hetue5246692015-06-18 12:34:52 -04004468 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004469 break;
4470
4471 case 232:
4472
Alexis Hetue5246692015-06-18 12:34:52 -04004473 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4474 break;
4475
4476 case 233:
4477
John Bauman66b8ab22014-05-06 15:57:45 -04004478 {
4479 (yyval.interm.intermNode) = 0;
4480 }
4481 break;
4482
Alexis Hetue5246692015-06-18 12:34:52 -04004483 case 234:
John Bauman66b8ab22014-05-06 15:57:45 -04004484
4485 {
4486 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4487 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004488 (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004489 }
4490 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4491 }
4492 break;
4493
Alexis Hetue5246692015-06-18 12:34:52 -04004494 case 235:
John Bauman66b8ab22014-05-06 15:57:45 -04004495
4496 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004497 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004498 }
4499 break;
4500
Alexis Hetue5246692015-06-18 12:34:52 -04004501 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004502
4503 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004504 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
John Bauman66b8ab22014-05-06 15:57:45 -04004505 }
4506 break;
4507
Alexis Hetue5246692015-06-18 12:34:52 -04004508 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004509
4510 { (yyval.interm.intermNode) = 0; }
4511 break;
4512
Alexis Hetue5246692015-06-18 12:34:52 -04004513 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004514
4515 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4516 break;
4517
Alexis Hetue5246692015-06-18 12:34:52 -04004518 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004519
4520 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004521 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004522 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004523 (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 -04004524 }
4525 break;
4526
Alexis Hetue5246692015-06-18 12:34:52 -04004527 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004528
4529 {
4530 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4531 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4532 }
4533 break;
4534
Alexis Hetue5246692015-06-18 12:34:52 -04004535 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004536
4537 {
4538 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4539 (yyval.interm.nodePair).node2 = 0;
4540 }
4541 break;
4542
Alexis Hetu76a343a2015-06-04 17:21:22 -04004543 case 242:
4544
Alexis Hetue5246692015-06-18 12:34:52 -04004545 { context->incrSwitchNestingLevel(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004546 break;
4547
4548 case 243:
4549
4550 {
Alexis Hetue5246692015-06-18 12:34:52 -04004551 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)]));
4552 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004553 }
4554 break;
4555
4556 case 244:
4557
4558 {
Alexis Hetue5246692015-06-18 12:34:52 -04004559 (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004560 }
4561 break;
4562
4563 case 245:
John Bauman66b8ab22014-05-06 15:57:45 -04004564
4565 {
Alexis Hetue5246692015-06-18 12:34:52 -04004566 (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)]));
4567 }
4568 break;
4569
4570 case 246:
4571
4572 {
John Bauman66b8ab22014-05-06 15:57:45 -04004573 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4574 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4575 context->recover();
4576 }
4577 break;
4578
Alexis Hetue5246692015-06-18 12:34:52 -04004579 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004580
4581 {
4582 TIntermNode* intermNode;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004583 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004584 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004585 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004586 context->recover();
4587
Alexis Hetue5246692015-06-18 12:34:52 -04004588 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 -04004589 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4590 else {
4591 context->recover();
4592 (yyval.interm.intermTypedNode) = 0;
4593 }
4594 }
4595 break;
4596
Alexis Hetue5246692015-06-18 12:34:52 -04004597 case 248:
John Bauman66b8ab22014-05-06 15:57:45 -04004598
Alexis Hetu0a655842015-06-22 16:52:11 -04004599 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004600 break;
4601
Alexis Hetue5246692015-06-18 12:34:52 -04004602 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004603
4604 {
4605 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004606 (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 -04004607 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004608 }
4609 break;
4610
Alexis Hetue5246692015-06-18 12:34:52 -04004611 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004612
Alexis Hetu0a655842015-06-22 16:52:11 -04004613 { context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004614 break;
4615
Alexis Hetue5246692015-06-18 12:34:52 -04004616 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004617
4618 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004619 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004620 context->recover();
4621
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004622 (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 -04004623 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004624 }
4625 break;
4626
Alexis Hetu76a343a2015-06-04 17:21:22 -04004627 case 252:
Alexis Hetub027aa92015-01-19 15:56:12 -05004628
Alexis Hetu0a655842015-06-22 16:52:11 -04004629 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Nicolas Capens3c20f802015-02-17 17:17:20 -05004630 break;
4631
Alexis Hetu76a343a2015-06-04 17:21:22 -04004632 case 253:
Alexis Hetu17809052015-05-13 11:28:22 -04004633
4634 {
Alexis Hetue5246692015-06-18 12:34:52 -04004635 context->symbolTable.pop();
4636 (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 -04004637 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004638 }
4639 break;
4640
Alexis Hetu76a343a2015-06-04 17:21:22 -04004641 case 254:
Alexis Hetu17809052015-05-13 11:28:22 -04004642
4643 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004644 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetuad6b8752015-06-09 16:15:30 -04004645 }
4646 break;
4647
Alexis Hetu76a343a2015-06-04 17:21:22 -04004648 case 255:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004649
4650 {
Alexis Hetue5246692015-06-18 12:34:52 -04004651 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004652 }
4653 break;
4654
Alexis Hetu76a343a2015-06-04 17:21:22 -04004655 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004656
4657 {
Alexis Hetue5246692015-06-18 12:34:52 -04004658 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004659 }
4660 break;
4661
Alexis Hetu76a343a2015-06-04 17:21:22 -04004662 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004663
4664 {
Alexis Hetue5246692015-06-18 12:34:52 -04004665 (yyval.interm.intermTypedNode) = 0;
4666 }
4667 break;
4668
4669 case 258:
4670
4671 {
Alexis Hetu17809052015-05-13 11:28:22 -04004672 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4673 (yyval.interm.nodePair).node2 = 0;
4674 }
4675 break;
4676
Alexis Hetue5246692015-06-18 12:34:52 -04004677 case 259:
Alexis Hetu17809052015-05-13 11:28:22 -04004678
4679 {
4680 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4681 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4682 }
4683 break;
4684
Alexis Hetue5246692015-06-18 12:34:52 -04004685 case 260:
Alexis Hetu17809052015-05-13 11:28:22 -04004686
4687 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004688 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004689 }
4690 break;
4691
Alexis Hetue5246692015-06-18 12:34:52 -04004692 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004693
4694 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004695 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004696 }
4697 break;
4698
Alexis Hetue5246692015-06-18 12:34:52 -04004699 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004700
4701 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004702 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004703 }
4704 break;
4705
Alexis Hetue5246692015-06-18 12:34:52 -04004706 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004707
4708 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004709 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004710 }
4711 break;
4712
Alexis Hetue5246692015-06-18 12:34:52 -04004713 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004714
4715 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004716 FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4717 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004718 }
4719 break;
4720
Alexis Hetu76a343a2015-06-04 17:21:22 -04004721 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004722
4723 {
Alexis Hetue5246692015-06-18 12:34:52 -04004724 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004725 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004726 }
4727 break;
4728
Alexis Hetu76a343a2015-06-04 17:21:22 -04004729 case 266:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004730
4731 {
Alexis Hetu253fdd12015-07-07 15:12:46 -04004732 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
Alexis Hetu0a655842015-06-22 16:52:11 -04004733 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004734 }
4735 break;
4736
Alexis Hetu76a343a2015-06-04 17:21:22 -04004737 case 267:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004738
4739 {
4740 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4741 }
4742 break;
4743
Alexis Hetu76a343a2015-06-04 17:21:22 -04004744 case 268:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004745
4746 {
Alexis Hetue5246692015-06-18 12:34:52 -04004747 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4748 }
4749 break;
4750
4751 case 269:
4752
4753 {
John Bauman66b8ab22014-05-06 15:57:45 -04004754 TFunction* function = (yyvsp[(1) - (1)].interm).function;
4755
Alexis Hetu0a655842015-06-22 16:52:11 -04004756 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004757
4758 if (builtIn)
4759 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004760 context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004761 context->recover();
4762 }
4763
Alexis Hetu0a655842015-06-22 16:52:11 -04004764 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004765 //
4766 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4767 // as it would have just been put in the symbol table. Otherwise, we're looking up
4768 // an earlier occurance.
4769 //
4770 if (prevDec->isDefined()) {
4771 //
4772 // Then this function already has a body.
4773 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004774 context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004775 context->recover();
4776 }
4777 prevDec->setDefined();
4778
4779 //
4780 // Raise error message if main function takes any parameters or return anything other than void
4781 //
4782 if (function->getName() == "main") {
4783 if (function->getParamCount() > 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004784 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004785 context->recover();
4786 }
4787 if (function->getReturnType().getBasicType() != EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004788 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004789 context->recover();
4790 }
4791 }
4792
4793 //
4794 // Remember the return type for later checking for RETURN statements.
4795 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004796 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4797 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004798
4799 //
4800 // Insert parameters into the symbol table.
4801 // If the parameter has no name, it's not an error, just don't insert it
4802 // (could be used for unused args).
4803 //
4804 // Also, accumulate the list of parameters into the HIL, so lower level code
4805 // knows where to find parameters.
4806 //
4807 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004808 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004809 const TParameter& param = function->getParam(i);
4810 if (param.name != 0) {
4811 TVariable *variable = new TVariable(param.name, *param.type);
4812 //
4813 // Insert the parameters with name in the symbol table.
4814 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004815 if (! context->symbolTable.declare(*variable)) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004816 context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004817 context->recover();
4818 delete variable;
4819 }
4820
4821 //
4822 // Add the parameter to the HIL
4823 //
4824 paramNodes = context->intermediate.growAggregate(
4825 paramNodes,
4826 context->intermediate.addSymbol(variable->getUniqueId(),
4827 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004828 variable->getType(), (yylsp[(1) - (1)])),
4829 (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004830 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004831 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004832 }
4833 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004834 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004835 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004836 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004837 }
4838 break;
4839
Alexis Hetue5246692015-06-18 12:34:52 -04004840 case 270:
John Bauman66b8ab22014-05-06 15:57:45 -04004841
4842 {
4843 //?? Check that all paths return a value if return type != void ?
4844 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004845 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004846 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 -04004847 context->recover();
4848 }
4849
Alexis Hetu253fdd12015-07-07 15:12:46 -04004850 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), (yyloc));
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004851 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004852 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4853 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4854
4855 // store the pragma information for debug and optimize and other vendor specific
4856 // information. This information can be queried from the parse tree
4857 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4858 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4859
4860 if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
4861 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
4862
4863 context->symbolTable.pop();
4864 }
4865 break;
4866
4867
4868
4869 default: break;
4870 }
4871 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4872
4873 YYPOPSTACK (yylen);
4874 yylen = 0;
4875 YY_STACK_PRINT (yyss, yyssp);
4876
4877 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004878 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004879
4880 /* Now `shift' the result of the reduction. Determine what state
4881 that goes to, based on the state we popped back to and the rule
4882 number reduced by. */
4883
4884 yyn = yyr1[yyn];
4885
4886 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4887 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4888 yystate = yytable[yystate];
4889 else
4890 yystate = yydefgoto[yyn - YYNTOKENS];
4891
4892 goto yynewstate;
4893
4894
4895/*------------------------------------.
4896| yyerrlab -- here on detecting error |
4897`------------------------------------*/
4898yyerrlab:
4899 /* If not already recovering from an error, report this error. */
4900 if (!yyerrstatus)
4901 {
4902 ++yynerrs;
4903#if ! YYERROR_VERBOSE
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004904 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004905#else
4906 {
4907 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4908 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4909 {
4910 YYSIZE_T yyalloc = 2 * yysize;
4911 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4912 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4913 if (yymsg != yymsgbuf)
4914 YYSTACK_FREE (yymsg);
4915 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4916 if (yymsg)
4917 yymsg_alloc = yyalloc;
4918 else
4919 {
4920 yymsg = yymsgbuf;
4921 yymsg_alloc = sizeof yymsgbuf;
4922 }
4923 }
4924
4925 if (0 < yysize && yysize <= yymsg_alloc)
4926 {
4927 (void) yysyntax_error (yymsg, yystate, yychar);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004928 yyerror (&yylloc, context, yymsg);
John Bauman66b8ab22014-05-06 15:57:45 -04004929 }
4930 else
4931 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004932 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004933 if (yysize != 0)
4934 goto yyexhaustedlab;
4935 }
4936 }
4937#endif
4938 }
4939
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004940 yyerror_range[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004941
4942 if (yyerrstatus == 3)
4943 {
4944 /* If just tried and failed to reuse lookahead token after an
4945 error, discard it. */
4946
4947 if (yychar <= YYEOF)
4948 {
4949 /* Return failure if at end of input. */
4950 if (yychar == YYEOF)
4951 YYABORT;
4952 }
4953 else
4954 {
4955 yydestruct ("Error: discarding",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004956 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04004957 yychar = YYEMPTY;
4958 }
4959 }
4960
4961 /* Else will try to reuse lookahead token after shifting the error
4962 token. */
4963 goto yyerrlab1;
4964
4965
4966/*---------------------------------------------------.
4967| yyerrorlab -- error raised explicitly by YYERROR. |
4968`---------------------------------------------------*/
4969yyerrorlab:
4970
4971 /* Pacify compilers like GCC when the user code never invokes
4972 YYERROR and the label yyerrorlab therefore never appears in user
4973 code. */
4974 if (/*CONSTCOND*/ 0)
4975 goto yyerrorlab;
4976
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004977 yyerror_range[0] = yylsp[1-yylen];
John Bauman66b8ab22014-05-06 15:57:45 -04004978 /* Do not reclaim the symbols of the rule which action triggered
4979 this YYERROR. */
4980 YYPOPSTACK (yylen);
4981 yylen = 0;
4982 YY_STACK_PRINT (yyss, yyssp);
4983 yystate = *yyssp;
4984 goto yyerrlab1;
4985
4986
4987/*-------------------------------------------------------------.
4988| yyerrlab1 -- common code for both syntax error and YYERROR. |
4989`-------------------------------------------------------------*/
4990yyerrlab1:
4991 yyerrstatus = 3; /* Each real token shifted decrements this. */
4992
4993 for (;;)
4994 {
4995 yyn = yypact[yystate];
4996 if (yyn != YYPACT_NINF)
4997 {
4998 yyn += YYTERROR;
4999 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5000 {
5001 yyn = yytable[yyn];
5002 if (0 < yyn)
5003 break;
5004 }
5005 }
5006
5007 /* Pop the current state because it cannot handle the error token. */
5008 if (yyssp == yyss)
5009 YYABORT;
5010
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005011 yyerror_range[0] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005012 yydestruct ("Error: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005013 yystos[yystate], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005014 YYPOPSTACK (1);
5015 yystate = *yyssp;
5016 YY_STACK_PRINT (yyss, yyssp);
5017 }
5018
5019 *++yyvsp = yylval;
5020
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005021 yyerror_range[1] = yylloc;
5022 /* Using YYLLOC is tempting, but would change the location of
5023 the lookahead. YYLOC is available though. */
5024 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
5025 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005026
5027 /* Shift the error token. */
5028 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5029
5030 yystate = yyn;
5031 goto yynewstate;
5032
5033
5034/*-------------------------------------.
5035| yyacceptlab -- YYACCEPT comes here. |
5036`-------------------------------------*/
5037yyacceptlab:
5038 yyresult = 0;
5039 goto yyreturn;
5040
5041/*-----------------------------------.
5042| yyabortlab -- YYABORT comes here. |
5043`-----------------------------------*/
5044yyabortlab:
5045 yyresult = 1;
5046 goto yyreturn;
5047
5048#if !defined(yyoverflow) || YYERROR_VERBOSE
5049/*-------------------------------------------------.
5050| yyexhaustedlab -- memory exhaustion comes here. |
5051`-------------------------------------------------*/
5052yyexhaustedlab:
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005053 yyerror (&yylloc, context, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005054 yyresult = 2;
5055 /* Fall through. */
5056#endif
5057
5058yyreturn:
5059 if (yychar != YYEMPTY)
5060 yydestruct ("Cleanup: discarding lookahead",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005061 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005062 /* Do not reclaim the symbols of the rule which action triggered
5063 this YYABORT or YYACCEPT. */
5064 YYPOPSTACK (yylen);
5065 YY_STACK_PRINT (yyss, yyssp);
5066 while (yyssp != yyss)
5067 {
5068 yydestruct ("Cleanup: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005069 yystos[*yyssp], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005070 YYPOPSTACK (1);
5071 }
5072#ifndef yyoverflow
5073 if (yyss != yyssa)
5074 YYSTACK_FREE (yyss);
5075#endif
5076#if YYERROR_VERBOSE
5077 if (yymsg != yymsgbuf)
5078 YYSTACK_FREE (yymsg);
5079#endif
5080 /* Make sure YYID is used. */
5081 return YYID (yyresult);
5082}
5083
5084
5085
5086
5087
5088int glslang_parse(TParseContext* context) {
5089 return yyparse(context);
5090}
5091