/* A Bison parser, made by GNU Bison 3.0.2.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Bison version.  */
#define YYBISON_VERSION "3.0.2"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 2

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1




/* Copy the first part of user declarations.  */


//
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// This file is auto-generated by generate_parser.sh. DO NOT EDIT!

// Ignore errors in auto-generated code.
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#pragma warning(disable: 4189)
#pragma warning(disable: 4505)
#pragma warning(disable: 4701)
#endif

#include "angle_gl.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/ParseContext.h"
#include "GLSLANG/ShaderLang.h"

#define YYENABLE_NLS 0




# ifndef YY_NULLPTR
#  if defined __cplusplus && 201103L <= __cplusplus
#   define YY_NULLPTR nullptr
#  else
#   define YY_NULLPTR 0
#  endif
# endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

/* In a future release of Bison, this section will be replaced
   by #include "glslang_tab.h".  */
#ifndef YY_YY_GLSLANG_TAB_H_INCLUDED
# define YY_YY_GLSLANG_TAB_H_INCLUDED
/* Debug traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* "%code requires" blocks.  */


#define YYLTYPE TSourceLoc
#define YYLTYPE_IS_DECLARED 1



/* Token type.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    INVARIANT = 258,
    HIGH_PRECISION = 259,
    MEDIUM_PRECISION = 260,
    LOW_PRECISION = 261,
    PRECISION = 262,
    ATTRIBUTE = 263,
    CONST_QUAL = 264,
    BOOL_TYPE = 265,
    FLOAT_TYPE = 266,
    INT_TYPE = 267,
    UINT_TYPE = 268,
    BREAK = 269,
    CONTINUE = 270,
    DO = 271,
    ELSE = 272,
    FOR = 273,
    IF = 274,
    DISCARD = 275,
    RETURN = 276,
    SWITCH = 277,
    CASE = 278,
    DEFAULT = 279,
    BVEC2 = 280,
    BVEC3 = 281,
    BVEC4 = 282,
    IVEC2 = 283,
    IVEC3 = 284,
    IVEC4 = 285,
    VEC2 = 286,
    VEC3 = 287,
    VEC4 = 288,
    UVEC2 = 289,
    UVEC3 = 290,
    UVEC4 = 291,
    MATRIX2 = 292,
    MATRIX3 = 293,
    MATRIX4 = 294,
    IN_QUAL = 295,
    OUT_QUAL = 296,
    INOUT_QUAL = 297,
    UNIFORM = 298,
    VARYING = 299,
    MATRIX2x3 = 300,
    MATRIX3x2 = 301,
    MATRIX2x4 = 302,
    MATRIX4x2 = 303,
    MATRIX3x4 = 304,
    MATRIX4x3 = 305,
    CENTROID = 306,
    FLAT = 307,
    SMOOTH = 308,
    STRUCT = 309,
    VOID_TYPE = 310,
    WHILE = 311,
    SAMPLER2D = 312,
    SAMPLERCUBE = 313,
    SAMPLER_EXTERNAL_OES = 314,
    SAMPLER2DRECT = 315,
    SAMPLER2DARRAY = 316,
    ISAMPLER2D = 317,
    ISAMPLER3D = 318,
    ISAMPLERCUBE = 319,
    ISAMPLER2DARRAY = 320,
    USAMPLER2D = 321,
    USAMPLER3D = 322,
    USAMPLERCUBE = 323,
    USAMPLER2DARRAY = 324,
    SAMPLER3D = 325,
    SAMPLER3DRECT = 326,
    SAMPLER2DSHADOW = 327,
    SAMPLERCUBESHADOW = 328,
    SAMPLER2DARRAYSHADOW = 329,
    LAYOUT = 330,
    IDENTIFIER = 331,
    TYPE_NAME = 332,
    FLOATCONSTANT = 333,
    INTCONSTANT = 334,
    UINTCONSTANT = 335,
    BOOLCONSTANT = 336,
    FIELD_SELECTION = 337,
    LEFT_OP = 338,
    RIGHT_OP = 339,
    INC_OP = 340,
    DEC_OP = 341,
    LE_OP = 342,
    GE_OP = 343,
    EQ_OP = 344,
    NE_OP = 345,
    AND_OP = 346,
    OR_OP = 347,
    XOR_OP = 348,
    MUL_ASSIGN = 349,
    DIV_ASSIGN = 350,
    ADD_ASSIGN = 351,
    MOD_ASSIGN = 352,
    LEFT_ASSIGN = 353,
    RIGHT_ASSIGN = 354,
    AND_ASSIGN = 355,
    XOR_ASSIGN = 356,
    OR_ASSIGN = 357,
    SUB_ASSIGN = 358,
    LEFT_PAREN = 359,
    RIGHT_PAREN = 360,
    LEFT_BRACKET = 361,
    RIGHT_BRACKET = 362,
    LEFT_BRACE = 363,
    RIGHT_BRACE = 364,
    DOT = 365,
    COMMA = 366,
    COLON = 367,
    EQUAL = 368,
    SEMICOLON = 369,
    BANG = 370,
    DASH = 371,
    TILDE = 372,
    PLUS = 373,
    STAR = 374,
    SLASH = 375,
    PERCENT = 376,
    LEFT_ANGLE = 377,
    RIGHT_ANGLE = 378,
    VERTICAL_BAR = 379,
    CARET = 380,
    AMPERSAND = 381,
    QUESTION = 382
  };
#endif

/* Value type.  */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{


    struct {
        union {
            TString *string;
            float f;
            int i;
            unsigned int u;
            bool b;
        };
        TSymbol* symbol;
    } lex;
    struct {
        TOperator op;
        union {
            TIntermNode* intermNode;
            TIntermNodePair nodePair;
            TIntermTyped* intermTypedNode;
            TIntermAggregate* intermAggregate;
            TIntermSwitch* intermSwitch;
            TIntermCase* intermCase;
        };
        union {
            TPublicType type;
            TPrecision precision;
            TLayoutQualifier layoutQualifier;
            TQualifier qualifier;
            TFunction* function;
            TParameter param;
            TField* field;
            TFieldList* fieldList;
        };
    } interm;


};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif

/* Location type.  */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE YYLTYPE;
struct YYLTYPE
{
  int first_line;
  int first_column;
  int last_line;
  int last_column;
};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif



int yyparse (TParseContext* context, void *scanner);

#endif /* !YY_YY_GLSLANG_TAB_H_INCLUDED  */

/* Copy the second part of user declarations.  */


extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner);
extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, const char* reason);

#define YYLLOC_DEFAULT(Current, Rhs, N)                      \
  do {                                                       \
      if (N) {                                         \
        (Current).first_file = YYRHSLOC(Rhs, 1).first_file;  \
        (Current).first_line = YYRHSLOC(Rhs, 1).first_line;  \
        (Current).last_file = YYRHSLOC(Rhs, N).last_file;    \
        (Current).last_line = YYRHSLOC(Rhs, N).last_line;    \
      }                                                      \
      else {                                                 \
        (Current).first_file = YYRHSLOC(Rhs, 0).last_file;   \
        (Current).first_line = YYRHSLOC(Rhs, 0).last_line;   \
        (Current).last_file = YYRHSLOC(Rhs, 0).last_file;    \
        (Current).last_line = YYRHSLOC(Rhs, 0).last_line;    \
      }                                                      \
  } while (0)

#define VERTEX_ONLY(S, L) {  \
    if (context->shaderType != GL_VERTEX_SHADER) {  \
        context->error(L, " supported in vertex shaders only ", S);  \
        context->recover();  \
    }  \
}

#define FRAG_ONLY(S, L) {  \
    if (context->shaderType != GL_FRAGMENT_SHADER) {  \
        context->error(L, " supported in fragment shaders only ", S);  \
        context->recover();  \
    }  \
}

#define ES2_ONLY(S, L) {  \
    if (context->shaderVersion != 100) {  \
        context->error(L, " supported in GLSL ES 1.00 only ", S);  \
        context->recover();  \
    }  \
}

#define ES3_ONLY(TOKEN, LINE, REASON) {  \
    if (context->shaderVersion != 300) {  \
        context->error(LINE, REASON " supported in GLSL ES 3.00 only ", TOKEN);  \
        context->recover();  \
    }  \
}



#ifdef short
# undef short
#endif

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif

#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif

#ifndef YY_ATTRIBUTE
# if (defined __GNUC__                                               \
      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
# else
#  define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif

#ifndef YY_ATTRIBUTE_PURE
# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif

#if !defined _Noreturn \
     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
# if defined _MSC_VER && 1200 <= _MSC_VER
#  define _Noreturn __declspec (noreturn)
# else
#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif

#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
    _Pragma ("GCC diagnostic push") \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif


#if ! defined yyoverflow || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
#     ifndef EXIT_SUCCESS
#      define EXIT_SUCCESS 0
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's 'empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */


#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
             && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yytype_int16 yyss_alloc;
  YYSTYPE yyvs_alloc;
  YYLTYPE yyls_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
      + 2 * YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    do                                                                  \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYSIZE_T yyi;                         \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  114
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   2308

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  128
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  94
/* YYNRULES -- Number of rules.  */
#define YYNRULES  269
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  405

/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
   by yylex, with out-of-bounds checking.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   382

#define YYTRANSLATE(YYX)                                                \
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, without out-of-bounds checking.  */
static const yytype_uint8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
     125,   126,   127
};

#if YYDEBUG
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
       0,   209,   209,   210,   213,   237,   240,   245,   250,   255,
     260,   266,   269,   272,   275,   278,   281,   287,   295,   406,
     409,   417,   420,   426,   430,   437,   443,   452,   460,   463,
     473,   476,   479,   482,   492,   493,   494,   495,   503,   504,
     507,   510,   517,   518,   521,   527,   528,   532,   539,   540,
     543,   546,   549,   555,   556,   559,   565,   566,   573,   574,
     581,   582,   589,   590,   596,   597,   603,   604,   610,   611,
     628,   629,   642,   643,   644,   645,   649,   650,   651,   655,
     659,   663,   667,   674,   677,   688,   696,   704,   731,   737,
     748,   752,   756,   760,   767,   823,   826,   833,   841,   862,
     883,   893,   921,   926,   936,   941,   951,   954,   957,   960,
     966,   973,   976,   980,   984,   988,   995,   999,  1003,  1010,
    1014,  1018,  1025,  1034,  1040,  1043,  1049,  1055,  1062,  1071,
    1080,  1088,  1091,  1098,  1102,  1109,  1112,  1116,  1120,  1129,
    1138,  1146,  1156,  1168,  1171,  1174,  1180,  1187,  1190,  1196,
    1199,  1202,  1208,  1211,  1226,  1230,  1234,  1238,  1242,  1246,
    1251,  1256,  1261,  1266,  1271,  1276,  1281,  1286,  1291,  1296,
    1301,  1306,  1311,  1316,  1321,  1326,  1331,  1336,  1341,  1346,
    1351,  1355,  1359,  1363,  1367,  1371,  1375,  1379,  1383,  1387,
    1391,  1395,  1399,  1403,  1407,  1411,  1419,  1427,  1431,  1444,
    1444,  1447,  1447,  1453,  1456,  1472,  1475,  1484,  1488,  1494,
    1501,  1516,  1520,  1524,  1525,  1531,  1532,  1533,  1534,  1535,
    1536,  1537,  1541,  1542,  1542,  1542,  1552,  1553,  1557,  1557,
    1558,  1558,  1563,  1566,  1576,  1579,  1585,  1586,  1590,  1598,
    1602,  1609,  1609,  1616,  1619,  1626,  1631,  1648,  1648,  1653,
    1653,  1660,  1660,  1668,  1671,  1677,  1680,  1686,  1690,  1697,
    1700,  1703,  1706,  1709,  1718,  1722,  1729,  1732,  1738,  1738
};
#endif

