blob: 64d47f8ae4283c78259eff1175ef0bdb595eb650 [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 {
269 TSourceLoc line;
270 union {
271 TString *string;
272 float f;
273 int i;
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500274 unsigned int u;
John Bauman66b8ab22014-05-06 15:57:45 -0400275 bool b;
276 };
277 TSymbol* symbol;
278 } lex;
279 struct {
280 TSourceLoc line;
281 TOperator op;
282 union {
283 TIntermNode* intermNode;
284 TIntermNodePair nodePair;
285 TIntermTyped* intermTypedNode;
286 TIntermAggregate* intermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -0400287 TIntermSwitch* intermSwitch;
288 TIntermCase* intermCase;
John Bauman66b8ab22014-05-06 15:57:45 -0400289 };
290 union {
291 TPublicType type;
292 TPrecision precision;
Nicolas Capens7d626792015-02-17 17:58:31 -0500293 TLayoutQualifier layoutQualifier;
John Bauman66b8ab22014-05-06 15:57:45 -0400294 TQualifier qualifier;
295 TFunction* function;
296 TParameter param;
Alexis Hetua8b364b2015-06-10 11:48:40 -0400297 TField* field;
298 TFieldList* fieldList;
John Bauman66b8ab22014-05-06 15:57:45 -0400299 };
300 } interm;
301
302
303
304} YYSTYPE;
305# define YYSTYPE_IS_TRIVIAL 1
306# define yystype YYSTYPE /* obsolescent; will be withdrawn */
307# define YYSTYPE_IS_DECLARED 1
308#endif
309
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400310#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
311typedef struct YYLTYPE
312{
313 int first_line;
314 int first_column;
315 int last_line;
316 int last_column;
317} YYLTYPE;
318# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
319# define YYLTYPE_IS_DECLARED 1
320# define YYLTYPE_IS_TRIVIAL 1
321#endif
322
John Bauman66b8ab22014-05-06 15:57:45 -0400323
324/* Copy the second part of user declarations. */
325
326
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400327extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
328extern void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason);
329
330#define YYLLOC_DEFAULT(Current, Rhs, N) do { (Current) = YYRHSLOC(Rhs, N ? 1 : 0); } while (0)
John Bauman66b8ab22014-05-06 15:57:45 -0400331
332#define FRAG_VERT_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400333 if (context->getShaderType() != GL_FRAGMENT_SHADER && \
334 context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400335 context->error(L, " supported in vertex/fragment shaders only ", S); \
336 context->recover(); \
337 } \
338}
339
340#define VERTEX_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400341 if (context->getShaderType() != GL_VERTEX_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400342 context->error(L, " supported in vertex shaders only ", S); \
343 context->recover(); \
344 } \
345}
346
347#define FRAG_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400348 if (context->getShaderType() != GL_FRAGMENT_SHADER) { \
John Bauman66b8ab22014-05-06 15:57:45 -0400349 context->error(L, " supported in fragment shaders only ", S); \
350 context->recover(); \
351 } \
352}
353
Nicolas Capensc6841852015-02-15 14:25:37 -0500354#define ES2_ONLY(S, L) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400355 if (context->getShaderVersion() != 100) { \
Nicolas Capensc6841852015-02-15 14:25:37 -0500356 context->error(L, " supported in GLSL ES 1.00 only ", S); \
357 context->recover(); \
358 } \
359}
360
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400361#define ES3_ONLY(TOKEN, LINE, REASON) { \
Alexis Hetu0a655842015-06-22 16:52:11 -0400362 if (context->getShaderVersion() != 300) { \
Alexis Hetu3e9e2082015-07-03 16:20:11 -0400363 context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN); \
Nicolas Capensc6841852015-02-15 14:25:37 -0500364 context->recover(); \
365 } \
366}
367
John Bauman66b8ab22014-05-06 15:57:45 -0400368
369
370#ifdef short
371# undef short
372#endif
373
374#ifdef YYTYPE_UINT8
375typedef YYTYPE_UINT8 yytype_uint8;
376#else
377typedef unsigned char yytype_uint8;
378#endif
379
380#ifdef YYTYPE_INT8
381typedef YYTYPE_INT8 yytype_int8;
382#elif (defined __STDC__ || defined __C99__FUNC__ \
383 || defined __cplusplus || defined _MSC_VER)
384typedef signed char yytype_int8;
385#else
386typedef short int yytype_int8;
387#endif
388
389#ifdef YYTYPE_UINT16
390typedef YYTYPE_UINT16 yytype_uint16;
391#else
392typedef unsigned short int yytype_uint16;
393#endif
394
395#ifdef YYTYPE_INT16
396typedef YYTYPE_INT16 yytype_int16;
397#else
398typedef short int yytype_int16;
399#endif
400
401#ifndef YYSIZE_T
402# ifdef __SIZE_TYPE__
403# define YYSIZE_T __SIZE_TYPE__
404# elif defined size_t
405# define YYSIZE_T size_t
406# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
407 || defined __cplusplus || defined _MSC_VER)
408# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
409# define YYSIZE_T size_t
410# else
411# define YYSIZE_T unsigned int
412# endif
413#endif
414
415#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
416
417#ifndef YY_
Nicolas Capense9c5e4f2014-05-28 22:46:43 -0400418# if YYENABLE_NLS
John Bauman66b8ab22014-05-06 15:57:45 -0400419# if ENABLE_NLS
420# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
421# define YY_(msgid) dgettext ("bison-runtime", msgid)
422# endif
423# endif
424# ifndef YY_
425# define YY_(msgid) msgid
426# endif
427#endif
428
429/* Suppress unused-variable warnings by "using" E. */
430#if ! defined lint || defined __GNUC__
431# define YYUSE(e) ((void) (e))
432#else
433# define YYUSE(e) /* empty */
434#endif
435
436/* Identity function, used to suppress warnings about constant conditions. */
437#ifndef lint
438# define YYID(n) (n)
439#else
440#if (defined __STDC__ || defined __C99__FUNC__ \
441 || defined __cplusplus || defined _MSC_VER)
442static int
443YYID (int yyi)
444#else
445static int
446YYID (yyi)
447 int yyi;
448#endif
449{
450 return yyi;
451}
452#endif
453
454#if ! defined yyoverflow || YYERROR_VERBOSE
455
456/* The parser invokes alloca or malloc; define the necessary symbols. */
457
458# ifdef YYSTACK_USE_ALLOCA
459# if YYSTACK_USE_ALLOCA
460# ifdef __GNUC__
461# define YYSTACK_ALLOC __builtin_alloca
462# elif defined __BUILTIN_VA_ARG_INCR
463# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
464# elif defined _AIX
465# define YYSTACK_ALLOC __alloca
466# elif defined _MSC_VER
467# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
468# define alloca _alloca
469# else
470# define YYSTACK_ALLOC alloca
471# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
472 || defined __cplusplus || defined _MSC_VER)
473# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
474# ifndef _STDLIB_H
475# define _STDLIB_H 1
476# endif
477# endif
478# endif
479# endif
480# endif
481
482# ifdef YYSTACK_ALLOC
483 /* Pacify GCC's `empty if-body' warning. */
484# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
485# ifndef YYSTACK_ALLOC_MAXIMUM
486 /* The OS might guarantee only one guard page at the bottom of the stack,
487 and a page size can be as small as 4096 bytes. So we cannot safely
488 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
489 to allow for a few compiler-allocated temporary stack slots. */
490# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
491# endif
492# else
493# define YYSTACK_ALLOC YYMALLOC
494# define YYSTACK_FREE YYFREE
495# ifndef YYSTACK_ALLOC_MAXIMUM
496# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
497# endif
498# if (defined __cplusplus && ! defined _STDLIB_H \
499 && ! ((defined YYMALLOC || defined malloc) \
500 && (defined YYFREE || defined free)))
501# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
502# ifndef _STDLIB_H
503# define _STDLIB_H 1
504# endif
505# endif
506# ifndef YYMALLOC
507# define YYMALLOC malloc
508# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
509 || defined __cplusplus || defined _MSC_VER)
510void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
511# endif
512# endif
513# ifndef YYFREE
514# define YYFREE free
515# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
516 || defined __cplusplus || defined _MSC_VER)
517void free (void *); /* INFRINGES ON USER NAME SPACE */
518# endif
519# endif
520# endif
521#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
522
523
524#if (! defined yyoverflow \
525 && (! defined __cplusplus \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400526 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
527 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
John Bauman66b8ab22014-05-06 15:57:45 -0400528
529/* A type that is properly aligned for any stack member. */
530union yyalloc
531{
532 yytype_int16 yyss_alloc;
533 YYSTYPE yyvs_alloc;
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400534 YYLTYPE yyls_alloc;
John Bauman66b8ab22014-05-06 15:57:45 -0400535};
536
537/* The size of the maximum gap between one aligned stack and the next. */
538# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
539
540/* The size of an array large to enough to hold all stacks, each with
541 N elements. */
542# define YYSTACK_BYTES(N) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -0400543 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
544 + 2 * YYSTACK_GAP_MAXIMUM)
John Bauman66b8ab22014-05-06 15:57:45 -0400545
546/* Copy COUNT objects from FROM to TO. The source and destination do
547 not overlap. */
548# ifndef YYCOPY
549# if defined __GNUC__ && 1 < __GNUC__
550# define YYCOPY(To, From, Count) \
551 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
552# else
553# define YYCOPY(To, From, Count) \
554 do \
555 { \
556 YYSIZE_T yyi; \
557 for (yyi = 0; yyi < (Count); yyi++) \
558 (To)[yyi] = (From)[yyi]; \
559 } \
560 while (YYID (0))
561# endif
562# endif
563
564/* Relocate STACK from its old location to the new one. The
565 local variables YYSIZE and YYSTACKSIZE give the old and new number of
566 elements in the stack, and YYPTR gives the new location of the
567 stack. Advance YYPTR to a properly aligned location for the next
568 stack. */
569# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
570 do \
571 { \
572 YYSIZE_T yynewbytes; \
573 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
574 Stack = &yyptr->Stack_alloc; \
575 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
576 yyptr += yynewbytes / sizeof (*yyptr); \
577 } \
578 while (YYID (0))
579
580#endif
581
582/* YYFINAL -- State number of the termination state. */
Alexis Hetua35d8232015-06-11 17:11:06 -0400583#define YYFINAL 110
John Bauman66b8ab22014-05-06 15:57:45 -0400584/* YYLAST -- Last index in YYTABLE. */
Alexis Hetue5246692015-06-18 12:34:52 -0400585#define YYLAST 2519
John Bauman66b8ab22014-05-06 15:57:45 -0400586
587/* YYNTOKENS -- Number of terminals. */
Alexis Hetub14178b2015-04-13 13:23:20 -0400588#define YYNTOKENS 128
John Bauman66b8ab22014-05-06 15:57:45 -0400589/* YYNNTS -- Number of nonterminals. */
Alexis Hetu76a343a2015-06-04 17:21:22 -0400590#define YYNNTS 93
John Bauman66b8ab22014-05-06 15:57:45 -0400591/* YYNRULES -- Number of rules. */
Alexis Hetue5246692015-06-18 12:34:52 -0400592#define YYNRULES 270
John Bauman66b8ab22014-05-06 15:57:45 -0400593/* YYNRULES -- Number of states. */
Alexis Hetue5246692015-06-18 12:34:52 -0400594#define YYNSTATES 410
John Bauman66b8ab22014-05-06 15:57:45 -0400595
596/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
597#define YYUNDEFTOK 2
Alexis Hetub14178b2015-04-13 13:23:20 -0400598#define YYMAXUTOK 382
John Bauman66b8ab22014-05-06 15:57:45 -0400599
600#define YYTRANSLATE(YYX) \
601 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
602
603/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
604static const yytype_uint8 yytranslate[] =
605{
606 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
632 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
633 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
634 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
635 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
636 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
637 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
638 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
639 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
Alexis Hetub027aa92015-01-19 15:56:12 -0500640 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
Nicolas Capens3c20f802015-02-17 17:17:20 -0500641 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
Alexis Hetub14178b2015-04-13 13:23:20 -0400642 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
643 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
644 125, 126, 127
John Bauman66b8ab22014-05-06 15:57:45 -0400645};
646
647#if YYDEBUG
648/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
649 YYRHS. */
650static const yytype_uint16 yyprhs[] =
651{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500652 0, 0, 3, 5, 7, 9, 11, 13, 15, 19,
653 21, 26, 28, 32, 35, 38, 40, 42, 44, 48,
654 51, 54, 57, 59, 62, 66, 69, 71, 73, 75,
Alexis Hetu17809052015-05-13 11:28:22 -0400655 77, 80, 83, 86, 88, 90, 92, 94, 96, 100,
656 104, 108, 110, 114, 118, 120, 124, 128, 130, 134,
657 138, 142, 146, 148, 152, 156, 158, 162, 164, 168,
658 170, 174, 176, 180, 182, 186, 188, 192, 194, 200,
659 202, 206, 208, 210, 212, 214, 216, 218, 220, 222,
Alexis Hetua35d8232015-06-11 17:11:06 -0400660 224, 226, 228, 230, 234, 236, 239, 242, 245, 250,
661 256, 263, 273, 276, 279, 281, 283, 286, 290, 294,
662 297, 303, 307, 310, 314, 317, 318, 320, 322, 324,
663 326, 328, 332, 339, 347, 356, 362, 364, 367, 373,
664 380, 388, 393, 396, 398, 401, 403, 405, 407, 409,
665 411, 414, 416, 419, 421, 423, 426, 428, 430, 432,
666 435, 438, 440, 442, 445, 447, 449, 451, 456, 458,
Alexis Hetue5246692015-06-18 12:34:52 -0400667 462, 464, 468, 472, 474, 478, 483, 485, 487, 489,
668 491, 493, 495, 497, 499, 501, 503, 505, 507, 509,
669 511, 513, 515, 517, 519, 521, 523, 525, 527, 529,
670 531, 533, 535, 537, 539, 541, 543, 545, 547, 549,
671 551, 553, 555, 557, 559, 561, 563, 565, 567, 569,
672 571, 572, 579, 580, 586, 588, 591, 595, 600, 602,
673 606, 608, 613, 615, 617, 619, 621, 623, 625, 627,
674 629, 631, 633, 635, 638, 639, 640, 646, 648, 650,
675 651, 654, 655, 658, 661, 665, 667, 670, 672, 675,
676 681, 685, 687, 688, 695, 699, 702, 704, 709, 710,
677 717, 718, 727, 728, 736, 738, 740, 742, 743, 746,
678 750, 753, 756, 759, 763, 766, 768, 771, 773, 775,
679 776
John Bauman66b8ab22014-05-06 15:57:45 -0400680};
681
682/* YYRHS -- A `-1'-separated list of the rules' RHS. */
683static const yytype_int16 yyrhs[] =
684{
Alexis Hetu76a343a2015-06-04 17:21:22 -0400685 217, 0, -1, 76, -1, 129, -1, 79, -1, 80,
Alexis Hetub14178b2015-04-13 13:23:20 -0400686 -1, 78, -1, 81, -1, 104, 156, 105, -1, 130,
687 -1, 131, 106, 132, 107, -1, 133, -1, 131, 110,
688 82, -1, 131, 85, -1, 131, 86, -1, 156, -1,
689 134, -1, 135, -1, 131, 110, 135, -1, 137, 105,
690 -1, 136, 105, -1, 138, 55, -1, 138, -1, 138,
Alexis Hetue5246692015-06-18 12:34:52 -0400691 154, -1, 137, 111, 154, -1, 139, 104, -1, 180,
Alexis Hetub14178b2015-04-13 13:23:20 -0400692 -1, 76, -1, 82, -1, 131, -1, 85, 140, -1,
693 86, 140, -1, 141, 140, -1, 118, -1, 116, -1,
Alexis Hetu17809052015-05-13 11:28:22 -0400694 115, -1, 117, -1, 140, -1, 142, 119, 140, -1,
695 142, 120, 140, -1, 142, 121, 140, -1, 142, -1,
696 143, 118, 142, -1, 143, 116, 142, -1, 143, -1,
697 144, 83, 143, -1, 144, 84, 143, -1, 144, -1,
698 145, 122, 144, -1, 145, 123, 144, -1, 145, 87,
699 144, -1, 145, 88, 144, -1, 145, -1, 146, 89,
700 145, -1, 146, 90, 145, -1, 146, -1, 147, 126,
701 146, -1, 147, -1, 148, 125, 147, -1, 148, -1,
702 149, 124, 148, -1, 149, -1, 150, 91, 149, -1,
703 150, -1, 151, 93, 150, -1, 151, -1, 152, 92,
704 151, -1, 152, -1, 152, 127, 156, 112, 154, -1,
705 153, -1, 140, 155, 154, -1, 113, -1, 94, -1,
706 95, -1, 97, -1, 96, -1, 103, -1, 98, -1,
707 99, -1, 100, -1, 101, -1, 102, -1, 154, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400708 156, 111, 154, -1, 153, -1, 76, 108, -1, 160,
709 114, -1, 168, 114, -1, 7, 176, 180, 114, -1,
710 173, 158, 185, 109, 114, -1, 173, 158, 185, 109,
711 76, 114, -1, 173, 158, 185, 109, 76, 106, 157,
712 107, 114, -1, 173, 114, -1, 161, 105, -1, 163,
713 -1, 162, -1, 163, 165, -1, 162, 111, 165, -1,
714 170, 76, 104, -1, 175, 76, -1, 175, 76, 106,
715 157, 107, -1, 172, 166, 164, -1, 166, 164, -1,
716 172, 166, 167, -1, 166, 167, -1, -1, 40, -1,
717 41, -1, 42, -1, 175, -1, 169, -1, 168, 111,
718 76, -1, 168, 111, 76, 106, 157, 107, -1, 168,
719 111, 76, 106, 107, 113, 189, -1, 168, 111, 76,
720 106, 157, 107, 113, 189, -1, 168, 111, 76, 113,
721 189, -1, 170, -1, 170, 76, -1, 170, 76, 106,
722 157, 107, -1, 170, 76, 106, 107, 113, 189, -1,
723 170, 76, 106, 157, 107, 113, 189, -1, 170, 76,
724 113, 189, -1, 3, 76, -1, 175, -1, 173, 175,
725 -1, 53, -1, 52, -1, 9, -1, 8, -1, 44,
726 -1, 3, 44, -1, 174, -1, 171, 174, -1, 171,
727 -1, 177, -1, 177, 174, -1, 9, -1, 40, -1,
728 41, -1, 51, 40, -1, 51, 41, -1, 43, -1,
729 180, -1, 176, 180, -1, 4, -1, 5, -1, 6,
730 -1, 75, 104, 178, 105, -1, 179, -1, 178, 111,
731 179, -1, 76, -1, 76, 113, 79, -1, 76, 113,
Alexis Hetue5246692015-06-18 12:34:52 -0400732 80, -1, 181, -1, 181, 106, 107, -1, 181, 106,
733 157, 107, -1, 55, -1, 11, -1, 12, -1, 13,
734 -1, 10, -1, 31, -1, 32, -1, 33, -1, 25,
735 -1, 26, -1, 27, -1, 28, -1, 29, -1, 30,
736 -1, 34, -1, 35, -1, 36, -1, 37, -1, 38,
737 -1, 39, -1, 45, -1, 46, -1, 47, -1, 48,
738 -1, 49, -1, 50, -1, 57, -1, 58, -1, 59,
739 -1, 70, -1, 61, -1, 62, -1, 63, -1, 64,
740 -1, 65, -1, 66, -1, 67, -1, 68, -1, 69,
741 -1, 72, -1, 73, -1, 74, -1, 182, -1, 77,
742 -1, -1, 54, 76, 108, 183, 185, 109, -1, -1,
743 54, 108, 184, 185, 109, -1, 186, -1, 185, 186,
744 -1, 175, 187, 114, -1, 173, 175, 187, 114, -1,
745 188, -1, 187, 111, 188, -1, 76, -1, 76, 106,
746 157, 107, -1, 154, -1, 159, -1, 193, -1, 192,
747 -1, 190, -1, 202, -1, 203, -1, 205, -1, 207,
748 -1, 209, -1, 216, -1, 108, 109, -1, -1, -1,
749 108, 194, 201, 195, 109, -1, 200, -1, 192, -1,
750 -1, 198, 200, -1, -1, 199, 192, -1, 108, 109,
751 -1, 108, 201, 109, -1, 191, -1, 201, 191, -1,
752 114, -1, 156, 114, -1, 19, 104, 156, 105, 204,
753 -1, 197, 17, 197, -1, 197, -1, -1, 22, 104,
754 156, 105, 206, 193, -1, 23, 157, 112, -1, 24,
755 112, -1, 156, -1, 170, 76, 113, 189, -1, -1,
756 56, 104, 210, 208, 105, 196, -1, -1, 16, 211,
757 197, 56, 104, 156, 105, 114, -1, -1, 18, 104,
758 212, 213, 215, 105, 196, -1, 202, -1, 190, -1,
759 208, -1, -1, 214, 114, -1, 214, 114, 156, -1,
760 15, 114, -1, 14, 114, -1, 21, 114, -1, 21,
761 156, 114, -1, 20, 114, -1, 218, -1, 217, 218,
762 -1, 219, -1, 159, -1, -1, 160, 220, 200, -1
John Bauman66b8ab22014-05-06 15:57:45 -0400763};
764
765/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
766static const yytype_uint16 yyrline[] =
767{
Alexis Hetu76079bc2015-07-08 08:29:36 -0400768 0, 202, 202, 221, 224, 229, 234, 239, 244, 250,
769 253, 256, 259, 262, 265, 271, 279, 290, 293, 301,
770 305, 312, 316, 323, 329, 338, 346, 352, 359, 369,
771 372, 382, 392, 414, 415, 416, 417, 425, 426, 430,
772 434, 442, 443, 446, 452, 453, 457, 464, 465, 468,
773 471, 474, 480, 481, 484, 490, 491, 498, 499, 506,
774 507, 514, 515, 521, 522, 528, 529, 535, 536, 542,
775 543, 551, 552, 553, 554, 556, 557, 558, 560, 562,
776 564, 566, 571, 574, 585, 593, 601, 628, 634, 641,
777 645, 649, 653, 660, 698, 701, 708, 716, 737, 758,
778 769, 798, 803, 813, 818, 828, 831, 834, 837, 843,
779 850, 853, 857, 861, 866, 871, 878, 882, 886, 890,
780 895, 900, 904, 911, 921, 927, 930, 936, 942, 949,
781 958, 967, 970, 973, 980, 984, 991, 995, 1000, 1005,
782 1015, 1025, 1034, 1044, 1051, 1054, 1057, 1063, 1070, 1073,
783 1079, 1082, 1085, 1091, 1094, 1099, 1114, 1118, 1122, 1126,
784 1130, 1134, 1139, 1144, 1149, 1154, 1159, 1164, 1169, 1174,
785 1179, 1184, 1189, 1194, 1200, 1206, 1212, 1218, 1224, 1230,
786 1236, 1242, 1248, 1253, 1258, 1267, 1272, 1277, 1282, 1287,
787 1292, 1297, 1302, 1307, 1312, 1317, 1322, 1327, 1332, 1337,
788 1350, 1350, 1353, 1353, 1359, 1362, 1378, 1381, 1390, 1394,
789 1400, 1407, 1422, 1426, 1430, 1431, 1437, 1438, 1439, 1440,
790 1441, 1442, 1443, 1447, 1448, 1448, 1448, 1458, 1459, 1463,
791 1463, 1464, 1464, 1469, 1472, 1482, 1485, 1491, 1492, 1496,
792 1504, 1508, 1515, 1515, 1522, 1525, 1534, 1539, 1556, 1556,
793 1561, 1561, 1568, 1568, 1576, 1579, 1585, 1588, 1594, 1598,
794 1605, 1608, 1611, 1614, 1617, 1626, 1630, 1637, 1640, 1646,
795 1646
John Bauman66b8ab22014-05-06 15:57:45 -0400796};
797#endif
798
799#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
800/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
801 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
802static const char *const yytname[] =
803{
804 "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
805 "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
Nicolas Capens3c20f802015-02-17 17:17:20 -0500806 "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
807 "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
808 "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
Nicolas Capense4b1b1d2015-02-17 17:26:01 -0500809 "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
810 "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
Alexis Hetub14178b2015-04-13 13:23:20 -0400811 "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
812 "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
813 "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
814 "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
815 "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
816 "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
817 "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
818 "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
819 "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
820 "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
821 "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
822 "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
823 "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500824 "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
825 "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
826 "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
827 "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
828 "primary_expression", "postfix_expression", "integer_expression",
829 "function_call", "function_call_or_method", "function_call_generic",
John Bauman66b8ab22014-05-06 15:57:45 -0400830 "function_call_header_no_parameters",
831 "function_call_header_with_parameters", "function_call_header",
832 "function_identifier", "unary_expression", "unary_operator",
833 "multiplicative_expression", "additive_expression", "shift_expression",
834 "relational_expression", "equality_expression", "and_expression",
835 "exclusive_or_expression", "inclusive_or_expression",
836 "logical_and_expression", "logical_xor_expression",
837 "logical_or_expression", "conditional_expression",
838 "assignment_expression", "assignment_operator", "expression",
Alexis Hetua35d8232015-06-11 17:11:06 -0400839 "constant_expression", "enter_struct", "declaration",
840 "function_prototype", "function_declarator",
841 "function_header_with_parameters", "function_header",
842 "parameter_declarator", "parameter_declaration", "parameter_qualifier",
843 "parameter_type_specifier", "init_declarator_list", "single_declaration",
844 "fully_specified_type", "interpolation_qualifier",
845 "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
846 "type_specifier", "precision_qualifier", "layout_qualifier",
847 "layout_qualifier_id_list", "layout_qualifier_id",
Nicolas Capens7d626792015-02-17 17:58:31 -0500848 "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
849 "$@1", "$@2", "struct_declaration_list", "struct_declaration",
John Bauman66b8ab22014-05-06 15:57:45 -0400850 "struct_declarator_list", "struct_declarator", "initializer",
851 "declaration_statement", "statement", "simple_statement",
852 "compound_statement", "$@3", "$@4", "statement_no_new_scope",
853 "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
854 "statement_list", "expression_statement", "selection_statement",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400855 "selection_rest_statement", "switch_statement", "$@7", "case_label",
856 "condition", "iteration_statement", "$@8", "$@9", "$@10",
857 "for_init_statement", "conditionopt", "for_rest_statement",
John Bauman66b8ab22014-05-06 15:57:45 -0400858 "jump_statement", "translation_unit", "external_declaration",
Alexis Hetu76a343a2015-06-04 17:21:22 -0400859 "function_definition", "$@11", 0
John Bauman66b8ab22014-05-06 15:57:45 -0400860};
861#endif
862
863# ifdef YYPRINT
864/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
865 token YYLEX-NUM. */
866static const yytype_uint16 yytoknum[] =
867{
868 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
869 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
870 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
871 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
872 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
873 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
874 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
875 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
876 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
Nicolas Capensc6841852015-02-15 14:25:37 -0500877 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
Nicolas Capens7d626792015-02-17 17:58:31 -0500878 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
Alexis Hetub14178b2015-04-13 13:23:20 -0400879 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
880 375, 376, 377, 378, 379, 380, 381, 382
John Bauman66b8ab22014-05-06 15:57:45 -0400881};
882# endif
883
884/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
885static const yytype_uint8 yyr1[] =
886{
Alexis Hetub14178b2015-04-13 13:23:20 -0400887 0, 128, 129, 130, 130, 130, 130, 130, 130, 131,
888 131, 131, 131, 131, 131, 132, 133, 134, 134, 135,
889 135, 136, 136, 137, 137, 138, 139, 139, 139, 140,
Alexis Hetu17809052015-05-13 11:28:22 -0400890 140, 140, 140, 141, 141, 141, 141, 142, 142, 142,
891 142, 143, 143, 143, 144, 144, 144, 145, 145, 145,
892 145, 145, 146, 146, 146, 147, 147, 148, 148, 149,
893 149, 150, 150, 151, 151, 152, 152, 153, 153, 154,
894 154, 155, 155, 155, 155, 155, 155, 155, 155, 155,
Alexis Hetua35d8232015-06-11 17:11:06 -0400895 155, 155, 156, 156, 157, 158, 159, 159, 159, 159,
896 159, 159, 159, 160, 161, 161, 162, 162, 163, 164,
897 164, 165, 165, 165, 165, 166, 166, 166, 166, 167,
898 168, 168, 168, 168, 168, 168, 169, 169, 169, 169,
899 169, 169, 169, 170, 170, 171, 171, 172, 173, 173,
900 173, 173, 173, 173, 173, 173, 174, 174, 174, 174,
901 174, 174, 175, 175, 176, 176, 176, 177, 178, 178,
Alexis Hetue5246692015-06-18 12:34:52 -0400902 179, 179, 179, 180, 180, 180, 181, 181, 181, 181,
Alexis Hetua35d8232015-06-11 17:11:06 -0400903 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
904 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
905 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
Alexis Hetue5246692015-06-18 12:34:52 -0400906 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
907 183, 182, 184, 182, 185, 185, 186, 186, 187, 187,
908 188, 188, 189, 190, 191, 191, 192, 192, 192, 192,
909 192, 192, 192, 193, 194, 195, 193, 196, 196, 198,
910 197, 199, 197, 200, 200, 201, 201, 202, 202, 203,
911 204, 204, 206, 205, 207, 207, 208, 208, 210, 209,
912 211, 209, 212, 209, 213, 213, 214, 214, 215, 215,
913 216, 216, 216, 216, 216, 217, 217, 218, 218, 220,
914 219
John Bauman66b8ab22014-05-06 15:57:45 -0400915};
916
917/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
918static const yytype_uint8 yyr2[] =
919{
Nicolas Capens2c1239f2015-02-17 17:30:04 -0500920 0, 2, 1, 1, 1, 1, 1, 1, 3, 1,
921 4, 1, 3, 2, 2, 1, 1, 1, 3, 2,
922 2, 2, 1, 2, 3, 2, 1, 1, 1, 1,
Alexis Hetu17809052015-05-13 11:28:22 -0400923 2, 2, 2, 1, 1, 1, 1, 1, 3, 3,
924 3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
925 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
926 3, 1, 3, 1, 3, 1, 3, 1, 5, 1,
927 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetua35d8232015-06-11 17:11:06 -0400928 1, 1, 1, 3, 1, 2, 2, 2, 4, 5,
929 6, 9, 2, 2, 1, 1, 2, 3, 3, 2,
930 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
931 1, 3, 6, 7, 8, 5, 1, 2, 5, 6,
932 7, 4, 2, 1, 2, 1, 1, 1, 1, 1,
933 2, 1, 2, 1, 1, 2, 1, 1, 1, 2,
934 2, 1, 1, 2, 1, 1, 1, 4, 1, 3,
Alexis Hetue5246692015-06-18 12:34:52 -0400935 1, 3, 3, 1, 3, 4, 1, 1, 1, 1,
John Bauman66b8ab22014-05-06 15:57:45 -0400936 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetub14178b2015-04-13 13:23:20 -0400937 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
938 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Alexis Hetue5246692015-06-18 12:34:52 -0400939 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
940 0, 6, 0, 5, 1, 2, 3, 4, 1, 3,
941 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
942 1, 1, 1, 2, 0, 0, 5, 1, 1, 0,
943 2, 0, 2, 2, 3, 1, 2, 1, 2, 5,
944 3, 1, 0, 6, 3, 2, 1, 4, 0, 6,
945 0, 8, 0, 7, 1, 1, 1, 0, 2, 3,
946 2, 2, 2, 3, 2, 1, 2, 1, 1, 0,
947 3
John Bauman66b8ab22014-05-06 15:57:45 -0400948};
949
950/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
951 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
952 means the default is an error. */
Alexis Hetuad6b8752015-06-09 16:15:30 -0400953static const yytype_uint16 yydefact[] =
John Bauman66b8ab22014-05-06 15:57:45 -0400954{
Alexis Hetue5246692015-06-18 12:34:52 -0400955 0, 0, 144, 145, 146, 0, 128, 136, 160, 157,
956 158, 159, 164, 165, 166, 167, 168, 169, 161, 162,
957 163, 170, 171, 172, 173, 174, 175, 137, 138, 141,
958 129, 176, 177, 178, 179, 180, 181, 0, 126, 125,
959 0, 156, 182, 183, 184, 186, 187, 188, 189, 190,
960 191, 192, 193, 194, 185, 195, 196, 197, 0, 199,
961 268, 269, 0, 95, 105, 0, 110, 116, 133, 0,
962 131, 123, 0, 134, 142, 153, 198, 0, 265, 267,
963 130, 122, 0, 139, 140, 0, 202, 0, 86, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -0400964 93, 105, 127, 106, 107, 108, 96, 0, 105, 0,
965 87, 117, 132, 0, 92, 0, 124, 143, 135, 0,
Alexis Hetue5246692015-06-18 12:34:52 -0400966 1, 266, 0, 200, 0, 150, 0, 148, 0, 270,
Alexis Hetua35d8232015-06-11 17:11:06 -0400967 97, 102, 104, 109, 0, 111, 98, 0, 0, 85,
Alexis Hetue5246692015-06-18 12:34:52 -0400968 0, 0, 0, 0, 204, 2, 6, 4, 5, 7,
969 28, 0, 0, 0, 154, 35, 34, 36, 33, 3,
970 9, 29, 11, 16, 17, 0, 0, 22, 0, 37,
971 0, 41, 44, 47, 52, 55, 57, 59, 61, 63,
972 65, 67, 84, 0, 26, 88, 0, 0, 0, 147,
973 0, 0, 0, 250, 0, 0, 0, 0, 0, 0,
974 0, 0, 224, 233, 237, 37, 69, 82, 0, 213,
975 0, 142, 216, 235, 215, 214, 0, 217, 218, 219,
976 220, 221, 222, 99, 101, 103, 0, 0, 0, 0,
977 212, 121, 0, 210, 0, 208, 0, 205, 30, 31,
978 0, 13, 14, 0, 0, 20, 19, 0, 156, 23,
979 25, 32, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -0400980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -0400981 0, 0, 155, 0, 203, 151, 152, 149, 261, 260,
982 231, 252, 0, 264, 262, 0, 0, 0, 245, 248,
983 223, 0, 72, 73, 75, 74, 77, 78, 79, 80,
984 81, 76, 71, 0, 0, 238, 234, 236, 0, 0,
985 0, 115, 0, 118, 0, 0, 0, 206, 0, 89,
986 8, 0, 15, 27, 12, 18, 24, 38, 39, 40,
987 43, 42, 45, 46, 50, 51, 48, 49, 53, 54,
988 56, 58, 60, 62, 64, 66, 0, 201, 0, 0,
989 0, 0, 0, 263, 0, 244, 0, 225, 70, 83,
990 0, 0, 112, 119, 0, 207, 0, 209, 0, 90,
991 10, 0, 0, 230, 232, 255, 254, 257, 231, 242,
992 246, 0, 0, 0, 0, 100, 113, 0, 120, 211,
993 0, 68, 0, 256, 0, 0, 241, 239, 0, 0,
994 0, 226, 114, 0, 0, 258, 0, 231, 243, 0,
995 228, 249, 227, 91, 0, 259, 253, 240, 247, 251
John Bauman66b8ab22014-05-06 15:57:45 -0400996};
997
998/* YYDEFGOTO[NTERM-NUM]. */
999static const yytype_int16 yydefgoto[] =
1000{
Alexis Hetue5246692015-06-18 12:34:52 -04001001 -1, 149, 150, 151, 311, 152, 153, 154, 155, 156,
1002 157, 158, 195, 160, 161, 162, 163, 164, 165, 166,
1003 167, 168, 169, 170, 171, 196, 197, 293, 198, 173,
1004 105, 199, 200, 62, 63, 64, 121, 96, 97, 122,
Alexis Hetua35d8232015-06-11 17:11:06 -04001005 65, 66, 67, 68, 98, 69, 70, 71, 72, 73,
Alexis Hetue5246692015-06-18 12:34:52 -04001006 116, 117, 174, 75, 76, 176, 114, 133, 134, 224,
1007 225, 221, 202, 203, 204, 205, 281, 374, 401, 338,
1008 339, 340, 402, 206, 207, 208, 387, 209, 388, 210,
1009 373, 211, 346, 270, 341, 367, 384, 385, 212, 77,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001010 78, 79, 89
John Bauman66b8ab22014-05-06 15:57:45 -04001011};
1012
1013/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1014 STATE-NUM. */
Alexis Hetue5246692015-06-18 12:34:52 -04001015#define YYPACT_NINF -331
John Bauman66b8ab22014-05-06 15:57:45 -04001016static const yytype_int16 yypact[] =
1017{
Alexis Hetue5246692015-06-18 12:34:52 -04001018 2157, -28, -331, -331, -331, 141, -331, -331, -331, -331,
1019 -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1020 -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1021 -331, -331, -331, -331, -331, -331, -331, 4, -331, -331,
1022 -44, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1023 -331, -331, -331, -331, -331, -331, -331, -331, -78, -331,
1024 -331, -31, -35, -24, 10, -71, -331, 45, 38, 1176,
1025 -331, -331, 2442, 38, -331, 1, -331, 2082, -331, -331,
1026 -331, -331, 2442, -331, -331, 49, -331, 72, -331, 51,
1027 -331, 19, -331, -331, -331, -331, -331, 2306, 110, 92,
1028 -331, -79, -331, 67, -331, 2232, -331, -331, -331, 1246,
1029 -331, -331, 25, -331, 2232, 58, -70, -331, 404, -331,
1030 -331, -331, -331, 103, 2306, -89, -331, 1344, 1635, -331,
1031 136, 2306, 105, 1827, -331, 78, -331, -331, -331, -331,
1032 -331, 1635, 1635, 1635, -331, -331, -331, -331, -331, -331,
1033 -331, 16, -331, -331, -331, 79, -21, 1730, 83, -331,
1034 1635, 34, 40, 28, -65, 47, 57, 61, 64, 100,
1035 101, -72, -331, 86, -331, -331, 2232, 1912, 82, -331,
1036 72, 84, 85, -331, 93, 96, 87, 1442, 98, 1635,
1037 91, 106, 102, -331, -331, 188, -331, -331, -15, -331,
1038 -31, 108, -331, -331, -331, -331, 520, -331, -331, -331,
1039 -331, -331, -331, 90, -331, -331, 1537, 1635, 104, 109,
1040 -331, -331, 105, 107, 5, -331, -61, -331, -331, -331,
1041 -20, -331, -331, 1635, 2374, -331, -331, 1635, 113, -331,
1042 -331, -331, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
1043 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635,
1044 1635, 1635, -331, 1997, -331, -331, -331, -331, -331, -331,
1045 111, -331, 1635, -331, -331, 6, 1635, 97, -331, -331,
1046 -331, 636, -331, -331, -331, -331, -331, -331, -331, -331,
1047 -331, -331, -331, 1635, 1635, -331, -331, -331, 1635, 112,
1048 114, -331, 1635, 115, 21, 1635, 105, -331, -75, -331,
1049 -331, 117, 120, -331, 116, -331, -331, -331, -331, -331,
1050 34, 34, 40, 40, 28, 28, 28, 28, -65, -65,
1051 47, 57, 61, 64, 100, 101, 31, -331, 159, 51,
1052 868, 984, -17, -331, -5, -331, 1081, 636, -331, -331,
1053 119, 1635, 121, -331, 1635, -331, 125, -331, 1635, -331,
1054 -331, 1635, 118, -331, -331, -331, -331, 1081, 111, -331,
1055 120, 157, 2306, 130, 127, -331, -331, 1635, -331, -331,
1056 131, -331, 1635, -331, 126, 134, 224, -331, 138, 129,
1057 752, -331, -331, 133, -1, 1635, 752, 111, -331, 1635,
1058 -331, -331, -331, -331, 135, 120, -331, -331, -331, -331
John Bauman66b8ab22014-05-06 15:57:45 -04001059};
1060
1061/* YYPGOTO[NTERM-NUM]. */
1062static const yytype_int16 yypgoto[] =
1063{
Alexis Hetue5246692015-06-18 12:34:52 -04001064 -331, -331, -331, -331, -331, -331, -331, 14, -331, -331,
1065 -331, -331, 63, -331, -82, -74, -122, -88, -4, -6,
1066 -3, 2, 7, 8, -331, -91, -124, -331, -138, -113,
1067 -331, 3, 9, -331, -331, -331, 137, 164, 160, 145,
1068 -331, -331, -325, -331, -331, -103, -2, -68, 254, -331,
1069 -331, 94, 0, -331, -331, -331, -331, -101, -123, 43,
1070 -36, -210, -69, -198, -328, -126, -331, -331, -125, -330,
1071 -331, -331, -83, -8, -64, -331, -331, -331, -331, -331,
1072 -87, -331, -331, -331, -331, -331, -331, -331, -331, -331,
1073 199, -331, -331
John Bauman66b8ab22014-05-06 15:57:45 -04001074};
1075
1076/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1077 positive, shift that token. If negative, reduce the rule which
1078 number is the opposite. If zero, do what YYDEFACT says.
1079 If YYTABLE_NINF, syntax error. */
Alexis Hetue5246692015-06-18 12:34:52 -04001080#define YYTABLE_NINF -230
John Bauman66b8ab22014-05-06 15:57:45 -04001081static const yytype_int16 yytable[] =
1082{
Alexis Hetue5246692015-06-18 12:34:52 -04001083 74, 106, 131, 60, 220, 230, 119, 301, 297, 61,
1084 227, 131, 364, 177, 219, 308, 80, 216, 172, 92,
1085 260, 371, 249, 250, 217, 126, 87, 127, 92, 123,
1086 131, 358, 85, 239, 128, 179, 172, 132, 386, 359,
1087 99, 180, 371, 100, 83, 84, 132, 7, 81, 275,
1088 93, 94, 95, 309, 227, 261, 123, 251, 252, 93,
1089 94, 95, 400, 222, 86, 132, 102, 407, 400, 74,
1090 90, 108, 107, 131, 131, 263, 277, 74, 27, 28,
1091 60, 29, 112, 88, 236, 310, 61, 91, 368, 37,
1092 237, 294, 353, 220, 294, 312, 294, 74, 172, 295,
1093 369, 231, 232, 300, 404, 74, 294, 109, 132, 132,
1094 294, 247, 248, 316, 74, -94, 306, 294, 201, 307,
1095 343, 101, 233, 336, 74, 172, 234, 324, 325, 326,
1096 327, 74, 306, 74, 342, 355, 253, 254, 344, 175,
1097 227, 376, 294, 361, 378, 2, 3, 4, 115, 297,
1098 93, 94, 95, 242, 243, 244, 245, 113, 246, 118,
1099 131, 265, 266, 320, 321, 328, 329, 392, 125, 348,
1100 349, 178, 159, 322, 323, 129, 74, 74, 220, 213,
1101 80, 223, -27, 255, 235, 350, 256, 240, 257, 408,
1102 159, 258, 356, 262, 259, 132, 298, 271, 268, 269,
1103 272, 273, 276, 278, 228, 229, 201, 172, 370, 345,
1104 279, 280, -26, 305, 172, 362, 303, 302, -21, -229,
1105 -28, 352, 382, 241, 360, 351, 375, 220, 354, 370,
1106 220, 294, 379, 389, 377, 390, 391, 381, 393, 396,
1107 395, 397, 399, 372, 394, 380, 192, 403, 315, 409,
1108 331, 330, 159, 220, 332, 120, 363, 405, 124, 82,
1109 333, 214, 398, 74, 372, 304, 334, 172, 335, 215,
1110 357, 406, 365, 347, 267, 220, 111, 366, 0, 159,
1111 383, 201, 282, 283, 284, 285, 286, 287, 288, 289,
1112 290, 291, 0, 0, 0, 0, 0, 0, 0, 0,
1113 0, 292, 0, 0, 106, 317, 318, 319, 159, 159,
1114 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
1115 159, 159, 159, 159, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001117 201, 201, 0, 0, 0, 0, 201, 201, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001119 0, 159, 0, 0, 0, 0, 0, 201, 159, 0,
1120 0, 0, 74, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001122 201, 0, 0, 0, 0, 0, 201, 0, 0, 0,
1123 0, 0, 0, 0, 0, 0, 0, 1, 2, 3,
1124 4, 5, 6, 7, 8, 9, 10, 11, 181, 182,
1125 183, 159, 184, 185, 186, 187, 188, 189, 190, 12,
1126 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1127 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1128 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1129 191, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1130 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1131 135, 59, 136, 137, 138, 139, 140, 0, 0, 141,
1132 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1133 0, 0, 0, 0, 0, 0, 0, 0, 143, 0,
1134 0, 0, 192, 193, 0, 0, 0, 0, 194, 145,
1135 146, 147, 148, 1, 2, 3, 4, 5, 6, 7,
1136 8, 9, 10, 11, 181, 182, 183, 0, 184, 185,
1137 186, 187, 188, 189, 190, 12, 13, 14, 15, 16,
1138 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1139 27, 28, 0, 29, 30, 31, 32, 33, 34, 35,
1140 36, 37, 38, 39, 40, 41, 191, 42, 43, 44,
1141 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1142 54, 0, 55, 56, 57, 58, 135, 59, 136, 137,
1143 138, 139, 140, 0, 0, 141, 142, 0, 0, 0,
Alexis Hetu17809052015-05-13 11:28:22 -04001144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001145 0, 0, 0, 0, 143, 0, 0, 0, 192, 296,
1146 0, 0, 0, 0, 194, 145, 146, 147, 148, 1,
1147 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1148 181, 182, 183, 0, 184, 185, 186, 187, 188, 189,
1149 190, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1150 21, 22, 23, 24, 25, 26, 27, 28, 0, 29,
1151 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1152 40, 41, 191, 42, 43, 44, 0, 45, 46, 47,
1153 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1154 57, 58, 135, 59, 136, 137, 138, 139, 140, 0,
1155 0, 141, 142, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001156 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001157 143, 0, 0, 0, 192, 0, 0, 0, 0, 0,
1158 194, 145, 146, 147, 148, 1, 2, 3, 4, 5,
1159 6, 7, 8, 9, 10, 11, 181, 182, 183, 0,
1160 184, 185, 186, 187, 188, 189, 190, 12, 13, 14,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001161 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001162 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
Alexis Hetue5246692015-06-18 12:34:52 -04001163 34, 35, 36, 37, 38, 39, 40, 41, 191, 42,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001164 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
Alexis Hetua35d8232015-06-11 17:11:06 -04001165 52, 53, 54, 0, 55, 56, 57, 58, 135, 59,
1166 136, 137, 138, 139, 140, 0, 0, 141, 142, 0,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001168 0, 0, 0, 0, 0, 0, 143, 0, 0, 0,
1169 118, 0, 0, 0, 0, 0, 194, 145, 146, 147,
1170 148, 1, 2, 3, 4, 5, 6, 7, 8, 9,
1171 10, 11, 181, 182, 183, 0, 184, 185, 186, 187,
1172 188, 189, 190, 12, 13, 14, 15, 16, 17, 18,
1173 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1174 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1175 38, 39, 40, 41, 191, 42, 43, 44, 0, 45,
1176 46, 47, 48, 49, 50, 51, 52, 53, 54, 0,
1177 55, 56, 57, 58, 135, 59, 136, 137, 138, 139,
1178 140, 0, 0, 141, 142, 0, 0, 0, 0, 0,
1179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1180 0, 0, 143, 0, 0, 0, 0, 0, 0, 0,
1181 0, 0, 194, 145, 146, 147, 148, 1, 2, 3,
1182 4, 5, 6, 7, 8, 9, 10, 11, 0, 0,
1183 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
1184 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1185 23, 24, 25, 26, 27, 28, 0, 29, 30, 31,
1186 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1187 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1188 50, 51, 52, 53, 54, 0, 55, 56, 57, 58,
1189 135, 59, 136, 137, 138, 139, 140, 0, 0, 141,
1190 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1191 0, 0, 0, 0, 130, 2, 3, 4, 143, 6,
1192 7, 8, 9, 10, 11, 0, 0, 0, 194, 145,
1193 146, 147, 148, 0, 0, 0, 12, 13, 14, 15,
1194 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1195 26, 27, 28, 0, 29, 30, 31, 32, 33, 34,
1196 35, 36, 37, 38, 39, 40, 41, 0, 42, 43,
1197 44, 0, 45, 46, 47, 48, 49, 50, 51, 52,
1198 53, 54, 0, 55, 56, 57, 58, 135, 59, 136,
1199 137, 138, 139, 140, 0, 0, 141, 142, 0, 0,
1200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1201 2, 3, 4, 0, 0, 143, 8, 9, 10, 11,
1202 0, 0, 0, 0, 0, 0, 145, 146, 147, 148,
1203 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1204 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1205 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1206 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1207 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1208 57, 0, 103, 59, 0, 0, 8, 9, 10, 11,
1209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1210 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1211 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1212 104, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1213 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1214 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1215 57, 0, 135, 59, 136, 137, 138, 139, 140, 0,
1216 0, 141, 142, 0, 0, 0, 0, 0, 0, 0,
1217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1218 143, 0, 0, 144, 8, 9, 10, 11, 0, 0,
1219 0, 145, 146, 147, 148, 0, 0, 0, 0, 12,
1220 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1221 23, 24, 25, 26, 0, 0, 0, 0, 0, 31,
1222 32, 33, 34, 35, 36, 0, 0, 0, 40, 41,
1223 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1224 50, 51, 52, 53, 54, 0, 55, 56, 57, 0,
1225 135, 59, 136, 137, 138, 139, 140, 0, 0, 141,
1226 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1227 0, 0, 0, 0, 0, 0, 0, 0, 143, 0,
1228 0, 218, 8, 9, 10, 11, 0, 0, 0, 145,
1229 146, 147, 148, 0, 0, 0, 0, 12, 13, 14,
1230 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1231 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1232 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1233 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1234 52, 53, 54, 0, 55, 56, 57, 0, 135, 59,
1235 136, 137, 138, 139, 140, 0, 0, 141, 142, 0,
1236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1237 0, 0, 0, 0, 0, 0, 143, 8, 9, 10,
1238 11, 0, 0, 0, 0, 0, 274, 145, 146, 147,
1239 148, 0, 12, 13, 14, 15, 16, 17, 18, 19,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001240 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
1241 0, 0, 31, 32, 33, 34, 35, 36, 0, 0,
1242 0, 40, 41, 0, 42, 43, 44, 0, 45, 46,
Alexis Hetua35d8232015-06-11 17:11:06 -04001243 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001244 56, 57, 0, 135, 59, 136, 137, 138, 139, 140,
Alexis Hetua35d8232015-06-11 17:11:06 -04001245 0, 0, 141, 142, 0, 0, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001246 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001247 0, 143, 0, 0, 299, 8, 9, 10, 11, 0,
1248 0, 0, 145, 146, 147, 148, 0, 0, 0, 0,
Alexis Hetua35d8232015-06-11 17:11:06 -04001249 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1250 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
1251 31, 32, 33, 34, 35, 36, 0, 0, 0, 40,
1252 41, 0, 42, 43, 44, 0, 45, 46, 47, 48,
1253 49, 50, 51, 52, 53, 54, 0, 55, 56, 57,
1254 0, 135, 59, 136, 137, 138, 139, 140, 0, 0,
1255 141, 142, 0, 0, 0, 0, 0, 0, 0, 0,
1256 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
Alexis Hetue5246692015-06-18 12:34:52 -04001257 8, 9, 10, 11, 0, 0, 0, 0, 0, 0,
1258 145, 146, 147, 148, 0, 12, 13, 14, 15, 16,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001259 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1260 0, 0, 0, 0, 0, 31, 32, 33, 34, 35,
Alexis Hetue5246692015-06-18 12:34:52 -04001261 36, 0, 0, 0, 40, 238, 0, 42, 43, 44,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001262 0, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1263 54, 0, 55, 56, 57, 0, 135, 59, 136, 137,
1264 138, 139, 140, 0, 0, 141, 142, 0, 0, 0,
1265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001266 130, 2, 3, 4, 143, 6, 7, 8, 9, 10,
1267 11, 0, 0, 0, 0, 145, 146, 147, 148, 0,
1268 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
1269 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1270 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1271 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1272 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1273 56, 57, 58, 0, 59, 0, 0, 0, 0, 0,
1274 0, 0, 0, 0, 0, 130, 2, 3, 4, 0,
1275 6, 7, 8, 9, 10, 11, 0, 0, 0, 0,
1276 0, 0, 0, 0, 0, 0, 226, 12, 13, 14,
1277 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1278 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1279 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1280 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1281 52, 53, 54, 0, 55, 56, 57, 58, 0, 59,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001282 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001283 130, 2, 3, 4, 0, 6, 7, 8, 9, 10,
1284 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1285 0, 264, 12, 13, 14, 15, 16, 17, 18, 19,
1286 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1287 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1288 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
1289 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
1290 56, 57, 58, 0, 59, 0, 0, 0, 0, 0,
1291 0, 0, 110, 0, 0, 1, 2, 3, 4, 5,
1292 6, 7, 8, 9, 10, 11, 0, 0, 0, 0,
1293 0, 0, 0, 0, 0, 0, 337, 12, 13, 14,
1294 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1295 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1296 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1297 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1298 52, 53, 54, 0, 55, 56, 57, 58, 0, 59,
1299 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001300 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1301 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
Alexis Hetue5246692015-06-18 12:34:52 -04001302 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
1303 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1304 39, 40, 41, 0, 42, 43, 44, 0, 45, 46,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001305 47, 48, 49, 50, 51, 52, 53, 54, 0, 55,
Alexis Hetue5246692015-06-18 12:34:52 -04001306 56, 57, 58, 0, 59, 130, 2, 3, 4, 0,
1307 6, 7, 8, 9, 10, 11, 0, 0, 0, 0,
1308 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1309 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1310 25, 26, 27, 28, 0, 29, 30, 31, 32, 33,
1311 34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
1312 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1313 52, 53, 54, 0, 55, 56, 57, 58, 0, 59,
1314 2, 3, 4, 0, 0, 0, 8, 9, 10, 11,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001315 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Alexis Hetue5246692015-06-18 12:34:52 -04001316 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1317 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
1318 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,
1319 40, 41, 0, 42, 43, 44, 0, 45, 46, 47,
1320 48, 49, 50, 51, 52, 53, 54, 0, 55, 56,
1321 57, 0, 0, 59, 8, 9, 10, 11, 0, 0,
1322 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
1323 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1324 23, 24, 25, 26, 0, 0, 0, 0, 0, 31,
1325 32, 33, 34, 35, 36, 0, 0, 0, 40, 41,
1326 0, 42, 43, 44, 0, 45, 46, 47, 48, 49,
1327 50, 51, 52, 53, 54, 0, 55, 56, 57, 0,
1328 313, 59, 8, 9, 10, 11, 314, 0, 0, 0,
1329 0, 0, 0, 0, 0, 0, 0, 12, 13, 14,
1330 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1331 25, 26, 0, 0, 0, 0, 0, 31, 32, 33,
1332 34, 35, 36, 0, 0, 0, 40, 41, 0, 42,
1333 43, 44, 0, 45, 46, 47, 48, 49, 50, 51,
1334 52, 53, 54, 0, 55, 56, 57, 0, 0, 59
John Bauman66b8ab22014-05-06 15:57:45 -04001335};
1336
1337static const yytype_int16 yycheck[] =
1338{
Alexis Hetue5246692015-06-18 12:34:52 -04001339 0, 69, 105, 0, 128, 143, 89, 217, 206, 0,
1340 133, 114, 340, 114, 127, 76, 44, 106, 109, 9,
1341 92, 346, 87, 88, 113, 104, 104, 106, 9, 97,
1342 133, 106, 76, 157, 113, 105, 127, 105, 368, 114,
1343 111, 111, 367, 114, 40, 41, 114, 9, 76, 187,
1344 40, 41, 42, 114, 177, 127, 124, 122, 123, 40,
1345 41, 42, 390, 131, 108, 133, 68, 397, 396, 69,
1346 105, 73, 72, 176, 177, 176, 189, 77, 40, 41,
1347 77, 43, 82, 114, 105, 105, 77, 111, 105, 51,
1348 111, 111, 302, 217, 111, 233, 111, 97, 189, 114,
1349 105, 85, 86, 216, 105, 105, 111, 106, 176, 177,
1350 111, 83, 84, 237, 114, 105, 111, 111, 118, 114,
1351 114, 76, 106, 261, 124, 216, 110, 249, 250, 251,
1352 252, 131, 111, 133, 272, 114, 89, 90, 276, 114,
1353 263, 351, 111, 112, 354, 4, 5, 6, 76, 347,
1354 40, 41, 42, 119, 120, 121, 116, 108, 118, 108,
1355 263, 79, 80, 245, 246, 253, 254, 377, 76, 293,
1356 294, 113, 109, 247, 248, 108, 176, 177, 302, 76,
1357 44, 76, 104, 126, 105, 298, 125, 104, 124, 399,
1358 127, 91, 305, 107, 93, 263, 106, 104, 114, 114,
1359 104, 114, 104, 112, 141, 142, 206, 298, 346, 112,
1360 104, 109, 104, 106, 305, 56, 107, 113, 105, 108,
1361 104, 107, 104, 160, 107, 113, 107, 351, 113, 367,
1362 354, 111, 107, 76, 113, 105, 109, 361, 107, 105,
1363 114, 17, 113, 346, 382, 358, 108, 114, 234, 114,
1364 256, 255, 189, 377, 257, 91, 339, 395, 98, 5,
1365 258, 124, 388, 263, 367, 222, 259, 358, 260, 124,
1366 306, 396, 341, 281, 180, 399, 77, 341, -1, 216,
1367 367, 281, 94, 95, 96, 97, 98, 99, 100, 101,
1368 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
1369 -1, 113, -1, -1, 372, 242, 243, 244, 245, 246,
1370 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
1371 257, 258, 259, 260, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001373 340, 341, -1, -1, -1, -1, 346, 347, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001375 -1, 298, -1, -1, -1, -1, -1, 367, 305, -1,
1376 -1, -1, 372, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001377 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001378 390, -1, -1, -1, -1, -1, 396, -1, -1, -1,
1379 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
1380 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1381 16, 358, 18, 19, 20, 21, 22, 23, 24, 25,
1382 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1383 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1384 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1385 56, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1386 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1387 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1388 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1389 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
1390 -1, -1, 108, 109, -1, -1, -1, -1, 114, 115,
1391 116, 117, 118, 3, 4, 5, 6, 7, 8, 9,
1392 10, 11, 12, 13, 14, 15, 16, -1, 18, 19,
1393 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1394 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1395 40, 41, -1, 43, 44, 45, 46, 47, 48, 49,
1396 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1397 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1398 70, -1, 72, 73, 74, 75, 76, 77, 78, 79,
1399 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
Alexis Hetu17809052015-05-13 11:28:22 -04001400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001401 -1, -1, -1, -1, 104, -1, -1, -1, 108, 109,
1402 -1, -1, -1, -1, 114, 115, 116, 117, 118, 3,
1403 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1404 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
1405 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1406 34, 35, 36, 37, 38, 39, 40, 41, -1, 43,
1407 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1408 54, 55, 56, 57, 58, 59, -1, 61, 62, 63,
1409 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1410 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
1411 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001413 104, -1, -1, -1, 108, -1, -1, -1, -1, -1,
1414 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1415 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1416 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001417 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001418 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
Alexis Hetue5246692015-06-18 12:34:52 -04001419 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001420 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04001421 68, 69, 70, -1, 72, 73, 74, 75, 76, 77,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001422 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1423 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001424 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1,
1425 108, -1, -1, -1, -1, -1, 114, 115, 116, 117,
1426 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1427 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
1428 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1429 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1430 -1, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1431 52, 53, 54, 55, 56, 57, 58, 59, -1, 61,
1432 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
1433 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1434 82, -1, -1, 85, 86, -1, -1, -1, -1, -1,
1435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1436 -1, -1, 104, -1, -1, -1, -1, -1, -1, -1,
1437 -1, -1, 114, 115, 116, 117, 118, 3, 4, 5,
1438 6, 7, 8, 9, 10, 11, 12, 13, -1, -1,
1439 -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
1440 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1441 36, 37, 38, 39, 40, 41, -1, 43, 44, 45,
1442 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1443 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1444 66, 67, 68, 69, 70, -1, 72, 73, 74, 75,
1445 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1446 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1447 -1, -1, -1, -1, 3, 4, 5, 6, 104, 8,
1448 9, 10, 11, 12, 13, -1, -1, -1, 114, 115,
1449 116, 117, 118, -1, -1, -1, 25, 26, 27, 28,
1450 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1451 39, 40, 41, -1, 43, 44, 45, 46, 47, 48,
1452 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
1453 59, -1, 61, 62, 63, 64, 65, 66, 67, 68,
1454 69, 70, -1, 72, 73, 74, 75, 76, 77, 78,
1455 79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
1456 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1457 4, 5, 6, -1, -1, 104, 10, 11, 12, 13,
1458 -1, -1, -1, -1, -1, -1, 115, 116, 117, 118,
1459 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1460 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1461 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1462 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1463 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1464 74, -1, 76, 77, -1, -1, 10, 11, 12, 13,
1465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1466 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1467 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1468 114, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1469 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1470 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1471 74, -1, 76, 77, 78, 79, 80, 81, 82, -1,
1472 -1, 85, 86, -1, -1, -1, -1, -1, -1, -1,
1473 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1474 104, -1, -1, 107, 10, 11, 12, 13, -1, -1,
1475 -1, 115, 116, 117, 118, -1, -1, -1, -1, 25,
1476 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1477 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
1478 46, 47, 48, 49, 50, -1, -1, -1, 54, 55,
1479 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1480 66, 67, 68, 69, 70, -1, 72, 73, 74, -1,
1481 76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
1482 86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1483 -1, -1, -1, -1, -1, -1, -1, -1, 104, -1,
1484 -1, 107, 10, 11, 12, 13, -1, -1, -1, 115,
1485 116, 117, 118, -1, -1, -1, -1, 25, 26, 27,
1486 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1487 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1488 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1489 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1490 68, 69, 70, -1, 72, 73, 74, -1, 76, 77,
1491 78, 79, 80, 81, 82, -1, -1, 85, 86, -1,
1492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1493 -1, -1, -1, -1, -1, -1, 104, 10, 11, 12,
1494 13, -1, -1, -1, -1, -1, 114, 115, 116, 117,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001495 118, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1496 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
1497 -1, -1, 45, 46, 47, 48, 49, 50, -1, -1,
1498 -1, 54, 55, -1, 57, 58, 59, -1, 61, 62,
Alexis Hetua35d8232015-06-11 17:11:06 -04001499 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001500 73, 74, -1, 76, 77, 78, 79, 80, 81, 82,
Alexis Hetua35d8232015-06-11 17:11:06 -04001501 -1, -1, 85, 86, -1, -1, -1, -1, -1, -1,
Alexis Hetua35d8232015-06-11 17:11:06 -04001502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001503 -1, 104, -1, -1, 107, 10, 11, 12, 13, -1,
1504 -1, -1, 115, 116, 117, 118, -1, -1, -1, -1,
Alexis Hetuad6b8752015-06-09 16:15:30 -04001505 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1506 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
1507 45, 46, 47, 48, 49, 50, -1, -1, -1, 54,
1508 55, -1, 57, 58, 59, -1, 61, 62, 63, 64,
1509 65, 66, 67, 68, 69, 70, -1, 72, 73, 74,
1510 -1, 76, 77, 78, 79, 80, 81, 82, -1, -1,
1511 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
1512 -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
Alexis Hetue5246692015-06-18 12:34:52 -04001513 10, 11, 12, 13, -1, -1, -1, -1, -1, -1,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001514 115, 116, 117, 118, -1, 25, 26, 27, 28, 29,
1515 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1516 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
1517 50, -1, -1, -1, 54, 55, -1, 57, 58, 59,
1518 -1, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1519 70, -1, 72, 73, 74, -1, 76, 77, 78, 79,
1520 80, 81, 82, -1, -1, 85, 86, -1, -1, -1,
1521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001522 3, 4, 5, 6, 104, 8, 9, 10, 11, 12,
1523 13, -1, -1, -1, -1, 115, 116, 117, 118, -1,
1524 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
1525 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1526 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1527 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1528 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1529 73, 74, 75, -1, 77, -1, -1, -1, -1, -1,
1530 -1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
1531 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
1532 -1, -1, -1, -1, -1, -1, 109, 25, 26, 27,
1533 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1534 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1535 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1536 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1537 68, 69, 70, -1, 72, 73, 74, 75, -1, 77,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001539 3, 4, 5, 6, -1, 8, 9, 10, 11, 12,
1540 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1541 -1, 109, 25, 26, 27, 28, 29, 30, 31, 32,
1542 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1543 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1544 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
1545 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
1546 73, 74, 75, -1, 77, -1, -1, -1, -1, -1,
1547 -1, -1, 0, -1, -1, 3, 4, 5, 6, 7,
1548 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
1549 -1, -1, -1, -1, -1, -1, 109, 25, 26, 27,
1550 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1551 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1552 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1553 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1554 68, 69, 70, -1, 72, 73, 74, 75, -1, 77,
1555 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001556 13, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1557 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
Alexis Hetue5246692015-06-18 12:34:52 -04001558 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1559 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1560 53, 54, 55, -1, 57, 58, 59, -1, 61, 62,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001561 63, 64, 65, 66, 67, 68, 69, 70, -1, 72,
Alexis Hetue5246692015-06-18 12:34:52 -04001562 73, 74, 75, -1, 77, 3, 4, 5, 6, -1,
1563 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
1564 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1565 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1566 38, 39, 40, 41, -1, 43, 44, 45, 46, 47,
1567 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
1568 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1569 68, 69, 70, -1, 72, 73, 74, 75, -1, 77,
1570 4, 5, 6, -1, -1, -1, 10, 11, 12, 13,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Alexis Hetue5246692015-06-18 12:34:52 -04001572 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1573 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
1574 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
1575 54, 55, -1, 57, 58, 59, -1, 61, 62, 63,
1576 64, 65, 66, 67, 68, 69, 70, -1, 72, 73,
1577 74, -1, -1, 77, 10, 11, 12, 13, -1, -1,
1578 -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
1579 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1580 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
1581 46, 47, 48, 49, 50, -1, -1, -1, 54, 55,
1582 -1, 57, 58, 59, -1, 61, 62, 63, 64, 65,
1583 66, 67, 68, 69, 70, -1, 72, 73, 74, -1,
1584 76, 77, 10, 11, 12, 13, 82, -1, -1, -1,
1585 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
1586 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1587 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
1588 48, 49, 50, -1, -1, -1, 54, 55, -1, 57,
1589 58, 59, -1, 61, 62, 63, 64, 65, 66, 67,
1590 68, 69, 70, -1, 72, 73, 74, -1, -1, 77
John Bauman66b8ab22014-05-06 15:57:45 -04001591};
1592
1593/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1594 symbol of state STATE-NUM. */
1595static const yytype_uint8 yystos[] =
1596{
1597 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
Nicolas Capens3c20f802015-02-17 17:17:20 -05001598 12, 13, 25, 26, 27, 28, 29, 30, 31, 32,
Nicolas Capense4b1b1d2015-02-17 17:26:01 -05001599 33, 34, 35, 36, 37, 38, 39, 40, 41, 43,
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04001600 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1601 54, 55, 57, 58, 59, 61, 62, 63, 64, 65,
1602 66, 67, 68, 69, 70, 72, 73, 74, 75, 77,
Alexis Hetua35d8232015-06-11 17:11:06 -04001603 159, 160, 161, 162, 163, 168, 169, 170, 171, 173,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001604 174, 175, 176, 177, 180, 181, 182, 217, 218, 219,
1605 44, 76, 176, 40, 41, 76, 108, 104, 114, 220,
Alexis Hetua35d8232015-06-11 17:11:06 -04001606 105, 111, 9, 40, 41, 42, 165, 166, 172, 111,
1607 114, 76, 174, 76, 114, 158, 175, 180, 174, 106,
Alexis Hetu76a343a2015-06-04 17:21:22 -04001608 0, 218, 180, 108, 184, 76, 178, 179, 108, 200,
Alexis Hetua35d8232015-06-11 17:11:06 -04001609 165, 164, 167, 175, 166, 76, 104, 106, 113, 108,
1610 3, 173, 175, 185, 186, 76, 78, 79, 80, 81,
Alexis Hetue5246692015-06-18 12:34:52 -04001611 82, 85, 86, 104, 107, 115, 116, 117, 118, 129,
1612 130, 131, 133, 134, 135, 136, 137, 138, 139, 140,
1613 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
1614 151, 152, 153, 157, 180, 114, 183, 185, 113, 105,
1615 111, 14, 15, 16, 18, 19, 20, 21, 22, 23,
1616 24, 56, 108, 109, 114, 140, 153, 154, 156, 159,
1617 160, 180, 190, 191, 192, 193, 201, 202, 203, 205,
1618 207, 209, 216, 76, 164, 167, 106, 113, 107, 157,
1619 154, 189, 175, 76, 187, 188, 109, 186, 140, 140,
1620 156, 85, 86, 106, 110, 105, 105, 111, 55, 154,
1621 104, 140, 119, 120, 121, 116, 118, 83, 84, 87,
1622 88, 122, 123, 89, 90, 126, 125, 124, 91, 93,
1623 92, 127, 107, 185, 109, 79, 80, 179, 114, 114,
1624 211, 104, 104, 114, 114, 156, 104, 157, 112, 104,
1625 109, 194, 94, 95, 96, 97, 98, 99, 100, 101,
1626 102, 103, 113, 155, 111, 114, 109, 191, 106, 107,
1627 157, 189, 113, 107, 187, 106, 111, 114, 76, 114,
1628 105, 132, 156, 76, 82, 135, 154, 140, 140, 140,
1629 142, 142, 143, 143, 144, 144, 144, 144, 145, 145,
1630 146, 147, 148, 149, 150, 151, 156, 109, 197, 198,
1631 199, 212, 156, 114, 156, 112, 210, 201, 154, 154,
1632 157, 113, 107, 189, 113, 114, 157, 188, 106, 114,
1633 107, 112, 56, 200, 192, 190, 202, 213, 105, 105,
1634 156, 170, 173, 208, 195, 107, 189, 113, 189, 107,
1635 157, 154, 104, 208, 214, 215, 197, 204, 206, 76,
1636 105, 109, 189, 107, 156, 114, 105, 17, 193, 113,
1637 192, 196, 200, 114, 105, 156, 196, 197, 189, 114
John Bauman66b8ab22014-05-06 15:57:45 -04001638};
1639
1640#define yyerrok (yyerrstatus = 0)
1641#define yyclearin (yychar = YYEMPTY)
1642#define YYEMPTY (-2)
1643#define YYEOF 0
1644
1645#define YYACCEPT goto yyacceptlab
1646#define YYABORT goto yyabortlab
1647#define YYERROR goto yyerrorlab
1648
1649
1650/* Like YYERROR except do call yyerror. This remains here temporarily
1651 to ease the transition to the new meaning of YYERROR, for GCC.
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001652 Once GCC version 2 has supplanted version 1, this can go. */
John Bauman66b8ab22014-05-06 15:57:45 -04001653
1654#define YYFAIL goto yyerrlab
John Bauman66b8ab22014-05-06 15:57:45 -04001655
1656#define YYRECOVERING() (!!yyerrstatus)
1657
1658#define YYBACKUP(Token, Value) \
1659do \
1660 if (yychar == YYEMPTY && yylen == 1) \
1661 { \
1662 yychar = (Token); \
1663 yylval = (Value); \
1664 yytoken = YYTRANSLATE (yychar); \
1665 YYPOPSTACK (1); \
1666 goto yybackup; \
1667 } \
1668 else \
1669 { \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001670 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
John Bauman66b8ab22014-05-06 15:57:45 -04001671 YYERROR; \
1672 } \
1673while (YYID (0))
1674
1675
1676#define YYTERROR 1
1677#define YYERRCODE 256
1678
1679
1680/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1681 If N is 0, then set CURRENT to the empty location which ends
1682 the previous symbol: RHS[0] (always defined). */
1683
1684#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1685#ifndef YYLLOC_DEFAULT
1686# define YYLLOC_DEFAULT(Current, Rhs, N) \
1687 do \
1688 if (YYID (N)) \
1689 { \
1690 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1691 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1692 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1693 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1694 } \
1695 else \
1696 { \
1697 (Current).first_line = (Current).last_line = \
1698 YYRHSLOC (Rhs, 0).last_line; \
1699 (Current).first_column = (Current).last_column = \
1700 YYRHSLOC (Rhs, 0).last_column; \
1701 } \
1702 while (YYID (0))
1703#endif
1704
1705
1706/* YY_LOCATION_PRINT -- Print the location on the stream.
1707 This macro was not mandated originally: define only if we know
1708 we won't break user code: when these are the locations we know. */
1709
1710#ifndef YY_LOCATION_PRINT
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04001711# if YYLTYPE_IS_TRIVIAL
John Bauman66b8ab22014-05-06 15:57:45 -04001712# define YY_LOCATION_PRINT(File, Loc) \
1713 fprintf (File, "%d.%d-%d.%d", \
1714 (Loc).first_line, (Loc).first_column, \
1715 (Loc).last_line, (Loc).last_column)
1716# else
1717# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1718# endif
1719#endif
1720
1721
1722/* YYLEX -- calling `yylex' with the right arguments. */
1723
1724#ifdef YYLEX_PARAM
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001725# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
John Bauman66b8ab22014-05-06 15:57:45 -04001726#else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001727# define YYLEX yylex (&yylval, &yylloc)
John Bauman66b8ab22014-05-06 15:57:45 -04001728#endif
1729
1730/* Enable debugging if requested. */
1731#if YYDEBUG
1732
1733# ifndef YYFPRINTF
1734# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1735# define YYFPRINTF fprintf
1736# endif
1737
1738# define YYDPRINTF(Args) \
1739do { \
1740 if (yydebug) \
1741 YYFPRINTF Args; \
1742} while (YYID (0))
1743
1744# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1745do { \
1746 if (yydebug) \
1747 { \
1748 YYFPRINTF (stderr, "%s ", Title); \
1749 yy_symbol_print (stderr, \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001750 Type, Value, Location, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001751 YYFPRINTF (stderr, "\n"); \
1752 } \
1753} while (YYID (0))
1754
1755
1756/*--------------------------------.
1757| Print this symbol on YYOUTPUT. |
1758`--------------------------------*/
1759
1760/*ARGSUSED*/
1761#if (defined __STDC__ || defined __C99__FUNC__ \
1762 || defined __cplusplus || defined _MSC_VER)
1763static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001764yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001765#else
1766static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001767yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001768 FILE *yyoutput;
1769 int yytype;
1770 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001771 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001772 TParseContext* context;
1773#endif
1774{
1775 if (!yyvaluep)
1776 return;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001777 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04001778 YYUSE (context);
1779# ifdef YYPRINT
1780 if (yytype < YYNTOKENS)
1781 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1782# else
1783 YYUSE (yyoutput);
1784# endif
1785 switch (yytype)
1786 {
1787 default:
1788 break;
1789 }
1790}
1791
1792
1793/*--------------------------------.
1794| Print this symbol on YYOUTPUT. |
1795`--------------------------------*/
1796
1797#if (defined __STDC__ || defined __C99__FUNC__ \
1798 || defined __cplusplus || defined _MSC_VER)
1799static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001800yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001801#else
1802static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001803yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001804 FILE *yyoutput;
1805 int yytype;
1806 YYSTYPE const * const yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001807 YYLTYPE const * const yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04001808 TParseContext* context;
1809#endif
1810{
1811 if (yytype < YYNTOKENS)
1812 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1813 else
1814 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1815
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001816 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1817 YYFPRINTF (yyoutput, ": ");
1818 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04001819 YYFPRINTF (yyoutput, ")");
1820}
1821
1822/*------------------------------------------------------------------.
1823| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1824| TOP (included). |
1825`------------------------------------------------------------------*/
1826
1827#if (defined __STDC__ || defined __C99__FUNC__ \
1828 || defined __cplusplus || defined _MSC_VER)
1829static void
1830yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1831#else
1832static void
1833yy_stack_print (yybottom, yytop)
1834 yytype_int16 *yybottom;
1835 yytype_int16 *yytop;
1836#endif
1837{
1838 YYFPRINTF (stderr, "Stack now");
1839 for (; yybottom <= yytop; yybottom++)
1840 {
1841 int yybot = *yybottom;
1842 YYFPRINTF (stderr, " %d", yybot);
1843 }
1844 YYFPRINTF (stderr, "\n");
1845}
1846
1847# define YY_STACK_PRINT(Bottom, Top) \
1848do { \
1849 if (yydebug) \
1850 yy_stack_print ((Bottom), (Top)); \
1851} while (YYID (0))
1852
1853
1854/*------------------------------------------------.
1855| Report that the YYRULE is going to be reduced. |
1856`------------------------------------------------*/
1857
1858#if (defined __STDC__ || defined __C99__FUNC__ \
1859 || defined __cplusplus || defined _MSC_VER)
1860static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001861yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04001862#else
1863static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001864yy_reduce_print (yyvsp, yylsp, yyrule, context)
John Bauman66b8ab22014-05-06 15:57:45 -04001865 YYSTYPE *yyvsp;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001866 YYLTYPE *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04001867 int yyrule;
1868 TParseContext* context;
1869#endif
1870{
1871 int yynrhs = yyr2[yyrule];
1872 int yyi;
1873 unsigned long int yylno = yyrline[yyrule];
1874 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1875 yyrule - 1, yylno);
1876 /* The symbols being reduced. */
1877 for (yyi = 0; yyi < yynrhs; yyi++)
1878 {
1879 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1880 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1881 &(yyvsp[(yyi + 1) - (yynrhs)])
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001882 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
John Bauman66b8ab22014-05-06 15:57:45 -04001883 YYFPRINTF (stderr, "\n");
1884 }
1885}
1886
1887# define YY_REDUCE_PRINT(Rule) \
1888do { \
1889 if (yydebug) \
Alexis Hetu15ae36c2015-06-18 21:10:09 -04001890 yy_reduce_print (yyvsp, yylsp, Rule, context); \
John Bauman66b8ab22014-05-06 15:57:45 -04001891} while (YYID (0))
1892
1893/* Nonzero means print parse trace. It is left uninitialized so that
1894 multiple parsers can coexist. */
1895int yydebug;
1896#else /* !YYDEBUG */
1897# define YYDPRINTF(Args)
1898# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1899# define YY_STACK_PRINT(Bottom, Top)
1900# define YY_REDUCE_PRINT(Rule)
1901#endif /* !YYDEBUG */
1902
1903
1904/* YYINITDEPTH -- initial size of the parser's stacks. */
1905#ifndef YYINITDEPTH
1906# define YYINITDEPTH 200
1907#endif
1908
1909/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1910 if the built-in stack extension method is used).
1911
1912 Do not make this value too large; the results are undefined if
1913 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1914 evaluated with infinite-precision integer arithmetic. */
1915
1916#ifndef YYMAXDEPTH
1917# define YYMAXDEPTH 10000
1918#endif
1919
1920
1921
1922#if YYERROR_VERBOSE
1923
1924# ifndef yystrlen
1925# if defined __GLIBC__ && defined _STRING_H
1926# define yystrlen strlen
1927# else
1928/* Return the length of YYSTR. */
1929#if (defined __STDC__ || defined __C99__FUNC__ \
1930 || defined __cplusplus || defined _MSC_VER)
1931static YYSIZE_T
1932yystrlen (const char *yystr)
1933#else
1934static YYSIZE_T
1935yystrlen (yystr)
1936 const char *yystr;
1937#endif
1938{
1939 YYSIZE_T yylen;
1940 for (yylen = 0; yystr[yylen]; yylen++)
1941 continue;
1942 return yylen;
1943}
1944# endif
1945# endif
1946
1947# ifndef yystpcpy
1948# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1949# define yystpcpy stpcpy
1950# else
1951/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1952 YYDEST. */
1953#if (defined __STDC__ || defined __C99__FUNC__ \
1954 || defined __cplusplus || defined _MSC_VER)
1955static char *
1956yystpcpy (char *yydest, const char *yysrc)
1957#else
1958static char *
1959yystpcpy (yydest, yysrc)
1960 char *yydest;
1961 const char *yysrc;
1962#endif
1963{
1964 char *yyd = yydest;
1965 const char *yys = yysrc;
1966
1967 while ((*yyd++ = *yys++) != '\0')
1968 continue;
1969
1970 return yyd - 1;
1971}
1972# endif
1973# endif
1974
1975# ifndef yytnamerr
1976/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1977 quotes and backslashes, so that it's suitable for yyerror. The
1978 heuristic is that double-quoting is unnecessary unless the string
1979 contains an apostrophe, a comma, or backslash (other than
1980 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1981 null, do not copy; instead, return the length of what the result
1982 would have been. */
1983static YYSIZE_T
1984yytnamerr (char *yyres, const char *yystr)
1985{
1986 if (*yystr == '"')
1987 {
1988 YYSIZE_T yyn = 0;
1989 char const *yyp = yystr;
1990
1991 for (;;)
1992 switch (*++yyp)
1993 {
1994 case '\'':
1995 case ',':
1996 goto do_not_strip_quotes;
1997
1998 case '\\':
1999 if (*++yyp != '\\')
2000 goto do_not_strip_quotes;
2001 /* Fall through. */
2002 default:
2003 if (yyres)
2004 yyres[yyn] = *yyp;
2005 yyn++;
2006 break;
2007
2008 case '"':
2009 if (yyres)
2010 yyres[yyn] = '\0';
2011 return yyn;
2012 }
2013 do_not_strip_quotes: ;
2014 }
2015
2016 if (! yyres)
2017 return yystrlen (yystr);
2018
2019 return yystpcpy (yyres, yystr) - yyres;
2020}
2021# endif
2022
2023/* Copy into YYRESULT an error message about the unexpected token
2024 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2025 including the terminating null byte. If YYRESULT is null, do not
2026 copy anything; just return the number of bytes that would be
2027 copied. As a special case, return 0 if an ordinary "syntax error"
2028 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2029 size calculation. */
2030static YYSIZE_T
2031yysyntax_error (char *yyresult, int yystate, int yychar)
2032{
2033 int yyn = yypact[yystate];
2034
2035 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2036 return 0;
2037 else
2038 {
2039 int yytype = YYTRANSLATE (yychar);
2040 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2041 YYSIZE_T yysize = yysize0;
2042 YYSIZE_T yysize1;
2043 int yysize_overflow = 0;
2044 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2045 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2046 int yyx;
2047
2048# if 0
2049 /* This is so xgettext sees the translatable formats that are
2050 constructed on the fly. */
2051 YY_("syntax error, unexpected %s");
2052 YY_("syntax error, unexpected %s, expecting %s");
2053 YY_("syntax error, unexpected %s, expecting %s or %s");
2054 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2055 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2056# endif
2057 char *yyfmt;
2058 char const *yyf;
2059 static char const yyunexpected[] = "syntax error, unexpected %s";
2060 static char const yyexpecting[] = ", expecting %s";
2061 static char const yyor[] = " or %s";
2062 char yyformat[sizeof yyunexpected
2063 + sizeof yyexpecting - 1
2064 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2065 * (sizeof yyor - 1))];
2066 char const *yyprefix = yyexpecting;
2067
2068 /* Start YYX at -YYN if negative to avoid negative indexes in
2069 YYCHECK. */
2070 int yyxbegin = yyn < 0 ? -yyn : 0;
2071
2072 /* Stay within bounds of both yycheck and yytname. */
2073 int yychecklim = YYLAST - yyn + 1;
2074 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2075 int yycount = 1;
2076
2077 yyarg[0] = yytname[yytype];
2078 yyfmt = yystpcpy (yyformat, yyunexpected);
2079
2080 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2081 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2082 {
2083 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2084 {
2085 yycount = 1;
2086 yysize = yysize0;
2087 yyformat[sizeof yyunexpected - 1] = '\0';
2088 break;
2089 }
2090 yyarg[yycount++] = yytname[yyx];
2091 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2092 yysize_overflow |= (yysize1 < yysize);
2093 yysize = yysize1;
2094 yyfmt = yystpcpy (yyfmt, yyprefix);
2095 yyprefix = yyor;
2096 }
2097
2098 yyf = YY_(yyformat);
2099 yysize1 = yysize + yystrlen (yyf);
2100 yysize_overflow |= (yysize1 < yysize);
2101 yysize = yysize1;
2102
2103 if (yysize_overflow)
2104 return YYSIZE_MAXIMUM;
2105
2106 if (yyresult)
2107 {
2108 /* Avoid sprintf, as that infringes on the user's name space.
2109 Don't have undefined behavior even if the translation
2110 produced a string with the wrong number of "%s"s. */
2111 char *yyp = yyresult;
2112 int yyi = 0;
2113 while ((*yyp = *yyf) != '\0')
2114 {
2115 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2116 {
2117 yyp += yytnamerr (yyp, yyarg[yyi++]);
2118 yyf += 2;
2119 }
2120 else
2121 {
2122 yyp++;
2123 yyf++;
2124 }
2125 }
2126 }
2127 return yysize;
2128 }
2129}
2130#endif /* YYERROR_VERBOSE */
2131
2132
2133/*-----------------------------------------------.
2134| Release the memory associated to this symbol. |
2135`-----------------------------------------------*/
2136
2137/*ARGSUSED*/
2138#if (defined __STDC__ || defined __C99__FUNC__ \
2139 || defined __cplusplus || defined _MSC_VER)
2140static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002141yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context)
John Bauman66b8ab22014-05-06 15:57:45 -04002142#else
2143static void
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002144yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
John Bauman66b8ab22014-05-06 15:57:45 -04002145 const char *yymsg;
2146 int yytype;
2147 YYSTYPE *yyvaluep;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002148 YYLTYPE *yylocationp;
John Bauman66b8ab22014-05-06 15:57:45 -04002149 TParseContext* context;
2150#endif
2151{
2152 YYUSE (yyvaluep);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002153 YYUSE (yylocationp);
John Bauman66b8ab22014-05-06 15:57:45 -04002154 YYUSE (context);
2155
2156 if (!yymsg)
2157 yymsg = "Deleting";
2158 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2159
2160 switch (yytype)
2161 {
2162
2163 default:
2164 break;
2165 }
2166}
2167
2168/* Prevent warnings from -Wmissing-prototypes. */
2169#ifdef YYPARSE_PARAM
2170#if defined __STDC__ || defined __cplusplus
2171int yyparse (void *YYPARSE_PARAM);
2172#else
2173int yyparse ();
2174#endif
2175#else /* ! YYPARSE_PARAM */
2176#if defined __STDC__ || defined __cplusplus
2177int yyparse (TParseContext* context);
2178#else
2179int yyparse ();
2180#endif
2181#endif /* ! YYPARSE_PARAM */
2182
2183
2184
2185
2186
2187/*-------------------------.
2188| yyparse or yypush_parse. |
2189`-------------------------*/
2190
2191#ifdef YYPARSE_PARAM
2192#if (defined __STDC__ || defined __C99__FUNC__ \
2193 || defined __cplusplus || defined _MSC_VER)
2194int
2195yyparse (void *YYPARSE_PARAM)
2196#else
2197int
2198yyparse (YYPARSE_PARAM)
2199 void *YYPARSE_PARAM;
2200#endif
2201#else /* ! YYPARSE_PARAM */
2202#if (defined __STDC__ || defined __C99__FUNC__ \
2203 || defined __cplusplus || defined _MSC_VER)
2204int
2205yyparse (TParseContext* context)
2206#else
2207int
2208yyparse (context)
2209 TParseContext* context;
2210#endif
2211#endif
2212{
2213/* The lookahead symbol. */
2214int yychar;
2215
2216/* The semantic value of the lookahead symbol. */
2217YYSTYPE yylval;
2218
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002219/* Location data for the lookahead symbol. */
2220YYLTYPE yylloc;
2221
John Bauman66b8ab22014-05-06 15:57:45 -04002222 /* Number of syntax errors so far. */
2223 int yynerrs;
2224
2225 int yystate;
2226 /* Number of tokens to shift before error messages enabled. */
2227 int yyerrstatus;
2228
2229 /* The stacks and their tools:
2230 `yyss': related to states.
2231 `yyvs': related to semantic values.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002232 `yyls': related to locations.
John Bauman66b8ab22014-05-06 15:57:45 -04002233
2234 Refer to the stacks thru separate pointers, to allow yyoverflow
2235 to reallocate them elsewhere. */
2236
2237 /* The state stack. */
2238 yytype_int16 yyssa[YYINITDEPTH];
2239 yytype_int16 *yyss;
2240 yytype_int16 *yyssp;
2241
2242 /* The semantic value stack. */
2243 YYSTYPE yyvsa[YYINITDEPTH];
2244 YYSTYPE *yyvs;
2245 YYSTYPE *yyvsp;
2246
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002247 /* The location stack. */
2248 YYLTYPE yylsa[YYINITDEPTH];
2249 YYLTYPE *yyls;
2250 YYLTYPE *yylsp;
2251
2252 /* The locations where the error started and ended. */
2253 YYLTYPE yyerror_range[2];
2254
John Bauman66b8ab22014-05-06 15:57:45 -04002255 YYSIZE_T yystacksize;
2256
2257 int yyn;
2258 int yyresult;
2259 /* Lookahead token as an internal (translated) token number. */
2260 int yytoken;
2261 /* The variables used to return semantic value and location from the
2262 action routines. */
2263 YYSTYPE yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002264 YYLTYPE yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002265
2266#if YYERROR_VERBOSE
2267 /* Buffer for error messages, and its allocated size. */
2268 char yymsgbuf[128];
2269 char *yymsg = yymsgbuf;
2270 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2271#endif
2272
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002273#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
John Bauman66b8ab22014-05-06 15:57:45 -04002274
2275 /* The number of symbols on the RHS of the reduced rule.
2276 Keep to zero when no symbol should be popped. */
2277 int yylen = 0;
2278
2279 yytoken = 0;
2280 yyss = yyssa;
2281 yyvs = yyvsa;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002282 yyls = yylsa;
John Bauman66b8ab22014-05-06 15:57:45 -04002283 yystacksize = YYINITDEPTH;
2284
2285 YYDPRINTF ((stderr, "Starting parse\n"));
2286
2287 yystate = 0;
2288 yyerrstatus = 0;
2289 yynerrs = 0;
2290 yychar = YYEMPTY; /* Cause a token to be read. */
2291
2292 /* Initialize stack pointers.
2293 Waste one element of value and location stack
2294 so that they stay on the same level as the state stack.
2295 The wasted elements are never initialized. */
2296 yyssp = yyss;
2297 yyvsp = yyvs;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002298 yylsp = yyls;
2299
2300#if YYLTYPE_IS_TRIVIAL
2301 /* Initialize the default location before parsing starts. */
2302 yylloc.first_line = yylloc.last_line = 1;
2303 yylloc.first_column = yylloc.last_column = 1;
2304#endif
John Bauman66b8ab22014-05-06 15:57:45 -04002305
2306 goto yysetstate;
2307
2308/*------------------------------------------------------------.
2309| yynewstate -- Push a new state, which is found in yystate. |
2310`------------------------------------------------------------*/
2311 yynewstate:
2312 /* In all cases, when you get here, the value and location stacks
2313 have just been pushed. So pushing a state here evens the stacks. */
2314 yyssp++;
2315
2316 yysetstate:
2317 *yyssp = yystate;
2318
2319 if (yyss + yystacksize - 1 <= yyssp)
2320 {
2321 /* Get the current used size of the three stacks, in elements. */
2322 YYSIZE_T yysize = yyssp - yyss + 1;
2323
2324#ifdef yyoverflow
2325 {
2326 /* Give user a chance to reallocate the stack. Use copies of
2327 these so that the &'s don't force the real ones into
2328 memory. */
2329 YYSTYPE *yyvs1 = yyvs;
2330 yytype_int16 *yyss1 = yyss;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002331 YYLTYPE *yyls1 = yyls;
John Bauman66b8ab22014-05-06 15:57:45 -04002332
2333 /* Each stack pointer address is followed by the size of the
2334 data in use in that stack, in bytes. This used to be a
2335 conditional around just the two extra args, but that might
2336 be undefined if yyoverflow is a macro. */
2337 yyoverflow (YY_("memory exhausted"),
2338 &yyss1, yysize * sizeof (*yyssp),
2339 &yyvs1, yysize * sizeof (*yyvsp),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002340 &yyls1, yysize * sizeof (*yylsp),
John Bauman66b8ab22014-05-06 15:57:45 -04002341 &yystacksize);
2342
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002343 yyls = yyls1;
John Bauman66b8ab22014-05-06 15:57:45 -04002344 yyss = yyss1;
2345 yyvs = yyvs1;
2346 }
2347#else /* no yyoverflow */
2348# ifndef YYSTACK_RELOCATE
2349 goto yyexhaustedlab;
2350# else
2351 /* Extend the stack our own way. */
2352 if (YYMAXDEPTH <= yystacksize)
2353 goto yyexhaustedlab;
2354 yystacksize *= 2;
2355 if (YYMAXDEPTH < yystacksize)
2356 yystacksize = YYMAXDEPTH;
2357
2358 {
2359 yytype_int16 *yyss1 = yyss;
2360 union yyalloc *yyptr =
2361 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2362 if (! yyptr)
2363 goto yyexhaustedlab;
2364 YYSTACK_RELOCATE (yyss_alloc, yyss);
2365 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002366 YYSTACK_RELOCATE (yyls_alloc, yyls);
John Bauman66b8ab22014-05-06 15:57:45 -04002367# undef YYSTACK_RELOCATE
2368 if (yyss1 != yyssa)
2369 YYSTACK_FREE (yyss1);
2370 }
2371# endif
2372#endif /* no yyoverflow */
2373
2374 yyssp = yyss + yysize - 1;
2375 yyvsp = yyvs + yysize - 1;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002376 yylsp = yyls + yysize - 1;
John Bauman66b8ab22014-05-06 15:57:45 -04002377
2378 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2379 (unsigned long int) yystacksize));
2380
2381 if (yyss + yystacksize - 1 <= yyssp)
2382 YYABORT;
2383 }
2384
2385 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2386
2387 if (yystate == YYFINAL)
2388 YYACCEPT;
2389
2390 goto yybackup;
2391
2392/*-----------.
2393| yybackup. |
2394`-----------*/
2395yybackup:
2396
2397 /* Do appropriate processing given the current state. Read a
2398 lookahead token if we need one and don't already have one. */
2399
2400 /* First try to decide what to do without reference to lookahead token. */
2401 yyn = yypact[yystate];
2402 if (yyn == YYPACT_NINF)
2403 goto yydefault;
2404
2405 /* Not known => get a lookahead token if don't already have one. */
2406
2407 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2408 if (yychar == YYEMPTY)
2409 {
2410 YYDPRINTF ((stderr, "Reading a token: "));
2411 yychar = YYLEX;
2412 }
2413
2414 if (yychar <= YYEOF)
2415 {
2416 yychar = yytoken = YYEOF;
2417 YYDPRINTF ((stderr, "Now at end of input.\n"));
2418 }
2419 else
2420 {
2421 yytoken = YYTRANSLATE (yychar);
2422 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2423 }
2424
2425 /* If the proper action on seeing token YYTOKEN is to reduce or to
2426 detect an error, take that action. */
2427 yyn += yytoken;
2428 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2429 goto yydefault;
2430 yyn = yytable[yyn];
2431 if (yyn <= 0)
2432 {
2433 if (yyn == 0 || yyn == YYTABLE_NINF)
2434 goto yyerrlab;
2435 yyn = -yyn;
2436 goto yyreduce;
2437 }
2438
2439 /* Count tokens shifted since error; after three, turn off error
2440 status. */
2441 if (yyerrstatus)
2442 yyerrstatus--;
2443
2444 /* Shift the lookahead token. */
2445 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2446
2447 /* Discard the shifted token. */
2448 yychar = YYEMPTY;
2449
2450 yystate = yyn;
2451 *++yyvsp = yylval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002452 *++yylsp = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04002453 goto yynewstate;
2454
2455
2456/*-----------------------------------------------------------.
2457| yydefault -- do the default action for the current state. |
2458`-----------------------------------------------------------*/
2459yydefault:
2460 yyn = yydefact[yystate];
2461 if (yyn == 0)
2462 goto yyerrlab;
2463 goto yyreduce;
2464
2465
2466/*-----------------------------.
2467| yyreduce -- Do a reduction. |
2468`-----------------------------*/
2469yyreduce:
2470 /* yyn is the number of a rule to reduce with. */
2471 yylen = yyr2[yyn];
2472
2473 /* If YYLEN is nonzero, implement the default value of the action:
2474 `$$ = $1'.
2475
2476 Otherwise, the following line sets YYVAL to garbage.
2477 This behavior is undocumented and Bison
2478 users should not rely upon it. Assigning to YYVAL
2479 unconditionally makes the parser a bit smaller, and it avoids a
2480 GCC warning that YYVAL may be used uninitialized. */
2481 yyval = yyvsp[1-yylen];
2482
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002483 /* Default location. */
2484 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
John Bauman66b8ab22014-05-06 15:57:45 -04002485 YY_REDUCE_PRINT (yyn);
2486 switch (yyn)
2487 {
2488 case 2:
2489
2490 {
2491 // The symbol table search was done in the lexical phase
Alexis Hetu76079bc2015-07-08 08:29:36 -04002492 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 -04002493
2494 // don't delete $1.string, it's used by error recovery, and the pool
2495 // pop will reclaim the memory
2496
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05002497 if (variable->getType().getQualifier() == EvqConstExpr ) {
John Bauman66b8ab22014-05-06 15:57:45 -04002498 ConstantUnion* constArray = variable->getConstPointer();
2499 TType t(variable->getType());
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002500 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002501 } else
2502 (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2503 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002504 variable->getType(), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002505 }
2506 break;
2507
2508 case 3:
2509
2510 {
2511 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2512 }
2513 break;
2514
2515 case 4:
2516
2517 {
John Bauman66b8ab22014-05-06 15:57:45 -04002518 ConstantUnion *unionArray = new ConstantUnion[1];
2519 unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002520 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002521 }
2522 break;
2523
2524 case 5:
2525
2526 {
2527 ConstantUnion *unionArray = new ConstantUnion[1];
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002528 unionArray->setUConst((yyvsp[(1) - (1)].lex).u);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002529 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002530 }
2531 break;
2532
2533 case 6:
2534
2535 {
2536 ConstantUnion *unionArray = new ConstantUnion[1];
John Bauman66b8ab22014-05-06 15:57:45 -04002537 unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002538 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002539 }
2540 break;
2541
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002542 case 7:
John Bauman66b8ab22014-05-06 15:57:45 -04002543
2544 {
2545 ConstantUnion *unionArray = new ConstantUnion[1];
2546 unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002547 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConstExpr), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002548 }
2549 break;
2550
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002551 case 8:
John Bauman66b8ab22014-05-06 15:57:45 -04002552
2553 {
2554 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2555 }
2556 break;
2557
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002558 case 9:
John Bauman66b8ab22014-05-06 15:57:45 -04002559
2560 {
2561 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2562 }
2563 break;
2564
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002565 case 10:
John Bauman66b8ab22014-05-06 15:57:45 -04002566
2567 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002568 (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 -04002569 }
2570 break;
2571
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002572 case 11:
John Bauman66b8ab22014-05-06 15:57:45 -04002573
2574 {
2575 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2576 }
2577 break;
2578
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002579 case 12:
John Bauman66b8ab22014-05-06 15:57:45 -04002580
2581 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002582 (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 -04002583 }
2584 break;
2585
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002586 case 13:
John Bauman66b8ab22014-05-06 15:57:45 -04002587
2588 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002589 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002590 }
2591 break;
2592
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002593 case 14:
John Bauman66b8ab22014-05-06 15:57:45 -04002594
2595 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002596 (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002597 }
2598 break;
2599
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002600 case 15:
John Bauman66b8ab22014-05-06 15:57:45 -04002601
2602 {
2603 if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
2604 context->recover();
2605 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2606 }
2607 break;
2608
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002609 case 16:
John Bauman66b8ab22014-05-06 15:57:45 -04002610
2611 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002612 bool fatalError = false;
2613 (yyval.interm.intermTypedNode) = context->addFunctionCallOrMethod((yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode, nullptr, (yylsp[(1) - (1)]), &fatalError);
2614 if (fatalError)
John Bauman66b8ab22014-05-06 15:57:45 -04002615 {
Alexis Hetub3ff42c2015-07-03 18:19:57 -04002616 YYERROR;
John Bauman66b8ab22014-05-06 15:57:45 -04002617 }
John Bauman66b8ab22014-05-06 15:57:45 -04002618 }
2619 break;
2620
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002621 case 17:
John Bauman66b8ab22014-05-06 15:57:45 -04002622
2623 {
2624 (yyval.interm) = (yyvsp[(1) - (1)].interm);
2625 }
2626 break;
2627
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002628 case 18:
John Bauman66b8ab22014-05-06 15:57:45 -04002629
2630 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002631 context->error((yylsp[(3) - (3)]), "methods are not supported", "");
John Bauman66b8ab22014-05-06 15:57:45 -04002632 context->recover();
2633 (yyval.interm) = (yyvsp[(3) - (3)].interm);
2634 }
2635 break;
2636
John Bauman66b8ab22014-05-06 15:57:45 -04002637 case 19:
2638
2639 {
2640 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002641 (yyval.interm).line = (yylsp[(2) - (2)]);
John Bauman66b8ab22014-05-06 15:57:45 -04002642 }
2643 break;
2644
2645 case 20:
2646
2647 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002648 (yyval.interm) = (yyvsp[(1) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002649 (yyval.interm).line = (yylsp[(2) - (2)]);
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002650 }
2651 break;
2652
2653 case 21:
2654
2655 {
John Bauman66b8ab22014-05-06 15:57:45 -04002656 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2657 (yyval.interm).intermNode = 0;
2658 }
2659 break;
2660
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002661 case 22:
John Bauman66b8ab22014-05-06 15:57:45 -04002662
2663 {
2664 (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
2665 (yyval.interm).intermNode = 0;
2666 }
2667 break;
2668
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002669 case 23:
John Bauman66b8ab22014-05-06 15:57:45 -04002670
2671 {
2672 TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2673 (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2674 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2675 (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
2676 }
2677 break;
2678
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002679 case 24:
John Bauman66b8ab22014-05-06 15:57:45 -04002680
2681 {
2682 TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2683 (yyvsp[(1) - (3)].interm).function->addParameter(param);
2684 (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002685 (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 -04002686 }
2687 break;
2688
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002689 case 25:
John Bauman66b8ab22014-05-06 15:57:45 -04002690
2691 {
2692 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2693 }
2694 break;
2695
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002696 case 26:
John Bauman66b8ab22014-05-06 15:57:45 -04002697
2698 {
Alexis Hetue5246692015-06-18 12:34:52 -04002699 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002700 ES3_ONLY("[]", (yylsp[(1) - (1)]), "array constructor");
John Bauman66b8ab22014-05-06 15:57:45 -04002701 }
Alexis Hetue5246692015-06-18 12:34:52 -04002702 (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
John Bauman66b8ab22014-05-06 15:57:45 -04002703 }
2704 break;
2705
John Bauman66b8ab22014-05-06 15:57:45 -04002706 case 27:
2707
2708 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002709 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04002710 context->recover();
2711 TType type(EbtVoid, EbpUndefined);
2712 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2713 (yyval.interm.function) = function;
2714 }
2715 break;
2716
2717 case 28:
2718
2719 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002720 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002721 context->recover();
2722 TType type(EbtVoid, EbpUndefined);
2723 TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2724 (yyval.interm.function) = function;
John Bauman66b8ab22014-05-06 15:57:45 -04002725 }
2726 break;
2727
2728 case 29:
2729
2730 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002731 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2732 }
2733 break;
2734
2735 case 30:
2736
2737 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002738 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002739 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002740 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002741 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002742 context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002743 context->recover();
2744 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2745 }
2746 }
2747 break;
2748
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002749 case 31:
John Bauman66b8ab22014-05-06 15:57:45 -04002750
2751 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002752 if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04002753 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002754 (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04002755 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002756 context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002757 context->recover();
2758 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2759 }
2760 }
2761 break;
2762
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002763 case 32:
John Bauman66b8ab22014-05-06 15:57:45 -04002764
2765 {
2766 if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002767 (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 -04002768 if ((yyval.interm.intermTypedNode) == 0) {
2769 const char* errorOp = "";
2770 switch((yyvsp[(1) - (2)].interm).op) {
2771 case EOpNegative: errorOp = "-"; break;
2772 case EOpLogicalNot: errorOp = "!"; break;
Alexis Hetud061e422015-05-13 16:37:50 -04002773 case EOpBitwiseNot: errorOp = "~"; break;
John Bauman66b8ab22014-05-06 15:57:45 -04002774 default: break;
2775 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002776 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04002777 context->recover();
2778 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2779 }
2780 } else
2781 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2782 }
2783 break;
2784
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002785 case 33:
John Bauman66b8ab22014-05-06 15:57:45 -04002786
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002787 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNull; }
John Bauman66b8ab22014-05-06 15:57:45 -04002788 break;
2789
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002790 case 34:
John Bauman66b8ab22014-05-06 15:57:45 -04002791
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002792 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpNegative; }
John Bauman66b8ab22014-05-06 15:57:45 -04002793 break;
2794
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002795 case 35:
John Bauman66b8ab22014-05-06 15:57:45 -04002796
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002797 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpLogicalNot; }
John Bauman66b8ab22014-05-06 15:57:45 -04002798 break;
2799
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002800 case 36:
John Bauman66b8ab22014-05-06 15:57:45 -04002801
Alexis Hetu17809052015-05-13 11:28:22 -04002802 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002803 ES3_ONLY("~", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002804 (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseNot;
Alexis Hetu17809052015-05-13 11:28:22 -04002805 }
John Bauman66b8ab22014-05-06 15:57:45 -04002806 break;
2807
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002808 case 37:
John Bauman66b8ab22014-05-06 15:57:45 -04002809
Alexis Hetu17809052015-05-13 11:28:22 -04002810 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2811 break;
2812
2813 case 38:
2814
John Bauman66b8ab22014-05-06 15:57:45 -04002815 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002816 FRAG_VERT_ONLY("*", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002817 (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 -04002818 }
2819 break;
2820
Alexis Hetu17809052015-05-13 11:28:22 -04002821 case 39:
John Bauman66b8ab22014-05-06 15:57:45 -04002822
2823 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002824 FRAG_VERT_ONLY("/", (yylsp[(2) - (3)]));
Alexis Hetub4769582015-06-16 12:19:50 -04002825 (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 -04002826 }
2827 break;
2828
Alexis Hetu17809052015-05-13 11:28:22 -04002829 case 40:
2830
2831 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04002832 FRAG_VERT_ONLY("%", (yylsp[(2) - (3)]));
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002833 ES3_ONLY("%", (yylsp[(2) - (3)]), "integer modulus operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002834 (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 -04002835 }
2836 break;
2837
2838 case 41:
John Bauman66b8ab22014-05-06 15:57:45 -04002839
2840 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2841 break;
2842
Alexis Hetu17809052015-05-13 11:28:22 -04002843 case 42:
John Bauman66b8ab22014-05-06 15:57:45 -04002844
2845 {
Alexis Hetub4769582015-06-16 12:19:50 -04002846 (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 -04002847 }
2848 break;
2849
Alexis Hetu17809052015-05-13 11:28:22 -04002850 case 43:
John Bauman66b8ab22014-05-06 15:57:45 -04002851
2852 {
Alexis Hetub4769582015-06-16 12:19:50 -04002853 (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 -04002854 }
2855 break;
2856
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002857 case 44:
2858
Alexis Hetu17809052015-05-13 11:28:22 -04002859 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2860 break;
2861
2862 case 45:
2863
2864 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002865 ES3_ONLY("<<", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002866 (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 -04002867 }
2868 break;
2869
2870 case 46:
2871
2872 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002873 ES3_ONLY(">>", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002874 (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 -04002875 }
2876 break;
2877
2878 case 47:
2879
2880 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2881 break;
2882
2883 case 48:
2884
John Bauman66b8ab22014-05-06 15:57:45 -04002885 {
Alexis Hetub4769582015-06-16 12:19:50 -04002886 (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 -04002887 }
2888 break;
2889
Alexis Hetu17809052015-05-13 11:28:22 -04002890 case 49:
John Bauman66b8ab22014-05-06 15:57:45 -04002891
2892 {
Alexis Hetub4769582015-06-16 12:19:50 -04002893 (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 -04002894 }
2895 break;
2896
Alexis Hetu17809052015-05-13 11:28:22 -04002897 case 50:
John Bauman66b8ab22014-05-06 15:57:45 -04002898
2899 {
Alexis Hetub4769582015-06-16 12:19:50 -04002900 (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 -04002901 }
2902 break;
2903
Alexis Hetu17809052015-05-13 11:28:22 -04002904 case 51:
John Bauman66b8ab22014-05-06 15:57:45 -04002905
2906 {
Alexis Hetub4769582015-06-16 12:19:50 -04002907 (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 -04002908 }
2909 break;
2910
Alexis Hetu17809052015-05-13 11:28:22 -04002911 case 52:
John Bauman66b8ab22014-05-06 15:57:45 -04002912
2913 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2914 break;
2915
Alexis Hetu17809052015-05-13 11:28:22 -04002916 case 53:
John Bauman66b8ab22014-05-06 15:57:45 -04002917
2918 {
Alexis Hetub4769582015-06-16 12:19:50 -04002919 (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 -04002920 }
2921 break;
2922
Alexis Hetu17809052015-05-13 11:28:22 -04002923 case 54:
John Bauman66b8ab22014-05-06 15:57:45 -04002924
2925 {
Alexis Hetub4769582015-06-16 12:19:50 -04002926 (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 -04002927 }
2928 break;
2929
Nicolas Capens2c1239f2015-02-17 17:30:04 -05002930 case 55:
2931
Alexis Hetu17809052015-05-13 11:28:22 -04002932 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2933 break;
2934
2935 case 56:
2936
2937 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002938 ES3_ONLY("&", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002939 (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 -04002940 }
2941 break;
2942
2943 case 57:
2944
2945 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2946 break;
2947
2948 case 58:
2949
2950 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002951 ES3_ONLY("^", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002952 (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 -04002953 }
2954 break;
2955
2956 case 59:
2957
2958 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2959 break;
2960
2961 case 60:
2962
2963 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04002964 ES3_ONLY("|", (yylsp[(2) - (3)]), "bit-wise operator");
Alexis Hetub4769582015-06-16 12:19:50 -04002965 (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 -04002966 }
2967 break;
2968
2969 case 61:
2970
2971 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2972 break;
2973
2974 case 62:
2975
John Bauman66b8ab22014-05-06 15:57:45 -04002976 {
Alexis Hetub4769582015-06-16 12:19:50 -04002977 (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 -04002978 }
2979 break;
2980
Alexis Hetu17809052015-05-13 11:28:22 -04002981 case 63:
John Bauman66b8ab22014-05-06 15:57:45 -04002982
2983 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2984 break;
2985
Alexis Hetu17809052015-05-13 11:28:22 -04002986 case 64:
John Bauman66b8ab22014-05-06 15:57:45 -04002987
2988 {
Alexis Hetub4769582015-06-16 12:19:50 -04002989 (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 -04002990 }
2991 break;
2992
Alexis Hetu17809052015-05-13 11:28:22 -04002993 case 65:
John Bauman66b8ab22014-05-06 15:57:45 -04002994
2995 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2996 break;
2997
Alexis Hetu17809052015-05-13 11:28:22 -04002998 case 66:
John Bauman66b8ab22014-05-06 15:57:45 -04002999
3000 {
Alexis Hetub4769582015-06-16 12:19:50 -04003001 (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 -04003002 }
3003 break;
3004
Alexis Hetu17809052015-05-13 11:28:22 -04003005 case 67:
John Bauman66b8ab22014-05-06 15:57:45 -04003006
3007 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3008 break;
3009
Alexis Hetu17809052015-05-13 11:28:22 -04003010 case 68:
John Bauman66b8ab22014-05-06 15:57:45 -04003011
3012 {
Alexis Hetueee212e2015-07-07 17:13:30 -04003013 (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 -04003014 }
3015 break;
3016
Alexis Hetu17809052015-05-13 11:28:22 -04003017 case 69:
John Bauman66b8ab22014-05-06 15:57:45 -04003018
3019 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3020 break;
3021
Alexis Hetu17809052015-05-13 11:28:22 -04003022 case 70:
John Bauman66b8ab22014-05-06 15:57:45 -04003023
3024 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003025 if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04003026 context->recover();
Alexis Hetue5246692015-06-18 12:34:52 -04003027 (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 -04003028 }
3029 break;
3030
Alexis Hetu17809052015-05-13 11:28:22 -04003031 case 71:
John Bauman66b8ab22014-05-06 15:57:45 -04003032
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003033 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003034 break;
3035
Alexis Hetu17809052015-05-13 11:28:22 -04003036 case 72:
John Bauman66b8ab22014-05-06 15:57:45 -04003037
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003038 { FRAG_VERT_ONLY("*=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpMulAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003039 break;
3040
Alexis Hetu17809052015-05-13 11:28:22 -04003041 case 73:
John Bauman66b8ab22014-05-06 15:57:45 -04003042
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003043 { FRAG_VERT_ONLY("/=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpDivAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003044 break;
3045
Alexis Hetu17809052015-05-13 11:28:22 -04003046 case 74:
3047
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003048 { ES3_ONLY("%=", (yylsp[(1) - (1)]), "integer modulus operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003049 FRAG_VERT_ONLY("%=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpIModAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003050 break;
3051
3052 case 75:
John Bauman66b8ab22014-05-06 15:57:45 -04003053
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003054 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpAddAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003055 break;
3056
Alexis Hetu17809052015-05-13 11:28:22 -04003057 case 76:
John Bauman66b8ab22014-05-06 15:57:45 -04003058
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003059 { (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpSubAssign; }
John Bauman66b8ab22014-05-06 15:57:45 -04003060 break;
3061
Alexis Hetu17809052015-05-13 11:28:22 -04003062 case 77:
3063
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003064 { ES3_ONLY("<<=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003065 FRAG_VERT_ONLY("<<=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftLeftAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003066 break;
3067
3068 case 78:
3069
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003070 { ES3_ONLY(">>=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003071 FRAG_VERT_ONLY(">>=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitShiftRightAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003072 break;
3073
3074 case 79:
3075
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003076 { ES3_ONLY("&=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003077 FRAG_VERT_ONLY("&=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseAndAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003078 break;
3079
3080 case 80:
3081
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003082 { ES3_ONLY("^=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003083 FRAG_VERT_ONLY("^=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseXorAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003084 break;
3085
3086 case 81:
3087
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003088 { ES3_ONLY("|=", (yylsp[(1) - (1)]), "bit-wise operator");
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003089 FRAG_VERT_ONLY("|=", (yylsp[(1) - (1)])); (yyval.interm).line = (yylsp[(1) - (1)]); (yyval.interm).op = EOpBitwiseOrAssign; }
Alexis Hetu17809052015-05-13 11:28:22 -04003090 break;
3091
3092 case 82:
John Bauman66b8ab22014-05-06 15:57:45 -04003093
3094 {
3095 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3096 }
3097 break;
3098
Alexis Hetu17809052015-05-13 11:28:22 -04003099 case 83:
John Bauman66b8ab22014-05-06 15:57:45 -04003100
3101 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003102 (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 -04003103 if ((yyval.interm.intermTypedNode) == 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003104 context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
John Bauman66b8ab22014-05-06 15:57:45 -04003105 context->recover();
3106 (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3107 }
3108 }
3109 break;
3110
Alexis Hetu17809052015-05-13 11:28:22 -04003111 case 84:
John Bauman66b8ab22014-05-06 15:57:45 -04003112
3113 {
3114 if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3115 context->recover();
3116 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3117 }
3118 break;
3119
Alexis Hetu17809052015-05-13 11:28:22 -04003120 case 85:
John Bauman66b8ab22014-05-06 15:57:45 -04003121
3122 {
Alexis Hetue5246692015-06-18 12:34:52 -04003123 if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string))
Alexis Hetua35d8232015-06-11 17:11:06 -04003124 context->recover();
3125 (yyval.lex) = (yyvsp[(1) - (2)].lex);
3126 }
3127 break;
3128
3129 case 86:
3130
3131 {
John Bauman66b8ab22014-05-06 15:57:45 -04003132 TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3133
3134 TIntermAggregate *prototype = new TIntermAggregate;
3135 prototype->setType(function.getReturnType());
3136 prototype->setName(function.getName());
3137
Alexis Hetu76a343a2015-06-04 17:21:22 -04003138 for (size_t i = 0; i < function.getParamCount(); i++)
John Bauman66b8ab22014-05-06 15:57:45 -04003139 {
3140 const TParameter &param = function.getParam(i);
3141 if (param.name != 0)
3142 {
John Baumand4ae8632014-05-06 16:18:33 -04003143 TVariable variable(param.name, *param.type);
John Bauman66b8ab22014-05-06 15:57:45 -04003144
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003145 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 -04003146 }
3147 else
3148 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003149 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003150 }
3151 }
3152
3153 prototype->setOp(EOpPrototype);
3154 (yyval.interm.intermNode) = prototype;
3155
3156 context->symbolTable.pop();
3157 }
3158 break;
3159
Alexis Hetua35d8232015-06-11 17:11:06 -04003160 case 87:
John Bauman66b8ab22014-05-06 15:57:45 -04003161
3162 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003163 TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3164 if (aggNode && aggNode->getOp() == EOpNull)
3165 aggNode->setOp(EOpDeclaration);
3166 (yyval.interm.intermNode) = aggNode;
John Bauman66b8ab22014-05-06 15:57:45 -04003167 }
3168 break;
3169
Alexis Hetua35d8232015-06-11 17:11:06 -04003170 case 88:
John Bauman66b8ab22014-05-06 15:57:45 -04003171
3172 {
John Baumand4ae8632014-05-06 16:18:33 -04003173 if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003174 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 -04003175 context->recover();
3176 }
John Bauman66b8ab22014-05-06 15:57:45 -04003177 (yyval.interm.intermNode) = 0;
3178 }
3179 break;
3180
Alexis Hetua35d8232015-06-11 17:11:06 -04003181 case 89:
3182
3183 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003184 ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003185 (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 -04003186 }
3187 break;
3188
3189 case 90:
3190
3191 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003192 ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003193 (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 -04003194 }
3195 break;
3196
3197 case 91:
3198
3199 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003200 ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
Alexis Hetue5246692015-06-18 12:34:52 -04003201 (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 -04003202 }
3203 break;
3204
3205 case 92:
3206
3207 {
3208 context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3209 (yyval.interm.intermNode) = 0;
3210 }
3211 break;
3212
3213 case 93:
John Bauman66b8ab22014-05-06 15:57:45 -04003214
3215 {
3216 //
3217 // Multiple declarations of the same function are allowed.
3218 //
3219 // If this is a definition, the definition production code will check for redefinitions
3220 // (we don't know at this point if it's a definition or not).
3221 //
3222 // Redeclarations are allowed. But, return types and parameter qualifiers must match.
3223 //
Alexis Hetu0a655842015-06-22 16:52:11 -04003224 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04003225 if (prevDec) {
3226 if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003227 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 -04003228 context->recover();
3229 }
Alexis Hetu76a343a2015-06-04 17:21:22 -04003230 for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
John Bauman66b8ab22014-05-06 15:57:45 -04003231 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003232 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 -04003233 context->recover();
3234 }
3235 }
3236 }
3237
3238 //
3239 // If this is a redeclaration, it could also be a definition,
3240 // in which case, we want to use the variable names from this one, and not the one that's
3241 // being redeclared. So, pass back up this declaration, not the one in the symbol table.
3242 //
3243 (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003244 (yyval.interm).line = (yylsp[(2) - (2)]);
John Bauman66b8ab22014-05-06 15:57:45 -04003245
3246 // We're at the inner scope level of the function's arguments and body statement.
3247 // Add the function prototype to the surrounding scope instead.
3248 context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
3249 }
3250 break;
3251
Alexis Hetua35d8232015-06-11 17:11:06 -04003252 case 94:
John Bauman66b8ab22014-05-06 15:57:45 -04003253
3254 {
3255 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3256 }
3257 break;
3258
Alexis Hetua35d8232015-06-11 17:11:06 -04003259 case 95:
John Bauman66b8ab22014-05-06 15:57:45 -04003260
3261 {
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003262 (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3263 }
3264 break;
3265
Alexis Hetua35d8232015-06-11 17:11:06 -04003266 case 96:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003267
3268 {
John Bauman66b8ab22014-05-06 15:57:45 -04003269 // Add the parameter
3270 (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3271 if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3272 (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3273 else
3274 delete (yyvsp[(2) - (2)].interm).param.type;
3275 }
3276 break;
3277
Alexis Hetua35d8232015-06-11 17:11:06 -04003278 case 97:
John Bauman66b8ab22014-05-06 15:57:45 -04003279
3280 {
3281 //
3282 // Only first parameter of one-parameter functions can be void
3283 // The check for named parameters not being void is done in parameter_declarator
3284 //
3285 if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3286 //
3287 // This parameter > first is void
3288 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003289 context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
John Bauman66b8ab22014-05-06 15:57:45 -04003290 context->recover();
3291 delete (yyvsp[(3) - (3)].interm).param.type;
3292 } else {
3293 // Add the parameter
3294 (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3295 (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3296 }
3297 }
3298 break;
3299
Alexis Hetua35d8232015-06-11 17:11:06 -04003300 case 98:
John Bauman66b8ab22014-05-06 15:57:45 -04003301
3302 {
3303 if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003304 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 -04003305 context->recover();
3306 }
3307 // make sure a sampler is not involved as well...
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003308 if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003309 context->recover();
3310
3311 // Add the function as a prototype after parsing it (we do not support recursion)
3312 TFunction *function;
3313 TType type((yyvsp[(1) - (3)].interm.type));
3314 function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3315 (yyval.interm.function) = function;
3316
3317 context->symbolTable.push();
3318 }
3319 break;
3320
Alexis Hetua35d8232015-06-11 17:11:06 -04003321 case 99:
John Bauman66b8ab22014-05-06 15:57:45 -04003322
3323 {
3324 if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003325 context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04003326 context->recover();
3327 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003328 if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003329 context->recover();
3330 TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003331 (yyval.interm).line = (yylsp[(2) - (2)]);
John Bauman66b8ab22014-05-06 15:57:45 -04003332 (yyval.interm).param = param;
3333 }
3334 break;
3335
Alexis Hetua35d8232015-06-11 17:11:06 -04003336 case 100:
John Bauman66b8ab22014-05-06 15:57:45 -04003337
3338 {
3339 // Check that we can make an array out of this type
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003340 if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003341 context->recover();
3342
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003343 if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04003344 context->recover();
3345
3346 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003347 if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003348 context->recover();
3349 (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3350
3351 TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3352 TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003353 (yyval.interm).line = (yylsp[(2) - (5)]);
John Bauman66b8ab22014-05-06 15:57:45 -04003354 (yyval.interm).param = param;
3355 }
3356 break;
3357
Alexis Hetu17809052015-05-13 11:28:22 -04003358 case 101:
John Bauman66b8ab22014-05-06 15:57:45 -04003359
3360 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003361 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003362 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 -04003363 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003364 }
3365 break;
3366
Alexis Hetu17809052015-05-13 11:28:22 -04003367 case 102:
John Bauman66b8ab22014-05-06 15:57:45 -04003368
3369 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003370 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003371 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003372 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003373 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003374 context->recover();
John Bauman66b8ab22014-05-06 15:57:45 -04003375 }
3376 break;
3377
Alexis Hetu17809052015-05-13 11:28:22 -04003378 case 103:
John Bauman66b8ab22014-05-06 15:57:45 -04003379
3380 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003381 (yyval.interm) = (yyvsp[(3) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003382 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 -04003383 context->recover();
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003384 }
3385 break;
3386
Alexis Hetu17809052015-05-13 11:28:22 -04003387 case 104:
Nicolas Capens2c1239f2015-02-17 17:30:04 -05003388
3389 {
Alexis Hetua35d8232015-06-11 17:11:06 -04003390 (yyval.interm) = (yyvsp[(2) - (2)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003391 if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003392 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003393 if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
Alexis Hetua35d8232015-06-11 17:11:06 -04003394 context->recover();
3395 }
3396 break;
3397
3398 case 105:
3399
3400 {
3401 (yyval.interm.qualifier) = EvqIn;
3402 }
3403 break;
3404
3405 case 106:
3406
3407 {
3408 (yyval.interm.qualifier) = EvqIn;
3409 }
3410 break;
3411
3412 case 107:
3413
3414 {
3415 (yyval.interm.qualifier) = EvqOut;
3416 }
3417 break;
3418
3419 case 108:
3420
3421 {
3422 (yyval.interm.qualifier) = EvqInOut;
3423 }
3424 break;
3425
3426 case 109:
3427
3428 {
John Bauman66b8ab22014-05-06 15:57:45 -04003429 TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3430 (yyval.interm).param = param;
3431 }
3432 break;
3433
Alexis Hetua35d8232015-06-11 17:11:06 -04003434 case 110:
John Bauman66b8ab22014-05-06 15:57:45 -04003435
3436 {
3437 (yyval.interm) = (yyvsp[(1) - (1)].interm);
3438 }
3439 break;
3440
Alexis Hetua35d8232015-06-11 17:11:06 -04003441 case 111:
John Bauman66b8ab22014-05-06 15:57:45 -04003442
3443 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003444 (yyval.interm) = (yyvsp[(1) - (3)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003445 (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 -04003446 }
3447 break;
3448
Alexis Hetua35d8232015-06-11 17:11:06 -04003449 case 112:
John Bauman66b8ab22014-05-06 15:57:45 -04003450
3451 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003452 (yyval.interm) = (yyvsp[(1) - (6)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003453 (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 -04003454 }
3455 break;
3456
Alexis Hetua35d8232015-06-11 17:11:06 -04003457 case 113:
John Bauman66b8ab22014-05-06 15:57:45 -04003458
3459 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003460 ES3_ONLY("[]", (yylsp[(3) - (7)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003461 (yyval.interm) = (yyvsp[(1) - (7)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003462 (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 -04003463 }
3464 break;
3465
Alexis Hetua35d8232015-06-11 17:11:06 -04003466 case 114:
John Bauman66b8ab22014-05-06 15:57:45 -04003467
3468 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003469 ES3_ONLY("=", (yylsp[(7) - (8)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003470 (yyval.interm) = (yyvsp[(1) - (8)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003471 (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 -04003472 }
3473 break;
3474
Alexis Hetua35d8232015-06-11 17:11:06 -04003475 case 115:
John Bauman66b8ab22014-05-06 15:57:45 -04003476
3477 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003478 (yyval.interm) = (yyvsp[(1) - (5)].interm);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003479 (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 -04003480 }
3481 break;
3482
Alexis Hetua35d8232015-06-11 17:11:06 -04003483 case 116:
John Bauman66b8ab22014-05-06 15:57:45 -04003484
3485 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003486 (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003487 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
John Bauman66b8ab22014-05-06 15:57:45 -04003488 }
3489 break;
3490
Alexis Hetua35d8232015-06-11 17:11:06 -04003491 case 117:
John Bauman66b8ab22014-05-06 15:57:45 -04003492
3493 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003494 (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003495 (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
John Bauman66b8ab22014-05-06 15:57:45 -04003496 }
3497 break;
3498
Alexis Hetua35d8232015-06-11 17:11:06 -04003499 case 118:
John Bauman66b8ab22014-05-06 15:57:45 -04003500
3501 {
John Bauman66b8ab22014-05-06 15:57:45 -04003502 (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003503 (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 -04003504 }
3505 break;
3506
Alexis Hetua35d8232015-06-11 17:11:06 -04003507 case 119:
John Bauman66b8ab22014-05-06 15:57:45 -04003508
3509 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003510 ES3_ONLY("[]", (yylsp[(3) - (6)]), "implicitly sized array");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003511 (yyval.interm).type = (yyvsp[(1) - (6)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003512 (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 -04003513 }
3514 break;
3515
Alexis Hetua35d8232015-06-11 17:11:06 -04003516 case 120:
John Bauman66b8ab22014-05-06 15:57:45 -04003517
3518 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003519 ES3_ONLY("=", (yylsp[(6) - (7)]), "first-class arrays (array initializer)");
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003520 (yyval.interm).type = (yyvsp[(1) - (7)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003521 (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 -04003522 }
3523 break;
3524
Alexis Hetua35d8232015-06-11 17:11:06 -04003525 case 121:
John Bauman66b8ab22014-05-06 15:57:45 -04003526
3527 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003528 (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003529 (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 -04003530 }
3531 break;
3532
Alexis Hetua35d8232015-06-11 17:11:06 -04003533 case 122:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003534
3535 {
3536 // $$.type is not used in invariant declarations.
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003537 (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 -04003538 }
3539 break;
3540
Alexis Hetua35d8232015-06-11 17:11:06 -04003541 case 123:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003542
3543 {
John Bauman66b8ab22014-05-06 15:57:45 -04003544 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3545
3546 if ((yyvsp[(1) - (1)].interm.type).array) {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003547 ES3_ONLY("[]", (yylsp[(1) - (1)]), "first-class-array");
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003548 if (context->getShaderVersion() != 300) {
3549 (yyvsp[(1) - (1)].interm.type).clearArrayness();
3550 }
John Bauman66b8ab22014-05-06 15:57:45 -04003551 }
3552 }
3553 break;
3554
Alexis Hetua35d8232015-06-11 17:11:06 -04003555 case 124:
John Bauman66b8ab22014-05-06 15:57:45 -04003556
3557 {
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003558 (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 -04003559 }
3560 break;
3561
Alexis Hetua35d8232015-06-11 17:11:06 -04003562 case 125:
John Bauman66b8ab22014-05-06 15:57:45 -04003563
3564 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003565 (yyval.interm.type).qualifier = EvqSmooth;
John Bauman66b8ab22014-05-06 15:57:45 -04003566 }
3567 break;
3568
Alexis Hetua35d8232015-06-11 17:11:06 -04003569 case 126:
John Bauman66b8ab22014-05-06 15:57:45 -04003570
3571 {
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003572 (yyval.interm.type).qualifier = EvqFlat;
3573 }
3574 break;
3575
Alexis Hetua35d8232015-06-11 17:11:06 -04003576 case 127:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003577
3578 {
3579 (yyval.interm.qualifier) = EvqConstReadOnly;
3580 }
3581 break;
3582
Alexis Hetua35d8232015-06-11 17:11:06 -04003583 case 128:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003584
3585 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003586 VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3587 ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3588 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
John Bauman66b8ab22014-05-06 15:57:45 -04003589 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003590 (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003591 }
3592 break;
3593
Alexis Hetua35d8232015-06-11 17:11:06 -04003594 case 129:
John Bauman66b8ab22014-05-06 15:57:45 -04003595
3596 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003597 ES2_ONLY("varying", (yylsp[(1) - (1)]));
3598 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003599 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003600 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003601 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003602 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003603 (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003604 }
3605 break;
3606
Alexis Hetua35d8232015-06-11 17:11:06 -04003607 case 130:
John Bauman66b8ab22014-05-06 15:57:45 -04003608
3609 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003610 ES2_ONLY("varying", (yylsp[(1) - (2)]));
3611 if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
John Bauman66b8ab22014-05-06 15:57:45 -04003612 context->recover();
Alexis Hetu0a655842015-06-22 16:52:11 -04003613 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003614 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003615 else
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003616 (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003617 }
3618 break;
3619
Alexis Hetua35d8232015-06-11 17:11:06 -04003620 case 131:
John Bauman66b8ab22014-05-06 15:57:45 -04003621
3622 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003623 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003624 }
3625 break;
3626
Alexis Hetua35d8232015-06-11 17:11:06 -04003627 case 132:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003628
3629 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003630 (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 -04003631 }
3632 break;
3633
Alexis Hetua35d8232015-06-11 17:11:06 -04003634 case 133:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003635
3636 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003637 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 -04003638 context->recover();
3639
3640 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003641 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04003642 }
3643 break;
3644
Alexis Hetua35d8232015-06-11 17:11:06 -04003645 case 134:
John Bauman66b8ab22014-05-06 15:57:45 -04003646
3647 {
Nicolas Capens7d626792015-02-17 17:58:31 -05003648 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3649 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3650 }
3651 break;
3652
Alexis Hetua35d8232015-06-11 17:11:06 -04003653 case 135:
Nicolas Capens7d626792015-02-17 17:58:31 -05003654
3655 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003656 (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003657 (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3658 }
3659 break;
3660
Alexis Hetua35d8232015-06-11 17:11:06 -04003661 case 136:
Nicolas Capens7d626792015-02-17 17:58:31 -05003662
3663 {
Nicolas Capens31ad2aa2015-02-26 13:14:27 -05003664 (yyval.interm.type).qualifier = EvqConstExpr;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003665 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003666 }
3667 break;
3668
Alexis Hetua35d8232015-06-11 17:11:06 -04003669 case 137:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003670
3671 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003672 ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003673 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003674 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003675 }
3676 break;
3677
Alexis Hetua35d8232015-06-11 17:11:06 -04003678 case 138:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003679
3680 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003681 ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003682 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003683 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003684 }
3685 break;
3686
Alexis Hetua35d8232015-06-11 17:11:06 -04003687 case 139:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003688
3689 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003690 ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003691 if (context->getShaderType() == GL_VERTEX_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003692 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003693 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 -04003694 context->recover();
3695 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003696 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003697 (yyval.interm.type).line = (yylsp[(2) - (2)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003698 }
3699 break;
3700
Alexis Hetua35d8232015-06-11 17:11:06 -04003701 case 140:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003702
3703 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003704 ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
Alexis Hetu0a655842015-06-22 16:52:11 -04003705 if (context->getShaderType() == GL_FRAGMENT_SHADER)
Alexis Hetu42ff6b12015-06-03 16:03:48 -04003706 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003707 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 -04003708 context->recover();
3709 }
Alexis Hetu0a655842015-06-22 16:52:11 -04003710 (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003711 (yyval.interm.type).line = (yylsp[(2) - (2)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003712 }
3713 break;
3714
Alexis Hetua35d8232015-06-11 17:11:06 -04003715 case 141:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003716
3717 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003718 if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003719 context->recover();
3720 (yyval.interm.type).qualifier = EvqUniform;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003721 (yyval.interm.type).line = (yylsp[(1) - (1)]);
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003722 }
3723 break;
3724
Alexis Hetua35d8232015-06-11 17:11:06 -04003725 case 142:
Nicolas Capensa6a79ab2015-02-17 12:42:14 -05003726
3727 {
John Bauman66b8ab22014-05-06 15:57:45 -04003728 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3729
3730 if ((yyval.interm.type).precision == EbpUndefined) {
3731 (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003732 if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
John Bauman66b8ab22014-05-06 15:57:45 -04003733 context->recover();
3734 }
3735 }
3736 }
3737 break;
3738
Alexis Hetua35d8232015-06-11 17:11:06 -04003739 case 143:
John Bauman66b8ab22014-05-06 15:57:45 -04003740
3741 {
3742 (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3743 (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
3744 }
3745 break;
3746
Alexis Hetua35d8232015-06-11 17:11:06 -04003747 case 144:
John Bauman66b8ab22014-05-06 15:57:45 -04003748
3749 {
3750 (yyval.interm.precision) = EbpHigh;
3751 }
3752 break;
3753
Alexis Hetua35d8232015-06-11 17:11:06 -04003754 case 145:
John Bauman66b8ab22014-05-06 15:57:45 -04003755
3756 {
3757 (yyval.interm.precision) = EbpMedium;
3758 }
3759 break;
3760
Alexis Hetua35d8232015-06-11 17:11:06 -04003761 case 146:
John Bauman66b8ab22014-05-06 15:57:45 -04003762
3763 {
3764 (yyval.interm.precision) = EbpLow;
3765 }
3766 break;
3767
Alexis Hetua35d8232015-06-11 17:11:06 -04003768 case 147:
Nicolas Capens7d626792015-02-17 17:58:31 -05003769
3770 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003771 ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
Nicolas Capens7d626792015-02-17 17:58:31 -05003772 (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
3773 }
3774 break;
3775
Alexis Hetua35d8232015-06-11 17:11:06 -04003776 case 148:
Nicolas Capens7d626792015-02-17 17:58:31 -05003777
3778 {
3779 (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
3780 }
3781 break;
3782
Alexis Hetua35d8232015-06-11 17:11:06 -04003783 case 149:
Nicolas Capens7d626792015-02-17 17:58:31 -05003784
3785 {
3786 (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
3787 }
3788 break;
3789
Alexis Hetua35d8232015-06-11 17:11:06 -04003790 case 150:
Nicolas Capens7d626792015-02-17 17:58:31 -05003791
3792 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003793 (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05003794 }
3795 break;
3796
Alexis Hetua35d8232015-06-11 17:11:06 -04003797 case 151:
John Bauman66b8ab22014-05-06 15:57:45 -04003798
3799 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003800 (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 -04003801 }
3802 break;
3803
Alexis Hetua35d8232015-06-11 17:11:06 -04003804 case 152:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003805
3806 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003807 (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 -04003808 }
3809 break;
3810
Alexis Hetua35d8232015-06-11 17:11:06 -04003811 case 153:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003812
3813 {
John Bauman66b8ab22014-05-06 15:57:45 -04003814 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3815 }
3816 break;
3817
Alexis Hetua35d8232015-06-11 17:11:06 -04003818 case 154:
John Bauman66b8ab22014-05-06 15:57:45 -04003819
3820 {
Alexis Hetu3e9e2082015-07-03 16:20:11 -04003821 ES3_ONLY("[]", (yylsp[(2) - (3)]), "implicitly sized array");
Alexis Hetue5246692015-06-18 12:34:52 -04003822 (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type);
3823 (yyval.interm.type).setArray(true, 0);
3824 }
3825 break;
3826
3827 case 155:
3828
3829 {
John Bauman66b8ab22014-05-06 15:57:45 -04003830 (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3831
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003832 if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04003833 context->recover();
3834 else {
3835 int size;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003836 if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04003837 context->recover();
3838 (yyval.interm.type).setArray(true, size);
3839 }
3840 }
3841 break;
3842
Alexis Hetue5246692015-06-18 12:34:52 -04003843 case 156:
Alexis Hetu17809052015-05-13 11:28:22 -04003844
3845 {
3846 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003847 (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003848 }
3849 break;
3850
Alexis Hetu17809052015-05-13 11:28:22 -04003851 case 157:
3852
3853 {
3854 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003855 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003856 }
3857 break;
3858
3859 case 158:
3860
3861 {
3862 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003863 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003864 }
3865 break;
3866
3867 case 159:
3868
3869 {
3870 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003871 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetu17809052015-05-13 11:28:22 -04003872 }
3873 break;
3874
3875 case 160:
3876
3877 {
3878 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003879 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetua35d8232015-06-11 17:11:06 -04003880 }
3881 break;
3882
3883 case 161:
3884
3885 {
3886 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003887 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003888 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003889 }
3890 break;
3891
3892 case 162:
3893
3894 {
3895 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003896 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003897 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003898 }
3899 break;
3900
3901 case 163:
3902
3903 {
3904 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003905 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
3906 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003907 }
3908 break;
3909
3910 case 164:
3911
3912 {
3913 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003914 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003915 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003916 }
3917 break;
3918
3919 case 165:
3920
3921 {
3922 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003923 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003924 (yyval.interm.type).setAggregate(3);
Alexis Hetu17809052015-05-13 11:28:22 -04003925 }
3926 break;
3927
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003928 case 166:
3929
3930 {
3931 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003932 (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
3933 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003934 }
3935 break;
3936
3937 case 167:
3938
3939 {
3940 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003941 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003942 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003943 }
3944 break;
3945
3946 case 168:
3947
3948 {
3949 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003950 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003951 (yyval.interm.type).setAggregate(3);
Alexis Hetua35d8232015-06-11 17:11:06 -04003952 }
3953 break;
3954
3955 case 169:
3956
3957 {
3958 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetue5246692015-06-18 12:34:52 -04003959 (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
3960 (yyval.interm.type).setAggregate(4);
Alexis Hetua35d8232015-06-11 17:11:06 -04003961 }
3962 break;
3963
3964 case 170:
3965
3966 {
3967 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003968 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003969 (yyval.interm.type).setAggregate(2);
Alexis Hetua35d8232015-06-11 17:11:06 -04003970 }
3971 break;
3972
3973 case 171:
3974
3975 {
3976 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003977 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
Alexis Hetue5246692015-06-18 12:34:52 -04003978 (yyval.interm.type).setAggregate(3);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003979 }
3980 break;
3981
Alexis Hetua35d8232015-06-11 17:11:06 -04003982 case 172:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04003983
3984 {
Alexis Hetue5246692015-06-18 12:34:52 -04003985 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3986 (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
3987 (yyval.interm.type).setAggregate(4);
3988 }
3989 break;
3990
3991 case 173:
3992
3993 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003994 FRAG_VERT_ONLY("mat2", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04003995 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04003996 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04003997 (yyval.interm.type).setMatrix(2, 2);
John Bauman66b8ab22014-05-06 15:57:45 -04003998 }
3999 break;
4000
Alexis Hetue5246692015-06-18 12:34:52 -04004001 case 174:
John Bauman66b8ab22014-05-06 15:57:45 -04004002
4003 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004004 FRAG_VERT_ONLY("mat3", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004005 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004006 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004007 (yyval.interm.type).setMatrix(3, 3);
John Bauman66b8ab22014-05-06 15:57:45 -04004008 }
4009 break;
4010
Alexis Hetue5246692015-06-18 12:34:52 -04004011 case 175:
John Bauman66b8ab22014-05-06 15:57:45 -04004012
4013 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004014 FRAG_VERT_ONLY("mat4", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004015 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004016 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004017 (yyval.interm.type).setMatrix(4, 4);
John Bauman66b8ab22014-05-06 15:57:45 -04004018 }
4019 break;
4020
Alexis Hetue5246692015-06-18 12:34:52 -04004021 case 176:
John Bauman66b8ab22014-05-06 15:57:45 -04004022
4023 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004024 FRAG_VERT_ONLY("mat2x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004025 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004026 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004027 (yyval.interm.type).setMatrix(2, 3);
4028 }
4029 break;
4030
Alexis Hetue5246692015-06-18 12:34:52 -04004031 case 177:
Alexis Hetub14178b2015-04-13 13:23:20 -04004032
4033 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004034 FRAG_VERT_ONLY("mat3x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004035 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004036 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004037 (yyval.interm.type).setMatrix(3, 2);
4038 }
4039 break;
4040
Alexis Hetue5246692015-06-18 12:34:52 -04004041 case 178:
Alexis Hetub14178b2015-04-13 13:23:20 -04004042
4043 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004044 FRAG_VERT_ONLY("mat2x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004045 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004046 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004047 (yyval.interm.type).setMatrix(2, 4);
4048 }
4049 break;
4050
Alexis Hetue5246692015-06-18 12:34:52 -04004051 case 179:
Alexis Hetub14178b2015-04-13 13:23:20 -04004052
4053 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004054 FRAG_VERT_ONLY("mat4x2", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004055 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004056 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004057 (yyval.interm.type).setMatrix(4, 2);
4058 }
4059 break;
4060
Alexis Hetue5246692015-06-18 12:34:52 -04004061 case 180:
Alexis Hetub14178b2015-04-13 13:23:20 -04004062
4063 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004064 FRAG_VERT_ONLY("mat3x4", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004065 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004066 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004067 (yyval.interm.type).setMatrix(3, 4);
4068 }
4069 break;
4070
Alexis Hetue5246692015-06-18 12:34:52 -04004071 case 181:
Alexis Hetub14178b2015-04-13 13:23:20 -04004072
4073 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004074 FRAG_VERT_ONLY("mat4x3", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004075 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004076 (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004077 (yyval.interm.type).setMatrix(4, 3);
4078 }
4079 break;
4080
Alexis Hetue5246692015-06-18 12:34:52 -04004081 case 182:
Alexis Hetub14178b2015-04-13 13:23:20 -04004082
4083 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004084 FRAG_VERT_ONLY("sampler2D", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004085 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004086 (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004087 }
4088 break;
4089
Alexis Hetue5246692015-06-18 12:34:52 -04004090 case 183:
John Bauman66b8ab22014-05-06 15:57:45 -04004091
4092 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004093 FRAG_VERT_ONLY("samplerCube", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004094 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004095 (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004096 }
4097 break;
4098
Alexis Hetue5246692015-06-18 12:34:52 -04004099 case 184:
John Bauman66b8ab22014-05-06 15:57:45 -04004100
4101 {
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004102 if (!context->supportsExtension("GL_OES_EGL_image_external")) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004103 context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES", "");
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004104 context->recover();
4105 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004106 FRAG_VERT_ONLY("samplerExternalOES", (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004107 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004108 (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004109 }
4110 break;
4111
Alexis Hetue5246692015-06-18 12:34:52 -04004112 case 185:
Nicolas Capense9c5e4f2014-05-28 22:46:43 -04004113
4114 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004115 FRAG_VERT_ONLY("sampler3D", (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004116 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004117 (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub027aa92015-01-19 15:56:12 -05004118 }
4119 break;
4120
Alexis Hetue5246692015-06-18 12:34:52 -04004121 case 186:
Alexis Hetub14178b2015-04-13 13:23:20 -04004122
4123 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004124 FRAG_VERT_ONLY("sampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004125 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004126 (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004127 }
4128 break;
4129
Alexis Hetue5246692015-06-18 12:34:52 -04004130 case 187:
Alexis Hetub14178b2015-04-13 13:23:20 -04004131
4132 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004133 FRAG_VERT_ONLY("isampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004134 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004135 (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004136 }
4137 break;
4138
Alexis Hetue5246692015-06-18 12:34:52 -04004139 case 188:
Alexis Hetub14178b2015-04-13 13:23:20 -04004140
4141 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004142 FRAG_VERT_ONLY("isampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004143 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004144 (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004145 }
4146 break;
4147
Alexis Hetue5246692015-06-18 12:34:52 -04004148 case 189:
Alexis Hetub14178b2015-04-13 13:23:20 -04004149
4150 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004151 FRAG_VERT_ONLY("isamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004152 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004153 (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004154 }
4155 break;
4156
Alexis Hetue5246692015-06-18 12:34:52 -04004157 case 190:
Alexis Hetub14178b2015-04-13 13:23:20 -04004158
4159 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004160 FRAG_VERT_ONLY("isampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004161 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004162 (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004163 }
4164 break;
4165
Alexis Hetue5246692015-06-18 12:34:52 -04004166 case 191:
Alexis Hetub14178b2015-04-13 13:23:20 -04004167
4168 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004169 FRAG_VERT_ONLY("usampler2D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004170 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004171 (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004172 }
4173 break;
4174
Alexis Hetue5246692015-06-18 12:34:52 -04004175 case 192:
Alexis Hetub14178b2015-04-13 13:23:20 -04004176
4177 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004178 FRAG_VERT_ONLY("usampler3D", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004179 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004180 (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004181 }
4182 break;
4183
Alexis Hetue5246692015-06-18 12:34:52 -04004184 case 193:
Alexis Hetub14178b2015-04-13 13:23:20 -04004185
4186 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004187 FRAG_VERT_ONLY("usamplerCube", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004188 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004189 (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004190 }
4191 break;
4192
Alexis Hetue5246692015-06-18 12:34:52 -04004193 case 194:
Alexis Hetub14178b2015-04-13 13:23:20 -04004194
4195 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004196 FRAG_VERT_ONLY("usampler2DArray", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004197 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004198 (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004199 }
4200 break;
4201
Alexis Hetue5246692015-06-18 12:34:52 -04004202 case 195:
Alexis Hetub14178b2015-04-13 13:23:20 -04004203
4204 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004205 FRAG_VERT_ONLY("sampler2DShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004206 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004207 (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004208 }
4209 break;
4210
Alexis Hetue5246692015-06-18 12:34:52 -04004211 case 196:
Alexis Hetub14178b2015-04-13 13:23:20 -04004212
4213 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004214 FRAG_VERT_ONLY("samplerCubeShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004215 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004216 (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004217 }
4218 break;
4219
Alexis Hetue5246692015-06-18 12:34:52 -04004220 case 197:
Alexis Hetub14178b2015-04-13 13:23:20 -04004221
4222 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004223 FRAG_VERT_ONLY("sampler2DArrayShadow", (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004224 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004225 (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
Alexis Hetub14178b2015-04-13 13:23:20 -04004226 }
4227 break;
4228
Alexis Hetue5246692015-06-18 12:34:52 -04004229 case 198:
Alexis Hetub027aa92015-01-19 15:56:12 -05004230
4231 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004232 FRAG_VERT_ONLY("struct", (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004233 (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4234 (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4235 }
4236 break;
4237
Alexis Hetue5246692015-06-18 12:34:52 -04004238 case 199:
John Bauman66b8ab22014-05-06 15:57:45 -04004239
4240 {
4241 //
4242 // This is for user defined type names. The lexical phase looked up the
4243 // type.
4244 //
4245 TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4246 TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004247 (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004248 (yyval.interm.type).userDef = &structure;
4249 }
4250 break;
4251
Alexis Hetue5246692015-06-18 12:34:52 -04004252 case 200:
John Bauman66b8ab22014-05-06 15:57:45 -04004253
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004254 { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004255 break;
4256
Alexis Hetue5246692015-06-18 12:34:52 -04004257 case 201:
John Bauman66b8ab22014-05-06 15:57:45 -04004258
4259 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004260 (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 -04004261 }
4262 break;
4263
Alexis Hetue5246692015-06-18 12:34:52 -04004264 case 202:
John Bauman66b8ab22014-05-06 15:57:45 -04004265
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004266 { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004267 break;
4268
Alexis Hetue5246692015-06-18 12:34:52 -04004269 case 203:
John Bauman66b8ab22014-05-06 15:57:45 -04004270
4271 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004272 (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004273 }
4274 break;
4275
Alexis Hetue5246692015-06-18 12:34:52 -04004276 case 204:
John Bauman66b8ab22014-05-06 15:57:45 -04004277
4278 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004279 (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
John Bauman66b8ab22014-05-06 15:57:45 -04004280 }
4281 break;
4282
Alexis Hetue5246692015-06-18 12:34:52 -04004283 case 205:
John Bauman66b8ab22014-05-06 15:57:45 -04004284
4285 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004286 (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4287 for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4288 TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4289 for (unsigned int j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4290 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4291 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 -04004292 context->recover();
4293 }
4294 }
Alexis Hetua8b364b2015-06-10 11:48:40 -04004295 (yyval.interm.fieldList)->push_back((*(yyvsp[(2) - (2)].interm.fieldList))[i]);
John Bauman66b8ab22014-05-06 15:57:45 -04004296 }
4297 }
4298 break;
4299
Alexis Hetue5246692015-06-18 12:34:52 -04004300 case 206:
John Bauman66b8ab22014-05-06 15:57:45 -04004301
4302 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004303 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
John Bauman66b8ab22014-05-06 15:57:45 -04004304 }
4305 break;
4306
Alexis Hetue5246692015-06-18 12:34:52 -04004307 case 207:
John Bauman66b8ab22014-05-06 15:57:45 -04004308
4309 {
Alexis Hetuad6b8752015-06-09 16:15:30 -04004310 // ES3 Only, but errors should be handled elsewhere
4311 (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4312 (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4313 (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4314 }
4315 break;
4316
Alexis Hetue5246692015-06-18 12:34:52 -04004317 case 208:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004318
4319 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004320 (yyval.interm.fieldList) = NewPoolTFieldList();
4321 (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004322 }
4323 break;
4324
Alexis Hetue5246692015-06-18 12:34:52 -04004325 case 209:
John Bauman66b8ab22014-05-06 15:57:45 -04004326
4327 {
Alexis Hetua8b364b2015-06-10 11:48:40 -04004328 (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
John Bauman66b8ab22014-05-06 15:57:45 -04004329 }
4330 break;
4331
Alexis Hetue5246692015-06-18 12:34:52 -04004332 case 210:
John Bauman66b8ab22014-05-06 15:57:45 -04004333
4334 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004335 if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004336 context->recover();
4337
Alexis Hetua8b364b2015-06-10 11:48:40 -04004338 TType* type = new TType(EbtVoid, EbpUndefined);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004339 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004340 }
4341 break;
4342
Alexis Hetue5246692015-06-18 12:34:52 -04004343 case 211:
John Bauman66b8ab22014-05-06 15:57:45 -04004344
4345 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004346 if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
John Bauman66b8ab22014-05-06 15:57:45 -04004347 context->recover();
4348
Alexis Hetua8b364b2015-06-10 11:48:40 -04004349 TType* type = new TType(EbtVoid, EbpUndefined);
John Bauman66b8ab22014-05-06 15:57:45 -04004350 int size;
Alexis Hetua8b364b2015-06-10 11:48:40 -04004351 if (context->arraySizeErrorCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLine(), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
John Bauman66b8ab22014-05-06 15:57:45 -04004352 context->recover();
Alexis Hetua8b364b2015-06-10 11:48:40 -04004353 type->setArraySize(size);
4354
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004355 (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004356 }
4357 break;
4358
Alexis Hetue5246692015-06-18 12:34:52 -04004359 case 212:
Nicolas Capens7d626792015-02-17 17:58:31 -05004360
Alexis Hetua35d8232015-06-11 17:11:06 -04004361 { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004362 break;
4363
Alexis Hetu17809052015-05-13 11:28:22 -04004364 case 213:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004365
Alexis Hetue5246692015-06-18 12:34:52 -04004366 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004367 break;
4368
Alexis Hetu17809052015-05-13 11:28:22 -04004369 case 214:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004370
Alexis Hetue5246692015-06-18 12:34:52 -04004371 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004372 break;
4373
Alexis Hetu17809052015-05-13 11:28:22 -04004374 case 215:
Alexis Hetu55a2cbc2015-04-16 10:49:45 -04004375
Alexis Hetua35d8232015-06-11 17:11:06 -04004376 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetuad6b8752015-06-09 16:15:30 -04004377 break;
4378
4379 case 216:
4380
Alexis Hetua35d8232015-06-11 17:11:06 -04004381 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004382 break;
4383
4384 case 217:
4385
Alexis Hetua35d8232015-06-11 17:11:06 -04004386 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004387 break;
4388
4389 case 218:
4390
Alexis Hetue5246692015-06-18 12:34:52 -04004391 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004392 break;
4393
4394 case 219:
4395
Alexis Hetue5246692015-06-18 12:34:52 -04004396 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermSwitch); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004397 break;
4398
4399 case 220:
4400
Alexis Hetue5246692015-06-18 12:34:52 -04004401 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermCase); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004402 break;
4403
4404 case 221:
4405
Alexis Hetu76a343a2015-06-04 17:21:22 -04004406 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004407 break;
4408
4409 case 222:
4410
Alexis Hetue5246692015-06-18 12:34:52 -04004411 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004412 break;
4413
4414 case 223:
4415
Alexis Hetue5246692015-06-18 12:34:52 -04004416 { (yyval.interm.intermAggregate) = 0; }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004417 break;
4418
4419 case 224:
4420
Alexis Hetue5246692015-06-18 12:34:52 -04004421 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004422 break;
4423
4424 case 225:
4425
Alexis Hetue5246692015-06-18 12:34:52 -04004426 { context->symbolTable.pop(); }
4427 break;
4428
4429 case 226:
4430
Nicolas Capens7d626792015-02-17 17:58:31 -05004431 {
4432 if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4433 (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004434 (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yylsp[(5) - (5)]));
Nicolas Capens7d626792015-02-17 17:58:31 -05004435 }
4436 (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4437 }
4438 break;
4439
Alexis Hetua35d8232015-06-11 17:11:06 -04004440 case 227:
4441
Alexis Hetu76a343a2015-06-04 17:21:22 -04004442 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004443 break;
4444
4445 case 228:
4446
Alexis Hetue5246692015-06-18 12:34:52 -04004447 { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004448 break;
4449
4450 case 229:
4451
Alexis Hetue5246692015-06-18 12:34:52 -04004452 { context->symbolTable.push(); }
Alexis Hetua35d8232015-06-11 17:11:06 -04004453 break;
4454
4455 case 230:
4456
Alexis Hetue5246692015-06-18 12:34:52 -04004457 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004458 break;
4459
4460 case 231:
4461
Alexis Hetue5246692015-06-18 12:34:52 -04004462 { context->symbolTable.push(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004463 break;
4464
4465 case 232:
4466
Alexis Hetue5246692015-06-18 12:34:52 -04004467 { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4468 break;
4469
4470 case 233:
4471
John Bauman66b8ab22014-05-06 15:57:45 -04004472 {
4473 (yyval.interm.intermNode) = 0;
4474 }
4475 break;
4476
Alexis Hetue5246692015-06-18 12:34:52 -04004477 case 234:
John Bauman66b8ab22014-05-06 15:57:45 -04004478
4479 {
4480 if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4481 (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004482 (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yylsp[(3) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004483 }
4484 (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4485 }
4486 break;
4487
Alexis Hetue5246692015-06-18 12:34:52 -04004488 case 235:
John Bauman66b8ab22014-05-06 15:57:45 -04004489
4490 {
4491 (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
4492 }
4493 break;
4494
Alexis Hetue5246692015-06-18 12:34:52 -04004495 case 236:
John Bauman66b8ab22014-05-06 15:57:45 -04004496
4497 {
4498 (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
4499 }
4500 break;
4501
Alexis Hetue5246692015-06-18 12:34:52 -04004502 case 237:
John Bauman66b8ab22014-05-06 15:57:45 -04004503
4504 { (yyval.interm.intermNode) = 0; }
4505 break;
4506
Alexis Hetue5246692015-06-18 12:34:52 -04004507 case 238:
John Bauman66b8ab22014-05-06 15:57:45 -04004508
4509 { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4510 break;
4511
Alexis Hetue5246692015-06-18 12:34:52 -04004512 case 239:
John Bauman66b8ab22014-05-06 15:57:45 -04004513
4514 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004515 if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004516 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004517 (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 -04004518 }
4519 break;
4520
Alexis Hetue5246692015-06-18 12:34:52 -04004521 case 240:
John Bauman66b8ab22014-05-06 15:57:45 -04004522
4523 {
4524 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4525 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4526 }
4527 break;
4528
Alexis Hetue5246692015-06-18 12:34:52 -04004529 case 241:
John Bauman66b8ab22014-05-06 15:57:45 -04004530
4531 {
4532 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4533 (yyval.interm.nodePair).node2 = 0;
4534 }
4535 break;
4536
Alexis Hetu76a343a2015-06-04 17:21:22 -04004537 case 242:
4538
Alexis Hetue5246692015-06-18 12:34:52 -04004539 { context->incrSwitchNestingLevel(); }
Alexis Hetu76a343a2015-06-04 17:21:22 -04004540 break;
4541
4542 case 243:
4543
4544 {
Alexis Hetue5246692015-06-18 12:34:52 -04004545 (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[(3) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermAggregate), (yylsp[(1) - (6)]));
4546 context->decrSwitchNestingLevel();
Alexis Hetu76a343a2015-06-04 17:21:22 -04004547 }
4548 break;
4549
4550 case 244:
4551
4552 {
Alexis Hetue5246692015-06-18 12:34:52 -04004553 (yyval.interm.intermCase) = context->addCase((yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu76a343a2015-06-04 17:21:22 -04004554 }
4555 break;
4556
4557 case 245:
John Bauman66b8ab22014-05-06 15:57:45 -04004558
4559 {
Alexis Hetue5246692015-06-18 12:34:52 -04004560 (yyval.interm.intermCase) = context->addDefault((yylsp[(1) - (2)]));
4561 }
4562 break;
4563
4564 case 246:
4565
4566 {
John Bauman66b8ab22014-05-06 15:57:45 -04004567 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4568 if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4569 context->recover();
4570 }
4571 break;
4572
Alexis Hetue5246692015-06-18 12:34:52 -04004573 case 247:
John Bauman66b8ab22014-05-06 15:57:45 -04004574
4575 {
4576 TIntermNode* intermNode;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004577 if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004578 context->recover();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004579 if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
John Bauman66b8ab22014-05-06 15:57:45 -04004580 context->recover();
4581
Alexis Hetue5246692015-06-18 12:34:52 -04004582 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 -04004583 (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4584 else {
4585 context->recover();
4586 (yyval.interm.intermTypedNode) = 0;
4587 }
4588 }
4589 break;
4590
Alexis Hetue5246692015-06-18 12:34:52 -04004591 case 248:
John Bauman66b8ab22014-05-06 15:57:45 -04004592
Alexis Hetu0a655842015-06-22 16:52:11 -04004593 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004594 break;
4595
Alexis Hetue5246692015-06-18 12:34:52 -04004596 case 249:
John Bauman66b8ab22014-05-06 15:57:45 -04004597
4598 {
4599 context->symbolTable.pop();
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004600 (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 -04004601 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004602 }
4603 break;
4604
Alexis Hetue5246692015-06-18 12:34:52 -04004605 case 250:
John Bauman66b8ab22014-05-06 15:57:45 -04004606
Alexis Hetu0a655842015-06-22 16:52:11 -04004607 { context->incrLoopNestingLevel(); }
John Bauman66b8ab22014-05-06 15:57:45 -04004608 break;
4609
Alexis Hetue5246692015-06-18 12:34:52 -04004610 case 251:
John Bauman66b8ab22014-05-06 15:57:45 -04004611
4612 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004613 if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
John Bauman66b8ab22014-05-06 15:57:45 -04004614 context->recover();
4615
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004616 (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 -04004617 context->decrLoopNestingLevel();
John Bauman66b8ab22014-05-06 15:57:45 -04004618 }
4619 break;
4620
Alexis Hetu76a343a2015-06-04 17:21:22 -04004621 case 252:
Alexis Hetub027aa92015-01-19 15:56:12 -05004622
Alexis Hetu0a655842015-06-22 16:52:11 -04004623 { context->symbolTable.push(); context->incrLoopNestingLevel(); }
Nicolas Capens3c20f802015-02-17 17:17:20 -05004624 break;
4625
Alexis Hetu76a343a2015-06-04 17:21:22 -04004626 case 253:
Alexis Hetu17809052015-05-13 11:28:22 -04004627
4628 {
Alexis Hetue5246692015-06-18 12:34:52 -04004629 context->symbolTable.pop();
4630 (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 -04004631 context->decrLoopNestingLevel();
Alexis Hetu17809052015-05-13 11:28:22 -04004632 }
4633 break;
4634
Alexis Hetu76a343a2015-06-04 17:21:22 -04004635 case 254:
Alexis Hetu17809052015-05-13 11:28:22 -04004636
4637 {
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004638 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetuad6b8752015-06-09 16:15:30 -04004639 }
4640 break;
4641
Alexis Hetu76a343a2015-06-04 17:21:22 -04004642 case 255:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004643
4644 {
Alexis Hetue5246692015-06-18 12:34:52 -04004645 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004646 }
4647 break;
4648
Alexis Hetu76a343a2015-06-04 17:21:22 -04004649 case 256:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004650
4651 {
Alexis Hetue5246692015-06-18 12:34:52 -04004652 (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004653 }
4654 break;
4655
Alexis Hetu76a343a2015-06-04 17:21:22 -04004656 case 257:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004657
4658 {
Alexis Hetue5246692015-06-18 12:34:52 -04004659 (yyval.interm.intermTypedNode) = 0;
4660 }
4661 break;
4662
4663 case 258:
4664
4665 {
Alexis Hetu17809052015-05-13 11:28:22 -04004666 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4667 (yyval.interm.nodePair).node2 = 0;
4668 }
4669 break;
4670
Alexis Hetue5246692015-06-18 12:34:52 -04004671 case 259:
Alexis Hetu17809052015-05-13 11:28:22 -04004672
4673 {
4674 (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4675 (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4676 }
4677 break;
4678
Alexis Hetue5246692015-06-18 12:34:52 -04004679 case 260:
Alexis Hetu17809052015-05-13 11:28:22 -04004680
4681 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004682 (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004683 }
4684 break;
4685
Alexis Hetue5246692015-06-18 12:34:52 -04004686 case 261:
Alexis Hetu17809052015-05-13 11:28:22 -04004687
4688 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004689 (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004690 }
4691 break;
4692
Alexis Hetue5246692015-06-18 12:34:52 -04004693 case 262:
Alexis Hetu17809052015-05-13 11:28:22 -04004694
4695 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004696 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004697 }
4698 break;
4699
Alexis Hetue5246692015-06-18 12:34:52 -04004700 case 263:
Alexis Hetu17809052015-05-13 11:28:22 -04004701
4702 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004703 (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004704 }
4705 break;
4706
Alexis Hetue5246692015-06-18 12:34:52 -04004707 case 264:
Alexis Hetu17809052015-05-13 11:28:22 -04004708
4709 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004710 FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4711 (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[(1) - (2)]));
Alexis Hetu17809052015-05-13 11:28:22 -04004712 }
4713 break;
4714
Alexis Hetu76a343a2015-06-04 17:21:22 -04004715 case 265:
Alexis Hetu17809052015-05-13 11:28:22 -04004716
4717 {
Alexis Hetue5246692015-06-18 12:34:52 -04004718 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
Alexis Hetu0a655842015-06-22 16:52:11 -04004719 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetu17809052015-05-13 11:28:22 -04004720 }
4721 break;
4722
Alexis Hetu76a343a2015-06-04 17:21:22 -04004723 case 266:
Alexis Hetuad6b8752015-06-09 16:15:30 -04004724
4725 {
Alexis Hetue5246692015-06-18 12:34:52 -04004726 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
Alexis Hetu0a655842015-06-22 16:52:11 -04004727 context->setTreeRoot((yyval.interm.intermNode));
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004728 }
4729 break;
4730
Alexis Hetu76a343a2015-06-04 17:21:22 -04004731 case 267:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004732
4733 {
4734 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4735 }
4736 break;
4737
Alexis Hetu76a343a2015-06-04 17:21:22 -04004738 case 268:
Alexis Hetudd7ff7a2015-06-11 08:25:30 -04004739
4740 {
Alexis Hetue5246692015-06-18 12:34:52 -04004741 (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4742 }
4743 break;
4744
4745 case 269:
4746
4747 {
John Bauman66b8ab22014-05-06 15:57:45 -04004748 TFunction* function = (yyvsp[(1) - (1)].interm).function;
4749
Alexis Hetu0a655842015-06-22 16:52:11 -04004750 const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->getShaderVersion());
John Bauman66b8ab22014-05-06 15:57:45 -04004751
4752 if (builtIn)
4753 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004754 context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004755 context->recover();
4756 }
4757
Alexis Hetu0a655842015-06-22 16:52:11 -04004758 TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->getShaderVersion()));
John Bauman66b8ab22014-05-06 15:57:45 -04004759 //
4760 // Note: 'prevDec' could be 'function' if this is the first time we've seen function
4761 // as it would have just been put in the symbol table. Otherwise, we're looking up
4762 // an earlier occurance.
4763 //
4764 if (prevDec->isDefined()) {
4765 //
4766 // Then this function already has a body.
4767 //
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004768 context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004769 context->recover();
4770 }
4771 prevDec->setDefined();
4772
4773 //
4774 // Raise error message if main function takes any parameters or return anything other than void
4775 //
4776 if (function->getName() == "main") {
4777 if (function->getParamCount() > 0) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004778 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004779 context->recover();
4780 }
4781 if (function->getReturnType().getBasicType() != EbtVoid) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004782 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
John Bauman66b8ab22014-05-06 15:57:45 -04004783 context->recover();
4784 }
4785 }
4786
4787 //
4788 // Remember the return type for later checking for RETURN statements.
4789 //
Alexis Hetu0a655842015-06-22 16:52:11 -04004790 context->setCurrentFunctionType(&(prevDec->getReturnType()));
4791 context->setFunctionReturnsValue(false);
John Bauman66b8ab22014-05-06 15:57:45 -04004792
4793 //
4794 // Insert parameters into the symbol table.
4795 // If the parameter has no name, it's not an error, just don't insert it
4796 // (could be used for unused args).
4797 //
4798 // Also, accumulate the list of parameters into the HIL, so lower level code
4799 // knows where to find parameters.
4800 //
4801 TIntermAggregate* paramNodes = new TIntermAggregate;
Alexis Hetu76a343a2015-06-04 17:21:22 -04004802 for (size_t i = 0; i < function->getParamCount(); i++) {
John Bauman66b8ab22014-05-06 15:57:45 -04004803 const TParameter& param = function->getParam(i);
4804 if (param.name != 0) {
4805 TVariable *variable = new TVariable(param.name, *param.type);
4806 //
4807 // Insert the parameters with name in the symbol table.
4808 //
Nicolas Capensd603ecd2015-02-18 14:52:21 -05004809 if (! context->symbolTable.declare(*variable)) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004810 context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
John Bauman66b8ab22014-05-06 15:57:45 -04004811 context->recover();
4812 delete variable;
4813 }
4814
4815 //
4816 // Add the parameter to the HIL
4817 //
4818 paramNodes = context->intermediate.growAggregate(
4819 paramNodes,
4820 context->intermediate.addSymbol(variable->getUniqueId(),
4821 variable->getName(),
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004822 variable->getType(), (yylsp[(1) - (1)])),
4823 (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004824 } else {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004825 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004826 }
4827 }
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004828 context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004829 (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
Alexis Hetu0a655842015-06-22 16:52:11 -04004830 context->setLoopNestingLevel(0);
John Bauman66b8ab22014-05-06 15:57:45 -04004831 }
4832 break;
4833
Alexis Hetue5246692015-06-18 12:34:52 -04004834 case 270:
John Bauman66b8ab22014-05-06 15:57:45 -04004835
4836 {
4837 //?? Check that all paths return a value if return type != void ?
4838 // May be best done as post process phase on intermediate code
Alexis Hetu0a655842015-06-22 16:52:11 -04004839 if (context->getCurrentFunctionType()->getBasicType() != EbtVoid && ! context->getFunctionReturnsValue()) {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004840 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 -04004841 context->recover();
4842 }
4843
4844 (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), 0);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004845 context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
John Bauman66b8ab22014-05-06 15:57:45 -04004846 (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4847 (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4848
4849 // store the pragma information for debug and optimize and other vendor specific
4850 // information. This information can be queried from the parse tree
4851 (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4852 (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4853
4854 if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
4855 (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
4856
4857 context->symbolTable.pop();
4858 }
4859 break;
4860
4861
4862
4863 default: break;
4864 }
4865 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4866
4867 YYPOPSTACK (yylen);
4868 yylen = 0;
4869 YY_STACK_PRINT (yyss, yyssp);
4870
4871 *++yyvsp = yyval;
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004872 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004873
4874 /* Now `shift' the result of the reduction. Determine what state
4875 that goes to, based on the state we popped back to and the rule
4876 number reduced by. */
4877
4878 yyn = yyr1[yyn];
4879
4880 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4881 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4882 yystate = yytable[yystate];
4883 else
4884 yystate = yydefgoto[yyn - YYNTOKENS];
4885
4886 goto yynewstate;
4887
4888
4889/*------------------------------------.
4890| yyerrlab -- here on detecting error |
4891`------------------------------------*/
4892yyerrlab:
4893 /* If not already recovering from an error, report this error. */
4894 if (!yyerrstatus)
4895 {
4896 ++yynerrs;
4897#if ! YYERROR_VERBOSE
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004898 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004899#else
4900 {
4901 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4902 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4903 {
4904 YYSIZE_T yyalloc = 2 * yysize;
4905 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4906 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4907 if (yymsg != yymsgbuf)
4908 YYSTACK_FREE (yymsg);
4909 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4910 if (yymsg)
4911 yymsg_alloc = yyalloc;
4912 else
4913 {
4914 yymsg = yymsgbuf;
4915 yymsg_alloc = sizeof yymsgbuf;
4916 }
4917 }
4918
4919 if (0 < yysize && yysize <= yymsg_alloc)
4920 {
4921 (void) yysyntax_error (yymsg, yystate, yychar);
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004922 yyerror (&yylloc, context, yymsg);
John Bauman66b8ab22014-05-06 15:57:45 -04004923 }
4924 else
4925 {
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004926 yyerror (&yylloc, context, YY_("syntax error"));
John Bauman66b8ab22014-05-06 15:57:45 -04004927 if (yysize != 0)
4928 goto yyexhaustedlab;
4929 }
4930 }
4931#endif
4932 }
4933
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004934 yyerror_range[0] = yylloc;
John Bauman66b8ab22014-05-06 15:57:45 -04004935
4936 if (yyerrstatus == 3)
4937 {
4938 /* If just tried and failed to reuse lookahead token after an
4939 error, discard it. */
4940
4941 if (yychar <= YYEOF)
4942 {
4943 /* Return failure if at end of input. */
4944 if (yychar == YYEOF)
4945 YYABORT;
4946 }
4947 else
4948 {
4949 yydestruct ("Error: discarding",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004950 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04004951 yychar = YYEMPTY;
4952 }
4953 }
4954
4955 /* Else will try to reuse lookahead token after shifting the error
4956 token. */
4957 goto yyerrlab1;
4958
4959
4960/*---------------------------------------------------.
4961| yyerrorlab -- error raised explicitly by YYERROR. |
4962`---------------------------------------------------*/
4963yyerrorlab:
4964
4965 /* Pacify compilers like GCC when the user code never invokes
4966 YYERROR and the label yyerrorlab therefore never appears in user
4967 code. */
4968 if (/*CONSTCOND*/ 0)
4969 goto yyerrorlab;
4970
Alexis Hetu15ae36c2015-06-18 21:10:09 -04004971 yyerror_range[0] = yylsp[1-yylen];
John Bauman66b8ab22014-05-06 15:57:45 -04004972 /* Do not reclaim the symbols of the rule which action triggered
4973 this YYERROR. */
4974 YYPOPSTACK (yylen);
4975 yylen = 0;
4976 YY_STACK_PRINT (yyss, yyssp);
4977 yystate = *yyssp;
4978 goto yyerrlab1;
4979
4980
4981/*-------------------------------------------------------------.
4982| yyerrlab1 -- common code for both syntax error and YYERROR. |
4983`-------------------------------------------------------------*/
4984yyerrlab1:
4985 yyerrstatus = 3; /* Each real token shifted decrements this. */
4986
4987 for (;;)
4988 {
4989 yyn = yypact[yystate];
4990 if (yyn != YYPACT_NINF)
4991 {
4992 yyn += YYTERROR;
4993 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4994 {
4995 yyn = yytable[yyn];
4996 if (0 < yyn)
4997 break;
4998 }
4999 }
5000
5001 /* Pop the current state because it cannot handle the error token. */
5002 if (yyssp == yyss)
5003 YYABORT;
5004
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005005 yyerror_range[0] = *yylsp;
John Bauman66b8ab22014-05-06 15:57:45 -04005006 yydestruct ("Error: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005007 yystos[yystate], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005008 YYPOPSTACK (1);
5009 yystate = *yyssp;
5010 YY_STACK_PRINT (yyss, yyssp);
5011 }
5012
5013 *++yyvsp = yylval;
5014
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005015 yyerror_range[1] = yylloc;
5016 /* Using YYLLOC is tempting, but would change the location of
5017 the lookahead. YYLOC is available though. */
5018 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
5019 *++yylsp = yyloc;
John Bauman66b8ab22014-05-06 15:57:45 -04005020
5021 /* Shift the error token. */
5022 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5023
5024 yystate = yyn;
5025 goto yynewstate;
5026
5027
5028/*-------------------------------------.
5029| yyacceptlab -- YYACCEPT comes here. |
5030`-------------------------------------*/
5031yyacceptlab:
5032 yyresult = 0;
5033 goto yyreturn;
5034
5035/*-----------------------------------.
5036| yyabortlab -- YYABORT comes here. |
5037`-----------------------------------*/
5038yyabortlab:
5039 yyresult = 1;
5040 goto yyreturn;
5041
5042#if !defined(yyoverflow) || YYERROR_VERBOSE
5043/*-------------------------------------------------.
5044| yyexhaustedlab -- memory exhaustion comes here. |
5045`-------------------------------------------------*/
5046yyexhaustedlab:
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005047 yyerror (&yylloc, context, YY_("memory exhausted"));
John Bauman66b8ab22014-05-06 15:57:45 -04005048 yyresult = 2;
5049 /* Fall through. */
5050#endif
5051
5052yyreturn:
5053 if (yychar != YYEMPTY)
5054 yydestruct ("Cleanup: discarding lookahead",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005055 yytoken, &yylval, &yylloc, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005056 /* Do not reclaim the symbols of the rule which action triggered
5057 this YYABORT or YYACCEPT. */
5058 YYPOPSTACK (yylen);
5059 YY_STACK_PRINT (yyss, yyssp);
5060 while (yyssp != yyss)
5061 {
5062 yydestruct ("Cleanup: popping",
Alexis Hetu15ae36c2015-06-18 21:10:09 -04005063 yystos[*yyssp], yyvsp, yylsp, context);
John Bauman66b8ab22014-05-06 15:57:45 -04005064 YYPOPSTACK (1);
5065 }
5066#ifndef yyoverflow
5067 if (yyss != yyssa)
5068 YYSTACK_FREE (yyss);
5069#endif
5070#if YYERROR_VERBOSE
5071 if (yymsg != yymsgbuf)
5072 YYSTACK_FREE (yymsg);
5073#endif
5074 /* Make sure YYID is used. */
5075 return YYID (yyresult);
5076}
5077
5078
5079
5080
5081
5082int glslang_parse(TParseContext* context) {
5083 return yyparse(context);
5084}
5085