LCOV - code coverage report
Current view: directory - gfx/angle/src/compiler - glslang_tab.cpp (source / functions) Found Hit Coverage
Test: app.info Lines: 1280 0 0.0 %
Date: 2012-06-02 Functions: 3 0 0.0 %

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

Generated by: LCOV version 1.7