#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "INVARIANT", "HIGH_PRECISION",
  "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "ATTRIBUTE",
  "CONST_QUAL", "BOOL_TYPE", "FLOAT_TYPE", "INT_TYPE", "UINT_TYPE",
  "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN",
  "SWITCH", "CASE", "DEFAULT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3",
  "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2",
  "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
  "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2",
  "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT",
  "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES",
  "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D",
  "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D",
  "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT",
  "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT",
  "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
  "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
  "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
  "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
  "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
  "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
  "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
  "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
  "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
  "AMPERSAND", "QUESTION", "$accept", "identifier", "variable_identifier",
  "primary_expression", "postfix_expression", "integer_expression",
  "function_call", "function_call_or_method", "function_call_generic",
  "function_call_header_no_parameters",
  "function_call_header_with_parameters", "function_call_header",
  "function_identifier", "unary_expression", "unary_operator",
  "multiplicative_expression", "additive_expression", "shift_expression",
  "relational_expression", "equality_expression", "and_expression",
  "exclusive_or_expression", "inclusive_or_expression",
  "logical_and_expression", "logical_xor_expression",
  "logical_or_expression", "conditional_expression",
  "assignment_expression", "assignment_operator", "expression",
  "constant_expression", "enter_struct", "declaration",
  "function_prototype", "function_declarator",
  "function_header_with_parameters", "function_header",
  "parameter_declarator", "parameter_declaration", "parameter_qualifier",
  "parameter_type_specifier", "init_declarator_list", "single_declaration",
  "fully_specified_type", "interpolation_qualifier",
  "parameter_type_qualifier", "type_qualifier", "storage_qualifier",
  "type_specifier", "precision_qualifier", "layout_qualifier",
  "layout_qualifier_id_list", "layout_qualifier_id",
  "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
  "$@1", "$@2", "struct_declaration_list", "struct_declaration",
  "struct_declarator_list", "struct_declarator", "initializer",
  "declaration_statement", "statement", "simple_statement",
  "compound_statement", "$@3", "$@4", "statement_no_new_scope",
  "statement_with_scope", "$@5", "$@6", "compound_statement_no_new_scope",
  "statement_list", "expression_statement", "selection_statement",
  "selection_rest_statement", "switch_statement", "$@7", "case_label",
  "condition", "iteration_statement", "$@8", "$@9", "$@10",
  "for_init_statement", "conditionopt", "for_rest_statement",
  "jump_statement", "translation_unit", "external_declaration",
  "function_definition", "$@11", YY_NULLPTR
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
   (internal) symbol number NUM (which must be that of a token).  */
static const yytype_uint16 yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
     365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
     375,   376,   377,   378,   379,   380,   381,   382
};
# endif

#define YYPACT_NINF -334

#define yypact_value_is_default(Yystate) \
  (!!((Yystate) == (-334)))

#define YYTABLE_NINF -229

#define yytable_value_is_error(Yytable_value) \
  0

  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
     STATE-NUM.  */
static const yytype_int16 yypact[] =
{
    1946,   -28,  -334,  -334,  -334,   183,  -334,  -334,  -334,  -334,
    -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,
    -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,
    -334,  -334,  -334,  -334,  -334,  -334,  -334,    91,  -334,  -334,
     -40,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,
    -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,   -90,
    -334,  -334,   -88,   -62,   -64,    10,     5,  -334,   105,    14,
    1161,  -334,  -334,  2231,    14,  -334,   -12,  -334,  1871,  -334,
    -334,  -334,  -334,  2231,  -334,  -334,  -334,  -334,  -334,    -5,
      48,  -334,    33,  -334,    55,  -334,  -334,  -334,  -334,  -334,
    2095,   150,   108,  -334,    73,   -34,  -334,    93,  -334,  2021,
    -334,  -334,  -334,  1424,  -334,  -334,    85,  2021,  -334,    92,
      -4,  -334,   389,  -334,  -334,  -334,  -334,   108,  2095,   -21,
    -334,   260,  1424,  -334,   163,  2095,   108,  1616,  -334,   125,
    -334,  -334,  -334,  -334,  1424,  1424,  1424,  -334,  -334,  -334,
    -334,  -334,  -334,    19,  -334,  -334,  -334,   104,    -3,  1519,
     127,  -334,  1424,    74,   -32,   120,   -48,   121,   107,   115,
     117,   152,   151,   -71,  -334,   138,  -334,  -334,  1701,  2021,
     144,  -334,    48,   133,   134,  -334,   145,   146,   137,  1231,
     154,  1424,   143,   155,   147,  -334,  -334,   119,  -334,  -334,
      29,  -334,   -88,    17,  -334,  -334,  -334,  -334,   505,  -334,
    -334,  -334,  -334,  -334,  -334,   156,  -334,  -334,  1326,  1424,
    -334,   153,  -334,  -334,   108,   157,    60,  -334,   -56,  -334,
    -334,  -334,     1,  -334,  -334,  1424,  2163,  -334,  -334,  1424,
     161,  -334,  -334,  -334,  1424,  1424,  1424,  1424,  1424,  1424,
    1424,  1424,  1424,  1424,  1424,  1424,  1424,  1424,  1424,  1424,
    1424,  1424,  1424,  1424,  -334,  -334,  1786,  -334,  -334,  -334,
    -334,  -334,   159,  -334,  1424,  -334,  -334,    61,  1424,   149,
    -334,  -334,  -334,   621,  -334,  -334,  -334,  -334,  -334,  -334,
    -334,  -334,  -334,  -334,  -334,  1424,  1424,  -334,  -334,  -334,
    1424,  -334,   162,  -334,  -334,    62,  1424,   108,  -334,   -25,
    -334,  -334,   167,   164,   125,   172,  -334,  -334,  -334,  -334,
    -334,  -334,    74,    74,   -32,   -32,   120,   120,   120,   120,
     -48,   -48,   121,   107,   115,   117,   152,   151,   114,  -334,
     221,    33,   853,   969,    15,  -334,    25,  -334,  1066,   621,
    -334,  -334,   171,  -334,  -334,   173,  -334,  1424,  -334,  -334,
    1424,   175,  -334,  -334,  -334,  -334,  1066,   159,  -334,   164,
     108,  2095,   176,   191,  -334,  -334,   177,  -334,  1424,  -334,
     168,   196,   285,  -334,   203,   199,   737,  -334,   190,    28,
    1424,   737,   159,  -334,  1424,  -334,  -334,  -334,  -334,   202,
     164,  -334,  -334,  -334,  -334
};

  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
     Performed when YYTABLE does not specify something else to do.  Zero
     means the default is an error.  */
