Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / compiler / translator / glslang_tab.cpp
1 /* A Bison parser, made by GNU Bison 2.7.1.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4    
5       Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6    
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29    
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "2.7.1"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 1
54
55 /* Push parsers.  */
56 #define YYPUSH 0
57
58 /* Pull parsers.  */
59 #define YYPULL 1
60
61
62
63
64 /* Copy the first part of user declarations.  */
65
66
67 //
68 // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
69 // Use of this source code is governed by a BSD-style license that can be
70 // found in the LICENSE file.
71 //
72
73 // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
74
75 // Ignore errors in auto-generated code.
76 #if defined(__GNUC__)
77 #pragma GCC diagnostic ignored "-Wunused-function"
78 #pragma GCC diagnostic ignored "-Wunused-variable"
79 #pragma GCC diagnostic ignored "-Wswitch-enum"
80 #elif defined(_MSC_VER)
81 #pragma warning(disable: 4065)
82 #pragma warning(disable: 4189)
83 #pragma warning(disable: 4505)
84 #pragma warning(disable: 4701)
85 #endif
86
87 #include "angle_gl.h"
88 #include "compiler/translator/SymbolTable.h"
89 #include "compiler/translator/ParseContext.h"
90 #include "GLSLANG/ShaderLang.h"
91
92 #define YYENABLE_NLS 0
93
94 #define YYLEX_PARAM context->scanner
95
96
97
98
99 # ifndef YY_NULL
100 #  if defined __cplusplus && 201103L <= __cplusplus
101 #   define YY_NULL nullptr
102 #  else
103 #   define YY_NULL 0
104 #  endif
105 # endif
106
107 /* Enabling verbose error messages.  */
108 #ifdef YYERROR_VERBOSE
109 # undef YYERROR_VERBOSE
110 # define YYERROR_VERBOSE 1
111 #else
112 # define YYERROR_VERBOSE 0
113 #endif
114
115 /* In a future release of Bison, this section will be replaced
116    by #include "glslang_tab.h".  */
117 #ifndef YY_YY_GLSLANG_TAB_H_INCLUDED
118 # define YY_YY_GLSLANG_TAB_H_INCLUDED
119 /* Enabling traces.  */
120 #ifndef YYDEBUG
121 # define YYDEBUG 0
122 #endif
123 #if YYDEBUG
124 extern int yydebug;
125 #endif
126 /* "%code requires" blocks.  */
127
128
129 #define YYLTYPE TSourceLoc
130 #define YYLTYPE_IS_DECLARED 1
131
132
133
134
135 /* Tokens.  */
136 #ifndef YYTOKENTYPE
137 # define YYTOKENTYPE
138    /* Put the tokens into the symbol table, so that GDB and other debuggers
139       know about them.  */
140    enum yytokentype {
141      INVARIANT = 258,
142      HIGH_PRECISION = 259,
143      MEDIUM_PRECISION = 260,
144      LOW_PRECISION = 261,
145      PRECISION = 262,
146      ATTRIBUTE = 263,
147      CONST_QUAL = 264,
148      BOOL_TYPE = 265,
149      FLOAT_TYPE = 266,
150      INT_TYPE = 267,
151      UINT_TYPE = 268,
152      BREAK = 269,
153      CONTINUE = 270,
154      DO = 271,
155      ELSE = 272,
156      FOR = 273,
157      IF = 274,
158      DISCARD = 275,
159      RETURN = 276,
160      SWITCH = 277,
161      CASE = 278,
162      DEFAULT = 279,
163      BVEC2 = 280,
164      BVEC3 = 281,
165      BVEC4 = 282,
166      IVEC2 = 283,
167      IVEC3 = 284,
168      IVEC4 = 285,
169      VEC2 = 286,
170      VEC3 = 287,
171      VEC4 = 288,
172      UVEC2 = 289,
173      UVEC3 = 290,
174      UVEC4 = 291,
175      MATRIX2 = 292,
176      MATRIX3 = 293,
177      MATRIX4 = 294,
178      IN_QUAL = 295,
179      OUT_QUAL = 296,
180      INOUT_QUAL = 297,
181      UNIFORM = 298,
182      VARYING = 299,
183      MATRIX2x3 = 300,
184      MATRIX3x2 = 301,
185      MATRIX2x4 = 302,
186      MATRIX4x2 = 303,
187      MATRIX3x4 = 304,
188      MATRIX4x3 = 305,
189      CENTROID = 306,
190      FLAT = 307,
191      SMOOTH = 308,
192      STRUCT = 309,
193      VOID_TYPE = 310,
194      WHILE = 311,
195      SAMPLER2D = 312,
196      SAMPLERCUBE = 313,
197      SAMPLER_EXTERNAL_OES = 314,
198      SAMPLER2DRECT = 315,
199      SAMPLER2DARRAY = 316,
200      ISAMPLER2D = 317,
201      ISAMPLER3D = 318,
202      ISAMPLERCUBE = 319,
203      ISAMPLER2DARRAY = 320,
204      USAMPLER2D = 321,
205      USAMPLER3D = 322,
206      USAMPLERCUBE = 323,
207      USAMPLER2DARRAY = 324,
208      SAMPLER3D = 325,
209      SAMPLER3DRECT = 326,
210      SAMPLER2DSHADOW = 327,
211      SAMPLERCUBESHADOW = 328,
212      SAMPLER2DARRAYSHADOW = 329,
213      LAYOUT = 330,
214      IDENTIFIER = 331,
215      TYPE_NAME = 332,
216      FLOATCONSTANT = 333,
217      INTCONSTANT = 334,
218      UINTCONSTANT = 335,
219      BOOLCONSTANT = 336,
220      FIELD_SELECTION = 337,
221      LEFT_OP = 338,
222      RIGHT_OP = 339,
223      INC_OP = 340,
224      DEC_OP = 341,
225      LE_OP = 342,
226      GE_OP = 343,
227      EQ_OP = 344,
228      NE_OP = 345,
229      AND_OP = 346,
230      OR_OP = 347,
231      XOR_OP = 348,
232      MUL_ASSIGN = 349,
233      DIV_ASSIGN = 350,
234      ADD_ASSIGN = 351,
235      MOD_ASSIGN = 352,
236      LEFT_ASSIGN = 353,
237      RIGHT_ASSIGN = 354,
238      AND_ASSIGN = 355,
239      XOR_ASSIGN = 356,
240      OR_ASSIGN = 357,
241      SUB_ASSIGN = 358,
242      LEFT_PAREN = 359,
243      RIGHT_PAREN = 360,
244      LEFT_BRACKET = 361,
245      RIGHT_BRACKET = 362,
246      LEFT_BRACE = 363,
247      RIGHT_BRACE = 364,
248      DOT = 365,
249      COMMA = 366,
250      COLON = 367,
251      EQUAL = 368,
252      SEMICOLON = 369,
253      BANG = 370,
254      DASH = 371,
255      TILDE = 372,
256      PLUS = 373,
257      STAR = 374,
258      SLASH = 375,
259      PERCENT = 376,
260      LEFT_ANGLE = 377,
261      RIGHT_ANGLE = 378,
262      VERTICAL_BAR = 379,
263      CARET = 380,
264      AMPERSAND = 381,
265      QUESTION = 382
266    };
267 #endif
268
269
270 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
271 typedef union YYSTYPE
272 {
273
274
275     struct {
276         union {
277             TString *string;
278             float f;
279             int i;
280             unsigned int u;
281             bool b;
282         };
283         TSymbol* symbol;
284     } lex;
285     struct {
286         TOperator op;
287         union {
288             TIntermNode* intermNode;
289             TIntermNodePair nodePair;
290             TIntermTyped* intermTypedNode;
291             TIntermAggregate* intermAggregate;
292         };
293         union {
294             TPublicType type;
295             TPrecision precision;
296             TLayoutQualifier layoutQualifier;
297             TQualifier qualifier;
298             TFunction* function;
299             TParameter param;
300             TField* field;
301             TFieldList* fieldList;
302         };
303     } interm;
304
305
306
307 } YYSTYPE;
308 # define YYSTYPE_IS_TRIVIAL 1
309 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
310 # define YYSTYPE_IS_DECLARED 1
311 #endif
312
313 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
314 typedef struct YYLTYPE
315 {
316   int first_line;
317   int first_column;
318   int last_line;
319   int last_column;
320 } YYLTYPE;
321 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
322 # define YYLTYPE_IS_DECLARED 1
323 # define YYLTYPE_IS_TRIVIAL 1
324 #endif
325
326
327 #ifdef YYPARSE_PARAM
328 #if defined __STDC__ || defined __cplusplus
329 int yyparse (void *YYPARSE_PARAM);
330 #else
331 int yyparse ();
332 #endif
333 #else /* ! YYPARSE_PARAM */
334 #if defined __STDC__ || defined __cplusplus
335 int yyparse (TParseContext* context);
336 #else
337 int yyparse ();
338 #endif
339 #endif /* ! YYPARSE_PARAM */
340
341 #endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED  */
342
343 /* Copy the second part of user declarations.  */
344
345
346 extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
347 extern void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason);
348
349 #define YYLLOC_DEFAULT(Current, Rhs, N)                      \
350   do {                                                       \
351       if (YYID(N)) {                                         \
352         (Current).first_file = YYRHSLOC(Rhs, 1).first_file;  \
353         (Current).first_line = YYRHSLOC(Rhs, 1).first_line;  \
354         (Current).last_file = YYRHSLOC(Rhs, N).last_file;    \
355         (Current).last_line = YYRHSLOC(Rhs, N).last_line;    \
356       }                                                      \
357       else {                                                 \
358         (Current).first_file = YYRHSLOC(Rhs, 0).last_file;   \
359         (Current).first_line = YYRHSLOC(Rhs, 0).last_line;   \
360         (Current).last_file = YYRHSLOC(Rhs, 0).last_file;    \
361         (Current).last_line = YYRHSLOC(Rhs, 0).last_line;    \
362       }                                                      \
363   } while (0)
364
365 #define VERTEX_ONLY(S, L) {  \
366     if (context->shaderType != GL_VERTEX_SHADER) {  \
367         context->error(L, " supported in vertex shaders only ", S);  \
368         context->recover();  \
369     }  \
370 }
371
372 #define FRAG_ONLY(S, L) {  \
373     if (context->shaderType != GL_FRAGMENT_SHADER) {  \
374         context->error(L, " supported in fragment shaders only ", S);  \
375         context->recover();  \
376     }  \
377 }
378
379 #define ES2_ONLY(S, L) {  \
380     if (context->shaderVersion != 100) {  \
381         context->error(L, " supported in GLSL ES 1.00 only ", S);  \
382         context->recover();  \
383     }  \
384 }
385
386 #define ES3_ONLY(TOKEN, LINE, REASON) {  \
387     if (context->shaderVersion != 300) {  \
388         context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN);  \
389         context->recover();  \
390     }  \
391 }
392
393
394
395 #ifdef short
396 # undef short
397 #endif
398
399 #ifdef YYTYPE_UINT8
400 typedef YYTYPE_UINT8 yytype_uint8;
401 #else
402 typedef unsigned char yytype_uint8;
403 #endif
404
405 #ifdef YYTYPE_INT8
406 typedef YYTYPE_INT8 yytype_int8;
407 #elif (defined __STDC__ || defined __C99__FUNC__ \
408      || defined __cplusplus || defined _MSC_VER)
409 typedef signed char yytype_int8;
410 #else
411 typedef short int yytype_int8;
412 #endif
413
414 #ifdef YYTYPE_UINT16
415 typedef YYTYPE_UINT16 yytype_uint16;
416 #else
417 typedef unsigned short int yytype_uint16;
418 #endif
419
420 #ifdef YYTYPE_INT16
421 typedef YYTYPE_INT16 yytype_int16;
422 #else
423 typedef short int yytype_int16;
424 #endif
425
426 #ifndef YYSIZE_T
427 # ifdef __SIZE_TYPE__
428 #  define YYSIZE_T __SIZE_TYPE__
429 # elif defined size_t
430 #  define YYSIZE_T size_t
431 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
432      || defined __cplusplus || defined _MSC_VER)
433 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
434 #  define YYSIZE_T size_t
435 # else
436 #  define YYSIZE_T unsigned int
437 # endif
438 #endif
439
440 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
441
442 #ifndef YY_
443 # if defined YYENABLE_NLS && YYENABLE_NLS
444 #  if ENABLE_NLS
445 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
446 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
447 #  endif
448 # endif
449 # ifndef YY_
450 #  define YY_(Msgid) Msgid
451 # endif
452 #endif
453
454 #ifndef __attribute__
455 /* This feature is available in gcc versions 2.5 and later.  */
456 # if (! defined __GNUC__ || __GNUC__ < 2 \
457       || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
458 #  define __attribute__(Spec) /* empty */
459 # endif
460 #endif
461
462 /* Suppress unused-variable warnings by "using" E.  */
463 #if ! defined lint || defined __GNUC__
464 # define YYUSE(E) ((void) (E))
465 #else
466 # define YYUSE(E) /* empty */
467 #endif
468
469
470 /* Identity function, used to suppress warnings about constant conditions.  */
471 #ifndef lint
472 # define YYID(N) (N)
473 #else
474 #if (defined __STDC__ || defined __C99__FUNC__ \
475      || defined __cplusplus || defined _MSC_VER)
476 static int
477 YYID (int yyi)
478 #else
479 static int
480 YYID (yyi)
481     int yyi;
482 #endif
483 {
484   return yyi;
485 }
486 #endif
487
488 #if ! defined yyoverflow || YYERROR_VERBOSE
489
490 /* The parser invokes alloca or malloc; define the necessary symbols.  */
491
492 # ifdef YYSTACK_USE_ALLOCA
493 #  if YYSTACK_USE_ALLOCA
494 #   ifdef __GNUC__
495 #    define YYSTACK_ALLOC __builtin_alloca
496 #   elif defined __BUILTIN_VA_ARG_INCR
497 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
498 #   elif defined _AIX
499 #    define YYSTACK_ALLOC __alloca
500 #   elif defined _MSC_VER
501 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
502 #    define alloca _alloca
503 #   else
504 #    define YYSTACK_ALLOC alloca
505 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
506      || defined __cplusplus || defined _MSC_VER)
507 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
508       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
509 #     ifndef EXIT_SUCCESS
510 #      define EXIT_SUCCESS 0
511 #     endif
512 #    endif
513 #   endif
514 #  endif
515 # endif
516
517 # ifdef YYSTACK_ALLOC
518    /* Pacify GCC's `empty if-body' warning.  */
519 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
520 #  ifndef YYSTACK_ALLOC_MAXIMUM
521     /* The OS might guarantee only one guard page at the bottom of the stack,
522        and a page size can be as small as 4096 bytes.  So we cannot safely
523        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
524        to allow for a few compiler-allocated temporary stack slots.  */
525 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
526 #  endif
527 # else
528 #  define YYSTACK_ALLOC YYMALLOC
529 #  define YYSTACK_FREE YYFREE
530 #  ifndef YYSTACK_ALLOC_MAXIMUM
531 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
532 #  endif
533 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
534        && ! ((defined YYMALLOC || defined malloc) \
535              && (defined YYFREE || defined free)))
536 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
537 #   ifndef EXIT_SUCCESS
538 #    define EXIT_SUCCESS 0
539 #   endif
540 #  endif
541 #  ifndef YYMALLOC
542 #   define YYMALLOC malloc
543 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
544      || defined __cplusplus || defined _MSC_VER)
545 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
546 #   endif
547 #  endif
548 #  ifndef YYFREE
549 #   define YYFREE free
550 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
551      || defined __cplusplus || defined _MSC_VER)
552 void free (void *); /* INFRINGES ON USER NAME SPACE */
553 #   endif
554 #  endif
555 # endif
556 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
557
558
559 #if (! defined yyoverflow \
560      && (! defined __cplusplus \
561          || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
562              && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
563
564 /* A type that is properly aligned for any stack member.  */
565 union yyalloc
566 {
567   yytype_int16 yyss_alloc;
568   YYSTYPE yyvs_alloc;
569   YYLTYPE yyls_alloc;
570 };
571
572 /* The size of the maximum gap between one aligned stack and the next.  */
573 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
574
575 /* The size of an array large to enough to hold all stacks, each with
576    N elements.  */
577 # define YYSTACK_BYTES(N) \
578      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
579       + 2 * YYSTACK_GAP_MAXIMUM)
580
581 # define YYCOPY_NEEDED 1
582
583 /* Relocate STACK from its old location to the new one.  The
584    local variables YYSIZE and YYSTACKSIZE give the old and new number of
585    elements in the stack, and YYPTR gives the new location of the
586    stack.  Advance YYPTR to a properly aligned location for the next
587    stack.  */
588 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
589     do                                                                  \
590       {                                                                 \
591         YYSIZE_T yynewbytes;                                            \
592         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
593         Stack = &yyptr->Stack_alloc;                                    \
594         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
595         yyptr += yynewbytes / sizeof (*yyptr);                          \
596       }                                                                 \
597     while (YYID (0))
598
599 #endif
600
601 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
602 /* Copy COUNT objects from SRC to DST.  The source and destination do
603    not overlap.  */
604 # ifndef YYCOPY
605 #  if defined __GNUC__ && 1 < __GNUC__
606 #   define YYCOPY(Dst, Src, Count) \
607       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
608 #  else
609 #   define YYCOPY(Dst, Src, Count)              \
610       do                                        \
611         {                                       \
612           YYSIZE_T yyi;                         \
613           for (yyi = 0; yyi < (Count); yyi++)   \
614             (Dst)[yyi] = (Src)[yyi];            \
615         }                                       \
616       while (YYID (0))
617 #  endif
618 # endif
619 #endif /* !YYCOPY_NEEDED */
620
621 /* YYFINAL -- State number of the termination state.  */
622 #define YYFINAL  114
623 /* YYLAST -- Last index in YYTABLE.  */
624 #define YYLAST   2375
625
626 /* YYNTOKENS -- Number of terminals.  */
627 #define YYNTOKENS  128
628 /* YYNNTS -- Number of nonterminals.  */
629 #define YYNNTS  91
630 /* YYNRULES -- Number of rules.  */
631 #define YYNRULES  250
632 /* YYNRULES -- Number of states.  */
633 #define YYNSTATES  373
634
635 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
636 #define YYUNDEFTOK  2
637 #define YYMAXUTOK   382
638
639 #define YYTRANSLATE(YYX)                                                \
640   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
641
642 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
643 static const yytype_uint8 yytranslate[] =
644 {
645        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
646        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
647        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
648        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
649        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
650        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
651        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
652        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
653        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
654        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
655        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
656        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
657        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
658        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
659        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
660        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
661        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
662        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
663        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
664        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
665        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
666        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
667        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
668        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
669        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
670        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
671        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
672       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
673       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
674       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
675       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
676       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
677       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
678       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
679       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
680       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
681      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
682      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
683      125,   126,   127
684 };
685
686 #if YYDEBUG
687 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
688    YYRHS.  */
689 static const yytype_uint16 yyprhs[] =
690 {
691        0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
692       19,    23,    25,    30,    32,    36,    39,    42,    44,    46,
693       48,    52,    55,    58,    61,    63,    66,    70,    73,    75,
694       77,    79,    82,    85,    88,    90,    92,    94,    96,   100,
695      104,   106,   110,   114,   116,   118,   122,   126,   130,   134,
696      136,   140,   144,   146,   148,   150,   152,   156,   158,   162,
697      164,   168,   170,   176,   178,   182,   184,   186,   188,   190,
698      192,   194,   198,   200,   203,   206,   209,   214,   220,   227,
699      237,   240,   243,   245,   247,   250,   254,   258,   261,   267,
700      271,   274,   278,   281,   282,   284,   286,   288,   290,   292,
701      296,   302,   309,   315,   317,   320,   325,   331,   336,   339,
702      341,   344,   346,   348,   350,   352,   354,   357,   359,   362,
703      364,   366,   369,   371,   373,   375,   378,   381,   383,   385,
704      388,   390,   392,   394,   399,   401,   405,   407,   411,   415,
705      417,   422,   424,   426,   428,   430,   432,   434,   436,   438,
706      440,   442,   444,   446,   448,   450,   452,   454,   456,   458,
707      460,   462,   464,   466,   468,   470,   472,   474,   476,   478,
708      480,   482,   484,   486,   488,   490,   492,   494,   496,   498,
709      500,   502,   504,   506,   508,   510,   512,   513,   520,   521,
710      527,   529,   532,   536,   541,   543,   547,   549,   554,   556,
711      558,   560,   562,   564,   566,   568,   570,   572,   575,   576,
712      577,   583,   585,   587,   588,   591,   592,   595,   598,   602,
713      604,   607,   609,   612,   618,   622,   624,   626,   631,   632,
714      639,   640,   649,   650,   658,   660,   662,   664,   665,   668,
715      672,   675,   678,   681,   685,   688,   690,   693,   695,   697,
716      698
717 };
718
719 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
720 static const yytype_int16 yyrhs[] =
721 {
722      215,     0,    -1,    76,    -1,    77,    -1,    76,    -1,   130,
723       -1,    79,    -1,    80,    -1,    78,    -1,    81,    -1,   104,
724      157,   105,    -1,   131,    -1,   132,   106,   133,   107,    -1,
725      134,    -1,   132,   110,   129,    -1,   132,    85,    -1,   132,
726       86,    -1,   157,    -1,   135,    -1,   136,    -1,   132,   110,
727      136,    -1,   138,   105,    -1,   137,   105,    -1,   139,    55,
728       -1,   139,    -1,   139,   155,    -1,   138,   111,   155,    -1,
729      140,   104,    -1,   182,    -1,    76,    -1,   132,    -1,    85,
730      141,    -1,    86,   141,    -1,   142,   141,    -1,   118,    -1,
731      116,    -1,   115,    -1,   141,    -1,   143,   119,   141,    -1,
732      143,   120,   141,    -1,   143,    -1,   144,   118,   143,    -1,
733      144,   116,   143,    -1,   144,    -1,   145,    -1,   146,   122,
734      145,    -1,   146,   123,   145,    -1,   146,    87,   145,    -1,
735      146,    88,   145,    -1,   146,    -1,   147,    89,   146,    -1,
736      147,    90,   146,    -1,   147,    -1,   148,    -1,   149,    -1,
737      150,    -1,   151,    91,   150,    -1,   151,    -1,   152,    93,
738      151,    -1,   152,    -1,   153,    92,   152,    -1,   153,    -1,
739      153,   127,   157,   112,   155,    -1,   154,    -1,   141,   156,
740      155,    -1,   113,    -1,    94,    -1,    95,    -1,    96,    -1,
741      103,    -1,   155,    -1,   157,   111,   155,    -1,   154,    -1,
742       76,   108,    -1,   161,   114,    -1,   169,   114,    -1,     7,
743      177,   181,   114,    -1,   174,   159,   186,   109,   114,    -1,
744      174,   159,   186,   109,    76,   114,    -1,   174,   159,   186,
745      109,    76,   106,   158,   107,   114,    -1,   174,   114,    -1,
746      162,   105,    -1,   164,    -1,   163,    -1,   164,   166,    -1,
747      163,   111,   166,    -1,   171,    76,   104,    -1,   176,   129,
748       -1,   176,   129,   106,   158,   107,    -1,   173,   167,   165,
749       -1,   167,   165,    -1,   173,   167,   168,    -1,   167,   168,
750       -1,    -1,    40,    -1,    41,    -1,    42,    -1,   176,    -1,
751      170,    -1,   169,   111,   129,    -1,   169,   111,   129,   106,
752      107,    -1,   169,   111,   129,   106,   158,   107,    -1,   169,
753      111,   129,   113,   190,    -1,   171,    -1,   171,   129,    -1,
754      171,   129,   106,   107,    -1,   171,   129,   106,   158,   107,
755       -1,   171,   129,   113,   190,    -1,     3,    76,    -1,   176,
756       -1,   174,   176,    -1,    53,    -1,    52,    -1,     9,    -1,
757        8,    -1,    44,    -1,     3,    44,    -1,   175,    -1,   172,
758      175,    -1,   172,    -1,   178,    -1,   178,   175,    -1,     9,
759       -1,    40,    -1,    41,    -1,    51,    40,    -1,    51,    41,
760       -1,    43,    -1,   181,    -1,   177,   181,    -1,     4,    -1,
761        5,    -1,     6,    -1,    75,   104,   179,   105,    -1,   180,
762       -1,   179,   111,   180,    -1,    76,    -1,    76,   113,    79,
763       -1,    76,   113,    80,    -1,   182,    -1,   182,   106,   158,
764      107,    -1,    55,    -1,    11,    -1,    12,    -1,    13,    -1,
765       10,    -1,    31,    -1,    32,    -1,    33,    -1,    25,    -1,
766       26,    -1,    27,    -1,    28,    -1,    29,    -1,    30,    -1,
767       34,    -1,    35,    -1,    36,    -1,    37,    -1,    38,    -1,
768       39,    -1,    45,    -1,    46,    -1,    47,    -1,    48,    -1,
769       49,    -1,    50,    -1,    57,    -1,    70,    -1,    58,    -1,
770       61,    -1,    62,    -1,    63,    -1,    64,    -1,    65,    -1,
771       66,    -1,    67,    -1,    68,    -1,    69,    -1,    72,    -1,
772       73,    -1,    74,    -1,    59,    -1,    60,    -1,   183,    -1,
773       77,    -1,    -1,    54,   129,   108,   184,   186,   109,    -1,
774       -1,    54,   108,   185,   186,   109,    -1,   187,    -1,   186,
775      187,    -1,   176,   188,   114,    -1,   174,   176,   188,   114,
776       -1,   189,    -1,   188,   111,   189,    -1,   129,    -1,   129,
777      106,   158,   107,    -1,   155,    -1,   160,    -1,   194,    -1,
778      193,    -1,   191,    -1,   203,    -1,   204,    -1,   207,    -1,
779      214,    -1,   108,   109,    -1,    -1,    -1,   108,   195,   202,
780      196,   109,    -1,   201,    -1,   193,    -1,    -1,   199,   201,
781       -1,    -1,   200,   193,    -1,   108,   109,    -1,   108,   202,
782      109,    -1,   192,    -1,   202,   192,    -1,   114,    -1,   157,
783      114,    -1,    19,   104,   157,   105,   205,    -1,   198,    17,
784      198,    -1,   198,    -1,   157,    -1,   171,   129,   113,   190,
785       -1,    -1,    56,   104,   208,   206,   105,   197,    -1,    -1,
786       16,   209,   198,    56,   104,   157,   105,   114,    -1,    -1,
787       18,   104,   210,   211,   213,   105,   197,    -1,   203,    -1,
788      191,    -1,   206,    -1,    -1,   212,   114,    -1,   212,   114,
789      157,    -1,    15,   114,    -1,    14,   114,    -1,    21,   114,
790       -1,    21,   157,   114,    -1,    20,   114,    -1,   216,    -1,
791      215,   216,    -1,   217,    -1,   160,    -1,    -1,   161,   218,
792      201,    -1
793 };
794
795 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
796 static const yytype_uint16 yyrline[] =
797 {
798        0,   206,   206,   207,   210,   234,   237,   242,   247,   252,
799      257,   263,   266,   269,   272,   275,   285,   298,   306,   406,
800      409,   417,   420,   426,   430,   437,   443,   452,   460,   463,
801      473,   476,   486,   496,   517,   518,   519,   524,   525,   533,
802      544,   545,   553,   564,   568,   569,   579,   589,   599,   612,
803      613,   623,   636,   640,   644,   648,   649,   662,   663,   676,
804      677,   690,   691,   708,   709,   722,   723,   724,   725,   726,
805      730,   733,   744,   752,   760,   787,   793,   804,   808,   812,
806      816,   823,   879,   882,   889,   897,   918,   939,   949,   977,
807      982,   992,   997,  1007,  1010,  1013,  1016,  1022,  1029,  1032,
808     1036,  1040,  1044,  1051,  1055,  1059,  1066,  1070,  1074,  1081,
809     1090,  1096,  1099,  1105,  1111,  1118,  1127,  1136,  1144,  1147,
810     1154,  1158,  1165,  1168,  1172,  1176,  1185,  1194,  1202,  1212,
811     1224,  1227,  1230,  1236,  1243,  1246,  1252,  1255,  1258,  1264,
812     1267,  1282,  1286,  1290,  1294,  1298,  1302,  1307,  1312,  1317,
813     1322,  1327,  1332,  1337,  1342,  1347,  1352,  1357,  1362,  1367,
814     1372,  1377,  1382,  1387,  1392,  1397,  1402,  1407,  1411,  1415,
815     1419,  1423,  1427,  1431,  1435,  1439,  1443,  1447,  1451,  1455,
816     1459,  1463,  1467,  1475,  1483,  1487,  1500,  1500,  1503,  1503,
817     1509,  1512,  1528,  1531,  1540,  1544,  1550,  1557,  1572,  1576,
818     1580,  1581,  1587,  1588,  1589,  1590,  1591,  1595,  1596,  1596,
819     1596,  1606,  1607,  1611,  1611,  1612,  1612,  1617,  1620,  1630,
820     1633,  1639,  1640,  1644,  1652,  1656,  1666,  1671,  1688,  1688,
821     1693,  1693,  1700,  1700,  1708,  1711,  1717,  1720,  1726,  1730,
822     1737,  1744,  1751,  1758,  1769,  1778,  1782,  1789,  1792,  1798,
823     1798
824 };
825 #endif
826
827 #if YYDEBUG || YYERROR_VERBOSE || 0
828 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
829    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
830 static const char *const yytname[] =
831 {
832   "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
833   "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
834   "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
835   "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
836   "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
837   "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
838   "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
839   "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
840   "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
841   "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
842   "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
843   "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
844   "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
845   "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
846   "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
847   "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
848   "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
849   "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
850   "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
851   "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
852   "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
853   "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
854   "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
855   "AMPERSAND", "QUESTION", "$accept", "identifier", "variable_identifier",
856   "primary_expression", "postfix_expression", "integer_expression",
857   "function_call", "function_call_or_method", "function_call_generic",
858   "function_call_header_no_parameters",
859   "function_call_header_with_parameters", "function_call_header",
860   "function_identifier", "unary_expression", "unary_operator",
861   "multiplicative_expression", "additive_expression", "shift_expression",
862   "relational_expression", "equality_expression", "and_expression",
863   "exclusive_or_expression", "inclusive_or_expression",
864   "logical_and_expression", "logical_xor_expression",
865   "logical_or_expression", "conditional_expression",
866   "assignment_expression", "assignment_operator", "expression",
867   "constant_expression", "enter_struct", "declaration",
868   "function_prototype", "function_declarator",
869   "function_header_with_parameters", "function_header",
870   "parameter_declarator", "parameter_declaration", "parameter_qualifier",
871   "parameter_type_specifier", "init_declarator_list", "single_declaration",
872   "fully_specified_type", "interpolation_qualifier",
873   "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
874   "type_specifier", "precision_qualifier", "layout_qualifier",
875   "layout_qualifier_id_list", "layout_qualifier_id",
876   "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
877   "$@1", "$@2", "struct_declaration_list", "struct_declaration",
878   "struct_declarator_list", "struct_declarator", "initializer",
879   "declaration_statement", "statement", "simple_statement",
880   "compound_statement", "$@3", "$@4", "statement_no_new_scope",
881   "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
882   "statement_list", "expression_statement", "selection_statement",
883   "selection_rest_statement", "condition", "iteration_statement", "$@7",
884   "$@8", "$@9", "for_init_statement", "conditionopt", "for_rest_statement",
885   "jump_statement", "translation_unit", "external_declaration",
886   "function_definition", "$@10", YY_NULL
887 };
888 #endif
889
890 # ifdef YYPRINT
891 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
892    token YYLEX-NUM.  */
893 static const yytype_uint16 yytoknum[] =
894 {
895        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
896      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
897      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
898      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
899      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
900      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
901      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
902      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
903      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
904      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
905      355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
906      365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
907      375,   376,   377,   378,   379,   380,   381,   382
908 };
909 # endif
910
911 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
912 static const yytype_uint8 yyr1[] =
913 {
914        0,   128,   129,   129,   130,   131,   131,   131,   131,   131,
915      131,   132,   132,   132,   132,   132,   132,   133,   134,   135,
916      135,   136,   136,   137,   137,   138,   138,   139,   140,   140,
917      141,   141,   141,   141,   142,   142,   142,   143,   143,   143,
918      144,   144,   144,   145,   146,   146,   146,   146,   146,   147,
919      147,   147,   148,   149,   150,   151,   151,   152,   152,   153,
920      153,   154,   154,   155,   155,   156,   156,   156,   156,   156,
921      157,   157,   158,   159,   160,   160,   160,   160,   160,   160,
922      160,   161,   162,   162,   163,   163,   164,   165,   165,   166,
923      166,   166,   166,   167,   167,   167,   167,   168,   169,   169,
924      169,   169,   169,   170,   170,   170,   170,   170,   170,   171,
925      171,   172,   172,   173,   174,   174,   174,   174,   174,   174,
926      174,   174,   175,   175,   175,   175,   175,   175,   176,   176,
927      177,   177,   177,   178,   179,   179,   180,   180,   180,   181,
928      181,   182,   182,   182,   182,   182,   182,   182,   182,   182,
929      182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
930      182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
931      182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
932      182,   182,   182,   182,   182,   182,   184,   183,   185,   183,
933      186,   186,   187,   187,   188,   188,   189,   189,   190,   191,
934      192,   192,   193,   193,   193,   193,   193,   194,   195,   196,
935      194,   197,   197,   199,   198,   200,   198,   201,   201,   202,
936      202,   203,   203,   204,   205,   205,   206,   206,   208,   207,
937      209,   207,   210,   207,   211,   211,   212,   212,   213,   213,
938      214,   214,   214,   214,   214,   215,   215,   216,   216,   218,
939      217
940 };
941
942 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
943 static const yytype_uint8 yyr2[] =
944 {
945        0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
946        3,     1,     4,     1,     3,     2,     2,     1,     1,     1,
947        3,     2,     2,     2,     1,     2,     3,     2,     1,     1,
948        1,     2,     2,     2,     1,     1,     1,     1,     3,     3,
949        1,     3,     3,     1,     1,     3,     3,     3,     3,     1,
950        3,     3,     1,     1,     1,     1,     3,     1,     3,     1,
951        3,     1,     5,     1,     3,     1,     1,     1,     1,     1,
952        1,     3,     1,     2,     2,     2,     4,     5,     6,     9,
953        2,     2,     1,     1,     2,     3,     3,     2,     5,     3,
954        2,     3,     2,     0,     1,     1,     1,     1,     1,     3,
955        5,     6,     5,     1,     2,     4,     5,     4,     2,     1,
956        2,     1,     1,     1,     1,     1,     2,     1,     2,     1,
957        1,     2,     1,     1,     1,     2,     2,     1,     1,     2,
958        1,     1,     1,     4,     1,     3,     1,     3,     3,     1,
959        4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
960        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
961        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
962        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
963        1,     1,     1,     1,     1,     1,     0,     6,     0,     5,
964        1,     2,     3,     4,     1,     3,     1,     4,     1,     1,
965        1,     1,     1,     1,     1,     1,     1,     2,     0,     0,
966        5,     1,     1,     0,     2,     0,     2,     2,     3,     1,
967        2,     1,     2,     5,     3,     1,     1,     4,     0,     6,
968        0,     8,     0,     7,     1,     1,     1,     0,     2,     3,
969        2,     2,     2,     3,     2,     1,     2,     1,     1,     0,
970        3
971 };
972
973 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
974    Performed when YYTABLE doesn't specify something else to do.  Zero
975    means the default is an error.  */
976 static const yytype_uint8 yydefact[] =
977 {
978        0,     0,   130,   131,   132,     0,   114,   122,   145,   142,
979      143,   144,   149,   150,   151,   152,   153,   154,   146,   147,
980      148,   155,   156,   157,   158,   159,   160,   123,   124,   127,
981      115,   161,   162,   163,   164,   165,   166,     0,   112,   111,
982        0,   141,   167,   169,   182,   183,   170,   171,   172,   173,
983      174,   175,   176,   177,   178,   168,   179,   180,   181,     0,
984      185,   248,   249,     0,    83,    93,     0,    98,   103,   119,
985        0,   117,   109,     0,   120,   128,   139,   184,     0,   245,
986      247,   116,   108,     0,   125,   126,     2,     3,   188,     0,
987        0,    74,     0,    81,    93,   113,    94,    95,    96,    84,
988        0,    93,     0,    75,     2,   104,   118,     0,    80,     0,
989      110,   129,   121,     0,     1,   246,     0,     0,   186,   136,
990        0,   134,     0,   250,    85,    90,    92,    97,     0,    99,
991       86,     0,     0,    73,     0,     0,     0,     0,   190,     4,
992        8,     6,     7,     9,     0,     0,     0,    36,    35,    34,
993        5,    11,    30,    13,    18,    19,     0,     0,    24,     0,
994       37,     0,    40,    43,    44,    49,    52,    53,    54,    55,
995       57,    59,    61,    72,     0,    28,    76,     0,     0,     0,
996      133,     0,     0,     0,   230,     0,     0,     0,     0,     0,
997      208,   217,   221,    37,    63,    70,     0,   199,     0,   139,
998      202,   219,   201,   200,     0,   203,   204,   205,   206,    87,
999       89,    91,     0,     0,   105,     0,   198,   107,     0,   196,
1000        0,   194,     0,   191,    31,    32,     0,    15,    16,     0,
1001        0,    22,    21,     0,    23,    25,    27,    33,     0,     0,
1002        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1003        0,     0,   140,   189,     0,   137,   138,   135,   241,   240,
1004      215,   232,     0,   244,   242,     0,   228,   207,     0,    66,
1005       67,    68,    69,    65,     0,     0,   222,   218,   220,     0,
1006      100,     0,   102,   106,     0,     0,     0,   192,     0,    77,
1007       10,     0,    17,     2,     3,    14,    20,    26,    38,    39,
1008       42,    41,    47,    48,    45,    46,    50,    51,    56,    58,
1009       60,     0,   187,     0,     0,     0,     0,     0,   243,     0,
1010      209,    64,    71,     0,   101,   193,     0,   195,     0,    78,
1011       12,     0,     0,   214,   216,   235,   234,   237,   215,   226,
1012        0,     0,     0,     0,    88,   197,     0,    62,     0,   236,
1013        0,     0,   225,   223,     0,     0,   210,     0,     0,   238,
1014        0,   215,     0,   212,   229,   211,    79,     0,   239,   233,
1015      224,   227,   231
1016 };
1017
1018 /* YYDEFGOTO[NTERM-NUM].  */
1019 static const yytype_int16 yydefgoto[] =
1020 {
1021       -1,   219,   150,   151,   152,   291,   153,   154,   155,   156,
1022      157,   158,   159,   193,   161,   162,   163,   164,   165,   166,
1023      167,   168,   169,   170,   171,   172,   194,   195,   274,   196,
1024      174,   109,   197,   198,    63,    64,    65,   125,    99,   100,
1025      126,    66,    67,    68,    69,   101,    70,    71,    72,    73,
1026       74,   120,   121,    75,   175,    77,   178,   117,   137,   138,
1027      220,   221,   217,   200,   201,   202,   203,   268,   343,   364,
1028      313,   314,   315,   365,   204,   205,   206,   353,   342,   207,
1029      319,   260,   316,   337,   350,   351,   208,    78,    79,    80,
1030       92
1031 };
1032
1033 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1034    STATE-NUM.  */
1035 #define YYPACT_NINF -309
1036 static const yytype_int16 yypact[] =
1037 {
1038     2013,   -27,  -309,  -309,  -309,   154,  -309,  -309,  -309,  -309,
1039     -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,
1040     -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,
1041     -309,  -309,  -309,  -309,  -309,  -309,  -309,    98,  -309,  -309,
1042      -40,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,
1043     -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,   -46,
1044     -309,  -309,   -42,   -23,     8,     5,   -87,  -309,    91,    14,
1045     1130,  -309,  -309,  2298,    14,  -309,    -1,  -309,  1938,  -309,
1046     -309,  -309,  -309,  2298,  -309,  -309,  -309,  -309,  -309,    13,
1047       47,  -309,    43,  -309,    39,  -309,  -309,  -309,  -309,  -309,
1048     2162,   124,    94,  -309,    51,   -14,  -309,    66,  -309,  2088,
1049     -309,  -309,  -309,  1491,  -309,  -309,    62,  2088,  -309,    48,
1050      -83,  -309,   358,  -309,  -309,  -309,  -309,    94,  2162,    -9,
1051     -309,  1200,  1491,  -309,   148,  2162,    94,  1683,  -309,    89,
1052     -309,  -309,  -309,  -309,  1491,  1491,  1491,  -309,  -309,  -309,
1053     -309,  -309,    10,  -309,  -309,  -309,    92,    20,  1586,    96,
1054     -309,  1491,    53,   -76,  -309,   -62,    90,  -309,  -309,  -309,
1055      104,   101,   -61,  -309,    95,  -309,  -309,  1768,  2088,   103,
1056     -309,    47,    82,    84,  -309,    97,    99,    93,  1298,   105,
1057      102,  -309,  -309,   -10,  -309,  -309,   -13,  -309,   -42,     2,
1058     -309,  -309,  -309,  -309,   474,  -309,  -309,  -309,  -309,   106,
1059     -309,  -309,  1393,  1491,  -309,   107,  -309,  -309,    94,   109,
1060        4,  -309,   -58,  -309,  -309,  -309,    22,  -309,  -309,  1491,
1061     2230,  -309,  -309,  1491,   112,  -309,  -309,  -309,  1491,  1491,
1062     1491,  1491,  1491,  1491,  1491,  1491,  1491,  1491,  1491,  1491,
1063     1491,  1491,  -309,  -309,  1853,  -309,  -309,  -309,  -309,  -309,
1064      100,  -309,  1491,  -309,  -309,    36,  -309,  -309,   590,  -309,
1065     -309,  -309,  -309,  -309,  1491,  1491,  -309,  -309,  -309,  1491,
1066     -309,   113,  -309,  -309,    42,  1491,    94,  -309,   -73,  -309,
1067     -309,   115,   108,    89,   119,  -309,  -309,  -309,  -309,  -309,
1068       53,    53,  -309,  -309,  -309,  -309,   -62,   -62,  -309,   104,
1069      101,    73,  -309,   169,    43,   822,   938,    25,  -309,  1035,
1070      590,  -309,  -309,   120,  -309,  -309,   121,  -309,  1491,  -309,
1071     -309,  1491,   122,  -309,  -309,  -309,  -309,  1035,   100,   108,
1072       94,  2162,   125,   123,  -309,  -309,   126,  -309,  1491,  -309,
1073      117,   129,   212,  -309,   139,   706,  -309,   141,    29,  1491,
1074      706,   100,  1491,  -309,  -309,  -309,  -309,   142,   108,  -309,
1075     -309,  -309,  -309
1076 };
1077
1078 /* YYPGOTO[NTERM-NUM].  */
1079 static const yytype_int16 yypgoto[] =
1080 {
1081     -309,   -39,  -309,  -309,  -309,  -309,  -309,  -309,     7,  -309,
1082     -309,  -309,  -309,     1,  -309,   -54,  -309,  -101,   -57,  -309,
1083     -309,  -309,     9,   -11,     3,  -309,  -110,  -126,  -309,  -138,
1084     -122,  -309,    11,    16,  -309,  -309,  -309,   130,   165,   159,
1085      133,  -309,  -309,  -299,  -309,  -309,  -102,   -30,   -66,   257,
1086     -309,  -309,    83,    -6,     0,  -309,  -309,  -309,  -104,  -125,
1087       45,   -21,  -208,   -50,  -194,  -296,  -309,  -309,  -309,   -93,
1088     -308,  -309,  -309,   -90,     6,   -47,  -309,  -309,   -67,  -309,
1089     -309,  -309,  -309,  -309,  -309,  -309,  -309,  -309,   193,  -309,
1090     -309
1091 };
1092
1093 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1094    positive, shift that token.  If negative, reduce the rule which
1095    number is the opposite.  If YYTABLE_NINF, syntax error.  */
1096 #define YYTABLE_NINF -214
1097 static const yytype_int16 yytable[] =
1098 {
1099       76,    89,   123,   173,   110,   282,   216,   135,   226,   215,
1100      278,    61,   223,   177,    95,   135,    62,    81,   288,   334,
1101      340,   173,   180,     7,   102,   242,   243,   103,   181,   105,
1102      352,   250,   235,   328,   127,   135,    86,    87,   340,   106,
1103      240,   329,   241,   136,   112,    96,    97,    98,    95,    82,
1104      265,   136,   223,   370,    27,    28,   289,    29,    90,   363,
1105      244,   245,   127,   129,   363,    37,   251,   111,    88,   218,
1106       76,   136,    91,    76,   254,   135,   135,   116,    76,    96,
1107       97,    98,    93,    76,   269,   270,   271,   216,   209,    61,
1108      281,   292,   131,   272,    62,   227,   228,   212,   275,   132,
1109       76,   276,   173,   273,   213,   113,   -28,   297,   113,    76,
1110      -82,   136,   136,   311,   160,   286,   229,    76,   287,    94,
1111      230,   118,   199,   119,   317,   232,   278,   290,    76,   223,
1112      338,   233,   160,   275,   367,    76,   275,    76,    84,    85,
1113      275,   302,   303,   304,   305,   224,   225,   275,   321,   322,
1114      318,   122,   135,   286,   371,   130,   325,   323,     2,     3,
1115        4,   179,   237,   326,    96,    97,    98,   104,    87,   173,
1116       86,    87,   238,   239,   133,   173,   176,    76,    76,   246,
1117      247,   339,   255,   256,   275,   331,   300,   301,   136,   306,
1118      307,   295,    81,   -29,   249,   248,   258,   231,   259,   339,
1119      236,   261,   252,   262,   199,   347,   346,   263,  -213,   266,
1120      358,   267,   279,   160,   283,   285,  -141,   341,   173,   275,
1121      324,   368,   330,  -185,   333,   332,   348,   344,   345,   361,
1122      355,   359,   356,   357,   360,   341,   216,   296,   309,   298,
1123      299,   160,   160,   160,   160,   160,   160,   160,   160,   160,
1124      160,   160,   362,   310,    76,   366,   372,   308,   210,   124,
1125      128,   211,    83,   284,   257,   327,   335,   369,   199,   336,
1126      349,   115,     0,     0,   320,   110,     0,     0,     0,     0,
1127      160,     0,     0,     0,     0,     0,   160,     0,     0,     0,
1128        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1129        0,   354,     0,     0,     0,     0,     0,     0,     0,     0,
1130        0,     0,     0,     0,     0,   199,   199,     0,     0,   199,
1131      199,     0,     0,     0,     0,     0,     0,     0,     0,   160,
1132        0,     0,     0,     0,     0,     0,     0,   199,     0,     0,
1133        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
1134        0,     0,     0,     0,     0,   199,     0,     0,     0,     0,
1135      199,     1,     2,     3,     4,     5,     6,     7,     8,     9,
1136       10,    11,   182,   183,   184,     0,   185,   186,   187,   188,
1137        0,     0,     0,    12,    13,    14,    15,    16,    17,    18,
1138       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1139        0,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1140       38,    39,    40,    41,   189,    42,    43,    44,    45,    46,
1141       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1142       56,    57,    58,    59,   139,    60,   140,   141,   142,   143,
1143        0,     0,     0,   144,   145,     0,     0,     0,     0,     0,
1144        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1145        0,     0,   146,     0,     0,     0,   190,   191,     0,     0,
1146        0,     0,   192,   147,   148,     0,   149,     1,     2,     3,
1147        4,     5,     6,     7,     8,     9,    10,    11,   182,   183,
1148      184,     0,   185,   186,   187,   188,     0,     0,     0,    12,
1149       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
1150       23,    24,    25,    26,    27,    28,     0,    29,    30,    31,
1151       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1152      189,    42,    43,    44,    45,    46,    47,    48,    49,    50,
1153       51,    52,    53,    54,    55,     0,    56,    57,    58,    59,
1154      139,    60,   140,   141,   142,   143,     0,     0,     0,   144,
1155      145,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1156        0,     0,     0,     0,     0,     0,     0,     0,   146,     0,
1157        0,     0,   190,   277,     0,     0,     0,     0,   192,   147,
1158      148,     0,   149,     1,     2,     3,     4,     5,     6,     7,
1159        8,     9,    10,    11,   182,   183,   184,     0,   185,   186,
1160      187,   188,     0,     0,     0,    12,    13,    14,    15,    16,
1161       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
1162       27,    28,     0,    29,    30,    31,    32,    33,    34,    35,
1163       36,    37,    38,    39,    40,    41,   189,    42,    43,    44,
1164       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1165       55,     0,    56,    57,    58,    59,   139,    60,   140,   141,
1166      142,   143,     0,     0,     0,   144,   145,     0,     0,     0,
1167        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1168        0,     0,     0,     0,   146,     0,     0,     0,   190,     0,
1169        0,     0,     0,     0,   192,   147,   148,     0,   149,     1,
1170        2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1171      182,   183,   184,     0,   185,   186,   187,   188,     0,     0,
1172        0,    12,    13,    14,    15,    16,    17,    18,    19,    20,
1173       21,    22,    23,    24,    25,    26,    27,    28,     0,    29,
1174       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
1175       40,    41,   189,    42,    43,    44,    45,    46,    47,    48,
1176       49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
1177       58,    59,   139,    60,   140,   141,   142,   143,     0,     0,
1178        0,   144,   145,     0,     0,     0,     0,     0,     0,     0,
1179        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1180      146,     0,     0,     0,   122,     0,     0,     0,     0,     0,
1181      192,   147,   148,     0,   149,     1,     2,     3,     4,     5,
1182        6,     7,     8,     9,    10,    11,   182,   183,   184,     0,
1183      185,   186,   187,   188,     0,     0,     0,    12,    13,    14,
1184       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1185       25,    26,    27,    28,     0,    29,    30,    31,    32,    33,
1186       34,    35,    36,    37,    38,    39,    40,    41,   189,    42,
1187       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
1188       53,    54,    55,     0,    56,    57,    58,    59,   139,    60,
1189      140,   141,   142,   143,     0,     0,     0,   144,   145,     0,
1190        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1191        0,     0,     0,     0,     0,     0,   146,     0,     0,     0,
1192        0,     0,     0,     0,     0,     0,   192,   147,   148,     0,
1193      149,     1,     2,     3,     4,     5,     6,     7,     8,     9,
1194       10,    11,     0,     0,     0,     0,     0,     0,     0,     0,
1195        0,     0,     0,    12,    13,    14,    15,    16,    17,    18,
1196       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1197        0,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1198       38,    39,    40,    41,     0,    42,    43,    44,    45,    46,
1199       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1200       56,    57,    58,    59,   139,    60,   140,   141,   142,   143,
1201        0,     0,     0,   144,   145,     0,     0,     0,     0,     0,
1202        0,     0,     0,     0,     0,     0,     0,     0,   134,     2,
1203        3,     4,   146,     6,     7,     8,     9,    10,    11,     0,
1204        0,     0,   192,   147,   148,     0,   149,     0,     0,     0,
1205       12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
1206       22,    23,    24,    25,    26,    27,    28,     0,    29,    30,
1207       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
1208       41,     0,    42,    43,    44,    45,    46,    47,    48,    49,
1209       50,    51,    52,    53,    54,    55,     0,    56,    57,    58,
1210       59,   139,    60,   140,   141,   142,   143,     0,     0,     0,
1211      144,   145,     0,     0,     0,     0,     0,     0,     0,     0,
1212        0,     0,     0,     0,     2,     3,     4,     0,     0,   146,
1213        8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
1214      147,   148,     0,   149,     0,    12,    13,    14,    15,    16,
1215       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
1216        0,     0,     0,     0,     0,    31,    32,    33,    34,    35,
1217       36,     0,     0,     0,    40,    41,     0,    42,    43,    44,
1218       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1219       55,     0,    56,    57,    58,     0,   107,    60,     0,     0,
1220        8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
1221        0,     0,     0,     0,     0,    12,    13,    14,    15,    16,
1222       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
1223        0,     0,     0,     0,   108,    31,    32,    33,    34,    35,
1224       36,     0,     0,     0,    40,    41,     0,    42,    43,    44,
1225       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1226       55,     0,    56,    57,    58,     0,   139,    60,   140,   141,
1227      142,   143,     0,     0,     0,   144,   145,     0,     0,     0,
1228        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1229        0,     0,     0,     0,   146,     0,     0,   214,     8,     9,
1230       10,    11,     0,     0,     0,   147,   148,     0,   149,     0,
1231        0,     0,     0,    12,    13,    14,    15,    16,    17,    18,
1232       19,    20,    21,    22,    23,    24,    25,    26,     0,     0,
1233        0,     0,     0,    31,    32,    33,    34,    35,    36,     0,
1234        0,     0,    40,    41,     0,    42,    43,    44,    45,    46,
1235       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1236       56,    57,    58,     0,   139,    60,   140,   141,   142,   143,
1237        0,     0,     0,   144,   145,     0,     0,     0,     0,     0,
1238        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1239        0,     0,   146,     8,     9,    10,    11,     0,     0,     0,
1240        0,     0,   264,   147,   148,     0,   149,     0,    12,    13,
1241       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
1242       24,    25,    26,     0,     0,     0,     0,     0,    31,    32,
1243       33,    34,    35,    36,     0,     0,     0,    40,    41,     0,
1244       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1245       52,    53,    54,    55,     0,    56,    57,    58,     0,   139,
1246       60,   140,   141,   142,   143,     0,     0,     0,   144,   145,
1247        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1248        0,     0,     0,     0,     0,     0,     0,   146,     0,     0,
1249      280,     8,     9,    10,    11,     0,     0,     0,   147,   148,
1250        0,   149,     0,     0,     0,     0,    12,    13,    14,    15,
1251       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
1252       26,     0,     0,     0,     0,     0,    31,    32,    33,    34,
1253       35,    36,     0,     0,     0,    40,    41,     0,    42,    43,
1254       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
1255       54,    55,     0,    56,    57,    58,     0,   139,    60,   140,
1256      141,   142,   143,     0,     0,     0,   144,   145,     0,     0,
1257        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1258        0,     0,     0,     0,     0,   146,     8,     9,    10,    11,
1259        0,     0,     0,     0,     0,     0,   147,   148,     0,   149,
1260        0,    12,    13,    14,    15,    16,    17,    18,    19,    20,
1261       21,    22,    23,    24,    25,    26,     0,     0,     0,     0,
1262        0,    31,    32,    33,    34,    35,    36,     0,     0,     0,
1263       40,   234,     0,    42,    43,    44,    45,    46,    47,    48,
1264       49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
1265       58,     0,   139,    60,   140,   141,   142,   143,     0,     0,
1266        0,   144,   145,     0,     0,     0,     0,     0,     0,     0,
1267        0,     0,     0,     0,     0,     0,   134,     2,     3,     4,
1268      146,     6,     7,     8,     9,    10,    11,     0,     0,     0,
1269        0,   147,   148,     0,   149,     0,     0,     0,    12,    13,
1270       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
1271       24,    25,    26,    27,    28,     0,    29,    30,    31,    32,
1272       33,    34,    35,    36,    37,    38,    39,    40,    41,     0,
1273       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1274       52,    53,    54,    55,     0,    56,    57,    58,    59,     0,
1275       60,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1276        0,   134,     2,     3,     4,     0,     6,     7,     8,     9,
1277       10,    11,     0,     0,     0,     0,     0,     0,     0,     0,
1278        0,     0,   222,    12,    13,    14,    15,    16,    17,    18,
1279       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1280        0,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1281       38,    39,    40,    41,     0,    42,    43,    44,    45,    46,
1282       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1283       56,    57,    58,    59,     0,    60,     0,     0,     0,     0,
1284        0,     0,     0,     0,     0,     0,   134,     2,     3,     4,
1285        0,     6,     7,     8,     9,    10,    11,     0,     0,     0,
1286        0,     0,     0,     0,     0,     0,     0,   253,    12,    13,
1287       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
1288       24,    25,    26,    27,    28,     0,    29,    30,    31,    32,
1289       33,    34,    35,    36,    37,    38,    39,    40,    41,     0,
1290       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1291       52,    53,    54,    55,     0,    56,    57,    58,    59,     0,
1292       60,     0,     0,     0,     0,     0,     0,     0,   114,     0,
1293        0,     1,     2,     3,     4,     5,     6,     7,     8,     9,
1294       10,    11,     0,     0,     0,     0,     0,     0,     0,     0,
1295        0,     0,   312,    12,    13,    14,    15,    16,    17,    18,
1296       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1297        0,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1298       38,    39,    40,    41,     0,    42,    43,    44,    45,    46,
1299       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1300       56,    57,    58,    59,     0,    60,     1,     2,     3,     4,
1301        5,     6,     7,     8,     9,    10,    11,     0,     0,     0,
1302        0,     0,     0,     0,     0,     0,     0,     0,    12,    13,
1303       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
1304       24,    25,    26,    27,    28,     0,    29,    30,    31,    32,
1305       33,    34,    35,    36,    37,    38,    39,    40,    41,     0,
1306       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1307       52,    53,    54,    55,     0,    56,    57,    58,    59,     0,
1308       60,   134,     2,     3,     4,     0,     6,     7,     8,     9,
1309       10,    11,     0,     0,     0,     0,     0,     0,     0,     0,
1310        0,     0,     0,    12,    13,    14,    15,    16,    17,    18,
1311       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1312        0,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1313       38,    39,    40,    41,     0,    42,    43,    44,    45,    46,
1314       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1315       56,    57,    58,    59,     0,    60,     2,     3,     4,     0,
1316        0,     0,     8,     9,    10,    11,     0,     0,     0,     0,
1317        0,     0,     0,     0,     0,     0,     0,    12,    13,    14,
1318       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1319       25,    26,     0,     0,     0,     0,     0,    31,    32,    33,
1320       34,    35,    36,     0,     0,     0,    40,    41,     0,    42,
1321       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
1322       53,    54,    55,     0,    56,    57,    58,     0,     0,    60,
1323        8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
1324        0,     0,     0,     0,     0,    12,    13,    14,    15,    16,
1325       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
1326        0,     0,     0,     0,     0,    31,    32,    33,    34,    35,
1327       36,     0,     0,     0,    40,    41,     0,    42,    43,    44,
1328       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1329       55,     0,    56,    57,    58,     0,   293,   294,     8,     9,
1330       10,    11,     0,     0,     0,     0,     0,     0,     0,     0,
1331        0,     0,     0,    12,    13,    14,    15,    16,    17,    18,
1332       19,    20,    21,    22,    23,    24,    25,    26,     0,     0,
1333        0,     0,     0,    31,    32,    33,    34,    35,    36,     0,
1334        0,     0,    40,    41,     0,    42,    43,    44,    45,    46,
1335       47,    48,    49,    50,    51,    52,    53,    54,    55,     0,
1336       56,    57,    58,     0,     0,    60
1337 };
1338
1339 #define yypact_value_is_default(Yystate) \
1340   (!!((Yystate) == (-309)))
1341
1342 #define yytable_value_is_error(Yytable_value) \
1343   YYID (0)
1344
1345 static const yytype_int16 yycheck[] =
1346 {
1347        0,    40,    92,   113,    70,   213,   132,   109,   146,   131,
1348      204,     0,   137,   117,     9,   117,     0,    44,    76,   315,
1349      319,   131,   105,     9,   111,    87,    88,   114,   111,    68,
1350      338,    92,   158,   106,   100,   137,    76,    77,   337,    69,
1351      116,   114,   118,   109,    74,    40,    41,    42,     9,    76,
1352      188,   117,   177,   361,    40,    41,   114,    43,   104,   355,
1353      122,   123,   128,   102,   360,    51,   127,    73,   108,   135,
1354       70,   137,   114,    73,   178,   177,   178,    83,    78,    40,
1355       41,    42,   105,    83,    94,    95,    96,   213,   127,    78,
1356      212,   229,   106,   103,    78,    85,    86,   106,   111,   113,
1357      100,   114,   212,   113,   113,   106,   104,   233,   106,   109,
1358      105,   177,   178,   251,   113,   111,   106,   117,   114,   111,
1359      110,   108,   122,    76,   262,   105,   320,   105,   128,   254,
1360      105,   111,   131,   111,   105,   135,   111,   137,    40,    41,
1361      111,   242,   243,   244,   245,   144,   145,   111,   274,   275,
1362      114,   108,   254,   111,   362,   104,   114,   279,     4,     5,
1363        6,   113,   161,   285,    40,    41,    42,    76,    77,   279,
1364       76,    77,   119,   120,   108,   285,   114,   177,   178,    89,
1365       90,   319,    79,    80,   111,   112,   240,   241,   254,   246,
1366      247,   230,    44,   104,    93,    91,   114,   105,   114,   337,
1367      104,   104,   107,   104,   204,   331,   328,   114,   108,   104,
1368      348,   109,   106,   212,   107,   106,   104,   319,   328,   111,
1369      107,   359,   107,   104,   314,    56,   104,   107,   107,    17,
1370      105,   114,   109,   107,   105,   337,   362,   230,   249,   238,
1371      239,   240,   241,   242,   243,   244,   245,   246,   247,   248,
1372      249,   250,   113,   250,   254,   114,   114,   248,   128,    94,
1373      101,   128,     5,   218,   181,   286,   316,   360,   268,   316,
1374      337,    78,    -1,    -1,   268,   341,    -1,    -1,    -1,    -1,
1375      279,    -1,    -1,    -1,    -1,    -1,   285,    -1,    -1,    -1,
1376       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1377       -1,   340,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1378       -1,    -1,    -1,    -1,    -1,   315,   316,    -1,    -1,   319,
1379      320,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   328,
1380       -1,    -1,    -1,    -1,    -1,    -1,    -1,   337,    -1,    -1,
1381       -1,   341,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1382       -1,    -1,    -1,    -1,    -1,   355,    -1,    -1,    -1,    -1,
1383      360,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1384       12,    13,    14,    15,    16,    -1,    18,    19,    20,    21,
1385       -1,    -1,    -1,    25,    26,    27,    28,    29,    30,    31,
1386       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1387       -1,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1388       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
1389       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1390       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
1391       -1,    -1,    -1,    85,    86,    -1,    -1,    -1,    -1,    -1,
1392       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1393       -1,    -1,   104,    -1,    -1,    -1,   108,   109,    -1,    -1,
1394       -1,    -1,   114,   115,   116,    -1,   118,     3,     4,     5,
1395        6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
1396       16,    -1,    18,    19,    20,    21,    -1,    -1,    -1,    25,
1397       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
1398       36,    37,    38,    39,    40,    41,    -1,    43,    44,    45,
1399       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
1400       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
1401       66,    67,    68,    69,    70,    -1,    72,    73,    74,    75,
1402       76,    77,    78,    79,    80,    81,    -1,    -1,    -1,    85,
1403       86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1404       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,    -1,
1405       -1,    -1,   108,   109,    -1,    -1,    -1,    -1,   114,   115,
1406      116,    -1,   118,     3,     4,     5,     6,     7,     8,     9,
1407       10,    11,    12,    13,    14,    15,    16,    -1,    18,    19,
1408       20,    21,    -1,    -1,    -1,    25,    26,    27,    28,    29,
1409       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
1410       40,    41,    -1,    43,    44,    45,    46,    47,    48,    49,
1411       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
1412       60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
1413       70,    -1,    72,    73,    74,    75,    76,    77,    78,    79,
1414       80,    81,    -1,    -1,    -1,    85,    86,    -1,    -1,    -1,
1415       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1416       -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,   108,    -1,
1417       -1,    -1,    -1,    -1,   114,   115,   116,    -1,   118,     3,
1418        4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
1419       14,    15,    16,    -1,    18,    19,    20,    21,    -1,    -1,
1420       -1,    25,    26,    27,    28,    29,    30,    31,    32,    33,
1421       34,    35,    36,    37,    38,    39,    40,    41,    -1,    43,
1422       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
1423       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
1424       64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
1425       74,    75,    76,    77,    78,    79,    80,    81,    -1,    -1,
1426       -1,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1427       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1428      104,    -1,    -1,    -1,   108,    -1,    -1,    -1,    -1,    -1,
1429      114,   115,   116,    -1,   118,     3,     4,     5,     6,     7,
1430        8,     9,    10,    11,    12,    13,    14,    15,    16,    -1,
1431       18,    19,    20,    21,    -1,    -1,    -1,    25,    26,    27,
1432       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1433       38,    39,    40,    41,    -1,    43,    44,    45,    46,    47,
1434       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
1435       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
1436       68,    69,    70,    -1,    72,    73,    74,    75,    76,    77,
1437       78,    79,    80,    81,    -1,    -1,    -1,    85,    86,    -1,
1438       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1439       -1,    -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,
1440       -1,    -1,    -1,    -1,    -1,    -1,   114,   115,   116,    -1,
1441      118,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1442       12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1443       -1,    -1,    -1,    25,    26,    27,    28,    29,    30,    31,
1444       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1445       -1,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1446       52,    53,    54,    55,    -1,    57,    58,    59,    60,    61,
1447       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1448       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
1449       -1,    -1,    -1,    85,    86,    -1,    -1,    -1,    -1,    -1,
1450       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
1451        5,     6,   104,     8,     9,    10,    11,    12,    13,    -1,
1452       -1,    -1,   114,   115,   116,    -1,   118,    -1,    -1,    -1,
1453       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
1454       35,    36,    37,    38,    39,    40,    41,    -1,    43,    44,
1455       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1456       55,    -1,    57,    58,    59,    60,    61,    62,    63,    64,
1457       65,    66,    67,    68,    69,    70,    -1,    72,    73,    74,
1458       75,    76,    77,    78,    79,    80,    81,    -1,    -1,    -1,
1459       85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1460       -1,    -1,    -1,    -1,     4,     5,     6,    -1,    -1,   104,
1461       10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,
1462      115,   116,    -1,   118,    -1,    25,    26,    27,    28,    29,
1463       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
1464       -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,
1465       50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,    59,
1466       60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
1467       70,    -1,    72,    73,    74,    -1,    76,    77,    -1,    -1,
1468       10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,
1469       -1,    -1,    -1,    -1,    -1,    25,    26,    27,    28,    29,
1470       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
1471       -1,    -1,    -1,    -1,   114,    45,    46,    47,    48,    49,
1472       50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,    59,
1473       60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
1474       70,    -1,    72,    73,    74,    -1,    76,    77,    78,    79,
1475       80,    81,    -1,    -1,    -1,    85,    86,    -1,    -1,    -1,
1476       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1477       -1,    -1,    -1,    -1,   104,    -1,    -1,   107,    10,    11,
1478       12,    13,    -1,    -1,    -1,   115,   116,    -1,   118,    -1,
1479       -1,    -1,    -1,    25,    26,    27,    28,    29,    30,    31,
1480       32,    33,    34,    35,    36,    37,    38,    39,    -1,    -1,
1481       -1,    -1,    -1,    45,    46,    47,    48,    49,    50,    -1,
1482       -1,    -1,    54,    55,    -1,    57,    58,    59,    60,    61,
1483       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1484       72,    73,    74,    -1,    76,    77,    78,    79,    80,    81,
1485       -1,    -1,    -1,    85,    86,    -1,    -1,    -1,    -1,    -1,
1486       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1487       -1,    -1,   104,    10,    11,    12,    13,    -1,    -1,    -1,
1488       -1,    -1,   114,   115,   116,    -1,   118,    -1,    25,    26,
1489       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
1490       37,    38,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,
1491       47,    48,    49,    50,    -1,    -1,    -1,    54,    55,    -1,
1492       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1493       67,    68,    69,    70,    -1,    72,    73,    74,    -1,    76,
1494       77,    78,    79,    80,    81,    -1,    -1,    -1,    85,    86,
1495       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1496       -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,
1497      107,    10,    11,    12,    13,    -1,    -1,    -1,   115,   116,
1498       -1,   118,    -1,    -1,    -1,    -1,    25,    26,    27,    28,
1499       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
1500       39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,
1501       49,    50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,
1502       59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
1503       69,    70,    -1,    72,    73,    74,    -1,    76,    77,    78,
1504       79,    80,    81,    -1,    -1,    -1,    85,    86,    -1,    -1,
1505       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1506       -1,    -1,    -1,    -1,    -1,   104,    10,    11,    12,    13,
1507       -1,    -1,    -1,    -1,    -1,    -1,   115,   116,    -1,   118,
1508       -1,    25,    26,    27,    28,    29,    30,    31,    32,    33,
1509       34,    35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,
1510       -1,    45,    46,    47,    48,    49,    50,    -1,    -1,    -1,
1511       54,    55,    -1,    57,    58,    59,    60,    61,    62,    63,
1512       64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
1513       74,    -1,    76,    77,    78,    79,    80,    81,    -1,    -1,
1514       -1,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1515       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,
1516      104,     8,     9,    10,    11,    12,    13,    -1,    -1,    -1,
1517       -1,   115,   116,    -1,   118,    -1,    -1,    -1,    25,    26,
1518       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
1519       37,    38,    39,    40,    41,    -1,    43,    44,    45,    46,
1520       47,    48,    49,    50,    51,    52,    53,    54,    55,    -1,
1521       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1522       67,    68,    69,    70,    -1,    72,    73,    74,    75,    -1,
1523       77,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1524       -1,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
1525       12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1526       -1,    -1,   109,    25,    26,    27,    28,    29,    30,    31,
1527       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1528       -1,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1529       52,    53,    54,    55,    -1,    57,    58,    59,    60,    61,
1530       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1531       72,    73,    74,    75,    -1,    77,    -1,    -1,    -1,    -1,
1532       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,
1533       -1,     8,     9,    10,    11,    12,    13,    -1,    -1,    -1,
1534       -1,    -1,    -1,    -1,    -1,    -1,    -1,   109,    25,    26,
1535       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
1536       37,    38,    39,    40,    41,    -1,    43,    44,    45,    46,
1537       47,    48,    49,    50,    51,    52,    53,    54,    55,    -1,
1538       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1539       67,    68,    69,    70,    -1,    72,    73,    74,    75,    -1,
1540       77,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,
1541       -1,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1542       12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1543       -1,    -1,   109,    25,    26,    27,    28,    29,    30,    31,
1544       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1545       -1,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1546       52,    53,    54,    55,    -1,    57,    58,    59,    60,    61,
1547       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1548       72,    73,    74,    75,    -1,    77,     3,     4,     5,     6,
1549        7,     8,     9,    10,    11,    12,    13,    -1,    -1,    -1,
1550       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    25,    26,
1551       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
1552       37,    38,    39,    40,    41,    -1,    43,    44,    45,    46,
1553       47,    48,    49,    50,    51,    52,    53,    54,    55,    -1,
1554       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1555       67,    68,    69,    70,    -1,    72,    73,    74,    75,    -1,
1556       77,     3,     4,     5,     6,    -1,     8,     9,    10,    11,
1557       12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1558       -1,    -1,    -1,    25,    26,    27,    28,    29,    30,    31,
1559       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
1560       -1,    43,    44,    45,    46,    47,    48,    49,    50,    51,
1561       52,    53,    54,    55,    -1,    57,    58,    59,    60,    61,
1562       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1563       72,    73,    74,    75,    -1,    77,     4,     5,     6,    -1,
1564       -1,    -1,    10,    11,    12,    13,    -1,    -1,    -1,    -1,
1565       -1,    -1,    -1,    -1,    -1,    -1,    -1,    25,    26,    27,
1566       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
1567       38,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,
1568       48,    49,    50,    -1,    -1,    -1,    54,    55,    -1,    57,
1569       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
1570       68,    69,    70,    -1,    72,    73,    74,    -1,    -1,    77,
1571       10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,
1572       -1,    -1,    -1,    -1,    -1,    25,    26,    27,    28,    29,
1573       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
1574       -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,
1575       50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,    59,
1576       60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
1577       70,    -1,    72,    73,    74,    -1,    76,    77,    10,    11,
1578       12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1579       -1,    -1,    -1,    25,    26,    27,    28,    29,    30,    31,
1580       32,    33,    34,    35,    36,    37,    38,    39,    -1,    -1,
1581       -1,    -1,    -1,    45,    46,    47,    48,    49,    50,    -1,
1582       -1,    -1,    54,    55,    -1,    57,    58,    59,    60,    61,
1583       62,    63,    64,    65,    66,    67,    68,    69,    70,    -1,
1584       72,    73,    74,    -1,    -1,    77
1585 };
1586
1587 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1588    symbol of state STATE-NUM.  */
1589 static const yytype_uint8 yystos[] =
1590 {
1591        0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1592       12,    13,    25,    26,    27,    28,    29,    30,    31,    32,
1593       33,    34,    35,    36,    37,    38,    39,    40,    41,    43,
1594       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
1595       54,    55,    57,    58,    59,    60,    61,    62,    63,    64,
1596       65,    66,    67,    68,    69,    70,    72,    73,    74,    75,
1597       77,   160,   161,   162,   163,   164,   169,   170,   171,   172,
1598      174,   175,   176,   177,   178,   181,   182,   183,   215,   216,
1599      217,    44,    76,   177,    40,    41,    76,    77,   108,   129,
1600      104,   114,   218,   105,   111,     9,    40,    41,    42,   166,
1601      167,   173,   111,   114,    76,   129,   175,    76,   114,   159,
1602      176,   181,   175,   106,     0,   216,   181,   185,   108,    76,
1603      179,   180,   108,   201,   166,   165,   168,   176,   167,   129,
1604      104,   106,   113,   108,     3,   174,   176,   186,   187,    76,
1605       78,    79,    80,    81,    85,    86,   104,   115,   116,   118,
1606      130,   131,   132,   134,   135,   136,   137,   138,   139,   140,
1607      141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
1608      151,   152,   153,   154,   158,   182,   114,   186,   184,   113,
1609      105,   111,    14,    15,    16,    18,    19,    20,    21,    56,
1610      108,   109,   114,   141,   154,   155,   157,   160,   161,   182,
1611      191,   192,   193,   194,   202,   203,   204,   207,   214,   129,
1612      165,   168,   106,   113,   107,   158,   155,   190,   176,   129,
1613      188,   189,   109,   187,   141,   141,   157,    85,    86,   106,
1614      110,   105,   105,   111,    55,   155,   104,   141,   119,   120,
1615      116,   118,    87,    88,   122,   123,    89,    90,    91,    93,
1616       92,   127,   107,   109,   186,    79,    80,   180,   114,   114,
1617      209,   104,   104,   114,   114,   157,   104,   109,   195,    94,
1618       95,    96,   103,   113,   156,   111,   114,   109,   192,   106,
1619      107,   158,   190,   107,   188,   106,   111,   114,    76,   114,
1620      105,   133,   157,    76,    77,   129,   136,   155,   141,   141,
1621      143,   143,   145,   145,   145,   145,   146,   146,   150,   151,
1622      152,   157,   109,   198,   199,   200,   210,   157,   114,   208,
1623      202,   155,   155,   158,   107,   114,   158,   189,   106,   114,
1624      107,   112,    56,   201,   193,   191,   203,   211,   105,   157,
1625      171,   174,   206,   196,   107,   107,   158,   155,   104,   206,
1626      212,   213,   198,   205,   129,   105,   109,   107,   157,   114,
1627      105,    17,   113,   193,   197,   201,   114,   105,   157,   197,
1628      198,   190,   114
1629 };
1630
1631 #define yyerrok         (yyerrstatus = 0)
1632 #define yyclearin       (yychar = YYEMPTY)
1633 #define YYEMPTY         (-2)
1634 #define YYEOF           0
1635
1636 #define YYACCEPT        goto yyacceptlab
1637 #define YYABORT         goto yyabortlab
1638 #define YYERROR         goto yyerrorlab
1639
1640
1641 /* Like YYERROR except do call yyerror.  This remains here temporarily
1642    to ease the transition to the new meaning of YYERROR, for GCC.
1643    Once GCC version 2 has supplanted version 1, this can go.  However,
1644    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
1645    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1646    discussed.  */
1647
1648 #define YYFAIL          goto yyerrlab
1649 #if defined YYFAIL
1650   /* This is here to suppress warnings from the GCC cpp's
1651      -Wunused-macros.  Normally we don't worry about that warning, but
1652      some users do, and we want to make it easy for users to remove
1653      YYFAIL uses, which will produce warnings from Bison 2.5.  */
1654 #endif
1655
1656 #define YYRECOVERING()  (!!yyerrstatus)
1657
1658 #define YYBACKUP(Token, Value)                                  \
1659 do                                                              \
1660   if (yychar == YYEMPTY)                                        \
1661     {                                                           \
1662       yychar = (Token);                                         \
1663       yylval = (Value);                                         \
1664       YYPOPSTACK (yylen);                                       \
1665       yystate = *yyssp;                                         \
1666       goto yybackup;                                            \
1667     }                                                           \
1668   else                                                          \
1669     {                                                           \
1670       yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
1671       YYERROR;                                                  \
1672     }                                                           \
1673 while (YYID (0))
1674
1675 /* Error token number */
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 #ifndef YYLLOC_DEFAULT
1685 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1686     do                                                                  \
1687       if (YYID (N))                                                     \
1688         {                                                               \
1689           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1690           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1691           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1692           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1693         }                                                               \
1694       else                                                              \
1695         {                                                               \
1696           (Current).first_line   = (Current).last_line   =              \
1697             YYRHSLOC (Rhs, 0).last_line;                                \
1698           (Current).first_column = (Current).last_column =              \
1699             YYRHSLOC (Rhs, 0).last_column;                              \
1700         }                                                               \
1701     while (YYID (0))
1702 #endif
1703
1704 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1705
1706
1707 /* YY_LOCATION_PRINT -- Print the location on the stream.
1708    This macro was not mandated originally: define only if we know
1709    we won't break user code: when these are the locations we know.  */
1710
1711 #ifndef YY_LOCATION_PRINT
1712 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1713
1714 /* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
1715
1716 __attribute__((__unused__))
1717 #if (defined __STDC__ || defined __C99__FUNC__ \
1718      || defined __cplusplus || defined _MSC_VER)
1719 static unsigned
1720 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1721 #else
1722 static unsigned
1723 yy_location_print_ (yyo, yylocp)
1724     FILE *yyo;
1725     YYLTYPE const * const yylocp;
1726 #endif
1727 {
1728   unsigned res = 0;
1729   int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1730   if (0 <= yylocp->first_line)
1731     {
1732       res += fprintf (yyo, "%d", yylocp->first_line);
1733       if (0 <= yylocp->first_column)
1734         res += fprintf (yyo, ".%d", yylocp->first_column);
1735     }
1736   if (0 <= yylocp->last_line)
1737     {
1738       if (yylocp->first_line < yylocp->last_line)
1739         {
1740           res += fprintf (yyo, "-%d", yylocp->last_line);
1741           if (0 <= end_col)
1742             res += fprintf (yyo, ".%d", end_col);
1743         }
1744       else if (0 <= end_col && yylocp->first_column < end_col)
1745         res += fprintf (yyo, "-%d", end_col);
1746     }
1747   return res;
1748  }
1749
1750 #  define YY_LOCATION_PRINT(File, Loc)          \
1751   yy_location_print_ (File, &(Loc))
1752
1753 # else
1754 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1755 # endif
1756 #endif
1757
1758
1759 /* YYLEX -- calling `yylex' with the right arguments.  */
1760 #ifdef YYLEX_PARAM
1761 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1762 #else
1763 # define YYLEX yylex (&yylval, &yylloc)
1764 #endif
1765
1766 /* Enable debugging if requested.  */
1767 #if YYDEBUG
1768
1769 # ifndef YYFPRINTF
1770 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1771 #  define YYFPRINTF fprintf
1772 # endif
1773
1774 # define YYDPRINTF(Args)                        \
1775 do {                                            \
1776   if (yydebug)                                  \
1777     YYFPRINTF Args;                             \
1778 } while (YYID (0))
1779
1780 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1781 do {                                                                      \
1782   if (yydebug)                                                            \
1783     {                                                                     \
1784       YYFPRINTF (stderr, "%s ", Title);                                   \
1785       yy_symbol_print (stderr,                                            \
1786                   Type, Value, Location, context); \
1787       YYFPRINTF (stderr, "\n");                                           \
1788     }                                                                     \
1789 } while (YYID (0))
1790
1791
1792 /*--------------------------------.
1793 | Print this symbol on YYOUTPUT.  |
1794 `--------------------------------*/
1795
1796 /*ARGSUSED*/
1797 #if (defined __STDC__ || defined __C99__FUNC__ \
1798      || defined __cplusplus || defined _MSC_VER)
1799 static void
1800 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
1801 #else
1802 static void
1803 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
1804     FILE *yyoutput;
1805     int yytype;
1806     YYSTYPE const * const yyvaluep;
1807     YYLTYPE const * const yylocationp;
1808     TParseContext* context;
1809 #endif
1810 {
1811   FILE *yyo = yyoutput;
1812   YYUSE (yyo);
1813   if (!yyvaluep)
1814     return;
1815   YYUSE (yylocationp);
1816   YYUSE (context);
1817 # ifdef YYPRINT
1818   if (yytype < YYNTOKENS)
1819     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1820 # else
1821   YYUSE (yyoutput);
1822 # endif
1823   YYUSE (yytype);
1824 }
1825
1826
1827 /*--------------------------------.
1828 | Print this symbol on YYOUTPUT.  |
1829 `--------------------------------*/
1830
1831 #if (defined __STDC__ || defined __C99__FUNC__ \
1832      || defined __cplusplus || defined _MSC_VER)
1833 static void
1834 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context)
1835 #else
1836 static void
1837 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
1838     FILE *yyoutput;
1839     int yytype;
1840     YYSTYPE const * const yyvaluep;
1841     YYLTYPE const * const yylocationp;
1842     TParseContext* context;
1843 #endif
1844 {
1845   if (yytype < YYNTOKENS)
1846     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1847   else
1848     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1849
1850   YY_LOCATION_PRINT (yyoutput, *yylocationp);
1851   YYFPRINTF (yyoutput, ": ");
1852   yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
1853   YYFPRINTF (yyoutput, ")");
1854 }
1855
1856 /*------------------------------------------------------------------.
1857 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1858 | TOP (included).                                                   |
1859 `------------------------------------------------------------------*/
1860
1861 #if (defined __STDC__ || defined __C99__FUNC__ \
1862      || defined __cplusplus || defined _MSC_VER)
1863 static void
1864 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1865 #else
1866 static void
1867 yy_stack_print (yybottom, yytop)
1868     yytype_int16 *yybottom;
1869     yytype_int16 *yytop;
1870 #endif
1871 {
1872   YYFPRINTF (stderr, "Stack now");
1873   for (; yybottom <= yytop; yybottom++)
1874     {
1875       int yybot = *yybottom;
1876       YYFPRINTF (stderr, " %d", yybot);
1877     }
1878   YYFPRINTF (stderr, "\n");
1879 }
1880
1881 # define YY_STACK_PRINT(Bottom, Top)                            \
1882 do {                                                            \
1883   if (yydebug)                                                  \
1884     yy_stack_print ((Bottom), (Top));                           \
1885 } while (YYID (0))
1886
1887
1888 /*------------------------------------------------.
1889 | Report that the YYRULE is going to be reduced.  |
1890 `------------------------------------------------*/
1891
1892 #if (defined __STDC__ || defined __C99__FUNC__ \
1893      || defined __cplusplus || defined _MSC_VER)
1894 static void
1895 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context)
1896 #else
1897 static void
1898 yy_reduce_print (yyvsp, yylsp, yyrule, context)
1899     YYSTYPE *yyvsp;
1900     YYLTYPE *yylsp;
1901     int yyrule;
1902     TParseContext* context;
1903 #endif
1904 {
1905   int yynrhs = yyr2[yyrule];
1906   int yyi;
1907   unsigned long int yylno = yyrline[yyrule];
1908   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1909              yyrule - 1, yylno);
1910   /* The symbols being reduced.  */
1911   for (yyi = 0; yyi < yynrhs; yyi++)
1912     {
1913       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1914       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1915                        &(yyvsp[(yyi + 1) - (yynrhs)])
1916                        , &(yylsp[(yyi + 1) - (yynrhs)])                , context);
1917       YYFPRINTF (stderr, "\n");
1918     }
1919 }
1920
1921 # define YY_REDUCE_PRINT(Rule)          \
1922 do {                                    \
1923   if (yydebug)                          \
1924     yy_reduce_print (yyvsp, yylsp, Rule, context); \
1925 } while (YYID (0))
1926
1927 /* Nonzero means print parse trace.  It is left uninitialized so that
1928    multiple parsers can coexist.  */
1929 int yydebug;
1930 #else /* !YYDEBUG */
1931 # define YYDPRINTF(Args)
1932 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1933 # define YY_STACK_PRINT(Bottom, Top)
1934 # define YY_REDUCE_PRINT(Rule)
1935 #endif /* !YYDEBUG */
1936
1937
1938 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1939 #ifndef YYINITDEPTH
1940 # define YYINITDEPTH 200
1941 #endif
1942
1943 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1944    if the built-in stack extension method is used).
1945
1946    Do not make this value too large; the results are undefined if
1947    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1948    evaluated with infinite-precision integer arithmetic.  */
1949
1950 #ifndef YYMAXDEPTH
1951 # define YYMAXDEPTH 10000
1952 #endif
1953
1954
1955 #if YYERROR_VERBOSE
1956
1957 # ifndef yystrlen
1958 #  if defined __GLIBC__ && defined _STRING_H
1959 #   define yystrlen strlen
1960 #  else
1961 /* Return the length of YYSTR.  */
1962 #if (defined __STDC__ || defined __C99__FUNC__ \
1963      || defined __cplusplus || defined _MSC_VER)
1964 static YYSIZE_T
1965 yystrlen (const char *yystr)
1966 #else
1967 static YYSIZE_T
1968 yystrlen (yystr)
1969     const char *yystr;
1970 #endif
1971 {
1972   YYSIZE_T yylen;
1973   for (yylen = 0; yystr[yylen]; yylen++)
1974     continue;
1975   return yylen;
1976 }
1977 #  endif
1978 # endif
1979
1980 # ifndef yystpcpy
1981 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1982 #   define yystpcpy stpcpy
1983 #  else
1984 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1985    YYDEST.  */
1986 #if (defined __STDC__ || defined __C99__FUNC__ \
1987      || defined __cplusplus || defined _MSC_VER)
1988 static char *
1989 yystpcpy (char *yydest, const char *yysrc)
1990 #else
1991 static char *
1992 yystpcpy (yydest, yysrc)
1993     char *yydest;
1994     const char *yysrc;
1995 #endif
1996 {
1997   char *yyd = yydest;
1998   const char *yys = yysrc;
1999
2000   while ((*yyd++ = *yys++) != '\0')
2001     continue;
2002
2003   return yyd - 1;
2004 }
2005 #  endif
2006 # endif
2007
2008 # ifndef yytnamerr
2009 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2010    quotes and backslashes, so that it's suitable for yyerror.  The
2011    heuristic is that double-quoting is unnecessary unless the string
2012    contains an apostrophe, a comma, or backslash (other than
2013    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
2014    null, do not copy; instead, return the length of what the result
2015    would have been.  */
2016 static YYSIZE_T
2017 yytnamerr (char *yyres, const char *yystr)
2018 {
2019   if (*yystr == '"')
2020     {
2021       YYSIZE_T yyn = 0;
2022       char const *yyp = yystr;
2023
2024       for (;;)
2025         switch (*++yyp)
2026           {
2027           case '\'':
2028           case ',':
2029             goto do_not_strip_quotes;
2030
2031           case '\\':
2032             if (*++yyp != '\\')
2033               goto do_not_strip_quotes;
2034             /* Fall through.  */
2035           default:
2036             if (yyres)
2037               yyres[yyn] = *yyp;
2038             yyn++;
2039             break;
2040
2041           case '"':
2042             if (yyres)
2043               yyres[yyn] = '\0';
2044             return yyn;
2045           }
2046     do_not_strip_quotes: ;
2047     }
2048
2049   if (! yyres)
2050     return yystrlen (yystr);
2051
2052   return yystpcpy (yyres, yystr) - yyres;
2053 }
2054 # endif
2055
2056 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
2057    about the unexpected token YYTOKEN for the state stack whose top is
2058    YYSSP.
2059
2060    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
2061    not large enough to hold the message.  In that case, also set
2062    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
2063    required number of bytes is too large to store.  */
2064 static int
2065 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
2066                 yytype_int16 *yyssp, int yytoken)
2067 {
2068   YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
2069   YYSIZE_T yysize = yysize0;
2070   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2071   /* Internationalized format string. */
2072   const char *yyformat = YY_NULL;
2073   /* Arguments of yyformat. */
2074   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2075   /* Number of reported tokens (one for the "unexpected", one per
2076      "expected"). */
2077   int yycount = 0;
2078
2079   /* There are many possibilities here to consider:
2080      - Assume YYFAIL is not used.  It's too flawed to consider.  See
2081        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
2082        for details.  YYERROR is fine as it does not invoke this
2083        function.
2084      - If this state is a consistent state with a default action, then
2085        the only way this function was invoked is if the default action
2086        is an error action.  In that case, don't check for expected
2087        tokens because there are none.
2088      - The only way there can be no lookahead present (in yychar) is if
2089        this state is a consistent state with a default action.  Thus,
2090        detecting the absence of a lookahead is sufficient to determine
2091        that there is no unexpected or expected token to report.  In that
2092        case, just report a simple "syntax error".
2093      - Don't assume there isn't a lookahead just because this state is a
2094        consistent state with a default action.  There might have been a
2095        previous inconsistent state, consistent state with a non-default
2096        action, or user semantic action that manipulated yychar.
2097      - Of course, the expected token list depends on states to have
2098        correct lookahead information, and it depends on the parser not
2099        to perform extra reductions after fetching a lookahead from the
2100        scanner and before detecting a syntax error.  Thus, state merging
2101        (from LALR or IELR) and default reductions corrupt the expected
2102        token list.  However, the list is correct for canonical LR with
2103        one exception: it will still contain any token that will not be
2104        accepted due to an error action in a later state.
2105   */
2106   if (yytoken != YYEMPTY)
2107     {
2108       int yyn = yypact[*yyssp];
2109       yyarg[yycount++] = yytname[yytoken];
2110       if (!yypact_value_is_default (yyn))
2111         {
2112           /* Start YYX at -YYN if negative to avoid negative indexes in
2113              YYCHECK.  In other words, skip the first -YYN actions for
2114              this state because they are default actions.  */
2115           int yyxbegin = yyn < 0 ? -yyn : 0;
2116           /* Stay within bounds of both yycheck and yytname.  */
2117           int yychecklim = YYLAST - yyn + 1;
2118           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2119           int yyx;
2120
2121           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2122             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
2123                 && !yytable_value_is_error (yytable[yyx + yyn]))
2124               {
2125                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2126                   {
2127                     yycount = 1;
2128                     yysize = yysize0;
2129                     break;
2130                   }
2131                 yyarg[yycount++] = yytname[yyx];
2132                 {
2133                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
2134                   if (! (yysize <= yysize1
2135                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2136                     return 2;
2137                   yysize = yysize1;
2138                 }
2139               }
2140         }
2141     }
2142
2143   switch (yycount)
2144     {
2145 # define YYCASE_(N, S)                      \
2146       case N:                               \
2147         yyformat = S;                       \
2148       break
2149       YYCASE_(0, YY_("syntax error"));
2150       YYCASE_(1, YY_("syntax error, unexpected %s"));
2151       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2152       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2153       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2154       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2155 # undef YYCASE_
2156     }
2157
2158   {
2159     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2160     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2161       return 2;
2162     yysize = yysize1;
2163   }
2164
2165   if (*yymsg_alloc < yysize)
2166     {
2167       *yymsg_alloc = 2 * yysize;
2168       if (! (yysize <= *yymsg_alloc
2169              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2170         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2171       return 1;
2172     }
2173
2174   /* Avoid sprintf, as that infringes on the user's name space.
2175      Don't have undefined behavior even if the translation
2176      produced a string with the wrong number of "%s"s.  */
2177   {
2178     char *yyp = *yymsg;
2179     int yyi = 0;
2180     while ((*yyp = *yyformat) != '\0')
2181       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2182         {
2183           yyp += yytnamerr (yyp, yyarg[yyi++]);
2184           yyformat += 2;
2185         }
2186       else
2187         {
2188           yyp++;
2189           yyformat++;
2190         }
2191   }
2192   return 0;
2193 }
2194 #endif /* YYERROR_VERBOSE */
2195
2196 /*-----------------------------------------------.
2197 | Release the memory associated to this symbol.  |
2198 `-----------------------------------------------*/
2199
2200 /*ARGSUSED*/
2201 #if (defined __STDC__ || defined __C99__FUNC__ \
2202      || defined __cplusplus || defined _MSC_VER)
2203 static void
2204 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context)
2205 #else
2206 static void
2207 yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
2208     const char *yymsg;
2209     int yytype;
2210     YYSTYPE *yyvaluep;
2211     YYLTYPE *yylocationp;
2212     TParseContext* context;
2213 #endif
2214 {
2215   YYUSE (yyvaluep);
2216   YYUSE (yylocationp);
2217   YYUSE (context);
2218
2219   if (!yymsg)
2220     yymsg = "Deleting";
2221   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2222
2223   YYUSE (yytype);
2224 }
2225
2226
2227
2228
2229 /*----------.
2230 | yyparse.  |
2231 `----------*/
2232
2233 #ifdef YYPARSE_PARAM
2234 #if (defined __STDC__ || defined __C99__FUNC__ \
2235      || defined __cplusplus || defined _MSC_VER)
2236 int
2237 yyparse (void *YYPARSE_PARAM)
2238 #else
2239 int
2240 yyparse (YYPARSE_PARAM)
2241     void *YYPARSE_PARAM;
2242 #endif
2243 #else /* ! YYPARSE_PARAM */
2244 #if (defined __STDC__ || defined __C99__FUNC__ \
2245      || defined __cplusplus || defined _MSC_VER)
2246 int
2247 yyparse (TParseContext* context)
2248 #else
2249 int
2250 yyparse (context)
2251     TParseContext* context;
2252 #endif
2253 #endif
2254 {
2255 /* The lookahead symbol.  */
2256 int yychar;
2257
2258
2259 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
2260 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
2261 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
2262     _Pragma ("GCC diagnostic push") \
2263     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
2264     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
2265 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
2266     _Pragma ("GCC diagnostic pop")
2267 #else
2268 /* Default value used for initialization, for pacifying older GCCs
2269    or non-GCC compilers.  */
2270 static YYSTYPE yyval_default;
2271 # define YY_INITIAL_VALUE(Value) = Value
2272 #endif
2273 static YYLTYPE yyloc_default
2274 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2275   = { 1, 1, 1, 1 }
2276 # endif
2277 ;
2278 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2279 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2280 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
2281 #endif
2282 #ifndef YY_INITIAL_VALUE
2283 # define YY_INITIAL_VALUE(Value) /* Nothing. */
2284 #endif
2285
2286 /* The semantic value of the lookahead symbol.  */
2287 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
2288
2289 /* Location data for the lookahead symbol.  */
2290 YYLTYPE yylloc = yyloc_default;
2291
2292
2293     /* Number of syntax errors so far.  */
2294     int yynerrs;
2295
2296     int yystate;
2297     /* Number of tokens to shift before error messages enabled.  */
2298     int yyerrstatus;
2299
2300     /* The stacks and their tools:
2301        `yyss': related to states.
2302        `yyvs': related to semantic values.
2303        `yyls': related to locations.
2304
2305        Refer to the stacks through separate pointers, to allow yyoverflow
2306        to reallocate them elsewhere.  */
2307
2308     /* The state stack.  */
2309     yytype_int16 yyssa[YYINITDEPTH];
2310     yytype_int16 *yyss;
2311     yytype_int16 *yyssp;
2312
2313     /* The semantic value stack.  */
2314     YYSTYPE yyvsa[YYINITDEPTH];
2315     YYSTYPE *yyvs;
2316     YYSTYPE *yyvsp;
2317
2318     /* The location stack.  */
2319     YYLTYPE yylsa[YYINITDEPTH];
2320     YYLTYPE *yyls;
2321     YYLTYPE *yylsp;
2322
2323     /* The locations where the error started and ended.  */
2324     YYLTYPE yyerror_range[3];
2325
2326     YYSIZE_T yystacksize;
2327
2328   int yyn;
2329   int yyresult;
2330   /* Lookahead token as an internal (translated) token number.  */
2331   int yytoken = 0;
2332   /* The variables used to return semantic value and location from the
2333      action routines.  */
2334   YYSTYPE yyval;
2335   YYLTYPE yyloc;
2336
2337 #if YYERROR_VERBOSE
2338   /* Buffer for error messages, and its allocated size.  */
2339   char yymsgbuf[128];
2340   char *yymsg = yymsgbuf;
2341   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2342 #endif
2343
2344 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
2345
2346   /* The number of symbols on the RHS of the reduced rule.
2347      Keep to zero when no symbol should be popped.  */
2348   int yylen = 0;
2349
2350   yyssp = yyss = yyssa;
2351   yyvsp = yyvs = yyvsa;
2352   yylsp = yyls = yylsa;
2353   yystacksize = YYINITDEPTH;
2354
2355   YYDPRINTF ((stderr, "Starting parse\n"));
2356
2357   yystate = 0;
2358   yyerrstatus = 0;
2359   yynerrs = 0;
2360   yychar = YYEMPTY; /* Cause a token to be read.  */
2361   yylsp[0] = yylloc;
2362   goto yysetstate;
2363
2364 /*------------------------------------------------------------.
2365 | yynewstate -- Push a new state, which is found in yystate.  |
2366 `------------------------------------------------------------*/
2367  yynewstate:
2368   /* In all cases, when you get here, the value and location stacks
2369      have just been pushed.  So pushing a state here evens the stacks.  */
2370   yyssp++;
2371
2372  yysetstate:
2373   *yyssp = yystate;
2374
2375   if (yyss + yystacksize - 1 <= yyssp)
2376     {
2377       /* Get the current used size of the three stacks, in elements.  */
2378       YYSIZE_T yysize = yyssp - yyss + 1;
2379
2380 #ifdef yyoverflow
2381       {
2382         /* Give user a chance to reallocate the stack.  Use copies of
2383            these so that the &'s don't force the real ones into
2384            memory.  */
2385         YYSTYPE *yyvs1 = yyvs;
2386         yytype_int16 *yyss1 = yyss;
2387         YYLTYPE *yyls1 = yyls;
2388
2389         /* Each stack pointer address is followed by the size of the
2390            data in use in that stack, in bytes.  This used to be a
2391            conditional around just the two extra args, but that might
2392            be undefined if yyoverflow is a macro.  */
2393         yyoverflow (YY_("memory exhausted"),
2394                     &yyss1, yysize * sizeof (*yyssp),
2395                     &yyvs1, yysize * sizeof (*yyvsp),
2396                     &yyls1, yysize * sizeof (*yylsp),
2397                     &yystacksize);
2398
2399         yyls = yyls1;
2400         yyss = yyss1;
2401         yyvs = yyvs1;
2402       }
2403 #else /* no yyoverflow */
2404 # ifndef YYSTACK_RELOCATE
2405       goto yyexhaustedlab;
2406 # else
2407       /* Extend the stack our own way.  */
2408       if (YYMAXDEPTH <= yystacksize)
2409         goto yyexhaustedlab;
2410       yystacksize *= 2;
2411       if (YYMAXDEPTH < yystacksize)
2412         yystacksize = YYMAXDEPTH;
2413
2414       {
2415         yytype_int16 *yyss1 = yyss;
2416         union yyalloc *yyptr =
2417           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2418         if (! yyptr)
2419           goto yyexhaustedlab;
2420         YYSTACK_RELOCATE (yyss_alloc, yyss);
2421         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2422         YYSTACK_RELOCATE (yyls_alloc, yyls);
2423 #  undef YYSTACK_RELOCATE
2424         if (yyss1 != yyssa)
2425           YYSTACK_FREE (yyss1);
2426       }
2427 # endif
2428 #endif /* no yyoverflow */
2429
2430       yyssp = yyss + yysize - 1;
2431       yyvsp = yyvs + yysize - 1;
2432       yylsp = yyls + yysize - 1;
2433
2434       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2435                   (unsigned long int) yystacksize));
2436
2437       if (yyss + yystacksize - 1 <= yyssp)
2438         YYABORT;
2439     }
2440
2441   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2442
2443   if (yystate == YYFINAL)
2444     YYACCEPT;
2445
2446   goto yybackup;
2447
2448 /*-----------.
2449 | yybackup.  |
2450 `-----------*/
2451 yybackup:
2452
2453   /* Do appropriate processing given the current state.  Read a
2454      lookahead token if we need one and don't already have one.  */
2455
2456   /* First try to decide what to do without reference to lookahead token.  */
2457   yyn = yypact[yystate];
2458   if (yypact_value_is_default (yyn))
2459     goto yydefault;
2460
2461   /* Not known => get a lookahead token if don't already have one.  */
2462
2463   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
2464   if (yychar == YYEMPTY)
2465     {
2466       YYDPRINTF ((stderr, "Reading a token: "));
2467       yychar = YYLEX;
2468     }
2469
2470   if (yychar <= YYEOF)
2471     {
2472       yychar = yytoken = YYEOF;
2473       YYDPRINTF ((stderr, "Now at end of input.\n"));
2474     }
2475   else
2476     {
2477       yytoken = YYTRANSLATE (yychar);
2478       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2479     }
2480
2481   /* If the proper action on seeing token YYTOKEN is to reduce or to
2482      detect an error, take that action.  */
2483   yyn += yytoken;
2484   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2485     goto yydefault;
2486   yyn = yytable[yyn];
2487   if (yyn <= 0)
2488     {
2489       if (yytable_value_is_error (yyn))
2490         goto yyerrlab;
2491       yyn = -yyn;
2492       goto yyreduce;
2493     }
2494
2495   /* Count tokens shifted since error; after three, turn off error
2496      status.  */
2497   if (yyerrstatus)
2498     yyerrstatus--;
2499
2500   /* Shift the lookahead token.  */
2501   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2502
2503   /* Discard the shifted token.  */
2504   yychar = YYEMPTY;
2505
2506   yystate = yyn;
2507   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2508   *++yyvsp = yylval;
2509   YY_IGNORE_MAYBE_UNINITIALIZED_END
2510   *++yylsp = yylloc;
2511   goto yynewstate;
2512
2513
2514 /*-----------------------------------------------------------.
2515 | yydefault -- do the default action for the current state.  |
2516 `-----------------------------------------------------------*/
2517 yydefault:
2518   yyn = yydefact[yystate];
2519   if (yyn == 0)
2520     goto yyerrlab;
2521   goto yyreduce;
2522
2523
2524 /*-----------------------------.
2525 | yyreduce -- Do a reduction.  |
2526 `-----------------------------*/
2527 yyreduce:
2528   /* yyn is the number of a rule to reduce with.  */
2529   yylen = yyr2[yyn];
2530
2531   /* If YYLEN is nonzero, implement the default value of the action:
2532      `$$ = $1'.
2533
2534      Otherwise, the following line sets YYVAL to garbage.
2535      This behavior is undocumented and Bison
2536      users should not rely upon it.  Assigning to YYVAL
2537      unconditionally makes the parser a bit smaller, and it avoids a
2538      GCC warning that YYVAL may be used uninitialized.  */
2539   yyval = yyvsp[1-yylen];
2540
2541   /* Default location.  */
2542   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2543   YY_REDUCE_PRINT (yyn);
2544   switch (yyn)
2545     {
2546         case 4:
2547
2548     {
2549         // The symbol table search was done in the lexical phase
2550         const TVariable *variable = context->getNamedVariable((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].lex).string, (yyvsp[(1) - (1)].lex).symbol);
2551
2552         if (variable->getType().getQualifier() == EvqConst)
2553         {
2554             ConstantUnion* constArray = variable->getConstPointer();
2555             TType t(variable->getType());
2556             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[(1) - (1)]));
2557         }
2558         else
2559         {
2560             (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
2561                                                  variable->getName(),
2562                                                  variable->getType(),
2563                                                  (yylsp[(1) - (1)]));
2564         }
2565
2566         // don't delete $1.string, it's used by error recovery, and the pool
2567         // pop will reclaim the memory
2568     }
2569     break;
2570
2571   case 5:
2572
2573     {
2574         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2575     }
2576     break;
2577
2578   case 6:
2579
2580     {
2581         ConstantUnion *unionArray = new ConstantUnion[1];
2582         unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
2583         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yylsp[(1) - (1)]));
2584     }
2585     break;
2586
2587   case 7:
2588
2589     {
2590         ConstantUnion *unionArray = new ConstantUnion[1];
2591         unionArray->setUConst((yyvsp[(1) - (1)].lex).u);
2592         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConst), (yylsp[(1) - (1)]));
2593     }
2594     break;
2595
2596   case 8:
2597
2598     {
2599         ConstantUnion *unionArray = new ConstantUnion[1];
2600         unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
2601         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yylsp[(1) - (1)]));
2602     }
2603     break;
2604
2605   case 9:
2606
2607     {
2608         ConstantUnion *unionArray = new ConstantUnion[1];
2609         unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
2610         (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(1) - (1)]));
2611     }
2612     break;
2613
2614   case 10:
2615
2616     {
2617         (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
2618     }
2619     break;
2620
2621   case 11:
2622
2623     {
2624         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2625     }
2626     break;
2627
2628   case 12:
2629
2630     {
2631         (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[(1) - (4)].interm.intermTypedNode), (yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode));
2632     }
2633     break;
2634
2635   case 13:
2636
2637     {
2638         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2639     }
2640     break;
2641
2642   case 14:
2643
2644     {
2645         (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[(1) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]), *(yyvsp[(3) - (3)].lex).string, (yylsp[(3) - (3)]));
2646     }
2647     break;
2648
2649   case 15:
2650
2651     {
2652         if (context->lValueErrorCheck((yylsp[(2) - (2)]), "++", (yyvsp[(1) - (2)].interm.intermTypedNode)))
2653             context->recover();
2654         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
2655         if ((yyval.interm.intermTypedNode) == 0) {
2656             context->unaryOpError((yylsp[(2) - (2)]), "++", (yyvsp[(1) - (2)].interm.intermTypedNode)->getCompleteString());
2657             context->recover();
2658             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
2659         }
2660     }
2661     break;
2662
2663   case 16:
2664
2665     {
2666         if (context->lValueErrorCheck((yylsp[(2) - (2)]), "--", (yyvsp[(1) - (2)].interm.intermTypedNode)))
2667             context->recover();
2668         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode), (yylsp[(2) - (2)]));
2669         if ((yyval.interm.intermTypedNode) == 0) {
2670             context->unaryOpError((yylsp[(2) - (2)]), "--", (yyvsp[(1) - (2)].interm.intermTypedNode)->getCompleteString());
2671             context->recover();
2672             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
2673         }
2674     }
2675     break;
2676
2677   case 17:
2678
2679     {
2680         if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
2681             context->recover();
2682         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2683     }
2684     break;
2685
2686   case 18:
2687
2688     {
2689         TFunction* fnCall = (yyvsp[(1) - (1)].interm).function;
2690         TOperator op = fnCall->getBuiltInOp();
2691
2692         if (op != EOpNull)
2693         {
2694             //
2695             // Then this should be a constructor.
2696             // Don't go through the symbol table for constructors.
2697             // Their parameters will be verified algorithmically.
2698             //
2699             TType type(EbtVoid, EbpUndefined);  // use this to get the type back
2700             if (context->constructorErrorCheck((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].interm).intermNode, *fnCall, op, &type)) {
2701                 (yyval.interm.intermTypedNode) = 0;
2702             } else {
2703                 //
2704                 // It's a constructor, of type 'type'.
2705                 //
2706                 (yyval.interm.intermTypedNode) = context->addConstructor((yyvsp[(1) - (1)].interm).intermNode, &type, op, fnCall, (yylsp[(1) - (1)]));
2707             }
2708
2709             if ((yyval.interm.intermTypedNode) == 0) {
2710                 context->recover();
2711                 (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator(0, op, (yylsp[(1) - (1)]));
2712             }
2713             (yyval.interm.intermTypedNode)->setType(type);
2714         } else {
2715             //
2716             // Not a constructor.  Find it in the symbol table.
2717             //
2718             const TFunction* fnCandidate;
2719             bool builtIn;
2720             fnCandidate = context->findFunction((yylsp[(1) - (1)]), fnCall, context->shaderVersion, &builtIn);
2721             if (fnCandidate) {
2722                 //
2723                 // A declared function.
2724                 //
2725                 if (builtIn && !fnCandidate->getExtension().empty() &&
2726                     context->extensionErrorCheck((yylsp[(1) - (1)]), fnCandidate->getExtension())) {
2727                     context->recover();
2728                 }
2729                 op = fnCandidate->getBuiltInOp();
2730                 if (builtIn && op != EOpNull) {
2731                     //
2732                     // A function call mapped to a built-in operation.
2733                     //
2734                     if (fnCandidate->getParamCount() == 1) {
2735                         //
2736                         // Treat it like a built-in unary operator.
2737                         //
2738                         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(op, (yyvsp[(1) - (1)].interm).intermNode, (yylsp[(1) - (1)]));
2739                         if ((yyval.interm.intermTypedNode) == 0)  {
2740                             std::stringstream extraInfoStream;
2741                             extraInfoStream << "built in unary operator function.  Type: " << static_cast<TIntermTyped*>((yyvsp[(1) - (1)].interm).intermNode)->getCompleteString();
2742                             std::string extraInfo = extraInfoStream.str();
2743                             context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), " wrong operand type", "Internal Error", extraInfo.c_str());
2744                             YYERROR;
2745                         }
2746                     } else {
2747                         (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, op, (yylsp[(1) - (1)]));
2748                     }
2749                 } else {
2750                     // This is a real function call
2751
2752                     (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator((yyvsp[(1) - (1)].interm).intermAggregate, EOpFunctionCall, (yylsp[(1) - (1)]));
2753                     (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType());
2754
2755                     // this is how we know whether the given function is a builtIn function or a user defined function
2756                     // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also
2757                     // if builtIn == true, it's definitely a builtIn function with EOpNull
2758                     if (!builtIn)
2759                         (yyval.interm.intermTypedNode)->getAsAggregate()->setUserDefined();
2760                     (yyval.interm.intermTypedNode)->getAsAggregate()->setName(fnCandidate->getMangledName());
2761
2762                     TQualifier qual;
2763                     for (size_t i = 0; i < fnCandidate->getParamCount(); ++i) {
2764                         qual = fnCandidate->getParam(i).type->getQualifier();
2765                         if (qual == EvqOut || qual == EvqInOut) {
2766                             if (context->lValueErrorCheck((yyval.interm.intermTypedNode)->getLine(), "assign", (*((yyval.interm.intermTypedNode)->getAsAggregate()->getSequence()))[i]->getAsTyped())) {
2767                                 context->error((yyvsp[(1) - (1)].interm).intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error");
2768                                 context->recover();
2769                             }
2770                         }
2771                     }
2772                 }
2773                 (yyval.interm.intermTypedNode)->setType(fnCandidate->getReturnType());
2774             } else {
2775                 // error message was put out by PaFindFunction()
2776                 // Put on a dummy node for error recovery
2777                 ConstantUnion *unionArray = new ConstantUnion[1];
2778                 unionArray->setFConst(0.0f);
2779                 (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yylsp[(1) - (1)]));
2780                 context->recover();
2781             }
2782         }
2783         delete fnCall;
2784     }
2785     break;
2786
2787   case 19:
2788
2789     {
2790         (yyval.interm) = (yyvsp[(1) - (1)].interm);
2791     }
2792     break;
2793
2794   case 20:
2795
2796     {
2797         context->error((yylsp[(3) - (3)]), "methods are not supported", "");
2798         context->recover();
2799         (yyval.interm) = (yyvsp[(3) - (3)].interm);
2800     }
2801     break;
2802
2803   case 21:
2804
2805     {
2806         (yyval.interm) = (yyvsp[(1) - (2)].interm);
2807     }
2808     break;
2809
2810   case 22:
2811
2812     {
2813         (yyval.interm) = (yyvsp[(1) - (2)].interm);
2814     }
2815     break;
2816
2817   case 23:
2818
2819     {
2820         (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2821         (yyval.interm).intermNode = 0;
2822     }
2823     break;
2824
2825   case 24:
2826
2827     {
2828         (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
2829         (yyval.interm).intermNode = 0;
2830     }
2831     break;
2832
2833   case 25:
2834
2835     {
2836         TParameter param = { 0, new TType((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()) };
2837         (yyvsp[(1) - (2)].interm.function)->addParameter(param);
2838         (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
2839         (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
2840     }
2841     break;
2842
2843   case 26:
2844
2845     {
2846         TParameter param = { 0, new TType((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()) };
2847         (yyvsp[(1) - (3)].interm).function->addParameter(param);
2848         (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
2849         (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2850     }
2851     break;
2852
2853   case 27:
2854
2855     {
2856         (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
2857     }
2858     break;
2859
2860   case 28:
2861
2862     {
2863         (yyval.interm.function) = context->addConstructorFunc((yyvsp[(1) - (1)].interm.type));
2864     }
2865     break;
2866
2867   case 29:
2868
2869     {
2870         if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
2871             context->recover();
2872         TType type(EbtVoid, EbpUndefined);
2873         TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
2874         (yyval.interm.function) = function;
2875     }
2876     break;
2877
2878   case 30:
2879
2880     {
2881         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
2882     }
2883     break;
2884
2885   case 31:
2886
2887     {
2888         if (context->lValueErrorCheck((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)))
2889             context->recover();
2890         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
2891         if ((yyval.interm.intermTypedNode) == 0) {
2892             context->unaryOpError((yylsp[(1) - (2)]), "++", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
2893             context->recover();
2894             (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2895         }
2896     }
2897     break;
2898
2899   case 32:
2900
2901     {
2902         if (context->lValueErrorCheck((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)))
2903             context->recover();
2904         (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
2905         if ((yyval.interm.intermTypedNode) == 0) {
2906             context->unaryOpError((yylsp[(1) - (2)]), "--", (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
2907             context->recover();
2908             (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2909         }
2910     }
2911     break;
2912
2913   case 33:
2914
2915     {
2916         if ((yyvsp[(1) - (2)].interm).op != EOpNull) {
2917             (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath((yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode), (yylsp[(1) - (2)]));
2918             if ((yyval.interm.intermTypedNode) == 0) {
2919                 const char* errorOp = "";
2920                 switch((yyvsp[(1) - (2)].interm).op) {
2921                 case EOpNegative:   errorOp = "-"; break;
2922                 case EOpLogicalNot: errorOp = "!"; break;
2923                 default: break;
2924                 }
2925                 context->unaryOpError((yylsp[(1) - (2)]), errorOp, (yyvsp[(2) - (2)].interm.intermTypedNode)->getCompleteString());
2926                 context->recover();
2927                 (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2928             }
2929         } else
2930             (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
2931     }
2932     break;
2933
2934   case 34:
2935
2936     { (yyval.interm).op = EOpNull; }
2937     break;
2938
2939   case 35:
2940
2941     { (yyval.interm).op = EOpNegative; }
2942     break;
2943
2944   case 36:
2945
2946     { (yyval.interm).op = EOpLogicalNot; }
2947     break;
2948
2949   case 37:
2950
2951     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2952     break;
2953
2954   case 38:
2955
2956     {
2957         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2958         if ((yyval.interm.intermTypedNode) == 0) {
2959             context->binaryOpError((yylsp[(2) - (3)]), "*", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2960             context->recover();
2961             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2962         }
2963     }
2964     break;
2965
2966   case 39:
2967
2968     {
2969         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2970         if ((yyval.interm.intermTypedNode) == 0) {
2971             context->binaryOpError((yylsp[(2) - (3)]), "/", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2972             context->recover();
2973             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2974         }
2975     }
2976     break;
2977
2978   case 40:
2979
2980     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
2981     break;
2982
2983   case 41:
2984
2985     {
2986         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2987         if ((yyval.interm.intermTypedNode) == 0) {
2988             context->binaryOpError((yylsp[(2) - (3)]), "+", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
2989             context->recover();
2990             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
2991         }
2992     }
2993     break;
2994
2995   case 42:
2996
2997     {
2998         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
2999         if ((yyval.interm.intermTypedNode) == 0) {
3000             context->binaryOpError((yylsp[(2) - (3)]), "-", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3001             context->recover();
3002             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3003         }
3004     }
3005     break;
3006
3007   case 43:
3008
3009     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3010     break;
3011
3012   case 44:
3013
3014     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3015     break;
3016
3017   case 45:
3018
3019     {
3020         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3021         if ((yyval.interm.intermTypedNode) == 0) {
3022             context->binaryOpError((yylsp[(2) - (3)]), "<", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3023             context->recover();
3024             ConstantUnion *unionArray = new ConstantUnion[1];
3025             unionArray->setBConst(false);
3026             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3027         }
3028     }
3029     break;
3030
3031   case 46:
3032
3033     {
3034         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3035         if ((yyval.interm.intermTypedNode) == 0) {
3036             context->binaryOpError((yylsp[(2) - (3)]), ">", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3037             context->recover();
3038             ConstantUnion *unionArray = new ConstantUnion[1];
3039             unionArray->setBConst(false);
3040             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3041         }
3042     }
3043     break;
3044
3045   case 47:
3046
3047     {
3048         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3049         if ((yyval.interm.intermTypedNode) == 0) {
3050             context->binaryOpError((yylsp[(2) - (3)]), "<=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3051             context->recover();
3052             ConstantUnion *unionArray = new ConstantUnion[1];
3053             unionArray->setBConst(false);
3054             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3055         }
3056     }
3057     break;
3058
3059   case 48:
3060
3061     {
3062         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3063         if ((yyval.interm.intermTypedNode) == 0) {
3064             context->binaryOpError((yylsp[(2) - (3)]), ">=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3065             context->recover();
3066             ConstantUnion *unionArray = new ConstantUnion[1];
3067             unionArray->setBConst(false);
3068             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3069         }
3070     }
3071     break;
3072
3073   case 49:
3074
3075     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3076     break;
3077
3078   case 50:
3079
3080     {
3081         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3082         if ((yyval.interm.intermTypedNode) == 0) {
3083             context->binaryOpError((yylsp[(2) - (3)]), "==", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3084             context->recover();
3085             ConstantUnion *unionArray = new ConstantUnion[1];
3086             unionArray->setBConst(false);
3087             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3088         }
3089     }
3090     break;
3091
3092   case 51:
3093
3094     {
3095         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3096         if ((yyval.interm.intermTypedNode) == 0) {
3097             context->binaryOpError((yylsp[(2) - (3)]), "!=", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3098             context->recover();
3099             ConstantUnion *unionArray = new ConstantUnion[1];
3100             unionArray->setBConst(false);
3101             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3102         }
3103     }
3104     break;
3105
3106   case 52:
3107
3108     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3109     break;
3110
3111   case 53:
3112
3113     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3114     break;
3115
3116   case 54:
3117
3118     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3119     break;
3120
3121   case 55:
3122
3123     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3124     break;
3125
3126   case 56:
3127
3128     {
3129         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3130         if ((yyval.interm.intermTypedNode) == 0) {
3131             context->binaryOpError((yylsp[(2) - (3)]), "&&", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3132             context->recover();
3133             ConstantUnion *unionArray = new ConstantUnion[1];
3134             unionArray->setBConst(false);
3135             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3136         }
3137     }
3138     break;
3139
3140   case 57:
3141
3142     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3143     break;
3144
3145   case 58:
3146
3147     {
3148         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3149         if ((yyval.interm.intermTypedNode) == 0) {
3150             context->binaryOpError((yylsp[(2) - (3)]), "^^", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3151             context->recover();
3152             ConstantUnion *unionArray = new ConstantUnion[1];
3153             unionArray->setBConst(false);
3154             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3155         }
3156     }
3157     break;
3158
3159   case 59:
3160
3161     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3162     break;
3163
3164   case 60:
3165
3166     {
3167         (yyval.interm.intermTypedNode) = context->intermediate.addBinaryMath(EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3168         if ((yyval.interm.intermTypedNode) == 0) {
3169             context->binaryOpError((yylsp[(2) - (3)]), "||", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3170             context->recover();
3171             ConstantUnion *unionArray = new ConstantUnion[1];
3172             unionArray->setBConst(false);
3173             (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[(2) - (3)]));
3174         }
3175     }
3176     break;
3177
3178   case 61:
3179
3180     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3181     break;
3182
3183   case 62:
3184
3185     {
3186        if (context->boolErrorCheck((yylsp[(2) - (5)]), (yyvsp[(1) - (5)].interm.intermTypedNode)))
3187             context->recover();
3188
3189         (yyval.interm.intermTypedNode) = context->intermediate.addSelection((yyvsp[(1) - (5)].interm.intermTypedNode), (yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.intermTypedNode), (yylsp[(2) - (5)]));
3190         if ((yyvsp[(3) - (5)].interm.intermTypedNode)->getType() != (yyvsp[(5) - (5)].interm.intermTypedNode)->getType())
3191             (yyval.interm.intermTypedNode) = 0;
3192
3193         if ((yyval.interm.intermTypedNode) == 0) {
3194             context->binaryOpError((yylsp[(2) - (5)]), ":", (yyvsp[(3) - (5)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(5) - (5)].interm.intermTypedNode)->getCompleteString());
3195             context->recover();
3196             (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode);
3197         }
3198     }
3199     break;
3200
3201   case 63:
3202
3203     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
3204     break;
3205
3206   case 64:
3207
3208     {
3209         if (context->lValueErrorCheck((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)))
3210             context->recover();
3211         (yyval.interm.intermTypedNode) = context->intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3212         if ((yyval.interm.intermTypedNode) == 0) {
3213             context->assignError((yylsp[(2) - (3)]), "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3214             context->recover();
3215             (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
3216         }
3217     }
3218     break;
3219
3220   case 65:
3221
3222     { (yyval.interm).op = EOpAssign; }
3223     break;
3224
3225   case 66:
3226
3227     { (yyval.interm).op = EOpMulAssign; }
3228     break;
3229
3230   case 67:
3231
3232     { (yyval.interm).op = EOpDivAssign; }
3233     break;
3234
3235   case 68:
3236
3237     { (yyval.interm).op = EOpAddAssign; }
3238     break;
3239
3240   case 69:
3241
3242     { (yyval.interm).op = EOpSubAssign; }
3243     break;
3244
3245   case 70:
3246
3247     {
3248         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3249     }
3250     break;
3251
3252   case 71:
3253
3254     {
3255         (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yylsp[(2) - (3)]));
3256         if ((yyval.interm.intermTypedNode) == 0) {
3257             context->binaryOpError((yylsp[(2) - (3)]), ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString());
3258             context->recover();
3259             (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
3260         }
3261     }
3262     break;
3263
3264   case 72:
3265
3266     {
3267         if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
3268             context->recover();
3269         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
3270     }
3271     break;
3272
3273   case 73:
3274
3275     {
3276         if (context->enterStructDeclaration((yylsp[(1) - (2)]), *(yyvsp[(1) - (2)].lex).string))
3277             context->recover();
3278         (yyval.lex) = (yyvsp[(1) - (2)].lex);
3279     }
3280     break;
3281
3282   case 74:
3283
3284     {
3285         TFunction &function = *((yyvsp[(1) - (2)].interm).function);
3286         
3287         TIntermAggregate *prototype = new TIntermAggregate;
3288         prototype->setType(function.getReturnType());
3289         prototype->setName(function.getName());
3290         
3291         for (size_t i = 0; i < function.getParamCount(); i++)
3292         {
3293             const TParameter &param = function.getParam(i);
3294             if (param.name != 0)
3295             {
3296                 TVariable variable(param.name, *param.type);
3297                 
3298                 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
3299             }
3300             else
3301             {
3302                 prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (2)])), (yylsp[(1) - (2)]));
3303             }
3304         }
3305         
3306         prototype->setOp(EOpPrototype);
3307         (yyval.interm.intermNode) = prototype;
3308
3309         context->symbolTable.pop();
3310     }
3311     break;
3312
3313   case 75:
3314
3315     {
3316         TIntermAggregate *aggNode = (yyvsp[(1) - (2)].interm).intermAggregate;
3317         if (aggNode && aggNode->getOp() == EOpNull)
3318             aggNode->setOp(EOpDeclaration);
3319         (yyval.interm.intermNode) = aggNode;
3320     }
3321     break;
3322
3323   case 76:
3324
3325     {
3326         if (((yyvsp[(2) - (4)].interm.precision) == EbpHigh) && (context->shaderType == GL_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
3327             context->error((yylsp[(1) - (4)]), "precision is not supported in fragment shader", "highp");
3328             context->recover();
3329         }
3330         if (!context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.precision) )) {
3331             context->error((yylsp[(1) - (4)]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[(3) - (4)].interm.type).type));
3332             context->recover();
3333         }
3334         (yyval.interm.intermNode) = 0;
3335     }
3336     break;
3337
3338   case 77:
3339
3340     {
3341         ES3_ONLY(getQualifierString((yyvsp[(1) - (5)].interm.type).qualifier), (yylsp[(1) - (5)]), "interface blocks");
3342         (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[(1) - (5)].interm.type), (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yyvsp[(3) - (5)].interm.fieldList), NULL, (yyloc), NULL, (yyloc));
3343     }
3344     break;
3345
3346   case 78:
3347
3348     {
3349         ES3_ONLY(getQualifierString((yyvsp[(1) - (6)].interm.type).qualifier), (yylsp[(1) - (6)]), "interface blocks");
3350         (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, (yyloc));
3351     }
3352     break;
3353
3354   case 79:
3355
3356     {
3357         ES3_ONLY(getQualifierString((yyvsp[(1) - (9)].interm.type).qualifier), (yylsp[(1) - (9)]), "interface blocks");
3358         (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)]));
3359     }
3360     break;
3361
3362   case 80:
3363
3364     {
3365         context->parseGlobalLayoutQualifier((yyvsp[(1) - (2)].interm.type));
3366         (yyval.interm.intermNode) = 0;
3367     }
3368     break;
3369
3370   case 81:
3371
3372     {
3373         //
3374         // Multiple declarations of the same function are allowed.
3375         //
3376         // If this is a definition, the definition production code will check for redefinitions
3377         // (we don't know at this point if it's a definition or not).
3378         //
3379         // Redeclarations are allowed.  But, return types and parameter qualifiers must match.
3380         //
3381         TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getMangledName(), context->shaderVersion));
3382         if (prevDec) {
3383             if (prevDec->getReturnType() != (yyvsp[(1) - (2)].interm.function)->getReturnType()) {
3384                 context->error((yylsp[(2) - (2)]), "overloaded functions must have the same return type", (yyvsp[(1) - (2)].interm.function)->getReturnType().getBasicString());
3385                 context->recover();
3386             }
3387             for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
3388                 if (prevDec->getParam(i).type->getQualifier() != (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifier()) {
3389                     context->error((yylsp[(2) - (2)]), "overloaded functions must have the same parameter qualifiers", (yyvsp[(1) - (2)].interm.function)->getParam(i).type->getQualifierString());
3390                     context->recover();
3391                 }
3392             }
3393         }
3394
3395         //
3396         // Check for previously declared variables using the same name.
3397         //
3398         TSymbol *prevSym = context->symbolTable.find((yyvsp[(1) - (2)].interm.function)->getName(), context->shaderVersion);
3399         if (prevSym)
3400         {
3401             if (!prevSym->isFunction())
3402             {
3403                 context->error((yylsp[(2) - (2)]), "redefinition", (yyvsp[(1) - (2)].interm.function)->getName().c_str(), "function");
3404                 context->recover();
3405             }
3406         }
3407         else
3408         {
3409             // Insert the unmangled name to detect potential future redefinition as a variable.
3410             TFunction *function = new TFunction(NewPoolTString((yyvsp[(1) - (2)].interm.function)->getName().c_str()), (yyvsp[(1) - (2)].interm.function)->getReturnType());
3411             context->symbolTable.getOuterLevel()->insert(function);
3412         }
3413
3414         //
3415         // If this is a redeclaration, it could also be a definition,
3416         // in which case, we want to use the variable names from this one, and not the one that's
3417         // being redeclared.  So, pass back up this declaration, not the one in the symbol table.
3418         //
3419         (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
3420
3421         // We're at the inner scope level of the function's arguments and body statement.
3422         // Add the function prototype to the surrounding scope instead.
3423         context->symbolTable.getOuterLevel()->insert((yyval.interm).function);
3424     }
3425     break;
3426
3427   case 82:
3428
3429     {
3430         (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3431     }
3432     break;
3433
3434   case 83:
3435
3436     {
3437         (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
3438     }
3439     break;
3440
3441   case 84:
3442
3443     {
3444         // Add the parameter
3445         (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
3446         if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid)
3447             (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
3448         else
3449             delete (yyvsp[(2) - (2)].interm).param.type;
3450     }
3451     break;
3452
3453   case 85:
3454
3455     {
3456         //
3457         // Only first parameter of one-parameter functions can be void
3458         // The check for named parameters not being void is done in parameter_declarator
3459         //
3460         if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) {
3461             //
3462             // This parameter > first is void
3463             //
3464             context->error((yylsp[(2) - (3)]), "cannot be an argument type except for '(void)'", "void");
3465             context->recover();
3466             delete (yyvsp[(3) - (3)].interm).param.type;
3467         } else {
3468             // Add the parameter
3469             (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
3470             (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
3471         }
3472     }
3473     break;
3474
3475   case 86:
3476
3477     {
3478         if ((yyvsp[(1) - (3)].interm.type).qualifier != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier != EvqTemporary) {
3479             context->error((yylsp[(2) - (3)]), "no qualifiers allowed for function return", getQualifierString((yyvsp[(1) - (3)].interm.type).qualifier));
3480             context->recover();
3481         }
3482         // make sure a sampler is not involved as well...
3483         if (context->structQualifierErrorCheck((yylsp[(2) - (3)]), (yyvsp[(1) - (3)].interm.type)))
3484             context->recover();
3485
3486         // Add the function as a prototype after parsing it (we do not support recursion)
3487         TFunction *function;
3488         TType type((yyvsp[(1) - (3)].interm.type));
3489         function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
3490         (yyval.interm.function) = function;
3491         
3492         context->symbolTable.push();
3493     }
3494     break;
3495
3496   case 87:
3497
3498     {
3499         if ((yyvsp[(1) - (2)].interm.type).type == EbtVoid) {
3500             context->error((yylsp[(2) - (2)]), "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str());
3501             context->recover();
3502         }
3503         if (context->reservedErrorCheck((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string))
3504             context->recover();
3505         TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
3506         (yyval.interm).param = param;
3507     }
3508     break;
3509
3510   case 88:
3511
3512     {
3513         // Check that we can make an array out of this type
3514         if (context->arrayTypeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(1) - (5)].interm.type)))
3515             context->recover();
3516
3517         if (context->reservedErrorCheck((yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string))
3518             context->recover();
3519
3520         int size;
3521         if (context->arraySizeErrorCheck((yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode), size))
3522             context->recover();
3523         (yyvsp[(1) - (5)].interm.type).setArray(true, size);
3524
3525         TType* type = new TType((yyvsp[(1) - (5)].interm.type));
3526         TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
3527         (yyval.interm).param = param;
3528     }
3529     break;
3530
3531   case 89:
3532
3533     {
3534         (yyval.interm) = (yyvsp[(3) - (3)].interm);
3535         if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
3536             context->recover();
3537     }
3538     break;
3539
3540   case 90:
3541
3542     {
3543         (yyval.interm) = (yyvsp[(2) - (2)].interm);
3544         if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
3545             context->recover();
3546         if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
3547             context->recover();
3548     }
3549     break;
3550
3551   case 91:
3552
3553     {
3554         (yyval.interm) = (yyvsp[(3) - (3)].interm);
3555         if (context->paramErrorCheck((yylsp[(3) - (3)]), (yyvsp[(1) - (3)].interm.qualifier), (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
3556             context->recover();
3557     }
3558     break;
3559
3560   case 92:
3561
3562     {
3563         (yyval.interm) = (yyvsp[(2) - (2)].interm);
3564         if (context->parameterSamplerErrorCheck((yylsp[(2) - (2)]), (yyvsp[(1) - (2)].interm.qualifier), *(yyvsp[(2) - (2)].interm).param.type))
3565             context->recover();
3566         if (context->paramErrorCheck((yylsp[(2) - (2)]), EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
3567             context->recover();
3568     }
3569     break;
3570
3571   case 93:
3572
3573     {
3574         (yyval.interm.qualifier) = EvqIn;
3575     }
3576     break;
3577
3578   case 94:
3579
3580     {
3581         (yyval.interm.qualifier) = EvqIn;
3582     }
3583     break;
3584
3585   case 95:
3586
3587     {
3588         (yyval.interm.qualifier) = EvqOut;
3589     }
3590     break;
3591
3592   case 96:
3593
3594     {
3595         (yyval.interm.qualifier) = EvqInOut;
3596     }
3597     break;
3598
3599   case 97:
3600
3601     {
3602         TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
3603         (yyval.interm).param = param;
3604     }
3605     break;
3606
3607   case 98:
3608
3609     {
3610         (yyval.interm) = (yyvsp[(1) - (1)].interm);
3611     }
3612     break;
3613
3614   case 99:
3615
3616     {
3617         (yyval.interm) = (yyvsp[(1) - (3)].interm);
3618         (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].lex).symbol, (yylsp[(3) - (3)]), *(yyvsp[(3) - (3)].lex).string);
3619     }
3620     break;
3621
3622   case 100:
3623
3624     {
3625         (yyval.interm) = (yyvsp[(1) - (5)].interm);
3626         context->parseArrayDeclarator((yyval.interm).type, (yylsp[(3) - (5)]), *(yyvsp[(3) - (5)].lex).string, (yylsp[(4) - (5)]), NULL, NULL);
3627     }
3628     break;
3629
3630   case 101:
3631
3632     {
3633         (yyval.interm) = (yyvsp[(1) - (6)].interm);
3634         (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yylsp[(3) - (6)]), *(yyvsp[(3) - (6)].lex).string, (yylsp[(4) - (6)]), (yyvsp[(1) - (6)].interm).intermNode, (yyvsp[(5) - (6)].interm.intermTypedNode));
3635     }
3636     break;
3637
3638   case 102:
3639
3640     {
3641         (yyval.interm) = (yyvsp[(1) - (5)].interm);
3642         (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));
3643     }
3644     break;
3645
3646   case 103:
3647
3648     {
3649         (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
3650         (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(1) - (1)]), "");
3651     }
3652     break;
3653
3654   case 104:
3655
3656     {
3657         (yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
3658         (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string);
3659     }
3660     break;
3661
3662   case 105:
3663
3664     {
3665         context->error((yylsp[(2) - (4)]), "unsized array declarations not supported", (yyvsp[(2) - (4)].lex).string->c_str());
3666         context->recover();
3667
3668         (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
3669         (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string);
3670     }
3671     break;
3672
3673   case 106:
3674
3675     {
3676         (yyval.interm).type = (yyvsp[(1) - (5)].interm.type);
3677         (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[(2) - (5)]), *(yyvsp[(2) - (5)].lex).string, (yylsp[(3) - (5)]), (yyvsp[(4) - (5)].interm.intermTypedNode));
3678     }
3679     break;
3680
3681   case 107:
3682
3683     {
3684         (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
3685         (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yylsp[(3) - (4)]), (yyvsp[(4) - (4)].interm.intermTypedNode));
3686     }
3687     break;
3688
3689   case 108:
3690
3691     {
3692         // $$.type is not used in invariant declarations.
3693         (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[(1) - (2)]), (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].lex).string, (yyvsp[(2) - (2)].lex).symbol);
3694     }
3695     break;
3696
3697   case 109:
3698
3699     {
3700         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3701
3702         if ((yyvsp[(1) - (1)].interm.type).array) {
3703             context->error((yylsp[(1) - (1)]), "not supported", "first-class array");
3704             context->recover();
3705             (yyvsp[(1) - (1)].interm.type).setArray(false);
3706         }
3707     }
3708     break;
3709
3710   case 110:
3711
3712     {
3713         (yyval.interm.type) = context->addFullySpecifiedType((yyvsp[(1) - (2)].interm.type).qualifier, (yyvsp[(1) - (2)].interm.type).layoutQualifier, (yyvsp[(2) - (2)].interm.type));
3714     }
3715     break;
3716
3717   case 111:
3718
3719     {
3720         (yyval.interm.type).qualifier = EvqSmooth;
3721     }
3722     break;
3723
3724   case 112:
3725
3726     {
3727         (yyval.interm.type).qualifier = EvqFlat;
3728     }
3729     break;
3730
3731   case 113:
3732
3733     {
3734         (yyval.interm.qualifier) = EvqConst;
3735     }
3736     break;
3737
3738   case 114:
3739
3740     {
3741         VERTEX_ONLY("attribute", (yylsp[(1) - (1)]));
3742         ES2_ONLY("attribute", (yylsp[(1) - (1)]));
3743         if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "attribute"))
3744             context->recover();
3745         (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[(1) - (1)]));
3746     }
3747     break;
3748
3749   case 115:
3750
3751     {
3752         ES2_ONLY("varying", (yylsp[(1) - (1)]));
3753         if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "varying"))
3754             context->recover();
3755         if (context->shaderType == GL_VERTEX_SHADER)
3756             (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[(1) - (1)]));
3757         else
3758             (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[(1) - (1)]));
3759     }
3760     break;
3761
3762   case 116:
3763
3764     {
3765         ES2_ONLY("varying", (yylsp[(1) - (2)]));
3766         if (context->globalErrorCheck((yylsp[(1) - (2)]), context->symbolTable.atGlobalLevel(), "invariant varying"))
3767             context->recover();
3768         if (context->shaderType == GL_VERTEX_SHADER)
3769             (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[(1) - (2)]));
3770         else
3771             (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[(1) - (2)]));
3772     }
3773     break;
3774
3775   case 117:
3776
3777     {
3778         if ((yyvsp[(1) - (1)].interm.type).qualifier != EvqConst && !context->symbolTable.atGlobalLevel()) {
3779             context->error((yylsp[(1) - (1)]), "Local variables can only use the const storage qualifier.", getQualifierString((yyvsp[(1) - (1)].interm.type).qualifier));
3780             context->recover();
3781         } else {
3782             (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(1) - (1)].interm.type).qualifier, (yylsp[(1) - (1)]));
3783         }
3784     }
3785     break;
3786
3787   case 118:
3788
3789     {
3790         (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[(1) - (2)]), (yyvsp[(1) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]), (yyvsp[(2) - (2)].interm.type).qualifier);
3791     }
3792     break;
3793
3794   case 119:
3795
3796     {
3797         context->error((yylsp[(1) - (1)]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getInterpolationString((yyvsp[(1) - (1)].interm.type).qualifier));
3798         context->recover();
3799         
3800         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3801         (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
3802     }
3803     break;
3804
3805   case 120:
3806
3807     {
3808         (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3809         (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (1)].interm.layoutQualifier);
3810     }
3811     break;
3812
3813   case 121:
3814
3815     {
3816         (yyval.interm.type).setBasic(EbtVoid, (yyvsp[(2) - (2)].interm.type).qualifier, (yylsp[(2) - (2)]));
3817         (yyval.interm.type).layoutQualifier = (yyvsp[(1) - (2)].interm.layoutQualifier);
3818     }
3819     break;
3820
3821   case 122:
3822
3823     {
3824         (yyval.interm.type).qualifier = EvqConst;
3825     }
3826     break;
3827
3828   case 123:
3829
3830     {
3831         ES3_ONLY("in", (yylsp[(1) - (1)]), "storage qualifier");
3832         (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
3833     }
3834     break;
3835
3836   case 124:
3837
3838     {
3839         ES3_ONLY("out", (yylsp[(1) - (1)]), "storage qualifier");
3840         (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
3841     }
3842     break;
3843
3844   case 125:
3845
3846     {
3847         ES3_ONLY("centroid in", (yylsp[(1) - (2)]), "storage qualifier");
3848         if (context->shaderType == GL_VERTEX_SHADER)
3849         {
3850             context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
3851             context->recover();
3852         }
3853         (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
3854     }
3855     break;
3856
3857   case 126:
3858
3859     {
3860         ES3_ONLY("centroid out", (yylsp[(1) - (2)]), "storage qualifier");
3861         if (context->shaderType == GL_FRAGMENT_SHADER)
3862         {
3863             context->error((yylsp[(1) - (2)]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
3864             context->recover();
3865         }
3866         (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
3867     }
3868     break;
3869
3870   case 127:
3871
3872     {
3873         if (context->globalErrorCheck((yylsp[(1) - (1)]), context->symbolTable.atGlobalLevel(), "uniform"))
3874             context->recover();
3875         (yyval.interm.type).qualifier = EvqUniform;
3876     }
3877     break;
3878
3879   case 128:
3880
3881     {
3882         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3883
3884         if ((yyval.interm.type).precision == EbpUndefined) {
3885             (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
3886             if (context->precisionErrorCheck((yylsp[(1) - (1)]), (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
3887                 context->recover();
3888             }
3889         }
3890     }
3891     break;
3892
3893   case 129:
3894
3895     {
3896         (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
3897         (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
3898
3899         if (!SupportsPrecision((yyvsp[(2) - (2)].interm.type).type)) {
3900             context->error((yylsp[(1) - (2)]), "illegal type for precision qualifier", getBasicString((yyvsp[(2) - (2)].interm.type).type));
3901             context->recover();
3902         }
3903     }
3904     break;
3905
3906   case 130:
3907
3908     {
3909         (yyval.interm.precision) = EbpHigh;
3910     }
3911     break;
3912
3913   case 131:
3914
3915     {
3916         (yyval.interm.precision) = EbpMedium;
3917     }
3918     break;
3919
3920   case 132:
3921
3922     {
3923         (yyval.interm.precision) = EbpLow;
3924     }
3925     break;
3926
3927   case 133:
3928
3929     {
3930         ES3_ONLY("layout", (yylsp[(1) - (4)]), "qualifier");
3931         (yyval.interm.layoutQualifier) = (yyvsp[(3) - (4)].interm.layoutQualifier);
3932     }
3933     break;
3934
3935   case 134:
3936
3937     {
3938         (yyval.interm.layoutQualifier) = (yyvsp[(1) - (1)].interm.layoutQualifier);
3939     }
3940     break;
3941
3942   case 135:
3943
3944     {
3945         (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[(1) - (3)].interm.layoutQualifier), (yyvsp[(3) - (3)].interm.layoutQualifier));
3946     }
3947     break;
3948
3949   case 136:
3950
3951     {
3952         (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
3953     }
3954     break;
3955
3956   case 137:
3957
3958     {
3959         (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)]));
3960     }
3961     break;
3962
3963   case 138:
3964
3965     {
3966         (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)]));
3967     }
3968     break;
3969
3970   case 139:
3971
3972     {
3973         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
3974     }
3975     break;
3976
3977   case 140:
3978
3979     {
3980         (yyval.interm.type) = (yyvsp[(1) - (4)].interm.type);
3981
3982         if (context->arrayTypeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
3983             context->recover();
3984         else {
3985             int size;
3986             if (context->arraySizeErrorCheck((yylsp[(2) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
3987                 context->recover();
3988             (yyval.interm.type).setArray(true, size);
3989         }
3990     }
3991     break;
3992
3993   case 141:
3994
3995     {
3996         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
3997         (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[(1) - (1)]));
3998     }
3999     break;
4000
4001   case 142:
4002
4003     {
4004         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4005         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4006     }
4007     break;
4008
4009   case 143:
4010
4011     {
4012         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4013         (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
4014     }
4015     break;
4016
4017   case 144:
4018
4019     {
4020         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4021         (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4022     }
4023     break;
4024
4025   case 145:
4026
4027     {
4028         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4029         (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
4030     }
4031     break;
4032
4033   case 146:
4034
4035     {
4036         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4037         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4038         (yyval.interm.type).setAggregate(2);
4039     }
4040     break;
4041
4042   case 147:
4043
4044     {
4045         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4046         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4047         (yyval.interm.type).setAggregate(3);
4048     }
4049     break;
4050
4051   case 148:
4052
4053     {
4054         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4055         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4056         (yyval.interm.type).setAggregate(4);
4057     }
4058     break;
4059
4060   case 149:
4061
4062     {
4063         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4064         (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
4065         (yyval.interm.type).setAggregate(2);
4066     }
4067     break;
4068
4069   case 150:
4070
4071     {
4072         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4073         (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
4074         (yyval.interm.type).setAggregate(3);
4075     }
4076     break;
4077
4078   case 151:
4079
4080     {
4081         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4082         (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[(1) - (1)]));
4083         (yyval.interm.type).setAggregate(4);
4084     }
4085     break;
4086
4087   case 152:
4088
4089     {
4090         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4091         (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
4092         (yyval.interm.type).setAggregate(2);
4093     }
4094     break;
4095
4096   case 153:
4097
4098     {
4099         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4100         (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
4101         (yyval.interm.type).setAggregate(3);
4102     }
4103     break;
4104
4105   case 154:
4106
4107     {
4108         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4109         (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[(1) - (1)]));
4110         (yyval.interm.type).setAggregate(4);
4111     }
4112     break;
4113
4114   case 155:
4115
4116     {
4117         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4118         (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4119         (yyval.interm.type).setAggregate(2);
4120     }
4121     break;
4122
4123   case 156:
4124
4125     {
4126         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4127         (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4128         (yyval.interm.type).setAggregate(3);
4129     }
4130     break;
4131
4132   case 157:
4133
4134     {
4135         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4136         (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[(1) - (1)]));
4137         (yyval.interm.type).setAggregate(4);
4138     }
4139     break;
4140
4141   case 158:
4142
4143     {
4144         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4145         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4146         (yyval.interm.type).setMatrix(2, 2);
4147     }
4148     break;
4149
4150   case 159:
4151
4152     {
4153         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4154         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4155         (yyval.interm.type).setMatrix(3, 3);
4156     }
4157     break;
4158
4159   case 160:
4160
4161     {
4162         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4163         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4164         (yyval.interm.type).setMatrix(4, 4);
4165     }
4166     break;
4167
4168   case 161:
4169
4170     {
4171         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4172         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4173         (yyval.interm.type).setMatrix(2, 3);
4174     }
4175     break;
4176
4177   case 162:
4178
4179     {
4180         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4181         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4182         (yyval.interm.type).setMatrix(3, 2);
4183     }
4184     break;
4185
4186   case 163:
4187
4188     {
4189         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4190         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4191         (yyval.interm.type).setMatrix(2, 4);
4192     }
4193     break;
4194
4195   case 164:
4196
4197     {
4198         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4199         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4200         (yyval.interm.type).setMatrix(4, 2);
4201     }
4202     break;
4203
4204   case 165:
4205
4206     {
4207         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4208         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4209         (yyval.interm.type).setMatrix(3, 4);
4210     }
4211     break;
4212
4213   case 166:
4214
4215     {
4216         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4217         (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[(1) - (1)]));
4218         (yyval.interm.type).setMatrix(4, 3);
4219     }
4220     break;
4221
4222   case 167:
4223
4224     {
4225         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4226         (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[(1) - (1)]));
4227     }
4228     break;
4229
4230   case 168:
4231
4232     {
4233         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4234         (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[(1) - (1)]));
4235     }
4236     break;
4237
4238   case 169:
4239
4240     {
4241         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4242         (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[(1) - (1)]));
4243     }
4244     break;
4245
4246   case 170:
4247
4248     {
4249         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4250         (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[(1) - (1)]));
4251     }
4252     break;
4253
4254   case 171:
4255
4256     {
4257         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4258         (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[(1) - (1)]));
4259     }
4260     break;
4261
4262   case 172:
4263
4264     {
4265         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4266         (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[(1) - (1)]));
4267     }
4268     break;
4269
4270   case 173:
4271
4272     {
4273         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4274         (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[(1) - (1)]));
4275     }
4276     break;
4277
4278   case 174:
4279
4280     {
4281         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4282         (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[(1) - (1)]));
4283     }
4284     break;
4285
4286   case 175:
4287
4288     {
4289         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4290         (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[(1) - (1)]));
4291     }
4292     break;
4293
4294   case 176:
4295
4296     {
4297         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4298         (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[(1) - (1)]));
4299     }
4300     break;
4301
4302   case 177:
4303
4304     {
4305         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4306         (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[(1) - (1)]));
4307     }
4308     break;
4309
4310   case 178:
4311
4312     {
4313         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4314         (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[(1) - (1)]));
4315     }
4316     break;
4317
4318   case 179:
4319
4320     {
4321         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4322         (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[(1) - (1)]));
4323     }
4324     break;
4325
4326   case 180:
4327
4328     {
4329         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4330         (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[(1) - (1)]));
4331     }
4332     break;
4333
4334   case 181:
4335
4336     {
4337         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4338         (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[(1) - (1)]));
4339     }
4340     break;
4341
4342   case 182:
4343
4344     {
4345         if (!context->supportsExtension("GL_OES_EGL_image_external")) {
4346             context->error((yylsp[(1) - (1)]), "unsupported type", "samplerExternalOES");
4347             context->recover();
4348         }
4349         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4350         (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[(1) - (1)]));
4351     }
4352     break;
4353
4354   case 183:
4355
4356     {
4357         if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
4358             context->error((yylsp[(1) - (1)]), "unsupported type", "sampler2DRect");
4359             context->recover();
4360         }
4361         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4362         (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yylsp[(1) - (1)]));
4363     }
4364     break;
4365
4366   case 184:
4367
4368     {
4369         (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
4370         (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4371     }
4372     break;
4373
4374   case 185:
4375
4376     {
4377         //
4378         // This is for user defined type names.  The lexical phase looked up the
4379         // type.
4380         //
4381         TType& structure = static_cast<TVariable*>((yyvsp[(1) - (1)].lex).symbol)->getType();
4382         TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
4383         (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[(1) - (1)]));
4384         (yyval.interm.type).userDef = &structure;
4385     }
4386     break;
4387
4388   case 186:
4389
4390     { if (context->enterStructDeclaration((yylsp[(2) - (3)]), *(yyvsp[(2) - (3)].lex).string)) context->recover(); }
4391     break;
4392
4393   case 187:
4394
4395     {
4396         (yyval.interm.type) = context->addStructure((yylsp[(1) - (6)]), (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].lex).string, (yyvsp[(5) - (6)].interm.fieldList));
4397     }
4398     break;
4399
4400   case 188:
4401
4402     { if (context->enterStructDeclaration((yylsp[(2) - (2)]), *(yyvsp[(2) - (2)].lex).string)) context->recover(); }
4403     break;
4404
4405   case 189:
4406
4407     {
4408         (yyval.interm.type) = context->addStructure((yylsp[(1) - (5)]), (yyloc), NewPoolTString(""), (yyvsp[(4) - (5)].interm.fieldList));
4409     }
4410     break;
4411
4412   case 190:
4413
4414     {
4415         (yyval.interm.fieldList) = (yyvsp[(1) - (1)].interm.fieldList);
4416     }
4417     break;
4418
4419   case 191:
4420
4421     {
4422         (yyval.interm.fieldList) = (yyvsp[(1) - (2)].interm.fieldList);
4423         for (size_t i = 0; i < (yyvsp[(2) - (2)].interm.fieldList)->size(); ++i) {
4424             TField* field = (*(yyvsp[(2) - (2)].interm.fieldList))[i];
4425             for (size_t j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
4426                 if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
4427                     context->error((yylsp[(2) - (2)]), "duplicate field name in structure:", "struct", field->name().c_str());
4428                     context->recover();
4429                 }
4430             }
4431             (yyval.interm.fieldList)->push_back(field);
4432         }
4433     }
4434     break;
4435
4436   case 192:
4437
4438     {
4439         (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(1) - (3)].interm.type), (yyvsp[(2) - (3)].interm.fieldList));
4440     }
4441     break;
4442
4443   case 193:
4444
4445     {
4446         // ES3 Only, but errors should be handled elsewhere
4447         (yyvsp[(2) - (4)].interm.type).qualifier = (yyvsp[(1) - (4)].interm.type).qualifier;
4448         (yyvsp[(2) - (4)].interm.type).layoutQualifier = (yyvsp[(1) - (4)].interm.type).layoutQualifier;
4449         (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[(2) - (4)].interm.type), (yyvsp[(3) - (4)].interm.fieldList));
4450     }
4451     break;
4452
4453   case 194:
4454
4455     {
4456         (yyval.interm.fieldList) = NewPoolTFieldList();
4457         (yyval.interm.fieldList)->push_back((yyvsp[(1) - (1)].interm.field));
4458     }
4459     break;
4460
4461   case 195:
4462
4463     {
4464         (yyval.interm.fieldList)->push_back((yyvsp[(3) - (3)].interm.field));
4465     }
4466     break;
4467
4468   case 196:
4469
4470     {
4471         if (context->reservedErrorCheck((yylsp[(1) - (1)]), *(yyvsp[(1) - (1)].lex).string))
4472             context->recover();
4473
4474         TType* type = new TType(EbtVoid, EbpUndefined);
4475         (yyval.interm.field) = new TField(type, (yyvsp[(1) - (1)].lex).string, (yylsp[(1) - (1)]));
4476     }
4477     break;
4478
4479   case 197:
4480
4481     {
4482         if (context->reservedErrorCheck((yylsp[(1) - (4)]), *(yyvsp[(1) - (4)].lex).string))
4483             context->recover();
4484
4485         TType* type = new TType(EbtVoid, EbpUndefined);
4486         int size;
4487         if (context->arraySizeErrorCheck((yylsp[(3) - (4)]), (yyvsp[(3) - (4)].interm.intermTypedNode), size))
4488             context->recover();
4489         type->setArraySize(size);
4490
4491         (yyval.interm.field) = new TField(type, (yyvsp[(1) - (4)].lex).string, (yylsp[(1) - (4)]));
4492     }
4493     break;
4494
4495   case 198:
4496
4497     { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); }
4498     break;
4499
4500   case 199:
4501
4502     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4503     break;
4504
4505   case 200:
4506
4507     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); }
4508     break;
4509
4510   case 201:
4511
4512     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4513     break;
4514
4515   case 202:
4516
4517     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4518     break;
4519
4520   case 203:
4521
4522     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4523     break;
4524
4525   case 204:
4526
4527     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4528     break;
4529
4530   case 205:
4531
4532     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4533     break;
4534
4535   case 206:
4536
4537     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4538     break;
4539
4540   case 207:
4541
4542     { (yyval.interm.intermAggregate) = 0; }
4543     break;
4544
4545   case 208:
4546
4547     { context->symbolTable.push(); }
4548     break;
4549
4550   case 209:
4551
4552     { context->symbolTable.pop(); }
4553     break;
4554
4555   case 210:
4556
4557     {
4558         if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
4559             (yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
4560             (yyvsp[(3) - (5)].interm.intermAggregate)->setLine((yyloc));
4561         }
4562         (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
4563     }
4564     break;
4565
4566   case 211:
4567
4568     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4569     break;
4570
4571   case 212:
4572
4573     { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); }
4574     break;
4575
4576   case 213:
4577
4578     { context->symbolTable.push(); }
4579     break;
4580
4581   case 214:
4582
4583     { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4584     break;
4585
4586   case 215:
4587
4588     { context->symbolTable.push(); }
4589     break;
4590
4591   case 216:
4592
4593     { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); }
4594     break;
4595
4596   case 217:
4597
4598     {
4599         (yyval.interm.intermNode) = 0;
4600     }
4601     break;
4602
4603   case 218:
4604
4605     {
4606         if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
4607             (yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
4608             (yyvsp[(2) - (3)].interm.intermAggregate)->setLine((yyloc));
4609         }
4610         (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
4611     }
4612     break;
4613
4614   case 219:
4615
4616     {
4617         (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), (yyloc));
4618     }
4619     break;
4620
4621   case 220:
4622
4623     {
4624         (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
4625     }
4626     break;
4627
4628   case 221:
4629
4630     { (yyval.interm.intermNode) = 0; }
4631     break;
4632
4633   case 222:
4634
4635     { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); }
4636     break;
4637
4638   case 223:
4639
4640     {
4641         if (context->boolErrorCheck((yylsp[(1) - (5)]), (yyvsp[(3) - (5)].interm.intermTypedNode)))
4642             context->recover();
4643         (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yylsp[(1) - (5)]));
4644     }
4645     break;
4646
4647   case 224:
4648
4649     {
4650         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
4651         (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
4652     }
4653     break;
4654
4655   case 225:
4656
4657     {
4658         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
4659         (yyval.interm.nodePair).node2 = 0;
4660     }
4661     break;
4662
4663   case 226:
4664
4665     {
4666         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4667         if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
4668             context->recover();
4669     }
4670     break;
4671
4672   case 227:
4673
4674     {
4675         TIntermNode* intermNode;
4676         if (context->structQualifierErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
4677             context->recover();
4678         if (context->boolErrorCheck((yylsp[(2) - (4)]), (yyvsp[(1) - (4)].interm.type)))
4679             context->recover();
4680
4681         if (!context->executeInitializer((yylsp[(2) - (4)]), *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), (yyvsp[(4) - (4)].interm.intermTypedNode), intermNode))
4682             (yyval.interm.intermTypedNode) = (yyvsp[(4) - (4)].interm.intermTypedNode);
4683         else {
4684             context->recover();
4685             (yyval.interm.intermTypedNode) = 0;
4686         }
4687     }
4688     break;
4689
4690   case 228:
4691
4692     { context->symbolTable.push(); ++context->loopNestingLevel; }
4693     break;
4694
4695   case 229:
4696
4697     {
4698         context->symbolTable.pop();
4699         (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yylsp[(1) - (6)]));
4700         --context->loopNestingLevel;
4701     }
4702     break;
4703
4704   case 230:
4705
4706     { ++context->loopNestingLevel; }
4707     break;
4708
4709   case 231:
4710
4711     {
4712         if (context->boolErrorCheck((yylsp[(8) - (8)]), (yyvsp[(6) - (8)].interm.intermTypedNode)))
4713             context->recover();
4714
4715         (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yylsp[(4) - (8)]));
4716         --context->loopNestingLevel;
4717     }
4718     break;
4719
4720   case 232:
4721
4722     { context->symbolTable.push(); ++context->loopNestingLevel; }
4723     break;
4724
4725   case 233:
4726
4727     {
4728         context->symbolTable.pop();
4729         (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)]));
4730         --context->loopNestingLevel;
4731     }
4732     break;
4733
4734   case 234:
4735
4736     {
4737         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4738     }
4739     break;
4740
4741   case 235:
4742
4743     {
4744         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4745     }
4746     break;
4747
4748   case 236:
4749
4750     {
4751         (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
4752     }
4753     break;
4754
4755   case 237:
4756
4757     {
4758         (yyval.interm.intermTypedNode) = 0;
4759     }
4760     break;
4761
4762   case 238:
4763
4764     {
4765         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
4766         (yyval.interm.nodePair).node2 = 0;
4767     }
4768     break;
4769
4770   case 239:
4771
4772     {
4773         (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
4774         (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
4775     }
4776     break;
4777
4778   case 240:
4779
4780     {
4781         if (context->loopNestingLevel <= 0) {
4782             context->error((yylsp[(1) - (2)]), "continue statement only allowed in loops", "");
4783             context->recover();
4784         }
4785         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpContinue, (yylsp[(1) - (2)]));
4786     }
4787     break;
4788
4789   case 241:
4790
4791     {
4792         if (context->loopNestingLevel <= 0) {
4793             context->error((yylsp[(1) - (2)]), "break statement only allowed in loops", "");
4794             context->recover();
4795         }
4796         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpBreak, (yylsp[(1) - (2)]));
4797     }
4798     break;
4799
4800   case 242:
4801
4802     {
4803         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yylsp[(1) - (2)]));
4804         if (context->currentFunctionType->getBasicType() != EbtVoid) {
4805             context->error((yylsp[(1) - (2)]), "non-void function must return a value", "return");
4806             context->recover();
4807         }
4808     }
4809     break;
4810
4811   case 243:
4812
4813     {
4814         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpReturn, (yyvsp[(2) - (3)].interm.intermTypedNode), (yylsp[(1) - (3)]));
4815         context->functionReturnsValue = true;
4816         if (context->currentFunctionType->getBasicType() == EbtVoid) {
4817             context->error((yylsp[(1) - (3)]), "void function cannot return a value", "return");
4818             context->recover();
4819         } else if (*(context->currentFunctionType) != (yyvsp[(2) - (3)].interm.intermTypedNode)->getType()) {
4820             context->error((yylsp[(1) - (3)]), "function return is not matching type:", "return");
4821             context->recover();
4822         }
4823     }
4824     break;
4825
4826   case 244:
4827
4828     {
4829         FRAG_ONLY("discard", (yylsp[(1) - (2)]));
4830         (yyval.interm.intermNode) = context->intermediate.addBranch(EOpKill, (yylsp[(1) - (2)]));
4831     }
4832     break;
4833
4834   case 245:
4835
4836     {
4837         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4838         context->treeRoot = (yyval.interm.intermNode);
4839     }
4840     break;
4841
4842   case 246:
4843
4844     {
4845         (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), (yyloc));
4846         context->treeRoot = (yyval.interm.intermNode);
4847     }
4848     break;
4849
4850   case 247:
4851
4852     {
4853         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4854     }
4855     break;
4856
4857   case 248:
4858
4859     {
4860         (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
4861     }
4862     break;
4863
4864   case 249:
4865
4866     {
4867         TFunction* function = (yyvsp[(1) - (1)].interm).function;
4868         
4869         const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->shaderVersion);
4870         
4871         if (builtIn)
4872         {
4873             context->error((yylsp[(1) - (1)]), "built-in functions cannot be redefined", function->getName().c_str());
4874             context->recover();
4875         }
4876         
4877         TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->shaderVersion));
4878         //
4879         // Note:  'prevDec' could be 'function' if this is the first time we've seen function
4880         // as it would have just been put in the symbol table.  Otherwise, we're looking up
4881         // an earlier occurance.
4882         //
4883         if (prevDec->isDefined()) {
4884             //
4885             // Then this function already has a body.
4886             //
4887             context->error((yylsp[(1) - (1)]), "function already has a body", function->getName().c_str());
4888             context->recover();
4889         }
4890         prevDec->setDefined();
4891
4892         //
4893         // Raise error message if main function takes any parameters or return anything other than void
4894         //
4895         if (function->getName() == "main") {
4896             if (function->getParamCount() > 0) {
4897                 context->error((yylsp[(1) - (1)]), "function cannot take any parameter(s)", function->getName().c_str());
4898                 context->recover();
4899             }
4900             if (function->getReturnType().getBasicType() != EbtVoid) {
4901                 context->error((yylsp[(1) - (1)]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
4902                 context->recover();
4903             }
4904         }
4905
4906         //
4907         // Remember the return type for later checking for RETURN statements.
4908         //
4909         context->currentFunctionType = &(prevDec->getReturnType());
4910         context->functionReturnsValue = false;
4911
4912         //
4913         // Insert parameters into the symbol table.
4914         // If the parameter has no name, it's not an error, just don't insert it
4915         // (could be used for unused args).
4916         //
4917         // Also, accumulate the list of parameters into the HIL, so lower level code
4918         // knows where to find parameters.
4919         //
4920         TIntermAggregate* paramNodes = new TIntermAggregate;
4921         for (size_t i = 0; i < function->getParamCount(); i++) {
4922             const TParameter& param = function->getParam(i);
4923             if (param.name != 0) {
4924                 TVariable *variable = new TVariable(param.name, *param.type);
4925                 //
4926                 // Insert the parameters with name in the symbol table.
4927                 //
4928                 if (! context->symbolTable.declare(variable)) {
4929                     context->error((yylsp[(1) - (1)]), "redefinition", variable->getName().c_str());
4930                     context->recover();
4931                     delete variable;
4932                 }
4933
4934                 //
4935                 // Add the parameter to the HIL
4936                 //
4937                 paramNodes = context->intermediate.growAggregate(
4938                                                paramNodes,
4939                                                context->intermediate.addSymbol(variable->getUniqueId(),
4940                                                                        variable->getName(),
4941                                                                        variable->getType(), (yylsp[(1) - (1)])),
4942                                                (yylsp[(1) - (1)]));
4943             } else {
4944                 paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[(1) - (1)])), (yylsp[(1) - (1)]));
4945             }
4946         }
4947         context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[(1) - (1)]));
4948         (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
4949         context->loopNestingLevel = 0;
4950     }
4951     break;
4952
4953   case 250:
4954
4955     {
4956         //?? Check that all paths return a value if return type != void ?
4957         //   May be best done as post process phase on intermediate code
4958         if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->functionReturnsValue) {
4959             context->error((yylsp[(1) - (3)]), "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str());
4960             context->recover();
4961         }
4962         
4963         (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermAggregate, (yyvsp[(3) - (3)].interm.intermNode), (yyloc));
4964         context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[(1) - (3)]));
4965         (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str());
4966         (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[(1) - (3)].interm).function->getReturnType());
4967
4968         // store the pragma information for debug and optimize and other vendor specific
4969         // information. This information can be queried from the parse tree
4970         (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
4971         (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);
4972
4973         context->symbolTable.pop();
4974     }
4975     break;
4976
4977
4978
4979       default: break;
4980     }
4981   /* User semantic actions sometimes alter yychar, and that requires
4982      that yytoken be updated with the new translation.  We take the
4983      approach of translating immediately before every use of yytoken.
4984      One alternative is translating here after every semantic action,
4985      but that translation would be missed if the semantic action invokes
4986      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4987      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
4988      incorrect destructor might then be invoked immediately.  In the
4989      case of YYERROR or YYBACKUP, subsequent parser actions might lead
4990      to an incorrect destructor call or verbose syntax error message
4991      before the lookahead is translated.  */
4992   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4993
4994   YYPOPSTACK (yylen);
4995   yylen = 0;
4996   YY_STACK_PRINT (yyss, yyssp);
4997
4998   *++yyvsp = yyval;
4999   *++yylsp = yyloc;
5000
5001   /* Now `shift' the result of the reduction.  Determine what state
5002      that goes to, based on the state we popped back to and the rule
5003      number reduced by.  */
5004
5005   yyn = yyr1[yyn];
5006
5007   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5008   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5009     yystate = yytable[yystate];
5010   else
5011     yystate = yydefgoto[yyn - YYNTOKENS];
5012
5013   goto yynewstate;
5014
5015
5016 /*------------------------------------.
5017 | yyerrlab -- here on detecting error |
5018 `------------------------------------*/
5019 yyerrlab:
5020   /* Make sure we have latest lookahead translation.  See comments at
5021      user semantic actions for why this is necessary.  */
5022   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5023
5024   /* If not already recovering from an error, report this error.  */
5025   if (!yyerrstatus)
5026     {
5027       ++yynerrs;
5028 #if ! YYERROR_VERBOSE
5029       yyerror (&yylloc, context, YY_("syntax error"));
5030 #else
5031 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5032                                         yyssp, yytoken)
5033       {
5034         char const *yymsgp = YY_("syntax error");
5035         int yysyntax_error_status;
5036         yysyntax_error_status = YYSYNTAX_ERROR;
5037         if (yysyntax_error_status == 0)
5038           yymsgp = yymsg;
5039         else if (yysyntax_error_status == 1)
5040           {
5041             if (yymsg != yymsgbuf)
5042               YYSTACK_FREE (yymsg);
5043             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5044             if (!yymsg)
5045               {
5046                 yymsg = yymsgbuf;
5047                 yymsg_alloc = sizeof yymsgbuf;
5048                 yysyntax_error_status = 2;
5049               }
5050             else
5051               {
5052                 yysyntax_error_status = YYSYNTAX_ERROR;
5053                 yymsgp = yymsg;
5054               }
5055           }
5056         yyerror (&yylloc, context, yymsgp);
5057         if (yysyntax_error_status == 2)
5058           goto yyexhaustedlab;
5059       }
5060 # undef YYSYNTAX_ERROR
5061 #endif
5062     }
5063
5064   yyerror_range[1] = yylloc;
5065
5066   if (yyerrstatus == 3)
5067     {
5068       /* If just tried and failed to reuse lookahead token after an
5069          error, discard it.  */
5070
5071       if (yychar <= YYEOF)
5072         {
5073           /* Return failure if at end of input.  */
5074           if (yychar == YYEOF)
5075             YYABORT;
5076         }
5077       else
5078         {
5079           yydestruct ("Error: discarding",
5080                       yytoken, &yylval, &yylloc, context);
5081           yychar = YYEMPTY;
5082         }
5083     }
5084
5085   /* Else will try to reuse lookahead token after shifting the error
5086      token.  */
5087   goto yyerrlab1;
5088
5089
5090 /*---------------------------------------------------.
5091 | yyerrorlab -- error raised explicitly by YYERROR.  |
5092 `---------------------------------------------------*/
5093 yyerrorlab:
5094
5095   /* Pacify compilers like GCC when the user code never invokes
5096      YYERROR and the label yyerrorlab therefore never appears in user
5097      code.  */
5098   if (/*CONSTCOND*/ 0)
5099      goto yyerrorlab;
5100
5101   yyerror_range[1] = yylsp[1-yylen];
5102   /* Do not reclaim the symbols of the rule which action triggered
5103      this YYERROR.  */
5104   YYPOPSTACK (yylen);
5105   yylen = 0;
5106   YY_STACK_PRINT (yyss, yyssp);
5107   yystate = *yyssp;
5108   goto yyerrlab1;
5109
5110
5111 /*-------------------------------------------------------------.
5112 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
5113 `-------------------------------------------------------------*/
5114 yyerrlab1:
5115   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
5116
5117   for (;;)
5118     {
5119       yyn = yypact[yystate];
5120       if (!yypact_value_is_default (yyn))
5121         {
5122           yyn += YYTERROR;
5123           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5124             {
5125               yyn = yytable[yyn];
5126               if (0 < yyn)
5127                 break;
5128             }
5129         }
5130
5131       /* Pop the current state because it cannot handle the error token.  */
5132       if (yyssp == yyss)
5133         YYABORT;
5134
5135       yyerror_range[1] = *yylsp;
5136       yydestruct ("Error: popping",
5137                   yystos[yystate], yyvsp, yylsp, context);
5138       YYPOPSTACK (1);
5139       yystate = *yyssp;
5140       YY_STACK_PRINT (yyss, yyssp);
5141     }
5142
5143   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
5144   *++yyvsp = yylval;
5145   YY_IGNORE_MAYBE_UNINITIALIZED_END
5146
5147   yyerror_range[2] = yylloc;
5148   /* Using YYLLOC is tempting, but would change the location of
5149      the lookahead.  YYLOC is available though.  */
5150   YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
5151   *++yylsp = yyloc;
5152
5153   /* Shift the error token.  */
5154   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5155
5156   yystate = yyn;
5157   goto yynewstate;
5158
5159
5160 /*-------------------------------------.
5161 | yyacceptlab -- YYACCEPT comes here.  |
5162 `-------------------------------------*/
5163 yyacceptlab:
5164   yyresult = 0;
5165   goto yyreturn;
5166
5167 /*-----------------------------------.
5168 | yyabortlab -- YYABORT comes here.  |
5169 `-----------------------------------*/
5170 yyabortlab:
5171   yyresult = 1;
5172   goto yyreturn;
5173
5174 #if !defined yyoverflow || YYERROR_VERBOSE
5175 /*-------------------------------------------------.
5176 | yyexhaustedlab -- memory exhaustion comes here.  |
5177 `-------------------------------------------------*/
5178 yyexhaustedlab:
5179   yyerror (&yylloc, context, YY_("memory exhausted"));
5180   yyresult = 2;
5181   /* Fall through.  */
5182 #endif
5183
5184 yyreturn:
5185   if (yychar != YYEMPTY)
5186     {
5187       /* Make sure we have latest lookahead translation.  See comments at
5188          user semantic actions for why this is necessary.  */
5189       yytoken = YYTRANSLATE (yychar);
5190       yydestruct ("Cleanup: discarding lookahead",
5191                   yytoken, &yylval, &yylloc, context);
5192     }
5193   /* Do not reclaim the symbols of the rule which action triggered
5194      this YYABORT or YYACCEPT.  */
5195   YYPOPSTACK (yylen);
5196   YY_STACK_PRINT (yyss, yyssp);
5197   while (yyssp != yyss)
5198     {
5199       yydestruct ("Cleanup: popping",
5200                   yystos[*yyssp], yyvsp, yylsp, context);
5201       YYPOPSTACK (1);
5202     }
5203 #ifndef yyoverflow
5204   if (yyss != yyssa)
5205     YYSTACK_FREE (yyss);
5206 #endif
5207 #if YYERROR_VERBOSE
5208   if (yymsg != yymsgbuf)
5209     YYSTACK_FREE (yymsg);
5210 #endif
5211   /* Make sure YYID is used.  */
5212   return YYID (yyresult);
5213 }
5214
5215
5216
5217
5218
5219 int glslang_parse(TParseContext* context) {
5220     return yyparse(context);
5221 }