static const yytype_uint16 yydefact[] =
{
       0,     0,   143,   144,   145,     0,   127,   135,   158,   155,
     156,   157,   162,   163,   164,   165,   166,   167,   159,   160,
     161,   168,   169,   170,   171,   172,   173,   136,   137,   140,
     128,   174,   175,   176,   177,   178,   179,     0,   125,   124,
       0,   154,   180,   182,   195,   196,   183,   184,   185,   186,
     187,   188,   189,   190,   191,   181,   192,   193,   194,     0,
     198,   267,   268,     0,    96,   106,     0,   111,   116,   132,
       0,   130,   122,     0,   133,   141,   152,   197,     0,   264,
     266,   129,   121,     0,   138,   139,     2,     3,   201,     0,
       0,    87,     0,    94,   106,   126,   107,   108,   109,    97,
       0,   106,     0,    88,     2,   117,   131,     0,    93,     0,
     123,   142,   134,     0,     1,   265,     0,     0,   199,   149,
       0,   147,     0,   269,    98,   103,   105,   110,     0,   112,
      99,     0,     0,    86,     0,     0,     0,     0,   203,     4,
       8,     6,     7,     9,     0,     0,     0,    36,    35,    37,
      34,     5,    11,    30,    13,    18,    19,     0,     0,    24,
       0,    38,     0,    42,    45,    48,    53,    56,    58,    60,
      62,    64,    66,    68,    85,     0,    28,    89,     0,     0,
       0,   146,     0,     0,     0,   249,     0,     0,     0,     0,
       0,     0,     0,     0,   223,   232,   236,    38,    70,    83,
       0,   212,     0,   152,   215,   234,   214,   213,     0,   216,
     217,   218,   219,   220,   221,   100,   102,   104,     0,     0,
     118,     0,   211,   120,     0,   209,     0,   207,     0,   204,
      31,    32,     0,    15,    16,     0,     0,    22,    21,     0,
      23,    25,    27,    33,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   153,   202,     0,   150,   151,   148,
     260,   259,   230,   251,     0,   263,   261,     0,     0,     0,
     244,   247,   222,     0,    73,    74,    76,    75,    78,    79,
      80,    81,    82,    77,    72,     0,     0,   237,   233,   235,
       0,   113,     0,   115,   119,     0,     0,     0,   205,     0,
      90,    10,     0,    17,     2,     3,    14,    20,    26,    39,
      40,    41,    44,    43,    46,    47,    51,    52,    49,    50,
      54,    55,    57,    59,    61,    63,    65,    67,     0,   200,
       0,     0,     0,     0,     0,   262,     0,   243,     0,   224,
      71,    84,     0,   114,   206,     0,   208,     0,    91,    12,
       0,     0,   229,   231,   254,   253,   256,   230,   241,   245,
       0,     0,     0,     0,   101,   210,     0,    69,     0,   255,
       0,     0,   240,   238,     0,     0,     0,   225,     0,     0,
     257,     0,   230,   242,     0,   227,   248,   226,    92,     0,
     258,   252,   239,   246,   250
};

  /* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -334,   -39,  -334,  -334,  -334,  -334,  -334,  -334,    77,  -334,
    -334,  -334,  -334,  -100,  -334,   -20,   -14,   -86,   -17,    78,
      86,    88,    90,    94,    89,  -334,  -104,  -126,  -334,  -136,
    -120,  -334,     4,    12,  -334,  -334,  -334,   224,   259,   253,
     228,  -334,  -334,  -324,  -334,  -334,  -102,   -44,   -68,   352,
    -334,  -334,   178,   -45,     0,  -334,  -334,  -334,   -99,  -132,
     135,    51,  -211,    18,  -186,  -325,   -22,  -334,  -334,   -26,
    -333,  -334,  -334,   -89,    80,    26,  -334,  -334,  -334,  -334,
    -334,     2,  -334,  -334,  -334,  -334,  -334,  -334,  -334,  -334,
    -334,   292,  -334,  -334
};

  /* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
      -1,   225,   151,   152,   153,   312,   154,   155,   156,   157,
     158,   159,   160,   197,   162,   163,   164,   165,   166,   167,
     168,   169,   170,   171,   172,   173,   198,   199,   295,   200,
     175,   109,   201,   202,    63,    64,    65,   125,    99,   100,
     126,    66,    67,    68,    69,   101,    70,    71,    72,    73,
      74,   120,   121,    75,   176,    77,   179,   117,   137,   138,
     226,   227,   223,   204,   205,   206,   207,   283,   373,   396,
     340,   341,   342,   397,   208,   209,   210,   383,   211,   384,
     212,   372,   213,   348,   272,   343,   366,   380,   381,   214,
      78,    79,    80,    92
};

  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
     positive, shift that token.  If negative, reduce the rule whose
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
static const yytype_int16 yytable[] =
{
      76,    89,   110,   123,    61,   229,   222,   135,   303,   174,
     232,   221,    62,   161,    90,   135,    81,   363,   178,    95,
     309,   262,   299,     7,   370,   106,    91,   174,   111,   105,
     112,   161,   127,   241,   382,   135,    86,    87,   116,   251,
     252,   136,   370,    93,   230,   231,   229,    94,    82,   136,
      96,    97,    98,   277,    27,    28,   263,    29,   310,   402,
     127,   395,   243,   129,    95,    37,   395,   224,    88,   136,
      76,   279,   131,    76,   253,   254,   135,   135,    76,   132,
     266,   357,    61,    76,   247,   218,   248,   174,   215,   358,
      62,   161,   219,   222,   113,    96,    97,    98,   302,   313,
      76,   181,   238,   118,   233,   234,   311,   182,   239,    76,
     136,   136,   296,   318,   174,   -95,   102,    76,   161,   103,
     367,   -28,   203,   113,   119,   235,   296,   338,    76,   236,
     368,    84,    85,   399,   229,    76,   296,    76,   344,   296,
     296,   122,   346,   297,   319,   320,   321,   161,   161,   161,
     161,   161,   161,   161,   161,   161,   161,   161,   161,   161,
     161,   161,   161,   299,   135,   326,   327,   328,   329,   350,
     351,   307,   296,   307,   308,   345,   354,   130,    76,    76,
     352,   104,    87,   403,    86,    87,   355,     2,     3,     4,
      96,    97,    98,   244,   245,   246,   174,   316,   136,   177,
     161,   133,   174,   249,   250,   180,   161,    81,   203,   237,
     255,   256,   369,   284,   285,   286,   287,   288,   289,   290,
     291,   292,   293,   267,   268,   296,   360,   322,   323,   -29,
     369,   242,   294,   257,   377,   324,   325,   376,   330,   331,
     258,   259,   389,   260,   261,   264,   371,   270,   271,   273,
     274,   275,   362,   174,   400,   280,   282,   161,   278,   281,
     304,   347,   300,   306,   371,  -154,    76,  -228,   222,   353,
       8,     9,    10,    11,   359,   296,  -198,   361,   374,   378,
     375,   386,   390,   203,   388,    12,    13,    14,    15,    16,
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
     387,   391,   392,   110,   398,    31,    32,    33,    34,    35,
      36,   194,   394,   317,    40,    41,   404,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,   385,    56,    57,    58,   332,   139,    60,   140,   141,
     142,   143,   203,   203,   333,   144,   145,   334,   203,   203,
     335,   337,   216,   124,   128,   336,   217,    83,   356,   305,
     269,   364,   393,   349,   146,   401,   203,   220,   379,   365,
     115,    76,     0,     0,     0,   147,   148,   149,   150,     0,
       0,     0,     0,     0,     0,     0,   203,     0,     0,     0,
       0,   203,     1,     2,     3,     4,     5,     6,     7,     8,
       9,    10,    11,   183,   184,   185,     0,   186,   187,   188,
     189,   190,   191,   192,    12,    13,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
      28,     0,    29,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,    40,    41,   193,    42,    43,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
       0,    56,    57,    58,    59,   139,    60,   140,   141,   142,
     143,     0,     0,     0,   144,   145,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   146,     0,     0,     0,   194,   195,     0,
       0,     0,     0,   196,   147,   148,   149,   150,     1,     2,
       3,     4,     5,     6,     7,     8,     9,    10,    11,   183,
     184,   185,     0,   186,   187,   188,   189,   190,   191,   192,
      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,    26,    27,    28,     0,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
      41,   193,    42,    43,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    55,     0,    56,    57,    58,
      59,   139,    60,   140,   141,   142,   143,     0,     0,     0,
     144,   145,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   146,
       0,     0,     0,   194,   298,     0,     0,     0,     0,   196,
     147,   148,   149,   150,     1,     2,     3,     4,     5,     6,
       7,     8,     9,    10,    11,   183,   184,   185,     0,   186,
     187,   188,   189,   190,   191,   192,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    28,     0,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,   193,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,    59,   139,    60,   140,
     141,   142,   143,     0,     0,     0,   144,   145,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   146,     0,     0,     0,   194,
       0,     0,     0,     0,     0,   196,   147,   148,   149,   150,
       1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
      11,   183,   184,   185,     0,   186,   187,   188,   189,   190,
     191,   192,    12,    13,    14,    15,    16,    17,    18,    19,
      20,    21,    22,    23,    24,    25,    26,    27,    28,     0,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,   193,    42,    43,    44,    45,    46,    47,
      48,    49,    50,    51,    52,    53,    54,    55,     0,    56,
      57,    58,    59,   139,    60,   140,   141,   142,   143,     0,
       0,     0,   144,   145,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   146,     0,     0,     0,   122,     0,     0,     0,     0,
       0,   196,   147,   148,   149,   150,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,   183,   184,   185,
       0,   186,   187,   188,   189,   190,   191,   192,    12,    13,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    28,     0,    29,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,    40,    41,   193,
      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
      52,    53,    54,    55,     0,    56,    57,    58,    59,   139,
      60,   140,   141,   142,   143,     0,     0,     0,   144,   145,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   146,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   196,   147,   148,
     149,   150,     1,     2,     3,     4,     5,     6,     7,     8,
       9,    10,    11,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    12,    13,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
      28,     0,    29,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,    40,    41,     0,    42,    43,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
       0,    56,    57,    58,    59,   139,    60,   140,   141,   142,
     143,     0,     0,     0,   144,   145,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   134,
       2,     3,     4,   146,     6,     7,     8,     9,    10,    11,
       0,     0,     0,   196,   147,   148,   149,   150,     0,     0,
       0,    12,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    28,     0,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
      40,    41,     0,    42,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
      58,    59,   139,    60,   140,   141,   142,   143,     0,     0,
       0,   144,   145,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     2,     3,     4,     0,     0,
     146,     8,     9,    10,    11,     0,     0,     0,     0,     0,
       0,   147,   148,   149,   150,     0,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,     0,     0,     0,     0,     0,    31,    32,    33,    34,
      35,    36,     0,     0,     0,    40,    41,     0,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,     0,   107,    60,     0,
       0,     8,     9,    10,    11,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,     0,     0,     0,     0,   108,    31,    32,    33,    34,
      35,    36,     0,     0,     0,    40,    41,     0,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,     0,   139,    60,   140,
     141,   142,   143,     0,     0,     0,   144,   145,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   146,     8,     9,    10,    11,
       0,     0,     0,     0,     0,   276,   147,   148,   149,   150,
       0,    12,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,     0,     0,     0,     0,
       0,    31,    32,    33,    34,    35,    36,     0,     0,     0,
      40,    41,     0,    42,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
      58,     0,   139,    60,   140,   141,   142,   143,     0,     0,
       0,   144,   145,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     146,     0,     0,   301,     8,     9,    10,    11,     0,     0,
       0,   147,   148,   149,   150,     0,     0,     0,     0,    12,
      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,    26,     0,     0,     0,     0,     0,    31,
      32,    33,    34,    35,    36,     0,     0,     0,    40,    41,
       0,    42,    43,    44,    45,    46,    47,    48,    49,    50,
      51,    52,    53,    54,    55,     0,    56,    57,    58,     0,
     139,    60,   140,   141,   142,   143,     0,     0,     0,   144,
     145,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   146,     8,
       9,    10,    11,     0,     0,     0,     0,     0,     0,   147,
     148,   149,   150,     0,    12,    13,    14,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    25,    26,     0,
       0,     0,     0,     0,    31,    32,    33,    34,    35,    36,
       0,     0,     0,    40,   240,     0,    42,    43,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
       0,    56,    57,    58,     0,   139,    60,   140,   141,   142,
     143,     0,     0,     0,   144,   145,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   134,
       2,     3,     4,   146,     6,     7,     8,     9,    10,    11,
       0,     0,     0,     0,   147,   148,   149,   150,     0,     0,
       0,    12,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    28,     0,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
      40,    41,     0,    42,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
      58,    59,     0,    60,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   134,     2,     3,     4,     0,     6,
       7,     8,     9,    10,    11,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   228,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    28,     0,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,     0,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,    59,     0,    60,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   134,
       2,     3,     4,     0,     6,     7,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     265,    12,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    28,     0,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
      40,    41,     0,    42,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
      58,    59,     0,    60,     0,     0,     0,     0,     0,     0,
       0,   114,     0,     0,     1,     2,     3,     4,     5,     6,
       7,     8,     9,    10,    11,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   339,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    28,     0,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,     0,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,    59,     0,    60,     1,
       2,     3,     4,     5,     6,     7,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    12,    13,    14,    15,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    28,     0,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
      40,    41,     0,    42,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,     0,    56,    57,
      58,    59,     0,    60,   134,     2,     3,     4,     0,     6,
       7,     8,     9,    10,    11,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    28,     0,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,     0,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,    59,     0,    60,     2,
       3,     4,     0,     0,     0,     8,     9,    10,    11,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,    26,     0,     0,     0,     0,     0,
      31,    32,    33,    34,    35,    36,     0,     0,     0,    40,
      41,     0,    42,    43,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    55,     0,    56,    57,    58,
       0,     0,    60,     8,     9,    10,    11,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    12,    13,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,     0,     0,     0,     0,     0,    31,    32,
      33,    34,    35,    36,     0,     0,     0,    40,    41,     0,
      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
      52,    53,    54,    55,     0,    56,    57,    58,     0,   314,
     315,     8,     9,    10,    11,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,     0,     0,     0,     0,     0,    31,    32,    33,    34,
      35,    36,     0,     0,     0,    40,    41,     0,    42,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,     0,    56,    57,    58,     0,     0,    60
};

static const yytype_int16 yycheck[] =
{
       0,    40,    70,    92,     0,   137,   132,   109,   219,   113,
     146,   131,     0,   113,   104,   117,    44,   342,   117,     9,
      76,    92,   208,     9,   348,    69,   114,   131,    73,    68,
      74,   131,   100,   159,   367,   137,    76,    77,    83,    87,
      88,   109,   366,   105,   144,   145,   178,   111,    76,   117,
      40,    41,    42,   189,    40,    41,   127,    43,   114,   392,
     128,   386,   162,   102,     9,    51,   391,   135,   108,   137,
      70,   191,   106,    73,   122,   123,   178,   179,    78,   113,
     179,   106,    78,    83,   116,   106,   118,   191,   127,   114,
      78,   191,   113,   219,   106,    40,    41,    42,   218,   235,
     100,   105,   105,   108,    85,    86,   105,   111,   111,   109,
     178,   179,   111,   239,   218,   105,   111,   117,   218,   114,
     105,   104,   122,   106,    76,   106,   111,   263,   128,   110,
     105,    40,    41,   105,   266,   135,   111,   137,   274,   111,
     111,   108,   278,   114,   244,   245,   246,   247,   248,   249,
     250,   251,   252,   253,   254,   255,   256,   257,   258,   259,
     260,   261,   262,   349,   266,   251,   252,   253,   254,   295,
     296,   111,   111,   111,   114,   114,   114,   104,   178,   179,
     300,    76,    77,   394,    76,    77,   306,     4,     5,     6,
      40,    41,    42,   119,   120,   121,   300,   236,   266,   114,
     300,   108,   306,    83,    84,   113,   306,    44,   208,   105,
      89,    90,   348,    94,    95,    96,    97,    98,    99,   100,
     101,   102,   103,    79,    80,   111,   112,   247,   248,   104,
     366,   104,   113,   126,   360,   249,   250,   357,   255,   256,
     125,   124,   378,    91,    93,   107,   348,   114,   114,   104,
     104,   114,   341,   357,   390,   112,   109,   357,   104,   104,
     107,   112,   106,   106,   366,   104,   266,   108,   394,   107,
      10,    11,    12,    13,   107,   111,   104,    56,   107,   104,
     107,   105,   114,   283,   107,    25,    26,    27,    28,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
     109,   105,    17,   371,   114,    45,    46,    47,    48,    49,
      50,   108,   113,   236,    54,    55,   114,    57,    58,    59,
      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
      70,   370,    72,    73,    74,   257,    76,    77,    78,    79,
      80,    81,   342,   343,   258,    85,    86,   259,   348,   349,
     260,   262,   128,    94,   101,   261,   128,     5,   307,   224,
     182,   343,   384,   283,   104,   391,   366,   107,   366,   343,
      78,   371,    -1,    -1,    -1,   115,   116,   117,   118,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   386,    -1,    -1,    -1,
      -1,   391,     3,     4,     5,     6,     7,     8,     9,    10,
      11,    12,    13,    14,    15,    16,    -1,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
      41,    -1,    43,    44,    45,    46,    47,    48,    49,    50,
      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
      -1,    72,    73,    74,    75,    76,    77,    78,    79,    80,
      81,    -1,    -1,    -1,    85,    86,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   104,    -1,    -1,    -1,   108,   109,    -1,
      -1,    -1,    -1,   114,   115,   116,   117,   118,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    -1,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    -1,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    -1,    -1,    -1,
      85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,
      -1,    -1,    -1,   108,   109,    -1,    -1,    -1,    -1,   114,
     115,   116,   117,   118,     3,     4,     5,     6,     7,     8,
       9,    10,    11,    12,    13,    14,    15,    16,    -1,    18,
      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    -1,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    75,    76,    77,    78,
      79,    80,    81,    -1,    -1,    -1,    85,    86,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,   108,
      -1,    -1,    -1,    -1,    -1,   114,   115,   116,   117,   118,
       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
      13,    14,    15,    16,    -1,    18,    19,    20,    21,    22,
      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,    40,    41,    -1,
      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
      73,    74,    75,    76,    77,    78,    79,    80,    81,    -1,
      -1,    -1,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   104,    -1,    -1,    -1,   108,    -1,    -1,    -1,    -1,
      -1,   114,   115,   116,   117,   118,     3,     4,     5,     6,
       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
      -1,    18,    19,    20,    21,    22,    23,    24,    25,    26,
      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,    40,    41,    -1,    43,    44,    45,    46,
      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
      67,    68,    69,    70,    -1,    72,    73,    74,    75,    76,
      77,    78,    79,    80,    81,    -1,    -1,    -1,    85,    86,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   114,   115,   116,
     117,   118,     3,     4,     5,     6,     7,     8,     9,    10,
      11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    25,    26,    27,    28,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
      41,    -1,    43,    44,    45,    46,    47,    48,    49,    50,
      51,    52,    53,    54,    55,    -1,    57,    58,    59,    60,
      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
      -1,    72,    73,    74,    75,    76,    77,    78,    79,    80,
      81,    -1,    -1,    -1,    85,    86,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,     6,   104,     8,     9,    10,    11,    12,    13,
      -1,    -1,    -1,   114,   115,   116,   117,   118,    -1,    -1,
      -1,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    -1,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    -1,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
      74,    75,    76,    77,    78,    79,    80,    81,    -1,    -1,
      -1,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,     4,     5,     6,    -1,    -1,
     104,    10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,
      -1,   115,   116,   117,   118,    -1,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,
      49,    50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    -1,    76,    77,    -1,
      -1,    10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    -1,    -1,    -1,    -1,   114,    45,    46,    47,    48,
      49,    50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    -1,    76,    77,    78,
      79,    80,    81,    -1,    -1,    -1,    85,    86,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   104,    10,    11,    12,    13,
      -1,    -1,    -1,    -1,    -1,   114,   115,   116,   117,   118,
      -1,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,
      -1,    45,    46,    47,    48,    49,    50,    -1,    -1,    -1,
      54,    55,    -1,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
      74,    -1,    76,    77,    78,    79,    80,    81,    -1,    -1,
      -1,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     104,    -1,    -1,   107,    10,    11,    12,    13,    -1,    -1,
      -1,   115,   116,   117,   118,    -1,    -1,    -1,    -1,    25,
      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,    -1,    -1,    -1,    -1,    -1,    45,
      46,    47,    48,    49,    50,    -1,    -1,    -1,    54,    55,
      -1,    57,    58,    59,    60,    61,    62,    63,    64,    65,
      66,    67,    68,    69,    70,    -1,    72,    73,    74,    -1,
      76,    77,    78,    79,    80,    81,    -1,    -1,    -1,    85,
      86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,    10,
      11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,   115,
     116,   117,   118,    -1,    25,    26,    27,    28,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,    -1,
      -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
      -1,    -1,    -1,    54,    55,    -1,    57,    58,    59,    60,
      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
      -1,    72,    73,    74,    -1,    76,    77,    78,    79,    80,
      81,    -1,    -1,    -1,    85,    86,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,     6,   104,     8,     9,    10,    11,    12,    13,
      -1,    -1,    -1,    -1,   115,   116,   117,   118,    -1,    -1,
      -1,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    -1,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    -1,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
      74,    75,    -1,    77,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,     3,     4,     5,     6,    -1,     8,
       9,    10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   109,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    -1,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,    -1,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    75,    -1,    77,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,     6,    -1,     8,     9,    10,    11,    12,    13,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     109,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    -1,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    -1,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
      74,    75,    -1,    77,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,     0,    -1,    -1,     3,     4,     5,     6,     7,     8,
       9,    10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   109,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    -1,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,    -1,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    75,    -1,    77,     3,
       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    -1,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    -1,    57,    58,    59,    60,    61,    62,    63,
      64,    65,    66,    67,    68,    69,    70,    -1,    72,    73,
      74,    75,    -1,    77,     3,     4,     5,     6,    -1,     8,
       9,    10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    -1,    43,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,    -1,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    75,    -1,    77,     4,
       5,     6,    -1,    -1,    -1,    10,    11,    12,    13,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,    -1,
      45,    46,    47,    48,    49,    50,    -1,    -1,    -1,    54,
      55,    -1,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    -1,    72,    73,    74,
      -1,    -1,    77,    10,    11,    12,    13,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    25,    26,
      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,
      47,    48,    49,    50,    -1,    -1,    -1,    54,    55,    -1,
      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
      67,    68,    69,    70,    -1,    72,    73,    74,    -1,    76,
      77,    10,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,
      49,    50,    -1,    -1,    -1,    54,    55,    -1,    57,    58,
      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
      69,    70,    -1,    72,    73,    74,    -1,    -1,    77
};

  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
     symbol of state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
      12,    13,    25,    26,    27,    28,    29,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,    40,    41,    43,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    72,    73,    74,    75,
      77,   160,   161,   162,   163,   164,   169,   170,   171,   172,
     174,   175,   176,   177,   178,   181,   182,   183,   218,   219,
     220,    44,    76,   177,    40,    41,    76,    77,   108,   129,
     104,   114,   221,   105,   111,     9,    40,    41,    42,   166,
     167,   173,   111,   114,    76,   129,   175,    76,   114,   159,
     176,   181,   175,   106,     0,   219,   181,   185,   108,    76,
     179,   180,   108,   201,   166,   165,   168,   176,   167,   129,
     104,   106,   113,   108,     3,   174,   176,   186,   187,    76,
      78,    79,    80,    81,    85,    86,   104,   115,   116,   117,
     118,   130,   131,   132,   134,   135,   136,   137,   138,   139,
     140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
     150,   151,   152,   153,   154,   158,   182,   114,   186,   184,
     113,   105,   111,    14,    15,    16,    18,    19,    20,    21,
      22,    23,    24,    56,   108,   109,   114,   141,   154,   155,
     157,   160,   161,   182,   191,   192,   193,   194,   202,   203,
     204,   206,   208,   210,   217,   129,   165,   168,   106,   113,
     107,   158,   155,   190,   176,   129,   188,   189,   109,   187,
     141,   141,   157,    85,    86,   106,   110,   105,   105,   111,
      55,   155,   104,   141,   119,   120,   121,   116,   118,    83,
      84,    87,    88,   122,   123,    89,    90,   126,   125,   124,
      91,    93,    92,   127,   107,   109,   186,    79,    80,   180,
     114,   114,   212,   104,   104,   114,   114,   157,   104,   158,
     112,   104,   109,   195,    94,    95,    96,    97,    98,    99,
     100,   101,   102,   103,   113,   156,   111,   114,   109,   192,
     106,   107,   158,   190,   107,   188,   106,   111,   114,    76,
     114,   105,   133,   157,    76,    77,   129,   136,   155,   141,
     141,   141,   143,   143,   144,   144,   145,   145,   145,   145,
     146,   146,   147,   148,   149,   150,   151,   152,   157,   109,
     198,   199,   200,   213,   157,   114,   157,   112,   211,   202,
     155,   155,   158,   107,   114,   158,   189,   106,   114,   107,
     112,    56,   201,   193,   191,   203,   214,   105,   105,   157,
     171,   174,   209,   196,   107,   107,   158,   155,   104,   209,
     215,   216,   198,   205,   207,   129,   105,   109,   107,   157,
     114,   105,    17,   194,   113,   193,   197,   201,   114,   105,
     157,   197,   198,   190,   114
};

  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const yytype_uint8 yyr1[] =
{
       0,   128,   129,   129,   130,   131,   131,   131,   131,   131,
     131,   132,   132,   132,   132,   132,   132,   133,   134,   135,
     135,   136,   136,   137,   137,   138,   138,   139,   140,   140,
     141,   141,   141,   141,   142,   142,   142,   142,   143,   143,
     143,   143,   144,   144,   144,   145,   145,   145,   146,   146,
     146,   146,   146,   147,   147,   147,   148,   148,   149,   149,
     150,   150,   151,   151,   152,   152,   153,   153,   154,   154,
     155,   155,   156,   156,   156,   156,   156,   156,   156,   156,
     156,   156,   156,   157,   157,   158,   159,   160,   160,   160,
     160,   160,   160,   160,   161,   162,   162,   163,   163,   164,
     165,   165,   166,   166,   166,   166,   167,   167,   167,   167,
     168,   169,   169,   169,   169,   169,   170,   170,   170,   170,
     170,   170,   171,   171,   172,   172,   173,   174,   174,   174,
     174,   174,   174,   174,   174,   175,   175,   175,   175,   175,
     175,   176,   176,   177,   177,   177,   178,   179,   179,   180,
     180,   180,   181,   181,   182,   182,   182,   182,   182,   182,
     182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
     182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
     182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
     182,   182,   182,   182,   182,   182,   182,   182,   182,   184,
     183,   185,   183,   186,   186,   187,   187,   188,   188,   189,
     189,   190,   191,   192,   192,   193,   193,   193,   193,   193,
     193,   193,   194,   195,   196,   194,   197,   197,   199,   198,
     200,   198,   201,   201,   202,   202,   203,   203,   204,   205,
     205,   207,   206,   208,   208,   209,   209,   211,   210,   212,
     210,   213,   210,   214,   214,   215,   215,   216,   216,   217,
     217,   217,   217,   217,   218,   218,   219,   219,   221,   220
};

  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
static const yytype_uint8 yyr2[] =
{
       0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
       3,     1,     4,     1,     3,     2,     2,     1,     1,     1,
       3,     2,     2,     2,     1,     2,     3,     2,     1,     1,
       1,     2,     2,     2,     1,     1,     1,     1,     1,     3,
       3,     3,     1,     3,     3,     1,     3,     3,     1,     3,
       3,     3,     3,     1,     3,     3,     1,     3,     1,     3,
       1,     3,     1,     3,     1,     3,     1,     3,     1,     5,
       1,     3,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     3,     1,     2,     2,     2,     4,
       5,     6,     9,     2,     2,     1,     1,     2,     3,     3,
       2,     5,     3,     2,     3,     2,     0,     1,     1,     1,
       1,     1,     3,     5,     6,     5,     1,     2,     4,     5,
       4,     2,     1,     2,     1,     1,     1,     1,     1,     2,
       1,     2,     1,     1,     2,     1,     1,     1,     2,     2,
       1,     1,     2,     1,     1,     1,     4,     1,     3,     1,
       3,     3,     1,     4,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
       6,     0,     5,     1,     2,     3,     4,     1,     3,     1,
       4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     2,     0,     0,     5,     1,     1,     0,     2,
       0,     2,     2,     3,     1,     2,     1,     2,     5,     3,
       1,     0,     6,     3,     2,     1,     4,     0,     6,     0,
       8,     0,     7,     1,     1,     1,     0,     2,     3,     2,
       2,     2,     3,     2,     1,     2,     1,     1,     0,     3
};


#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)
#define YYEMPTY         (-2)
#define YYEOF           0

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab


#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                  \
do                                                              \
  if (yychar == YYEMPTY)                                        \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      YYPOPSTACK (yylen);                                       \
      yystate = *yyssp;                                         \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      yyerror (&yylloc, context, scanner, YY_("syntax error: cannot back up")); \
      YYERROR;                                                  \
    }                                                           \
while (0)

/* Error token number */
#define YYTERROR        1
#define YYERRCODE       256


/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
    do                                                                  \
      if (N)                                                            \
        {                                                               \
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).first_line   = (Current).last_line   =              \
            YYRHSLOC (Rhs, 0).last_line;                                \
          (Current).first_column = (Current).last_column =              \
            YYRHSLOC (Rhs, 0).last_column;                              \
        }                                                               \
    while (0)
#endif

#define YYRHSLOC(Rhs, K) ((Rhs)[K])


/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)


/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL

/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */

YY_ATTRIBUTE_UNUSED
static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
  unsigned res = 0;
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  if (0 <= yylocp->first_line)
    {
      res += YYFPRINTF (yyo, "%d", yylocp->first_line);
      if (0 <= yylocp->first_column)
        res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
    }
  if (0 <= yylocp->last_line)
    {
      if (yylocp->first_line < yylocp->last_line)
        {
          res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
          if (0 <= end_col)
            res += YYFPRINTF (yyo, ".%d", end_col);
        }
      else if (0 <= end_col && yylocp->first_column < end_col)
        res += YYFPRINTF (yyo, "-%d", end_col);
    }
  return res;
 }

#  define YY_LOCATION_PRINT(File, Loc)          \
  yy_location_print_ (File, &(Loc))

# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif


# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Type, Value, Location, context, scanner); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*----------------------------------------.
| Print this symbol's value on YYOUTPUT.  |
`----------------------------------------*/

static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void *scanner)
{
  FILE *yyo = yyoutput;
  YYUSE (yyo);
  YYUSE (yylocationp);
  YYUSE (context);
  YYUSE (scanner);
  if (!yyvaluep)
    return;
# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
  YYUSE (yytype);
}


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TParseContext* context, void *scanner)
{
  YYFPRINTF (yyoutput, "%s %s (",
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);

  YY_LOCATION_PRINT (yyoutput, *yylocationp);
  YYFPRINTF (yyoutput, ": ");
  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context, scanner);
  YYFPRINTF (yyoutput, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TParseContext* context, void *scanner)
{
  unsigned long int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       yystos[yyssp[yyi + 1 - yynrhs]],
                       &(yyvsp[(yyi + 1) - (yynrhs)])
                       , &(yylsp[(yyi + 1) - (yynrhs)])                       , context, scanner);
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, yylsp, Rule, context, scanner); \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif


#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined __GLIBC__ && defined _STRING_H
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
yystrlen (const char *yystr)
{
  YYSIZE_T yylen;
  for (yylen = 0; yystr[yylen]; yylen++)
    continue;
  return yylen;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
yystpcpy (char *yydest, const char *yysrc)
{
  char *yyd = yydest;
  const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
   quotes and backslashes, so that it's suitable for yyerror.  The
   heuristic is that double-quoting is unnecessary unless the string
   contains an apostrophe, a comma, or backslash (other than
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
   null, do not copy; instead, return the length of what the result
   would have been.  */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYSIZE_T yyn = 0;
      char const *yyp = yystr;

      for (;;)
        switch (*++yyp)
          {
          case '\'':
          case ',':
            goto do_not_strip_quotes;

          case '\\':
            if (*++yyp != '\\')
              goto do_not_strip_quotes;
            /* Fall through.  */
          default:
            if (yyres)
              yyres[yyn] = *yyp;
            yyn++;
            break;

          case '"':
            if (yyres)
              yyres[yyn] = '\0';
            return yyn;
          }
    do_not_strip_quotes: ;
    }

  if (! yyres)
    return yystrlen (yystr);

  return yystpcpy (yyres, yystr) - yyres;
}
# endif

/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
   about the unexpected token YYTOKEN for the state stack whose top is
   YYSSP.

   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
   not large enough to hold the message.  In that case, also set
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
   required number of bytes is too large to store.  */
static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
                yytype_int16 *yyssp, int yytoken)
{
  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
  YYSIZE_T yysize = yysize0;
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  /* Internationalized format string. */
  const char *yyformat = YY_NULLPTR;
  /* Arguments of yyformat. */
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  /* Number of reported tokens (one for the "unexpected", one per
     "expected"). */
  int yycount = 0;

  /* There are many possibilities here to consider:
     - If this state is a consistent state with a default action, then
       the only way this function was invoked is if the default action
       is an error action.  In that case, don't check for expected
       tokens because there are none.
     - The only way there can be no lookahead present (in yychar) is if
       this state is a consistent state with a default action.  Thus,
       detecting the absence of a lookahead is sufficient to determine
       that there is no unexpected or expected token to report.  In that
       case, just report a simple "syntax error".
     - Don't assume there isn't a lookahead just because this state is a
       consistent state with a default action.  There might have been a
       previous inconsistent state, consistent state with a non-default
       action, or user semantic action that manipulated yychar.
     - Of course, the expected token list depends on states to have
       correct lookahead information, and it depends on the parser not
       to perform extra reductions after fetching a lookahead from the
       scanner and before detecting a syntax error.  Thus, state merging
       (from LALR or IELR) and default reductions corrupt the expected
       token list.  However, the list is correct for canonical LR with
       one exception: it will still contain any token that will not be
       accepted due to an error action in a later state.
  */
  if (yytoken != YYEMPTY)
    {
      int yyn = yypact[*yyssp];
      yyarg[yycount++] = yytname[yytoken];
      if (!yypact_value_is_default (yyn))
        {
          /* Start YYX at -YYN if negative to avoid negative indexes in
             YYCHECK.  In other words, skip the first -YYN actions for
             this state because they are default actions.  */
          int yyxbegin = yyn < 0 ? -yyn : 0;
          /* Stay within bounds of both yycheck and yytname.  */
          int yychecklim = YYLAST - yyn + 1;
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
          int yyx;

          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
                && !yytable_value_is_error (yytable[yyx + yyn]))
              {
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
                  {
                    yycount = 1;
                    yysize = yysize0;
                    break;
                  }
                yyarg[yycount++] = yytname[yyx];
                {
                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
                  if (! (yysize <= yysize1
                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
                    return 2;
                  yysize = yysize1;
                }
              }
        }
    }

  switch (yycount)
    {
# define YYCASE_(N, S)                      \
      case N:                               \
        yyformat = S;                       \
      break
      YYCASE_(0, YY_("syntax error"));
      YYCASE_(1, YY_("syntax error, unexpected %s"));
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
    }

  {
    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
      return 2;
    yysize = yysize1;
  }

  if (*yymsg_alloc < yysize)
    {
      *yymsg_alloc = 2 * yysize;
      if (! (yysize <= *yymsg_alloc
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
      return 1;
    }

  /* Avoid sprintf, as that infringes on the user's name space.
     Don't have undefined behavior even if the translation
     produced a string with the wrong number of "%s"s.  */
  {
    char *yyp = *yymsg;
    int yyi = 0;
    while ((*yyp = *yyformat) != '\0')
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
        {
          yyp += yytnamerr (yyp, yyarg[yyi++]);
          yyformat += 2;
        }
      else
        {
          yyp++;
          yyformat++;
        }
  }
  return 0;
}
#endif /* YYERROR_VERBOSE */

/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TParseContext* context, void *scanner)
{
  YYUSE (yyvaluep);
  YYUSE (yylocationp);
  YYUSE (context);
  YYUSE (scanner);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YYUSE (yytype);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}




/*----------.
| yyparse.  |
`----------*/

int
yyparse (TParseContext* context, void *scanner)
{
/* The lookahead symbol.  */
int yychar;


/* The semantic value of the lookahead symbol.  */
/* Default value used for initialization, for pacifying older GCCs
   or non-GCC compilers.  */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);

/* Location data for the lookahead symbol.  */
static YYLTYPE yyloc_default
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  = { 1, 1, 1, 1 }
# endif
;
YYLTYPE yylloc = yyloc_default;

    /* Number of syntax errors so far.  */
    int yynerrs;

    int yystate;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus;

    /* The stacks and their tools:
       'yyss': related to states.
       'yyvs': related to semantic values.
       'yyls': related to locations.

       Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* The state stack.  */
    yytype_int16 yyssa[YYINITDEPTH];
    yytype_int16 *yyss;
    yytype_int16 *yyssp;

    /* The semantic value stack.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs;
    YYSTYPE *yyvsp;

    /* The location stack.  */
    YYLTYPE yylsa[YYINITDEPTH];
    YYLTYPE *yyls;
    YYLTYPE *yylsp;

    /* The locations where the error started and ended.  */
    YYLTYPE yyerror_range[3];

    YYSIZE_T yystacksize;

  int yyn;
  int yyresult;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
  YYLTYPE yyloc;

#if YYERROR_VERBOSE
  /* Buffer for error messages, and its allocated size.  */
  char yymsgbuf[128];
  char *yymsg = yymsgbuf;
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif

#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  yyssp = yyss = yyssa;
  yyvsp = yyvs = yyvsa;
  yylsp = yyls = yylsa;
  yystacksize = YYINITDEPTH;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY; /* Cause a token to be read.  */
  yylsp[0] = yylloc;
  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
        /* Give user a chance to reallocate the stack.  Use copies of
           these so that the &'s don't force the real ones into
           memory.  */
        YYSTYPE *yyvs1 = yyvs;
        yytype_int16 *yyss1 = yyss;
        YYLTYPE *yyls1 = yyls;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow (YY_("memory exhausted"),
                    &yyss1, yysize * sizeof (*yyssp),
                    &yyvs1, yysize * sizeof (*yyvsp),
                    &yyls1, yysize * sizeof (*yylsp),
                    &yystacksize);

        yyls = yyls1;
        yyss = yyss1;
        yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyexhaustedlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yytype_int16 *yyss1 = yyss;
        union yyalloc *yyptr =
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
        if (! yyptr)
          goto yyexhaustedlab;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
        YYSTACK_RELOCATE (yyls_alloc, yyls);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
      yylsp = yyls + yysize - 1;

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
                  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = yylex (&yylval, &yylloc, scanner);
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yytable_value_is_error (yyn))
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

  /* Discard the shifted token.  */
  yychar = YYEMPTY;

  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END
  *++yylsp = yylloc;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     '$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];

  /* Default location.  */
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 4:

    {
        // The symbol table search was done in the lexical phase
        const TVariable *variable = context->getNamedVariable((yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);

        if (variable->getType().getQualifier() == EvqConst)
        {
            ConstantUnion* constArray = variable->getConstPointer();
            TType t(variable->getType());
            (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(constArray, t, (yylsp[0]));
        }
        else
        {
            (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
                                                 variable->getName(),
                                                 variable->getType(),
                                                 (yylsp[0]));
        }

        // don't delete $1.string, it's used by error recovery, and the pool
        // pop will reclaim the memory
    }

    break;

  case 5:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 6:

    {
        ConstantUnion *unionArray = new ConstantUnion[1];
        unionArray->setIConst((yyvsp[0].lex).i);
        (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yylsp[0]));
    }

    break;

  case 7:

    {
        ConstantUnion *unionArray = new ConstantUnion[1];
        unionArray->setUConst((yyvsp[0].lex).u);
        (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtUInt, EbpUndefined, EvqConst), (yylsp[0]));
    }

    break;

  case 8:

    {
        ConstantUnion *unionArray = new ConstantUnion[1];
        unionArray->setFConst((yyvsp[0].lex).f);
        (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yylsp[0]));
    }

    break;

  case 9:

    {
        ConstantUnion *unionArray = new ConstantUnion[1];
        unionArray->setBConst((yyvsp[0].lex).b);
        (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yylsp[0]));
    }

    break;

  case 10:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
    }

    break;

  case 11:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 12:

    {
        (yyval.interm.intermTypedNode) = context->addIndexExpression((yyvsp[-3].interm.intermTypedNode), (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
    }

    break;

  case 13:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 14:

    {
        (yyval.interm.intermTypedNode) = context->addFieldSelectionExpression((yyvsp[-2].interm.intermTypedNode), (yylsp[-1]), *(yyvsp[0].lex).string, (yylsp[0]));
    }

    break;

  case 15:

    {
        (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
    }

    break;

  case 16:

    {
        (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode), (yylsp[0]));
    }

    break;

  case 17:

    {
        if (context->integerErrorCheck((yyvsp[0].interm.intermTypedNode), "[]"))
            context->recover();
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 18:

    {
        TFunction* fnCall = (yyvsp[0].interm).function;
        TOperator op = fnCall->getBuiltInOp();

        if (op != EOpNull)
        {
            //
            // Then this should be a constructor.
            // Don't go through the symbol table for constructors.
            // Their parameters will be verified algorithmically.
            //
            TType type(EbtVoid, EbpUndefined);  // use this to get the type back
            if (context->constructorErrorCheck((yylsp[0]), (yyvsp[0].interm).intermNode, *fnCall, op, &type)) {
                (yyval.interm.intermTypedNode) = 0;
            } else {
                //
                // It's a constructor, of type 'type'.
                //
                (yyval.interm.intermTypedNode) = context->addConstructor((yyvsp[0].interm).intermNode, &type, op, fnCall, (yylsp[0]));
            }

            if ((yyval.interm.intermTypedNode) == 0) {
                context->recover();
                (yyval.interm.intermTypedNode) = context->intermediate.setAggregateOperator(0, op, (yylsp[0]));
            }
            (yyval.interm.intermTypedNode)->setType(type);
        } else {
            //
            // Not a constructor.  Find it in the symbol table.
            //
            const TFunction* fnCandidate;
            bool builtIn;
            fnCandidate = context->findFunction((yylsp[0]), fnCall, context->shaderVersion, &builtIn);
            if (fnCandidate) {
                //
                // A declared function.
                //
                if (builtIn && !fnCandidate->getExtension().empty() &&
                    context->extensionErrorCheck((yylsp[0]), fnCandidate->getExtension())) {
                    context->recover();
                }
                op = fnCandidate->getBuiltInOp();
                if (builtIn && op != EOpNull) {
                    //
                    // A function call mapped to a built-in operation.
                    //
                    if (fnCandidate->getParamCount() == 1) {
                        //
                        // Treat it like a built-in unary operator.
                        //
                        (yyval.interm.intermTypedNode) = context->intermediate.addUnaryMath(op, (yyvsp[0].interm).intermNode, (yylsp[0]));
                        if ((yyval.interm.intermTypedNode) == 0)  {
                            std::stringstream extraInfoStream;
                            extraInfoStream << "built in unary operator function.  Type: " << static_cast<TIntermTyped*>((yyvsp[0].interm).intermNode)->getCompleteString();
                            std::string extraInfo = extraInfoStream.str();
                            context->error((yyvsp[0].interm).intermNode->getLine(), " wrong operand type", "Internal Error", extraInfo.c_str());
                            YYERROR;
                        }
                        const TType& returnType = fnCandidate->getReturnType();
                        if (returnType.getBasicType() == EbtBool) {
                            // Bool types should not have precision, so we'll override any precision
                            // that might have been set by addUnaryMath.
                            (yyval.interm.intermTypedNode)->setType(returnType);
                        } else {
                            // addUnaryMath has set the precision of the node based on the operand.
                            (yyval.interm.intermTypedNode)->setTypePreservePrecision(returnType);
                        }
                    } else {
                        TIntermAggregate *aggregate = context->intermediate.setAggregateOperator((yyvsp[0].interm).intermAggregate, op, (yylsp[0]));
                        aggregate->setType(fnCandidate->getReturnType());
                        aggregate->setPrecisionFromChildren();
                        (yyval.interm.intermTypedNode) = aggregate;

                        // Some built-in functions have out parameters too.
                        context->functionCallLValueErrorCheck(fnCandidate, aggregate);
                    }
                } else {
                    // This is a real function call

                    TIntermAggregate *aggregate = context->intermediate.setAggregateOperator((yyvsp[0].interm).intermAggregate, EOpFunctionCall, (yylsp[0]));
                    aggregate->setType(fnCandidate->getReturnType());

                    // this is how we know whether the given function is a builtIn function or a user defined function
                    // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also
                    // if builtIn == true, it's definitely a builtIn function with EOpNull
                    if (!builtIn)
                        aggregate->setUserDefined();
                    aggregate->setName(fnCandidate->getMangledName());

                    // This needs to happen after the name is set
                    if (builtIn)
                        aggregate->setBuiltInFunctionPrecision();

                    (yyval.interm.intermTypedNode) = aggregate;

                    context->functionCallLValueErrorCheck(fnCandidate, aggregate);
                }
            } else {
                // error message was put out by PaFindFunction()
                // Put on a dummy node for error recovery
                ConstantUnion *unionArray = new ConstantUnion[1];
                unionArray->setFConst(0.0f);
                (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yylsp[0]));
                context->recover();
            }
        }
        delete fnCall;
    }

    break;

  case 19:

    {
        (yyval.interm) = (yyvsp[0].interm);
    }

    break;

  case 20:

    {
        context->error((yylsp[0]), "methods are not supported", "");
        context->recover();
        (yyval.interm) = (yyvsp[0].interm);
    }

    break;

  case 21:

    {
        (yyval.interm) = (yyvsp[-1].interm);
    }

    break;

  case 22:

    {
        (yyval.interm) = (yyvsp[-1].interm);
    }

    break;

  case 23:

    {
        (yyval.interm).function = (yyvsp[-1].interm.function);
        (yyval.interm).intermNode = 0;
    }

    break;

  case 24:

    {
        (yyval.interm).function = (yyvsp[0].interm.function);
        (yyval.interm).intermNode = 0;
    }

    break;

  case 25:

    {
        TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
        (yyvsp[-1].interm.function)->addParameter(param);
        (yyval.interm).function = (yyvsp[-1].interm.function);
        (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 26:

    {
        TParameter param = { 0, new TType((yyvsp[0].interm.intermTypedNode)->getType()) };
        (yyvsp[-2].interm).function->addParameter(param);
        (yyval.interm).function = (yyvsp[-2].interm).function;
        (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 27:

    {
        (yyval.interm.function) = (yyvsp[-1].interm.function);
    }

    break;

  case 28:

    {
        (yyval.interm.function) = context->addConstructorFunc((yyvsp[0].interm.type));
    }

    break;

  case 29:

    {
        if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
            context->recover();
        TType type(EbtVoid, EbpUndefined);
        TFunction *function = new TFunction((yyvsp[0].lex).string, type);
        (yyval.interm.function) = function;
    }

    break;

  case 30:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 31:

    {
        (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreIncrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 32:

    {
        (yyval.interm.intermTypedNode) = context->addUnaryMathLValue(EOpPreDecrement, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 33:

    {
        if ((yyvsp[-1].interm).op != EOpNull) {
            (yyval.interm.intermTypedNode) = context->addUnaryMath((yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
        } else
            (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 34:

    { (yyval.interm).op = EOpPositive; }

    break;

  case 35:

    { (yyval.interm).op = EOpNegative; }

    break;

  case 36:

    { (yyval.interm).op = EOpLogicalNot; }

    break;

  case 37:

    {
        ES3_ONLY("~", (yyloc), "bit-wise operator");
        (yyval.interm).op = EOpBitwiseNot;
    }

    break;

  case 38:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 39:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 40:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 41:

    {
        ES3_ONLY("%", (yylsp[-1]), "integer modulus operator");
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpIMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 42:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 43:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 44:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 45:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 46:

    {
        ES3_ONLY("<<", (yylsp[-1]), "bit-wise operator");
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftLeft, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 47:

    {
        ES3_ONLY(">>", (yylsp[-1]), "bit-wise operator");
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitShiftRight, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 48:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 49:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 50:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 51:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 52:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 53:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 54:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 55:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 56:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 57:

    {
        ES3_ONLY("&", (yylsp[-1]), "bit-wise operator");
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 58:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 59:

    {
        ES3_ONLY("^", (yylsp[-1]), "bit-wise operator");
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 60:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 61:

    {
        ES3_ONLY("|", (yylsp[-1]), "bit-wise operator");
        (yyval.interm.intermTypedNode) = context->addBinaryMath(EOpBitwiseOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 62:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 63:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 64:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 65:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 66:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 67:

    {
        (yyval.interm.intermTypedNode) = context->addBinaryMathBooleanResult(EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
    }

    break;

  case 68:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 69:

    {
       if (context->boolErrorCheck((yylsp[-3]), (yyvsp[-4].interm.intermTypedNode)))
            context->recover();

        (yyval.interm.intermTypedNode) = context->intermediate.addSelection((yyvsp[-4].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-3]));
        if ((yyvsp[-2].interm.intermTypedNode)->getType() != (yyvsp[0].interm.intermTypedNode)->getType())
            (yyval.interm.intermTypedNode) = 0;

        if ((yyval.interm.intermTypedNode) == 0) {
            context->binaryOpError((yylsp[-3]), ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
            context->recover();
            (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
        }
    }

    break;

  case 70:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 71:

    {
        if (context->lValueErrorCheck((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)))
            context->recover();
        (yyval.interm.intermTypedNode) = context->intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
        if ((yyval.interm.intermTypedNode) == 0) {
            context->assignError((yylsp[-1]), "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
            context->recover();
            (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
        }
    }

    break;

  case 72:

    { (yyval.interm).op = EOpAssign; }

    break;

  case 73:

    { (yyval.interm).op = EOpMulAssign; }

    break;

  case 74:

    { (yyval.interm).op = EOpDivAssign; }

    break;

  case 75:

    {
        ES3_ONLY("%=", (yyloc), "integer modulus operator");
        (yyval.interm).op = EOpIModAssign;
    }

    break;

  case 76:

    { (yyval.interm).op = EOpAddAssign; }

    break;

  case 77:

    { (yyval.interm).op = EOpSubAssign; }

    break;

  case 78:

    {
        ES3_ONLY("<<=", (yyloc), "bit-wise operator");
        (yyval.interm).op = EOpBitShiftLeftAssign;
    }

    break;

  case 79:

    {
        ES3_ONLY(">>=", (yyloc), "bit-wise operator");
        (yyval.interm).op = EOpBitShiftRightAssign;
    }

    break;

  case 80:

    {
        ES3_ONLY("&=", (yyloc), "bit-wise operator");
        (yyval.interm).op = EOpBitwiseAndAssign;
    }

    break;

  case 81:

    {
        ES3_ONLY("^=", (yyloc), "bit-wise operator");
        (yyval.interm).op = EOpBitwiseXorAssign;
    }

    break;

  case 82:

    {
        ES3_ONLY("|=", (yyloc), "bit-wise operator");
        (yyval.interm).op = EOpBitwiseOrAssign;
    }

    break;

  case 83:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 84:

    {
        (yyval.interm.intermTypedNode) = context->intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yylsp[-1]));
        if ((yyval.interm.intermTypedNode) == 0) {
            context->binaryOpError((yylsp[-1]), ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
            context->recover();
            (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
        }
    }

    break;

  case 85:

    {
        if (context->constErrorCheck((yyvsp[0].interm.intermTypedNode)))
            context->recover();
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 86:

    {
        if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string))
            context->recover();
        (yyval.lex) = (yyvsp[-1].lex);
    }

    break;

  case 87:

    {
        TFunction &function = *((yyvsp[-1].interm).function);
        
        TIntermAggregate *prototype = new TIntermAggregate;
        prototype->setType(function.getReturnType());
        prototype->setName(function.getMangledName());
        
        for (size_t i = 0; i < function.getParamCount(); i++)
        {
            const TParameter &param = function.getParam(i);
            if (param.name != 0)
            {
                TVariable variable(param.name, *param.type);
                
                prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yylsp[-1])), (yylsp[-1]));
            }
            else
            {
                prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(0, "", *param.type, (yylsp[-1])), (yylsp[-1]));
            }
        }
        
        prototype->setOp(EOpPrototype);
        (yyval.interm.intermNode) = prototype;

        context->symbolTable.pop();
    }

    break;

  case 88:

    {
        TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate;
        if (aggNode && aggNode->getOp() == EOpNull)
            aggNode->setOp(EOpDeclaration);
        (yyval.interm.intermNode) = aggNode;
    }

    break;

  case 89:

    {
        if (((yyvsp[-2].interm.precision) == EbpHigh) && (context->shaderType == GL_FRAGMENT_SHADER) && !context->fragmentPrecisionHigh) {
            context->error((yylsp[-3]), "precision is not supported in fragment shader", "highp");
            context->recover();
        }
        if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) {
            context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type));
            context->recover();
        }
        (yyval.interm.intermNode) = 0;
    }

    break;

  case 90:

    {
        ES3_ONLY(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks");
        (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-4].interm.type), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yyloc), NULL, (yyloc));
    }

    break;

  case 91:

    {
        ES3_ONLY(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks");
        (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-5].interm.type), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yyloc));
    }

    break;

  case 92:

    {
        ES3_ONLY(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks");
        (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-8].interm.type), (yylsp[-7]), *(yyvsp[-7].lex).string, (yyvsp[-6].interm.fieldList), (yyvsp[-4].lex).string, (yylsp[-4]), (yyvsp[-2].interm.intermTypedNode), (yylsp[-3]));
    }

    break;

  case 93:

    {
        context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type));
        (yyval.interm.intermNode) = 0;
    }

    break;

  case 94:

    {
        //
        // Multiple declarations of the same function are allowed.
        //
        // If this is a definition, the definition production code will check for redefinitions
        // (we don't know at this point if it's a definition or not).
        //
        // Redeclarations are allowed.  But, return types and parameter qualifiers must match.
        //
        TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find((yyvsp[-1].interm.function)->getMangledName(), context->shaderVersion));
        if (prevDec) {
            if (prevDec->getReturnType() != (yyvsp[-1].interm.function)->getReturnType()) {
                context->error((yylsp[0]), "overloaded functions must have the same return type", (yyvsp[-1].interm.function)->getReturnType().getBasicString());
                context->recover();
            }
            for (size_t i = 0; i < prevDec->getParamCount(); ++i) {
                if (prevDec->getParam(i).type->getQualifier() != (yyvsp[-1].interm.function)->getParam(i).type->getQualifier()) {
                    context->error((yylsp[0]), "overloaded functions must have the same parameter qualifiers", (yyvsp[-1].interm.function)->getParam(i).type->getQualifierString());
                    context->recover();
                }
            }
        }

        //
        // Check for previously declared variables using the same name.
        //
        TSymbol *prevSym = context->symbolTable.find((yyvsp[-1].interm.function)->getName(), context->shaderVersion);
        if (prevSym)
        {
            if (!prevSym->isFunction())
            {
                context->error((yylsp[0]), "redefinition", (yyvsp[-1].interm.function)->getName().c_str(), "function");
                context->recover();
            }
        }
        else
        {
            // Insert the unmangled name to detect potential future redefinition as a variable.
            TFunction *function = new TFunction(NewPoolTString((yyvsp[-1].interm.function)->getName().c_str()), (yyvsp[-1].interm.function)->getReturnType());
            context->symbolTable.getOuterLevel()->insert(function);
        }

        //
        // If this is a redeclaration, it could also be a definition,
        // in which case, we want to use the variable names from this one, and not the one that's
        // being redeclared.  So, pass back up this declaration, not the one in the symbol table.
        //
        (yyval.interm).function = (yyvsp[-1].interm.function);

        // We're at the inner scope level of the function's arguments and body statement.
        // Add the function prototype to the surrounding scope instead.
        context->symbolTable.getOuterLevel()->insert((yyval.interm).function);
    }

    break;

  case 95:

    {
        (yyval.interm.function) = (yyvsp[0].interm.function);
    }

    break;

  case 96:

    {
        (yyval.interm.function) = (yyvsp[0].interm.function);
    }

    break;

  case 97:

    {
        // Add the parameter
        (yyval.interm.function) = (yyvsp[-1].interm.function);
        if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
            (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
        else
            delete (yyvsp[0].interm).param.type;
    }

    break;

  case 98:

    {
        //
        // Only first parameter of one-parameter functions can be void
        // The check for named parameters not being void is done in parameter_declarator
        //
        if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
            //
            // This parameter > first is void
            //
            context->error((yylsp[-1]), "cannot be an argument type except for '(void)'", "void");
            context->recover();
            delete (yyvsp[0].interm).param.type;
        } else {
            // Add the parameter
            (yyval.interm.function) = (yyvsp[-2].interm.function);
            (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
        }
    }

    break;

  case 99:

    {
        if ((yyvsp[-2].interm.type).qualifier != EvqGlobal && (yyvsp[-2].interm.type).qualifier != EvqTemporary) {
            context->error((yylsp[-1]), "no qualifiers allowed for function return", getQualifierString((yyvsp[-2].interm.type).qualifier));
            context->recover();
        }
        // make sure a sampler is not involved as well...
        if (context->structQualifierErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type)))
            context->recover();

        // Add the function as a prototype after parsing it (we do not support recursion)
        TFunction *function;
        TType type((yyvsp[-2].interm.type));
        function = new TFunction((yyvsp[-1].lex).string, type);
        (yyval.interm.function) = function;
        
        context->symbolTable.push();
    }

    break;

  case 100:

    {
        if ((yyvsp[-1].interm.type).type == EbtVoid) {
            context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str());
            context->recover();
        }
        if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
            context->recover();
        TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
        (yyval.interm).param = param;
    }

    break;

  case 101:

    {
        // Check that we can make an array out of this type
        if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-4].interm.type)))
            context->recover();

        if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
            context->recover();

        int size;
        if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
            context->recover();
        (yyvsp[-4].interm.type).setArray(true, size);

        TType* type = new TType((yyvsp[-4].interm.type));
        TParameter param = { (yyvsp[-3].lex).string, type };
        (yyval.interm).param = param;
    }

    break;

  case 102:

    {
        (yyval.interm) = (yyvsp[0].interm);
        if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
            context->recover();
    }

    break;

  case 103:

    {
        (yyval.interm) = (yyvsp[0].interm);
        if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
            context->recover();
        if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
            context->recover();
    }

    break;

  case 104:

    {
        (yyval.interm) = (yyvsp[0].interm);
        if (context->paramErrorCheck((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
            context->recover();
    }

    break;

  case 105:

    {
        (yyval.interm) = (yyvsp[0].interm);
        if (context->parameterSamplerErrorCheck((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type))
            context->recover();
        if (context->paramErrorCheck((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type))
            context->recover();
    }

    break;

  case 106:

    {
        (yyval.interm.qualifier) = EvqIn;
    }

    break;

  case 107:

    {
        (yyval.interm.qualifier) = EvqIn;
    }

    break;

  case 108:

    {
        (yyval.interm.qualifier) = EvqOut;
    }

    break;

  case 109:

    {
        (yyval.interm.qualifier) = EvqInOut;
    }

    break;

  case 110:

    {
        TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
        (yyval.interm).param = param;
    }

    break;

  case 111:

    {
        (yyval.interm) = (yyvsp[0].interm);
    }

    break;

  case 112:

    {
        (yyval.interm) = (yyvsp[-2].interm);
        (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yyvsp[0].lex).symbol, (yylsp[0]), *(yyvsp[0].lex).string);
    }

    break;

  case 113:

    {
        (yyval.interm) = (yyvsp[-4].interm);
        context->parseArrayDeclarator((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), NULL, NULL);
    }

    break;

  case 114:

    {
        (yyval.interm) = (yyvsp[-5].interm);
        (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-5].interm).intermNode, (yyvsp[-1].interm.intermTypedNode));
    }

    break;

  case 115:

    {
        (yyval.interm) = (yyvsp[-4].interm);
        (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[-4].interm).intermAggregate, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
    }

    break;

  case 116:

    {
        (yyval.interm).type = (yyvsp[0].interm.type);
        (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), "");
    }

    break;

  case 117:

    {
        (yyval.interm).type = (yyvsp[-1].interm.type);
        (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string);
    }

    break;

  case 118:

    {
        context->error((yylsp[-2]), "unsized array declarations not supported", (yyvsp[-2].lex).string->c_str());
        context->recover();

        (yyval.interm).type = (yyvsp[-3].interm.type);
        (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string);
    }

    break;

  case 119:

    {
        (yyval.interm).type = (yyvsp[-4].interm.type);
        (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
    }

    break;

  case 120:

    {
        (yyval.interm).type = (yyvsp[-3].interm.type);
        (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode));
    }

    break;

  case 121:

    {
        // $$.type is not used in invariant declarations.
        (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol);
    }

    break;

  case 122:

    {
        (yyval.interm.type) = (yyvsp[0].interm.type);

        if ((yyvsp[0].interm.type).array) {
            context->error((yylsp[0]), "not supported", "first-class array");
            context->recover();
            (yyvsp[0].interm.type).setArray(false);
        }
    }

    break;

  case 123:

    {
        (yyval.interm.type) = context->addFullySpecifiedType((yyvsp[-1].interm.type).qualifier, (yyvsp[-1].interm.type).layoutQualifier, (yyvsp[0].interm.type));
    }

    break;

  case 124:

    {
        (yyval.interm.type).qualifier = EvqSmooth;
    }

    break;

  case 125:

    {
        (yyval.interm.type).qualifier = EvqFlat;
    }

    break;

  case 126:

    {
        (yyval.interm.qualifier) = EvqConst;
    }

    break;

  case 127:

    {
        VERTEX_ONLY("attribute", (yylsp[0]));
        ES2_ONLY("attribute", (yylsp[0]));
        if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "attribute"))
            context->recover();
        (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0]));
    }

    break;

  case 128:

    {
        ES2_ONLY("varying", (yylsp[0]));
        if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "varying"))
            context->recover();
        if (context->shaderType == GL_VERTEX_SHADER)
            (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0]));
        else
            (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0]));
    }

    break;

  case 129:

    {
        ES2_ONLY("varying", (yylsp[-1]));
        if (context->globalErrorCheck((yylsp[-1]), context->symbolTable.atGlobalLevel(), "invariant varying"))
            context->recover();
        if (context->shaderType == GL_VERTEX_SHADER)
            (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yylsp[-1]));
        else
            (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yylsp[-1]));
    }

    break;

  case 130:

    {
        if ((yyvsp[0].interm.type).qualifier != EvqConst && !context->symbolTable.atGlobalLevel()) {
            context->error((yylsp[0]), "Local variables can only use the const storage qualifier.", getQualifierString((yyvsp[0].interm.type).qualifier));
            context->recover();
        } else {
            (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
        }
    }

    break;

  case 131:

    {
        (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier);
    }

    break;

  case 132:

    {
        context->error((yylsp[0]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getInterpolationString((yyvsp[0].interm.type).qualifier));
        context->recover();
        
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
    }

    break;

  case 133:

    {
        (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier);
    }

    break;

  case 134:

    {
        (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0]));
        (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier);
    }

    break;

  case 135:

    {
        (yyval.interm.type).qualifier = EvqConst;
    }

    break;

  case 136:

    {
        ES3_ONLY("in", (yylsp[0]), "storage qualifier");
        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentIn : EvqVertexIn;
    }

    break;

  case 137:

    {
        ES3_ONLY("out", (yylsp[0]), "storage qualifier");
        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut;
    }

    break;

  case 138:

    {
        ES3_ONLY("centroid in", (yylsp[-1]), "storage qualifier");
        if (context->shaderType == GL_VERTEX_SHADER)
        {
            context->error((yylsp[-1]), "invalid storage qualifier", "it is an error to use 'centroid in' in the vertex shader");
            context->recover();
        }
        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqCentroidIn : EvqVertexIn;
    }

    break;

  case 139:

    {
        ES3_ONLY("centroid out", (yylsp[-1]), "storage qualifier");
        if (context->shaderType == GL_FRAGMENT_SHADER)
        {
            context->error((yylsp[-1]), "invalid storage qualifier", "it is an error to use 'centroid out' in the fragment shader");
            context->recover();
        }
        (yyval.interm.type).qualifier = (context->shaderType == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqCentroidOut;
    }

    break;

  case 140:

    {
        if (context->globalErrorCheck((yylsp[0]), context->symbolTable.atGlobalLevel(), "uniform"))
            context->recover();
        (yyval.interm.type).qualifier = EvqUniform;
    }

    break;

  case 141:

    {
        (yyval.interm.type) = (yyvsp[0].interm.type);

        if ((yyval.interm.type).precision == EbpUndefined) {
            (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type);
            if (context->precisionErrorCheck((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type)) {
                context->recover();
            }
        }
    }

    break;

  case 142:

    {
        (yyval.interm.type) = (yyvsp[0].interm.type);
        (yyval.interm.type).precision = (yyvsp[-1].interm.precision);

        if (!SupportsPrecision((yyvsp[0].interm.type).type)) {
            context->error((yylsp[-1]), "illegal type for precision qualifier", getBasicString((yyvsp[0].interm.type).type));
            context->recover();
        }
    }

    break;

  case 143:

    {
        (yyval.interm.precision) = EbpHigh;
    }

    break;

  case 144:

    {
        (yyval.interm.precision) = EbpMedium;
    }

    break;

  case 145:

    {
        (yyval.interm.precision) = EbpLow;
    }

    break;

  case 146:

    {
        ES3_ONLY("layout", (yylsp[-3]), "qualifier");
        (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier);
    }

    break;

  case 147:

    {
        (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier);
    }

    break;

  case 148:

    {
        (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier));
    }

    break;

  case 149:

    {
        (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0]));
    }

    break;

  case 150:

    {
        (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0]));
    }

    break;

  case 151:

    {
        (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), *(yyvsp[0].lex).string, (yyvsp[0].lex).i, (yylsp[0]));
    }

    break;

  case 152:

    {
        (yyval.interm.type) = (yyvsp[0].interm.type);
    }

    break;

  case 153:

    {
        (yyval.interm.type) = (yyvsp[-3].interm.type);

        if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
            context->recover();
        else {
            int size;
            if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
                context->recover();
            (yyval.interm.type).setArray(true, size);
        }
    }

    break;

  case 154:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0]));
    }

    break;

  case 155:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
    }

    break;

  case 156:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
    }

    break;

  case 157:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
    }

    break;

  case 158:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
    }

    break;

  case 159:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(2);
    }

    break;

  case 160:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(3);
    }

    break;

  case 161:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(4);
    }

    break;

  case 162:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(2);
    }

    break;

  case 163:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(3);
    }

    break;

  case 164:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(4);
    }

    break;

  case 165:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(2);
    }

    break;

  case 166:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(3);
    }

    break;

  case 167:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(4);
    }

    break;

  case 168:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(2);
    }

    break;

  case 169:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(3);
    }

    break;

  case 170:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0]));
        (yyval.interm.type).setAggregate(4);
    }

    break;

  case 171:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(2, 2);
    }

    break;

  case 172:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(3, 3);
    }

    break;

  case 173:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(4, 4);
    }

    break;

  case 174:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(2, 3);
    }

    break;

  case 175:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(3, 2);
    }

    break;

  case 176:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(2, 4);
    }

    break;

  case 177:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(4, 2);
    }

    break;

  case 178:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(3, 4);
    }

    break;

  case 179:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0]));
        (yyval.interm.type).setMatrix(4, 3);
    }

    break;

  case 180:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0]));
    }

    break;

  case 181:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0]));
    }

    break;

  case 182:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0]));
    }

    break;

  case 183:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0]));
    }

    break;

  case 184:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0]));
    }

    break;

  case 185:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0]));
    }

    break;

  case 186:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0]));
    }

    break;

  case 187:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0]));
    }

    break;

  case 188:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0]));
    }

    break;

  case 189:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0]));
    }

    break;

  case 190:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0]));
    }

    break;

  case 191:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0]));
    }

    break;

  case 192:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0]));
    }

    break;

  case 193:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0]));
    }

    break;

  case 194:

    {
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0]));
    }

    break;

  case 195:

    {
        if (!context->supportsExtension("GL_OES_EGL_image_external")) {
            context->error((yylsp[0]), "unsupported type", "samplerExternalOES");
            context->recover();
        }
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0]));
    }

    break;

  case 196:

    {
        if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
            context->error((yylsp[0]), "unsupported type", "sampler2DRect");
            context->recover();
        }
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yylsp[0]));
    }

    break;

  case 197:

    {
        (yyval.interm.type) = (yyvsp[0].interm.type);
        (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
    }

    break;

  case 198:

    {
        //
        // This is for user defined type names.  The lexical phase looked up the
        // type.
        //
        TType& structure = static_cast<TVariable*>((yyvsp[0].lex).symbol)->getType();
        TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0]));
        (yyval.interm.type).userDef = &structure;
    }

    break;

  case 199:

    { if (context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string)) context->recover(); }

    break;

  case 200:

    {
        (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList));
    }

    break;

  case 201:

    { if (context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string)) context->recover(); }

    break;

  case 202:

    {
        (yyval.interm.type) = context->addStructure((yylsp[-4]), (yyloc), NewPoolTString(""), (yyvsp[-1].interm.fieldList));
    }

    break;

  case 203:

    {
        (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList);
    }

    break;

  case 204:

    {
        (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList);
        for (size_t i = 0; i < (yyvsp[0].interm.fieldList)->size(); ++i) {
            TField* field = (*(yyvsp[0].interm.fieldList))[i];
            for (size_t j = 0; j < (yyval.interm.fieldList)->size(); ++j) {
                if ((*(yyval.interm.fieldList))[j]->name() == field->name()) {
                    context->error((yylsp[0]), "duplicate field name in structure:", "struct", field->name().c_str());
                    context->recover();
                }
            }
            (yyval.interm.fieldList)->push_back(field);
        }
    }

    break;

  case 205:

    {
        (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
    }

    break;

  case 206:

    {
        // ES3 Only, but errors should be handled elsewhere
        (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier;
        (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier;
        (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList));
    }

    break;

  case 207:

    {
        (yyval.interm.fieldList) = NewPoolTFieldList();
        (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
    }

    break;

  case 208:

    {
        (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field));
    }

    break;

  case 209:

    {
        if (context->reservedErrorCheck((yylsp[0]), *(yyvsp[0].lex).string))
            context->recover();

        TType* type = new TType(EbtVoid, EbpUndefined);
        (yyval.interm.field) = new TField(type, (yyvsp[0].lex).string, (yylsp[0]));
    }

    break;

  case 210:

    {
        if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
            context->recover();

        TType* type = new TType(EbtVoid, EbpUndefined);
        int size;
        if (context->arraySizeErrorCheck((yylsp[-1]), (yyvsp[-1].interm.intermTypedNode), size))
            context->recover();
        type->setArraySize(size);

        (yyval.interm.field) = new TField(type, (yyvsp[-3].lex).string, (yylsp[-3]));
    }

    break;

  case 211:

    { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }

    break;

  case 212:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 213:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); }

    break;

  case 214:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 215:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 216:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 217:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 218:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); }

    break;

  case 219:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); }

    break;

  case 220:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 221:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 222:

    { (yyval.interm.intermAggregate) = 0; }

    break;

  case 223:

    { context->symbolTable.push(); }

    break;

  case 224:

    { context->symbolTable.pop(); }

    break;

  case 225:

    {
        if ((yyvsp[-2].interm.intermAggregate) != 0) {
            (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence);
            (yyvsp[-2].interm.intermAggregate)->setLine((yyloc));
        }
        (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate);
    }

    break;

  case 226:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 227:

    { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 228:

    { context->symbolTable.push(); }

    break;

  case 229:

    { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 230:

    { context->symbolTable.push(); }

    break;

  case 231:

    { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }

    break;

  case 232:

    {
        (yyval.interm.intermNode) = 0;
    }

    break;

  case 233:

    {
        if ((yyvsp[-1].interm.intermAggregate)) {
            (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence);
            (yyvsp[-1].interm.intermAggregate)->setLine((yyloc));
        }
        (yyval.interm.intermNode) = (yyvsp[-1].interm.intermAggregate);
    }

    break;

  case 234:

    {
        (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc));
    }

    break;

  case 235:

    {
        (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc));
    }

    break;

  case 236:

    { (yyval.interm.intermNode) = 0; }

    break;

  case 237:

    { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }

    break;

  case 238:

    {
        if (context->boolErrorCheck((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)))
            context->recover();
        (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4]));
    }

    break;

  case 239:

    {
        (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
        (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
    }

    break;

  case 240:

    {
        (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
        (yyval.interm.nodePair).node2 = 0;
    }

    break;

  case 241:

    { ++context->mSwitchNestingLevel; }

    break;

  case 242:

    {
        (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5]));
        --context->mSwitchNestingLevel;
    }

    break;

  case 243:

    {
        (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
    }

    break;

  case 244:

    {
        (yyval.interm.intermCase) = context->addDefault((yylsp[-1]));
    }

    break;

  case 245:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
        if (context->boolErrorCheck((yyvsp[0].interm.intermTypedNode)->getLine(), (yyvsp[0].interm.intermTypedNode)))
            context->recover();
    }

    break;

  case 246:

    {
        TIntermNode* intermNode;
        if (context->structQualifierErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
            context->recover();
        if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
            context->recover();

        if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), intermNode))
            (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
        else {
            context->recover();
            (yyval.interm.intermTypedNode) = 0;
        }
    }

    break;

  case 247:

    { context->symbolTable.push(); ++context->mLoopNestingLevel; }

    break;

  case 248:

    {
        context->symbolTable.pop();
        (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[0].interm.intermNode), (yylsp[-5]));
        --context->mLoopNestingLevel;
    }

    break;

  case 249:

    { ++context->mLoopNestingLevel; }

    break;

  case 250:

    {
        if (context->boolErrorCheck((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)))
            context->recover();

        (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[-2].interm.intermTypedNode), 0, (yyvsp[-5].interm.intermNode), (yylsp[-4]));
        --context->mLoopNestingLevel;
    }

    break;

  case 251:

    { context->symbolTable.push(); ++context->mLoopNestingLevel; }

    break;

  case 252:

    {
        context->symbolTable.pop();
        (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopFor, (yyvsp[-3].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), (yyvsp[0].interm.intermNode), (yylsp[-6]));
        --context->mLoopNestingLevel;
    }

    break;

  case 253:

    {
        (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
    }

    break;

  case 254:

    {
        (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
    }

    break;

  case 255:

    {
        (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 256:

    {
        (yyval.interm.intermTypedNode) = 0;
    }

    break;

  case 257:

    {
        (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
        (yyval.interm.nodePair).node2 = 0;
    }

    break;

  case 258:

    {
        (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
        (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
    }

    break;

  case 259:

    {
        (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1]));
    }

    break;

  case 260:

    {
        (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1]));
    }

    break;

  case 261:

    {
        (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1]));
    }

    break;

  case 262:

    {
        (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2]));
    }

    break;

  case 263:

    {
        FRAG_ONLY("discard", (yylsp[-1]));
        (yyval.interm.intermNode) = context->addBranch(EOpKill, (yylsp[-1]));
    }

    break;

  case 264:

    {
        (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
        context->treeRoot = (yyval.interm.intermNode);
    }

    break;

  case 265:

    {
        (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc));
        context->treeRoot = (yyval.interm.intermNode);
    }

    break;

  case 266:

    {
        (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
    }

    break;

  case 267:

    {
        (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
    }

    break;

  case 268:

    {
        TFunction* function = (yyvsp[0].interm).function;
        
        const TSymbol *builtIn = context->symbolTable.findBuiltIn(function->getMangledName(), context->shaderVersion);
        
        if (builtIn)
        {
            context->error((yylsp[0]), "built-in functions cannot be redefined", function->getName().c_str());
            context->recover();
        }
        
        TFunction* prevDec = static_cast<TFunction*>(context->symbolTable.find(function->getMangledName(), context->shaderVersion));
        //
        // Note:  'prevDec' could be 'function' if this is the first time we've seen function
        // as it would have just been put in the symbol table.  Otherwise, we're looking up
        // an earlier occurance.
        //
        if (prevDec->isDefined()) {
            //
            // Then this function already has a body.
            //
            context->error((yylsp[0]), "function already has a body", function->getName().c_str());
            context->recover();
        }
        prevDec->setDefined();

        //
        // Raise error message if main function takes any parameters or return anything other than void
        //
        if (function->getName() == "main") {
            if (function->getParamCount() > 0) {
                context->error((yylsp[0]), "function cannot take any parameter(s)", function->getName().c_str());
                context->recover();
            }
            if (function->getReturnType().getBasicType() != EbtVoid) {
                context->error((yylsp[0]), "", function->getReturnType().getBasicString(), "main function cannot return a value");
                context->recover();
            }
        }

        //
        // Remember the return type for later checking for RETURN statements.
        //
        context->currentFunctionType = &(prevDec->getReturnType());
        context->mFunctionReturnsValue = false;

        //
        // Insert parameters into the symbol table.
        // If the parameter has no name, it's not an error, just don't insert it
        // (could be used for unused args).
        //
        // Also, accumulate the list of parameters into the HIL, so lower level code
        // knows where to find parameters.
        //
        TIntermAggregate* paramNodes = new TIntermAggregate;
        for (size_t i = 0; i < function->getParamCount(); i++) {
            const TParameter& param = function->getParam(i);
            if (param.name != 0) {
                TVariable *variable = new TVariable(param.name, *param.type);
                //
                // Insert the parameters with name in the symbol table.
                //
                if (! context->symbolTable.declare(variable)) {
                    context->error((yylsp[0]), "redefinition", variable->getName().c_str());
                    context->recover();
                    delete variable;
                }

                //
                // Add the parameter to the HIL
                //
                paramNodes = context->intermediate.growAggregate(
                                               paramNodes,
                                               context->intermediate.addSymbol(variable->getUniqueId(),
                                                                       variable->getName(),
                                                                       variable->getType(), (yylsp[0])),
                                               (yylsp[0]));
            } else {
                paramNodes = context->intermediate.growAggregate(paramNodes, context->intermediate.addSymbol(0, "", *param.type, (yylsp[0])), (yylsp[0]));
            }
        }
        context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yylsp[0]));
        (yyvsp[0].interm).intermAggregate = paramNodes;
        context->mLoopNestingLevel = 0;
    }

    break;

  case 269:

    {
        //?? Check that all paths return a value if return type != void ?
        //   May be best done as post process phase on intermediate code
        if (context->currentFunctionType->getBasicType() != EbtVoid && ! context->mFunctionReturnsValue) {
            context->error((yylsp[-2]), "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str());
            context->recover();
        }
        
        (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermNode), (yyloc));
        context->intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yylsp[-2]));
        (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str());
        (yyval.interm.intermNode)->getAsAggregate()->setType((yyvsp[-2].interm).function->getReturnType());

        // store the pragma information for debug and optimize and other vendor specific
        // information. This information can be queried from the parse tree
        (yyval.interm.intermNode)->getAsAggregate()->setOptimize(context->pragma().optimize);
        (yyval.interm.intermNode)->getAsAggregate()->setDebug(context->pragma().debug);

        context->symbolTable.pop();
    }

    break;



      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;
  *++yylsp = yyloc;

  /* Now 'shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);

  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if ! YYERROR_VERBOSE
      yyerror (&yylloc, context, scanner, YY_("syntax error"));
#else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
                                        yyssp, yytoken)
      {
        char const *yymsgp = YY_("syntax error");
        int yysyntax_error_status;
        yysyntax_error_status = YYSYNTAX_ERROR;
        if (yysyntax_error_status == 0)
          yymsgp = yymsg;
        else if (yysyntax_error_status == 1)
          {
            if (yymsg != yymsgbuf)
              YYSTACK_FREE (yymsg);
            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
            if (!yymsg)
              {
                yymsg = yymsgbuf;
                yymsg_alloc = sizeof yymsgbuf;
                yysyntax_error_status = 2;
              }
            else
              {
                yysyntax_error_status = YYSYNTAX_ERROR;
                yymsgp = yymsg;
              }
          }
        yyerror (&yylloc, context, scanner, yymsgp);
        if (yysyntax_error_status == 2)
          goto yyexhaustedlab;
      }
# undef YYSYNTAX_ERROR
#endif
    }

  yyerror_range[1] = yylloc;

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == YYEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval, &yylloc, context, scanner);
          yychar = YYEMPTY;
        }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
     goto yyerrorlab;

  yyerror_range[1] = yylsp[1-yylen];
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYTERROR;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;

      yyerror_range[1] = *yylsp;
      yydestruct ("Error: popping",
                  yystos[yystate], yyvsp, yylsp, context, scanner);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  yyerror_range[2] = yylloc;
  /* Using YYLLOC is tempting, but would change the location of
     the lookahead.  YYLOC is available though.  */
  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
  *++yylsp = yyloc;

  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here.  |
`-------------------------------------------------*/
yyexhaustedlab:
  yyerror (&yylloc, context, scanner, YY_("memory exhausted"));
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval, &yylloc, context, scanner);
    }
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
                  yystos[*yyssp], yyvsp, yylsp, context, scanner);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
  if (yymsg != yymsgbuf)
    YYSTACK_FREE (yymsg);
#endif
  return yyresult;
}



int glslang_parse(TParseContext* context) {
    return yyparse(context, context->scanner);
}
